diff options
author | Wei Yang <weiyang@linux.vnet.ibm.com> | 2014-06-08 13:49:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-11 00:32:46 -0700 |
commit | da1de8dfff09d33d4a5345762c21b487028e25f5 (patch) | |
tree | e284410c5e97c58174afd8e1d9ee259419e5ebcb /block/blk.h | |
parent | 95646373c9bb8e7706e0ae3c07e741b682fc9c2c (diff) |
net/mlx4_core: Keep only one driver entry release mlx4_priv
Following commit befdf89 "net/mlx4_core: Preserve pci_dev_data after
__mlx4_remove_one()", there are two mlx4 pci callbacks which will
attempt to release the mlx4_priv object -- .shutdown and .remove.
This leads to a use-after-free access to the already freed mlx4_priv
instance and trigger a "Kernel access of bad area" crash when both
.shutdown and .remove are called.
During reboot or kexec, .shutdown is called, with the VFs probed to
the host going through shutdown first and then the PF. Later, the PF
will trigger VFs' .remove since VFs still have driver attached.
Fix that by keeping only one driver entry which releases mlx4_priv.
Fixes: befdf89 ('net/mlx4_core: Preserve pci_dev_data after __mlx4_remove_one()')
CC: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'block/blk.h')
0 files changed, 0 insertions, 0 deletions