Skip to content

Commit

Permalink
staging: vchiq: Fix bulk userdata handling
Browse files Browse the repository at this point in the history
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 replaced with a NULL.

Fixes: 4184da4 ("staging: vchiq: fix __user annotations")

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
  • Loading branch information
pelwell committed Dec 22, 2020
1 parent be1f896 commit 47d623c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,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;

Expand Down Expand Up @@ -1000,6 +1000,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;
}

/*
Expand Down

0 comments on commit 47d623c

Please sign in to comment.