Whamcloud - gitweb
LU-19003 ptlrpc: prevent freed memory access in ptlrpcd_init() 85/59185/3
authorOleg Drokin <green@whamcloud.com>
Mon, 12 May 2025 07:21:13 +0000 (03:21 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 May 2025 05:19:16 +0000 (05:19 +0000)
commit33442e0cab14fd2a7896dc7ace5ff61f1874da6b
tree61766daed22e95b49145e6f8d9ee785f1848bf44
parent048fdc766144588d500968a8bfd139a7e7e95e3c
LU-19003 ptlrpc: prevent freed memory access in ptlrpcd_init()

When ptlrpcd_cpts is used, an array is allocated with parsed
arguments, and then freed before the last user is done with it.

Move freeing to the end of ptlrpcd_init() to fix this.

Test-Parameters: trivial
Fixes: 2686b25c30 ("LU-6325 ptlrpc: make ptlrpcd threads cpt-aware")
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I84847f00ca7df6a9cc56962a09bfe41c1435223e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59185
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ptlrpc/ptlrpcd.c