Re: [PATCH] virtio-pci: fix leaks of msix_affinity_masks

2013-06-20 Thread Michael S. Tsirkin
On Thu, Jun 20, 2013 at 09:36:50AM +0400, Andrey Vagin wrote: > From: Andrew Vagin > > vp_dev->msix_vectors should be initialized before allocating > msix_affinity_masks, otherwise vp_free_vectors will not free these > objects. > > unreferenced object 0x88010f969d88 (size 512): > comm "sys

Re: [PATCH] virtio-spec: add field for scsi command size

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 04:40, Rusty Russell ha scritto: > Paolo Bonzini writes: >> Il 19/06/2013 10:24, Michael S. Tsirkin ha scritto: > 2) We introduce VIRTIO_NET_F_ANY_LAYOUT and VIRTIO_BLK_F_ANY_LAYOUT >specifically for net and block (note the new names). >> >> So why not a transport feature

Re: what should a virtio-mmio transport without a backend look like?

2013-06-20 Thread Pawel Moll
On Thu, 2013-06-20 at 11:29 +0100, Peter Maydell wrote: > I'm (finally) trying to add virtio-mmio support properly to > QEMU now Fred has put all the refactoring foundations in place. > > 1. One question I've run into is: what should a virtio-mmio transport > with no backend look like to the guest

[PATCH net] vhost-net: fix use-after-free in vhost_net_flush

2013-06-20 Thread Michael S. Tsirkin
vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 vhost_net_flush tries to use the argument after passing it to vhost_net_ubuf_put_and_wait, this results in use after free. To fix, don't free the ar

[PATCH net for-stable] vhost-net: fix use-after-free in vhost_net_flush

2013-06-20 Thread Michael S. Tsirkin
vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 vhost_net_flush tries to use the argument after passing it to vhost_net_ubuf_put_and_wait, this results in use after free. To fix, don't free the ar

[PATCH RFC] vhost-net: make more functions static

2013-06-20 Thread Michael S. Tsirkin
Make two more functions static - they only have local callers. Signed-off-by: Michael S. Tsirkin --- Will be merged through the vhost tree - no need to apply directly. drivers/vhost/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhos

Re: [PATCH net] vhost-net: fix use-after-free in vhost_net_flush

2013-06-20 Thread Sergei Shtylyov
Hello. On 20-06-2013 15:48, Michael S. Tsirkin wrote: vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 Please also specify that commit's summary line in parens. vhost_net_flush tries to

Re: what should a virtio-mmio transport without a backend look like?

2013-06-20 Thread Christopher Covington
Hi Peter, On 06/20/2013 07:08 AM, Pawel Moll wrote: > On Thu, 2013-06-20 at 11:29 +0100, Peter Maydell wrote: >> I'm (finally) trying to add virtio-mmio support properly to >> QEMU now Fred has put all the refactoring foundations in place. >> >> 1. One question I've run into is: what should a virt

[PATCH 0/3] deprecate usage of pci_scan_bus_parented()

2013-06-20 Thread Jiang Liu
From: Jiang Liu This patch tries to deprecate usage of pci_scan_bus_parented(). It applies to https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next Jiang Liu (3): PCI: export three functions to support modular host bridge driver PCI, xen-pcifront: use new PCI interfaces to sim

[PATCH 1/3] PCI: export three functions to support modular host bridge driver

2013-06-20 Thread Jiang Liu
From: Jiang Liu The xen-pcifront host bridge driver could be built as a module, so export pci_create_root_bus(), pci_stop_and_remove_root_bus() and pci_set_host_bridge_release() to support modular host bridge drivers. This patch is a preparation for coming xen-pcifront refinement. Signed-off-by:

[PATCH 2/3] PCI, xen-pcifront: use new PCI interfaces to simplify implementation

2013-06-20 Thread Jiang Liu
From: Jiang Liu Use new PCI interfaces to simplify xen-pcifront implementation: 1) Use pci_create_root_bus() instead of pci_scan_bus_parented() because pci_scan_bus_parented() will be marked as __deprecated. This also gets rid of a duplicated call to pci_bus_start_devices(). 2) Use pci_stop

[PATCH 3/3] PCI: mark pci_scan_bus_parented() as __deprecated

2013-06-20 Thread Jiang Liu
From: Jiang Liu Mark pci_scan_bus_parented() as __deprecated and clean up outdated comments. Signed-off-by: Jiang Liu Cc: Chris Metcalf Cc: Greg Kroah-Hartman Cc: Thierry Reding Cc: linux-ker...@vger.kernel.org Cc: linux-...@vger.kernel.org --- arch/tile/kernel/pci.c | 3 --- include/linux/

Re: [PATCH 3/3] PCI: mark pci_scan_bus_parented() as __deprecated

2013-06-20 Thread Greg Kroah-Hartman
On Fri, Jun 21, 2013 at 01:01:05AM +0800, Jiang Liu wrote: > From: Jiang Liu > > Mark pci_scan_bus_parented() as __deprecated and clean up outdated > comments. Why not just delete the function, if no in-kernel users are calling it, it's no longer needed at all. thanks, greg k-h ___

Re: [PATCH 3/3] PCI: mark pci_scan_bus_parented() as __deprecated

2013-06-20 Thread Jiang Liu
On 06/21/2013 01:08 AM, Greg Kroah-Hartman wrote: > On Fri, Jun 21, 2013 at 01:01:05AM +0800, Jiang Liu wrote: >> From: Jiang Liu >> >> Mark pci_scan_bus_parented() as __deprecated and clean up outdated >> comments. > > Why not just delete the function, if no in-kernel users are calling it, > it'

Re: [PATCH 3/3] PCI: mark pci_scan_bus_parented() as __deprecated

2013-06-20 Thread Greg Kroah-Hartman
On Fri, Jun 21, 2013 at 01:14:23AM +0800, Jiang Liu wrote: > On 06/21/2013 01:08 AM, Greg Kroah-Hartman wrote: > > On Fri, Jun 21, 2013 at 01:01:05AM +0800, Jiang Liu wrote: > >> From: Jiang Liu > >> > >> Mark pci_scan_bus_parented() as __deprecated and clean up outdated > >> comments. > > > > Wh

Re: [PATCH] virtio-pci: fix leaks of msix_affinity_masks

2013-06-20 Thread Jason Wang
On 06/20/2013 01:36 PM, Andrey Vagin wrote: > From: Andrew Vagin > > vp_dev->msix_vectors should be initialized before allocating > msix_affinity_masks, otherwise vp_free_vectors will not free these > objects. > > unreferenced object 0x88010f969d88 (size 512): > comm "systemd-udevd", pid 158

Re: [PATCH net] vhost-net: fix use-after-free in vhost_net_flush

2013-06-20 Thread Jason Wang
On 06/20/2013 07:48 PM, Michael S. Tsirkin wrote: > vhost_net_ubuf_put_and_wait has a confusing name: > it will actually also free it's argument. > Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 > vhost_net_flush tries to use the argument after passing it > to vhost_net_ubuf_put_and_wai