Re: [PATCH net-next v3 2/2] net: annotate lockless writes to sk->sk_err
From: quanyeyang
Date: Thu Oct 15 2026 - 06:19:23 EST
On Sunday, October 11th, 2026 at AM 8:10, netdev-bot+sashiko@xxxxxxxxxx <netdev-bot+sashiko@xxxxxxxxxx> wrote:
> Does this cover every writer on the TCP sockets that strparser
> runs on?
>
> KCM still reports errors on that socket with a plain store:
> report_csk_error() { csk->sk_err = EPIPE; }
report_csk_error() is a leftover unmarked store on the lower TCP
socket that strparser is attached to. This series only pairs the
writers on the TCP/TLS and sockmap paths Paolo asked for:
sock_dequeue_err_skb(), strp_abort_strp() and
sk_psock_report_error().
KCM, SMC clcsock and UDP/raw/ping stores are pre-existing and
are left for follow-ups. I will not fold them into this series.
> The subject line reads as a general annotation of lockless sk_err
> writes, but the body doesn't say that the conversion is partial.
Agreed that the conversion is partial. The remaining writers above
are intentionally out of scope here.
> report_csk_error() above never uses its err argument and always
> stores EPIPE.
That is independent KCM behaviour: userspace sees EPIPE through
SO_ERROR by design, going back to the original code. Not changed
here.
> Should this read also be a READ_ONCE()?
> __entry->error = sk->sk_err;
The inet_sk_error_report plain load is pre-existing. A stale
errno in the trace event is acceptable for this patch.
thanks
quanyeyang