Messages in this thread | | | Date | Tue, 27 May 2008 15:43:57 -0400 | From | Aristeu Rozanski <> | Subject | Re: [PATCH 1/1] Char: vt, make sysfs operations atomic |
| |
> 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. > > tty->termios->c_iflag |= IUTF8; > else > tty->termios->c_iflag &= ~IUTF8; > - release_console_sem(); > vcs_make_sysfs(tty); > + release_console_sem(); > return ret; > } > } > @@ -2772,8 +2772,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 the reason for the code be the way it is is because vcs_{add,remove}_sysfs() may sleep
-- Aristeu
| |