[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <583132.1649400090@warthog.procyon.org.uk>
Date: Fri, 08 Apr 2022 07:41:30 +0100
From: David Howells <dhowells@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: dhowells@...hat.com, "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
Marc Dionne <marc.dionne@...istor.com>,
linux-afs@...ts.infradead.org, syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] rxrpc: fix a race in rxrpc_exit_net()
Hi Eric,
[Note that your patch is appl/octet-stream for some reason.]
> rxnet->live = false;
> - del_timer_sync(&rxnet->peer_keepalive_timer);
> cancel_work_sync(&rxnet->peer_keepalive_work);
> + del_timer_sync(&rxnet->peer_keepalive_timer);
That fixes that problem, but introduces another. The timer could be in the
throes of queueing the worker:
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);
I think keeping the first del_timer_sync() that you removed and the one after
the cancel would be sufficient.
David
Powered by blists - more mailing lists