From: poma <pomidorabelisima-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
Vladimir Davydov
<vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mailing-List fedora-kernel
<kernel-TuqUDEhatI4ANWPb/1PvSmm0pvjS0E/A@public.gmane.org>,
Linux Kernel list
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
James Bottomley
<JBottomley-MU7nAjRaF3makBO8gow8eQ@public.gmane.org>,
Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Subject: Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
Date: Fri, 18 Jul 2014 22:01:56 +0200 [thread overview]
Message-ID: <53C97D34.5040707@gmail.com> (raw)
In-Reply-To: <20140718141747.GA23272-jcswGhMUV9g@public.gmane.org>
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 int users;
- char *cmd_name;
+ char *proc_name;
char *sense_name;
unsigned int slab_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
_______________________________________________
kernel mailing list
kernel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel
WARNING: multiple messages have this Message-ID (diff)
From: poma <pomidorabelisima@gmail.com>
To: Christoph Hellwig <hch@lst.de>,
Vladimir Davydov <vdavydov@parallels.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
Christoph Lameter <cl@linux.com>,
Mailing-List fedora-kernel <kernel@lists.fedoraproject.org>,
Paolo Bonzini <pbonzini@redhat.com>,
James Bottomley <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org
Subject: Re: WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330()
Date: Fri, 18 Jul 2014 22:01:56 +0200 [thread overview]
Message-ID: <53C97D34.5040707@gmail.com> (raw)
In-Reply-To: <20140718141747.GA23272@lst.de>
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 int users;
- char *cmd_name;
+ char *proc_name;
char *sense_name;
unsigned int slab_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
next prev parent reply other threads:[~2014-07-18 20:01 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <53C8DF7F.5060707@gmail.com>
2014-07-18 10:57 ` WARNING: CPU: 1 PID: 495 at mm/slab_common.c:69 kmem_cache_create+0x1a9/0x330() poma
2014-07-18 13:21 ` Vladimir Davydov
2014-07-18 13:21 ` Vladimir Davydov
2014-07-18 14:17 ` Christoph Hellwig
2014-07-18 14:17 ` Christoph Hellwig
[not found] ` <20140718141747.GA23272-jcswGhMUV9g@public.gmane.org>
2014-07-18 20:01 ` poma [this message]
2014-07-18 20:01 ` poma
2014-07-18 20:07 ` James Bottomley
2014-07-18 20:16 ` poma
[not found] ` <53C9808F.5040906-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-18 21:32 ` poma
2014-07-18 21:32 ` poma
2014-07-19 16:44 ` Christoph Hellwig
[not found] ` <20140719164454.GA24530-jcswGhMUV9g@public.gmane.org>
2014-07-21 9:39 ` poma
2014-07-21 9:39 ` poma
[not found] ` <53CCDFC3.5010802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-21 14:58 ` Christoph Hellwig
2014-07-21 14:58 ` Christoph Hellwig
[not found] ` <20140721145817.GA15433-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-07-21 15:38 ` poma
2014-07-21 15:38 ` poma
2014-07-26 16:21 ` Christoph Hellwig
2014-07-26 16:21 ` Christoph Hellwig
2014-07-26 16:44 ` Martin K. Petersen
2014-07-27 8:09 ` Vladimir Davydov
2014-07-27 8:09 ` Vladimir Davydov
2014-07-28 7:49 ` James Bottomley
2014-07-29 12:26 ` Christoph Hellwig
[not found] ` <20140729122611.GA25980-jcswGhMUV9g@public.gmane.org>
2014-07-29 23:25 ` poma
2014-07-29 23:25 ` poma
2014-07-30 12:21 ` Josh Boyer
2014-07-30 12:21 ` Josh Boyer
[not found] ` <20140730122135.GE28613-dHPIJuKSOV01V+h/cAXI7w8O6CCKKCg3HZ5vskTnxNA@public.gmane.org>
2014-07-30 14:52 ` Christoph Hellwig
2014-07-30 14:52 ` Christoph Hellwig
2014-07-30 15:04 ` James Bottomley
2014-07-30 15:04 ` James Bottomley
2014-07-30 16:15 ` Christoph Hellwig
2014-07-30 17:22 ` Mike Christie
2014-07-30 17:59 ` Christoph Hellwig
[not found] ` <20140730175958.GA30976-jcswGhMUV9g@public.gmane.org>
2014-07-31 13:02 ` James Bottomley
2014-07-31 13:02 ` James Bottomley
2014-07-18 14:20 ` Christoph Lameter
2014-07-18 20:03 ` poma
2014-07-18 21:35 ` poma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53C97D34.5040707@gmail.com \
--to=pomidorabelisima-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=JBottomley-MU7nAjRaF3makBO8gow8eQ@public.gmane.org \
--cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=kernel-TuqUDEhatI4ANWPb/1PvSmm0pvjS0E/A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.