]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Sep 2017 16:19:06 +0000 (18:19 +0200)
commit07c72c7ece54346557186be54525894c7b1122f0
treeb04428b9f017f036ab7109dd6a02b78077699731
parent8e876b1b535103534565f83a038e535bf45af9e8
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