Skip to content

Commit fb7855a

Browse files
kaushlenpaulmckrcu
authored andcommitted
refperf: Remove redundant kfree() after torture_stop_kthread()
Remove unnecessary kfree(main_task) call in ref_scale_cleanup() as torture_stop_kthread() already handles the memory cleanup for the task structure internally. The additional kfree(main_task) call after torture_stop_kthread() is redundant and confusing since torture_stop_kthread() sets the pointer to NULL, making this a no-op. This pattern is consistent with other torture test modules where torture_stop_kthread() is called without explicit kfree() of the task pointer, as the torture framework manages the task lifecycle internally. Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 9a0352d commit fb7855a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

kernel/rcu/refscale.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,6 @@ ref_scale_cleanup(void)
11351135
kfree(reader_tasks);
11361136

11371137
torture_stop_kthread("main_task", main_task);
1138-
kfree(main_task);
11391138

11401139
// Do scale-type-specific cleanup operations.
11411140
if (cur_ops->cleanup != NULL)

0 commit comments

Comments
 (0)