diff options
author | Rex Chang <rchang@ti.com> | 2018-01-16 21:16:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-17 22:19:37 +0100 |
commit | 5a717843177c96ca3fe4565187de395afdb28092 (patch) | |
tree | 8e4e6770752f4506041512037d132f423b0da0b3 /drivers/net/ethernet/ti | |
parent | tls: reset crypto_info when do_tls_setsockopt_tx fails (diff) | |
download | linux-5a717843177c96ca3fe4565187de395afdb28092.tar.xz linux-5a717843177c96ca3fe4565187de395afdb28092.zip |
Net: ethernet: ti: netcp: Fix inbound ping crash if MTU size is greater than 1500
In the receive queue for 4096 bytes fragments, the page address
set in the SW data0 field of the descriptor is not the one we got
when doing the reassembly in receive. The page structure was retrieved
from the wrong descriptor into SW data0 which is then causing a
page fault when UDP checksum is accessing data above 1500.
Signed-off-by: Rex Chang <rchang@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/netcp_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index ed58c746e4af..f5a7eb22d0f5 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -715,7 +715,7 @@ static int netcp_process_one_rx_packet(struct netcp_intf *netcp) /* warning!!!! We are retrieving the virtual ptr in the sw_data * field as a 32bit value. Will not work on 64bit machines */ - page = (struct page *)GET_SW_DATA0(desc); + page = (struct page *)GET_SW_DATA0(ndesc); if (likely(dma_buff && buf_len && page)) { dma_unmap_page(netcp->dev, dma_buff, PAGE_SIZE, |