lkml.org 
[lkml]   [2010]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] tty fix fu_list abuse
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.



\
 
 \ /
  Last update: 2010-07-07 18:11    [W:0.564 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site