05 Mar, 2016

1 commit


03 Mar, 2016

2 commits


28 Jan, 2016

1 commit

  • Drop support for platform data passed via a C-structure and switch to
    device properties instead, which should make the driver compatible
    with all platforms: OF, ACPI and static boards. Static boards should
    use property sets to communicate device parameters to the driver.

    Signed-off-by: Oreste Salerno
    Acked-by: Rob Herring
    Signed-off-by: Dmitry Torokhov

    Oreste Salerno
     

09 Jan, 2016

2 commits

  • Pull scheduler fixes from Ingo Molnar:
    "Misc scheduler fixes"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/core: Reset task's lockless wake-queues on fork()
    sched/core: Fix unserialized r-m-w scribbling stuff
    sched/core: Check tgid in is_global_init()
    sched/fair: Fix multiplication overflow on 32-bit systems

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "A slightly higher volume than a new year's wish, but not too
    worrisome: a large LOC is only for HD-audio device-specific quirks, so
    fairly safe to apply. The rest ASoC fixes are all trivial and small;
    a simple replacement of mutex call with nested lock version, a few
    Arizona and Realtek codec fixes, and a regression fix for Skylake
    firmware handling"

    * tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ASoC: Intel: Skylake: Fix the memory leak
    ASoC: Intel: Skylake: Revert previous broken fix memory leak fix
    ASoC: Use nested lock for snd_soc_dapm_mutex_lock
    ASoC: rt5645: add sys clk detection
    ALSA: hda - Add keycode map for alc input device
    ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO
    ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz

    Linus Torvalds
     

08 Jan, 2016

2 commits

  • Pull ftrace fix from Steven Rostedt:
    "PeiyangX Qiu reported that if a module fails to load between calling
    ftrace_module_init() and do_init_module() that the allocations made in
    ftrace_module_init() will not be freed, resulting in a memory leak.

    The solution is to call ftrace_release_mod() on the failing module in
    the fail path befor do_init_module() is called. This will remove any
    allocations made for that module, and nothing if ftrace_module_init()
    wasn't called yet for that module.

    Note, once do_init_module() is called, the MODULE_GOING notifiers are
    called for the failed module, which calls into the ftrace code to do
    the proper clean up (basically calling ftrace_release_mod())"

    * tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    ftrace/module: Call clean up function when module init fails early

    Linus Torvalds
     
  • If the module init code fails after calling ftrace_module_init() and before
    calling do_init_module(), we can suffer from a memory leak. This is because
    ftrace_module_init() allocates pages to store the locations that ftrace
    hooks are placed in the module text. If do_init_module() fails, it still
    calls the MODULE_GOING notifiers which will tell ftrace to do a clean up of
    the pages it allocated for the module. But if load_module() fails before
    then, the pages allocated by ftrace_module_init() will never be freed.

    Call ftrace_release_mod() on the module if load_module() fails before
    getting to do_init_module().

    Link: http://lkml.kernel.org/r/567CEA31.1070507@intel.com

    Reported-by: "Qiu, PeiyangX"
    Fixes: a949ae560a511 "ftrace/module: Hardcode ftrace_module_init() call into load_module()"
    Cc: stable@vger.kernel.org # v2.6.38+
    Acked-by: Rusty Russell
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

07 Jan, 2016

2 commits

  • Pull MTD fixes from Brian Norris:
    "Three last MTD fixes for v4.4. These are all fixes for regressions
    and bugs reported mid cycle. Unfortunately, some of them took a bit
    long to get proper testing and feedback.

    - Assign the default MTD name earlier in the registration process, so
    partition parsers (like cmdlinepart) see the right name. Without
    this, some systems may come up with unpartitioned flash. This was
    a v4.4-rc1 regression.

    - Revert some new Winbond SPI NOR flash unlocking/locking support;
    new code in v4.4 caused regressions on some Spansion flash.

    - Fix mis-typed parameter ordering in SPI NOR unlock function; this
    bug was introduced in v4.4-rc1"

    * tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
    mtd: spi-nor: fix stm_is_locked_sr() parameters
    mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
    mtd: fix cmdlinepart parser, early naming for auto-filled MTD

    Linus Torvalds
     
  • Merge several improvements to Goodix touchscreen driver:
    - power management support
    - configuration upload
    - axis swapping and inversion

    Dmitry Torokhov
     

06 Jan, 2016

5 commits

  • Some of the sched bitfieds (notably sched_reset_on_fork) can be set
    on other than current, this can cause the r-m-w to race with other
    updates.

    Since all the sched bits are serialized by scheduler locks, pull them
    in a separate word.

    Reported-by: Tejun Heo
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Dmitry Vyukov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Sasha Levin
    Cc: Thomas Gleixner
    Cc: akpm@linux-foundation.org
    Cc: hannes@cmpxchg.org
    Cc: mhocko@kernel.org
    Cc: vdavydov@parallels.com
    Link: http://lkml.kernel.org/r/20151125150207.GM11639@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Our global init task can have sub-threads, so ->pid check is not reliable
    enough for is_global_init(), we need to check tgid instead. This has been
    spotted by Oleg and a fix was proposed by Richard a long time ago (see the
    link below).

    Oleg wrote:

    : Because is_global_init() is only true for the main thread of /sbin/init.
    :
    : Just look at oom_unkillable_task(). It tries to not kill init. But, say,
    : select_bad_process() can happily find a sub-thread of is_global_init()
    : and still kill it.

    I recently hit the problem in question; re-sending the patch (to the
    best of my knowledge it has never been submitted) with updated function
    comment. Credit goes to Oleg and Richard.

    Suggested-by: Richard Guy Briggs
    Reported-by: Oleg Nesterov
    Signed-off-by: Sergey Senozhatsky
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Serge Hallyn
    Cc: Andrew Morton
    Cc: Eric W . Biederman
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Serge E . Hallyn
    Cc: Sergey Senozhatsky
    Cc: Thomas Gleixner
    Link: https://www.redhat.com/archives/linux-audit/2013-December/msg00086.html
    Signed-off-by: Ingo Molnar

    Sergey Senozhatsky
     
  • The SKF_AD_ALU_XOR_X ancillary is not like the other ancillary data
    instructions since it XORs A with X while all the others replace A with
    some loaded value. All the BPF JITs fail to clear A if this is used as
    the first instruction in a filter. This was found using american fuzzy
    lop.

    Add a helper to determine if A needs to be cleared given the first
    instruction in a filter, and use this in the JITs. Except for ARM, the
    rest have only been compile-tested.

    Fixes: 3480593131e0 ("net: filter: get rid of BPF_S_* enum")
    Signed-off-by: Rabin Vincent
    Acked-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Rabin Vincent
     
  • Spansion and Winbond have occasionally used the same manufacturer ID,
    and they don't support the same features. Particularly, writing SR=0
    seems to break read access for Spansion's s25fl064k. Unfortunately, we
    don't currently have a way to differentiate these Spansion and Winbond
    parts, so rather than regressing support for these Spansion flash, let's
    drop the new Winbond lock/unlock support for now. We can try to address
    Winbond support during the next release cycle.

    Original discussion:

    http://patchwork.ozlabs.org/patch/549173/
    http://patchwork.ozlabs.org/patch/553683/

    Fixes: 357ca38d4751 ("mtd: spi-nor: support lock/unlock/is_locked for Winbond")
    Fixes: c6fc2171b249 ("mtd: spi-nor: disable protection for Winbond flash at startup")
    Signed-off-by: Brian Norris
    Reported-by: Felix Fietkau
    Cc: Felix Fietkau

    Brian Norris
     
  • Mark Brown
     

05 Jan, 2016

