From: Aristeu Rozanski <aris@ruivo.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 1/1] Char: vt, make sysfs operations atomic
Date: Tue, 27 May 2008 15:43:57 -0400 [thread overview]
Message-ID: <20080527194357.GA12185@cathedrallabs.org> (raw)
In-Reply-To: <1211802812-13658-1-git-send-email-jirislaby@gmail.com>
> 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
next prev parent reply other threads:[~2008-05-27 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 11:53 Jiri Slaby
2008-05-26 11:58 ` Alan Cox
2008-05-27 19:43 ` Aristeu Rozanski [this message]
2008-05-27 20:27 ` Jiri Slaby
2008-05-27 20:48 ` Aristeu Rozanski
2008-05-28 22:57 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080527194357.GA12185@cathedrallabs.org \
--to=aris@ruivo.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®