kernel: bump 4.9 to 4.9.171
[openwrt/openwrt.git] / target / linux / generic / hack-4.9 / 902-debloat_proc.patch
index 7074c9e63728981a180dc0b19d22592f1f2daa4b..ee72d984f927d35220539d139233f094a544fb1b 100644 (file)
@@ -132,7 +132,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        do {                                                            \
 --- a/ipc/msg.c
 +++ b/ipc/msg.c
-@@ -1058,6 +1058,9 @@ void __init msg_init(void)
+@@ -1061,6 +1061,9 @@ void __init msg_init(void)
  {
        msg_init_ns(&init_ipc_ns);
  
@@ -221,18 +221,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!root_irq_dir)
 --- a/kernel/time/timer_list.c
 +++ b/kernel/time/timer_list.c
-@@ -393,6 +393,8 @@ static int __init init_timer_list_procfs
+@@ -399,6 +399,9 @@ static int __init init_timer_list_procfs
  {
        struct proc_dir_entry *pe;
  
 +      if (IS_ENABLED(CONFIG_PROC_STRIPPED))
 +              return 0;
-       pe = proc_create("timer_list", 0444, NULL, &timer_list_fops);
++
+       pe = proc_create("timer_list", 0400, NULL, &timer_list_fops);
        if (!pe)
                return -ENOMEM;
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
-@@ -2713,6 +2713,8 @@ static const struct file_operations proc
+@@ -2718,6 +2718,8 @@ static const struct file_operations proc
  
  static int __init proc_vmalloc_init(void)
  {
@@ -243,7 +244,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
 --- a/mm/vmstat.c
 +++ b/mm/vmstat.c
-@@ -1791,10 +1791,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
@@ -327,7 +328,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -3084,6 +3084,8 @@ static __net_initdata struct pernet_oper
+@@ -3088,6 +3088,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
@@ -338,7 +339,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/ipv4/fib_trie.c
 +++ b/net/ipv4/fib_trie.c
-@@ -2667,10 +2667,12 @@ static const struct file_operations fib_
+@@ -2677,10 +2677,12 @@ static const struct file_operations fib_
  
  int __net_init fib_proc_init(struct net *net)
  {
@@ -353,7 +354,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                         &fib_triestat_fops))
                goto out2;
  
-@@ -2680,17 +2682,21 @@ int __net_init fib_proc_init(struct net
+@@ -2690,17 +2692,21 @@ int __net_init fib_proc_init(struct net
        return 0;
  
  out3:
@@ -381,7 +382,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/ipv4/proc.c
 +++ b/net/ipv4/proc.c
-@@ -564,6 +564,9 @@ static __net_initdata struct pernet_oper
+@@ -565,6 +565,9 @@ static __net_initdata struct pernet_oper
  
  int __init ip_misc_proc_init(void)
  {
@@ -393,7 +394,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -420,6 +420,9 @@ static struct pernet_operations ip_rt_pr
+@@ -423,6 +423,9 @@ static struct pernet_operations ip_rt_pr
  
  static int __init ip_rt_proc_init(void)
  {