linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: akpm@linux-foundation.org, robert@swiecki.net,
	lkml20101129@newton.leun.net, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: kernel BUG at mm/truncate.c:475!
Date: Wed, 15 Dec 2010 16:26:11 -0800 (PST)	[thread overview]
Message-ID: <alpine.LSU.2.00.1012151542480.7987@tigran.mtv.corp.google.com> (raw)
In-Reply-To: <E1PSpQw-0005s5-QW@pomaz-ex.szeredi.hu>

On Wed, 15 Dec 2010, Miklos Szeredi wrote:
> On Tue, 14 Dec 2010, Hugh Dickins wrote:
> > I'd feel rather happier about it if I thought it would also fix
> > Robert's kernel BUG at /build/buildd/linux-2.6.35/mm/filemap.c:128!
> > but I've still not found time to explain that one.
> 
> Me neither, all unmap_mapping_range() calls from shmfs are either with
> i_mutex or from evict_inode.

And the page returned by shmem_fault is already locked.

> 
> Hmm, is there anything preventing remap_file_pages() installing a pte
> at an address that unmap_mapping_range() has already processed?

Interesting line of thought: nothing I think, but isn't that okay?

Though its zap_pte can take out present ptes pointing to actual pages,
all populate_range ever installs is non-present pte_file entries: and a
fault on one of those goes through the same checks as in a linear mapping.

(I thought I was going to find an inconsistency with zap_pte_range there,
but no: truncation does not remove pte_file entries beyond end of file,
I remember now thinking that we need to keep SIGBUS-beyond-EOF on them,
instead of letting truncation silently revert those offsets to linear.)

Or am I missing something?
(Well, we know I am, because I've not explained Robert's BUG.)

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-12-16  0:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101130194945.58962c44@xenia.leun.net>
2010-11-30 23:00 ` Hugh Dickins
2010-12-01 10:25   ` Miklos Szeredi
2010-12-01 11:45     ` Michael Leun
2010-12-01 17:22       ` Miklos Szeredi
2010-12-02  7:41         ` Michael Leun
2010-12-02  8:15           ` Michael Leun
2010-12-02  9:42             ` Miklos Szeredi
2010-12-02 10:57               ` Michael Leun
2010-12-03  7:53                 ` Michael Leun
2010-12-06 12:36                   ` Miklos Szeredi
2010-12-06 19:43                     ` Michael Leun
2010-12-11 14:14                       ` Miklos Szeredi
2010-12-11 19:50                         ` Michael Leun
2010-12-13 22:20                         ` Andrew Morton
2010-12-14  7:31                           ` Hugh Dickins
2010-12-14  9:10                             ` Peter Zijlstra
2010-12-14  9:11                             ` Peter Zijlstra
2010-12-14 10:45                           ` Miklos Szeredi
2010-12-15  4:32                             ` Hugh Dickins
2010-12-15 11:22                               ` Miklos Szeredi
2010-12-16  0:26                                 ` Hugh Dickins [this message]
2010-12-16 14:50                               ` Robert Święcki
2010-12-16 19:05                                 ` Hugh Dickins

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=alpine.LSU.2.00.1012151542480.7987@tigran.mtv.corp.google.com \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkml20101129@newton.leun.net \
    --cc=miklos@szeredi.hu \
    --cc=robert@swiecki.net \
    /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