netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dsa@cumulusnetworks.com
Cc: razor@blackwall.org, netdev@vger.kernel.org,
	nikolay@cumulusnetworks.com, roopa@cumulusnetworks.com,
	vyasevic@redhat.com
Subject: Re: [PATCH net] net: make netdev_for_each_lower_dev safe for device removal
Date: Fri, 19 Feb 2016 15:31:10 -0500 (EST)	[thread overview]
Message-ID: <20160219.153110.795725800045343996.davem@davemloft.net> (raw)
In-Reply-To: <56C4C376.2000400@cumulusnetworks.com>

From: David Ahern <dsa@cumulusnetworks.com>
Date: Wed, 17 Feb 2016 12:01:10 -0700

> On 2/17/16 10:00 AM, Nikolay Aleksandrov wrote:
>> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
>>
>> When I used netdev_for_each_lower_dev in commit bad531623253 ("vrf:
>> remove slave queue and private slave struct") I thought that it acts
>> like netdev_for_each_lower_private and can be used to remove the
>> current
>> device from the list while walking, but unfortunately it acts more
>> like
>> netdev_for_each_lower_private_rcu and doesn't allow it. The difference
>> is where the "iter" points to, right now it points to the current
>> element
>> and that makes it impossible to remove it. Change the logic to be
>> similar to netdev_for_each_lower_private and make it point to the
>> "next"
>> element so we can safely delete the current one. VRF is the only such
>> user right now, there's no change for the read-only users.
 ...
>> Fixes: bad531623253 ("vrf: remove slave queue and private slave
>> struct")
>> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
>> ---
>>   include/linux/netdevice.h | 2 +-
>>   net/core/dev.c            | 4 ++--
>>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> Solves the problem for me. Thanks for the quick turnaround, Nik.
> 
> Reviewed-by / Tested-by: David Ahern <dsa@cumulusnetworks.com>

David, please explicitly list these tags one by one, patchwork is not
able to pick them up if you try to free-form the tags.  I had to
incorporate them by hand, but that makes more work for me.

Applied, thanks.

      reply	other threads:[~2016-02-19 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 17:00 [PATCH net] net: make netdev_for_each_lower_dev safe for device removal Nikolay Aleksandrov
2016-02-17 19:01 ` David Ahern
2016-02-19 20:31   ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160219.153110.795725800045343996.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=razor@blackwall.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=vyasevic@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).