linux-stable/drivers/usb/musb
Sebastian Andrzej Siewior c5340bd143 usb: musb: cancel work on removal
So I captured this:

|WARNING: CPU: 0 PID: 2078 at /home/bigeasy/work/new/TI/linux/lib/debugobjects.c:260 debug_print_object+0x94/0xc4()
|ODEBUG: free active (active state 0) object type: work_struct hint: musb_irq_work+0x0/0x38 [musb_hdrc]
|CPU: 0 PID: 2078 Comm: rmmod Not tainted 3.12.0-rc4+ #338
|[<c0014d38>] (unwind_backtrace+0x0/0xf4) from [<c001249c>] (show_stack+0x14/0x1c)
|[<c001249c>] (show_stack+0x14/0x1c) from [<c0037720>] (warn_slowpath_common+0x64/0x84)
|[<c0037720>] (warn_slowpath_common+0x64/0x84) from [<c00377d4>] (warn_slowpath_fmt+0x30/0x40)
|[<c00377d4>] (warn_slowpath_fmt+0x30/0x40) from [<c022ae90>] (debug_print_object+0x94/0xc4)
|[<c022ae90>] (debug_print_object+0x94/0xc4) from [<c022b7e0>] (debug_check_no_obj_freed+0x1c0/0x228)
|[<c022b7e0>] (debug_check_no_obj_freed+0x1c0/0x228) from [<c00f1f38>] (kfree+0xf8/0x228)
|[<c00f1f38>] (kfree+0xf8/0x228) from [<c02921c4>] (release_nodes+0x1a8/0x248)
|[<c02921c4>] (release_nodes+0x1a8/0x248) from [<c028f70c>] (__device_release_driver+0x98/0xf0)
|[<c028f70c>] (__device_release_driver+0x98/0xf0) from [<c028f840>] (device_release_driver+0x24/0x34)
|[<c028f840>] (device_release_driver+0x24/0x34) from [<c028ebe8>] (bus_remove_device+0x148/0x15c)
|[<c028ebe8>] (bus_remove_device+0x148/0x15c) from [<c028d120>] (device_del+0x104/0x1c0)
|[<c028d120>] (device_del+0x104/0x1c0) from [<c02911e4>] (platform_device_del+0x18/0xac)
|[<c02911e4>] (platform_device_del+0x18/0xac) from [<c029179c>] (platform_device_unregister+0xc/0x18)
|[<c029179c>] (platform_device_unregister+0xc/0x18) from [<bf1902fc>] (dsps_remove+0x20/0x4c [musb_dsps])
|[<bf1902fc>] (dsps_remove+0x20/0x4c [musb_dsps]) from [<c0290d7c>] (platform_drv_remove+0x1c/0x24)
|[<c0290d7c>] (platform_drv_remove+0x1c/0x24) from [<c028f704>] (__device_release_driver+0x90/0xf0)
|[<c028f704>] (__device_release_driver+0x90/0xf0) from [<c028f818>] (driver_detach+0xb4/0xb8)
|[<c028f818>] (driver_detach+0xb4/0xb8) from [<c028e6e8>] (bus_remove_driver+0x98/0xec)
|[<c028e6e8>] (bus_remove_driver+0x98/0xec) from [<c008fc70>] (SyS_delete_module+0x1e0/0x24c)
|[<c008fc70>] (SyS_delete_module+0x1e0/0x24c) from [<c000e680>] (ret_fast_syscall+0x0/0x48)
|---[ end trace d79045419a3e51ec ]---

The workqueue is only scheduled from the ep0 and never canceled in case
the musb is removed before the work has a chance to run.

Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-10 11:29:40 -05:00
..
am35x.c usb: musb: am35x: use SIMPLE_DEV_PM_OPS 2013-10-02 08:21:23 -05:00
blackfin.c usb: musb: blackfin: use SIMPLE_DEV_PM_OPS 2013-10-02 08:21:55 -05:00
blackfin.h
cppi_dma.c usb: musb: dma: merge ->start/stop into create/destroy 2013-07-29 13:53:18 +03:00
cppi_dma.h
da8xx.c usb: musb: use platform_device_register_full() to avoid directly messing with dma masks 2013-10-01 09:31:19 -05:00
davinci.c usb: musb: davinci: fix resources passed to MUSB driver for DM6467 2013-10-01 09:44:01 -05:00
davinci.h
Kconfig usb: musb: name ux500 platforms more broadly 2013-10-01 09:31:12 -05:00
Makefile usb: musb dma: add cppi41 dma driver 2013-08-09 17:40:16 +03:00
musb_am335x.c usb: musb_am335x: Remove redundant of_match_ptr 2013-10-04 09:25:11 -05:00
musb_core.c usb: musb: cancel work on removal 2013-10-10 11:29:40 -05:00
musb_core.h usb: musb: get rid of unused proc_dir_entry 2013-07-29 13:56:50 +03:00
musb_cppi41.c usb: musb: cppi41: fix missing unlock on error in cppi41_dma_callback() 2013-08-27 14:16:51 -05:00
musb_debug.h
musb_debugfs.c usb: remove use of __devinit 2012-11-21 13:27:16 -08:00
musb_dma.h usb: musb dma: add cppi41 dma driver 2013-08-09 17:40:16 +03:00
musb_dsps.c usb: musb_dsps: Remove redundant of_match_ptr 2013-10-01 09:56:23 -05:00
musb_gadget.c usb: musb: only remove host/udc if it has been added 2013-08-27 14:18:14 -05:00
musb_gadget.h usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes 2013-05-28 19:22:23 +03:00
musb_gadget_ep0.c usb: musb: gadget: read ep0 fifo only if rxcount is non zero 2013-04-02 11:42:50 +03:00
musb_host.c usb: musb: only remove host/udc if it has been added 2013-08-27 14:18:14 -05:00
musb_host.h usb: patches for v3.11 merge window 2013-06-12 14:44:13 -07:00
musb_io.h usb: musb: use io{read,write}*_rep accessors 2012-12-17 17:15:13 -08:00
musb_regs.h
musb_virthub.c usb: musb: eliminate musb_to_hcd 2013-05-28 19:22:26 +03:00
musbhsdma.c usb: musb: dma: merge ->start/stop into create/destroy 2013-07-29 13:53:18 +03:00
musbhsdma.h usb: musb: remove generic_interrupt 2012-11-06 15:32:13 +02:00
omap2430.c usb: musb: Call atomic_notifier_call_chain when status is changed 2013-10-01 09:31:14 -05:00
omap2430.h usb: start using the control module driver 2013-01-25 12:27:24 +02:00
tusb6010.c usb: musb: use platform_device_register_full() to avoid directly messing with dma masks 2013-10-01 09:31:19 -05:00
tusb6010.h
tusb6010_omap.c usb: musb: dma: merge ->start/stop into create/destroy 2013-07-29 13:53:18 +03:00
ux500.c usb: musb: ux500: use SIMPLE_DEV_PM_OPS 2013-10-02 08:22:19 -05:00
ux500_dma.c usb: musb: ux500: Add check for NULL board data 2013-08-27 15:05:39 -05:00