1. 09 9月, 2017 7 次提交
  2. 08 9月, 2017 2 次提交
  3. 07 9月, 2017 13 次提交
    • K
      tipc: remove unnecessary call to dev_net() · 8e0deed9
      Kleber Sacilotto de Souza 提交于
      The net device is already stored in the 'net' variable, so no need to call
      dev_net() again.
      Signed-off-by: NKleber Sacilotto de Souza <kleber.souza@canonical.com>
      Acked-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e0deed9
    • X
      netlink: access nlk groups safely in netlink bind and getname · f7736080
      Xin Long 提交于
      Now there is no lock protecting nlk ngroups/groups' accessing in
      netlink bind and getname. It's safe from nlk groups' setting in
      netlink_release, but not from netlink_realloc_groups called by
      netlink_setsockopt.
      
      netlink_lock_table is needed in both netlink bind and getname when
      accessing nlk groups.
      Acked-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7736080
    • X
      netlink: fix an use-after-free issue for nlk groups · be82485f
      Xin Long 提交于
      ChunYu found a netlink use-after-free issue by syzkaller:
      
      [28448.842981] BUG: KASAN: use-after-free in __nla_put+0x37/0x40 at addr ffff8807185e2378
      [28448.969918] Call Trace:
      [...]
      [28449.117207]  __nla_put+0x37/0x40
      [28449.132027]  nla_put+0xf5/0x130
      [28449.146261]  sk_diag_fill.isra.4.constprop.5+0x5a0/0x750 [netlink_diag]
      [28449.176608]  __netlink_diag_dump+0x25a/0x700 [netlink_diag]
      [28449.202215]  netlink_diag_dump+0x176/0x240 [netlink_diag]
      [28449.226834]  netlink_dump+0x488/0xbb0
      [28449.298014]  __netlink_dump_start+0x4e8/0x760
      [28449.317924]  netlink_diag_handler_dump+0x261/0x340 [netlink_diag]
      [28449.413414]  sock_diag_rcv_msg+0x207/0x390
      [28449.432409]  netlink_rcv_skb+0x149/0x380
      [28449.467647]  sock_diag_rcv+0x2d/0x40
      [28449.484362]  netlink_unicast+0x562/0x7b0
      [28449.564790]  netlink_sendmsg+0xaa8/0xe60
      [28449.661510]  sock_sendmsg+0xcf/0x110
      [28449.865631]  __sys_sendmsg+0xf3/0x240
      [28450.000964]  SyS_sendmsg+0x32/0x50
      [28450.016969]  do_syscall_64+0x25c/0x6c0
      [28450.154439]  entry_SYSCALL64_slow_path+0x25/0x25
      
      It was caused by no protection between nlk groups' free in netlink_release
      and nlk groups' accessing in sk_diag_dump_groups. The similar issue also
      exists in netlink_seq_show().
      
      This patch is to defer nlk groups' free in deferred_put_nlk_sk.
      Reported-by: NChunYu Wang <chunwang@redhat.com>
      Acked-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be82485f
    • G
      sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq · 39ad1297
      Gao Feng 提交于
      The commit 520ac30f ("net_sched: drop packets after root qdisc lock
      is released) made a big change of tc for performance. There are two points
      left in sch_prio and sch_qfq which are not changed with that commit. Now
      enhance them now with __qdisc_drop.
      Signed-off-by: NGao Feng <gfree.wind@vip.163.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39ad1297
    • B
      dt-binding: phy: don't confuse with Ethernet phy properties · 9a94b3a4
      Baruch Siach 提交于
      The generic PHY 'phys' property sometime appears in the same node with
      the Ethernet PHY 'phy' or 'phy-handle' properties. Add a warning in
      phy-bindings.txt to reduce confusion.
      Signed-off-by: NBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a94b3a4
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 80cee03b
      Linus Torvalds 提交于
      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
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · aae3dbb4
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · ec3604c7
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'locks-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · 066dea8c
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'dlm-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm · c7f396f1
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · be6297e9
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'xfs-4.14-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 57915779
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'gfs2-4.14.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 77d0ab60
      Linus Torvalds 提交于
      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
  4. 06 9月, 2017 18 次提交