From: Glauber Costa <glommer@parallels.com>
To: Feng Tang <feng.tang@intel.com>
Cc: penberg@kernel.org, linux-kernel@vger.kernel.org,
fengguang.wu@intel.com, sfr@canb.auug.org.au, linux-mm@kvack.org,
Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH] slab: Fix a tpyo in commit 8c138b "slab: Get rid of obj_size macro"
Date: Mon, 2 Jul 2012 14:00:42 +0400 [thread overview]
Message-ID: <4FF1714A.7050400@parallels.com> (raw)
In-Reply-To: <1341210550-11038-1-git-send-email-feng.tang@intel.com>
On 07/02/2012 10:29 AM, Feng Tang wrote:
> Commit 8c138b only sits in Pekka's and linux-next tree now, which tries
> to replace obj_size(cachep) with cachep->object_size, but has a typo in
> kmem_cache_free() by using "size" instead of "object_size", which casues
> some regressions.
>
> Reported-and-tested-by: Fengguang Wu <wfg@linux.intel.com>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> Cc: Christoph Lameter <cl@linux.com>
> ---
> mm/slab.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 64c3d03..605b3b7 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3890,7 +3890,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
> unsigned long flags;
>
> local_irq_save(flags);
> - debug_check_no_locks_freed(objp, cachep->size);
> + debug_check_no_locks_freed(objp, cachep->object_size);
> if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
> debug_check_no_obj_freed(objp, cachep->object_size);
> __cache_free(cachep, objp, __builtin_return_address(0));
>
I saw another bug in a patch that ended up not getting in, and was
reported to Christoph, that was exactly due to a typo between size and
object-size.
So first:
Acked-by: Glauber Costa <glommer@parallels.com>
But this also means that that confusion can have been made in other
points. I suggest we take an extensive look into that to make sure there
aren't more.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: Feng Tang <feng.tang@intel.com>
Cc: <penberg@kernel.org>, <linux-kernel@vger.kernel.org>,
<fengguang.wu@intel.com>, <sfr@canb.auug.org.au>,
<linux-mm@kvack.org>, Christoph Lameter <cl@linux.com>
Subject: Re: [PATCH] slab: Fix a tpyo in commit 8c138b "slab: Get rid of obj_size macro"
Date: Mon, 2 Jul 2012 14:00:42 +0400 [thread overview]
Message-ID: <4FF1714A.7050400@parallels.com> (raw)
In-Reply-To: <1341210550-11038-1-git-send-email-feng.tang@intel.com>
On 07/02/2012 10:29 AM, Feng Tang wrote:
> Commit 8c138b only sits in Pekka's and linux-next tree now, which tries
> to replace obj_size(cachep) with cachep->object_size, but has a typo in
> kmem_cache_free() by using "size" instead of "object_size", which casues
> some regressions.
>
> Reported-and-tested-by: Fengguang Wu <wfg@linux.intel.com>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> Cc: Christoph Lameter <cl@linux.com>
> ---
> mm/slab.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 64c3d03..605b3b7 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3890,7 +3890,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
> unsigned long flags;
>
> local_irq_save(flags);
> - debug_check_no_locks_freed(objp, cachep->size);
> + debug_check_no_locks_freed(objp, cachep->object_size);
> if (!(cachep->flags & SLAB_DEBUG_OBJECTS))
> debug_check_no_obj_freed(objp, cachep->object_size);
> __cache_free(cachep, objp, __builtin_return_address(0));
>
I saw another bug in a patch that ended up not getting in, and was
reported to Christoph, that was exactly due to a typo between size and
object-size.
So first:
Acked-by: Glauber Costa <glommer@parallels.com>
But this also means that that confusion can have been made in other
points. I suggest we take an extensive look into that to make sure there
aren't more.
next prev parent reply other threads:[~2012-07-02 10:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 6:29 [PATCH] slab: Fix a tpyo in commit 8c138b "slab: Get rid of obj_size macro" Feng Tang
2012-07-02 6:29 ` Feng Tang
2012-07-02 10:00 ` Glauber Costa [this message]
2012-07-02 10:00 ` Glauber Costa
2012-07-02 10:25 ` Glauber Costa
2012-07-02 10:25 ` Glauber Costa
2012-07-02 10:46 ` Pekka Enberg
2012-07-02 10:46 ` Pekka Enberg
2012-07-02 10:55 ` David Rientjes
2012-07-02 10:55 ` David Rientjes
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=4FF1714A.7050400@parallels.com \
--to=glommer@parallels.com \
--cc=cl@linux.com \
--cc=feng.tang@intel.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=sfr@canb.auug.org.au \
/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.