USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid
[linux-2.6.git] / security / min_addr.c
index c844eed..f728728 100644 (file)
@@ -33,6 +33,9 @@ int mmap_min_addr_handler(struct ctl_table *table, int write,
 {
        int ret;
 
+       if (write && !capable(CAP_SYS_RAWIO))
+               return -EPERM;
+
        ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 
        update_mmap_min_addr();
@@ -40,7 +43,7 @@ int mmap_min_addr_handler(struct ctl_table *table, int write,
        return ret;
 }
 
-int __init init_mmap_min_addr(void)
+static int __init init_mmap_min_addr(void)
 {
        update_mmap_min_addr();