[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <555CCE89.10503@iogearbox.net>
Date: Wed, 20 May 2015 20:12:25 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Cong Wang <cwang@...pensource.com>
CC: David Miller <davem@...emloft.net>, subramanian.vijay@...il.com,
netdev <netdev@...r.kernel.org>,
John Fastabend <john.r.fastabend@...el.com>,
Eric Dumazet <edumazet@...gle.com>,
Thomas Graf <tgraf@...g.ch>,
Jamal Hadi Salim <jhs@...atatu.com>,
Alexei Starovoitov <ast@...mgrid.com>
Subject: Re: [PATCH net] net: sched: fix call_rcu() race on classifier module
unloads
On 05/20/2015 07:38 PM, Cong Wang wrote:
...
> Why synchronize_rcu() even matters here? It waits for
> readers, not for RCU callbacks.
Hm, I am mentioning it here as it was related to 78fd1d0ab072
as explained in the commit message.
>> Since we came here via unregister_tcf_proto_ops(), there
>> are no users of a given classifier anymore. Further nested
>> call_rcu()s pointing into the module space are not being
>> done anywhere.
>
> This doesn't look like the best way to fix it, since calling
> call_rcu() is tc filter specific, so why not just move the
> rcu_barrier() to each of the ->destroy() implementation?
> Let each filter handle its own implementation bug.
Effectively, every in-tree classifier (rsvp is the only exception)
is making use of call_rcu(). Moreover, moving this into every
->destroy() handler would also be unnecessary overhead, imho, as
this is only relevant when we actually _unload_ a module.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists