[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTimfpRwsBUWcoNA1uDb8QfQP6USKEA@mail.gmail.com>
Date: Mon, 11 Apr 2011 10:48:08 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Rafał Miłecki <zajec5@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andy Botting <andy@...ybotting.com>
Subject: Re: Crash with kfree(null) on MacBook? kobject_set_name_vargs
2011/4/11 Linus Torvalds <torvalds@...ux-foundation.org>:
>
> prints out NULL is because the string printout code does this:
>
> if ((unsigned long)s < PAGE_SIZE)
> s = "(null)";
>
> which admittedly is not very helpful in this case (but it's usually
> nicer than just oopsing).
You could try this (UNTESTED!) patch to avoid this particular issue.
It will (well, unless I screwed up) print non-NULL pointers as the hex
value they have. So you should see "0x202" instead of "(null)" in that
case.
Of course, it sounds like _you_ don't actually see the bug at all,
because for you it probably really _is_ NULL. The people who see the
bug have some random non-null value, probably because of the field
just not being initialized properly, and containing some crud.
Linus
View attachment "patch.diff" of type "text/x-patch" (577 bytes)
Powered by blists - more mailing lists