26 Aug, 2014

1 commit


07 Aug, 2014

2 commits

  • Pull SCSI updates from James Bottomley:
    "This patch set consists of the usual driver updates (ufs, storvsc,
    pm8001 hpsa). It also has removal of the user space target driver
    code (everyone is using LIO now), a partial PCI MSI-X update, more
    multi-queue updates, conversion to 64 bit LUNs (so we could
    theoretically cope with any LUN returned by a device) and placeholder
    support for the ZBC device type (Shingle drives), plus an assortment
    of minor updates and bug fixes"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (143 commits)
    scsi: do not issue SCSI RSOC command to Promise Vtrak E610f
    vmw_pvscsi: Use pci_enable_msix_exact() instead of pci_enable_msix()
    pm8001: Fix invalid return when request_irq() failed
    lpfc: Remove superfluous call to pci_disable_msix()
    isci: Use pci_enable_msix_exact() instead of pci_enable_msix()
    bfa: Use pci_enable_msix_exact() instead of pci_enable_msix()
    bfa: Cleanup bfad_setup_intr() function
    bfa: Do not call pci_enable_msix() after it failed once
    fnic: Use pci_enable_msix_exact() instead of pci_enable_msix()
    scsi: use short driver name for per-driver cmd slab caches
    scsi_debug: support scsi-mq, queues and locks
    Drivers: add blist flags
    scsi: ufs: fix endianness sparse warnings
    scsi: ufs: make undeclared functions static
    bnx2i: Update driver version to 2.7.10.1
    pm8001: fix a memory leak in nvmd_resp
    pm8001: fix update_flash
    pm8001: fix a memory leak in flash_update
    pm8001: Cleaning up uninitialized variables
    pm8001: Fix to remove null pointer checks that could never happen
    ...

    Linus Torvalds
     
  • Pull networking updates from David Miller:
    "Highlights:

    1) Steady transitioning of the BPF instructure to a generic spot so
    all kernel subsystems can make use of it, from Alexei Starovoitov.

    2) SFC driver supports busy polling, from Alexandre Rames.

    3) Take advantage of hash table in UDP multicast delivery, from David
    Held.

    4) Lighten locking, in particular by getting rid of the LRU lists, in
    inet frag handling. From Florian Westphal.

    5) Add support for various RFC6458 control messages in SCTP, from
    Geir Ola Vaagland.

    6) Allow to filter bridge forwarding database dumps by device, from
    Jamal Hadi Salim.

    7) virtio-net also now supports busy polling, from Jason Wang.

    8) Some low level optimization tweaks in pktgen from Jesper Dangaard
    Brouer.

    9) Add support for ipv6 address generation modes, so that userland
    can have some input into the process. From Jiri Pirko.

    10) Consolidate common TCP connection request code in ipv4 and ipv6,
    from Octavian Purdila.

    11) New ARP packet logger in netfilter, from Pablo Neira Ayuso.

    12) Generic resizable RCU hash table, with intial users in netlink and
    nftables. From Thomas Graf.

    13) Maintain a name assignment type so that userspace can see where a
    network device name came from (enumerated by kernel, assigned
    explicitly by userspace, etc.) From Tom Gundersen.

    14) Automatic flow label generation on transmit in ipv6, from Tom
    Herbert.

    15) New packet timestamping facilities from Willem de Bruijn, meant to
    assist in measuring latencies going into/out-of the packet
    scheduler, latency from TCP data transmission to ACK, etc"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1536 commits)
    cxgb4 : Disable recursive mailbox commands when enabling vi
    net: reduce USB network driver config options.
    tg3: Modify tg3_tso_bug() to handle multiple TX rings
    amd-xgbe: Perform phy connect/disconnect at dev open/stop
    amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask
    net: sun4i-emac: fix memory leak on bad packet
    sctp: fix possible seqlock seadlock in sctp_packet_transmit()
    Revert "net: phy: Set the driver when registering an MDIO bus device"
    cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine
    team: Simplify return path of team_newlink
    bridge: Update outdated comment on promiscuous mode
    net-timestamp: ACK timestamp for bytestreams
    net-timestamp: TCP timestamping
    net-timestamp: SCHED timestamp on entering packet scheduler
    net-timestamp: add key to disambiguate concurrent datagrams
    net-timestamp: move timestamp flags out of sk_flags
    net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
    cxgb4i : Move stray CPL definitions to cxgb4 driver
    tcp: reduce spurious retransmits due to transient SACK reneging
    qlcnic: Initialize dcbnl_ops before register_netdev
    ...

    Linus Torvalds
     

06 Aug, 2014

