All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfs: clear_commit_release incorrectly handle truncated page
Date: Tue, 02 Feb 2010 18:17:07 +0300	[thread overview]
Message-ID: <87eil3pszw.fsf@openvz.org> (raw)
In-Reply-To: <1265123045.3177.21.camel@localhost> (Trond Myklebust's message of "Tue, 02 Feb 2010 10:04:05 -0500")

Trond Myklebust <trond.myklebust@fys.uio.no> writes:

> On Tue, 2010-02-02 at 13:36 +0300, Dmitry Monakhov wrote: 
>> After page was truncated it lost it's mapping, this result in null
>> pointer dereference on bdi_stat update. In fact we have to decrement
>> bdi_stat even for truncated pages, so let's pass correct mapping in
>> function arguments. Patch against linux-2.6
>> ##TEST_CASE
>> /*
>> Tast case for bug in nfs_clear_request_commit()
>> caused by null pointer dereference in case of truncated page.
>> It takes less than 10 minutes to reproduce the bug.
>
> Something is wrong here. nfs_release_page() returns '0' if the 
> page has an associated write request (i.e. PagePrivate is set), and so
> both invalidate_complete_page() and invalidate_complete_page2() will
> fail.
>
> So what is truncating the page?
truncate_inode_page()
  truncate_complete_page()
    if (page_has_private(page))
       do_invalidatepage()
         ->nfs_invalidate_page()
>
> Trond

  reply	other threads:[~2010-02-02 15:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02 10:36 [PATCH] nfs: clear_commit_release incorrectly handle truncated page Dmitry Monakhov
2010-02-02 15:04 ` Trond Myklebust
2010-02-02 15:17   ` Dmitry Monakhov [this message]
2010-02-02 15:36     ` Trond Myklebust
2010-02-02 15:56       ` Dmitry Monakhov
2010-02-02 16:17         ` Trond Myklebust
2010-02-02 16:47           ` Dmitry Monakhov
2010-02-02 17:00             ` Trond Myklebust
2010-02-02 17:09               ` Dmitry Monakhov
2010-02-02 19:54                 ` Trond Myklebust
2010-02-02 20:19                   ` Chuck Lever
2010-02-02 20:26                     ` Trond Myklebust

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=87eil3pszw.fsf@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.