Miklos Szeredi <[email protected]> wrote: > > How about this patch? It tries to solve this race without additional > locking. If refcount is already zero, it will increment and decrement > it. So be careful to only call grab_namespace() with vfsmount_lock > held, otherwise it could race with itself. (vfsmount_lock is also > needed in this case so that mnt->mnt_namespace, doesn't change, while > grabbing the namespace) How about using cmpxchg? David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] fix race in mark_mounts_for_expiry()
- From: David Howells <[email protected]>
- Re: [PATCH] fix race in mark_mounts_for_expiry()
- From: Miklos Szeredi <[email protected]>
- Re: [PATCH] fix race in mark_mounts_for_expiry()
- References:
- [PATCH] fix race in mark_mounts_for_expiry()
- From: Miklos Szeredi <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Ram <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Miklos Szeredi <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Miklos Szeredi <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Ram <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Jamie Lokier <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Ram <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Miklos Szeredi <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Jamie Lokier <[email protected]>
- Re: [PATCH] namespace.c: fix bind mount from foreign namespace
- From: Miklos Szeredi <[email protected]>
- [PATCH] fix race in mark_mounts_for_expiry()
- Prev by Date: Re: 2.6 jiffies
- Next by Date: Detecting link up
- Previous by thread: Re: 2.6 jiffies
- Next by thread: Re: [PATCH] fix race in mark_mounts_for_expiry()
- Index(es):