mm/hmm: unregister mmu_notifier when last HMM client quit
authorJérôme Glisse <jglisse@redhat.com>
Tue, 10 Apr 2018 23:28:23 +0000 (16:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Apr 2018 17:28:30 +0000 (10:28 -0700)
commitc01cbba2aa8b4d05607d373b02fe9e4eda5c0591
treeb582ce8d27f21d4766ff5891d7d149404a8cc7ce
parente1401513c6b5efec59678a4d4e9f90957684b7e3
mm/hmm: unregister mmu_notifier when last HMM client quit

This code was lost in translation at one point.  This properly call
mmu_notifier_unregister_no_release() once last user is gone.  This fix the
zombie mm_struct as without this patch we do not drop the refcount we have
on it.

Link: http://lkml.kernel.org/r/20180323005527.758-5-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: Evgeny Baskakov <ebaskakov@nvidia.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Mark Hairgrove <mhairgrove@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hmm.c