mirror of
https://github.com/torvalds/linux.git
synced 2026-10-22 23:01:49 +02:00
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 <sunshaojie@kylinos.cn> Link: https://patch.msgid.link/20260903064828.126643-3-sunshaojie@kylinos.cn Reviewed-by: Bradley Morgan <brads@mainlining.org> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
fec2c3c074
commit
d54cc3a527
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user