Skip to contentSkip to conversation

set owner on /proc/net/rt6_stats

PATCH In review Stephen Hemminger 2 participants 2 messages Aug 15, 2003 – Aug 16, 2003

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 set owner on /proc/net/rt6_stats

Fix up initialization of IPV6 /proc/net/rt6_stats entries so owner field is set. Use proc_net_fops_create helper instead of proc_net_create and fops assignment.

net/ipv6/route.c +4 -3
diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c
@@ -1983,10 +1983,11 @@
 						     NULL, NULL);
 	fib6_init();
 #ifdef 	CONFIG_PROC_FS
-	proc_net_create("ipv6_route", 0, rt6_proc_info);
-	p = create_proc_entry("rt6_stats", S_IRUGO, proc_net);
+	p = proc_net_create("ipv6_route", 0, rt6_proc_info);
 	if (p)
-		p->proc_fops = &rt6_stats_seq_fops;
+		p->owner = THIS_MODULE;
+
+	proc_net_fops_create("rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
 #endif
 #ifdef CONFIG_XFRM
 	xfrm6_init();
#1 lore raw
Quoted 2 lines · On Fri, 15 Aug 2003 11:01:07 -0700 Stephen Hemminger <[email protected]>…

Fix up initialization of IPV6 /proc/net/rt6_stats entries so owner field is set. Use proc_net_fops_create helper instead of proc_net_create and fops assignment.

Patch applied, thanks Stephen.