patch-2.4.0-test4 linux/drivers/char/wdt.c
Next file: linux/drivers/char/wdt285.c
Previous file: linux/drivers/char/videodev.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Wed Jul 12 21:58:42 2000
- Orig file:
v2.4.0-test3/linux/drivers/char/wdt.c
- Orig date:
Fri Jun 23 21:55:08 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/char/wdt.c linux/drivers/char/wdt.c
@@ -35,6 +35,7 @@
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <linux/smp_lock.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include "wd501p.h"
@@ -372,6 +373,7 @@
static int wdt_release(struct inode *inode, struct file *file)
{
+ lock_kernel();
if(MINOR(inode->i_rdev)==WATCHDOG_MINOR)
{
#ifndef CONFIG_WATCHDOG_NOWAYOUT
@@ -380,6 +382,7 @@
#endif
wdt_is_open=0;
}
+ 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)