]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc120588fd9a85de439f9b9e375b671a5dafa0ca9
treee9aca20d19d98a23e0f569416b0e5eac0d9151cb
parent0767d6be38e43f386e2718af5a30cbd07bf001d7
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