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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham 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 EDC2EC433DB for ; Tue, 2 Mar 2021 22:08:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADED064F34 for ; Tue, 2 Mar 2021 22:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1837862AbhCBV7l (ORCPT ); Tue, 2 Mar 2021 16:59:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835355AbhCBTDP (ORCPT ); Tue, 2 Mar 2021 14:03:15 -0500 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05955C0611C2 for ; Tue, 2 Mar 2021 11:01:47 -0800 (PST) Received: by mail-qk1-x72d.google.com with SMTP id g185so2092448qkf.6 for ; Tue, 02 Mar 2021 11:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bnXfU68ZzIsZlihNWZUn2t6cVsioWSUQ6rdGiL1Upjg=; b=mlOhvvb/rH8DvWuDKTYklm5YoqVcXjyzDw0EukcQ7YrYl2Kj8083Uxq1Nrl0Q+znzC 3SKv9bgz/Uj0MxPwaYaGLVxX8AELrMekBfA158dO8QjBoixnATIjNqkYNxp/q9kpILtg ZPwdVfu4wEJmM7aDzH/FZOtGvIs9VtrSZqKFDcO+dmny0c49xjXyKQcBf6AlsXPiMp2N +xi/O40oXHCemWGtyqgadLVjvwQN3eAwY3KWZryLXYphrWNmkQJ05MwjRHr5PRsAI+gX aw/qm2P0/Wv8gp2L4MRQ7a+WHAXO7AGSNpnlrYtJWfV5YRiBurSdGWYbJZuM+2SJzOT2 f4iw== 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=bnXfU68ZzIsZlihNWZUn2t6cVsioWSUQ6rdGiL1Upjg=; b=dRthtm6crkKppMjV13UJP7LLw45F1f3ck0+kQp3Sz6fiTT+npQSd+UKl2Jwnu+v6N9 1PbjPa2M59Jv2KFRqvKlHkR9LT3sBO3mKBh9cy6o/+CA4fk+SdocNz58yIOuukRHVF3J G4w45+dcSAisxbka4TVCpd+hwYjGvXE5MTGwa3Go9L0jQT5JdAKa92ITDV5LvaO9IIqY 64tzDx2OGa2OOi2yihlbDV2sxE+CYc/x5Jbq6Wa9f+ySxsFy5QVe5qdDhK1smjd3qSZw 64grQV0VD2GEE5v3/MPEtZBK29+wHb8fqfZnsgbC83Vqo4wIYJROupszM/Tpd1+K3PQY wvEw== X-Gm-Message-State: AOAM533GARXKJFCzjrtIP5hriySEdfIJTYf28HW1X0oZUFdD+6g4FlBs liHx8MPLsyewrbNV01uP4GgNgKPky3jvkWyDlEeikw== X-Google-Smtp-Source: ABdhPJwJiEYqApj6rgOYrCmW9HdrmS3ZOfM6+JirjcgL6eujZSZ4Dx4XpAiAtLAAnjnsL+7Jx9aKw0PSbF5M5001DTs= X-Received: by 2002:a05:620a:981:: with SMTP id x1mr20414567qkx.501.1614711705876; Tue, 02 Mar 2021 11:01:45 -0800 (PST) MIME-Version: 1.0 References: <00000000000039404305bc049fa5@google.com> <20210224023026.3001-1-hdanton@sina.com> <0a0573f07a7e1468f83d52afcf8f5ba356725740.camel@sipsolutions.net> In-Reply-To: <0a0573f07a7e1468f83d52afcf8f5ba356725740.camel@sipsolutions.net> From: Dmitry Vyukov Date: Tue, 2 Mar 2021 20:01:34 +0100 Message-ID: Subject: Re: BUG: soft lockup in ieee80211_tasklet_handler To: Johannes Berg , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Hillf Danton , syzbot , LKML , linux-wireless , netdev , syzkaller-bugs Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 2, 2021 at 3:18 PM Johannes Berg wrote: > > On Wed, 2021-02-24 at 10:30 +0800, Hillf Danton wrote: > > > > Add budget for the 80211 softint handler - it's feasible not to try to > > build the giant pyramid in a week. > > > > --- x/net/mac80211/main.c > > +++ y/net/mac80211/main.c > > @@ -224,9 +224,15 @@ static void ieee80211_tasklet_handler(un > > { > > struct ieee80211_local *local = (struct ieee80211_local *) data; > > struct sk_buff *skb; > > + int i = 0; > > + > > + while (i++ < 64) { > > + skb = skb_dequeue(&local->skb_queue); > > + if (!skb) > > + skb = skb_dequeue(&local->skb_queue_unreliable); > > + if (!skb) > > + return; > > I guess that's not such a bad idea, but I do wonder how we get here, > userspace can submit packets faster than we can process? > > It feels like a simulation-only case, tbh, since over the air you have > limits how much bandwidth you can get ... unless you have a very slow > CPU? > > In any case, if you want anything merged you're going to have to submit > a proper patch with a real commit message and Signed-off-by, etc. Looking at the reproducer that mostly contains just perf_event_open, It may be the old known issue of perf_event_open with some extreme parameters bringing down kernel. +perf maintainers And as far as I remember +Peter had some patch to restrict perf_event_open parameters. r0 = perf_event_open(&(0x7f000001d000)={0x1, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3ff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfffffffe, 0x0, @perf_config_ext}, 0x0, 0x0, 0xffffffffffffffff, 0x0)