Whamcloud - gitweb
LU-18186 libcfs: avoid kmalloc order > MAX_PAGE_ORDER 15/56215/13
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sat, 15 Feb 2025 11:17:46 +0000 (18:17 +0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Feb 2025 23:41:33 +0000 (23:41 +0000)
commit7ccf62a6edd8c50ee344a59be25c28d4faf29619
treec5ec898eeab2abcedca6cb2fb57a6367642df3ca
parent75116202aa1977d0f94f05e2406cecfd24356124
LU-18186 libcfs: avoid kmalloc order > MAX_PAGE_ORDER

    WARNING: CPU: 4 PID: 448333 at mm/page_alloc.c:4663
    __alloc_pages_noprof+0x3a7/0x4e0

libcfs calls memdup_user_nul() which uses kmalloc() which can
trigger the above warning.

Limit these excessive allocations a reasonable minimum.

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ide49aa3870cadc43c520f29b0a942c8f9798d053
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56215
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/module.c
libcfs/libcfs/tracefile.c
lnet/lnet/lnet_debugfs.c