[Intel-gfx] [PATCH] intel driver vs. libdrm and NULL pointer handling
Matthias Hopf
mhopf at suse.de
Wed Mar 17 15:25:01 CET 2010
drmModeGetConnector() of libdrm may return NULL in case of error, and
the driver doesn't validate the return value in drmmode_output_detect().
Also, given that the driver uses drmmode_output->mode_output without
NULL validation everywhere, fixing this isn't that trivial.
Additionally, drmmode_output->mode_output isn't NULLed after destroying,
see attached patch.
Another issue:
I currently see a situation here, when after a number of hibernate
cycles with kernel 2.6.33 mode_output->modes is NULL, while
mode_output->count_modes is small but positive. Reading the source of
libdrm it looks impossible to get a drmModeConnectorPtr with this
combination, so I still wonder how this might happen. If anybody has any
ideas, they would be more than welcome.
Matthias
--
Matthias Hopf <mhopf at suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat at mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clear-drmmode_output-mode_output-in-drmmode_output_.patch
Type: text/x-patch
Size: 782 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100317/56ceacfb/attachment.bin>
More information about the Intel-gfx
mailing list