On Tue, 9 Oct 2012 16:56:58 -0300, Rodrigo Vivi
wrote:
> When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
> dereferences it.
>
> v2: simpler version just using usize = 0 instead of allocating useless memory
>
> Signed-off-by: Rodrigo Vivi
Presuming that coverity is sma
On Tue, 9 Oct 2012 16:56:58 -0300, Rodrigo Vivi wrote:
> When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
> dereferences it.
>
> v2: simpler version just using usize = 0 instead of allocating useless memory
>
> Signed-off-by: Rodrigo Vivi
Presuming that coverity is smar
On Tue, 9 Oct 2012 14:50:46 -0300, Rodrigo Vivi
wrote:
> When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
> dereferences it.
>
usize should be 0 in that case, since the ioctl is neither copying data
in or out, for example I915_GEM_THROTTLE. To be on the safe side:
if (IOC
When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
dereferences it.
v2: simpler version just using usize = 0 instead of allocating useless memory
Signed-off-by: Rodrigo Vivi
---
drivers/gpu/drm/drm_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/
When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
dereferences it.
Signed-off-by: Rodrigo Vivi
---
drivers/gpu/drm/drm_drv.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 1490e76..59
When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
dereferences it.
v2: simpler version just using usize = 0 instead of allocating useless memory
Signed-off-by: Rodrigo Vivi
---
drivers/gpu/drm/drm_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/
On Tue, 9 Oct 2012 14:50:46 -0300, Rodrigo Vivi wrote:
> When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
> dereferences it.
>
usize should be 0 in that case, since the ioctl is neither copying data
in or out, for example I915_GEM_THROTTLE. To be on the safe side:
if (IOC_
When cmd isn't IOC_IN | IOC_OUT a null "kdata" goes to "memset", which
dereferences it.
Signed-off-by: Rodrigo Vivi
---
drivers/gpu/drm/drm_drv.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 1490e76..59