Miklos Szeredi 202322e6f7 [PATCH] namespace.c: fix mnt_namespace clearing
This patch clears mnt_namespace on unmount.

Not clearing mnt_namespace has two effects:

   1) It is possible to attach a new mount to a detached mount,
      because check_mnt() returns true.

      This means, that when no other references to the detached mount
      remain, it still can't be freed.  This causes a resource leak,
      and possibly un-removable modules.

   2) If mnt_namespace is dereferenced (only in mark_mounts_for_expiry())
      after the namspace has been freed, it can cause an Oops, memory
      corruption, etc.

1) has been tested before and after the patch, 2) is only speculation.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:23:51 -07:00
..
2005-06-24 00:06:41 -07:00
2005-06-30 22:29:48 -07:00
2005-06-30 08:45:12 -07:00
2005-07-07 18:23:44 -07:00
2005-06-25 16:25:04 -07:00
2005-06-26 08:43:19 -07:00
2005-06-28 21:20:31 -07:00
2005-06-28 21:20:31 -07:00
2005-06-24 00:06:40 -07:00
2005-06-30 08:45:11 -07:00
2005-07-07 18:23:46 -07:00
2005-06-24 00:05:19 -07:00
2005-06-23 09:45:26 -07:00
2005-07-07 18:23:45 -07:00
2005-06-24 00:06:41 -07:00