aboutsummaryrefslogtreecommitdiff
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorCong Wang <[email protected]>2021-05-08 11:00:33 -0700
committerDavid S. Miller <[email protected]>2021-05-10 14:33:10 -0700
commita100243d95a60d74ae9bb9df1f5f2192e9aed6a7 (patch)
tree5c614edec5ccc729eae58fb83e8ef43026f9e9ad /lib/dynamic_debug.c
parent3f8fca5d43357ab3ae678d908ac3c74e07503f0d (diff)
rtnetlink: avoid RCU read lock when holding RTNL
When we call af_ops->set_link_af() we hold a RCU read lock as we retrieve af_ops from the RCU protected list, but this is unnecessary because we already hold RTNL lock, which is the writer lock for protecting rtnl_af_ops, so it is safer than RCU read lock. Similar for af_ops->validate_link_af(). This was not a problem until we begin to take mutex lock down the path of ->set_link_af() in __ipv6_dev_mc_dec() recently. We can just drop the RCU read lock there and assert RTNL lock. Reported-and-tested-by: [email protected] Fixes: 63ed8de4be81 ("mld: add mc_lock for protecting per-interface mld data") Tested-by: Taehee Yoo <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
0 files changed, 0 insertions, 0 deletions