Greetings, I got the below warning and the first bad commit is commit 19b10a8828a6cdd5a4e7e37babd5084d35641f87 Author: Sebastian Andrzej Siewior Date: Sun Dec 23 21:10:06 2012 +0100 usb: gadget: allocate & giveback serial ports instead hard code them This patch removes gserial_setup() and gserial_cleanup() and adds gserial_alloc_line() and gserial_free_line() to replace them. The initial setup of u_serial happens now on module load time. A maximum of four TTY ports can be requested which is the current limit. In theory we could extend this limit, the hard limit is the number of available endpoints. alloc_tty_driver() is now called at module init time with the max available ports. The per-line footprint here is on 32bit is 3 * size of pointer + 60 bytes (for cdevs). The remaining memory (struct gs_port) is allocated once a port is requested. With this change it is possible to load g_multi and g_serial at the same time. GS0 receives the module that is loaded first, GS1 is received by the next module and so on. With the configfs interface the port number can be exported and the device node is more predictable. Nothing changes for g_serial and friends as long as one module is used. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi [ 4.625655] usb0: HOST MAC da:6c:61:74:5d:c0 [ 4.626504] ------------[ cut here ]------------ [ 4.627366] WARNING: at /c/kernel-tests/src/linux/kernel/mutex.c:198 __mutex_lock_common+0xcf/0x357() [ 4.627446] Pid: 1, comm: swapper Not tainted 3.8.0-rc5-00646-g2f520a0 #4 [ 4.627446] Call Trace: [ 4.627446] [] warn_slowpath_common+0x54/0x69 [ 4.627446] [] ? __mutex_lock_common+0xcf/0x357 [ 4.627446] [] ? __mutex_lock_common+0xcf/0x357 [ 4.627446] [] warn_slowpath_null+0x1d/0x22 [ 4.627446] [] __mutex_lock_common+0xcf/0x357 [ 4.627446] [] ? gserial_alloc_line+0x21/0x18d [ 4.627446] [] ? schedule_delayed_work+0x11/0x13 [ 4.627446] [] ? linkwatch_schedule_work+0x62/0x65 [ 4.627446] [] mutex_lock_nested+0x39/0x3f [ 4.627446] [] ? gserial_alloc_line+0x21/0x18d [ 4.627446] [] gserial_alloc_line+0x21/0x18d [ 4.627446] [] cdc_bind+0x2b/0xf2 [ 4.627446] [] ? composite_dev_prepare+0x8e/0xc0 [ 4.627446] [] composite_bind+0x82/0x16a [ 4.627446] [] ? udc_driver_init+0xf/0xf [ 4.627446] [] ? udc_driver_init+0xf/0xf [ 4.627446] [] udc_bind_to_driver+0x47/0xb2 [ 4.627446] [] ? udc_driver_init+0xf/0xf [ 4.627446] [] usb_gadget_probe_driver+0x65/0x7e [ 4.627446] [] usb_composite_probe+0x6d/0x78 [ 4.627446] [] init+0xd/0xf [ 4.627446] [] do_one_initcall+0x7e/0x12e [ 4.627446] [] kernel_init_freeable+0xd4/0x16e [ 4.627446] [] ? do_early_param+0x7a/0x7a [ 4.627446] [] kernel_init+0xb/0xbe [ 4.627446] [] ret_from_kernel_thread+0x1b/0x28 [ 4.627446] [] ? rest_init+0x11c/0x11c [ 4.627446] ---[ end trace 8ef03ce626e1a2a9 ]--- git bisect start 2f520a0e87bbe47bf0909ce5700dd72b258991d2 cf5425bfcd6909f9831a00bc06ccb9a5b163766a -- git bisect good # 10 2013-02-05 16:54:14 Merge branch 'sdio_acpi' into for-zhangrui git bisect good # 10 2013-02-05 17:24:30 Merge tag 'dwc3-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next git bisect bad # 0 2013-02-05 17:33:09 usb: gadget: pxa25x_udc: convert to udc_start/udc_stop git bisect good # 15 2013-02-05 18:04:34 usb: gadget: u_serial: convert into a module git bisect bad # 0 2013-02-05 18:10:01 usb: gadget: composite: introduce usb_gstrings_attach() git bisect bad # 0 2013-02-05 18:11:55 usb: gadget: cdc2: use function framework for ACM git bisect bad # 0 2013-02-05 18:13:49 usb: gadget: allocate & giveback serial ports instead hard code them git bisect good # 10 2013-02-05 18:45:13 usb: gadget: composite: add usb_remove_function() git bisect good # 33 2013-02-05 19:35:39 usb: gadget: composite: add usb_remove_function() git bisect good # 30 2013-02-05 20:31:48 Add linux-next specific files for 20130125 Thanks, Fengguang