From d54cc3a5272c29129ec53ac9a35ba694df7eea29 Mon Sep 17 00:00:00 2001 From: Shaojie Sun Date: Thu, 3 Sep 2026 14:48:27 +0800 Subject: [PATCH] uts: drop BUG_ON() in copy_utsname() The sole caller, create_new_namespaces(), always passes a valid uts namespace pointer from the task's nsproxy. The other copy_*_ns() helpers, e.g. copy_time_ns() and copy_pid_ns(), don't perform such a check either. Drop the BUG_ON() for consistency with them. Signed-off-by: Shaojie Sun Link: https://patch.msgid.link/20260903064828.126643-3-sunshaojie@kylinos.cn Reviewed-by: Bradley Morgan Signed-off-by: Christian Brauner (Amutable) --- kernel/utsname.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/utsname.c b/kernel/utsname.c index ebbfc578a9d3..1ebf87e24607 100644 --- a/kernel/utsname.c +++ b/kernel/utsname.c @@ -81,7 +81,6 @@ struct uts_namespace *copy_utsname(u64 flags, { struct uts_namespace *new_ns; - BUG_ON(!old_ns); get_uts_ns(old_ns); if (!(flags & CLONE_NEWUTS))