diff --git a/config/x11-input.fdi b/config/x11-input.fdi
index f2e2d50ab..6c4a1e325 100644
--- a/config/x11-input.fdi
+++ b/config/x11-input.fdi
@@ -64,8 +64,8 @@
base
- keyboard
+ kbd otherwise). -->
+ kbd
pc105
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 3ec96253d..5b33ef78a 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -398,6 +398,10 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
RegionPtr srcregion = NULL, dstregion = NULL;
xRectangle *rects;
+ /* avoid doing copy operations if no boxes */
+ if (nbox == 0)
+ return;
+
pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
pDstPixmap = exaGetDrawablePixmap (pDstDrawable);
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 282eb49f9..d72a359e1 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -448,10 +448,6 @@ xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad)
#define GLOBAL_DEFAULT_DEPTH 24
#endif
-#ifndef GLOBAL_DEFAULT_FBBPP
-#define GLOBAL_DEFAULT_FBBPP 32
-#endif
-
_X_EXPORT Bool
xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
int depth24flags)
@@ -529,7 +525,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
if (depth > 0)
scrp->depth = depth;
} else {
- scrp->bitsPerPixel = GLOBAL_DEFAULT_FBBPP;
scrp->depth = GLOBAL_DEFAULT_DEPTH;
}
}
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c
index 9e2c6199c..23061ba15 100644
--- a/hw/xfree86/os-support/linux/int10/linux.c
+++ b/hw/xfree86/os-support/linux/int10/linux.c
@@ -1,6 +1,6 @@
/*
* linux specific part of the int10 module
- * Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich
+ * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2008 Egbert Eich
*/
#ifdef HAVE_XORG_CONFIG_H
#include
@@ -357,7 +357,10 @@ MapCurrentInt10(xf86Int10InfoPtr pInt)
"shmat(low_mem) error: %s\n",strerror(errno));
return FALSE;
}
-
+ if (mprotect((void*)0, V_RAM, PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
+ "Cannot set EXEC bit on low memory: %s\n", strerror(errno));
+
if (((linuxInt10Priv*)pInt->private)->highMem >= 0) {
addr = shmat(((linuxInt10Priv*)pInt->private)->highMem,
(char*)HIGH_MEM, 0);
@@ -368,6 +371,11 @@ MapCurrentInt10(xf86Int10InfoPtr pInt)
"shmget error: %s\n",strerror(errno));
return FALSE;
}
+ if (mprotect((void*)HIGH_MEM, HIGH_MEM_SIZE,
+ PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
+ xf86DrvMsg(pInt->scrnIndex, X_ERROR,
+ "Cannot set EXEC bit on high memory: %s\n",
+ strerror(errno));
} else {
if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) {
if (mmap((void *)(V_BIOS), SYS_BIOS - V_BIOS,
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index 1dc7ed2d5..d6ccc31e2 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -2,6 +2,10 @@
#ifndef _XAA_H
#define _XAA_H
+#define XAA_VERSION_MAJOR 1
+#define XAA_VERSION_MINOR 2
+#define XAA_VERSION_RELEASE 1
+
/*
******** OPERATION SPECIFIC FLAGS *********
diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c
index 00483e3ed..7ca1f45a4 100644
--- a/hw/xfree86/xaa/xaaInitAccel.c
+++ b/hw/xfree86/xaa/xaaInitAccel.c
@@ -103,7 +103,9 @@ static XF86ModuleVersionInfo xaaVersRec =
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
- 1, 2, 0,
+ XAA_VERSION_MAJOR,
+ XAA_VERSION_MINOR,
+ XAA_VERSION_RELEASE,
ABI_CLASS_VIDEODRV, /* requires the video driver ABI */
ABI_VIDEODRV_VERSION,
MOD_CLASS_NONE,
diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h
index 38c97d70b..857dbc3ed 100644
--- a/hw/xfree86/xaa/xaawrap.h
+++ b/hw/xfree86/xaa/xaawrap.h
@@ -48,8 +48,8 @@
XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
GCFuncs *oldFuncs = pGC->funcs;\
pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
+ pGC->ops = pGCPriv->wrapOps; \
+ SYNC_CHECK(pGC)
#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
pGCPriv->wrapOps = pGC->ops;\
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 55faec333..4f252d41f 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -661,7 +661,8 @@ InitExtensions(argc, argv)
#endif
#ifdef GLXEXT
- GlxPushProvider(&__glXDRISWRastProvider);
+ if (serverGeneration == 1)
+ GlxPushProvider(&__glXDRISWRastProvider);
if (!noGlxExtension) GlxExtensionInit();
#endif
}
diff --git a/os/utils.c b/os/utils.c
index f58c76366..7fc2029f7 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1702,7 +1702,7 @@ static struct pid {
int pid;
} *pidlist;
-void (*old_alarm)(int) = NULL; /* XXX horrible awful hack */
+OsSigHandlerPtr old_alarm = NULL; /* XXX horrible awful hack */
pointer
Popen(char *command, char *type)
@@ -1726,7 +1726,7 @@ Popen(char *command, char *type)
}
/* Ignore the smart scheduler while this is going on */
- old_alarm = signal(SIGALRM, SIG_IGN);
+ old_alarm = OsSignal(SIGALRM, SIG_IGN);
if (old_alarm == SIG_ERR) {
perror("signal");
return NULL;
@@ -1737,7 +1737,7 @@ Popen(char *command, char *type)
close(pdes[0]);
close(pdes[1]);
xfree(cur);
- if (signal(SIGALRM, old_alarm) == SIG_ERR)
+ if (OsSignal(SIGALRM, old_alarm) == SIG_ERR)
perror("signal");
return NULL;
case 0: /* child */
@@ -1914,7 +1914,7 @@ Pclose(pointer iop)
/* allow EINTR again */
OsReleaseSignals ();
- if (old_alarm && signal(SIGALRM, old_alarm) == SIG_ERR) {
+ if (old_alarm && OsSignal(SIGALRM, old_alarm) == SIG_ERR) {
perror("signal");
return -1;
}
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 49725d065..36084cc02 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -109,7 +109,7 @@ Time time;
register CARD16 changed,bState;
interest = kbd->xkb_interest;
- if (!interest)
+ if (!interest || !kbd->key || !kbd->key->xkbInfo)
return;
xkbi = kbd->key->xkbInfo;
state= &xkbi->state;
@@ -168,6 +168,9 @@ XkbSrvInfoPtr xkbi;
unsigned time = 0,initialized;
CARD16 changed;
+ if (!kbd->key || !kbd->key->xkbInfo)
+ return;
+
xkbi = kbd->key->xkbInfo;
initialized= 0;
@@ -291,7 +294,7 @@ XkbInterestPtr interest;
Time time = 0;
interest = kbd->xkb_interest;
- if (!interest)
+ if (!interest || !kbd->key || !kbd->key->xkbInfo)
return;
xkbi = kbd->key->xkbInfo;
@@ -401,6 +404,9 @@ CARD16 pitch,duration;
Time time = 0;
XID winID = 0;
+ if (!kbd->key || !kbd->key->xkbInfo)
+ return;
+
xkbi = kbd->key->xkbInfo;
if ((force||(xkbi->desc->ctrls->enabled_ctrls&XkbAudibleBellMask))&&
@@ -616,11 +622,12 @@ XkbSrvInfoPtr xkbi;
XkbInterestPtr interest;
Time time = 0;
- xkbi = kbd->key->xkbInfo;
interest = kbd->xkb_interest;
- if (!interest)
+ if (!interest || !kbd->key || !kbd->key->xkbInfo)
return;
+ xkbi = kbd->key->xkbInfo;
+
initialized = 0;
pEv->mods= xkbi->state.mods;
pEv->group= xkbi->state.group;
@@ -996,6 +1003,10 @@ unsigned long autoCtrls,autoValues;
ClientPtr client = NULL;
found= False;
+
+ if (!dev->key || !dev->key->xkbInfo)
+ return found;
+
autoCtrls= autoValues= 0;
if ( dev->xkb_interest ) {
interest = dev->xkb_interest;