On Thu, Jul 31, 2008 at 4:07 PM, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote: > On Wed, Jul 30, 2008 at 11:10:29PM -0700, Andrew Morton wrote: >> On Wed, 30 Jul 2008 17:06:35 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote: >> >> > I have created today's linux-next tree at >> > git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git >> >> The X server broke on my FC8 t61p thinkpad. Mainline is OK. >> >> Various information is at http://userweb.kernel.org/~akpm/mo/ >> >> I'm suspecting the input layer - my synaptics device seems to have >> disappeared? See http://userweb.kernel.org/~akpm/mo/Xorg-log-diff.txt >> > > I think this patch should help with Synaptics: Which unfortunately doesn't help all people running with older synaptics user-space after commit 0571c5d20aca71c735222132b02aebddf593045c ("Input: expand keycode space"). Can't this be solved without breaking Xorg on newer kernels running older synaptics? > From: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> > Subject: [PATCH] Fix crash on kernels with extended keymap space > > The len argument of EVIOCGBIT(ev,len) is the size of the receiving > buffer in bytes, not maximim number of bits to retrieve. > > Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx> > --- > eventcomm.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/eventcomm.c b/eventcomm.c > index e3257cd..2d0a347 100644 > --- a/eventcomm.c > +++ b/eventcomm.c > @@ -89,7 +89,7 @@ event_query_is_touchpad(int fd) > > /* Check for ABS_X, ABS_Y, ABS_PRESSURE and BTN_TOOL_FINGER */ > > - SYSCALL(ret = ioctl(fd, EVIOCGBIT(0, EV_MAX), evbits)); > + SYSCALL(ret = ioctl(fd, EVIOCGBIT(0, sizeof(evbits)), evbits)); > if (ret < 0) > return FALSE; > if (!TEST_BIT(EV_SYN, evbits) || > @@ -97,7 +97,7 @@ event_query_is_touchpad(int fd) > !TEST_BIT(EV_KEY, evbits)) > return FALSE; > > - SYSCALL(ret = ioctl(fd, EVIOCGBIT(EV_ABS, KEY_MAX), evbits)); > + SYSCALL(ret = ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(evbits)), evbits)); > if (ret < 0) > return FALSE; > if (!TEST_BIT(ABS_X, evbits) || > @@ -105,7 +105,7 @@ event_query_is_touchpad(int fd) > !TEST_BIT(ABS_PRESSURE, evbits)) > return FALSE; > > - SYSCALL(ret = ioctl(fd, EVIOCGBIT(EV_KEY, KEY_MAX), evbits)); > + SYSCALL(ret = ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(evbits)), evbits)); > if (ret < 0) > return FALSE; > if (!TEST_BIT(BTN_TOOL_FINGER, evbits)) > -- > 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html