Public bug reported:

[Impact]
Google: "We discovered an issue with upstream patch 
52cb7f8f177878b4f22397b9c4d2c8f743766be3 that caused RW nfs mounts to be 
mounted as RO when there was an existing nfs RO mount on the same node."

The break commit was found on jammy:gke/gkeop and noble:gke/gkeop.

[Fix]
Apply the fix proposed on lkml at 
https://lore.kernel.org/lkml/20250304130533.549840-1-lilingfe...@huawei.com/T/

The commit titled "nfs: clear SB_RDONLY before getting superblock"
should address the issue. Because it has not been applied to any trees,
it will be initially applied as an UBUNTU: SAUCE: patch.

[Test]
A reproducer was included with the initial bug report at 
https://www.spinics.net/lists/linux-nfs/msg109544.html

# Reproducer
mkdir -p /export/{stuff,things}/dir{1,2,3,4}
echo '/export/stuff  *(rw)' >> /etc/exports
echo '/export/things *(rw)' >> /etc/exports
systemctl restart nfs-server

mount -t nfs -o ro,vers=3 localhost:/export/stuff  /mnt/stuff
mount -t nfs -o rw,vers=3 localhost:/export/things /mnt/things
grep -w nfs /proc/mounts
# note that both mountpoints are ro, despite the explicit ro/rw options
# reversing the order of mounts gives a different result

After the fix, the read only mount should be properly tagged as read
only, and the read/write mount should be properly tagged as read/write.

[Where problems could occur]
This is a fairly small patch which directly addresses a reproducible issue, so 
its scope of influence should be pretty limited. We do take some risk by 
applying this patch before it has been approved by upstream maintainers, so 
this won't be going into generic kernels until then.

** Affects: linux-gke (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-gkeop (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux-gke (Ubuntu Jammy)
     Importance: Undecided
         Status: New

** Affects: linux-gkeop (Ubuntu Jammy)
     Importance: Undecided
         Status: New

** Affects: linux-gke (Ubuntu Noble)
     Importance: Undecided
         Status: New

** Affects: linux-gkeop (Ubuntu Noble)
     Importance: Undecided
         Status: New

** Also affects: linux-gkeop (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: linux-gke (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: linux-gkeop (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: linux-gke (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: linux-gkeop (Ubuntu Noble)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2108862

Title:
  Regression in NFS ro mount behavior

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-gke/+bug/2108862/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to