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 X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 624B9C433DF for ; Mon, 17 Aug 2020 17:39:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 227A920716 for ; Mon, 17 Aug 2020 17:39:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="1KYk0y+8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 227A920716 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 905796B0002; Mon, 17 Aug 2020 13:39:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B75E6B0006; Mon, 17 Aug 2020 13:39:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A58E6B0007; Mon, 17 Aug 2020 13:39:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 644D16B0002 for ; Mon, 17 Aug 2020 13:39:33 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 155E0824C741 for ; Mon, 17 Aug 2020 17:39:33 +0000 (UTC) X-FDA: 77160772626.11.sack77_5106e2327018 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id D9341180F8B86 for ; Mon, 17 Aug 2020 17:39:32 +0000 (UTC) X-HE-Tag: sack77_5106e2327018 X-Filterd-Recvd-Size: 3854 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Aug 2020 17:39:32 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id c80so13937833wme.0 for ; Mon, 17 Aug 2020 10:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UGi7nUmnSU2AxJ3eHG2eTFsMqNAfZu9moA2MOVQZI4w=; b=1KYk0y+8JsMaFBq6jYJRs0ApLLfRkYIJlOrYd4R26WriO5pVrCEeVrNH8WV2wmallB NxLm00PrOYQzbSgTZNLhTJq5AMmcb8J1qcd254ez5/Drafrad0Cqh8HBLXbP8i7BuYtu ndJHlIJ/3auHSGqX6LwyUNZz12S2jkRJ5w+gSv/a0htU3zpOx+O/apFbokMrjORoSXEV E9Pthgcf7Dh6TxDpUQO+CyjUdwyMbolritSwpfDV6VUBOkDzDggHwiGT6VYdDdZDpA3H rRaQMDQBSQgbioY1bRFfxDPFHIaaV2EmXQdOxAAswmDsjYhiMACKUioQx/AbE9esX9C0 hIMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UGi7nUmnSU2AxJ3eHG2eTFsMqNAfZu9moA2MOVQZI4w=; b=EIYnqX3jNITWsH2ii+p48q2n/CZMYosPtwuxzBYAa+idOV/VtI0/icVseyFT57txsA So32WXnimrrLaSskbVHVNjQJ+Vs4Lbrq/ctZdF9jDkKZ4wyPW3j7eaZ85hQ0QS1g9353 +lZaKx7nCQUlRy7r3ikn1YAdna3Rv/NFLtx0iWtHKF6dWhIVAm+8I7I41B3FvbEDGkHk CnHtozW868hCQWF5RIvzJz4hBUsVmKcnePaWsfh/WHpgiqnU4c2po1hmYL1rLOsFLaYK vXwPgkNK0veJ77If85tXHkvotyevTA0ROcrFL3T3NoYc8jC3Q/A9QSXtcOfcWFlT1Mvg dARA== X-Gm-Message-State: AOAM530QAcVyCAn+t1QJ2YK87zXbW3mxdyFUNQ8+Nl/l1xif0wsA4ZYy TUdmodR9t+iViIx1KrkJ0PKQEw== X-Google-Smtp-Source: ABdhPJytG3rX7acI30gpSc7TqlK9Uh77srnc9MMySIvka/xac3M3wjSRX0b+Appyv1zZLD8RNNUNgg== X-Received: by 2002:a05:600c:245:: with SMTP id 5mr15339803wmj.22.1597685970965; Mon, 17 Aug 2020 10:39:30 -0700 (PDT) Received: from debian-brgl.home (lfbn-nic-1-68-20.w2-15.abo.wanadoo.fr. [2.15.159.20]) by smtp.gmail.com with ESMTPSA id v20sm9659205wrd.6.2020.08.17.10.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 10:39:30 -0700 (PDT) From: Bartosz Golaszewski To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [RESEND PATCH] mm: util: update the kerneldoc for kstrdup_const() Date: Mon, 17 Aug 2020 19:39:27 +0200 Message-Id: <20200817173927.23389-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: D9341180F8B86 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Bartosz Golaszewski Memory allocated with kstrdup_const() must not be passed to regular krealloc() as it is not aware of the possibility of the chunk residing in .rodata. Since there are no potential users of krealloc_const() at the moment, let's just update the doc to make it explicit. Signed-off-by: Bartosz Golaszewski --- mm/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/util.c b/mm/util.c index 5ef378a2a038..bb902f5a6582 100644 --- a/mm/util.c +++ b/mm/util.c @@ -69,7 +69,8 @@ EXPORT_SYMBOL(kstrdup); * @s: the string to duplicate * @gfp: the GFP mask used in the kmalloc() call when allocating memory * - * Note: Strings allocated by kstrdup_const should be freed by kfree_con= st. + * Note: Strings allocated by kstrdup_const should be freed by kfree_con= st and + * must not be passed to krealloc(). * * Return: source string if it is in .rodata section otherwise * fallback to kstrdup. --=20 2.26.1