summaryrefslogtreecommitdiff
path: root/include/linux/tc_act/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2026-03-20 07:49:10 +0000
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-03-26 13:14:07 +0100
commit7c39f48568e0aec9bf6988cdbf833fdf8af19901 (patch)
tree9823cc0bcb9e9c069b53ceaee57c784ba28ec42c /include/linux/tc_act/git@git.tavy.me:linux.git
parente8d97c270cb46a2a88739019d0f8547adc7d97da (diff)
media: uvcvideo: Fix bug in error path of uvc_alloc_urb_buffers
Recent cleanup introduced a bug in the error path of uvc_alloc_urb_buffers(). If there is not enough memory for the allocation the following error will be triggered: [ 739.196672] UBSAN: shift-out-of-bounds in mm/page_alloc.c:1403:22 [ 739.196710] shift exponent 52 is too large for 32-bit type 'int' Resulting in: [ 740.464422] BUG: unable to handle page fault for address: fffffac1c0800000 The reason for the bug is that usb_free_noncoherent is called with an invalid size (0) instead of the actual size of the urb. This patch takes care of that. Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Closes: https://lore.kernel.org/linux-media/abycbXzYupZpGkvR@hyeyoo/T/#t Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Fixes: c824345288d1 ("media: uvcvideo: Pass allocation size directly to uvc_alloc_urb_buffer") Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patch.msgid.link/20260320-uvc-urb-free-error-v1-1-b12cc3762a19@chromium.org Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'include/linux/tc_act/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions