> You'd have to ensure that none of the threads involved are able to grab > new posix locks in the period between the unsharing of current->files to > the moment when current->files->owner is swapped. > > If not, one thread could in theory open a new file and grab a lock that > can never be unlocked because its lockowner gets stolen away from it by > another execing thread. This race is already there. Header comment on steal_locks() documents it. The patch does open this race window much wider, because pending locks are also transfered to the task doing the exec. The original steal_locks() only stole already held locks. But I don't think this fundamentaly changes things. It just shows more clearly how ugly the current semantics are. Miklos - 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/
- References:
- DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Matthew Wilcox <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Matthew Wilcox <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Matthew Wilcox <[email protected]>
- Re: DoS with POSIX file locks?
- From: Trond Myklebust <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Trond Myklebust <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Chris Wright <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Trond Myklebust <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Trond Myklebust <[email protected]>
- Re: DoS with POSIX file locks?
- From: Miklos Szeredi <[email protected]>
- Re: DoS with POSIX file locks?
- From: Trond Myklebust <[email protected]>
- DoS with POSIX file locks?
- Prev by Date: Re: [2.6.16 PATCH] Connector: Filesystem Events Connector
- Next by Date: Re: [interbench numbers] Re: interactive task starvation
- Previous by thread: Re: DoS with POSIX file locks?
- Next by thread: gettimeofday order of magnitude slower with pmtimer, which is default
- Index(es):