similar to: [PATCH 2/2] virtio: Use ida to allocate virtio index

Displaying 20 results from an estimated 3000 matches similar to: "[PATCH 2/2] virtio: Use ida to allocate virtio index"

2017 Nov 29
3
[PATCH] virtio: release virtio index when fail to device_register
index can be reused by other virtio device. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 48230a5..bf7ff39 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -333,6 +333,8 @@ int register_virtio_device(struct
2017 Nov 29
3
[PATCH] virtio: release virtio index when fail to device_register
index can be reused by other virtio device. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 48230a5..bf7ff39 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -333,6 +333,8 @@ int register_virtio_device(struct
2012 Nov 08
3
[PATCH] virtio: Don't access index after unregister.
Virtio wants to release used indices after the corresponding virtio device has been unregistered. However, virtio does not hold an extra reference, giving up its last reference with device_unregister(), making accessing dev->index afterwards invalid. I actually saw problems when testing my (not-yet-merged) virtio-ccw code: - device_add virtio-net,id=xxx -> creates device virtio<n>
2012 Nov 08
3
[PATCH] virtio: Don't access index after unregister.
Virtio wants to release used indices after the corresponding virtio device has been unregistered. However, virtio does not hold an extra reference, giving up its last reference with device_unregister(), making accessing dev->index afterwards invalid. I actually saw problems when testing my (not-yet-merged) virtio-ccw code: - device_add virtio-net,id=xxx -> creates device virtio<n>
2017 Dec 20
2
[PATCH v4 1/4] virtio: split device_register into device_initialize and device_add
On Wed, 20 Dec 2017 12:26:25 +0800 weiping zhang <zwp10758 at gmail.com> wrote: [you used a different mail address in your From: than in your s-o-b:; same for the other patches] > In order to make caller do a simple cleanup, we split device_register > into device_initialize and device_add. device_initialize always sucess, s/success/succeeds/ > the caller can always use
2017 Dec 20
2
[PATCH v4 1/4] virtio: split device_register into device_initialize and device_add
On Wed, 20 Dec 2017 12:26:25 +0800 weiping zhang <zwp10758 at gmail.com> wrote: [you used a different mail address in your From: than in your s-o-b:; same for the other patches] > In order to make caller do a simple cleanup, we split device_register > into device_initialize and device_add. device_initialize always sucess, s/success/succeeds/ > the caller can always use
2017 Dec 21
1
[PATCH v5 1/4] virtio: split device_register into device_initialize and device_add
In order to make caller do a simple cleanup, we split device_register into device_initialize and device_add. device_initialize always succeeds, so the caller can always use put_device when register_virtio_device faild. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> Suggested-by: Cornelia Huck <cohuck at redhat.com> --- drivers/virtio/virtio.c | 18 +++++++++++++++---
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi, The main change is split device_register into 2 sperate calls: device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device. v3->v4: * split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device. v2->v3: * virtio: add new helper do get
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi, The main change is split device_register into 2 sperate calls: device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device. v3->v4: * split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device. v2->v3: * virtio: add new helper do get
2012 Sep 03
1
[PATCH] virtio: Don't access device data after unregistration.
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> Fix panic in virtio.c when CONFIG_DEBUG_SLAB is set. Use device_del() and put_device() instead of device_unregister(), and access device data before calling put_device(). Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com> cc: Guzman Lugo, Fernadndo <fernando.lugo at ti.com> cc: Michael S. Tsirkin <mst
2012 Sep 03
1
[PATCH] virtio: Don't access device data after unregistration.
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> Fix panic in virtio.c when CONFIG_DEBUG_SLAB is set. Use device_del() and put_device() instead of device_unregister(), and access device data before calling put_device(). Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com> cc: Guzman Lugo, Fernadndo <fernando.lugo at ti.com> cc: Michael S. Tsirkin <mst
2017 Dec 20
0
[PATCH v4 1/4] virtio: split device_register into device_initialize and device_add
In order to make caller do a simple cleanup, we split device_register into device_initialize and device_add. device_initialize always sucess, the caller can always use put_device when fail to register virtio_device no matter fail at ida_simple_get or at device_add. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> Suggested-by: Cornelia Huck <cohuck at redhat.com> ---
2017 Dec 01
3
[PATCH] virtio: release virtio index when fail to device_register
On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote: > On Wed, 29 Nov 2017 09:23:01 +0800 > weiping zhang <zwp10758 at gmail.com> wrote: > > > index can be reused by other virtio device. > > > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > > Reviewed-by: Cornelia Huck <cohuck at redhat.com> > > > --- >
2017 Dec 01
3
[PATCH] virtio: release virtio index when fail to device_register
On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote: > On Wed, 29 Nov 2017 09:23:01 +0800 > weiping zhang <zwp10758 at gmail.com> wrote: > > > index can be reused by other virtio device. > > > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > > Reviewed-by: Cornelia Huck <cohuck at redhat.com> > > > --- >
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2012 Dec 05
12
[PATCH 1/3] virtio: change to_vp_device to an inlined definition
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/virtio/virtio_pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -98,11 +98,7 @@
2015 Sep 17
2
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: > The virtio core uses a static ida named virtio_index_ida for > assigning index numbers to virtio devices during registration. > The ida core may allocate some internal idr cache layers and > an ida bitmap upon any ida allocation, and all these layers are > truely freed only upon the ida destruction. The virtio_index_ida
2015 Sep 17
2
DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)
On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: > The virtio core uses a static ida named virtio_index_ida for > assigning index numbers to virtio devices during registration. > The ida core may allocate some internal idr cache layers and > an ida bitmap upon any ida allocation, and all these layers are > truely freed only upon the ida destruction. The virtio_index_ida
2011 Apr 05
1
[PATCH] virtio: decrement dev_index when device is unregistered
When virtio device is removed, dev_index does not get decremented. The next device hotplug event results in consuming the next pci to the one that is suppose to be available. Signed-off-by: Takuma Umeya <tumeya at redhat.com> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index efb35aa..67fe71d 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -216,6
2011 Apr 05
1
[PATCH] virtio: decrement dev_index when device is unregistered
When virtio device is removed, dev_index does not get decremented. The next device hotplug event results in consuming the next pci to the one that is suppose to be available. Signed-off-by: Takuma Umeya <tumeya at redhat.com> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index efb35aa..67fe71d 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -216,6