Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1597939rwl; Sun, 26 Mar 2023 05:51:38 -0700 (PDT) X-Google-Smtp-Source: AKy350YWNjlK214NLOD9ugp5XtKEFK38yDY4wgAPiyhgoddTkw8q+qrTePtY7PG0c3vyf8kuV373 X-Received: by 2002:a17:906:9b89:b0:8a9:e031:c4b7 with SMTP id dd9-20020a1709069b8900b008a9e031c4b7mr11095788ejc.4.1679835098445; Sun, 26 Mar 2023 05:51:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679835098; cv=none; d=google.com; s=arc-20160816; b=DBUVC3qZrwehxa7owspFCDJUh+xHxjAcWhIPI99KuZaSkmKWjHhvJO5umtWwqaasBM s9V0V1FLd8TMjt8/5U4Nra1FHPwO+VKXhccVbVh9ztlvzHERGvupLK0gUmj4tkurSQqv IuX5fuFFEj636exzVKoKdrwLUqlYe3hIm0Gc3xl51PZnJKc2h8oO6P/W0+5RQjpFgyyl 3H3d16ilNFND09pEgUoGfKCsiFoB/nSUFwjFtaSD7Kl3hklg2bVnPDy10zhC+SfC1K+D xEK1SIZLIPmLD8L9rN4MD9ZwIV7nopxOWaCX65XIp2PFd8xLnm3MxfQUH2dXxY285kFT 0/Uw== 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=2UziUQS8rYrYDQ0kYBZWtD5AofLFmdm6EIJr26Gpzjo=; b=vnBPYN8YDihKo/GKM4lzPAg4mgytwqUEFAzRmacb3y7Fn9bEoIxpE/tB/wI7GyWp8A 6myt+9er56A5dp0a48Eo6CecWVnzahmg0R3QEkFdmFDC/1cJTOsLR9B1HgC4Eer9ogc2 CUuN+NXCHByWIAX4+yq1jAFqJjqrSVW1oXNh5CxEbYMP4UMDQqCL7wHfC1VfpsyYVaiH oqqhIXBHbj8xGfxwHSqLa/bad8lPAXZdgGhlKxb/0av9o+vWoIAveA5yDD9fSmkCwAN8 WSkhniQwMHTDEZVSAYABIgVBRrlyRA8zoO8gRWPcbflHy5xRb3SdbtJZksbgWjYNSAUy p0nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=wxntmiTy; 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 hp41-20020a1709073e2900b0093defbd628esi8025399ejc.1045.2023.03.26.05.51.14; Sun, 26 Mar 2023 05:51:38 -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=wxntmiTy; 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 S231871AbjCZM26 (ORCPT + 99 others); Sun, 26 Mar 2023 08:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbjCZM25 (ORCPT ); Sun, 26 Mar 2023 08:28:57 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D31536A6B for ; Sun, 26 Mar 2023 05:28:56 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5416698e889so121531557b3.2 for ; Sun, 26 Mar 2023 05:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1679833736; 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=2UziUQS8rYrYDQ0kYBZWtD5AofLFmdm6EIJr26Gpzjo=; b=wxntmiTy3AlmLaf3H49KVHs1TcIiD7/q0VEZAcBx60ntDc9veWH9dJnn5BpmOkcUB1 LNuigN36ms8eMDa8r6RZGrk25ncPHwMkCDh1Um670lVuy4zCpHjslv0jaJfstEKNCPVx xQhTYhtjgW0g/IzIi5nrYyiSQa1M6cvu4OM/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679833736; 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=2UziUQS8rYrYDQ0kYBZWtD5AofLFmdm6EIJr26Gpzjo=; b=7UH99dBa0dzj7jnkzQphgCFNoEOB3xaTNCjKgsl7fUOMlx3BIkLkVofkXeE/Jz0MYO jbLNXGAs1m21vVnNsmVemlAaWIQXryvM4bHRQCGajYh4u9pvQU76O4Mntvvxtw58oJXC mN1CJaHA3JA8ECU5SStZh7AJZnB/AAbiMtGSgXUe1XOYraOi14yj/4ojP4SR1LpaEylx h19rCbgSBYZa+jjVcqh7bP/HGvexrNCDhdaRlF3D4j/e4oYhkJJWvxw35rKxlcwYXPKX IdxjpdsCC33i0+TxAcJ3aGvauKR7dvvyOwTxPccZhNXYpc8dcsxTHwGJbR4ESwrpjPEm FasA== X-Gm-Message-State: AAQBX9dajaBB3majp1En486pQtk5d+gSv1mfr3A1LLEwqcOtBM71MoEI SkgQJ9ZYBjN7A1S/4cY0oq5su3vk7tFM72XYFCQVRQ== X-Received: by 2002:a81:af60:0:b0:544:b8c2:3cf4 with SMTP id x32-20020a81af60000000b00544b8c23cf4mr3894165ywj.1.1679833735979; Sun, 26 Mar 2023 05:28:55 -0700 (PDT) MIME-Version: 1.0 References: <20230315181902.4177819-1-joel@joelfernandes.org> <20230315181902.4177819-5-joel@joelfernandes.org> In-Reply-To: <20230315181902.4177819-5-joel@joelfernandes.org> From: Joel Fernandes Date: Sun, 26 Mar 2023 08:28:45 -0400 Message-ID: Subject: Re: [PATCH v2 05/14] net/sysctl: Rename kvfree_rcu() to kvfree_rcu_mightsleep() To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: "Uladzislau Rezki (Sony)" , "Paul E . McKenney" , netdev@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. > > Cc: Eric Dumazet > Cc: David S. Miller Could anyone from the networking side Ack this patch so we can take it for = 6.4? Eric or David? - Joel > Signed-off-by: Uladzislau Rezki (Sony) > Signed-off-by: Paul E. McKenney > Signed-off-by: Joel Fernandes (Google) > --- > net/core/sysctl_net_core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c > index 74842b453407..782273bb93c2 100644 > --- a/net/core/sysctl_net_core.c > +++ b/net/core/sysctl_net_core.c > @@ -177,7 +177,7 @@ static int rps_sock_flow_sysctl(struct ctl_table *tab= le, int write, > if (orig_sock_table) { > static_branch_dec(&rps_needed); > static_branch_dec(&rfs_needed); > - kvfree_rcu(orig_sock_table); > + kvfree_rcu_mightsleep(orig_sock_table); > } > } > } > @@ -215,7 +215,7 @@ static int flow_limit_cpu_sysctl(struct ctl_table *ta= ble, int write, > lockdep_is_held(&flow_limit_update_m= utex)); > if (cur && !cpumask_test_cpu(i, mask)) { > RCU_INIT_POINTER(sd->flow_limit, NULL); > - kfree_rcu(cur); > + kfree_rcu_mightsleep(cur); > } else if (!cur && cpumask_test_cpu(i, mask)) { > cur =3D kzalloc_node(len, GFP_KERNEL, > cpu_to_node(i)); > -- > 2.40.0.rc1.284.g88254d51c5-goog >