]> git.baikalelectronics.ru Git - kernel.git/commit
netcp: fix regression in receive processing
authorArnd Bergmann <arnd@arndb.de>
Fri, 18 Dec 2015 14:18:08 +0000 (15:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Dec 2015 05:10:28 +0000 (00:10 -0500)
commitef9304eaa4dc92c22910417dcb3e5630388dde13
treee59239a1fdf3b59d8920b59077e02c6530810d9d
parent463dcc16e3a70ca4cc0020224378d67de5823b39
netcp: fix regression in receive processing

A cleanup patch I did was unfortunately wrong and introduced
multiple serious bugs in the netcp rx processing, as indicated
by these correct gcc warnings:

drivers/net/ethernet/ti/netcp_core.c:776:14: warning: 'buf_ptr' may be used uninitialized in this function [-Wuninitialized]
drivers/net/ethernet/ti/netcp_core.c:687:14: warning: 'ptr' may be used uninitialized in this function [-Wuninitialized]

I have checked the patch once more and found that a call to
get_pkt_info() accidentally got removed in netcp_free_rx_desc_chain,
and netcp_process_one_rx_packet no longer retrieved the correct
buffer length. This patch should fix all the known problems,
but I did not test on real hardware.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2e5ce844472f ("netcp: try to reduce type confusion in descriptors")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/netcp_core.c