3 commits

  • Pull security subsystem updates from James Morris:
    "In this release:

    - PKCS#7 parser for the key management subsystem from David Howells
    - appoint Kees Cook as seccomp maintainer
    - bugfixes and general maintenance across the subsystem"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (94 commits)
    X.509: Need to export x509_request_asymmetric_key()
    netlabel: shorter names for the NetLabel catmap funcs/structs
    netlabel: fix the catmap walking functions
    netlabel: fix the horribly broken catmap functions
    netlabel: fix a problem when setting bits below the previously lowest bit
    PKCS#7: X.509 certificate issuer and subject are mandatory fields in the ASN.1
    tpm: simplify code by using %*phN specifier
    tpm: Provide a generic means to override the chip returned timeouts
    tpm: missing tpm_chip_put in tpm_get_random()
    tpm: Properly clean sysfs entries in error path
    tpm: Add missing tpm_do_selftest to ST33 I2C driver
    PKCS#7: Use x509_request_asymmetric_key()
    Revert "selinux: fix the default socket labeling in sock_graft()"
    X.509: x509_request_asymmetric_keys() doesn't need string length arguments
    PKCS#7: fix sparse non static symbol warning
    KEYS: revert encrypted key change
    ima: add support for measuring and appraising firmware
    firmware_class: perform new LSM checks
    security: introduce kernel_fw_from_file hook
    PKCS#7: Missing inclusion of linux/err.h
    ...

    Linus Torvalds
     
  • Conflicts:
    drivers/net/Makefile
    net/ipv6/sysctl_net_ipv6.c

    Two ipv6_table_template[] additions overlap, so the index
    of the ipv6_table[x] assignments needed to be adjusted.

    In the drivers/net/Makefile case, we've gotten rid of the
    garbage whereby we had to list every single USB networking
    driver in the top-level Makefile, there is just one
    "USB_NETWORKING" that guards everything.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull timer and time updates from Thomas Gleixner:
    "A rather large update of timers, timekeeping & co

    - Core timekeeping code is year-2038 safe now for 32bit machines.
    Now we just need to fix all in kernel users and the gazillion of
    user space interfaces which rely on timespec/timeval :)

    - Better cache layout for the timekeeping internal data structures.

    - Proper nanosecond based interfaces for in kernel users.

    - Tree wide cleanup of code which wants nanoseconds but does hoops
    and loops to convert back and forth from timespecs. Some of it
    definitely belongs into the ugly code museum.

    - Consolidation of the timekeeping interface zoo.

    - A fast NMI safe accessor to clock monotonic for tracing. This is a
    long standing request to support correlated user/kernel space
    traces. With proper NTP frequency correction it's also suitable
    for correlation of traces accross separate machines.

    - Checkpoint/restart support for timerfd.

    - A few NOHZ[_FULL] improvements in the [hr]timer code.

    - Code move from kernel to kernel/time of all time* related code.

    - New clocksource/event drivers from the ARM universe. I'm really
    impressed that despite an architected timer in the newer chips SoC
    manufacturers insist on inventing new and differently broken SoC
    specific timers.

    [ Ed. "Impressed"? I don't think that word means what you think it means ]

    - Another round of code move from arch to drivers. Looks like most
    of the legacy mess in ARM regarding timers is sorted out except for
    a few obnoxious strongholds.

    - The usual updates and fixlets all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits)
    timekeeping: Fixup typo in update_vsyscall_old definition
    clocksource: document some basic timekeeping concepts
    timekeeping: Use cached ntp_tick_length when accumulating error
    timekeeping: Rework frequency adjustments to work better w/ nohz
    timekeeping: Minor fixup for timespec64->timespec assignment
    ftrace: Provide trace clocks monotonic
    timekeeping: Provide fast and NMI safe access to CLOCK_MONOTONIC
    seqcount: Add raw_write_seqcount_latch()
    seqcount: Provide raw_read_seqcount()
    timekeeping: Use tk_read_base as argument for timekeeping_get_ns()
    timekeeping: Create struct tk_read_base and use it in struct timekeeper
    timekeeping: Restructure the timekeeper some more
    clocksource: Get rid of cycle_last
    clocksource: Move cycle_last validation to core code
    clocksource: Make delta calculation a function
    wireless: ath9k: Get rid of timespec conversions
    drm: vmwgfx: Use nsec based interfaces
    drm: i915: Use nsec based interfaces
    timekeeping: Provide ktime_get_raw()
    hangcheck-timer: Use ktime_get_ns()
    ...

    Linus Torvalds
     

05 Aug, 2014

