Re: [PATCH v2 2/5] mm: limit pagecache folio refcount when splicing into pipes

From: David Hildenbrand (Arm)

Date: Mon Nov 09 2026 - 05:26:57 EST


On 11/9/26 10:49, David Hildenbrand (Arm) wrote:
> On 11/9/26 10:30, David Hildenbrand (Arm) wrote:
>> On 11/9/26 09:57, Jose A. Perez de Azpillaga wrote:
>>>
>>> here it can't tell where the -EOVERFLOW came from, if another file
>>> returns -EOVERFLOW (i.e. tty_fops uses copy_splice_read, and
>>> n_hdlc_tty_read() returns -EOVERFLOW after dropping the frame), it now
>>> gets a second read.
>>
>>
>> That's what claude told me during review, and when asked whether that actually
>> happened in practice it said no ;)
>>
>> So is that actually a problem?
>
> Double checked, claude managed to confuse itself.
>
> n_hdlc_tty_read() can indeed return -EOVERFLOW.
>
> I should just have let splice keep failing, dealing with copy fallback starts to
> get annoying.
>
> I guess switching to -ETOOMANYREFS should work (and might be a better fitting error)

Yeah, the following should do I think, please double check: