All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm/i915: fix possible null pointer dereference
Date: Mon, 20 Jul 2015 16:23:57 +0200	[thread overview]
Message-ID: <20150720142357.GI16722@phenom.ffwll.local> (raw)
In-Reply-To: <20150720132831.GA1645@sudip-PC>

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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix possible null pointer dereference
Date: Mon, 20 Jul 2015 16:23:57 +0200	[thread overview]
Message-ID: <20150720142357.GI16722@phenom.ffwll.local> (raw)
In-Reply-To: <20150720132831.GA1645@sudip-PC>

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

  reply	other threads:[~2015-07-20 14:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 12:29 [PATCH] drm/i915: fix possible null pointer dereference Sudip Mukherjee
2015-07-20 12:38 ` Chris Wilson
2015-07-20 12:38   ` Chris Wilson
2015-07-20 13:28   ` Sudip Mukherjee
2015-07-20 13:28     ` Sudip Mukherjee
2015-07-20 14:23     ` Daniel Vetter [this message]
2015-07-20 14:23       ` [Intel-gfx] " Daniel Vetter

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=20150720142357.GI16722@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.