Message ID | 20230622093731.632666-1-andrea.righi@canonical.com |
---|---|
Headers | show |
Series | UBUNTU: SAUCE: overlayfs: fix reference count mismatch | expand |
On 22.06.23 11:37, Andrea Righi wrote: > BugLink: https://bugs.launchpad.net/bugs/2016398 > > [Impact] > > Opened files reported in /proc/pid/map_files can be shows with the wrong > mount point using overlayfs with filesystem namspaces. > > This incorrect behavior is fixed: > > UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files > > However, the fix introduced a new regression, the reference to the > original file stored in vma->vm_prfile is not properly released when > vma->vm_prfile is replaced with a new file. > > This can cause a reference counter unbalance, leading errors such as > "target is busy" when trying to unmount overlayfs, even if the > filesystem has not active reference. > > [Test case] > > Reproducer provided by original bug reporter: > https://launchpadlibrarian.net/663151659/overlayfsscript_example > > [Fix] > > Fix by properly releasing the original file stored in vm_prfile. > > [Regression potential] > > This fix seems to solve the reported bug (verified with the reproducer) > and it doesn't seem to introduce other regressions or behavior change. > > However, we may experience regressions in overlayfs or potentially other > "target is busy" errors when unmounting overlayfs filesystems with this > fix applied, if there are still other corner cases not covered properly. > > From the discussion I would expect a fresh submission for Focal. Andrea, I think that would better be a new thread. Hence the NACK. -Stefan
On Fri, Jun 30, 2023 at 09:26:20AM +0200, Stefan Bader wrote: > On 22.06.23 11:37, Andrea Righi wrote: > > BugLink: https://bugs.launchpad.net/bugs/2016398 > > > > [Impact] > > > > Opened files reported in /proc/pid/map_files can be shows with the wrong > > mount point using overlayfs with filesystem namspaces. > > > > This incorrect behavior is fixed: > > > > UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files > > > > However, the fix introduced a new regression, the reference to the > > original file stored in vma->vm_prfile is not properly released when > > vma->vm_prfile is replaced with a new file. > > > > This can cause a reference counter unbalance, leading errors such as > > "target is busy" when trying to unmount overlayfs, even if the > > filesystem has not active reference. > > > > [Test case] > > > > Reproducer provided by original bug reporter: > > https://launchpadlibrarian.net/663151659/overlayfsscript_example > > > > [Fix] > > > > Fix by properly releasing the original file stored in vm_prfile. > > > > [Regression potential] > > > > This fix seems to solve the reported bug (verified with the reproducer) > > and it doesn't seem to introduce other regressions or behavior change. > > > > However, we may experience regressions in overlayfs or potentially other > > "target is busy" errors when unmounting overlayfs filesystems with this > > fix applied, if there are still other corner cases not covered properly. > > > > > > From the discussion I would expect a fresh submission for Focal. Andrea, I > think that would better be a new thread. Hence the NACK. Yes, I'll send a new patch set in a separate thread. Thanks! -Andrea
On 22/06/2023 11:37, Andrea Righi wrote: > BugLink: https://bugs.launchpad.net/bugs/2016398 > > [Impact] > > Opened files reported in /proc/pid/map_files can be shows with the wrong > mount point using overlayfs with filesystem namspaces. > > This incorrect behavior is fixed: > > UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files > > However, the fix introduced a new regression, the reference to the > original file stored in vma->vm_prfile is not properly released when > vma->vm_prfile is replaced with a new file. > > This can cause a reference counter unbalance, leading errors such as > "target is busy" when trying to unmount overlayfs, even if the > filesystem has not active reference. > > [Test case] > > Reproducer provided by original bug reporter: > https://launchpadlibrarian.net/663151659/overlayfsscript_example > > [Fix] > > Fix by properly releasing the original file stored in vm_prfile. > > [Regression potential] > > This fix seems to solve the reported bug (verified with the reproducer) > and it doesn't seem to introduce other regressions or behavior change. > > However, we may experience regressions in overlayfs or potentially other > "target is busy" errors when unmounting overlayfs filesystems with this > fix applied, if there are still other corner cases not covered properly. > > Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
On 22.06.23 11:37, Andrea Righi wrote: > BugLink: https://bugs.launchpad.net/bugs/2016398 > > [Impact] > > Opened files reported in /proc/pid/map_files can be shows with the wrong > mount point using overlayfs with filesystem namspaces. > > This incorrect behavior is fixed: > > UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files > > However, the fix introduced a new regression, the reference to the > original file stored in vma->vm_prfile is not properly released when > vma->vm_prfile is replaced with a new file. > > This can cause a reference counter unbalance, leading errors such as > "target is busy" when trying to unmount overlayfs, even if the > filesystem has not active reference. > > [Test case] > > Reproducer provided by original bug reporter: > https://launchpadlibrarian.net/663151659/overlayfsscript_example > > [Fix] > > Fix by properly releasing the original file stored in vm_prfile. > > [Regression potential] > > This fix seems to solve the reported bug (verified with the reproducer) > and it doesn't seem to introduce other regressions or behavior change. > > However, we may experience regressions in overlayfs or potentially other > "target is busy" errors when unmounting overlayfs filesystems with this > fix applied, if there are still other corner cases not covered properly. > > Applied to lunar,jammy:linux/master-next. Kinetic is EOL and Focal was applied from a separate submission. Thanks. -Stefan