Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1589920rwl; Sun, 26 Mar 2023 05:41:26 -0700 (PDT) X-Google-Smtp-Source: AKy350ab1/veJdQgUPBsg4L1jKvVcbmw7avVK+XW+bw8fksBSNPZ5nIe1+W9YUJxyjwaRHzQfFg+ X-Received: by 2002:a05:6402:488:b0:4fb:5fe1:bc3b with SMTP id k8-20020a056402048800b004fb5fe1bc3bmr9058599edv.0.1679834486365; Sun, 26 Mar 2023 05:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679834486; cv=none; d=google.com; s=arc-20160816; b=jsl53J9pyG5yejxyK58kUMEkGp/t77QRwRiQZC+rzWKsdipbNACvyk1MFV74Ms2IMb TL5Q28XjhhJLh5+39Uq1un/JI9y+s/8iGGFqqg9E4YW8932qU0n/UWpvnP0gl7Gvj3yq chEg7yLn9dGc0PdVSp93zRw+j2ZWMCE5kVt9wKmPCRkZEOMQ3Lsmznq3TIjESyzf441o aRAHpx4EeGkpq7Nznbp2hfavpLHZnsaz6lt8PyUmRbXszeHAZleno+0G323dRi1m3Bgy X/OND5kEozQNt/udQGZbC4fPOIW73TgttwqE1Bx9wFuEmysudDqSXbZnKRj2v8hPSESl NmEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=e8OMItjxzSr7aVzbw5xpsTi4Tr0bLv1FpLf3l/TvJI4=; b=TQkpyNW6a1h9tNgJzZyS7YV8iG/4BulBh/4LBNWahvPIlUVS2zT2ycUcfJyzR8CdNr TJhhZZzFW2bgCeKfCrcfuobSjAtdkAy1uSmqsIWnMtmOMvLPSY9j1jWlE2DKlkkVvxr8 qD46Py+RjCW63mAnVPSdergWavvjoFYP8Duzt6gSECb56kPc1zeL0kcdbRZwbtnoisLi 7JScmyVSwDp5Wk4lD84tdysdMzMFshBiK52yWAt2MX2cKEBY6XjLpoZGcCifgGG4ox7a 3aFGQVAm6JEgi/lMlVqQw8bCI6bc/9DH/eNBfKkT5IovjSjsFL/QTTiETrezmQ3FLFsj IqtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=wLLItr0E; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f23-20020a056402069700b004ace62d6ea3si27364571edy.519.2023.03.26.05.41.01; Sun, 26 Mar 2023 05:41:26 -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=@joelfernandes.org header.s=google header.b=wLLItr0E; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231912AbjCZMe1 (ORCPT + 99 others); Sun, 26 Mar 2023 08:34:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbjCZMeZ (ORCPT ); Sun, 26 Mar 2023 08:34:25 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00A4776BD for ; Sun, 26 Mar 2023 05:34:23 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id b18so7287160ybp.1 for ; Sun, 26 Mar 2023 05:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1679834063; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=e8OMItjxzSr7aVzbw5xpsTi4Tr0bLv1FpLf3l/TvJI4=; b=wLLItr0EACFXIm0CSLoVDMaPX/5NVclZ6LQ/jK+zPVaCtRQ9G9aLXg4no3g9v/lGBw nDMI6et/j1JbeCGMpAe08V7cQwrneXJVTighUxJPSGSj2nGr6xcjVGIFflhUfY7fWG4J nWdPHva+d8jTDSJAiIGcLcmlPZnPd8SFgZwF0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679834063; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e8OMItjxzSr7aVzbw5xpsTi4Tr0bLv1FpLf3l/TvJI4=; b=UXW5Dk1VymoSh7FFahR4peUEmugv5DylO1RCTLQSoE9hE7IpUcSrVSBNqVF9kPBcDG eLew30YH0SQOi0Ki6vuqwi6F+MfkqM6gWsJix7ZyjfvuR4HvBjzeVP3DtoQy5PA8WcL1 6yVZ4TZTMD41dGKuBGvhh+8hBKKJHlZWC9XSNtIKX0f2AS4YEpFAm8Al3E/HMeBlNDdi yaKcc2FDqt2oEjwDupkr/Xp0mYmzo+mhRTVtpWcCkShYQm24NTwqNV3/XL6ncPA2+nZ8 DrrJ1YW3jqAI35pyEdVsSAiEZEUYjIDmS02D1FhGqrgMlU1Zg30NI0/LtIkm28nQRD9T s9pA== X-Gm-Message-State: AAQBX9eZoju+hm6rK56JAj9NK34H4c+ylJLoUJHuudmNat5PCpbbGH6f RORIcou4y59ZEzdQDWbxgCFIe41Bk+xoKMpYjDAGvQ== X-Received: by 2002:a05:6902:1586:b0:b69:fab9:de39 with SMTP id k6-20020a056902158600b00b69fab9de39mr3975809ybu.2.1679834063085; Sun, 26 Mar 2023 05:34:23 -0700 (PDT) MIME-Version: 1.0 References: <20230315181902.4177819-1-joel@joelfernandes.org> <20230315181902.4177819-6-joel@joelfernandes.org> In-Reply-To: <20230315181902.4177819-6-joel@joelfernandes.org> From: Joel Fernandes Date: Sun, 26 Mar 2023 08:34:12 -0400 Message-ID: Subject: Re: [PATCH v2 06/14] net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep() To: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Boris Pismenny Cc: "Uladzislau Rezki (Sony)" , Ariel Levkovich , Vlad Buslov , "Paul E . McKenney" , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=1.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 On Wed, Mar 15, 2023 at 2:19=E2=80=AFPM Joel Fernandes (Google) wrote: > > From: "Uladzislau Rezki (Sony)" > > The kfree_rcu() and kvfree_rcu() macros' single-argument forms are > deprecated. Therefore switch to the new kfree_rcu_mightsleep() and > kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use > of the single-argument forms, which can introduce functionality bugs in > atomic contexts and latency bugs in non-atomic contexts. In a world where patches anxiously await their precious Ack, could today be our lucky day on this one? We need Acks to take this in for 6.4. David? Others? - Joel > > Cc: Ariel Levkovich > Cc: Saeed Mahameed > Cc: Vlad Buslov > Signed-off-by: Uladzislau Rezki (Sony) > Signed-off-by: Paul E. McKenney > Signed-off-by: Joel Fernandes (Google) > --- > drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c | 2 +- > drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c b/d= rivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c > index ca834bbcb44f..8afcec0c5d3c 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/int_port.c > @@ -242,7 +242,7 @@ mlx5e_int_port_remove(struct mlx5e_tc_int_port_priv *= priv, > mlx5_del_flow_rules(int_port->rx_rule); > mapping_remove(ctx, int_port->mapping); > mlx5e_int_port_metadata_free(priv, int_port->match_metadata); > - kfree_rcu(int_port); > + kfree_rcu_mightsleep(int_port); > priv->num_ports--; > } > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/= drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c > index 08d0929e8260..b811dad7370a 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c > @@ -670,7 +670,7 @@ static int mlx5e_macsec_del_txsa(struct macsec_contex= t *ctx) > > mlx5e_macsec_cleanup_sa(macsec, tx_sa, true); > mlx5_destroy_encryption_key(macsec->mdev, tx_sa->enc_key_id); > - kfree_rcu(tx_sa); > + kfree_rcu_mightsleep(tx_sa); > macsec_device->tx_sa[assoc_num] =3D NULL; > > out: > @@ -849,7 +849,7 @@ static void macsec_del_rxsc_ctx(struct mlx5e_macsec *= macsec, struct mlx5e_macsec > xa_erase(&macsec->sc_xarray, rx_sc->sc_xarray_element->fs_id); > metadata_dst_free(rx_sc->md_dst); > kfree(rx_sc->sc_xarray_element); > - kfree_rcu(rx_sc); > + kfree_rcu_mightsleep(rx_sc); > } > > static int mlx5e_macsec_del_rxsc(struct macsec_context *ctx) > -- > 2.40.0.rc1.284.g88254d51c5-goog >