Fix a use-after-free in the previous changes for GLX
This commit is contained in:
parent
468148e15c
commit
27196299b6
@ -1,4 +1,4 @@
|
|||||||
From 604ac8f46a85a5c68b00751baa699d770f754e1c Mon Sep 17 00:00:00 2001
|
From 1607ac6870f7cf67c30b96529ea5ca389c771a3d Mon Sep 17 00:00:00 2001
|
||||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
Date: Thu, 3 Jun 2021 17:51:01 +0200
|
Date: Thu, 3 Jun 2021 17:51:01 +0200
|
||||||
Subject: [PATCH xserver 27/27] glx: Set ContextTag for all contexts
|
Subject: [PATCH xserver 27/27] glx: Set ContextTag for all contexts
|
||||||
@ -10,33 +10,36 @@ However, several other places expect to find a context for the tag or
|
|||||||
they would raise a GLXBadContextTag error, such as WaitGL() or WaitX().
|
they would raise a GLXBadContextTag error, such as WaitGL() or WaitX().
|
||||||
|
|
||||||
Set the context tag for direct contexts as well, to avoid raising an
|
Set the context tag for direct contexts as well, to avoid raising an
|
||||||
error and possibly killing the client.
|
error and possibly killing the client and set currentClient.
|
||||||
|
|
||||||
Thanks to Erik Kurzinger <ekurzinger@nvidia.com> for spotting the issue.
|
Thanks to Erik Kurzinger <ekurzinger@nvidia.com> for spotting the issue.
|
||||||
|
|
||||||
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||||
(cherry picked from commit c468d34c7208c9041f9c077b54a00ae9cccad6a3)
|
(cherry picked from commit c468d34c7208c9041f9c077b54a00ae9cccad6a3)
|
||||||
|
(cherry picked from commit aad61e8e03311eb8bae4f7db59e65634733eadc2)
|
||||||
---
|
---
|
||||||
glx/glxcmds.c | 3 ++-
|
glx/glxcmds.c | 5 +++--
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
|
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
|
||||||
index 1b9ad6d14..bd62e913c 100644
|
index 1b9ad6d14..8b2170306 100644
|
||||||
--- a/glx/glxcmds.c
|
--- a/glx/glxcmds.c
|
||||||
+++ b/glx/glxcmds.c
|
+++ b/glx/glxcmds.c
|
||||||
@@ -664,9 +664,10 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
@@ -662,10 +662,11 @@ xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId,
|
||||||
|
glxc->readPriv = NULL;
|
||||||
|
return __glXError(GLXBadContext);
|
||||||
}
|
}
|
||||||
|
+ }
|
||||||
glxc->currentClient = client;
|
|
||||||
- glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
+ glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
||||||
+
|
+ if (glxc)
|
||||||
|
glxc->currentClient = client;
|
||||||
|
- glxServer.setContextTagPrivate(client, newContextTag, glxc);
|
||||||
|
- }
|
||||||
|
|
||||||
if (prevglxc) {
|
if (prevglxc) {
|
||||||
prevglxc->currentClient = NULL;
|
prevglxc->currentClient = NULL;
|
||||||
if (!prevglxc->idExists) {
|
|
||||||
--
|
--
|
||||||
2.31.1
|
2.31.1
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
Summary: Xwayland
|
Summary: Xwayland
|
||||||
Name: xorg-x11-server-Xwayland
|
Name: xorg-x11-server-Xwayland
|
||||||
Version: 21.1.1
|
Version: 21.1.1
|
||||||
Release: 2%{?gitdate:.%{gitdate}git%{shortcommit}}%{?dist}
|
Release: 3%{?gitdate:.%{gitdate}git%{shortcommit}}%{?dist}
|
||||||
|
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
%if 0%{?gitdate}
|
%if 0%{?gitdate}
|
||||||
@ -151,6 +151,9 @@ rm -Rf $RPM_BUILD_ROOT%{_localstatedir}/lib/xkb
|
|||||||
%{_libdir}/pkgconfig/xwayland.pc
|
%{_libdir}/pkgconfig/xwayland.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 21 2021 Olivier Fourdan <ofourdan@redhat.com> - 21.1.1-3
|
||||||
|
- Fix a use-after-free in the previous changes for GLX
|
||||||
|
|
||||||
* Thu Jun 10 2021 Olivier Fourdan <ofourdan@redhat.com> - 21.1.1-2
|
* Thu Jun 10 2021 Olivier Fourdan <ofourdan@redhat.com> - 21.1.1-2
|
||||||
- Backport fixes for GLX and EGLstream (#1948003)
|
- Backport fixes for GLX and EGLstream (#1948003)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user