2000-10-26 21:58:26

by Vojtech Pavlik

[permalink] [raw]
Subject: [patch] Fixes for the input (joystick, USB) drivers

Hi!

The attached patch fixes many different little bugs in the USB input,
joystick input and core input drivers maintained by me.

drivers/char/joystick/adi.c:
Fix gamepad handling for Logitech ThunderPad Digital and WingMan Gamepad

drivers/char/joystick/gamecon.c
Fix PSX gamepad support - patch by Nathan Hand

drivers/char/joystick/iforce.c
Fix breakage caused by recent usb_submit_urb() changes

drivers/char/joystick/ns558.c
Fix the already fixed 'oops on rmmod' problem in a slightly different way
Fix another two possible causes for 'oops on rmmod'

drivers/char/joystick/sidewinder.c
Fix a missing button for Microsoft ForceFeedback Wheel

drivers/char/joystick/tmdc.c
Fix the ThrustMaster FragMaster by adding specific support,
generic support isn't good enough

drivers/input/evdev.c
Fix two possible overflow cases.
Add event write() support, needed badly

drivers/input/joydev.c
Fix two possible overflow cases.

drivers/input/mousedev.c
Fix two possible overflow cases.
Change 5-button support from GenPS/2 to ImExPS/2, making it
finally useful with XFree (which only supports ImExPS/2 5-button mice)
Add xmax and ymax module parameters, needed for binary distribution

drivers/usb/usbkbd.c
Fix breakage caused by recent usb_submit_urb() changes

drivers/usb/usbmouse.c
Unify the usb_submit_urb() fix to match usbkbd, wacom and others

drivers/usb/wacom.c
Fix the Intuos 4DMouse and Intuos Lens tool behavior (James E. Blair)

The patch is against 2.4.0-test10-pre5.

TIA.

--
Vojtech Pavlik
SuSE Labs


Attachments:
(No filename) (1.50 kB)
joybig2.diff (34.80 kB)
Download all attachments

2000-10-27 13:18:50

by David Woodhouse

[permalink] [raw]
Subject: mousedev uses userspace pointers without copy_{to,from}_user



static ssize_t mousedev_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
{
struct mousedev_list *list = file->private_data;
unsigned char c;
int i;

for (i = 0; i < count; i++) {

c = buffer[i];


oops. Can we make this die horribly on x86, just for a few kernel releases?
Along with turning on spinlock debugging, which would have shown up the USB
audio problem months ago.



--
dwmw2


2000-11-01 13:16:45

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: mousedev uses userspace pointers without copy_{to,from}_user

On Fri, Oct 27, 2000 at 02:17:51PM +0100, David Woodhouse wrote:
>
>
> static ssize_t mousedev_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
> {
> struct mousedev_list *list = file->private_data;
> unsigned char c;
> int i;
>
> for (i = 0; i < count; i++) {
>
> c = buffer[i];
>
>
> oops. Can we make this die horribly on x86, just for a few kernel releases?
> Along with turning on spinlock debugging, which would have shown up the USB
> audio problem months ago.

Ok, fixed in the CVS, a patch for the kernel to follow soon.

--
Vojtech Pavlik
SuSE Labs