From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40140C7619A for ; Sun, 26 Mar 2023 12:29:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231906AbjCZM27 (ORCPT ); Sun, 26 Mar 2023 08:28:59 -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-Google-Smtp-Source: AKy350aNUXd/EeDV5yvwKIbqmA6xrP8ic8IEkMWqLZMTUhiNUwR6Il/FhyVgJ2KqlNWG08pX1YNMbHkMQ0JAFjQsMP8= 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 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 >