From patchwork Tue Oct 27 13:46:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 289944 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=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 138F5C55178 for ; Tue, 27 Oct 2020 14:49:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C46CE22264 for ; Tue, 27 Oct 2020 14:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810146; bh=oCyaB5rQ2twdVYoEcV2VUtmuv04B0TrK2chOv0r8LKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AyTllkpVFwe/RQPReB7U2J9gZVL9aVbTLO6ERipfGkvbhqQf+nVkxZ9jvaWO6xCsc Nk3dj4lMeXayYWswIdxTeOgkv0Q4n0xnsGRdON/xBuLChR8bSeSKWtfNq5dnzVJIc3 m+0lvQbQHQWGtyS1JoxOC/FrbE5hqUY4jei1iMfM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1766490AbgJ0OtF (ORCPT ); Tue, 27 Oct 2020 10:49:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:49082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766474AbgJ0Os5 (ORCPT ); Tue, 27 Oct 2020 10:48:57 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 80E7021556; Tue, 27 Oct 2020 14:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810137; bh=oCyaB5rQ2twdVYoEcV2VUtmuv04B0TrK2chOv0r8LKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=khizTHrmzx1mie5N1VSvFrW2HTOkF9VHTyEGIc3KBXg+YKhIBlGwra+HMMuMn73Jc wRVJJ8tKNabpsnOEfwkliEa0BSrr3jCXoOAk3YNOQX6YDqyZtRdmyBGHkCqGKIhSGu YgEPw0zB4tgLXSvFSXtFVen4BCqyZz12x1OZtrLE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Venkatesh Ellapu , Vinay Kumar Yadav , Jakub Kicinski Subject: [PATCH 5.8 033/633] chelsio/chtls: correct netdevice for vlan interface Date: Tue, 27 Oct 2020 14:46:16 +0100 Message-Id: <20201027135524.251439419@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vinay Kumar Yadav [ Upstream commit 81519d1f7df7ed1bd5b1397540c8884438f57ae2 ] Check if netdevice is a vlan interface and find real vlan netdevice. Fixes: cc35c88ae4db ("crypto : chtls - CPL handler definition") Signed-off-by: Venkatesh Ellapu Signed-off-by: Vinay Kumar Yadav Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/chelsio/chtls/chtls_cm.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/crypto/chelsio/chtls/chtls_cm.c +++ b/drivers/crypto/chelsio/chtls/chtls_cm.c @@ -1156,6 +1156,9 @@ static struct sock *chtls_recv_sock(stru ndev = n->dev; if (!ndev) goto free_dst; + if (is_vlan_dev(ndev)) + ndev = vlan_dev_real_dev(ndev); + port_id = cxgb4_port_idx(ndev); csk = chtls_sock_create(cdev);