Skip to content
  1. Sep 25, 2016
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4b8b0ff6
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Three fixes for irq core and irq chip drivers:
      
         - Do not set the irq type if type is NONE.  Fixes a boot regression
           on various SoCs
      
         - Use the proper cpu for setting up the GIC target list.  Discovered
           by the cpumask debugging code.
      
         - A rather large fix for the MIPS-GIC so per cpu local interrupts
           work again.  This was discovered late because the code falls back
           to slower timers which use normal device interrupts"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/mips-gic: Fix local interrupts
        irqchip/gicv3: Silence noisy DEBUG_PER_CPU_MAPS warning
        genirq: Skip chained interrupt trigger setup if type is IRQ_TYPE_NONE
      4b8b0ff6
    • Linus Torvalds's avatar
      Merge branch 'hughd-fixes' (patches from Hugh Dickins) · 0f265741
      Linus Torvalds authored
      Merge VM fixes from High Dickins:
       "I get the impression that Andrew is away or busy at the moment, so I'm
        going to send you three independent uncontroversial little mm fixes
        directly - though none is strictly a 4.8 regression fix.
      
         - shmem: fix tmpfs to handle the huge= option properly from Toshi
           Kani is a one-liner to fix a major embarrassment in 4.8's hugepages
           on tmpfs feature: although Hillf pointed it out in June, somehow
           both Kirill and I repeatedly dropped the ball on this one.  You
           might wonder if the feature got tested at all with that bug in:
           yes, it did, but for wider testing coverage, Kirill and I had each
           relied too much on an override which bypasses that condition.
      
         - huge tmpfs: fix Committed_AS leak just a run-of-the-mill accounting
           fix in the same feature.
      
         - mm: delete unnecessary and unsafe init_tlb_ubc() is an unrelated
           fix to 4.3's TLB flush batching in reclaim: the bug would be rare,
           and none of us will be shamed if this one misses 4.8; but it got
           such a quick ack from Mel today that I'm inclined to offer it along
           with the first two"
      
      * emailed patches from Hugh Dickins <hughd@google.com>:
        mm: delete unnecessary and unsafe init_tlb_ubc()
        huge tmpfs: fix Committed_AS leak
        shmem: fix tmpfs to handle the huge= option properly
      0f265741
    • Hugh Dickins's avatar
      mm: delete unnecessary and unsafe init_tlb_ubc() · b385d21f
      Hugh Dickins authored
      init_tlb_ubc() looked unnecessary to me: tlb_ubc is statically
      initialized with zeroes in the init_task, and copied from parent to
      child while it is quiescent in arch_dup_task_struct(); so I went to
      delete it.
      
      But inserted temporary debug WARN_ONs in place of init_tlb_ubc() to
      check that it was always empty at that point, and found them firing:
      because memcg reclaim can recurse into global reclaim (when allocating
      biosets for swapout in my case), and arrive back at the init_tlb_ubc()
      in shrink_node_memcg().
      
      Resetting tlb_ubc.flush_required at that point is wrong: if the upper
      level needs a deferred TLB flush, but the lower level turns out not to,
      we miss a TLB flush.  But fortunately, that's the only part of the
      protocol that does not nest: with the initialization removed, cpumask
      collects bits from upper and lower levels, and flushes TLB when needed.
      
      Fixes: 72b252ae
      
       ("mm: send one IPI per CPU to TLB flush all entries after unmapping pages")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: stable@vger.kernel.org # 4.3+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b385d21f
    • Hugh Dickins's avatar
      huge tmpfs: fix Committed_AS leak · 71664665
      Hugh Dickins authored
      Under swapping load on huge tmpfs, /proc/meminfo's Committed_AS grows
      bigger and bigger: just a cosmetic issue for most users, but disabling
      for those who run without overcommit (/proc/sys/vm/overcommit_memory 2).
      
      shmem_uncharge() was forgetting to unaccount __vm_enough_memory's
      charge, and shmem_charge() was forgetting it on the filesystem-full
      error path.
      
      Fixes: 800d8c63
      
       ("shmem: add huge pages support")
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      71664665
    • Toshi Kani's avatar
      shmem: fix tmpfs to handle the huge= option properly · 3089bf61
      Toshi Kani authored
      
      
      shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly, which
      leads to a reversed effect of "huge=" mount option.
      
      Fix the check in shmem_get_unmapped_area().
      
      Note, the default value of SHMEM_SB(sb)->huge remains as
      SHMEM_HUGE_NEVER.  User will need to specify "huge=" option to enable
      huge page mappings.
      
      Reported-by: default avatarHillf Danton <hillf.zj@alibaba-inc.com>
      Signed-off-by: default avatarToshi Kani <toshi.kani@hpe.com>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Reviewed-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3089bf61
  2. Sep 24, 2016
  3. Sep 23, 2016
    • AKASHI Takahiro's avatar
      arm64: kgdb: handle read-only text / modules · 67787b68
      AKASHI Takahiro authored
      Handle read-only cases when CONFIG_DEBUG_RODATA (4.0) or
      CONFIG_DEBUG_SET_MODULE_RONX (3.18) are enabled by using
      aarch64_insn_write() instead of probe_kernel_write() as introduced by
      commit 2f896d58 ("arm64: use fixmap for text patching") in 4.0.
      
      Fixes: 11d91a77
      
       ("arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support")
      Signed-off-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
      Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      67787b68
    • David Daney's avatar
      arm64: Call numa_store_cpu_info() earlier. · c18df0ad
      David Daney authored
      
      
      The wq_numa_init() function makes a private CPU to node map by calling
      cpu_to_node() early in the boot process, before the non-boot CPUs are
      brought online.  Since the default implementation of cpu_to_node()
      returns zero for CPUs that have never been brought online, the
      workqueue system's view is that *all* CPUs are on node zero.
      
      When the unbound workqueue for a non-zero node is created, the
      tsk_cpus_allowed() for the worker threads is the empty set because
      there are, in the view of the workqueue system, no CPUs on non-zero
      nodes.  The code in try_to_wake_up() using this empty cpumask ends up
      using the cpumask empty set value of NR_CPUS as an index into the
      per-CPU area pointer array, and gets garbage as it is one past the end
      of the array.  This results in:
      
      [    0.881970] Unable to handle kernel paging request at virtual address fffffb1008b926a4
      [    1.970095] pgd = fffffc00094b0000
      [    1.973530] [fffffb1008b926a4] *pgd=0000000000000000, *pud=0000000000000000, *pmd=0000000000000000
      [    1.982610] Internal error: Oops: 96000004 [#1] SMP
      [    1.987541] Modules linked in:
      [    1.990631] CPU: 48 PID: 295 Comm: cpuhp/48 Tainted: G        W       4.8.0-rc6-preempt-vol+ #9
      [    1.999435] Hardware name: Cavium ThunderX CN88XX board (DT)
      [    2.005159] task: fffffe0fe89cc300 task.stack: fffffe0fe8b8c000
      [    2.011158] PC is at try_to_wake_up+0x194/0x34c
      [    2.015737] LR is at try_to_wake_up+0x150/0x34c
      [    2.020318] pc : [<fffffc00080e7468>] lr : [<fffffc00080e7424>] pstate: 600000c5
      [    2.027803] sp : fffffe0fe8b8fb10
      [    2.031149] x29: fffffe0fe8b8fb10 x28: 0000000000000000
      [    2.036522] x27: fffffc0008c63bc8 x26: 0000000000001000
      [    2.041896] x25: fffffc0008c63c80 x24: fffffc0008bfb200
      [    2.047270] x23: 00000000000000c0 x22: 0000000000000004
      [    2.052642] x21: fffffe0fe89d25bc x20: 0000000000001000
      [    2.058014] x19: fffffe0fe89d1d00 x18: 0000000000000000
      [    2.063386] x17: 0000000000000000 x16: 0000000000000000
      [    2.068760] x15: 0000000000000018 x14: 0000000000000000
      [    2.074133] x13: 0000000000000000 x12: 0000000000000000
      [    2.079505] x11: 0000000000000000 x10: 0000000000000000
      [    2.084879] x9 : 0000000000000000 x8 : 0000000000000000
      [    2.090251] x7 : 0000000000000040 x6 : 0000000000000000
      [    2.095621] x5 : ffffffffffffffff x4 : 0000000000000000
      [    2.100991] x3 : 0000000000000000 x2 : 0000000000000000
      [    2.106364] x1 : fffffc0008be4c24 x0 : ffffff0ffffada80
      [    2.111737]
      [    2.113236] Process cpuhp/48 (pid: 295, stack limit = 0xfffffe0fe8b8c020)
      [    2.120102] Stack: (0xfffffe0fe8b8fb10 to 0xfffffe0fe8b90000)
      [    2.125914] fb00:                                   fffffe0fe8b8fb80 fffffc00080e7648
      .
      .
      .
      [    2.442859] Call trace:
      [    2.445327] Exception stack(0xfffffe0fe8b8f940 to 0xfffffe0fe8b8fa70)
      [    2.451843] f940: fffffe0fe89d1d00 0000040000000000 fffffe0fe8b8fb10 fffffc00080e7468
      [    2.459767] f960: fffffe0fe8b8f980 fffffc00080e4958 ffffff0ff91ab200 fffffc00080e4b64
      [    2.467690] f980: fffffe0fe8b8f9d0 fffffc00080e515c fffffe0fe8b8fa80 0000000000000000
      [    2.475614] f9a0: fffffe0fe8b8f9d0 fffffc00080e58e4 fffffe0fe8b8fa80 0000000000000000
      [    2.483540] f9c0: fffffe0fe8d10000 0000000000000040 fffffe0fe8b8fa50 fffffc00080e5ac4
      [    2.491465] f9e0: ffffff0ffffada80 fffffc0008be4c24 0000000000000000 0000000000000000
      [    2.499387] fa00: 0000000000000000 ffffffffffffffff 0000000000000000 0000000000000040
      [    2.507309] fa20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [    2.515233] fa40: 0000000000000000 0000000000000000 0000000000000000 0000000000000018
      [    2.523156] fa60: 0000000000000000 0000000000000000
      [    2.528089] [<fffffc00080e7468>] try_to_wake_up+0x194/0x34c
      [    2.533723] [<fffffc00080e7648>] wake_up_process+0x28/0x34
      [    2.539275] [<fffffc00080d3764>] create_worker+0x110/0x19c
      [    2.544824] [<fffffc00080d69dc>] alloc_unbound_pwq+0x3cc/0x4b0
      [    2.550724] [<fffffc00080d6bcc>] wq_update_unbound_numa+0x10c/0x1e4
      [    2.557066] [<fffffc00080d7d78>] workqueue_online_cpu+0x220/0x28c
      [    2.563234] [<fffffc00080bd288>] cpuhp_invoke_callback+0x6c/0x168
      [    2.569398] [<fffffc00080bdf74>] cpuhp_up_callbacks+0x44/0xe4
      [    2.575210] [<fffffc00080be194>] cpuhp_thread_fun+0x13c/0x148
      [    2.581027] [<fffffc00080dfbac>] smpboot_thread_fn+0x19c/0x1a8
      [    2.586929] [<fffffc00080dbd64>] kthread+0xdc/0xf0
      [    2.591776] [<fffffc0008083380>] ret_from_fork+0x10/0x50
      [    2.597147] Code: b00057e1 91304021 91005021 b8626822 (b8606821)
      [    2.603464] ---[ end trace 58c0cd36b88802bc ]---
      [    2.608138] Kernel panic - not syncing: Fatal exception
      
      Fix by moving call to numa_store_cpu_info() for all CPUs into
      smp_prepare_cpus(), which happens before wq_numa_init().  Since
      smp_store_cpu_info() now contains only a single function call,
      simplify by removing the function and out-lining its contents.
      
      Suggested-by: default avatarRobert Richter <rric@kernel.org>
      Fixes: 1a2db300
      
       ("arm64, numa: Add NUMA support for arm64 platforms.")
      Cc: <stable@vger.kernel.org> # 4.7.x-
      Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
      Reviewed-by: default avatarRobert Richter <rrichter@cavium.com>
      Tested-by: default avatarYisheng Xie <xieyisheng1@huawei.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      c18df0ad
    • Sagi Grimberg's avatar
      nvme-rdma: only clear queue flags after successful connect · 3b4ac786
      Sagi Grimberg authored
      Otherwise, nvme_rdma_stop_and_clear_queue() will incorrectly
      try to stop/free rdma qps/cm_ids that are already freed.
      
      Fixes: e89ca58f
      
       ("nvme-rdma: add DELETING queue flag")
      Reported-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Tested-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      3b4ac786
    • Sudeep Holla's avatar
      i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended · 331dcf42
      Sudeep Holla authored
      
      
      If the i2c device is already runtime suspended, if qup_i2c_suspend is
      executed during suspend-to-idle or suspend-to-ram it will result in the
      following splat:
      
      WARNING: CPU: 3 PID: 1593 at drivers/clk/clk.c:476 clk_core_unprepare+0x80/0x90
      Modules linked in:
      
      CPU: 3 PID: 1593 Comm: bash Tainted: G        W       4.8.0-rc3 #14
      Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
      PC is at clk_core_unprepare+0x80/0x90
      LR is at clk_unprepare+0x28/0x40
      pc : [<ffff0000086eecf0>] lr : [<ffff0000086f0c58>] pstate: 60000145
      Call trace:
       clk_core_unprepare+0x80/0x90
       qup_i2c_disable_clocks+0x2c/0x68
       qup_i2c_suspend+0x10/0x20
       platform_pm_suspend+0x24/0x68
       ...
      
      This patch fixes the issue by executing qup_i2c_pm_suspend_runtime
      conditionally in qup_i2c_suspend.
      
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: default avatarAndy Gross <andy.gross@linaro.org>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org
      331dcf42
    • Linus Torvalds's avatar
      Merge tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · b1f2beb8
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - several fixes for new drivers added for Kernel 4.8 addition (cec
         core, pulse8 cec driver and Mediatek vcodec)
      
       - a regression fix for cx23885 and saa7134 drivers
      
       - an important fix for rcar-fcp, making rcar_fcp_enable() return 0 on
         success
      
      * tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (25 commits)
        [media] cx23885/saa7134: assign q->dev to the PCI device
        [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success
        [media] cec: fix ioctl return code when not registered
        [media] cec: don't Feature Abort broadcast msgs when unregistered
        [media] vcodec:mediatek: Refine VP8 encoder driver
        [media] vcodec:mediatek: Refine H264 encoder driver
        [media] vcodec:mediatek: change H264 profile default to profile high
        [media] vcodec:mediatek: Add timestamp and timecode copy for V4L2 Encoder
        [media] vcodec:mediatek: Fix visible_height larger than coded_height issue in s_fmt_out
        [media] vcodec:mediatek: Fix fops_vcodec_release flow for V4L2 Encoder
        [media] vcodec:mediatek:code refine for v4l2 Encoder driver
        [media] cec-funcs.h: add missing vendor-specific messages
        [media] cec-edid: check for IEEE identifier
        [media] pulse8-cec: fix error handling
        [media] pulse8-cec: set correct Signal Free Time
        [media] mtk-vcodec: add HAS_DMA dependency
        [media] cec: ignore messages when log_addr_mask == 0
        [media] cec: add item to TODO
        [media] cec: set unclaimed addresses to CEC_LOG_ADDR_INVALID
        [media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag
        ...
      b1f2beb8
  4. Sep 22, 2016
  5. Sep 21, 2016
    • Marek Vasut's avatar
      net: can: ifi: Configure transmitter delay · 8d58790b
      Marek Vasut authored
      
      
      Configure the transmitter delay register at +0x1c to correctly handle
      the CAN FD bitrate switch (BRS). This moves the SSP (secondary sample
      point) to a proper offset, so that the TDC mechanism works and won't
      generate error frames on the CAN link.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Marc Kleine-Budde <mkl@pengutronix.de>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Oliver Hartkopp <socketcan@hartkopp.net>
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      8d58790b
    • Nicolas Dichtel's avatar
      vti6: fix input path · 63c43787
      Nicolas Dichtel authored
      Since commit 1625f452, vti6 is broken, all input packets are dropped
      (LINUX_MIB_XFRMINNOSTATES is incremented).
      
      XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 is set by vti6_rcv() before calling
      xfrm6_rcv()/xfrm6_rcv_spi(), thus we cannot set to NULL that value in
      xfrm6_rcv_spi().
      
      A new function xfrm6_rcv_tnl() that enables to pass a value to
      xfrm6_rcv_spi() is added, so that xfrm6_rcv() is not touched (this function
      is used in several handlers).
      
      CC: Alexey Kodanev <alexey.kodanev@oracle.com>
      Fixes: 1625f452
      
       ("net/xfrm_input: fix possible NULL deref of tunnel.ip6->parms.i_key")
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      63c43787