netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: tariqt@mellanox.com
Cc: netdev@vger.kernel.org, eranbe@mellanox.com, saeedm@mellanox.com,
	eugenia@mellanox.com
Subject: Re: [PATCH net 0/3] mlx4 fix for shutdown flow
Date: Fri, 18 Nov 2016 13:47:09 -0500 (EST)	[thread overview]
Message-ID: <20161118.134709.2264667169397661712.davem@davemloft.net> (raw)
In-Reply-To: <1479397251-6932-1-git-send-email-tariqt@mellanox.com>

From: Tariq Toukan <tariqt@mellanox.com>
Date: Thu, 17 Nov 2016 17:40:48 +0200

> This patchset fixes an invalid reference to mdev in mlx4 shutdown flow.
> 
> In patch 1, we make sure netif_device_detach() is called from shutdown flow only,
> since we want to keep it present during a simple configuration change.
> 
> In patches 2 and 3, we add checks that were missing in:
> * dev_get_phys_port_id
> * dev_get_phys_port_name
> We check the presence of the network device before calling the driver's
> callbacks. This already exists for all other ndo's.
> 
> Series generated against net commit:
> e5f6f564fd19 bnxt: add a missing rcu synchronization

I don't like where this is going nor the precedence it is setting.

If you are taking the device into a state where it cannot be safely
accessed by ndo operations, then you _MUST_ do whatever is necessary
to make sure the device is unregistered and cannot be found in the
various global lists and tables of network devices.

This is mandatory.

And this is how we must fix these kinds of problems instead of
peppering device presence test all over the place.  That will be
error prone and in the long term a huge maintainence burdon.

I'm not applying this series, sorry.  You have to fix this properly.

      parent reply	other threads:[~2016-11-18 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 15:40 [PATCH net 0/3] mlx4 fix for shutdown flow Tariq Toukan
2016-11-17 15:40 ` [PATCH net 1/3] net/mlx4_en: Remove netif_device_detach from stop port flow Tariq Toukan
2016-11-17 15:40 ` [PATCH net 2/3] net: Check netdevice presence on dev_get_phys_port_id Tariq Toukan
2016-11-17 15:40 ` [PATCH net 3/3] net: Check netdevice presence on dev_get_phys_port_name Tariq Toukan
2016-11-18 18:47 ` 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=20161118.134709.2264667169397661712.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eranbe@mellanox.com \
    --cc=eugenia@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.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).