Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

staging: vchiq: Fix refcounting bug in buffer_from_host()

If we fail to queue the buffer then it can never be dequeued. This can
lead to a forever loop in stop_streaming() when we wait for everything
to finish.

Fixes: 70ec64ccdaac ("staging: bcm2835-camera: Ensure all buffers are returned on disable")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200722130651.GC220681@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
50b2677c 908e757d

+2
+2
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
··· 441 441 ret = vchiq_queue_kernel_message(instance->service_handle, &m, 442 442 sizeof(struct mmal_msg_header) + 443 443 sizeof(m.u.buffer_from_host)); 444 + if (ret) 445 + atomic_dec(&port->buffers_with_vpu); 444 446 445 447 vchiq_release_service(instance->service_handle); 446 448