[ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: 41467d2ff4dfe1837cbb0f45e2088e6e787580c6 WARNING: Author mismatch between patch and upstream commit: Backport author: Vasiliy Kovalev<kovalev@xxxxxxxxxxxx> Commit author: Yajun Deng<yajun.deng@xxxxxxxxx> Status in newer kernel trees: 6.13.y | Branch not found 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1) 6.1.y | Present (exact SHA1) 5.15.y | Present (exact SHA1) 5.10.y | Present (different SHA1: d33542e7aebc) Note: The patch differs from the upstream commit: --- 1: 41467d2ff4dfe ! 1: 1bdbc1a4c6a3a net: net_namespace: Optimize the code @@ Metadata ## Commit message ## net: net_namespace: Optimize the code + commit 41467d2ff4dfe1837cbb0f45e2088e6e787580c6 upstream. + There is only one caller for ops_free(), so inline it. Separate net_drop_ns() and net_free(), so the net_free() can be called directly. @@ Commit message Signed-off-by: Yajun Deng <yajun.deng@xxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> + Signed-off-by: Vasiliy Kovalev <kovalev@xxxxxxxxxxxx> ## net/core/net_namespace.c ## @@ net/core/net_namespace.c: static int net_assign_generic(struct net *net, unsigned int id, void *data) @@ net/core/net_namespace.c: static struct net *net_alloc(void) struct net *copy_net_ns(unsigned long flags, @@ net/core/net_namespace.c: struct net *copy_net_ns(unsigned long flags, - put_userns: key_remove_domain(net->key_domain); + #endif put_user_ns(user_ns); - net_drop_ns(net); + net_free(net); @@ net/core/net_namespace.c: struct net *copy_net_ns(unsigned long flags, dec_net_namespaces(ucounts); return ERR_PTR(rv); @@ net/core/net_namespace.c: static void cleanup_net(struct work_struct *work) - dec_net_namespaces(net->ucounts); key_remove_domain(net->key_domain); + #endif put_user_ns(net->user_ns); - net_drop_ns(net); + net_free(net); --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.10.y | Success | Success |