Skip to content

Commit

Permalink
pstore/ram: Should zap persistent zone on unlink
Browse files Browse the repository at this point in the history
Otherwise, unlinked file will reappear on the next boot.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Anton Vorontsov authored and Greg Kroah-Hartman committed Jun 13, 2012
1 parent fce3979 commit 93cce04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/pstore/ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ static int ramoops_pstore_erase(enum pstore_type_id type, u64 id,
return -EINVAL;

persistent_ram_free_old(cxt->przs[id]);
persistent_ram_zap(cxt->przs[id]);

return 0;
}
Expand Down

0 comments on commit 93cce04

Please sign in to comment.