Skip to content
  1. Oct 15, 2016
  2. Oct 14, 2016
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 29fbff86
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix various build warnings in tlan/qed/xen-netback drivers, from
          Arnd Bergmann.
      
       2) Propagate proper error code in strparser's strp_recv(), from Geert
          Uytterhoeven.
      
       3) Fix accidental broadcast of RTM_GETTFILTER responses, from Eric
          Dumazret.
      
       4) Need to use list_for_each_entry_safe() in qed driver, from Wei
          Yongjun.
      
       5) Openvswitch 802.1AD bug fixes from Jiri Benc.
      
       6) Cure BUILD_BUG_ON() in mlx5 driver, from Tom Herbert.
      
       7) Fix UDP ipv6 checksumming in netvsc driver, from Stephen Hemminger.
      
       8) stmmac driver fixes from Giuseppe CAVALLARO.
      
       9) Fix access to mangled IP6CB in tcp, from Eric Dumazet.
      
      10) Fix info leaks in tipc and rtnetlink, from Dan Carpenter.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        net: bridge: add the multicast_flood flag attribute to brport_attrs
        net: axienet: Remove unused parameter from __axienet_device_reset
        liquidio: CN23XX: fix a loop timeout
        net: rtnl: info leak in rtnl_fill_vfinfo()
        tipc: info leak in __tipc_nl_add_udp_addr()
        net: ipv4: Do not drop to make_route if oif is l3mdev
        net: phy: Trigger state machine on state change and not polling.
        ipv6: tcp: restore IP6CB for pktoptions skbs
        netvsc: Remove mistaken udp.h inclusion.
        xen-netback: fix type mismatch warning
        stmmac: fix error check when init ptp
        stmmac: fix ptp init for gmac4
        qed: fix old-style function definition
        netvsc: fix checksum on UDP IPV6
        net_sched: reorder pernet ops and act ops registrations
        xen-netback: fix guest Rx stall detection (after guest Rx refactor)
        drivers/ptp: Fix kernel memory disclosure
        net/mlx5: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON
        qmi_wwan: add support for Quectel EC21 and EC25
        openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev
        ...
      29fbff86
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs · c4a86165
      Linus Torvalds authored
      Pull NFS client updates from Anna Schumaker:
       "Highlights include:
      
        Stable bugfixes:
         - sunrpc: fix writ espace race causing stalls
         - NFS: Fix inode corruption in nfs_prime_dcache()
         - NFSv4: Don't report revoked delegations as valid in nfs_have_delegation()
         - NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid
         - NFSv4: Open state recovery must account for file permission changes
         - NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
      
        Features:
         - Add support for tracking multiple layout types with an ordered list
         - Add support for using multiple backchannel threads on the client
         - Add support for pNFS file layout session trunking
         - Delay xprtrdma use of DMA API (for device driver removal)
         - Add support for xprtrdma remote invalidation
         - Add support for larger xprtrdma inline thresholds
         - Use a scatter/gather list for sending xprtrdma RPC calls
         - Add support for the CB_NOTIFY_LOCK callback
         - Improve hashing sunrpc auth_creds by using both uid and gid
      
        Bugfixes:
         - Fix xprtrdma use of DMA API
         - Validate filenames before adding to the dcache
         - Fix corruption of xdr->nwords in xdr_copy_to_scratch
         - Fix setting buffer length in xdr_set_next_buffer()
         - Don't deadlock the state manager on the SEQUENCE status flags
         - Various delegation and stateid related fixes
         - Retry operations if an interrupted slot receives EREMOTEIO
         - Make nfs boot time y2038 safe"
      
      * tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (100 commits)
        NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
        fs: nfs: Make nfs boot time y2038 safe
        sunrpc: replace generic auth_cred hash with auth-specific function
        sunrpc: add RPCSEC_GSS hash_cred() function
        sunrpc: add auth_unix hash_cred() function
        sunrpc: add generic_auth hash_cred() function
        sunrpc: add hash_cred() function to rpc_authops struct
        Retry operation on EREMOTEIO on an interrupted slot
        pNFS: Fix atime updates on pNFS clients
        sunrpc: queue work on system_power_efficient_wq
        NFSv4.1: Even if the stateid is OK, we may need to recover the open modes
        NFSv4: If recovery failed for a specific open stateid, then don't retry
        NFSv4: Fix retry issues with nfs41_test/free_stateid
        NFSv4: Open state recovery must account for file permission changes
        NFSv4: Mark the lock and open stateids as invalid after freeing them
        NFSv4: Don't test open_stateid unless it is set
        NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid
        NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation
        NFSv4: Fix a race when updating an open_stateid
        NFSv4: Fix a race in nfs_inode_reclaim_delegation()
        ...
      c4a86165
    • Linus Torvalds's avatar
      Merge tag 'nfsd-4.9' of git://linux-nfs.org/~bfields/linux · 27785564
      Linus Torvalds authored
      Pull nfsd updates from Bruce Fields:
       "Some RDMA work and some good bugfixes, and two new features that could
        benefit from user testing:
      
         - Anna Schumacker contributed a simple NFSv4.2 COPY implementation.
           COPY is already supported on the client side, so a call to
           copy_file_range() on a recent client should now result in a
           server-side copy that doesn't require all the data to make a round
           trip to the client and back.
      
         - Jeff Layton implemented callbacks to notify clients when contended
           locks become available, which should reduce latency on workloads
           with contended locks"
      
      * tag 'nfsd-4.9' of git://linux-nfs.org/~bfields/linux:
        NFSD: Implement the COPY call
        nfsd: handle EUCLEAN
        nfsd: only WARN once on unmapped errors
        exportfs: be careful to only return expected errors.
        nfsd4: setclientid_confirm with unmatched verifier should fail
        nfsd: randomize SETCLIENTID reply to help distinguish servers
        nfsd: set the MAY_NOTIFY_LOCK flag in OPEN replies
        nfs: add a new NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK constant
        nfsd: add a LRU list for blocked locks
        nfsd: have nfsd4_lock use blocking locks for v4.1+ locks
        nfsd: plumb in a CB_NOTIFY_LOCK operation
        NFSD: fix corruption in notifier registration
        svcrdma: support Remote Invalidation
        svcrdma: Server-side support for rpcrdma_connect_private
        rpcrdma: RDMA/CM private message data structure
        svcrdma: Skip put_page() when send_reply() fails
        svcrdma: Tail iovec leaves an orphaned DMA mapping
        nfsd: fix dprintk in nfsd4_encode_getdeviceinfo
        nfsd: eliminate cb_minorversion field
        nfsd: don't set a FL_LAYOUT lease for flexfiles layouts
      27785564
    • Linus Torvalds's avatar
      Merge tag 'xfs-reflink-for-linus-4.9-rc1' of... · 35a891be
      Linus Torvalds authored
      Merge tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs
      
          < XFS has gained super CoW powers! >
           ----------------------------------
                  \   ^__^
                   \  (oo)\_______
                      (__)\       )\/\
                          ||----w |
                          ||     ||
      
      Pull XFS support for shared data extents from Dave Chinner:
       "This is the second part of the XFS updates for this merge cycle.  This
        pullreq contains the new shared data extents feature for XFS.
      
        Given the complexity and size of this change I am expecting - like the
        addition of reverse mapping last cycle - that there will be some
        follow-up bug fixes and cleanups around the -rc3 stage for issues that
        I'm sure will show up once the code hits a wider userbase.
      
        What it is:
      
        At the most basic level we are simply adding shared data extents to
        XFS - i.e. a single extent on disk can now have multiple owners. To do
        this we have to add new on-disk features to both track the shared
        extents and the number of times they've been shared. This is done by
        the new "refcount" btree that sits in every allocation group. When we
        share or unshare an extent, this tree gets updated.
      
        Along with this new tree, the reverse mapping tree needs to be updated
        to track each owner or a shared extent. This also needs to be updated
        ever share/unshare operation. These interactions at extent allocation
        and freeing time have complex ordering and recovery constraints, so
        there's a significant amount of new intent-based transaction code to
        ensure that operations are performed atomically from both the runtime
        and integrity/crash recovery perspectives.
      
        We also need to break sharing when writes hit a shared extent - this
        is where the new copy-on-write implementation comes in. We allocate
        new storage and copy the original data along with the overwrite data
        into the new location. We only do this for data as we don't share
        metadata at all - each inode has it's own metadata that tracks the
        shared data extents, the extents undergoing CoW and it's own private
        extents.
      
        Of course, being XFS, nothing is simple - we use delayed allocation
        for CoW similar to how we use it for normal writes. ENOSPC is a
        significant issue here - we build on the reservation code added in
        4.8-rc1 with the reverse mapping feature to ensure we don't get
        spurious ENOSPC issues part way through a CoW operation. These
        mechanisms also help minimise fragmentation due to repeated CoW
        operations. To further reduce fragmentation overhead, we've also
        introduced a CoW extent size hint, which indicates how large a region
        we should allocate when we execute a CoW operation.
      
        With all this functionality in place, we can hook up .copy_file_range,
        .clone_file_range and .dedupe_file_range and we gain all the
        capabilities of reflink and other vfs provided functionality that
        enable manipulation to shared extents. We also added a fallocate mode
        that explicitly unshares a range of a file, which we implemented as an
        explicit CoW of all the shared extents in a file.
      
        As such, it's a huge chunk of new functionality with new on-disk
        format features and internal infrastructure. It warns at mount time as
        an experimental feature and that it may eat data (as we do with all
        new on-disk features until they stabilise). We have not released
        userspace suport for it yet - userspace support currently requires
        download from Darrick's xfsprogs repo and build from source, so the
        access to this feature is really developer/tester only at this point.
        Initial userspace support will be released at the same time the kernel
        with this code in it is released.
      
        The new code causes 5-6 new failures with xfstests - these aren't
        serious functional failures but things the output of tests changing
        slightly due to perturbations in layouts, space usage, etc. OTOH,
        we've added 150+ new tests to xfstests that specifically exercise this
        new functionality so it's got far better test coverage than any
        functionality we've previously added to XFS.
      
        Darrick has done a pretty amazing job getting us to this stage, and
        special mention also needs to go to Christoph (review, testing,
        improvements and bug fixes) and Brian (caught several intricate bugs
        during review) for the effort they've also put in.
      
        Summary:
      
         - unshare range (FALLOC_FL_UNSHARE) support for fallocate
      
         - copy-on-write extent size hints (FS_XFLAG_COWEXTSIZE) for fsxattr
           interface
      
         - shared extent support for XFS
      
         - copy-on-write support for shared extents
      
         - copy_file_range support
      
         - clone_file_range support (implements reflink)
      
         - dedupe_file_range support
      
         - defrag support for reverse mapping enabled filesystems"
      
      * tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (71 commits)
        xfs: convert COW blocks to real blocks before unwritten extent conversion
        xfs: rework refcount cow recovery error handling
        xfs: clear reflink flag if setting realtime flag
        xfs: fix error initialization
        xfs: fix label inaccuracies
        xfs: remove isize check from unshare operation
        xfs: reduce stack usage of _reflink_clear_inode_flag
        xfs: check inode reflink flag before calling reflink functions
        xfs: implement swapext for rmap filesystems
        xfs: refactor swapext code
        xfs: various swapext cleanups
        xfs: recognize the reflink feature bit
        xfs: simulate per-AG reservations being critically low
        xfs: don't mix reflink and DAX mode for now
        xfs: check for invalid inode reflink flags
        xfs: set a default CoW extent size of 32 blocks
        xfs: convert unwritten status of reverse mappings for shared files
        xfs: use interval query for rmap alloc operations on shared files
        xfs: add shared rmap map/unmap/convert log item types
        xfs: increase log reservations for reflink
        ...
      35a891be
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.9-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 40bd3a5f
      Linus Torvalds authored
      PCI changes for the v4.9 merge window:
       "Here are some more changes I'd like to have in v4.9.  There's one
        small Tegra bug fix in the PHY poweroff path, which is only used in
        failure paths.
      
        The rest is all strictly cleanup that should make host bridge drivers
        more readable, but shouldn't actually change any behavior.
      
        Summary:
      
         - use local struct device pointers in many host bridge drivers for
           clarity
      
         - remove unused platform data
      
         - use generic DesignWare accessors
      
         - misc cleanups: remove redundant structure entries and re-order
           structure members to put comon generic fields first etc"
      
      * tag 'pci-v4.9-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (108 commits)
        MAINTAINERS: Add maintainer for the PCIe Marvell Armada 8K driver
        MAINTAINERS: Add DT binding to the Aardvark PCIe driver maintainer
        PCI: rockchip: Indent "if" statement body
        PCI: hisi: Reorder struct hisi_pcie
        PCI: hisi: Pass device-specific struct to internal functions
        PCI: hisi: Include register block base in PCIE_SYS_STATE4 address
        PCI: dra7xx: Reorder struct dra7xx_pcie
        PCI: xilinx-nwl: Remove unused platform data
        PCI: xilinx-nwl: Add local struct device pointers
        PCI: xilinx: Removed unused xilinx_pcie_assign_msi() argument
        PCI: xilinx: Remove unused platform data
        PCI: xilinx: Add local struct device pointers
        PCI: xgene: Add register accessors
        PCI: xgene: Pass struct xgene_pcie_port to setup functions
        PCI: xgene: Remove unused platform data
        PCI: tegra: Remove unused platform data
        PCI: tegra: Add local struct device pointers
        PCI: tegra: Fix argument order in tegra_pcie_phy_disable()
        PCI: rockchip: Remove unused platform data
        PCI: rcar-gen2: Add local struct device pointers
        ...
      40bd3a5f
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.9-1' of... · 44dc8c9d
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v4.9-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull x86 platform drivers updates from Darren Hart:
       "Cleanups, refactoring, and a couple bug fixes.
      
        intel_pmc_core:
         - avoid boot time warning for !CONFIG_DEBUGFS_FS
      
        intel_pmc_ipc:
         - Convert to use platform_device_register_full
      
        asus-wmi:
         - Filter buggy scan codes on ASUS Q500A
      
        toshiba_bluetooth:
         - Decouple an error checking status code
      
        toshiba_haps:
         - Change logging level from info to debug
         - Split ACPI and HDD protection error handling
      
        asus-laptop:
         - get rid of parse_arg()
      
        asus-wmi:
         - fix asus ux303ub brightness issue
      
        toshiba_acpi:
         - Fix typo in *_cooling_method_set function
         - Change error checking logic from TCI functions
         - Clean up variable declaration"
      
      * tag 'platform-drivers-x86-v4.9-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        platform/x86: intel_pmc_core: avoid boot time warning for !CONFIG_DEBUGFS_FS
        platform/x86: intel_pmc_ipc: Convert to use platform_device_register_full
        platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A
        platform/x86: toshiba_bluetooth: Decouple an error checking status code
        platform/x86: toshiba_haps: Change logging level from info to debug
        platform/x86: toshiba_haps: Split ACPI and HDD protection error handling
        platform/x86: asus-laptop: get rid of parse_arg()
        platform/x86: asus-wmi: fix asus ux303ub brightness issue
        platform/x86: toshiba_acpi: Fix typo in *_cooling_method_set function
        platform/x86: toshiba_acpi: Change error checking logic from TCI functions
        platform/x86: toshiba_acpi: Clean up variable declaration
      44dc8c9d
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · e3799a21
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - a new watchdog pretimeout governor framework
      
       - support to upload the firmware on the ziirave_wdt
      
       - several fixes and cleanups
      
      * git://www.linux-watchdog.org/linux-watchdog: (26 commits)
        watchdog: imx2_wdt: add pretimeout function support
        watchdog: softdog: implement pretimeout support
        watchdog: pretimeout: add pretimeout_available_governors attribute
        watchdog: pretimeout: add option to select a pretimeout governor in runtime
        watchdog: pretimeout: add panic pretimeout governor
        watchdog: pretimeout: add noop pretimeout governor
        watchdog: add watchdog pretimeout governor framework
        watchdog: hpwdt: add support for iLO5
        fs: compat_ioctl: add pretimeout functions for watchdogs
        watchdog: add pretimeout support to the core
        watchdog: imx2_wdt: use preferred BIT macro instead of open coded values
        watchdog: st_wdt: Remove support for obsolete platforms
        watchdog: bindings: Remove obsolete platforms from dt doc.
        watchdog: mt7621_wdt: Remove assignment of dev pointer
        watchdog: rt2880_wdt: Remove assignment of dev pointer
        watchdog: constify watchdog_ops structures
        watchdog: tegra: constify watchdog_ops structures
        watchdog: iTCO_wdt: constify iTCO_wdt_pm structure
        watchdog: cadence_wdt: Fix the suspend resume
        watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF
        ...
      e3799a21
    • Nikolay Aleksandrov's avatar
      net: bridge: add the multicast_flood flag attribute to brport_attrs · 4eb6753c
      Nikolay Aleksandrov authored
      When I added the multicast flood control flag, I also added an attribute
      for it for sysfs similar to other flags, but I forgot to add it to
      brport_attrs.
      
      Fixes: b6cb5ac8
      
       ("net: bridge: add per-port multicast flood flag")
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4eb6753c
    • Tobias Klauser's avatar
      net: axienet: Remove unused parameter from __axienet_device_reset · 5852e93d
      Tobias Klauser authored
      
      
      The dev parameter passed to __axienet_device_reset() is not used inside
      the function, so remove it.
      
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Reviewed-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5852e93d
    • Dan Carpenter's avatar
      liquidio: CN23XX: fix a loop timeout · 10f6c4d6
      Dan Carpenter authored
      This is supposed to loop 1000 times and then give up.  The problem is
      it's a post-op and after the loop we test if "loop" is zero when really
      it would be -1.  Fix this by making it a pre-op.
      
      Fixes: 1b7c55c4
      
       ("liquidio: CN23XX queue manipulation")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10f6c4d6
    • Dan Carpenter's avatar
      net: rtnl: info leak in rtnl_fill_vfinfo() · 775f4f05
      Dan Carpenter authored
      The "vf_vlan_info" struct ends with a 2 byte struct hole so we have to
      memset it to ensure that no stack information is revealed to user space.
      
      Fixes: 79aab093
      
       ('net: Update API for VF vlan protocol 802.1ad support')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      775f4f05
    • Dan Carpenter's avatar
      tipc: info leak in __tipc_nl_add_udp_addr() · 73076162
      Dan Carpenter authored
      We should clear out the padding and unused struct members so that we
      don't expose stack information to userspace.
      
      Fixes: fdb3accc
      
       ('tipc: add the ability to get UDP options via netlink')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      73076162
    • David Ahern's avatar
      net: ipv4: Do not drop to make_route if oif is l3mdev · 6104e112
      David Ahern authored
      Commit e0d56fdd was a bit aggressive removing l3mdev calls in
      the IPv4 stack. If the fib_lookup fails we do not want to drop to
      make_route if the oif is an l3mdev device.
      
      Also reverts 19664c6a ("net: l3mdev: Remove netif_index_is_l3_master")
      which removed netif_index_is_l3_master.
      
      Fixes: e0d56fdd
      
       ("net: l3mdev: remove redundant calls")
      Signed-off-by: default avatarDavid Ahern <dsa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6104e112
    • Andrew Lunn's avatar
      net: phy: Trigger state machine on state change and not polling. · 3c293f4e
      Andrew Lunn authored
      
      
      The phy_start() is used to indicate the PHY is now ready to do its
      work. The state is changed, normally to PHY_UP which means that both
      the MAC and the PHY are ready.
      
      If the phy driver is using polling, when the next poll happens, the
      state machine notices the PHY is now in PHY_UP, and kicks off
      auto-negotiation, if needed.
      
      If however, the PHY is using interrupts, there is no polling. The phy
      is stuck in PHY_UP until the next interrupt comes along. And there is
      no reason for the PHY to interrupt.
      
      Have phy_start() schedule the state machine to run, which both speeds
      up the polling use case, and makes the interrupt use case actually
      work.
      
      This problems exists whenever there is a state change which will not
      cause an interrupt. Trigger the state machine in these cases,
      e.g. phy_error().
      
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Cc: Kyle Roeschley <kyle.roeschley@ni.com>
      Tested-by: default avatarKyle Roeschley <kyle.roeschley@ni.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c293f4e
  3. Oct 13, 2016
    • Eric Dumazet's avatar
      ipv6: tcp: restore IP6CB for pktoptions skbs · 8ce48623
      Eric Dumazet authored
      Baozeng Ding reported following KASAN splat :
      
      BUG: KASAN: use-after-free in ip6_datagram_recv_specific_ctl+0x13f1/0x15c0 at addr ffff880029c84ec8
      Read of size 1 by task poc/25548
      Call Trace:
       [<ffffffff82cf43c9>] dump_stack+0x12e/0x185 /lib/dump_stack.c:15
       [<     inline     >] print_address_description /mm/kasan/report.c:204
       [<ffffffff817ced3b>] kasan_report_error+0x48b/0x4b0 /mm/kasan/report.c:283
       [<     inline     >] kasan_report /mm/kasan/report.c:303
       [<ffffffff817ced9e>] __asan_report_load1_noabort+0x3e/0x40 /mm/kasan/report.c:321
       [<ffffffff85c71da1>] ip6_datagram_recv_specific_ctl+0x13f1/0x15c0 /net/ipv6/datagram.c:687
       [<ffffffff85c734c3>] ip6_datagram_recv_ctl+0x33/0x40
       [<ffffffff85c0b07c>] do_ipv6_getsockopt.isra.4+0xaec/0x2150
       [<ffffffff85c0c7f6>] ipv6_getsockopt+0x116/0x230
       [<ffffffff859b5a12>] tcp_getsockopt+0x82/0xd0 /net/ipv4/tcp.c:3035
       [<ffffffff855fb385>] sock_common_getsockopt+0x95/0xd0 /net/core/sock.c:2647
       [<     inline     >] SYSC_getsockopt /net/socket.c:1776
       [<ffffffff855f8ba2>] SyS_getsockopt+0x142/0x230 /net/socket.c:1758
       [<ffffffff8685cdc5>] entry_SYSCALL_64_fastpath+0x23/0xc6
      Memory state around the buggy address:
       ffff880029c84d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
       ffff880029c84e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      > ffff880029c84e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                    ^
       ffff880029c84f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
       ffff880029c84f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
      
      He also provided a syzkaller reproducer.
      
      Issue is that ip6_datagram_recv_specific_ctl() expects to find IP6CB
      data that was moved at a different place in tcp_v6_rcv()
      
      This patch moves tcp_v6_restore_cb() up and calls it from
      tcp_v6_do_rcv() when np->pktoptions is set.
      
      Fixes: 971f10ec
      
       ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarBaozeng Ding <sploving1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8ce48623
    • David S. Miller's avatar
      netvsc: Remove mistaken udp.h inclusion. · 3f2b0a5a
      David S. Miller authored
      
      
      Based upon v2 of Stephen's patch.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f2b0a5a
    • Arnd Bergmann's avatar
      xen-netback: fix type mismatch warning · f112be65
      Arnd Bergmann authored
      Wiht the latest rework of the xen-netback driver, we get a warning
      on ARM about the types passed into min():
      
      drivers/net/xen-netback/rx.c: In function 'xenvif_rx_next_chunk':
      include/linux/kernel.h:739:16: error: comparison of distinct pointer types lacks a cast [-Werror]
      
      The reason is that XEN_PAGE_SIZE is not size_t here. There
      is no actual bug, and we can easily avoid the warning using the
      min_t() macro instead of min().
      
      Fixes: eb1723a2
      
       ("xen-netback: refactor guest rx")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f112be65
    • Giuseppe CAVALLARO's avatar
      stmmac: fix error check when init ptp · 7086605a
      Giuseppe CAVALLARO authored
      
      
      This patch fixes a problem when propagated the
      failure of ptp_clock_register to open function.
      
      Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre TORGUE <alexandre.torgue@st.com>
      Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7086605a
    • Giuseppe CAVALLARO's avatar
      stmmac: fix ptp init for gmac4 · be9b3174
      Giuseppe CAVALLARO authored
      
      
      The gmac 4.x version has not extended descriptors
      (that are available on 3.x instead of).
      While initializing the PTP module, the advanced PTP was
      enabled in case of extended descriptors. This cannot be
      applied for 4.x version where only the hardware capability
      register has to show if the feature is present.
      Patch also adds some extra netdev_(debug/inof) to better
      dump the configuration.
      
      Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre TORGUE <alexandre.torgue@st.com>
      Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be9b3174
    • Arnd Bergmann's avatar
      qed: fix old-style function definition · d4e99131
      Arnd Bergmann authored
      The definition of qed_get_rdma_ops() is not a prototype unless
      we add 'void' here, as indicated by this W=1 warning:
      
      drivers/net/ethernet/qlogic/qed/qed_roce.c: In function ‘qed_get_rdma_ops’:
      drivers/net/ethernet/qlogic/qed/qed_roce.c:2950:28: error: old-style function definition [-Werror=old-style-definition]
      
      Fixes: abd49676
      
       ("qed: Add RoCE ll2 & GSI support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4e99131
    • stephen hemminger's avatar
      netvsc: fix checksum on UDP IPV6 · ad19bc8a
      stephen hemminger authored
      
      
      The software calculation of UDP checksum in Netvsc driver was
      only handling IPv4 case. By using skb_checksum_help() instead
      all protocols can be handled. Rearrange code to eliminate goto
      and look like other drivers.
      
      This is a temporary solution; recent versions of Window Server etc
      do support UDP checksum offload, just need to do the appropriate negotiation
      with host to validate before using. This will be done in later patch.
      
      Please queue this for -stable as well.
      
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad19bc8a
    • WANG Cong's avatar
      net_sched: reorder pernet ops and act ops registrations · ab102b80
      WANG Cong authored
      
      
      Krister reported a kernel NULL pointer dereference after
      tcf_action_init_1() invokes a_o->init(), it is a race condition
      where one thread calling tcf_register_action() to initialize
      the netns data after putting act ops in the global list and
      the other thread searching the list and then calling
      a_o->init(net, ...).
      
      Fix this by moving the pernet ops registration before making
      the action ops visible. This is fine because: a) we don't
      rely on act_base in pernet ops->init(), b) in the worst case we
      have a fully initialized netns but ops is still not ready so
      new actions still can't be created.
      
      Reported-by: default avatarKrister Johansen <kjlx@templeofstupid.com>
      Tested-by: default avatarKrister Johansen <kjlx@templeofstupid.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab102b80
    • David Vrabel's avatar
      xen-netback: fix guest Rx stall detection (after guest Rx refactor) · d1ef006d
      David Vrabel authored
      If a VIF has been ready for rx_stall_timeout (60s by default) and an
      Rx ring is drained of all requests an Rx stall will be incorrectly
      detected.  When this occurs and the guest Rx queue is empty, the Rx
      ring's event index will not be set and the frontend will not raise an
      event when new requests are placed on the ring, permanently stalling
      the VIF.
      
      This is a regression introduced by eb1723a2
      
       (xen-netback:
      refactor guest rx).
      
      Fix this by reinstating the setting of queue->last_rx_time when
      placing a packet onto the guest Rx ring.
      
      Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Reviewed-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1ef006d
    • Vlad Tsyrklevich's avatar
      drivers/ptp: Fix kernel memory disclosure · 02a9079c
      Vlad Tsyrklevich authored
      
      
      The reserved field precise_offset->rsv is not cleared before being
      copied to user space, leaking kernel stack memory. Clear the struct
      before it's copied.
      
      Signed-off-by: default avatarVlad Tsyrklevich <vlad@tsyrklevich.net>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      02a9079c
    • Tom Herbert's avatar
      net/mlx5: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON · b8a4ddb2
      Tom Herbert authored
      I am hitting this in mlx5:
      
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c: In function
      reclaim_pages_cmd.clone.0:
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:346: error: call
      to __compiletime_assert_346 declared with attribute error:
      BUILD_BUG_ON failed: __mlx5_bit_off(manage_pages_out, pas[i]) % 64
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c: In function give_pages:
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:291: error: call
      to __compiletime_assert_291 declared with attribute error:
      BUILD_BUG_ON failed: __mlx5_bit_off(manage_pages_in, pas[i]) % 64
      
      Problem is that this is doing a BUILD_BUG_ON on a non-constant
      expression because of trying to take offset of pas[i] in the
      structure.
      
      Fix is to create MLX5_ARRAY_SET64 that takes an additional argument
      that is the field index to separate between BUILD_BUG_ON on the array
      constant field and the indexed field to assign the value to.
      There are two callers of MLX5_SET64 that are trying to get a variable
      offset, change those to call MLX5_ARRAY_SET64 passing 'pas' and 'i'
      as the arguments to use in the offset check and the indexed value
      assignment.
      
      Fixes: a533ed5e
      
       ("net/mlx5: Pages management commands via mlx5 ifc")
      Signed-off-by: default avatarTom Herbert <tom@herbertland.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8a4ddb2
    • Bjørn Mork's avatar
      qmi_wwan: add support for Quectel EC21 and EC25 · 9a765881
      Bjørn Mork authored
      
      
      The Quectel EC21 and EC25 need the same "set DTR" request as devices
      based on the MDM9230 chipset, but has no USB3 support. Our best guess
      is that the "set DTR" functionality depends on chipset and/or
      baseband firmware generation. But USB3 is still an optional feature.
      
      Since we cannot enable this unconditionally for all older devices, and
      there doesn't appear to be anything we can use in the USB descriptors
      to identify these chips, we are forced to use a device specific quirk
      flag.
      
      Reported-and-tested-by: default avatarSebastian Sjoholm <sebastian.sjoholm@gmail.com>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9a765881
    • David S. Miller's avatar
      Merge branch 'ovs-8021AD-fixes' · 4013bee5
      David S. Miller authored
      
      
      Jiri Benc says:
      
      ====================
      openvswitch: vlan fixes
      
      Fix three issues introduced by the 802.1AD patchset.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4013bee5
    • Jiri Benc's avatar
      openvswitch: add NETIF_F_HW_VLAN_STAG_TX to internal dev · 3145c037
      Jiri Benc authored
      The internal device does support 802.1AD offloading since 018c1dda
      
      
      ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink
      attributes").
      
      Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
      Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Acked-by: default avatarEric Garver <e@erig.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3145c037
    • Jiri Benc's avatar
      openvswitch: fix vlan subtraction from packet length · 72ec108d
      Jiri Benc authored
      When the packet has its vlan tag in skb->vlan_tci, the length of the VLAN
      header is not counted in skb->len. It doesn't make sense to subtract it.
      
      Fixes: 018c1dda
      
       ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes")
      Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
      Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Acked-by: default avatarEric Garver <e@erig.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72ec108d
    • Jiri Benc's avatar
      openvswitch: vlan: remove wrong likely statement · 20ecf1e4
      Jiri Benc authored
      This code is called whenever flow key is being extracted from the packet.
      The packet may be as likely vlan tagged as not.
      
      Fixes: 018c1dda
      
       ("openvswitch: 802.1AD Flow handling, actions, vlan parsing, netlink attributes")
      Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
      Acked-by: default avatarPravin B Shelar <pshelar@ovn.org>
      Acked-by: default avatarEric Garver <e@erig.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20ecf1e4
    • Wei Yongjun's avatar
      qed: Fix to use list_for_each_entry_safe() when delete items · 88a2428b
      Wei Yongjun authored
      
      
      Since we will remove items off the list using list_del() we need
      to use a safe version of the list_for_each_entry() macro aptly named
      list_for_each_entry_safe().
      
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Acked-by: default avatarYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88a2428b
    • Arnd Bergmann's avatar
      tlan: avoid unused label with PCI=n · 1e09c106
      Arnd Bergmann authored
      
      
      While build testing with randconfig on x86, I ran into this warning
      that appears to have been around forever
      
      drivers/net/ethernet/ti/tlan.c: In function ‘tlan_probe1’:
      drivers/net/ethernet/ti/tlan.c:614:1: error: label ‘err_out’ defined but not used [-Werror=unused-label]
      
      This can be trivially avoided by just moving the label into the
      existing #ifdef.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e09c106
    • Paul Durrant's avatar
      xen-netback: (re-)create a debugfs node for hash information · a9339b8e
      Paul Durrant authored
      It is useful to be able to see the hash configuration when running tests.
      This patch adds a debugfs node for that purpose.
      
      The original version of this patch (commit c0c64c15) was reverted due
      to build failures caused by a conflict with commit 0364a882
      
      
      ("xen-netback: switch to threaded irq for control ring"). This new version
      of the patch is nearly identical to the original, the only difference
      being that creation of the debugfs node is predicated on 'ctrl_irq' being
      non-zero rather then the now non-existent 'ctrl_task'.
      
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Cc: Wei Liu <wei.liu2@citrix.com>
      Cc: David S. Miller <davem@davemloft.net>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9339b8e
    • Eric Dumazet's avatar
      net_sched: do not broadcast RTM_GETTFILTER result · fa59b27c
      Eric Dumazet authored
      
      
      There are two ways to get tc filters from kernel to user space.
      
      1) Full dump (tc_dump_tfilter())
      2) RTM_GETTFILTER to get one precise filter, reducing overhead.
      
      The second operation is unfortunately broadcasting its result,
      polluting "tc monitor" users.
      
      This patch makes sure only the requester gets the result, using
      netlink_unicast() instead of rtnetlink_send()
      
      Jamal cooked an iproute2 patch to implement "tc filter get" operation,
      but other user space libraries already use RTM_GETTFILTER when a single
      filter is queried, instead of dumping all filters.
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa59b27c
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-4.9-rc1' of... · b67be92f
      Linus Torvalds authored
      Merge tag 'pwm/for-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This set of changes contains support for PWM signal capture in the STi
        driver as well as support for the PWM controller found on Meson SoCs.
        There's also support added for the MediaTek MT2701 and SunXi H3 to the
        existing drivers.
      
        Other than that there's a fair set of miscellaneous cleanups and fixes
        across the board"
      
      * tag 'pwm/for-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (24 commits)
        pwm: meson: Handle unknown ID values
        pwm: sti: Take the opportunity to conduct a little house keeping
        pwm: sti: It's now valid for number of PWM channels to be zero
        pwm: sti: Add PWM capture callback
        pwm: sti: Add support for PWM capture interrupts
        pwm: sti: Initialise PWM capture device data
        pwm: sti: Supply PWM Capture clock handling
        pwm: sti: Supply PWM capture register addresses and bit locations
        pwm: sti: Only request clock rate when needed
        pwm: sti: Reorganise register names in preparation for new functionality
        pwm: sti: Rename channel => device
        dt-bindings: pwm: sti: Update DT bindings for capture support
        pwm: lpc-18xx: use pwm_set_chip_data
        pwm: sunxi: Add H3 support
        pwm: Add support for Meson PWM Controller
        dt-bindings: pwm: Add bindings for Meson PWM Controller
        pwm: samsung: Fix to use lowest div for large enough modulation bits
        pwm: pwm-tipwmss: Remove all runtime PM gets/puts
        pwm: cros-ec: Add __packed to prevent padding
        pwm: Add MediaTek MT2701 display PWM driver support
        ...
      b67be92f
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 2d2474a1
      Linus Torvalds authored
      Pull thermal managament updates from Zhang Rui:
      
       - Enhance thermal "userspace" governor to export the reason when a
         thermal event is triggered and delivered to user space. From Srinivas
         Pandruvada
      
       - Introduce a single TSENS thermal driver for the different versions of
         the TSENS IP that exist, on different qcom msm/apq SoCs'. Support for
         msm8916, msm8960, msm8974 and msm8996 families is also added. From
         Rajendra Nayak
      
       - Introduce hardware-tracked trip points support to the device tree
         thermal sensor framework. The framework supports an arbitrary number
         of trip points. Whenever the current temperature is changed, the trip
         points immediately below and above the current temperature are found,
         driver callback is invoked to program the hardware to get notified
         when either of the two trip points are triggered. Hardware-tracked
         trip points support for rockchip thermal driver is also added at the
         same time. From Sascha Hauer, Caesar Wang
      
       - Introduce a new thermal driver, which enables TMU (Thermal Monitor
         Unit) on QorIQ platform. From Jia Hongtao
      
       - Introduce a new thermal driver for Maxim MAX77620. From Laxman
         Dewangan
      
       - Introduce a new thermal driver for Intel platforms using WhiskeyCove
         PMIC. From Bin Gao
      
       - Add mt2701 chip support to MTK thermal driver. From Dawei Chien
      
       - Enhance Tegra thermal driver to enable soctherm node and set
         "critical", "hot" trips, for Tegra124, Tegra132, Tegra210. From Wei
         Ni
      
       - Add resume support for tango thermal driver. From Marc Gonzalez
      
       - several small fixes and improvements for rockchip, qcom, imx, rcar,
         mtk thermal drivers and thermal core code. From Caesar Wang, Keerthy,
         Rocky Hao, Wei Yongjun, Peter Robinson, Bui Duc Phuc, Axel Lin, Hugh
         Kang
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (48 commits)
        thermal: int3403: Process trip change notification
        thermal: int340x: New Interface to read trip and notify
        thermal: user_space gov: Add additional information in uevent
        thermal: Enhance thermal_zone_device_update for events
        arm64: tegra: set hot trips for Tegra210
        arm64: tegra: set critical trips for Tegra210
        arm64: tegra: add soctherm node for Tegra210
        arm64: tegra: set hot trips for Tegra132
        arm64: tegra: set critical trips for Tegra132
        arm64: tegra: use tegra132-soctherm for Tegra132
        arm: tegra: set hot trips for Tegra124
        arm: tegra: set critical trips for Tegra124
        thermal: tegra: add hw-throttle for Tegra132
        thermal: tegra: add hw-throttle function
        of: Add bindings of hw throttle for Tegra soctherm
        thermal: mtk_thermal: Check return value of devm_thermal_zone_of_sensor_register
        thermal: Add Mediatek thermal driver for mt2701.
        dt-bindings: thermal: Add binding document for Mediatek thermal controller
        thermal: max77620: Add thermal driver for reporting junction temp
        thermal: max77620: Add DT binding doc for thermal driver
        ...
      2d2474a1