i40e: Move the mutex lock in i40e_client_unregister
Subsystems (2)
PATCH 3/3 i40e: Move the mutex lock in i40e_client_unregister
From: Catherine Sullivan <[email protected]>
We need to lock the client list around the i40e_client_release call to prevent the release from interrupting the client instances while they are being added.
---
Testing Hints: Do a insmod/rmmod of i40iw quickly and see if there is a kernel paging failure.
HSD-number: 7661337
drivers/net/ethernet/intel/i40e/i40e_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_client.c +2 -2
@@ -1007,13 +1007,13 @@ int i40e_unregister_client(struct i40e_client *client)* a close for each of the client instances that were opened. * client_release function is called to handle this. */ +mutex_lock (&i40e_client_mutex);if (!client ||i40e_client_release (client)) { ret = -EIO ; goto out; }/* TODO: check if device is in reset, or if that matters? */ -mutex_lock (&i40e_client_mutex);if (!i40e_client_is_registered (client)) {pr_info ("i40e: Client %s has not been registered\n" , client->name);
@@ -1032,8 +1032,8 @@ int i40e_unregister_client(struct i40e_client *client) client->name); } -mutex_unlock (&i40e_client_mutex); out: +mutex_unlock (&i40e_client_mutex);return ret; }EXPORT_SYMBOL (i40e_unregister_client);
Signature · 1 line
2.4.11
Bowers
PATCH 3/3 i40e: Move the mutex lock in i40e_client_unregister
Quoted 16 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bimmy Pujari
Sent: Thursday, June 23, 2016 2:09 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S39 3/3] i40e: Move the mutex lock ini40e_client_unregisterFrom: Catherine Sullivan <[email protected]>
We need to lock the client list around the
i40e_client_releasecall to prevent the release from interrupting the client instances while they are being added.Signed-off-by Catherine Sullivan <[email protected]>Change-Id I99993f20179aaf8730207833e7d0869d2ccffa1d
Quoted 8 lines
---
Testing Hints: Do a insmod/rmmod of i40iw quickly and see if there is a kernel paging failure.HSD-number: 7661337
drivers/net/ethernet/intel/i40e/i40e_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
No kernel panic during testing