[ofa-general] lock dependency in ib_user_mad

Sean Hefty sean.hefty at intel.com
Thu Dec 20 12:25:30 PST 2007


I see hangs killing opensm related to a bug in user_mad.c.  The problem appears
to be:

ib_umad_close()
	downgrade_write(&file->port->mutex)
	ib_unregister_mad_agent(...)
	up_read(&file->port->mutex)

ib_unregister_mad_agent() flushes any outstanding MADs, resulting in calls to
send_handler() and recv_handler(), both of which call queue_packet():

queue_packet()
	down_read(&file->port->mutex)
	...
	up_read(&file->port->mutex)

ib_umad_kill_port() has a similar issue as ib_umad_close().

Does anyone know the reasoning for holding the mutex around
ib_unregister_mad_agent()?

- Sean




More information about the general mailing list