Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1188168 > unrolled thread

Re: [PATCH] drm/i915: fix possible null pointer dereference

Started byChris Wilson <chris@chris-wilson.co.uk>
First post2015-07-20 14:40 +0200
Last post2015-07-20 15:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] drm/i915: fix possible null pointer dereference Chris Wilson <chris@chris-wilson.co.uk> - 2015-07-20 14:40 +0200
    Re: [PATCH] drm/i915: fix possible null pointer dereference Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-07-20 15:30 +0200

#1188168 — Re: [PATCH] drm/i915: fix possible null pointer dereference

FromChris Wilson <chris@chris-wilson.co.uk>
Date2015-07-20 14:40 +0200
SubjectRe: [PATCH] drm/i915: fix possible null pointer dereference
Message-ID<pOiwq-1i3-1@gated-at.bofh.it>
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.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1188188

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-07-20 15:30 +0200
Message-ID<pOjiP-2s6-17@gated-at.bofh.it>
In reply to#1188168
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web