linux-stable/arch/arm
Aaro Koskinen 07fd296d3a ARM: OMAP1: fix USB configuration use-after-release
All boards, except Amstrad E3, mark USB config with __initdata.

As a result, when you compile USB into modules, they will try to refer
already released platform data and the behaviour is undefined. For example
on Nokia 770, I get the following kernel panic when modprobing ohci-hcd:

[    3.462158] Unable to handle kernel paging request at virtual address e7fddef0
[    3.477050] pgd = c3434000
[    3.487365] [e7fddef0] *pgd=00000000
[    3.498535] Internal error: Oops: 80000005 [#1] ARM
[    3.510955] Modules linked in: ohci_hcd(+)
[    3.522705] CPU: 0    Not tainted  (3.7.0-770_tiny+ #5)
[    3.535552] PC is at 0xe7fddef0
[    3.546508] LR is at ohci_omap_init+0x5c/0x144 [ohci_hcd]
[    3.560272] pc : [<e7fddef0>]    lr : [<bf003140>]    psr: a0000013
[    3.560272] sp : c344bdb0  ip : c344bce0  fp : c344bdcc
[    3.589782] r10: 00000001  r9 : 00000000  r8 : 00000000
[    3.604553] r7 : 00000026  r6 : 000000de  r5 : c0227300  r4 : c342d620
[    3.621032] r3 : e7fddef0  r2 : c048b880  r1 : 00000000  r0 : 0000000a
[    3.637786] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[    3.655822] Control: 0005317f  Table: 13434000  DAC: 00000015
[    3.672790] Process modprobe (pid: 425, stack limit = 0xc344a1b8)
[    3.690643] Stack: (0xc344bdb0 to 0xc344c000)
[    3.707031] bda0:                                     bf0030e4 c342d620 00000000 c049e62c
[    3.727905] bdc0: c344be04 c344bdd0 c0150ff0 bf0030f4 bf001b88 00000000 c048a4ac c345b020
[    3.748870] bde0: c342d620 00000000 c048a468 bf003968 00000001 bf006000 c344be34 c344be08
[    3.769836] be00: bf001bf0 c0150e48 00000000 c344be18 c00b9bfc c048a478 c048a4ac bf0037f8
[    3.790985] be20: c012ca04 c000e024 c344be44 c344be38 c012d968 bf001a84 c344be64 c344be48
[    3.812164] be40: c012c8ac c012d95c 00000000 c048a478 c048a4ac bf0037f8 c344be84 c344be68
[    3.833740] be60: c012ca74 c012c80c 20000013 00000000 c344be88 bf0037f8 c344beac c344be88
[    3.855468] be80: c012b038 c012ca14 c38093cc c383ee10 bf0037f8 c35be5a0 c049d5e8 00000000
[    3.877166] bea0: c344bebc c344beb0 c012c40c c012aff4 c344beec c344bec0 c012bfc0 c012c3fc
[    3.898834] bec0: bf00378c 00000000 c344beec bf0037f8 00067f39 00000000 00005c44 c000e024
[    3.920837] bee0: c344bf14 c344bef0 c012cd54 c012befc c04ce080 00067f39 00000000 00005c44
[    3.943023] bf00: c000e024 bf006000 c344bf24 c344bf18 c012db14 c012ccc0 c344bf3c c344bf28
[    3.965423] bf20: bf00604c c012dad8 c344a000 bf003834 c344bf7c c344bf40 c00087ac bf006010
[    3.987976] bf40: 0000000f bf003834 00067f39 00000000 00005c44 bf003834 00067f39 00000000
[    4.010711] bf60: 00005c44 c000e024 c344a000 00000000 c344bfa4 c344bf80 c004c35c c0008720
[    4.033569] bf80: c344bfac c344bf90 01422192 01427ea0 00000000 00000080 00000000 c344bfa8
[    4.056518] bfa0: c000dec0 c004c2f0 01422192 01427ea0 01427ea0 00005c44 00067f39 00000000
[    4.079406] bfc0: 01422192 01427ea0 00000000 00000080 b6e11008 014221aa be941fcc b6e1e008
[    4.102569] bfe0: b6ef6300 be941758 0000e93c b6ef6310 60000010 01427ea0 00000000 00000000
[    4.125946] Backtrace:
[    4.143463] [<bf0030e4>] (ohci_omap_init+0x0/0x144 [ohci_hcd]) from [<c0150ff0>] (usb_add_hcd+0x1b8/0x61c)
[    4.183898]  r6:c049e62c r5:00000000 r4:c342d620 r3:bf0030e4
[    4.205596] [<c0150e38>] (usb_add_hcd+0x0/0x61c) from [<bf001bf0>] (ohci_hcd_omap_drv_probe+0x17c/0x224 [ohci_hcd])
[    4.248138] [<bf001a74>] (ohci_hcd_omap_drv_probe+0x0/0x224 [ohci_hcd]) from [<c012d968>] (platform_drv_probe+0x1c/0x20)
[    4.292144]  r8:c000e024 r7:c012ca04 r6:bf0037f8 r5:c048a4ac r4:c048a478
[    4.316192] [<c012d94c>] (platform_drv_probe+0x0/0x20) from [<c012c8ac>] (driver_probe_device+0xb0/0x208)
[    4.360168] [<c012c7fc>] (driver_probe_device+0x0/0x208) from [<c012ca74>] (__driver_attach+0x70/0x94)
[    4.405548]  r6:bf0037f8 r5:c048a4ac r4:c048a478 r3:00000000
[    4.429809] [<c012ca04>] (__driver_attach+0x0/0x94) from [<c012b038>] (bus_for_each_dev+0x54/0x90)
[    4.475708]  r6:bf0037f8 r5:c344be88 r4:00000000 r3:20000013
[    4.500366] [<c012afe4>] (bus_for_each_dev+0x0/0x90) from [<c012c40c>] (driver_attach+0x20/0x28)
[    4.528442]  r7:00000000 r6:c049d5e8 r5:c35be5a0 r4:bf0037f8
[    4.553466] [<c012c3ec>] (driver_attach+0x0/0x28) from [<c012bfc0>] (bus_add_driver+0xd4/0x228)
[    4.581878] [<c012beec>] (bus_add_driver+0x0/0x228) from [<c012cd54>] (driver_register+0xa4/0x134)
[    4.629730]  r8:c000e024 r7:00005c44 r6:00000000 r5:00067f39 r4:bf0037f8
[    4.656738] [<c012ccb0>] (driver_register+0x0/0x134) from [<c012db14>] (platform_driver_register+0x4c/0x60)
[    4.706542] [<c012dac8>] (platform_driver_register+0x0/0x60) from [<bf00604c>] (ohci_hcd_mod_init+0x4c/0x8c [ohci_hcd])
[    4.757843] [<bf006000>] (ohci_hcd_mod_init+0x0/0x8c [ohci_hcd]) from [<c00087ac>] (do_one_initcall+0x9c/0x174)
[    4.808990]  r4:bf003834 r3:c344a000
[    4.832641] [<c0008710>] (do_one_initcall+0x0/0x174) from [<c004c35c>] (sys_init_module+0x7c/0x194)
[    4.881530] [<c004c2e0>] (sys_init_module+0x0/0x194) from [<c000dec0>] (ret_fast_syscall+0x0/0x2c)
[    4.930664]  r7:00000080 r6:00000000 r5:01427ea0 r4:01422192
[    4.956481] Code: bad PC value
[    4.978729] ---[ end trace 58280240f08342c4 ]---
[    5.002258] Kernel panic - not syncing: Fatal exception

Fix this by taking a copy of the data. Also mark Amstrad E3's data with
__initdata to save some memory with multi-board kernels.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-01-03 11:31:40 -08:00
..
boot watchdog: twl4030_wdt: add DT support 2013-01-02 12:07:05 +01:00
common Merge branch 'devel-stable' into for-linus 2012-12-11 10:01:53 +00:00
configs ARM: arm-soc: late cleanups for omap 2012-12-30 09:59:21 -08:00
crypto
include Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
kernel Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-12-20 17:56:23 -08:00
lib
mach-at91 Sound updates for 3.8-rc1 2012-12-13 11:51:23 -08:00
mach-bcm Add support for generic BCM SoC chipsets 2012-11-19 22:39:07 -08:00
mach-bcm2835 ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
mach-clps711x ARM: clps711x: Rename board files to match functionality 2012-11-21 09:57:46 -08:00
mach-cns3xxx ARM: arm-soc: Non-critical bug fixes 2012-12-12 11:32:16 -08:00
mach-davinci ARM: arm-soc fixes for 3.8 2012-12-20 07:21:54 -08:00
mach-dove ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
mach-ebsa110
mach-ep93xx ARM: ep93xx: properly wait for UART FIFO to be empty 2012-12-12 11:22:56 +11:00
mach-exynos Merge branch 'v3.8-samsung-fixes-audio' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes 2012-12-20 09:42:47 -08:00
mach-footbridge
mach-gemini
mach-h720x
mach-highbank Merge branch 'next/cam-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc 2012-11-30 09:27:57 -08:00
mach-imx ARM: imx: Move platform-mx2-emma to arch/arm/mach-imx/devices 2012-12-17 10:58:52 +01:00
mach-integrator ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-12-12 11:30:02 -08:00
mach-kirkwood ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
mach-ks8695
mach-l7200/include/mach
mach-lpc32xx
mach-mmp ARM: mmp: select pinctrl driver 2012-11-21 13:18:04 +08:00
mach-msm
mach-mv78xx0
mach-mvebu arm: mvebu: add L2 cache support 2012-11-27 15:35:05 +00:00
mach-mxs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-12-18 09:58:09 -08:00
mach-netx treewide: Fix typos in various drivers 2012-12-03 11:05:04 +01:00
mach-nomadik MTD pull for 3.8 2012-12-19 12:47:41 -08:00
mach-omap1 ARM: OMAP1: fix USB configuration use-after-release 2013-01-03 11:31:40 -08:00
mach-omap2 Some OMAP PRCM and sparse fixes against v3.8-rc1. A basic set of test 2013-01-03 11:04:21 -08:00
mach-orion5x arm: orion5x: convert 'LaCie Ethernet Disk mini v2' to Device Tree 2012-11-21 21:00:51 +00:00
mach-picoxcell
mach-prima2
mach-pxa Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-12-13 19:22:22 -08:00
mach-realview ARM: 7607/1: realview: fix private peripheral memory base for EB rev. B boards 2012-12-20 10:42:00 +00:00
mach-rpc
mach-s3c24xx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
mach-s3c64xx ARM: S3C64XX: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s3c2410
mach-s3c2412
mach-s3c2440
mach-s5p64x0 ARM: S5P64X0: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s5pc100 ARM: S5PC100: Add I2S clkdev support 2012-12-19 09:49:29 -08:00
mach-s5pv210 ARM: S5PV210: Avoid passing the clks through platform data 2012-12-19 09:49:29 -08:00
mach-sa1100
mach-shark
mach-shmobile fbdev changes for 3.8: 2012-12-15 13:03:48 -08:00
mach-socfpga
mach-spear3xx ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/ 2012-11-26 16:55:33 +05:30
mach-spear6xx
mach-spear13xx ARM: SPEAr1310: Fix AUXDATA for compact flash controller 2012-11-26 16:55:31 +05:30
mach-sunxi sunxi: Change the machine compatible string. 2012-12-23 18:20:15 +01:00
mach-tegra Merge tag 'tegra-for-3.8-fixes-for-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into fixes 2012-12-17 10:04:27 -08:00
mach-u300 ARM: arm-soc fixes for 3.8 2012-12-20 07:21:54 -08:00
mach-ux500 ARM: arm-soc fixes for 3.8 2012-12-20 07:21:54 -08:00
mach-versatile
mach-vexpress ARM: arm-soc: driver specific changes 2012-12-13 10:59:11 -08:00
mach-vt8500 ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
mach-w90x900
mach-zynq ARM: zynq: Remove all unused mach headers 2012-11-21 10:52:21 +01:00
mm Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-12-20 17:56:23 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-12-12 18:07:07 -08:00
nwfpe
oprofile
plat-iop
plat-omap Some OMAP PRCM and sparse fixes against v3.8-rc1. A basic set of test 2013-01-03 11:04:21 -08:00
plat-orion ARM: arm-soc: Updates for Marvell mvebu/kirkwood 2012-12-14 14:54:26 -08:00
plat-pxa
plat-s3c24xx Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-12-13 12:00:02 -08:00
plat-samsung ARM: SAMSUNG: Add missing include guard to gpio-core.h 2012-12-18 19:00:25 -08:00
plat-spear ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/ 2012-11-26 16:55:33 +05:30
plat-versatile ARM: arm-soc: SoC updates for 3.8 2012-12-12 12:05:15 -08:00
tools
vfp
xen Features: 2012-12-13 14:29:16 -08:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
Kconfig-nommu
Kconfig.debug ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00
Makefile ARM: arm-soc: multiplatform conversion patches 2012-12-13 10:57:16 -08:00