mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 00:42:16 +00:00
igb: fix panic while dumping packets on Tx hang with IOMMU
This patch resolves a "BUG: unable to handle kernel paging request at ..." oops while dumping packet data. The issue occurs with IOMMU enabled due to the address provided by phys_to_virt(). This patch avoids phys_to_virt() by making using skb->data and the address of the pages allocated for Rx. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
This commit is contained in:
parent
36471012e2
commit
b669588aba
@ -462,10 +462,10 @@ static void igb_dump(struct igb_adapter *adapter)
|
|||||||
(u64)buffer_info->time_stamp,
|
(u64)buffer_info->time_stamp,
|
||||||
buffer_info->skb, next_desc);
|
buffer_info->skb, next_desc);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
|
if (netif_msg_pktdata(adapter) && buffer_info->skb)
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
DUMP_PREFIX_ADDRESS,
|
DUMP_PREFIX_ADDRESS,
|
||||||
16, 1, phys_to_virt(buffer_info->dma),
|
16, 1, buffer_info->skb->data,
|
||||||
buffer_info->length, true);
|
buffer_info->length, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -547,18 +547,17 @@ rx_ring_summary:
|
|||||||
(u64)buffer_info->dma,
|
(u64)buffer_info->dma,
|
||||||
buffer_info->skb, next_desc);
|
buffer_info->skb, next_desc);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter)) {
|
if (netif_msg_pktdata(adapter) &&
|
||||||
|
buffer_info->dma && buffer_info->skb) {
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
DUMP_PREFIX_ADDRESS,
|
DUMP_PREFIX_ADDRESS,
|
||||||
16, 1,
|
16, 1, buffer_info->skb->data,
|
||||||
phys_to_virt(buffer_info->dma),
|
IGB_RX_HDR_LEN, true);
|
||||||
IGB_RX_HDR_LEN, true);
|
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
DUMP_PREFIX_ADDRESS,
|
DUMP_PREFIX_ADDRESS,
|
||||||
16, 1,
|
16, 1,
|
||||||
phys_to_virt(
|
page_address(buffer_info->page) +
|
||||||
buffer_info->page_dma +
|
buffer_info->page_offset,
|
||||||
buffer_info->page_offset),
|
|
||||||
PAGE_SIZE/2, true);
|
PAGE_SIZE/2, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user