Skip to content
Permalink
Andy-Shevchenk…
Switch branches/tags

Commits on Aug 13, 2021

  1. ptp_ocp: use bits.h macros for all masks

    Currently we are using BIT(), but GENMASK(). Make use of the latter one
    as well (far less error-prone, far more concise).
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    andy-shev authored and intel-lab-lkp committed Aug 13, 2021
  2. ptp_ocp: Convert to use managed functions pcim_* and devm_*

    This makes the error handling much more simpler than open-coding everything
    and in addition makes the probe function smaller an tidier.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    andy-shev authored and intel-lab-lkp committed Aug 13, 2021
  3. ptp_ocp: Switch to use module_pci_driver() macro

    Eliminate some boilerplate code by using module_pci_driver() instead of
    init/exit, and, if needed, moving the salient bits from init into probe.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    andy-shev authored and intel-lab-lkp committed Aug 13, 2021
  4. Merge tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/netdev/net
    
    Pull networking fixes from Jakub Kicinski:
     "Networking fixes, including fixes from netfilter, bpf, can and
      ieee802154.
    
      The size of this is pretty normal, but we got more fixes for 5.14
      changes this week than last week. Nothing major but the trend is the
      opposite of what we like. We'll see how the next week goes..
    
      Current release - regressions:
    
       - r8169: fix ASPM-related link-up regressions
    
       - bridge: fix flags interpretation for extern learn fdb entries
    
       - phy: micrel: fix link detection on ksz87xx switch
    
       - Revert "tipc: Return the correct errno code"
    
       - ptp: fix possible memory leak caused by invalid cast
    
      Current release - new code bugs:
    
       - bpf: add missing bpf_read_[un]lock_trace() for syscall program
    
       - bpf: fix potentially incorrect results with bpf_get_local_storage()
    
       - page_pool: mask the page->signature before the checking, avoid dma
         mapping leaks
    
       - netfilter: nfnetlink_hook: 5 fixes to information in netlink dumps
    
       - bnxt_en: fix firmware interface issues with PTP
    
       - mlx5: Bridge, fix ageing time
    
      Previous releases - regressions:
    
       - linkwatch: fix failure to restore device state across
         suspend/resume
    
       - bareudp: fix invalid read beyond skb's linear data
    
      Previous releases - always broken:
    
       - bpf: fix integer overflow involving bucket_size
    
       - ppp: fix issues when desired interface name is specified via
         netlink
    
       - wwan: mhi_wwan_ctrl: fix possible deadlock
    
       - dsa: microchip: ksz8795: fix number of VLAN related bugs
    
       - dsa: drivers: fix broken backpressure in .port_fdb_dump
    
       - dsa: qca: ar9331: make proper initial port defaults
    
      Misc:
    
       - bpf: add lockdown check for probe_write_user helper
    
       - netfilter: conntrack: remove offload_pickup sysctl before 5.14 is
         out
    
       - netfilter: conntrack: collect all entries in one cycle,
         heuristically slow down garbage collection scans on idle systems to
         prevent frequent wake ups"
    
    * tag 'net-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (87 commits)
      vsock/virtio: avoid potential deadlock when vsock device remove
      wwan: core: Avoid returning NULL from wwan_create_dev()
      net: dsa: sja1105: unregister the MDIO buses during teardown
      Revert "tipc: Return the correct errno code"
      net: mscc: Fix non-GPL export of regmap APIs
      net: igmp: increase size of mr_ifc_count
      MAINTAINERS: switch to my OMP email for Renesas Ethernet drivers
      tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2B packets
      net: pcs: xpcs: fix error handling on failed to allocate memory
      net: linkwatch: fix failure to restore device state across suspend/resume
      net: bridge: fix memleak in br_add_if()
      net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge
      net: bridge: fix flags interpretation for extern learn fdb entries
      net: dsa: sja1105: fix broken backpressure in .port_fdb_dump
      net: dsa: lantiq: fix broken backpressure in .port_fdb_dump
      net: dsa: lan9303: fix broken backpressure in .port_fdb_dump
      net: dsa: hellcreek: fix broken backpressure in .port_fdb_dump
      bpf, core: Fix kernel-doc notation
      net: igmp: fix data-race in igmp_ifc_timer_expire()
      net: Fix memory leak in ieee802154_raw_deliver
      ...
    torvalds committed Aug 13, 2021
  5. Merge tag 'ceph-for-5.14-rc6' of git://github.com/ceph/ceph-client

    Pull ceph fixes from Ilya Dryomov:
     "A patch to avoid a soft lockup in ceph_check_delayed_caps() from Luis
      and a reference handling fix from Jeff that should address some memory
      corruption reports in the snaprealm area.
    
      Both marked for stable"
    
    * tag 'ceph-for-5.14-rc6' of git://github.com/ceph/ceph-client:
      ceph: take snap_empty_lock atomically with snaprealm refcount change
      ceph: reduce contention in ceph_check_delayed_caps()
    torvalds committed Aug 13, 2021
  6. Merge tag 'drm-fixes-2021-08-13' of git://anongit.freedesktop.org/drm…

    …/drm
    
    Pull drm fixes from Dave Airlie:
     "Another week, another set of pretty regular fixes, nothing really
      stands out too much.
    
      amdgpu:
       - Yellow carp update
       - RAS EEPROM fixes
       - BACO/BOCO fixes
       - Fix a memory leak in an error path
       - Freesync fix
       - VCN harvesting fix
       - Display fixes
    
      i915:
       - GVT fix for Windows VM hang.
       - Display fix of 12 BPC bits for display 12 and newer.
       - Don't try to access some media register for fused off domains.
       - Fix kerneldoc build warnings.
    
      mediatek:
       - Fix dpi bridge bug.
       - Fix cursor plane no update.
    
      meson:
       - Fix colors when booting with HDR"
    
    * tag 'drm-fixes-2021-08-13' of git://anongit.freedesktop.org/drm/drm:
      drm/doc/rfc: drop lmem uapi section
      drm/i915: Only access SFC_DONE when media domain is not fused off
      drm/i915/display: Fix the 12 BPC bits for PIPE_MISC reg
      drm/amd/display: use GFP_ATOMIC in amdgpu_dm_irq_schedule_work
      drm/amd/display: Remove invalid assert for ODM + MPC case
      drm/amd/pm: bug fix for the runtime pm BACO
      drm/amdgpu: handle VCN instances when harvesting (v2)
      drm/meson: fix colour distortion from HDR set during vendor u-boot
      drm/i915/gvt: Fix cached atomics setting for Windows VM
      drm/amdgpu: Add preferred mode in modeset when freesync video mode's enabled.
      drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'
      drm/amdgpu: don't enable baco on boco platforms in runpm
      drm/amdgpu: set RAS EEPROM address from VBIOS
      drm/amd/pm: update smu v13.0.1 firmware header
      drm/mediatek: Fix cursor plane no update
      drm/mediatek: mtk-dpi: Set out_fmt from config if not the last bridge
      drm/mediatek: dpi: Fix NULL dereference in mtk_dpi_bridge_atomic_check
    torvalds committed Aug 13, 2021

