projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6aa8f1a
)
bcache: check for allocation failures
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 5 Jul 2013 06:05:46 +0000
(09:05 +0300)
committer
Kent Overstreet
<kmo@daterainc.com>
Fri, 12 Jul 2013 07:22:46 +0000
(
00:22
-0700)
There is a missing NULL check after the kzalloc().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
drivers/md/bcache/sysfs.c
patch
|
blob
|
history
diff --git
a/drivers/md/bcache/sysfs.c
b/drivers/md/bcache/sysfs.c
index dd3f00a42729533853608ebe8db8b7dd3962b8f8..12a2c2846f994a1e2d51bf79374426df96893418 100644
(file)
--- 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);