]> git.itanic.dy.fi Git - linux-stable/commit
hugetlb: add locking for overcommit sysctl
authorNishanth Aravamudan <nacc@us.ibm.com>
Fri, 8 Feb 2008 12:18:18 +0000 (04:18 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Feb 2008 00:18:32 +0000 (16:18 -0800)
commit091a61f602b7db7f4d1fdcb41e6ff9a97a6e0cce
tree7fc9bcea67c3491bbdc10aa3310ca08f498aa1aa
parent0cc3ec3d1add90d860786382dc5abe7ca94d242e
hugetlb: add locking for overcommit sysctl

patch a3d0c6aa1bb342b9b2c7b123b52ac2f48a4d4d0a in mainline.

When I replaced hugetlb_dynamic_pool with nr_overcommit_hugepages I used
proc_doulongvec_minmax() directly.  However, hugetlb.c's locking rules
require that all counter modifications occur under the hugetlb_lock.  Add a
callback into the hugetlb code similar to the one for nr_hugepages.  Grab
the lock around the manipulation of nr_overcommit_hugepages in
proc_doulongvec_minmax().

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: William Lee Irwin III <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/hugetlb.h
kernel/sysctl.c
mm/hugetlb.c