]> git.baikalelectronics.ru Git - kernel.git/commit
i40evf: check for msix_entries null dereference
authorAlan Brady <alan.brady@intel.com>
Tue, 8 Nov 2016 21:05:05 +0000 (13:05 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 3 Dec 2016 07:10:41 +0000 (23:10 -0800)
commitb98c6512f504bd3a0a4ce36e7cf066a428159429
tree970955bded152a17aa64049490c756029225383a
parentb76e91273bd181aea80ac4ff42937ccb8b2c873c
i40evf: check for msix_entries null dereference

It is possible for msix_entries to be freed by a previous suspend/remove
before a VF is closed.  This patch fixes the issue by checking for NULL
before dereferencing msix_entries and returning early in the case where
it is NULL within the i40evf_close code path.  Without this patch it is
possible to trigger a kernel panic through NULL dereference.

Change-ID: I92a2746e82533a889e25f91578eac9abd0388ae2
Signed-off-by: Alan Brady <alan.brady@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c