]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: hugetlb sysctl annotation
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 17:38:59 +0000 (10:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 17:38:59 +0000 (10:38 -0700)
include/linux/hugetlb.h
mm/hugetlb.c

index a38c1bd754cb1cd374d09ba7c11ea5c4de11e781..6908f29d3eaf47ccfbfbf5d4a5f3aff913cb3b4f 100644 (file)
@@ -12,7 +12,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
        return vma->vm_flags & VM_HUGETLB;
 }
 
-int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void *, size_t *);
+int hugetlb_sysctl_handler(struct ctl_table *, int, struct file *, void __user *, size_t *);
 int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *);
 int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, int *, int);
 void zap_hugepage_range(struct vm_area_struct *, unsigned long, unsigned long);
index d676d5ed7cd41917a9f89b4a1ea5be6681568f18..bce0d47a42a27722ccc8d822886067f89d5e06cc 100644 (file)
@@ -182,7 +182,8 @@ static unsigned long set_max_huge_pages(unsigned long count)
 
 #ifdef CONFIG_SYSCTL
 int hugetlb_sysctl_handler(struct ctl_table *table, int write,
-                          struct file *file, void *buffer, size_t *length)
+                          struct file *file, void __user *buffer,
+                          size_t *length)
 {
        proc_doulongvec_minmax(table, write, file, buffer, length);
        max_huge_pages = set_max_huge_pages(max_huge_pages);