xserver: Branch 'master' - 8 commits
Keith Packard
keithp at kemper.freedesktop.org
Wed Dec 7 12:42:32 PST 2011
Xext/saver.c | 3 +--
Xext/xvdisp.c | 4 ++--
Xi/extinit.c | 4 ++--
config/hal.c | 1 +
hw/kdrive/src/kinput.c | 6 ------
hw/xfree86/fbdevhw/fbdevhw.c | 18 ++++++++++--------
hw/xfree86/xaa/xaaGC.c | 1 +
7 files changed, 17 insertions(+), 20 deletions(-)
New commits:
commit 3ab8ee32470f7cf1223e04238bb8c5f74ed52fc3
Merge: 22a666f... 98c4a88...
Author: Keith Packard <keithp at keithp.com>
Date: Wed Dec 7 12:42:17 2011 -0800
Merge remote-tracking branch 'airlied/reviewed-fixes'
commit 98c4a888a4428789386c7c47cecc81933b5999ba
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Nov 28 16:37:59 2011 +0000
kdrive: drop screen crossing code.
The only kdrive server we probably care about anymore is Xephyr,
and this screen enable/disable code totally breaks it in multi-screen mode.
When you are in one screen the other stops updating.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=757457
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 9c0b34f..968ebb1 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -2146,12 +2146,6 @@ KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y)
static void
KdCrossScreen(ScreenPtr pScreen, Bool entering)
{
-#ifndef XIPAQ
- if (entering)
- KdEnableScreen (pScreen);
- else
- KdDisableScreen (pScreen);
-#endif
}
int KdCurScreen; /* current event screen */
commit 8d3731a811e33e263920dd7c8ec63d02968cb56e
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 20 10:48:26 2011 +0100
hal: free tmp_val in one missing case
Pointed out by coverity scan.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
diff --git a/config/hal.c b/config/hal.c
index aa234eb..088c993 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -348,6 +348,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
if (!strcasecmp(tmp, ".options") && (!xkb_opts.options))
xkb_opts.options = strdup(tmp_val);
}
+ free(tmp_val);
}
}
}
commit 41229392b790f30a0f0ef1f4ed95647c5bca4001
Author: Dave Airlie <airlied at redhat.com>
Date: Thu Oct 20 11:00:43 2011 +0100
xv: test correct number of requests. (v2)
Pointed out by coverity.
v2: fix swapped as well, as pointed out by Alan
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
index 364a90c..0795a14 100644
--- a/Xext/xvdisp.c
+++ b/Xext/xvdisp.c
@@ -1238,7 +1238,7 @@ ProcXvDispatch(ClientPtr client)
UpdateCurrentTime();
- if (stuff->data > xvNumRequests) {
+ if (stuff->data >= xvNumRequests) {
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
return BadRequest;
}
@@ -1542,7 +1542,7 @@ SProcXvDispatch(ClientPtr client)
UpdateCurrentTime();
- if (stuff->data > xvNumRequests) {
+ if (stuff->data >= xvNumRequests) {
SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest);
return BadRequest;
}
commit 1049139499d9132a20cd6d4d156fe9da9cddb6c2
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 19 16:57:13 2011 +0100
xaa: avoid possible freed pointer reuse in epilogue
If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps
avoid this by clearing the flags in to be destroyed pGCPriv.
Reported by coverity.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c
index 44d50e6..1bc35d9 100644
--- a/hw/xfree86/xaa/xaaGC.c
+++ b/hw/xfree86/xaa/xaaGC.c
@@ -239,6 +239,7 @@ XAADestroyGC(GCPtr pGC)
free(pGCPriv->XAAOps);
free(pGCPriv->DashPattern);
+ pGCPriv->flags = 0;
(*pGC->funcs->DestroyGC)(pGC);
XAA_GC_FUNC_EPILOGUE (pGC);
commit 682c09a2cedd234b005334cc01247d859dd7f26a
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 19 16:22:31 2011 +0100
Xi: avoid overrun of callback array.
This code had an off-by-one and would allow writing one past the end of
the callbacks array.
Pointed out by coverity.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/Xi/extinit.c b/Xi/extinit.c
index a2c807b..b43f9bb 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -409,7 +409,7 @@ static int
ProcIDispatch(ClientPtr client)
{
REQUEST(xReq);
- if (stuff->data > ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data])
+ if (stuff->data >= ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data])
return BadRequest;
return (*ProcIVector[stuff->data])(client);
@@ -428,7 +428,7 @@ static int
SProcIDispatch(ClientPtr client)
{
REQUEST(xReq);
- if (stuff->data > ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data])
+ if (stuff->data >= ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data])
return BadRequest;
return (*SProcIVector[stuff->data])(client);
commit b62dc4fcbcffd10de16650bee284702c8608bb60
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 19 16:21:26 2011 +0100
xext: don't free uninitialised pointer when malloc fails. (v2)
Initialise the pAttr->values to values so if the values allocation
fails it just ends up as free(NULL).
Pointed out by coverity.
v2: use Alan's suggestion.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/Xext/saver.c b/Xext/saver.c
index 142758c..18d5e46 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -925,7 +925,7 @@ ScreenSaverSetAttributes (ClientPtr client)
goto bail;
}
/* over allocate for override redirect */
- values = malloc((len + 1) * sizeof (unsigned long));
+ pAttr->values = values = malloc((len + 1) * sizeof (unsigned long));
if (!values)
{
ret = BadAlloc;
@@ -945,7 +945,6 @@ ScreenSaverSetAttributes (ClientPtr client)
pAttr->pCursor = NullCursor;
pAttr->pBackgroundPixmap = NullPixmap;
pAttr->pBorderPixmap = NullPixmap;
- pAttr->values = values;
/*
* go through the mask, checking the values,
* looking up pixmaps and cursors and hold a reference
commit 22605effd188436629a0dbc688666549473741e4
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Apr 28 13:34:28 2011 +1000
fbdevhw: iterate over all modes that match a mode. (v3)
So on RHEL5 anaconda sets an xorg.conf with a fixed 800x600 mode in it,
we run radeonfb and fbdev since ati won't work in userspace due to domain
issues in the older codebase.
On certain pseries blades the built-in KVM can't accept an 800x600-43 mode,
it requires the 800x600-60 mode, so we have to have the kernel radeonfb
driver reject the 800x600-43 mode when it sees it. However then fbdev
doesn't try any of the other 800x600 modes in the modelist, and we end up
getting a default 640x480 mode we don't want.
This patch changes the mode validation loop to continue on with the other modes
that match to find one that works.
v2: move code around to avoid extra loop, after comment from Jamey.
v3: move loop setup back into loop as per Jeremy's review.
Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Jamey Sharp <jamey at minilop.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
index 2019741..309fa65 100644
--- a/hw/xfree86/fbdevhw/fbdevhw.c
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
@@ -506,20 +506,22 @@ fbdevHWSetVideoModes(ScrnInfoPtr pScrn)
pScrn->virtualY = pScrn->display->virtualY;
for (modename = pScrn->display->modes; *modename != NULL; modename++) {
- for (mode = pScrn->monitor->Modes; mode != NULL; mode = mode->next)
- if (0 == strcmp(mode->name,*modename))
- break;
+ for (mode = pScrn->monitor->Modes; mode != NULL; mode = mode->next) {
+ if (0 == strcmp(mode->name,*modename)) {
+ if (fbdevHWSetMode(pScrn, mode, TRUE))
+ break;
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "\tmode \"%s\" test failed\n", *modename);
+ }
+ }
+
if (NULL == mode) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"\tmode \"%s\" not found\n", *modename);
continue;
}
- if (!fbdevHWSetMode(pScrn, mode, TRUE)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "\tmode \"%s\" test failed\n", *modename);
- continue;
- }
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"\tmode \"%s\" ok\n", *modename);
More information about the xorg-commit
mailing list