From patchwork Wed Feb 14 20:11:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10219891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8BFF5601C2 for ; Wed, 14 Feb 2018 20:12:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AD9D28A06 for ; Wed, 14 Feb 2018 20:12:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F58128A51; Wed, 14 Feb 2018 20:12:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 8D18128A06 for ; Wed, 14 Feb 2018 20:12:36 +0000 (UTC) Received: (qmail 15895 invoked by uid 550); 14 Feb 2018 20:12:11 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 15815 invoked from network); 14 Feb 2018 20:12:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GtO3WxoQVSWOI6IQefcpR9c8Itq0yVaxKFx0QZlzn6g=; b=ZlUsWub4YhoAyQkvGBcLpzk2k LrCw/+wIv8kj1WgQOMHrjo3D3gp2xm4JemikwhIDgMpKBoAChnH5FQ4tlajfdbHY68Xen+HtxNg4T soBH93NabQ8X7de0AS18gvFTiygxLMy9f2zo+4bP4wPeCuSQ22Xm7LkxfOoAnKrzdFO/kUgTcNcP5 KmXbwDT+b0Z1WwVOKQh5ko4HkQLSEIEaShdI6Fc5mbbP5dZY2jPJvdnGvV0XwDmFTNotn3pMmg/DP 9RZ+rSQTKPdSseuZoQAFDEbBliDDZH125lpj4Wze0j91DMlMhU98D5J0HrCCX4u9lLOxxBEIiOAvx wz0nOIs0g==; From: Matthew Wilcox To: Andrew Morton Cc: Matthew Wilcox , linux-mm@kvack.org, Kees Cook , linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, Joe Perches Subject: [PATCH v2 1/8] mm: Add kernel-doc for kvfree Date: Wed, 14 Feb 2018 12:11:47 -0800 Message-Id: <20180214201154.10186-2-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180214201154.10186-1-willy@infradead.org> References: <20180214201154.10186-1-willy@infradead.org> X-Virus-Scanned: ClamAV using ClamSMTP From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mm/util.c b/mm/util.c index c1250501364f..dc4c7b551aaf 100644 --- a/mm/util.c +++ b/mm/util.c @@ -430,6 +430,16 @@ void *kvmalloc_node(size_t size, gfp_t flags, int node) } EXPORT_SYMBOL(kvmalloc_node); +/** + * kvfree() - Free memory. + * @addr: Pointer to allocated memory. + * + * kvfree frees memory allocated by any of vmalloc(), kmalloc() or + * kvmalloc(). It is slightly more efficient to use kfree() or vfree() + * if you are certain that you know which one to use. + * + * Context: Any context except NMI. + */ void kvfree(const void *addr) { if (is_vmalloc_addr(addr))