From patchwork Fri Mar 10 01:31:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Fernandes X-Patchwork-Id: 67184 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp629517wrd; Thu, 9 Mar 2023 17:43:51 -0800 (PST) X-Google-Smtp-Source: AK7set8BVZiLVq4b4TAISFw+0X+MOFdnCeA5PgcBi61bNIRUjzZp4RJGVb3361eN9dKmFJ7ndrF8 X-Received: by 2002:a17:903:247:b0:19e:6ffd:a310 with SMTP id j7-20020a170903024700b0019e6ffda310mr29775747plh.48.1678412630872; Thu, 09 Mar 2023 17:43:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678412630; cv=none; d=google.com; s=arc-20160816; b=h8azh2jDDpdAjXoMtfpw+Zvx+sc8pMG5apuwW/Zo7mX46N8C7h0n/88v50pdHd7HvN jhU9rSEDeaAjSV+aE/fyVO60i3aR/oMASFPKYiCFxkd0qUm7Y9ZoYFUbjP2BcyHKExL5 1pK6OIqLMIyWI/8xxJA6Tchm5uXk9rVleR9Rt1xEMgkCmYlQ3vGdunW7x6oCaqyO7bSd 2Dk/nZIPpGgkPXx1rWC/SbXmtRuziuS8Hq2JDb8Km8grYg5zxcPeNfYOWqzeOJ50U+Fj ahk/q7y5o+384nI7ZUrTmNA3JvsWYSsx5ndfaw55wo20OARv9OB44ZyQWQu9q4WEv+8V X2/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=p9ofmXvi+yoEOTwnWtynDgK6IduRelA0tIhKQl7CdJ0=; b=MXquJ8sepJEhx6mWEgcCA6IdWPc2YVM1LdMNEGJ2UoZ8pENI+lCadElEmAc2dCNTI+ JNI0BjU/+FbKigHcJerB7ehH28qqlodQw1x1mOKpuEGL0XZKsemcpOCa+SoVx85H5AjC w6P8hF7MjWCJBcRXzm1u3tsahHHdwJj/x4f9fIvtmNmEFPJatdPucZf7BfdHbYvTjwH3 DayoCSg/qGknqoBQ4iXr59L8qvzKiTMmHsQJbNJHde0VSrPv6C0s/by7hTLqSC5063cJ ujqTs4Zyqzuj3reDUv5JF2PXJetnOw8NrXCqDkCLZsxyoArPRfxcaMsWj59qEUu9P1Lw KVQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=CJxs5Lm5; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w6-20020a170902e88600b0019e2bd0fea8si910480plg.143.2023.03.09.17.43.35; Thu, 09 Mar 2023 17:43:50 -0800 (PST) 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=CJxs5Lm5; 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 S229552AbjCJBbz (ORCPT + 99 others); Thu, 9 Mar 2023 20:31:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229623AbjCJBbx (ORCPT ); Thu, 9 Mar 2023 20:31:53 -0500 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBD3E10285D for ; Thu, 9 Mar 2023 17:31:51 -0800 (PST) Received: by mail-qt1-x830.google.com with SMTP id h19so4242181qtk.7 for ; Thu, 09 Mar 2023 17:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1678411910; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p9ofmXvi+yoEOTwnWtynDgK6IduRelA0tIhKQl7CdJ0=; b=CJxs5Lm5QHQiquo4AjG5aaAVH5OhqI/2GaIz7xKhQCv5L93fTHuoAlZV9Gbitb2cfX CBMq+NiVL3zFSA3n2CND0pLPRYIoGwn3fq+ggxyeqaj5wyFyfZjExYDDIEQwgS/vQEEC 0zhNVdHBKJDJB13tv1+mV7aosZqxR50uKMbNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678411910; 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=p9ofmXvi+yoEOTwnWtynDgK6IduRelA0tIhKQl7CdJ0=; b=ofS0rp45E3+LADiW2e6enrYUCSe9x/qh39Vg7N287rqJeFZRXWHFv7mGTVnARE5tm7 b60g0LNrJN6rlVQEOnPoHV6MPBKW6tUhIQPvO33kVz/fO9QREruTCbv87xVccW4OM9lW LvdBhhlz+pIhklNhMZyvgMzOVil66X0diKpp3tCLlRXwl1C3hATaoFT9mXUPJ5/vEjkj jQalOa6rM20LoNppkL6cvTLNe9xwQoK9LZqPA/eZlRElZ3c5bk5B4DdJUG3x1ms2bsNe vuHaFyjaQo386uE0TSJvlrzthD4kgvvkYh0hZBhY8N2pYhRvPsFGuRgWScMCo+RZeBzA ilHA== X-Gm-Message-State: AO0yUKXwln4Qw6BwtuCZHzfjA9URkCh8s+7mulkNRPkBP2VDXEbNW2rS 1lDvhidz+E3rOGP2YFVmeevM+ajGDMNm34FT1rg= X-Received: by 2002:ac8:594f:0:b0:3b8:68ef:d538 with SMTP id 15-20020ac8594f000000b003b868efd538mr4968923qtz.52.1678411910365; Thu, 09 Mar 2023 17:31:50 -0800 (PST) Received: from joelboxx.c.googlers.com.com (129.239.188.35.bc.googleusercontent.com. [35.188.239.129]) by smtp.gmail.com with ESMTPSA id o21-20020a374115000000b0071a02d712b0sm356522qka.99.2023.03.09.17.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 17:31:49 -0800 (PST) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , Alexander Aring , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-wpan@vger.kernel.org, Miquel Raynal , netdev@vger.kernel.org, Paolo Abeni , Stefan Schmidt , boqun.feng@gmail.com, paulmck@kernel.org, urezki@gmail.com Subject: [PATCH] mac802154: Rename kfree_rcu() to kvfree_rcu_mightsleep() Date: Fri, 10 Mar 2023 01:31:44 +0000 Message-Id: <20230310013144.970964-1-joel@joelfernandes.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759943202948226962?= X-GMAIL-MSGID: =?utf-8?q?1759943202948226962?= The k[v]free_rcu() macro's single-argument form is deprecated. Therefore switch to the new k[v]free_rcu_mightsleep() variant. 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. The callers are holding a mutex so the context allows blocking. Hence using the API with a single argument will be fine, but use its new name. There is no functionality change with this patch. Fixes: 57588c71177f ("mac802154: Handle passive scanning") Signed-off-by: Joel Fernandes (Google) Acked-by: Stefan Schmidt --- Please Ack the patch but we can carry it through the RCU tree as well if needed, as it is not a bug per-se and we are not dropping the old API before the next release. net/mac802154/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac802154/scan.c b/net/mac802154/scan.c index 9b0933a185eb..5c191bedd72c 100644 --- a/net/mac802154/scan.c +++ b/net/mac802154/scan.c @@ -52,7 +52,7 @@ static int mac802154_scan_cleanup_locked(struct ieee802154_local *local, request = rcu_replace_pointer(local->scan_req, NULL, 1); if (!request) return 0; - kfree_rcu(request); + kvfree_rcu_mightsleep(request); /* Advertize first, while we know the devices cannot be removed */ if (aborted) @@ -403,7 +403,7 @@ int mac802154_stop_beacons_locked(struct ieee802154_local *local, request = rcu_replace_pointer(local->beacon_req, NULL, 1); if (!request) return 0; - kfree_rcu(request); + kvfree_rcu_mightsleep(request); nl802154_beaconing_done(wpan_dev);