[ofa-general] [PATCH 1/2] IB/core: handle race between elements in qork queues after event
Roland Dreier
rdreier at cisco.com
Sun May 18 14:42:23 PDT 2008
I asked you to resend with the race fixed. However I guess I never
spelled out what race I meant ... I thought I pointed this out, but
looking at the archives I don't see it.
So think about this:
What happens if someone calls ib_sa_path_rec_get() and
@@ -663,6 +674,8 @@ int ib_sa_path_rec_get(struct ib_sa_client *client,
return -ENODEV;
port = &sa_dev->port[port_num - sa_dev->start_port];
+ if (!port->sm_ah)
+ return -EAGAIN;
right about here (*after* the test), ib_sa_event() does "port->sm_ah = NULL;"
on another CPU.
agent = port->agent;
query = kmalloc(sizeof *query, gfp_mask);
More information about the general
mailing list