From patchwork Wed Feb 1 15:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124557 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 4E50BC636CD for ; Wed, 1 Feb 2023 15:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232303AbjBAPKb (ORCPT ); Wed, 1 Feb 2023 10:10:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232866AbjBAPJl (ORCPT ); Wed, 1 Feb 2023 10:09:41 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41FDE65EDE; Wed, 1 Feb 2023 07:08:20 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id ml19so28739296ejb.0; Wed, 01 Feb 2023 07:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FL6Oc4kZz3pEC+42YRGjUorvq4as+oQYBQ3Rk/f90Ak=; b=AR9ckEL0F6ZlprE/CI0uy/u3yv2fo+PiSDAmBvbENe1OfrVUEbQDzo787z9Qz2f98J KYsAwCWWlKRXvfc+isW1EQ4+JPh1HFDHb030whCmUfp2nvHij65eBd0h20MXAYMefaz7 f4k/AH/xdVeiMmiCKZ3VfuABC+Q4fV8j7Og3nyrMa2uT2fCdjHlDUbCtaCD9O8T2eWDa jBLaHtRgA+mWDSWTAWrczod4M+9/U2XItsPOwNoq//gupzLKVZWkpYxV+76/U/1IvI9f SS9DBVc9Kx3ogTtVLloOSrU3Ok820OMZer0l3KY1TxiBhMuNJPXdt6soiX0BF1866IBV +XtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FL6Oc4kZz3pEC+42YRGjUorvq4as+oQYBQ3Rk/f90Ak=; b=LuPCSeVYCnJh87105yL8LGsPRUkv/NUtKjwzPGVylWGd72DmS3u3hCZj2uHRwqYLOP VofinvRz66QIQuP0VSmSFzWg0vyvZtAAhdPPjjPaHzOLX1+VggnDRyPkweAv7HtXWeZ2 d+sjxvx/OaCTSKS8SBbfgS8KrpoWLPbRZc01bkMkAHV6FYK9sBIuE16nsI9Je0Q6GokK np71aFwU/Y4oJF5XajVV7SmYTgnjwFS0V9l0ziDHK7Un79K8mGJ1QDKAD5WMWXldq2pz bFlJvTv6vegARy1eL9bhaDT8NRqicbmsxrCGXNZmF1VEgaIfklX0b1sK7ogzeFVtlc1H chMw== X-Gm-Message-State: AO0yUKVxkcYaDu09iddSXiCfylUOGcF6LWVsAT84t8tvq9wlUp/v2bLq bF1nlSs0aZ/jqr9OjAnWyC+b8LciDpsS0A== X-Google-Smtp-Source: AK7set+2Emu/z31mFR+MiehqK9jtu3+IQrWJKpQxRS+pJMof8FaeXtDcXO5m2F+a/Yi+xnonfAwa3A== X-Received: by 2002:a17:906:7050:b0:886:8cd4:ef9d with SMTP id r16-20020a170906705000b008868cd4ef9dmr2685887ejj.22.1675264098637; Wed, 01 Feb 2023 07:08:18 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:18 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov Subject: [PATCH 01/13] rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:07 +0100 Message-Id: <20230201150815.409582-2-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org These two macroses will replace single-argument k[v]free_rcu() ones. By adding an extra _mightsleep prefix we can avoid of situations when someone intended to give a second argument but forgot to do it in a code where sleeping is illegal. Signed-off-by: Uladzislau Rezki (Sony) --- include/linux/rcupdate.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 822ff7b4bb1e..094321c17e48 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -1013,6 +1013,9 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) #define kvfree_rcu(...) KVFREE_GET_MACRO(__VA_ARGS__, \ kvfree_rcu_arg_2, kvfree_rcu_arg_1)(__VA_ARGS__) +#define kvfree_rcu_mightsleep(ptr) kvfree_rcu_arg_1(ptr) +#define kfree_rcu_mightsleep(ptr) kvfree_rcu_mightsleep(ptr) + #define KVFREE_GET_MACRO(_1, _2, NAME, ...) NAME #define kvfree_rcu_arg_2(ptr, rhf) \ do { \ From patchwork Wed Feb 1 15:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124553 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 5AEB2C05027 for ; Wed, 1 Feb 2023 15:10:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231743AbjBAPK1 (ORCPT ); Wed, 1 Feb 2023 10:10:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232860AbjBAPJl (ORCPT ); Wed, 1 Feb 2023 10:09:41 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2A2A66F80; Wed, 1 Feb 2023 07:08:21 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id qw12so36369370ejc.2; Wed, 01 Feb 2023 07:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oWGEYERPvz3Z7XS0c9NWA+7/cG741tA5LjUXI+xdY9A=; b=a5TGg72O4JVsbdjy8Fdwnjt1CZo2FFCFYgUY9zkr98rstihvKl+h2kTYnnQZj3XtIQ VrLdkj6Y8gRLKhKPrEtocVaVOw5Kqx9UYfjDWXRsHFay9d1QtX2Y1PDqy4dQKWewU3TC 3UYtypps+hRIw0eo2P1np+vhLCLx7bfF2s8dlvC5L9lZRCzVkvRPlM6ZHeNJLS3glfeb afq1QNf+AfCNLiFhWe9Un0v4bsrFoG25K6Cbdnql4+Cbv+WM0zsZDjoBhbT7TY3FuVQq zf39dosn0iqhtolYkYxX7Mn7zR44cAUFhAxTGsdKOMhfaM3AINRsuKah8qgIMRjt1HXL j9ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oWGEYERPvz3Z7XS0c9NWA+7/cG741tA5LjUXI+xdY9A=; b=8C1hoTCx3NWojKfwaYeBcKwTWkTESWptWmMn4lZo/Q175/u0kR1hzftoA+l+qvIiWR 1apW2wd0+GiyAHJKajqS3Omq0DexMnw9UUSSbxJhkLuyuU3S1J5NdMz1HfgUWmrg+ZWk lZTe5lNkWuRH8evb1BFs1I/VFP7jt5w7AJc413btTPdrjmRR6LT+Lf0RcbhMwDqpgYeJ maHlwF79Cx9IcR28TQDwYhZiHDzG0C3DkvHK2dpBR+o2QxNH+WmIHbyUMUZaI6Ju7z23 5TMH6NppCfJ/6KACz4R60GvM4xejZ+O5e7EkkwkcYSmOVL1fV8fKzNuBuk2I7QhNJ2qf TRyQ== X-Gm-Message-State: AO0yUKXaWUQPtzoeiCsfmNIwdlHAcw7LvV/wvnP9uJqgobjt/9emXiaK XKoux0CBYXzAZev/tqDWf1JpaRWSXcYyPw== X-Google-Smtp-Source: AK7set/G9utt0kjirrLeO0f7RG4vKpbd0iCDXqlCLC97vHF2UZQtZK2/B3FCOQK+DPWEChiWZCsWLw== X-Received: by 2002:a17:906:434b:b0:878:72f7:bd87 with SMTP id z11-20020a170906434b00b0087872f7bd87mr2475279ejm.6.1675264099752; Wed, 01 Feb 2023 07:08:19 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:19 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , Lars Ellenberg Subject: [PATCH 02/13] drbd: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:08 +0100 Message-Id: <20230201150815.409582-3-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kvfree_rcu()'s single argument name is deprecated therefore rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Jens Axboe Cc: Philipp Reisner Cc: Lars Ellenberg Signed-off-by: Uladzislau Rezki (Sony) --- drivers/block/drbd/drbd_nl.c | 6 +++--- drivers/block/drbd/drbd_receiver.c | 4 ++-- drivers/block/drbd/drbd_state.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 60757ac31701..f49f2a5282e1 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1615,7 +1615,7 @@ int drbd_adm_disk_opts(struct sk_buff *skb, struct genl_info *info) drbd_send_sync_param(peer_device); } - kvfree_rcu(old_disk_conf); + kvfree_rcu_mightsleep(old_disk_conf); kfree(old_plan); mod_timer(&device->request_timer, jiffies + HZ); goto success; @@ -2446,7 +2446,7 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info) mutex_unlock(&connection->resource->conf_update); mutex_unlock(&connection->data.mutex); - kvfree_rcu(old_net_conf); + kvfree_rcu_mightsleep(old_net_conf); if (connection->cstate >= C_WF_REPORT_PARAMS) { struct drbd_peer_device *peer_device; @@ -2860,7 +2860,7 @@ int drbd_adm_resize(struct sk_buff *skb, struct genl_info *info) new_disk_conf->disk_size = (sector_t)rs.resize_size; rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); mutex_unlock(&device->resource->conf_update); - kvfree_rcu(old_disk_conf); + kvfree_rcu_mightsleep(old_disk_conf); new_disk_conf = NULL; } diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 757f4692b5bd..e197b2a465d2 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -3759,7 +3759,7 @@ static int receive_protocol(struct drbd_connection *connection, struct packet_in drbd_info(connection, "peer data-integrity-alg: %s\n", integrity_alg[0] ? integrity_alg : "(none)"); - kvfree_rcu(old_net_conf); + kvfree_rcu_mightsleep(old_net_conf); return 0; disconnect_rcu_unlock: @@ -4127,7 +4127,7 @@ static int receive_sizes(struct drbd_connection *connection, struct packet_info rcu_assign_pointer(device->ldev->disk_conf, new_disk_conf); mutex_unlock(&connection->resource->conf_update); - kvfree_rcu(old_disk_conf); + kvfree_rcu_mightsleep(old_disk_conf); drbd_info(device, "Peer sets u_size to %lu sectors (old: %lu)\n", (unsigned long)p_usize, (unsigned long)my_usize); diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 75d13ea0024f..2aeea295fa28 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -2071,7 +2071,7 @@ static int w_after_conn_state_ch(struct drbd_work *w, int unused) conn_free_crypto(connection); mutex_unlock(&connection->resource->conf_update); - kvfree_rcu(old_conf); + kvfree_rcu_mightsleep(old_conf); } if (ns_max.susp_fen) { From patchwork Wed Feb 1 15:08:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124566 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 97F06C636CD for ; Wed, 1 Feb 2023 15:14:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbjBAPOv (ORCPT ); Wed, 1 Feb 2023 10:14:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232789AbjBAPJl (ORCPT ); Wed, 1 Feb 2023 10:09:41 -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 3149F66F8B; Wed, 1 Feb 2023 07:08:22 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id m2so51835346ejb.8; Wed, 01 Feb 2023 07:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1f2sZTLCh+6MjnBo1NM4qx8aN8UK3+QyFktme+HJb1M=; b=dKmAu0GxbikreE6kPJmqHkddGR4hdJEwSy/Hyn9dorAla/AcEyCzBi0e0E5WKnnadE ZOoGHTpyuGBvNdYpaYDYcvhdpuYyY32EQuFRAWIhvBFh5vTxfR1pld3Ab6ScfSKARDAM sc2UMjZv2Pc+Fz5wbQlfV16JlBQkDyrYomHAkpzegrg7Jcwi5hSg3voaTAqOK7f84SP6 9T7cGzELd1jUt2G622d2YjrOKECc9MFeZ1qCKxQALvy/15evIShrh1+HKkkrn1/eRv+N NzUTzuo0yZ07hHQCVYZf4cxu/9+TaJ7wfNNg5s3LCxsCjX0IvX/o3RSYThcDvihaSgp7 N25A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1f2sZTLCh+6MjnBo1NM4qx8aN8UK3+QyFktme+HJb1M=; b=a+6ffcdrTbl+BddaUPsrX9kO2q58MlUEN9D+xb67k8X3PruIeGYrQkhAVR6sKLluQr 4WIKDYDaZd37VYv+EBRWIpqSFkH8QMHraFMoghiYRbPsUsqr3AGMu68IbzZGE9rk44T7 pxNJJiFHgG73Sr5IiPQmFfHRo8q4k0z2BP5KKjaGNy8G65qHv0o3ydFjekJeR9VbWmsd 0Sflf1NcQOmVdzNCTnEU1sci+pkjKFdn0iGCEh27WneqHsoLaOvHOe+d2ye8La6EC2p+ FH58yRv20QKF1E0v4n4TzB2AWkmT2EWjfQRE27a/QfRvSFILOUtI/hmKcNYmQNApNcY8 UmhQ== X-Gm-Message-State: AO0yUKVtgXmCd1vIZhsyGb2HIZgi/RCx/dKRk7EXLoFh8ZYqBLSwkgrG iODeC7q64TE6PsTa8PB+zf52WFJAf6CCLA== X-Google-Smtp-Source: AK7set97wGmJcPMtT1Vrg2FbfLmw1oPPmZCQAOt149jYSK9E/tj08/FAxVMeqSvRhMDYKFxZsXw3og== X-Received: by 2002:a17:907:2ce7:b0:886:7eae:26c4 with SMTP id hz7-20020a1709072ce700b008867eae26c4mr2498160ejc.5.1675264100689; Wed, 01 Feb 2023 07:08:20 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:20 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , Vishnu Dasa Subject: [PATCH 03/13] misc: vmw_vmci: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:09 +0100 Message-Id: <20230201150815.409582-4-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kvfree_rcu()'s single argument name is deprecated therefore rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Bryan Tan Cc: Vishnu Dasa Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Vishnu Dasa --- drivers/misc/vmw_vmci/vmci_context.c | 2 +- drivers/misc/vmw_vmci/vmci_event.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c index 172696abce31..f22b44827e92 100644 --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b/drivers/misc/vmw_vmci/vmci_context.c @@ -687,7 +687,7 @@ int vmci_ctx_remove_notification(u32 context_id, u32 remote_cid) spin_unlock(&context->lock); if (notifier) - kvfree_rcu(notifier); + kvfree_rcu_mightsleep(notifier); vmci_ctx_put(context); diff --git a/drivers/misc/vmw_vmci/vmci_event.c b/drivers/misc/vmw_vmci/vmci_event.c index 2100297c94ad..5d7ac07623c2 100644 --- a/drivers/misc/vmw_vmci/vmci_event.c +++ b/drivers/misc/vmw_vmci/vmci_event.c @@ -209,7 +209,7 @@ int vmci_event_unsubscribe(u32 sub_id) if (!s) return VMCI_ERROR_NOT_FOUND; - kvfree_rcu(s); + kvfree_rcu_mightsleep(s); return VMCI_SUCCESS; } From patchwork Wed Feb 1 15:08:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124560 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 39EB0C636D3 for ; Wed, 1 Feb 2023 15:10:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231685AbjBAPKe (ORCPT ); Wed, 1 Feb 2023 10:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232018AbjBAPJl (ORCPT ); Wed, 1 Feb 2023 10:09:41 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EC6966FA3; Wed, 1 Feb 2023 07:08:23 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id hx15so32759982ejc.11; Wed, 01 Feb 2023 07:08:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bT+cSsz2JrZskcNzFL2BkroViG0oFNVaYfW1YmvtVLg=; b=MbTXjK1aKcldZ1ocYRQ8KR3IhAxYTzuOdQl734t9wmuLuz1vNvm2N6voBZm3Rdi4B2 modsjehD8rJK6TB3IicMeihhuJckxR9bFA+BOSDy/UeP3Xy2PGtavZFn4pga6QbEAnVI l5/jvA3fOO98TNL/u81nzHFyhZNrcXg8KYKQaxXqbkae2jX5OOoZEWNv4gOWS4VHv1Yd DJgnIHELt9l04IUvxl15YRvHxPqCfn8vLPeIOVe9yAzc/18J+EIP5+HGHYRulTtrstxH PHAwkLCbDtqhgzyUc6F8k0cFPZKgOaSUJQxQ3p2XzNKxEOFP9ZacBMtthZGZYvXOjM+P uJHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bT+cSsz2JrZskcNzFL2BkroViG0oFNVaYfW1YmvtVLg=; b=hW6HRpoQMSd1wtmRerwRLGMmyqKQL3UYLG6AW01bgf9GgJJ/ZW88aqDsvuqWAgZDuN 8lSeUW08LvXqY3Ggo4LMxJ1FBI8tfxNkzjRVeSC3tAbgjjwz7kCXJ4fl4JlnWzkW4Dm1 KqoKkFcd1Mei5eAq453UtW98nbJy+YsJa2i9SYztEYFopsxftJ+T9EiHRPnXzlDYfFm1 t4IL4FaI+ZGNLDwdqbIAk6qC+R/VU8qECUkvsUE3fKE65DdroyaQ88OUg/SrIxBChbli K2DLvXpk6U2ZjHuTiK4Geg4QbmmU+riZRWP6q2mg+pkFHOQWb9n+RHs8EjQORC+wdywe 3RDA== X-Gm-Message-State: AO0yUKUMvCo+SuV7vvqJWqJKiQOLkPGCgSQFQ3Bg3OrLSoktbHonkSUo LiHCRj5XnFiasX6fp2iwHonei/oXYJW3KA== X-Google-Smtp-Source: AK7set9ffcrAEyHawqVjHlsonanOonFJEAXupajZTTKpre/ichXrJUx8ThkcdOWWc/uLkyLkIscf2w== X-Received: by 2002:a17:907:c20c:b0:883:3661:97e5 with SMTP id ti12-20020a170907c20c00b00883366197e5mr2107344ejc.50.1675264101634; Wed, 01 Feb 2023 07:08:21 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:21 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov Subject: [PATCH 04/13] tracing: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:10 +0100 Message-Id: <20230201150815.409582-5-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kvfree_rcu()'s single argument name is deprecated therefore rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Steven Rostedt (VMware) Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Paul E. McKenney Acked-by: Uladzislau Rezki (Sony) --- kernel/trace/trace_osnoise.c | 2 +- kernel/trace/trace_probe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index 94c1b5eb1dc0..67392d872b67 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -160,7 +160,7 @@ static void osnoise_unregister_instance(struct trace_array *tr) if (!found) return; - kvfree_rcu(inst); + kvfree_rcu_mightsleep(inst); } /* diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index 01ebabbbe8c9..32a7741dc731 100644 --- a/kernel/trace/trace_probe.c +++ b/kernel/trace/trace_probe.c @@ -1170,7 +1170,7 @@ int trace_probe_remove_file(struct trace_probe *tp, return -ENOENT; list_del_rcu(&link->list); - kvfree_rcu(link); + kvfree_rcu_mightsleep(link); if (list_empty(&tp->event->files)) trace_probe_clear_flag(tp, TP_FLAG_TRACE); From patchwork Wed Feb 1 15:08:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124556 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 C023EC636D3 for ; Wed, 1 Feb 2023 15:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbjBAPK3 (ORCPT ); Wed, 1 Feb 2023 10:10:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232905AbjBAPJo (ORCPT ); Wed, 1 Feb 2023 10:09:44 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBACC66FA4; Wed, 1 Feb 2023 07:08:24 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id m2so51835654ejb.8; Wed, 01 Feb 2023 07:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fO35H2/wXICWhJ+cuarq0XINTUHDojZ1200QGctnX2s=; b=SUl+ss9v5UYWv8NVc+1bIneBIoOFhC93EyGiZTsCfA+JgqnMTLsUJhloNmitcDPyah zhSiml1PTBGgW/R81AmM8CTk6Sj107GDnZP+DAs2hC79RVmKywEOAQw+7F97t87n5cb/ 3SNTvvcC2eb61GOiCXqztxc82x8jzbFrDdEn2F+X6XmhlCMNavxIn5Jx3//Xss8BFX9y 8IZv9wIxrUFj4shJIPlq8ONgV0y93Ww0E/IRPe+0kwCfnhC/ue90egwnnvkSpBl36z6T ggsXtcw+ss/53rVrtqvTPDTvvwDTGVjAShKJ752MLUXrcN0ksnOd9hhHEYWgFG4uUZE1 1+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fO35H2/wXICWhJ+cuarq0XINTUHDojZ1200QGctnX2s=; b=ALDzzQQQ65gEdIM+Irwb5UmVjK/wpoBAIUnZmJIkcb+wT7tVTxCaVvQCG28ztJzsFj 1W/KSJRcgaMwbcvEReY9liyzdDVZTnXgQEVRQreGhai8/84rSrDRSGHoBkHghG60lx0h 2RluuGjMZl5x9FKN7zD6KLd7/BeqOvTBvdyW8BTG5bMt5s7EhRmJOHZHiDs+aAi/aIY7 IzPPQK0X8cc6iJGNSUGQ3tTjdOdg/N70rTvMPeSZjREm/6w+Rl7nbaT57ssaXuft92rM 6uPqglyViXId0GOsHZa8+wAqFRYKRfGRB9w4A9rOGB+znkh9LwZx7Mgg+IbOEUtv8BcC MoFw== X-Gm-Message-State: AO0yUKUIlHv7De7aM5Td+kfcC7d+wizvaIDcYZUzNRU7RtIqBCaBp9Ff uMiVjyu9LfrHZeLbbGVxAx2rhj4/B5d+KQ== X-Google-Smtp-Source: AK7set9aFDpwzIr/zYc4RTSpyE0YXhwfxTDiMJwKhIebZokzv2cysN23I5YVLaBbRST0AMkJPPC5WA== X-Received: by 2002:a17:907:e8e:b0:878:7ba6:b69 with SMTP id ho14-20020a1709070e8e00b008787ba60b69mr8224743ejc.51.1675264102547; Wed, 01 Feb 2023 07:08:22 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:22 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov Subject: [PATCH 05/13] lib/test_vmalloc.c: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:11 +0100 Message-Id: <20230201150815.409582-6-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kvfree_rcu()'s single argument name is deprecated therefore rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Signed-off-by: Uladzislau Rezki (Sony) --- lib/test_vmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c index f90d2c27675b..6d8c5c0afd53 100644 --- a/lib/test_vmalloc.c +++ b/lib/test_vmalloc.c @@ -328,7 +328,7 @@ kvfree_rcu_1_arg_vmalloc_test(void) return -1; p->array[0] = 'a'; - kvfree_rcu(p); + kvfree_rcu_mightsleep(p); } return 0; From patchwork Wed Feb 1 15:08:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124558 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 7D3C2C63797 for ; Wed, 1 Feb 2023 15:10:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232605AbjBAPKc (ORCPT ); Wed, 1 Feb 2023 10:10:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232926AbjBAPJo (ORCPT ); Wed, 1 Feb 2023 10:09:44 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D10D66FAA; Wed, 1 Feb 2023 07:08:24 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id be12so6740712edb.4; Wed, 01 Feb 2023 07:08:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v7t+jH47dutnrEewrpFYJCTIdzeIdrMXC7jVe2cYM1o=; b=axm8GclNe0TkydqMsP7WrJXjtkaTy5Us4zqhdTWmg2xnNAxQfkDMBXKZ21FQxDg7wq FxoE3ayhhjkVGUy//ctSzLPp9/7i90nBwEV3YVUJJ0WMFS5L6oS0suOeNLJeaVO6i2L1 s8s1dW3g8daDhCb1PYPRpk8S/774DEKn4IyUIiponWkVWmreuGMAosaw3IWCdhuPdVJ8 8SEmr6Njxvw8bB5KOqp0GY5Gf1rr39JDlnVXdQhY5fpbEobkXyahDU92E1S1lU+xpoNd 3O2/LiEs1exrkzevNNQX25oi7cq7VW5YiMd/AJcDfnHEF6LmMvNaI6AoTi/gRVb08UPH eGiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v7t+jH47dutnrEewrpFYJCTIdzeIdrMXC7jVe2cYM1o=; b=NI9Ja2nuJ+5Tp+JCstwRgvTPLm6oTRrOpBn2JmE998ZfjHJdFIt8BWz4NZgWENpjE/ 4qHYAMtLrK5yKxJEfw5h7cvp21MM7hhr/MtIZvdrKJOsp0iVzrdAWCHx/HnsuwL5PM7t 4j1rWRf8NNMb854cnRav8G/BpLGomYo50OuysonC7oKXXnMmcRX85or6cGmUbIUeybE1 sn0ClclF2IWn1AFzqgdGknwx8sDpLTNNZxr/BVyd2UfgsMfmDLgIFCt3gvRD+g6ZaZ9P 9dMYTQ/NuaOCMAOikNGjKpMeNjuZL34dhcNUGmWzNMDjpw97DXffULUu+VELMi0x19tx InEw== X-Gm-Message-State: AO0yUKXoUGJPQARKOPL3OieET0t74kawstx8y6Vt0WMK66gldvCwQwm6 ByLLbcw1Uugpwa5+FIglVKox8v912bTJ/Q== X-Google-Smtp-Source: AK7set8jOPc1FL0gqkf6hHR27Gh0OOx6IwdNTQrshUFLPMLPWE9EiGyHm4LH0bpDVr19OM6AVWddRg== X-Received: by 2002:a05:6402:3488:b0:494:fae3:c0df with SMTP id v8-20020a056402348800b00494fae3c0dfmr2985034edc.12.1675264103466; Wed, 01 Feb 2023 07:08:23 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:23 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , "David S . Miller" Subject: [PATCH 06/13] net/sysctl: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:12 +0100 Message-Id: <20230201150815.409582-7-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kvfree_rcu()'s single argument name is deprecated therefore rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Eric Dumazet Cc: David S. Miller Signed-off-by: Uladzislau Rezki (Sony) --- 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 5b1ce656baa1..a28562d4e468 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -101,7 +101,7 @@ static int rps_sock_flow_sysctl(struct ctl_table *table, 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); } } } @@ -139,7 +139,7 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write, lockdep_is_held(&flow_limit_update_mutex)); 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 = kzalloc_node(len, GFP_KERNEL, cpu_to_node(i)); From patchwork Wed Feb 1 15:08:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124561 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 E63FAC636D7 for ; Wed, 1 Feb 2023 15:10:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232632AbjBAPKe (ORCPT ); Wed, 1 Feb 2023 10:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232922AbjBAPJo (ORCPT ); Wed, 1 Feb 2023 10:09:44 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2018969532; Wed, 1 Feb 2023 07:08:26 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id hx15so32760401ejc.11; Wed, 01 Feb 2023 07:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JmKlyMMJ/xEGlFGd5Gxv5AeF+U+6+mZ4G3QkqKY1mdM=; b=c6azTpWkKQffBEe2MAEiXW7H64r7G8RxpP6AOHcPVZdNMYkjx+JYt3ZJrwoey7Bhi4 3U5CZt8416awlbOmwyyXDpO4v9virbiJVJJ6QAT0nXMsCHWYFUBDwFiZipY6eNuE4zWB ZRQrhMcnthZ5uwrMZCRpHftZzckhjKVjf1N1UrgJcg4ZitsN+YtuToG35yrOwioAWtNw EPhjUTGd2kUwpjHBOlh5TAL1SbRX6ezF05RUFgd0l9zrrRWxU1sJvo7LM9lQTOWCljrx LnLmy+g4GWsbSBU9Ph/CEfX9TR82hOo4TOwOX4YqqT39urmQ0JKYNLdFMEdiCthvc3O3 oSKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JmKlyMMJ/xEGlFGd5Gxv5AeF+U+6+mZ4G3QkqKY1mdM=; b=bvSnPIkDHLQVHQCV7IgZAS5qdkO4qWHmUMU/EF5PJXOFvjJ037CUodOFfhWf+XFNjp bpEloCSGfIXal9sNlTIEAJoI2w12J7OkTMv9u1dJcNwblTgEnGpH2kPleu2D7CM2khLc S49nIM/P6tJnDGQcpQ7s4uwk3lDllV0TioUpb2rR5EZK9lPhONssPbUzv+glbIhr6u1V GBkeqkZSQpAOdBwgL3jowiG4RVrG/Et84313cqXIvCivQ3ERfpvDzlEngp0tSzgKP/5o CguCdV+RYRLdgijNc0uvpbO03gCQ74/+Ee7h7o5RUv2LpRAMP+NILHAIWMRbY1GAqoVz ItnA== X-Gm-Message-State: AO0yUKXITv0377hAamF7toC9r3bGX3VVPUZxUh8hbb0AeBT132tfSFDv y7wLON/TPLZqhMzAmU84i17uDa9XmUKZEw== X-Google-Smtp-Source: AK7set9o7bnLBWO3PrP3ZVOPyFD+6VHKWOsSXhFB/KKBL4fqEFYK1zi+/nI0i5kRuuXtNUxcHtnUWQ== X-Received: by 2002:a17:906:fc13:b0:87f:d08:1064 with SMTP id ov19-20020a170906fc1300b0087f0d081064mr6012611ejb.6.1675264104460; Wed, 01 Feb 2023 07:08:24 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:24 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , Jason Gunthorpe Subject: [PATCH 07/13] RDMA/rxe: Rename kfree_rcu() to kfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:13 +0100 Message-Id: <20230201150815.409582-8-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kfree_rcu()'s single argument name is deprecated therefore rename it to kfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Please check the RXE driver in a way that a single argument can be used. Briefly looking at it and rcu_head should be embed to free an obj over RCU-core. The context might be atomic. Cc: Bob Pearson Cc: Jason Gunthorpe Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Bob Pearson Acked-by: Zhu Yanjun Acked-by: Zhu Yanjun Reviewed-by: Bob Pearson Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) --- drivers/infiniband/sw/rxe/rxe_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c index f50620f5a0a1..e2fa061f19b3 100644 --- a/drivers/infiniband/sw/rxe/rxe_pool.c +++ b/drivers/infiniband/sw/rxe/rxe_pool.c @@ -276,7 +276,7 @@ int __rxe_cleanup(struct rxe_pool_elem *elem, bool sleepable) pool->cleanup(elem); if (pool->type == RXE_TYPE_MR) - kfree_rcu(elem->obj); + kfree_rcu_mightsleep(elem->obj); atomic_dec(&pool->num_elem); From patchwork Wed Feb 1 15:08:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124555 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 31CDCC05027 for ; Wed, 1 Feb 2023 15:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232068AbjBAPK2 (ORCPT ); Wed, 1 Feb 2023 10:10:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232755AbjBAPJr (ORCPT ); Wed, 1 Feb 2023 10:09:47 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3940069B26; Wed, 1 Feb 2023 07:08:26 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id lu11so14978562ejb.3; Wed, 01 Feb 2023 07:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rp5plCaK+Ee0v6zJJSPg3nVKcz7Ocb0iI+K21w1Y4qU=; b=NRcPeMqBEWHBNfeM1QbytTGZ1tgUxGV947jrBR4ORmkwM2cjGj3VYO0Izn3sEkPeze TDSUaTP5zxyGloM9o75uwKb/ZyZk+fFS41eEBX/ap94gmlod2QhZDMBcdzZ+T6SWJIxm xuFMcqYWNXTFaAXiqxSzjvITMIqrA3UicyA6oKp7NZlv1V6pLdXCS4ya609Bdnz2D9Hi b9YuqWqFWdwJuTWGcraM1KZR1fSnQ3h7rueNOAopZZIlBcNIbA5q/QflEcWfVU8VhwXZ LsM4DihK15XNeSKhFz6YbZWMfSSGuU6F0Wy8Oq6rqwFlvmWH50agLQkQB+J8MR8Y3z3k S12Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rp5plCaK+Ee0v6zJJSPg3nVKcz7Ocb0iI+K21w1Y4qU=; b=yQceJNKmuBB00xxZzAR1uTlwZUQY1IdE2Jv98ijCpejFbtBFUO6pg5dk85r0PcAf+/ 4bcfFzPI/tEGGzznpvOSAzUrCx6rxWpQdsm+opSod3HmEmANTmBrD6PuE+3tWdhixLVl qENeAPcP3CB12jr7Mrz4lxVVe+W6YASy3KhUxXLvJbqk0zxk6oE1ml2YLjZsXBTYTFT+ hvSDs76UX4Gm4LbVRhOXaBh74v8mD6s4mTZXha9eEBb/5YffS2xD3g6R9PSx4q4ZrOXR NaQR0ZvWOtCV7gEJu4tAfBfkbJfzNusZwDD6v4yAxqKfg0M/pAvLQ6SrsQlg6EWNjeh4 6KnQ== X-Gm-Message-State: AO0yUKUnvqqw4FPA1lTMPE0zxU09pbIuNUBeO/hwZzQvI5IZ64F+cG6q r7YrfcgGuNlh3LXmZ2wuY6CipJWiFglyrw== X-Google-Smtp-Source: AK7set8NF2CoMDa5EkVRC5udmJtZtSKjC3hoECJADkYaqeir3itK2k08NKHNlbPCOhBbCT7H7ScyXA== X-Received: by 2002:a17:907:98f9:b0:87b:db62:d659 with SMTP id ke25-20020a17090798f900b0087bdb62d659mr3026308ejc.19.1675264105400; Wed, 01 Feb 2023 07:08:25 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:25 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , Saeed Mahameed , Vlad Buslov Subject: [PATCH 08/13] net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:14 +0100 Message-Id: <20230201150815.409582-9-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kfree_rcu()'s single argument name is deprecated therefore rename it to kfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Ariel Levkovich Cc: Saeed Mahameed Cc: Vlad Buslov Signed-off-by: Uladzislau Rezki (Sony) --- 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 9369a580743e..5d32a8a5e5a4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c @@ -672,7 +672,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: @@ -851,7 +851,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) From patchwork Wed Feb 1 15:08:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124559 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 4B23EC05027 for ; Wed, 1 Feb 2023 15:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232646AbjBAPKd (ORCPT ); Wed, 1 Feb 2023 10:10:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbjBAPJo (ORCPT ); Wed, 1 Feb 2023 10:09:44 -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 445BE6BBC1; Wed, 1 Feb 2023 07:08:28 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id dr8so30717619ejc.12; Wed, 01 Feb 2023 07:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aCIsnGFwfhB3GdHRBSUurOPmrL4KoA1jNcMHDebxURA=; b=BoPO7gpLDoTuKhel0GzrIKGVr1TL37RGWdatMkKU0QJJY+2/5Q79vJ3ju3SNEP0hUi pS4R4XFaydaMFuGZ1BHFw2bOiaHCZz6cImmmpdB9bnx7OCWudj9X1EkAa8hpCqiDHkvc AXrztKeyxki0DyD7ogtOJXKnVZVw9gTLmZsrB71UvG2iScNVZ1fkXsxG7PoYXaaI38oE v8yTaTAe3z5sHYG7e/DL76rJRpPUCm6D5cH2rmKbyMa/oiQ9H+QJ3tfX+YGKRZRXqv31 40m4gkFYfLThinnJF9d22bciAQBsclWsv27RAzxjq5qL8dNOk3NXmRxTNxF1pPv81S2j LGgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aCIsnGFwfhB3GdHRBSUurOPmrL4KoA1jNcMHDebxURA=; b=NH+oMjMNt8Y1lTUwXK3Kfr2jYif8DPhrd5IZv5w70ys9DT26WIeJ5rB01AOjibvSFI +TZlEddBS/hOoEMoz4GSnSiR3u3MuXIgjIdB9zP/EivmpCTPMg4ZzW3Pde9zGOuOpbA5 lFXuTpjzC/koN6jta1acP2DeANYgnivZxrj60zGmUtfwxie5FUYo7K9UicBo7y3KC/GU TZt+DNCuUa35PM7vhnCUAAyZM6rZi3hDYDHlZ8S3EPE+OgVhGagw8wcww7Ve/HYL70Iz +GdwcgAIQq33Xa35WmAXQQmVhaIekNe41gzfA38N+K9I4IgGbEyqf/TRCWgzm8yekivF bekQ== X-Gm-Message-State: AO0yUKWhbkLqVPv9H21eZAICnqaDYrznvHfU6OSO5eugEnavzb/cqvzW +dYDdboAMeBwN/OThAwwjHSDRsXRA0meYg== X-Google-Smtp-Source: AK7set8Y/Z/c78ObALKOzGqUDP4vWGfAwQ4UcwS2igsc0DL0dqu01vIw+yZCyXzDj7ltwNPUfnHrtw== X-Received: by 2002:a17:906:1441:b0:870:d15a:c2dc with SMTP id q1-20020a170906144100b00870d15ac2dcmr2800269ejc.74.1675264106371; Wed, 01 Feb 2023 07:08:26 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id qc26-20020a170906d8ba00b008787e94c5ccsm9585774ejb.184.2023.02.01.07.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:08:26 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , Lukas Czerner Subject: [PATCH 09/13] ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:08:15 +0100 Message-Id: <20230201150815.409582-10-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150815.409582-1-urezki@gmail.com> References: <20230201150815.409582-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kfree_rcu()'s single argument name is deprecated therefore rename it to kfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Theodore Ts'o Cc: Lukas Czerner Signed-off-by: Uladzislau Rezki (Sony) --- fs/ext4/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 260c1b3e3ef2..87aa23d047c9 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2500,7 +2500,7 @@ static void ext4_apply_quota_options(struct fs_context *fc, qname = rcu_replace_pointer(sbi->s_qf_names[i], qname, lockdep_is_held(&sb->s_umount)); if (qname) - kfree_rcu(qname); + kfree_rcu_mightsleep(qname); } } From patchwork Wed Feb 1 15:09:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124565 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 ED0ADC05027 for ; Wed, 1 Feb 2023 15:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232348AbjBAPLS (ORCPT ); Wed, 1 Feb 2023 10:11:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231941AbjBAPK2 (ORCPT ); Wed, 1 Feb 2023 10:10:28 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280404ED8; Wed, 1 Feb 2023 07:09:58 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id ud5so52337941ejc.4; Wed, 01 Feb 2023 07:09:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tXjIjq2OSXfc4jMxvXeb0r5u9dXZ/7er9tkJEls7xtk=; b=dtAAXAU6c2GAjbfjuGt79DK/CapzQBC0LdPCjOljsN234iuNoqxq+8rLsfL4+e/xEc HHFxJiHO4FLJHKUjjwLXg8itxMnrV1A1tPgmsn6Inmo6jycPqiBchRgNFPEHCKsrNagm bGI720X9uAaxXmY9AxKu+3t37E39DghKxenJf0lnWnFNgwS6aAegPpZtj5yv2pLpb4pQ /dIWhNeT+qZQEaxLyN6n2jiYGoxisBbjwV2yoX7MELz4Fzliy8IylETDwklv8aWRvBig yHqWk1FAvEZRpw6bfDSk7uukFjh8QwAh27xxtPmineQ5fZ80bTCxBK2xq8f9ZyrNEWld JVqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tXjIjq2OSXfc4jMxvXeb0r5u9dXZ/7er9tkJEls7xtk=; b=4vSF9SCjqtNJxIj5peijHXYBDftG+BYomOK4RLvL5uLTEjBOvTADI05hRugXDekm5B ZIuVmi90zpXnN2wezQYB4CULrL+oWf/k5BbZa3p8ZByfOmc4rK3gIo68hrD6klUVO3VC IqkTS5QPVFAIkZQ+FXp8RAXkzUlWpmIIJOmhE2xi+Qh/EFwBrxHgIAAygO4jfNXlnIaJ aDYacbIJdLMn/2VZcLKGu2ZLMhQwQ8xfW7+0YDU5Bd/BAMdPZytKQNSCJrJ1bseRKC9o SEwOkc8JnfoKtTDmcy/zMybJEDxjk9v13Pzow6gYQ6pqiLrtd9nsyUyqX2F6pT7zKAcI TV6w== X-Gm-Message-State: AO0yUKUOobXbMvfHrQT5KNK52b4p+fDz7ntdVi+YxR2ISFFi0pEWMi7W AF0MkmxTtvdCCOBL6GCyKQdLi6tHOXHKbw== X-Google-Smtp-Source: AK7set9NagWTJRR6IBaJEIwzZB9394Yll23Xgp1gsuKczn/h8X+3M896XTd8cIA3GlK1wC6+VPn7Aw== X-Received: by 2002:a17:907:1c27:b0:84c:e9c4:5751 with SMTP id nc39-20020a1709071c2700b0084ce9c45751mr2617987ejc.74.1675264196706; Wed, 01 Feb 2023 07:09:56 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id fe15-20020a1709072a4f00b008845c668408sm6627147ejc.169.2023.02.01.07.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:09:56 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov , Pablo Neira Ayuso , Jiri Wiesner Subject: [PATCH 10/13] ipvs: Rename kfree_rcu() to kfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:09:51 +0100 Message-Id: <20230201150954.409693-1-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kfree_rcu()'s single argument name is deprecated therefore rename it to kfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Cc: Julian Anastasov Cc: Pablo Neira Ayuso Cc: Jiri Wiesner Signed-off-by: Uladzislau Rezki (Sony) --- net/netfilter/ipvs/ip_vs_est.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/ipvs/ip_vs_est.c b/net/netfilter/ipvs/ip_vs_est.c index ce2a1549b304..a39baf6d1367 100644 --- a/net/netfilter/ipvs/ip_vs_est.c +++ b/net/netfilter/ipvs/ip_vs_est.c @@ -549,7 +549,7 @@ void ip_vs_stop_estimator(struct netns_ipvs *ipvs, struct ip_vs_stats *stats) __set_bit(row, kd->avail); if (!kd->tick_len[row]) { RCU_INIT_POINTER(kd->ticks[row], NULL); - kfree_rcu(td); + kfree_rcu_mightsleep(td); } kd->est_count--; if (kd->est_count) { From patchwork Wed Feb 1 15:09:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124563 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 B7E14C636D3 for ; Wed, 1 Feb 2023 15:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232108AbjBAPLP (ORCPT ); Wed, 1 Feb 2023 10:11:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231910AbjBAPK2 (ORCPT ); Wed, 1 Feb 2023 10:10:28 -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 373595BA3; Wed, 1 Feb 2023 07:09:59 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id qw12so36384652ejc.2; Wed, 01 Feb 2023 07:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w+s0R1N5QaJjHALhKlJSDlz82DJDrm00TxCc4cLTynw=; b=Qy9VJITeqinyGIT2g5k9PON9xuMsEZT32GMlDTA7zKIvzrlg5Z211EN1RzNeTX/mNx nB5CLyJHh3Jki7YQ3/feplUozmCCzwX1ABJbBEk2RbAJxdV8EcftopU3SZwc3oXTvymF k6VS/x2dgKnZDlwFr4kbgcolrs3bANv222/mQeCp/UpBMsRydfmSh4USN4/KodAA5dCM o23R5/YrTratVJXjGVfe8Eeq3+LaMjQKspQXMG6ZS4KqDWY2ip5IdBJJj4j3VPheGkwI 8xeu6PT8TkD1oT+v3cdyuB4fH8botO5lAi08pY5ZdqYTdMxfETjNiF/QcxXgYqymXO3S ZxxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w+s0R1N5QaJjHALhKlJSDlz82DJDrm00TxCc4cLTynw=; b=FZlRI6RK/Sc5gg0MCcZ7p6deM5MSt1xxfJg9rVWr24clyU+pHbVWTFayO50FeVLsye y5FA366yOzJCXp+QvZCa94GTH5NDVc57c2XjZaGRXEUg64YZjm0Qrd7XQ2pJo6Wfzzxk iGHb/7AxPj4OnC67j0c5cPD2d1ArWzZX0dZjXdceoEKz76R4pM+qJfRjvFe/D3wbDuKO MpRSDMq5YU7thONKuGn0bIHNrj7ICB/PKLGNASSukaXhfEby0TrmR8XkCpaFMBftLpmm CqcbwCu3gAgH5iU81XobYlkNFpnDXt8+M8smQpM96bRpgBGIZEQL3fIvCz4aPjnFQlYl 4QCg== X-Gm-Message-State: AO0yUKXkUYljtJt/UYHnQFDkT/cxvxpohkYx0Kh/KOmPVu8UGxKFD6VJ /bp9gnC9iLnhwhN2niPhRoz0/B5xJNtCbg== X-Google-Smtp-Source: AK7set8ZyNUoXKvFo6xr0GrDAZKFdBPmefZVr+mqOJR23Id/PYszl3ggYPzgMQme0vYI5wfLbPhxHQ== X-Received: by 2002:a17:906:688b:b0:87b:7c1d:e02b with SMTP id n11-20020a170906688b00b0087b7c1de02bmr2263849ejr.36.1675264197595; Wed, 01 Feb 2023 07:09:57 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id fe15-20020a1709072a4f00b008845c668408sm6627147ejc.169.2023.02.01.07.09.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:09:57 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov Subject: [PATCH 11/13] rcuscale: Rename kfree_rcu() to kfree_rcu_mightsleep() Date: Wed, 1 Feb 2023 16:09:52 +0100 Message-Id: <20230201150954.409693-2-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150954.409693-1-urezki@gmail.com> References: <20230201150954.409693-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kfree_rcu()'s single argument name is deprecated therefore rename it to kfree_rcu_mightsleep() variant. The goal is explicitly underline that it is for sleepable contexts. Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/rcuscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c index 4120f94030c3..e82ec9f9a5d8 100644 --- a/kernel/rcu/rcuscale.c +++ b/kernel/rcu/rcuscale.c @@ -715,7 +715,7 @@ kfree_scale_thread(void *arg) // is tested. if ((kfree_rcu_test_single && !kfree_rcu_test_double) || (kfree_rcu_test_both && torture_random(&tr) & 0x800)) - kfree_rcu(alloc_ptr); + kfree_rcu_mightsleep(alloc_ptr); else kfree_rcu(alloc_ptr, rh); } From patchwork Wed Feb 1 15:09:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124562 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 EAA69C05027 for ; Wed, 1 Feb 2023 15:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229612AbjBAPLO (ORCPT ); Wed, 1 Feb 2023 10:11:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjBAPK2 (ORCPT ); Wed, 1 Feb 2023 10:10:28 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E95F6A4A; Wed, 1 Feb 2023 07:10:00 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id me3so52324270ejb.7; Wed, 01 Feb 2023 07:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=udBAvOMF3811JfYnSoT7LY+mJh84zG4u72FA8SZ9FR4=; b=OHVpVmxeTI4WIC/hMW77qq/3M0DYZ8oeiiu5IwlZPDc2WrZd5zGiPSY3+MgQshnyhq q8RRXneNaoThH+BSsl7yGpGAXOIdI5GQ2o+idk+Ep7WHv7x60cthSzv9HyAhJdcE+wfc 11xvrWuwk/WVhOz/ALiP14scR4RIIfgymPP+u4yoVFyJRZRgNXbAUL83fypVgRO/8MED dbSP9u/V6eFX/Hgjet+gdwWTsjdEo8acvqFDhgqNb1+3macxbT2UqHm0ognGTVKgR3ji b1p5ScJtqq3hCyJWVjyfnl4D/LceUb0ApBREvhvbaGZb+5LWDvVt3VnZbjRjqHmtAc6Q qwJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=udBAvOMF3811JfYnSoT7LY+mJh84zG4u72FA8SZ9FR4=; b=AhFMEMzO+so2ItRBqS0N1pJcafxsOq23BsiihevxFADEUynU5KPB4mUrmeWiHmGOQx JgN/YrfvS2U9/Am1mG2U01RONH14w9EgKhSvLT1Og7S+VcWof4cgHtI89v41VyBG6cOc G1wPbC3i8SBURnG3ubSHy06kdJIYs0jRRMDRGxtLApLZplCoOFBR/0f2mJupaBoEPxa1 fEGxGlJOmT+CrFcHMHuN9xteKwUlDRBltWRslCZ8cvjsO17NRrA34+lmRKLoY1oCNwEf ioZTwPCGAK/8u/TN/YxDuhIGAU24UTMOf+O5CXZMx7i2+FCJZjPZLIy3z90hT6FpBZRs WHgw== X-Gm-Message-State: AO0yUKXO7BDJQEnBh3UClnNoC8myNs+GF0+dvPN31zDrGf2PMp/NUkV4 Ni3tJ0NDuJFycf0V6oUbOhztK48Us2n6PA== X-Google-Smtp-Source: AK7set8Zq5qLxwsm8eqV1R5IX9i4Gxd//12L/Vowaguej6tjOQpjg4wElp4KSFf0R3ZExOJsSuF20g== X-Received: by 2002:a17:907:6d15:b0:877:6549:bb6 with SMTP id sa21-20020a1709076d1500b0087765490bb6mr3397994ejc.58.1675264198532; Wed, 01 Feb 2023 07:09:58 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id fe15-20020a1709072a4f00b008845c668408sm6627147ejc.169.2023.02.01.07.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:09:58 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov Subject: [PATCH 12/13] doc: Update whatisRCU.rst Date: Wed, 1 Feb 2023 16:09:53 +0100 Message-Id: <20230201150954.409693-3-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150954.409693-1-urezki@gmail.com> References: <20230201150954.409693-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org The kfree_rcu() macro is deprecated. Rename it to the kfree_rcu_mightsleep() in this documentation. Signed-off-by: Uladzislau Rezki (Sony) --- Documentation/RCU/whatisRCU.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/RCU/whatisRCU.rst b/Documentation/RCU/whatisRCU.rst index 2c5563a91998..8eddef28d3a1 100644 --- a/Documentation/RCU/whatisRCU.rst +++ b/Documentation/RCU/whatisRCU.rst @@ -597,10 +597,10 @@ to avoid having to write your own callback:: If the occasional sleep is permitted, the single-argument form may be used, omitting the rcu_head structure from struct foo. - kfree_rcu(old_fp); + kfree_rcu_mightsleep(old_fp); -This variant of kfree_rcu() almost never blocks, but might do so by -invoking synchronize_rcu() in response to memory-allocation failure. +This variant almost never blocks, but might do so by invoking +synchronize_rcu() in response to memory-allocation failure. Again, see checklist.rst for additional rules governing the use of RCU. From patchwork Wed Feb 1 15:09:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 13124564 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 3FD1DC636CD for ; Wed, 1 Feb 2023 15:11:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbjBAPLR (ORCPT ); Wed, 1 Feb 2023 10:11:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232065AbjBAPK2 (ORCPT ); Wed, 1 Feb 2023 10:10:28 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F20E56A5D; Wed, 1 Feb 2023 07:10:00 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id ml19so28755693ejb.0; Wed, 01 Feb 2023 07:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vhev8pughE32czPvaqr1hnewEVhkAHaQpP6Xqs+9d/I=; b=I0Yz0URD7aG/WEZFb91AhJOqAM9Svs5gUZnPvEyipLUwAuuxMoV4egTWKgmrqQUlFE NPD9W7xEbBqgw657uIcFOrDyaypDLshT+crSYGoL6atspA5SmDLQSmiT3C/jKFJ2BebT 0PStnMFMhVhO1+tFAPEEoCXo2+Mplg2XmKX51qw0Gaw5HzVWWw5odGpbv+ncXV5VHLPp us03GnHlSiwyn8iNPeICxim/iofFxgAMpGkL0B5SJlTJ8RVFeuaVC9z7+gF58qH5kul9 JUaRglao/0qg/re9KkFJgoVDlQKOBYzo7J/yQbkYG2KYGTWiV7PCGMvnH4G6kgIBjMUM fr3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vhev8pughE32czPvaqr1hnewEVhkAHaQpP6Xqs+9d/I=; b=GkBPPpzauyIrZlQJUdKnIoa1FOiMN+JhjX2QJNrLMQGI6Ymth98ANHIN0K8O0v3Zek g00BGBKUjQu6W5izd+9P7CloKUHBUVsceL4Lo5EFT1lJrUNmliSNbrqR5EQgoYfawLV1 2v7ZHq5R4AXFlf1f3NsG5rFAPLhj7oJkgUrkGXT/5tKNzhLQe6GjUassUhxmk6FlBUqr fK+Y3lnYrBOIfk4ah58aWlpX/0x6jpvkPxwztmoePW861QcslDGUTh6XeRdwAjGw6W1W 8uj4ul++ILcyOiCCF8O+FYOzKtBlfLeRR7a0YSgSFBQjneMgh8Ue9ieY3OsbGGPOS686 GLCw== X-Gm-Message-State: AO0yUKXflUObqNHnDBC4R+tFBPQsBzsDFq3jnwPnsNd93UfRpSx3CwGi VlQZWNX7FiiX18yx+aPs9h/exDoceb560A== X-Google-Smtp-Source: AK7set/kFtylWE7vcTfTSRoSkGtwuJ3gyIQC6o7CLS7udUW6PY1nLq0EZtHONJhqFmq9CFcxcjetoA== X-Received: by 2002:a17:906:a1c6:b0:878:816f:8691 with SMTP id bx6-20020a170906a1c600b00878816f8691mr2420872ejb.71.1675264199463; Wed, 01 Feb 2023 07:09:59 -0800 (PST) Received: from pc638.lan ([155.137.26.201]) by smtp.gmail.com with ESMTPSA id fe15-20020a1709072a4f00b008845c668408sm6627147ejc.169.2023.02.01.07.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:09:59 -0800 (PST) From: "Uladzislau Rezki (Sony)" To: LKML , RCU , "Paul E . McKenney" Cc: Uladzislau Rezki , Oleksiy Avramchenko , Jens Axboe , Philipp Reisner , Bryan Tan , Steven Rostedt , Eric Dumazet , Bob Pearson , Ariel Levkovich , Theodore Ts'o , Julian Anastasov Subject: [PATCH 13/13] rcu/kvfree: Eliminate k[v]free_rcu() single argument macro Date: Wed, 1 Feb 2023 16:09:54 +0100 Message-Id: <20230201150954.409693-4-urezki@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230201150954.409693-1-urezki@gmail.com> References: <20230201150954.409693-1-urezki@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org For a single argument invocations a new kfree_rcu_mightsleep() and kvfree_rcu_mightsleep() macroses are used. This is done in order to prevent users from calling a single argument from atomic contexts as "_mightsleep" prefix signals that it can schedule(). Signed-off-by: Uladzislau Rezki (Sony) --- include/linux/rcupdate.h | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 094321c17e48..7571dbfecb18 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -957,9 +957,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) /** * kfree_rcu() - kfree an object after a grace period. - * @ptr: pointer to kfree for both single- and double-argument invocations. - * @rhf: the name of the struct rcu_head within the type of @ptr, - * but only for double-argument invocations. + * @ptr: pointer to kfree for double-argument invocations. + * @rhf: the name of the struct rcu_head within the type of @ptr. * * Many rcu callbacks functions just call kfree() on the base structure. * These functions are trivial, but their size adds up, and furthermore @@ -982,26 +981,18 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) * The BUILD_BUG_ON check must not involve any function calls, hence the * checks are done in macros here. */ -#define kfree_rcu(ptr, rhf...) kvfree_rcu(ptr, ## rhf) +#define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf) +#define kvfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf) /** - * kvfree_rcu() - kvfree an object after a grace period. - * - * This macro consists of one or two arguments and it is - * based on whether an object is head-less or not. If it - * has a head then a semantic stays the same as it used - * to be before: - * - * kvfree_rcu(ptr, rhf); - * - * where @ptr is a pointer to kvfree(), @rhf is the name - * of the rcu_head structure within the type of @ptr. + * kfree_rcu_mightsleep() - kfree an object after a grace period. + * @ptr: pointer to kfree for single-argument invocations. * * When it comes to head-less variant, only one argument * is passed and that is just a pointer which has to be * freed after a grace period. Therefore the semantic is * - * kvfree_rcu(ptr); + * kfree_rcu_mightsleep(ptr); * * where @ptr is the pointer to be freed by kvfree(). * @@ -1010,13 +1001,9 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) * annotation. Otherwise, please switch and embed the * rcu_head structure within the type of @ptr. */ -#define kvfree_rcu(...) KVFREE_GET_MACRO(__VA_ARGS__, \ - kvfree_rcu_arg_2, kvfree_rcu_arg_1)(__VA_ARGS__) - +#define kfree_rcu_mightsleep(ptr) kvfree_rcu_arg_1(ptr) #define kvfree_rcu_mightsleep(ptr) kvfree_rcu_arg_1(ptr) -#define kfree_rcu_mightsleep(ptr) kvfree_rcu_mightsleep(ptr) -#define KVFREE_GET_MACRO(_1, _2, NAME, ...) NAME #define kvfree_rcu_arg_2(ptr, rhf) \ do { \ typeof (ptr) ___p = (ptr); \