1 commit

  • Commands run in a vrf context are not failing as expected on a route lookup:
    root@kenny:~# ip ro ls table vrf-red
    unreachable default

    root@kenny:~# ping -I vrf-red -c1 -w1 10.100.1.254
    ping: Warning: source address might be selected on device other than vrf-red.
    PING 10.100.1.254 (10.100.1.254) from 0.0.0.0 vrf-red: 56(84) bytes of data.

    --- 10.100.1.254 ping statistics ---
    2 packets transmitted, 0 received, 100% packet loss, time 999ms

    Since the vrf table does not have a route for 10.100.1.254 the ping
    should have failed. The saddr lookup causes a full VRF table lookup.
    Propogating a lookup failure to the user allows the command to fail as
    expected:

    root@kenny:~# ping -I vrf-red -c1 -w1 10.100.1.254
    connect: No route to host

    Signed-off-by: David Ahern
    Signed-off-by: David S. Miller

    David Ahern
     

01 Jan, 2016

1 commit

  • Pull networking fixes from David Miller:

    1) Prevent XFRM per-cpu counter updates for one namespace from being
    applied to another namespace. Fix from DanS treetman.

    2) Fix RCU de-reference in iwl_mvm_get_key_sta_id(), from Johannes
    Berg.

    3) Remove ethernet header assumption in nft_do_chain_netdev(), from
    Pablo Neira Ayuso.

    4) Fix cpsw PHY ident with multiple slaves and fixed-phy, from Pascal
    Speck.

    5) Fix use after free in sixpack_close and mkiss_close.

    6) Fix VXLAN fw assertion on bnx2x, from Yuval Mintz.

    7) natsemi doesn't check for DMA mapping errors, from Alexey
    Khoroshilov.

    8) Fix inverted test in ip6addrlbl_get(), from ANdrey Ryabinin.

    9) Missing initialization of needed_headroom in geneve tunnel driver,
    from Paolo Abeni.

    10) Fix conntrack template leak in openvswitch, from Joe Stringer.

    11) Mission initialization of wq->flags in sock_alloc_inode(), from
    Nicolai Stange.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits)
    sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close
    net, socket, socket_wq: fix missing initialization of flags
    drivers: net: cpsw: fix error return code
    openvswitch: Fix template leak in error cases.
    sctp: label accepted/peeled off sockets
    sctp: use GFP_USER for user-controlled kmalloc
    qlcnic: fix a loop exit condition better
    net: cdc_ncm: avoid changing RX/TX buffers on MTU changes
    geneve: initialize needed_headroom
    ipv6: honor ifindex in case we receive ll addresses in router advertisements
    addrconf: always initialize sysctl table data
    ipv6/addrlabel: fix ip6addrlbl_get()
    switchdev: bridge: Pass ageing time as clock_t instead of jiffies
    sh_eth: fix 16-bit descriptor field access endianness too
    veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.
    net: usb: cdc_ncm: Adding Dell DW5813 LTE AT&T Mobile Broadband Card
    net: usb: cdc_ncm: Adding Dell DW5812 LTE Verizon Mobile Broadband Card
    natsemi: add checks for dma mapping errors
    rhashtable: Kill harmless RCU warning in rhashtable_walk_init
    openvswitch: correct encoding of set tunnel action attributes
    ...

    Linus Torvalds
     

31 Dec, 2015

