diff options
author | David S. Miller <davem@davemloft.net> | 2017-07-29 18:30:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-29 18:30:08 -0400 |
commit | 4084e01db9d52213bd2d63941c72d2788b38e1ed (patch) | |
tree | 465ace4ca24b60ab07200a7e77f6f56aa1408651 | |
parent | b103ec73b27ad385241c806a21f8e2bdeae2f13a (diff) | |
parent | 5f5d03143de5e0c593da4ab18fc6393c2815e108 (diff) |
Merge tag 'wireless-drivers-for-davem-2017-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says:
====================
wireless-drivers fixes for 4.13
Two fixes for for brcmfmac, the crash was reported by two people
already so it's a high priority fix.
brcmfmac
* fix a crash in skb headroom handling in v4.13-rc1
* fix a memory leak due to a merge error in v4.6
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index 2153e8062b4c..5cc3a07dda9e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | |||
@@ -214,7 +214,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, | |||
214 | 214 | ||
215 | /* Make sure there's enough writeable headroom */ | 215 | /* Make sure there's enough writeable headroom */ |
216 | if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) { | 216 | if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) { |
217 | head_delta = drvr->hdrlen - skb_headroom(skb); | 217 | head_delta = max_t(int, drvr->hdrlen - skb_headroom(skb), 0); |
218 | 218 | ||
219 | brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n", | 219 | brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n", |
220 | brcmf_ifname(ifp), head_delta); | 220 | brcmf_ifname(ifp), head_delta); |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index c3ecec673eb7..f3556122c6ac 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | |||
@@ -4175,11 +4175,6 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) | |||
4175 | goto fail; | 4175 | goto fail; |
4176 | } | 4176 | } |
4177 | 4177 | ||
4178 | /* allocate scatter-gather table. sg support | ||
4179 | * will be disabled upon allocation failure. | ||
4180 | */ | ||
4181 | brcmf_sdiod_sgtable_alloc(bus->sdiodev); | ||
4182 | |||
4183 | /* Query the F2 block size, set roundup accordingly */ | 4178 | /* Query the F2 block size, set roundup accordingly */ |
4184 | bus->blocksize = bus->sdiodev->func[2]->cur_blksize; | 4179 | bus->blocksize = bus->sdiodev->func[2]->cur_blksize; |
4185 | bus->roundup = min(max_roundup, bus->blocksize); | 4180 | bus->roundup = min(max_roundup, bus->blocksize); |