drm/nouveau: Validate channel indices passed from userspace.
authorMichel Hermier <hermier@frugalware.org>
Sat, 25 Dec 2010 15:58:56 +0000 (16:58 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 27 Dec 2010 00:41:01 +0000 (10:41 +1000)
When hacking the libdrm for improvements, I triggered a kernel crash
related to the fact that the NOUVEAU_NOTIFIEROBJ_ALLOC ioctl calls
nouveau_channel_get with an unchecked channel index.
The patch ensures that the channel index is an unsigned and validates
its value in nouveau_channel_get.

Signed-off-by: Michel Hermier <hermier@frugalware.org>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

No differences found