qcacmn: Avoid null pointer dereference and OOB access
Avoid possible null pointer dereferece and out of bound access in NAN component. Change-Id: I40ba4e340e34e8975c782c0a6329322e3c151326 CRs-Fixed: 2160751
这个提交包含在:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -148,4 +148,14 @@ struct wlan_objmgr_vdev *wlan_util_get_vdev_by_ifname(
|
||||
struct wlan_objmgr_psoc *psoc, char *ifname,
|
||||
wlan_objmgr_ref_dbgid ref_id);
|
||||
|
||||
/**
|
||||
* wlan_util_vdev_get_if_name() - get vdev's interface name
|
||||
* @vdev: VDEV object
|
||||
*
|
||||
* API to get vdev's interface name
|
||||
*
|
||||
* Return:
|
||||
* @id: vdev's interface name
|
||||
*/
|
||||
uint8_t *wlan_util_vdev_get_if_name(struct wlan_objmgr_vdev *vdev);
|
||||
#endif /* _WLAN_UTILITY_H_ */
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -208,4 +208,32 @@ struct wlan_objmgr_vdev *wlan_util_get_vdev_by_ifname(
|
||||
|
||||
return filter.found_vdev;
|
||||
}
|
||||
EXPORT_SYMBOL(wlan_util_get_vdev_by_ifname);
|
||||
|
||||
/**
|
||||
* wlan_util_vdev_get_if_name() - get vdev's interface name
|
||||
* @vdev: VDEV object
|
||||
*
|
||||
* API to get vdev's interface name
|
||||
*
|
||||
* Return:
|
||||
* @id: vdev's interface name
|
||||
*/
|
||||
uint8_t *wlan_util_vdev_get_if_name(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
uint8_t *name;
|
||||
struct vdev_osif_priv *osif_priv;
|
||||
|
||||
wlan_vdev_obj_lock(vdev);
|
||||
|
||||
osif_priv = wlan_vdev_get_ospriv(vdev);
|
||||
if (!osif_priv) {
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name = osif_priv->wdev->netdev->name;
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
|
||||
return name;
|
||||
}
|
||||
EXPORT_SYMBOL(wlan_util_vdev_get_if_name);
|
||||
|
在新工单中引用
屏蔽一个用户