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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 B9D85C43457 for ; Fri, 16 Oct 2020 02:44:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3F54220878 for ; Fri, 16 Oct 2020 02:44:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZUJ1KcXP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F54220878 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D7E6B94001D; Thu, 15 Oct 2020 22:44:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D55CC940007; Thu, 15 Oct 2020 22:44:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6BCF94001D; Thu, 15 Oct 2020 22:44:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 98035940007 for ; Thu, 15 Oct 2020 22:44:30 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 35AD81EE6 for ; Fri, 16 Oct 2020 02:44:30 +0000 (UTC) X-FDA: 77376245100.07.cough40_1a09d2827219 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 1D2701803F9A2 for ; Fri, 16 Oct 2020 02:44:30 +0000 (UTC) X-HE-Tag: cough40_1a09d2827219 X-Filterd-Recvd-Size: 2594 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 16 Oct 2020 02:44:29 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B51ED20897; Fri, 16 Oct 2020 02:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602816269; bh=aWBwJROzFUL+s4OwAT8RQ+dsCodAePYLkZ/UcaiNnZI=; h=Date:From:To:Subject:In-Reply-To:From; b=ZUJ1KcXP0ypEtk2s1Do4gGQbjYs8HJJxKpzgh72FxNXXn9DY/tJoFyLALqsfMYkoW g8/fSd9F+Qj/xc2N7Q0Nhn1Ri5t7vj/NUi/VGIL1Q40eWSnxmkUgOaDnbIgjh3dChN jR9v3EXYANYQH5vI1k+zkwx7jxBtTa3jKOur7M4A= Date: Thu, 15 Oct 2020 19:44:28 -0700 From: Andrew Morton To: akpm@linux-foundation.org, bgolaszewski@baylibre.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 057/156] mm/util.c: update the kerneldoc for kstrdup_const() Message-ID: <20201016024428._drthOkQa%akpm@linux-foundation.org> In-Reply-To: <20201015192732.f448da14e9854c7cb7299956@linux-foundation.org> User-Agent: s-nail v14.8.16 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 Subject: mm/util.c: update the kerneldoc for kstrdup_const() 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. Link: http://lkml.kernel.org/r/20200817173927.23389-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton --- mm/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/util.c~mm-util-update-the-kerneldoc-for-kstrdup_const +++ a/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_const. + * Note: Strings allocated by kstrdup_const should be freed by kfree_const and + * must not be passed to krealloc(). * * Return: source string if it is in .rodata section otherwise * fallback to kstrdup. _