4 commits

  • Pull driver core updates from Greg KH:
    "Here's the big driver-core pull request for 3.17-rc1.

    Largest thing in here is the dma-buf rework and fence code, that
    touched many different subsystems so it was agreed it should go
    through this tree to handle merge issues. There's also some firmware
    loading updates, as well as tests added, and a few other tiny changes,
    the changelog has the details.

    All have been in linux-next for a long time"

    * tag 'driver-core-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
    ARM: imx: Remove references to platform_bus in mxc code
    firmware loader: Fix _request_firmware_load() return val for fw load abort
    platform: Remove most references to platform_bus device
    test: add firmware_class loader test
    doc: fix minor typos in firmware_class README
    staging: android: Cleanup style issues
    Documentation: devres: Sort managed interfaces
    Documentation: devres: Add devm_kmalloc() et al
    fs: debugfs: remove trailing whitespace
    kernfs: kernel-doc warning fix
    debugfs: Fix corrupted loop in debugfs_remove_recursive
    stable_kernel_rules: Add pointer to netdev-FAQ for network patches
    driver core: platform: add device binding path 'driver_override'
    driver core/platform: remove unused implicit padding in platform_object
    firmware loader: inform direct failure when udev loader is disabled
    firmware: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
    firmware: read firmware size using i_size_read()
    firmware loader: allow disabling of udev as firmware loader
    reservation: add suppport for read-only access using rcu
    reservation: update api and add some helpers
    ...

    Conflicts:
    drivers/base/platform.c

    Linus Torvalds
     
  • Pull locking updates from Ingo Molnar:
    "The main changes in this cycle are:

    - big rtmutex and futex cleanup and robustification from Thomas
    Gleixner
    - mutex optimizations and refinements from Jason Low
    - arch_mutex_cpu_relax() removal and related cleanups
    - smaller lockdep tweaks"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
    arch, locking: Ciao arch_mutex_cpu_relax()
    locking/lockdep: Only ask for /proc/lock_stat output when available
    locking/mutexes: Optimize mutex trylock slowpath
    locking/mutexes: Try to acquire mutex only if it is unlocked
    locking/mutexes: Delete the MUTEX_SHOW_NO_WAITER macro
    locking/mutexes: Correct documentation on mutex optimistic spinning
    rtmutex: Make the rtmutex tester depend on BROKEN
    futex: Simplify futex_lock_pi_atomic() and make it more robust
    futex: Split out the first waiter attachment from lookup_pi_state()
    futex: Split out the waiter check from lookup_pi_state()
    futex: Use futex_top_waiter() in lookup_pi_state()
    futex: Make unlock_pi more robust
    rtmutex: Avoid pointless requeueing in the deadlock detection chain walk
    rtmutex: Cleanup deadlock detector debug logic
    rtmutex: Confine deadlock logic to futex
    rtmutex: Simplify remove_waiter()
    rtmutex: Document pi chain walk
    rtmutex: Clarify the boost/deboost part
    rtmutex: No need to keep task ref for lock owner check
    rtmutex: Simplify and document try_to_take_rtmutex()
    ...

    Linus Torvalds
     
  • Pull RCU changes from Ingo Molar:
    "The main changes:

    - torture-test updates
    - callback-offloading changes
    - maintainership changes
    - update RCU documentation
    - miscellaneous fixes"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
    rcu: Allow for NULL tick_nohz_full_mask when nohz_full= missing
    rcu: Fix a sparse warning in rcu_report_unblock_qs_rnp()
    rcu: Fix a sparse warning in rcu_initiate_boost()
    rcu: Fix __rcu_reclaim() to use true/false for bool
    rcu: Remove CONFIG_PROVE_RCU_DELAY
    rcu: Use __this_cpu_read() instead of per_cpu_ptr()
    rcu: Don't use NMIs to dump other CPUs' stacks
    rcu: Bind grace-period kthreads to non-NO_HZ_FULL CPUs
    rcu: Simplify priority boosting by putting rt_mutex in rcu_node
    rcu: Check both root and current rcu_node when setting up future grace period
    rcu: Allow post-unlock reference for rt_mutex
    rcu: Loosen __call_rcu()'s rcu_head alignment constraint
    rcu: Eliminate read-modify-write ACCESS_ONCE() calls
    rcu: Remove redundant ACCESS_ONCE() from tick_do_timer_cpu
    rcu: Make rcu node arrays static const char * const
    signal: Explain local_irq_save() call
    rcu: Handle obsolete references to TINY_PREEMPT_RCU
    rcu: Document deadlock-avoidance information for rcu_read_unlock()
    scripts: Teach get_maintainer.pl about the new "R:" tag
    rcu: Update rcu torture maintainership filename patterns
    ...

    Linus Torvalds
     
  • Pull percpu updates from Tejun Heo:

    - Major reorganization of percpu header files which I think makes
    things a lot more readable and logical than before.

    - percpu-refcount is updated so that it requires explicit destruction
    and can be reinitialized if necessary. This was pulled into the
    block tree to replace the custom percpu refcnting implemented in
    blk-mq.

    - In the process, percpu and percpu-refcount got cleaned up a bit

    * 'for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (21 commits)
    percpu-refcount: implement percpu_ref_reinit() and percpu_ref_is_zero()
    percpu-refcount: require percpu_ref to be exited explicitly
    percpu-refcount: use unsigned long for pcpu_count pointer
    percpu-refcount: add helpers for ->percpu_count accesses
    percpu-refcount: one bit is enough for REF_STATUS
    percpu-refcount, aio: use percpu_ref_cancel_init() in ioctx_alloc()
    workqueue: stronger test in process_one_work()
    workqueue: clear POOL_DISASSOCIATED in rebind_workers()
    percpu: Use ALIGN macro instead of hand coding alignment calculation
    percpu: invoke __verify_pcpu_ptr() from the generic part of accessors and operations
    percpu: preffity percpu header files
    percpu: use raw_cpu_*() to define __this_cpu_*()
    percpu: reorder macros in percpu header files
    percpu: move {raw|this}_cpu_*() definitions to include/linux/percpu-defs.h
    percpu: move generic {raw|this}_cpu_*_N() definitions to include/asm-generic/percpu.h
    percpu: only allow sized arch overrides for {raw|this}_cpu_*() ops
    percpu: reorganize include/linux/percpu-defs.h
    percpu: move accessors from include/linux/percpu.h to percpu-defs.h
    percpu: include/asm-generic/percpu.h should contain only arch-overridable parts
    percpu: introduce arch_raw_cpu_ptr()
    ...

    Linus Torvalds
     

