Merge tag 'fs.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Feb 2023 20:03:55 +0000 (12:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Feb 2023 20:03:55 +0000 (12:03 -0800)
commitea5aac6fae94bff4756051b0503f86e31ef6808b
tree7ceab90282b60a359e27808bcad8c1bebdb34ecc
parent05e6295f7b5e05f09e369a3eb2882ec5b40fff20
parent47d586913f2abec4d240bae33417f537fda987ec
Merge tag 'fs.v6.3' of git://git./linux/kernel/git/vfs/idmapping

Pull vfs hardening update from Christian Brauner:
 "Jan pointed out that during shutdown both filp_close() and super block
  destruction will use basic printk logging when bugs are detected. This
  causes issues in a few scenarios:

   - Tools like syzkaller cannot figure out that the logged message
     indicates a bug.

   - Users that explicitly opt in to have the kernel bug on data
     corruption by selecting CONFIG_BUG_ON_DATA_CORRUPTION should see
     the kernel crash when they did actually select that option.

   - When there are busy inodes after the superblock is shut down later
     access to such a busy inodes walks through freed memory. It would
     be better to cleanly crash instead.

  All of this can be addressed by using the already existing
  CHECK_DATA_CORRUPTION() macro in these places when kernel bugs are
  detected. Its logging improvement is useful for all users.

  Otherwise this only has a meaningful behavioral effect when users do
  select CONFIG_BUG_ON_DATA_CORRUPTION which means this is backward
  compatible for regular users"

* tag 'fs.v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping:
  fs: Use CHECK_DATA_CORRUPTION() when kernel bugs are detected
fs/open.c