linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] special_mapping_fault() is broken
@ 2015-07-10 16:51 Oleg Nesterov
  2015-07-10 16:51 ` [PATCH v2 1/3] mm: introduce vma_is_anonymous(vma) helper Oleg Nesterov
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Oleg Nesterov @ 2015-07-10 16:51 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Andy Lutomirski, Hugh Dickins, Kirill Shutemov, Linus Torvalds,
	Pavel Emelyanov, linux-kernel

Hello,

special_mapping_fault() is absolutely broken. It seems it was always
wrong, but this didn't matter until vdso/vvar started to use more than
one page.

The patches are the same, just 1/3 was re-diffed on top of the recent
6b7339f4c31ad "mm: avoid setting up anonymous pages into file mapping"
from Kirill.

And after this change vma_is_anonymous() becomes really trivial, it
simply checks vm_ops == NULL. However, I do think the helper makes
sense. There are a lot of ->vm_ops != NULL checks, the helper makes
the caller's code more understandable (self-documented) and this is
more grep-friendly.

Oleg.

 include/linux/mm.h |    5 +++++
 mm/memory.c        |    8 ++++----
 mm/mmap.c          |   14 +++-----------
 3 files changed, 12 insertions(+), 15 deletions(-)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-11 23:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10 16:51 [PATCH v2 0/3] special_mapping_fault() is broken Oleg Nesterov
2015-07-10 16:51 ` [PATCH v2 1/3] mm: introduce vma_is_anonymous(vma) helper Oleg Nesterov
2015-07-10 16:51 ` [PATCH v2 2/3] mmap: fix the usage of ->vm_pgoff in special_mapping paths Oleg Nesterov
2015-07-10 16:51 ` [PATCH v2 3/3] mremap: fix the wrong !vma->vm_file check in copy_vma() Oleg Nesterov
2015-07-10 17:08 ` [PATCH v2 0/3] special_mapping_fault() is broken Kirill A. Shutemov
2015-07-10 18:20 ` Davidlohr Bueso
2015-07-10 21:52 ` Andrew Morton
2015-07-11 23:43   ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).