Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15c65448 authored by Dundi Raviteja's avatar Dundi Raviteja
Browse files

wlan: Move list deletion logic under spinlock

Data queue list_del can cause race condition while
adding to list with list_add.

To avoid this move list_del logic under spinlock.

Change-Id: I75f3b5767e861fb6c0212afd38230443ae346d69
CRs-Fixed: 2792376
parent aa17c3a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -253,8 +253,8 @@ WCTS_PALReadCallback

      msg = list_first_entry(&pWCTSCb->wctsDataMsg.data_queue,
                             struct data_msg, list);
      spin_unlock_irqrestore(&pWCTSCb->wctsDataMsg.data_queue_lock, flags);
      list_del(&msg->list);
      spin_unlock_irqrestore(&pWCTSCb->wctsDataMsg.data_queue_lock, flags);

      buffer = msg->buffer;
      packet_size = msg->buf_len;