diff mbox

[05/16] pstore/ram: Should zap persistent zone on unlink

Message ID 1337696279-8994-5-git-send-email-anton.vorontsov@linaro.org
State Superseded
Headers show

Commit Message

Anton Vorontsov May 22, 2012, 2:17 p.m. UTC
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>
---
 fs/pstore/ram.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Kees Cook May 22, 2012, 3:27 p.m. UTC | #1
On Tue, May 22, 2012 at 7:17 AM, Anton Vorontsov
<anton.vorontsov@linaro.org> wrote:
> 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>
diff mbox

Patch

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 16ff733..453030f 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;
 }