From: Nick Piggin <npiggin@suse.de>
To: Pekka Enberg <penberg@cs.helsinki.fi>,
Linux Memory Management List <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [patch 1/2] slqb: fix small zero size alloc bug
Date: Tue, 3 Feb 2009 14:55:59 +0100 [thread overview]
Message-ID: <20090203135559.GA8723@wotan.suse.de> (raw)
Fix a problem where SLQB did not correctly return ZERO_SIZE_PTR for a
zero sized allocation.
Signed-off-by: Nick Piggin <npiggin@suse.de>
---
include/linux/slqb_def.h | 2 +-
mm/slqb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/include/linux/slqb_def.h
===================================================================
--- linux-2.6.orig/include/linux/slqb_def.h
+++ linux-2.6/include/linux/slqb_def.h
@@ -237,7 +237,7 @@ static __always_inline struct kmem_cache
index = kmalloc_index(size);
if (unlikely(index == 0))
- return NULL;
+ return ZERO_SIZE_PTR;
if (likely(!(flags & SLQB_DMA)))
return &kmalloc_caches[index];
--
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>
next reply other threads:[~2009-02-03 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 13:55 Nick Piggin [this message]
2009-02-03 14:07 ` [patch 2/2] slqb: dynamic array allocations Nick Piggin
2009-02-03 14:27 ` Pekka Enberg
2009-02-03 14:24 ` [patch 1/2] slqb: fix small zero size alloc bug Pekka Enberg
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=20090203135559.GA8723@wotan.suse.de \
--to=npiggin@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox