clear-pkgs-linux-iot-lts2018/1096-media-intel-ipu4-ICI-V...

43 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ong Hock Yu <ong.hock.yu@intel.com>
Date: Thu, 16 May 2019 06:05:30 +0000
Subject: [PATCH] media: intel-ipu4: [ICI/VIRT] Fix top half and bottom half
ISR race condition
Under race condition, the bottom half of the ISR get finished
before top half and this caused the state get overwritten.
The fix is to move all the state update in top half to before
bottom half get started.
Change-Id: I95e7325c07d576495f63b393a4816d9336d508c8
Tracked-On: PKT-2287
Tracked-On: HSDES-1507210582
Signed-off-by: Ong Hock Yu <ong.hock.yu@intel.com>
---
drivers/media/pci/intel/virtio/intel-ipu4-virtio-be-bridge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/pci/intel/virtio/intel-ipu4-virtio-be-bridge.c b/drivers/media/pci/intel/virtio/intel-ipu4-virtio-be-bridge.c
index 19ffac6e2110..e40f7149abcf 100644
--- a/drivers/media/pci/intel/virtio/intel-ipu4-virtio-be-bridge.c
+++ b/drivers/media/pci/intel/virtio/intel-ipu4-virtio-be-bridge.c
@@ -38,6 +38,8 @@ int intel_ipu4_virtio_msg_parse(struct ipu4_virtio_req_info *req_info)
return -EINVAL;
}
+ req->stat = IPU4_REQ_PENDING;
+
switch (req->cmd) {
case IPU4_CMD_POLL:
/*
@@ -250,6 +252,5 @@ int intel_ipu4_virtio_msg_parse(struct ipu4_virtio_req_info *req_info)
return -EINVAL;
}
- req->stat = IPU4_REQ_PENDING;
return ret;
}
--
https://clearlinux.org