]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow()
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 3 May 2012 05:43:09 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:11 +0000 (15:46 +1000)
commit5420d64868068774a2c117091180cadbf8e1a1e2
tree41444d513f72bf663970e82f653a90d2fdb09ebd
parent6830236e41b6c8a8de9e69c041e73ab81a841337
hugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow()

66aebce747eaf ("hugetlb: fix race condition in hugetlb_fault()") added
code to avoid a race condition by elevating the page refcount in
hugetlb_fault() while calling hugetlb_cow().

However, one code path in hugetlb_cow() includes an assertion that the
page count is 1, whereas it may now also have the value 2 in this path.

The consensus is that this BUG_ON has served its purpose, so rather than
extending it to cover both cases, we just remove it.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Hillf Danton <dhillf@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@vger.kernel.org> [3.0.29+, 3.2.16+, 3.3.3+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c