Re: [PATCH net-next v4] sctp: socket: set *err = 0 on receive shutdown
From: Jakub Kicinski
Date: Mon Jul 27 2026 - 19:30:37 EST
On Tue, 21 Jul 2026 10:25:22 +0800 luoqing wrote:
> From: Qing Luo <luoqing@xxxxxxxxxx>
>
> 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 <luoqing@xxxxxxxxxx>
AFAICT Xin Long asked you to toss this patch:
https://lore.kernel.org/all/CADvbK_e4StN7-vSRjYC_FPMN-_3xjwhCxYUb+Jddz-akO-ryPw@xxxxxxxxxxxxxx/
so I'm dropping it from our queue.