android_kernel_motorola_sm6375/fs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Artem Labazov 5030b0ac32 exfat: Avoid allocating upcase table using kcalloc()
commit 9eb78c25327548b905598975aa3ded4ef244b94a upstream.

The table for Unicode upcase conversion requires an order-5 allocation,
which may fail on a highly-fragmented system:

 pool-udisksd: page allocation failure: order:5,
 mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),
 cpuset=/,mems_allowed=0
 CPU: 4 PID: 3756880 Comm: pool-udisksd Tainted: G U
 5.8.10-200.fc32.x86_64 #1
 Hardware name: Dell Inc. XPS 13 9360/0PVG6D, BIOS 2.13.0 11/14/2019
 Call Trace:
  dump_stack+0x6b/0x88
  warn_alloc.cold+0x75/0xd9
  ? _cond_resched+0x16/0x40
  ? __alloc_pages_direct_compact+0x144/0x150
  __alloc_pages_slowpath.constprop.0+0xcfa/0xd30
  ? __schedule+0x28a/0x840
  ? __wait_on_bit_lock+0x92/0xa0
  __alloc_pages_nodemask+0x2df/0x320
  kmalloc_order+0x1b/0x80
  kmalloc_order_trace+0x1d/0xa0
  exfat_create_upcase_table+0x115/0x390 [exfat]
  exfat_fill_super+0x3ef/0x7f0 [exfat]
  ? sget_fc+0x1d0/0x240
  ? exfat_init_fs_context+0x120/0x120 [exfat]
  get_tree_bdev+0x15c/0x250
  vfs_get_tree+0x25/0xb0
  do_mount+0x7c3/0xaf0
  ? copy_mount_options+0xab/0x180
  __x64_sys_mount+0x8e/0xd0
  do_syscall_64+0x4d/0x90
  entry_SYSCALL_64_after_hwframe+0x44/0xa9

Make the driver use kvcalloc() to eliminate the issue.

