diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-03-10 12:55:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-10 15:55:11 -0700 |
commit | d58ab5cf09679d8cb4824e22cae900c0eab5ab31 (patch) | |
tree | 090e82a516fe8db760a1b7514ed072bb458c1e2f /kernel/user.c | |
parent | 9c1e8a4ebcc04226cb6f3a1bf1d72f4cafd6b089 (diff) | |
download | lwn-d58ab5cf09679d8cb4824e22cae900c0eab5ab31.tar.gz lwn-d58ab5cf09679d8cb4824e22cae900c0eab5ab31.zip |
mtd: physmap: fix NULL pointer dereference in error path
commit e480814f138cd5d78a8efe397756ba6b6518fdb6 ("[MTD] [MAPS] physmap:
fix wrong free and del_mtd_{partition,device}") introduces a NULL pointer
dereference in physmap_flash_remove when called from the error path in
physmap_flash_probe (if map_probe failed).
Call del_mtd_{partition,device} only if info->cmtd was not NULL.
Reported-by: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/user.c')
0 files changed, 0 insertions, 0 deletions