]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: add helper to put master and link ifindexes
authorFlorian Westphal <fw@strlen.de>
Tue, 26 Sep 2017 11:58:40 +0000 (13:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Sep 2017 17:20:49 +0000 (10:20 -0700)
commita8002d24cfde880a7f2c5f547fad32fd1b81142c
tree4b4e13116913a270002cd7d310049b3ef37c52be
parent98a7e9bb466ebfee661143afe7d38d0f4e401cb9
rtnetlink: add helper to put master and link ifindexes

rtnl_fill_ifinfo currently requires caller to hold the rtnl mutex.
Unfortunately the function is quite large which makes it harder to see
which spots require the lock, which spots assume it and which ones could
do without.

Add helpers to factor out the ifindex dumping, one can use rcu to avoid
rtnl dependency.

Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c