Commit 6d06bc8
net: usb: r8152: fix resume reset deadlock
rtl8152 can trigger device reset during reset which
potentially can result in a deadlock:
**** DPM device timeout after 10 seconds; 15 seconds until panic ****
Call Trace:
<TASK>
schedule+0x483/0x1370
schedule_preempt_disabled+0x15/0x30
__mutex_lock_common+0x1fd/0x470
__rtl8152_set_mac_address+0x80/0x1f0
dev_set_mac_address+0x7f/0x150
rtl8152_post_reset+0x72/0x150
usb_reset_device+0x1d0/0x220
rtl8152_resume+0x99/0xc0
usb_resume_interface+0x3e/0xc0
usb_resume_both+0x104/0x150
usb_resume+0x22/0x110
The problem is that rtl8152 resume calls reset under
tp->control mutex while reset basically re-enters rtl8152
and attempts to acquire the same tp->control lock once
again.
Reset INACCESSIBLE device outside of tp->control mutex
scope to avoid recursive mutex_lock() deadlock.
Fixes: 4933b06 ("r8152: If inaccessible at resume time, issue a reset")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Link: https://patch.msgid.link/20260129031106.3805887-1-senozhatsky@chromium.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent f8db647 commit 6d06bc8
1 file changed
Lines changed: 15 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8535 | 8535 | | |
8536 | 8536 | | |
8537 | 8537 | | |
8538 | | - | |
8539 | | - | |
8540 | | - | |
8541 | | - | |
8542 | | - | |
8543 | | - | |
8544 | | - | |
8545 | | - | |
8546 | | - | |
8547 | | - | |
8548 | | - | |
8549 | | - | |
8550 | | - | |
8551 | 8538 | | |
8552 | 8539 | | |
8553 | 8540 | | |
| |||
8658 | 8645 | | |
8659 | 8646 | | |
8660 | 8647 | | |
| 8648 | + | |
8661 | 8649 | | |
8662 | 8650 | | |
8663 | 8651 | | |
8664 | 8652 | | |
8665 | 8653 | | |
8666 | 8654 | | |
8667 | | - | |
| 8655 | + | |
8668 | 8656 | | |
8669 | 8657 | | |
8670 | 8658 | | |
8671 | 8659 | | |
8672 | 8660 | | |
8673 | 8661 | | |
| 8662 | + | |
| 8663 | + | |
| 8664 | + | |
| 8665 | + | |
| 8666 | + | |
| 8667 | + | |
| 8668 | + | |
| 8669 | + | |
| 8670 | + | |
| 8671 | + | |
| 8672 | + | |
| 8673 | + | |
| 8674 | + | |
8674 | 8675 | | |
8675 | 8676 | | |
8676 | 8677 | | |
| |||
0 commit comments