1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 01:20:14 +00:00
Christian Brauner cefd55bd21
nsproxy: fix free_nsproxy() and simplify create_new_namespaces()
Make it possible to handle NULL being passed to the reference count
helpers instead of forcing the caller to handle this. Afterwards we can
nicely allow a cleanup guard to handle nsproxy freeing.

Active reference count handling is not done in nsproxy_free() but rather
in free_nsproxy() as nsproxy_free() is also called from setns() failure
paths where a new nsproxy has been prepared but has not been marked as
active via switch_task_namespaces().

Link: https://lore.kernel.org/690bfb9e.050a0220.2e3c35.0013.GAE@google.com
Link: https://patch.msgid.link/20251111-sakralbau-guthaben-7dcc277d337f@brauner
Fixes: 3c9820d5c64a ("ns: add active reference count")
Reported-by: syzbot+0b2e79f91ff6579bfa5b@syzkaller.appspotmail.com
Reported-by: syzbot+0a8655a80e189278487e@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-11-14 13:10:38 +01:00
..
2025-10-07 08:40:15 -07:00
2025-10-04 11:13:11 -07:00
2025-10-07 08:40:15 -07:00
2025-08-30 10:15:28 -04:00
2025-09-30 08:22:16 -07:00
2025-11-03 17:41:17 +01:00
2025-11-03 17:41:17 +01:00
2025-11-03 17:41:17 +01:00
2025-10-02 18:44:54 -07:00
2025-11-11 10:01:31 +01:00
2025-11-11 10:01:31 +01:00
2025-10-02 18:44:54 -07:00
2025-09-29 11:20:29 -07:00