From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Dmitry Torokhov <dtor_core@ameritech.net>
Subject: Re: 2.6.15-rc5-mm2: evdev problem
Date: Sun, 11 Dec 2005 17:02:08 +0100 [thread overview]
Message-ID: <200512111702.08556.rjw@sisk.pl> (raw)
In-Reply-To: <200512111647.31202.rjw@sisk.pl>
The evdev driver is still broken due to the wrong order of arguments of
copy_to_user() in evdev_event_to_user().
The following patch fixes this issue.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Index: linux-2.6.15-rc2-mm1/drivers/input/evdev.c
===================================================================
--- linux-2.6.15-rc2-mm1.orig/drivers/input/evdev.c 2005-11-23 22:07:30.000000000 +0100
+++ linux-2.6.15-rc2-mm1/drivers/input/evdev.c 2005-11-26 17:38:02.000000000 +0100
@@ -194,7 +194,7 @@
return 0;
}
-static int evdev_event_to_user(const char __user *buffer, struct input_event *event)
+static int evdev_event_to_user(char __user *buffer, struct input_event *event)
{
if (COMPAT_TEST) {
struct input_event_compat compat_event;
@@ -205,11 +205,11 @@
compat_event.code = event->code;
compat_event.value = event->value;
- if (copy_to_user(&compat_event, buffer, sizeof(struct input_event_compat)))
+ if (copy_to_user(buffer, &compat_event, sizeof(struct input_event_compat)))
return -EFAULT;
} else {
- if (copy_to_user(event, buffer, sizeof(struct input_event)))
+ if (copy_to_user(buffer, event, sizeof(struct input_event)))
return -EFAULT;
}
next prev parent reply other threads:[~2005-12-11 16:08 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-11 12:13 2.6.15-rc5-mm2 Andrew Morton
2005-12-11 12:39 ` 2.6.15-rc5-mm2 Benoit Boissinot
2005-12-11 15:17 ` 2.6.15-rc5-mm2 Benoit Boissinot
2005-12-11 15:47 ` 2.6.15-rc5-mm2 Rafael J. Wysocki
2005-12-11 15:52 ` 2.6.15-rc5-mm2: broken resume from disk on x86-64 Rafael J. Wysocki
2005-12-11 16:02 ` Rafael J. Wysocki [this message]
2005-12-11 18:22 ` 2.6.15-rc5-mm2: evdev problem Dmitry Torokhov
2005-12-11 16:06 ` 2.6.15-rc5-mm2: ehci_hcd crashes on load sometimes Rafael J. Wysocki
2005-12-11 20:38 ` Andrew Morton
2005-12-12 19:53 ` Rafael J. Wysocki
2005-12-12 20:29 ` Andrew Morton
2005-12-12 20:55 ` Rafael J. Wysocki
2005-12-12 21:09 ` Andrew Morton
2005-12-12 21:39 ` Rafael J. Wysocki
2005-12-12 21:47 ` Andrew Morton
2005-12-12 21:56 ` Ben Pfaff
2005-12-13 6:52 ` [linux-usb-devel] " David Brownell
2005-12-13 22:10 ` Rafael J. Wysocki
2005-12-13 22:22 ` David Brownell
2005-12-13 22:39 ` Rafael J. Wysocki
2005-12-13 23:31 ` David Brownell
2005-12-11 16:08 ` 2.6.15-rc5-mm2 Jesper Juhl
2005-12-11 21:13 ` [PATCH] Fix vesafb display panning regression Antonino A. Daplas
2005-12-11 21:30 ` Jesper Juhl
2005-12-11 16:12 ` 2.6.15-rc5-mm2 :-) Maciej Soltysiak
2005-12-13 5:52 ` Con Kolivas
[not found] ` <1916802326.20051213121330@dns.toxicfilms.tv>
2005-12-13 12:16 ` Con Kolivas
2005-12-13 23:30 ` Peter Williams
2005-12-11 17:56 ` 2.6.15-rc5-mm2: two cs5535 modules Adrian Bunk
2005-12-12 18:29 ` Ben Gardner
2005-12-12 22:49 ` Alan Cox
2005-12-12 0:53 ` 2.6.15-rc5-mm2 Grant Coady
2005-12-12 14:05 ` 2.6.15-rc5-mm2 Cornelia Huck
2005-12-14 8:54 ` SMP+nosmp=hang [was: Re: 2.6.15-rc5-mm2] J.A. Magallon
[not found] ` <20060120192259.4460af42.akpm@osdl.org>
2006-01-21 23:46 ` J.A. Magallon
2006-01-22 0:22 ` Randy.Dunlap
2005-12-15 13:41 ` 2.6.15-rc5-mm2 Reuben Farrelly
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=200512111702.08556.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
/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).