lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] fs/omfs/inode.c: replace count*size kzalloc by kcalloc
From
On Wed, Jun 25, 2014 at 11:17 AM, Fabian Frederick <fabf@skynet.be> 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


\
 
 \ /
  Last update: 2014-06-25 21:01    [W:0.497 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site