mbox series

[GIT,PULL] vfs fixes

Message ID 20230403-hardener-elevate-44493c0e466b@brauner (mailing list archive)
State Mainlined, archived
Headers show
Series [GIT,PULL] vfs fixes | expand

Pull-request

ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git tags/vfs.misc.fixes.v6.3-rc6

Message

Christian Brauner April 3, 2023, 11:04 a.m. UTC
Hey Linus,

/* Summary */
When a mount or mount tree is made shared the vfs allocates new peer
group ids for all mounts that have no peer group id set. Only mounts
that aren't marked with MNT_SHARED are relevant here as MNT_SHARED
indicates that the mount has fully transitioned to a shared mount. The
peer group id handling is done with namespace lock held.

On failure, the peer group id settings of mounts for which a new peer
group id was allocated need to be reverted and the allocated peer group
id freed. The cleanup_group_ids() helper can identify the mounts to
cleanup by checking whether a given mount has a peer group id set but
isn't marked MNT_SHARED. The deallocation always needs to happen with
namespace lock held to protect against concurrent modifications of the
propagation settings.

This pull request contains a fix for the one place where the namespace
lock was dropped before calling cleanup_group_ids().

/* Testing */
clang: Ubuntu clang version 15.0.6
gcc: gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0

All patches are based on v6.3-rc4 and have been sitting in linux-next.
No build failures or warnings were observed. All old and new tests in
fstests, selftests, and LTP pass without regressions.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from
linux-next and no merge conflicts showed up doing a test-merge with
current mainline.

The following changes since commit 197b6b60ae7bc51dd0814953c562833143b292aa:

  Linux 6.3-rc4 (2023-03-26 14:40:20 -0700)

are available in the Git repository at:

  ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git tags/vfs.misc.fixes.v6.3-rc6

for you to fetch changes up to cb2239c198ad9fbd5aced22cf93e45562da781eb:

  fs: drop peer group ids under namespace lock (2023-03-31 12:13:37 +0200)

Please consider pulling these changes from the signed vfs.misc.fixes.v6.3-rc6 tag.

Thanks!
Christian

----------------------------------------------------------------
vfs.misc.fixes.v6.3-rc6

----------------------------------------------------------------
Christian Brauner (1):
      fs: drop peer group ids under namespace lock

 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

pr-tracker-bot@kernel.org April 3, 2023, 4:51 p.m. UTC | #1
The pull request you sent on Mon,  3 Apr 2023 13:04:58 +0200:

> ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git tags/vfs.misc.fixes.v6.3-rc6

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/148341f0a2f53b5e8808d093333d85170586a15d

Thank you!