06 Jan, 2016

1 commit

  • 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
     

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

1 commit

  • 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
     

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

2 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
     
  • 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
     

18 Dec, 2015

1 commit

  • 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
     

16 Dec, 2015

1 commit

  • 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

1 commit

  • 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

3 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
     
  • Pull USB driver fixes from Greg KH:
    "Here are a number of small USB fixes for 4.4-rc5. All of them have
    been in linux-next. The majority are gadget and phy issues, with a
    few new quirks and device ids added as well"

    * tag 'usb-4.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (32 commits)
    USB: add quirk for devices with broken LPM
    xhci: fix usb2 resume timing and races.
    usb: musb: fail with error when no DMA controller set
    usb: gadget: uvc: fix permissions of configfs attributes
    usb: musb: core: Fix pm runtime for deferred probe
    usb: phy: msm: fix a possible NULL dereference
    USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq
    usb: Quiet down false peer failure messages
    usb: xhci: fix config fail of FS hub behind a HS hub with MTT
    xhci: Fix memory leak in xhci_pme_acpi_rtd3_enable()
    usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message
    USB: whci-hcd: add check for dma mapping error
    usb: core : hub: Fix BOS 'NULL pointer' kernel panic
    USB: quirks: Apply ALWAYS_POLL to all ELAN devices
    usb-storage: Fix scsi-sd failure "Invalid field in cdb" for USB adapter JMicron
    USB: quirks: Fix another ELAN touchscreen
    usb: dwc3: gadget: don't prestart interrupt endpoints
    USB: serial: Another Infineon flash loader USB ID
    USB: cdc_acm: Ignore Infineon Flash Loader utility
    USB: cp210x: Remove CP2110 ID from compatibility list
    ...

    Linus Torvalds
     

13 Dec, 2015

