Re: [PATCH net 4/4] net: skbuff: limit folio refcount when splicing from sockets
From: David Hildenbrand (Arm)
Date: Thu Nov 26 2026 - 11:12:30 EST
On 11/26/26 17:10, Paolo Abeni wrote:
> On 11/26/26 15:44, David Hildenbrand (Arm) wrote:
>> On 11/26/26 15:18, Paolo Abeni wrote:
>>> which is arguably ugly but IMHO no more than the tristate
>>> return value in the current version.
>>
>> That doesn't work. "len" you write in the function is not tlen ...
>
> Sorry, I rushed it too much.
No worries.
>
>> __splice_segment() passes &flen.
>>
>> Further all these lengths are unsigned int, not signed :/
>>
>> Also, I think we have to respect spd.nr_pages.
>>
>> If we want it minimal, a separate error pointer might be the easiest way to fix it. Still
>> ugly, but I tried to get it clean above and there is no way around some churn I'm afraid.
>
> I actually prefer what you suggest here more than the current patch.
> I suspect Willem may have some other option avail, but he will
> not back for a few days.
Okay, just let me now whenever you want a resend with the proposed changes. I
tested them a bit and they seem to get the job done as well.
--
Cheers,
David