1. 30 Oct, 2019 16 commits
  2. 25 Oct, 2019 2 commits
  3. 21 Oct, 2019 2 commits
  4. 20 Oct, 2019 6 commits
  5. 19 Oct, 2019 14 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 531e93d1
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "I was battling a cold after some recent trips, so quite a bit piled up
        meanwhile, sorry about that.
      
        Highlights:
      
         1) Fix fd leak in various bpf selftests, from Brian Vazquez.
      
         2) Fix crash in xsk when device doesn't support some methods, from
            Magnus Karlsson.
      
         3) Fix various leaks and use-after-free in rxrpc, from David Howells.
      
         4) Fix several SKB leaks due to confusion of who owns an SKB and who
            should release it in the llc code. From Eric Biggers.
      
         5) Kill a bunc of KCSAN warnings in TCP, from Eric Dumazet.
      
         6) Jumbo packets don't work after resume on r8169, as the BIOS resets
            the chip into non-jumbo mode during suspend. From Heiner Kallweit.
      
         7) Corrupt L2 header during MPLS push, from Davide Caratti.
      
         8) Prevent possible infinite loop in tc_ctl_action, from Eric
            Dumazet.
      
         9) Get register bits right in bcmgenet driver, based upon chip
            version. From Florian Fainelli.
      
        10) Fix mutex problems in microchip DSA driver, from Marek Vasut.
      
        11) Cure race between route lookup and invalidation in ipv4, from Wei
            Wang.
      
        12) Fix performance regression due to false sharing in 'net'
            structure, from Eric Dumazet"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (145 commits)
        net: reorder 'struct net' fields to avoid false sharing
        net: dsa: fix switch tree list
        net: ethernet: dwmac-sun8i: show message only when switching to promisc
        net: aquantia: add an error handling in aq_nic_set_multicast_list
        net: netem: correct the parent's backlog when corrupted packet was dropped
        net: netem: fix error path for corrupted GSO frames
        macb: propagate errors when getting optional clocks
        xen/netback: fix error path of xenvif_connect_data()
        net: hns3: fix mis-counting IRQ vector numbers issue
        net: usb: lan78xx: Connect PHY before registering MAC
        vsock/virtio: discard packets if credit is not respected
        vsock/virtio: send a credit update when buffer size is changed
        mlxsw: spectrum_trap: Push Ethernet header before reporting trap
        net: ensure correct skb->tstamp in various fragmenters
        net: bcmgenet: reset 40nm EPHY on energy detect
        net: bcmgenet: soft reset 40nm EPHYs before MAC init
        net: phy: bcm7xxx: define soft_reset for 40nm EPHY
        net: bcmgenet: don't set phydev->link from MAC
        net: Update address for MediaTek ethernet driver in MAINTAINERS
        ipv4: fix race condition between route lookup and invalidation
        ...
      531e93d1
    • Eric Dumazet's avatar
      net: reorder 'struct net' fields to avoid false sharing · 2a06b898
      Eric Dumazet authored
      Intel test robot reported a ~7% regression on TCP_CRR tests
      that they bisected to the cited commit.
      
      Indeed, every time a new TCP socket is created or deleted,
      the atomic counter net->count is touched (via get_net(net)
      and put_net(net) calls)
      
      So cpus might have to reload a contended cache line in
      net_hash_mix(net) calls.
      
      We need to reorder 'struct net' fields to move @hash_mix
      in a read mostly cache line.
      
      We move in the first cache line fields that can be
      dirtied often.
      
      We probably will have to address in a followup patch
      the __randomize_layout that was added in linux-4.13,
      since this might break our placement choices.
      
      Fixes: 355b9855 ("netns: provide pure entropy for net_hash_mix()")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a06b898
    • Vivien Didelot's avatar
      net: dsa: fix switch tree list · 50c7d2ba
      Vivien Didelot authored
      If there are multiple switch trees on the device, only the last one
      will be listed, because the arguments of list_add_tail are swapped.
      
      Fixes: 83c0afae ("net: dsa: Add new binding implementation")
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50c7d2ba
    • Mans Rullgard's avatar
      net: ethernet: dwmac-sun8i: show message only when switching to promisc · 05908d72
      Mans Rullgard authored
      Printing the info message every time more than the max number of mac
      addresses are requested generates unnecessary log spam.  Showing it only
      when the hw is not already in promiscous mode is equally informative
      without being annoying.
      Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05908d72
    • Chenwandun's avatar
      net: aquantia: add an error handling in aq_nic_set_multicast_list · 3d00cf2f
      Chenwandun authored
      add an error handling in aq_nic_set_multicast_list, it may not
      work when hw_multicast_list_set error; and at the same time
      it will remove gcc Wunused-but-set-variable warning.
      Signed-off-by: default avatarChenwandun <chenwandun@huawei.com>
      Reviewed-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d00cf2f
    • David S. Miller's avatar
      Merge branch 'netem-fix-further-issues-with-packet-corruption' · 70873837
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      net: netem: fix further issues with packet corruption
      
      This set is fixing two more issues with the netem packet corruption.
      
      First patch (which was previously posted) avoids NULL pointer dereference
      if the first frame gets freed due to allocation or checksum failure.
      v2 improves the clarity of the code a little as requested by Cong.
      
      Second patch ensures we don't return SUCCESS if the frame was in fact
      dropped. Thanks to this commit message for patch 1 no longer needs the
      "this will still break with a single-frame failure" disclaimer.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70873837
    • Jakub Kicinski's avatar
      net: netem: correct the parent's backlog when corrupted packet was dropped · e0ad032e
      Jakub Kicinski authored
      If packet corruption failed we jump to finish_segs and return
      NET_XMIT_SUCCESS. Seeing success will make the parent qdisc
      increment its backlog, that's incorrect - we need to return
      NET_XMIT_DROP.
      
      Fixes: 6071bd1a ("netem: Segment GSO packets on enqueue")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0ad032e
    • Jakub Kicinski's avatar
      net: netem: fix error path for corrupted GSO frames · a7fa12d1
      Jakub Kicinski authored
      To corrupt a GSO frame we first perform segmentation.  We then
      proceed using the first segment instead of the full GSO skb and
      requeue the rest of the segments as separate packets.
      
      If there are any issues with processing the first segment we
      still want to process the rest, therefore we jump to the
      finish_segs label.
      
      Commit 177b8007 ("net: netem: fix backlog accounting for
      corrupted GSO frames") started using the pointer to the first
      segment in the "rest of segments processing", but as mentioned
      above the first segment may had already been freed at this point.
      
      Backlog corrections for parent qdiscs have to be adjusted.
      
      Fixes: 177b8007 ("net: netem: fix backlog accounting for corrupted GSO frames")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reported-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7fa12d1
    • Michael Tretter's avatar
      macb: propagate errors when getting optional clocks · bd310aca
      Michael Tretter authored
      The tx_clk, rx_clk, and tsu_clk are optional. Currently the macb driver
      marks clock as not available if it receives an error when trying to get
      a clock. This is wrong, because a clock controller might return
      -EPROBE_DEFER if a clock is not available, but will eventually become
      available.
      
      In these cases, the driver would probe successfully but will never be
      able to adjust the clocks, because the clocks were not available during
      probe, but became available later.
      
      For example, the clock controller for the ZynqMP is implemented in the
      PMU firmware and the clocks are only available after the firmware driver
      has been probed.
      
      Use devm_clk_get_optional() in instead of devm_clk_get() to get the
      optional clock and propagate all errors to the calling function.
      Signed-off-by: default avatarMichael Tretter <m.tretter@pengutronix.de>
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Tested-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd310aca
    • Juergen Gross's avatar
      xen/netback: fix error path of xenvif_connect_data() · 3d5c1a03
      Juergen Gross authored
      xenvif_connect_data() calls module_put() in case of error. This is
      wrong as there is no related module_get().
      
      Remove the superfluous module_put().
      
      Fixes: 279f438e ("xen-netback: Don't destroy the netdev until the vif is shut down")
      Cc: <stable@vger.kernel.org> # 3.12
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      Reviewed-by: default avatarWei Liu <wei.liu@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d5c1a03
    • Yonglong Liu's avatar
      net: hns3: fix mis-counting IRQ vector numbers issue · 580a05f9
      Yonglong Liu authored
      Currently, the num_msi_left means the vector numbers of NIC,
      but if the PF supported RoCE, it contains the vector numbers
      of NIC and RoCE(Not expected).
      
      This may cause interrupts lost in some case, because of the
      NIC module used the vector resources which belongs to RoCE.
      
      This patch adds a new variable num_nic_msi to store the vector
      numbers of NIC, and adjust the default TQP numbers and rss_size
      according to the value of num_nic_msi.
      
      Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
      Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
      Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      580a05f9
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 998d7551
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "Rather a lot of fixes, almost all affecting mm/"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (26 commits)
        scripts/gdb: fix debugging modules on s390
        kernel/events/uprobes.c: only do FOLL_SPLIT_PMD for uprobe register
        mm/thp: allow dropping THP from page cache
        mm/vmscan.c: support removing arbitrary sized pages from mapping
        mm/thp: fix node page state in split_huge_page_to_list()
        proc/meminfo: fix output alignment
        mm/init-mm.c: include <linux/mman.h> for vm_committed_as_batch
        mm/filemap.c: include <linux/ramfs.h> for generic_file_vm_ops definition
        mm: include <linux/huge_mm.h> for is_vma_temporary_stack
        zram: fix race between backing_dev_show and backing_dev_store
        mm/memcontrol: update lruvec counters in mem_cgroup_move_account
        ocfs2: fix panic due to ocfs2_wq is null
        hugetlbfs: don't access uninitialized memmaps in pfn_range_valid_gigantic()
        mm: memblock: do not enforce current limit for memblock_phys* family
        mm: memcg: get number of pages on the LRU list in memcgroup base on lru_zone_size
        mm/gup: fix a misnamed "write" argument, and a related bug
        mm/gup_benchmark: add a missing "w" to getopt string
        ocfs2: fix error handling in ocfs2_setattr()
        mm: memcg/slab: fix panic in __free_slab() caused by premature memcg pointer release
        mm/memunmap: don't access uninitialized memmap in memunmap_pages()
        ...
      998d7551
    • Ilya Leoshkevich's avatar
      scripts/gdb: fix debugging modules on s390 · 585d730d
      Ilya Leoshkevich authored
      Currently lx-symbols assumes that module text is always located at
      module->core_layout->base, but s390 uses the following layout:
      
        +------+  <- module->core_layout->base
        | GOT  |
        +------+  <- module->core_layout->base + module->arch->plt_offset
        | PLT  |
        +------+  <- module->core_layout->base + module->arch->plt_offset +
        | TEXT |     module->arch->plt_size
        +------+
      
      Therefore, when trying to debug modules on s390, all the symbol
      addresses are skewed by plt_offset + plt_size.
      
      Fix by adding plt_offset + plt_size to module_addr in
      load_module_symbols().
      
      Link: http://lkml.kernel.org/r/20191017085917.81791-1-iii@linux.ibm.comSigned-off-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
      Reviewed-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Cc: Kieran Bingham <kbingham@kernel.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      585d730d
    • Song Liu's avatar
      kernel/events/uprobes.c: only do FOLL_SPLIT_PMD for uprobe register · aa5de305
      Song Liu authored
      Attaching uprobe to text section in THP splits the PMD mapped page table
      into PTE mapped entries.  On uprobe detach, we would like to regroup PMD
      mapped page table entry to regain performance benefit of THP.
      
      However, the regroup is broken For perf_event based trace_uprobe.  This
      is because perf_event based trace_uprobe calls uprobe_unregister twice
      on close: first in TRACE_REG_PERF_CLOSE, then in
      TRACE_REG_PERF_UNREGISTER.  The second call will split the PMD mapped
      page table entry, which is not the desired behavior.
      
      Fix this by only use FOLL_SPLIT_PMD for uprobe register case.
      
      Add a WARN() to confirm uprobe unregister never work on huge pages, and
      abort the operation when this WARN() triggers.
      
      Link: http://lkml.kernel.org/r/20191017164223.2762148-6-songliubraving@fb.com
      Fixes: 5a52c9df ("uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT")
      Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
      Reviewed-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
      Cc: William Kucharski <william.kucharski@oracle.com>
      Cc: Yang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aa5de305