Re: [PATCH] pstore: fix warning in pstore_kill_sb()

From: Kees Cook
Date: Tue Feb 23 2021 - 12:31:28 EST


On Sun, 14 Feb 2021 12:13:07 +0900, Tetsuo Handa wrote:
> syzbot is hitting WARN_ON(pstore_sb != sb) at pstore_kill_sb() [1], for the
> assumption that pstore_sb != NULL is wrong because pstore_fill_super() will
> not assign pstore_sb = sb when new_inode() for d_make_root() returned NULL
> (due to memory allocation fault injection).
>
> Since mount_single() calls pstore_kill_sb() when pstore_fill_super()
> failed, pstore_kill_sb() needs to be aware of such failure path.
>
> [...]

Applied to for-next/pstore, thanks!

[1/1] pstore: Fix warning in pstore_kill_sb()
https://git.kernel.org/kees/c/9c7d83ae6ba6

--
Kees Cook