Browse Source

rcutorture: Fix rcu_torture_cbflood() memory leak

Commit 38706bc5a29a (rcutorture: Add callback-flood test) vmalloc()ed
a bunch of RCU callbacks, but failed to free them.  This commit fixes
that oversight.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Pranith Kumar <bobby.prani@gmail.com>
Paul E. McKenney 10 years ago
parent
commit
b8969d1a50
1 changed files with 1 additions and 0 deletions
  1. 1 0
      kernel/rcu/rcutorture.c

+ 1 - 0
kernel/rcu/rcutorture.c

@@ -812,6 +812,7 @@ rcu_torture_cbflood(void *arg)
 		cur_ops->cb_barrier();
 		cur_ops->cb_barrier();
 		stutter_wait("rcu_torture_cbflood");
 		stutter_wait("rcu_torture_cbflood");
 	} while (!torture_must_stop());
 	} while (!torture_must_stop());
+	vfree(rhp);
 	torture_kthread_stopping("rcu_torture_cbflood");
 	torture_kthread_stopping("rcu_torture_cbflood");
 	return 0;
 	return 0;
 }
 }