linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Al Viro <viro@ZenIV.linux.org.uk>,
	Frank Mayhar <fmayhar@google.com>,
	John Stultz <johnstul@us.ibm.com>,
	Andi Kleen <ak@linux.intel.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [patch 2/2] tty fix fu_list abuse
Date: Thu, 8 Jul 2010 02:17:20 +1000	[thread overview]
Message-ID: <20100707161720.GA9263@laptop> (raw)
In-Reply-To: <20100707160835.GA9681@lst.de>

On Wed, Jul 07, 2010 at 06:08:35PM +0200, Christoph Hellwig wrote:
> On Wed, Jul 07, 2010 at 10:25:10PM +1000, Nick Piggin wrote:
> > tty: fix fu_list abuse
> > 
> > tty code abuses fu_list, which causes a bug in remount,ro handling.
> > 
> > If a tty device node is opened on a filesystem, then the name unlinked, the
> > filesystem will be allowed to be remounted readonly. This is because
> > fs_may_remount_ro does not find the 0 link tty inode on the file sb list
> > (because the tty code incorrectly removed it to use for its own purpose). This
> > can result in a filesystem with errors after it is marked "clean".  So add a
> > new private list for ttys and leave tty files on the sb list so they are caught
> > by this check. This makes tty nodes behave the same way as other device nodes.
> > 
> > The next step is to allocate a tty private structure at private_data and get
> > rid of f_ttyonly_list, but the error handling is not trivial in the tty code.
> > Hence this intermediate step.
> 
> Growing struct file by two pointers for the tty special case simply
> isn't acceptable.  

I agree, so it can be removed when tty gets its act together. But tty
breaks the s_files list right now which is not acceptable either. So I
think it is better to take the simple fix that can be easily applied. I
liked your patch, but error handling was totally broken in it so that
indicates it is going to require some maturing in the tty tree.

      reply	other threads:[~2010-07-07 16:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 12:24 [patch 1/2] fs: cleanup files_lock locking Nick Piggin
2010-07-07 12:25 ` [patch 2/2] tty fix fu_list abuse Nick Piggin
2010-07-07 16:08   ` Christoph Hellwig
2010-07-07 16:17     ` Nick Piggin [this message]

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=20100707161720.GA9263@laptop \
    --to=npiggin@suse.de \
    --cc=ak@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ebiederm@xmission.com \
    --cc=fmayhar@google.com \
    --cc=gregkh@suse.de \
    --cc=hch@lst.de \
    --cc=johnstul@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).