1. 12 2月, 2016 6 次提交
  2. 11 2月, 2016 8 次提交
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 721675fc
      Linus Torvalds 提交于
      Pull rdma fixes from Doug Ledford:
       "A few more minor fixes for rc3:
      
         - One fix to ipoib
         - One fix to core sysfs code
         - Four patches that resolve an oops found in testing of ocrdma and a
           couple other ocrdma issues"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        RDMA/ocrdma: Fixing ocrdma debugfs directory remove
        RDMA/ocrdma: Fix pkey_index returned by driver in rq work completion
        RDMA/ocrdma: populate max_sge_rd in device attributes
        RDMA/ocrdma: Initialize stats resources in the driver before ib device registration.
        IB/sysfs: remove unused va_list args
        IB/IPoIB: Do not set skb truesize since using one linearskb
      721675fc
    • D
      bpf: fix branch offset adjustment on backjumps after patching ctx expansion · a1b14d27
      Daniel Borkmann 提交于
      When ctx access is used, the kernel often needs to expand/rewrite
      instructions, so after that patching, branch offsets have to be
      adjusted for both forward and backward jumps in the new eBPF program,
      but for backward jumps it fails to account the delta. Meaning, for
      example, if the expansion happens exactly on the insn that sits at
      the jump target, it doesn't fix up the back jump offset.
      
      Analysis on what the check in adjust_branches() is currently doing:
      
        /* adjust offset of jmps if necessary */
        if (i < pos && i + insn->off + 1 > pos)
          insn->off += delta;
        else if (i > pos && i + insn->off + 1 < pos)
          insn->off -= delta;
      
      First condition (forward jumps):
      
        Before:                         After:
      
        insns[0]                        insns[0]
        insns[1] <--- i/insn            insns[1] <--- i/insn
        insns[2] <--- pos               insns[P] <--- pos
        insns[3]                        insns[P]  `------| delta
        insns[4] <--- target_X          insns[P]   `-----|
        insns[5]                        insns[3]
                                        insns[4] <--- target_X
                                        insns[5]
      
      First case is if we cross pos-boundary and the jump instruction was
      before pos. This is handeled correctly. I.e. if i == pos, then this
      would mean our jump that we currently check was the patchlet itself
      that we just injected. Since such patchlets are self-contained and
      have no awareness of any insns before or after the patched one, the
      delta is correctly not adjusted. Also, for the second condition in
      case of i + insn->off + 1 == pos, means we jump to that newly patched
      instruction, so no offset adjustment are needed. That part is correct.
      
      Second condition (backward jumps):
      
        Before:                         After:
      
        insns[0]                        insns[0]
        insns[1] <--- target_X          insns[1] <--- target_X
        insns[2] <--- pos <-- target_Y  insns[P] <--- pos <-- target_Y
        insns[3]                        insns[P]  `------| delta
        insns[4] <--- i/insn            insns[P]   `-----|
        insns[5]                        insns[3]
                                        insns[4] <--- i/insn
                                        insns[5]
      
      Second interesting case is where we cross pos-boundary and the jump
      instruction was after pos. Backward jump with i == pos would be
      impossible and pose a bug somewhere in the patchlet, so the first
      condition checking i > pos is okay only by itself. However, i +
      insn->off + 1 < pos does not always work as intended to trigger the
      adjustment. It works when jump targets would be far off where the
      delta wouldn't matter. But, for example, where the fixed insn->off
      before pointed to pos (target_Y), it now points to pos + delta, so
      that additional room needs to be taken into account for the check.
      This means that i) both tests here need to be adjusted into pos + delta,
      and ii) for the second condition, the test needs to be <= as pos
      itself can be a target in the backjump, too.
      
      Fixes: 9bac3d6d ("bpf: allow extended BPF programs access skb fields")
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1b14d27
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 74c7b2af
      Linus Torvalds 提交于
      Pull input updates from Dmitry Torokhov:
       "Just small driver fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: colibri-vf50-ts - add missing #include <linux/of.h>
        Input: adp5589 - fix row 5 handling for adp5589
        Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree
        Input: vmmouse - fix absolute device registration
        Input: serio - drop warnings in case of EPROBE_DEFER from serio_find_driver()
        Input: cap11xx - add missing of_node_put
        Input: sirfsoc-onkey - allow modular build
        Input: xpad - remove unused function
      74c7b2af
    • L
      Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · 4e541699
      Linus Torvalds 提交于
      Pull libata fixes from Tejun Heo:
      
       - PORTS_IMPL workaround for very early ahci controllers is misbehaving
         on new systems.  Disabled on recent ahci versions.
      
       - Old-style PIO state machine had a horrible locking problem.  Don't
         know how we've been getting away this far.  Fixed.
      
       - Other device specific updates.
      
      * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ahci: Intel DNV device IDs SATA
        libata: fix sff host state machine locking while polling
        libata-sff: use WARN instead of BUG on illegal host state machine state
        libata: disable forced PORTS_IMPL for >= AHCI 1.3
        libata: blacklist a Viking flash model for MWDMA corruption
        drivers: ata: wake port before DMA stop for ALPM
      4e541699
    • L
      Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · fb0dc5f1
      Linus Torvalds 提交于
      Pull cgroup fixes from Tejun Heo:
      
       - The destruction path of cgroup objects are asynchronous and
         multi-staged and some of them ended up destroying parents before
         children leading to failures in cpu and memory controllers.  Ensure
         that parents are always destroyed after children.
      
       - cpuset mm node migration was performed synchronously while holding
         threadgroup and cgroup mutexes and the recent threadgroup locking
         update resulted in a possible deadlock.  The migration is best effort
         and shouldn't have been performed under those locks to begin with.
         Made asynchronous.
      
       - Minor documentation fix.
      
      * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        Documentation: cgroup: Fix 'cgroup-legacy' -> 'cgroup-v1'
        cgroup: make sure a parent css isn't freed before its children
        cgroup: make sure a parent css isn't offlined before its children
        cpuset: make mm migration asynchronous
      fb0dc5f1
    • L
      Merge branch 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 9aece75c
      Linus Torvalds 提交于
      Pull workqueue fixes from Tejun Heo:
       "Workqueue fixes for v4.5-rc3.
      
         - Remove a spurious triggering of flush dependency warning.
      
         - Officially break local execution guarantee of unbound work items
           and add a debug feature to flush out usages which depend on it.
      
         - Work around CPU -> NODE mapping becoming invalid on CPU offline.
      
        The branch is young but pushing out early as stable kernels are being
        affected"
      
      * 'for-4.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup
        workqueue: implement "workqueue.debug_force_rr_cpu" debug feature
        workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs
        Revert "workqueue: make sure delayed work run in local cpu"
        workqueue: skip flush dependency checks for legacy workqueues
      9aece75c
    • T
      workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup · d6e022f1
      Tejun Heo 提交于
      When looking up the pool_workqueue to use for an unbound workqueue,
      workqueue assumes that the target CPU is always bound to a valid NUMA
      node.  However, currently, when a CPU goes offline, the mapping is
      destroyed and cpu_to_node() returns NUMA_NO_NODE.
      
      This has always been broken but hasn't triggered often enough before
      874bbfe6 ("workqueue: make sure delayed work run in local cpu").
      After the commit, workqueue forcifully assigns the local CPU for
      delayed work items without explicit target CPU to fix a different
      issue.  This widens the window where CPU can go offline while a
      delayed work item is pending causing delayed work items dispatched
      with target CPU set to an already offlined CPU.  The resulting
      NUMA_NO_NODE mapping makes workqueue try to queue the work item on a
      NULL pool_workqueue and thus crash.
      
      While 874bbfe6 has been reverted for a different reason making the
      bug less visible again, it can still happen.  Fix it by mapping
      NUMA_NO_NODE to the default pool_workqueue from unbound_pwq_by_node().
      This is a temporary workaround.  The long term solution is keeping CPU
      -> NODE mapping stable across CPU off/online cycles which is being
      worked on.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NMike Galbraith <umgwanakikbuti@gmail.com>
      Cc: Tang Chen <tangchen@cn.fujitsu.com>
      Cc: Rafael J. Wysocki <rafael@kernel.org>
      Cc: Len Brown <len.brown@intel.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/g/1454424264.11183.46.camel@gmail.com
      Link: http://lkml.kernel.org/g/1453702100-2597-1-git-send-email-tangchen@cn.fujitsu.com
      d6e022f1
    • A
      ahci: Intel DNV device IDs SATA · 342decff
      Alexandra Yates 提交于
      Adding Intel codename DNV platform device IDs for SATA.
      Signed-off-by: NAlexandra Yates <alexandra.yates@linux.intel.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      342decff
  3. 10 2月, 2016 15 次提交
    • D
      Merge branch 'ovs-tunnel-mtu' · 1902750b
      David S. Miller 提交于
      David Wragg says:
      
      ====================
      Set a large MTU on ovs-created tunnel devices
      
      Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could
      transmit vxlan packets of any size, constrained only by the ability to
      send out the resulting packets.  4.3 introduced netdevs corresponding
      to tunnel vports.  These netdevs have an MTU, which limits the size of
      a packet that can be successfully encapsulated.  The default MTU
      values are low (1500 or less), which is awkwardly small in the context
      of physical networks supporting jumbo frames, and leads to a
      conspicuous change in behaviour for userspace.
      
      This patch series sets the MTU on openvswitch-created netdevs to be
      the relevant maximum (i.e. the maximum IP packet size minus any
      relevant overhead), effectively restoring the behaviour prior to 4.3.
      
      Where relevant, the limits on MTU values that can be directly set on
      the netdevs are also relaxed.
      
      Changes in v2:
      * Extend to all openvswitch tunnel types, i.e. gre and geneve as well
      * Use IP_MAX_MTU
      
      Changes in v3:
      * Fix block comment style
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1902750b
    • D
      vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices · 7e059158
      David Wragg 提交于
      Prior to 4.3, openvswitch tunnel vports (vxlan, gre and geneve) could
      transmit vxlan packets of any size, constrained only by the ability to
      send out the resulting packets.  4.3 introduced netdevs corresponding
      to tunnel vports.  These netdevs have an MTU, which limits the size of
      a packet that can be successfully encapsulated.  The default MTU
      values are low (1500 or less), which is awkwardly small in the context
      of physical networks supporting jumbo frames, and leads to a
      conspicuous change in behaviour for userspace.
      
      Instead, set the MTU on openvswitch-created netdevs to be the relevant
      maximum (i.e. the maximum IP packet size minus any relevant overhead),
      effectively restoring the behaviour prior to 4.3.
      Signed-off-by: NDavid Wragg <david@weave.works>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e059158
    • D
      geneve: Relax MTU constraints · 55e5bfb5
      David Wragg 提交于
      Allow the MTU of geneve devices to be set to large values, in order to
      exploit underlying networks with larger frame sizes.
      
      GENEVE does not have a fixed encapsulation overhead (an openvswitch
      rule can add variable length options), so there is no relevant maximum
      MTU to enforce.  A maximum of IP_MAX_MTU is used instead.
      Encapsulated packets that are too big for the underlying network will
      get dropped on the floor.
      Signed-off-by: NDavid Wragg <david@weave.works>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      55e5bfb5
    • D
      vxlan: Relax MTU constraints · 72564b59
      David Wragg 提交于
      Allow the MTU of vxlan devices without an underlying device to be set
      to larger values (up to a maximum based on IP packet limits and vxlan
      overhead).
      
      Previously, their MTUs could not be set to higher than the
      conventional ethernet value of 1500.  This is a very arbitrary value
      in the context of vxlan, and prevented vxlan devices from being able
      to take advantage of jumbo frames etc.
      
      The default MTU remains 1500, for compatibility.
      Signed-off-by: NDavid Wragg <david@weave.works>
      Acked-by: NRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72564b59
    • L
      gpio: davinci: Fix the number of controllers allocated · 6ec9249a
      Lokesh Vutla 提交于
      Driver only needs to allocate for [ngpio / 32] controllers,
      as each controller handles 32 gpios. But the current driver
      allocates for ngpio of which the extra allocated are unused.
      Fix it be registering only the required number of controllers.
      Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
      Signed-off-by: NKeerthy <j-keerthy@ti.com>
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      6ec9249a
    • K
      gpio: davinci: Add the missing of-node pointer · 310a7e60
      Keerthy 提交于
      Currently the first parameter of irq_domain_add_legacy is NULL.
      irq_find_host function returns NULL when we do not populate the of_node
      and hence irq_of_parse_and_map call fails whenever we want to request a
      gpio irq. This fixes the request_irq failures for gpio interrupts.
      Signed-off-by: NKeerthy <j-keerthy@ti.com>
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      310a7e60
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 2178cbc6
      Linus Torvalds 提交于
      Pull module fixes from Rusty Russell:
       "Fix for async_probe module param added in 4.3 (clearly not widely used
        yet), and a much more interesting kallsyms race which has been around
        approximately forever.  This fix is more invasive, and will require
        some care in backporting, but I hated all the bandaids I could think
        of, so...
      
        There are some more coming, which are only for breakages introduced
        this cycle (livepatch), but wanted these in now"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        modules: fix longstanding /proc/kallsyms vs module insertion race.
        module: wrapper for symbol name.
        modules: fix modparam async_probe request
      2178cbc6
    • G
      Input: colibri-vf50-ts - add missing #include <linux/of.h> · ff84dabe
      Geert Uytterhoeven 提交于
      drivers/input/touchscreen/colibri-vf50-ts.c: In function ‘vf50_ts_probe’:
      drivers/input/touchscreen/colibri-vf50-ts.c:302: error: implicit declaration of function ‘of_property_read_u32’
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      ff84dabe
    • L
      Input: adp5589 - fix row 5 handling for adp5589 · 7008dafb
      Lars-Peter Clausen 提交于
      The adp5589 has row 5, don't skip it when creating the GPIO mapping.
      Otherwise the pin gets reserved as used and it is not possible to use it as
      a GPIO.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NMichael Hennerich <michael.hennerich@analog.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      7008dafb
    • P
      Input: edt-ft5x06 - fix setting gain, offset, and threshold via device tree · dc262dfa
      Philipp Zabel 提交于
      A recent patch broke parsing the gain, offset, and threshold parameters
      from device tree. Instead of setting the cached values and writing them
      to the correct registers during probe, it would write the values from DT
      into the register address variables and never write them to the chip
      during normal operation.
      
      Fixes: 2e23b7a9 ("Input: edt-ft5x06 - use generic properties API")
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      dc262dfa
    • T
      workqueue: implement "workqueue.debug_force_rr_cpu" debug feature · f303fccb
      Tejun Heo 提交于
      Workqueue used to guarantee local execution for work items queued
      without explicit target CPU.  The guarantee is gone now which can
      break some usages in subtle ways.  To flush out those cases, this
      patch implements a debug feature which forces round-robin CPU
      selection for all such work items.
      
      The debug feature defaults to off and can be enabled with a kernel
      parameter.  The default can be flipped with a debug config option.
      
      If you hit this commit during bisection, please refer to 041bd12e
      ("Revert "workqueue: make sure delayed work run in local cpu"") for
      more information and ping me.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      f303fccb
    • M
      workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs · ef557180
      Mike Galbraith 提交于
      WORK_CPU_UNBOUND work items queued to a bound workqueue always run
      locally.  This is a good thing normally, but not when the user has
      asked us to keep unbound work away from certain CPUs.  Round robin
      these to wq_unbound_cpumask CPUs instead, as perturbation avoidance
      trumps performance.
      
      tj: Cosmetic and comment changes.  WARN_ON_ONCE() dropped from empty
          (wq_unbound_cpumask AND cpu_online_mask).  If we want that, it
          should be done when config changes.
      Signed-off-by: NMike Galbraith <umgwanakikbuti@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      ef557180
    • T
      Revert "workqueue: make sure delayed work run in local cpu" · 041bd12e
      Tejun Heo 提交于
      This reverts commit 874bbfe6.
      
      Workqueue used to implicity guarantee that work items queued without
      explicit CPU specified are put on the local CPU.  Recent changes in
      timer broke the guarantee and led to vmstat breakage which was fixed
      by 176bed1d ("vmstat: explicitly schedule per-cpu work on the CPU
      we need it to run on").
      
      vmstat is the most likely to expose the issue and it's quite possible
      that there are other similar problems which are a lot more difficult
      to trigger.  As a preventive measure, 874bbfe6 ("workqueue: make
      sure delayed work run in local cpu") was applied to restore the local
      CPU guarnatee.  Unfortunately, the change exposed a bug in timer code
      which got fixed by 22b886dd ("timers: Use proper base migration in
      add_timer_on()").  Due to code restructuring, the commit couldn't be
      backported beyond certain point and stable kernels which only had
      874bbfe6 started crashing.
      
      The local CPU guarantee was accidental more than anything else and we
      want to get rid of it anyway.  As, with the vmstat case fixed,
      874bbfe6 is causing more problems than it's fixing, it has been
      decided to take the chance and officially break the guarantee by
      reverting the commit.  A debug feature will be added to force foreign
      CPU assignment to expose cases relying on the guarantee and fixes for
      the individual cases will be backported to stable as necessary.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Fixes: 874bbfe6 ("workqueue: make sure delayed work run in local cpu")
      Link: http://lkml.kernel.org/g/20160120211926.GJ10810@quack.suse.cz
      Cc: stable@vger.kernel.org
      Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
      Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: Daniel Bilik <daniel.bilik@neosystem.cz>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Shaohua Li <shli@fb.com>
      Cc: Sasha Levin <sasha.levin@oracle.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Bilik <daniel.bilik@neosystem.cz>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Michal Hocko <mhocko@kernel.org>
      041bd12e
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 7cf91adc
      Linus Torvalds 提交于
      Pull crypto fixes from Herbert Xu:
       "This fixes the following issues:
      
        API:
         - Fix async algif_skcipher, it was broken by recent fixes.
         - Fix potential race condition in algif_skcipher with ctx.
         - Fix potential memory corruption in algif_skcipher.
         - Add missing lock to crypto_user when doing an alg dump.
      
        Drivers:
         - marvell/cesa was testing the wrong variable for NULL after
           allocation.
         - Fix potential double-free in atmel-sha.
         - Fix illegal call to sleepin function from atomic context in
           atmel-sha"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init()
        crypto: atmel-sha - remove calls of clk_prepare() from atomic contexts
        crypto: atmel-sha - fix atmel_sha_remove()
        crypto: algif_skcipher - Do not set MAY_BACKLOG on the async path
        crypto: algif_skcipher - Do not dereference ctx without socket lock
        crypto: algif_skcipher - Do not assume that req is unchanged
        crypto: user - lock crypto_alg_list on alg dump
      7cf91adc
    • J
      scripts: add "prune-kernel" script to clean up old kernel images · b64e86cd
      J. Bruce Fields 提交于
      Long ago, Dave Jones complained about CONFIG_LOCALVERSION_AUTO:
       "I don't use the auto config, because I end up filling up /boot unless
        I go through and clean them out by hand every time I install a new one
        (which I do probably a dozen or so times a day).  Is there some easy
        way to prune old builds I'm missing?"
      
      To which Bruce replied:
       "I run this by hand every now and then.  I'm probably doing it all wrong"
      
      And if he is running it wrong, then so am I - because I've been using
      this script ever since.  It is true that CONFIG_LOCALVERSION_AUTO easily
      ends up filling your /boot partition if you don't clean up old versions
      regularly, and this script helps make that easier.
      
      Checked with Bruce to see that it's fine to add this to the kernel
      scripts.  Maybe people will come up with enhancements, but more
      importantly, this way I won't misplace this script whenever I install a
      new machine and start doing custom kernels for it.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b64e86cd
  4. 09 2月, 2016 11 次提交