Re: [PATCH] Wireguard: Fix data-race in rx/tx counter

From: Rafael Passos

Date: Sun Jun 28 2026 - 23:05:11 EST


On Sun Jun 28, 2026 at 11:34 PM -03, Theodore Tso wrote:
> One of the reasons why kcsan and syzbot can be quite noisy is that a
> human being needs to *think* and consider whether or not this is
> actually important. (One of the reasons why I'm not all that worried
> about our new AI overlords taking over the world. :-) Consider what
> is the worst that might happen if the tx/rx_bytes counter might not be
> completely accurate? Is it worth the performance penalty of using
> atomics (or the memory overhead of per-CPU counters)?
Yeah, I guess not.
Still, it was very interesting learning all this. I only knew per-cpu
counters by name, and Andrew's response led me to actually understand it.

I would like to thank you both!
And if I may, I would like to send my v2 patch (as a response in this
thread) just because it was very fun making and testing it. And I would
love feedback on it, if anything looks wrong. This was an amazing
learning opportunity for me.

Thanks,
Rafael Passos