[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e6c6202-24bb-a532-adde-d53dd6fb14c3@gmail.com>
Date: Fri, 17 Jan 2020 08:35:07 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Peter Zijlstra <peterz@...radead.org>,
Shaokun Zhang <zhangshaokun@...ilicon.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, jinyuqi@...wei.com,
kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org, edumazet@...gle.com,
guoyang2@...wei.com, Will Deacon <will@...nel.org>
Subject: Re: [PATCH] net: optimize cmpxchg in ip_idents_reserve
On 1/17/20 4:32 AM, Peter Zijlstra wrote:
>
> That's crazy, just accept that UBSAN is taking bonghits and ignore it.
> Use atomic_add_return() unconditionally.
>
Yes, we might simply add a comment so that people do not bug us if
their compiler is too old.
/* If UBSAN reports an error there, please make sure your compiler
* supports -fno-strict-overflow before reporting it.
*/
return atomic_add_return(segs + delta, p_id) - segs;
Powered by blists - more mailing lists