bridge: use br_port_get_rtnl within rtnl lock
authorHong Zhiguo <zhiguohong@tencent.com>
Sat, 14 Sep 2013 14:42:27 +0000 (22:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2013 23:08:29 +0000 (16:08 -0700)
commit97ddc3e1f9d6637c81aaa470fde5669ffb854d14
treef6b7abeb8d7ada7ffca81483ea8dcc1c6cd9e20d
parentdc45b846e96d5a656ddd926334b6496e6916b446
bridge: use br_port_get_rtnl within rtnl lock

[ Upstream commit 1fb1754a8c70d69ab480763c423e0a74369c4a67 ]

current br_port_get_rcu is problematic in bridging path
(NULL deref). Change these calls in netlink path first.

Signed-off-by: Hong Zhiguo <zhiguohong@tencent.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bridge/br_netlink.c
net/bridge/br_private.h