[syzbot] [afs?] [net?] KCSAN: data-race in rxrpc_peer_keepalive_worker / rxrpc_send_data_packet

Eric Dumazet edumazet at google.com
Thu Jan 8 05:59:12 PST 2026


On Thu, Jan 8, 2026 at 2:42 PM David Howells <dhowells at redhat.com> wrote:
>
> I think that this shouldn't be a problem.  The write is:
>
>         conn->peer->last_tx_at = ktime_get_seconds();
>
> and the read is:
>
>         keepalive_at = peer->last_tx_at + RXRPC_KEEPALIVE_TIME;
>
> an approximate time is fine as we're estimating when to send a keepalive
> packet if we haven't transmitted a packet in a while.

LGTM, but potential load and store tearing should be avoided, using
READ_ONCE() and WRITE_ONCE().

last_tx_at being time64_t, this would still be racy on 32bit arches.

last_tx_at could probably be an "unsigned long" (in jiffies units)...



More information about the linux-afs mailing list