Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://github.com/rustyrussell/linux

* git://github.com/rustyrussell/linux:
virtio-pci: fix use after free

+6 -5
+6 -5
drivers/virtio/virtio_pci.c
··· 594 594 595 595 static void virtio_pci_release_dev(struct device *_d) 596 596 { 597 - struct virtio_device *dev = container_of(_d, struct virtio_device, 598 - dev); 599 - struct virtio_pci_device *vp_dev = to_vp_device(dev); 600 - 601 - kfree(vp_dev); 597 + /* 598 + * No need for a release method as we allocate/free 599 + * all devices together with the pci devices. 600 + * Provide an empty one to avoid getting a warning from core. 601 + */ 602 602 } 603 603 604 604 /* the PCI probing function */ ··· 686 686 pci_iounmap(pci_dev, vp_dev->ioaddr); 687 687 pci_release_regions(pci_dev); 688 688 pci_disable_device(pci_dev); 689 + kfree(vp_dev); 689 690 } 690 691 691 692 #ifdef CONFIG_PM