]> git.proxmox.com Git - mirror_ubuntu-disco-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)
commit958d104e3d40eef5148c402887138f6594ff7e1e
treee59239a1fdf3b59d8920b59077e02c6530810d9d
parentb70183db83552cf63cac51406aaf76a2cf5fca73
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: 899077791403 ("netcp: try to reduce type confusion in descriptors")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/netcp_core.c