similar to: [PATCH v5 0/4] use put_device to cleanup resource

Displaying 20 results from an estimated 800 matches similar to: "[PATCH v5 0/4] use put_device to cleanup resource"

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
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote: > As mentioned at drivers/base/core.c: > /* > * NOTE: _Never_ directly free @dev after calling this function, even > * if it returned an error! Always use put_device() to give up the > * reference initialized in this function instead. > */ > so we don't free vp_dev until vp_dev->vdev.dev.release be
2017 Dec 14
4
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote: > As mentioned at drivers/base/core.c: > /* > * NOTE: _Never_ directly free @dev after calling this function, even > * if it returned an error! Always use put_device() to give up the > * reference initialized in this function instead. > */ > so we don't free vp_dev until vp_dev->vdev.dev.release be
2017 Dec 20
0
[PATCH v4 3/4] virtio_vop: don't kfree device on register failure
As mentioned at drivers/base/core.c: /* * NOTE: _Never_ directly free @dev after calling this function, even * if it returned an error! Always use put_device() to give up the * reference initialized in this function instead. */ so we don't free vdev until vdev->vdev.dev.release be called. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> ---
2017 Dec 21
0
[PATCH v5 3/4] virtio_vop: don't kfree device on register failure
As mentioned at drivers/base/core.c: /* * NOTE: _Never_ directly free @dev after calling this function, even * if it returned an error! Always use put_device() to give up the * reference initialized in this function instead. */ so we don't free vdev until vdev->vdev.dev.release be called. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> Reviewed-by: Cornelia Huck
2017 Dec 15
0
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
2017-12-15 3:13 GMT+08:00 Michael S. Tsirkin <mst at redhat.com>: > On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote: >> As mentioned at drivers/base/core.c: >> /* >> * NOTE: _Never_ directly free @dev after calling this function, even >> * if it returned an error! Always use put_device() to give up the >> * reference initialized in this
2017 Dec 20
1
[PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure
On Wed, 20 Dec 2017 12:27:33 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > rproc_virtio_dev_release will be called iff virtio_device.dev's > refer count became to 0. Here we should check if we call device_register "reference count drops to 0" s/call/called/ > or not, if called, put vdev.dev, and then rproc->dev's cleanup will be > done in
2017 Dec 20
0
[PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure
rproc_virtio_dev_release will be called iff virtio_device.dev's refer count became to 0. Here we should check if we call device_register or not, if called, put vdev.dev, and then rproc->dev's cleanup will be done in rproc_virtio_dev_release, otherwise we do cleanup directly. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/remoteproc/remoteproc_virtio.c
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
On Fri, Dec 15, 2017 at 09:38:42AM +0800, weiping zhang wrote: > 2017-12-15 3:13 GMT+08:00 Michael S. Tsirkin <mst at redhat.com>: > > On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote: > >> As mentioned at drivers/base/core.c: > >> /* > >> * NOTE: _Never_ directly free @dev after calling this function, even > >> * if it returned an
2017 Dec 15
1
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
On Fri, Dec 15, 2017 at 09:38:42AM +0800, weiping zhang wrote: > 2017-12-15 3:13 GMT+08:00 Michael S. Tsirkin <mst at redhat.com>: > > On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote: > >> As mentioned at drivers/base/core.c: > >> /* > >> * NOTE: _Never_ directly free @dev after calling this function, even > >> * if it returned an
2018 Feb 08
0
[PULL] virtio, vhost: fixes, cleanups, features
The following changes since commit d8a5b80568a9cb66810e75b182018e9edb68e8ff: Linux 4.15 (2018-01-28 13:20:33 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to d25cc43c6775bff6b8e3dad97c747954b805e421: vhost: don't hold onto file pointer for VHOST_SET_LOG_FD (2018-02-01 16:26:47
2017 Dec 17
6
[PATCH v3 0/5] proper cleanup if fail to register_virtio_device
Hi, Patch1 add a helper to get virtio_device's status which will be used later. Patch2~4: check virtio_device's status is RTIO_CONFIG_S_ACKNOWLEDGE or not, if so use put_device otherwise use kfree. Patch5: add comments for virtio_register_device help caller do a proper cleanup if got failure. weiping zhang (5): virtio: add helper virtio_get_status virtio_pci: don't kfree device
2017 Dec 17
6
[PATCH v3 0/5] proper cleanup if fail to register_virtio_device
Hi, Patch1 add a helper to get virtio_device's status which will be used later. Patch2~4: check virtio_device's status is RTIO_CONFIG_S_ACKNOWLEDGE or not, if so use put_device otherwise use kfree. Patch5: add comments for virtio_register_device help caller do a proper cleanup if got failure. weiping zhang (5): virtio: add helper virtio_get_status virtio_pci: don't kfree device
2017 Dec 15
0
[PATCH v2 1/3] virtio_pci: use put_device instead of kfree
On Thu, 14 Dec 2017 21:13:28 +0200 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Tue, Dec 12, 2017 at 09:24:02PM +0800, weiping zhang wrote: > > As mentioned at drivers/base/core.c: > > /* > > * NOTE: _Never_ directly free @dev after calling this function, even > > * if it returned an error! Always use put_device() to give up the > > *
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 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 19
1
[PATCH v3 5/5] virtio: add comments for virtio_register_device
On Sun, 17 Dec 2017 21:48:05 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > As mentioned at drivers/base/core.c: > /* > * NOTE: _Never_ directly free @dev after calling this function, even > * if it returned an error! Always use put_device() to give up the > * reference initialized in this function instead. > */ > virtio_register_device may fail before/after call