Whamcloud - gitweb
LU-18535 ptlrpc: do not use kstrndup() 85/57385/7
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 12 Dec 2024 05:46:32 +0000 (08:46 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 28 Feb 2025 08:10:53 +0000 (08:10 +0000)
commit56764066f2568406e2a5606dcd3cbbc2759a9579
tree51800150528f769f2ed301764e222d49aae6e3c9
parent089c3a75fde95ff643f2e0b40a4e14da0debd05a
LU-18535 ptlrpc: do not use kstrndup()

instead use OBD_ALLOC() + memcpy() so subsequent OBD_FREE() does
correct math to detect memory leaks.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib6ab1ec865f3d1c9e92328b4ccddef9c1861dee4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57385
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lustre/include/obd_support.h
lustre/ptlrpc/nrs_tbf.c