]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
wcn36xx: handle rx skb allocation failure to avoid system crash
authorFengwei Yin <fengwei.yin@linaro.org>
Sun, 20 Dec 2015 13:20:40 +0000 (21:20 +0800)
committerNicolas Dechesne <nicolas.dechesne@linaro.org>
Mon, 25 Jan 2016 16:09:33 +0000 (17:09 +0100)
commitbffaebc9438e65672495aad4a0ba7c16be0c2791
treef5f9aa365d7733f26f37eba386bf57cac9d18359
parent9c23e8d4b892abdfa0ceb55c828d0a3e19c54b52
wcn36xx: handle rx skb allocation failure to avoid system crash

Lawrence reported that git clone could make system crash on a
Qualcomm ARM soc based device (DragonBoard, 1G memory without
swap) running 64bit Debian.

It's turned out the crash is related with rx skb allocation
failure. git could consume more than 600MB anonymous memory.
And system is in extremely memory shortage case.

But driver didn't handle the rx allocation failure case. This patch
doesn't submit skb to upper layer if rx skb allocation fails.
Instead, it reuse the old skb for rx DMA again. It's more like
drop the packets if system is in memory shortage case.

With this change, git clone is OOMed instead of system crash.

Reported-by: King, Lawrence <lking@qti.qualcomm.com>
Signed-off-by: Fengwei Yin <fengwei.yin@linaro.org>
drivers/net/wireless/ath/wcn36xx/dxe.c