[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZykNhbMOrlgCXFYJ@slm.duckdns.org>
Date: Mon, 4 Nov 2024 08:08:05 -1000
From: Tejun Heo <tj@...nel.org>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Hillf Danton <hdanton@...a.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
"Paul E. McKenney" <paulmck@...nel.org>,
Marco Elver <elver@...gle.com>, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org
Subject: Re: [BUG] -next lockdep invalid wait context
Hello,
On Fri, Nov 01, 2024 at 05:45:01PM -0700, Boqun Feng wrote:
...
> Because it's a different bug.
>
> schedule():
> __schedule():
> rq_lock(); // <- rq lock is a raw spin lock, so no sleep inside
> switch_mm_irqs_off():
> trace_tlb_flush():
> bpf_trace_run2():
> stack_map_get_build_id_offset():
> mmap_read_trylock(): // this is actually ok, because
> // trylock() on rwsem won't
> // sleep.
> __mmap_lock_trace_acquire_returned():
> get_mm_memcg_path():
> cgroup_path():
> kernfs_path_from_node():
> read_lock_irqsave(); // on RT, read_lock()
> // is a rwsem IIUC,
> // so might sleep.
> // hence the issue.
>
> Maybe kernfs can use RCU instead of read_lock here? I don't know...
Yeah, we should be able to make kn->name RCU protected and drop the usage of
the rename lock in read paths.
Thanks.
--
tejun
Powered by blists - more mailing lists