lkml.org 
[lkml]   [2005]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH retry 2] namespace.c: fix race in mark_mounts_for_expiry()
On Fri, May 20, 2005 at 01:00:01PM +0200, Miklos Szeredi wrote:
> I'll get there, I know!
>
> This patch fixes a race found by Ram in mark_mounts_for_expiry() in
> fs/namespace.c.
>
> The bug can only be triggered with simultaneous exiting of a process
> having a private namespace, and expiry of a mount from within that
> namespace. It's practically impossible to trigger, and I haven't even
> tried. But still, a bug is a bug.
>
> The race happens when put_namespace() is called by another task, while
> mark_mounts_for_expiry() is between atomic_read() and get_namespace().
> In that case get_namespace() will be called on an already dead
> namespace with unforeseeable results.

ACK, provided that situation with extern vfsmount_lock is sorted out.
There's no need to declare it in namespace.h; it's already done in
mount.h and namespace.h includes the sucker.

IOW, lose that extern in namespace.h and you've got an ACK.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-20 14:13    [W:0.064 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site