03 Aug, 2014

3 commits

  • Generic implementation of a resizable, scalable, concurrent hash table
    based on [0]. The implementation supports both, fixed size keys specified
    via an offset and length, or arbitrary keys via own hash and compare
    functions.

    Lookups are lockless and protected as RCU read side critical sections.
    Automatic growing/shrinking based on user configurable watermarks is
    available while allowing concurrent lookups to take place.

    Objects to be hashed must include a struct rhash_head. The reason for not
    using the existing struct hlist_head is that the expansion and shrinking
    will have two buckets point to a single entry which would lead in obscure
    reverse chaining behaviour.

    Code includes a boot selftest if CONFIG_TEST_RHASHTABLE is defined.

    [0] https://www.usenix.org/legacy/event/atc11/tech/final_files/Triplett.pdf

    Signed-off-by: Thomas Graf
    Reviewed-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Check for cases when the caller requests 0 bytes instead of running off
    and dereferencing potentially invalid iovecs.

    Signed-off-by: Sasha Levin
    Signed-off-by: David S. Miller

    Sasha Levin
     
  • clean up names related to socket filtering and bpf in the following way:
    - everything that deals with sockets keeps 'sk_*' prefix
    - everything that is pure BPF is changed to 'bpf_*' prefix

    split 'struct sk_filter' into
    struct sk_filter {
    atomic_t refcnt;
    struct rcu_head rcu;
    struct bpf_prog *prog;
    };
    and
    struct bpf_prog {
    u32 jited:1,
    len:31;
    struct sock_fprog_kern *orig_prog;
    unsigned int (*bpf_func)(const struct sk_buff *skb,
    const struct bpf_insn *filter);
    union {
    struct sock_filter insns[0];
    struct bpf_insn insnsi[0];
    struct work_struct work;
    };
    };
    so that 'struct bpf_prog' can be used independent of sockets and cleans up
    'unattached' bpf use cases

    split SK_RUN_FILTER macro into:
    SK_RUN_FILTER to be used with 'struct sk_filter *' and
    BPF_PROG_RUN to be used with 'struct bpf_prog *'

    __sk_filter_release(struct sk_filter *) gains
    __bpf_prog_release(struct bpf_prog *) helper function

    also perform related renames for the functions that work
    with 'struct bpf_prog *', since they're on the same lines:

    sk_filter_size -> bpf_prog_size
    sk_filter_select_runtime -> bpf_prog_select_runtime
    sk_filter_free -> bpf_prog_free
    sk_unattached_filter_create -> bpf_prog_create
    sk_unattached_filter_destroy -> bpf_prog_destroy
    sk_store_orig_filter -> bpf_prog_store_orig_filter
    sk_release_orig_filter -> bpf_release_orig_filter
    __sk_migrate_filter -> bpf_migrate_filter
    __sk_prepare_filter -> bpf_prepare_filter

    API for attaching classic BPF to a socket stays the same:
    sk_attach_filter(prog, struct sock *)/sk_detach_filter(struct sock *)
    and SK_RUN_FILTER(struct sk_filter *, ctx) to execute a program
    which is used by sockets, tun, af_packet

    API for 'unattached' BPF programs becomes:
    bpf_prog_create(struct bpf_prog **)/bpf_prog_destroy(struct bpf_prog *)
    and BPF_PROG_RUN(struct bpf_prog *, ctx) to execute a program
    which is used by isdn, ppp, team, seccomp, ptp, xt_bpf, cls_bpf, test_bpf

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

31 Jul, 2014

