- e100-do-pci_dma_sync-after-skb_alloc-for-proper-operation-on-ixp4xx.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     e100: do pci_dma_sync after skb_alloc for proper operation on ixp4xx
has been removed from the -mm tree.  Its filename was
     e100-do-pci_dma_sync-after-skb_alloc-for-proper-operation-on-ixp4xx.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: e100: do pci_dma_sync after skb_alloc for proper operation on ixp4xx
From: Kevin Hao <kexin.hao@xxxxxxxxxxxxx>

Do a DMA sync after we've allocated a new skb and link it with the
previous RFD.  Otherwise the previous RFD may reference the previously
freed skb and cause kernel corruption.

Previously there was such a DMA sync at this place, but it was removed by
commit 7734f6e6bcd7ba78b00e93e74a4ddafd9886cdea.  Restoring this sync
operation eliminates the regression.

Signed-off-by: Kevin Hao <kexin.hao@xxxxxxxxxxxxx>
Auke Kok <auke-jan.h.kok@xxxxxxxxx>
Cc: <jeffrey.t.kirsher@xxxxxxxxx>
Cc: Jesse Brandeburg <jesse.brandeburg@xxxxxxxxx>
Cc: "Ronciak, John" <john.ronciak@xxxxxxxxx>
Cc: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: "Rafael J. Wysocki" <rjw@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/net/e100.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN drivers/net/e100.c~e100-do-pci_dma_sync-after-skb_alloc-for-proper-operation-on-ixp4xx drivers/net/e100.c
--- a/drivers/net/e100.c~e100-do-pci_dma_sync-after-skb_alloc-for-proper-operation-on-ixp4xx
+++ a/drivers/net/e100.c
@@ -1692,6 +1692,8 @@ static int e100_rx_alloc_skb(struct nic 
 	if (rx->prev->skb) {
 		struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
 		put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
+		pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
+			sizeof(struct rfd), PCI_DMA_TODEVICE);
 	}
 
 	return 0;
_

Patches currently in -mm which might be from kexin.hao@xxxxxxxxxxxxx are

linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux