projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d54aaf
)
tty: make sure that proc_clear_tty stores the cpu flags
author
Arjan van de Ven
<
[email protected]
>
Wed, 15 Oct 2008 09:52:34 +0000
(10:52 +0100)
committer
Linus Torvalds
<
[email protected]
>
Wed, 15 Oct 2008 17:19:51 +0000
(10:19 -0700)
proc_clear_tty() gets called with interrupts off (while holding the task list
lock) from sys_setid. This means that it needs the _irqsave version of the
locking primitives.
Reported-by: Marcin Slusarz <
[email protected]
>
Tested-by: Marcin Slusarz <
[email protected]
>
Signed-off-by: Arjan van de Ven <
[email protected]
>
Signed-off-by: Alan Cox <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/tty_io.c
patch
|
blob
|
history
diff --git
a/drivers/char/tty_io.c
b/drivers/char/tty_io.c
index 7053d6333692d7bd8fcd112a4dfc8bac783ccbc0..3f48d88cffc046445202cdaece8c346cb272add7 100644
(file)
--- a/
drivers/char/tty_io.c
+++ b/
drivers/char/tty_io.c
@@
-3032,11
+3032,12
@@
EXPORT_SYMBOL(tty_devnum);
void proc_clear_tty(struct task_struct *p)
{
+ unsigned long flags;
struct tty_struct *tty;
- spin_lock_irq
(&p->sighand->siglock
);
+ spin_lock_irq
save(&p->sighand->siglock, flags
);
tty = p->signal->tty;
p->signal->tty = NULL;
- spin_unlock_irq
(&p->sighand->siglock
);
+ spin_unlock_irq
restore(&p->sighand->siglock, flags
);
tty_kref_put(tty);
}