linux/drivers
Isaku Yamahata 1ffb40b8ec xen-netfront: fix xennet_release_tx_bufs()
After restore on ia64 xen domain, kernel panics as follows.
This patch fixes it.

union skb_entry assumes sizeof(link->skb, pointer) ==
sizeof(list->link, unsigned).
However this isn't true on ia64. So  make link type unsigned long.
And introduced two accesor.

kernel unaligned access to 0xe0000000000000bd, ip=0xa0000001004c2ca0
xenwatch[14]: error during unaligned kernel access
 -1 [1]
Modules linked in:

Pid: 14, CPU 0, comm:             xenwatch
psr : 0000101008422010 ifs : 8000000000000307 ip  : [<a0000001004c2ca0>]    Not tainted (2.6.26-rc4xen-ia64-dirty)
ip is at dev_kfree_skb_irq+0x20/0x1a0
unat: 0000000000000000 pfs : 400000000000040b rsc : 0000000000000007
rnat: 0000000000000000 bsps: 0000000000000000 pr  : 000000000000a941
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c8a70433f
csd : 0000000000000000 ssd : 0000000000000000
b0  : a0000001003efb70 b6  : a000000100070e40 b7  : a000000100070e40
f6  : 1003e000000fcb75352b1 f7  : 1003e000000000014ff97
f8  : 1003e00fcb74fc3454d80 f9  : 1003e0000000080000000
f10 : 1003e0000000000001431 f11 : 1003e0000000000989680
r1  : a000000100bfcf80 r2  : e0000000000000bd r3  : 000000000000308c
r8  : 0000000000000000 r9  : e00000000fc31310 r10 : a000000100a13b28
r11 : 0000000000000000 r12 : e00000000fd0fdf0 r13 : e00000000fd08000
r14 : 0000000000000000 r15 : e00000000fcc8000 r16 : 0000000000000009
r17 : e000010000104000 r18 : e000010000104000 r19 : a000000100a13b40
r20 : a0000001009c23f0 r21 : a0000001009fd4d0 r22 : 0000000000004000
r23 : 0000000000000000 r24 : fffffffffff04c10 r25 : 0000000000000002
r26 : 0000000000000000 r27 : 0000000000000000 r28 : e00000000fd08bd4
r29 : a0000001007570b8 r30 : a0000001009e5500 r31 : a0000001009e54a0

Call Trace:
 [<a000000100026000>] show_stack+0x40/0xa0
                                sp=e00000000fd0f670 bsp=e00000000fd08f68
 [<a000000100026a60>] show_regs+0x9a0/0x9e0
                                sp=e00000000fd0f840 bsp=e00000000fd08f10
 [<a000000100037680>] die+0x260/0x3a0
                                sp=e00000000fd0f840 bsp=e00000000fd08ec8
 [<a000000100037810>] die_if_kernel+0x50/0x80
                                sp=e00000000fd0f840 bsp=e00000000fd08e98
 [<a00000010003eb40>] ia64_handle_unaligned+0x2ea0/0x2fc0
                                sp=e00000000fd0f840 bsp=e00000000fd08df0
 [<a00000010001ca30>] ia64_prepare_handle_unaligned+0x30/0x60
                                sp=e00000000fd0fa10 bsp=e00000000fd08df0
 [<a00000010005d100>] paravirt_leave_kernel+0x0/0x40
                                sp=e00000000fd0fc20 bsp=e00000000fd08df0
 [<a0000001004c2ca0>] dev_kfree_skb_irq+0x20/0x1a0
                                sp=e00000000fd0fdf0 bsp=e00000000fd08db8
 [<a0000001003efb70>] xennet_release_tx_bufs+0xd0/0x120
                                sp=e00000000fd0fdf0 bsp=e00000000fd08d78
 [<a0000001003f14c0>] backend_changed+0xc40/0xf80
                                sp=e00000000fd0fdf0 bsp=e00000000fd08d08
 [<a00000010034bd50>] otherend_changed+0x190/0x1c0
                                sp=e00000000fd0fe00 bsp=e00000000fd08cc8
 [<a000000100349530>] xenwatch_thread+0x310/0x3c0
                                sp=e00000000fd0fe00 bsp=e00000000fd08ca0
 [<a0000001000cb040>] kthread+0xe0/0x160
                                sp=e00000000fd0fe30 bsp=e00000000fd08c68
 [<a000000100024450>] kernel_thread_helper+0x30/0x60
                                sp=e00000000fd0fe30 bsp=e00000000fd08c40
 [<a00000010001a8a0>] start_kernel_thread+0x20/0x40
                                sp=e00000000fd0fe30 bsp=e00000000fd08c40
