From 8c54d6cf0cf2379e100fe2e6bd0b4ab3ed5c6595 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 8 Sep 2016 19:28:13 +0530 Subject: [PATCH] qcacld-3.0: Do not allocate LRO desc for flow greater than max range HOST driver supports max LRO_DESC_POOL_SZ flows that can be submitted to LRO manager. Currently there is no check for flow greater than LRO_DESC_POOL_SZ and this is resulting in invalid de-reference of hdd_lro_desc_entry. Do not allocate LRO desc for flow greater than max range and use normal rx path for flow greater than LRO_DESC_POOL_SZ. Change-Id: I7f44c750afc78f5e044c9405dff30e729d3d28f3 CRs-Fixed: 1064624 (cherry picked from commit 2a8773e73b6c00edfcc621b4c1cba3bae677fb66) --- core/hdd/src/wlan_hdd_lro.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c index df0bf8df129f..b1fe8f078d52 100644 --- a/core/hdd/src/wlan_hdd_lro.c +++ b/core/hdd/src/wlan_hdd_lro.c @@ -256,6 +256,11 @@ static int hdd_lro_desc_find(hdd_adapter_t *adapter, return -ENOMEM; } + if (list_empty(&entry->lro_node)) { + hdd_err("Reached max supported lro_desc range\n"); + return -EINVAL; + } + list_del_init(&entry->lro_node); qdf_spin_unlock_bh(&free_pool.lro_pool_lock);