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 Kernel
Packages, which is subscribed to linux-gke in Ubuntu.
https://bugs.launchpad.net/bugs/2108862

Title:
  Regression in NFS ro mount behavior

Status in linux-gke package in Ubuntu:
  New
Status in linux-gkeop package in Ubuntu:
  New
Status in linux-gke source package in Jammy:
  New
Status in linux-gkeop source package in Jammy:
  New
Status in linux-gke source package in Noble:
  New
Status in linux-gkeop source package in Noble:
  New

Bug description:
  [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.

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


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to