[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f939c3d239443a68e0aff7148b1c245ffc18643d.camel@perches.com>
Date: Thu, 27 Aug 2020 08:49:41 -0700
From: Joe Perches <joe@...ches.com>
To: Denis Efremov <efremov@...ux.com>, Jan Kara <jack@...e.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap()
On Thu, 2020-08-27 at 18:28 +0300, Denis Efremov wrote:
> > @@ -1013,10 +1013,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
> > size = sizeof(struct udf_bitmap) +
> > (sizeof(struct buffer_head *) * nr_groups);
>
> I missed that this size is a good place to use struct_size for
> overflow checking. I will send v2 instead.
And you could cuddle the
if (!bitmap)
return NULL;
by removing the blank line between the alloc and test.
Powered by blists - more mailing lists