Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100300
b: refs/heads/master
c: 39d95b9
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 26d3e0d commit 063be8f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c43ef17450dce8cbf50f97497a1949ff8f484e88
refs/heads/master: 39d95b9d857ad9ed335dd1a2d6c6de1f1ee69ce1
27 changes: 25 additions & 2 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ static void release_dev(struct file *filp)
* ->siglock protects ->signal/->sighand
*/

static int tty_open(struct inode *inode, struct file *filp)
static int __tty_open(struct inode *inode, struct file *filp)
{
struct tty_struct *tty;
int noctty, retval;
Expand Down Expand Up @@ -2779,6 +2779,19 @@ static int tty_open(struct inode *inode, struct file *filp)
return 0;
}

/* BKL pushdown: scary code avoidance wrapper */
static int tty_open(struct inode *inode, struct file *filp)
{
int ret;

lock_kernel();
ret = __tty_open(inode, filp);
unlock_kernel();
return ret;
}



#ifdef CONFIG_UNIX98_PTYS
/**
* ptmx_open - open a unix 98 pty master
Expand All @@ -2792,7 +2805,7 @@ static int tty_open(struct inode *inode, struct file *filp)
* allocated_ptys_lock handles the list of free pty numbers
*/

static int ptmx_open(struct inode *inode, struct file *filp)
static int __ptmx_open(struct inode *inode, struct file *filp)
{
struct tty_struct *tty;
int retval;
Expand Down Expand Up @@ -2831,6 +2844,16 @@ static int ptmx_open(struct inode *inode, struct file *filp)
devpts_kill_index(index);
return retval;
}

static int ptmx_open(struct inode *inode, struct file *filp)
{
int ret;

lock_kernel();
ret = __ptmx_open(inode, filp);
unlock_kernel();
return ret;
}
#endif

/**
Expand Down

0 comments on commit 063be8f

Please sign in to comment.