mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 23:36:08 +07:00
RDMA/core: No need to protect kfree with spin lock and semaphore
While unregistering a client, only context removal should be protected with lock. There is no need to protect a freeing of such context which is already removed from the list. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
722c7b2bfe
commit
93688ddbe1
@ -700,9 +700,9 @@ void ib_unregister_client(struct ib_client *client)
|
||||
down_write(&lists_rwsem);
|
||||
spin_lock_irqsave(&device->client_data_lock, flags);
|
||||
list_del(&found_context->list);
|
||||
kfree(found_context);
|
||||
spin_unlock_irqrestore(&device->client_data_lock, flags);
|
||||
up_write(&lists_rwsem);
|
||||
kfree(found_context);
|
||||
}
|
||||
|
||||
mutex_unlock(&device_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user