[PATCH xserver 2/4] randr: fix xserver crash when xrandr setprovideroutputsource

Qiang Yu Qiang.Yu at amd.com
Tue Jan 10 10:51:55 UTC 2017


xrandr --setprovideroutputsource <screen> <gpu screen>
Xorg: ../../../xserver/dix/dispatch.c:4018: AttachOutputGPU:
Assertion `new->isGPU' failed.

GPUScreen is not allowed to be sink output.

Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
---
 randr/rrprovider.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index f9df67e..e4bc2bf 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -338,6 +338,9 @@ ProcRRSetProviderOutputSource(ClientPtr client)
     pScreen = provider->pScreen;
     pScrPriv = rrGetScrPriv(pScreen);
 
+    if (!pScreen->isGPU)
+        return BadValue;
+
     pScrPriv->rrProviderSetOutputSource(pScreen, provider, source_provider);
 
     RRInitPrimeSyncProps(pScreen);
-- 
2.7.4



More information about the xorg-devel mailing list