Skip to content

Commit 81a1d3c

Browse files
Cyrill Gorcunovkaber
authored andcommitted
net: sysctl_net - use net_eq to compare nets
Signed-off-by: Cyrill Gorcunov <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
1 parent acc738f commit 81a1d3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sysctl_net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static struct ctl_table_root net_sysctl_root = {
6161
static int net_ctl_ro_header_perms(struct ctl_table_root *root,
6262
struct nsproxy *namespaces, struct ctl_table *table)
6363
{
64-
if (namespaces->net_ns == &init_net)
64+
if (net_eq(namespaces->net_ns, &init_net))
6565
return table->mode;
6666
else
6767
return table->mode & ~0222;

0 commit comments

Comments
 (0)