search for: devm

Displaying 20 results from an estimated 36 matches for "devm".

Did you mean: dev
2017 Dec 13
2
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 06:02:23PM +0100, Cornelia Huck wrote: > On Tue, 12 Dec 2017 13:45:50 +0000 > Mark Rutland <mark.rutland at arm.com> wrote: > > > Recent rework of the virtio_mmio probe/remove paths balanced a > > devm_ioremap() with an iounmap() rather than its devm variant. This ends > > up corrupting the devm datastructures, and results in the following > > boot-time splat on arm64 under QEMU 2.9.0: > > > > [ 3.450397] ------------[ cut here ]------------ > > [ 3.453822] Tr...
2017 Dec 13
2
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 06:02:23PM +0100, Cornelia Huck wrote: > On Tue, 12 Dec 2017 13:45:50 +0000 > Mark Rutland <mark.rutland at arm.com> wrote: > > > Recent rework of the virtio_mmio probe/remove paths balanced a > > devm_ioremap() with an iounmap() rather than its devm variant. This ends > > up corrupting the devm datastructures, and results in the following > > boot-time splat on arm64 under QEMU 2.9.0: > > > > [ 3.450397] ------------[ cut here ]------------ > > [ 3.453822] Tr...
2017 Dec 12
0
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, 12 Dec 2017 13:45:50 +0000 Mark Rutland <mark.rutland at arm.com> wrote: > Recent rework of the virtio_mmio probe/remove paths balanced a > devm_ioremap() with an iounmap() rather than its devm variant. This ends > up corrupting the devm datastructures, and results in the following > boot-time splat on arm64 under QEMU 2.9.0: > > [ 3.450397] ------------[ cut here ]------------ > [ 3.453822] Trying to vfree() nonexiste...
2017 Dec 14
0
[PATCHv2] virtio_mmio: fix devm cleanup
...Mark Rutland wrote: > On Tue, Dec 12, 2017 at 06:02:23PM +0100, Cornelia Huck wrote: > > On Tue, 12 Dec 2017 13:45:50 +0000 > > Mark Rutland <mark.rutland at arm.com> wrote: > > > > > Recent rework of the virtio_mmio probe/remove paths balanced a > > > devm_ioremap() with an iounmap() rather than its devm variant. This ends > > > up corrupting the devm datastructures, and results in the following > > > boot-time splat on arm64 under QEMU 2.9.0: > > > > > > [ 3.450397] ------------[ cut here ]------------ > &g...
2017 Dec 12
2
[PATCH] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 02:09:52PM +0100, Cornelia Huck wrote: > On Tue, 12 Dec 2017 12:53:02 +0000 > Mark Rutland <mark.rutland at arm.com> wrote: > > > Recent rework of the virtio_mmio probe path balanced a devm_ioremap() > > with an iounmap() rather than its devm variant. This ends up corrupting > > the devm datastructures, and results in the following boot failure on > > arm64 under QEMU 2.9.0: > > > > [ 3.450397] ------------[ cut here ]------------ > > [ 3.453...
2017 Dec 12
2
[PATCH] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 02:09:52PM +0100, Cornelia Huck wrote: > On Tue, 12 Dec 2017 12:53:02 +0000 > Mark Rutland <mark.rutland at arm.com> wrote: > > > Recent rework of the virtio_mmio probe path balanced a devm_ioremap() > > with an iounmap() rather than its devm variant. This ends up corrupting > > the devm datastructures, and results in the following boot failure on > > arm64 under QEMU 2.9.0: > > > > [ 3.450397] ------------[ cut here ]------------ > > [ 3.453...
2017 Dec 12
2
[PATCH] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe path balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot failure on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4844...
2017 Dec 12
2
[PATCH] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe path balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot failure on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4844...
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4...
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4...
2017 Dec 12
0
[PATCH] virtio_mmio: fix devm cleanup
On Tue, 12 Dec 2017 12:53:02 +0000 Mark Rutland <mark.rutland at arm.com> wrote: > Recent rework of the virtio_mmio probe path balanced a devm_ioremap() > with an iounmap() rather than its devm variant. This ends up corrupting > the devm datastructures, and results in the following boot failure on > arm64 under QEMU 2.9.0: > > [ 3.450397] ------------[ cut here ]------------ > [ 3.453822] Trying to vfree() nonexis...
2017 Dec 12
1
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 10:26:24PM +0800, weiping zhang wrote: > 2017-12-12 21:45 GMT+08:00 Mark Rutland <mark.rutland at arm.com>: > Hi Mark, Hi, > thanks your patch, I dig into these three devm_xxx funciton, > all of them represented by a struct devres as following, > > struct devres_node { > struct list_head entry; > dr_release_t release; > #ifdef CONFIG_DEBUG_DEVRES > const char *name; &...
2017 Dec 12
1
[PATCHv2] virtio_mmio: fix devm cleanup
On Tue, Dec 12, 2017 at 10:26:24PM +0800, weiping zhang wrote: > 2017-12-12 21:45 GMT+08:00 Mark Rutland <mark.rutland at arm.com>: > Hi Mark, Hi, > thanks your patch, I dig into these three devm_xxx funciton, > all of them represented by a struct devres as following, > > struct devres_node { > struct list_head entry; > dr_release_t release; > #ifdef CONFIG_DEBUG_DEVRES > const char *name; &...
2017 Dec 12
0
[PATCHv2] virtio_mmio: fix devm cleanup
2017-12-12 21:45 GMT+08:00 Mark Rutland <mark.rutland at arm.com>: > Recent rework of the virtio_mmio probe/remove paths balanced a > devm_ioremap() with an iounmap() rather than its devm variant. This ends > up corrupting the devm datastructures, and results in the following > boot-time splat on arm64 under QEMU 2.9.0: > > [ 3.450397] ------------[ cut here ]------------ > [ 3.453822] Trying to vfree() nonexisten...
2017 Dec 12
0
[PATCH] virtio_mmio: fix devm cleanup
...On Tue, Dec 12, 2017 at 02:09:52PM +0100, Cornelia Huck wrote: > > Shouldn't the cleanup in _remove() then be removed as well? > > Ah, I'd missed that. > > I believe that can be removed, yes. > > Should I spin a v2 with that folded in? I think it has the same devm_ioremap vs. iounmap discrepancy, so it should probably be folded in.
2017 Dec 15
0
[PULL] vhost: regression fixes
...virtio_net: fix return value check in receive_mergeable() (2017-12-07 18:34:52 +0200) 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 c2e90800aef22e7ea14ea7560ba99993f11d3616: virtio_mmio: fix devm cleanup (2017-12-14 21:01:40 +0200) ---------------------------------------------------------------- virtio: regression fixes Fixes two issues in the latest kernel. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> ---------------------------------------------------------------- Mark...
2017 Dec 15
0
[PULL] vhost: regression fixes
...virtio_net: fix return value check in receive_mergeable() (2017-12-07 18:34:52 +0200) 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 c2e90800aef22e7ea14ea7560ba99993f11d3616: virtio_mmio: fix devm cleanup (2017-12-14 21:01:40 +0200) ---------------------------------------------------------------- virtio: regression fixes Fixes two issues in the latest kernel. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> ---------------------------------------------------------------- Mark...
2017 Dec 06
1
[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...t know if device_add() had already exposed the struct device to other code that might have acquired a reference). As the device has an empty release function, touching the device structure after that is not a real problem, but... > +unmap: > + iounmap(vm_dev->base); > +free_mem: > + devm_release_mem_region(&pdev->dev, mem->start, > + resource_size(mem)); > +free_vmdev: > + devm_kfree(&pdev->dev, vm_dev); ...unconditionally freeing the device here would be a problem if other code had acquired a reference above. (Unlikely, but we should try to get this ri...
2017 Dec 06
1
[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...t know if device_add() had already exposed the struct device to other code that might have acquired a reference). As the device has an empty release function, touching the device structure after that is not a real problem, but... > +unmap: > + iounmap(vm_dev->base); > +free_mem: > + devm_release_mem_region(&pdev->dev, mem->start, > + resource_size(mem)); > +free_vmdev: > + devm_kfree(&pdev->dev, vm_dev); ...unconditionally freeing the device here would be a problem if other code had acquired a reference above. (Unlikely, but we should try to get this ri...
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
...8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..3fd0e66 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -513,8 +513,10 @@ static int virtio_mmio_probe(struct platform_device *pdev) return -EBUSY; vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); - if (!vm_dev) - return -ENOMEM; + if (!vm_dev) { + rc = -ENOMEM; + goto free_mem; + } vm_dev->vdev.dev.parent = &pdev->dev; vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; @@ -524,14 +526,17 @@ static int vi...