Re: [PATCH v3] skbuff: fix a data race in skb_queue_len()
From: Jason A. Donenfeld
Date: Thu Feb 06 2020 - 13:12:48 EST
On Thu, Feb 6, 2020 at 6:10 PM Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> Unfortunately we do not have ADD_ONCE() or something like that.
I guess normally this is called "atomic_add", unless you're thinking
instead about something like this, which generates the same
inefficient code as WRITE_ONCE:
#define ADD_ONCE(d, s) *(volatile typeof(d) *)&(d) += (s)