1 commit

  • Currently, we have a 3-stage seeding process in prandom():

    Phase 1 is from the early actual initialization of prandom()
    subsystem which happens during core_initcall() and remains
    most likely until the beginning of late_initcall() phase.
    Here, the system might not have enough entropy available
    for seeding with strong randomness from the random driver.
    That means, we currently have a 32bit weak LCG() seeding
    the PRNG status register 1 and mixing that successively
    into the other 3 registers just to get it up and running.

    Phase 2 starts with late_initcall() phase resp. when the
    random driver has initialized its non-blocking pool with
    enough entropy. At that time, we throw away *all* inner
    state from its 4 registers and do a full reseed with strong
    randomness.

    Phase 3 starts right after that and does a periodic reseed
    with random slack of status register 1 by a strong random
    source again.

    A problem in phase 1 is that during bootup data structures
    can be initialized, e.g. on module load time, and thus access
    a weakly seeded prandom and are never changed for the rest
    of their live-time, thus carrying along the results from a
    week seed. Lets make sure that current but also future users
    access a possibly better early seeded prandom.

    This patch therefore improves phase 1 by trying to make it
    more 'unpredictable' through mixing in seed from a possible
    hardware source. Now, the mix-in xors inner state with the
    outcome of either of the two functions arch_get_random_{,seed}_int(),
    preferably arch_get_random_seed_int() as it likely represents
    a non-deterministic random bit generator in hw rather than
    a cryptographically secure PRNG in hw. However, not all might
    have the first one, so we use the PRNG as a fallback if
    available. As we xor the seed into the current state, the
    worst case would be that a hardware source could be unverifiable
    compromised or backdoored. In that case nevertheless it
    would be as good as our original early seeding function
    prandom_seed_very_weak() since we mix through xor which is
    entropy preserving.

    Joint work with Daniel Borkmann.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     

26 Jul, 2014

1 commit

  • Blk-mq drivers usually preallocate their S/G list as part of the request,
    but if we want to support the very large S/G lists currently supported by
    the SCSI code that would tie up a lot of memory in the preallocated request
    pool. Add support to the scatterlist code so that it can initialize a
    S/G list that uses a preallocated first chunks and dynamically allocated
    additional chunks. That way the scsi-mq code can preallocate a first
    page worth of S/G entries as part of the request, and dynamically extend
    the S/G list when needed.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Webb Scales
    Acked-by: Jens Axboe
    Tested-by: Bart Van Assche
    Tested-by: Robert Elliott

    Christoph Hellwig
     

25 Jul, 2014

1 commit


24 Jul, 2014

1 commit

  • Create a module that allows udelay() to be executed to ensure that
    it is delaying at least as long as requested (with a little bit of
    error allowed).

    There are some configurations which don't have reliably udelay
    due to using a loop delay with cpufreq changes which should use
    a counter time based delay instead. This test aims to identify
    those configurations where timing is unreliable.

    Signed-off-by: David Riley
    Signed-off-by: John Stultz

    David Riley
     

23 Jul, 2014

1 commit

  • A call to of_iomap does not request the memory region. This patch adds the
    function of_io_request_and_map which requests the memory region before
    mapping it.

    Signed-off-by: Matthias Brugger
    Suggested-by: Thomas Gleixner
    Suggested-by: Rob Herring
    Acked-by: Rob Herring
    Signed-off-by: Daniel Lezcano

    Matthias Brugger
     

22 Jul, 2014

1 commit


21 Jul, 2014

1 commit

  • This way we'll always know in what status the device is, unless it's
    running normally (i.e. NETDEV_REGISTERED).

    Also, emit a warning once in case of a bad reg_state.

    CC: "David S. Miller"
    CC: Jason Baron
    CC: Eric Dumazet
    CC: Vlad Yasevich
    CC: stephen hemminger
    CC: Jerry Chu
    CC: Ben Hutchings
    CC: Joe Perches
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     

18 Jul, 2014

2 commits


17 Jul, 2014

