On Tue, Nov 1, 2016 at 6:54 PM, Eric Dumazet <eric.duma...@gmail.com> wrote: > On Tue, 2016-11-01 at 16:04 -0700, Cong Wang wrote: >> Andrey reported this kernel warning: > >> Unlike commit 26cabd31259ba43f68026ce3f62b78094124333f >> ("sched, net: Clean up sk_wait_event() vs. might_sleep()"), the >> sleeping function is called before schedule_timeout(), this is indeed >> a bug. Fix this by moving the wait logic to the new API, it is similar >> to commit ff960a731788a7408b6f66ec4fd772ff18833211 >> ("netdev, sched/wait: Fix sleeping inside wait event"). >> >> Reported-by: Andrey Konovalov <andreyk...@google.com> >> Cc: Andrey Konovalov <andreyk...@google.com> >> Cc: Eric Dumazet <eric.duma...@gmail.com> >> Cc: Peter Zijlstra <pet...@infradead.org> >> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> >> --- > > > Excellent. > > I guess we could also define sk_wait_event_woken() > and use it instead of sk_wait_event(), and also in > inet_wait_for_connect()
Agreed, I will send some followup patches to address this, probably all release_sock() before a schedule_*() need to fix. Thanks!