]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
SUNRPC: Handle NULL entries in svc_rqst_release_pages
authorChuck Lever <chuck.lever@oracle.com>
Thu, 26 Feb 2026 14:47:36 +0000 (09:47 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
commit22cc2ba5c27a500040d13cecb1dbfc3e4bccab81
treef0b2913a712ef9caa4782417f6053484ac9caba7
parentee66b9e3e1c69efc986f3932555f07121c3460a7
SUNRPC: Handle NULL entries in svc_rqst_release_pages

svc_rqst_release_pages() releases response pages between rq_respages
and rq_next_page. It currently passes the entire range to
release_pages(), which does not expect NULL entries.

A subsequent patch preserves the rq_next_page pointer in
svc_rdma_save_io_pages() so that it accurately records how many
response pages were consumed. After that change, the range

  [rq_respages, rq_next_page)

can contain NULL entries where pages have already been transferred
to a send context.

Iterate through the range entry by entry, skipping NULLs, to handle
this case correctly.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svc.c