Re: [PATCH] af_unix: fix u->inq_len accounting in manage_oob() and unix_stream_read_skb()
From: Kuniyuki Iwashima
Date: Sun Sep 20 2026 - 15:28:17 EST
On Sat, Sep 19, 2026 at 3:17 PM Hui Peng <benquike@xxxxxxxxx> wrote:
>
> When an old OOB skb is replaced and discarded in manage_oob(), or when a
> fully consumed OOB skb is skipped in unix_stream_read_skb(), the
> discarded byte count is not subtracted from u->inq_len (or is subtracted
> inconsistently), causing SIOCINQ / FIONREAD to report stale positive
> byte counts on an empty AF_UNIX stream socket. Properly account
> u->inq_len when dropping or skipping consumed OOB skbs.
>
> Fixes: 314001f0bf92 ("af_unix: Add OOB support")
> Assisted-by: LLM
Please tell your LLM not to mix different fixes into one.
btw I'm tempted to remove OOB support entirely.
---
pw-bot: cr