Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3939943imm; Mon, 8 Oct 2018 12:02:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV63IM7gPVQspk3bXVqbDmlvDvqRus/CpF+nYPg4WU+JTETm0ZwJI+wj5oDWnEnrHRk5f8/eK X-Received: by 2002:a62:1407:: with SMTP id 7-v6mr26054637pfu.28.1539025322044; Mon, 08 Oct 2018 12:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539025322; cv=none; d=google.com; s=arc-20160816; b=Qfxj+ZCnx3LzNqUuwacbi1T1arYHpOipLF2ZsYs4BxaObZQ8pz7Psxph3PMvuLR16b 2sAMOLQX29Xd1GENhWYYRIP+wgqmBNLjwEXfNEc+8UVd60dIDBzEM0x9cFFm0HZ/1OOm e931HhyRiLDV0rpLhDGAoAfldVWcvaxRmKOaFAax04AgCXBr0or1BgxC3oNkXZGWNnL5 1Ea8MIN/kyirGP/PpLp+oGm67e9DmHrlTlvkkzlqGmgAicQVeuxDJzlaYgQBTty+MEkk LXPRWFrVPuY9bPDzklVN78bQ2SkDKGrCc/3BMylef0DUQ6Qwoy689QcbeSrTrvXmZohU dOqw== 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=ZVDXRCUElY/UMmXsvCwrwFSTgzLSGNFyta2ep252SRg=; b=VImZhPhuY9NZ3KLWAY2rk6zOk6xnCPDbHZfelPXIs542aJyJGNE0OwJV1VuFssbk1U NQ7W2M/Mj3p0jjUN9n+IcXLe6HfcliPgG+Co2DaK3eBt01jUD+j1VVKXWTzhSJgRGQlO Gz/9zLEhco3k1QfV5tc0Zbc+rdwf6gOSBGGQn7jq8Cn6nJU9p/vDewSXmvmY3AET0Kvq pfBV3lrgJ6PVp89Hlsh63NnrcKu3UIbtvXj8IEsri7Xk7f0UT5euLFiZAMThwaMFlrFt 59QkN6W2yeiKWNjZyoOzS/pKEOVkGWSVEKYwkvJSbnMKXDZZFS2fe1SZjW/sQjxBi9rE CQWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cShUh559; 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 g7-v6si17948950plt.259.2018.10.08.12.01.47; Mon, 08 Oct 2018 12:02:02 -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=cShUh559; 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 S1731531AbeJICA5 (ORCPT + 99 others); Mon, 8 Oct 2018 22:00:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:49814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbeJICA4 (ORCPT ); Mon, 8 Oct 2018 22:00:56 -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 7B75E204FD; Mon, 8 Oct 2018 18:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024470; bh=ePhFmbzezQxKICHPewiO2ucVAZ67zK/Kq9+PUujphTY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cShUh559OX5TWtRNO6RiCsQYczSvLgXB12QLE/YzcRnTjhyhW+1O76HRcciOn5TgW 4GLdJdwjVC5bJE0/5MHVmXkXJa6z3KqdpFs/LIhp8UR3YdKumdDB4LbYI2gxKdZMl0 aiV6/SJXSmR61Sp6aE2w/W+89HwmPQsvQqT9mils= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Falcon , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 050/168] ibmvnic: Include missing return code checks in reset function Date: Mon, 8 Oct 2018 20:30:30 +0200 Message-Id: <20181008175621.962188598@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: Thomas Falcon [ Upstream commit f611a5b4a51fa36a0aa792be474f5d6aacaef7e3 ] Check the return codes of these functions and halt reset in case of failure. The driver will remain in a dormant state until the next reset event, when device initialization will be re-attempted. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1841,11 +1841,17 @@ static int do_reset(struct ibmvnic_adapt adapter->map_id = 1; release_rx_pools(adapter); release_tx_pools(adapter); - init_rx_pools(netdev); - init_tx_pools(netdev); + rc = init_rx_pools(netdev); + if (rc) + return rc; + rc = init_tx_pools(netdev); + if (rc) + return rc; release_napi(adapter); - init_napi(adapter); + rc = init_napi(adapter); + if (rc) + return rc; } else { rc = reset_tx_pools(adapter); if (rc)