diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index b2a68bc9f0b4..e3b297ac09df 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -200,8 +200,10 @@ static void iforce_close(struct input_dev *dev) /* Disable force feedback playback */ iforce_send_packet(iforce, FF_CMD_ENABLE, "\001"); /* Wait for the command to complete */ - wait_event_interruptible(iforce->wait, - !test_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags)); + wait_event_interruptible_timeout + (iforce->wait, + !test_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags), + 5 * HZ); } iforce->xport_ops->stop_io(iforce); diff --git a/kernel/hung_task.c b/kernel/hung_task.c index cff3ae8c818f..adc2c2ac9d94 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -204,8 +204,21 @@ static void check_hung_uninterruptible_tasks(unsigned long timeout) } unlock: rcu_read_unlock(); - if (hung_task_show_lock) - debug_show_all_locks(); + if (hung_task_show_lock) { + pr_warn("\nShowing all threads with locks held in the system:\n"); + rcu_read_lock(); + for_each_process_thread(g, t) { + if (t->lockdep_depth && t != current) { + sched_show_task(t); + debug_show_held_locks(t); + touch_nmi_watchdog(); + touch_all_softlockup_watchdogs(); + } + } + rcu_read_unlock(); + pr_warn("\n"); + pr_warn("=============================================\n\n"); + } if (hung_task_show_all_bt) { hung_task_show_all_bt = false;