[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1427157352.25985.86.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Mon, 23 Mar 2015 17:35:52 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [Patch net] net: use for_each_netdev_safe() in
rtnl_group_changelink()
On Mon, 2015-03-23 at 16:31 -0700, Cong Wang wrote:
> In case we move the whole dev group to another netns,
> we should call for_each_netdev_safe(), otherwise we get
> a soft lockup:
>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
> ---
> net/core/rtnetlink.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index ee0608b..7ebed55 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1932,10 +1932,10 @@ static int rtnl_group_changelink(const struct sk_buff *skb,
> struct ifinfomsg *ifm,
> struct nlattr **tb)
> {
> - struct net_device *dev;
> + struct net_device *dev, *aux;
> int err;
>
> - for_each_netdev(net, dev) {
> + for_each_netdev_safe(net, dev, aux) {
> if (dev->group == group) {
> err = do_setlink(skb, dev, ifm, tb, NULL, 0);
> if (err < 0)
It seems this bug was added in commit e7ed828f10bd8, right ?
Fixes: e7ed828f10bd8 ("netlink: support setting devgroup parameters")
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists