Re: [PATCH net-next v4] sctp: socket: set *err = 0 on receive shutdown

Jakub Kicinski <[email protected]> Mon, 27 Jul 2026 16:29:44 -0700
Newsgroups org.kernel.vger.linux-sctp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
On Tue, 21 Jul 2026 10:25:22 +0800 luoqing wrote:
> From: Qing Luo <[email protected]>
> 
> When sctp_skb_recv_datagram() detects RCV_SHUTDOWN, it breaks out
> of the loop and returns NULL without setting *err. While current
> callers happen to work correctly (sctp_recvmsg pre-initializes
> err to 0, sctp_ulpevent_read_nxtinfo doesn't use err), this is
> inconsistent with the generic __skb_wait_for_more_packets() in
> net/core/datagram.c which explicitly sets *err = 0 on shutdown.
> 
> Set *err = 0 explicitly for correctness and robustness against
> future callers.
> 
> Signed-off-by: Qing Luo <[email protected]>

AFAICT Xin Long asked you to toss this patch:

https://lore.kernel.org/all/CADvbK_e4StN7-vSRjYC_FPMN-_3xjwhCxYUb+Jddz-akO-ryPw@mail.gmail.com/

so I'm dropping it from our queue.