mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-21 14:44:09 +00:00
brcmfmac: Fix use after free in brcmf_sdio_readframes()
The brcmu_pkt_buf_free_skb() function frees "pkt" so it leads to a
static checker warning:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1974 brcmf_sdio_readframes()
error: dereferencing freed memory 'pkt'
It looks like there was supposed to be a continue after we free "pkt".
Fixes: 4754fceeb9
("brcmfmac: streamline SDIO read frame routine")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
960da557f4
commit
216b44000a
1 changed files with 1 additions and 0 deletions
|
@ -1935,6 +1935,7 @@ static uint brcmf_sdio_readframes(struct brcmf_sdio *bus, uint maxframes)
|
||||||
BRCMF_SDIO_FT_NORMAL)) {
|
BRCMF_SDIO_FT_NORMAL)) {
|
||||||
rd->len = 0;
|
rd->len = 0;
|
||||||
brcmu_pkt_buf_free_skb(pkt);
|
brcmu_pkt_buf_free_skb(pkt);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
bus->sdcnt.rx_readahead_cnt++;
|
bus->sdcnt.rx_readahead_cnt++;
|
||||||
if (rd->len != roundup(rd_new.len, 16)) {
|
if (rd->len != roundup(rd_new.len, 16)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue