Whamcloud - gitweb
LU-18888 o2ib: prepare_kernel_cred with &init_task 54/58654/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Thu, 3 Apr 2025 04:13:34 +0000 (11:13 +0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Apr 2025 20:45:16 +0000 (20:45 +0000)
commit498c1c10d4ae05f9d46b19331c41d339c0e7dab0
treef60781782bafb36bb1c5f56215d09a5f177d39a7
parentd6759859a7428e5a8e19afdfb7f1f764be06452c
LU-18888 o2ib: prepare_kernel_cred with &init_task

Linux v6.1-rc1-12-g5a17f040fa33
  cred: Do not default to init_cred in prepare_kernel_cred()

This breaks kiblnd_resolve_addr() by interpreting the NULL as
an -ENOMEM instead of an invalid task being used.

The new pattern is to pass &init_task to get init_cred instead
of NULL.

This needs no special handling for older kernels.

HPE-bug-id: LUS-12806
Fixes: 30b356a28b ("LU-14296 lnet: use an unbound cred in kiblnd_resolve_addr()")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I31caa7f5adb23265985fba6db7b28d48975e7e9d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58654
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd_cb.c