提交 3a0f5292 编写于 作者: A Anjali Singhai Jain 提交者: Jeff Kirsher

i40e: Fix a bug where a client close can be called before an open is complete

The client->open call in this path was not protected with the
client instance mutex, and hence the client->close can get initiated
before the open completes.

Change-Id: I0ed60c38868dd3f44966b6ed49a063d0e5b7edf5
Signed-off-by: NAnjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 eb27163b
......@@ -541,6 +541,7 @@ void i40e_client_subtask(struct i40e_pf *pf)
client->name, pf->hw.pf_id,
pf->hw.bus.device, pf->hw.bus.func);
mutex_lock(&i40e_client_instance_mutex);
/* Send an Open request to the client */
atomic_inc(&cdev->ref_cnt);
if (client->ops && client->ops->open)
......@@ -554,6 +555,7 @@ void i40e_client_subtask(struct i40e_pf *pf)
atomic_dec(&client->ref_cnt);
continue;
}
mutex_unlock(&i40e_client_instance_mutex);
}
mutex_unlock(&i40e_client_mutex);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册