Whamcloud - gitweb
LU-18826: obdclass: fix panic from shrink_slab 01/58501/17
authorLijing Chen <lijinc@amazon.com>
Fri, 21 Mar 2025 17:46:28 +0000 (17:46 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 May 2025 05:15:59 +0000 (05:15 +0000)
commit5ee6ce1bc7df2d87b828de8293e3e84b668d1687
tree4cb9cf30940b794fe49d7950f13cf40ca8cd41b2
parent386405c961eb1e5c3a26a8af3382bc0daadea174
LU-18826: obdclass: fix panic from shrink_slab

Grant slot when obd_get_mod_rpc_slot called from kthreadd.
This change will prevent kernel panic from null pointer.

When shrink_slab triggered from kthreadd (system under
memory pressure and try to free up memory) it will invoke
ll_delete_node to free up inode cache. If in flight rpcs is
full, it will try to sleep the thread, but this will trigger
null pointer given kthreadd have null set_child_tid field.
We anyway don't want kthreadd get put into sleep.

Signed-off-by: Lijing Chen <lijinc@amazon.com>
Change-Id: Ie7dc1e4956bf508d9e2f1272cdfc377e78971ff8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58501
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre.spec.in
lustre/kunit/Makefile.in
lustre/kunit/autoMakefile.am
lustre/kunit/obd_mod_rpcs_test.c [new file with mode: 0644]
lustre/obdclass/genops.c
lustre/tests/sanity.sh
rpm/kmp-lustre-tests.files