From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH bpf-next 1/2] bpf: enable stackmap with build_id in nmi context Date: Wed, 2 May 2018 19:30:27 +0200 Message-ID: <20180502173027.GM12180@hirez.programming.kicks-ass.net> References: <20180502000220.2585320-1-songliubraving@fb.com> <20180502092109.GI12180@hirez.programming.kicks-ass.net> <30F32ACF-5155-459B-BD47-5060CCA52788@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Networking , Kernel Team , Alexei Starovoitov , Daniel Borkmann To: Song Liu Return-path: Received: from merlin.infradead.org ([205.233.59.134]:59368 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbeEBRae (ORCPT ); Wed, 2 May 2018 13:30:34 -0400 Content-Disposition: inline In-Reply-To: <30F32ACF-5155-459B-BD47-5060CCA52788@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, May 02, 2018 at 04:48:32PM +0000, Song Liu wrote: > > It's broken though, I've bet you've never actually ran this with lockdep > > enabled for example. > > I am not following here. I just run the new selftest with CONFIG_LOCKDEP on, > and got no warning for this. Weird, I would be expecting complaints about releasing an unheld lock. nmi_enter(),nmi_exit() have lockdep_off(),lockdep_on() resp. Which means that the down_trylock() will not be recorded. The up, which is done from IRQ context, will not be so supressed and should hit print_unlock_imbalance_bug(). > > Also, you set work->sem before you do trylock, if the trylock fails you > > return early and keep work->sem set, which will thereafter always result > > in irq_work_busy. > > work->sem was set after down_read_trylock(). I guess you misread the patch? Argh, yes indeed. Sorry.