On Wed, Feb 17, 2016 at 11:09:00PM +0000, Al Viro wrote: > However, that doesn't prevent all unpleasantness here - giving up just as > it's being copied to userland and going into restart. Ho-hum... How about > the following: > * move increment of op->attempts into the same place where we > set "given up" > * in addition to the check for "given up" in the request-picking loop > (as above), fetch op->attempts before dropping op->lock > * after having retaken op->lock (after copy_to_user()) recheck > op->attempts instead of checking for "given up". Crap... There's a similar problem on the other end - in orangefs_devreq_write_iter() between the time when op has been fetched from the hash and the time we finish copying reply from userland. Same kind of "what it clear_... gets all way through and we resubmit it before we get around to checking the given_up flag" problem... Let me think a bit... -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html