Kaynağa Gözat

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>
Anton Vorontsov 13 yıl önce
ebeveyn
işleme
93cce04968
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      fs/pstore/ram.c

+ 1 - 0
fs/pstore/ram.c

@@ -186,6 +186,7 @@ static int ramoops_pstore_erase(enum pstore_type_id type, u64 id,
 		return -EINVAL;
 		return -EINVAL;
 
 
 	persistent_ram_free_old(cxt->przs[id]);
 	persistent_ram_free_old(cxt->przs[id]);
+	persistent_ram_zap(cxt->przs[id]);
 
 
 	return 0;
 	return 0;
 }
 }