2 commits

  • Pull block fixes from Jens Axboe:
    "Make the block layer great again.

    Basically three amazing fixes in this pull request, split into 4
    patches. Believe me, they should go into 4.4. Two of them fix a
    regression, the third and last fixes an easy-to-trigger bug.

    - Fix a bad irq enable through null_blk, for queue_mode=1 and using
    timer completions. Add a block helper to restart a queue
    asynchronously, and use that from null_blk. From me.

    - Fix a performance issue in NVMe. Some devices (Intel Pxxxx) expose
    a stripe boundary, and performance suffers if we cross it. We took
    that into account for merging, but not for the newer splitting
    code. Fix from Keith.

    - Fix a kernel oops in lightnvm with multiple channels. From Matias"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    lightnvm: wrong offset in bad blk lun calculation
    null_blk: use async queue restart helper
    block: add blk_start_queue_async()
    block: Split bios on chunk boundaries

    Linus Torvalds
     
  • snd_soc_dapm_mutex_lock currently uses the un-nested call which can
    cause lockdep warnings when called from control handlers (a relatively
    common usage) and using modules. As creating the control causes a
    potential mutex inversion with the handler, creating the control will
    take the controls_rwsem under the dapm_mutex and accessing the control
    will take the dapm_mutex under controls_rwsem.

    All the users look like they want to be using the runtime class of the
    lock anyway, so this patch just changes snd_soc_dapm_mutex_lock to use
    the nested call, with the SND_SOC_DAPM_CLASS_RUNTIME class.

    Fixes: f6d5e586b416 ("ASoC: dapm: Add helpers to lock/unlock DAPM mutex")
    Signed-off-by: Charles Keepax
    Signed-off-by: Mark Brown

    Charles Keepax
     

30 Dec, 2015

1 commit

  • mod_zone_page_state() takes a "delta" integer argument. delta contains
    the number of pages that should be added or subtracted from a struct
    zone's vm_stat field.

    If a zone is larger than 8TB this will cause overflows. E.g. for a
    zone with a size slightly larger than 8TB the line

    mod_zone_page_state(zone, NR_ALLOC_BATCH, zone->managed_pages);

    in mm/page_alloc.c:free_area_init_core() will result in a negative
    result for the NR_ALLOC_BATCH entry within the zone's vm_stat, since 8TB
    contain 0x8xxxxxxx pages which will be sign extended to a negative
    value.

    Fix this by changing the delta argument to long type.

    This could fix an early boot problem seen on s390, where we have a 9TB
    system with only one node. ZONE_DMA contains 2GB and ZONE_NORMAL the
    rest. The system is trying to allocate a GFP_DMA page but ZONE_DMA is
    completely empty, so it tries to reclaim pages in an endless loop.

    This was seen on a heavily patched 3.10 kernel. One possible
    explaination seem to be the overflows caused by mod_zone_page_state().
    Unfortunately I did not have the chance to verify that this patch
    actually fixes the problem, since I don't have access to the system
    right now. However the overflow problem does exist anyway.

    Given the description that a system with slightly less than 8TB does
    work, this seems to be a candidate for the observed problem.

    Signed-off-by: Heiko Carstens
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

29 Dec, 2015

1 commit


24 Dec, 2015

1 commit

  • NCM buffer sizes are negotiated with the device independently of
    the network device MTU. The RX buffers are allocated by the
    usbnet framework based on the rx_urb_size value set by cdc_ncm. A
    single RX buffer can hold a number of MTU sized packets.

    The default usbnet change_mtu ndo only modifies rx_urb_size if it
    is equal to hard_mtu. And the cdc_ncm driver will set rx_urb_size
    and hard_mtu independently of each other, based on dwNtbInMaxSize
    and dwNtbOutMaxSize respectively. It was therefore assumed that
    usbnet_change_mtu() would never touch rx_urb_size. This failed to
    consider the case where dwNtbInMaxSize and dwNtbOutMaxSize happens
    to be equal.

    Fix by implementing an NCM specific change_mtu ndo, modifying the
    netdev MTU without touching the buffer size settings.

    Signed-off-by: Bjørn Mork
    Signed-off-by: David S. Miller

    Bjørn Mork
     

19 Dec, 2015

6 commits

  • Pull SCSI fixes from James Bottomley:
    "Three fixes this time, two in SES picked up by KASAN for various types
    of buffer overrun. The first is a USB array which returns page 8
    whatever is asked for and causes us to overrun with incorrect data
    format assumptions and the second is an invalid iteration of page 10
    (the additional information page).

    The final fix is a reversion of a NULL deref fix which caused
    suspend/resume not to be called in pairs leading to incorrect device
    operation (Jens has queued a more proper fix for the problem in
    block)"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    ses: fix additional element traversal bug
    Revert "SCSI: Fix NULL pointer dereference in runtime PM"
    ses: Fix problems with simple enclosures

    Linus Torvalds
     
  • Rework the uinput ABS validation to check passed absinfo data immediately,
    but do ABS initialization as last step in UI_DEV_CREATE. The behavior
    observed by user-space is not changed, as ABS initialization was never
    checked for errors.

    With this in place, the order of device initialization and abs
    configuration is no longer fixed. Userspace can initialize the device and
    afterwards set absinfo just fine.

    Signed-off-by: David Herrmann
    Reviewed-by: Benjamin Tissoires
    Tested-by: Benjamin Tissoires
    Signed-off-by: Dmitry Torokhov

    David Herrmann
     
  • This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces
    the old device setup method (by write()'ing "struct uinput_user_dev" to the
    node). The old method is not easily extendable and requires huge payloads.
    Furthermore, overloading write() without properly versioned objects is
    error-prone.

    Therefore, we introduce two new ioctls to replace the old method. These
    ioctls support all features of the old method, plus a "resolution" field
    for absinfo. Furthermore, it's properly forward-compatible to new ABS codes
    and a growing "struct input_absinfo" structure.

    UI_ABS_SETUP also allows user-space to skip unknown axes if not set. There
    is no need to copy the whole array temporarily into the kernel, but instead
    the caller issues several ioctl where we copy each value manually.

    Signed-off-by: David Herrmann
    Signed-off-by: Benjamin Tissoires
    Reviewed-by: David Herrmann
    Signed-off-by: Dmitry Torokhov

    Benjamin Tissoires
     
  • Merge misc fixes from Andrew Morton:
    "Three patches"

    * emailed patches from Andrew Morton :
    include/linux/mmdebug.h: should include linux/bug.h
    mm/zswap: change incorrect strncmp use to strcmp
    proc: fix -ESRCH error when writing to /proc/$pid/coredump_filter

    Linus Torvalds
     
  • mmdebug.h uses BUILD_BUG_ON_INVALID(), assuming someone else included
    linux/bug.h. Include it ourselves.

    This saves build-failures such as:

    arch/arm64/include/asm/pgtable.h: In function 'set_pte_at':
    arch/arm64/include/asm/pgtable.h:281:3: error: implicit declaration of function 'BUILD_BUG_ON_INVALID' [-Werror=implicit-function-declaration]
    VM_WARN_ONCE(!pte_young(pte),

    Fixes: 02602a18c32d7 ("bug: completely remove code generated by disabled VM_BUG_ON()")
    Signed-off-by: James Morse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Morse
     
  • Pull xen bug fixes from David Vrabel:
    - XSA-155 security fixes to backend drivers.
    - XSA-157 security fixes to pciback.

    * tag 'for-linus-4.4-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen-pciback: fix up cleanup path when alloc fails
    xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not set.
    xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled.
    xen/pciback: Do not install an IRQ handler for MSI interrupts.
    xen/pciback: Return error on XEN_PCI_OP_enable_msix when device has MSI or MSI-X enabled
    xen/pciback: Return error on XEN_PCI_OP_enable_msi when device has MSI or MSI-X enabled
    xen/pciback: Save xen_pci_op commands before processing it
    xen-scsiback: safely copy requests
    xen-blkback: read from indirect descriptors only once
    xen-blkback: only read request operation from shared ring once
    xen-netback: use RING_COPY_REQUEST() throughout
    xen-netback: don't use last request to determine minimum Tx credit
    xen: Add RING_COPY_REQUEST()
    xen/x86/pvh: Use HVM's flush_tlb_others op
    xen: Resume PMU from non-atomic context
    xen/events/fifo: Consume unprocessed events when a CPU dies

    Linus Torvalds
     

18 Dec, 2015

2 commits

  • Using RING_GET_REQUEST() on a shared ring is easy to use incorrectly
    (i.e., by not considering that the other end may alter the data in the
    shared ring while it is being inspected). Safe usage of a request
    generally requires taking a local copy.

    Provide a RING_COPY_REQUEST() macro to use instead of
    RING_GET_REQUEST() and an open-coded memcpy(). This takes care of
    ensuring that the copy is done correctly regardless of any possible
    compiler optimizations.

    Use a volatile source to prevent the compiler from reordering or
    omitting the copy.

    This is part of XSA155.

    CC: stable@vger.kernel.org
    Signed-off-by: David Vrabel
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • Pull networking fixes from David Miller:

    1) Fix uninitialized variable warnings in nfnetlink_queue, a lot of
    people reported this... From Arnd Bergmann.

    2) Don't init mutex twice in i40e driver, from Jesse Brandeburg.

    3) Fix spurious EBUSY in rhashtable, from Herbert Xu.

    4) Missing DMA unmaps in mvpp2 driver, from Marcin Wojtas.

    5) Fix race with work structure access in pppoe driver causing
    corruptions, from Guillaume Nault.

    6) Fix OOPS due to sh_eth_rx() not checking whether netdev_alloc_skb()
    actually succeeded or not, from Sergei Shtylyov.

    7) Don't lose flags when settifn IFA_F_OPTIMISTIC in ipv6 code, from
    Bjørn Mork.

    8) VXLAN_HD_RCO defined incorrectly, fix from Jiri Benc.

    9) Fix clock source used for cookies in SCTP, from Marcelo Ricardo
    Leitner.

    10) aurora driver needs HAS_DMA dependency, from Geert Uytterhoeven.

    11) ndo_fill_metadata_dst op of vxlan has to handle ipv6 tunneling
    properly as well, from Jiri Benc.

    12) Handle request sockets properly in xfrm layer, from Eric Dumazet.

    13) Double stats update in ipv6 geneve transmit path, fix from Pravin B
    Shelar.

    14) sk->sk_policy[] needs RCU protection, and as a result
    xfrm_policy_destroy() needs to free policies using an RCU grace
    period, from Eric Dumazet.

    15) SCTP needs to clone ipv6 tx options in order to avoid use after
    free, from Eric Dumazet.

    16) Missing kbuild export if ila.h, from Stephen Hemminger.

    17) Missing mdiobus_alloc() return value checking in mdio-mux.c, from
    Tobias Klauser.

    18) Validate protocol value range in ->create() methods, from Hannes
    Frederic Sowa.

    19) Fix early socket demux races that result in illegal dst reuse, from
    Eric Dumazet.

    20) Validate socket address length in pptp code, from WANG Cong.

    21) skb_reorder_vlan_header() uses incorrect offset and can corrupt
    packets, from Vlad Yasevich.

    22) Fix memory leaks in nl80211 registry code, from Ola Olsson.

    23) Timeout loop count handing fixes in mISDN, xgbe, qlge, sfc, and
    qlcnic. From Dan Carpenter.

    24) msg.msg_iocb needs to be cleared in recvfrom() otherwise, for
    example, AF_ALG will interpret it as an async call. From Tadeusz
    Struk.

    25) inetpeer_set_addr_v4 forgets to initialize the 'vif' field, from
    Eric Dumazet.

    26) rhashtable enforces the minimum table size not early enough,
    breaking how we calculate the per-cpu lock allocations. From
    Herbert Xu.

    27) Fix FCC port lockup in 82xx driver, from Martin Roth.

    28) FOU sockets need to be freed using RCU, from Hannes Frederic Sowa.

    29) Fix out-of-bounds access in __skb_complete_tx_timestamp() and
    sock_setsockopt() wrt. timestamp handling. From WANG Cong.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (117 commits)
    net: check both type and procotol for tcp sockets
    drivers: net: xgene: fix Tx flow control
    tcp: restore fastopen with no data in SYN packet
    af_unix: Revert 'lock_interruptible' in stream receive code
    fou: clean up socket with kfree_rcu
    82xx: FCC: Fixing a bug causing to FCC port lock-up
    gianfar: Don't enable RX Filer if not supported
    net: fix warnings in 'make htmldocs' by moving macro definition out of field declaration
    rhashtable: Fix walker list corruption
    rhashtable: Enforce minimum size on initial hash table
    inet: tcp: fix inetpeer_set_addr_v4()
    ipv6: automatically enable stable privacy mode if stable_secret set
    net: fix uninitialized variable issue
    bluetooth: Validate socket address length in sco_sock_bind().
    net_sched: make qdisc_tree_decrease_qlen() work for non mq
    ser_gigaset: remove unnecessary kfree() calls from release method
    ser_gigaset: fix deallocation of platform device structure
    ser_gigaset: turn nonsense checks into WARN_ON
    ser_gigaset: fix up NULL checks
    qlcnic: fix a timeout loop
    ...

    Linus Torvalds
     

