linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] accel/qaic fixes for 6.4
@ 2023-05-17 19:35 Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 1/5] accel/qaic: Validate user data before grabbing any lock Jeffrey Hugo
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-17 19:35 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel, Jeffrey Hugo

During development of new features, we noticed some spots in the code that
could be improved based on review feedback from the initial driver series.

Also two race condition fixes, one found during stress testing and another
via code inspection.

Jeffrey Hugo (1):
  accel/qaic: Fix NNC message corruption

Pranjal Ramajor Asha Kanojiya (4):
  accel/qaic: Validate user data before grabbing any lock
  accel/qaic: Validate if BO is sliced before slicing
  accel/qaic: Flush the transfer list again
  accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO

 drivers/accel/qaic/qaic_control.c | 41 ++++++++------
 drivers/accel/qaic/qaic_data.c    | 91 +++++++++++++++----------------
 2 files changed, 70 insertions(+), 62 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] accel/qaic: Validate user data before grabbing any lock
  2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
@ 2023-05-17 19:35 ` Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 2/5] accel/qaic: Validate if BO is sliced before slicing Jeffrey Hugo
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-17 19:35 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel, Jeffrey Hugo

From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

Validating user data does not need to be protected by any lock and it is
safe to move it out of critical region.

Fixes: ff13be830333 ("accel/qaic: Add datapath")
Fixes: 129776ac2e38 ("accel/qaic: Add control path")
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
---
 drivers/accel/qaic/qaic_control.c | 12 ++----
 drivers/accel/qaic/qaic_data.c    | 61 ++++++++++++-------------------
 2 files changed, 27 insertions(+), 46 deletions(-)

diff --git a/drivers/accel/qaic/qaic_control.c b/drivers/accel/qaic/qaic_control.c
index 9f216eb6f76e..9e39b1a324f7 100644
--- a/drivers/accel/qaic/qaic_control.c
+++ b/drivers/accel/qaic/qaic_control.c
@@ -1249,7 +1249,7 @@ static int qaic_manage(struct qaic_device *qdev, struct qaic_user *usr, struct m
 
 int qaic_manage_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv)
 {
-	struct qaic_manage_msg *user_msg;
+	struct qaic_manage_msg *user_msg = data;
 	struct qaic_device *qdev;
 	struct manage_msg *msg;
 	struct qaic_user *usr;
@@ -1258,6 +1258,9 @@ int qaic_manage_ioctl(struct drm_device *dev, void *data, struct drm_file *file_
 	int usr_rcu_id;
 	int ret;
 
+	if (user_msg->len > QAIC_MANAGE_MAX_MSG_LENGTH)
+		return -EINVAL;
+
 	usr = file_priv->driver_priv;
 
 	usr_rcu_id = srcu_read_lock(&usr->qddev_lock);
@@ -1275,13 +1278,6 @@ int qaic_manage_ioctl(struct drm_device *dev, void *data, struct drm_file *file_
 		return -ENODEV;
 	}
 
-	user_msg = data;
-
-	if (user_msg->len > QAIC_MANAGE_MAX_MSG_LENGTH) {
-		ret = -EINVAL;
-		goto out;
-	}
-
 	msg = kzalloc(QAIC_MANAGE_MAX_MSG_LENGTH + sizeof(*msg), GFP_KERNEL);
 	if (!msg) {
 		ret = -ENOMEM;
diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
index c0a574cd1b35..7a4397e3122b 100644
--- a/drivers/accel/qaic/qaic_data.c
+++ b/drivers/accel/qaic/qaic_data.c
@@ -663,6 +663,10 @@ int qaic_create_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *fi
 	if (args->pad)
 		return -EINVAL;
 
+	size = PAGE_ALIGN(args->size);
+	if (size == 0)
+		return -EINVAL;
+
 	usr = file_priv->driver_priv;
 	usr_rcu_id = srcu_read_lock(&usr->qddev_lock);
 	if (!usr->qddev) {
@@ -677,12 +681,6 @@ int qaic_create_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *fi
 		goto unlock_dev_srcu;
 	}
 
-	size = PAGE_ALIGN(args->size);
-	if (size == 0) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
 	bo = qaic_alloc_init_bo();
 	if (IS_ERR(bo)) {
 		ret = PTR_ERR(bo);
@@ -936,6 +934,22 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 	struct qaic_bo *bo;
 	int ret;
 
+	if (args->hdr.count == 0)
+		return -EINVAL;
+
+	arg_size = args->hdr.count * sizeof(*slice_ent);
+	if (arg_size / args->hdr.count != sizeof(*slice_ent))
+		return -EINVAL;
+
+	if (args->hdr.size == 0)
+		return -EINVAL;
+
+	if (!(args->hdr.dir == DMA_TO_DEVICE || args->hdr.dir == DMA_FROM_DEVICE))
+		return -EINVAL;
+
+	if (args->data == 0)
+		return -EINVAL;
+
 	usr = file_priv->driver_priv;
 	usr_rcu_id = srcu_read_lock(&usr->qddev_lock);
 	if (!usr->qddev) {
@@ -950,43 +964,17 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 		goto unlock_dev_srcu;
 	}
 
-	if (args->hdr.count == 0) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
-	arg_size = args->hdr.count * sizeof(*slice_ent);
-	if (arg_size / args->hdr.count != sizeof(*slice_ent)) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
 	if (args->hdr.dbc_id >= qdev->num_dbc) {
 		ret = -EINVAL;
 		goto unlock_dev_srcu;
 	}
 
-	if (args->hdr.size == 0) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
-	if (!(args->hdr.dir == DMA_TO_DEVICE  || args->hdr.dir == DMA_FROM_DEVICE)) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
 	dbc = &qdev->dbc[args->hdr.dbc_id];
 	if (dbc->usr != usr) {
 		ret = -EINVAL;
 		goto unlock_dev_srcu;
 	}
 
-	if (args->data == 0) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
 	user_data = u64_to_user_ptr(args->data);
 
 	slice_ent = kzalloc(arg_size, GFP_KERNEL);
@@ -1316,7 +1304,6 @@ static int __qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct dr
 	received_ts = ktime_get_ns();
 
 	size = is_partial ? sizeof(*pexec) : sizeof(*exec);
-
 	n = (unsigned long)size * args->hdr.count;
 	if (args->hdr.count == 0 || n / args->hdr.count != size)
 		return -EINVAL;
@@ -1665,6 +1652,9 @@ int qaic_wait_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file
 	int rcu_id;
 	int ret;
 
+	if (args->pad != 0)
+		return -EINVAL;
+
 	usr = file_priv->driver_priv;
 	usr_rcu_id = srcu_read_lock(&usr->qddev_lock);
 	if (!usr->qddev) {
@@ -1679,11 +1669,6 @@ int qaic_wait_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file
 		goto unlock_dev_srcu;
 	}
 
-	if (args->pad != 0) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
 	if (args->dbc_id >= qdev->num_dbc) {
 		ret = -EINVAL;
 		goto unlock_dev_srcu;
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] accel/qaic: Validate if BO is sliced before slicing
  2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 1/5] accel/qaic: Validate user data before grabbing any lock Jeffrey Hugo
@ 2023-05-17 19:35 ` Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 3/5] accel/qaic: Flush the transfer list again Jeffrey Hugo
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-17 19:35 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel, Jeffrey Hugo

