From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 186ECC433DF for ; Thu, 8 Oct 2020 23:48:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7BE972224C for ; Thu, 8 Oct 2020 23:48:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YbAJ6nZf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GWrG7ZlJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BE972224C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZAkTFwyaB33iI7XnrHmiTlTIPZ5TnPLj9Q4YTlXxk9Q=; b=YbAJ6nZfL2vev0UScQyRcRkKX hUf2LknL29s0K0vAaVAAmrryx5AA42NqtufF3lOKW882saK0tIL8z52g6JoWUJ9vr/VuZBFX5tKTI m2iCgSz60u1Qu5ZzdeNcFObW85zYL3xr767U8K7e6xS/5JGz77WLU/t9h+vnzsraPurJI2gZ7zWDb /hk0ycvF08KkkkR3fXC/UJvfkzWXRNqsiP54pIjUvlhClOrGL7FVJhtevLy4lcx0cVQG8mzYZFnOT J3uDW+JCN4ibAEKBJ66XWA1GSkz4Azaj/aQVnTFSShk4dxnqrFe/kBiXKwHELhkE4tW4qBLJyzd3r fI+l58kjw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQfc1-0007ny-15; Thu, 08 Oct 2020 23:46:17 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQfby-0007nB-RU for linux-arm-kernel@lists.infradead.org; Thu, 08 Oct 2020 23:46:15 +0000 Received: by mail-ed1-x544.google.com with SMTP id dg9so5210710edb.12 for ; Thu, 08 Oct 2020 16:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AEjSqknP1oCJUZw0NkEtwBPT55uFfupDNX0nujX92jY=; b=GWrG7ZlJxcztuWXZUvIrAfhi9uwncN6XEo0oq2M8JMsQwFXvq8h68Sr9KLnM+ZwIfa Owsc9GtFHci0SVMizGU3PBTiCPtPLSbsvkZ2pfupp3lsTOVandmq650Z36VYdeVoujtU V3wEarJGtCdTo5AWhh9NS8bMTcmMv6nn/3Ybmc8J12fZCJuojQqB1b/P4nuyqDa6+lJ7 o9NMkI3LWj+Uh/44vGL39oJVrS02UexTPTNFI0vuMVNdQhUulySxkkOAN0rK1duWzhEe rSla9Lin8zL2p51R84dvU3fIftLx3rxgXwkRgKbkwDkLDNQ9lwzRUaC/opKsDcDp1pQK 2Vvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AEjSqknP1oCJUZw0NkEtwBPT55uFfupDNX0nujX92jY=; b=g8jqMYo4LZjElqKcQwjpQKtke1yl+a9s0ttJ2F4QPOzdtu9tmJi1ULzwzQAPetPkYi qMCejYbXCg7JHP3sxvo2SMuBgoy097QVZ9aOeVG5YIHmSMBm95Q0Wl92/0dgCwS+2Omx 3vvcmZzGuLi5wg/IiVcmIWotb83D06saGgwwEU1VqIhBo/MUbXEz7SL8McAxbe53FFEe zJY3IyXqkYvnf90uH1ODdxPQce60M/rV7uAi3M5GYlu5b8i7Ar9cTL7yLpSwhPIgWNf6 MeLh/59pYpbbOBF2xo9aZBy6kipIoXUPrftnkHnNn8O6qrE2TMqkfjJzfdFYoIN1Rzqe MSwg== X-Gm-Message-State: AOAM533vn3vAC+TePNZoRZmQkf5yTC9dUbIFMzHdIa8Ov62dWrcqJLi6 tOjlfTak/YfMqWanVcoDd7U= X-Google-Smtp-Source: ABdhPJzH871e6pCRv5eB3S6xhjqB+QCnAVWqXh0JUJ33ZffSYMGwr7HfLigoej2Ld+mdkGD7QY9/kQ== X-Received: by 2002:aa7:ccd9:: with SMTP id y25mr11332579edt.375.1602200771361; Thu, 08 Oct 2020 16:46:11 -0700 (PDT) Received: from skbuf ([188.26.229.171]) by smtp.gmail.com with ESMTPSA id n4sm5189280ejj.19.2020.10.08.16.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 16:46:10 -0700 (PDT) Date: Fri, 9 Oct 2020 02:46:09 +0300 From: Vladimir Oltean To: John Keeping Subject: Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled Message-ID: <20201008234609.x3iy65g445hmmt73@skbuf> References: <20201008162749.860521-1-john@metanate.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201008162749.860521-1-john@metanate.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201008_194614_927254_01394ADA X-CRM114-Status: GOOD ( 16.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Torgue , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Jose Abreu , Maxime Coquelin , Giuseppe Cavallaro , Jakub Kicinski , "David S. Miller" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Oct 08, 2020 at 05:27:49PM +0100, John Keeping wrote: > With threadirqs, stmmac_interrupt() is called on a thread with hardirqs > enabled so we cannot call __napi_schedule_irqoff(). Under lockdep it > leads to: > > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 285 at kernel/softirq.c:598 __raise_softirq_irqoff+0x6c/0x1c8 > IRQs not disabled as expected > Modules linked in: brcmfmac hci_uart btbcm cfg80211 brcmutil > CPU: 0 PID: 285 Comm: irq/41-eth0 Not tainted 5.4.69-rt39 #1 > Hardware name: Rockchip (Device Tree) > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0xa8/0xe0) > [] (dump_stack) from [] (__warn+0xe0/0xfc) > [] (__warn) from [] (warn_slowpath_fmt+0x7c/0xa4) > [] (warn_slowpath_fmt) from [] (__raise_softirq_irqoff+0x6c/0x1c8) > [] (__raise_softirq_irqoff) from [] (stmmac_interrupt+0x388/0x4e0) > [] (stmmac_interrupt) from [] (irq_forced_thread_fn+0x28/0x64) > [] (irq_forced_thread_fn) from [] (irq_thread+0x124/0x260) > [] (irq_thread) from [] (kthread+0x154/0x164) > [] (kthread) from [] (ret_from_fork+0x14/0x38) > Exception stack(0xeb7b5fb0 to 0xeb7b5ff8) > 5fa0: 00000000 00000000 00000000 00000000 > 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 > irq event stamp: 48 > hardirqs last enabled at (50): [] prb_unlock+0x7c/0x8c > hardirqs last disabled at (51): [] prb_lock+0x58/0x100 > softirqs last enabled at (0): [] copy_process+0x550/0x1654 > softirqs last disabled at (25): [] irq_forced_thread_fn+0x0/0x64 > ---[ end trace 0000000000000002 ]--- > > Use __napi_schedule() instead which will save & restore the interrupt > state. > > Fixes: 4ccb45857c2c ("net: stmmac: Fix NAPI poll in TX path when in multi-queue") > Signed-off-by: John Keeping > --- Don't get me wrong, this is so cool that the new lockdep warning is really helping out finding real bugs, but the patch that adds that warning (https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=cdabce2e3dff7e4bcef73473987618569d178af3) isn't in 5.4.69-rt39, is it? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel