linux/drivers
Jesse Brandeburg 679be3ba0c e1000: fix unmap bug
as reported by kerneloops.org

[  121.781161] ------------[ cut here ]------------
[  121.781171] WARNING: at lib/dma-debug.c:793 check_unmap+0x14e/0x577()
[  121.781173] Hardware name: S5520HC
[  121.781177] e1000 0000:0a:00.0: DMA-API: device driver tries to free DMA
memory it has not allocated [device address=0x00000001d688b0fa] [size=1522
bytes]
[  121.781180] Modules linked in: e1000 mdio  dca [last unloaded: ixgbe]
[  121.781187] Pid: 4793, comm: bash Tainted: P 2.6.30-master-06161113 #3
[  121.781190] Call Trace:
[  121.781195]  [<ffffffff8123056f>] ? check_unmap+0x14e/0x577
[  121.781201]  [<ffffffff81057a19>] warn_slowpath_common+0x77/0x8f
[  121.781205]  [<ffffffff81057ae1>] warn_slowpath_fmt+0x9f/0xa1
[  121.781212]  [<ffffffff81477ce2>] ? _spin_lock_irqsave+0x3f/0x49
[  121.781216]  [<ffffffff8122fa97>] ? get_hash_bucket+0x28/0x33
[  121.781220]  [<ffffffff8123056f>] check_unmap+0x14e/0x577
[  121.781225]  [<ffffffff810e4f48>] ? check_bytes_and_report+0x38/0xcb
[  121.781230]  [<ffffffff81230bbf>] debug_dma_unmap_page+0x80/0x92
[  121.781234]  [<ffffffff8122e549>] ? unmap_single+0x1a/0x4e
[  121.781239]  [<ffffffff813901e1>] ? __kfree_skb+0x74/0x78
[  121.781250]  [<ffffffffa00662ef>] pci_unmap_single+0x64/0x6d [e1000]
[  121.781259]  [<ffffffffa0066344>] e1000_clean_rx_ring+0x4c/0xbf [e1000]
[  121.781268]  [<ffffffffa00663df>] e1000_clean_all_rx_rings+0x28/0x36 [e1000]
[  121.781277]  [<ffffffffa0067464>] e1000_down+0x138/0x141 [e1000]
[  121.781286]  [<ffffffffa00681c2>] __e1000_shutdown+0x6b/0x198 [e1000]
[  121.781296]  [<ffffffffa0068405>] e1000_suspend+0x17/0x50 [e1000]
[  121.781301]  [<ffffffff81237665>] pci_legacy_suspend+0x3b/0xbe
[  121.781305]  [<ffffffff81237bc6>] pci_pm_suspend+0x3e/0xf1
[  121.781310]  [<ffffffff812eaf1c>] pm_op+0x57/0xde
[  121.781314]  [<ffffffff812eb444>] dpm_suspend_start+0x31e/0x470
[  121.781319]  [<ffffffff810877da>] suspend_devices_and_enter+0x3e/0x1a2
[  121.781323]  [<ffffffff81087a0f>] enter_state+0xd1/0x127
[  121.781327]  [<ffffffff8108717a>] state_store+0xa7/0xc9
[  121.781332]  [<ffffffff81221843>] kobj_attr_store+0x17/0x19
[  121.781336]  [<ffffffff8113c01e>] sysfs_write_file+0xe5/0x121
[  121.781341]  [<ffffffff810ed165>] vfs_write+0xab/0x105
[  121.781344]  [<ffffffff810ed279>] sys_write+0x47/0x6d
[  121.781349]  [<ffffffff81027aab>] system_call_fastpath+0x16/0x1b
[  121.781352] ---[ end trace 97bacaaac2ed7786 ]---

