Commit cf0be88057baceae033a82d669128b282308c742
Committed by
David S. Miller
1 parent
d2fe85da52
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
arp: fix a regression in arp_solicit()
Sedat reported the following commit caused a regression: commit 9650388b5c56578fdccc79c57a8c82fb92b8e7f1 Author: Eric Dumazet <edumazet@google.com> Date: Fri Dec 21 07:32:10 2012 +0000 ipv4: arp: fix a lockdep splat in arp_solicit This is due to the 6th parameter of arp_send() needs to be NULL for the broadcast case, the above commit changed it to an all-zero array by mistake. Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: Eric Dumazet <edumazet@google.com> Cc: David S. Miller <davem@davemloft.net> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
net/ipv4/arp.c
... | ... | @@ -321,7 +321,7 @@ |
321 | 321 | static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) |
322 | 322 | { |
323 | 323 | __be32 saddr = 0; |
324 | - u8 dst_ha[MAX_ADDR_LEN]; | |
324 | + u8 dst_ha[MAX_ADDR_LEN], *dst_hw = NULL; | |
325 | 325 | struct net_device *dev = neigh->dev; |
326 | 326 | __be32 target = *(__be32 *)neigh->primary_key; |
327 | 327 | int probes = atomic_read(&neigh->probes); |
328 | 328 | |
... | ... | @@ -364,8 +364,8 @@ |
364 | 364 | if (!(neigh->nud_state & NUD_VALID)) |
365 | 365 | pr_debug("trying to ucast probe in NUD_INVALID\n"); |
366 | 366 | neigh_ha_snapshot(dst_ha, neigh, dev); |
367 | + dst_hw = dst_ha; | |
367 | 368 | } else { |
368 | - memset(dst_ha, 0, dev->addr_len); | |
369 | 369 | probes -= neigh->parms->app_probes; |
370 | 370 | if (probes < 0) { |
371 | 371 | #ifdef CONFIG_ARPD |
... | ... | @@ -376,7 +376,7 @@ |
376 | 376 | } |
377 | 377 | |
378 | 378 | arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr, |
379 | - dst_ha, dev->dev_addr, NULL); | |
379 | + dst_hw, dev->dev_addr, NULL); | |
380 | 380 | } |
381 | 381 | |
382 | 382 | static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip) |