07 Sep, 2017

13 commits


04 Sep, 2017

5 commits


02 Sep, 2017

15 commits

  • Pull cifs version warning fix from Steve French:
    "As requested, additional kernel warning messages to clarify the
    default dialect changes"

    [ There is still some discussion about exactly which version should be
    the new default. Longer-term we have auto-negotiation coming, but
    that's not there yet.. - Linus ]

    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
    Fix warning messages when mounting to older servers

    Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "A couple of late-arriving fixes before final 4.13:

    - A few reverts of DT bindings on Allwinner for their ethernet
    driver. Discussion didn't converge, and since bindings are
    considered ABI it makes sense to revert instead of having to
    support two bindings long-term.

    - A fix to enumerate GPIOs properly on Marvell Armada AP806"

    * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    arm64: dts: marvell: fix number of GPIOs in Armada AP806 description
    arm: dts: sunxi: Revert EMAC changes
    arm64: dts: allwinner: Revert EMAC changes
    dt-bindings: net: Revert sun8i dwmac binding

    Linus Torvalds
     
  • mvebu fixes for 4.13 (part 3)

    Fix number of GPIOs in AP806 description for Armada 7K/8K

    * tag 'mvebu-fixes-4.13-3' of git://git.infradead.org/linux-mvebu:
    arm64: dts: marvell: fix number of GPIOs in Armada AP806 description

    Signed-off-by: Olof Johansson

    Olof Johansson
     
  • Pull i2c fixes from Wolfram Sang:
    "The ismt driver had a problem with a rarely used transaction type and
    the designware driver was made even more robust against non standard
    ACPI tables"

    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: designware: Round down ACPI provided clk to nearest supported clk
    i2c: ismt: Return EMSGSIZE for block reads with bogus length
    i2c: ismt: Don't duplicate the receive length for block reads

    Linus Torvalds
     
  • The race was introduced by me in commit 971316f0503a ("epoll:
    ep_unregister_pollwait() can use the freed pwq->whead"). I did not
    realize that nothing can protect eventpoll after ep_poll_callback() sets
    ->whead = NULL, only whead->lock can save us from the race with
    ep_free() or ep_remove().

    Move ->whead = NULL to the end of ep_poll_callback() and add the
    necessary barriers.

    TODO: cleanup the ewake/EPOLLEXCLUSIVE logic, it was confusing even
    before this patch.

    Hopefully this explains use-after-free reported by syzcaller:

    BUG: KASAN: use-after-free in debug_spin_lock_before
    ...
    _raw_spin_lock_irqsave+0x4a/0x60 kernel/locking/spinlock.c:159
    ep_poll_callback+0x29f/0xff0 fs/eventpoll.c:1148

    this is spin_lock(eventpoll->lock),

    ...
    Freed by task 17774:
    ...
    kfree+0xe8/0x2c0 mm/slub.c:3883
    ep_free+0x22c/0x2a0 fs/eventpoll.c:865

    Fixes: 971316f0503a ("epoll: ep_unregister_pollwait() can use the freed pwq->whead")
    Reported-by: 范龙飞
    Cc: stable@vger.kernel.org
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Pull networking fixes from David Miller:

    1) Fix handling of pinned BPF map nodes in hash of maps, from Daniel
    Borkmann.

    2) IPSEC ESP error paths leak memory, from Steffen Klassert.

    3) We need an RCU grace period before freeing fib6_node objects, from
    Wei Wang.

    4) Must check skb_put_padto() return value in HSR driver, from FLorian
    Fainelli.

    5) Fix oops on PHY probe failure in ftgmac100 driver, from Andrew
    Jeffery.

    6) Fix infinite loop in UDP queue when using SO_PEEK_OFF, from Eric
    Dumazet.

    7) Use after free when tcf_chain_destroy() called multiple times, from
    Jiri Pirko.

    8) Fix KSZ DSA tag layer multiple free of SKBS, from Florian Fainelli.

    9) Fix leak of uninitialized memory in sctp_get_sctp_info(),
    inet_diag_msg_sctpladdrs_fill() and inet_diag_msg_sctpaddrs_fill().
    From Stefano Brivio.

    10) L2TP tunnel refcount fixes from Guillaume Nault.

    11) Don't leak UDP secpath in udp_set_dev_scratch(), from Yossi
    Kauperman.

    12) Revert a PHY layer change wrt. handling of PHY_HALTED state in
    phy_stop_machine(), it causes regressions for multiple people. From
    Florian Fainelli.

    13) When packets are sent out of br0 we have to clear the
    offload_fwdq_mark value.

    14) Several NULL pointer deref fixes in packet schedulers when their
    ->init() routine fails. From Nikolay Aleksandrov.

    15) Aquantium devices cannot checksum offload correctly when the packet
    is ndo_setup_tc() in bnxt_en driver doesn't count rings properly,
    from Michael Chan.

    22) Missing MSIX vector free in bnxt_en, also from Michael Chan.

    23) Refcount leak in xfrm layer when using sk_policy, from Lorenzo
    Colitti.

    24) Fix copy of uninitialized data in qlge driver, from Arnd Bergmann.

    25) bpf_setsockopts() erroneously always returns -EINVAL even on
    success. Fix from Yuchung Cheng.

    26) tipc_rcv() needs to linearize the SKB before parsing the inner
    headers, from Parthasarathy Bhuvaragan.

    27) Fix deadlock between link status updates and link removal in netvsc
    driver, from Stephen Hemminger.

    28) Missed locking of page fragment handling in ESP output, from Steffen
    Klassert.

    29) Fix refcnt leak in ebpf congestion control code, from Sabrina
    Dubroca.

    30) sxgbe_probe_config_dt() doesn't check devm_kzalloc()'s return value,
    from Christophe Jaillet.

    31) Fix missing ipv6 rx_dst_cookie update when rx_dst is updated during
    early demux, from Paolo Abeni.

    32) Several info leaks in xfrm_user layer, from Mathias Krause.

    33) Fix out of bounds read in cxgb4 driver, from Stefano Brivio.

    34) Properly propagate obsolete state of route upwards in ipv6 so that
    upper holders like xfrm can see it. From Xin Long.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (118 commits)
    udp: fix secpath leak
    bridge: switchdev: Clear forward mark when transmitting packet
    mlxsw: spectrum: Forbid linking to devices that have uppers
    wl1251: add a missing spin_lock_init()
    Revert "net: phy: Correctly process PHY_HALTED in phy_stop_machine()"
    net: dsa: bcm_sf2: Fix number of CFP entries for BCM7278
    kcm: do not attach PF_KCM sockets to avoid deadlock
    sch_tbf: fix two null pointer dereferences on init failure
    sch_sfq: fix null pointer dereference on init failure
    sch_netem: avoid null pointer deref on init failure
    sch_fq_codel: avoid double free on init failure
    sch_cbq: fix null pointer dereferences on init failure
    sch_hfsc: fix null pointer deref and double free on init failure
    sch_hhf: fix null pointer dereference on init failure
    sch_multiq: fix double free on init failure
    sch_htb: fix crash on init failure
    net/mlx5e: Fix CQ moderation mode not set properly
    net/mlx5e: Fix inline header size for small packets
    net/mlx5: E-Switch, Unload the representors in the correct order
    net/mlx5e: Properly resolve TC offloaded ipv6 vxlan tunnel source address
    ...

    Linus Torvalds
     
  • Pull ceph fix from Ilya Dryomov:
    "ceph fscache page locking fix from Zheng, marked for stable"

    * tag 'ceph-for-4.13-rc8' of git://github.com/ceph/ceph-client:
    ceph: fix readpage from fscache

    Linus Torvalds
     
  • Pull input fixes from Dmitry Torokhov:
    "Just a couple drivers fixes (Synaptics PS/2, Xpad)"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: xpad - fix PowerA init quirk for some gamepad models
    Input: synaptics - fix device info appearing different on reconnect

    Linus Torvalds
     
  • Pull two more MMC fixes from Ulf Hansson:
    "MMC core:
    - Fix block status codes

    MMC host:
    - sdhci-xenon: Fix SD bus voltage select"

    * tag 'mmc-v4.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
    mmc: sdhci-xenon: add set_power callback
    mmc: block: Fix block status codes

    Linus Torvalds
     
  • Pull sound fixes from Takashi Iwai:
    "Three regression fixes that should be addressed before the final
    release: a missing mutex call in OSS PCM emulation ioctl, ASoC rt5670
    headset detection breakage, and a regression in simple-card parser
    code"

    * tag 'sound-4.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ASoC: simple_card_utils: fix fallback when "label" property isn't present
    ALSA: pcm: Fix power lock unbalance via OSS emulation
    ASoC: rt5670: Fix GPIO headset detection regression

    Linus Torvalds
     
  • Pull s390 fixes from Martin Schwidefsky:
    "Three more bug fixes for v4.13.

    The two memory management related fixes are quite new, they fix kernel
    crashes that can be triggered by user space.

    The third commit fixes a bug in the vfio ccw translation code"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/mm: fix BUG_ON in crst_table_upgrade
    s390/mm: fork vs. 5 level page tabel
    vfio: ccw: fix bad ptr math for TIC cda translation

    Linus Torvalds
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes the following issues:

    - Regression in chacha20 handling of chunked input

    - Crash in algif_skcipher when used with async io

    - Potential bogus pointer dereference in lib/mpi"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: algif_skcipher - only call put_page on referenced and used pages
    crypto: testmgr - add chunked test cases for chacha20
    crypto: chacha20 - fix handling of chunked input
    lib/mpi: kunmap after finishing accessing buffer

    Linus Torvalds
     
  • After commit dce4551cb2ad ("udp: preserve head state for IP_CMSG_PASSSEC")
    we preserve the secpath for the whole skb lifecycle, but we also
    end up leaking a reference to it.

    We must clear the head state on skb reception, if secpath is
    present.

    Fixes: dce4551cb2ad ("udp: preserve head state for IP_CMSG_PASSSEC")
    Signed-off-by: Yossi Kuperman
    Signed-off-by: Paolo Abeni
    Signed-off-by: David S. Miller

    Yossi Kuperman
     
  • Commit 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for
    stacked devices") added the 'offload_fwd_mark' bit to the skb in order
    to allow drivers to indicate to the bridge driver that they already
    forwarded the packet in L2.

    In case the bit is set, before transmitting the packet from each port,
    the port's mark is compared with the mark stored in the skb's control
    block. If both marks are equal, we know the packet arrived from a switch
    device that already forwarded the packet and it's not re-transmitted.

    However, if the packet is transmitted from the bridge device itself
    (e.g., br0), we should clear the 'offload_fwd_mark' bit as the mark
    stored in the skb's control block isn't valid.

    This scenario can happen in rare cases where a packet was trapped during
    L3 forwarding and forwarded by the kernel to a bridge device.

    Fixes: 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for stacked devices")
    Signed-off-by: Ido Schimmel
    Reported-by: Yotam Gigi
    Tested-by: Yotam Gigi
    Reviewed-by: Jiri Pirko
    Acked-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Ido Schimmel
     
  • The mlxsw driver relies on NETDEV_CHANGEUPPER events to configure the
    device in case a port is enslaved to a master netdev such as bridge or
    bond.

    Since the driver ignores events unrelated to its ports and their
    uppers, it's possible to engineer situations in which the device's data
    path differs from the kernel's.

    One example to such a situation is when a port is enslaved to a bond
    that is already enslaved to a bridge. When the bond was enslaved the
    driver ignored the event - as the bond wasn't one of its uppers - and
    therefore a bridge port instance isn't created in the device.

    Until such configurations are supported forbid them by checking that the
    upper device doesn't have uppers of its own.

    Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave")
    Signed-off-by: Ido Schimmel
    Reported-by: Nogah Frankel
    Tested-by: Nogah Frankel
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Ido Schimmel
     

