From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751767AbeEEHHF (ORCPT ); Sat, 5 May 2018 03:07:05 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33082 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750831AbeEEHHC (ORCPT ); Sat, 5 May 2018 03:07:02 -0400 X-Google-Smtp-Source: AB8JxZpaNXbWcjVXYRQ65UJTHTcJOgPFcnariwKHQ2hkb9mtotqX7rUtb1ilscazpLApP+EohYO+PQ== Date: Sat, 5 May 2018 09:06:58 +0200 From: Ingo Molnar To: Sebastian Andrzej Siewior Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, tglx@linutronix.de, Ingo Molnar , "David S. Miller" , Johannes Berg , Alexander Aring , Stefan Schmidt , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-wpan@vger.kernel.org, Anna-Maria Gleixner Subject: Re: [RFC PATCH 2/2] net: mac808211: mac802154: use lockdep_assert_in_softirq() instead own warning Message-ID: <20180505070658.sqttolnnkgv7xyj5@gmail.com> References: <20180504175144.12179-1-bigeasy@linutronix.de> <20180504175144.12179-3-bigeasy@linutronix.de> <20180504183249.GU12217@hirez.programming.kicks-ass.net> <20180504184538.gavk7e2vtm73e32w@linutronix.de> <20180504185132.GV12217@hirez.programming.kicks-ass.net> <20180504190735.izmzibhb66gjb5wr@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180504190735.izmzibhb66gjb5wr@linutronix.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Sebastian Andrzej Siewior wrote: > On 2018-05-04 20:51:32 [+0200], Peter Zijlstra wrote: > > On Fri, May 04, 2018 at 08:45:39PM +0200, Sebastian Andrzej Siewior wrote: > > > On 2018-05-04 20:32:49 [+0200], Peter Zijlstra wrote: > > > > On Fri, May 04, 2018 at 07:51:44PM +0200, Sebastian Andrzej Siewior wrote: > > > > > From: Anna-Maria Gleixner > > > > > > > > > > The warning in ieee802154_rx() and ieee80211_rx_napi() is there to ensure > > > > > the softirq context for the subsequent netif_receive_skb() call. > > > > > > > > That's not in fact what it does though; so while that might indeed be > > > > the intent that's not what it does. > > > > > > It was introduced in commit d20ef63d3246 ("mac80211: document > > > ieee80211_rx() context requirement"): > > > > > > mac80211: document ieee80211_rx() context requirement > > > > > > ieee80211_rx() must be called with softirqs disabled > > > > softirqs disabled, ack that is exactly what it checks. > > > > But afaict the assertion you introduced tests that we are _in_ softirq > > context, which is not the same. > > indeed, now it clicked. Given what I wrote in the cover letter would you > be in favour of (a proper) lockdep_assert_BH_disabled() or the cheaper > local_bh_enable() (assuming the network folks don't mind the cheaper > version)? BTW., going by the hardirq variant nomenclature: lockdep_assert_irqs_enabled(); ... the proper name would not be lockdep_assert_BH_disabled(), but: lockdep_assert_softirqs_disabled(); Thanks, Ingo