From patchwork Mon Jan 11 13:00:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 360912 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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 E8B18C433E9 for ; Mon, 11 Jan 2021 14:08:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9A8622472 for ; Mon, 11 Jan 2021 14:08:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728169AbhAKOIB (ORCPT ); Mon, 11 Jan 2021 09:08:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:50168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727893AbhAKNDk (ORCPT ); Mon, 11 Jan 2021 08:03:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 096EF22527; Mon, 11 Jan 2021 13:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610370196; bh=CbRBZEV03v0zoXlpOxSlcfP7s7m7WeNWW0BWIbTmxkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=adVpJJv2Rl/dAAnfxviWpBmxWrWv3+VsYJlGpxR3+4Z+aBWudJAllE7OKHtAZXazB 9w9qZdmFFpBhh7m6Lo08jKVx2Y/+xEf1JIfKPjDi+0oohv0O7inEmInUd6vOSPq3X8 +/cY5k6ZGLAtT5cFjXgUfjrkze1pmzWyoiGDxcjM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Wang , Jakub Kicinski Subject: [PATCH 4.9 08/45] net/ncsi: Use real net-device for response handler Date: Mon, 11 Jan 2021 14:00:46 +0100 Message-Id: <20210111130034.067930829@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210111130033.676306636@linuxfoundation.org> References: <20210111130033.676306636@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: John Wang [ Upstream commit 427c940558560bff2583d07fc119a21094675982 ] When aggregating ncsi interfaces and dedicated interfaces to bond interfaces, the ncsi response handler will use the wrong net device to find ncsi_dev, so that the ncsi interface will not work properly. Here, we use the original net device to fix it. Fixes: 138635cc27c9 ("net/ncsi: NCSI response packet handler") Signed-off-by: John Wang Link: https://lore.kernel.org/r/20201223055523.2069-1-wangzhiqiang.bj@bytedance.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ncsi/ncsi-rsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ncsi/ncsi-rsp.c +++ b/net/ncsi/ncsi-rsp.c @@ -975,7 +975,7 @@ int ncsi_rcv_rsp(struct sk_buff *skb, st int payload, i, ret; /* Find the NCSI device */ - nd = ncsi_find_dev(dev); + nd = ncsi_find_dev(orig_dev); ndp = nd ? TO_NCSI_DEV_PRIV(nd) : NULL; if (!ndp) return -ENODEV;