* dma-debug warning with ixgbe
@ 2009-06-16 15:34 Joerg Roedel
2009-06-16 16:33 ` Brandeburg, Jesse
0 siblings, 1 reply; 3+ messages in thread
From: Joerg Roedel @ 2009-06-16 15:34 UTC (permalink / raw)
To: jesse.brandeburg; +Cc: e1000-devel, netdev, linux-kernel
Hi,
today I got this dma-debug warning with the ixgbe driver with a kernel
near 2.6.30-rc8.
------------[ cut here ]------------
WARNING: at /data/repos/linux-2.6-iommu/lib/dma-debug.c:806
check_unmap+0x214/0x5c3()
Hardware name: Toonie
ixgbe 0000:02:00.0: DMA-API: device driver frees DMA memory with
different size [device address=0x0000000000045c12] [map size=258
bytes] [unmap size=256 bytes]
Modules linked in: loop i2c_piix4 tpm_infineon rtc_cmos tpm
tpm_bios rtc_core rtc_lib button ata_generic pata_acpi usbhid
pata_atiixp ixgbe hid dca bnx2
Pid: 4391, comm: ifconfig Not tainted 2.6.30-rc81 #1
Call Trace:
[<ffffffff8039125a>] ? check_unmap+0x214/0x5c3
[<ffffffff80238d72>] warn_slowpath_common+0x77/0xa4
[<ffffffff80238e14>] warn_slowpath_fmt+0x64/0x66
[<ffffffff80391134>] ? check_unmap+0xee/0x5c3
[<ffffffff8058970b>] ? _spin_lock_irqsave+0x3f/0x4b
[<ffffffff80391134>] ? check_unmap+0xee/0x5c3
[<ffffffff8039125a>] check_unmap+0x214/0x5c3
[<ffffffff80391813>] debug_dma_unmap_page+0x51/0x53
[<ffffffffa002e29c>] ixgbe_clean_rx_ring+0xb9/0x1e4 [ixgbe]
[<ffffffffa002f2f6>] ixgbe_down+0x2f8/0x34e [ixgbe]
[<ffffffffa00307a8>] ixgbe_reinit_locked+0x59/0x70 [ixgbe]
[<ffffffffa0030837>] ixgbe_change_mtu+0x78/0x82 [ixgbe]
[<ffffffff804f56b5>] dev_set_mtu+0x3a/0x69
[<ffffffff804f688c>] dev_ifsioc+0xcf/0x2cc
[<ffffffff804f7018>] dev_ioctl+0x58f/0x647
[<ffffffff80351978>] ? avc_has_perm+0x4e/0x60
[<ffffffff804e4e7f>] sock_ioctl+0x21f/0x231
[<ffffffff802cb478>] vfs_ioctl+0x2a/0x78
[<ffffffff802cb934>] do_vfs_ioctl+0x46e/0x4aa
[<ffffffff80250521>] ? up_read+0x26/0x2b
[<ffffffff802cb9c5>] sys_ioctl+0x55/0x77
[<ffffffff8020afab>] system_call_fastpath+0x16/0x1b
---[ end trace f560e4a00a9d5d32 ]---
Mapped at:
[<ffffffff80391bca>] debug_dma_map_page+0x7c/0x11f
[<ffffffffa002b3ba>] ixgbe_alloc_rx_buffers+0x247/0x316 [ixgbe]
[<ffffffffa002bc5a>] ixgbe_configure+0x7d1/0x7e3 [ixgbe]
[<ffffffffa002ffb9>] ixgbe_open+0xed/0x63b [ixgbe]
[<ffffffff804f5d48>] dev_open+0x7c/0xc2
Joerg
--
| Advanced Micro Devices GmbH
Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
System |
Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
| Registergericht München, HRB Nr. 43632
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dma-debug warning with ixgbe
2009-06-16 15:34 dma-debug warning with ixgbe Joerg Roedel
@ 2009-06-16 16:33 ` Brandeburg, Jesse
2009-06-17 9:26 ` Joerg Roedel
0 siblings, 1 reply; 3+ messages in thread
From: Brandeburg, Jesse @ 2009-06-16 16:33 UTC (permalink / raw)
To: Joerg Roedel
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
On Tue, 16 Jun 2009, Joerg Roedel wrote:
> today I got this dma-debug warning with the ixgbe driver with a kernel
> near 2.6.30-rc8.
Hi Joerg, thanks for the report, I thought we had fixed all of these
already but we must have missed this one.
> ------------[ cut here ]------------
> WARNING: at /data/repos/linux-2.6-iommu/lib/dma-debug.c:806
> check_unmap+0x214/0x5c3()
> Hardware name: Toonie
> ixgbe 0000:02:00.0: DMA-API: device driver frees DMA memory with
> different size [device address=0x0000000000045c12] [map size=258
> bytes] [unmap size=256 bytes]
The following patch should fix it, compile tested only, but it is pretty
straight forward.
---
ixgbe: fix map length bug
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
ixgbe is mapping more than it unmaps, reduce the length of the map call and
remove the "used once" local variable.
found by Joerg Roedel <joerg.roedel@amd.com> in 2.6.30, so is a candidate for
-stable.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Joerg Roedel <joerg.roedel@amd.com>
---
drivers/net/ixgbe/ixgbe_main.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index a551a96..01c2193 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -563,7 +563,6 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
union ixgbe_adv_rx_desc *rx_desc;
struct ixgbe_rx_buffer *bi;
unsigned int i;
- unsigned int bufsz = rx_ring->rx_buf_len + NET_IP_ALIGN;
i = rx_ring->next_to_use;
bi = &rx_ring->rx_buffer_info[i];
@@ -593,7 +592,9 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
if (!bi->skb) {
struct sk_buff *skb;
- skb = netdev_alloc_skb(adapter->netdev, bufsz);
+ skb = netdev_alloc_skb(adapter->netdev,
+ (rx_ring->rx_buf_len +
+ NET_IP_ALIGN));
if (!skb) {
adapter->alloc_rx_buff_failed++;
@@ -608,7 +609,8 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
skb_reserve(skb, NET_IP_ALIGN);
bi->skb = skb;
- bi->dma = pci_map_single(pdev, skb->data, bufsz,
+ bi->dma = pci_map_single(pdev, skb->data,
+ rx_ring->rx_buf_len,
PCI_DMA_FROMDEVICE);
}
/* Refresh the desc even if buffer_addrs didn't change because
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: dma-debug warning with ixgbe
2009-06-16 16:33 ` Brandeburg, Jesse
@ 2009-06-17 9:26 ` Joerg Roedel
0 siblings, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2009-06-17 9:26 UTC (permalink / raw)
To: Brandeburg, Jesse
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
On Tue, Jun 16, 2009 at 09:33:15AM -0700, Brandeburg, Jesse wrote:
> On Tue, 16 Jun 2009, Joerg Roedel wrote:
> > today I got this dma-debug warning with the ixgbe driver with a kernel
> > near 2.6.30-rc8.
>
> Hi Joerg, thanks for the report, I thought we had fixed all of these
> already but we must have missed this one.
>
> > ------------[ cut here ]------------
> > WARNING: at /data/repos/linux-2.6-iommu/lib/dma-debug.c:806
> > check_unmap+0x214/0x5c3()
> > Hardware name: Toonie
> > ixgbe 0000:02:00.0: DMA-API: device driver frees DMA memory with
> > different size [device address=0x0000000000045c12] [map size=258
> > bytes] [unmap size=256 bytes]
>
> The following patch should fix it, compile tested only, but it is pretty
> straight forward.
Thanks for the quick answer :) But I tested the patch and the warning is
still there.
Joerg
--
| Advanced Micro Devices GmbH
Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
System |
Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
| Registergericht München, HRB Nr. 43632
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-17 9:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 15:34 dma-debug warning with ixgbe Joerg Roedel
2009-06-16 16:33 ` Brandeburg, Jesse
2009-06-17 9:26 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).