devinet.c (651a88798412e216f337d70181127e847f00a4b7) | devinet.c (425b9c7f51c98443db71ad679893725483b21196) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * NET3 IP device support routines. 4 * 5 * Derived from the IP parts of dev.c 1.0.19 6 * Authors: Ross Biro 7 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 8 * Mark Evans, <evansmp@uhura.aston.ac.uk> --- 2559 unchanged lines hidden (view full) --- 2568 2569static int __devinet_sysctl_register(struct net *net, char *dev_name, 2570 int ifindex, struct ipv4_devconf *p) 2571{ 2572 int i; 2573 struct devinet_sysctl_table *t; 2574 char path[sizeof("net/ipv4/conf/") + IFNAMSIZ]; 2575 | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * NET3 IP device support routines. 4 * 5 * Derived from the IP parts of dev.c 1.0.19 6 * Authors: Ross Biro 7 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 8 * Mark Evans, <evansmp@uhura.aston.ac.uk> --- 2559 unchanged lines hidden (view full) --- 2568 2569static int __devinet_sysctl_register(struct net *net, char *dev_name, 2570 int ifindex, struct ipv4_devconf *p) 2571{ 2572 int i; 2573 struct devinet_sysctl_table *t; 2574 char path[sizeof("net/ipv4/conf/") + IFNAMSIZ]; 2575 |
2576 t = kmemdup(&devinet_sysctl, sizeof(*t), GFP_KERNEL); | 2576 t = kmemdup(&devinet_sysctl, sizeof(*t), GFP_KERNEL_ACCOUNT); |
2577 if (!t) 2578 goto out; 2579 2580 for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) { 2581 t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf; 2582 t->devinet_vars[i].extra1 = p; 2583 t->devinet_vars[i].extra2 = net; 2584 } --- 208 unchanged lines hidden --- | 2577 if (!t) 2578 goto out; 2579 2580 for (i = 0; i < ARRAY_SIZE(t->devinet_vars) - 1; i++) { 2581 t->devinet_vars[i].data += (char *)p - (char *)&ipv4_devconf; 2582 t->devinet_vars[i].extra1 = p; 2583 t->devinet_vars[i].extra2 = net; 2584 } --- 208 unchanged lines hidden --- |