1. 07 Sep, 2017 8 commits
  2. 06 Sep, 2017 12 commits
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 80cee03b
      Linus Torvalds authored
      Pull crypto updates from Herbert Xu:
       "Here is the crypto update for 4.14:
      
        API:
         - Defer scompress scratch buffer allocation to first use.
         - Add __crypto_xor that takes separte src and dst operands.
         - Add ahash multiple registration interface.
         - Revamped aead/skcipher algif code to fix async IO properly.
      
        Drivers:
         - Add non-SIMD fallback code path on ARM for SVE.
         - Add AMD Security Processor framework for ccp.
         - Add support for RSA in ccp.
         - Add XTS-AES-256 support for CCP version 5.
         - Add support for PRNG in sun4i-ss.
         - Add support for DPAA2 in caam.
         - Add ARTPEC crypto support.
         - Add Freescale RNGC hwrng support.
         - Add Microchip / Atmel ECC driver.
         - Add support for STM32 HASH module"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
        crypto: af_alg - get_page upon reassignment to TX SGL
        crypto: cavium/nitrox - Fix an error handling path in 'nitrox_probe()'
        crypto: inside-secure - fix an error handling path in safexcel_probe()
        crypto: rockchip - Don't dequeue the request when device is busy
        crypto: cavium - add release_firmware to all return case
        crypto: sahara - constify platform_device_id
        MAINTAINERS: Add ARTPEC crypto maintainer
        crypto: axis - add ARTPEC-6/7 crypto accelerator driver
        crypto: hash - add crypto_(un)register_ahashes()
        dt-bindings: crypto: add ARTPEC crypto
        crypto: algif_aead - fix comment regarding memory layout
        crypto: ccp - use dma_mapping_error to check map error
        lib/mpi: fix build with clang
        crypto: sahara - Remove leftover from previous used spinlock
        crypto: sahara - Fix dma unmap direction
        crypto: af_alg - consolidation of duplicate code
        crypto: caam - Remove unused dentry members
        crypto: ccp - select CONFIG_CRYPTO_RSA
        crypto: ccp - avoid uninitialized variable warning
        crypto: serpent - improve __serpent_setkey with UBSAN
        ...
      80cee03b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · aae3dbb4
      Linus Torvalds authored
      Pull networking updates from David Miller:
      
       1) Support ipv6 checksum offload in sunvnet driver, from Shannon
          Nelson.
      
       2) Move to RB-tree instead of custom AVL code in inetpeer, from Eric
          Dumazet.
      
       3) Allow generic XDP to work on virtual devices, from John Fastabend.
      
       4) Add bpf device maps and XDP_REDIRECT, which can be used to build
          arbitrary switching frameworks using XDP. From John Fastabend.
      
       5) Remove UFO offloads from the tree, gave us little other than bugs.
      
       6) Remove the IPSEC flow cache, from Florian Westphal.
      
       7) Support ipv6 route offload in mlxsw driver.
      
       8) Support VF representors in bnxt_en, from Sathya Perla.
      
       9) Add support for forward error correction modes to ethtool, from
          Vidya Sagar Ravipati.
      
      10) Add time filter for packet scheduler action dumping, from Jamal Hadi
          Salim.
      
      11) Extend the zerocopy sendmsg() used by virtio and tap to regular
          sockets via MSG_ZEROCOPY. From Willem de Bruijn.
      
      12) Significantly rework value tracking in the BPF verifier, from Edward
          Cree.
      
      13) Add new jump instructions to eBPF, from Daniel Borkmann.
      
      14) Rework rtnetlink plumbing so that operations can be run without
          taking the RTNL semaphore. From Florian Westphal.
      
      15) Support XDP in tap driver, from Jason Wang.
      
      16) Add 32-bit eBPF JIT for ARM, from Shubham Bansal.
      
      17) Add Huawei hinic ethernet driver.
      
      18) Allow to report MD5 keys in TCP inet_diag dumps, from Ivan
          Delalande.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1780 commits)
        i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq
        i40e: avoid NVM acquire deadlock during NVM update
        drivers: net: xgene: Remove return statement from void function
        drivers: net: xgene: Configure tx/rx delay for ACPI
        drivers: net: xgene: Read tx/rx delay for ACPI
        rocker: fix kcalloc parameter order
        rds: Fix non-atomic operation on shared flag variable
        net: sched: don't use GFP_KERNEL under spin lock
        vhost_net: correctly check tx avail during rx busy polling
        net: mdio-mux: add mdio_mux parameter to mdio_mux_init()
        rxrpc: Make service connection lookup always check for retry
        net: stmmac: Delete dead code for MDIO registration
        gianfar: Fix Tx flow control deactivation
        cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6
        cxgb4: Fix pause frame count in t4_get_port_stats
        cxgb4: fix memory leak
        tun: rename generic_xdp to skb_xdp
        tun: reserve extra headroom only when XDP is set
        net: dsa: bcm_sf2: Configure IMP port TC2QOS mapping
        net: dsa: bcm_sf2: Advertise number of egress queues
        ...
      aae3dbb4
    • Linus Torvalds's avatar
      Merge tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · ec3604c7
      Linus Torvalds authored
      Pull writeback error handling updates from Jeff Layton:
       "This pile continues the work from last cycle on better tracking
        writeback errors. In v4.13 we added some basic errseq_t infrastructure
        and converted a few filesystems to use it.
      
        This set continues refining that infrastructure, adds documentation,
        and converts most of the other filesystems to use it. The main
        exception at this point is the NFS client"
      
      * tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
        ecryptfs: convert to file_write_and_wait in ->fsync
        mm: remove optimizations based on i_size in mapping writeback waits
        fs: convert a pile of fsync routines to errseq_t based reporting
        gfs2: convert to errseq_t based writeback error reporting for fsync
        fs: convert sync_file_range to use errseq_t based error-tracking
        mm: add file_fdatawait_range and file_write_and_wait
        fuse: convert to errseq_t based error tracking for fsync
        mm: consolidate dax / non-dax checks for writeback
        Documentation: add some docs for errseq_t
        errseq: rename __errseq_set to errseq_set
      ec3604c7
    • Linus Torvalds's avatar
      Merge tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · 066dea8c
      Linus Torvalds authored
      Pull file locking updates from Jeff Layton:
       "This pile just has a few file locking fixes from Ben Coddington. There
        are a couple of cleanup patches + an attempt to bring sanity to the
        l_pid value that is reported back to userland on an F_GETLK request.
      
        After a few gyrations, he came up with a way for filesystems to
        communicate to the VFS layer code whether the pid should be translated
        according to the namespace or presented as-is to userland"
      
      * tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
        locks: restore a warn for leaked locks on close
        fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks
        fs/locks: Use allocation rather than the stack in fcntl_getlk()
      066dea8c
    • Linus Torvalds's avatar
      Merge tag 'dlm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm · c7f396f1
      Linus Torvalds authored
      Pull dlm updates from David Teigland:
       "This set includes a bunch of minor code cleanups that have
        accumulated, probably from code analyzers people like to run. There is
        one nice fix that avoids some socket leaks by switching to use
        sock_create_lite()"
      
      * tag 'dlm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
        dlm: use sock_create_lite inside tcp_accept_from_sock
        uapi linux/dlm_netlink.h: include linux/dlmconstants.h
        dlm: avoid double-free on error path in dlm_device_{register,unregister}
        dlm: constify kset_uevent_ops structure
        dlm: print log message when cluster name is not set
        dlm: Delete an unnecessary variable initialisation in dlm_ls_start()
        dlm: Improve a size determination in two functions
        dlm: Use kcalloc() in two functions
        dlm: Use kmalloc_array() in make_member_array()
        dlm: Delete an error message for a failed memory allocation in dlm_recover_waiters_pre()
        dlm: Improve a size determination in dlm_recover_waiters_pre()
        dlm: Use kcalloc() in dlm_scan_waiters()
        dlm: Improve a size determination in table_seq_start()
        dlm: Add spaces for better code readability
        dlm: Replace six seq_puts() calls by seq_putc()
        dlm: Make dismatch error message more clear
        dlm: Fix kernel memory disclosure
      c7f396f1
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · be6297e9
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "Scalability improvements when allocating inodes, and some
        miscellaneous bug fixes and cleanups"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: avoid Y2038 overflow in recently_deleted()
        ext4: fix fault handling when mounted with -o dax,ro
        ext4: fix quota inconsistency during orphan cleanup for read-only mounts
        ext4: fix incorrect quotaoff if the quota feature is enabled
        ext4: remove useless test and assignment in strtohash functions
        ext4: backward compatibility support for Lustre ea_inode implementation
        ext4: remove timebomb in ext4_decode_extra_time()
        ext4: use sizeof(*ptr)
        ext4: in ext4_seek_{hole,data}, return -ENXIO for negative offsets
        ext4: reduce lock contention in __ext4_new_inode
        ext4: cleanup goto next group
        ext4: do not unnecessarily allocate buffer in recently_deleted()
      be6297e9
    • Linus Torvalds's avatar
      Merge tag 'xfs-4.14-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 57915779
      Linus Torvalds authored
      Pull XFS updates from Darrick Wong:
       "Here are the changes for xfs for 4.14. Most of these are cleanups and
        fixes for bad behavior, as we're mostly focusing on improving
        reliablity this cycle (read: there's potentially a lot of stuff on the
        horizon for 4.15 so better to spend a few weeks killing other bugs
        now).
      
        Summary:
      
         - Write unmount record for a ro mount to avoid unnecessary log replay
      
         - Clean up orphaned inodes when mounting fs readonly
      
         - Resubmit inode log items when buffer writeback fails to avoid
           umount hang
      
         - Fix log recovery corruption problems when log headers wrap around
           the end
      
         - Avoid infinite loop searching for free inodes when inode counters
           are wrong
      
         - Evict inodes involved with log redo so that we don't leak them
           later
      
         - Fix a potential race between reclaim and inode cluster freeing
      
         - Refactor the inode joining code w.r.t. transaction rolling &
           deferred ops
      
         - Fix a bug where the log doesn't properly deal with dirty buffers
           that are about to become ordered buffers
      
         - Fix the extent swap code to deal with making dirty buffers ordered
           properly
      
         - Consolidate page fault handlers
      
         - Refactor the incore extent manipulation functions to use the iext
           abstractions instead of directly modifying with extent data
      
         - Disable crashy chattr +/-x until we fix it
      
         - Don't allow us to set S_DAX for v2 inodes
      
         - Various cleanups
      
         - Clarify some documentation
      
         - Fix a problem where fsync and a log commit race to send the disk a
           flush command, resulting in a small window where power fail data
           loss could occur
      
         - Simplify some rmap operations in the fcollapse code
      
         - Fix some use-after-free problems in async writeback"
      
      * tag 'xfs-4.14-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (44 commits)
        xfs: use kmem_free to free return value of kmem_zalloc
        xfs: open code end_buffer_async_write in xfs_finish_page_writeback
        xfs: don't set v3 xflags for v2 inodes
        xfs: fix compiler warnings
        fsmap: fix documentation of FMR_OF_LAST
        xfs: simplify the rmap code in xfs_bmse_merge
        xfs: remove unused flags arg from xfs_file_iomap_begin_delay
        xfs: fix incorrect log_flushed on fsync
        xfs: disable per-inode DAX flag
        xfs: replace xfs_qm_get_rtblks with a direct call to xfs_bmap_count_leaves
        xfs: rewrite xfs_bmap_count_leaves using xfs_iext_get_extent
        xfs: use xfs_iext_*_extent helpers in xfs_bmap_split_extent_at
        xfs: use xfs_iext_*_extent helpers in xfs_bmap_shift_extents
        xfs: move some code around inside xfs_bmap_shift_extents
        xfs: use xfs_iext_get_extent in xfs_bmap_first_unused
        xfs: switch xfs_bmap_local_to_extents to use xfs_iext_insert
        xfs: add a xfs_iext_update_extent helper
        xfs: consolidate the various page fault handlers
        iomap: return VM_FAULT_* codes from iomap_page_mkwrite
        xfs: relog dirty buffers during swapext bmbt owner change
        ...
      57915779
    • Linus Torvalds's avatar
      Merge tag 'gfs2-4.14.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 77d0ab60
      Linus Torvalds authored
      Pull GFS2 updates from Bob Peterson:
       "We've got a whopping 29 GFS2 patches for this merge window, mainly
        because we held some back from the previous merge window until we
        could get them perfected and well tested. We have a couple patch sets,
        including my patch set for protecting glock gl_object and Andreas
        Gruenbacher's patch set to fix the long-standing shrink- slab hang,
        plus a bunch of assorted bugs and cleanups.
      
        Summary:
      
         - I fixed a bug whereby an IO error would lead to a double-brelse.
      
         - Andreas Gruenbacher made a minor cleanup to call his relatively new
           function, gfs2_holder_initialized, rather than doing it manually.
           This was just missed by a previous patch set.
      
         - Jan Kara fixed a bug whereby the SGID was being cleared when
           inheriting ACLs.
      
         - Andreas found a bug and fixed it in his previous patch, "Get rid of
           flush_delayed_work in gfs2_evict_inode". A call to
           flush_delayed_work was deleted from *gfs2_inode_lookup and added to
           gfs2_create_inode.
      
         - Wang Xibo found and fixed a list_add call in inode_go_lock that
           specified the parameters in the wrong order.
      
         - Coly Li submitted a patch to add the REQ_PRIO to some of GFS2's
           metadata reads that were accidentally missing them.
      
         - I submitted a 4-patch set to protect the glock gl_object field.
           GFS2 was setting and checking gl_object with no locking mechanism,
           so the value was occasionally stomped on, which caused file system
           corruption.
      
         - I submitted a small cleanup to function gfs2_clear_rgrpd. It was
           needlessly adding rgrp glocks to the lru list, then pulling them
           back off immediately. The rgrp glocks don't use the lru list
           anyway, so doing so was just a waste of time.
      
         - I submitted a patch that checks the GLOF_LRU flag on a glock before
           trying to remove it from the lru_list. This avoids a lot of
           unnecessary spin_lock contention.
      
         - I submitted a patch to delete GFS2's debugfs files only after we
           evict all the glocks. Before this patch, GFS2 would delete the
           debugfs files, and if unmount hung waiting for a glock, there was
           no way to debug the problem. Now, if a hang occurs during umount,
           we can examine the debugfs files to figure out why it's hung.
      
         - Andreas Gruenbacher submitted a patch to fix some trivial typos.
      
         - Andreas also submitted a five-part patch set to fix the
           longstanding hang involving the slab shrinker: dlm requires memory,
           calls the inode shrinker, which calls gfs2's evict, which calls
           back into DLM before it can evict an inode.
      
         - Abhi Das submitted a patch to forcibly flush the active items list
           to relieve memory pressure. This fixes a long-standing bug whereby
           GFS2 was getting hung permanently in balance_dirty_pages.
      
         - Thomas Tai submitted a patch to fix a slab corruption problem due
           to a residual pointer left in the lock_dlm lockstruct.
      
         - I submitted a patch to withdraw the file system if IO errors are
           encountered while writing to the journals or statfs system file
           which were previously not being sent back up. Before, some IO
           errors were sometimes not be detected for several hours, and at
           recovery time, the journal errors made journal replay impossible.
      
         - Andreas has a patch to fix an annoying format-truncation compiler
           warning so GFS2 compiles cleanly.
      
         - I have a patch that fixes a handful of sparse compiler warnings.
      
         - Andreas fixed up an useless gl_object warning caused by an earlier
           patch.
      
         - Arvind Yadav added a patch to properly constify our rhashtable
           params declare.
      
         - I added a patch to fix a regression caused by the non-recursive
           delete and truncate patch that caused file system blocks to not be
           properly freed.
      
         - Ernesto A. Fernández added a patch to fix a place where GFS2 would
           send back the wrong return code setting extended attributes.
      
         - Ernesto also added a patch to fix a case in which GFS2 was
           improperly setting an inode's i_mode, potentially granting access
           to the wrong users"
      
      * tag 'gfs2-4.14.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (29 commits)
        gfs2: preserve i_mode if __gfs2_set_acl() fails
        gfs2: don't return ENODATA in __gfs2_xattr_set unless replacing
        GFS2: Fix non-recursive truncate bug
        gfs2: constify rhashtable_params
        GFS2: Fix gl_object warnings
        GFS2: Fix up some sparse warnings
        gfs2: Silence gcc format-truncation warning
        GFS2: Withdraw for IO errors writing to the journal or statfs
        gfs2: fix slab corruption during mounting and umounting gfs file system
        gfs2: forcibly flush ail to relieve memory pressure
        gfs2: Clean up waiting on glocks
        gfs2: Defer deleting inodes under memory pressure
        gfs2: gfs2_evict_inode: Put glocks asynchronously
        gfs2: Get rid of gfs2_set_nlink
        gfs2: gfs2_glock_get: Wait on freeing glocks
        gfs2: Fix trivial typos
        GFS2: Delete debugfs files only after we evict the glocks
        GFS2: Don't waste time locking lru_lock for non-lru glocks
        GFS2: Don't bother trying to add rgrps to the lru list
        GFS2: Clear gl_object when deleting an inode in gfs2_delete_inode
        ...
      77d0ab60
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue · 66bed846
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2017-09-05
      
      This series contains fixes for i40e only.
      
      These two patches fix an issue where our nvmupdate tool does not work on RHEL 7.4
      and newer kernels, in fact, the use of the nvmupdate tool on newer kernels can
      cause the cards to be non-functional unless these patches are applied.
      
      Anjali reworks the locking around accessing the NVM so that NVM acquire timeouts
      do not occur which was causing the failed firmware updates.
      
      Jake correctly updates the wb_desc when reading the NVM through the AdminQ.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66bed846
    • David S. Miller's avatar
    • Jacob Keller's avatar
      i40e: point wb_desc at the nvm_wb_desc during i40e_read_nvm_aq · 3c8f3e96
      Jacob Keller authored
      When introducing the functions to read the NVM through the AdminQ, we
      did not correctly mark the wb_desc.
      
      Fixes: 7073f46e ("i40e: Add AQ commands for NVM Update for X722", 2015-06-05)
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3c8f3e96
    • Anjali Singhai Jain's avatar
      i40e: avoid NVM acquire deadlock during NVM update · 09f79fd4
      Anjali Singhai Jain authored
      X722 devices use the AdminQ to access the NVM, and this requires taking
      the AdminQ lock. Because of this, we lock the AdminQ during
      i40e_read_nvm(), which is also called in places where the lock is
      already held, such as the firmware update path which wants to lock once
      and then unlock when finished after performing several tasks.
      
      Although this should have only affected X722 devices, commit
      96a39aed ("i40e: Acquire NVM lock before reads on all devices",
      2016-12-02) added locking for all NVM reads, regardless of device
      family.
      
      This resulted in us accidentally causing NVM acquire timeouts on all
      devices, causing failed firmware updates which left the eeprom in
      a corrupt state.
      
      Create unsafe non-locked variants of i40e_read_nvm_word and
      i40e_read_nvm_buffer, __i40e_read_nvm_word and __i40e_read_nvm_buffer
      respectively. These variants will not take the NVM lock and are expected
      to only be called in places where the NVM lock is already held if
      needed.
      
      Since the only caller of i40e_read_nvm_buffer() was in such a path,
      remove it entirely in favor of the unsafe version. If necessary we can
      always add it back in the future.
      
      Additionally, we now need to hold the NVM lock in i40e_validate_checksum
      because the call to i40e_calc_nvm_checksum now assumes that the NVM lock
      is held. We can further move the call to read I40E_SR_SW_CHECKSUM_WORD
      up a bit so that we do not need to acquire the NVM lock twice.
      
      This should resolve firmware updates and also fix potential raise that
      could have caused the driver to report an invalid NVM checksum upon
      driver load.
      Reported-by: default avatarStefan Assmann <sassmann@kpanic.de>
      Fixes: 96a39aed ("i40e: Acquire NVM lock before reads on all devices", 2016-12-02)
      Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      09f79fd4
  3. 05 Sep, 2017 20 commits
    • David S. Miller's avatar
      Merge branch 'xgene-Misc-bug-fixes' · 39cebdb7
      David S. Miller authored
      Iyappan Subramanian says:
      
      ====================
      drivers: net: xgene: Misc bug fixes
      
      This patch set fixes bugs related to handling the case for ACPI for,
      reading and programming tx/rx delay values.
      ====================
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39cebdb7
    • Iyappan Subramanian's avatar
      drivers: net: xgene: Remove return statement from void function · f098003a
      Iyappan Subramanian authored
      commit 183db4 ("drivers: net: xgene: Correct probe sequence handling")
      changed the return type of xgene_enet_check_phy_handle() to void.
      
      This patch, removes the return statement from the last line.
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f098003a
    • Quan Nguyen's avatar
      drivers: net: xgene: Configure tx/rx delay for ACPI · 5e338b36
      Quan Nguyen authored
      This patch fixes configuring tx/rx delay values for ACPI.
      Signed-off-by: default avatarQuan Nguyen <qnguyen@apm.com>
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e338b36
    • Iyappan Subramanian's avatar
      drivers: net: xgene: Read tx/rx delay for ACPI · 9d7e72c0
      Iyappan Subramanian authored
      This patch fixes reading tx/rx delay values for ACPI.
      Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
      Signed-off-by: default avatarQuan Nguyen <qnguyen@apm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9d7e72c0
    • Zahari Doychev's avatar
      rocker: fix kcalloc parameter order · b1357cfb
      Zahari Doychev authored
      The function calls to kcalloc use wrong parameter order and incorrect flags
      values. GFP_KERNEL is used instead of flags now and the order is corrected.
      
      The change was done using the following coccinelle script:
      
      @@
      expression E1,E2;
      type T;
      @@
      
      -kcalloc(E1, E2, sizeof(T))
      +kcalloc(E2, sizeof(T), GFP_KERNEL)
      Signed-off-by: default avatarZahari Doychev <zahari.doychev@linux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1357cfb
    • Håkon Bugge's avatar
      rds: Fix non-atomic operation on shared flag variable · f530f39f
      Håkon Bugge authored
      The bits in m_flags in struct rds_message are used for a plurality of
      reasons, and from different contexts. To avoid any missing updates to
      m_flags, use the atomic set_bit() instead of the non-atomic equivalent.
      Signed-off-by: default avatarHåkon Bugge <haakon.bugge@oracle.com>
      Reviewed-by: default avatarKnut Omang <knut.omang@oracle.com>
      Reviewed-by: default avatarWei Lin Guay <wei.lin.guay@oracle.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f530f39f
    • Jakub Kicinski's avatar
      net: sched: don't use GFP_KERNEL under spin lock · 2c8468dc
      Jakub Kicinski authored
      The new TC IDR code uses GFP_KERNEL under spin lock.  Which leads
      to:
      
      [  582.621091] BUG: sleeping function called from invalid context at ../mm/slab.h:416
      [  582.629721] in_atomic(): 1, irqs_disabled(): 0, pid: 3379, name: tc
      [  582.636939] 2 locks held by tc/3379:
      [  582.641049]  #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff910354ce>] rtnetlink_rcv_msg+0x92e/0x1400
      [  582.650958]  #1:  (&(&tn->idrinfo->lock)->rlock){+.-.+.}, at: [<ffffffff9110a5e0>] tcf_idr_create+0x2f0/0x8e0
      [  582.662217] Preemption disabled at:
      [  582.662222] [<ffffffff9110a5e0>] tcf_idr_create+0x2f0/0x8e0
      [  582.672592] CPU: 9 PID: 3379 Comm: tc Tainted: G        W       4.13.0-rc7-debug-00648-g43503a79b9f0 #287
      [  582.683432] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.3.4 11/08/2016
      [  582.691937] Call Trace:
      ...
      [  582.742460]  kmem_cache_alloc+0x286/0x540
      [  582.747055]  radix_tree_node_alloc.constprop.6+0x4a/0x450
      [  582.753209]  idr_get_free_cmn+0x627/0xf80
      ...
      [  582.815525]  idr_alloc_cmn+0x1a8/0x270
      ...
      [  582.833804]  tcf_idr_create+0x31b/0x8e0
      ...
      
      Try to preallocate the memory with idr_prealloc(GFP_KERNEL)
      (as suggested by Eric Dumazet), and change the allocation
      flags under spin lock.
      
      Fixes: 65a206c0 ("net/sched: Change act_api and act_xxx modules to use IDR")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c8468dc
    • Jason Wang's avatar
      vhost_net: correctly check tx avail during rx busy polling · 8b949bef
      Jason Wang authored
      We check tx avail through vhost_enable_notify() in the past which is
      wrong since it only checks whether or not guest has filled more
      available buffer since last avail idx synchronization which was just
      done by vhost_vq_avail_empty() before. What we really want is checking
      pending buffers in the avail ring. Fix this by calling
      vhost_vq_avail_empty() instead.
      
      This issue could be noticed by doing netperf TCP_RR benchmark as
      client from guest (but not host). With this fix, TCP_RR from guest to
      localhost restores from 1375.91 trans per sec to 55235.28 trans per
      sec on my laptop (Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz).
      
      Fixes: 03088137 ("vhost_net: basic polling support")
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b949bef
    • Corentin Labbe's avatar
      net: mdio-mux: add mdio_mux parameter to mdio_mux_init() · 5482a978
      Corentin Labbe authored
      mdio_mux_init() use the parameter dev for two distinct thing:
      1) Have a device for all devm_ functions
      2) Get device_node from it
      
      Since it is two distinct purpose, this patch add a parameter mdio_mux
      that is linked to task 2.
      
      This will also permit to register an of_node mdio-mux that lacks a direct
      owning device.
      For example a mdio-mux which is a subnode of a real device.
      Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5482a978
    • David Howells's avatar
      rxrpc: Make service connection lookup always check for retry · fdade4f6
      David Howells authored
      When an RxRPC service packet comes in, the target connection is looked up
      by an rb-tree search under RCU and a read-locked seqlock; the seqlock retry
      check is, however, currently skipped if we got a match, but probably
      shouldn't be in case the connection we found gets replaced whilst we're
      doing a search.
      
      Make the lookup procedure always go through need_seqretry(), even if the
      lookup was successful.  This makes sure we always pick up on a write-lock
      event.
      
      On the other hand, since we don't take a ref on the object, but rely on RCU
      to prevent its destruction after dropping the seqlock, I'm not sure this is
      necessary.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdade4f6
    • Romain Perier's avatar
      net: stmmac: Delete dead code for MDIO registration · 5e369aef
      Romain Perier authored
      This code is no longer used, the logging function was changed by commit
      fbca1647 ("net: stmmac: Use the right logging function in stmmac_mdio_register").
      It was previously showing information about the type of the IRQ, if it's
      polled, ignored or a normal interrupt. As we don't want information loss,
      I have moved this code to phy_attached_print().
      
      Fixes: fbca1647 ("net: stmmac: Use the right logging function in stmmac_mdio_register")
      Signed-off-by: default avatarRomain Perier <romain.perier@collabora.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e369aef
    • Claudiu Manoil's avatar
      gianfar: Fix Tx flow control deactivation · 5d621672
      Claudiu Manoil authored
      The wrong register is checked for the Tx flow control bit,
      it should have been maccfg1 not maccfg2.
      This went unnoticed for so long probably because the impact is
      hardly visible, not to mention the tangled code from adjust_link().
      First, link flow control (i.e. handling of Rx/Tx link level pause frames)
      is disabled by default (needs to be enabled via 'ethtool -A').
      Secondly, maccfg2 always returns 0 for tx_flow_oldval (except for a few
      old boards), which results in Tx flow control remaining always on
      once activated.
      
      Fixes: 45b679c9 ("gianfar: Implement PAUSE frame generation support")
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d621672
    • Ganesh Goudar's avatar
      cxgb4: Ignore MPS_TX_INT_CAUSE[Bubble] for T6 · ef18e3b9
      Ganesh Goudar authored
      MPS_TX_INT_CAUSE[Bubble] is a normal condition for T6, hence
      ignore this interrupt for T6.
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef18e3b9
    • Ganesh Goudar's avatar
      cxgb4: Fix pause frame count in t4_get_port_stats · 2de489f4
      Ganesh Goudar authored
      MPS_STAT_CTL[CountPauseStatTx] and MPS_STAT_CTL[CountPauseStatRx]
      only control whether or not Pause Frames will be counted as part
      of the 64-Byte Tx/Rx Frame counters.  These bits do not control
      whether Pause Frames are counted in the Total Tx/Rx Frames/Bytes
      counters.
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2de489f4
    • Ganesh Goudar's avatar
      cxgb4: fix memory leak · 128416ac
      Ganesh Goudar authored
      do not reuse the loop counter which is used iterate over
      the ports, so that sched_tbl will be freed for all the ports.
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      128416ac
    • Jason Wang's avatar
      tun: rename generic_xdp to skb_xdp · 1cfe6e93
      Jason Wang authored
      Rename "generic_xdp" to "skb_xdp" to avoid confusing it with the
      generic XDP which will be done at netif_receive_skb().
      
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1cfe6e93
    • Jason Wang's avatar
      tun: reserve extra headroom only when XDP is set · 7df13219
      Jason Wang authored
      We reserve headroom unconditionally which could cause unnecessary
      stress on socket memory accounting because of increased trusesize. Fix
      this by only reserve extra headroom when XDP is set.
      
      Cc: Jakub Kicinski <kubakici@wp.pl>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7df13219
    • Linus Torvalds's avatar
      Merge tag 'devprop-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e7d0c41e
      Linus Torvalds authored
      Pull device properties framework updates from Rafael Wysocki:
       "These introduce fwnode operations for all of the separate types of
        'firmware nodes' that can be handled by the device properties
        framework, make the framework use const fwnode arguments all over, add
        a helper for the consolidated handling of node references and switch
        over the framework to the new UUID API.
      
        Specifics:
      
         - Introduce fwnode operations for all of the separate types of
           'firmware nodes' that can be handled by the device properties
           framework and drop the type field from struct fwnode_handle (Sakari
           Ailus, Arnd Bergmann).
      
         - Make the device properties framework use const fwnode arguments
           where possible (Sakari Ailus).
      
         - Add a helper for the consolidated handling of node references to
           the device properties framework (Sakari Ailus).
      
         - Switch over the ACPI part of the device properties framework to the
           new UUID API (Andy Shevchenko)"
      
      * tag 'devprop-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: device property: Switch to use new generic UUID API
        device property: export irqchip_fwnode_ops
        device property: Introduce fwnode_property_get_reference_args
        device property: Constify fwnode property API
        device property: Constify argument to pset fwnode backend
        ACPI: Constify internal fwnode arguments
        ACPI: Constify acpi_bus helper functions, switch to macros
        ACPI: Prepare for constifying acpi_get_next_subnode() fwnode argument
        device property: Get rid of struct fwnode_handle type field
        ACPI: Use IS_ERR_OR_NULL() instead of non-NULL check in is_acpi_data_node()
      e7d0c41e
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 53ac64aa
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "These include a usual ACPICA code update (this time to upstream
        revision 20170728), a fix for a boot crash on some systems with
        Thunderbolt devices connected at boot time, a rework of the handling
        of PCI bridges when setting up device wakeup, new support for Apple
        device properties, support for DMA configurations reported via ACPI on
        ARM64, APEI-related updates, ACPI EC driver updates and assorted minor
        modifications in several places.
      
        Specifics:
      
         - Update the ACPICA code in the kernel to upstream revision 20170728
           including:
            * Alias operator handling update (Bob Moore).
            * Deferred resolution of reference package elements (Bob Moore).
            * Support for the _DMA method in walk resources (Bob Moore).
            * Tables handling update and support for deferred table
              verification (Lv Zheng).
            * Update of SMMU models for IORT (Robin Murphy).
            * Compiler and disassembler updates (Alex James, Erik Schmauss,
              Ganapatrao Kulkarni, James Morse).
            * Tools updates (Erik Schmauss, Lv Zheng).
            * Assorted minor fixes and cleanups (Bob Moore, Kees Cook, Lv
              Zheng, Shao Ming).
      
         - Rework the initialization of non-wakeup GPEs with method handlers
           in order to address a boot crash on some systems with Thunderbolt
           devices connected at boot time where we miss an early hotplug event
           due to a delay in GPE enabling (Rafael Wysocki).
      
         - Rework the handling of PCI bridges when setting up ACPI-based
           device wakeup in order to avoid disabling wakeup for bridges
           prematurely (Rafael Wysocki).
      
         - Consolidate Apple DMI checks throughout the tree, add support for
           Apple device properties to the device properties framework and use
           these properties for the handling of I2C and SPI devices on Apple
           systems (Lukas Wunner).
      
         - Add support for _DMA to the ACPI-based device properties lookup
           code and make it possible to use the information from there to
           configure DMA regions on ARM64 systems (Lorenzo Pieralisi).
      
         - Fix several issues in the APEI code, add support for exporting the
           BERT error region over sysfs and update APEI MAINTAINERS entry with
           reviewers information (Borislav Petkov, Dongjiu Geng, Loc Ho, Punit
           Agrawal, Tony Luck, Yazen Ghannam).
      
         - Fix a potential initialization ordering issue in the ACPI EC driver
           and clean it up somewhat (Lv Zheng).
      
         - Update the ACPI SPCR driver to extend the existing XGENE 8250
           workaround in it to a new platform (m400) and to work around an
           Xgene UART clock issue (Graeme Gregory).
      
         - Add a new utility function to the ACPI core to support using ACPI
           OEM ID / OEM Table ID / Revision for system identification in
           blacklisting or similar and switch over the existing code already
           using this information to this new interface (Toshi Kani).
      
         - Fix an xpower PMIC issue related to GPADC reads that always return
           0 without extra pin manipulations (Hans de Goede).
      
         - Add statements to print debug messages in a couple of places in the
           ACPI core for easier diagnostics (Rafael Wysocki).
      
         - Clean up the ACPI processor driver slightly (Colin Ian King, Hanjun
           Guo).
      
         - Clean up the ACPI x86 boot code somewhat (Andy Shevchenko).
      
         - Add a quirk for Dell OptiPlex 9020M to the ACPI backlight driver
           (Alex Hung).
      
         - Assorted fixes, cleanups and updates related to ACPI (Amitoj Kaur
           Chawla, Bhumika Goyal, Frank Rowand, Jean Delvare, Punit Agrawal,
           Ronald Tschalär, Sumeet Pawnikar)"
      
      * tag 'acpi-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (75 commits)
        ACPI / APEI: Suppress message if HEST not present
        intel_pstate: convert to use acpi_match_platform_list()
        ACPI / blacklist: add acpi_match_platform_list()
        ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources
        ACPI: make device_attribute const
        ACPI / sysfs: Extend ACPI sysfs to provide access to boot error region
        ACPI: APEI: fix the wrong iteration of generic error status block
        ACPI / processor: make function acpi_processor_check_duplicates() static
        ACPI / EC: Clean up EC GPE mask flag
        ACPI: EC: Fix possible issues related to EC initialization order
        ACPI / PM: Add debug statements to acpi_pm_notify_handler()
        ACPI: Add debug statements to acpi_global_event_handler()
        ACPI / scan: Enable GPEs before scanning the namespace
        ACPICA: Make it possible to enable runtime GPEs earlier
        ACPICA: Dispatch active GPEs at init time
        ACPI: SPCR: work around clock issue on xgene UART
        ACPI: SPCR: extend XGENE 8250 workaround to m400
        ACPI / LPSS: Don't abort ACPI scan on missing mem resource
        mailbox: pcc: Drop uninformative output during boot
        ACPI/IORT: Add IORT named component memory address limits
        ...
      53ac64aa
    • Linus Torvalds's avatar
      Merge tag 'pm-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 43964409
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "This time (again) cpufreq gets the majority of changes which mostly
        are driver updates (including a major consolidation of intel_pstate),
        some schedutil governor modifications and core cleanups.
      
        There also are some changes in the system suspend area, mostly related
        to diagnostics and debug messages plus some renames of things related
        to suspend-to-idle. One major change here is that suspend-to-idle is
        now going to be preferred over S3 on systems where the ACPI tables
        indicate to do so and provide requsite support (the Low Power Idle S0
        _DSM in particular). The system sleep documentation and the tools
        related to it are updated too.
      
        The rest is a few cpuidle changes (nothing major), devfreq updates,
        generic power domains (genpd) framework updates and a few assorted
        modifications elsewhere.
      
        Specifics:
      
         - Drop the P-state selection algorithm based on a PID controller from
           intel_pstate and make it use the same P-state selection method
           (based on the CPU load) for all types of systems in the active mode
           (Rafael Wysocki, Srinivas Pandruvada).
      
         - Rework the cpufreq core and governors to make it possible to take
           cross-CPU utilization updates into account and modify the schedutil
           governor to actually do so (Viresh Kumar).
      
         - Clean up the handling of transition latency information in the
           cpufreq core and untangle it from the information on which drivers
           cannot do dynamic frequency switching (Viresh Kumar).
      
         - Add support for new SoCs (MT2701/MT7623 and MT7622) to the mediatek
           cpufreq driver and update its DT bindings (Sean Wang).
      
         - Modify the cpufreq dt-platdev driver to autimatically create
           cpufreq devices for the new (v2) Operating Performance Points (OPP)
           DT bindings and update its whitelist of supported systems (Viresh
           Kumar, Shubhrajyoti Datta, Marc Gonzalez, Khiem Nguyen, Finley
           Xiao).
      
         - Add support for Ux500 to the cpufreq-dt driver and drop the
           obsolete dbx500 cpufreq driver (Linus Walleij, Arnd Bergmann).
      
         - Add new SoC (R8A7795) support to the cpufreq rcar driver (Khiem
           Nguyen).
      
         - Fix and clean up assorted issues in the cpufreq drivers and core
           (Arvind Yadav, Christophe Jaillet, Colin Ian King, Gustavo Silva,
           Julia Lawall, Leonard Crestez, Rob Herring, Sudeep Holla).
      
         - Update the IO-wait boost handling in the schedutil governor to make
           it less aggressive (Joel Fernandes).
      
         - Rework system suspend diagnostics to make it print fewer messages
           to the kernel log by default, add a sysfs knob to allow more
           suspend-related messages to be printed and add Low Power S0 Idle
           constraints checks to the ACPI suspend-to-idle code (Rafael
           Wysocki, Srinivas Pandruvada).
      
         - Prefer suspend-to-idle over S3 on ACPI-based systems with the
           ACPI_FADT_LOW_POWER_S0 flag set and the Low Power Idle S0 _DSM
           interface present in the ACPI tables (Rafael Wysocki).
      
         - Update documentation related to system sleep and rename a number of
           items in the code to make it cleare that they are related to
           suspend-to-idle (Rafael Wysocki).
      
         - Export a variable allowing device drivers to check the target
           system sleep state from the core system suspend code (Florian
           Fainelli).
      
         - Clean up the cpuidle subsystem to handle the polling state on x86
           in a more straightforward way and to use %pOF instead of full_name
           (Rafael Wysocki, Rob Herring).
      
         - Update the devfreq framework to fix and clean up a few minor issues
           (Chanwoo Choi, Rob Herring).
      
         - Extend diagnostics in the generic power domains (genpd) framework
           and clean it up slightly (Thara Gopinath, Rob Herring).
      
         - Fix and clean up a couple of issues in the operating performance
           points (OPP) framework (Viresh Kumar, Waldemar Rymarkiewicz).
      
         - Add support for RV1108 to the rockchip-io Adaptive Voltage Scaling
           (AVS) driver (David Wu).
      
         - Fix the usage of notifiers in CPU power management on some
           platforms (Alex Shi).
      
         - Update the pm-graph system suspend/hibernation and boot profiling
           utility (Todd Brandt).
      
         - Make it possible to run the cpupower utility without CPU0 (Prarit
           Bhargava)"
      
      * tag 'pm-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (87 commits)
        cpuidle: Make drivers initialize polling state
        cpuidle: Move polling state initialization code to separate file
        cpuidle: Eliminate the CPUIDLE_DRIVER_STATE_START symbol
        cpufreq: imx6q: Fix imx6sx low frequency support
        cpufreq: speedstep-lib: make several arrays static, makes code smaller
        PM: docs: Delete the obsolete states.txt document
        PM: docs: Describe high-level PM strategies and sleep states
        PM / devfreq: Fix memory leak when fail to register device
        PM / devfreq: Add dependency on PM_OPP
        PM / devfreq: Move private devfreq_update_stats() into devfreq
        PM / devfreq: Convert to using %pOF instead of full_name
        PM / AVS: rockchip-io: add io selectors and supplies for RV1108
        cpufreq: ti: Fix 'of_node_put' being called twice in error handling path
        cpufreq: dt-platdev: Drop few entries from whitelist
        cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2
        ARM: ux500: don't select CPUFREQ_DT
        cpuidle: Convert to using %pOF instead of full_name
        cpufreq: Convert to using %pOF instead of full_name
        PM / Domains: Convert to using %pOF instead of full_name
        cpufreq: Cap the default transition delay value to 10 ms
        ...
      43964409