[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Chris Wilson
On Mon, May 23, 2016 at 04:35:53PM +0100, Eric Engestrom wrote: > On Mon, May 23, 2016 at 02:46:59PM +0100, Chris Wilson wrote: > > It's a programming error, just as would be passing in mm == NULL. Mark up > > the function as requiring non-NULL parameters. > > Using `__attribute__((nonnull))`? I

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Eric Engestrom
On Mon, May 23, 2016 at 02:46:59PM +0100, Chris Wilson wrote: > On Mon, May 23, 2016 at 02:38:29PM +0100, Eric Engestrom wrote: > > On Mon, May 23, 2016 at 02:02:26PM +0100, Chris Wilson wrote: > > > On Mon, May 23, 2016 at 02:56:45PM +0200, Daniel Vetter wrote: > > > > On Mon, May 23, 2016 at

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Daniel Vetter
On Mon, May 23, 2016 at 11:27:14AM +0100, Eric Engestrom wrote: > On Wed, May 18, 2016 at 10:17:19PM +0200, Heinrich Schuchardt wrote: > > Do not dereference node before the check if node is NULL. > > > > Signed-off-by: Heinrich Schuchardt > > --- > > drivers/gpu/drm/drm_mm.c | 4 +++- > > 1

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Chris Wilson
On Mon, May 23, 2016 at 02:38:29PM +0100, Eric Engestrom wrote: > On Mon, May 23, 2016 at 02:02:26PM +0100, Chris Wilson wrote: > > On Mon, May 23, 2016 at 02:56:45PM +0200, Daniel Vetter wrote: > > > On Mon, May 23, 2016 at 11:27:14AM +0100, Eric Engestrom wrote: > > > > On Wed, May 18, 2016 at

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Eric Engestrom
On Mon, May 23, 2016 at 02:02:26PM +0100, Chris Wilson wrote: > On Mon, May 23, 2016 at 02:56:45PM +0200, Daniel Vetter wrote: > > On Mon, May 23, 2016 at 11:27:14AM +0100, Eric Engestrom wrote: > > > On Wed, May 18, 2016 at 10:17:19PM +0200, Heinrich Schuchardt wrote: > > > > Do not dereference

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Chris Wilson
On Mon, May 23, 2016 at 02:56:45PM +0200, Daniel Vetter wrote: > On Mon, May 23, 2016 at 11:27:14AM +0100, Eric Engestrom wrote: > > On Wed, May 18, 2016 at 10:17:19PM +0200, Heinrich Schuchardt wrote: > > > Do not dereference node before the check if node is NULL. > > > > > > Signed-off-by:

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-23 Thread Eric Engestrom
On Wed, May 18, 2016 at 10:17:19PM +0200, Heinrich Schuchardt wrote: > Do not dereference node before the check if node is NULL. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/gpu/drm/drm_mm.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-18 Thread Heinrich Schuchardt
Do not dereference node before the check if node is NULL. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/drm_mm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 04de6fd..cb39f45 100644 ---