patch-2.4.0-test4 linux/drivers/usb/mousedev.c
Next file: linux/drivers/usb/ov511.c
Previous file: linux/drivers/usb/mdc800.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/mousedev.c
- Orig date:
Fri Jun 23 21:55:10 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/usb/mousedev.c linux/drivers/usb/mousedev.c
@@ -38,6 +38,7 @@
#include <linux/init.h>
#include <linux/input.h>
#include <linux/config.h>
+#include <linux/smp_lock.h>
#ifndef CONFIG_INPUT_MOUSEDEV_SCREEN_X
#define CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
@@ -159,8 +160,10 @@
static int mousedev_release(struct inode * inode, struct file * file)
{
struct mousedev_list *list = file->private_data;
- struct mousedev_list **listptr = &list->mousedev->list;
+ struct mousedev_list **listptr;
+ lock_kernel();
+ listptr = &list->mousedev->list;
mousedev_fasync(-1, file, 0);
while (*listptr && (*listptr != list))
@@ -197,6 +200,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)