4 commits

  • The arch_mutex_cpu_relax() function, introduced by 34b133f, is
    hacky and ugly. It was added a few years ago to address the fact
    that common cpu_relax() calls include yielding on s390, and thus
    impact the optimistic spinning functionality of mutexes. Nowadays
    we use this function well beyond mutexes: rwsem, qrwlock, mcs and
    lockref. Since the macro that defines the call is in the mutex header,
    any users must include mutex.h and the naming is misleading as well.

    This patch (i) renames the call to cpu_relax_lowlatency ("relax, but
    only if you can do it with very low latency") and (ii) defines it in
    each arch's asm/processor.h local header, just like for regular cpu_relax
    functions. On all archs, except s390, cpu_relax_lowlatency is simply cpu_relax,
    and thus we can take it out of mutex.h. While this can seem redundant,
    I believe it is a good choice as it allows us to move out arch specific
    logic from generic locking primitives and enables future(?) archs to
    transparently define it, similarly to System Z.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Peter Zijlstra
    Cc: Andrew Morton
    Cc: Anton Blanchard
    Cc: Aurelien Jacquiot
    Cc: Benjamin Herrenschmidt
    Cc: Bharat Bhushan
    Cc: Catalin Marinas
    Cc: Chen Liqin
    Cc: Chris Metcalf
    Cc: Christian Borntraeger
    Cc: Chris Zankel
    Cc: David Howells
    Cc: David S. Miller
    Cc: Deepthi Dharwar
    Cc: Dominik Dingel
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Hirokazu Takata
    Cc: Ivan Kokshaysky
    Cc: James E.J. Bottomley
    Cc: James Hogan
    Cc: Jason Wang
    Cc: Jesper Nilsson
    Cc: Joe Perches
    Cc: Jonas Bonn
    Cc: Joseph Myers
    Cc: Kees Cook
    Cc: Koichi Yasutake
    Cc: Lennox Wu
    Cc: Linus Torvalds
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Neuling
    Cc: Michal Simek
    Cc: Mikael Starvik
    Cc: Nicolas Pitre
    Cc: Paolo Bonzini
    Cc: Paul Burton
    Cc: Paul E. McKenney
    Cc: Paul Gortmaker
    Cc: Paul Mackerras
    Cc: Qais Yousef
    Cc: Qiaowei Ren
    Cc: Rafael Wysocki
    Cc: Ralf Baechle
    Cc: Richard Henderson
    Cc: Richard Kuo
    Cc: Russell King
    Cc: Steven Miao
    Cc: Steven Rostedt
    Cc: Stratos Karafotis
    Cc: Tim Chen
    Cc: Tony Luck
    Cc: Vasily Kulikov
    Cc: Vineet Gupta
    Cc: Vineet Gupta
    Cc: Waiman Long
    Cc: Will Deacon
    Cc: Wolfram Sang
    Cc: adi-buildroot-devel@lists.sourceforge.net
    Cc: linux390@de.ibm.com
    Cc: linux-alpha@vger.kernel.org
    Cc: linux-am33-list@redhat.com
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-c6x-dev@linux-c6x.org
    Cc: linux-cris-kernel@axis.com
    Cc: linux-hexagon@vger.kernel.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux@lists.openrisc.net
    Cc: linux-m32r-ja@ml.linux-m32r.org
    Cc: linux-m32r@ml.linux-m32r.org
    Cc: linux-m68k@lists.linux-m68k.org
    Cc: linux-metag@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-s390@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: linux-xtensa@linux-xtensa.org
    Cc: sparclinux@vger.kernel.org
    Link: http://lkml.kernel.org/r/1404079773.2619.4.camel@buesod1.americas.hpqcorp.net
    Signed-off-by: Ingo Molnar

    Davidlohr Bueso
     
  • …and to refresh the branch with fixes

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • …/linux-rcu into core/rcu

    Pull RCU updates from Paul E. McKenney:

    * Update RCU documentation.

    * Miscellaneous fixes.

    * Maintainership changes.

    * Torture-test updates.

    * Callback-offloading changes.

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Signed-off-by: David S. Miller

    David S. Miller
     

15 Jul, 2014

1 commit

  • Pull networking fixes from David Miller:

    1) Bluetooth pairing fixes from Johan Hedberg.

    2) ieee80211_send_auth() doesn't allocate enough tail room for the SKB,
    from Max Stepanov.

    3) New iwlwifi chip IDs, from Oren Givon.

    4) bnx2x driver reads wrong PCI config space MSI register, from Yijing
    Wang.

    5) IPV6 MLD Query validation isn't strong enough, from Hangbin Liu.

    6) Fix double SKB free in openvswitch, from Andy Zhou.

    7) Fix sk_dst_set() being racey with UDP sockets, leading to strange
    crashes, from Eric Dumazet.

    8) Interpret the NAPI budget correctly in the new systemport driver,
    from Florian Fainelli.

    9) VLAN code frees percpu stats in the wrong place, leading to crashes
    in the get stats handler. From Eric Dumazet.

    10) TCP sockets doing a repair can crash with a divide by zero, because
    we invoke tcp_push() with an MSS value of zero. Just skip that part
    of the sendmsg paths in repair mode. From Christoph Paasch.

    11) IRQ affinity bug fixes in mlx4 driver from Amir Vadai.

    12) Don't ignore path MTU icmp messages with a zero mtu, machines out
    there still spit them out, and all of our per-protocol handlers for
    PMTU can cope with it just fine. From Edward Allcutt.

    13) Some NETDEV_CHANGE notifier invocations were not passing in the
    correct kind of cookie as the argument, from Loic Prylli.

    14) Fix crashes in long multicast/broadcast reassembly, from Jon Paul
    Maloy.

    15) ip_tunnel_lookup() doesn't interpret wildcard keys correctly, fix
    from Dmitry Popov.

    16) Fix skb->sk assigned without taking a reference to 'sk' in
    appletalk, from Andrey Utkin.

    17) Fix some info leaks in ULP event signalling to userspace in SCTP,
    from Daniel Borkmann.

    18) Fix deadlocks in HSO driver, from Olivier Sobrie.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (93 commits)
    hso: fix deadlock when receiving bursts of data
    hso: remove unused workqueue
    net: ppp: don't call sk_chk_filter twice
    mlx4: mark napi id for gro_skb
    bonding: fix ad_select module param check
    net: pppoe: use correct channel MTU when using Multilink PPP
    neigh: sysctl - simplify address calculation of gc_* variables
    net: sctp: fix information leaks in ulpevent layer
    MAINTAINERS: update r8169 maintainer
    net: bcmgenet: fix RGMII_MODE_EN bit
    tipc: clear 'next'-pointer of message fragments before reassembly
    r8152: fix r8152_csum_workaround function
    be2net: set EQ DB clear-intr bit in be_open()
    GRE: enable offloads for GRE
    farsync: fix invalid memory accesses in fst_add_one() and fst_init_card()
    igb: do a reset on SR-IOV re-init if device is down
    igb: Workaround for i210 Errata 25: Slow System Clock
    usbnet: smsc95xx: add reset_resume function with reset operation
    dp83640: Always decode received status frames
    r8169: disable L23
    ...

    Linus Torvalds
     

