netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-2.6 PATCH 1/6] net: initialize rmem_alloc and omem_alloc to 0 in netlink socket
@ 2009-09-18  0:57 Jeff Kirsher
  2009-09-18  0:57 ` [net-2.6 PATCH 2/6] net: remove kfree_skb on a NULL pointer in af_netlink.c Jeff Kirsher
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Jeff Kirsher @ 2009-09-18  0:57 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, linux-scsi, John Fastabend, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

The rmem_alloc and omem_alloc socket fields are not
initialized.  This sets each variable to zero when a socket
is created.  Note the sk_wmem_alloc is already initialized
in sock_init_data.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 net/netlink/af_netlink.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index c5aab6a..4e673d2 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -423,6 +423,9 @@ static int __netlink_create(struct net *net, struct socket *sock,
 	}
 	init_waitqueue_head(&nlk->wait);
 
+	atomic_set(&sk->sk_rmem_alloc, 0);
+	atomic_set(&sk->sk_omem_alloc, 0);
+
 	sk->sk_destruct = netlink_sock_destruct;
 	sk->sk_protocol = protocol;
 	return 0;


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-09-21 20:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-18  0:57 [net-2.6 PATCH 1/6] net: initialize rmem_alloc and omem_alloc to 0 in netlink socket Jeff Kirsher
2009-09-18  0:57 ` [net-2.6 PATCH 2/6] net: remove kfree_skb on a NULL pointer in af_netlink.c Jeff Kirsher
2009-09-18  1:24   ` David Miller
2009-09-21 12:04     ` John Fastabend
2009-09-21 20:54       ` David Miller
2009-09-18  0:57 ` [net-2.6 PATCH 3/6] net: fix vlan_get_size to include vlan_flags size Jeff Kirsher
2009-09-18  0:58 ` [net-2.6 PATCH 4/6] net: fix nlmsg len size for skb when error bit is set Jeff Kirsher
2009-09-18  0:58 ` [net-2.6 PATCH 5/6] net: fix sock locking for sk_err field in netlink Jeff Kirsher
2009-09-18  1:27   ` David Miller
2009-09-18  0:58 ` [net-2.6 PATCH 6/6] net: fix double skb free in dcbnl Jeff Kirsher
2009-09-18  1:29 ` [net-2.6 PATCH 1/6] net: initialize rmem_alloc and omem_alloc to 0 in netlink socket David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).