Re: BUG? a suspected race bug at usb_serial_probe()

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

 



On Fri, 7 Aug 2009, [UTF-8] í??ì?  shin hong wrote:

> Hi. I am reporting a suspected race but at usb_serial_probe()
> in /drivers/usb/serial/usb-serial.c of Linux 2.6.30.4.
> Since I do not have much background, please examine the report
> and code and let me know your opinions.
> 
> usb_serial_probe() invokes create_serial() while it holds Big Kernel Lock.
> However, create_serial() invokes kmalloc() so that BKL might be
> released and re-taken due to its releasing-on-block semantics.
> For this reason, usb_serial_probe() may have race condition problem.

There is no race.  The BKL is not used for serializing the call to 
create_serial().  In fact, the BKL probably isn't needed in 
usb_serial_probe() at all, and neither is the call to try_module_get().

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux