]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5fe01e054c37f8913d08ab2162da2b298a879a07
treea1154af0d994252622da3d48fcdcb1b8de775d03
parentedce18375ff4d9c392ced3039bcd51920ef5abef
drm/nouveau: Validate channel indices passed from userspace.

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>
drivers/gpu/drm/nouveau/nouveau_channel.c