kernel: bump 4.9 to 4.9.202
[openwrt/staging/wigyori.git] / target / linux / generic / hack-4.9 / 902-debloat_proc.patch
index 91d1d283511b78e4db4be79eb839ad39d285a173..cb13f0ff0255a0a41b3a77b4d2fe7ceb7dd106dc 100644 (file)
@@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!root_irq_dir)
 --- a/kernel/time/timer_list.c
 +++ b/kernel/time/timer_list.c
-@@ -399,6 +399,9 @@ static int __init init_timer_list_procfs
+@@ -400,6 +400,9 @@ static int __init init_timer_list_procfs
  {
        struct proc_dir_entry *pe;
  
@@ -233,7 +233,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                return -ENOMEM;
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
-@@ -2714,6 +2714,8 @@ static const struct file_operations proc
+@@ -2727,6 +2727,8 @@ static const struct file_operations proc
  
  static int __init proc_vmalloc_init(void)
  {
@@ -244,15 +244,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1798,10 +1798,12 @@ static int __init setup_vmstat(void)
+@@ -1793,10 +1793,12 @@ static int __init setup_vmstat(void)
        cpu_notifier_register_done();
  #endif
  #ifdef CONFIG_PROC_FS
 -      proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
--      proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops);
+-      proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_ops);
 +      if (!IS_ENABLED(CONFIG_PROC_STRIPPED)) {
 +              proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
-+              proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops);
++              proc_create("pagetypeinfo", 0400, NULL, &pagetypeinfo_file_ops);
 +              proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations);
 +      }
        proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations);
@@ -328,7 +328,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -3088,6 +3088,8 @@ static __net_initdata struct pernet_oper
+@@ -3093,6 +3093,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
@@ -382,7 +382,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/ipv4/proc.c
 +++ b/net/ipv4/proc.c
-@@ -565,6 +565,9 @@ static __net_initdata struct pernet_oper
+@@ -566,6 +566,9 @@ static __net_initdata struct pernet_oper
  
  int __init ip_misc_proc_init(void)
  {