]> err.no Git - linux-2.6/commit
hugetlb: fix overcommit locking
authorNishanth Aravamudan <nacc@us.ibm.com>
Wed, 13 Feb 2008 23:03:19 +0000 (15:03 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 14 Feb 2008 00:21:18 +0000 (16:21 -0800)
commit064d9efe947542097be669581f82d6b097e81d1a
treeddfc9f1c4d60135a7d7a1c5ebb7d0e85f683cfcb
parent2695a14d315c014474ccadbaed40b0169b00cb5b
hugetlb: fix overcommit locking

proc_doulongvec_minmax() calls copy_to_user()/copy_from_user(), so we can't
hold hugetlb_lock over the call.  Use a dummy variable to store the sysctl
result, like in hugetlb_sysctl_handler(), then grab the lock to update
nr_overcommit_huge_pages.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Reported-by: Miles Lane <miles.lane@gmail.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/hugetlb.h
kernel/sysctl.c
mm/hugetlb.c