rpms/kernel/devel linux-2.6-net-velocity-dma.patch, NONE, 1.1 kernel.spec, 1.1429, 1.1430
Dave Jones
davej at fedoraproject.org
Fri Mar 13 20:18:16 UTC 2009
- Previous message (by thread): rpms/perl-Glib/devel perl-Glib.spec,1.31,1.32
- Next message (by thread): rpms/kanyremote/F-10 .cvsignore, 1.13, 1.14 import.log, 1.13, 1.14 kanyremote.spec, 1.14, 1.15 sources, 1.16, 1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4171
Modified Files:
kernel.spec
Added Files:
linux-2.6-net-velocity-dma.patch
Log Message:
Fix DMA leak in Velocity TX path
linux-2.6-net-velocity-dma.patch:
--- NEW FILE linux-2.6-net-velocity-dma.patch ---
The DMA debug patches caught this..
via-velocity 0000:00:0e.0: DMA-API: device driver frees DMA memory with different size [device address=0x000000001a4c8ca2] [map size=60 bytes] [unmap size=54 bytes]
Signed-off-by: Dave Jones <davej at redhat.com>
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index c5691fd..cd34dda 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -1838,6 +1838,7 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_
{
struct sk_buff *skb = tdinfo->skb;
int i;
+ int pktlen;
/*
* Don't unmap the pre-allocated tx_bufs
@@ -1845,10 +1846,12 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_
if (tdinfo->skb_dma) {
for (i = 0; i < tdinfo->nskb_dma; i++) {
+ pktlen = max_t(unsigned, skb->len, ETH_ZLEN);
+
#ifdef VELOCITY_ZERO_COPY_SUPPORT
pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], le16_to_cpu(td->tdesc1.len), PCI_DMA_TODEVICE);
#else
- pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], skb->len, PCI_DMA_TODEVICE);
+ pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], pktlen, PCI_DMA_TODEVICE);
#endif
tdinfo->skb_dma[i] = 0;
}
@@ -2080,17 +2083,14 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev)
struct tx_desc *td_ptr;
struct velocity_td_info *tdinfo;
unsigned long flags;
- int pktlen = skb->len;
+ int pktlen;
__le16 len;
int index;
-
- if (skb->len < ETH_ZLEN) {
- if (skb_padto(skb, ETH_ZLEN))
- goto out;
- pktlen = ETH_ZLEN;
- }
+ if (skb_padto(skb, ETH_ZLEN))
+ goto out;
+ pktlen = max_t(unsigned, skb->len, ETH_ZLEN);
len = cpu_to_le16(pktlen);
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1429
retrieving revision 1.1430
diff -u -r1.1429 -r1.1430
--- kernel.spec 13 Mar 2009 14:49:31 -0000 1.1429
+++ kernel.spec 13 Mar 2009 20:17:45 -0000 1.1430
@@ -661,7 +661,9 @@
Patch2000: linux-2.6-e1000-ich9.patch
# Fix DEBUG_SHIRQ problem in tulip driver. (454575)
-Patch2030: linux-2.6-net-tulip-interrupt.patch
+Patch2001: linux-2.6-net-tulip-interrupt.patch
+# Fix DMA alloc bug in velocity
+Patch2002: linux-2.6-net-velocity-dma.patch
# linux1394 git patches
Patch2200: linux-2.6-firewire-git-update.patch
@@ -1198,6 +1200,7 @@
ApplyPatch linux-2.6-e1000-ich9.patch
ApplyPatch linux-2.6-net-tulip-interrupt.patch
+ApplyPatch linux-2.6-net-velocity-dma.patch
ApplyPatch agp-set_memory_ucwb.patch
# Nouveau DRM + drm fixes
@@ -1813,6 +1816,11 @@
# and build.
%changelog
+* Fri Mar 13 2009 Dave Jones <davej at redhat.com> 2.6.29-0.250.rc8
+- Fix DMA leak in Velocity TX path
+
+
+
* Fri Mar 13 2009 Mauro Carvalho Chehab <mchehab at redhat.com
- v4l-dvb patches: Add experimental cx231xx, plus more fixes and updates
- Previous message (by thread): rpms/perl-Glib/devel perl-Glib.spec,1.31,1.32
- Next message (by thread): rpms/kanyremote/F-10 .cvsignore, 1.13, 1.14 import.log, 1.13, 1.14 kanyremote.spec, 1.14, 1.15 sources, 1.16, 1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list