summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Khanna <mkhannaqca@codeaurora.org>2017-02-24 19:23:57 -0800
committerqcabuildsw <qcabuildsw@localhost>2017-02-27 19:07:18 -0800
commitb1101525c5ce4e5ddb44fbcc82406415e9a948e8 (patch)
treecc1c1e078feb890f97cd286f479944aa42a0c2e1
parentb57742a398346491f4fa3bfcab1131393697d1ca (diff)
qcacld-3.0: Fix TSO seg cookie init crash
In one of the recent fixes, we are setting the TSO seg contents to zero when the segment is added back to the free list. The segment cookie is not re-initalized at this point. Hence, when this segment is re-allocated, it fails the cookie check and there is a system crash. Fix the issue by re-initializing the segment cookie after zero-ing out its contents. Change-Id: I7947e3ce4f80f1b19ebf5ef73ff75dee19ec7364 CRs-Fixed: 2011786
-rw-r--r--core/dp/txrx/ol_tx_desc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c
index 128441c87e83..46d207314391 100644
--- a/core/dp/txrx/ol_tx_desc.c
+++ b/core/dp/txrx/ol_tx_desc.c
@@ -817,6 +817,7 @@ void ol_tso_free_segment(struct ol_txrx_pdev_t *pdev,
qdf_mem_zero(tso_seg, sizeof(*tso_seg));
tso_seg->next = pdev->tso_seg_pool.freelist;
tso_seg->on_freelist = 1;
+ tso_seg->cookie = TSO_SEG_MAGIC_COOKIE;
pdev->tso_seg_pool.freelist = tso_seg;
pdev->tso_seg_pool.num_free++;
qdf_spin_unlock_bh(&pdev->tso_seg_pool.tso_mutex);