linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org
Subject: Re: linux-next: Tree for July 30
Date: Thu, 31 Jul 2008 10:07:09 -0400	[thread overview]
Message-ID: <20080731140708.GA11229@core.corenet.prv> (raw)
In-Reply-To: <20080730231029.9818953c.akpm@linux-foundation.org>

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@canb.auug.org.au> 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:

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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@mail.ru>
---
 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


  reply	other threads:[~2008-07-31 14:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080730170635.f737ffe9.sfr@canb.auug.org.au>
2008-07-31  6:10 ` linux-next: Tree for July 30 Andrew Morton
2008-07-31 14:07   ` Dmitry Torokhov [this message]
2008-07-31 15:36     ` Bartlomiej Zolnierkiewicz
2008-07-31 15:56       ` Dmitry Torokhov
2008-07-31 17:44         ` Andrew Morton
2008-07-31 18:17           ` Dmitry Torokhov
2008-07-31 18:26             ` Andrew Morton
2008-07-31 18:34               ` Dmitry Torokhov
2008-07-31 18:55                 ` Andrew Morton
2008-07-31 19:03                   ` Dmitry Torokhov
2008-07-31 19:20                   ` Hugh Dickins
2008-07-31 18:48             ` Rafael J. Wysocki
2008-07-31 18:54               ` Dmitry Torokhov
2008-07-31 19:10                 ` Linus Torvalds
2008-07-31 19:24                   ` Dmitry Torokhov
2008-07-31 19:42                     ` Dmitry Torokhov
2008-07-31 20:10                       ` Andrew Morton
2008-08-07 18:11                         ` Dmitry Torokhov
2008-08-07 18:50                           ` Andrew Morton
2008-08-07 19:06                             ` Dmitry Torokhov
2008-08-07 18:55                           ` Rafael J. Wysocki
2008-08-01 19:12                       ` Linus Torvalds
2008-08-01 19:23                         ` Dmitry Torokhov
2008-08-01 19:26                           ` Linus Torvalds
2008-07-31 19:44                     ` Linus Torvalds
2008-07-31 20:05                       ` Dmitry Torokhov
2008-07-31 20:16                         ` Linus Torvalds
2008-07-31 20:28                           ` Linus Torvalds
2008-07-31 20:39                             ` Dmitry Torokhov
2008-07-31 20:28                           ` Dmitry Torokhov
2008-07-31 19:13                 ` Andrew Morton
2008-07-31 19:57                 ` Rafael J. Wysocki
2008-08-04  5:47   ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080731140708.GA11229@core.corenet.prv \
    --to=dmitry.torokhov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).