Kernel panic - not syncing: Aiee, killing interrupt handler!

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-16 10:55:36 +02:00
..
accessibility
acpi Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
amba
ata Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
atm firmware: convert Ambassador ATM driver to request_firmware() 2008-07-10 14:49:39 +01:00
auxdisplay Miguel Ojeda has moved 2008-07-04 10:40:05 -07:00
base Merge branch 'core/topology' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-15 10:32:39 -07:00
block block: convert pd_special_command to use blk_execute_rq 2008-07-15 21:21:45 +02:00
bluetooth Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6 2008-07-14 16:54:07 -07:00
cdrom cdrom: revert commit 22a9189 (cdrom: use kmalloced buffers instead of buffers on stack) 2008-07-04 09:52:14 +02:00
char Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
clocksource Fix printk format warning in clocksource/acpi_pm.c 2008-07-15 11:01:39 -07:00
connector CONNECTOR: add a proc entry to list connectors 2008-06-27 20:03:24 -07:00
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2008-06-09 11:27:55 -07:00
cpuidle smp_call_function: get rid of the unused nonatomic/retry argument 2008-06-26 11:24:35 +02:00
crypto crypto: ixp4xx - Select CRYPTO_AUTHENC 2008-07-13 20:12:11 +08:00
dca
dio
dma
edac
eisa
firewire Merge branch 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-07-15 12:39:44 -07:00
firmware Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2008-07-14 15:51:11 -07:00
gpio gpio: pca953x (i2c) handles max7310 too 2008-07-04 10:40:06 -07:00
gpu drm/radeon: fixup issue with radeon and PAT support. 2008-07-15 15:48:05 +10:00
hid Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
hwmon Merge commit 'origin/HEAD' into test-merge 2008-07-14 14:29:49 +10:00
i2c Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
ide ide-floppy: fix unfortunate function naming 2008-07-15 21:22:03 +02:00
ieee1394 Merge branch 'sbp2-spindown' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-07-15 12:39:44 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
input Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6 2008-07-14 14:48:31 -07:00
isdn Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
leds
lguest Merge branch 'generic-ipi' into generic-ipi-for-linus 2008-07-15 21:55:59 +02:00
macintosh Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
media Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6 2008-07-14 16:54:07 -07:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
mfd
misc Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6 2008-07-14 14:48:31 -07:00
mmc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-07-14 16:06:58 -07:00
mtd [MIPS] MTX-1 flash partition setup move to platform devices registration 2008-07-15 18:44:38 +01:00
net xen-netfront: fix xennet_release_tx_bufs() 2008-07-16 10:55:36 +02:00
nubus
of OpenFirmware: Include <linux/of_i2c.h> from of_i2c.c. 2008-07-12 12:10:52 -06:00
oprofile
parisc parisc-eisa_eeprom: BKL pushdown 2008-07-02 15:06:24 -06:00
parport
pci x86, VisWS: turn into generic arch, add early init quirks 2008-07-10 18:55:32 +02:00
pcmcia Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
pnp PNPACPI: use _CRS IRQ descriptor length for _SRS 2008-06-11 19:13:46 -04:00
power power_supply: Fix race in power_supply_uevent 2008-06-10 02:13:51 +04:00
ps3
rapidio rapidio: fix device reference counting 2008-07-10 18:04:43 -07:00
rtc Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-07-14 16:06:58 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
sbus Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-07-15 18:58:04 -07:00
serial Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
sh
sn
spi Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build 2008-07-15 15:44:51 +10:00
ssb ssb-pcicore: Fix IRQ-vector init on embedded devices 2008-07-07 15:31:40 -04:00
tc
telephony phonedev: cdev lock_kernel() pushdown 2008-06-20 14:05:48 -06:00
thermal thermal: Create CONFIG_THERMAL_HWMON=n 2008-06-25 19:25:42 -04:00
uio Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
usb Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6 2008-07-14 16:54:07 -07:00
video Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
virtio virtio: Complete feature negotation before updating status 2008-06-15 13:46:16 -07:00
w1
watchdog Merge commit 'origin/master' 2008-07-16 11:07:59 +10:00
xen Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-07-14 13:43:24 -07:00
zorro
Kconfig
Makefile drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00