* + hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix.patch added to -mm tree
@ 2011-01-06 21:28 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2011-01-06 21:28 UTC (permalink / raw)
To: mm-commits; +Cc: caiqian, aarcange, emunson, mhocko, nacc
The patch titled
hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix
has been added to the -mm tree. Its filename is
hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix
From: CAI Qian <caiqian@redhat.com>
add checking in hugetlb_overcommit_handler()
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 4 ++++
1 file changed, 4 insertions(+)
diff -puN mm/hugetlb.c~hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix mm/hugetlb.c
--- a/mm/hugetlb.c~hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix
+++ a/mm/hugetlb.c
@@ -1456,6 +1456,7 @@ static ssize_t nr_overcommit_hugepages_s
struct hstate *h = kobj_to_hstate(kobj, NULL);
return sprintf(buf, "%lu\n", h->nr_overcommit_huge_pages);
}
+
static ssize_t nr_overcommit_hugepages_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
@@ -1942,6 +1943,9 @@ int hugetlb_overcommit_handler(struct ct
if (!write)
tmp = h->nr_overcommit_huge_pages;
+ if (write && h->order >= MAX_ORDER)
+ return -EINVAL;
+
table->data = &tmp;
table->maxlen = sizeof(unsigned long);
ret = proc_doulongvec_minmax(table, write, buffer, length, ppos);
_
Patches currently in -mm which might be from caiqian@redhat.com are
hugetlb-check-the-return-value-of-string-conversion-in-sysctl-handler.patch
hugetlb-check-the-return-value-of-string-conversion-in-sysctl-handler-fix.patch
hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment.patch
hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix.patch
hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix.patch
hugetlb-fix-handling-of-parse-errors-in-sysfs.patch
hugetlb-handle-nodemask_alloc-failure-correctly.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-06 21:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 21:28 + hugetlb-do-not-allow-pagesize-=-max_order-pool-adjustment-fix-fix.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.