brcmfmac: use skb_cow() in brcmf_sdbrcm_txpkt() to assure alignment
authorArend van Spriel <arend@broadcom.com>
Wed, 3 Apr 2013 10:40:28 +0000 (12:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 3 Apr 2013 19:07:03 +0000 (15:07 -0400)
commitaeecc574a428a116936cadcea06b47cffad16ba1
treeb29bc67392aa023f03ff3e36af0a25f15f3c00b8
parenta04278096c14922bf7c701afe5c0c648d427a14d
brcmfmac: use skb_cow() in brcmf_sdbrcm_txpkt() to assure alignment

In brcmf_sdbrcm_txpkt() a new packet is allocated and used to transmit
to firmware freeing up the original packet. However, that packet is
still referenced in firmware-signalling so this would result in a
double free. Using skb_cow() avoids this as the packet reference is
unchanged.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c