Skip to contentSkip to conversation

Fix leaking of kernel heap addresses in net/

PATCH NAK Dan Rosenberg 1 participant 1 message Nov 7, 2010

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

PATCH 6/9 Fix leaking of kernel heap addresses in net/

net/netlink/af_netlink.c +6 -4
diff -urp linux-2.6.37-rc1.orig/net/netlink/af_netlink.c linux-2.6.37-rc1/net/netlink/af_netlink.c
@@ -162,7 +162,8 @@ static void netlink_sock_destruct(struct
 	skb_queue_purge(&sk->sk_receive_queue);
 
 	if (!sock_flag(sk, SOCK_DEAD)) {
-		printk(KERN_ERR "Freeing alive netlink socket %p\n", sk);
+		printk(KERN_ERR "Freeing alive netlink socket %lu\n",
+			sock_i_ino(sk));
 		return;
 	}
 
@@ -1990,14 +1991,15 @@ static int netlink_seq_show(struct seq_f
 		struct sock *s = v;
 		struct netlink_sock *nlk = nlk_sk(s);
 
-		seq_printf(seq, "%p %-3d %-6d %08x %-8d %-8d %p %-8d %-8d %-8lu\n",
-			   s,
+		seq_printf(seq, "%d %-3d %-6d %08x %-8d %-8d"
+			   " %d %-8d %-8d %-8lu\n",
+			   0,
 			   s->sk_protocol,
 			   nlk->pid,
 			   nlk->groups ? (u32)nlk->groups[0] : 0,
 			   sk_rmem_alloc_get(s),
 			   sk_wmem_alloc_get(s),
-			   nlk->cb,
+			   0,
 			   atomic_read(&s->sk_refcnt),
 			   atomic_read(&s->sk_drops),
 			   sock_i_ino(s)