linux/fs/pstore
Valdis Kletnieks 7d3f1c46b8 pstore: Fix duplicate {console,ftrace}-efi entries
commit d4bf205da6 upstream.

The pstore filesystem still creates duplicate filename/inode pairs for
some pstore types.  Add the id to the filename to prevent that.

Before patch:

[/sys/fs/pstore] ls -li
total 0
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi
1250 -r--r--r--. 1 root root 67 Sep 29 17:09 console-efi

After:

[/sys/fs/pstore] ls -li
total 0
1232 -r--r--r--. 1 root root 148 Sep 29 17:09 console-efi-141202499100000
1231 -r--r--r--. 1 root root  67 Sep 29 17:09 console-efi-141202499200000
1230 -r--r--r--. 1 root root 148 Sep 29 17:44 console-efi-141202705400000
1229 -r--r--r--. 1 root root  67 Sep 29 17:44 console-efi-141202705500000
1228 -r--r--r--. 1 root root  67 Sep 29 20:42 console-efi-141203772600000
1227 -r--r--r--. 1 root root 148 Sep 29 23:42 console-efi-141204854900000
1226 -r--r--r--. 1 root root  67 Sep 29 23:42 console-efi-141204855000000
1225 -r--r--r--. 1 root root 148 Sep 29 23:59 console-efi-141204954200000
1224 -r--r--r--. 1 root root  67 Sep 29 23:59 console-efi-141204954400000

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-14 08:59:50 -08:00
..
Kconfig pstore/Kconfig: Select ZLIB_DEFLATE and ZLIB_INFLATE when PSTORE is selected 2013-08-19 10:18:10 -07:00
Makefile pstore: Add persistent function tracing 2012-07-17 10:05:52 -07:00
ftrace.c pstore: Add hsize argument in write_buf call of pstore_ftrace_call 2013-07-02 18:39:37 +10:00
inode.c pstore: Fix duplicate {console,ftrace}-efi entries 2014-11-14 08:59:50 -08:00
internal.h pstore: Add file extension to pstore file if compressed 2013-08-19 11:53:27 -07:00
platform.c pstore: Don't allow high traffic options on fragile devices 2013-12-20 13:12:01 -08:00
ram.c pstore/ram: (really) fix undefined usage of rounddown_pow_of_two 2013-08-30 15:57:01 -07:00
ram_core.c pstore/ram: avoid atomic accesses for ioremapped regions 2013-06-14 15:54:21 -07:00