Backport cf7517675d988c2d1ff967d6d162a17acbdad46 from xserver 1.20
xfree86: Hold input_lock across SPRITE functions in VGA arbiter Fixes stack overflow crash with VGA arbiter used with multi GPU systems. Report and fix identified by 'Joe M' on misc@. ok matthieu@
This commit is contained in:
parent
e0064514d7
commit
4fd0ec7f37
@ -73,14 +73,20 @@
|
||||
|
||||
#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x
|
||||
|
||||
#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \
|
||||
(miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \
|
||||
miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \
|
||||
((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \
|
||||
VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite;
|
||||
#define SPRITE_PROLOG \
|
||||
miPointerScreenPtr PointPriv; \
|
||||
VGAarbiterScreenPtr pScreenPriv; \
|
||||
input_lock(); \
|
||||
PointPriv = dixLookupPrivate(&pScreen->devPrivates, \
|
||||
miPointerScreenKey); \
|
||||
pScreenPriv = dixLookupPrivate(&(pScreen)->devPrivates, \
|
||||
VGAarbiterScreenKey); \
|
||||
PointPriv->spriteFuncs = pScreenPriv->miSprite; \
|
||||
|
||||
#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\
|
||||
PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs;
|
||||
#define SPRITE_EPILOG \
|
||||
pScreenPriv->miSprite = PointPriv->spriteFuncs; \
|
||||
PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \
|
||||
input_unlock();
|
||||
|
||||
#define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\
|
||||
PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \
|
||||
|
Loading…
Reference in New Issue
Block a user