From: Joe Perches <joe@perches.com>
To: Denis Efremov <efremov@linux.com>, Jan Kara <jack@suse.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap()
Date: Thu, 27 Aug 2020 08:49:41 -0700 [thread overview]
Message-ID: <f939c3d239443a68e0aff7148b1c245ffc18643d.camel@perches.com> (raw)
In-Reply-To: <741486db-29e8-e24e-32c1-9559e3a76a06@linux.com>
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.
next prev parent reply other threads:[~2020-08-27 15:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 15:19 Denis Efremov
2020-08-27 15:28 ` Denis Efremov
2020-08-27 15:49 ` Joe Perches [this message]
2020-08-27 21:25 ` [PATCH v2] " Denis Efremov
2020-08-27 22:09 ` Gustavo A. R. Silva
2020-08-27 22:07 ` Denis Efremov
2020-08-27 22:16 ` [PATCH v3] " Denis Efremov
2020-08-27 22:29 ` Gustavo A. R. Silva
2020-08-28 10:29 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f939c3d239443a68e0aff7148b1c245ffc18643d.camel@perches.com \
--to=joe@perches.com \
--cc=efremov@linux.com \
--cc=jack@suse.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®