From patchwork Tue Feb 9 15:19:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 379674 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 B3796C433E6 for ; Tue, 9 Feb 2021 15:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65FC264EB8 for ; Tue, 9 Feb 2021 15:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231674AbhBIPXM (ORCPT ); Tue, 9 Feb 2021 10:23:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232508AbhBIPVN (ORCPT ); Tue, 9 Feb 2021 10:21:13 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB0DDC0617A7; Tue, 9 Feb 2021 07:20:04 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id f14so32209912ejc.8; Tue, 09 Feb 2021 07:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=33/uyGIN3FY3+rBdv4FUVUP8dhmUMuazcIsOv+i6Gos=; b=Jze5auyHPDoC6rfV73gY30Hp1USjjzyfk4eUjoUSm/ZtmJUo0//B9gg5YM1xmx4SGA m94yMWYIaoLHQTuURAvVTDpiYHPvDU77il0aNvTjxzRWzpLI3MLnPLZQ49Dn6FDU1YMO WCid8yzpagqm6Y7xzh0cHgqLG8Ql5cImK1tQemFDvTKZDl+e9Sk7XVRbfd0+5tuSAy/p evF3lWgG/HM/6d/Wdq8YDdLeGNrSErN5MGA0MjwtHrP+Hnljy04hYROZEUD7slwsoc0q 4LVZ2xKfV1sdpKkuFDA16wmfRF40pE0B8XEdTIEommbKbT94DQTO6GYAR1r0cixMb4mO xJMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=33/uyGIN3FY3+rBdv4FUVUP8dhmUMuazcIsOv+i6Gos=; b=jGfvSZaiLb3kymxyuKSzchO27/YXg2BccCAzJhdeDrjuj/elHLxh1EBmardRgDCUMo Jk9WHUjpfy/T9o+65mkupJcIUhOF7A9mfpfdHqX4REr6aufF7J9N5kZE7C672zI+idGG 3xrWWNPBYsQkv8ht6eESoxmMmgCMekRcGmu2wT5bbMYNvg0FLUkAQsUiqi+2h9h02QuO xx3AkXUbP1QHmaEdoYJ2rn0aZVGXXjaPuVjoc3Mrpe3jxTU/p88gnYExcMCc6keVnGpH QKSvnmo5RbbzpSC68q7uB859Aj+JmN5ceNrOVieHHSk78306HqO3JySl9IIOcfKFTRWq ESzQ== X-Gm-Message-State: AOAM530O4NBZB3YeVekB8aiMQrTTDIn/jAjrEpaKanHe2vy2V1DjuPgf Lw/wKqabWQTGCdzvwv4Kw0w= X-Google-Smtp-Source: ABdhPJwHMb8dV//9wzvmRBUxMtLkeULCNCUPZ7qXpiVjPoOKJDet9k5bhYqeP5+XbWGve9rt9ntjYg== X-Received: by 2002:a17:906:364b:: with SMTP id r11mr22773043ejb.447.1612884003462; Tue, 09 Feb 2021 07:20:03 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id q2sm11686108edv.93.2021.02.09.07.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 07:20:01 -0800 (PST) From: Vladimir Oltean To: Jakub Kicinski , "David S. Miller" Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Nikolay Aleksandrov , Jiri Pirko , Ido Schimmel , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Vadym Kochan , Taras Chornyi , Grygorii Strashko , Ioana Ciornei , Ivan Vecera , linux-omap@vger.kernel.org Subject: [PATCH v2 net-next 08/11] net: bridge: put SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS on the blocking call chain Date: Tue, 9 Feb 2021 17:19:33 +0200 Message-Id: <20210209151936.97382-9-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210209151936.97382-1-olteanv@gmail.com> References: <20210209151936.97382-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Vladimir Oltean Now that br_switchdev_set_port_flag is never called from under br->lock, it runs in sleepable context. All switchdev drivers handle SWITCHDEV_PORT_ATTR_SET as both blocking and atomic, so no changes are needed on that front. Signed-off-by: Vladimir Oltean --- Changes in v2: Patch is new. net/bridge/br_switchdev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index bc63b10b2e67..3b152f2cd9b5 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -79,9 +79,8 @@ int br_switchdev_set_port_flag(struct net_bridge_port *p, attr.u.brport_flags.val = flags; attr.u.brport_flags.mask = mask; - /* We run from atomic context here */ - err = call_switchdev_notifiers(SWITCHDEV_PORT_ATTR_SET, p->dev, - &info.info, extack); + err = call_switchdev_blocking_notifiers(SWITCHDEV_PORT_ATTR_SET, p->dev, + &info.info, extack); err = notifier_to_errno(err); if (err == -EOPNOTSUPP) return 0;