summaryrefslogtreecommitdiffstats
path: root/fs/pstore
diff options
context:
space:
mode:
authorAnton Vorontsov2012-05-26 15:07:52 +0200
committerGreg Kroah-Hartman2012-06-14 01:52:40 +0200
commit93cce049682a1aebd49766f29af363e5b8770aed (patch)
treee038a733f555688446397020b6ee44cbc0d9b4d5 /fs/pstore
parentpstore/ram_core: Factor persistent_ram_zap() out of post_init() (diff)
downloadkernel-qcow2-linux-93cce049682a1aebd49766f29af363e5b8770aed.tar.gz
kernel-qcow2-linux-93cce049682a1aebd49766f29af363e5b8770aed.tar.xz
kernel-qcow2-linux-93cce049682a1aebd49766f29af363e5b8770aed.zip
pstore/ram: Should zap persistent zone on unlink
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>
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/ram.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 16ff7332eae0..453030f9c5bc 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -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;
}