]> 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)
commitdff54336dc1134ad76846e0fdd219955db1254fd
tree4b4e13116913a270002cd7d310049b3ef37c52be
parent977d51cbd81d0a1a5af88eab084dd1c6d7d373be
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