summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2021-04-14 21:11:09 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-10 12:19:26 +0300
commit7dd8ffdbc00565bd26762f0c56cf851ee1afdc91 (patch)
treed4b648295f243957906baaf892447b8fd1928cf5 /drivers
parentc848434c629db5d08350bfb49939f447dc1257eb (diff)
downloadlinux-7dd8ffdbc00565bd26762f0c56cf851ee1afdc91.tar.xz
staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function ‘translate_scan’: drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:310:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_wx_set_mlme’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6: warning: variable ‘reason’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: ‘iw_operation_mode’ defined but not used [-Wunused-const-variable=] Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210414181129.1628598-38-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8188eu/os_dep/ioctl_linux.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index c95ae4d6a3b6..cc14f0094778 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
/* parsing WPA/WPA2 IE */
{
u8 *buf;
- u8 wpa_ie[255], rsn_ie[255];
+ u8 *wpa_ie, *rsn_ie;
u16 wpa_len = 0, rsn_len = 0;
u8 *p;
@@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
if (!buf)
return start;
+ wpa_ie = kzalloc(255, GFP_ATOMIC);
+ if (!wpa_ie)
+ return start;
+
+ rsn_ie = kzalloc(255, GFP_ATOMIC);
+ if (!rsn_ie)
+ return start;
+
rtw_get_sec_ie(pnetwork->network.ies, pnetwork->network.ie_length, rsn_ie, &rsn_len, wpa_ie, &wpa_len);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan: ssid =%s\n", pnetwork->network.ssid.ssid));
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len));
@@ -268,6 +276,8 @@ static char *translate_scan(struct adapter *padapter,
start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
}
kfree(buf);
+ kfree(wpa_ie);
+ kfree(rsn_ie);
}
{/* parsing WPS IE */