[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20151124.130924.1365382562223060152.davem@davemloft.net>
Date: Tue, 24 Nov 2015 13:09:24 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: zhengsq@...k-chips.com
Cc: peppe.cavallaro@...com, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org, netdev@...r.kernel.org,
dianders@...gle.com
Subject: Re: [PATCH v1] net: stmmac: Free rx_skbufs before realloc
From: Shunqian Zheng <zhengsq@...k-chips.com>
Date: Sun, 22 Nov 2015 16:44:18 +0800
> From: ZhengShunQian <zhengsq@...k-chips.com>
>
> 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 <zhengsq@...k-chips.com>
This isn't really the right way to fix this.
I see two reasonable approaches:
1) suspend liberates the RX ring, although this approach is less
desirable
2) resume doesn't try to allocate already populated RX ring
entries
Freeing the whole RX ring just to allocate it again immediately
makes no sense at all and is wasteful work.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists