modes: Retry GETRESOURCES if a hotplug event occurs between the two ioctls
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Jan 2010 15:19:25 +0000 (15:19 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Jan 2010 15:33:21 +0000 (15:33 +0000)
commitd1308f4fe7f94aae51ca9f70947aea8e09597f37
tree4db0684c9479c8cebe3003dbd4327bf8415ab197
parent5dbc1b333b85695735dc5b484372758b9979b693
modes: Retry GETRESOURCES if a hotplug event occurs between the two ioctls

Peter Clifton hit an issue whereby he had a spurious TV hotplug event
that occurred between the two GETRESOURCES ioctls that caused the kernel
to skip filling one array and led to a crash (as the size of the
allocated and initialised block of memory differed from the reported
size).

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912
       Crash whilst probing modes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Peter Clifton <pcjc2@cam.ac.uk>
xf86drmMode.c