projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27705f7
)
ipvlan: protect against concurrent link removal
author
Jiri Benc
<
[email protected]
>
Sat, 28 Mar 2015 18:13:23 +0000
(19:13 +0100)
committer
David S. Miller
<
[email protected]
>
Tue, 31 Mar 2015 17:28:33 +0000
(13:28 -0400)
Adding and removing to the 'ipvlans' list is already done using _rcu list
operations.
Signed-off-by: Jiri Benc <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ipvlan/ipvlan_core.c
patch
|
blob
|
history
diff --git
a/drivers/net/ipvlan/ipvlan_core.c
b/drivers/net/ipvlan/ipvlan_core.c
index 8a542b9340c49ba7edd67c207f11a5b2cf0568a3..568628f95aa25bc8ac678c1ce66d69ed7b7e5851 100644
(file)
--- a/
drivers/net/ipvlan/ipvlan_core.c
+++ b/
drivers/net/ipvlan/ipvlan_core.c
@@
-193,7
+193,8
@@
static void ipvlan_multicast_frame(struct ipvl_port *port, struct sk_buff *skb,
if (skb->protocol == htons(ETH_P_PAUSE))
return;
- list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
+ rcu_read_lock();
+ list_for_each_entry_rcu(ipvlan, &port->ipvlans, pnode) {
if (local && (ipvlan == in_dev))
continue;
@@
-220,6
+221,7
@@
static void ipvlan_multicast_frame(struct ipvl_port *port, struct sk_buff *skb,
mcast_acct:
ipvlan_count_rx(ipvlan, len, ret == NET_RX_SUCCESS, true);
}
+ rcu_read_unlock();
/* Locally generated? ...Forward a copy to the main-device as
* well. On the RX side we'll ignore it (wont give it to any