Commit cc447613 authored by Ilija Hadzic's avatar Ilija Hadzic Committed by Greg Kroah-Hartman

devpts: plug the memory leak in kill_sb

commit 66da0e1f9034140ae2f571ef96e254a25083906c upstream.

When devpts is unmounted, there may be a no-longer-used IDR tree hanging
off the superblock we are about to kill.  This needs to be cleaned up
before destroying the SB.

The leak is usually not a big deal because unmounting devpts is typically
done when shutting down the whole machine.  However, shutting down an LXC
container instead of a physical machine exposes the problem (the garbage
is detectable with kmemleak).
Signed-off-by: default avatarIlija Hadzic <>
Cc: Sukadev Bhattiprolu <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 88418139
......@@ -498,6 +498,7 @@ static void devpts_kill_sb(struct super_block *sb)
struct pts_fs_info *fsi = DEVPTS_SB(sb);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment