From patchwork Fri Nov 27 11:47:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1407162 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CjCYY3j97z9sT6; Fri, 27 Nov 2020 22:48:01 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kicEG-0007uV-RQ; Fri, 27 Nov 2020 11:47:56 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kicEE-0007uC-5E for kernel-team@lists.ubuntu.com; Fri, 27 Nov 2020 11:47:54 +0000 Received: from mail-pl1-f198.google.com ([209.85.214.198]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kicED-0000r9-PB for kernel-team@lists.ubuntu.com; Fri, 27 Nov 2020 11:47:53 +0000 Received: by mail-pl1-f198.google.com with SMTP id e11so3436637pld.0 for ; Fri, 27 Nov 2020 03:47:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=g+epfoQTX0DJLmM3EiWOWyeH0+RYOxTkJMwGQdEANTc=; b=UODkFGBUDVugKLqa/HFC0IyZJU1j66/17pMakmonOVIdajbAzB88FuAAUR9zZ6be5J fx2kSom6fIACI7L0WLDSNIY7bzCqOjoxMF5hkgdjiVGGytAJJAAarJ48/LxuyEvxAWRK RllTTkHx5nBypBB0bXrvm7sXU/5BmWEc6fkVlc3F+cWE3C42qQ2gMrfABAQAx1a6anRM a2SAMZLMnX2/T2Hnjh6J+JkaeeezcR20rN35EWwTCRPiDkQtpfa7ef85ZJvFPoKMyJnx oTe76iU2uKl9AOehYpXGoO8X48UH0/XUtBX0H2GlhaRWTE+wMcO7dbk1Rz0PEathAfK9 8oeQ== X-Gm-Message-State: AOAM5300lEiLbExKVsmaYip5hD8UmYDwCrmjNRt6hJE6z3S1v0q3+5os 3N8Hb3hsn6S3/9VkIIkmoQNpEY/PyeHPkIfhjsWryqpf8rQj2aLMeEenZyMmH3MQoRDXyC/olze PWH7oj/ANksUe8Ue3ZkdwU0p8oYnMC49M7WXdSL/H X-Received: by 2002:aa7:85c4:0:b029:197:d9b9:cd47 with SMTP id z4-20020aa785c40000b0290197d9b9cd47mr6736516pfn.44.1606477672159; Fri, 27 Nov 2020 03:47:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzr5FDQYZreFhMAM5CoJ/OrlUos1Y2wBh4XhFK3C7hP54iXy0/27ATqqiA6cu1wzuciK4ORvA== X-Received: by 2002:aa7:85c4:0:b029:197:d9b9:cd47 with SMTP id z4-20020aa785c40000b0290197d9b9cd47mr6736495pfn.44.1606477671899; Fri, 27 Nov 2020 03:47:51 -0800 (PST) Received: from Leggiero.taipei.internal (61-220-137-38.HINET-IP.hinet.net. [61.220.137.38]) by smtp.gmail.com with ESMTPSA id i19sm7111095pgk.44.2020.11.27.03.47.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 03:47:51 -0800 (PST) From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [X/B/F/G/H/Unstable][SRU][PATCH 1/1] net: napi: remove useless stack trace Date: Fri, 27 Nov 2020 19:47:45 +0800 Message-Id: <20201127114745.2900-2-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201127114745.2900-1-po-hsu.lin@canonical.com> References: <20201127114745.2900-1-po-hsu.lin@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Eric Dumazet BugLink: https://bugs.launchpad.net/bugs/1903596 Whenever a buggy NAPI driver returns more than its budget, we emit a stack trace that is of no use, since it does not tell which driver is buggy. Instead, emit a message giving the function name, and a descriptive message. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 427d5838e99632e9218eae752009c873cade89ac) Signed-off-by: Po-Hsu Lin Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza --- net/core/dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index 2020170..e30ea80 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5670,7 +5670,9 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll) trace_napi_poll(n, work, weight); } - WARN_ON_ONCE(work > weight); + if (unlikely(work > weight)) + pr_err_once("NAPI poll function %pS returned %d, exceeding its budget of %d.\n", + n->poll, work, weight); if (likely(work < weight)) goto out_unlock;