Openwrt/target/linux/brcm63xx/patches-3.14
Jonas Gorski eed031d460 brcm63xx: brcm63xxpart: fix buffer overrun in of parser
We never account for the added partitions from the tag parser, so
allocated two partioness less than needed. This can cause issues when
the memory gets reused before the mtd code can actually add the
partitions.

Fixes oopses like:
[    0.920000] mtd: device 2 (rootfs) set to be root filesystem
[    0.924000] 1 squashfs-split partitions found on MTD device rootfs
[    0.932000] 0x0000002e0000-0x0000003f0000 : "rootfs_data"
[    0.940000] 0x000000010000-0x0000003f0000 : "linux"
[    0.948000] CPU 0 Unable to handle kernel paging request at virtual address 00010203, epc == 8028ddf8, ra == 801ad5d4
[    0.956000] Oops[#1]:
[    0.956000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.8 #22
[    0.956000] task: 8181da78 ti: 8181e000 task.ti: 8181e000
[    0.956000] $ 0   : 00000000 10008f00 00010203 81049e40
[    0.956000] $ 4   : 00010203 000000d0 00000000 000000fd
[    0.956000] $ 8   : 00000000 80015490 00000000 80370000
[    0.956000] $12   : 00000000 00000001 00000000 2f736269
[    0.956000] $16   : 00010203 000000d0 8007bde0 81482000
[    0.956000] $20   : 00000000 00000004 81481f80 803c4b78
[    0.956000] $24   : 00000000 00000000
[    0.956000] $28   : 8181e000 8181fbe8 80b20000 801ad5d4
[    0.956000] Hi    : 00000000
[    0.956000] Lo    : 00000000
[    0.956000] epc   : 8028ddf8 strlen+0x4/0x20
[    0.956000]     Not tainted
[    0.956000] ra    : 801ad5d4 kstrdup+0x30/0x84
[    0.956000] Status: 10008f03 KERNEL EXL IE
[    0.956000] Cause : 00800008
[    0.956000] BadVA : 00010203
[    0.956000] PrId  : 0002a010 (Broadcom BMIPS4350)
[    0.956000] Modules linked in:
[    0.956000] Process swapper/0 (pid: 1, threadinfo=8181e000, task=8181da78, tls=00000000)
[    0.956000] Stack : 8148aa00 803c4bcc 00000000 801cd9d0 00000000 8148a400 818a1400 003f0000
          81482000 8007bde0 8148aa00 800ac78c 8148aa00 00000004 8037ae30 8181fc4c
          8148aa00 803bc074 803c0000 80074b84 00000000 00010000 00000004 ffffffff
          8037ae30 00000004 8148aa00 00000004 803c4b80 818a1400 803c0000 00000005
          81481f80 80074ce0 8181fc84 00000005 81879800 8008ece4 00000000 003f0000
          ...
[    0.956000] Call Trace:
[    0.956000] [<8028ddf8>] strlen+0x4/0x20
[    0.956000] [<801ad5d4>] kstrdup+0x30/0x84
[    0.956000] [<8007bde0>] allocate_partition+0x58/0x93c
[    0.956000] [<80074ce0>] add_mtd_partitions+0x90/0x144
[    0.956000] [<801cc228>] mtd_device_parse_register+0x78/0xcc
[    0.956000] [<801e7870>] of_flash_probe+0x658/0x728
[    0.956000] [<80216ee0>] platform_drv_probe+0x24/0x60
[    0.956000] [<801221f4>] driver_probe_device+0xcc/0x214
[    0.956000] [<800466f8>] __driver_attach+0x7c/0xb4
[    0.956000] [<800c38bc>] bus_for_each_dev+0x94/0xa4
[    0.956000] [<800c35e4>] bus_add_driver+0x104/0x1ec
[    0.956000] [<80122400>] driver_register+0xac/0x100
[    0.956000] [<80113a5c>] do_one_initcall+0x148/0x204
[    0.956000] [<803cbd1c>] kernel_init_freeable+0x168/0x220
[    0.956000] [<800157bc>] kernel_init+0x10/0x114
[    0.956000] [<800108a8>] ret_from_kernel_thread+0x14/0x1c
[    0.956000]
[    0.956000]
Code: 03e00008  27bd0028  00801021 <80430000> 10600003  00000000  080a377e  24420001  03e00008
[    1.192000] ---[ end trace 9d89ccbcae27fe40 ]---
[    1.200000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    1.200000]
[    1.200000] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44787
2015-03-15 14:19:22 +00:00
..
001-of-Create-unlocked-version-of-for_each_child_of_node.patch
001-spi-spi-gpio-Add-dt-support-for-a-single-device-with.patch brcm63xx: backport and enable DT spi-gpio no CS support 2015-02-27 23:48:48 +00:00
002-lib-add-glibc-style-strchrnul-variant.patch
003-of-Make-of_find_node_by_path-handle-aliases.patch
010-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-registe.patch
011-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-irq-setup-co.patch
012-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-reset-code.patch
013-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-gpio.patch
014-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-spi-code.patch
015-MIPS-BCM63XX-remove-RUNTIME_DETECT-usage-from-enet-c.patch
016-MIPS-BCM63XX-remove-RUNTIME_DETECT-in-cpu-feature-ov.patch
017-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-for-bcmcpu_g.patch
018-MIPS-BCM63XX-add-width-to-__dispatch_internal.patch
019-MIPS-BCM63XX-move-bcm63xx_init_irq-down.patch
020-MIPS-BCM63XX-replace-irq-dispatch-code-with-a-generi.patch
021-MIPS-BCM63XX-append-irq-line-to-irq_-stat-mask.patch
022-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch
023-MIPS-BCM63XX-add-cpu-argument-to-dispatch-internal.patch
024-MIPS-BCM63XX-protect-irq-register-accesses.patch
025-MIPS-BCM63XX-wire-up-the-second-cpu-s-irq-line.patch
026-MIPS-BCM63XX-use-irq_desc-as-argument-for-un-mask.patch
027-MIPS-BCM63XX-allow-setting-affinity-for-IPIC.patch
030-MIPS-Always-use-IRQ-domains-for-CPU-IRQs.patch
031-MIPS-Rename-mips_cpu_intc_init-mips_cpu_irq_of_init.patch
032-MIPS-Provide-a-generic-plat_irq_dispatch.patch
100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch
101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch
101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch
103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch
104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch
105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch
106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch
107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch
108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch
109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch
110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch
201-SPI-Allow-specifying-the-parsers-for-SPI-flash.patch
202-MTD-DEVICES-m25p80-use-parsers-if-provided-in-flash-.patch
203-MTD-DEVICES-m25p80-add-support-for-limiting-reads.patch
204-USB-OHCI-allow-other-arches-to-use-the-BE-frame-numb.patch
206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch
207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch
208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch
300-reset_buttons.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
301-led_count.patch
302-extended-platform-devices.patch
303-spi-board-info.patch
309-cfe_version_mod.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
310-cfe_simplify_detection.patch
311-bcm63xxpart_use_cfedetection.patch
320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
321-irqchip-add-support-for-bcm6345-style-external-inter.patch
322-MIPS-BCM63XX-switch-to-IRQ_DOMAIN.patch
323-MIPS-BCM63XX-wire-up-BCM6358-s-external-interrupts-4.patch
330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
331-MIPS-BCM63XX-define-variant-id-field.patch
332-MIPS-BCM63XX-detect-BCM6328-variants.patch
333-MIPS-BCM63XX-detect-BCM6362-variants.patch
334-MIPS-BCM63XX-detect-BCM6368-variants.patch
335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch
336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch
337-MIPS-BCM63XX-widen-cpuid-field.patch
338-MIPS-BCM63XX-increase-number-of-IRQs.patch
339-MIPS-BCM63XX-add-support-for-BCM63268.patch brcm63xx: fix BCM63268 interrupt register locations for legacy probe 2015-02-28 19:59:34 +00:00
340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch
341-MIPS-BCM63XX-add-support-for-BCM6318.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
342-MIPS-BCM63XX-split-PCIe-reset-signals.patch
343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch
344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch
345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch
346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch
347-MIPS-BCM6318-USB-support.patch
348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch
349-MIPS-BCM63XX-add-BCM63268-USB-support.patch
350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch
351-set-board-usbh-ports.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch
356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch
357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch
358-MIPS-BCM63XX-make-fallback-sprom-optional.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
359-MIPS-BCM63XX-allow-different-types-of-sprom.patch
360-MIPS-BCM63XX-add-support-for-raw-sproms.patch
361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch
362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch
363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch
364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch
365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch
366-MIPS-add-support-for-vmlinux.bin-appended-DTB.patch
367-MIPS-BCM63XX-add-support-for-loading-DTB.patch
368-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
371_add_of_node_available_by_alias.patch
372_dont_register_pflash_when_available_in_dtb.patch
373-MIPS-BCM63XX-register-interrupt-controllers-through-.patch
374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch brcm63xx: fix gpio register usage 2015-02-28 19:59:26 +00:00
375-MIPS-BCM63XX-switch-to-new-gpio-driver.patch brcm63xx: fix gpio register usage 2015-02-28 19:59:26 +00:00
376-net-bcm63xx_enet-use-named-gpio-for-ephy-reset-gpio.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
377-MIPS-BCM63XX-register-lookup-for-ephy-reset-gpio.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
378-MIPS-BCM63XX-calculate-labels-for-DT-registered-cont.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
400-bcm963xx_flashmap.patch
401-bcm963xx_real_rootfs_length.patch
402_bcm63xx_enet_vlan_incoming_fixed.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
403-6358-enet1-external-mii-clk.patch
404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
412-MTD-physmap-allow-passing-pp_data.patch
413-BCM63XX-allow-providing-fixup-data-in-board-data.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
414-MTD-m25p80-allow-passing-pp_data.patch
415-MIPS-BCM63XX-export-the-attached-flash-type.patch
416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
417-MTD-bcm63xxpart-allow-passing-a-caldata-offset.patch
418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
420-BCM63XX-add-endian-check-for-ath9k.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
421-BCM63XX-add-led-pin-for-ath9k.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
423-bcm63xx_enet_add_b53_support.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
424-bcm63xx_enet_no_request_mem_region.patch brcm63xx: probe gpio controllers through DT 2015-02-27 17:39:49 +00:00
425-bcm63xxpart_parse_paritions_from_dt.patch brcm63xx: brcm63xxpart: fix buffer overrun in of parser 2015-03-15 14:19:22 +00:00
426-bcm63xx_enet-fix-napi-poll-return-value.patch brcm63xx: fix ethernet breakage in 3.18 2015-02-28 19:59:46 +00:00
499-allow_better_context_for_board_patches.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
500-board-D4PW.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
501-board-NB4.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
502-board-96338W2_E7T.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
503-board-CPVA642.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
504-board_dsl_274xb_rev_c.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
505-board_spw500v.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
506-board_gw6200_gw6000.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
507-board-MAGIC.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
508-board_hw553.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
509-board_rta1320_16m.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
510-board_spw303v.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
511-board_V2500V.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
512-board_BTV2110.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
513-MIPS-BCM63XX-add-inventel-Livebox-support.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
514-board_ct536_ct5621.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
515-board_DWV-S0_fixes.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
516-board_96348A-122.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
517-RTA1205W_16_uart_fixes.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
519_board_CPVA502plus.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
520-bcm63xx-add-support-for-96368MVWG-board.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
521-bcm63xx-add-support-for-96368MVNgr-board.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
522-MIPS-BCM63XX-add-96328avng-reference-board.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
523-MIPS-BCM63XX-add-963281TAN-reference-board.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
524-board_dsl_274xb_rev_f.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
525-board_96348w3.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
526-board_CT6373-1.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
527-board_dva-g3810bn-tl-1.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
528-board_nb6.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
529-board_fast2604.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
530-board_A4001N1.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
531-board_AR-5387un.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
532-board_AR-5381u.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
533-board_rta770bw.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
534-board_hw556.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
535-board_rta770w.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
536-board_fast2704.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
537-board_fast2504n.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
550-MIPS-BCM63XX-remove-leds-and-buttons.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
553-boards_probe_switch.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
555-board_96318ref.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
556-board_96318ref_p300.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
557-board_bcm963269bhr.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
558-board_AR1004G.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
559-board_vw6339gu.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
560-board_963268gu_p300.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
561-board_WAP-5813n.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
562-board_VR-3025u.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
563-board_VR-3025un.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
564-board_P870HW-51a_v2.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
565-board_hw520.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
566-board_A4001N.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
567-board_dsl-2751b_e1.patch brcm63xx: move buttons and leds to dts files 2015-02-27 17:40:04 +00:00
800-wl_exports.patch
801-ssb_export_fallback_sprom.patch
802-rtl8367r_fix_RGMII_support.patch
803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch