Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1355829ybh; Thu, 23 Jul 2020 06:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxHFWKUwzyEXcKE2WyV0YNmqlle0cTmfQBglHT5/CZRcLIxtG6K/B+AsLWH1YV3dtT2c7A X-Received: by 2002:aa7:cf02:: with SMTP id a2mr4335960edy.263.1595512719635; Thu, 23 Jul 2020 06:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595512719; cv=none; d=google.com; s=arc-20160816; b=qUcopME83Jfu0FdjNZmKSIhgRqzJkYTYCl2kshhNHCO3Jphsa2HxLZFqkvumF9K2Kn UeSoi703lIIK3Do2lXIiFLBppQK83ee3diqbVTWEmUDJJT/8w4g2zJhfsQv6tGYdDZuN pJyfkMSiIfRfFxsADCDjoIlW1zmtt0P0pl9AgB0e/lDqGZaub87w6GL2pVUPHtYqmcfj 7NnwEDXY8MqP6s0rNW59/QBWo0PsKII6gl7jd8YubwBx1gKmRijaW5r+9BX5mh1/y22j iWtbCZu+/qDvKWgDv+uoSCqsPpdjimNPzzaPrAgocCssTc2o1RxTziJ4jvedSPugHCwi 5uvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Qw3sNwZZnfQZzIKQqVMkKAqZzWg7tnvfIAqHN5Eqijs=; b=UxK6BZDHVMslgBvLnBlVn5sIH8mMDwMpMpp9eqVX/xjpfdvM8pNmMrjDe8fCY6AmTv LBom+B5+EDhwsKGXDz0zgqMjEWhlVDD9m1UEoServDpOgDqRZdF3odjLD46sQy3eeWWa PcmsneF7aOQMQoXg1eD0lHMAbz+HfbReqqKsFFKDhzEQg68kESleLam6J16dDKzgju2l 2JzNNgJogJlaR5DYuZC1m3AR9VbD/+mOcZTgT9Rp0W0NbLJCWGVr6uyiAvAkiEZhlr36 pERFNZHXMgj15Cs7CQf7SO+2OyRwoEI2O+CnLCx5hyWG3C6uHO5sU9TNa1sGoqMrGkpW USig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UKBYWfIn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l27si2005189ejg.613.2020.07.23.06.58.16; Thu, 23 Jul 2020 06:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UKBYWfIn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728002AbgGWN52 (ORCPT + 99 others); Thu, 23 Jul 2020 09:57:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbgGWN52 (ORCPT ); Thu, 23 Jul 2020 09:57:28 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0839C0619DC for ; Thu, 23 Jul 2020 06:57:27 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id n24so4359997otr.13 for ; Thu, 23 Jul 2020 06:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qw3sNwZZnfQZzIKQqVMkKAqZzWg7tnvfIAqHN5Eqijs=; b=UKBYWfIn8S3ZQi+XPGaH0O+JxYDNgH0LD4NwCyEQR2Td/hemqG8T9vjh1dyesNmq64 VdapIgBBs1AAFjmejyYRfCL0TcnsQizoOzpgI5hy8A2xqNTNVTDbdCfoHFIsmcwq0Cic WH9HCTU7v7nk9ShxctZgbCqMAbqSN9EBVl/FfXI0hk9XfjSWSEo4UqWByktadPsiqvZp 3//9zNdDdpHzJrOXqrKrXV2p84PL093Dtl4MikWnaZQAcNAWeE7UB0fih8neJRbUdb+D 43lnxh8Mt+WWRy1KJTkmdouHFryy3uy0tc4gJ8tASG++rtmIwKgLaHI94Vuj8qhm1ExO aeUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qw3sNwZZnfQZzIKQqVMkKAqZzWg7tnvfIAqHN5Eqijs=; b=SoUOoiXAEae2Jv/mexwId0rFbB75iqR+oecX7Dh/8vKOmPwplxu8Y3tF+gKWrdjE50 hknGimSf8W0LBWXikfpmFpeS4ofiM5RwX78LxVbxuagcCIsg9qIA0A7bGc1B6+XLKbYK Ww54kDaAmkKm0YxHHnnrUID1X+tFvuDqJJwMwQf5esSICqJhP9o237oOXdJYQ3nclKTC rJntfGZLvV0Xnwq3BW37zizNlUZO5uPcanMCUZqzbjVR1alLNRtIIjxNvfB7HgHJCvNi C4qTbyBq4I7JyVjmmjaAMbw3ypRe3z5wuzptcOOmNZXPoC4LHu4d5IpFFnuSydkRceS9 14bw== X-Gm-Message-State: AOAM530OIsA7n3YLsTVKhZ1COgDPft65sH2ewr/uNHqOqBV6iH2u5f/z EF5QHryIG1zzTHaq2E/yzSp6zd8fZ64ldCjb0Bo= X-Received: by 2002:a9d:6d03:: with SMTP id o3mr4122047otp.343.1595512647425; Thu, 23 Jul 2020 06:57:27 -0700 (PDT) MIME-Version: 1.0 References: <20200723091715.GL19262@shao2-debian> <87v9iexztl.fsf@nanos.tec.linutronix.de> In-Reply-To: <87v9iexztl.fsf@nanos.tec.linutronix.de> From: jun qian Date: Thu, 23 Jul 2020 21:57:16 +0800 Message-ID: Subject: Re: [Softirq] a76eadba0d: WARNING:at_net/mac80211/rx.c:#ieee80211_rx_napi[mac80211] To: Thomas Gleixner Cc: kernel test robot , peterz@infradead.org, will@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org, Uladzislau Rezki , Yafang Shao , lkp@lists.01.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 6:58 PM Thomas Gleixner wrote: > > kernel test robot writes: > > [ 106.856151] WARNING: CPU: 5 PID: 4569 at net/mac80211/rx.c:4708 ieee80211_rx_napi+0x44d/0x560 [mac80211] > > Bah. I clearly should have noticed when looking at the patch. > > pending = softirq_pending(); > > set_softirq_pending(0); > > while (pending) { > .... > > if (timeout) > break; > } > > That drops everything which has not yet been processed and the above > warning is due to this. > wow, I made a mistake, thank you for finding the cause of the problem so quickly. How about the following code. we need to clear the corresponding pending bit at the right time Instead of all the pending bits cleared in the start. pending = softirq_pending(); while ((softirq_bit = ffs(pending))) { pending >>= softirq_bit; set_softirq_pending(pending); //Only clear the corresponding bit which will be processed. h->action(h); if (timeout) break; } > Thanks, > > tglx >