staging: vchiq_core: Drop retry loop on -EINTR
authorUmang Jain <umang.jain@ideasonboard.com>
Wed, 18 Sep 2024 16:31:00 +0000 (22:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Oct 2024 09:58:47 +0000 (11:58 +0200)
-EINTR is returned by vchiq_queue_message() on receiving a fatal
signal to the process. Since the process is deemed to be terminated
anyway, do not retry queuing with vchiq_queue_message() on -EINTR.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240918163100.870596-7-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

index 426e729b71ee87a58f5eb23920d3556346f9902d..7ad43a3d1bab95059b8f7764afbedceed3d6cd6a 100644 (file)
@@ -3269,24 +3269,9 @@ error_exit:
 int vchiq_queue_kernel_message(struct vchiq_instance *instance, unsigned int handle, void *data,
                               unsigned int size)
 {
-       int status;
-
-       while (1) {
-               status = vchiq_queue_message(instance, handle, memcpy_copy_callback,
-                                            data, size);
-
-               /*
-                * vchiq_queue_message() may return -EINTR, so we need to
-                * implement a retry mechanism since this function is supposed
-                * to block until queued
-                */
-               if (status != -EINTR)
-                       break;
 
-               msleep(1);
-       }
-
-       return status;
+       return vchiq_queue_message(instance, handle, memcpy_copy_callback,
+                                  data, size);
 }
 EXPORT_SYMBOL(vchiq_queue_kernel_message);