1. 26 Jun, 2016 1 commit
    • Colin Ian King's avatar
      devpts: fix null pointer dereference on failed memory allocation · 5353ed8d
      Colin Ian King authored
      An ENOMEM when creating a pair tty in tty_ldisc_setup causes a null
      pointer dereference in devpts_kill_index because tty->link->driver_data
      is NULL.  The oops was triggered with the pty stressor in stress-ng when
      in a low memory condition.
      
      tty_init_dev tries to clean up a tty_ldisc_setup ENOMEM error by calling
      release_tty, however, this ultimately tries to clean up the NULL pair'd
      tty in pty_unix98_remove, triggering the Oops.
      
      Add check to pty_unix98_remove to only clean up fsi if it is not NULL.
      
      Ooops:
      
      [   23.020961] Oops: 0000 [#1] SMP
      [   23.020976] Modules linked in: ppdev snd_hda_codec_generic snd_hda_intel snd_hda_codec parport_pc snd_hda_core snd_hwdep parport snd_pcm input_leds joydev snd_timer serio_raw snd soundcore i2c_piix4 mac_hid ib_iser rdma_cm iw_cm ib_cm ib_core configfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel qxl aes_x86_64 ttm lrw gf128mul glue_helper ablk_helper drm_kms_helper cryptd syscopyarea sysfillrect psmouse sysimgblt floppy fb_sys_fops drm pata_acpi jitterentropy_rng drbg ansi_cprng
      [   23.020978] CPU: 0 PID: 1452 Comm: stress-ng-pty Not tainted 4.7.0-rc4+ #2
      [   23.020978] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
      [   23.020979] task: ffff88007ba30000 ti: ffff880078ea8000 task.ti: ffff880078ea8000
      [   23.020981] RIP: 0010:[<ffffffff813f11ff>]  [<ffffffff813f11ff>] ida_remove+0x1f/0x120
      [   23.020981] RSP: 0018:ffff880078eabb60  EFLAGS: 00010a03
      [   23.020982] RAX: 4444444444444567 RBX: 0000000000000000 RCX: 000000000000001f
      [   23.020982] RDX: 000000000000014c RSI: 000000000000026f RDI: 0000000000000000
      [   23.020982] RBP: ffff880078eabb70 R08: 0000000000000004 R09: 0000000000000036
      [   23.020983] R10: 000000000000026f R11: 0000000000000000 R12: 000000000000026f
      [   23.020983] R13: 000000000000026f R14: ffff88007c944b40 R15: 000000000000026f
      [   23.020984] FS:  00007f9a2f3cc700(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000
      [   23.020984] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   23.020985] CR2: 0000000000000010 CR3: 000000006c81b000 CR4: 00000000001406f0
      [   23.020988] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   23.020988] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   23.020988] Stack:
      [   23.020989]  0000000000000000 000000000000026f ffff880078eabb90 ffffffff812a5a99
      [   23.020990]  0000000000000000 00000000fffffff4 ffff880078eabba8 ffffffff814f9cbe
      [   23.020991]  ffff88007965c800 ffff880078eabbc8 ffffffff814eef43 fffffffffffffff4
      [   23.020991] Call Trace:
      [   23.021000]  [<ffffffff812a5a99>] devpts_kill_index+0x29/0x50
      [   23.021002]  [<ffffffff814f9cbe>] pty_unix98_remove+0x2e/0x50
      [   23.021006]  [<ffffffff814eef43>] release_tty+0xb3/0x1b0
      [   23.021007]  [<ffffffff814f18d4>] tty_init_dev+0xd4/0x1c0
      [   23.021011]  [<ffffffff814f9fae>] ptmx_open+0xae/0x190
      [   23.021013]  [<ffffffff812254ef>] chrdev_open+0xbf/0x1b0
      [   23.021015]  [<ffffffff8121d973>] do_dentry_open+0x203/0x310
      [   23.021016]  [<ffffffff81225430>] ? cdev_put+0x30/0x30
      [   23.021017]  [<ffffffff8121ee44>] vfs_open+0x54/0x80
      [   23.021018]  [<ffffffff8122b8fc>] ? may_open+0x8c/0x100
      [   23.021019]  [<ffffffff8122f26b>] path_openat+0x2eb/0x1440
      [   23.021020]  [<ffffffff81230534>] ? putname+0x54/0x60
      [   23.021022]  [<ffffffff814f6f97>] ? n_tty_ioctl_helper+0x27/0x100
      [   23.021023]  [<ffffffff81231651>] do_filp_open+0x91/0x100
      [   23.021024]  [<ffffffff81230596>] ? getname_flags+0x56/0x1f0
      [   23.021026]  [<ffffffff8123fc66>] ? __alloc_fd+0x46/0x190
      [   23.021027]  [<ffffffff8121f1e4>] do_sys_open+0x124/0x210
      [   23.021028]  [<ffffffff8121f2ee>] SyS_open+0x1e/0x20
      [   23.021035]  [<ffffffff81845576>] entry_SYSCALL_64_fastpath+0x1e/0xa8
      [   23.021044] Code: 63 28 45 31 e4 eb dd 0f 1f 44 00 00 55 4c 63 d6 48 ba 89 88 88 88 88 88 88 88 4c 89 d0 b9 1f 00 00 00 48 f7 e2 48 89 e5 41 54 53 <8b> 47 10 48 89 fb 8d 3c c5 00 00 00 00 48 c1 ea 09 b8 01 00 00
      [   23.021045] RIP  [<ffffffff813f11ff>] ida_remove+0x1f/0x120
      [   23.021045]  RSP <ffff880078eabb60>
      [   23.021046] CR2: 0000000000000010
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5353ed8d
  2. 25 Jun, 2016 1 commit
    • David Daney's avatar
      tty: vt: Fix soft lockup in fbcon cursor blink timer. · 1b45996d
      David Daney authored
      We are getting somewhat random soft lockups with this signature:
      
      [   86.992215] [<fffffc00080935e0>] el1_irq+0xa0/0x10c
      [   86.997082] [<fffffc000841822c>] cursor_timer_handler+0x30/0x54
      [   87.002991] [<fffffc000810ec44>] call_timer_fn+0x54/0x1a8
      [   87.008378] [<fffffc000810ef88>] run_timer_softirq+0x1c4/0x2bc
      [   87.014200] [<fffffc000809077c>] __do_softirq+0x114/0x344
      [   87.019590] [<fffffc00080af45c>] irq_exit+0x74/0x98
      [   87.024458] [<fffffc00080fac20>] __handle_domain_irq+0x98/0xfc
      [   87.030278] [<fffffc000809056c>] gic_handle_irq+0x94/0x190
      
      This is caused by the vt visual_init() function calling into
      fbcon_init() with a vc_cur_blink_ms value of zero.  This is a
      transient condition, as it is later set to a non-zero value.  But, if
      the timer happens to expire while the blink rate is zero, it goes into
      an endless loop, and we get soft lockup.
      
      The fix is to initialize vc_cur_blink_ms before calling the con_init()
      function.
      Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Tested-by: default avatarMing Lei <ming.lei@canonical.com>
      Acked-by: default avatarScot Doyle <lkml14@scotdoyle.com>
      Tested-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1b45996d
  3. 20 Jun, 2016 1 commit
  4. 19 Jun, 2016 9 commits
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · c3695331
      Linus Torvalds authored
      Pull UDF fixes and a reiserfs fix from Jan Kara:
       "A couple of udf fixes (most notably a bug in parsing UDF partitions
        which led to inability to mount recent Windows installation media) and
        a reiserfs fix for handling kstrdup failure"
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        reiserfs: check kstrdup failure
        udf: Use correct partition reference number for metadata
        udf: Use IS_ERR when loading metadata mirror file entry
        udf: Don't BUG on missing metadata partition descriptor
      c3695331
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-4.7-rc4' of git://git.infradead.org/users/vkoul/slave-dma · 9af1f5d8
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "Some fixes has piled up, so time to send them upstream.
      
        These fixes include:
         - at_xdmac fixes for residue and other stuff
         - update MAINTAINERS for dma dt bindings
         - mv_xor fix for incorrect offset"
      
      * tag 'dmaengine-fix-4.7-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: mv_xor: Fix incorrect offset in dma_map_page()
        dmaengine: at_xdmac: double FIFO flush needed to compute residue
        dmaengine: at_xdmac: fix residue corruption
        dmaengine: at_xdmac: align descriptors on 64 bits
        MAINTAINERS: Add file patterns for dma device tree bindings
      9af1f5d8
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 049a40c0
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Another batch of fixes for ARM SoC platforms.  Most are smaller fixes.
      
        Two areas that are worth pointing out are:
      
         - OMAP had a handful of changes to voltage specs that caused a bit of
           churn, most of volume of change in this branch is due to this.
      
         - There are a couple of _rcuidle fixes from Paul that touch common
           code and came in through the OMAP tree since they were the ones who
           saw the problems.
      
       The rest is smaller changes across a handful of platforms"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (36 commits)
        ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes
        ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218
        ARM: OMAP2+: timer: add probe for clocksources
        ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ
        memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing
        arm: Use _rcuidle for smp_cross_call() tracepoints
        MAINTAINERS: Add myself as reviewer of ARM FSL/NXP
        ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret
        ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret
        ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON
        ARM: imx6ul: Fix Micrel PHY mask
        ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX
        ARM: dts: DRA74x: fix DSS PLL2 addresses
        ARM: OMAP2: Enable Errata 430973 for OMAP3
        ARM: dts: socfpga: Add missing PHY phandle
        ARM: dts: exynos: Fix port nodes names for Exynos5420 Peach Pit board
        ARM: dts: exynos: Fix port nodes names for Exynos5250 Snow board
        ARM: dts: sun6i: yones-toptech-bs1078-v2: Drop constraints on dc1sw regulator
        ARM: dts: sun6i: primo81: Drop constraints on dc1sw regulator
        ARM: dts: sunxi: Add OLinuXino Lime2 eMMC to the Makefile
        ...
      049a40c0
    • Olof Johansson's avatar
      Merge tag 'gpmc-omap-fixes-for-v4.7' of https://github.com/rogerq/linux into fixes · 8fd09767
      Olof Johansson authored
      OMAP-GPMC: Fixes for for v4.7-rc cycle:
      
      - Fix omap gpmc EXTRADELAY timing. The DT provided timings
      were wrongly used causing devices requiring extra delay timing
      to fail.
      
      * tag 'gpmc-omap-fixes-for-v4.7' of https://github.com/rogerq/linux:
        memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing
        + Linux 4.7-rc3
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      8fd09767
    • Olof Johansson's avatar
      Merge tag 'omap-for-v4.7/fixes-powedomain' of... · 58935f24
      Olof Johansson authored
      Merge tag 'omap-for-v4.7/fixes-powedomain' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fixes for omaps for v4.7-rc cycle:
      
      - Fix dra7 for hardware issues limiting L4Per and L3init power domains
        to on state. Without this the devices may not work correctly after
        some time of use because of asymmetric aging. And related to this,
        let's also remove the unusable states.
      
      - Always select omap interconnect for am43x as otherwise the am43x
        only configurations will not boot properly. This can happen easily
        for any product kernels that leave out other SoCs to save memory.
      
      - Fix DSS PLL2 addresses that have gone unused for now
      
      - Select erratum 430973 for omap3, this is now safe to do and can
        save quite a bit of debugging time for people who may have left
        it out.
      
      * tag 'omap-for-v4.7/fixes-powedomain' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret
        ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret
        ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON
        ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX
        ARM: dts: DRA74x: fix DSS PLL2 addresses
        ARM: OMAP2: Enable Errata 430973 for OMAP3
        + Linux 4.7-rc2
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      58935f24
    • Olof Johansson's avatar
      Merge tag 'fixes-rcu-fiq-signed' of... · 9503427e
      Olof Johansson authored
      Merge tag 'fixes-rcu-fiq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fixes for omaps for v4.7-rc cycle:
      
      - Two boot warning fixes from the RCU tree that should have gotten
        merged several weeks ago already but did not because of issues
        with who merges them. Paul has now split the RCU warning fixes into
        sets for various maintainers.
      
      - Fix ams-delta FIQ regression caused by omap1 sparse IRQ changes
      
      - Fix PM for omap3 boards using timer12 and gptimer, like the
        original beagleboard
      
      - Fix hangs on am437x-sk-evm by lowering the I2C bus speed
      
      * tag 'fixes-rcu-fiq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218
        ARM: OMAP2+: timer: add probe for clocksources
        ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ
        arm: Use _rcuidle for smp_cross_call() tracepoints
        arm: Use _rcuidle tracepoint to allow use from idle
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      9503427e
    • Lee Jones's avatar
      ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes · 0e289e53
      Lee Jones authored
      This patch fixes a non-booting issue in Mainline.
      
      When booting with a compressed kernel, we need to be careful how we
      populate memory close to DDR start.  AUTO_ZRELADDR is enabled by default
      in multi-arch enabled configurations, which place some restrictions on
      where the kernel is placed and where it will be uncompressed to on boot.
      
      AUTO_ZRELADDR takes the decompressor code's start address and masks out
      the bottom 28 bits to obtain an address to uncompress the kernel to
      (thus a load address of 0x42000000 means that the kernel will be
      uncompressed to 0x40000000 i.e. DDR START on this platform).
      
      Even changing the load address to after the co-processor's shared memory
      won't render a booting platform, since the AUTO_ZRELADDR algorithm still
      ensures the kernel is uncompressed into memory shared with the first
      co-processor (0x40000000).
      
      Another option would be to move loading to 0x4A000000, since this will
      mean the decompressor will decompress the kernel to 0x48000000. However,
      this would mean a large chunk (0x44000000 => 0x48000000 (64MB)) of
      memory would essentially be wasted for no good reason.
      
      Until we can work with ST to find a suitable memory location to
      relocate co-processor shared memory, let's disable the shared memory
      nodes.  This will ensure a working platform in the mean time.
      
      NB: The more observant of you will notice that we're leaving the DMU
      shared memory node enabled; this is because a) it is the only one in
      active use at the time of this writing and b) it is not affected by
      the current default behaviour which is causing issues.
      
      Fixes: fe135c63 (ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory)
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by Peter Griffin <peter.griffin@linaro.org>
      Signed-off-by: default avatarMaxime Coquelin <maxime.coquelin@st.com>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      0e289e53
    • Olof Johansson's avatar
      Merge tag 'imx-fixes-4.7' of... · 7752b0d5
      Olof Johansson authored
      Merge tag 'imx-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes
      
      The i.MX fixes for 4.7:
       - Correct Micrel PHY mask to fix the issue that i.MX6UL ethernet works
         in U-Boot but not in kernel.
      
      * tag 'imx-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
        ARM: imx6ul: Fix Micrel PHY mask
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      7752b0d5
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · c141afd1
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "A couple of fixes for pmd_mknotpresent()/pmd_present() for LPAE
        systems"
      
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8579/1: mm: Fix definition of pmd_mknotpresent
        ARM: 8578/1: mm: ensure pmd_present only checks the valid bit
      c141afd1
  5. 18 Jun, 2016 15 commits
  6. 17 Jun, 2016 13 commits