From patchwork Mon Jun 23 16:44:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 4403951 Return-Path: X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 525C69F36A for ; Mon, 23 Jun 2014 16:46:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A5BFF201DC for ; Mon, 23 Jun 2014 16:46:22 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4CD72018A for ; Mon, 23 Jun 2014 16:46:18 +0000 (UTC) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s5NGjx6F010387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jun 2014 16:46:00 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s5NGjr5U014115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Jun 2014 16:45:54 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1Wz7NR-0008QU-N1; Mon, 23 Jun 2014 09:45:53 -0700 Received: from ucsinet22.oracle.com ([156.151.31.94]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1Wz7N1-0008Pz-87 for ocfs2-devel@oss.oracle.com; Mon, 23 Jun 2014 09:45:27 -0700 Received: from userp1030.oracle.com (userp1030.oracle.com [156.151.31.80]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s5NGjP9I000266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 23 Jun 2014 16:45:25 GMT Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by userp1030.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s5NGjNM5021306 for ; Mon, 23 Jun 2014 16:45:24 GMT X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApkHAKJYqFNbskjJ/2dsb2JhbABZgw2rZgUBAQEBAQEFAZk1gQ8XdYQxLyOBGjeIRgHEKxeFY4g1ZB2ELQSaTIs1iC6DRDuBMQ Received: from 201.72-178-91.adsl-dyn.isp.belgacom.be (HELO linux-zvq9.site) ([91.178.72.201]) by relay.skynet.be with ESMTP; 23 Jun 2014 18:45:22 +0200 From: Fabian Frederick To: linux-kernel@vger.kernel.org Date: Mon, 23 Jun 2014 18:44:06 +0200 Message-Id: <1403541846-11025-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.8.4.5 X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=195.238.6.173 ct-class=R3 ct-vol1=0 ct-vol2=8 ct-vol3=7 ct-risk=10 ct-spam1=0 ct-spam2=1 ct-bulk=3 rcpts=1 size=782 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=GLIxTI9K c=1 sm=1 tr=0 a=o+YsO/eELYC506LXOd6jzw==:117 a=bbrbPd0JqwrhUYM3kHS8eQ==:17 a=SeZqa6TThZEA:10 a=iox4zFpeAAAA:8 a=IXr_WNlcAAAA:8 a=yPCof4ZbAAAA:8 a=szl-ffnpEgpK4Et9HxcA:9 a=n9GBPR9yFnkA:10 a=T5ZRoNnfl4MA:10 X-Sendmail-CT-RefID: str=0001.0A090202.53A859A4.01D8, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-Sendmail-CT-Classification: not spam Cc: Fabian Frederick , Mark Fasheh , ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 1/1] fs/ocfs2/slot_map.c: replace count*size kzalloc by kcalloc X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kcalloc manages count*sizeof overflow. Cc: Mark Fasheh Cc: Joel Becker Cc: ocfs2-devel@oss.oracle.com Signed-off-by: Fabian Frederick --- fs/ocfs2/slot_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c index 1424c15..a88b2a4 100644 --- a/fs/ocfs2/slot_map.c +++ b/fs/ocfs2/slot_map.c @@ -382,7 +382,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb, trace_ocfs2_map_slot_buffers(bytes, si->si_blocks); - si->si_bh = kzalloc(sizeof(struct buffer_head *) * si->si_blocks, + si->si_bh = kcalloc(si->si_blocks, sizeof(struct buffer_head *), GFP_KERNEL); if (!si->si_bh) { status = -ENOMEM;