From patchwork Wed Feb 14 18:26:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10219655 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 E0D5F601D7 for ; Wed, 14 Feb 2018 18:27:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4A1229039 for ; Wed, 14 Feb 2018 18:27:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6F3729047; Wed, 14 Feb 2018 18:27:21 +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 D0D8D29039 for ; Wed, 14 Feb 2018 18:27:20 +0000 (UTC) Received: (qmail 20461 invoked by uid 550); 14 Feb 2018 18:26:40 -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 20365 invoked from network); 14 Feb 2018 18:26:37 -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=XdrVJEstkc8i6lCDAizMI6tjE hG7bOPkSM1tyQHzv3MfvBl1aY0KCkrYzWh+sz+pbMmsvlywZy0jHfr5JjVNZ3l+m0EFijzg8L7eJC tRqx5IhznjYJ3mSMnpOSu4KZ3CDEkmKBzYrMCQ5yRBciMxiANpuqX3fchzdC0uoKSb17J3dvsdGQ7 EYFaqQXKlPj2OZULKExX9xByztKJhyePTVrjFT04xLoUpxn/ik8tik1SdsZamJ90Ee4Wk5bdqziNE oNlWP509r2p8Ehs6uh3gC1xwy+x/WwYul38lwELej0V3dpomXiQS1eZoqAW98zciG7AELgjjrOTE/ XJzsgT1fA==; 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 Subject: [PATCH 1/2] mm: Add kernel-doc for kvfree Date: Wed, 14 Feb 2018 10:26:17 -0800 Message-Id: <20180214182618.14627-2-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180214182618.14627-1-willy@infradead.org> References: <20180214182618.14627-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))