Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758133AbaFYS1X (ORCPT ); Wed, 25 Jun 2014 14:27:23 -0400 Received: from mail-vc0-f172.google.com ([209.85.220.172]:49478 "EHLO mail-vc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757657AbaFYS1W (ORCPT ); Wed, 25 Jun 2014 14:27:22 -0400 MIME-Version: 1.0 In-Reply-To: <1403720237-19131-1-git-send-email-fabf@skynet.be> References: <1403720237-19131-1-git-send-email-fabf@skynet.be> Date: Wed, 25 Jun 2014 11:27:21 -0700 X-Google-Sender-Auth: 7dI8Z2r4a29CWFLmL8TZqAKWvmM Message-ID: Subject: Re: [PATCH 1/1] fs/omfs/inode.c: replace count*size kzalloc by kcalloc From: Linus Torvalds To: Fabian Frederick Cc: Linux Kernel Mailing List , Bob Copeland , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 25, 2014 at 11:17 AM, Fabian Frederick wrote: > kcalloc manages count*sizeof overflow. As far as I can tell, any overflow has happened long before, in bitmap_size = DIV_ROUND_UP(sbi->s_num_blocks, 8); where 'sbi->s_num_blocks' i san u64, and 'bitmap_size' is an 'int'. I don't think the patch is necessarily a bad thing, but I think it might be more important to sanity-check that part instead. Linus -- 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/