lkml.org 
[lkml]   [2020]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] net: optimize cmpxchg in ip_idents_reserve
On Fri, Jan 17, 2020 at 08:35:07AM -0800, Eric Dumazet wrote:
>
>
> 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;
>

Do we need that comment any more? The flag was apparently introduced in
gcc-4.2 and we only support 4.6+ anyway?

\
 
 \ /
  Last update: 2020-01-17 19:04    [W:0.108 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site