missing patches for v6.6-rc

5 messages, 3 authors, 2023-10-11 · open the first message on its own page

missing patches for v6.6-rc

From: Jeff Layton <jlayton@kernel.org>
Date: 2023-10-10 12:49:40

Hi Anna,

There are a couple of client side patches that I think we want in v6.6,
but that haven't shown up in linux-next yet. Do you still plan to take
these from Dai and Scott?

    [PATCH 1/1] NFS: Fix potential oops in nfs_inode_remove_request()
    [PATCH v3 1/1] nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op

Thanks,
-- 
Jeff Layton [off-list ref]

Re: missing patches for v6.6-rc

From: Anna Schumaker <anna@kernel.org>
Date: 2023-10-11 13:55:55

Hi Jeff,

On Tue, Oct 10, 2023 at 8:49 AM Jeff Layton [off-list ref] wrote:
Hi Anna,

There are a couple of client side patches that I think we want in v6.6,
but that haven't shown up in linux-next yet. Do you still plan to take
these from Dai and Scott?
I've pushed out Dai's patch to my linux-next branch, and I can do
another pull request before the end of the 6.6 cycle. Is Scott's patch
still needed after your patch "nfs: decrement nrequests counter before
releasing the req" which went into 6.6-rc5? If so, it doesn't apply
cleanly on top of the current code so I'll need to fix it up.

Anna
    [PATCH 1/1] NFS: Fix potential oops in nfs_inode_remove_request()
    [PATCH v3 1/1] nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op

Thanks,
--
Jeff Layton [off-list ref]

Re: missing patches for v6.6-rc

From: Benjamin Coddington <hidden>
Date: 2023-10-11 14:02:40

On 11 Oct 2023, at 9:55, Anna Schumaker wrote:
Hi Jeff,

On Tue, Oct 10, 2023 at 8:49 AM Jeff Layton [off-list ref] wrote:
quoted
Hi Anna,

There are a couple of client side patches that I think we want in v6.6,
but that haven't shown up in linux-next yet. Do you still plan to take
these from Dai and Scott?
I've pushed out Dai's patch to my linux-next branch, and I can do
another pull request before the end of the 6.6 cycle. Is Scott's patch
still needed after your patch "nfs: decrement nrequests counter before
releasing the req" which went into 6.6-rc5? If so, it doesn't apply
cleanly on top of the current code so I'll need to fix it up.
Yes, that patch is definitely needed.

Want me to send a current version?

Ben

Re: missing patches for v6.6-rc

From: Anna Schumaker <anna@kernel.org>
Date: 2023-10-11 14:04:15

On Wed, Oct 11, 2023 at 10:01 AM Benjamin Coddington
[off-list ref] wrote:
On 11 Oct 2023, at 9:55, Anna Schumaker wrote:
quoted
Hi Jeff,

On Tue, Oct 10, 2023 at 8:49 AM Jeff Layton [off-list ref] wrote:
quoted
Hi Anna,

There are a couple of client side patches that I think we want in v6.6,
but that haven't shown up in linux-next yet. Do you still plan to take
these from Dai and Scott?
I've pushed out Dai's patch to my linux-next branch, and I can do
another pull request before the end of the 6.6 cycle. Is Scott's patch
still needed after your patch "nfs: decrement nrequests counter before
releasing the req" which went into 6.6-rc5? If so, it doesn't apply
cleanly on top of the current code so I'll need to fix it up.
Yes, that patch is definitely needed.

Want me to send a current version?
Sure! That would be great!

Anna
Ben

[PATCH] NFS: Fix potential oops in nfs_inode_remove_request()

From: Benjamin Coddington <hidden>
Date: 2023-10-11 14:44:20

From: Scott Mayhew <redacted>

Once a folio's private data has been cleared, it's possible for another
process to clear the folio->mapping (e.g. via invalidate_complete_folio2
or evict_mapping_folio), so it wouldn't be safe to call
nfs_page_to_inode() after that.

Fixes: 0c493b5cf16e ("NFS: Convert buffered writes to use folios")
Signed-off-by: Scott Mayhew <redacted>
Reviewed-by: Benjamin Coddington <redacted>
Tested-by: Benjamin Coddington <redacted>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfs/write.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 7720b5e43014..9d82d50ce0b1 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -788,6 +788,8 @@ static void nfs_inode_add_request(struct nfs_page *req)
  */
 static void nfs_inode_remove_request(struct nfs_page *req)
 {
+	struct nfs_inode *nfsi = NFS_I(nfs_page_to_inode(req));
+
 	if (nfs_page_group_sync_on_bit(req, PG_REMOVE)) {
 		struct folio *folio = nfs_page_to_folio(req->wb_head);
 		struct address_space *mapping = folio_file_mapping(folio);
@@ -802,7 +804,7 @@ static void nfs_inode_remove_request(struct nfs_page *req)
 	}
 
 	if (test_and_clear_bit(PG_INODE_REF, &req->wb_flags)) {
-		atomic_long_dec(&NFS_I(nfs_page_to_inode(req))->nrequests);
+		atomic_long_dec(&nfsi->nrequests);
 		nfs_release_request(req);
 	}
 }
-- 
2.41.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help