10 Jul, 2014

1 commit

  • The CONFIG_PROVE_RCU_DELAY Kconfig parameter doesn't appear to be very
    effective at finding race conditions, so this commit removes it.

    Signed-off-by: Paul E. McKenney
    Cc: Andi Kleen
    [ paulmck: Remove definition and uses as noted by Paul Bolle. ]

    Paul E. McKenney
     

08 Jul, 2014

1 commit


04 Jul, 2014

2 commits

  • Jan points out that I forgot to make the needed fixes to the
    lz4_uncompress_unknownoutputsize() function to mirror the changes done
    in lz4_decompress() with regards to potential pointer overflows.

    The only in-kernel user of this function is the zram code, which only
    takes data from a valid compressed buffer that it made itself, so it's
    not a big issue. But due to external kernel modules using this
    function, it's better to be safe here.

    Reported-by: Jan Beulich
    Cc: "Don A. Bailey"
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • … into driver-core-next

    Russell writes:

    These updates fix one bug in the component helper where the matched
    components are not properly cleaned up when the master fails to bind.
    I'll provide a version of this for stable trees if it's deemed that
    we need to backport it.

    The second patch causes the component helper to ignore duplicate
    matches when adding components - this is something that was originally
    needed for imx-drm, but since that has now been updated, we no longer
    need to skip over a component which has already been matched.

    The final patch starts the process of updating the component helper
    API to achieve two goals: to allow the API to be more efficient when
    deferred probing occurs, and to allow for future improvements to the
    component helper without having a major impact on the users.

    This represents groundwork for some other changes; once this has been
    merged, I will then send two further pull requests (one for the staging
    tree, and one for the DRM tree) to update the drivers to the new API.
    This will result in these three commits being shared with those trees.

    Greg Kroah-Hartman
     

03 Jul, 2014

1 commit


29 Jun, 2014

1 commit

  • Pull SCSI target fixes from Nicholas Bellinger:
    "Mostly minor fixes this time around. The highlights include:

    - iscsi-target CHAP authentication fixes to enforce explicit key
    values (Tejas Vaykole + rahul.rane)
    - fix a long-standing OOPs in target-core when a alua configfs
    attribute is accessed after port symlink has been removed.
    (Sebastian Herbszt)
    - fix a v3.10.y iscsi-target regression causing the login reject
    status class/detail to be ignored (Christoph Vu-Brugier)
    - fix a v3.10.y iscsi-target regression to avoid rejecting an
    existing ITT during Data-Out when data-direction is wrong (Santosh
    Kulkarni + Arshad Hussain)
    - fix a iscsi-target related shutdown deadlock on UP kernels (Mikulas
    Patocka)
    - fix a v3.16-rc1 build issue with vhost-scsi + !CONFIG_NET (MST)"

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    iscsi-target: fix iscsit_del_np deadlock on unload
    iovec: move memcpy_from/toiovecend to lib/iovec.c
    iscsi-target: Avoid rejecting incorrect ITT for Data-Out
    tcm_loop: Fix memory leak in tcm_loop_submission_work error path
    iscsi-target: Explicily clear login response PDU in exception path
    target: Fix left-over se_lun->lun_sep pointer OOPs
    iscsi-target; Enforce 1024 byte maximum for CHAP_C key value
    iscsi-target: Convert chap_server_compute_md5 to use kstrtoul

    Linus Torvalds
     

