rcutorture: Fix rcu_torture_cbflood() memory leak
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 27 Oct 2014 22:52:04 +0000 (15:52 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 4 Nov 2014 03:26:41 +0000 (19:26 -0800)
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>
kernel/rcu/rcutorture.c

index 240fa90..4d559ba 100644 (file)
@@ -812,6 +812,7 @@ rcu_torture_cbflood(void *arg)
                cur_ops->cb_barrier();
                stutter_wait("rcu_torture_cbflood");
        } while (!torture_must_stop());
+       vfree(rhp);
        torture_kthread_stopping("rcu_torture_cbflood");
        return 0;
 }