[PATCH 5.4 004/154] Revert "sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy"

Greg Kroah-Hartman
2025-04-08T12:03:27Z

From: Magali Lemes <magali.lemes@canonical.com>

This reverts commit 1031462a944ba0fa83c25ab1111465f8345b5589 as it
was backported incorrectly.
A subsequent commit will re-backport the original patch.

Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sctp/sysctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -441,8 +441,7 @@ static int proc_sctp_do_auth(struct ctl_
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
- struct net *net = container_of(ctl->data, struct net,
- sctp.sctp_hmac_alg);
+ struct net *net = current->nsproxy->net_ns;
struct ctl_table tbl;
int new_value, ret;