[Devel] [PATCH RHEL7 COMMIT] ms/mm/vmscan.c: don't forget to free shrinker->nr_deferred
Konstantin Khorenko
khorenko at odin.com
Tue Apr 28 07:31:55 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.el7.ovz.4.8
------>
commit ed7c753cddb57b06a21bdfb3e46fd38cf567bf68
Author: Vladimir Davydov <vdavydov at parallels.com>
Date: Tue Apr 28 18:31:55 2015 +0400
ms/mm/vmscan.c: don't forget to free shrinker->nr_deferred
ms commit: ae39332162a837c3791bb21172d22382a90a6fd1
From: Andrew Vagin <avagin at openvz.org>
This leak was added by commit 1d3d4437eae1 ("vmscan: per-node deferred
work").
unreferenced object 0xffff88006ada3bd0 (size 8):
comm "criu", pid 14781, jiffies 4295238251 (age 105.641s)
hex dump (first 8 bytes):
00 00 00 00 00 00 00 00 ........
backtrace:
[<ffffffff8170caee>] kmemleak_alloc+0x5e/0xc0
[<ffffffff811c0527>] __kmalloc+0x247/0x310
[<ffffffff8117848c>] register_shrinker+0x3c/0xa0
[<ffffffff811e115b>] sget+0x5ab/0x670
[<ffffffff812532f4>] proc_mount+0x54/0x170
[<ffffffff811e1893>] mount_fs+0x43/0x1b0
[<ffffffff81202dd2>] vfs_kern_mount+0x72/0x110
[<ffffffff81202e89>] kern_mount_data+0x19/0x30
[<ffffffff812530a0>] pid_ns_prepare_proc+0x20/0x40
[<ffffffff81083c56>] alloc_pid+0x466/0x4a0
[<ffffffff8105aeda>] copy_process+0xc6a/0x1860
[<ffffffff8105beab>] do_fork+0x8b/0x370
[<ffffffff8105c1a6>] SyS_clone+0x16/0x20
[<ffffffff8171f739>] stub_clone+0x69/0x90
[<ffffffffffffffff>] 0xffffffffffffffff
Signed-off-by: Andrew Vagin <avagin at openvz.org>
Cc: Mel Gorman <mgorman at suse.de>
Cc: Michal Hocko <mhocko at suse.cz>
Cc: Rik van Riel <riel at redhat.com>
Cc: Johannes Weiner <hannes at cmpxchg.org>
Cc: Glauber Costa <glommer at openvz.org>
Cc: Chuck Lever <chuck.lever at oracle.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
Reported-by: Cyrill Gorcunov <gorcunov at odin.com>
---
mm/vmscan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index ce7611c..cd97aed 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -215,6 +215,7 @@ void unregister_shrinker(struct shrinker *shrinker)
down_write(&shrinker_rwsem);
list_del(&shrinker->list);
up_write(&shrinker_rwsem);
+ kfree(shrinker->nr_deferred);
}
EXPORT_SYMBOL(unregister_shrinker);
More information about the Devel
mailing list