lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [git pull] vfs series, part 1
From
On Tue, Aug 10, 2010 at 6:35 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>        Assorted work from the last cycle; among other things, there's
> a filesystem API change (->evict_inode() series), a lot of truncate
> rework stuff (mostly by Chris) and a bunch of fixes.

Linux 2.6.36-rc1 seemed to break my UML hostfs setup or well, make it
behave in very odd ways.. No matter what directory I'm trying to read
from hostfs in UML, the root directory seems to be returned. I have
hostfs mounted in UML into /mnt/host and "ls /mnt/host" and "ls
/mnt/host/etc" show the same directory. Actually, any unknown
directory like "/mnt/host/does-not-exist" shows the same root
directory.. Obviously something is going quite wrong in mapping the
path name to directory entry.

Based on a quick git bisect, the main part of the issue seems to be
caused or at least triggered by a change in this set:

>      hostfs: fix races in dentry_name() and inode_name()

e9193059b1b3733695d5b80e667778311695aa73 is the first bad commit
commit e9193059b1b3733695d5b80e667778311695aa73
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Sun Jun 6 23:16:34 2010 -0400

hostfs: fix races in dentry_name() and inode_name()

calculating size, then doing allocation, then filling the
path is a Bad Idea(tm), since the ancestors can be renamed,
leading to buffer overrun.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

In addition, reverting just that commit allows hostfs to be used with
2.6.36-rc1. Though, there seems to be some additional issues with
symlinks, so there could be something else related to this change that
is actually causing the problems. The other issues result in memory
allocation failing when reading symlinks:

# ls /mnt/host/
ls: cannot read symbolic link /mnt/host/vmlinuz: Cannot allocate memory
ls: cannot read symbolic link /mnt/host/vmlinuz.old: Cannot allocate memory

(this is not only limited to ls; "ln -s p.patch a.patch; cat a.patch"
results in same from cat)

Other than that, hostfs seems to be working, though.

Any idea what caused this regression and how to fix it properly? I can
work around this by reverting the patch pointed out by git bisect, but
surely that is not the proper fix for the issues.

- Jouni
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-08-17 15:17    [W:0.053 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site