Skip to content

Commit

Permalink
staging: ozwpan: use tasklet_kill in device remove/release process
Browse files Browse the repository at this point in the history
Some driver uses tasklet_disable in device remove/release process,
tasklet_disable will inc tasklet->count and return. If the tasklet
is not handled yet under some softirq pressure, the tasklet will be
placed on the tasklet_vec, never have a chance to be excuted. This might
lead to a heavy loaded ksoftirqd, wakeup with pending_softirq, but
tasklet is disabled. tasklet_kill should be used in this case.

Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Cc: Rupesh Gujare <rgujare@ozmodevices.com>
Cc: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Xiaotian Feng authored and Greg Kroah-Hartman committed Oct 31, 2012
1 parent 5df3954 commit 984a4a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/ozwpan/ozhcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2304,8 +2304,8 @@ int oz_hcd_init(void)
*/
void oz_hcd_term(void)
{
tasklet_disable(&g_urb_process_tasklet);
tasklet_disable(&g_urb_cancel_tasklet);
tasklet_kill(&g_urb_process_tasklet);
tasklet_kill(&g_urb_cancel_tasklet);
platform_device_unregister(g_plat_dev);
platform_driver_unregister(&g_oz_plat_drv);
oz_trace("Pending urbs:%d\n", atomic_read(&g_pending_urbs));
Expand Down

0 comments on commit 984a4a0

Please sign in to comment.