Netdev List
 help / color / mirror / Atom feed
From: David Ahern <dsa@cumulusnetworks.com>
To: David Miller <davem@davemloft.net>
Cc: rshearma@brocade.com, netdev@vger.kernel.org, roopa@cumulusnetworks.com
Subject: Re: [PATCH net] lwtunnel: fix autoload of lwt modules
Date: Tue, 17 Jan 2017 16:16:09 -0700	[thread overview]
Message-ID: <deb0ea2f-364a-59fe-0bcd-1f46557522f8@cumulusnetworks.com> (raw)
In-Reply-To: <20170117.155424.1815351091063210993.davem@davemloft.net>

On 1/17/17 1:54 PM, David Miller wrote:
> From: David Ahern <dsa@cumulusnetworks.com>
> Date: Tue, 17 Jan 2017 13:46:22 -0700
> 
>> In short seems like removing the dev + the current patch dropping
>> the lock fixes the current deadlock problem and should be fine.
> 
> What about the state recorded by fib_get_nhs() and similar?  There is
> a mapping from ifindex to ->nh_dev which would be invalidated if the
> RTNL semaphore is dropped.

As far as I can see through the call to build_state all device indices came from the user and have not been validated yet (once the dev arg to build_state is removed; sent that patch for net-next). The device index validation happens later in fib_create_info with the call to fib_check_nh (or dev_get_by_index for host scope).

I sent an alternative approach that pulls the module loading into a separate function that is called while creating the fib_config. Performance heavy for multipath but solves the autoload without delving into the restart problem.

      reply	other threads:[~2017-01-17 23:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-17  5:33 [PATCH net] lwtunnel: fix autoload of lwt modules David Ahern
2017-01-17 10:04 ` Robert Shearman
2017-01-17 17:07   ` David Ahern
2017-01-17 17:26     ` Robert Shearman
2017-01-17 18:04       ` David Ahern
2017-01-17 20:38         ` David Miller
2017-01-17 20:46           ` David Ahern
2017-01-17 20:54             ` David Miller
2017-01-17 23:16               ` David Ahern [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=deb0ea2f-364a-59fe-0bcd-1f46557522f8@cumulusnetworks.com \
    --to=dsa@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=rshearma@brocade.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