Whamcloud - gitweb
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>