diff options
author | Hong Zhiguo <zhiguohong@tencent.com> | 2013-09-14 16:42:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-16 04:03:33 +0200 |
commit | 1fb1754a8c70d69ab480763c423e0a74369c4a67 (patch) | |
tree | 84ccb1544806928d3bfa10beff69027b3153f178 /net/bridge/br_private.h | |
parent | net: ps3_gelic: remove deprecated IRQF_DISABLED (diff) | |
download | linux-1fb1754a8c70d69ab480763c423e0a74369c4a67.tar.xz linux-1fb1754a8c70d69ab480763c423e0a74369c4a67.zip |
bridge: use br_port_get_rtnl within rtnl lock
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>
Diffstat (limited to '')
-rw-r--r-- | net/bridge/br_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index cda83158a21c..dd583177cba4 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -208,7 +208,7 @@ static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *d return br_port_exists(dev) ? port : NULL; } -static inline struct net_bridge_port *br_port_get_rtnl(struct net_device *dev) +static inline struct net_bridge_port *br_port_get_rtnl(const struct net_device *dev) { return br_port_exists(dev) ? rtnl_dereference(dev->rx_handler_data) : NULL; |