diff options
author | Zqiang <qiang1.zhang@intel.com> | 2022-04-27 15:15:20 +0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-06-21 15:57:04 -0700 |
commit | 98ea20328786372cbbc90c601be168f5fe1f8845 (patch) | |
tree | cf42363631acda6ba773b25221ae16ab25df7c1d /drivers/usb/cdns3/cdns3-ti.c | |
parent | d984114ec23818670c8873939eac81ba6e104ff5 (diff) |
rcutorture: Fix memory leak in rcu_test_debug_objects()
The kernel memory leak detector located the following:
unreferenced object 0xffff95d941135b50 (size 16):
comm "swapper/0", pid 1, jiffies 4294667610 (age 1367.451s)
hex dump (first 16 bytes):
f0 c6 c2 bd d9 95 ff ff 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000bc81d9b1>] kmem_cache_alloc_trace+0x2f6/0x500
[<00000000d28be229>] rcu_torture_init+0x1235/0x1354
[<0000000032c3acd9>] do_one_initcall+0x51/0x210
[<000000003c117727>] kernel_init_freeable+0x205/0x259
[<000000003961f965>] kernel_init+0x1a/0x120
[<000000001998f890>] ret_from_fork+0x22/0x30
This is caused by the rcu_test_debug_objects() function allocating an
rcu_head structure, then failing to free it. This commit therefore adds
the needed kfree() after the last use of this structure.
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ti.c')
0 files changed, 0 insertions, 0 deletions