17 Dec, 2015

2 commits


16 Dec, 2015

2 commits

  • David Ahern added a vif field in the a4 part of inetpeer_addr struct.

    This broke IPv4 TCP fast open client side and more generally tcp metrics
    cache, because inetpeer_addr_cmp() is now comparing two u32 instead of
    one.

    inetpeer_set_addr_v4() needs to properly init vif field, otherwise
    the comparison result depends on uninitialized data.

    Fixes: 192132b9a034 ("net: Add support for VRFs to inetpeer cache")
    Reported-by: Yuchung Cheng
    Signed-off-by: Eric Dumazet
    Cc: Neal Cardwell
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Pull dmaengine fixes from Vinod Koul:
    "This has fixes spread thru driver, notably among them:

    - edma fixes for recent edma DT changes which went into 4.4
    - odd fixes for at_hdmac
    - minor fixes on bc dma and mic dma"

    * tag 'dmaengine-fix-4.4-rc6' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
    dmaengine: edma: DT: Change reserved slot array from 16bit to 32bit type
    dmaengine: edma: DT: Change memcpy channel array from 16bit to 32bit type
    dmaengine: mic_x100: add missing spin_unlock
    dmaengine: bcm2835-dma: Convert to use DMA pool
    dmaengine: at_xdmac: fix bad behavior in interleaved mode
    dmaengine: at_xdmac: fix false condition for memset_sg transfers
    dmaengine: at_xdmac: fix macro typo

    Linus Torvalds
     

