From: Johann D. <jo...@Do...> - 2002-01-29 18:35:56
|
On Tue, 29 Jan 2002, Vojtech Pavlik wrote: > On Mon, Jan 28, 2002 at 09:58:39PM +0100, Johann Deneux wrote: > > Hi, > > > > When I turn off my I-Force wheel while a process having opened its > > /dev/input/eventX entry is still running, strange things happen. I made > > trials with evtest and fftest. Both crash. They either crash immediately, > > on exit or when I press a key on my keyboard. Other strange behaviours are > > mouse clicks being uneffective, the wm unwilling to change focus (I use > > sloppy focus). The pointer of the mouse goes on moving, however. > > All this happens with a patched 2.4.17 kernel (with my input-only > > patch). I will try to see what happens with the latest CVS version as soon > > as I can get it working. > > Just use 2.5.2-dj6, it's all there ... After sending the mail yesterday, I fetched the dj6 patch. I see a few differences here and there (do_gettimeofday instead of get_fast_time, for example). Perhaps it would be a good idea to keep the tree in sync with dave jones' tree (instead of linus' one). This will have the side effect that the work of dave will become easier, as we commit back the changes he did. If I understand the plans, linuxconsole is going to go through dave's tree before getting to linus anyway, or ? > > > Anyway, I think there should be a test on evdev->exist in every entry > > function (evdev_read, ioctl, write, release, flush ...). Adding these > > tests did not solve the problem, though. > > That shouldn't be needed. The structs associated are freed only after > the file descriptor is closed. Yes, but some input_* functions may be called. Depending on how input.c is coded, that could be ok, but I have no idea right now. Let's have a look. Imagine a process tries to send events to a non-existing device. It writes to the dev entry. evdev_write is called, which calls input_event. Is the struct input_dev *dev parameter correct ? In the case of hid, it seems ok, as the hid pointer in hid_disconnect isn not kfreed (isn't that a memory leak ?). In iforce, it is, which most certainly causes problems. I see another possible problem. After a usb disconnect, the usb_device is "closed" by the usb system. Is it ok then to unregister it (again ?) in hid_exit ? -- Johann Deneux |