This is a note to let you know that I've just added the patch titled
team: don't traverse port list using rcu in team_set_mac_address
to the 3.19-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
team-don-t-traverse-port-list-using-rcu-in-team_set_mac_address.patch
and it can be found in the queue-3.19 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From foo@baz Wed Mar 11 11:44:33 CET 2015
From: Jiri Pirko <[email protected]>
Date: Wed, 4 Mar 2015 08:36:31 +0100
Subject: team: don't traverse port list using rcu in team_set_mac_address
From: Jiri Pirko <[email protected]>
[ Upstream commit 9215f437b85da339a7dfe3db6e288637406f88b2 ]
Currently the list is traversed using rcu variant. That is not correct
since dev_set_mac_address can be called which eventually calls
rtmsg_ifinfo_build_skb and there, skb allocation can sleep. So fix this
by remove the rcu usage here.
Fixes: 3d249d4ca7 "net: introduce ethernet teaming device"
Signed-off-by: Jiri Pirko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/net/team/team.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1736,11 +1736,11 @@ static int team_set_mac_address(struct n
if (dev->type == ARPHRD_ETHER && !is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
- rcu_read_lock();
- list_for_each_entry_rcu(port, &team->port_list, list)
+ mutex_lock(&team->lock);
+ list_for_each_entry(port, &team->port_list, list)
if (team->ops.port_change_dev_addr)
team->ops.port_change_dev_addr(team, port);
- rcu_read_unlock();
+ mutex_unlock(&team->lock);
return 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.19/team-don-t-traverse-port-list-using-rcu-in-team_set_mac_address.patch
queue-3.19/ipv6-addrconf-add-missing-validate_link_af-handler.patch
queue-3.19/team-fix-possible-null-pointer-dereference-in-team_handle_frame.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html