[00/10] pstore: Remove filesystem records when backend is unregistered
mbox series

Message ID 20200506152114.50375-1-keescook@chromium.org
Headers show
Series
  • pstore: Remove filesystem records when backend is unregistered
Related show

Message

Kees Cook May 6, 2020, 3:21 p.m. UTC
Hi,

This fixes a long-standing problem[1] with pstore where the filesystem
view of backend records was not updated when the backend was unloaded
(in a modular build) through pstore_unregister(). This series is
mostly refactoring and improvements to the various locking semantics
around management of the active backend and the filesystem mount before
ultimately providing the routine to walk the filesystem to remove the
records associated with a given backend.

I'm still doing more build and runtime testing, but I just wanted to get
this posted so I can let other people look at it if they want while the
testing finishes.

Thanks!

-Kees

[1] https://lore.kernel.org/lkml/87o8yrmv69.fsf@suse.com

Kees Cook (10):
  pstore: Drop useless try_module_get() for backend
  pstore: Rename "pstore_lock" to "psinfo_lock"
  pstore: Convert "psinfo" locking to mutex
  pstore: Rename "allpstore" to "records_list"
  pstore: Convert "records_list" locking to mutex
  pstore: Add proper unregister lock checking
  pstore: Refactor pstorefs record list removal
  pstore: Add locking around superblock changes
  pstore: Do not leave timer disabled for next backend
  pstore: Remove filesystem records when backend is unregistered

 fs/pstore/inode.c    | 127 +++++++++++++++++++++++++++++++------------
 fs/pstore/internal.h |   2 +-
 fs/pstore/platform.c |  72 ++++++++++++++----------
 3 files changed, 134 insertions(+), 67 deletions(-)