[PATCH v3] privates: Clear screen-specific keys during CloseScreen
Keith Packard
keithp at keithp.com
Thu Sep 17 16:12:14 PDT 2015
Aaron Plattner <aplattner at nvidia.com> writes:
> The modesetting driver corrupts memory when used after a server regeneration
> because not enough memory is allocated for its pixmap privates. This happens
> because its call to dixRegisterScreenSpecificPrivateKey() does nothing because
> key->initialized is still TRUE from the first server generation. However, the
> key is not in the screen's linked list of screen-specific privates because
> that's freed and reallocated during the server generation loop in dix_main().
>
> Fix this by clearing key->initialized before CloseScreen and add a call to
> dixFreeScreenSpecificPrivates() for GPU screens.
>
> v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates()
> calls to after CloseScreen.
>
> v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen.
>
> Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150917/636d0e37/attachment-0001.sig>
More information about the xorg-devel
mailing list