Re: e1000e 0000:00:19.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x0000000052ff084a] [size=90 bytes]

Previous thread: Re: [lxc-devel] Poor bridging performance on 10 GbE by Daniel Lezcano on Wednesday, March 18, 2009 - 3:10 am. (6 messages)

Next thread: Re: [ANNOUNCE]: First release of nftables by Meelis Roos on Wednesday, March 18, 2009 - 5:00 am. (4 messages)

( e1000e Cc:s added. A new debug feature, CONFIG_DMA_API_DEBUG=y, 
  has triggered the warning below in e1000_put_txbuf(). )

--


There's a similar-looking warning triggering for the forcedeth 
driver as well on another test-system (see the details below).

Does anyone know whether there's a fix for this too, or is it a
new warning?

	Ingo

----- Forwarded message from Ingo Molnar <mingo@elte.hu> -----

Date: Wed, 18 Mar 2009 12:20:26 +0100
From: Ingo Molnar <mingo@elte.hu>
To: Joerg Roedel <joerg.roedel@amd.com>
Subject: forcedeth 0000:00:0a.0: DMA-API: device driver frees DMA memory
	with wrong function [device address=0x0000000035992232] [size=42
	bytes] [mapped as single] [unmapped as page]
Cc: Ingo Molnar <mingo@redhat.com>, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org


-tip testing found this DMA-debug assert:

[   19.648023] eth0: no link during initialization.
[   21.952553] eth0: link up.
[   22.684073] ------------[ cut here ]------------
[   22.688023] WARNING: at lib/dma-debug.c:562 check_unmap+0x30e/0x4b4()
[   22.688023] Hardware name: System Product Name
[   22.688023] 
forcedeth 0000:00:0a.0: DMA-API: device driver frees DMA memory with wrong function [device address=0x0000000035992232] [size=42 bytes] [mapped as single] [unmapped as page]
[   22.688023] Modules linked in:
[   22.688023] Pid: 1523, comm: arping Not tainted 2.6.29-rc8-tip #20999
[   22.688023] Call Trace:
[   22.688023]  [<c0140eae>] warn_slowpath+0x76/0xad
[   22.688023]  [<c0293a0b>] ? add_dma_entry+0x4b/0x51
[   22.688023]  [<c015eec5>] ? mark_lock+0x1c/0x16f
[   22.688023]  [<c015f1a4>] ? __lock_acquire+0x18c/0x296
[   22.688023]  [<c03473cc>] ? nv_start_xmit_optimized+0x3bd/0x3eb
[   22.688023]  [<c015eec5>] ? mark_lock+0x1c/0x16f
[   22.688023]  [<c015f1a4>] ? __lock_acquire+0x18c/0x296
[   22.688023]  [<c0293572>] check_unmap+0x30e/0x4b4
[   22.688023]  [<c055f7c3>] ? _spin_lock+0x27/0x2f
[   22.688023]  [<c0145ba1>] ? _local_bh_enable_ip+0xa1/0xa7
[   22.688023]  [<c049e0f8>] ? dev_queue_xmit+0x325/0x359
[   22.688023]  [<c0188922>] ? trace_hardirqs_on+0x21/0x23
[   22.688023]  ...

We are still looking for more testing from the general community of 
this patch, in particular if any tx hangs are reported.  Thanks in 
advance for any reports.--


Yeah - already picked it up into tip:out-of-tree and it passed about 
a hundred bootup tests on various e1000e using systems already - 
with no problems whatsoever. Will let you know if anything breaks - 
e1000e has been rock solid for me in the .29 cycle.

	Ingo
--


thanks! did you pull in both e1000 and e1000e fixes?  We also have a 
similar fix in internal testing for igb.
--


yeah, i picked up both - albeit i've switched over all boxes to 
e1000e so e1000 will get little testing from me. Do you have an sha1 
for the igb fix by any chance?

	Ingo
--


FYI, triggered a new type of DMA debug warning today, this time on 
an older box, in the boomerang/vortex 3c59x driver:

[  211.098328] eth0:  setting full-duplex.
[ 1745.974321] ------------[ cut here ]------------
[ 1745.980344] WARNING: at lib/dma-debug.c:627 check_for_illegal_area+0xa6/0xe4()
[ 1745.983613] 3c59x 0000:00:0b.0: DMA-API: device driver maps memory from kernel text or rodata [addr=c0fffe54] [size=428]
[ 1745.986521] Modules linked in:
[ 1745.986521] Pid: 19063, comm: distcc Not tainted 2.6.29-rc8-tip-02734-gfd4c260-dirty #729
[ 1745.993830] Call Trace:
[ 1745.996309]  [<c102e98b>] warn_slowpath+0x5e/0x74
[ 1746.001069]  [<c124de1e>] ? memcpy+0xe/0x31
[ 1746.005322]  [<c14eb801>] ? skb_put+0x62/0x7b
[ 1746.009732]  [<c15e0cf5>] ? _spin_unlock_irqrestore+0x19/0x25
[ 1746.011540]  [<c1006274>] ? enable_8259A_irq+0x45/0x48
[ 1746.016729]  [<c105ee38>] ? handle_level_irq+0xe3/0xef
[ 1746.021921]  [<c1004efb>] ? handle_irq+0x36/0x43
[ 1746.022582]  [<c1002c35>] ? restore_nocheck_notrace+0x0/0xe
[ 1746.028198]  [<c124e0e0>] ? trace_hardirqs_on_thunk+0xc/0x10
[ 1746.033900]  [<c1002c35>] ? restore_nocheck_notrace+0x0/0xe
[ 1746.035517]  [<c125724f>] check_for_illegal_area+0xa6/0xe4
[ 1746.041046]  [<c1258382>] debug_dma_map_page+0x12a/0x13b
[ 1746.043356]  [<c1316366>] boomerang_start_xmit+0x40b/0x54c
[ 1746.048900]  [<c109c226>] ? kmem_cache_free+0xf6/0xfe
[ 1746.054013]  [<c14f34ca>] dev_hard_start_xmit+0x101/0x171
[ 1746.055471]  [<c15081bc>] __qdisc_run+0xf4/0x21f
[ 1746.060143]  [<c14f5e02>] dev_queue_xmit+0x1e2/0x2dc
[ 1746.065162]  [<c1524fc8>] ip_finish_output+0x213/0x24d
[ 1746.066360]  [<c109a489>] ? check_object+0xfa/0x156
[ 1746.071291]  [<c15252f8>] ip_output+0x4e/0x51
[ 1746.075693]  [<c1523a51>] ip_local_out+0x39/0x42
[ 1746.080366]  [<c1525727>] ip_queue_xmit+0x2ce/0x314
[ 1746.085295]  [<c109d146>] ? __kmalloc_node_track_caller+0x165/0x172
[ 1746.087612]  [<c14ec135>] ? __alloc_skb+0x38/0x115
[ 1746.092458]  [<c15391de>] ? ...
Previous thread: Re: [lxc-devel] Poor bridging performance on 10 GbE by Daniel Lezcano on Wednesday, March 18, 2009 - 3:10 am. (6 messages)

Next thread: Re: [ANNOUNCE]: First release of nftables by Meelis Roos on Wednesday, March 18, 2009 - 5:00 am. (4 messages)