01 Sep, 2017

7 commits

  • When mounting to older servers, such as Windows XP (or even Windows 7),
    the limited error messages that can be passed back to user space can
    get confusing since the default dialect has changed from SMB1 (CIFS) to
    more secure SMB3 dialect. Log additional information when the user chooses
    to use the default dialects and when the server does not support the
    dialect requested.

    Signed-off-by: Steve French
    Reviewed-by: Ronnie Sahlberg
    Acked-by: Pavel Shilovsky

    Steve French
     
  • Pull cifs fixes from Steve French:
    "Two cifs bug fixes for stable"

    * tag 'cifs-fixes-for-4.13-rc7-and-stable' of git://git.samba.org/sfrench/cifs-2.6:
    CIFS: remove endian related sparse warning
    CIFS: Fix maximum SMB2 header size

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:
    "Unfortunately a few issues that warrant sending another pull request,
    even if I had hoped to avoid it. This contains:

    - A fix for multiqueue xen-blkback, on tear down / disconnect.

    - A few fixups for NVMe, including a wrong bit definition, fix for
    host memory buffers, and an nvme rdma page size fix"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    nvme: fix the definition of the doorbell buffer config support bit
    nvme-pci: use dma memory for the host memory buffer descriptors
    nvme-rdma: default MR page size to 4k
    xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect

    Linus Torvalds
     
  • …/device-mapper/linux-dm

    Pull device mapper fixes from Mike Snitzer:

    - A couple fixes for bugs introduced as part of the blk_status_t block
    layer changes during the 4.13 merge window

    - A printk throttling fix to use discrete rate limiting state for each
    DM log level

    - A stable@ fix for DM multipath that delays request requeueing to
    avoid CPU lockup if/when the request queue is "dying"

    * tag 'for-4.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm mpath: do not lock up a CPU with requeuing activity
    dm: fix printk() rate limiting code
    dm mpath: retry BLK_STS_RESOURCE errors
    dm: fix the second dec_pending() argument in __split_and_process_bio()

    Linus Torvalds
     
  • Merge more fixes from Andrew Morton:
    "6 fixes"

    * emailed patches from Andrew Morton :
    scripts/dtc: fix '%zx' warning
    include/linux/compiler.h: don't perform compiletime_assert with -O0
    mm, madvise: ensure poisoned pages are removed from per-cpu lists
    mm, uprobes: fix multiple free of ->uprobes_state.xol_area
    kernel/kthread.c: kthread_worker: don't hog the cpu
    mm,page_alloc: don't call __node_reclaim() with oom_lock held.

    Linus Torvalds
     
  • Merge mmu_notifier fixes from Jérôme Glisse:
    "The invalidate_page callback suffered from 2 pitfalls. First it used
    to happen after page table lock was release and thus a new page might
    have been setup for the virtual address before the call to
    invalidate_page().

    This is in a weird way fixed by commit c7ab0d2fdc84 ("mm: convert
    try_to_unmap_one() to use page_vma_mapped_walk()") which moved the
    callback under the page table lock. Which also broke several existing
    user of the mmu_notifier API that assumed they could sleep inside this
    callback.

    The second pitfall was invalidate_page being the only callback not
    taking a range of address in respect to invalidation but was giving an
    address and a page. Lot of the callback implementer assumed this could
    never be THP and thus failed to invalidate the appropriate range for
    THP pages.

    By killing this callback we unify the mmu_notifier callback API to
    always take a virtual address range as input.

    There is now two clear API (I am not mentioning the youngess API which
    is seldomly used):

    - invalidate_range_start()/end() callback (which allow you to sleep)

    - invalidate_range() where you can not sleep but happen right after
    page table update under page table lock

    Note that a lot of existing user feels broken in respect to
    range_start/ range_end. Many user only have range_start() callback but
    there is nothing preventing them to undo what was invalidated in their
    range_start() callback after it returns but before any CPU page table
    update take place.

    The code pattern use in kvm or umem odp is an example on how to
    properly avoid such race. In a nutshell use some kind of sequence
    number and active range invalidation counter to block anything that
    might undo what the range_start() callback did.

    If you do not care about keeping fully in sync with CPU page table (ie
    you can live with CPU page table pointing to new different page for a
    given virtual address) then you can take a reference on the pages
    inside the range_start callback and drop it in range_end or when your
    driver is done with those pages.

    Last alternative is to use invalidate_range() if you can do
    invalidation without sleeping as invalidate_range() callback happens
    under the CPU page table spinlock right after the page table is
    updated.

    The first two patches convert existing mmu_notifier_invalidate_page()
    calls to mmu_notifier_invalidate_range() and bracket those call with
    call to mmu_notifier_invalidate_range_start()/end().

    The next ten patches remove existing invalidate_page() callback as it
    can no longer happen.

    Finally the last page remove the invalidate_page() callback completely
    so it can RIP.

    Changes since v1:
    - remove more dead code in kvm (no testing impact)
    - more accurate end address computation (patch 2) in page_mkclean_one
    and try_to_unmap_one
    - added tested-by/reviewed-by gotten so far"

    * emailed patches from Jérôme Glisse :
    mm/mmu_notifier: kill invalidate_page
    KVM: update to new mmu_notifier semantic v2
    xen/gntdev: update to new mmu_notifier semantic
    sgi-gru: update to new mmu_notifier semantic
    misc/mic/scif: update to new mmu_notifier semantic
    iommu/intel: update to new mmu_notifier semantic
    iommu/amd: update to new mmu_notifier semantic
    IB/hfi1: update to new mmu_notifier semantic
    IB/umem: update to new mmu_notifier semantic
    drm/amdgpu: update to new mmu_notifier semantic
    powerpc/powernv: update to new mmu_notifier semantic
    mm/rmap: update to new mmu_notifier semantic v2
    dax: update to new mmu_notifier semantic

    Linus Torvalds
     
  • jfs had previously avoided the use of MAX_LFS_FILESIZE because it hadn't
    accounted for the whole 32-bit index range on 32-bit systems. That has
    been fixed by commit 0cc3b0ec23ce ("Clarify (and fix) MAX_LFS_FILESIZE
    macros"), so we can simplify the code now.

    Suggested by Andreas Dilger.

    Signed-off-by: Dave Kleikamp
    Reviewed-by: Andreas Dilger
    Cc: jfs-discussion@lists.sourceforge.net
    Signed-off-by: Linus Torvalds

    Dave Kleikamp