linux/drivers
Anton Vorontsov 6f051069d8 phylib: Fix oops in suspend/resume paths
Suspend/resume routines check for phydrv != NULL, but that is
wrong because "phydrv" comes from container_of(drv). If drv is NULL,
then container_of(drv) will return non-NULL result, and the checks
won't work.

The Freescale TBI PHYs are driver-less, so "drv" is NULL, and that
leads to the following oops:

Unable to handle kernel paging request for data at address 0xffffffe4
Faulting instruction address: 0xc0215554
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c0215554] mdio_bus_suspend+0x34/0x70
LR [c01cc508] suspend_device+0x258/0x2bc
Call Trace:
[cfad3da0] [cfad3db8] 0xcfad3db8 (unreliable)
[cfad3db0] [c01cc508] suspend_device+0x258/0x2bc
[cfad3dd0] [c01cc62c] dpm_suspend+0xc0/0x140
[cfad3e20] [c01cc6f4] device_suspend+0x48/0x5c
[cfad3e40] [c0068dd8] suspend_devices_and_enter+0x8c/0x148
[cfad3e60] [c00690f8] enter_state+0x100/0x118
[cfad3e80] [c00691c0] state_store+0xb0/0xe4
[cfad3ea0] [c018c938] kobj_attr_store+0x24/0x3c
[cfad3eb0] [c00ea9a8] flush_write_buffer+0x58/0x7c
[cfad3ed0] [c00eadf0] sysfs_write_file+0x58/0xa0
[cfad3ef0] [c009e810] vfs_write+0xb4/0x16c
[cfad3f10] [c009ed40] sys_write+0x4c/0x90
[cfad3f40] [c0014954] ret_from_syscall+0x0/0x38
[...]

This patch fixes the issue, plus removes unneeded parentheses
and fixes indentation level in mdio_bus_suspend().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-22 13:51:24 -08:00
..
accessibility
acpi Merge branch 'misc' into release 2009-01-16 14:45:34 -05:00
amba [ARM] Fix realview build 2009-01-08 16:29:41 +00:00
ata sata_fsl: Return non-zero on error in probe() 2009-01-16 10:23:58 -05:00
atm generic swap(): iphase: rename swap() to swap_byte_order() 2009-01-08 08:31:14 -08:00
auxdisplay
base Revert "driver core: create a private portion of struct device" 2009-01-09 15:06:12 -08:00
block powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block 2009-01-16 16:15:13 +11:00
bluetooth
cdrom
char hvc_console: Remove tty->low_latency 2009-01-16 16:15:16 +11:00
clocksource
connector
cpufreq Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-10 06:12:18 -08:00
cpuidle
crypto
dca
dio m68k: dio - Kill resource_size_t format warnings 2009-01-12 20:56:42 +01:00
dma
edac
eisa
firewire firewire: core: fix sleep in atomic context due to driver core change 2009-01-09 23:22:32 +01:00
firmware dell_rbu: use scnprintf() instead of less secure sprintf() 2009-01-17 14:27:18 -08:00
gpio gpio: fix probe() error return in gpio driver probes 2009-01-15 16:39:35 -08:00
gpu drm/i915: lock correct mutex around object unreference. 2009-01-16 18:45:22 +10:00
hid Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2009-01-07 15:37:24 -08:00
hwmon Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2009-01-15 16:40:12 -08:00
i2c powerpc/83xx: Move mcu_mpc8349emitx driver out of drivers/i2c/chips/ 2009-01-13 17:46:31 -06:00
ide ide: fix suspend regression 2009-01-14 19:19:04 +01:00
idle
ieee1394 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-01-08 11:05:59 -08:00
infiniband Merge branches 'ehca', 'ipoib' and 'mlx4' into for-linus 2009-01-16 15:05:54 -08:00
input input: PCF50633 input driver 2009-01-11 01:34:25 +01:00
isdn i4l: minor cleanups 2009-01-14 14:42:21 -08:00
leds lis3lv02d: merge with leds hp disk 2009-01-15 16:39:40 -08:00
lguest
macintosh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
mca
md md: don't retry recovery of raid1 that fails due to error on source drive. 2009-01-09 08:31:11 +11:00
media Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-01-08 11:05:59 -08:00
memstick memstick: annotate endianness of attribute structs 2009-01-09 16:54:41 -08:00
message [SCSI] mpt fusion: Add Firmware debug support 2009-01-13 10:36:02 -06:00
mfd Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-01-13 14:52:35 -08:00
misc Merge branch 'misc' into release 2009-01-16 14:45:34 -05:00
mmc Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2009-01-09 11:52:14 -08:00
mtd Merge git://git.infradead.org/mtd-2.6 2009-01-09 12:37:15 -08:00
net phylib: Fix oops in suspend/resume paths 2009-01-22 13:51:24 -08:00
nubus
of drivers/of: Add the of_find_i2c_device_by_node function. 2009-01-09 15:49:06 -07:00
oprofile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile 2009-01-09 12:43:06 -08:00
parisc fix early_serial_setup() regression 2009-01-13 14:03:43 -08:00
parport
pci ACPI PCI hotplug: harden against panic regression 2009-01-16 15:20:00 -05:00
pcmcia powerpc: Change u64/s64 to a long long integer type 2009-01-13 14:47:59 +11:00
platform Merge branch 'misc' into release 2009-01-16 14:45:34 -05:00
pnp Merge branch 'linus' into release 2009-01-09 03:39:43 -05:00
power power_supply: PCF50633 battery charger driver 2009-01-11 01:34:24 +01:00
ps3 powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3 2009-01-16 16:15:14 +11:00
rapidio
regulator move wm8400-regulator's probe function to .devinit.text 2009-01-17 13:46:40 +00:00
rtc rtc: rtc-twl4030 don't mask alarm interrupts on shutdown 2009-01-15 16:39:36 -08:00
s390 qeth: fix usage of netdev_ops 2009-01-11 00:05:16 -08:00
sbus
scsi Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-01-16 08:41:09 -08:00
serial serial: Add 16850 uart type support to OF uart driver 2009-01-16 16:15:17 +11:00
sh
sn
spi atmel_spi: allow transfer when max_speed_hz = 0 2009-01-15 16:39:35 -08:00
ssb
staging Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-01-07 17:22:04 -08:00
tc
telephony
thermal
uio
usb drivers/usb/core/hub.c: fix CONFIG_USB_OTG=y build 2009-01-15 16:39:41 -08:00
uwb Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-01-08 11:05:59 -08:00
video powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video 2009-01-16 16:15:15 +11:00
virtio
w1 w1: send status messages after command processing 2009-01-08 08:31:14 -08:00
watchdog [WATCHDOG] Pika Warp appliance watchdog timer 2009-01-12 20:08:56 +00:00
xen xen: add xenfs to allow usermode <-> Xen interaction 2009-01-08 08:30:59 -08:00
zorro m68k: zorro - Use %pR to print resources 2009-01-12 20:56:43 +01:00
Kconfig
Makefile Merge branch 'drivers-platform' into release 2009-01-09 04:56:56 -05:00