15 Dec, 2015

4 commits

  • David Wilder reported crashes caused by dst reuse.

    I am seeing a crash on a distro V4.2.3 kernel caused by a double
    release of a dst_entry. In ipv4_dst_destroy() the call to
    list_empty() finds a poisoned next pointer, indicating the dst_entry
    has already been removed from the list and freed. The crash occurs
    18 to 24 hours into a run of a network stress exerciser.

    Thanks to his detailed report and analysis, we were able to understand
    the core issue.

    IP early demux can associate a dst to skb, after a lookup in TCP/UDP
    sockets.

    When socket cache is not properly set, we want to store into
    sk->sk_dst_cache the dst for future IP early demux lookups,
    by acquiring a stable refcount on the dst.

    Problem is this acquisition is simply using an atomic_inc(),
    which works well, unless the dst was queued for destruction from
    dst_release() noticing dst refcount went to zero, if DST_NOCACHE
    was set on dst.

    We need to make sure current refcount is not zero before incrementing
    it, or risk double free as David reported.

    This patch, being a stable candidate, adds two new helpers, and use
    them only from IP early demux problematic paths.

    It might be possible to merge in net-next skb_dst_force() and
    skb_dst_force_safe(), but I prefer having the smallest patch for stable
    kernels : Maybe some skb_dst_force() callers do not expect skb->dst
    can suddenly be cleared.

    Can probably be backported back to linux-3.6 kernels

    Reported-by: David J. Wilder
    Tested-by: David J. Wilder
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • 郭永刚 reported that one could simply crash the kernel as root by
    using a simple program:

    int socket_fd;
    struct sockaddr_in addr;
    addr.sin_port = 0;
    addr.sin_addr.s_addr = INADDR_ANY;
    addr.sin_family = 10;

    socket_fd = socket(10,3,0x40000000);
    connect(socket_fd , &addr,16);

    AF_INET, AF_INET6 sockets actually only support 8-bit protocol
    identifiers. inet_sock's skc_protocol field thus is sized accordingly,
    thus larger protocol identifiers simply cut off the higher bits and
    store a zero in the protocol fields.

    This could lead to e.g. NULL function pointer because as a result of
    the cut off inet_num is zero and we call down to inet_autobind, which
    is NULL for raw sockets.

    kernel: Call Trace:
    kernel: [] ? inet_autobind+0x2e/0x70
    kernel: [] inet_dgram_connect+0x54/0x80
    kernel: [] SYSC_connect+0xd9/0x110
    kernel: [] ? ptrace_notify+0x5b/0x80
    kernel: [] ? syscall_trace_enter_phase2+0x108/0x200
    kernel: [] SyS_connect+0xe/0x10
    kernel: [] tracesys_phase2+0x84/0x89

    I found no particular commit which introduced this problem.

    CVE: CVE-2015-8543
    Cc: Cong Wang
    Reported-by: 郭永刚
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     
  • The commit 33db4125ec74 ("openvswitch: Rename LABEL->LABELS") left
    over an old OVS_CT_ATTR_LABEL instance, fix it.

    Fixes: 33db4125ec74 ("openvswitch: Rename LABEL->LABELS")
    Signed-off-by: Paolo Abeni
    Acked-by: Joe Stringer
    Signed-off-by: David S. Miller

    Paolo Abeni
     
  • Pablo Neira Ayuso says:

    ====================
    netfilter fixes for net

    The following patchset contains Netfilter fixes for you net tree,
    specifically for nf_tables and nfnetlink_queue, they are:

    1) Avoid a compilation warning in nfnetlink_queue that was introduced
    in the previous merge window with the simplification of the conntrack
    integration, from Arnd Bergmann.

    2) nfnetlink_queue is leaking the pernet subsystem registration from
    a failure path, patch from Nikolay Borisov.

    3) Pass down netns pointer to batch callback in nfnetlink, this is the
    largest patch and it is not a bugfix but it is a dependency to
    resolve a splat in the correct way.

    4) Fix a splat due to incorrect socket memory accounting with nfnetlink
    skbuff clones.

    5) Add missing conntrack dependencies to NFT_DUP_IPV4 and NFT_DUP_IPV6.

    6) Traverse the nftables commit list in reverse order from the commit
    path, otherwise we crash when the user applies an incremental update
    via 'nft -f' that deletes an object that was just introduced in this
    batch, from Xin Long.

    Regarding the compilation warning fix, many people have sent us (and
    keep sending us) patches to address this, that's why I'm including this
    batch even if this is not critical.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

14 Dec, 2015

2 commits

  • Jan Stancek reported that I wrecked things for him by fixing things for
    Vladimir :/

    His report was due to an UNINTERRUPTIBLE wait getting -EINTR, which
    should not be possible, however my previous patch made this possible by
    unconditionally checking signal_pending().

    We cannot use current->state as was done previously, because the
    instruction after the store to that variable it can be changed. We must
    instead pass the initial state along and use that.

    Fixes: 68985633bccb ("sched/wait: Fix signal handling in bit wait helpers")
    Reported-by: Jan Stancek
    Reported-by: Chris Mason
    Tested-by: Jan Stancek
    Tested-by: Vladimir Murzin
    Tested-by: Chris Mason
    Reviewed-by: Paul Turner
    Cc: Ingo Molnar
    Cc: tglx@linutronix.de
    Cc: Oleg Nesterov
    Cc: hpa@zytor.com
    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Pull timer fixlets from Thomas Gleixner:
    "Two trivial fixes which add missing header fileas and forward
    declarations so the code will compile even when the magic include
    chains are different"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip/gic-v3: Add missing include for barrier.h
    irqchip/gic-v3: Add missing struct device_node declaration

    Linus Torvalds