Whamcloud - gitweb
LU-15059 nrs: do not overwrite "cmd" in nrs_tbf_rule 42/45142/4
authorEtienne AUJAMES <etienne.aujames@cea.fr>
Wed, 6 Oct 2021 20:11:17 +0000 (22:11 +0200)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Nov 2021 03:47:51 +0000 (03:47 +0000)
commitebef4989e39ef8cae29edcf26fa2ee16b6106ad6
treedefbd572a69d7246f51144dae92cbe092d3a3fb5
parentf60b307c5001e1d9035af61d2344af33d3ea0f85
LU-15059 nrs: do not overwrite "cmd" in nrs_tbf_rule

"cmd" pointer inside ptlrpc_lprocfs_nrs_tbf_rule_seq_write() and
nrs_tbf_parse_cmd are static. This could cause a double kfree call
because "cmd" could be overwriten by another "nrs_tbf_rule" write
instance.

Let's try to remove the "static" definition.

Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I8cd7d9dd0483778c82bbf8711c07e49255983f4b
Reviewed-on: https://review.whamcloud.com/45142
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
lustre/ptlrpc/nrs_tbf.c
lustre/tests/sanityn.sh