https://github.com/torvalds/linux
Revision 1c59827d1da9bcd6970800d4f8a031b5859e8b4c authored by Hugh Dickins on 20 October 2005, 04:23:43 UTC, committed by Linus Torvalds on 20 October 2005, 06:04:30 UTC
hugetlbfs allows truncation of its files (should it?), but hugetlb.c often
forgets that: crashes and misaccounting ensue.

copy_hugetlb_page_range better grab the src page_table_lock since we don't
want to guess what happens if concurrently truncated.  unmap_hugepage_range
rss accounting must not assume the full range was mapped.  follow_hugetlb_page
must guard with page_table_lock and be prepared to exit early.

Restyle copy_hugetlb_page_range with a for loop like the others there.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent e03d13e
History
Tip revision: 1c59827d1da9bcd6970800d4f8a031b5859e8b4c authored by Hugh Dickins on 20 October 2005, 04:23:43 UTC
[PATCH] mm: hugetlb truncation fixes
Tip revision: 1c59827
File Mode Size
Documentation
arch
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 391 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 87.1 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 59.6 KB
Makefile -rw-r--r-- 42.5 KB
README -rw-r--r-- 14.4 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top