diff options
author | David S. Miller <davem@davemloft.net> | 2013-12-09 20:20:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-09 20:20:14 -0500 |
commit | 34f9f437104b86f6ddfa2770e2cd852846385dc3 (patch) | |
tree | 6c78386b3db9dd47fd2b79efb4dcf8c1472de99e /net/bridge | |
parent | 95dc19299f741c986227ec33e23cbf9b3321f812 (diff) | |
parent | 66e56cd46b93ef407c60adcac62cf33b06119d50 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Merge 'net' into 'net-next' to get the AF_PACKET bug fix that
Daniel's direct transmit changes depend upon.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_private.h | 10 | ||||
-rw-r--r-- | net/bridge/br_stp_bpdu.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 229d820bdf0b..045d56eaeca2 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -426,6 +426,16 @@ netdev_features_t br_features_recompute(struct net_bridge *br, | |||
426 | int br_handle_frame_finish(struct sk_buff *skb); | 426 | int br_handle_frame_finish(struct sk_buff *skb); |
427 | rx_handler_result_t br_handle_frame(struct sk_buff **pskb); | 427 | rx_handler_result_t br_handle_frame(struct sk_buff **pskb); |
428 | 428 | ||
429 | static inline bool br_rx_handler_check_rcu(const struct net_device *dev) | ||
430 | { | ||
431 | return rcu_dereference(dev->rx_handler) == br_handle_frame; | ||
432 | } | ||
433 | |||
434 | static inline struct net_bridge_port *br_port_get_check_rcu(const struct net_device *dev) | ||
435 | { | ||
436 | return br_rx_handler_check_rcu(dev) ? br_port_get_rcu(dev) : NULL; | ||
437 | } | ||
438 | |||
429 | /* br_ioctl.c */ | 439 | /* br_ioctl.c */ |
430 | int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 440 | int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
431 | int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd, | 441 | int br_ioctl_deviceless_stub(struct net *net, unsigned int cmd, |
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c index 8660ea3be705..bdb459d21ad8 100644 --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c | |||
@@ -153,7 +153,7 @@ void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb, | |||
153 | if (buf[0] != 0 || buf[1] != 0 || buf[2] != 0) | 153 | if (buf[0] != 0 || buf[1] != 0 || buf[2] != 0) |
154 | goto err; | 154 | goto err; |
155 | 155 | ||
156 | p = br_port_get_rcu(dev); | 156 | p = br_port_get_check_rcu(dev); |
157 | if (!p) | 157 | if (!p) |
158 | goto err; | 158 | goto err; |
159 | 159 | ||