Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180333
b: refs/heads/master
c: 6339204
h: refs/heads/master
i:
  180331: aceed37
v: v3
  • Loading branch information
Linus Torvalds committed Feb 7, 2010
1 parent 10132ac commit 4bd7e43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: 89068c576bf324ef6fbd50dfc745148f7def202c
refs/heads/master: 6339204ecc2aa2067a99595522de0403f0854bb8
4 changes: 3 additions & 1 deletion trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1951,8 +1951,10 @@ static int tty_fasync(int fd, struct file *filp, int on)
pid = task_pid(current);
type = PIDTYPE_PID;
}
retval = __f_setown(filp, pid, type, 0);
get_pid(pid);
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
retval = __f_setown(filp, pid, type, 0);
put_pid(pid);
if (retval)
goto out;
} else {
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
{
unsigned long flags;

write_lock_irqsave(&filp->f_owner.lock, flags);
write_lock_irq(&filp->f_owner.lock);
if (force || !filp->f_owner.pid) {
put_pid(filp->f_owner.pid);
filp->f_owner.pid = get_pid(pid);
Expand All @@ -213,7 +211,7 @@ static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
filp->f_owner.euid = cred->euid;
}
}
write_unlock_irqrestore(&filp->f_owner.lock, flags);
write_unlock_irq(&filp->f_owner.lock);
}

int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
Expand Down

0 comments on commit 4bd7e43

Please sign in to comment.