Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
On 29.07.2014 14:26, Christoph Hellwig wrote: On Mon, Jul 28, 2014 at 11:49:22AM +0400, James Bottomley wrote: That needs to be From: James Bottomley jbottom...@parallels.com As well. I do list handling on hansenpartnership.com to minimise exchange wreckage on mailinglists, but I should acknowledge Parallels as supporting the work I do. Thanks, I've update the author, added a Cc to ћtable and pushed it out to the core-for-3.17 branch. Thanks guys! Ref. http://git.infradead.org/users/hch/scsi-queue.git/patch/884ffee?hp=16acf5d poma -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
On 19.07.2014 18:44, Christoph Hellwig wrote: On Fri, Jul 18, 2014 at 01:07:26PM -0700, James Bottomley wrote: Is this what you thought? No, he means this, if you want to try it. Yes, that's what I mean. Thanks for the tip. Is there a patch somewhere? poma -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
On 21.07.2014 16:58, Christoph Hellwig wrote: On Mon, Jul 21, 2014 at 11:39:15AM +0200, poma wrote: Thanks for the tip. Is there a patch somewhere? James sent the patch earlier and you replied to it. Yea I could be more precise. :) What I thought, is the patch pushed in some official repo and officially approved? I guess that's the only way to achieve validity. poma -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
On 18.07.2014 16:17, Christoph Hellwig wrote: On Fri, Jul 18, 2014 at 05:21:04PM +0400, Vladimir Davydov wrote: Slab warns, because the name of the cache being created contains spaces. The bad cache is created by scsi_get_host_cmd_pool. Its name (pool-cmd_name) is initialized by scsi_alloc_host_cmd_pool as follows: pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); So, if hostt-name contains spaces, the cache name will also contain spaces and we'll get the warning. And hostt-name can contain spaces, e.g. virtscsi_host_template_single.name=Virtio SCSI HBA. Or might not even be present. I'll send a patch to replace it with -proc_name, which must not contain spaces and is generally shorter as well. Is this what you thought? @@ -148,20 +148,20 @@ struct kmem_cache *cmd_slab; struct kmem_cache *sense_slab; unsigned intusers; - char*cmd_name; + char*proc_name; char*sense_name; unsigned intslab_flags; gfp_t gfp_mask; }; static struct scsi_host_cmd_pool scsi_cmd_pool = { - .cmd_name = scsi_cmd_cache, + .proc_name = scsi_cmd_cache, .sense_name = scsi_sense_cache, .slab_flags = SLAB_HWCACHE_ALIGN, }; static struct scsi_host_cmd_pool scsi_cmd_dma_pool = { - .cmd_name = scsi_cmd_cache(DMA), + .proc_name = scsi_cmd_cache(DMA), .sense_name = scsi_sense_cache(DMA), .slab_flags = SLAB_HWCACHE_ALIGN|SLAB_CACHE_DMA, .gfp_mask = __GFP_DMA, @@ -354,7 +354,7 @@ scsi_free_host_cmd_pool(struct scsi_host_cmd_pool *pool) { kfree(pool-sense_name); - kfree(pool-cmd_name); + kfree(pool-proc_name); kfree(pool); } @@ -368,9 +368,9 @@ if (!pool) return NULL; - pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); + pool-proc_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-name); - if (!pool-cmd_name || !pool-sense_name) { + if (!pool-proc_name || !pool-sense_name) { scsi_free_host_cmd_pool(pool); return NULL; } @@ -403,7 +403,7 @@ } if (!pool-users) { - pool-cmd_slab = kmem_cache_create(pool-cmd_name, cmd_size, 0, + pool-cmd_slab = kmem_cache_create(pool-proc_name, cmd_size, 0, pool-slab_flags, NULL); if (!pool-cmd_slab) goto out_free_pool; however ain't workin. poma -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
On 18.07.2014 22:07, James Bottomley wrote: On Fri, 2014-07-18 at 22:01 +0200, poma wrote: On 18.07.2014 16:17, Christoph Hellwig wrote: On Fri, Jul 18, 2014 at 05:21:04PM +0400, Vladimir Davydov wrote: Slab warns, because the name of the cache being created contains spaces. The bad cache is created by scsi_get_host_cmd_pool. Its name (pool-cmd_name) is initialized by scsi_alloc_host_cmd_pool as follows: pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); So, if hostt-name contains spaces, the cache name will also contain spaces and we'll get the warning. And hostt-name can contain spaces, e.g. virtscsi_host_template_single.name=Virtio SCSI HBA. Or might not even be present. I'll send a patch to replace it with -proc_name, which must not contain spaces and is generally shorter as well. Is this what you thought? No, he means this, if you want to try it. James --- diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 88d46fe..eb07a9b 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -368,8 +368,8 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost) if (!pool) return NULL; - pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); - pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-name); + pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-proc_name); + pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-proc_name); if (!pool-cmd_name || !pool-sense_name) { scsi_free_host_cmd_pool(pool); return NULL; Man, I just now read it correctly - So, if hostt-name contains spaces. Thanks. I'll be back. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
On 18.07.2014 22:16, poma wrote: On 18.07.2014 22:07, James Bottomley wrote: On Fri, 2014-07-18 at 22:01 +0200, poma wrote: On 18.07.2014 16:17, Christoph Hellwig wrote: On Fri, Jul 18, 2014 at 05:21:04PM +0400, Vladimir Davydov wrote: Slab warns, because the name of the cache being created contains spaces. The bad cache is created by scsi_get_host_cmd_pool. Its name (pool-cmd_name) is initialized by scsi_alloc_host_cmd_pool as follows: pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); So, if hostt-name contains spaces, the cache name will also contain spaces and we'll get the warning. And hostt-name can contain spaces, e.g. virtscsi_host_template_single.name=Virtio SCSI HBA. Or might not even be present. I'll send a patch to replace it with -proc_name, which must not contain spaces and is generally shorter as well. Is this what you thought? No, he means this, if you want to try it. James --- diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 88d46fe..eb07a9b 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -368,8 +368,8 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost) if (!pool) return NULL; - pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-name); - pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-name); + pool-cmd_name = kasprintf(GFP_KERNEL, %s_cmd, hostt-proc_name); + pool-sense_name = kasprintf(GFP_KERNEL, %s_sense, hostt-proc_name); if (!pool-cmd_name || !pool-sense_name) { scsi_free_host_cmd_pool(pool); return NULL; Man, I just now read it correctly - So, if hostt-name contains spaces. Thanks. I'll be back. Yea, I can confirm it works! :) No warnings. poma -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html