]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] enforce proper tlb flush in unmap_hugepage_range
authorChen, Kenneth W <kenneth.w.chen@intel.com>
Wed, 4 Oct 2006 09:15:24 +0000 (02:15 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 14:55:12 +0000 (07:55 -0700)
commit39dddd33f56aed583443ed3e9652e7c6e8297e20
treea1ad042a0c9b604653ca24645358fe31d1bbcfd6
parented71f3e3e5ed8d90b7a161a8f0f6792c92bb4793
[PATCH] enforce proper tlb flush in unmap_hugepage_range

Spotted by Hugh that hugetlb page is free'ed back to global pool before
performing any TLB flush in unmap_hugepage_range().  This potentially allow
threads to abuse free-alloc race condition.

The generic tlb gather code is unsuitable to use by hugetlb, I just open
coded a page gathering list and delayed put_page until tlb flush is
performed.

Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/hugetlb.c