Commit c86872a
ipv6: Fix idev->addr_list corruption
[ Upstream commit a2d6cbb ]
addrconf_ifdown() removes elements from the idev->addr_list without
holding the idev->lock.
If this happens while the loop in __ipv6_dev_get_saddr() is handling the
same element, that function ends up in an infinite loop:
NMI watchdog: BUG: soft lockup - CPU#1 stuck for 23s! [test:1719]
Call Trace:
ipv6_get_saddr_eval+0x13c/0x3a0
__ipv6_dev_get_saddr+0xe4/0x1f0
ipv6_dev_get_saddr+0x1b4/0x204
ip6_dst_lookup_tail+0xcc/0x27c
ip6_dst_lookup_flow+0x38/0x80
udpv6_sendmsg+0x708/0xba8
sock_sendmsg+0x18/0x30
SyS_sendto+0xb8/0xf8
syscall_common+0x34/0x58
Fixes: 6a92393 (Revert "ipv6: Revert optional address flusing on ifdown.")
Signed-off-by: Rabin Vincent <rabinv@axis.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 479beb4 commit c86872a
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3602 | 3602 | | |
3603 | 3603 | | |
3604 | 3604 | | |
| 3605 | + | |
3605 | 3606 | | |
3606 | 3607 | | |
3607 | 3608 | | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
3608 | 3614 | | |
3609 | 3615 | | |
3610 | 3616 | | |
3611 | | - | |
3612 | | - | |
| 3617 | + | |
3613 | 3618 | | |
3614 | 3619 | | |
3615 | 3620 | | |
| |||
3621 | 3626 | | |
3622 | 3627 | | |
3623 | 3628 | | |
3624 | | - | |
3625 | | - | |
3626 | 3629 | | |
3627 | 3630 | | |
3628 | 3631 | | |
| |||
0 commit comments