public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-kernel] revert cifs backport to 6.1 added between 6.5.13-1 and 6.5.13-2
@ 2024-04-03 11:46 Stoiko Ivanov
  2024-04-04 12:59 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2024-04-03 11:46 UTC (permalink / raw)
  To: pve-devel

copying files within a cifs-share currently result in the following
trace:
```
[  495.388739] BUG: unable to handle page fault for address: fffffffffffffffe
[  495.388744] #PF: supervisor read access in kernel mode
[  495.388746] #PF: error_code(0x0000) - not-present page
[  495.388747] PGD 172c3f067 P4D 172c3f067 PUD 172c41067 PMD 0
[  495.388752] Oops: 0000 [#2] PREEMPT SMP NOPTI
[  495.388754] CPU: 1 PID: 3894 Comm: cp Tainted: G      D            6.5.0-32-generic #32-Ubuntu                                                                                                                                                                                [  495.388756] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 4.2023.08-4 02/15/2024
[  495.388758] RIP: 0010:cifs_flush_folio+0x41/0xf0 [cifs]
...
```

a quick check identified proxmox-kernel-6.5.13-2 as the first affected
version, and `2dc07a11e269bfbe5589e99b60cdbae0118be979` as likely
source of the issue. The commit adapts the changes from
`7b2404a886f8b91250c31855d287e632123e1746` to work with the code in
kernel 6.1.
This is not needed as the relevant changes were made in 6.4 and
are already part of the 6.5 tree -
`66dabbb65d673aef40dd17bf62c042be8f6d4a4b`

reverting the commit fixes copying files within a samba share.

Tested/reproduced with:
* a VM with the kernel as cifs-client
* one very crude samba-share allowing guest-write access on a Debian
  bookworm host
* as well as a share using cifscreds + multiuser (`mount.cifs(8)`)
* mounting the share, copying any file from one directory to another
  on the same share (with `cp` and Thunar and Nautilus).

Reported to Ubuntu upstream at [1].

[0] https://lore.kernel.org/linux-mm/ZZhrpNJ3zxMR8wcU@eldamar.lan/
[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2055002

Reported-by: Daniela Häsler <daniela@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 ...flushing-folio-regression-for-6.1-ba.patch | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 patches/kernel/0014-Revert-cifs-fix-flushing-folio-regression-for-6.1-ba.patch

diff --git a/patches/kernel/0014-Revert-cifs-fix-flushing-folio-regression-for-6.1-ba.patch b/patches/kernel/0014-Revert-cifs-fix-flushing-folio-regression-for-6.1-ba.patch
new file mode 100644
index 000000000000..e033b68ac69f
--- /dev/null
+++ b/patches/kernel/0014-Revert-cifs-fix-flushing-folio-regression-for-6.1-ba.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stoiko Ivanov <s.ivanov@proxmox.com>
+Date: Wed, 3 Apr 2024 10:29:59 +0200
+Subject: [PATCH] Revert "cifs: fix flushing folio regression for 6.1 backport"
+
+This reverts commit 2dc07a11e269bfbe5589e99b60cdbae0118be979.
+---
+ fs/smb/client/cifsfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
+index 55a6d0296ec82..82313b2534631 100644
+--- a/fs/smb/client/cifsfs.c
++++ b/fs/smb/client/cifsfs.c
+@@ -1245,7 +1245,7 @@ static int cifs_flush_folio(struct inode *inode, loff_t pos, loff_t *_fstart, lo
+ 	int rc = 0;
+ 
+ 	folio = filemap_get_folio(inode->i_mapping, index);
+-	if (!folio)
++	if (IS_ERR(folio))
+ 		return 0;
+ 
+ 	size = folio_size(folio);
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-04 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03 11:46 [pve-devel] [PATCH pve-kernel] revert cifs backport to 6.1 added between 6.5.13-1 and 6.5.13-2 Stoiko Ivanov
2024-04-04 12:59 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal