Re: suspected memory leak in sock slab / test7-pre4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

> Maybe there is a general problem in mm/slab.c? I remember some
> change in the SMP case. When did that go in?

No, I think I know about this bug for veeery long time.
Only permanently forgot to peer to the situation more carefully,
just because nobody reported the problem.

Please, try this. Try carefully. If it will help,
please, relay the patch to Dave. I probably will be off line for some time.

Alexey


diff -ur ../vger3-000826/linux/net/ipv4/tcp_minisocks.c linux/net/ipv4/tcp_minisocks.c
--- ../vger3-000826/linux/net/ipv4/tcp_minisocks.c	Wed Aug  9 21:07:17 2000
+++ linux/net/ipv4/tcp_minisocks.c	Sun Aug 27 22:09:54 2000
@@ -742,7 +742,7 @@
 		/* Back to base struct sock members. */
 		newsk->err = 0;
 		newsk->priority = 0;
-		atomic_set(&newsk->refcnt, 1);
+		atomic_set(&newsk->refcnt, 2);
 #ifdef INET_REFCNT_DEBUG
 		atomic_inc(&inet_sock_nr);
 #endif
@@ -966,5 +966,6 @@
 	}
 
 	bh_unlock_sock(child);
+	sock_put(child);
 	return ret;
 }
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux