All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: 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: [PATCH] drm/i915: fix possible null pointer dereference
Date: Mon, 20 Jul 2015 18:58:32 +0530	[thread overview]
Message-ID: <20150720132831.GA1645@sudip-PC> (raw)
In-Reply-To: <20150720123846.GA6166@nuc-i3427.alporthouse.com>

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?

regards
sudip
_______________________________________________
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: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: 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: [PATCH] drm/i915: fix possible null pointer dereference
Date: Mon, 20 Jul 2015 18:58:32 +0530	[thread overview]
Message-ID: <20150720132831.GA1645@sudip-PC> (raw)
In-Reply-To: <20150720123846.GA6166@nuc-i3427.alporthouse.com>

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?

regards
sudip

  reply	other threads:[~2015-07-20 13:28 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 [this message]
2015-07-20 13:28     ` Sudip Mukherjee
2015-07-20 14:23     ` Daniel Vetter
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=20150720132831.GA1645@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=airlied@linux.ie \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.