[Intel-gfx] [PATCH] drm/i915: fix possible null pointer dereference

Daniel Vetter daniel at ffwll.ch
Mon Jul 20 07:23:57 PDT 2015


On Mon, Jul 20, 2015 at 06:58:32PM +0530, Sudip Mukherjee wrote:
> On Mon, Jul 20, 2015 at 01:38:46PM +0100, Chris Wilson wrote:
> > On Mon, Jul 20, 2015 at 05:59:29PM +0530, Sudip Mukherjee wrote:
> > > We were dereferencing dev first and then checking if it is NULL. Lets
> > > check for NULL first and then dereference.
> > 
> > The code is bonkers. Testing for a lack of a correctly constructed
> > debugfs seq_file inside the debugfs seq_file callback is inane.
> I missed seeing before sending this patch that there are some more
> places where this has been done.
> Then are you suggesting to remove the test?

It's all been added for the tp validation support. And yes it should be
removed everywhere.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list