From b1101525c5ce4e5ddb44fbcc82406415e9a948e8 Mon Sep 17 00:00:00 2001 From: Mohit Khanna Date: Fri, 24 Feb 2017 19:23:57 -0800 Subject: 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 --- core/dp/txrx/ol_tx_desc.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v1.2.3