Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751255AbaFLRpZ (ORCPT ); Thu, 12 Jun 2014 13:45:25 -0400 Received: from mailrelay008.isp.belgacom.be ([195.238.6.174]:1086 "EHLO mailrelay008.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbaFLRpY (ORCPT ); Thu, 12 Jun 2014 13:45:24 -0400 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjoIAAjmmVNbsHy//2dsb2JhbABagw2qdQUBAQEBAQEFAZkegQoXdYQxLyOBGjeIRgG4M5oRF4VciBsNVx2EKwSPaIpKk1KDPjuBMAEf From: Fabian Frederick To: linux-kernel@vger.kernel.org Cc: Fabian Frederick , Jens Axboe , Andrew Morton Subject: [PATCH 1/1] block/partitions/aix.c: replace count*size kzalloc by kcalloc Date: Thu, 12 Jun 2014 19:45:17 +0200 Message-Id: <1402595117-3219-1-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kcalloc manages count*sizeof overflow. Cc: Jens Axboe Cc: Andrew Morton Signed-off-by: Fabian Frederick --- block/partitions/aix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/partitions/aix.c b/block/partitions/aix.c index 43be471..0a6ed54 100644 --- a/block/partitions/aix.c +++ b/block/partitions/aix.c @@ -215,7 +215,7 @@ int aix_partition(struct parsed_partitions *state) numlvs = be16_to_cpu(p->numlvs); put_dev_sector(sect); } - lvip = kzalloc(sizeof(struct lv_info) * state->limit, GFP_KERNEL); + lvip = kcalloc(state->limit, sizeof(struct lv_info), GFP_KERNEL); if (!lvip) return 0; if (numlvs && (d = read_part_sector(state, vgda_sector + 1, §))) { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/