From: dann frazier <dannf@dannf.org>
To: Willy Tarreau <w@1wt.eu>
Cc: Glen Nakamura <glen@imodulo.com>, linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: 2.4.36.1 hangs.
Date: Tue, 26 Feb 2008 03:13:46 -0700 [thread overview]
Message-ID: <20080226101346.GB20166@colo.lackof.org> (raw)
In-Reply-To: <20080226081624.GA20022@1wt.eu>
On Tue, Feb 26, 2008 at 09:16:25AM +0100, Willy Tarreau wrote:
> On Mon, Feb 25, 2008 at 09:36:12PM -1000, Glen Nakamura wrote:
> > Aloha,
> >
> > The "ext2_readdir() filp->f_pos fix" patch looks weird...
> > Perhaps the "filp->f_pos += le16_to_cpu(de->rec_len);" line should be
> > outside of the if statement like the indentation implies?
>
> good catch! At least it's what is done in 2.6.
Yes, that certainly looks like a bug.
> > As it is, filp->f_pos gets corrupted if de->inode is ever zero...
> > This could possibly explain why I had a few strange directory
> > entries until I checked the filesystem with:
> > e2fsck -D -F -f /dev/{ext2 partition}
> >
> > - glen
> >
> > Here is an updated (untested) patch:
>
> unfortunately, neither Dann nor me could reproduce the issue, so
> we'll wait for some victims^Wvolunteers to give it a try.
I'm now able to reliably reproduce it by creating/removing a chroot
(pbuilder create on a Debian system, though I'm sure a simpler test
exists). Correcting the le16_to_cpu placement as Glen described
fixes the issue for me.
> BTW, I notice that 2.6 also has one extra chunk that 2.4 does not
> have :
>
> if (unlikely(need_revalidate)) {
> + if (offset) {
> offset = ext2_validate_entry(kaddr, offset, chunk_mask);
> + filp->f_pos = (n<<PAGE_CACHE_SHIFT) + offset;
> + }
> + filp->f_version = inode->i_version;
> need_revalidate = 0;
> }
>
> I have no idea whether this part is needed, we'd better ask Theo or Al
> for some advices, as I'm not tempted by merging an uncertain patch when
> it comes to filesystems.
Looks like a test case may be available:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2d7f2ea9c989853310c7f6e8be52cc090cc8e66b
--
dann frazier
next prev parent reply other threads:[~2008-02-26 10:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 14:08 Unknown
2008-02-23 8:30 ` Willy Tarreau
2008-02-24 18:12 ` Pascal Hambourg
2008-02-24 18:28 ` Willy Tarreau
2008-02-26 7:36 ` Glen Nakamura
2008-02-26 8:16 ` Willy Tarreau
2008-02-26 10:13 ` dann frazier [this message]
2008-02-26 10:27 ` Willy Tarreau
2008-02-26 13:54 ` Pascal Hambourg
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=20080226101346.GB20166@colo.lackof.org \
--to=dannf@dannf.org \
--cc=glen@imodulo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=w@1wt.eu \
/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®