search for: kmalloc_node_track_caller

Displaying 4 results from an estimated 4 matches for "kmalloc_node_track_caller".

2017 Dec 12
1
[PATCHv2] virtio_mmio: fix devm cleanup
...c_release function is a no-op since nothing has to be done prior to memory being freed, but the memory itself is still freed. In alloc_dr(), the struct devres is allocated together with the memory, since alloc_dr() does: size_t tot_size = sizeof(struct devres) + size; struct devres *dr; dr = kmalloc_node_track_caller(tot_size, gfp, nid); return dr->data; ... where dr->data points at the memory after the struct devres. Later, in release_nodes() we do: list_for_each_entry_safe_reverse(dr, tmp, &todo, node.entry) { devres_log(dev, &dr->node, "REL"); dr->node.release(dev, dr-...
2017 Dec 12
1
[PATCHv2] virtio_mmio: fix devm cleanup
...c_release function is a no-op since nothing has to be done prior to memory being freed, but the memory itself is still freed. In alloc_dr(), the struct devres is allocated together with the memory, since alloc_dr() does: size_t tot_size = sizeof(struct devres) + size; struct devres *dr; dr = kmalloc_node_track_caller(tot_size, gfp, nid); return dr->data; ... where dr->data points at the memory after the struct devres. Later, in release_nodes() we do: list_for_each_entry_safe_reverse(dr, tmp, &todo, node.entry) { devres_log(dev, &dr->node, "REL"); dr->node.release(dev, dr-...
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 (00000000c05b4844) [ 3.460534] WARNING: CPU:
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 (00000000c05b4844) [ 3.460534] WARNING: CPU: