diff options
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/harddog_kern.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c index a9ad4bd6d953..d332503fa1be 100644 --- a/arch/um/drivers/harddog_kern.c +++ b/arch/um/drivers/harddog_kern.c | |||
@@ -66,6 +66,7 @@ static int harddog_open(struct inode *inode, struct file *file) | |||
66 | int err = -EBUSY; | 66 | int err = -EBUSY; |
67 | char *sock = NULL; | 67 | char *sock = NULL; |
68 | 68 | ||
69 | lock_kernel(); | ||
69 | spin_lock(&lock); | 70 | spin_lock(&lock); |
70 | if(timer_alive) | 71 | if(timer_alive) |
71 | goto err; | 72 | goto err; |
@@ -82,9 +83,11 @@ static int harddog_open(struct inode *inode, struct file *file) | |||
82 | 83 | ||
83 | timer_alive = 1; | 84 | timer_alive = 1; |
84 | spin_unlock(&lock); | 85 | spin_unlock(&lock); |
86 | unlock_kernel(); | ||
85 | return nonseekable_open(inode, file); | 87 | return nonseekable_open(inode, file); |
86 | err: | 88 | err: |
87 | spin_unlock(&lock); | 89 | spin_unlock(&lock); |
90 | unlock_kernel(); | ||
88 | return err; | 91 | return err; |
89 | } | 92 | } |
90 | 93 | ||