LU-14428 libcfs: discard cfs_trace_copyin_string()
Instead of cfs_trace_copyin_string(), use memdup_user_nul().
This combines the allocation with the copyin, and nul-terminates.
The resulting code is a lot simpler.
Lustre-change: https://review.whamcloud.com/41490
Lustre-commit:
67af976c806994cec27414d24b43f6519d72c240
LU-14788 lnet: check memdup_user_nul using IS_ERR
Crash in __proc_lnet_portal_rotor. memdup_user_nul returns an ERR_PTR
on error, not a NULL pointer. IS_ERR and PTR_ERR functions have to be
used to check and return the correct error code. The fix has been
applied in other locations having the wrong check.
Lustre-change: https://review.whamcloud.com/44091
Lustre-commit:
449d046e55a42cc4d1c4ab0217551cded1864bc4
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I089c5da96b59ec62d177aea2f3d170bf751c6fec
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/48835
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>