All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	syzbot <syzbot+93d94a001cfbce9e60e1@syzkaller.appspotmail.com>,
	aarcange@redhat.com, akpm@linux-foundation.org,
	kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux@dominikbrodowski.net, mhocko@suse.com,
	rientjes@google.com, syzkaller-bugs@googlegroups.com,
	xieyisheng1@huawei.com, zhongjiang@huawei.com,
	Mel Gorman <mgorman@techsingularity.net>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: possible deadlock in __wake_up_common_lock
Date: Mon, 7 Jan 2019 22:29:21 +0100	[thread overview]
Message-ID: <20190107212921.GK14122@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190107204627.GA25526@cmpxchg.org>

On Mon, Jan 07, 2019 at 03:46:27PM -0500, Johannes Weiner wrote:
> Hm, so the splat says this:
> 
> wakeups take the pi lock
> pi lock holders take the rq lock
> rq lock holders take the timer base lock (thanks psi)
> timer base lock holders take the zone lock (thanks kasan)
> problem: now a zone lock holder wakes up kswapd
> 
> right? And we can break the chain from the VM or from psi.

Yep. And since PSI it the latest addition to that chain, I figured we
ought maybe not do that. But I've not looked at a computer in 2 weeks,
so what do I know ;-)

> I cannot say one is clearly cleaner than the other, though. With kasan
> allocating from inside the basic timer code, those locks leak out from
> kernel/* and contaminate the VM locking anyway.
> 
> Do you think the rq->lock -> base->lock ordering is likely to cause
> issues elsewhere?

Not sure; we nest the hrtimer base lock under rq->lock (at the time I
fixed hrtimers to not hold it's base lock over the timer function
callback, just like regular timers already did) and that has worked
fine.

So maybe we should look at the kasan thing.. dunno.

  reply	other threads:[~2019-01-07 21:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02  8:51 possible deadlock in __wake_up_common_lock syzbot
2019-01-02  8:51 ` syzbot
2019-01-02 12:51 ` Vlastimil Babka
2019-01-02 12:51   ` Vlastimil Babka
2019-01-02 18:06   ` Mel Gorman
2019-01-02 18:19     ` Qian Cai
2019-01-03  1:28       ` Tetsuo Handa
2019-01-03  3:27         ` Qian Cai
2019-01-02 18:29     ` Dmitry Vyukov
2019-01-02 18:29       ` Dmitry Vyukov
2019-01-03 16:37       ` Mel Gorman
2019-01-03 19:40         ` Qian Cai
2019-01-03 22:54           ` Mel Gorman
2019-01-07  9:52   ` Peter Zijlstra
2019-01-07 20:46     ` Johannes Weiner
2019-01-07 21:29       ` Peter Zijlstra [this message]
2019-01-07 21:33         ` Peter Zijlstra
2019-01-08 13:08   ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190107212921.GK14122@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=rientjes@google.com \
    --cc=syzbot+93d94a001cfbce9e60e1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vbabka@suse.cz \
    --cc=xieyisheng1@huawei.com \
    --cc=zhongjiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.