Re: [PATCH net v2] tcp: avoid creating multiple req socks with the same tuples

From: maowenan
Date: Thu Jun 13 2019 - 12:48:17 EST




On 2019/6/13 0:25, David Miller wrote:
> From: Mao Wenan <maowenan@xxxxxxxxxx>
> Date: Wed, 12 Jun 2019 11:57:15 +0800
>
>> diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
>> index c4503073248b..b6a1b5334565 100644
>> --- a/net/ipv4/inet_hashtables.c
>> +++ b/net/ipv4/inet_hashtables.c
>> @@ -477,6 +477,7 @@ bool inet_ehash_insert(struct sock *sk, struct sock *osk)
>> struct inet_ehash_bucket *head;
>> spinlock_t *lock;
>> bool ret = true;
>> + struct sock *reqsk = NULL;
>
> Please preserve the reverse christmas tree local variable ordering here.

ok, thanks.
>
> Thank you.
>
> .
>