Find a file
Eric Biggers edbb35cc6b fs/inode.c: make inode_init_always() initialize i_ino to 0
Currently inode_init_always() doesn't initialize i_ino to 0.  This is
unexpected because unlike the other inode fields that aren't initialized
by inode_init_always(), i_ino isn't guaranteed to end up back at its
initial value after the inode is freed.  Only one filesystem (XFS)
actually sets set i_ino back to 0 when freeing its inodes.

So, callers of new_inode() see some random previous i_ino.  Normally
that's fine, since normally i_ino isn't accessed before being set.
There can be edge cases where that isn't necessarily true, though.

The one I've run into is that on ext4, when creating an encrypted file,
the new file's encryption key has to be set up prior to the jbd2
transaction, and thus prior to i_ino being set.  If something goes
wrong, fs/crypto/ may log warning or error messages, which normally
include i_ino.  So it needs to know whether it is valid to include i_ino
yet or not.  Also, on some files i_ino needs to be hashed for use in the
crypto, so fs/crypto/ needs to know whether that can be done yet or not.

There are ways this could be worked around, either in fs/crypto/ or in
fs/ext4/.  But, it seems there's no reason not to just fix
inode_init_always() to do the expected thing and initialize i_ino to 0.

So, do that, and also remove the initialization in jfs_fill_super() that
becomes redundant.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2021-01-04 14:10:32 -05:00
arch RISC-V Fixes for 5.11-rc1 2020-12-24 14:05:05 -08:00
block block: update some copyrights 2020-12-22 08:43:06 -07:00
certs
crypto
Documentation vfs: don't unnecessarily clone write access for writable fds 2021-01-04 14:02:08 -05:00
drivers Big fix for IDT NTB and Intel NTB LTR management support 2020-12-27 09:22:55 -08:00
fs fs/inode.c: make inode_init_always() initialize i_ino to 0 2021-01-04 14:10:32 -05:00
include vfs: don't unnecessarily clone write access for writable fds 2021-01-04 14:02:08 -05:00
init kasan, arm64: only use kasan_depth for software modes 2020-12-22 12:55:07 -08:00
ipc
kernel Misc fixes/updates: 2020-12-27 09:06:10 -08:00
lib kasan: introduce CONFIG_KASAN_HW_TAGS 2020-12-22 12:55:07 -08:00
LICENSES
mm virtio,vdpa: features, cleanups, fixes 2020-12-24 12:06:46 -08:00
net 9p for 5.11-rc1 2020-12-21 10:28:02 -08:00
samples ARM: SoC drivers for v5.11 2020-12-16 16:38:41 -08:00
scripts Merge branch 'for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux 2020-12-25 11:05:32 -08:00
security Provide a fix for the incorrect handling of privilege 2020-12-24 14:08:43 -08:00
sound sound fixes for 5.11-rc1 2020-12-23 15:11:08 -08:00
tools Fix a segfault that occurs when built with Clang. 2020-12-27 09:08:23 -08:00
usr
virt ARM: 2020-12-20 10:44:05 -08:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap RDMA 5.11 pull request 2020-12-16 13:42:26 -08:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Misc fixes/updates: 2020-12-27 09:06:10 -08:00
Makefile Linux 5.11-rc1 2020-12-27 15:30:22 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.