lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240918163100.870596-7-umang.jain@ideasonboard.com>
Date: Wed, 18 Sep 2024 22:01:00 +0530
From: Umang Jain <umang.jain@...asonboard.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Cc: linux-rpi-kernel@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Kieran Bingham <kieran.bingham@...asonboard.com>,
	Arnd Bergmann <arnd@...db.de>,
	Stefan Wahren <wahrenst@....net>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Nicolas Saenz Julienne <nsaenz@...nel.org>,
	Umang Jain <umang.jain@...asonboard.com>
Subject: [PATCH 6/6] staging: vchiq_core: Drop retry loop on -EINTR

-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@...asonboard.com>
---
 .../interface/vchiq_arm/vchiq_core.c          | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 426e729b71ee..7ad43a3d1bab 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -3269,24 +3269,9 @@ vchiq_queue_message(struct vchiq_instance *instance, unsigned int handle,
 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);
 
-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