summaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-12-09 21:04:19 +0100
committerJakub Kicinski <kuba@kernel.org>2021-12-09 22:23:02 +0100
commit3150a73366b64e3109f0facbc98bcacbc14e81ba (patch)
tree2b94b32c5fe97a4e76058a6f65e8c5717b53ee16 /net/core/neighbour.c
parentskbuff: Extract list pointers to silence compiler warnings (diff)
parentMerge tag 'net-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff)
downloadlinux-3150a73366b64e3109f0facbc98bcacbc14e81ba.tar.xz
linux-3150a73366b64e3109f0facbc98bcacbc14e81ba.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index dd271ffedf11..506aa01776df 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -763,11 +763,10 @@ struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl,
ASSERT_RTNL();
- n = kmalloc(sizeof(*n) + key_len, GFP_KERNEL);
+ n = kzalloc(sizeof(*n) + key_len, GFP_KERNEL);
if (!n)
goto out;
- n->protocol = 0;
write_pnet(&n->net, net);
memcpy(n->key, pkey, key_len);
n->dev = dev;