From: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
To: Jim Washer <e2big@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: CONFIRMED bug in do_generic_file_read
Date: Fri, 13 May 2005 08:57:43 +0100 [thread overview]
Message-ID: <20050513075743.GG1150@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <200505130057.j4D0vvh08761@crg8.beaverton.ibm.com>
On Thu, May 12, 2005 at 05:57:57PM -0700, Jim Washer wrote:
> Well, my original post got ZERO responses, but I've continued to look
> at this, and with the help of a colleague I think we've bottomed out.
> do_generic_file_read does indeed have a bug, as mentioned below. However,
> this bug is generally not hit as the call to a_ops->readpage (normally
> pointing at blkdev_readpage) NEVER returns an error. However, the Veritas
> code's readpage does return errors, and this triggers this KERNEL BUG.
Hardly. What it does, apparently, is extra page_cache_release().
> I don't know enough about the page cache to know if simply NULLing the
> page->mapping pointer is safe.
Analysis above is BS.
a) page with non-NULL ->mapping == page in cache. Code that adds
page to page cache grabs a reference before putting it on the lists.
b) code that evicts page from cache drops a reference after getting
the sucker off lists.
c) final page_cache_release() while page is still in cache is,
indeed, a bug. Of memory-corrupting variety.
d) ->readpage() has no fscking business playing with any of the above.
e) while we are at it, -EFAULT is a hell of a strange error for
->readpage(), but that's a separate story.
Check for unbalanced page_cache_release() in their code.
> Anyone care to address this?
See above. Anything beyond that requires
1) access to their code
2) good supply of industrial-strength barf-bags to deal with
inevitable consequences of (1).
next prev parent reply other threads:[~2005-05-13 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 0:57 CONFIRMED bug in do_generic_file_read Jim Washer
2005-05-13 7:57 ` Al Viro [this message]
[not found] ` <OFF1B70B69.DFDD4B59-ON88257000.004A3F64-88257000.004B2949@us.ibm.com>
2005-05-13 15:17 ` Al Viro
[not found] ` <OF77CCCDF4.63E93C67-ON88257000.0060D4EE-88257000.006248F5@us.ibm.com>
2005-05-13 18:20 ` Al Viro
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=20050513075743.GG1150@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=e2big@us.ibm.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