Re: [PATCH net 4/4] net: skbuff: limit folio refcount when splicing from sockets

From: Paolo Abeni

Date: Thu Nov 26 2026 - 11:10:17 EST


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.

__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.

/P