This repository was archived by the owner on Oct 5, 2018. It is now read-only.
Commit d3a1196
inet: fix potential deadlock in reqsk_queue_unlink()
commit 83fccfc upstream.
When replacing del_timer() with del_timer_sync(), I introduced
a deadlock condition :
reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop()
inet_csk_reqsk_queue_drop() can be called from many contexts,
one being the timer handler itself (reqsk_timer_handler()).
In this case, del_timer_sync() loops forever.
Simple fix is to test if timer is pending.
Fixes: 2235f2a ("inet: fix races with reqsk timers")
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Cc: Holger Hoffstätte <[email protected]>
Cc: Andre Tomt <[email protected]>
Cc: Chris Caputo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent a58897f commit d3a1196
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
0 commit comments