From patchwork Wed Feb 14 20:11:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 10219897 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 E8E63601C2 for ; Wed, 14 Feb 2018 20:12:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 776D0288F1 for ; Wed, 14 Feb 2018 20:12:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BEB528A47; Wed, 14 Feb 2018 20:12:50 +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 61F2F289E0 for ; Wed, 14 Feb 2018 20:12:49 +0000 (UTC) Received: (qmail 16327 invoked by uid 550); 14 Feb 2018 20:12:17 -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 16205 invoked from network); 14 Feb 2018 20:12:13 -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=BaAze7teYSI65z39a63N2W2mofnTWFTM3LnOeS1JLDw=; b=YPL3Xa1OjrmmEH/u0PPbQHpbV JTpFkrIuR+vaO11Hy0sFI/t95eIBtwV3ZQKSreZ/Vzy4/bwtgJQjUSGHaEHbUOMcNIir18sDGomlU 5lytu38eaVZ4AzEKTAmwz/Hwd0jysFS4ZUQULqEJ0Wq6QFn2+3js6AkEE6FO73NvQKCueInjzJijq T9VYNGZbCP3EB/rxsWH9lAiYF4TjnpqLHWp5BhTBoanGEMIivUZ9DE5bG5n+YYtbo+KCa/3Wg7TPA WPLsDQMlwW/QPezzT3B7KwN4yB+33EZUaBRFC49GHEN3HqqyV6LLUNCcw+L3V9EbgM0kWs2SOd75P EDbUMxxdA==; 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 4/8] Convert dax device to kvzalloc_struct Date: Wed, 14 Feb 2018 12:11:50 -0800 Message-Id: <20180214201154.10186-5-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 --- drivers/dax/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dax/device.c b/drivers/dax/device.c index 2137dbc29877..5821cde340f6 100644 --- a/drivers/dax/device.c +++ b/drivers/dax/device.c @@ -586,7 +586,7 @@ struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, if (!count) return ERR_PTR(-EINVAL); - dev_dax = kzalloc(sizeof(*dev_dax) + sizeof(*res) * count, GFP_KERNEL); + dev_dax = kvzalloc_struct(dev_dax, res, count, GFP_KERNEL); if (!dev_dax) return ERR_PTR(-ENOMEM);