efi-pstore: Fix write/erase id tracking
authorKees Cook <keescook@chromium.org>
Thu, 18 May 2017 20:07:49 +0000 (13:07 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 22 May 2017 23:53:09 +0000 (16:53 -0700)
commitc10e8031d5b34cde06b039ca2e8af87a33d5ba11
treef800c8c790549217d7f16c413c3609de51bb4e25
parent6f61dd3aa35179043f1fcdb0965c5d56278ab724
efi-pstore: Fix write/erase id tracking

Prior to the pstore interface refactoring, the "id" generated during
a backend pstore_write() was only retained by the internal pstore
inode tracking list. Additionally the "part" was ignored, so EFI
would encode this in the id. This corrects the misunderstandings
and correctly sets "id" during pstore_write(), and uses "part"
directly during pstore_erase().

Reported-by: Marta Lofstedt <marta.lofstedt@intel.com>
Fixes: 76cc9580e3fb ("pstore: Replace arguments for write() API")
Fixes: a61072aae693 ("pstore: Replace arguments for erase() API")
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Marta Lofstedt <marta.lofstedt@intel.com>
drivers/firmware/efi/efi-pstore.c