From: Kent Overstreet <kmo-PEzghdH756F8UrSeD/g0lQ@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Gabriel de Perthuis
<g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Neil Brown <neilb-l3A5Bk7waGM@public.gmane.org>,
linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch -next] bcache: check for allocation failures
Date: Wed, 10 Jul 2013 18:48:34 -0700 [thread overview]
Message-ID: <20130711014834.GE13527@kmo-pixel> (raw)
In-Reply-To: <20130705060307.GB14443-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
On Fri, Jul 05, 2013 at 09:05:46AM +0300, Dan Carpenter wrote:
> There is a missing NULL check after the kzalloc().
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>
> diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
> index 48f0353..4fe6ab2 100644
> --- a/drivers/md/bcache/sysfs.c
> +++ b/drivers/md/bcache/sysfs.c
> @@ -232,6 +232,8 @@ STORE(__cached_dev)
> bch_uuid_write(dc->disk.c);
> }
> env = kzalloc(sizeof(struct kobj_uevent_env), GFP_KERNEL);
> + if (!env)
> + return -ENOMEM;
> add_uevent_var(env, "DRIVER=bcache");
> add_uevent_var(env, "CACHED_UUID=%pU", dc->sb.uuid),
> add_uevent_var(env, "CACHED_LABEL=%s", buf);
Thanks - applied
prev parent reply other threads:[~2013-07-11 1:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 6:05 [patch -next] bcache: check for allocation failures Dan Carpenter
[not found] ` <20130705060307.GB14443-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2013-07-11 1:48 ` Kent Overstreet [this message]
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=20130711014834.GE13527@kmo-pixel \
--to=kmo-pezghdh756f8ursed/g0lq@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=g2p.code-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=neilb-l3A5Bk7waGM@public.gmane.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;
as well as URLs for NNTP newsgroup(s).