Kernel Tree For Xiaomi 11 Lite NE 5G
803d714374
There is a potential deadlock reported by syzbot as below: ====================================================== WARNING: possible circular locking dependency detected 6.4.0-next-20230707-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor330/5073 is trying to acquire lock: ffff8880218527a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock_killable include/linux/mmap_lock.h:151 [inline] ffff8880218527a0 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5293 [inline] ffff8880218527a0 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x369/0x510 mm/memory.c:5344 but task is already holding lock: ffff888019f760e0 (&sbi->s_lock){+.+.}-{3:3}, at: exfat_iterate+0x117/0xb50 fs/exfat/dir.c:232 which lock already depends on the new lock. Chain exists of: &mm->mmap_lock --> mapping.invalidate_lock#3 --> &sbi->s_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->s_lock); lock(mapping.invalidate_lock#3); lock(&sbi->s_lock); rlock(&mm->mmap_lock); Let's try to avoid above potential deadlock condition by moving dir_emit*() out of sbi->s_lock coverage. Fixes: ca06197382bd ("exfat: add directory operations") Cc: stable@vger.kernel.org #v5.7+ Reported-by: syzbot+1741a5d9b79989c10bdc@syzkaller.appspotmail.com Link: https://lore.kernel.org/lkml/00000000000078ee7e060066270b@google.com/T/#u Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> |
||
---|---|---|
.github/workflows | ||
balloc.c | ||
cache.c | ||
dir.c | ||
exfat_fs.h | ||
exfat_raw.h | ||
fatent.c | ||
file.c | ||
inode.c | ||
Kconfig | ||
Makefile | ||
misc.c | ||
namei.c | ||
nls.c | ||
README.md | ||
super.c |
exFAT filesystem
This is the exfat filesystem for support from the linux 4.1 kernel to the latest kernel.
Installing as a stand-alone module
Install prerequisite package for Fedora, RHEL:
yum install kernel-devel-$(uname -r)
Build step:
make
sudo make install
To load the driver manually, run this as root:
modprobe exfat
Installing as a part of the kernel
- Let's take [linux] as the path to your kernel source dir.
cd [linux]
cp -ar exfat [linux]/fs/
- edit [linux]/fs/Kconfig
source "fs/fat/Kconfig"
+source "fs/exfat/Kconfig"
source "fs/ntfs/Kconfig"
- edit [linux]/fs/Makefile
obj-$(CONFIG_FAT_FS) += fat/
+obj-$(CONFIG_EXFAT_FS) += exfat/
obj-$(CONFIG_BFS_FS) += bfs/
- make menuconfig and set exfat
File systems --->
DOS/FAT/NT Filesystems --->
<M> exFAT filesystem support
(utf8) Default iocharset for exFAT
build your kernel