Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3014921rwl; Mon, 27 Mar 2023 08:10:29 -0700 (PDT) X-Google-Smtp-Source: AKy350b2Z+lvx2O2llJkZ7QkONEPn2bKEYAijj6evB6hB5BNVwYxNhcs8eEhJAKJOl7sczDGSs6M X-Received: by 2002:aa7:d913:0:b0:4fd:29a1:6a58 with SMTP id a19-20020aa7d913000000b004fd29a16a58mr12521440edr.19.1679929828855; Mon, 27 Mar 2023 08:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679929828; cv=none; d=google.com; s=arc-20160816; b=FLRUgwHe9o/TZ/3Ynxne0AySJhLBJ8nuKx1ck7W9XS+hQjeymkl7sagkJit8b+NTU3 AIMABjJ3anav5ITCREORvBKNP4SSXPqqZ7SH1BeAYJLqV9kN8HdhUUJLSahYDeQrf5l3 41wLGBUz7aaI5TRN+SMOG29pNzEVKb8hTuTevmgbhjS6MN00iTOTP1za9CGG26MpkjIZ Fd61VPDFuQpUcELfBD0YegBlqqILXA0OYQQmwy8pABqOKhIbKRkpmAGh19vKrV995UUk CloGDAxAc5Nhk2nRTzuECmT6sAs2MVTxGvC5nueumTzU6X1S3WgerCTZ5BtpKRxcEAis 7XMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=X9Uq/AKsnZqaK3E0B76dW//EsMyHm7ba36TRoIOuBcY=; b=BSlZrLYM+qPQRZ2uhiQZX3Jydx4RUni0G7G7sz7L1Lai7mWJCXUhoXbgfk0P+NJkGS Cw3vTXiFRmBUSxH5gyYjgVtd3GWnDnxVyvJZu/VDmoZ+x10n+/P2KvYtmUXNVFnyJpWl 2WJ6jB2JzBdhQOuT8um33RTaplZkEnmiFvT9chsGMld5n8p65n63HytcMNxKE4lDLGfr L3ftNufNDUF8yYyQ7n+nPNhsHS9IcMcdh8raeFo3sgQ2lkYT2IV1oMKeZifBhyKDbmyf XZgkWFnsWhLlGWO2ysdQfvIlznhCD64P7DMWojd0sAl7AtHuJ2YjeyXcufmZ1A/j5+t7 fYmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n3Wr+YsB; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020aa7cd06000000b00501ea9917c5si13575010edw.74.2023.03.27.08.10.02; Mon, 27 Mar 2023 08:10:28 -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=@kernel.org header.s=k20201202 header.b=n3Wr+YsB; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232461AbjC0PJO (ORCPT + 99 others); Mon, 27 Mar 2023 11:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjC0PJN (ORCPT ); Mon, 27 Mar 2023 11:09:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E94A32D71; Mon, 27 Mar 2023 08:09:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A5914B81617; Mon, 27 Mar 2023 15:09:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54113C433D2; Mon, 27 Mar 2023 15:09:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679929749; bh=MCExPz9vDop0E9u20UEk1fhx2X1UnQ3FTZ4kvpzLi4I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n3Wr+YsBC4b5ofeiyF7AZ8XOKtnhgVwMd56Akpe2478YCnSOxNfZykMSxd1ezJWt9 eLvBt7+AQjCg4Gm8iPomjAqEIkyB/ICjxiyDGH5j6bPp0QXaZN0Ar22tve2OMYDa9y auDvF7+xYZH9xy3zPnij6oPD6GqTEwDVXcNGLFu54mBUzXspLxLUllTUj8HOs6/5xU DA/dk9NYSRHAFDDkRbn+Zc0uUblb474Dvi0ounSpmsVyrFUUCEeY4HTtL/iKR6bJOe qQmwmnjPCgH7ruYFH4tWLP+VlQLZcasKZbsVbKbYu/4TFA9PoVIO+q6Ej5wQ8Q4kx8 r2KiPMfwyurmQ== Date: Mon, 27 Mar 2023 08:09:07 -0700 From: Saeed Mahameed To: Joel Fernandes Cc: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Boris Pismenny , "Uladzislau Rezki (Sony)" , Ariel Levkovich , Vlad Buslov , "Paul E . McKenney" , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/14] net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep() Message-ID: References: <20230315181902.4177819-1-joel@joelfernandes.org> <20230315181902.4177819-6-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On 26 Mar 08:34, Joel Fernandes wrote: >On Wed, Mar 15, 2023 at 2:19 PM 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? > For mlx5 usually me, but since this is a larger series that is not mlx5 centric and targeting multiple tree, I really don't know which subsystem you should be targeting.. for netdev submissions you need to specify the targeted branch e.g. [PATCH v2 net-next 06/14] ... FWIW: Reviewed-by: Saeed Mahameed > - 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/drivers/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_context *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] = 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 >>