diff options
| author | Guopeng Zhang <zhangguopeng@kylinos.cn> | 2026-06-01 11:29:11 +0800 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-06-30 13:03:53 +0200 |
| commit | 0ae44a20835e5cf37d03a83e70c92e92deda3703 (patch) | |
| tree | b862217fd7f4930caf26acd5310903be87227a2b /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
fs/namespace: notify pollers of legacy propagation changes
Changing mount propagation through the legacy mount API changes
user-visible mountinfo contents, including the shared: and master:
optional fields.
The mount_setattr() path already touches the mount namespace after
change_mnt_propagation(), so pollers of /proc/<pid>/mountinfo are woken
when the namespace event changes.
The legacy mount --make-* path also changes propagation through
change_mnt_propagation(), and MOVE_MOUNT_SET_GROUP updates the
propagation relationship of the target mount. Both paths currently
return without touching the affected mount namespace.
As a result, userspace polling /proc/<pid>/mountinfo can miss these
propagation-only changes even though mountinfo has changed.
A simple reproducer that polls /proc/self/mountinfo while changing
propagation shows the inconsistency.
Before this change:
legacy MS_SHARED: poll ret=0 revents=0x0
mount_setattr MS_SHARED: poll ret=1 revents=0xa
After this change:
legacy MS_SHARED: poll ret=1 revents=0xa
mount_setattr MS_SHARED: poll ret=1 revents=0xa
Fix this by touching the affected mount namespace after successful
propagation changes in do_change_type() and do_set_group().
Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Link: https://patch.msgid.link/20260601032911.940507-1-guopeng.zhang@linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