Commits on Aug 12, 2021

  1. Merge tag 'drm-misc-fixes-2021-08-12' of git://anongit.freedesktop.or…

    …g/drm/drm-misc into drm-fixes
    
    Short summary of fixes pull:
    
     * meson: Fix colors when booting with HDR
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    From: Thomas Zimmermann <tzimmermann@suse.de>
    Link: https://patchwork.freedesktop.org/patch/msgid/YRTb+qUuBYWjJDVg@linux-uq9g.fritz.box
    airlied committed Aug 12, 2021
  2. Merge tag 'drm-intel-fixes-2021-08-12' of git://anongit.freedesktop.o…

    …rg/drm/drm-intel into drm-fixes
    
    - GVT fix for Windows VM hang.
    - Display fix of 12 BPC bits for display 12 and newer.
    - Don't try to access some media register for fused off domains.
    - Fix kerneldoc build warnings.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    From: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/YRU/hnQ1sNr+j37x@intel.com
    airlied committed Aug 12, 2021
  3. Merge tag 'ieee802154-for-davem-2021-08-12' of git://git.kernel.org/p…

    …ub/scm/linux/kernel/git/sschmidt/wpan
    
    Stefan Schmidt says:
    
    ====================
    ieee802154 for net 2021-08-12
    
    Mostly fixes coming from bot reports. Dongliang Mu tackled some syzkaller
    reports in hwsim again and Takeshi Misawa a memory leak  in  ieee802154 raw.
    
    * tag 'ieee802154-for-davem-2021-08-12' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan:
      net: Fix memory leak in ieee802154_raw_deliver
      ieee802154: hwsim: fix GPF in hwsim_new_edge_nl
      ieee802154: hwsim: fix GPF in hwsim_set_edge_lqi
    ====================
    
    Link: https://lore.kernel.org/r/20210812183912.1663996-1-stefan@datenfreihafen.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Aug 12, 2021
  4. vsock/virtio: avoid potential deadlock when vsock device remove

    There's a potential deadlock case when remove the vsock device or
    process the RESET event:
    
      vsock_for_each_connected_socket:
          spin_lock_bh(&vsock_table_lock) ----------- (1)
          ...
              virtio_vsock_reset_sock:
                  lock_sock(sk) --------------------- (2)
          ...
          spin_unlock_bh(&vsock_table_lock)
    
    lock_sock() may do initiative schedule when the 'sk' is owned by
    other thread at the same time, we would receivce a warning message
    that "scheduling while atomic".
    
    Even worse, if the next task (selected by the scheduler) try to
    release a 'sk', it need to request vsock_table_lock and the deadlock
    occur, cause the system into softlockup state.
      Call trace:
       queued_spin_lock_slowpath
       vsock_remove_bound
       vsock_remove_sock
       virtio_transport_release
       __vsock_release
       vsock_release
       __sock_release
       sock_close
       __fput
       ____fput
    
    So we should not require sk_lock in this case, just like the behavior
    in vhost_vsock or vmci.
    
    Fixes: 0ea9e1d ("VSOCK: Introduce virtio_transport.ko")
    Cc: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
    Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
    Link: https://lore.kernel.org/r/20210812053056.1699-1-longpeng2@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Longpeng(Mike) authored and Jakub Kicinski committed Aug 12, 2021
  5. Merge branch 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/ebiederm/user-namespace
    
    Pull ucounts fix from Eric Biederman:
     "This fixes the ucount sysctls on big endian architectures.
    
      The counts were expanded to be longs instead of ints, and the sysctl
      code was overlooked, so only the low 32bit were being processed. On
      litte endian just processing the low 32bits is fine, but on 64bit big
      endian processing just the low 32bits results in the high order bits
      instead of the low order bits being processed and nothing works
      proper.
    
      This change took a little bit to mature as we have the SYSCTL_ZERO,
      and SYSCTL_INT_MAX macros that are only usable for sysctls operating
      on ints, but unfortunately are not obviously broken. Which resulted in
      the versions of this change working on big endian and not on little
      endian, because the int SYSCTL_ZERO when extended 64bit wound up being
      0x100000000. So we only allowed values greater than 0x100000000 and
      less than 0faff. Which unfortunately broken everything that tried to
      set the sysctls. (First reported with the windows subsystem for
      linux).
    
      I have tested this on x86_64 64bit after first reproducing the
      problems with the earlier version of this change, and then verifying
      the problems do not exist when we use appropriate long min and max
      values for extra1 and extra2"
    
    * 'for-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
      ucounts: add missing data type changes
    torvalds committed Aug 12, 2021
  6. Merge tag 'sound-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/tiwai/sound
    
    Pull sound fixes from Takashi Iwai:
     "This seems to be a usual bump in the middle, containing lots of
      pending ASoC fixes:
    
       - Yet another PCM mmap regression fix
    
       - Fix for ASoC DAPM prefix handling
    
       - Various cs42l42 codec fixes
    
       - PCM buffer reference fixes in a few ASoC drivers
    
       - Fixes for ASoC SOF, AMD, tlv320, WM
    
       - HD-audio quirks"
    
    * tag 'sound-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (32 commits)
      ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PC
      ALSA: pcm: Fix mmap breakage without explicit buffer setup
      ALSA: hda: Add quirk for ASUS Flow x13
      ASoC: cs42l42: Fix mono playback
      ASoC: cs42l42: Constrain sample rate to prevent illegal SCLK
      ASoC: cs42l42: Fix LRCLK frame start edge
      ASoC: cs42l42: PLL must be running when changing MCLK_SRC_SEL
      ASoC: cs42l42: Remove duplicate control for WNF filter frequency
      ASoC: cs42l42: Fix inversion of ADC Notch Switch control
      ASoC: SOF: Intel: hda-ipc: fix reply size checking
      ASoC: SOF: Intel: Kconfig: fix SoundWire dependencies
      ASoC: amd: Fix reference to PCM buffer address
      ASoC: nau8824: Fix open coded prefix handling
      ASoC: kirkwood: Fix reference to PCM buffer address
      ASoC: uniphier: Fix reference to PCM buffer address
      ASoC: xilinx: Fix reference to PCM buffer address
      ASoC: intel: atom: Fix reference to PCM buffer address
      ASoC: cs42l42: Fix bclk calculation for mono
      ASoC: cs42l42: Don't allow SND_SOC_DAIFMT_LEFT_J
      ASoC: cs42l42: Correct definition of ADC Volume control
      ...
    torvalds committed Aug 12, 2021
  7. wwan: core: Avoid returning NULL from wwan_create_dev()

    Make wwan_create_dev() to return either valid or error pointer,
    In some cases it may return NULL. Prevent this by converting
    it to the respective error pointer.
    
    Fixes: 9a44c1c ("net: Add a WWAN subsystem")
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
    Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
    Link: https://lore.kernel.org/r/20210811124845.10955-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    andy-shev authored and Jakub Kicinski committed Aug 12, 2021
  8. drm/doc/rfc: drop lmem uapi section

    We still have quite a bit more work to do with overall reworking of
    the ttm-based dg1 code, but the uapi stuff is now finalized with the
    latest pull. So remove that.
    
    This also fixes kerneldoc build warnings because we've included the
    same headers in two places, resulting in sphinx complaining about
    duplicated symbols. This regression has been created when we moved the
    uapi definitions to the real include/uapi/ folder in 727ecd9
    ("drm/doc/rfc: drop the i915_gem_lmem.h header")
    
    v2: Fix a few references that I missed, the htmldocs build took
    forever.
    
    Acked-by: Jason Ekstrand <jason@jlekstrand.net>
    Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Tested-by Stephen Rothwell <sfr@canb.auug.org.au> (v1)
    References: https://lore.kernel.org/dri-devel/20210603193242.1ce99344@canb.auug.org.au/
    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Fixes: 727ecd9 ("drm/doc/rfc: drop the i915_gem_lmem.h header")
    Cc: Matthew Auld <matthew.auld@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210810142748.1983271-1-daniel.vetter@ffwll.ch
    (cherry picked from commit dae2d28)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    danvet authored and rodrigovivi committed Aug 12, 2021
  9. drm/i915: Only access SFC_DONE when media domain is not fused off

    The SFC_DONE register lives within the corresponding VD0/VD2/VD4/VD6
    forcewake domain and is not accessible if the vdbox in that domain is
    fused off and the forcewake is not initialized.
    
    This mistake went unnoticed because until recently we were using the
    wrong register offset for the SFC_DONE register; once the register
    offset was corrected, we started hitting errors like
    
      <4> [544.989065] i915 0000:cc:00.0: Uninitialized forcewake domain(s) 0x80 accessed at 0x1ce000
    
    on parts with fused-off vdbox engines.
    
    Fixes: e50dbdb ("drm/i915/tgl: Add SFC instdone to error state")
    Fixes: 9c9c6d0 ("drm/i915: Correct SFC_DONE register offset")
    Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
    Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210806174130.1058960-1-matthew.d.roper@intel.com
    Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
    (cherry picked from commit c5589bb)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    [Changed Fixes tag to match the cherry-picked 82929a2]
    mattrope authored and rodrigovivi committed Aug 12, 2021
  10. drm/i915/display: Fix the 12 BPC bits for PIPE_MISC reg

    Till DISPLAY12 the PIPE_MISC bits 5-7 are used to set the
    Dithering BPC, with valid values of 6, 8, 10 BPC.
    For ADLP+ these bits are used to set the PORT OUTPUT BPC, with valid
    values of: 6, 8, 10, 12 BPC, and need to be programmed whether
    dithering is enabled or not.
    
    This patch:
    -corrects the bits 5-7 for PIPE MISC register for 12 BPC.
    -renames the bits and mask to have generic names for these bits for
    dithering bpc and port output bpc.
    
    v3: Added a note for MIPI DSI which uses the PIPE_MISC for readout
    for pipe_bpp. (Uma Shankar)
    
    v2: Added 'display' to the subject and fixes tag. (Uma Shankar)
    
    Fixes: 756f85c ("drm/i915/bdw: Broadwell has PIPEMISC")
    Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> (v1)
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: intel-gfx@lists.freedesktop.org
    Cc: <stable@vger.kernel.org> # v3.13+
    
    Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
    Reviewed-by: Uma Shankar <uma.shankar@intel.com>
    Signed-off-by: Uma Shankar <uma.shankar@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210811051857.109723-1-ankit.k.nautiyal@intel.com
    (cherry picked from commit 70418a6)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    aknautiyal authored and rodrigovivi committed Aug 12, 2021
  11. net: dsa: sja1105: unregister the MDIO buses during teardown

    The call to sja1105_mdiobus_unregister is present in the error path but
    absent from the main driver unbind path.
    
    Fixes: 5a8f097 ("net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vladimiroltean authored and davem330 committed Aug 12, 2021
  12. Revert "tipc: Return the correct errno code"

    This reverts commit 0efea3c because of:
    - The returning -ENOBUF error is fine on socket buffer allocation.
    - There is side effect in the calling path
    tipc_node_xmit()->tipc_link_xmit() when checking error code returning.
    
    Fixes: 0efea3c ("tipc: Return the correct errno code")
    Acked-by: Jon Maloy <jmaloy@redhat.com>
    Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Hoang Le authored and davem330 committed Aug 12, 2021
  13. net: mscc: Fix non-GPL export of regmap APIs

    The ocelot driver makes use of regmap, wrapping it with driver specific
    operations that are thin wrappers around the core regmap APIs. These are
    exported with EXPORT_SYMBOL, dropping the _GPL from the core regmap
    exports which is frowned upon. Add _GPL suffixes to at least the APIs that
    are doing register I/O.
    
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    broonie authored and davem330 committed Aug 12, 2021
  14. Merge tag 'orphans-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/kees/linux
    
    Pull orphan section linker fix from Kees Cook:
    
     - Handle changes to Clang's Sanitizer section layout (Nathan
       Chancellor)
    
    * tag 'orphans-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
      vmlinux.lds.h: Handle clang's module.{c,d}tor sections
    torvalds committed Aug 12, 2021
  15. Merge tag 'seccomp-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/kees/linux
    
    Pull seccomp fixes from Kees Cook:
    
     - Fix typo in user notification documentation (Rodrigo Campos)
    
     - Fix userspace counter report when using TSYNC (Hsuan-Chi Kuo, Wiktor
       Garbacz)
    
    * tag 'seccomp-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
      seccomp: Fix setting loaded filter count during TSYNC
      Documentation: seccomp: Fix typo in user notification
    torvalds committed Aug 12, 2021
  16. Merge tag 'amd-drm-fixes-5.14-2021-08-11' of https://gitlab.freedeskt…

    …op.org/agd5f/linux into drm-fixes
    
    amd-drm-fixes-5.14-2021-08-11:
    
    amdgpu:
    - Yellow carp update
    - RAS EEPROM fixes
    - BACO/BOCO fixes
    - Fix a memory leak in an error path
    - Freesync fix
    - VCN harvesting fix
    - Display fixes
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    From: Alex Deucher <alexander.deucher@amd.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210812022153.4005-1-alexander.deucher@amd.com
    airlied committed Aug 12, 2021

Commits on Aug 11, 2021

  1. net: igmp: increase size of mr_ifc_count

    Some arches support cmpxchg() on 4-byte and 8-byte only.
    Increase mr_ifc_count width to 32bit to fix this problem.
    
    Fixes: 4a2b285 ("net: igmp: fix data-race in igmp_ifc_timer_expire()")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: Guenter Roeck <linux@roeck-us.net>
    Link: https://lore.kernel.org/r/20210811195715.3684218-1-eric.dumazet@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    neebe000 authored and Jakub Kicinski committed Aug 11, 2021
  2. MAINTAINERS: switch to my OMP email for Renesas Ethernet drivers

    I'm still going to continue looking after the Renesas Ethernet drivers and
    device tree bindings. Now my new employer, Open Mobile Platform (OMP), will
    pay for all my upstream work. Let's switch to my OMP email for the reviews.
    
    Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    Link: https://lore.kernel.org/r/9c212711-a0d7-39cd-7840-ff7abf938da1@omp.ru
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Sergey Shtylyov authored and Jakub Kicinski committed Aug 11, 2021
  3. tcp_bbr: fix u32 wrap bug in round logic if bbr_init() called after 2…

    …B packets
    
    Currently if BBR congestion control is initialized after more than 2B
    packets have been delivered, depending on the phase of the
    tp->delivered counter the tracking of BBR round trips can get stuck.
    
    The bug arises because if tp->delivered is between 2^31 and 2^32 at
    the time the BBR congestion control module is initialized, then the
    initialization of bbr->next_rtt_delivered to 0 will cause the logic to
    believe that the end of the round trip is still billions of packets in
    the future. More specifically, the following check will fail
    repeatedly:
    
      !before(rs->prior_delivered, bbr->next_rtt_delivered)
    
    and thus the connection will take up to 2B packets delivered before
    that check will pass and the connection will set:
    
      bbr->round_start = 1;
    
    This could cause many mechanisms in BBR to fail to trigger, for
    example bbr_check_full_bw_reached() would likely never exit STARTUP.
    
    This bug is 5 years old and has not been observed, and as a practical
    matter this would likely rarely trigger, since it would require
    transferring at least 2B packets, or likely more than 3 terabytes of
    data, before switching congestion control algorithms to BBR.
    
    This patch is a stable candidate for kernels as far back as v4.9,
    when tcp_bbr.c was added.
    
    Fixes: 0f8782e ("tcp_bbr: add BBR congestion control")
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Reviewed-by: Yuchung Cheng <ycheng@google.com>
    Reviewed-by: Kevin Yang <yyd@google.com>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/20210811024056.235161-1-ncardwell@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    nealcardwell authored and Jakub Kicinski committed Aug 11, 2021
  4. net: pcs: xpcs: fix error handling on failed to allocate memory

    Drivers such as sja1105 and stmmac that call xpcs_create() expects an
    error returned by the pcs-xpcs module, but this was not the case on
    failed to allocate memory.
    
    Fixed this by returning an -ENOMEM instead of a NULL pointer.
    
    Fixes: 3ad1d17 ("net: dsa: sja1105: migrate to xpcs for SGMII")
    Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Link: https://lore.kernel.org/r/20210810085812.1808466-1-vee.khee.wong@linux.intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    wvk86 authored and Jakub Kicinski committed Aug 11, 2021
  5. net: linkwatch: fix failure to restore device state across suspend/re…

    …sume
    
    After migrating my laptop from 4.19-LTS to 5.4-LTS a while ago I noticed
    that my Ethernet port to which a bond and a VLAN interface are attached
    appeared to remain up after resuming from suspend with the cable unplugged
    (and that problem still persists with 5.10-LTS).
    
    It happens that the following happens:
    
      - the network driver (e1000e here) prepares to suspend, calls e1000e_down()
        which calls netif_carrier_off() to signal that the link is going down.
      - netif_carrier_off() adds a link_watch event to the list of events for
        this device
      - the device is completely stopped.
      - the machine suspends
      - the cable is unplugged and the machine brought to another location
      - the machine is resumed
      - the queued linkwatch events are processed for the device
      - the device doesn't yet have the __LINK_STATE_PRESENT bit and its events
        are silently dropped
      - the device is resumed with its link down
      - the upper VLAN and bond interfaces are never notified that the link had
        been turned down and remain up
      - the only way to provoke a change is to physically connect the machine
        to a port and possibly unplug it.
    
    The state after resume looks like this:
      $ ip -br li | egrep 'bond|eth'
      bond0            UP             e8:6a:64:64:64:64 <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP>
      eth0             DOWN           e8:6a:64:64:64:64 <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP>
      eth0.2@eth0      UP             e8:6a:64:64:64:64 <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP>
    
    Placing an explicit call to netdev_state_change() either in the suspend
    or the resume code in the NIC driver worked around this but the solution
    is not satisfying.
    
    The issue in fact really is in link_watch that loses events while it
    ought not to. It happens that the test for the device being present was
    added by commit 124eee3 ("net: linkwatch: add check for netdevice
    being present to linkwatch_do_dev") in 4.20 to avoid an access to
    devices that are not present.
    
    Instead of dropping events, this patch proceeds slightly differently by
    postponing their handling so that they happen after the device is fully
    resumed.
    
    Fixes: 124eee3 ("net: linkwatch: add check for netdevice being present to linkwatch_do_dev")
    Link: https://lists.openwall.net/netdev/2018/03/15/62
    Cc: Heiner Kallweit <hkallweit1@gmail.com>
    Cc: Geert Uytterhoeven <geert+renesas@glider.be>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Willy Tarreau <w@1wt.eu>
    Link: https://lore.kernel.org/r/20210809160628.22623-1-w@1wt.eu
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    wtarreau authored and Jakub Kicinski committed Aug 11, 2021
  6. vmlinux.lds.h: Handle clang's module.{c,d}tor sections

    A recent change in LLVM causes module_{c,d}tor sections to appear when
    CONFIG_K{A,C}SAN are enabled, which results in orphan section warnings
    because these are not handled anywhere:
    
    ld.lld: warning: arch/x86/pci/built-in.a(legacy.o):(.text.asan.module_ctor) is being placed in '.text.asan.module_ctor'
    ld.lld: warning: arch/x86/pci/built-in.a(legacy.o):(.text.asan.module_dtor) is being placed in '.text.asan.module_dtor'
    ld.lld: warning: arch/x86/pci/built-in.a(legacy.o):(.text.tsan.module_ctor) is being placed in '.text.tsan.module_ctor'
    
    Fangrui explains: "the function asan.module_ctor has the SHF_GNU_RETAIN
    flag, so it is in a separate section even with -fno-function-sections
    (default)".
    
    Place them in the TEXT_TEXT section so that these technologies continue
    to work with the newer compiler versions. All of the KASAN and KCSAN
    KUnit tests continue to pass after this change.
    
    Cc: stable@vger.kernel.org
    Link: ClangBuiltLinux#1432
    Link: llvm/llvm-project@7b78956
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
    Reviewed-by: Fangrui Song <maskray@google.com>
    Acked-by: Marco Elver <elver@google.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20210731023107.1932981-1-nathan@kernel.org
    nathanchance authored and kees committed Aug 11, 2021
  7. seccomp: Fix setting loaded filter count during TSYNC

    The desired behavior is to set the caller's filter count to thread's.
    This value is reported via /proc, so this fixes the inaccurate count
    exposed to userspace; it is not used for reference counting, etc.
    
    Signed-off-by: Hsuan-Chi Kuo <hsuanchikuo@gmail.com>
    Link: https://lore.kernel.org/r/20210304233708.420597-1-hsuanchikuo@gmail.com
    Co-developed-by: Wiktor Garbacz <wiktorg@google.com>
    Signed-off-by: Wiktor Garbacz <wiktorg@google.com>
    Link: https://lore.kernel.org/lkml/20210810125158.329849-1-wiktorg@google.com
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Cc: stable@vger.kernel.org
    Fixes: c818c03 ("seccomp: Report number of loaded filters in /proc/$pid/status")
    hckuo authored and kees committed Aug 11, 2021
  8. Merge tag 'mediatek-drm-fixes-5.14' of https://git.kernel.org/pub/scm…

    …/linux/kernel/git/chunkuang.hu/linux into drm-fixes
    
    Mediatek DRM Fixes for Linux 5.14
    
    1. Fix dpi bridge bug.
    2. Fix cursor plane no update.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210809150604.32426-1-chunkuang.hu@kernel.org
    airlied committed Aug 11, 2021
  9. Merge tag 'arc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/vgupta/arc
    
    Pull ARC fixes from Vineet Gupta:
    
     - Fix FPU_STATUS update
    
     - Update my email address
    
     - Other spellos and fixes
    
    * tag 'arc-5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
      MAINTAINERS: update Vineet's email address
      ARC: fp: set FPU_STATUS.FWE to enable FPU_STATUS update on context switch
      ARC: Fix CONFIG_STACKDEPOT
      arc: Fix spelling mistake and grammar in Kconfig
      arc: Prefer unsigned int to bare use of unsigned
    torvalds committed Aug 11, 2021

Commits on Aug 10, 2021

  1. net: bridge: fix memleak in br_add_if()

    I got a memleak report:
    
    BUG: memory leak
    unreferenced object 0x607ee521a658 (size 240):
    comm "syz-executor.0", pid 955, jiffies 4294780569 (age 16.449s)
    hex dump (first 32 bytes, cpu 1):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [<00000000d830ea5a>] br_multicast_add_port+0x1c2/0x300 net/bridge/br_multicast.c:1693
    [<00000000274d9a71>] new_nbp net/bridge/br_if.c:435 [inline]
    [<00000000274d9a71>] br_add_if+0x670/0x1740 net/bridge/br_if.c:611
    [<0000000012ce888e>] do_set_master net/core/rtnetlink.c:2513 [inline]
    [<0000000012ce888e>] do_set_master+0x1aa/0x210 net/core/rtnetlink.c:2487
    [<0000000099d1cafc>] __rtnl_newlink+0x1095/0x13e0 net/core/rtnetlink.c:3457
    [<00000000a01facc0>] rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3488
    [<00000000acc9186c>] rtnetlink_rcv_msg+0x369/0xa10 net/core/rtnetlink.c:5550
    [<00000000d4aabb9c>] netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2504
    [<00000000bc2e12a3>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
    [<00000000bc2e12a3>] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1340
    [<00000000e4dc2d0e>] netlink_sendmsg+0x789/0xc70 net/netlink/af_netlink.c:1929
    [<000000000d22c8b3>] sock_sendmsg_nosec net/socket.c:654 [inline]
    [<000000000d22c8b3>] sock_sendmsg+0x139/0x170 net/socket.c:674
    [<00000000e281417a>] ____sys_sendmsg+0x658/0x7d0 net/socket.c:2350
    [<00000000237aa2ab>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2404
    [<000000004f2dc381>] __sys_sendmsg+0xd3/0x190 net/socket.c:2433
    [<0000000005feca6c>] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:47
    [<000000007304477d>] entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    On error path of br_add_if(), p->mcast_stats allocated in
    new_nbp() need be freed, or it will be leaked.
    
    Fixes: 1080ab9 ("net: bridge: add support for IGMP/MLD stats and export them via netlink")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
    Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Link: https://lore.kernel.org/r/20210809132023.978546-1-yangyingliang@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Yang Yingliang authored and Jakub Kicinski committed Aug 10, 2021
  2. net: switchdev: zero-initialize struct switchdev_notifier_fdb_info em…

    …itted by drivers towards the bridge
    
    The blamed commit added a new field to struct switchdev_notifier_fdb_info,
    but did not make sure that all call paths set it to something valid.
    For example, a switchdev driver may emit a SWITCHDEV_FDB_ADD_TO_BRIDGE
    notifier, and since the 'is_local' flag is not set, it contains junk
    from the stack, so the bridge might interpret those notifications as
    being for local FDB entries when that was not intended.
    
    To avoid that now and in the future, zero-initialize all
    switchdev_notifier_fdb_info structures created by drivers such that all
    newly added fields to not need to touch drivers again.
    
    Fixes: 2c4eca3 ("net: bridge: switchdev: include local flag in FDB notifications")
    Reported-by: Ido Schimmel <idosch@idosch.org>
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Tested-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
    Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
    Link: https://lore.kernel.org/r/20210810115024.1629983-1-vladimir.oltean@nxp.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    vladimiroltean authored and Jakub Kicinski committed Aug 10, 2021
  3. net: bridge: fix flags interpretation for extern learn fdb entries

    Ignore fdb flags when adding port extern learn entries and always set
    BR_FDB_LOCAL flag when adding bridge extern learn entries. This is
    closest to the behaviour we had before and avoids breaking any use cases
    which were allowed.
    
    This patch fixes iproute2 calls which assume NUD_PERMANENT and were
    allowed before, example:
    $ bridge fdb add 00:11:22:33:44:55 dev swp1 extern_learn
    
    Extern learn entries are allowed to roam, but do not expire, so static
    or dynamic flags make no sense for them.
    
    Also add a comment for future reference.
    
    Fixes: eb100e0 ("net: bridge: allow to add externally learned entries from user-space")
    Fixes: 0541a62 ("net: bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry")
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Tested-by: Ido Schimmel <idosch@nvidia.com>
    Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Link: https://lore.kernel.org/r/20210810110010.43859-1-razor@blackwall.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Nikolay Aleksandrov authored and Jakub Kicinski committed Aug 10, 2021
  4. Merge tag 'platform-drivers-x86-v5.14-3' of git://git.kernel.org/pub/…

    …scm/linux/kernel/git/pdx86/platform-drivers-x86
    
    Pull x86 platform driver fixes from Hans de Goede:
     "Small set of pdx86 fixes for 5.14"
    
    * tag 'platform-drivers-x86-v5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
      platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables
      platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust
      platform/x86: Add and use a dual_accel_detect() helper
    torvalds committed Aug 10, 2021
Older