From: David Ahern <dsa@cumulusnetworks.com>
To: Nikolay Aleksandrov <razor@blackwall.org>, netdev@vger.kernel.org
Cc: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
"David S. Miller" <davem@davemloft.net>,
Roopa Prabhu <roopa@cumulusnetworks.com>,
Vlad Yasevich <vyasevic@redhat.com>
Subject: Re: [PATCH net] net: make netdev_for_each_lower_dev safe for device removal
Date: Wed, 17 Feb 2016 12:01:10 -0700 [thread overview]
Message-ID: <56C4C376.2000400@cumulusnetworks.com> (raw)
In-Reply-To: <1455728431-21976-1-git-send-email-razor@blackwall.org>
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.
>
-----8<-----
>
> CC: David Ahern <dsa@cumulusnetworks.com>
> CC: David S. Miller <davem@davemloft.net>
> CC: Roopa Prabhu <roopa@cumulusnetworks.com>
> CC: Vlad Yasevich <vyasevic@redhat.com>
> 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>
next prev parent reply other threads:[~2016-02-17 19:01 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 [this message]
2016-02-19 20:31 ` David Miller
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=56C4C376.2000400@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.