From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

QAIC_ATTACH_SLICE_BO attaches slicing configuration to a BO. Validate if
given BO is already sliced. An already sliced BO cannot be sliced again.

Fixes: ff13be830333 ("accel/qaic: Add datapath")
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
---
 drivers/accel/qaic/qaic_data.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
index 7a4397e3122b..1285c3dc9aef 100644
--- a/drivers/accel/qaic/qaic_data.c
+++ b/drivers/accel/qaic/qaic_data.c
@@ -1001,6 +1001,11 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 
 	bo = to_qaic_bo(obj);
 
+	if (bo->sliced) {
+		ret = -EINVAL;
+		goto put_bo;
+	}
+
 	ret = qaic_prepare_bo(qdev, bo, &args->hdr);
 	if (ret)
 		goto put_bo;
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] accel/qaic: Flush the transfer list again
  2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 1/5] accel/qaic: Validate user data before grabbing any lock Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 2/5] accel/qaic: Validate if BO is sliced before slicing Jeffrey Hugo
@ 2023-05-17 19:35 ` Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 4/5] accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO Jeffrey Hugo
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-17 19:35 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel, Jeffrey Hugo

From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

Before calling synchronize_srcu() we clear the transfer list, this is to
allow all the QAIC_WAIT_BO callers to exit otherwise the system could
deadlock. There could be a corner case where more elements get added to
transfer list after we have flushed it. Re-flush the transfer list once
all the holders of dbc->ch_lock have completed execution i.e.
synchronize_srcu() is complete.

Fixes: ff13be830333 ("accel/qaic: Add datapath")
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
---
 drivers/accel/qaic/qaic_data.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
index 1285c3dc9aef..8603e99a2a61 100644
--- a/drivers/accel/qaic/qaic_data.c
+++ b/drivers/accel/qaic/qaic_data.c
@@ -1845,6 +1845,11 @@ void wakeup_dbc(struct qaic_device *qdev, u32 dbc_id)
 	dbc->usr = NULL;
 	empty_xfer_list(qdev, dbc);
 	synchronize_srcu(&dbc->ch_lock);
+	/*
+	 * Threads holding channel lock, may add more elements in the xfer_list.
+	 * Flush out these elements from xfer_list.
+	 */
+	empty_xfer_list(qdev, dbc);
 }
 
 void release_dbc(struct qaic_device *qdev, u32 dbc_id)
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO
  2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
                   ` (2 preceding siblings ...)
  2023-05-17 19:35 ` [PATCH 3/5] accel/qaic: Flush the transfer list again Jeffrey Hugo
@ 2023-05-17 19:35 ` Jeffrey Hugo
  2023-05-17 19:35 ` [PATCH 5/5] accel/qaic: Fix NNC message corruption Jeffrey Hugo
  2023-05-23 15:56 ` [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
  5 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-17 19:35 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel, Jeffrey Hugo

From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

During QAIC_ATTACH_SLICE_BO, we associate a BO to its DBC. We need to
grab the dbc->ch_lock to make sure that DBC does not goes away while
QAIC_ATTACH_SLICE_BO is still running.

Fixes: ff13be830333 ("accel/qaic: Add datapath")
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
---
 drivers/accel/qaic/qaic_data.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/accel/qaic/qaic_data.c b/drivers/accel/qaic/qaic_data.c
index 8603e99a2a61..8ab26e64b231 100644
--- a/drivers/accel/qaic/qaic_data.c
+++ b/drivers/accel/qaic/qaic_data.c
@@ -924,8 +924,8 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 {
 	struct qaic_attach_slice_entry *slice_ent;
 	struct qaic_attach_slice *args = data;
+	int rcu_id, usr_rcu_id, qdev_rcu_id;
 	struct dma_bridge_chan	*dbc;
-	int usr_rcu_id, qdev_rcu_id;
 	struct drm_gem_object *obj;
 	struct qaic_device *qdev;
 	unsigned long arg_size;
@@ -969,12 +969,6 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 		goto unlock_dev_srcu;
 	}
 
-	dbc = &qdev->dbc[args->hdr.dbc_id];
-	if (dbc->usr != usr) {
-		ret = -EINVAL;
-		goto unlock_dev_srcu;
-	}
-
 	user_data = u64_to_user_ptr(args->data);
 
 	slice_ent = kzalloc(arg_size, GFP_KERNEL);
@@ -1006,9 +1000,16 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 		goto put_bo;
 	}
 