Fix is to correctly zero out internal ->dma value when unmapping
and make sure never to unmap unless there specifically was a mapping done.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-30 19:46:58 -07:00
..
accessibility
acpi Merge branch 'bjorn-notify' into release 2009-06-24 01:22:20 -04:00
amba
ata libata: don't set IORDY for reset 2009-06-23 01:54:30 -04:00
atm
auxdisplay
base Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
block hd: stop defining MAJOR_NR 2009-06-18 09:56:20 +02:00
bluetooth Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-06-15 03:02:23 -07:00
cdrom
char Remove low_latency flag setting from nozomi and mxser drivers 2009-06-24 09:55:50 -07:00
clocksource Merge branches 'sh/pci-express-integration', 'sh/rsk-updates', 'sh/platform-updates' and 'sh/perf_counter' 2009-06-17 16:37:26 +09:00
connector
cpufreq [CPUFREQ] Only set sampling_rate_max deprecated, sampling_rate_min is useful 2009-06-15 11:49:41 -04:00
cpuidle
crypto crypto: padlock-aes - work around Nano CPU errata in CBC mode 2009-06-18 19:31:09 +08:00
dca
dio
dma DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set 2009-06-24 18:34:40 +01:00
edac edac: Kconfig: fix the meaning of EDAC abbreviation 2009-06-18 13:03:57 -07:00
eisa Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-06-22 21:29:52 -07:00
firmware Pull for-2.6.31 into release 2009-06-17 09:35:24 -07:00
gpio gpio: driver for PrimeCell PL061 GPIO controller 2009-06-19 16:46:03 -07:00
gpu Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
hid Driver Core: usb: add nodename support for usb drivers. 2009-06-15 21:30:25 -07:00
hwmon Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
i2c i2c: driver for the Synopsys DesignWare I2C controller 2009-06-24 00:18:56 +01:00
ide ide cmd64x: Remove serialize setting. 2009-06-21 22:48:03 -07:00
idle
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-06-22 21:29:52 -07:00
ieee802154 ieee802154: fix kconfig bool/tristate muckup 2009-06-13 23:36:29 -07:00
infiniband Merge branches 'ehca', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus 2009-06-23 10:38:47 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-06-20 10:17:02 -07:00
isdn net: fix network drivers ndo_start_xmit() return values 2009-06-17 04:31:16 -07:00
leds
lguest
macintosh Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-06-16 11:29:17 -07:00
mca
md dm mpath: change to be request based 2009-06-22 10:12:37 +01:00
media V4L/DVB (12131): BUGFIX: An incorrect Carrier Recovery Loop optimization table was being 2009-06-23 03:29:57 -03:00
memstick
message fusion: mptsas, fix lock imbalance 2009-06-22 08:54:14 -05:00
mfd [WATCHDOG] twl4030 watchdog driver 2009-06-20 18:39:43 +00:00
misc gru: copyright fixes 2009-06-18 13:04:04 -07:00
mmc sdhci: remove needless double parenthesis 2009-06-21 21:01:00 +02:00
mtd Merge git://git.infradead.org/mtd-2.6 2009-06-22 16:56:22 -07:00
net e1000: fix unmap bug 2009-06-30 19:46:58 -07:00
nubus
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-06-15 09:40:05 -07:00
oprofile
parisc parisc: remove driver_data direct access of struct device 2009-06-15 21:30:28 -07:00
parport parport_pc: set properly the dma_mask for parport_pc device 2009-06-22 11:29:00 -07:00
pci Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2009-06-24 10:17:07 -07:00
pcmcia Merge branch 'akpm' 2009-06-16 19:50:13 -07:00
platform asus-laptop: remove EXPERIMENTAL dependency 2009-06-24 01:34:00 -04:00
pnp Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
power
pps LinuxPPS: core support 2009-06-18 13:04:04 -07:00
ps3 drivers/ps3: Add missing annotations 2009-06-15 16:47:25 +10:00
rapidio rio: warn_unused_result warnings fix 2009-06-15 21:45:32 -05:00
regulator regulator/max1586: fix V3 gain calculation integer overflow 2009-06-15 11:18:27 +01:00
rtc rtc: make rtc_update_irq callable with irqs enabled 2009-06-19 16:46:05 -07:00
s390 [S390] dasd: fix refcounting in dasd_change_state 2009-06-22 12:08:23 +02:00
sbus openprom: Squelch useless GCC warning. 2009-06-16 04:56:57 -07:00
scsi [SCSI] scsi_transport_fc: replace BUS_ID_SIZE by fixed count 2009-06-21 12:11:43 -05:00
serial pci: use pci_ioremap_bar() in drivers/serial 2009-06-24 09:55:50 -07:00
sh
sn
spi spi_mpc8xxx: s/83xx/8xxx/g 2009-06-19 16:46:05 -07:00
ssb
staging Staging: octeon-ethernet: Fix race freeing transmit buffers. 2009-06-24 18:34:41 +01:00
tc
telephony
thermal thermal: remove driver_data direct access of struct device 2009-06-15 21:30:27 -07:00
uio
usb Merge commit 'origin/master' into next 2009-06-18 11:16:55 +10:00
uwb
video nvidiafb: fix boot-time printk string 2009-06-23 12:50:05 -07:00
virtio
vlynq drivers: add support for the TI VLYNQ bus 2009-06-16 19:47:52 -07:00
w1 Merge git://git.infradead.org/battery-2.6 2009-06-24 14:35:57 -07:00
watchdog [WATCHDOG] wdt_pci.c: remove #ifdef CONFIG_WDT_501_PCI 2009-06-23 07:13:52 +00:00
xen
zorro
Kconfig LinuxPPS: core support 2009-06-18 13:04:04 -07:00
Makefile LinuxPPS: core support 2009-06-18 13:04:04 -07:00