Commit:     9550b105b8646f916862aee3ab7b25020ca14159
Parent:     a5c96d8a1c67f31ef48935a78da2d2076513842b
Author:     Linus Torvalds <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 13:21:34 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 13:21:34 2007 -0700

    slub: fix ksize() for zero-sized pointers
    The slab and slob allocators already did this right, but slub would call
    "get_object_page()" on the magic ZERO_SIZE_PTR, with all kinds of nasty
    end results.
    Noted by Ingo Molnar.
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Christoph Lameter <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 mm/slub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 52a4f44..322f3a5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2394,7 +2394,7 @@ size_t ksize(const void *object)
        struct page *page;
        struct kmem_cache *s;
-       if (object == ZERO_SIZE_PTR)
+       if (ZERO_OR_NULL_PTR(object))
                return 0;
        page = get_object_page(object);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to