Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp902485imw; Thu, 14 Jul 2022 13:05:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sYNOSOFrB5birx9eRwdtW2WFlvZJjn0gy9bhZp6bsqpMDAgDrdD5Cj2xdLBkuf6I4zjDDJ X-Received: by 2002:a17:907:7348:b0:72b:44bf:96b6 with SMTP id dq8-20020a170907734800b0072b44bf96b6mr10536761ejc.7.1657829147614; Thu, 14 Jul 2022 13:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657829147; cv=none; d=google.com; s=arc-20160816; b=Flrj+QB5RfJTda0ZB0IzCJIspR6AKpYOwbUHNSfrOeMtWSDPXLgIkwtPZowpJA6GwB kUIhKpwjbTwkDN36KWFROiGTtaA8tAS2/QQT0HUJH87GjNY6jCMpYy9FB+QrfhS/agAW VRWHah6TwLJJ64xvAxMLFnkXcdrBGbJOtKFR/bkIjg4GTPxzRmLuCwtvExNBiTaIdfbT N6gvWDxpdAYd2/IDRbi8q8D7cArjRCJuj1vItwlgJoFqOVBgDfVGfR2DyEEeNG4Mn1Q/ 1OW80WQIS3Rk1kLqp1SGO1bHtF94dKxJNoXljlElB+nit1b6cIKV8szx1zWE7jj9E527 ooBw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=hjvaaf85L3RishRrR8a7z2GHkVyJ+7Ox0uFmt5Tda40=; b=ZeJ/d/7Ha6UdqkBa7C4SrZe8nOD9ejFYYmGGmUGAc5UytSirh/6T2gaBK+rOTenIL/ shdN5LeLGBVK8c0WUG9EL15gpADeegfYaTdv64PGQp2TsDzM1n3jaVkiQY2DzYGXuVqa cZqoGsuVEBOiwCb6IwKBL36S/P1Q+p1eaAQW1XwIzzcIuNDoNR+nTzOG3XI1dnhjQX2l JSjgLx5k7kdaroGhTbGZwEdjcnRfNyUvvg+/y4ggKICQwPn4tWT8hvQxSccAQac2TJ+H Zw7dClXKJmaE4yYNjZGIil/wn4LGcC1RTAGgLgDvS0VuL9BVVdd2CWrM4FeMWE59Z6Ty F6Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=pqj4QfMM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id yz10-20020a170906dc4a00b0072a4a97a5casi1859562ejb.172.2022.07.14.13.05.22; Thu, 14 Jul 2022 13:05:47 -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=@microchip.com header.s=mchp header.b=pqj4QfMM; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240546AbiGNTg7 (ORCPT + 99 others); Thu, 14 Jul 2022 15:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232514AbiGNTg6 (ORCPT ); Thu, 14 Jul 2022 15:36:58 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A5325885D; Thu, 14 Jul 2022 12:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1657827414; x=1689363414; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=N6UfmHWJDPjWY4cZVCh9Mei1uB5VrRXjZABai9nWUuE=; b=pqj4QfMMSc/cqGuV28xXkUxmpgE+h/ZZ4gNzUh4weH1ngvY2qq+CDPlc bXJk/cyZEpNQOU9cC9s7QbjkFC8KNfWLG2JgLMwyLAlR6BxJ9wZLupc5T 6IAOwknKAniDFBYVSXMUlHyFWoPrpYr9N7/TuOndgxDW871CN+6TPOOoq yYdQq3LoDMKoWx1PdrphmXb+QAwjbGt7KOSUeJmciUljtfaUDpar0Bpzw Sc/RsueqqOtq3qRFR2duxKSCha/Tbf59K5JDxO85NozQX6zNIGpUsJ539 7y66LIqBwzxvu5nTbqfL50pTQ1zjltF6fHqiL5/u+mNtXNjeUHQo8D59+ w==; X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="172375754" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jul 2022 12:36:54 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 14 Jul 2022 12:36:54 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 14 Jul 2022 12:36:52 -0700 From: Horatiu Vultur To: , CC: , , , , , , Horatiu Vultur Subject: [PATCH net 0/5] net: lan966x: Fix issues with MAC table Date: Thu, 14 Jul 2022 21:40:35 +0200 Message-ID: <20220714194040.231651-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,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 The patch series fixes 2 issues: - when an entry was forgotten the irq thread was holding a spin lock and then was talking also rtnl_lock. - the access to the HW MAC table is indirect, so the access to the HW MAC table was not synchronized, which means that there could be race conditions. Horatiu Vultur (5): net: lan966x: Fix taking rtnl_lock while holding spin_lock net: lan966x: Fix usage of lan966x->mac_lock when entry is added net: lan966x: Fix usage of lan966x->mac_lock when entry is removed net: lan966x: Fix usage of lan966x->mac_lock inside lan966x_mac_irq_handler net: lan966x: Fix usage of lan966x->mac_lock when used by FDB .../ethernet/microchip/lan966x/lan966x_mac.c | 112 +++++++++++++----- 1 file changed, 80 insertions(+), 32 deletions(-) -- 2.33.0