xserver: Branch 'master' - 7 commits
Keith Packard
keithp at kemper.freedesktop.org
Mon May 11 16:36:07 PDT 2015
Xext/shm.c | 10 ++++++++--
glx/glxdri2.c | 3 +++
hw/xfree86/modes/xf86Crtc.h | 2 ++
include/servermd.h | 2 ++
4 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit c39c3a97508dc384c0757a0990c07b5d7b2fe97a
Merge: 6b65e96 7470578
Author: Keith Packard <keithp at keithp.com>
Date: Mon May 11 16:34:48 2015 -0700
Merge remote-tracking branch 'ajax/xserver-next'
commit 7470578520e90b6402b2509cd0c51fd4fd84849f
Author: Brent Collins <bcollins at trustedcs.com>
Date: Thu May 7 15:10:19 2015 -0400
shm: Fix xselinux resource initialization for xinerama pixmaps
This is necessary to avoid a NULL pointer deference when the pixmap is
used later.
[ajax: massaged commit message, fixed it to compile]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Brent Collins <bcollins at trustedcs.com>
diff --git a/Xext/shm.c b/Xext/shm.c
index 52d9974..b359a90 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -971,6 +971,12 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
stuff->offset);
if (pMap) {
+ result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid,
+ RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess);
+ if (result != Success) {
+ pDraw->pScreen->DestroyPixmap(pMap);
+ return result;
+ }
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
commit bcec9f867d19e954a46c2654a79782bff6c65fce
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Feb 14 10:36:44 2015 +0000
shm: Fix use-after-free in ShmDestroyPixmap
We pass the pPixmap->drawable.id to the ShmDetachSegment function after
the pPixmap is freed. Fortunately, we don't use the value inside
ShmDetachSegment and can simply pass zero instead.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Michel Dänzer <michel at daenzer.net>
diff --git a/Xext/shm.c b/Xext/shm.c
index db9d474..52d9974 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -260,7 +260,7 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
pScreen->DestroyPixmap = ShmDestroyPixmap;
if (shmdesc)
- ShmDetachSegment(shmdesc, pPixmap->drawable.id);
+ ShmDetachSegment(shmdesc, 0);
return ret;
}
@@ -427,7 +427,7 @@ ProcShmAttach(ClientPtr client)
/*ARGSUSED*/ static int
ShmDetachSegment(void *value, /* must conform to DeleteType */
- XID shmseg)
+ XID unused)
{
ShmDescPtr shmdesc = (ShmDescPtr) value;
ShmDescPtr *prev;
commit d61ae18074e53c2cdfb13cc37693b526160d6ca7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Mar 4 12:16:29 2015 +0000
glx/dri2: Disable AIGLX if indirect GLX is disabled
There is no point in setting up the acceleration for indirect GLX if
indirect GLX is itself disabled.
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bcd57a4..c0f29ea 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -936,6 +936,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
size_t buffer_size;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ if (!enableIndirectGLX)
+ return NULL;
+
screen = calloc(1, sizeof *screen);
if (screen == NULL)
return NULL;
commit 1af15aaf278edcf6f6de94774350e34a80883c24
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Fri Apr 10 10:07:38 2015 +0200
dix: Fix image byte order on big endian hardware
Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using
them.
Otherwise, image byte order could be wrong on big endian hardware even
though endianess detection is correct.
Reported-by: Tim Waugh <twaugh at redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/include/servermd.h b/include/servermd.h
index a3b5c3a..087826f 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -52,6 +52,8 @@ SOFTWARE.
#error xserver code must include dix-config.h before any other headers
#endif
+#include <X11/Xarch.h> /* for X_LITTLE_ENDIAN/X_BIG_ENDIAN */
+
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst
commit 28159eff6badf6181b255f26d1f444abe81c05b7
Author: Jason Gerecke <killertofu at gmail.com>
Date: Thu Apr 30 18:06:14 2015 -0700
xfree86: Return NULL from xf86CompatOutput if no compat_output is defined
If no compat_output is defined, we inadvertently (attempt to) return
whatever data is at index -1. Instead, return NULL since that's what
callers are expecting.
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Jason Gerecke <jason.gerecke at wacom.com>
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 3c5bbcf..8b01608 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -745,6 +745,8 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ if (config->compat_output < 0)
+ return NULL;
return config->output[config->compat_output];
}
commit cad831f39861435cb94f4c90a73f7f0b62d1a4a1
Author: Robert Ancell <robert.ancell at canonical.com>
Date: Wed May 6 15:07:21 2015 +1200
xwayland: Fix error strings
Fix missing newlines from error string and fix grammar.
Signed-off-by: Robert Ancell <robert.ancell at canonical.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index d06006c..6b6e597 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -310,7 +310,7 @@ xwl_drm_init_egl(struct xwl_screen *xwl_screen)
}
if (!epoxy_has_gl_extension("GL_OES_EGL_image")) {
- ErrorF("GL_OES_EGL_image no available");
+ ErrorF("GL_OES_EGL_image not available\n");
return;
}
@@ -329,7 +329,7 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
xwl_screen->drm_fd = open(xwl_screen->device_name, O_RDWR | O_CLOEXEC);
if (xwl_screen->drm_fd == -1) {
- ErrorF("wayland-egl: could not open %s (%s)",
+ ErrorF("wayland-egl: could not open %s (%s)\n",
xwl_screen->device_name, strerror(errno));
return;
}
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index cc3bc53..488b839 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -561,7 +561,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id)
xwl_seat = calloc(sizeof *xwl_seat, 1);
if (xwl_seat == NULL) {
- ErrorF("create_input ENOMEM");
+ ErrorF("create_input ENOMEM\n");
return;
}
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 778914c..155cbc1 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -159,7 +159,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id)
xwl_output = calloc(sizeof *xwl_output, 1);
if (xwl_output == NULL) {
- ErrorF("create_output ENOMEM");
+ ErrorF("create_output ENOMEM\n");
return NULL;
}
@@ -168,7 +168,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id)
wl_output_add_listener(xwl_output->output, &output_listener, xwl_output);
if (snprintf(name, sizeof name, "XWAYLAND%d", serial++) < 0) {
- ErrorF("create_output ENOMEM");
+ ErrorF("create_output ENOMEM\n");
free(xwl_output);
return NULL;
}
More information about the xorg-commit
mailing list