On Thu, Mar 13, 2025 at 09:52:18AM +0100, Hannes Reinecke wrote: > > It doesn't. It just doesn't want you to use ->sendpage. > > > But we don't; we call 'sendpage_ok()' and disabling the MSG_SPLICE_PAGES > flag. MSG_SPLICE_PAGES really just is the new name for the old ->sendpage. Sorry for being stuck in the old naming. > Actual issue is that tls_sw() is calling iov_iter_alloc_pages(), > which is taking a page reference. > It probably should be calling iov_iter_extract_pages() (which does not > take a reference), but then one would need to review the entire network > stack as taking and releasing page references are littered throughout > the stack. Yes, it needs to use the proper pinning helpers, if only to not corrupt out of place write file systems when receiving from a TLS socket. But for the network stack below it that doesn't matter, it expects to be able to grab and release references, and for that you need page backing. If that page was pinned or referenced when resolving the user address does not matter at all.