On Mon, 2016-08-08 at 14:59 -0400, Chuck Lever wrote: > This series passes light testing in my lab. If it looks good I will > pass it along to Alexey to confirm it closes the race. > > To aid distributors and stable kernel maintainers, wondering if a > Fixes: tag should be added. Alexey first observed this issue in v4.1 > kernels (UEK4). But looks like the race could have been introduced > as early as v3.17. Maybe this one? > > commit fc5a96c3b70d00c863f69ff4ea7f5dfddbcbc0d8 > Author: Jeff Layton <jlayton@xxxxxxxxxxxxxxx> > Date: Tue Jul 29 21:34:40 2014 -0400 > > nfsd: close potential race in nfsd4_free_stateid > > There have been a lot of changes since then. It's hard to say if the > race can be attributed to a single commit. > > > Changes since v2: > - Move NFS4_LOCK_STID arm into a helper, for clarity > - Add more detail to patch description > - Add Jeff's patch to fix similar race in nfsd4_lock > > Changes since v1: > - Use s->sc_count to preserve stateid while cl_lock is dropped > Probably this is a regression from when we removed the big client_mutex from knfsd. That's what serialized all of this stuff before. So, maybe this one actually? commit e7d5dc19ce9800b86dd9e41ff36cc418e9da1fce Author: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Date: Wed Jul 30 08:27:26 2014 -0400 nfsd: Remove nfs4_lock_state(): nfsd4_test_stateid/nfsd4_free_stateid Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx> ...but yeah, around that era. > --- > > Chuck Lever (1): > nfsd: Fix race between FREE_STATEID and LOCK > > Jeff Layton (1): > nfsd: don't return an unhashed lock stateid after taking mutex > > > fs/nfsd/nfs4state.c | 65 ++++++++++++++++++++++++++++++++++++++--- > ---------- > 1 file changed, 48 insertions(+), 17 deletions(-) > > -- > 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 -- Jeff Layton <jlayton@xxxxxxxxxxxxxxx> -- 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