Re: [BUG] NULL pointer dereference in dev_get_drvdata

From: Justin P. Mattock
Date: Thu Mar 31 2011 - 11:42:01 EST


On 03/31/2011 02:16 AM, Florian Mickler wrote:
On Wed, 30 Mar 2011 08:47:25 -0700
"Justin P. Mattock"<justinmattock@xxxxxxxxx> wrote:



strange thing with this, is one instance my screen went black, then
something similar showed up on screen but then the screen kind of went
back to normal(was able to move the mouse, but most of everything was
frozen), another instance was shutting down the system pics are here:

http://www.flickr.com/photos/44066293@N08/5573957179/
http://www.flickr.com/photos/44066293@N08/5574543648/
(not the best camara used)

this does not fire off all the time, but it does.
(I will keep my eye out with this one).

Justin P. Mattock


even with that resolution (240x320, that's a joke, right? do I need to
login or something like that?) I see that your stacktrace is
different.

yeah... the iphone is only capable of so good of a picture.


The stacktrace is the cascade of function-calls that lead to the
execution of the current code. A null-pointer in the driver-core
normally means that someone on the calling site did something wrong.
So in order to fix the bug, you have to look at the stack trace and
check how that null pointer got handed down to that function.


this was(I think) similar but not the same as dev_get_drvdata
(all I know is this has fired off from time to time).

If you have 2 drivers. Both seperately calling the same function with a
nullpointer you have 2 seperate issues that trigger the same thing
(null pointer exception) in the same function. so it is not sufficient
to look at where the bug happened, you also need to check what is the
cause.

Regards,
Flo

two drivers calling the same function(sounds bad!) this would be a race condition right?

As for this message I will keep my eye out for anything in this area and report it to you guys.

Justin P. Mattock
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/