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

Hans de Goede hdegoede at redhat.com
Tue Jan 10 14:47:18 UTC 2017


Hi,

On 10-01-17 11:51, Qiang Yu wrote:
> 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>


Patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans




> ---
>  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);
>


More information about the xorg-devel mailing list