* [PATCH] slub: fix confusing error messages in check_slab
@ 2014-11-24 15:06 Min-Hua Chen
2014-11-24 17:17 ` Christoph Lameter
0 siblings, 1 reply; 4+ messages in thread
From: Min-Hua Chen @ 2014-11-24 15:06 UTC (permalink / raw)
To: Christoph Lameter, Pekka Enberg, David Rientjes, Joonsoo Kim,
Andrew Morton
Cc: linux-kernel, linux-mm
In check_slab, s->name is passed incorrectly to the error
messages. It will cause confusing error messages if the object
check fails. This patch fix this bug by removing s->name.
Signed-off-by: Min-Hua Chen <orca.chen@gmail.com>
---
mm/slub.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index ae7b9f1..5da9f9f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -849,12 +849,12 @@ static int check_slab(struct kmem_cache *s,
struct page *page)
maxobj = order_objects(compound_order(page), s->size, s->reserved);
if (page->objects > maxobj) {
slab_err(s, page, "objects %u > max %u",
- s->name, page->objects, maxobj);
+ page->objects, maxobj);
return 0;
}
if (page->inuse > page->objects) {
slab_err(s, page, "inuse %u > max %u",
- s->name, page->inuse, page->objects);
+ page->inuse, page->objects);
return 0;
}
/* Slab_pad_check fixes things up after itself */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] slub: fix confusing error messages in check_slab
2014-11-24 15:06 [PATCH] slub: fix confusing error messages in check_slab Min-Hua Chen
@ 2014-11-24 17:17 ` Christoph Lameter
2014-11-24 17:40 ` Andrey Ryabinin
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Lameter @ 2014-11-24 17:17 UTC (permalink / raw)
To: Min-Hua Chen
Cc: Pekka Enberg, David Rientjes, Joonsoo Kim, Andrew Morton,
linux-kernel, linux-mm
On Mon, 24 Nov 2014, Min-Hua Chen wrote:
> In check_slab, s->name is passed incorrectly to the error
> messages. It will cause confusing error messages if the object
> check fails. This patch fix this bug by removing s->name.
I have seen a patch like thios before.
Acked-by: Christoph Lameter <cl@linux.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] slub: fix confusing error messages in check_slab
2014-11-24 17:17 ` Christoph Lameter
@ 2014-11-24 17:40 ` Andrey Ryabinin
2014-11-24 21:37 ` David Rientjes
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Ryabinin @ 2014-11-24 17:40 UTC (permalink / raw)
To: Christoph Lameter
Cc: Min-Hua Chen, Pekka Enberg, David Rientjes, Joonsoo Kim,
Andrew Morton, linux-kernel, linux-mm
2014-11-24 20:17 GMT+03:00 Christoph Lameter <cl@linux.com>:
> On Mon, 24 Nov 2014, Min-Hua Chen wrote:
>
>> In check_slab, s->name is passed incorrectly to the error
>> messages. It will cause confusing error messages if the object
>> check fails. This patch fix this bug by removing s->name.
>
> I have seen a patch like thios before.
>
It's in -mm already
http://ozlabs.org/~akpm/mmotm/broken-out/mm-slub-fix-format-mismatches-in-slab_err-callers.patch
> Acked-by: Christoph Lameter <cl@linux.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] slub: fix confusing error messages in check_slab
2014-11-24 17:40 ` Andrey Ryabinin
@ 2014-11-24 21:37 ` David Rientjes
0 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2014-11-24 21:37 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: Christoph Lameter, Min-Hua Chen, Pekka Enberg, Joonsoo Kim,
Andrew Morton, linux-kernel, linux-mm
On Mon, 24 Nov 2014, Andrey Ryabinin wrote:
> It's in -mm already
> http://ozlabs.org/~akpm/mmotm/broken-out/mm-slub-fix-format-mismatches-in-slab_err-callers.patch
>
Yeah, and the one in -mm isn't whitespace damaged. Since the issue has
existed for years, I don't think there's any rush in getting this in 3.18.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-24 21:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24 15:06 [PATCH] slub: fix confusing error messages in check_slab Min-Hua Chen
2014-11-24 17:17 ` Christoph Lameter
2014-11-24 17:40 ` Andrey Ryabinin
2014-11-24 21:37 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).