af_unix: Do not call kmemdup() for init_net's sysctl table.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 27 Jun 2022 23:36:27 +0000 (16:36 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Jun 2022 03:58:57 +0000 (20:58 -0700)
commit849d5aa3a1d833d0b3a18c2d5b816e23003cfe55
treee9aca20d19d98a23e0f569416b0e5eac0d9151cb
parentd521bc0a0f7cdd56b646e6283d5f7296eb16793d
af_unix: Do not call kmemdup() for init_net's sysctl table.

While setting up init_net's sysctl table, we need not duplicate the
global table and can use it directly as ipv4_sysctl_init_net() does.

Unlike IPv4, AF_UNIX does not have a huge sysctl table for now, so it
cannot be a problem, but this patch makes code consistent.

Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20220627233627.51646-1-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/unix/sysctl_net_unix.c