[PATCH v1] net: stmmac: Free rx_skbufs before realloc

2015-11-22 Thread Shunqian Zheng
From: ZhengShunQian The init_dma_desc_rings() may realloc the rx_skbuff[] when suspend and resume. This patch free the rx_skbuff[] before reallocing memory. Signed-off-by: ZhengShunQian --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18

[RFC PATCH v1] Trying to fix the stmmac memory leak during suspend/resume

2015-11-22 Thread Shunqian Zheng
From: ZhengShunQian When I run Suspend-to-Ram stress test on my Rockchip RK3288(SoC) board that integrated stmmac ethernet, it always OOM after a few iterations, usually 50 times is enough to reproduce. Compiled kernel with KMEMLEAK feature, I got the logs as below: