Skip to content

pid_ns_release_proc() fixes

Oleg Nesterov containers lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pid_ns: move destroy_pid_namespace() into workqueue contextinclude/linux/pid_namespace.h kernel/pid_namespace.c+18 -80 replies
2/2pid_ns: refactor the buggy pid_ns_release_proc() logicfs/proc/base.c fs/proc/root.c kernel/pid_namespace.c+8 -80 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] pid_ns_release_proc() fixes
Quoted 8 lines · Oleg Nesterov
Quoted 6 lines · Eric W. Biederman
Quoted 2 lines · Oleg Nesterov

I am going to simplify, test, and send the fix which moves mntput() into free_pid_ns() paths.

Quoted 6 lines
Quoted 1 line

free_pid_ns is comparatively late, to release the kern_mount.

Why?

Once again, it is very possible I am wrong. I forgot this code if ever knew. But could you please explain?

So. Please the the patches. On top of

[PATCH 1/4] procfs: proc_get_sb: consolidate/cleanup root_inode->pid logic [PATCH 2/4] procfs: kill the global proc_mnt variable
[PATCH 3/4] procfs: move pid_ns_prepare_proc() from copy_process() to create_pid_namespace()

Still untested, sorry. There was no electricity in office this weekend, and I can hardly work from home ;) I am sending this fix for review.

And let me repeat, I do not think this approach is the best (even _if_ this change is correct), just my attempt to fix the bugs.

What do you think?

Oleg.