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.

usb: yurex: fix race in probe

The bbu member of the descriptor must be set to the value
standing for uninitialized values before the URB whose
completion handler sets bbu is submitted. Otherwise there is
a window during which probing can overwrite already retrieved
data.

Cc: stable <stable@kernel.org>
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://patch.msgid.link/20260209143720.1507500-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Oliver Neukum and committed by
Greg Kroah-Hartman
7a875c09 0d6c8144

+1 -1
+1 -1
drivers/usb/misc/yurex.c
··· 272 272 dev->int_buffer, YUREX_BUF_SIZE, yurex_interrupt, 273 273 dev, 1); 274 274 dev->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; 275 + dev->bbu = -1; 275 276 if (usb_submit_urb(dev->urb, GFP_KERNEL)) { 276 277 retval = -EIO; 277 278 dev_err(&interface->dev, "Could not submitting URB\n"); ··· 281 280 282 281 /* save our data pointer in this interface device */ 283 282 usb_set_intfdata(interface, dev); 284 - dev->bbu = -1; 285 283 286 284 /* we can register the device now, as it is ready */ 287 285 retval = usb_register_dev(interface, &yurex_class);