search for: kmem_cache_destroy

Displaying 20 results from an estimated 85 matches for "kmem_cache_destroy".

2004 Oct 07
1
kmem_cache_destroy: Can't free all objects
...FS filter that will be above the ext3 filesystem. For my own purposes I need severl bytes in inode. There are not enough space current inode so I need to create my own inode functions alloc_inode() & destroy_inode(). The problem causes when destroying slab cache at removing my module (rmmod). kmem_cache_destroy: Can't free all objects What I do: - install my module (insmod) - Mount filesystem - list the mountpoint with ls -i - cat /proc/slabinfo shows: my_ii_cache 1 7 512 1 1 1 - I make umnount - cat /proc/slabinfo shows: my_ii_cache 4 14 512 1...
2013 Jan 16
6
[PATCH V2] mm/slab: add a leak decoder callback
...(unsigned long long)eb->start, + eb->len, atomic_read(&eb->refs)); +} + int __init extent_io_init(void) { extent_state_cache = kmem_cache_create("btrfs_extent_state", @@ -115,9 +135,11 @@ void extent_io_exit(void) */ rcu_barrier(); if (extent_state_cache) - kmem_cache_destroy(extent_state_cache); + kmem_cache_destroy_decoder(extent_state_cache, + extent_state_leak_decoder); if (extent_buffer_cache) - kmem_cache_destroy(extent_buffer_cache); + kmem_cache_destroy_decoder(extent_buffer_cache, + extent_buffer_leak_decoder); } void extent_io_tree_init(...
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On 09/07/20 17:06, Xianting Tian wrote: > kmem_cache_destroy and mempool_destroy can correctly handle > null pointer parameter, so there is no need to check if the > parameter is null before calling kmem_cache_destroy and > mempool_destroy. > > Signed-off-by: Xianting Tian <xianting_tian at 126.com> > --- > drivers/scsi/virtio_sc...
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On 09/07/20 16:46, Xianting Tian wrote: > kmem_cache_destroy can correctly handle null pointer parameter, > so there is no need to check if the parameter is null before > calling kmem_cache_destroy. > > Signed-off-by: Xianting Tian <xianting_tian at 126.com> > --- > drivers/scsi/virtio_scsi.c | 6 ++---- > 1 file changed, 2 inser...
2020 Jul 10
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 10/07/20 08:32, Markus Elfring wrote: >>>> + mempool_destroy(virtscsi_cmd_pool); >>>> + virtscsi_cmd_pool = NULL; >>>> + kmem_cache_destroy(virtscsi_cmd_cache); >>>> + virtscsi_cmd_cache = NULL; >>>> return ret; >>>> } >>> >>> How do you think about to add a jump target so that the execution >>> of a few statements can be avoided according to a previous >>> null...
2020 Jul 14
0
[PATCH] scsi: virtio_scsi: remove unnecessary condition check
On Thu, 9 Jul 2020 11:06:07 -0400, Xianting Tian wrote: > kmem_cache_destroy and mempool_destroy can correctly handle > null pointer parameter, so there is no need to check if the > parameter is null before calling kmem_cache_destroy and > mempool_destroy. Applied to 5.9/scsi-queue, thanks! [1/1] scsi: virtio_scsi: Remove unnecessary condition check https:/...
2013 Nov 18
0
bridge: flush br's address entry in fdb when remove the bridge dev
When the following commands are executed: brctl addbr br0 ifconfig br0 hw ether <addr> rmmod bridge The calltrace will occur: [ 563.312114] device eth1 left promiscuous mode [ 563.312188] br0: port 1(eth1) entered disabled state [ 563.468190] kmem_cache_destroy bridge_fdb_cache: Slab cache still has objects [ 563.468197] CPU: 6 PID: 6982 Comm: rmmod Tainted: G O 3.12.0-0.7-default+ #9 [ 563.468199] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 [ 563.468200] 0000000000000880 ffff88010f111e98 ffffffff814d1c92 ffff88010f111eb8 [ 563.468204...
2013 Nov 18
0
[PATCH net] bridge: flush br's address entry in fdb when remove the bridge dev
When the following commands are executed: brctl addbr br0 ifconfig br0 hw ether <addr> rmmod bridge The calltrace will occur: [ 563.312114] device eth1 left promiscuous mode [ 563.312188] br0: port 1(eth1) entered disabled state [ 563.468190] kmem_cache_destroy bridge_fdb_cache: Slab cache still has objects [ 563.468197] CPU: 6 PID: 6982 Comm: rmmod Tainted: G O 3.12.0-0.7-default+ #9 [ 563.468199] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 [ 563.468200] 0000000000000880 ffff88010f111e98 ffffffff814d1c92 ffff88010f111eb8 [ 563.468204...
2009 Nov 23
1
NFS4 issue
...d[5199]: nfsdcb: id '-2' too big! Nov 23 10:42:25 sulphur nfsd[27306]: nfssvc: Setting version failed: errno 16 (Device or resource busy) Nov 23 10:42:25 sulphur nfsd[27306]: nfssvc: unable to bind UPD socket: errno 98 (Address already in use) Nov 23 10:42:26 sulphur kernel: slab error in kmem_cache_destroy(): cache `nfsd4_files': Can't free all objects Nov 23 10:42:26 sulphur kernel: [<ffffffff88645efd>] :nfsd:nfsd4_free_slab+0x11/0x4d Nov 23 10:42:26 sulphur kernel: [<ffffffff88645f55>] :nfsd:nfsd4_free_slabs+0x1c/0x33 Nov 23 10:42:26 sulphur kernel: [<ffffffff88646ecb&g...
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- drivers/scsi/virtio_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@
2012 Nov 02
1
[PATCH] ocfs2:fix memory leak in dlm_add_migration_mle
After some parallel mount/umount test on ocfs2, we got this: slab error in kmem_cache_destroy(): cache `o2dlm_mle': Can't free all objects. Then we found a memleak situation in dlm_add_migration_mle(). When a mle found, it will be removed from dlm->hlist. If there is no pointer to it at that moment, the mle will become an ?orphan mle? that no process can find and release. Signe...
2020 Feb 07
0
[RFC PATCH v7 47/78] KVM: introspection: add a jobs list to every introspected vCPU
...44 --- a/virt/kvm/introspection/kvmi.c +++ b/virt/kvm/introspection/kvmi.c @@ -10,6 +10,7 @@ #include <linux/kthread.h> static struct kmem_cache *msg_cache; +static struct kmem_cache *job_cache; void *kvmi_msg_alloc(void) { @@ -33,14 +34,19 @@ static void kvmi_cache_destroy(void) { kmem_cache_destroy(msg_cache); msg_cache = NULL; + kmem_cache_destroy(job_cache); + job_cache = NULL; } static int kvmi_cache_create(void) { msg_cache = kmem_cache_create("kvmi_msg", KVMI_MSG_SIZE_ALLOC, 4096, SLAB_ACCOUNT, NULL); + job_cache = kmem_cache_create("kvmi_job", +...
2013 Jan 14
5
[PATCH] mm/slab: add a leak decoder callback
This adds a leak decoder callback so that kmem_cache_destroy() can use to generate debugging output for the allocated objects. Callers like btrfs are using their own leak tracking which will manage allocated objects in a list(or something else), this does indeed the same thing as what slab does. So adding a callback for leak tracking can avoid this as well...
2019 Aug 09
0
[RFC PATCH v6 27/92] kvm: introspection: use page track
...L, m); + + radix_tree_iter_delete(&ikvm->access_tree, &iter, slot); + kmem_cache_free(radix_cache, m); + } + + write_unlock(&ikvm->access_tree_lock); + spin_unlock(&kvm->mmu_lock); + srcu_read_unlock(&kvm->srcu, idx); +} + static void kvmi_cache_destroy(void) { kmem_cache_destroy(msg_cache); msg_cache = NULL; + kmem_cache_destroy(radix_cache); + radix_cache = NULL; kmem_cache_destroy(job_cache); job_cache = NULL; } static int kvmi_cache_create(void) { + radix_cache = kmem_cache_create("kvmi_radix_tree", + sizeof(struct kvmi_mem_access), + 0, SLA...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
...p;vgdev->free_vbufs))) { - spin_unlock(&vgdev->free_vbufs_lock); - return; - } - vbuf = list_first_entry(&vgdev->free_vbufs, - struct virtio_gpu_vbuffer, list); - list_del(&vbuf->list); - } - spin_unlock(&vgdev->free_vbufs_lock); - kfree(vgdev->vbufs); + kmem_cache_destroy(vgdev->vbufs); + vgdev->vbufs = NULL; } static struct virtio_gpu_vbuffer* @@ -128,12 +96,9 @@ void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev) { struct virtio_gpu_vbuffer *vbuf; - spin_lock(&vgdev->free_vbufs_lock); - BUG_ON(list_empty(&vgdev->free_vbufs)); -...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
...p;vgdev->free_vbufs))) { - spin_unlock(&vgdev->free_vbufs_lock); - return; - } - vbuf = list_first_entry(&vgdev->free_vbufs, - struct virtio_gpu_vbuffer, list); - list_del(&vbuf->list); - } - spin_unlock(&vgdev->free_vbufs_lock); - kfree(vgdev->vbufs); + kmem_cache_destroy(vgdev->vbufs); + vgdev->vbufs = NULL; } static struct virtio_gpu_vbuffer* @@ -128,12 +96,9 @@ void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev) { struct virtio_gpu_vbuffer *vbuf; - spin_lock(&vgdev->free_vbufs_lock); - BUG_ON(list_empty(&vgdev->free_vbufs)); -...
2020 Jul 09
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 09/07/20 19:16, Markus Elfring wrote: >> + mempool_destroy(virtscsi_cmd_pool); >> + virtscsi_cmd_pool = NULL; >> + kmem_cache_destroy(virtscsi_cmd_cache); >> + virtscsi_cmd_cache = NULL; >> return ret; >> } > > How do you think about to add a jump target so that the execution > of a few statements can be avoided according to a previous > null pointer check? The point of the patch is precisely to...
2020 Jul 21
0
[PATCH v9 77/84] KVM: introspection: add KVMI_VM_SET_PAGE_ACCESS
...ache; static struct kmem_cache *job_cache; +static struct kmem_cache *radix_cache; + +static const u8 full_access = KVMI_PAGE_ACCESS_R | + KVMI_PAGE_ACCESS_W | + KVMI_PAGE_ACCESS_X; void *kvmi_msg_alloc(void) { @@ -39,6 +44,8 @@ static void kvmi_cache_destroy(void) msg_cache = NULL; kmem_cache_destroy(job_cache); job_cache = NULL; + kmem_cache_destroy(radix_cache); + radix_cache = NULL; } static int kvmi_cache_create(void) @@ -48,8 +55,11 @@ static int kvmi_cache_create(void) job_cache = kmem_cache_create("kvmi_job", sizeof(struct kvmi_job), 0, SLAB_ACCOUN...
2013 Oct 08
1
OT: errors compiling kernel module as a rpm package
...= 0x8e0b7743 kernel(jiffies) = 0x7d11c268 kernel(jiffies_to_msecs) = 0x37befc70 kernel(kernel_bind) = 0x957e225b kernel(kfree) = 0x037a0cba kernel(kfree_skb) = 0x3d75cbcf kernel(kmem_cache_alloc) = 0xee065ced kernel(kmem_cache_alloc_trace) = 0x2044fa9e kernel(kmem_cache_create) = 0xe4a639f8 kernel(kmem_cache_destroy) = 0x806e575f kernel(kmem_cache_free) = 0x7329e40d kernel(ksize) = 0xa0d3d560 kernel(kthread_create) = 0xc185e3ce kernel(kthread_should_stop) = 0xd2965f6f kernel(kthread_stop) = 0xcf08c5b6 kernel(ktime_get_ts) = 0xefdd5a63 kernel(list_del) = 0x0521445b kernel(local_bh_disable) = 0x3ff62317 kernel(l...