neighbor: Initialize protocol when new pneigh_entry are created
Subsystems (2)
PATCH 1/1 neighbor: Initialize protocol when new pneigh_entry are created
From: David Ahern <[email protected]>
pneigh_lookup uses kmalloc versus kzalloc when new entries are allocated. Given that the newly added protocol field needs to be initialized.
Fixes df9b0e30d44c ("neighbor: Add protocol attribute")
Signed-off-by David Ahern <[email protected]>
--- net/core/neighbour.c | 1 + 1 file changed, 1 insertion(+)
net/core/neighbour.c +1 -0
@@ -725,6 +725,7 @@ struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl,if (!n) goto out; + n->protocol =0 ;write_pnet (&n->net, net);memcpy (n->key, pkey, key_len); n->dev = dev;
Signature · 1 line
2.11.0
From: David Ahern <[email protected]>
Date: Wed, 19 Dec 2018 15:53:22 -0800
Quoted 7 lines
From: David Ahern <[email protected]>
pneigh_lookupuses kmalloc versus kzalloc when new entries are allocated. Given that the newly added protocol field needs to be initialized.Fixes df9b0e30d44c ("neighbor: Add protocol attribute")Signed-off-by David Ahern <[email protected]>
Applied, thanks David.