From d650e2f3d694c70a595cdc4077816c26061dd084 Mon Sep 17 00:00:00 2001 From: Vinay Gannevaram Date: Tue, 8 Dec 2020 23:45:18 +0530 Subject: [PATCH] qcacmn: Use local skb pointer for reentrant cld80211_msg_allocator cld80211_oem_rsp_alloc_skb api is used to alloc skb for reply msg. A static buffer pointer is returned from this reentrant func which can be called by kworker and scheduler thread at same time resulting single buffer access by both threads. After kworker thread freeing this skb, scheduler is further updating data in this skb resulting in page fault error. Use local skb pointer to avoid such race conditions CRs-Fixed: 2822390 Change-Id: I5f807d06c4890b027c86de9187f17fb83b19db5e --- utils/nlink/src/wlan_nlink_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/nlink/src/wlan_nlink_srv.c b/utils/nlink/src/wlan_nlink_srv.c index 00a38000b6b1..d0b79feb060b 100644 --- a/utils/nlink/src/wlan_nlink_srv.c +++ b/utils/nlink/src/wlan_nlink_srv.c @@ -283,7 +283,7 @@ struct sk_buff * cld80211_oem_rsp_alloc_skb(uint32_t portid, void **hdr, struct nlattr **nest, int *flags) { - static struct sk_buff *msg; + struct sk_buff *msg; if (in_interrupt() || irqs_disabled() || in_atomic()) *flags = GFP_ATOMIC;