28 Jun, 2014

7 commits

  • Now that explicit invocation of percpu_ref_exit() is necessary to free
    the percpu counter, we can implement percpu_ref_reinit() which
    reinitializes a released percpu_ref. This can be used implement
    scalable gating switch which can be drained and then re-opened without
    worrying about memory allocation failures.

    percpu_ref_is_zero() is added to be used in a sanity check in
    percpu_ref_exit(). As this function will be useful for other purposes
    too, make it a public interface.

    v2: Use smp_read_barrier_depends() instead of smp_load_acquire(). We
    only need data dep barrier and smp_load_acquire() is stronger and
    heavier on some archs. Spotted by Lai Jiangshan.

    Signed-off-by: Tejun Heo
    Cc: Kent Overstreet
    Cc: Christoph Lameter
    Cc: Lai Jiangshan

    Tejun Heo
     
  • Currently, a percpu_ref undoes percpu_ref_init() automatically by
    freeing the allocated percpu area when the percpu_ref is killed.
    While seemingly convenient, this has the following niggles.

    * It's impossible to re-init a released reference counter without
    going through re-allocation.

    * In the similar vein, it's impossible to initialize a percpu_ref
    count with static percpu variables.

    * We need and have an explicit destructor anyway for failure paths -
    percpu_ref_cancel_init().

    This patch removes the automatic percpu counter freeing in
    percpu_ref_kill_rcu() and repurposes percpu_ref_cancel_init() into a
    generic destructor now named percpu_ref_exit(). percpu_ref_destroy()
    is considered but it gets confusing with percpu_ref_kill() while
    "exit" clearly indicates that it's the counterpart of
    percpu_ref_init().

    All percpu_ref_cancel_init() users are updated to invoke
    percpu_ref_exit() instead and explicit percpu_ref_exit() calls are
    added to the destruction path of all percpu_ref users.

    Signed-off-by: Tejun Heo
    Acked-by: Benjamin LaHaise
    Cc: Kent Overstreet
    Cc: Christoph Lameter
    Cc: Benjamin LaHaise
    Cc: Nicholas A. Bellinger
    Cc: Li Zefan

    Tejun Heo
     
  • percpu_ref->pcpu_count is a percpu pointer with a status flag in its
    lowest bit. As such, it always goes through arithmetic operations
    which is very cumbersome to do on a pointer. It has to be first
    casted to unsigned long and then back.

    Let's just make the field unsigned long so that we can skip the first
    casts. While at it, rename it to pcpu_counter_ptr to clarify that
    it's a pointer value.

    Signed-off-by: Tejun Heo
    Cc: Kent Overstreet
    Cc: Christoph Lameter

    Tejun Heo
     
  • * All four percpu_ref_*() operations implemented in the header file
    perform the same operation to determine whether the percpu_ref is
    alive and extract the percpu pointer. Factor out the common logic
    into __pcpu_ref_alive(). This doesn't change the generated code.

    * There are a couple places in percpu-refcount.c which masks out
    PCPU_REF_DEAD to obtain the percpu pointer. Factor it out into
    pcpu_count_ptr().

    * The above changes make the WARN_ON_ONCE() conditional at the top of
    percpu_ref_kill_and_confirm() the only user of REF_STATUS(). Test
    PCPU_REF_DEAD directly and remove REF_STATUS().

    This patch doesn't introduce any functional change.

    Signed-off-by: Tejun Heo
    Cc: Kent Overstreet
    Cc: Christoph Lameter

    Tejun Heo
     
  • percpu-refcount currently reserves two lowest bits of its percpu
    pointer to indicate its state; however, only one bit is used for
    PCPU_REF_DEAD.

    Simplify it by removing PCPU_STATUS_BITS/MASK and testing
    PCPU_REF_DEAD directly. This also allows the compiler to choose a
    more efficient instruction depending on the architecture.

    Signed-off-by: Tejun Heo
    Cc: Kent Overstreet
    Cc: Christoph Lameter

    Tejun Heo
     
  • Pull compress bugfix from Greg KH:
    "Here is another lz4 bugfix for 3.16-rc3 that resolves a reported issue
    with that compression algorithm"

    * tag 'compress-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    lz4: fix another possible overrun

    Linus Torvalds
     
  • …kernel/git/konrad/swiotlb

    Pull swiotlb bugfix from Konrad Rzeszutek Wilk:
    "One bug-fix that had been in tree for quite some time. We had assumed
    that the physical address zero was invalid and would fail it. But
    that is not true and on some architectures it is not reserved and
    valid. This fixes it"

    * tag 'stable/for-linus-3.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
    swiotlb: don't assume PA 0 is invalid

    Linus Torvalds