Fixes: 370e812b3ec1 ("exfat: add nls operations")
Cc: [email protected] #v5.7+
Signed-off-by: Artem Labazov <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Git-commit: 5f5240c03aa39b18034ec2b6ecada486ab0d4077
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: lixiang <[email protected]>
2021-02-22 11:23:23 +08:00
..
9p This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
adfs
affs
afs This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
autofs
befs
bfs
btrfs This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
cachefiles cachefiles: Fix race between read_waiter and read_copier involving op->to_do 2020-06-03 08:21:11 +02:00
ceph This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
cifs Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
coda
configfs configfs: fix config_item refcnt leak in configfs_rmdir() 2020-05-27 17:46:30 +02:00
cramfs
crypto UPSTREAM: fscrypt: restrict IV_INO_LBLK_* to AES-256-XTS 2020-11-14 16:29:45 +01:00
debugfs
devpts
dlm dlm: Fix kobject memleak 2020-08-19 08:16:21 +02:00
ecryptfs
efivarfs
efs
erofs This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
exfat exfat: Avoid allocating upcase table using kcalloc() 2021-02-22 11:23:23 +08:00
exportfs
ext2 Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
ext4 ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI 2020-10-30 10:02:25 +01:00
f2fs f2fs: call f2fs_get_meta_page_retry for nat page 2020-12-16 18:19:00 +05:30
fat fat: don't allow to mount if the FAT length == 0 2020-06-17 16:40:36 +02:00
freevxfs
fscache
fuse ANDROID: fuse: Add support for d_canonical_path 2020-10-30 10:02:26 +01:00
gfs2 This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs
incfs ANDROID: Incremental fs: fix magic compatibility again 2020-08-26 14:05:41 +00:00
iomap
isofs
jbd2 jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock() 2020-08-26 10:40:52 +02:00
jffs2 This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
jfs
kernfs This is the 5.4.59 stable release 2020-08-19 08:40:57 +02:00
lockd
minix Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
nfs Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
nfs_common
nfsd nfsd: Fix NFSv4 READ on RDMA when using readv 2020-08-11 15:33:42 +02:00
nilfs2 nilfs2: fix null pointer dereference at nilfs_segctor_do_construct() 2020-06-17 16:40:29 +02:00
nls
notify ANDROID: vfs: add d_canonical_path for stacked filesystem support 2020-10-30 10:02:25 +01:00
ntfs
ocfs2 Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
omfs
openpromfs
orangefs Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
overlayfs This is the 5.4.53 stable release 2020-07-23 12:36:54 +02:00
proc Merge "sched/walt: Improve the scheduler" 2020-12-05 23:42:40 -08:00
pstore pstore: Add buffer start check during init 2020-12-10 15:38:51 +08:00
qnx4
qnx6
quota
ramfs
reiserfs
romfs romfs: fix uninitialized memory leak in romfs_dev_read() 2020-08-26 10:40:51 +02:00
squashfs
sysfs
sysv
tracefs
ubifs ANDROID: fscrypt: prevent fscrypt_operations from affecting KMI 2020-10-30 10:02:25 +01:00
udf
ufs Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
unicode
verity fs-verity: remove unnecessary extern keywords 2020-06-16 14:06:46 -07:00
xfs This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
aio.c aio: fix async fsync creds 2020-06-17 16:40:24 +02:00
anon_inodes.c
attr.c Revert "ANDROID: vfs: Add setattr2 for filesystems with per mount permissions" 2020-05-29 14:48:38 +02:00
bad_inode.c
binfmt_aout.c
binfmt_elf.c fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info() 2020-06-03 08:21:27 +02:00
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c block: Fix use-after-free in blkdev_get() 2020-06-24 17:50:47 +02:00
buffer.c Merge android-5.4-stable.45 (a9a13ee) into msm-5.4 2020-07-09 17:51:24 -07:00
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c Revert "ANDROID: vfs: Add setattr2 for filesystems with per mount permissions" 2020-05-29 14:48:38 +02:00
d_path.c fs: fix NULL dereference due to data race in prepend_path() 2020-12-15 11:43:16 +05:30
dax.c
dcache.c
dcookies.c
direct-io.c ANDROID: fscrypt: handle direct I/O with IV_INO_LBLK_32 2020-05-21 11:52:18 -07:00
drop_caches.c
eventfd.c
eventpoll.c This is the 5.4.61 stable release 2020-08-26 11:11:38 +02:00
exec.c Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions" 2020-05-29 14:48:37 +02:00
fcntl.c
fhandle.c
file.c fix multiplication overflow in copy_fdtable() 2020-05-27 17:46:12 +02:00
file_table.c
filesystems.c
fs-writeback.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-24 11:13:19 -07:00
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c Revert "ANDROID: sdcardfs: Enable modular sdcardfs" 2020-05-29 15:08:00 +02:00
fs_types.c
fsopen.c
inode.c Revert "ANDROID: vfs: Add setattr2 for filesystems with per mount permissions" 2020-05-29 14:48:38 +02:00
internal.h Revert "ANDROID: fs: Restore vfs_path_lookup() export" 2020-05-29 14:48:37 +02:00
io_uring.c io_uring: Fix NULL pointer dereference in loop_rw_iter() 2020-08-19 08:16:29 +02:00
ioctl.c
Kconfig exfat: add Kconfig and Makefile 2020-11-10 14:30:28 +08:00
Kconfig.binfmt
libfs.c Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-5.4.y' into android-5.4-stable 2020-06-15 13:22:44 -07:00
locks.c
Makefile exfat: add Kconfig and Makefile 2020-11-10 14:30:28 +08:00
mbcache.c
mount.h
mpage.c
namei.c ANDROID: GKI: set vfs-only exports into their own namespace 2020-07-07 18:07:10 +02:00
namespace.c
no-block.c
nsfs.c
open.c ANDROID: GKI: set vfs-only exports into their own namespace 2020-07-07 18:07:10 +02:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c ANDROID: GKI: set vfs-only exports into their own namespace 2020-07-07 18:07:10 +02:00
readdir.c
select.c
seq_file.c
signalfd.c fs/signalfd.c: fix inconsistent return codes for signalfd4 2020-08-26 10:40:58 +02:00
splice.c
stack.c
stat.c ANDROID: GKI: set vfs-only exports into their own namespace 2020-07-07 18:07:10 +02:00
statfs.c
super.c
sync.c
timerfd.c
userfaultfd.c mm: protect VMA modifications using VMA sequence count 2020-06-09 10:55:00 +05:30
utimes.c Revert "ANDROID: vfs: Add setattr2 for filesystems with per mount permissions" 2020-05-29 14:48:38 +02:00
xattr.c This is the 5.4.58 stable release 2020-08-11 18:37:58 +02:00