projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1312848
)
mtd: memory corruption in block2mtd.c
author
Ingo van Lil
<
[email protected]
>
Mon, 24 Mar 2008 19:29:44 +0000
(12:29 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 25 Mar 2008 02:22:19 +0000
(19:22 -0700)
The block2mtd driver (drivers/mtd/devices/block2mtd.c) will kfree an on-stack
pointer when handling an invalid argument line (e.g.
block2mtd=/dev/loop0,xxx).
The kfree was added some time ago when "name" was dynamically allocated.
Signed-off-by: Ingo van Lil <
[email protected]
>
Acked-by: Joern Engel <
[email protected]
>
Cc: David Woodhouse <
[email protected]
>
Cc: <
[email protected]
>
Cc: Andrew Morton <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/mtd/devices/block2mtd.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/devices/block2mtd.c
b/drivers/mtd/devices/block2mtd.c
index eeaaa9dce6ef62607ee510e580d647554bca8611..ad1880c67518eead88feb416b72a598fb86a9ba6 100644
(file)
--- a/
drivers/mtd/devices/block2mtd.c
+++ b/
drivers/mtd/devices/block2mtd.c
@@
-408,7
+408,6
@@
static int block2mtd_setup2(const char *val)
if (token[1]) {
ret = parse_num(&erase_size, token[1]);
if (ret) {
- kfree(name);
parse_err("illegal erase size");
}
}