X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=arch%2Fum%2Fdrivers%2Fharddog_kern.c;h=d332503fa1beae1f54a53fbbb62356ea2113cfb1;hb=2aedd192f799c362ccefc3c316f0c4bd5154126b;hp=a9ad4bd6d953d2255d82e3776b816165e50a94aa;hpb=821f3eff7cdb9d6c7076effabd46c96c322daed1;p=karo-tx-linux.git 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) int err = -EBUSY; char *sock = NULL; + lock_kernel(); spin_lock(&lock); if(timer_alive) goto err; @@ -82,9 +83,11 @@ static int harddog_open(struct inode *inode, struct file *file) timer_alive = 1; spin_unlock(&lock); + unlock_kernel(); return nonseekable_open(inode, file); err: spin_unlock(&lock); + unlock_kernel(); return err; }