diff options
| author | SaidiReddy Yenuga <c_saidir@qti.qualcomm.com> | 2016-06-27 16:31:56 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-07-22 17:47:38 +0530 |
| commit | 147a585224fab1c70707ee867c661636de28a950 (patch) | |
| tree | 31228711b6cfbb04c9df58ada5bbfc29d49af5d4 | |
| parent | ba068657d55e47b9a6f9ffb585529a5b5056fd86 (diff) | |
qcacld-2.0: Track memory allocation requests in driver
Replace all the kmalloc calls with vos_mem_malloc for tracking
each memory request.
CRs-Fixed: 1034565
Change-Id: Iae5aa03ccad8eff72935b1a9f895364495f323e0
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 22 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_early_suspend.c | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_hostapd.c | 24 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_ipa.c | 2 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 14 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 34 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wmm.c | 8 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wowl.c | 8 | ||||
| -rw-r--r-- | CORE/SERVICES/HIF/USB/usbdrv.c | 10 | ||||
| -rw-r--r-- | CORE/UTILS/PKTLOG/linux_ac.c | 6 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_api.c | 4 |
11 files changed, 67 insertions, 67 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 65ec664f2edb..1f6ac3a479bc 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -436,7 +436,7 @@ static void hdd_SendFTAssocResponse(struct net_device *dev, hdd_adapter_t *pAdap (unsigned int)pFTAssocRsp[1]); // We need to send the IEs to the supplicant. - buff = kmalloc(IW_GENERIC_IE_MAX, GFP_ATOMIC); + buff = vos_mem_malloc(IW_GENERIC_IE_MAX); if (buff == NULL) { hddLog(LOGE, "%s: kmalloc unable to allocate memory", __func__); @@ -450,7 +450,7 @@ static void hdd_SendFTAssocResponse(struct net_device *dev, hdd_adapter_t *pAdap memcpy(buff, pFTAssocRsp, len); wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, buff); - kfree(buff); + vos_mem_free(buff); } #endif /* WLAN_FEATURE_VOWIFI_11R */ @@ -530,7 +530,7 @@ void hdd_SendFTEvent(hdd_adapter_t *pAdapter) #else // We need to send the IEs to the supplicant - buff = kmalloc(IW_CUSTOM_MAX, GFP_ATOMIC); + buff = vos_mem_malloc(IW_CUSTOM_MAX); if (buff == NULL) { hddLog(LOGE, "%s: kmalloc unable to allocate memory", __func__); @@ -565,14 +565,14 @@ void hdd_SendFTEvent(hdd_adapter_t *pAdapter) if (auth_resp_len == 0) { hddLog(LOGE, "%s: AuthRsp FTIES is of length 0", __func__); - kfree(buff); + vos_mem_free(buff); return; } wrqu.data.length = str_len + auth_resp_len; wireless_send_event(pAdapter->dev, IWEVCUSTOM, &wrqu, buff); - kfree(buff); + vos_mem_free(buff); #endif } @@ -643,7 +643,7 @@ hdd_SendUpdateBeaconIEsEvent(hdd_adapter_t *pAdapter, hddLog(LOG1, "%s: Beacon IEs length = %d", __func__, pCsrRoamInfo->nBeaconLength - BEACON_FRAME_IES_OFFSET); // We need to send the IEs to the supplicant. - buff = kmalloc(IW_CUSTOM_MAX, GFP_ATOMIC); + buff = vos_mem_malloc(IW_CUSTOM_MAX); if (buff == NULL) { hddLog(LOGE, "%s: kmalloc unable to allocate memory", __func__); @@ -674,7 +674,7 @@ hdd_SendUpdateBeaconIEsEvent(hdd_adapter_t *pAdapter, wireless_send_event(pAdapter->dev, IWEVCUSTOM, &wrqu, buff); } while (totalIeLen > 0); - kfree(buff); + vos_mem_free(buff); } static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRoamInfo) @@ -1425,7 +1425,7 @@ static void hdd_SendReAssocEvent(struct net_device *dev, { unsigned int len = 0; u8 *pFTAssocRsp = NULL; - v_U8_t *rspRsnIe = kmalloc(IW_GENERIC_IE_MAX, GFP_KERNEL); + v_U8_t *rspRsnIe = vos_mem_malloc(IW_GENERIC_IE_MAX); tANI_U32 rspRsnLength = 0; struct ieee80211_channel *chan; hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); @@ -1502,7 +1502,7 @@ static void hdd_SendReAssocEvent(struct net_device *dev, hddLog(LOG2, FL("SSIDIE:")); VOS_TRACE_HEX_DUMP(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_DEBUG, buf_ssid_ie, ssid_ie_len); - final_req_ie = kmalloc(IW_GENERIC_IE_MAX, GFP_KERNEL); + final_req_ie = vos_mem_malloc(IW_GENERIC_IE_MAX); if (final_req_ie == NULL) goto done; buf_ptr = final_req_ie; @@ -1527,8 +1527,8 @@ static void hdd_SendReAssocEvent(struct net_device *dev, done: sme_RoamFreeConnectProfile(hal_handle, &roam_profile); if (final_req_ie) - kfree(final_req_ie); - kfree(rspRsnIe); + vos_mem_free(final_req_ie); + vos_mem_free(rspRsnIe); } /** diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c index 19fec59f94da..0bc33eb7e8c3 100644 --- a/CORE/HDD/src/wlan_hdd_early_suspend.c +++ b/CORE/HDD/src/wlan_hdd_early_suspend.c @@ -2395,7 +2395,7 @@ err_re_init: /* Free up dynamically allocated members * inside HDD Adapter */ - kfree(pHddCtx->cfg_ini); + vos_mem_free(pHddCtx->cfg_ini); pHddCtx->cfg_ini= NULL; /* Destroy all wakelocks */ wlan_hdd_wakelocks_destroy(pHddCtx); diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 042ecda1c346..88dc0b8be3a8 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -448,7 +448,7 @@ static int hdd_hostapd_driver_command(hdd_adapter_t *pAdapter, } /* Allocate +1 for '\0' */ - command = kmalloc((priv_data->total_len + 1), GFP_KERNEL); + command = vos_mem_malloc((priv_data->total_len + 1)); if (!command) { hddLog(VOS_TRACE_LEVEL_ERROR, "%s: failed to allocate memory", __func__); @@ -484,7 +484,7 @@ static int hdd_hostapd_driver_command(hdd_adapter_t *pAdapter, exit: if (command) { - kfree(command); + vos_mem_free(command); } EXIT(); return ret; @@ -2729,7 +2729,7 @@ static __iw_softap_wowl_config_pattern(struct net_device *dev, ret = -EINVAL; break; } - kfree(pBuffer); + vos_mem_free(pBuffer); return ret; } @@ -4168,7 +4168,7 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev, } /* allocate local buffer to build the response */ - buf = kmalloc(wrqu->data.length, GFP_KERNEL); + buf = vos_mem_malloc(wrqu->data.length); if (!buf) { hddLog(LOG1, "%s: failed to allocate response buffer", __func__); return -ENOMEM; @@ -4197,7 +4197,7 @@ static __iw_softap_getassoc_stamacaddr(struct net_device *dev, hddLog(LOG1, "%s: failed to copy response to user buffer", __func__); ret = -EFAULT; } - kfree(buf); + vos_mem_free(buf); EXIT(); return ret; } @@ -4302,7 +4302,7 @@ static __iw_softap_ap_stats(struct net_device *dev, WLANSAP_GetStatistics((WLAN_HDD_GET_CTX(pHostapdAdapter))->pvosContext, &statBuffer, (v_BOOL_t)wrqu->data.flags); - pstatbuf = kmalloc(wrqu->data.length, GFP_KERNEL); + pstatbuf = vos_mem_malloc(wrqu->data.length); if(NULL == pstatbuf) { hddLog(LOG1, "unable to allocate memory"); return -ENOMEM; @@ -4322,16 +4322,16 @@ static __iw_softap_ap_stats(struct net_device *dev, if (len >= wrqu->data.length) { hddLog(LOG1, "%s: Insufficient buffer:%d, %d", __func__, wrqu->data.length, len); - kfree(pstatbuf); + vos_mem_free(pstatbuf); return -E2BIG; } if (copy_to_user((void *)wrqu->data.pointer, (void *)pstatbuf, len)) { hddLog(LOG1, "%s: failed to copy data to user buffer", __func__); - kfree(pstatbuf); + vos_mem_free(pstatbuf); return -EFAULT; } wrqu->data.length = len; - kfree(pstatbuf); + vos_mem_free(pstatbuf); EXIT(); return 0; } @@ -5657,7 +5657,7 @@ __iw_get_softap_linkspeed(struct net_device *dev, struct iw_request_info *info, if (wrqu->data.length >= MAC_ADDRESS_STR_LEN - 1) { - pmacAddress = kmalloc(MAC_ADDRESS_STR_LEN, GFP_KERNEL); + pmacAddress = vos_mem_malloc(MAC_ADDRESS_STR_LEN); if (NULL == pmacAddress) { hddLog(LOG1, "unable to allocate memory"); return -ENOMEM; @@ -5666,13 +5666,13 @@ __iw_get_softap_linkspeed(struct net_device *dev, struct iw_request_info *info, wrqu->data.pointer, MAC_ADDRESS_STR_LEN)) { hddLog(LOG1, "%s: failed to copy data to user buffer", __func__); - kfree(pmacAddress); + vos_mem_free(pmacAddress); return -EFAULT; } pmacAddress[MAC_ADDRESS_STR_LEN -1] = '\0'; status = hdd_string_to_hex (pmacAddress, MAC_ADDRESS_STR_LEN, macAddress ); - kfree(pmacAddress); + vos_mem_free(pmacAddress); if (!VOS_IS_STATUS_SUCCESS(status )) { diff --git a/CORE/HDD/src/wlan_hdd_ipa.c b/CORE/HDD/src/wlan_hdd_ipa.c index fc175d6526df..54c840b6fb50 100644 --- a/CORE/HDD/src/wlan_hdd_ipa.c +++ b/CORE/HDD/src/wlan_hdd_ipa.c @@ -804,7 +804,7 @@ static void hdd_ipa_uc_rt_debug_handler(void *ctext) * And if allocation fail, will dump WLAN IPA stats */ dummy_ptr = kmalloc(HDD_IPA_UC_DEBUG_DUMMY_MEM_SIZE, - GFP_KERNEL | GFP_ATOMIC); + GFP_KERNEL | GFP_ATOMIC); if (!dummy_ptr) { HDD_IPA_LOG(VOS_TRACE_LEVEL_FATAL, "%s: Dummy alloc fail", __func__); diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 571ac3c9e60f..cfab6ccb2d81 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -5269,7 +5269,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, } /* Allocate +1 for '\0' */ - command = kmalloc(priv_data.total_len + 1, GFP_KERNEL); + command = vos_mem_malloc(priv_data.total_len + 1); if (!command) { hddLog(VOS_TRACE_LEVEL_ERROR, @@ -7100,7 +7100,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, * exceeds the size of 1024 bytes of default stack size. On * 64 bit devices, the default max stack size of 2048 bytes */ - extra = kmalloc(WLAN_MAX_BUF_SIZE, GFP_KERNEL); + extra = vos_mem_malloc(WLAN_MAX_BUF_SIZE); if (NULL == extra) { @@ -7174,7 +7174,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, } /* Free temporary buffer */ - kfree(extra); + vos_mem_free(extra); } else @@ -7936,7 +7936,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, exit: if (command) { - kfree(command); + vos_mem_free(command); } EXIT(); return ret; @@ -13116,7 +13116,7 @@ free_hdd_ctx: /* Free up dynamically allocated members inside HDD Adapter */ if (pHddCtx->cfg_ini) { - kfree(pHddCtx->cfg_ini); + vos_mem_free(pHddCtx->cfg_ini); pHddCtx->cfg_ini= NULL; } @@ -14636,7 +14636,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) spin_lock_init(&pHddCtx->sta_update_info_lock); hdd_init_offloaded_packets_ctx(pHddCtx); // Load all config first as TL config is needed during vos_open - pHddCtx->cfg_ini = (hdd_config_t*) kmalloc(sizeof(hdd_config_t), GFP_KERNEL); + pHddCtx->cfg_ini = (hdd_config_t*) vos_mem_malloc(sizeof(hdd_config_t)); if(pHddCtx->cfg_ini == NULL) { hddLog(VOS_TRACE_LEVEL_FATAL,"%s: Failed kmalloc hdd_config_t",__func__); @@ -15605,7 +15605,7 @@ err_free_ftm_open: err_nl_srv: nl_srv_exit(); err_config: - kfree(pHddCtx->cfg_ini); + vos_mem_free(pHddCtx->cfg_ini); pHddCtx->cfg_ini= NULL; err_histogram: diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 6c38ef5ffa28..5a19ab2b4d88 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -624,7 +624,7 @@ void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len) } - ptr = kmalloc(len + 1, GFP_KERNEL); + ptr = vos_mem_malloc(len + 1); if (NULL == ptr) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, @@ -636,7 +636,7 @@ void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "%s: failed to copy data to user buffer", __func__); - kfree(ptr); + vos_mem_free(ptr); return NULL; } ptr[len] = '\0'; @@ -2842,7 +2842,7 @@ static int __iw_set_genie(struct net_device *dev, struct iw_request_info *info, } exit: EXIT(); - kfree(base_genie); + vos_mem_free(base_genie); return ret; } @@ -4364,7 +4364,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, "%s:LOGP in Progress. Ignore!!!",__func__); - kfree(cmd); + vos_mem_free(cmd); return -EBUSY; } @@ -4468,7 +4468,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, { VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s: SME Change Country code fail", __func__); - kfree(cmd); + vos_mem_free(cmd); return -EIO; } } @@ -4487,7 +4487,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, }else{ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "CMD LENGTH %d is not correct",cmd_len); - kfree(cmd); + vos_mem_free(cmd); return -EINVAL; } @@ -4495,7 +4495,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "powermode input %s is not correct",ptr); - kfree(cmd); + vos_mem_free(cmd); return -EIO; } @@ -4566,14 +4566,14 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, hddLog( VOS_TRACE_LEVEL_INFO, "pno"); ret = iw_set_pno(dev, info, wrqu, cmd, 3); - kfree(cmd); + vos_mem_free(cmd); return ret; } #endif /*FEATURE_WLAN_SCAN_PNO*/ else if( strncasecmp(cmd, "powerparams",11) == 0 ) { hddLog( VOS_TRACE_LEVEL_INFO, "powerparams"); vos_status = iw_set_power_params(dev, info, wrqu, cmd, 11); - kfree(cmd); + vos_mem_free(cmd); return (vos_status == VOS_STATUS_SUCCESS) ? 0 : -EINVAL; } else if( 0 == strncasecmp(cmd, "CONFIG-TX-TRACKING", 18) ) { @@ -4586,7 +4586,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, }else{ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "CMD LENGTH %d is not correct",cmd_len); - kfree(cmd); + vos_mem_free(cmd); return -EINVAL; } @@ -4598,7 +4598,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "CONFIG-TX-TRACKING %s input is not correct",ptr); - kfree(cmd); + vos_mem_free(cmd); return -EIO; } @@ -4607,7 +4607,7 @@ static int __iw_set_priv(struct net_device *dev, struct iw_request_info *info, if (0 == tTxPerTrackingParam.ucTxPerTrackingPeriod) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN, "Period input is not correct"); - kfree(cmd); + vos_mem_free(cmd); return -EIO; } @@ -4652,7 +4652,7 @@ done: { hddLog(VOS_TRACE_LEVEL_ERROR, "%s: failed to copy data to user buffer", __func__); - kfree(cmd); + vos_mem_free(cmd); return -EFAULT; } wrqu->data.length = ret; @@ -4663,7 +4663,7 @@ done: pr_info("%s: rsp [%s] len [%d] status %d\n", __func__, cmd, wrqu->data.length, rc); } - kfree(cmd); + vos_mem_free(cmd); return rc; } @@ -7525,7 +7525,7 @@ static int __iw_setchar_getnone(struct net_device *dev, break; } } - kfree(pBuffer); + vos_mem_free(pBuffer); EXIT(); return ret; } @@ -10387,7 +10387,7 @@ static int __iw_set_packet_filter_params(struct net_device *dev, ret = wlan_hdd_set_filter(WLAN_HDD_GET_CTX(pAdapter), pRequest, pAdapter->sessionId); - kfree(pRequest); + vos_mem_free(pRequest); EXIT(); return ret; } @@ -11127,7 +11127,7 @@ static int __iw_set_power_params_priv(struct net_device *dev, } ret = iw_set_power_params(dev, info, wrqu, ptr, 0); - kfree(ptr); + vos_mem_free(ptr); EXIT(); return ret; } diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c index 5d586e9d50fa..a455b7cf2ea7 100644 --- a/CORE/HDD/src/wlan_hdd_wmm.c +++ b/CORE/HDD/src/wlan_hdd_wmm.c @@ -326,7 +326,7 @@ static void hdd_wmm_free_context (hdd_wmm_qos_context_t* pQosContext) mutex_unlock(&pAdapter->hddWmmStatus.wmmLock); // reclaim memory - kfree(pQosContext); + vos_mem_free(pQosContext); } @@ -1290,7 +1290,7 @@ static void __hdd_wmm_do_implicit_qos(struct work_struct *work) "%s: AC %d doesn't need service", __func__, acType); pQosContext->magic = 0; - kfree(pQosContext); + vos_mem_free(pQosContext); return; } @@ -2029,7 +2029,7 @@ VOS_STATUS hdd_wmm_acquire_access( hdd_adapter_t* pAdapter, pAdapter->hddWmmStatus.wmmAcStatus[acType].wmmAcAccessNeeded = VOS_TRUE; - pQosContext = kmalloc(sizeof(*pQosContext), GFP_ATOMIC); + pQosContext = vos_mem_malloc(sizeof(*pQosContext)); if (NULL == pQosContext) { // no memory for QoS context. Nothing we can do but let data flow @@ -2482,7 +2482,7 @@ hdd_wlan_wmm_status_e hdd_wmm_addts( hdd_adapter_t* pAdapter, return status; } - pQosContext = kmalloc(sizeof(*pQosContext), GFP_KERNEL); + pQosContext = vos_mem_malloc(sizeof(*pQosContext)); if (NULL == pQosContext) { // no memory for QoS context. Nothing we can do diff --git a/CORE/HDD/src/wlan_hdd_wowl.c b/CORE/HDD/src/wlan_hdd_wowl.c index 0b33988b00b0..913b7b7e7a00 100644 --- a/CORE/HDD/src/wlan_hdd_wowl.c +++ b/CORE/HDD/src/wlan_hdd_wowl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2104, 2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -241,7 +241,7 @@ v_BOOL_t hdd_add_wowl_ptrn (hdd_adapter_t *pAdapter, const char * ptrn) } //All is good. Store the pattern locally - g_hdd_wowl_ptrns[first_empty_slot] = (char*) kmalloc(len+1, GFP_KERNEL); + g_hdd_wowl_ptrns[first_empty_slot] = (char*) vos_mem_malloc(len+1); if(g_hdd_wowl_ptrns[first_empty_slot] == NULL) { VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, @@ -262,7 +262,7 @@ v_BOOL_t hdd_add_wowl_ptrn (hdd_adapter_t *pAdapter, const char * ptrn) // Add failed, so invalidate the local storage VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "sme_WowlAddBcastPattern failed with error code (%d)", halStatus ); - kfree(g_hdd_wowl_ptrns[first_empty_slot]); + vos_mem_free(g_hdd_wowl_ptrns[first_empty_slot]); g_hdd_wowl_ptrns[first_empty_slot] = NULL; } @@ -321,7 +321,7 @@ v_BOOL_t hdd_del_wowl_ptrn (hdd_adapter_t *pAdapter, const char * ptrn) VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "Deleted pattern with id %d [%s]", id, g_hdd_wowl_ptrns[id]); - kfree(g_hdd_wowl_ptrns[id]); + vos_mem_free(g_hdd_wowl_ptrns[id]); g_hdd_wowl_ptrns[id] = NULL; return VOS_TRUE; } diff --git a/CORE/SERVICES/HIF/USB/usbdrv.c b/CORE/SERVICES/HIF/USB/usbdrv.c index 0d5a0ae7dbdd..ab565034852c 100644 --- a/CORE/SERVICES/HIF/USB/usbdrv.c +++ b/CORE/SERVICES/HIF/USB/usbdrv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1006,7 +1006,7 @@ A_STATUS usb_hif_submit_ctrl_out(HIF_DEVICE_USB *device, do { if (size > 0) { - buf = kmalloc(size, GFP_KERNEL); + buf = vos_mem_malloc(size); if (NULL == buf) { ret = A_NO_MEMORY; break; @@ -1035,7 +1035,7 @@ A_STATUS usb_hif_submit_ctrl_out(HIF_DEVICE_USB *device, } while (FALSE); if (buf != NULL) - kfree(buf); + vos_mem_free(buf); return ret; } @@ -1052,7 +1052,7 @@ A_STATUS usb_hif_submit_ctrl_in(HIF_DEVICE_USB *device, do { if (size > 0) { - buf = kmalloc(size, GFP_KERNEL); + buf = vos_mem_malloc(size); if (NULL == buf) { ret = A_NO_MEMORY; break; @@ -1083,7 +1083,7 @@ A_STATUS usb_hif_submit_ctrl_in(HIF_DEVICE_USB *device, } while (FALSE); if (buf != NULL) - kfree(buf); + vos_mem_free(buf); return ret; } diff --git a/CORE/UTILS/PKTLOG/linux_ac.c b/CORE/UTILS/PKTLOG/linux_ac.c index 668922d70f69..70f5fc5cff7e 100644 --- a/CORE/UTILS/PKTLOG/linux_ac.c +++ b/CORE/UTILS/PKTLOG/linux_ac.c @@ -440,7 +440,7 @@ static int pktlog_attach(struct ol_softc *scn) pl_dev = get_pl_handle(scn); if (pl_dev != NULL) { - pl_info_lnx = kmalloc(sizeof(*pl_info_lnx), GFP_KERNEL); + pl_info_lnx = vos_mem_malloc(sizeof(*pl_info_lnx)); if (pl_info_lnx == NULL) { printk(PKTLOG_TAG "%s:allocation failed for pl_info\n", __func__); @@ -510,7 +510,7 @@ attach_fail2: attach_fail1: if (pl_dev) - kfree(pl_dev->pl_info); + vos_mem_free(pl_dev->pl_info); return -1; } @@ -554,7 +554,7 @@ static void pktlog_detach(struct ol_softc *scn) pktlog_release_buf(scn); if (pl_dev) { - kfree(pl_info); + vos_mem_free(pl_info); pl_dev->pl_info = NULL; } } diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index dc96f4f4d7b6..110f106d328d 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -1719,7 +1719,7 @@ VOS_STATUS vos_alloc_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, ** Dynamically allocate the context for module */ - *ppModuleContext = kmalloc(size, GFP_KERNEL); + *ppModuleContext = vos_mem_malloc(size); if ( *ppModuleContext == NULL) @@ -1832,7 +1832,7 @@ VOS_STATUS vos_free_context( v_VOID_t *pVosContext, VOS_MODULE_ID moduleID, } if(pModuleContext != NULL) - kfree(pModuleContext); + vos_mem_free(pModuleContext); *pGpModContext = NULL; |
