projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bff7e06
)
dm mpath: add m->hw_handler_name NULL pointer check in parse_hw_handler()
author
tang.junhui
<tang.junhui@zte.com.cn>
Fri, 28 Oct 2016 09:04:46 +0000
(17:04 +0800)
committer
Mike Snitzer
<snitzer@redhat.com>
Mon, 21 Nov 2016 14:52:07 +0000
(09:52 -0500)
Avoids false positive of no hardware handler being specified (which is
implied by a NULL m->hw_handler_name).
Signed-off-by: tang.junhui <tang.junhui@zte.com.cn>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-mpath.c
b/drivers/md/dm-mpath.c
index e477af8596e276c6665ec97042041b9397188f22..d234b6c33646f6d9e9387fb64ca85d803bade53f 100644
(file)
--- a/
drivers/md/dm-mpath.c
+++ b/
drivers/md/dm-mpath.c
@@
-1002,6
+1002,8
@@
static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m)
}
m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL);
+ if (!m->hw_handler_name)
+ return -EINVAL;
if (hw_argc > 1) {
char *p;