From: Sergei Shtylyov <hidden> Date: 2015-10-29 21:50:51
Hello.
Here's a set of 2 patches against DaveM's 'net.git' repo which fix couple of
bugs in the sh_eth_ring_init() function.
[1/2] sh_eth: fix uninitialized arrays in sh_eth_ring_init()
[2/2] sh_eth: fix WARNING in dma_free_coherent()
MBR, Sergei
From: Sergei Shtylyov <hidden> Date: 2015-10-29 21:51:52
sh_eth_ring_free() called in the sh_eth_ring_init()'s error path expects
the arrays pointed by sh_eth_private::[rt]x_skbuff to be initialized with
NULLs but they are allocated with just kmalloc_array() and so left filled
with random data. Use kcalloc() instead.
Signed-off-by: Sergei Shtylyov <redacted>
---
drivers/net/ethernet/renesas/sh_eth.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
From: Sergei Shtylyov <hidden> Date: 2015-10-29 23:11:08
On 10/30/2015 12:52 AM, Sergei Shtylyov wrote:
Iff the first dma_alloc_coherent() call fails in sh_eth_ring_init(), the
following is printed to the kernel console:
WARNING: CPU: 0 PID: 1 at drivers/base/dma-mapping.c:334 dma_common_free_remap+0x48/0x6c()
Oops, I got the function name wrong in the subject. David, can you fix
this while applying or should I repost?
MBR, Sergei
From: Sergei Shtylyov <hidden> Date: 2015-10-30 20:47:22
Hello.
On 10/30/2015 02:11 AM, Sergei Shtylyov wrote:
quoted
Iff the first dma_alloc_coherent() call fails in sh_eth_ring_init(), the
following is printed to the kernel console:
WARNING: CPU: 0 PID: 1 at drivers/base/dma-mapping.c:334
dma_common_free_remap+0x48/0x6c()
Oops, I got the function name wrong in the subject. David, can you fix
this while applying or should I repost?
I guess I'll repost (forgot to CC Dave anyway)...
MBR, Sergei