+	dbc = &qdev->dbc[args->hdr.dbc_id];
+	rcu_id = srcu_read_lock(&dbc->ch_lock);
+	if (dbc->usr != usr) {
+		ret = -EINVAL;
+		goto unlock_ch_srcu;
+	}
+
 	ret = qaic_prepare_bo(qdev, bo, &args->hdr);
 	if (ret)
-		goto put_bo;
+		goto unlock_ch_srcu;
 
 	ret = qaic_attach_slicing_bo(qdev, bo, &args->hdr, slice_ent);
 	if (ret)
@@ -1018,6 +1019,7 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 		dma_sync_sgtable_for_cpu(&qdev->pdev->dev, bo->sgt, args->hdr.dir);
 
 	bo->dbc = dbc;
+	srcu_read_unlock(&dbc->ch_lock, rcu_id);
 	drm_gem_object_put(obj);
 	srcu_read_unlock(&qdev->dev_lock, qdev_rcu_id);
 	srcu_read_unlock(&usr->qddev_lock, usr_rcu_id);
@@ -1026,6 +1028,8 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
 
 unprepare_bo:
 	qaic_unprepare_bo(qdev, bo);
+unlock_ch_srcu:
+	srcu_read_unlock(&dbc->ch_lock, rcu_id);
 put_bo:
 	drm_gem_object_put(obj);
 free_slice_ent:
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] accel/qaic: Fix NNC message corruption
  2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
                   ` (3 preceding siblings ...)
  2023-05-17 19:35 ` [PATCH 4/5] accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO Jeffrey Hugo
