Re: WARNING: suspicious RCU usage in rt6_check_expired

From: David Ahern
Date: Mon Apr 23 2018 - 11:10:13 EST


On 4/23/18 7:31 AM, Eric Dumazet wrote:
>> stack backtrace:
>> CPU: 1 PID: 25958 Comm: syz-executor7 Not tainted 4.16.0+ #11
>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
>> Call Trace:
>> Â__dump_stack lib/dump_stack.c:77 [inline]
>> Âdump_stack+0x1b9/0x294 lib/dump_stack.c:113
>> Âlockdep_rcu_suspicious+0x14a/0x153 kernel/locking/lockdep.c:4592
>> Ârt6_check_expired+0x38b/0x3e0 net/ipv6/route.c:410
>> Âip6_negative_advice+0x67/0xc0 net/ipv6/route.c:2204
>> Âdst_negative_advice include/net/sock.h:1786 [inline]
>> Âsock_setsockopt+0x138f/0x1fe0 net/core/sock.c:1051
>> Â__sys_setsockopt+0x2df/0x390 net/socket.c:1899
>> ÂSYSC_setsockopt net/socket.c:1914 [inline]
>> ÂSyS_setsockopt+0x34/0x50 net/socket.c:1911
>> Âdo_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
>> Âentry_SYSCALL_64_after_hwframe+0x42/0xb7

...

>
> Added in commit a68886a691804d3f6d479ebf6825480fbafb6a00
> ("net/ipv6: Make from in rt6_info rcu protected")
>

I missed the rcu_read_lock for this path. Will send a patch.