From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [RFC PATCH v2] e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm
Date: Tue, 25 Feb 2020 21:46:13 +0100 [thread overview]
Message-ID: <20200225204613.GA14366@kroah.com> (raw)
In-Reply-To: <681404C7-9015-4C64-B8FE-2C93D75A7318@canonical.com>
On Tue, Feb 25, 2020 at 05:42:26PM +0800, Kai-Heng Feng wrote:
> Hi Greg,
>
> > On Oct 8, 2019, at 01:27, Alexander Duyck <alexander.duyck@gmail.com> wrote:
> >
> > From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
> >
> > This patch is meant to address possible race conditions that can exist
> > between network configuration and power management. A similar issue was
> > fixed for igb in commit 9474933caf21 ("igb: close/suspend race in
> > netif_device_detach").
> >
> > In addition it consolidates the code so that the PCI error handling code
> > will essentially perform the power management freeze on the device prior to
> > attempting a reset, and will thaw the device afterwards if that is what it
> > is planning to do. Otherwise when we call close on the interface it should
> > see it is detached and not attempt to call the logic to down the interface
> > and free the IRQs again.
> >
> >> From what I can tell the check that was adding the check for __E1000_DOWN
> > in e1000e_close was added when runtime power management was added. However
> > it should not be relevant for us as we perform a call to
> > pm_runtime_get_sync before we call e1000_down/free_irq so it should always
> > be back up before we call into this anyway.
> >
> > Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> Please merge this commit, a7023819404ac9bd2bb311a4fafd38515cfa71ec to stable v5.14.
>
> `modprobe -r e1000e` triggers a null pointer dereference [1] after the the following two patches are applied to v5.4.y:
> d635e7c4b34e6a630c7a1e8f1a8fd52c3e3ceea7 e1000e: Revert "e1000e: Make watchdog use delayed work"
> 21c6137939723ed6f5e4aec7882cdfc247304c27 e1000e: Drop unnecessary __E1000_DOWN bit twiddling
Now queued up, thanks.
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: stable <stable@vger.kernel.org>,
Alexander Duyck <alexander.duyck@gmail.com>,
zdai@linux.vnet.ibm.com,
"open list:NETWORKING DRIVERS" <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"moderated list:INTEL ETHERNET DRIVERS"
<intel-wired-lan@lists.osuosl.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
zdai@us.ibm.com, David Miller <davem@davemloft.net>
Subject: Re: [RFC PATCH v2] e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm
Date: Tue, 25 Feb 2020 21:46:13 +0100 [thread overview]
Message-ID: <20200225204613.GA14366@kroah.com> (raw)
In-Reply-To: <681404C7-9015-4C64-B8FE-2C93D75A7318@canonical.com>
On Tue, Feb 25, 2020 at 05:42:26PM +0800, Kai-Heng Feng wrote:
> Hi Greg,
>
> > On Oct 8, 2019, at 01:27, Alexander Duyck <alexander.duyck@gmail.com> wrote:
> >
> > From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
> >
> > This patch is meant to address possible race conditions that can exist
> > between network configuration and power management. A similar issue was
> > fixed for igb in commit 9474933caf21 ("igb: close/suspend race in
> > netif_device_detach").
> >
> > In addition it consolidates the code so that the PCI error handling code
> > will essentially perform the power management freeze on the device prior to
> > attempting a reset, and will thaw the device afterwards if that is what it
> > is planning to do. Otherwise when we call close on the interface it should
> > see it is detached and not attempt to call the logic to down the interface
> > and free the IRQs again.
> >
> >> From what I can tell the check that was adding the check for __E1000_DOWN
> > in e1000e_close was added when runtime power management was added. However
> > it should not be relevant for us as we perform a call to
> > pm_runtime_get_sync before we call e1000_down/free_irq so it should always
> > be back up before we call into this anyway.
> >
> > Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> Please merge this commit, a7023819404ac9bd2bb311a4fafd38515cfa71ec to stable v5.14.
>
> `modprobe -r e1000e` triggers a null pointer dereference [1] after the the following two patches are applied to v5.4.y:
> d635e7c4b34e6a630c7a1e8f1a8fd52c3e3ceea7 e1000e: Revert "e1000e: Make watchdog use delayed work"
> 21c6137939723ed6f5e4aec7882cdfc247304c27 e1000e: Drop unnecessary __E1000_DOWN bit twiddling
Now queued up, thanks.
greg k-h
next prev parent reply other threads:[~2020-02-25 20:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 16:54 [Intel-wired-lan] [v1] e1000e: EEH on e1000e adapter detects io perm failure can trigger crash David Dai
2019-10-03 16:54 ` David Dai
2019-10-03 17:39 ` [Intel-wired-lan] " Alexander Duyck
2019-10-03 17:39 ` Alexander Duyck
2019-10-03 18:50 ` [Intel-wired-lan] " David Z. Dai
2019-10-03 18:50 ` David Z. Dai
2019-10-03 20:39 ` [Intel-wired-lan] " Alexander Duyck
2019-10-03 20:39 ` Alexander Duyck
2019-10-04 0:02 ` [Intel-wired-lan] " David Z. Dai
2019-10-04 0:02 ` David Z. Dai
2019-10-04 14:35 ` [Intel-wired-lan] " Alexander Duyck
2019-10-04 14:35 ` Alexander Duyck
2019-10-04 17:04 ` [Intel-wired-lan] " David Z. Dai
2019-10-04 17:04 ` David Z. Dai
2019-10-04 23:36 ` [Intel-wired-lan] [RFC PATCH] e1000e: Use rtnl_lock to prevent race conditions between net and pci/pm Alexander Duyck
2019-10-04 23:36 ` Alexander Duyck
2019-10-05 2:18 ` [Intel-wired-lan] " David Z. Dai
2019-10-05 2:18 ` David Z. Dai
2019-10-05 17:22 ` [Intel-wired-lan] " Alexander Duyck
2019-10-05 17:22 ` Alexander Duyck
2019-10-07 15:50 ` [Intel-wired-lan] " David Z. Dai
2019-10-07 15:50 ` David Z. Dai
2019-10-07 17:02 ` [Intel-wired-lan] " Alexander Duyck
2019-10-07 17:02 ` Alexander Duyck
2019-10-07 17:12 ` [Intel-wired-lan] " David Z. Dai
2019-10-07 17:12 ` David Z. Dai
2019-10-07 17:23 ` [Intel-wired-lan] " Alexander Duyck
2019-10-07 17:23 ` Alexander Duyck
2019-10-07 17:27 ` [Intel-wired-lan] [RFC PATCH v2] " Alexander Duyck
2019-10-07 17:27 ` Alexander Duyck
2019-10-08 20:49 ` [Intel-wired-lan] " David Z. Dai
2019-10-08 20:49 ` David Z. Dai
2020-02-25 9:42 ` [Intel-wired-lan] " Kai-Heng Feng
2020-02-25 9:42 ` Kai-Heng Feng
2020-02-25 20:46 ` Greg Kroah-Hartman [this message]
2020-02-25 20:46 ` Greg Kroah-Hartman
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=20200225204613.GA14366@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=intel-wired-lan@osuosl.org \
/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.