Message ID | 20200728091035.112067-10-saeedm@mellanox.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show
Return-Path: <netdev-owner@vger.kernel.org> X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.a=rsa-sha256 header.s=selector1 header.b=NjZJaPeN; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BG9sM4xpDz9sSd for <patchwork-incoming-netdev@ozlabs.org>; Tue, 28 Jul 2020 19:11:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728512AbgG1JLe (ORCPT <rfc822;patchwork-incoming-netdev@ozlabs.org>); Tue, 28 Jul 2020 05:11:34 -0400 Received: from mail-eopbgr10068.outbound.protection.outlook.com ([40.107.1.68]:63277 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728476AbgG1JLd (ORCPT <rfc822;netdev@vger.kernel.org>); Tue, 28 Jul 2020 05:11:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ERJFOsegWVVCB7rD1L8gUXGlwqDT2+PCYT7Q2oV/ytFzT2IE6lipsGTaVUsSVCEHCgfOqoKyYAQyQDLtvucZKCtaPOTOw0/4XFh4GyECpC/54YAft2Csg4E9r+skJowBN3auCNIJ6UMsfu0RBj4rAYSHTtCiEDOdqb1BZ60Ic78PQDtWuGvnGNnwWUenNV8+auS27e6KuQb6fEc4VKXwYHFj4c739Zb+7vnLv5+c6DLc4+29jUjW2N18chb7wJ3OLhCwKk18jp38nFLakRy45aRnttsjBcNd8WUkKYcHnvK5L4GHNp62JnyfJpnnBwvqV4sRE8YCu+le1qqgvtbE8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DjhaxaNKOx/o/FA4SHNwtMrUSfbIn3A/PpFldpdRVbg=; b=jV1haHaBVKIISrlOrstOzLOMWHjgvdEOKs3f26eVmOSEwtusZkMEy55ggdsBcnnyTsAyiOG4i3ea0rn04uD5M3eoBO8ntUB1cv/bttZjy4ZUspMaUP3y1biqM3ClPIE4MTjYCy3+CCFi5lbcF32Fi33qULfW0eCZVN/hiNMlp2WIl6dquOWYThlYhceHqUFt1b7G6l53URb2xoaBWRdw0GnI2LGUpvNFbIEZksEKR616J+PrAZkoa5kN5D80I5xW9CT8uvrYR46Ig+D7DsW3edeck4mpoXVxNlh4LYIJdzlCqhCWCFOllSME3j5BbKUSjLepUnNswBWVu6AnM6ZP2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DjhaxaNKOx/o/FA4SHNwtMrUSfbIn3A/PpFldpdRVbg=; b=NjZJaPeNcwXzWQOfgPD6rSS284BIsXYs+TvOidMkoUHJNVbB5XMH2KxO8mquse69Z7QJ5s4QyEX0zfHxn/QhJOZzLVv4FvMPGzImZhshJ3ib3OWMFfs+9F74R+7EeE9OhX9KJ6AxfXRJnHUtLZejJtNhiBpr/r2pAsZ6DEK5wq0= Authentication-Results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=mellanox.com; Received: from VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) by VI1PR05MB4638.eurprd05.prod.outlook.com (2603:10a6:802:67::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Tue, 28 Jul 2020 09:11:27 +0000 Received: from VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::508a:d074:ad3a:3529]) by VI1PR05MB5102.eurprd05.prod.outlook.com ([fe80::508a:d074:ad3a:3529%5]) with mapi id 15.20.3216.034; Tue, 28 Jul 2020 09:11:27 +0000 From: Saeed Mahameed <saeedm@mellanox.com> To: "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org> Cc: netdev@vger.kernel.org, Raed Salem <raeds@mellanox.com>, Roi Dayan <roid@mellanox.com>, Vu Pham <vuhuong@mellanox.com>, Saeed Mahameed <saeedm@mellanox.com> Subject: [net 09/12] net/mlx5e: Fix slab-out-of-bounds in mlx5e_rep_is_lag_netdev Date: Tue, 28 Jul 2020 02:10:32 -0700 Message-Id: <20200728091035.112067-10-saeedm@mellanox.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200728091035.112067-1-saeedm@mellanox.com> References: <20200728091035.112067-1-saeedm@mellanox.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY3PR05CA0022.namprd05.prod.outlook.com (2603:10b6:a03:254::27) To VI1PR05MB5102.eurprd05.prod.outlook.com (2603:10a6:803:5e::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from smtp.office365.com (73.15.39.150) by BY3PR05CA0022.namprd05.prod.outlook.com (2603:10b6:a03:254::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.9 via Frontend Transport; Tue, 28 Jul 2020 09:11:24 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [73.15.39.150] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 087b0957-2f2d-4589-ceca-08d832d63548 X-MS-TrafficTypeDiagnostic: VI1PR05MB4638: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <VI1PR05MB4638B30245A5A6C3F842D74FBE730@VI1PR05MB4638.eurprd05.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SofpeivuI92BJTD8HgnUSlJ0WZQvdBZVi4IsGaE8rEsKtSTNFYwqOG1Z6YKkvJZS4RNWQqj2D9ZtfU0YAqkE4xa9e/X4hTG2LGMPc4PEtRyOIvt0PcBvav+uTBk1IJmQWFrvHcgw2wxMVhu1whwURYln35u2gq9UlQ6DF3Xq2O24Gg0aUvjQ0v15PvDoOt3pO+AAXQ1BPMPgjcnMEvsk3gqr1DOyEMc2vQ5t+JdjnLZbcfi2lLjP7isizb5zxRFydu6RiovkKnq+bLfc0GQBMAk2jjivnkcyXf/lS64VnxSYhzVoyk/2an0jQdyMkwlGAEq+3nTWUDn3xKVvzzsKWl7s33JhNTD5fLPgH+cIOnGidzUvMdmKzfZAT1eJ2aNB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR05MB5102.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(366004)(346002)(396003)(376002)(110136005)(52116002)(478600001)(956004)(54906003)(4326008)(8936002)(16526019)(107886003)(2616005)(186003)(6486002)(316002)(8676002)(83380400001)(6506007)(6512007)(86362001)(1076003)(5660300002)(26005)(66946007)(66476007)(66556008)(2906002)(36756003)(6666004)(54420400002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qy+U2TMF8noUgC84PQfdKGunRThcUho28F+fl8qR746X22+V4WlqymcJbk+qtgM2FSf+j981PacfPp6lXIojbBZWPGPmnsbaVmnX2TKEEnIKCZTYHPRxQydU79GnVzEYD+U2PcmqwfzR6SHy52y4SFyTepCOCtm4/ilxVhmGEQLZnCBlbRxHb8Qrr0IL71TS1E2zQtUgEa199aUie8t5FqGT7K5IVsP7bXWh2jYPUmI0B0LQ6AS/zImnqfOZrspSv0L/akp7SDDfvASNjnvmTX3c+7dtrlJ4mBlsh5wK2/yiS/emt9TB0RKmH3/23LGQq2ZQHiR6/hNe6J2yKhEKzXa6jdW0Xb1PJUwKVCEZ4wl1TvpsOjlWFvUtzKIm115lP+mT8gk1H/YlKVroVhuJ+Tp7eNcCHHyjQ9myOoDyp50IJ+br6Cz21kH8lzltzxmpC5MDqpwExbiwjJixHNVQbmkrjHc7g7k5KTu0toj3uQ4= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 087b0957-2f2d-4589-ceca-08d832d63548 X-MS-Exchange-CrossTenant-AuthSource: VI1PR05MB5102.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2020 09:11:27.8421 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mLO5jKU/KK18M+tvdhjcOeYxMA0LV1Gqwz1LVXEEvO4e6+RSxehBgAN12gntDwkjbj6TW2UDm3L5fr0NBhK8Pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4638 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
[net,01/12] net/mlx5e: Hold reference on mirred devices while accessing them
|
expand
|
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c index bdb71332cbf2d..3e44e4d820c51 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c @@ -183,13 +183,16 @@ void mlx5e_rep_bond_unslave(struct mlx5_eswitch *esw, static bool mlx5e_rep_is_lag_netdev(struct net_device *netdev) { - struct mlx5e_priv *priv = netdev_priv(netdev); - struct mlx5e_rep_priv *rpriv = priv->ppriv; + struct mlx5e_rep_priv *rpriv; + struct mlx5e_priv *priv; /* A given netdev is not a representor or not a slave of LAG configuration */ if (!mlx5e_eswitch_rep(netdev) || !bond_slave_get_rtnl(netdev)) return false; + priv = netdev_priv(netdev); + rpriv = priv->ppriv; + /* Egress acl forward to vport is supported only non-uplink representor */ return rpriv->rep->vport != MLX5_VPORT_UPLINK; }