diff options
author | Florian Westphal <fw@strlen.de> | 2017-12-02 23:44:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-04 19:32:22 +0300 |
commit | addf9b90de22f7aaad0db39bccb5d51ac47dd4e1 (patch) | |
tree | c503ab68da10306eae7170efb19dd614ba9cc93e /net/decnet | |
parent | 9753c21f55d4ca2b02bbe81448f2a552ce79d068 (diff) | |
download | linux-addf9b90de22f7aaad0db39bccb5d51ac47dd4e1.tar.xz |
net: rtnetlink: use rcu to free rtnl message handlers
rtnetlink is littered with READ_ONCE() because we can have read accesses
while another cpu can write to the structure we're reading by
(un)registering doit or dumpit handlers.
This patch changes this so that (un)registering cpu allocates a new
structure and then publishes it via rcu_assign_pointer, i.e. once
another cpu can see such pointer no modifications will occur anymore.
based on initial patch from Peter Zijlstra.
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
0 files changed, 0 insertions, 0 deletions