On Mon, Oct 03, 2016 at 02:28:40PM +0200, Vegard Nossum wrote: > This lock is literally called "cleanup mutex" and it's not really > documented what data it protects. Is there a better solution here? I agree it is very complex and hard to understand. This is why it needed patching :| The mutex is in fact pretty much locking code. (ensuring that ib_uverbs_cleanup_ucontext only runs on one thread during this race) There are at least three locks involved in this process. I didn't see any obvious way to extend any of the other locks to handle this case. The argument against most simple solutions (eg a rw lock rather than the srcu) has been performance on these paths. Jason -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html