diff options
| author | Avinash Dayanand <avinash.dayanand@intel.com> | 2016-08-17 19:04:06 -0400 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-08-20 00:40:34 -0400 |
| commit | 0d8ab54a4119880bb9cb4680da1f5e9068d0d333 (patch) | |
| tree | edec8f0786134783eb836592e763d88706e2813a /drivers/net/ethernet/intel/i40e | |
| parent | 35f5034f8e4bb4bce0c95a2aea2c719afbf8201f (diff) | |
i40e: Correcting mutex usage in client code
Correcting the mutex usage, in client_subtask(), mutex_unlock has
to be called just before client_del_instance() since this function opens
and later closes the same mutex again.
Similarly in client_is_registered removing the mutex since it closes
the mutex twice.
This is a patch suggested by RDMA team.
Change-ID: Icce519c266e4221b8a2a72a15ba5bf01750e5852
Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e')
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c index 09a37cfcffd6..5404b32c9adf 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_client.c +++ b/drivers/net/ethernet/intel/i40e/i40e_client.c | |||
| @@ -576,6 +576,7 @@ void i40e_client_subtask(struct i40e_pf *pf) | |||
| 576 | set_bit(__I40E_CLIENT_INSTANCE_OPENED, &cdev->state); | 576 | set_bit(__I40E_CLIENT_INSTANCE_OPENED, &cdev->state); |
| 577 | } else { | 577 | } else { |
| 578 | /* remove client instance */ | 578 | /* remove client instance */ |
| 579 | mutex_unlock(&i40e_client_instance_mutex); | ||
| 579 | i40e_client_del_instance(pf, client); | 580 | i40e_client_del_instance(pf, client); |
| 580 | atomic_dec(&client->ref_cnt); | 581 | atomic_dec(&client->ref_cnt); |
| 581 | continue; | 582 | continue; |
