[drm-nouveau-mmu] question about potential NULL pointer dereference

2018-02-14 Thread Gustavo A. R. Silva
Hi all, While doing some static analysis I ran into the following piece of code at drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:957: 957#define node(root, dir) ((root)->head.dir == &vmm->list) ? NULL : \ 958list_entry((root)->head.dir, struct nvkm_vma, head) 959

Re: [drm-nouveau-mmu] question about potential NULL pointer dereference

2018-02-14 Thread Gustavo A. R. Silva
Quoting Ben Skeggs : On Wed, Feb 14, 2018 at 1:40 AM, Gustavo A. R. Silva wrote: Hi all, While doing some static analysis I ran into the following piece of code at drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:957: 957#define node(root, dir) ((root)->head.dir == &vmm->list) ? NULL : \ 95

Re: [drm-nouveau-mmu] question about potential NULL pointer dereference

2018-02-13 Thread Ben Skeggs
On Wed, Feb 14, 2018 at 1:40 AM, Gustavo A. R. Silva wrote: > > Hi all, > > While doing some static analysis I ran into the following piece of code at > drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:957: > > 957#define node(root, dir) ((root)->head.dir == &vmm->list) ? NULL : > \ > 958li