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:
bbe48ec
)
vt: hold console_sem across sysfs operations
author
Jiri Slaby
<
[email protected]
>
Thu, 24 Jul 2008 04:29:58 +0000
(21:29 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 24 Jul 2008 17:47:30 +0000
(10:47 -0700)
Hold console sem while creating/destroying sysfs files. Serialisation is
so far done by BKL held in tty release_dev and chrdev_open, but no other
locks are held in open path.
Signed-off-by: Jiri Slaby <
[email protected]
>
Cc: Alan Cox <
[email protected]
>
Cc: Aristeu Rozanski <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/vt.c
patch
|
blob
|
history
diff --git
a/drivers/char/vt.c
b/drivers/char/vt.c
index e32a076d5f1f8f182025341d98d3a89f25a9f4f8..ab53a1d4d89504eb1dc6fdefaadbf027bf8482e4 100644
(file)
--- a/
drivers/char/vt.c
+++ b/
drivers/char/vt.c
@@
-2749,8
+2749,8
@@
static int con_open(struct tty_struct *tty, struct file *filp)
tty->termios->c_iflag |= IUTF8;
else
tty->termios->c_iflag &= ~IUTF8;
- release_console_sem();
vcs_make_sysfs(tty);
+ release_console_sem();
return ret;
}
}
@@
-2775,8
+2775,8
@@
static void con_close(struct tty_struct *tty, struct file *filp)
if (vc)
vc->vc_tty = NULL;
tty->driver_data = NULL;
- release_console_sem();
vcs_remove_sysfs(tty);
+ release_console_sem();
mutex_unlock(&tty_mutex);
/*
* tty_mutex is released, but we still hold BKL, so there is