From: Jarek Poplawski Date: Sun, 30 Aug 2009 23:15:36 +0000 (+0000) Subject: net: sk_free() should be allowed right after sk_alloc() X-Git-Tag: v2.6.31-rc9~6^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d66ee0587c3927aea5178a822976c7c853d815fe;p=pandora-kernel.git net: sk_free() should be allowed right after sk_alloc() After commit 2b85a34e911bf483c27cfdd124aeb1605145dc80 (net: No more expensive sock_hold()/sock_put() on each tx) sk_free() frees socks conditionally and depends on sk_wmem_alloc being set e.g. in sock_init_data(). But in some cases sk_free() is called earlier, usually after other alloc errors. Fix is to move sk_wmem_alloc initialization from sock_init_data() to sk_alloc() itself. Signed-off-by: Jarek Poplawski Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed