OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74f12d5
)
wifi: mt76: mt76x02: fix return value check in mt76x02_mac_process_rx
author
Yuanjun Gong
<ruc_gongyuanjun@163.com>
Mon, 17 Jul 2023 14:50:08 +0000
(22:50 +0800)
committer
Felix Fietkau
<nbd@nbd.name>
Mon, 31 Jul 2023 08:56:17 +0000
(10:56 +0200)
in mt76x02_mac_process_rx(), return an error code if an
unexpected result is returned by pskb_trim.
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
index
3e41d80
..
d5db6ff
100644
(file)
--- a/
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
+++ b/
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c
@@
-853,7
+853,8
@@
int mt76x02_mac_process_rx(struct mt76x02_dev *dev, struct sk_buff *skb,
if (WARN_ON_ONCE(len > skb->len))
return -EINVAL;
- pskb_trim(skb, len);
+ if (pskb_trim(skb, len))
+ return -EINVAL;
status->chains = BIT(0);
signal = mt76x02_mac_get_rssi(dev, rxwi->rssi[0], 0);