Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3933487imm; Mon, 8 Oct 2018 11:55:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV60kdSc6nEwzAVOgALAf28DUPT9/1u/gCRO3Fwe1O9WGAVn59fABB7Y5am8rzuu9RLK8i/gp X-Received: by 2002:a62:1e83:: with SMTP id e125-v6mr26294549pfe.231.1539024950155; Mon, 08 Oct 2018 11:55:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024950; cv=none; d=google.com; s=arc-20160816; b=X74xIYoX3Dd5nb+f1FE+kWTXLuRh2dy3DQjGG9rjjU0ESHiMMJ3J9N2dyPKqO/Dlwz KIiOgKjpntT+uSa0eO3pEdev0BrB8NudYKnJjYWAG7n7l1Y3eamznmcByNFiXnTiC8Q0 t2G0lHx34/A7WpSQue6zkN7zT6zUefX97HYyWq0Fwj9vVZHL0/HhUYK7+Fpo6ZJz0kB1 2b4Efah+uEv4O5BCSADHoiLqPdc+D2Ohq2Xe6lPSrSWBFz6VT91b5Bt6FytLes/G8lpX XNEW3CVnvrBXI29n1e1RXmahfNAbxwrksnvRKni/D3+ozDUvEAww34Rn5tS8giu/AcC1 HOFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2ggqGYSJdoPhmNzGO+KUsHY4D+pYr9m91MgjZLAedXk=; b=yDcAVQBGdZNqfmhkOuX6IqZmQczkrDKZ4PcEDFDY63qSVfbm4h5iG+bO/ykiBa23E4 4BzJlhv6GHsad/N5+QlilR43g6klaMXb1KUFZN0TVVA4C9zVIe9eNFNZjKw2dET72F2z 9TvjTba/jFnN6xezb8mbrhmHeD7co6JOzpj4AqdMf+Rl/CvT840VGb6iQJal04pX42lM 9EebzqOxsCfv05dmA2fQexn5bmLD7pw8XKHl07vyZ02wsiZegtZ4OV/Vz3ZlWP1/KEy6 3y55uBwBF1vqnruWVuXn8ap9iiw0D7pHmJJc8mHodQaoPeAYW3b/8LhpD/jJxbYn0MjO imsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FKG8QxQB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si18038435pgg.89.2018.10.08.11.55.35; Mon, 08 Oct 2018 11:55:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FKG8QxQB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732912AbeJICHX (ORCPT + 99 others); Mon, 8 Oct 2018 22:07:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:57952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727670AbeJICHW (ORCPT ); Mon, 8 Oct 2018 22:07:22 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA02120645; Mon, 8 Oct 2018 18:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024854; bh=Cj/+6y9baO5/UtufHpmWG+jIdEluqWDoSV++as1tiY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FKG8QxQBQHrt52AUXicf9ouq1nJoxeayuvlm4/d8l0YtiJROAw2ZR5PLHLqQM8Ql2 JqnJhfETGAF+p8PxGc9GHu2A1G66aLkMftUsU2WvNiz6fkCR/CbbNJf75ye/6rLWpq 0TPhzgxNP9px60QVdd8G9tr73wg25xFTPVPZTn08= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Song Liu , Andrew Bowers , Jeff Kirsher , "David S. Miller" Subject: [PATCH 4.18 168/168] ixgbe: check return value of napi_complete_done() Date: Mon, 8 Oct 2018 20:32:28 +0200 Message-Id: <20181008175626.444768416@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Song Liu commit 4233cfe6ec4683497d7318f55ce7617e97f2e610 upstream. The NIC driver should only enable interrupts when napi_complete_done() returns true. This patch adds the check for ixgbe. Cc: stable@vger.kernel.org # 4.10+ Suggested-by: Eric Dumazet Signed-off-by: Song Liu Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -3196,11 +3196,13 @@ int ixgbe_poll(struct napi_struct *napi, return budget; /* all work done, exit the polling mode */ - napi_complete_done(napi, work_done); - if (adapter->rx_itr_setting & 1) - ixgbe_set_itr(q_vector); - if (!test_bit(__IXGBE_DOWN, &adapter->state)) - ixgbe_irq_enable_queues(adapter, BIT_ULL(q_vector->v_idx)); + if (likely(napi_complete_done(napi, work_done))) { + if (adapter->rx_itr_setting & 1) + ixgbe_set_itr(q_vector); + if (!test_bit(__IXGBE_DOWN, &adapter->state)) + ixgbe_irq_enable_queues(adapter, + BIT_ULL(q_vector->v_idx)); + } return min(work_done, budget - 1); }