Commit f322136
committed
net: tls: avoid hanging tasks on the tx_lock
syzbot sent a hung task report and Eric explains that adversarial
receiver may keep RWIN at 0 for a long time, so we are not guaranteed
to make forward progress. Thread which took tx_lock and went to sleep
may not release tx_lock for hours. Use interruptible sleep where
possible and reschedule the work if it can't take the lock.
Testing: existing selftest passes
Reported-by: syzbot+9c0268252b8ef967c62e@syzkaller.appspotmail.com
Fixes: 79ffe60 ("net/tls: add a TX lock")
Link: https://lore.kernel.org/all/000000000000e412e905f5b46201@google.com/
Cc: stable@vger.kernel.org # wait 4 weeks
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230301002857.2101894-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 49c47cc commit f322136
1 file changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
960 | 962 | | |
961 | 963 | | |
962 | 964 | | |
| |||
1290 | 1292 | | |
1291 | 1293 | | |
1292 | 1294 | | |
1293 | | - | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
1294 | 1298 | | |
1295 | 1299 | | |
1296 | 1300 | | |
| |||
2435 | 2439 | | |
2436 | 2440 | | |
2437 | 2441 | | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
2442 | | - | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
2443 | 2455 | | |
2444 | 2456 | | |
2445 | 2457 | | |
| |||
0 commit comments