patch-2.4.0-test4 linux/drivers/usb/evdev.c
Next file: linux/drivers/usb/hub.c
Previous file: linux/drivers/usb/devices.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Wed Jul 12 21:58:43 2000
- Orig file:
v2.4.0-test3/linux/drivers/usb/evdev.c
- Orig date:
Fri Jun 23 21:55:10 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/usb/evdev.c linux/drivers/usb/evdev.c
@@ -37,6 +37,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
+#include <linux/smp_lock.h>
struct evdev {
int exist;
@@ -91,8 +92,10 @@
static int evdev_release(struct inode * inode, struct file * file)
{
struct evdev_list *list = file->private_data;
- struct evdev_list **listptr = &list->evdev->list;
+ struct evdev_list **listptr;
+ lock_kernel();
+ listptr = &list->evdev->list;
evdev_fasync(-1, file, 0);
while (*listptr && (*listptr != list))
@@ -110,6 +113,7 @@
}
kfree(list);
+ unlock_kernel();
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)