|
@@ -908,10 +908,12 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
|
|
{
|
|
{
|
|
struct sock *sk;
|
|
struct sock *sk;
|
|
|
|
|
|
|
|
+ if (zero_it)
|
|
|
|
+ priority |= __GFP_ZERO;
|
|
|
|
+
|
|
sk = sk_prot_alloc(prot, priority);
|
|
sk = sk_prot_alloc(prot, priority);
|
|
if (sk) {
|
|
if (sk) {
|
|
if (zero_it) {
|
|
if (zero_it) {
|
|
- memset(sk, 0, prot->obj_size);
|
|
|
|
sk->sk_family = family;
|
|
sk->sk_family = family;
|
|
/*
|
|
/*
|
|
* See comment in struct sock definition to understand
|
|
* See comment in struct sock definition to understand
|