This is a note to let you know that I've just added the patch titled staging: r8188eu: Calling rtw_get_stainfo() with a NULL sta_addr will return NULL to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: staging-r8188eu-calling-rtw_get_stainfo-with-a-null-sta_addr-will-return-null.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 9452bf560273e4de2395ffdd79024debfb0c1290 Mon Sep 17 00:00:00 2001 From: Larry Finger <Larry.Finger@xxxxxxxxxxxx> Date: Wed, 9 Apr 2014 11:12:58 -0500 Subject: staging: r8188eu: Calling rtw_get_stainfo() with a NULL sta_addr will return NULL From: Larry Finger <Larry.Finger@xxxxxxxxxxxx> commit 9452bf560273e4de2395ffdd79024debfb0c1290 upstream. This makes the follow-on check for psta != NULL pointless and makes the whole exercise rather pointless. This is another case of why blindly zero-initializing variables when they are declared is bad. Reported-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/rtl8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -542,7 +542,7 @@ _func_exit_; /* set the security information in the recv_frame */ static union recv_frame *portctrl(struct adapter *adapter, union recv_frame *precv_frame) { - u8 *psta_addr = NULL, *ptr; + u8 *psta_addr, *ptr; uint auth_alg; struct recv_frame_hdr *pfhdr; struct sta_info *psta; @@ -556,7 +556,6 @@ static union recv_frame *portctrl(struct _func_enter_; pstapriv = &adapter->stapriv; - psta = rtw_get_stainfo(pstapriv, psta_addr); auth_alg = adapter->securitypriv.dot11AuthAlgrthm; @@ -564,6 +563,7 @@ _func_enter_; pfhdr = &precv_frame->u.hdr; pattrib = &pfhdr->attrib; psta_addr = pattrib->ta; + psta = rtw_get_stainfo(pstapriv, psta_addr); prtnframe = NULL; Patches currently in stable-queue which might be from Larry.Finger@xxxxxxxxxxxx are queue-3.14/staging-r8188eu-calling-rtw_get_stainfo-with-a-null-sta_addr-will-return-null.patch queue-3.14/staging-r8712u-fix-case-where-ethtype-was-never-obtained-and-always-be-checked-against-0.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html