aboutsummaryrefslogtreecommitdiff
path: root/net/lapb
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2022-04-13 11:16:25 +0100
committerDavid S. Miller <[email protected]>2022-04-15 10:54:49 +0100
commitee3b0826b4764f6c13ad6db67495c5a1c38e9025 (patch)
treeffd325073f3c4826d376d90e34912060eb0c3dd0 /net/lapb
parent6f06aa6b2fd741d2171ff99de3537141610fd933 (diff)
rxrpc: Restore removed timer deletion
A recent patch[1] from Eric Dumazet flipped the order in which the keepalive timer and the keepalive worker were cancelled in order to fix a syzbot reported issue[2]. Unfortunately, this enables the mirror image bug whereby the timer races with rxrpc_exit_net(), restarting the worker after it has been cancelled: CPU 1 CPU 2 =============== ===================== if (rxnet->live) <INTERRUPT> rxnet->live = false; cancel_work_sync(&rxnet->peer_keepalive_work); rxrpc_queue_work(&rxnet->peer_keepalive_work); del_timer_sync(&rxnet->peer_keepalive_timer); Fix this by restoring the removed del_timer_sync() so that we try to remove the timer twice. If the timer runs again, it should see ->live == false and not restart the worker. Fixes: 1946014ca3b1 ("rxrpc: fix a race in rxrpc_exit_net()") Signed-off-by: David Howells <[email protected]> cc: Eric Dumazet <[email protected]> cc: Marc Dionne <[email protected]> cc: [email protected] Link: https://lore.kernel.org/r/[email protected]/ [1] Link: https://syzkaller.appspot.com/bug?extid=724378c4bb58f703b09a [2] Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions