1. 13 Nov, 2020 29 commits
  2. 12 Nov, 2020 11 commits
    • Linus Torvalds's avatar
      Merge tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · db7c9535
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Current release - regressions:
      
         - arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for
           ENETC
      
        Current release - bugs in new features:
      
         - mptcp: provide rmem[0] limit offset to fix oops
      
        Previous release - regressions:
      
         - IPv6: Set SIT tunnel hard_header_len to zero to fix path MTU
           calculations
      
         - lan743x: correctly handle chips with internal PHY
      
         - bpf: Don't rely on GCC __attribute__((optimize)) to disable GCSE
      
         - mlx5e: Fix VXLAN port table synchronization after function reload
      
        Previous release - always broken:
      
         - bpf: Zero-fill re-used per-cpu map element
      
         - fix out-of-order UDP packets when forwarding with UDP GSO fraglists
           turned on:
             - fix UDP header access on Fast/frag0 UDP GRO
             - fix IP header access and skb lookup on Fast/frag0 UDP GRO
      
         - ethtool: netlink: add missing netdev_features_change() call
      
         - net: Update window_clamp if SOCK_RCVBUF is set
      
         - igc: Fix returning wrong statistics
      
         - ch_ktls: fix multiple leaks and corner cases in Chelsio TLS offload
      
         - tunnels: Fix off-by-one in lower MTU bounds for ICMP/ICMPv6 replies
      
         - r8169: disable hw csum for short packets on all chip versions
      
         - vrf: Fix fast path output packet handling with async Netfilter
           rules"
      
      * tag 'net-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits)
        lan743x: fix use of uninitialized variable
        net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO
        net: udp: fix UDP header access on Fast/frag0 UDP GRO
        devlink: Avoid overwriting port attributes of registered port
        vrf: Fix fast path output packet handling with async Netfilter rules
        cosa: Add missing kfree in error path of cosa_write
        net: switch to the kernel.org patchwork instance
        ch_ktls: stop the txq if reaches threshold
        ch_ktls: tcb update fails sometimes
        ch_ktls/cxgb4: handle partial tag alone SKBs
        ch_ktls: don't free skb before sending FIN
        ch_ktls: packet handling prior to start marker
        ch_ktls: Correction in middle record handling
        ch_ktls: missing handling of header alone
        ch_ktls: Correction in trimmed_len calculation
        cxgb4/ch_ktls: creating skbs causes panic
        ch_ktls: Update cheksum information
        ch_ktls: Correction in finding correct length
        cxgb4/ch_ktls: decrypted bit is not enough
        net/x25: Fix null-ptr-deref in x25_connect
        ...
      db7c9535
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.10-2' of git://git.linux-nfs.org/projects/anna/linux-nfs · 200f9d21
      Linus Torvalds authored
      Pull NFS client bugfixes from Anna Schumaker:
       "Stable fixes:
        - Fix failure to unregister shrinker
      
        Other fixes:
        - Fix unnecessary locking to clear up some contention
        - Fix listxattr receive buffer size
        - Fix default mount options for nfsroot"
      
      * tag 'nfs-for-5.10-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFS: Remove unnecessary inode lock in nfs_fsync_dir()
        NFS: Remove unnecessary inode locking in nfs_llseek_dir()
        NFS: Fix listxattr receive buffer size
        NFSv4.2: fix failure to unregister shrinker
        nfsroot: Default mount option should ask for built-in NFS version
      200f9d21
    • Petr Vorel's avatar
      loop: Fix occasional uevent drop · c01a21b7
      Petr Vorel authored
      Commit 716ad098 ("loop: Switch to set_capacity_revalidate_and_notify")
      causes an occasional drop of loop device uevent, which are no longer
      triggered in loop_set_size() but in a different part of code.
      
      Bug is reproducible with LTP test uevent01 [1]:
      
      i=0; while true; do
          i=$((i+1)); echo "== $i =="
          lsmod |grep -q loop && rmmod -f loop
          ./uevent01 || break
      done
      
      Put back triggering through code called in loop_set_size().
      
      Fix required to add yet another parameter to
      set_capacity_revalidate_and_notify().
      
      [1] https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/uevents/uevent01.c
      
      [hch: rebased on a different change to the prototype of
       set_capacity_revalidate_and_notify]
      
      Cc: stable@vger.kernel.org # v5.9
      Fixes: 716ad098 ("loop: Switch to set_capacity_revalidate_and_notify")
      Reported-by: <ltp@lists.linux.it>
      Signed-off-by: default avatarPetr Vorel <pvorel@suse.cz>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      c01a21b7
    • Christoph Hellwig's avatar
      block: add a return value to set_capacity_revalidate_and_notify · 7e890c37
      Christoph Hellwig authored
      Return if the function ended up sending an uevent or not.
      
      Cc: stable@vger.kernel.org # v5.9
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarPetr Vorel <pvorel@suse.cz>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7e890c37
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · af5043c8
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These are mostly docmentation fixes and janitorial changes plus some
        new device IDs and a new quirk.
      
        Specifics:
      
         - Fix documentation regarding GPIO properties (Andy Shevchenko)
      
         - Fix spelling mistakes in ACPI documentation (Flavio Suligoi)
      
         - Fix white space inconsistencies in ACPI code (Maximilian Luz)
      
         - Fix string formatting in the ACPI Generic Event Device (GED) driver
           (Nick Desaulniers)
      
         - Add Intel Alder Lake device IDs to the ACPI drivers used by the
           Dynamic Platform and Thermal Framework (Srinivas Pandruvada)
      
         - Add lid-related DMI quirk for Medion Akoya E2228T to the ACPI
           button driver (Hans de Goede)"
      
      * tag 'acpi-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: DPTF: Support Alder Lake
        Documentation: ACPI: fix spelling mistakes
        ACPI: button: Add DMI quirk for Medion Akoya E2228T
        ACPI: GED: fix -Wformat
        ACPI: Fix whitespace inconsistencies
        ACPI: scan: Fix acpi_dma_configure_id() kerneldoc name
        Documentation: firmware-guide: gpio-properties: Clarify initial output state
        Documentation: firmware-guide: gpio-properties: active_low only for GpioIo()
        Documentation: firmware-guide: gpio-properties: Fix factual mistakes
      af5043c8
    • Linus Torvalds's avatar
      Merge tag 'pm-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · fcfb6791
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Make the intel_pstate driver behave as expected when it operates in
        the passive mode with HWP enabled and the 'powersave' governor on top
        of it"
      
      * tag 'pm-5.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: intel_pstate: Take CPUFREQ_GOV_STRICT_TARGET into account
        cpufreq: Add strict_target to struct cpufreq_policy
        cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET
        cpufreq: Introduce governor flags
      fcfb6791
    • Sven Van Asbroeck's avatar
      lan743x: fix use of uninitialized variable · edbc2111
      Sven Van Asbroeck authored
      When no devicetree is present, the driver will use an
      uninitialized variable.
      
      Fix by initializing this variable.
      
      Fixes: 902a66e0 ("lan743x: correctly handle chips with internal PHY")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Link: https://lore.kernel.org/r/20201112152513.1941-1-TheSven73@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      edbc2111
    • Jakub Kicinski's avatar
      Merge branch 'net-udp-fix-fast-frag0-udp-gro' · 5861c8cb
      Jakub Kicinski authored
      Alexander Lobakin says:
      
      ====================
      net: udp: fix Fast/frag0 UDP GRO
      
      While testing UDP GSO fraglists forwarding through driver that uses
      Fast GRO (via napi_gro_frags()), I was observing lots of out-of-order
      iperf packets:
      
      [ ID] Interval           Transfer     Bitrate         Jitter
      [SUM]  0.0-40.0 sec  12106 datagrams received out-of-order
      
      Simple switch to napi_gro_receive() or any other method without frag0
      shortcut completely resolved them.
      
      I've found two incorrect header accesses in GRO receive callback(s):
       - udp_hdr() (instead of udp_gro_udphdr()) that always points to junk
         in "fast" mode and could probably do this in "regular".
         This was the actual bug that caused all out-of-order delivers;
       - udp{4,6}_lib_lookup_skb() -> ip{,v6}_hdr() (instead of
         skb_gro_network_header()) that potentionally might return odd
         pointers in both modes.
      
      Each patch addresses one of these two issues.
      
      This doesn't cover a support for nested tunnels as it's out of the
      subject and requires more invasive changes. It will be handled
      separately in net-next series.
      
      Credits:
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Willem de Bruijn <willemb@google.com>
      
      Since v4 [0]:
       - split the fix into two logical ones (Willem);
       - replace ternaries with plain ifs to beautify the code (Jakub);
       - drop p->data part to reintroduce it later in abovementioned set.
      
      Since v3 [1]:
       - restore the original {,__}udp{4,6}_lib_lookup_skb() and use
         private versions of them inside GRO code (Willem).
      
      Since v2 [2]:
       - dropped redundant check introduced in v2 as it's performed right
         before (thanks to Eric);
       - udp_hdr() switched to data + off for skbs from list (also Eric);
       - fixed possible malfunction of {,__}udp{4,6}_lib_lookup_skb() with
         Fast/frag0 due to ip{,v6}_hdr() usage (Willem).
      
      Since v1 [3]:
       - added a NULL pointer check for "uh" as suggested by Willem.
      
      [0] https://lore.kernel.org/netdev/Ha2hou5eJPcblo4abjAqxZRzIl1RaLs2Hy0oOAgFs@cp4-web-036.plabs.ch
      [1] https://lore.kernel.org/netdev/MgZce9htmEtCtHg7pmWxXXfdhmQ6AHrnltXC41zOoo@cp7-web-042.plabs.ch
      [2] https://lore.kernel.org/netdev/0eaG8xtbtKY1dEKCTKUBubGiC9QawGgB3tVZtNqVdY@cp4-web-030.plabs.ch
      [3] https://lore.kernel.org/netdev/YazU6GEzBdpyZMDMwJirxDX7B4sualpDG68ADZYvJI@cp4-web-034.plabs.ch
      ====================
      
      Link: https://lore.kernel.org/r/hjGOh0iCOYyo1FPiZh6TMXcx3YCgNs1T1eGKLrDz8@cp4-web-037.plabs.chSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5861c8cb
    • Alexander Lobakin's avatar
      net: udp: fix IP header access and skb lookup on Fast/frag0 UDP GRO · 55e72988
      Alexander Lobakin authored
      udp{4,6}_lib_lookup_skb() use ip{,v6}_hdr() to get IP header of the
      packet. While it's probably OK for non-frag0 paths, this helpers
      will also point to junk on Fast/frag0 GRO when all headers are
      located in frags. As a result, sk/skb lookup may fail or give wrong
      results. To support both GRO modes, skb_gro_network_header() might
      be used. To not modify original functions, add private versions of
      udp{4,6}_lib_lookup_skb() only to perform correct sk lookups on GRO.
      
      Present since the introduction of "application-level" UDP GRO
      in 4.7-rc1.
      
      Misc: replace totally unneeded ternaries with plain ifs.
      
      Fixes: a6024562 ("udp: Add GRO functions to UDP socket")
      Suggested-by: default avatarWillem de Bruijn <willemb@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarAlexander Lobakin <alobakin@pm.me>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      55e72988
    • Alexander Lobakin's avatar
      net: udp: fix UDP header access on Fast/frag0 UDP GRO · 4b1a8628
      Alexander Lobakin authored
      UDP GRO uses udp_hdr(skb) in its .gro_receive() callback. While it's
      probably OK for non-frag0 paths (when all headers or even the entire
      frame are already in skb head), this inline points to junk when
      using Fast GRO (napi_gro_frags() or napi_gro_receive() with only
      Ethernet header in skb head and all the rest in the frags) and breaks
      GRO packet compilation and the packet flow itself.
      To support both modes, skb_gro_header_fast() + skb_gro_header_slow()
      are typically used. UDP even has an inline helper that makes use of
      them, udp_gro_udphdr(). Use that instead of troublemaking udp_hdr()
      to get rid of the out-of-order delivers.
      
      Present since the introduction of plain UDP GRO in 5.0-rc1.
      
      Fixes: e20cf8d3 ("udp: implement GRO for plain UDP sockets.")
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarAlexander Lobakin <alobakin@pm.me>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4b1a8628
    • Bob Peterson's avatar
      gfs2: Fix case in which ail writes are done to jdata holes · 4e79e3f0
      Bob Peterson authored
      Patch b2a846db ("gfs2: Ignore journal log writes for jdata holes")
      tried (unsuccessfully) to fix a case in which writes were done to jdata
      blocks, the blocks are sent to the ail list, then a punch_hole or truncate
      operation caused the blocks to be freed. In other words, the ail items
      are for jdata holes. Before b2a846db, the jdata hole caused function
      gfs2_block_map to return -EIO, which was eventually interpreted as an
      IO error to the journal, and then withdraw.
      
      This patch changes function gfs2_get_block_noalloc, which is only used
      for jdata writes, so it returns -ENODATA rather than -EIO, and when
      -ENODATA is returned to gfs2_ail1_start_one, the error is ignored.
      We can safely ignore it because gfs2_ail1_start_one is only called
      when the jdata pages have already been written and truncated, so the
      ail1 content no longer applies.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      4e79e3f0