Skip to content

Commit 877fe9d

Browse files
kuba-moodavem330
authored andcommitted
Revert "drivers/net/ethernet/neterion/vxge: Fix a use-after-free bug in vxge-main.c"
This reverts commit 8fc74d1. BAR0 is the main (only?) register bank for this device. We most obviously can't unmap it before the netdev is unregistered. This was pointed out in review but the patch got reposted and merged, anyway. The author of the patch was only testing it with a QEMU model, which I presume does not emulate enough for the netdev to be brought up (author's replies are not visible in lore because they kept sending their emails in HTML). Link: https://lore.kernel.org/all/20220616085059.680dc215@kernel.org/ Fixes: 8fc74d1 ("drivers/net/ethernet/neterion/vxge: Fix a use-after-free bug in vxge-main.c") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 53664d5 commit 877fe9d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/neterion/vxge/vxge-main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4736,10 +4736,10 @@ static void vxge_remove(struct pci_dev *pdev)
47364736
for (i = 0; i < vdev->no_of_vpath; i++)
47374737
vxge_free_mac_add_list(&vdev->vpaths[i]);
47384738

4739-
iounmap(vdev->bar0);
47404739
vxge_device_unregister(hldev);
47414740
/* Do not call pci_disable_sriov here, as it will break child devices */
47424741
vxge_hw_device_terminate(hldev);
4742+
iounmap(vdev->bar0);
47434743
pci_release_region(pdev, 0);
47444744
pci_disable_device(pdev);
47454745
driver_config->config_dev_cnt--;

0 commit comments

Comments
 (0)