Skip to content

Minor devpts cleanups, fixes and enhancments

Eric W. Biederman containers linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6devpts: Move parse_mount_options into fill_superfs/devpts/inode.c+8 -81 reply
2/6devpts: Move the creation of /dev/pts/ptmx into fill_superfs/devpts/inode.c+11 -80 replies
3/6devpts: Simplify devpts_mount by using mount_nodevfs/devpts/inode.c+1 -180 replies
4/6devpts: Make devpts_kill_sb safe if fsi is NULLfs/devpts/inode.c+2 -10 replies
5/6devpts: Remove sync_filesystemsfs/devpts/inode.c+0 -10 replies
6/6devpts: Change the owner of /dev/pts/ptmx to the mounter of /dev/ptsfs/devpts/inode.c+4 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH tty-next 0/6] Minor devpts cleanups, fixes and enhancments

Greg please apply the following patches to tty-next. If tty-next is not the proper tree please let me know and I will take these patches through my user namespace tree.

The follow patches perform a few small cleanups and one enhancement to devpts, with a net decrease in code size.

The big achievement from a code maintenance point of view is being able to use mount_nodev in devpts_mount.

The only really significant bug fix is handling the very unlikely case when kzalloc fails in new_pts_fs_info called from devpts_fill_super and s_fs_info is NULL when devpts_kill_sb is called from deactivate_locked super.

The final patch is an enhancment to use the fsuid and fsgid of the mounter of devpts as the owner of /dev/pts/ptmx. This is a feature that has been asked for by users of user namespaces a couple of times, so that they are not required to have uid 0 mapped into a user namespace to use devpts.

Eric

fs/devpts/inode.c | 71 ++++++++++++++++++++-----------------------------------

 1 file changed, 26 insertions(+), 45 deletions(-)

Eric W. Biederman (6):
devpts: Move parse_mount_options into fill_super
devpts: Move the creation of /dev/pts/ptmx into fill_super
devpts: Simplify devpts_mount by using mount_nodev
devpts: Make devpts_kill_sb safe if fsi is NULL
devpts: Remove sync_filesystems
devpts: Change the owner of /dev/pts/ptmx to the mounter of /dev/pts