[Intel-wired-lan] [PATCH] ixgbe: pci_set_drvdata must be called before register_netdev
Bowers, AndrewX
andrewx.bowers at intel.com
Mon Jun 5 23:05:56 UTC 2017
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Jeff Mahoney
> Sent: Saturday, June 3, 2017 3:01 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH] ixgbe: pci_set_drvdata must be called
> before register_netdev
>
> We call pci_set_drvdata immediately after calling register_netdev, which
> leaves a window where tasks writing to the sriov_numvfs sysfs attribute can
> sneak in and crash the kernel. register_netdev cleans up after itself so
> placing pci_set_drvdata immediately before it should preserve the intent of
> commit 0fb6a55cc31f (ixgbe: fix crash on rmmod after probe fail).
>
> Fixes: 0fb6a55cc31f (ixgbe: fix crash on rmmod after probe fail)
> Signed-off-by: Jeff Mahoney <jeffm at suse.com>
> ---
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list