]> err.no Git - linux-2.6/commitdiff
irnet_ppp: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:06 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:58 +0000 (14:05 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
net/irda/irnet/irnet.h
net/irda/irnet/irnet_ppp.c

index b001c361ad30976ff3a1de5bfe80fe2f0142b6f9..bccf4d0059f0a6a629bbd5913015b0453caaa5e9 100644 (file)
 #include <linux/module.h>
 
 #include <linux/kernel.h>
+#include <linux/smp_lock.h>
 #include <linux/skbuff.h>
 #include <linux/tty.h>
 #include <linux/proc_fs.h>
index e0eab5927c4f434d6210711525ac9b14ba34599e..e84a70dd346b7e48a350502699238286d6cf2f21 100644 (file)
@@ -479,6 +479,7 @@ dev_irnet_open(struct inode *       inode,
   ap = kzalloc(sizeof(*ap), GFP_KERNEL);
   DABORT(ap == NULL, -ENOMEM, FS_ERROR, "Can't allocate struct irnet...\n");
 
+  lock_kernel();
   /* initialize the irnet structure */
   ap->file = file;
 
@@ -500,6 +501,7 @@ dev_irnet_open(struct inode *       inode,
     {
       DERROR(FS_ERROR, "Can't setup IrDA link...\n");
       kfree(ap);
+      unlock_kernel();
       return err;
     }
 
@@ -510,6 +512,7 @@ dev_irnet_open(struct inode *       inode,
   file->private_data = ap;
 
   DEXIT(FS_TRACE, " - ap=0x%p\n", ap);
+  unlock_kernel();
   return 0;
 }