projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e0497c
)
dm mpath: validate hw_handler argument count
author
Mikulas Patocka
<mpatocka@redhat.com>
Mon, 22 Jun 2009 09:12:10 +0000
(10:12 +0100)
committer
Alasdair G Kergon
<agk@redhat.com>
Mon, 22 Jun 2009 09:12:10 +0000
(10:12 +0100)
Fix arg count parsing error in hw handlers.
Cc: stable@kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@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 d880299334e9dbe971d110a33877ac5f6f9f50dd..f25bdebcb4ab01406be763d74632ff82d8f99c95 100644
(file)
--- a/
drivers/md/dm-mpath.c
+++ b/
drivers/md/dm-mpath.c
@@
-705,6
+705,11
@@
static int parse_hw_handler(struct arg_set *as, struct multipath *m)
if (!hw_argc)
return 0;
+ if (hw_argc > as->argc) {
+ ti->error = "not enough arguments for hardware handler";
+ return -EINVAL;
+ }
+
m->hw_handler_name = kstrdup(shift(as), GFP_KERNEL);
request_module("scsi_dh_%s", m->hw_handler_name);
if (scsi_dh_handler_exist(m->hw_handler_name) == 0) {