mwifiex: avoid processing RX packets with invalid length
authorAvinash Patil <patila@marvell.com>
Fri, 12 Sep 2014 14:38:47 +0000 (20:08 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 15 Sep 2014 19:00:51 +0000 (15:00 -0400)
commit42a028aa952b66a039ee8c0a08ff4e3658246269
tree2f882c50a3c1d739439e7d6cf4cbeb62806f9171
parent3c99832d74777c9ec5545a92450fac5d37b0d0e1
mwifiex: avoid processing RX packets with invalid length

If rx_len received in interface header from FW is more than
RX buffer size, skb_put for such length results into skb_panic.
Avoid this by not processing such packets. We just print a warning
for such packets and free skb.

Reviewed-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/pcie.c