Re: [patch] brcmfmac: move dereference under check for NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/06/2013 12:55 PM, Dan Carpenter wrote:
skb_pull() dereferences the skb parameter.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Hi Dan,

Just missed that. This code fragment was resubmitted just minutes ago. I will rework the patch to incorporate this change.

Regards,
Arend

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index ea37bd4..c35296f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -861,9 +861,9 @@ static bool brcmf_fws_tim_update(struct brcmf_fws_info *fws,
  		      BRCMF_FWS_TYPE_PENDING_TRAFFIC_BMP_LEN + 2 +
  		      4 + fws->drvr->hdrlen;
  		skb = brcmu_pkt_buf_get_skb(len);
-		skb_pull(skb, len);
  		if (skb == NULL)
  			return false;
+		skb_pull(skb, len);
  		skcb = brcmf_skbcb(skb);
  		skcb->mac = entry;
  		skcb->state = BRCMF_FWS_SKBSTATE_TIM;



--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux