[ofa-general] Re: Race condition in userspace libraries with create/destroy qp

Roland Dreier rdreier at cisco.com
Fri Nov 21 10:44:01 PST 2008


 > I prefer to keep the rule that low-level driver libraries are responsible.
 > Its not clear that all low-level drivers necessarily have this issue.

Yes, makes sense to me.

 > BTW, I notice that there is a ctx->qp_table_mutex (used only in file
 > libmlx4/src/qp.c). What if I steal that and move its use upwards into
 > procedures mlx4_create_qp/mlx4_destroy_qp? (a bit cheesy, but it saves
 > creating yet another mutex in the mlx4 user context).

Actually I don't think it's cheesy at all -- expanding the region where
qp_table_mutex is held to avoid this bug makes perfect sense to me and
seems like a clean solution.

 - R.



More information about the general mailing list