Skip to content

Commit 5a71784

Browse files
Rex Changdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6db959c commit 5a71784

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/ti/netcp_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ static int netcp_process_one_rx_packet(struct netcp_intf *netcp)
715715
/* warning!!!! We are retrieving the virtual ptr in the sw_data
716716
* field as a 32bit value. Will not work on 64bit machines
717717
*/
718-
page = (struct page *)GET_SW_DATA0(desc);
718+
page = (struct page *)GET_SW_DATA0(ndesc);
719719

720720
if (likely(dma_buff && buf_len && page)) {
721721
dma_unmap_page(netcp->dev, dma_buff, PAGE_SIZE,

0 commit comments

Comments
 (0)