Skip to content

Commit

Permalink
irnet_ppp: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent af96f01 commit cddf63d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/irda/irnet/irnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
#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>
Expand Down
3 changes: 3 additions & 0 deletions net/irda/irnet/irnet_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit cddf63d

Please sign in to comment.