lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aeb56c34-4549-6f05-2077-2be9594a17e4@gmail.com>
Date:   Tue, 22 Jun 2021 19:49:53 +0200
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <eric.dumazet@...il.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, willemb@...gle.com,
        dsahern@...il.com, yoshfuji@...ux-ipv6.org, Dave Jones <dsj@...com>
Subject: Re: [PATCH net-next] ip: avoid OOM kills with large UDP sends over
 loopback



On 6/22/21 7:19 PM, Jakub Kicinski wrote:
> On Tue, 22 Jun 2021 09:54:22 -0700 Jakub Kicinski wrote:
>>>> +static inline void sk_allocation_push(struct sock *sk, gfp_t flag, gfp_t *old)
>>>> +{
>>>> +	*old = sk->sk_allocation;
>>>> +	sk->sk_allocation |= flag;
>>>> +}
>>>> +    
>>>
>>> This is not thread safe.
>>>
>>> Remember UDP sendmsg() does not lock the socket for non-corking sends.  
>>
>> Ugh, you're right :(
> 
> Hm, isn't it buggy to call sock_alloc_send_[p]skb() without holding the
> lock in the first place, then? The knee jerk fix would be to add another 
> layer of specialization to the helpers:

It is not buggy. Please elaborate if you found it is.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