search for: kmem_cache_cr

Displaying 20 results from an estimated 107 matches for "kmem_cache_cr".

Did you mean: kmem_cache_t
2007 Apr 18
1
[Bridge] [PATCH] bridge: check kmem_cache_create() error
This patch checks kmem_cache_create() error and aborts loading module on failure. Cc: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> --- net/bridge/br.c | 7 ++++++- net/bridge/br_fdb.c | 4 +++- net/bridge/br_private.h | 2 +- 3 files c...
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
...(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/slab.h> #include <linux/mempool.h> @@ -771,8 +773,7 @@ static int __init init(void) virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); if (!virtscsi_cmd_cache) { - printk(KERN_ERR "kmem_cache_create() for " - "virtscsi_cmd_cache failed\n"); + pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); goto error; } @@ -781,8 +782,7 @@ static int __init init(void) mempool_create_slab_pool(VIRTIO_SCSI_MEMPOOL_SZ, virtscsi_cmd_cache); if (!vi...
2013 Mar 07
3
[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()
...(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/slab.h> #include <linux/mempool.h> @@ -771,8 +773,7 @@ static int __init init(void) virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); if (!virtscsi_cmd_cache) { - printk(KERN_ERR "kmem_cache_create() for " - "virtscsi_cmd_cache failed\n"); + pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); goto error; } @@ -781,8 +782,7 @@ static int __init init(void) mempool_create_slab_pool(VIRTIO_SCSI_MEMPOOL_SZ, virtscsi_cmd_cache); if (!vi...
2013 Jan 16
6
[PATCH V2] mm/slab: add a leak decoder callback
...bject) +{ + struct extent_buffer *eb = object; + + printk(KERN_ERR "btrfs buffer leak start %llu len %lu " + "refs %d\n", (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_ca...
2013 Jan 14
5
[PATCH] mm/slab: add a leak decoder callback
...bject) +{ + struct extent_buffer *eb = object; + + printk(KERN_ERR "btrfs buffer leak start %llu len %lu " + "refs %d\n", (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", @@ -71,11 +91,15 @@ int __init extent_io_init(void) if (!extent_state_cache) return -ENOMEM; + extent_state_cache->decoder = extent_state_leak_decoder; + extent_buffer_cache = kmem_cache_create("btrfs_extent_buffer", sizeof(struct extent...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...d, 25 insertions(+), 12 deletions(-) > (...) > @@ -295,12 +303,12 @@ unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, > } > EXPORT_SYMBOL(airq_iv_scan); > > -static int __init airq_init(void) > +int __init airq_init(void) > { > - airq_iv_cache = kmem_cache_create("airq_iv_cache", cache_line_size(), > - cache_line_size(), 0, NULL); > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > + cache_line_size(), > + cache_line_size(), PAGE_SIZE); > if (!airq_iv_cache) > return -ENO...
2019 Jun 11
2
[PATCH v4 4/8] s390/airq: use DMA memory for adapter interrupts
...d, 25 insertions(+), 12 deletions(-) > (...) > @@ -295,12 +303,12 @@ unsigned long airq_iv_scan(struct airq_iv *iv, unsigned long start, > } > EXPORT_SYMBOL(airq_iv_scan); > > -static int __init airq_init(void) > +int __init airq_init(void) > { > - airq_iv_cache = kmem_cache_create("airq_iv_cache", cache_line_size(), > - cache_line_size(), 0, NULL); > + airq_iv_cache = dma_pool_create("airq_iv_cache", cio_get_dma_css_dev(), > + cache_line_size(), > + cache_line_size(), PAGE_SIZE); > if (!airq_iv_cache) > return -ENO...
2020 Feb 07
0
[RFC PATCH v7 47/78] KVM: introspection: add a jobs list to every introspected vCPU
...che; +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", + sizeof(struct kvmi_job), + 0, SLAB_ACCOUNT, NULL); - if (!msg_cache) { + if (!msg_cache || !job_cache) { kvmi_cache_destroy(); ret...
2019 Aug 09
0
[RFC PATCH v6 27/92] kvm: introspection: use page track
...nlock(&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, SLAB_ACCOUNT, NULL); job_cache = kmem_cache_create("kvmi_job", sizeof(struct kvmi_job), 0, SLAB_ACCOUNT, NULL); msg_cache = kmem_cache_create("kvmi_msg", KVMI_MSG_SIZE_ALLOC...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
..._size(vgdev->ctrlq.vq); - count += virtqueue_get_vring_size(vgdev->cursorq.vq); - size = count * VBUFFER_SIZE; - DRM_INFO("virtio vbuffers: %d bufs, %zdB each, %dkB total.\n", - count, VBUFFER_SIZE, size / 1024); - - vgdev->vbufs = kzalloc(size, GFP_KERNEL); + vgdev->vbufs = kmem_cache_create("virtio-gpu-vbufs", + VBUFFER_SIZE, + __alignof__(struct virtio_gpu_vbuffer), + 0, NULL); if (!vgdev->vbufs) return -ENOMEM; - - for (i = 0, ptr = vgdev->vbufs; - i < count; - i++, ptr += VBUFFER_SIZE) { - vbuf = ptr; - list_add(&vbuf->l...
2017 Mar 01
2
[PATCH] drm: virtio: use kmem_cache
..._size(vgdev->ctrlq.vq); - count += virtqueue_get_vring_size(vgdev->cursorq.vq); - size = count * VBUFFER_SIZE; - DRM_INFO("virtio vbuffers: %d bufs, %zdB each, %dkB total.\n", - count, VBUFFER_SIZE, size / 1024); - - vgdev->vbufs = kzalloc(size, GFP_KERNEL); + vgdev->vbufs = kmem_cache_create("virtio-gpu-vbufs", + VBUFFER_SIZE, + __alignof__(struct virtio_gpu_vbuffer), + 0, NULL); if (!vgdev->vbufs) return -ENOMEM; - - for (i = 0, ptr = vgdev->vbufs; - i < count; - i++, ptr += VBUFFER_SIZE) { - vbuf = ptr; - list_add(&vbuf->l...
2017 Jan 26
1
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...tach_transport(&virtscsi_fc_template); > + if (!virtscsi_fc_transport_template) { > + pr_err("fc_attach_transport() failed\n"); > + goto error; > + } > + > virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); > if (!virtscsi_cmd_cache) { > pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); > @@ -1176,6 +1233,7 @@ static int __init init(void) > > static void __exit fini(void) > { > + fc_release_transport(virtscsi_fc_transport_template); > unregister_virtio_driver(&virtio_scsi_driver); > cpuhp_remove_multi_s...
2017 Jan 26
1
[PATCH v2 2/2] virtio_scsi: Implement fc_host
...tach_transport(&virtscsi_fc_template); > + if (!virtscsi_fc_transport_template) { > + pr_err("fc_attach_transport() failed\n"); > + goto error; > + } > + > virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0); > if (!virtscsi_cmd_cache) { > pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); > @@ -1176,6 +1233,7 @@ static int __init init(void) > > static void __exit fini(void) > { > + fc_release_transport(virtscsi_fc_transport_template); > unregister_virtio_driver(&virtio_scsi_driver); > cpuhp_remove_multi_s...
2005 Sep 09
4
Problem with MTU > 1500, ifconfig segmentation fault
Hi all, I am using Xen 2.0.7. I have Broadcom NetXtreme BCM5704 Gigabit Ethernet (rev 02) cards which support frames greater than 1500. However when I boot into Xen and try to set the MTU to anything higher than 1500 (e.g., 4000, 8000 etc) I get a segmentation fault. After this fault, every command fails with a segmentation fault. I saw a similar bug report posted here:
2017 Jan 26
6
[PATCH v2 0/2] virtio-scsi: Implement FC_HOST feature
v2: Fix endianness of WWNN/WWPN. [Paolo] This series implements the proposed fc_host feature of virtio-scsi. The first patch updates the data structure changes according to the spec proposal; the second patch actually implements the operations. Fam Zheng (2): virtio_scsi: Add fc_host definitions virtio_scsi: Implement fc_host drivers/scsi/virtio_scsi.c | 60
2017 Jan 26
6
[PATCH v2 0/2] virtio-scsi: Implement FC_HOST feature
v2: Fix endianness of WWNN/WWPN. [Paolo] This series implements the proposed fc_host feature of virtio-scsi. The first patch updates the data structure changes according to the spec proposal; the second patch actually implements the operations. Fam Zheng (2): virtio_scsi: Add fc_host definitions virtio_scsi: Implement fc_host drivers/scsi/virtio_scsi.c | 60
2020 Jul 10
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
...> https://elixir.bootlin.com/linux/v5.8-rc4/source/drivers/scsi/virtio_scsi.c#L980 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/virtio_scsi.c?id=42f82040ee66db13525dc6f14b8559890b2f4c1c#n980 > > if (!virtscsi_cmd_cache) { > pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); > - goto error; > + return -ENOMEM; > } Could be doable, but I don't see a particular benefit. Having a single error loop is an advantage by itself. The coding style is a suggestion. Note the difference between kfree(foo->bar);...
2020 Jul 10
0
[PATCH] scsi: virtio_scsi: Remove unnecessary condition checks
On 10/07/20 09:40, Markus Elfring wrote: >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/virtio_scsi.c?id=42f82040ee66db13525dc6f14b8559890b2f4c1c#n980 >>> >>> if (!virtscsi_cmd_cache) { >>> pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n"); >>> - goto error; >>> + return -ENOMEM; >>> } >> >> Could be doable, but I don't see a particular benefit. > > Can a bit more ?compliance? (with the Linux coding style) matter here? No. >> Ha...
2007 Feb 08
0
[PATCH] linux: move back skb_pull_rcsum
...f *skb, unsigned int len) -{ - BUG_ON(len > skb->len); - skb->len -= len; - BUG_ON(skb->len < skb->data_len); - skb_postpull_rcsum(skb, skb->data, len); - return skb->data += len; -} - -EXPORT_SYMBOL_GPL(skb_pull_rcsum); - void __init skb_init(void) { skbuff_head_cache = kmem_cache_create("skbuff_head_cache", _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2001 Jul 20
3
ext2resize for Ext3
Hi. What is the state of ext2resize for Ext3? How about the online-ext3-patch? Regards, Christian -- * Christian A. Lademann, ZLS Software GmbH mailto:lademann@zls.de * ZLS Software GmbH * Frankfurter Strasse 59 Postfach 1628 mailto:zls@zls.de * D-65779 Kelkheim D-65766 Kelkheim http://www.zls.de * Telefon +49-6195-9902-0 Telefax