mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacmn: Avoid timer double free when disable scheduler
A global timer is created and freed by each module, if passed as msg to mc queues, shouldn't be freed in scheduler_cleanup_queues, or double free issue happens For example, a timer in tLimTimers is freed in mac_stop->pe_stop ->lim_cleanup_mlm Change-Id: I919b13f2570e3496a1de249fd90a88f3bfeaa131 CRs-Fixed: 2220514
This commit is contained in:
parent
768d0997a3
commit
1c6bb03362
1 changed files with 10 additions and 3 deletions
|
|
@ -433,9 +433,16 @@ void scheduler_cleanup_queues(struct scheduler_ctx *sch_ctx, int idx)
|
|||
while ((msg_wrapper =
|
||||
scheduler_mq_get(&sch_ctx->queue_ctx.sch_msg_q[idx]))) {
|
||||
if (msg_wrapper->msg_buf) {
|
||||
sched_info("Freeing MC WMA MSG message type %d",
|
||||
msg_wrapper->msg_buf->type);
|
||||
|
||||
if ((QDF_MODULE_ID_SYS ==
|
||||
sch_ctx->queue_ctx.sch_msg_q[idx].qid) &&
|
||||
(SYS_MSG_ID_MC_TIMER ==
|
||||
msg_wrapper->msg_buf->type)) {
|
||||
sched_debug("Timer is freed by each module, not here");
|
||||
continue;
|
||||
}
|
||||
sched_info("Freeing MC MSG message type %d, module id:%d",
|
||||
msg_wrapper->msg_buf->type,
|
||||
sch_ctx->queue_ctx.sch_msg_q[idx].qid);
|
||||
if (msg_wrapper->msg_buf->flush_callback) {
|
||||
sched_debug("Flush callback called for type-%x",
|
||||
msg_wrapper->msg_buf->type);
|
||||
|
|
|
|||
Loading…
Reference in a new issue