@ 2023-05-17 19:35 ` Jeffrey Hugo
  2023-05-23 15:56 ` [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
  5 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-17 19:35 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel, Jeffrey Hugo

If msg_xfer() is unable to queue part of a NNC message because the MHI ring
is full, it will attempt to give the QSM some time to drain the queue.
However, if QSM fails to make any room, msg_xfer() will fail and tell the
caller to try again.  This is problematic because part of the message may
have been committed to the ring and there is no mechanism to revoke that
content.  This will cause QSM to receive a corrupt message.

The better way to do this is to check if the ring has enough space for the
entire message before committing any of the message.  Since msg_xfer() is
under the cntl_mutex no one else can come in and consume the space.

Fixes: 129776ac2e38 ("accel/qaic: Add control path")
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
---
 drivers/accel/qaic/qaic_control.c | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/drivers/accel/qaic/qaic_control.c b/drivers/accel/qaic/qaic_control.c
index 9e39b1a324f7..5c57f7b4494e 100644
--- a/drivers/accel/qaic/qaic_control.c
+++ b/drivers/accel/qaic/qaic_control.c
@@ -997,14 +997,34 @@ static void *msg_xfer(struct qaic_device *qdev, struct wrapper_list *wrappers, u
 	struct xfer_queue_elem elem;
 	struct wire_msg *out_buf;
 	struct wrapper_msg *w;
+	long ret = -EAGAIN;
+	int xfer_count = 0;
 	int retry_count;
-	long ret;
 
 	if (qdev->in_reset) {
 		mutex_unlock(&qdev->cntl_mutex);
 		return ERR_PTR(-ENODEV);
 	}
 
+	/* Attempt to avoid a partial commit of a message */
+	list_for_each_entry(w, &wrappers->list, list)
+		xfer_count++;
+
+	for (retry_count = 0; retry_count < QAIC_MHI_RETRY_MAX; retry_count++) {
+		if (xfer_count <= mhi_get_free_desc_count(qdev->cntl_ch, DMA_TO_DEVICE)) {
+			ret = 0;
+			break;
+		}
+		msleep_interruptible(QAIC_MHI_RETRY_WAIT_MS);
+		if (signal_pending(current))
+			break;
+	}
+
+	if (ret) {
+		mutex_unlock(&qdev->cntl_mutex);
+		return ERR_PTR(ret);
+	}
+
 	elem.seq_num = seq_num;
 	elem.buf = NULL;
 	init_completion(&elem.xfer_done);
@@ -1038,16 +1058,9 @@ static void *msg_xfer(struct qaic_device *qdev, struct wrapper_list *wrappers, u
 	list_for_each_entry(w, &wrappers->list, list) {
 		kref_get(&w->ref_count);
 		retry_count = 0;
-retry:
 		ret = mhi_queue_buf(qdev->cntl_ch, DMA_TO_DEVICE, &w->msg, w->len,
 				    list_is_last(&w->list, &wrappers->list) ? MHI_EOT : MHI_CHAIN);
 		if (ret) {
-			if (ret == -EAGAIN && retry_count++ < QAIC_MHI_RETRY_MAX) {
-				msleep_interruptible(QAIC_MHI_RETRY_WAIT_MS);
-				if (!signal_pending(current))
-					goto retry;
-			}
-
 			qdev->cntl_lost_buf = true;
 			kref_put(&w->ref_count, free_wrapper);
 			mutex_unlock(&qdev->cntl_mutex);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] accel/qaic fixes for 6.4
  2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
                   ` (4 preceding siblings ...)
  2023-05-17 19:35 ` [PATCH 5/5] accel/qaic: Fix NNC message corruption Jeffrey Hugo
@ 2023-05-23 15:56 ` Jeffrey Hugo
  5 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Hugo @ 2023-05-23 15:56 UTC (permalink / raw)
  To: ogabbay, jacek.lawrynowicz, quic_pkanojiy, stanislaw.gruszka,
	quic_carlv, quic_ajitpals
  Cc: linux-arm-msm, dri-devel, linux-kernel

On 5/17/2023 1:35 PM, Jeffrey Hugo wrote:
> During development of new features, we noticed some spots in the code that
> could be improved based on review feedback from the initial driver series.
> 
> Also two race condition fixes, one found during stress testing and another
> via code inspection.
> 
> Jeffrey Hugo (1):
>    accel/qaic: Fix NNC message corruption
> 
> Pranjal Ramajor Asha Kanojiya (4):
>    accel/qaic: Validate user data before grabbing any lock
>    accel/qaic: Validate if BO is sliced before slicing
>    accel/qaic: Flush the transfer list again
>    accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO
> 
>   drivers/accel/qaic/qaic_control.c | 41 ++++++++------
>   drivers/accel/qaic/qaic_data.c    | 91 +++++++++++++++----------------
>   2 files changed, 70 insertions(+), 62 deletions(-)
> 

Pushed to drm-misc-fixes

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-23 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 19:35 [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo
2023-05-17 19:35 ` [PATCH 1/5] accel/qaic: Validate user data before grabbing any lock Jeffrey Hugo
2023-05-17 19:35 ` [PATCH 2/5] accel/qaic: Validate if BO is sliced before slicing Jeffrey Hugo
2023-05-17 19:35 ` [PATCH 3/5] accel/qaic: Flush the transfer list again Jeffrey Hugo
2023-05-17 19:35 ` [PATCH 4/5] accel/qaic: Grab ch_lock during QAIC_ATTACH_SLICE_BO Jeffrey Hugo
2023-05-17 19:35 ` [PATCH 5/5] accel/qaic: Fix NNC message corruption Jeffrey Hugo
2023-05-23 15:56 ` [PATCH 0/5] accel/qaic fixes for 6.4 Jeffrey Hugo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).