> On Apr 25, 2016, at 10:34 AM, William Dauchy <wdauchy@xxxxxxxxx> wrote: > > Hello, > > On Mon, Apr 11, 2016 at 10:20 PM, Chuck Lever <chuck.lever@xxxxxxxxxx> wrote: >> At Connectathon 2016, we found that recent upstream Linux clients >> would occasionally send a LOCK operation with a zero stateid. This >> appeared to happen in close proximity to another thread returning >> a delegation before unlinking the same file while it remained open. >> >> Earlier, the client received a write delegation on this file and >> returned the open stateid. Now, as it is getting ready to unlink the >> file, it returns the write delegation. But there is still an open >> file descriptor on that file, so the client must OPEN the file >> again before it returns the delegation. >> >> Since commit 24311f884189 ('NFSv4: Recovery of recalled read >> delegations is broken'), nfs_open_delegation_recall() clears the >> NFS_DELEGATED_STATE flag _before_ it sends the OPEN. This allows a >> racing LOCK on the same inode to be put on the wire before the OPEN >> operation has returned a valid open stateid. >> >> To eliminate this race, serialize delegation return with the >> acquisition of a file lock on the same file. Adopt the same approach >> as is used in the unlock path. >> >> Fixes: 24311f884189 ('NFSv4: Recovery of recalled read ... ') >> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> > > > Is it something which is going to be merged in v4.7? > It also might be a good candidate for stable? William, only the NFS maintainers can answer these questions. I really don't know. -- Chuck Lever -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html