Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3294121rwa; Tue, 23 Aug 2022 02:09:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Z/8q5qEgiXh/M9I5WOwCWtf5DNl4k3edbaL2PSeb2tUT6vqdfkpreDEiS+2NEUU4Ad7p0 X-Received: by 2002:a17:907:762c:b0:73d:9044:ff29 with SMTP id jy12-20020a170907762c00b0073d9044ff29mr3612622ejc.19.1661245779400; Tue, 23 Aug 2022 02:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661245779; cv=none; d=google.com; s=arc-20160816; b=zqrY1C4CdKHawRJ0aTPGbm53giJJMVgTlDlIqVTteP5Sa1Z37KWKCcRdhNT4bUK5km 6L5OuIzN4dPlLTUpfVRLP0hwCXDTOpwzFeuhL6hvIjWwZLZOgwDns6sLTYvUFhQdmHip g1CfMehU5rNDCRUQpnjevf0sMfm/rsRPFcHeLGTK99o38h31DffNOF9CcwxXrIt+CiCc NMZcpjUeZnM89FgXPUZuN84Ca00oRFHKo+pF5rXcp9O9aZsUX1f1gnybttl2Ae8lr8t8 urZBilUwYeUGnLcEwRo3R+scVweJjQLkFwfzSni51ERhmzVW6MJNq+YW09WjmYv0Mojh ooFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YHwnNEy5bAncf7S7ufanm0fQvcAgbarnwuRibFpT0Ys=; b=SkuUrtrT3IhrqXlR+2+zbfPj7MsO6BxDGpW94S14O9qjB7Vd6/wOiRmhAYcBLaLzf2 OMpUQXUO4MfqgXTFSWoaEk2l+X6v50R2QwlcC5UU6uGlxbM3ZElxe63thdVhTFsEbmEi QiVzzSNNkPcnhVBh7anPFItOxQMgNW0wEghKcpJDmqH0X3I+Re3H7GD8prGG/hBiMBSI HZvf3QxnHA/zbt6OzNgswyQI6r1fBQVnzow+dSqEiH1FcDcY/LRiX76cqKI5GJnhoTBZ zyIMSMaODmyZtGTl8hYRpJnb9H8ZT1Kse92jr9CR5IGiwACthObygF038Q/MyDNfqhSQ YowQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nxkypWfc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du2-20020a17090772c200b0072fc714c92fsi11744225ejc.902.2022.08.23.02.09.13; Tue, 23 Aug 2022 02:09:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nxkypWfc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240449AbiHWJCT (ORCPT + 99 others); Tue, 23 Aug 2022 05:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347260AbiHWJBo (ORCPT ); Tue, 23 Aug 2022 05:01:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B393865D5; Tue, 23 Aug 2022 01:28:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 91242B81C50; Tue, 23 Aug 2022 08:27:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00DA8C433D6; Tue, 23 Aug 2022 08:27:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243264; bh=eva9J/HnGNK4Hs9Yy6N/uH0vPgm9Li4iFFPXZNd2K3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nxkypWfcISAjEuJ8j+HQmQ515vKXvdwTCuMThdRs/jON7hIo7cH7J8hqAdE+Opd6S Eq9kCB6MUmy3abWgPywD37kvDadrYVTAgRlHpY3lSKAC9Q/pB5RmmttQNUQogHiSF6 WYFl0jaioAr/l+FHpCaxiTSpb31V1J6nWzjQgyIM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Mikailenko , Marek Szlosek , Tony Nguyen Subject: [PATCH 5.19 221/365] ice: Fix VSI rebuild WARN_ON check for VF Date: Tue, 23 Aug 2022 10:02:02 +0200 Message-Id: <20220823080127.431744065@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Benjamin Mikailenko commit 7fe05e125d5f730bd2d0fc53985bee77b6c762f0 upstream. In commit b03d519d3460 ("ice: store VF pointer instead of VF ID") WARN_ON checks were added to validate the vsi->vf pointer and catch programming errors. However, one check to vsi->vf was missed. This caused a call trace when resetting VFs. Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check. Fixes: b03d519d3460 ("ice: store VF pointer instead of VF ID") Signed-off-by: Benjamin Mikailenko Tested-by: Marek Szlosek Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c @@ -3178,7 +3178,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, pf = vsi->back; vtype = vsi->type; - if (WARN_ON(vtype == ICE_VSI_VF) && !vsi->vf) + if (WARN_ON(vtype == ICE_VSI_VF && !vsi->vf)) return -EINVAL; ice_vsi_init_vlan_ops(vsi);