Re: Is this nfsd kernel oops known?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Olga, does this fix it up for you? I'm testing now, but I think it might be
a little harder for me to hit.

Ben

8<------------------------------------------------
From 6bea39a887495b1748ff3b179d6e2f3d7e552b61 Mon Sep 17 00:00:00 2001
From: Benjamin Coddington <bcodding@xxxxxxxxxx>
Date: Fri, 2 Sep 2022 16:49:17 -0400
Subject: [PATCH] SUNRPC: Fix svc_tcp_sendmsg bvec offset calculation

The xdr_buf's bvec member points to an array of struct bio_vec, let's
fixup the calculation to the start of the bio_vec for non-zero
page_base.

Fixes: bad4c6eb5eaa ("SUNRPC: Fix NFS READs that start at non-page-aligned offsets")
Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx>
---
 net/sunrpc/svcsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 2fc98fea59b4..ecafc9c4bc5c 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1110,7 +1110,7 @@ static int svc_tcp_sendmsg(struct socket *sock, struct xdr_buf *xdr,
                unsigned int offset, len, remaining;
                struct bio_vec *bvec;

-               bvec = xdr->bvec + (xdr->page_base >> PAGE_SHIFT);
+               bvec = &xdr->bvec[xdr->page_base >> PAGE_SHIFT];
                offset = offset_in_page(xdr->page_base);
                remaining = xdr->page_len;
                while (remaining > 0) {
--
2.37.2




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux