]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: fix handling empty channel list in ioctl's
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Sun, 24 Mar 2013 14:36:38 +0000 (15:36 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 29 Mar 2013 03:44:57 +0000 (13:44 +1000)
commitccf756708183ee62791d67d932d35860c76d59d9
treead0418ad04e067e4c8400735ec281523840963fd
parent59564acc881149adc0beb6dfe6c2cfd9806882e7
drm/nouveau: fix handling empty channel list in ioctl's

If there are no channels, chan would never end up being NULL,
and so the null pointer check would fail.

Solve this by initializing chan to NULL, and iterating over temp instead.

Fixes oops when running intel-gpu-tools/tests/kms_flip, which attempts to
do some intel ioctl's on a nouveau device.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: stable@vger.kernel.org [3.7+]
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_abi16.c