4 commits

  • Merge misc fixes from Andrew Morton:
    "17 fixes"

    * emailed patches from Andrew Morton :
    MIPS: fix DMA contiguous allocation
    sh64: fix __NR_fgetxattr
    ocfs2: fix SGID not inherited issue
    mm/oom_kill.c: avoid attempting to kill init sharing same memory
    drivers/base/memory.c: prohibit offlining of memory blocks with missing sections
    tmpfs: fix shmem_evict_inode() warnings on i_blocks
    mm/hugetlb.c: fix resv map memory leak for placeholder entries
    mm: hugetlb: call huge_pte_alloc() only if ptep is null
    kernel: remove stop_machine() Kconfig dependency
    mm: kmemleak: mark kmemleak_init prototype as __init
    mm: fix kerneldoc on mem_cgroup_replace_page
    osd fs: __r4w_get_page rely on PageUptodate for uptodate
    MAINTAINERS: make Vladimir co-maintainer of the memory controller
    mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress
    mm: fix swapped Movable and Reclaimable in /proc/pagetypeinfo
    memcg: fix memory.high target
    mm: hugetlb: fix hugepage memory leak caused by wrong reserve count

    Linus Torvalds
     
  • Pull block layer fixes from Jens Axboe:
    "A set of fixes for the current series. This contains:

    - A bunch of fixes for lightnvm, should be the last round for this
    series. From Matias and Wenwei.

    - A writeback detach inode fix from Ilya, also marked for stable.

    - A block (though it says SCSI) fix for an OOPS in SCSI runtime power
    management.

    - Module init error path fixes for null_blk from Minfei"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    null_blk: Fix error path in module initialization
    lightnvm: do not compile in debugging by default
    lightnvm: prevent gennvm module unload on use
    lightnvm: fix media mgr registration
    lightnvm: replace req queue with nvmdev for lld
    lightnvm: comments on constants
    lightnvm: check mm before use
    lightnvm: refactor spin_unlock in gennvm_get_blk
    lightnvm: put blks when luns configure failed
    lightnvm: use flags in rrpc_get_blk
    block: detach bdev inode from its wb in __blkdev_put()
    SCSI: Fix NULL pointer dereference in runtime PM

    Linus Torvalds
     
  • Currently the full stop_machine() routine is only enabled on SMP if
    module unloading is enabled, or if the CPUs are hotpluggable. This
    leads to configurations where stop_machine() is broken as it will then
    only run the callback on the local CPU with irqs disabled, and not stop
    the other CPUs or run the callback on them.

    For example, this breaks MTRR setup on x86 in certain configs since
    ea8596bb2d8d379 ("kprobes/x86: Remove unused text_poke_smp() and
    text_poke_smp_batch() functions") as the MTRR is only established on the
    boot CPU.

    This patch removes the Kconfig option for STOP_MACHINE and uses the SMP
    and HOTPLUG_CPU config options to compile the correct stop_machine() for
    the architecture, removing the false dependency on MODULE_UNLOAD in the
    process.

    Link: https://lkml.org/lkml/2014/10/8/124
    References: https://bugs.freedesktop.org/show_bug.cgi?id=84794
    Signed-off-by: Chris Wilson
    Acked-by: Ingo Molnar
    Cc: "Paul E. McKenney"
    Cc: Pranith Kumar
    Cc: Michal Hocko
    Cc: Vladimir Davydov
    Cc: Johannes Weiner
    Cc: H. Peter Anvin
    Cc: Tejun Heo
    Cc: Iulia Manda
    Cc: Andy Lutomirski
    Cc: Rusty Russell
    Cc: Peter Zijlstra
    Cc: Chuck Ebbert
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Wilson
     
  • The kmemleak_init() definition in mm/kmemleak.c is marked __init but its
    prototype in include/linux/kmemleak.h is marked __ref since commit
    a6186d89c913 ("kmemleak: Mark the early log buffer as __initdata").

    This causes a section mismatch which is reported as a warning when
    building with clang -Wsection, because kmemleak_init() is declared in
    section .ref.text but defined in .init.text.

    Fix this by marking kmemleak_init() prototype __init.

    Signed-off-by: Nicolas Iooss
    Signed-off-by: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas Iooss
     

12 Dec, 2015

2 commits

  • Some USB device / host controller combinations seem to have problems
    with Link Power Management. For example, Steinar found that his xHCI
    controller wouldn't handle bandwidth calculations correctly for two
    video cards simultaneously when LPM was enabled, even though the bus
    had plenty of bandwidth available.

    This patch introduces a new quirk flag for devices that should remain
    disabled for LPM, and creates quirk entries for Steinar's devices.

    Signed-off-by: Alan Stern
    Reported-by: Steinar H. Gunderson
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • KASAN found that our additional element processing scripts drop off
    the end of the VPD page into unallocated space. The reason is that
    not every element has additional information but our traversal
    routines think they do, leading to them expecting far more additional
    information than is present. Fix this by adding a gate to the
    traversal routine so that it only processes elements that are expected
    to have additional information (list is in SES-2 section 6.1.13.1:
    Additional Element Status diagnostic page overview)

    Reported-by: Pavel Tikhomirov
    Tested-by: Pavel Tikhomirov
    Cc: stable@vger.kernel.org
    Signed-off-by: James Bottomley

    James Bottomley
     

11 Dec, 2015

2 commits

  • Pull rdma fixes from Doug Ledford:
    "Most are minor to important fixes.

    There is one performance enhancement that I took on the grounds that
    failing to check if other processes can run before running what's
    intended to be a background, idle-time task is a bug, even though the
    primary effect of the fix is to improve performance (and it was a very
    simple patch)"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
    IB/mlx5: Postpone remove_keys under knowledge of coming preemption
    IB/mlx4: Use vmalloc for WR buffers when needed
    IB/mlx4: Use correct order of variables in log message
    iser-target: Remove explicit mlx4 work-around
    mlx4: Expose correct max_sge_rd limit
    IB/mad: Require CM send method for everything except ClassPortInfo
    IB/cma: Add a missing rcu_read_unlock()
    IB core: Fix ib_sg_to_pages()
    IB/srp: Fix srp_map_sg_fr()
    IB/srp: Fix indirect data buffer rkey endianness
    IB/srp: Initialize dma_length in srp_map_idb
    IB/srp: Fix possible send queue overflow
    IB/srp: Fix a memory leak
    IB/sa: Put netlink request into the request list before sending
    IB/iser: use sector_div instead of do_div
    IB/core: use RCU for uverbs id lookup
    IB/qib: Minor fixes to qib per SFF 8636
    IB/core: Fix user mode post wr corruption
    IB/qib: Fix qib_mr structure

    Linus Torvalds
     
  • When the GICv3 header file is used in a C file that doesn't include
    any of the OF stuff, we end up with a bunch of ugly warnings.

    Let's keep GCC quiet by adding a forward declaration.

    Signed-off-by: Marc Zyngier
    Cc:
    Cc: Jason Cooper
    Link: http://lkml.kernel.org/r/1449483072-17694-2-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

10 Dec, 2015

6 commits

  • Pass the net pointer to the call_batch callback functions so we can skip
    recurrent lookups.

    Signed-off-by: Pablo Neira Ayuso
    Tested-by: Arturo Borrero Gonzalez

    Pablo Neira Ayuso
     
  • Vinod Koul
     
  • This change makes the DT file to be easier to read since the memcpy
    channels array does not need the '/bits/ 16' to be specified, which might
    confuse some people.

    Signed-off-by: Peter Ujfalusi
    Acked-by: Arnd Bergmann
    Acked-by: Rob Herring
    Acked-by: Tony Lindgren
    Signed-off-by: Vinod Koul

    Peter Ujfalusi
     
  • Pull VFIO fixes from Alex Williamson:

    - Various fixes for removing redundancy, const'ifying structs, avoiding
    stack usage, fixing WARN usage (Krzysztof Kozlowski, Julia Lawall,
    Kees Cook, Dan Carpenter)

    - Revert No-IOMMU mode as the intended user has not emerged (Alex
    Williamson)

    * tag 'vfio-v4.4-rc5' of git://github.com/awilliam/linux-vfio:
    Revert: "vfio: Include No-IOMMU mode"
    vfio: fix a warning message
    vfio: platform: remove needless stack usage
    vfio-pci: constify pci_error_handlers structures
    vfio: Drop owner assignment from platform_driver

    Linus Torvalds
     
  • Pull DT fixes from Rob Herring:
    "I think this should be all for 4.4:

    - Fix incorrect warning about overlapping memory regions

    - Export of_irq_find_parent again which was made static in 4.4, but
    has users pending for 4.5.

    - Fix of_msi_map_rid declaration location

    - Fix re-entrancy for of_fdt_unflatten_tree

    - Clean-up of phys_addr_t printks"

    * tag 'devicetree-fixes-for-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of/irq: move of_msi_map_rid declaration to the correct ifdef section
    of/irq: Export of_irq_find_parent again
    of/fdt: Add mutex protection for calls to __unflatten_device_tree()
    of/address: fix typo in comment block of of_translate_one()
    of: do not use 0x in front of %pa
    of: Fix comparison of reserved memory regions

    Linus Torvalds
     
  • ROL on a 32 bit integer with a shift of 32 or more is undefined and the
    result is arch-dependent. Avoid this by handling the trivial case of
    roling by 0 correctly.

    The trivial solution of checking if shift is 0 breaks gcc's detection
    of this code as a ROL instruction, which is unacceptable.

    This bug was reported and fixed in GCC
    (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157):

    The standard rotate idiom,

    (x << n) | (x >> (32 - n))

    is recognized by gcc (for concreteness, I discuss only the case that x
    is an uint32_t here).

    However, this is portable C only for n in the range 0 < n < 32. For n
    == 0, we get x >> 32 which gives undefined behaviour according to the
    C standard (6.5.7, Bitwise shift operators). To portably support n ==
    0, one has to write the rotate as something like

    (x << n) | (x >> ((-n) & 31))

    And this is apparently not recognized by gcc.

    Note that this is broken on older GCCs and will result in slower ROL.

    Acked-by: Linus Torvalds
    Signed-off-by: Sasha Levin
    Signed-off-by: Linus Torvalds

    Sasha Levin
     

09 Dec, 2015

6 commits

  • In checking fixes for of_irq_find_parent declaration location, I found
    that of_msi_map_rid is also wrong. of_msi_map_rid is not implemented for
    Sparc, so it should not be in the Sparc specific section of the header.
    Move it to just depend on OF_IRQ.

    Cc: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     
  • of_irq_find_parent was made static since it had no users outside of
    of_irq.c. Export it again since we are going to use it again.

    Signed-off-by: Carlo Caione
    [robh: move of_irq_find_parent to correct ifdef section]
    Signed-off-by: Rob Herring

    Carlo Caione
     
  • Pull cgroup fixes from Tejun Heo:
    "More change than I'd have liked at this stage. The pids controller
    and the changes made to cgroup core to support it introduced and
    revealed several important issues.

    - Assigning membership to a newly created task and migrating it can
    race leading to incorrect accounting. Oleg fixed it by widening
    threadgroup synchronization. It looks like we'll be able to merge
    it with a different percpu rwsem which is used in fork path making
    things simpler and cheaper.

    - The recent change to extend cgroup membership to zombies (so that
    pid accounting can extend till the pid is actually released) missed
    pinning the underlying data structures leading to use-after-free.
    Fixed.

    - v2 hierarchy was calling subsystem callbacks with the wrong target
    cgroup_subsys_state based on the incorrect assumption that they
    share the same target. pids is the first controller affected by
    this. Subsys callbacks updated so that they can deal with
    multi-target migrations"

    * 'for-4.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup_pids: don't account for the root cgroup
    cgroup: fix handling of multi-destination migration from subtree_control enabling
    cgroup_freezer: simplify propagation of CGROUP_FROZEN clearing in freezer_attach()
    cgroup: pids: kill pids_fork(), simplify pids_can_fork() and pids_cancel_fork()
    cgroup: pids: fix race between cgroup_post_fork() and cgroup_migrate()
    cgroup: make css_set pin its css's to avoid use-afer-free
    cgroup: fix cftype->file_offset handling

    Linus Torvalds
     
  • Pull libata fixes from Tejun Heo:
    "Nothing too interesting. All are device specific additions and
    workarounds"

    * 'for-4.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    ata/sata_fsl.c: add ATA_FLAG_NO_LOG_PAGE to blacklist the controller for log page reads
    libata-eh.c: Introduce new ata port flag for controller which lockup on read log page
    sata_sil: disable trim
    AHCI: Fix softreset failed issue of Port Multiplier
    sata/mvebu: use #ifdef around suspend/resume code
    ahci: Order SATA device IDs for codename Lewisburg
    ahci: Add Device ID for Intel Sunrise Point PCH

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "This tree includes four core perf fixes for misc bugs, three fixes to
    x86 PMU drivers, and two updates to old email addresses"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf: Do not send exit event twice
    perf/x86/intel: Fix INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_NA macro
    perf/x86/intel: Make L1D_PEND_MISS.FB_FULL not constrained on Haswell
    perf: Fix PERF_EVENT_IOC_PERIOD deadlock
    treewide: Remove old email address
    perf/x86: Fix LBR call stack save/restore
    perf: Update email address in MAINTAINERS
    perf/core: Robustify the perf_cgroup_from_task() RCU checks
    perf/core: Fix RCU problem with cgroup context switching code

    Linus Torvalds
     
  • mlx4 devices (ConnectX-2, ConnectX-3) has a limitation
    where rdma read work queue entries cannot exceed 512 bytes.
    A rdma_read wqe needs to fit in 512 bytes:
    - wqe control segment (16 bytes)
    - rdma segment (16 bytes)
    - scatter elements (16 bytes each)

    So max_sge_rd should be: (512 - 16 - 16) / 16 = 30.

    Signed-off-by: Sagi Grimberg
    Reviewed-by: Steve Wise
    Signed-off-by: Doug Ledford

    Sagi Grimberg
     

08 Dec, 2015

4 commits

  • Concurrent non-blocking slowpath ramrods can be completed
    out-of-order on the completion chain. Recycling completed elements,
    while previously sent elements are still completion pending,
    can lead to overriding of active elements on the chain. Furthermore,
    sending pending slowpath ramrods currently lacks the update of the
    chain element physical pointer.

    This patch:
    * Ensures that ramrods are sent to the FW with
    consecutive echo values.
    * Handles out-of-order completions by freeing only first
    successive completed entries.
    * Updates the chain element physical pointer when copying
    a pending element into a free element for sending.

    Signed-off-by: Tomer Tayar
    Signed-off-by: Manish Chopra
    Signed-off-by: David S. Miller

    Tomer Tayar
     
  • The amount of chain next pointer elements between the producer
    and the consumer indices depends on which pages they currently
    point to. The current calculation is based only on their difference,
    and it can lead to a number of free elements which is higher by 1
    than the actual value.

    Signed-off-by: Tomer Tayar
    Signed-off-by: Manish Chopra
    Signed-off-by: David S. Miller

    Tomer Tayar
     
  • In the case where a request queue is passed to the low lever lightnvm
    device drive integration, the device driver might pass its admin
    commands through another queue. Instead pass nvm_dev, and let the
    low level drive the appropriate queue.

    Reported-by: Christoph Hellwig
    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     
  • It is not obvious what NVM_IO_* and NVM_BLK_T_* are used for. Make sure
    to comment them appropriately as the other constants.

    Signed-off-by: Matias Bjørling
    Signed-off-by: Jens Axboe

    Matias Bjørling
     

07 Dec, 2015

2 commits

  • Some controller lockup on a ata_read_log_page.
    Add new ata port flag ATA_FLAG_NO_LOG_PAGE which can used
    to blacklist a controller.

    If this flag is set, any attempt to read a log page returns an error
    without actually issuing the command.

    Signed-off-by: Andreas Werner
    Signed-off-by: Tejun Heo

    Andreas Werner
     
  • The following commit which went into mainline through networking tree

    3b13758f51de ("cgroups: Allow dynamically changing net_classid")

    conflicts in net/core/netclassid_cgroup.c with the following pending
    fix in cgroup/for-4.4-fixes.

    1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration from subtree_control enabling")

    The former separates out update_classid() from cgrp_attach() and
    updates it to walk all fds of all tasks in the target css so that it
    can be used from both migration and config change paths. The latter
    drops @css from cgrp_attach().

    Resolve the conflict by making cgrp_attach() call update_classid()
    with the css from the first task. We can revive @tset walking in
    cgrp_attach() but given that net_cls is v1 only where there always is
    only one target css during migration, this is fine.

    Signed-off-by: Tejun Heo
    Reported-by: Stephen Rothwell
    Cc: Nina Schiff

    Tejun Heo