Commit 2875fb65 authored by Ingo van Lil's avatar Ingo van Lil Committed by Linus Torvalds
Browse files

mtd: memory corruption in block2mtd.c

The block2mtd driver (drivers/mtd/devices/block2mtd.c) will kfree an on-stack
pointer when handling an invalid argument line (e.g.

The kfree was added some time ago when "name" was dynamically allocated.
Signed-off-by: default avatarIngo van Lil <>
Acked-by: default avatarJoern Engel <>
Cc: David Woodhouse <>
Cc: <>
Cc: Andrew Morton <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 1312848e
......@@ -408,7 +408,6 @@ static int block2mtd_setup2(const char *val)
if (token[1]) {
ret = parse_num(&erase_size, token[1]);
if (ret) {
parse_err("illegal erase size");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment