Patch "staging: vchiq: Fix bulk userdata handling" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    staging: vchiq: Fix bulk userdata handling

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     staging-vchiq-fix-bulk-userdata-handling.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8ad099b9be2a2e25a618faae86c07224bfef0393
Author: Phil Elwell <phil@xxxxxxxxxxxxxxx>
Date:   Tue Jan 5 16:20:28 2021 +0000

    staging: vchiq: Fix bulk userdata handling
    
    [ Upstream commit 96ae327678eceabf455b11a88ba14ad540d4b046 ]
    
    The addition of the local 'userdata' pointer to
    vchiq_irq_queue_bulk_tx_rx omitted the case where neither BLOCKING nor
    WAITING modes are used, in which case the value provided by the
    caller is not returned to them as expected, but instead it is replaced
    with a NULL. This lack of a suitable context may cause the application
    to crash or otherwise malfunction.
    
    Fixes: 4184da4f316a ("staging: vchiq: fix __user annotations")
    Tested-by: Stefan Wahren <stefan.wahren@xxxxxxxx>
    Acked-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Phil Elwell <phil@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210105162030.1415213-2-phil@xxxxxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 01125d9f991bb..5bc9b394212b8 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -953,7 +953,7 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance,
 	struct vchiq_service *service;
 	struct bulk_waiter_node *waiter = NULL;
 	bool found = false;
-	void *userdata = NULL;
+	void *userdata;
 	int status = 0;
 	int ret;
 
@@ -992,6 +992,8 @@ static int vchiq_irq_queue_bulk_tx_rx(struct vchiq_instance *instance,
 			"found bulk_waiter %pK for pid %d", waiter,
 			current->pid);
 		userdata = &waiter->bulk_waiter;
+	} else {
+		userdata = args->userdata;
 	}
 
 	/*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux