qcacmn: initialize spinlock after memset function
In some scenarios, memset function is called after spinlock initialization, which clears the container holding the spin lock causing the spinlock to be uninitialized. Fix this by initializing the spinlock after the container has been cleared with memset(). Change-Id: I87e9844e95e814d8dca25e591a6494516d929c70 CRs-Fixed: 3377971
This commit is contained in:

committed by
Madan Koyyalamudi

parent
2cd3406a9a
commit
ce5f301bce
@@ -1647,8 +1647,8 @@ void cm_req_history_del(struct cnx_mgr *cm_ctx,
|
||||
|
||||
void cm_req_history_init(struct cnx_mgr *cm_ctx)
|
||||
{
|
||||
qdf_spinlock_create(&cm_ctx->req_history.cm_req_hist_lock);
|
||||
qdf_mem_zero(&cm_ctx->req_history, sizeof(struct cm_req_history));
|
||||
qdf_spinlock_create(&cm_ctx->req_history.cm_req_hist_lock);
|
||||
}
|
||||
|
||||
void cm_req_history_deinit(struct cnx_mgr *cm_ctx)
|
||||
|
Reference in New Issue
Block a user