Commit f813dac5 authored by Umang Jain's avatar Umang Jain Committed by Greg Kroah-Hartman
Browse files

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: default avatarUmang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20240918163100.870596-7-umang.jain@ideasonboard.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec5d292d
Loading
Loading
Loading
Loading
+2 −17
Original line number Diff line number Diff line
@@ -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,
	return 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;
}
EXPORT_SYMBOL(vchiq_queue_kernel_message);