1. 16 5月, 2022 3 次提交
  2. 13 5月, 2022 7 次提交
    • L
      Merge tag 'net-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · f3f19f93
      Linus Torvalds 提交于
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from wireless, and bluetooth.
      
        No outstanding fires.
      
        Current release - regressions:
      
         - eth: atlantic: always deep reset on pm op, fix null-deref
      
        Current release - new code bugs:
      
         - rds: use maybe_get_net() when acquiring refcount on TCP sockets
           [refinement of a previous fix]
      
         - eth: ocelot: mark traps with a bool instead of guessing type based
           on list membership
      
        Previous releases - regressions:
      
         - net: fix skipping features in for_each_netdev_feature()
      
         - phy: micrel: fix null-derefs on suspend/resume and probe
      
         - bcmgenet: check for Wake-on-LAN interrupt probe deferral
      
        Previous releases - always broken:
      
         - ipv4: drop dst in multicast routing path, prevent leaks
      
         - ping: fix address binding wrt vrf
      
         - net: fix wrong network header length when BPF protocol translation
           is used on skbs with a fraglist
      
         - bluetooth: fix the creation of hdev->name
      
         - rfkill: uapi: fix RFKILL_IOCTL_MAX_SIZE ioctl request definition
      
         - wifi: iwlwifi: iwl-dbg: use del_timer_sync() before freeing
      
         - wifi: ath11k: reduce the wait time of 11d scan and hw scan while
           adding an interface
      
         - mac80211: fix rx reordering with non explicit / psmp ack policy
      
         - mac80211: reset MBSSID parameters upon connection
      
         - nl80211: fix races in nl80211_set_tx_bitrate_mask()
      
         - tls: fix context leak on tls_device_down
      
         - sched: act_pedit: really ensure the skb is writable
      
         - batman-adv: don't skb_split skbuffs with frag_list
      
         - eth: ocelot: fix various issues with TC actions (null-deref; bad
           stats; ineffective drops; ineffective filter removal)"
      
      * tag 'net-5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (61 commits)
        tls: Fix context leak on tls_device_down
        net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe()
        net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending
        net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down()
        mlxsw: Avoid warning during ip6gre device removal
        net: bcmgenet: Check for Wake-on-LAN interrupt probe deferral
        net: ethernet: mediatek: ppe: fix wrong size passed to memset()
        Bluetooth: Fix the creation of hdev->name
        i40e: i40e_main: fix a missing check on list iterator
        net/sched: act_pedit: really ensure the skb is writable
        s390/lcs: fix variable dereferenced before check
        s390/ctcm: fix potential memory leak
        s390/ctcm: fix variable dereferenced before check
        net: atlantic: verify hw_head_ lies within TX buffer ring
        net: atlantic: add check for MAX_SKB_FRAGS
        net: atlantic: reduce scope of is_rsc_complete
        net: atlantic: fix "frag[0] not initialized"
        net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
        net: phy: micrel: Fix incorrect variable type in micrel
        decnet: Use container_of() for struct dn_neigh casts
        ...
      f3f19f93
    • L
      Merge branch 'for-5.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 0ac824f3
      Linus Torvalds 提交于
      Pull cgroup fix from Tejun Heo:
       "Waiman's fix for a cgroup2 cpuset bug where it could miss nodes which
        were hot-added"
      
      * 'for-5.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp()
      0ac824f3
    • L
      Merge tag 'fixes_for_v5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · c37dba6a
      Linus Torvalds 提交于
      Pull fs fixes from Jan Kara:
       "Three fixes that I'd still like to get to 5.18:
      
         - add a missing sanity check in the fanotify FAN_RENAME feature
           (added in 5.17, let's fix it before it gets wider usage in
           userspace)
      
         - udf fix for recently introduced filesystem corruption issue
      
         - writeback fix for a race in inode list handling that can lead to
           delayed writeback and possible dirty throttling stalls"
      
      * tag 'fixes_for_v5.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Avoid using stale lengthOfImpUse
        writeback: Avoid skipping inode writeback
        fanotify: do not allow setting dirent events in mask of non-dir
      c37dba6a
    • M
      tls: Fix context leak on tls_device_down · 3740651b
      Maxim Mikityanskiy 提交于
      The commit cited below claims to fix a use-after-free condition after
      tls_device_down. Apparently, the description wasn't fully accurate. The
      context stayed alive, but ctx->netdev became NULL, and the offload was
      torn down without a proper fallback, so a bug was present, but a
      different kind of bug.
      
      Due to misunderstanding of the issue, the original patch dropped the
      refcount_dec_and_test line for the context to avoid the alleged
      premature deallocation. That line has to be restored, because it matches
      the refcount_inc_not_zero from the same function, otherwise the contexts
      that survived tls_device_down are leaked.
      
      This patch fixes the described issue by restoring refcount_dec_and_test.
      After this change, there is no leak anymore, and the fallback to
      software kTLS still works.
      
      Fixes: c55dcdd4 ("net/tls: Fix use-after-free after the TLS device goes down and up")
      Signed-off-by: NMaxim Mikityanskiy <maximmi@nvidia.com>
      Reviewed-by: NTariq Toukan <tariqt@nvidia.com>
      Link: https://lore.kernel.org/r/20220512091830.678684-1-maximmi@nvidia.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      3740651b
    • T
      net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe() · 1fa89ffb
      Taehee Yoo 提交于
      In the NIC ->probe() callback, ->mtd_probe() callback is called.
      If NIC has 2 ports, ->probe() is called twice and ->mtd_probe() too.
      In the ->mtd_probe(), which is efx_ef10_mtd_probe() it allocates and
      initializes mtd partiion.
      But mtd partition for sfc is shared data.
      So that allocated mtd partition data from last called
      efx_ef10_mtd_probe() will not be used.
      Therefore it must be freed.
      But it doesn't free a not used mtd partition data in efx_ef10_mtd_probe().
      
      kmemleak reports:
      unreferenced object 0xffff88811ddb0000 (size 63168):
        comm "systemd-udevd", pid 265, jiffies 4294681048 (age 348.586s)
        hex dump (first 32 bytes):
          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:
          [<ffffffffa3767749>] kmalloc_order_trace+0x19/0x120
          [<ffffffffa3873f0e>] __kmalloc+0x20e/0x250
          [<ffffffffc041389f>] efx_ef10_mtd_probe+0x11f/0x270 [sfc]
          [<ffffffffc0484c8a>] efx_pci_probe.cold.17+0x3df/0x53d [sfc]
          [<ffffffffa414192c>] local_pci_probe+0xdc/0x170
          [<ffffffffa4145df5>] pci_device_probe+0x235/0x680
          [<ffffffffa443dd52>] really_probe+0x1c2/0x8f0
          [<ffffffffa443e72b>] __driver_probe_device+0x2ab/0x460
          [<ffffffffa443e92a>] driver_probe_device+0x4a/0x120
          [<ffffffffa443f2ae>] __driver_attach+0x16e/0x320
          [<ffffffffa4437a90>] bus_for_each_dev+0x110/0x190
          [<ffffffffa443b75e>] bus_add_driver+0x39e/0x560
          [<ffffffffa4440b1e>] driver_register+0x18e/0x310
          [<ffffffffc02e2055>] 0xffffffffc02e2055
          [<ffffffffa3001af3>] do_one_initcall+0xc3/0x450
          [<ffffffffa33ca574>] do_init_module+0x1b4/0x700
      Acked-by: NMartin Habets <habetsm.xilinx@gmail.com>
      Fixes: 8127d661 ("sfc: Add support for Solarflare SFC9100 family")
      Signed-off-by: NTaehee Yoo <ap420073@gmail.com>
      Link: https://lore.kernel.org/r/20220512054709.12513-1-ap420073@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      1fa89ffb
    • G
      net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending · f3c46e41
      Guangguan Wang 提交于
      Non blocking sendmsg will return -EAGAIN when any signal pending
      and no send space left, while non blocking recvmsg return -EINTR
      when signal pending and no data received. This may makes confused.
      As TCP returns -EAGAIN in the conditions described above. Align the
      behavior of smc with TCP.
      
      Fixes: 846e344e ("net/smc: add receive timeout check")
      Signed-off-by: NGuangguan Wang <guangguan.wang@linux.alibaba.com>
      Reviewed-by: NTony Lu <tonylu@linux.alibaba.com>
      Acked-by: NKarsten Graul <kgraul@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220512030820.73848-1-guangguan.wang@linux.alibaba.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      f3c46e41
    • F
      net: dsa: bcm_sf2: Fix Wake-on-LAN with mac_link_down() · b7be130c
      Florian Fainelli 提交于
      After commit 2d1f90f9 ("net: dsa/bcm_sf2: fix incorrect usage of
      state->link") the interface suspend path would call our mac_link_down()
      call back which would forcibly set the link down, thus preventing
      Wake-on-LAN packets from reaching our management port.
      
      Fix this by looking at whether the port is enabled for Wake-on-LAN and
      not clearing the link status in that case to let packets go through.
      
      Fixes: 2d1f90f9 ("net: dsa/bcm_sf2: fix incorrect usage of state->link")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20220512021731.2494261-1-f.fainelli@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      b7be130c
  3. 12 5月, 2022 8 次提交
  4. 11 5月, 2022 12 次提交
  5. 10 5月, 2022 10 次提交
    • J
      udf: Avoid using stale lengthOfImpUse · c1ad35dd
      Jan Kara 提交于
      udf_write_fi() uses lengthOfImpUse of the entry it is writing to.
      However this field has not yet been initialized so it either contains
      completely bogus value or value from last directory entry at that place.
      In either case this is wrong and can lead to filesystem corruption or
      kernel crashes.
      Reported-by: Nbutt3rflyh4ck <butterflyhuangxx@gmail.com>
      CC: stable@vger.kernel.org
      Fixes: 979a6e28 ("udf: Get rid of 0-length arrays in struct fileIdentDesc")
      Signed-off-by: NJan Kara <jack@suse.cz>
      c1ad35dd
    • S
      virtio: fix virtio transitional ids · 7ff960a6
      Shunsuke Mie 提交于
      This commit fixes the transitional PCI device ID.
      
      Fixes: d61914ea ("virtio: update virtio id table, add transitional ids")
      Signed-off-by: NShunsuke Mie <mie@igel.co.jp>
      Link: https://lore.kernel.org/r/20220510102723.87666-1-mie@igel.co.jpSigned-off-by: NMichael S. Tsirkin <mst@redhat.com>
      7ff960a6
    • K
      decnet: Use container_of() for struct dn_neigh casts · dc5306a8
      Kees Cook 提交于
      Clang's structure layout randomization feature gets upset when it sees
      struct neighbor (which is randomized) cast to struct dn_neigh:
      
      net/decnet/dn_route.c:1123:15: error: casting from randomized structure pointer type 'struct neighbour *' to 'struct dn_neigh *'
      			gateway = ((struct dn_neigh *)neigh)->addr;
      				   ^
      
      Update all the open-coded casts to use container_of() to do the conversion
      instead of depending on strict member ordering.
      Reported-by: Nkernel test robot <lkp@intel.com>
      Link: https://lore.kernel.org/lkml/202205041247.WKBEHGS5-lkp@intel.com
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Yajun Deng <yajun.deng@linux.dev>
      Cc: Zheng Yongjun <zhengyongjun3@huawei.com>
      Cc: Bill Wendling <morbo@google.com>
      Cc: linux-decnet-user@lists.sourceforge.net
      Cc: netdev@vger.kernel.org
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20220508102217.2647184-1-keescook@chromium.orgSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      dc5306a8
    • J
      writeback: Avoid skipping inode writeback · 846a3351
      Jing Xia 提交于
      We have run into an issue that a task gets stuck in
      balance_dirty_pages_ratelimited() when perform I/O stress testing.
      The reason we observed is that an I_DIRTY_PAGES inode with lots
      of dirty pages is in b_dirty_time list and standard background
      writeback cannot writeback the inode.
      After studing the relevant code, the following scenario may lead
      to the issue:
      
      task1                                   task2
      -----                                   -----
      fuse_flush
       write_inode_now //in b_dirty_time
        writeback_single_inode
         __writeback_single_inode
                                       fuse_write_end
                                        filemap_dirty_folio
                                         __xa_set_mark:PAGECACHE_TAG_DIRTY
          lock inode->i_lock
          if mapping tagged PAGECACHE_TAG_DIRTY
          inode->i_state |= I_DIRTY_PAGES
          unlock inode->i_lock
                                         __mark_inode_dirty:I_DIRTY_PAGES
                                            lock inode->i_lock
                                            -was dirty,inode stays in
                                            -b_dirty_time
                                            unlock inode->i_lock
      
         if(!(inode->i_state & I_DIRTY_All))
            -not true,so nothing done
      
      This patch moves the dirty inode to b_dirty list when the inode
      currently is not queued in b_io or b_more_io list at the end of
      writeback_single_inode.
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      CC: stable@vger.kernel.org
      Fixes: 0ae45f63 ("vfs: add support for a lazytime mount option")
      Signed-off-by: NJing Xia <jing.xia@unisoc.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Link: https://lore.kernel.org/r/20220510023514.27399-1-jing.xia@unisoc.com
      846a3351
    • M
      net: atlantic: always deep reset on pm op, fixing up my null deref regression · 1809c30b
      Manuel Ullmann 提交于
      The impact of this regression is the same for resume that I saw on
      thaw: the kernel hangs and nothing except SysRq rebooting can be done.
      
      Fixes regression in commit cbe6c3a8 ("net: atlantic: invert deep
      par in pm functions, preventing null derefs"), where I disabled deep
      pm resets in suspend and resume, trying to make sense of the
      atl_resume_common() deep parameter in the first place.
      
      It turns out, that atlantic always has to deep reset on pm
      operations. Even though I expected that and tested resume, I screwed
      up by kexec-rebooting into an unpatched kernel, thus missing the
      breakage.
      
      This fixup obsoletes the deep parameter of atl_resume_common, but I
      leave the cleanup for the maintainers to post to mainline.
      
      Suspend and hibernation were successfully tested by the reporters.
      
      Fixes: cbe6c3a8 ("net: atlantic: invert deep par in pm functions, preventing null derefs")
      Link: https://lore.kernel.org/regressions/9-Ehc_xXSwdXcvZqKD5aSqsqeNj5Izco4MYEwnx5cySXVEc9-x_WC4C3kAoCqNTi-H38frroUK17iobNVnkLtW36V6VWGSQEOHXhmVMm5iQ=@protonmail.com/Reported-by: NJordan Leppert <jordanleppert@protonmail.com>
      Reported-by: NHolger Hoffstaette <holger@applied-asynchrony.com>
      Tested-by: NJordan Leppert <jordanleppert@protonmail.com>
      Tested-by: NHolger Hoffstaette <holger@applied-asynchrony.com>
      CC: <stable@vger.kernel.org> # 5.10+
      Signed-off-by: NManuel Ullmann <labre@posteo.de>
      Link: https://lore.kernel.org/r/87bkw8dfmp.fsf@posteo.deSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      1809c30b
    • J
      Merge tag 'batadv-net-pullrequest-20220508' of git://git.open-mesh.org/linux-merge · fc54e391
      Jakub Kicinski 提交于
      Simon Wunderlich says:
      
      ====================
      Here is a batman-adv bugfix:
      
       - Don't skb_split skbuffs with frag_list, by Sven Eckelmann
      
      * tag 'batadv-net-pullrequest-20220508' of git://git.open-mesh.org/linux-merge:
        batman-adv: Don't skb_split skbuffs with frag_list
      ====================
      
      Link: https://lore.kernel.org/r/20220508132110.20451-1-sw@simonwunderlich.deSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      fc54e391
    • V
      net: dsa: flush switchdev workqueue on bridge join error path · 630fd482
      Vladimir Oltean 提交于
      There is a race between switchdev_bridge_port_offload() and the
      dsa_port_switchdev_sync_attrs() call right below it.
      
      When switchdev_bridge_port_offload() finishes, FDB entries have been
      replayed by the bridge, but are scheduled for deferred execution later.
      
      However dsa_port_switchdev_sync_attrs -> dsa_port_can_apply_vlan_filtering()
      may impose restrictions on the vlan_filtering attribute and refuse
      offloading.
      
      When this happens, the delayed FDB entries will dereference dp->bridge,
      which is a NULL pointer because we have stopped the process of
      offloading this bridge.
      
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      Workqueue: dsa_ordered dsa_slave_switchdev_event_work
      pc : dsa_port_bridge_host_fdb_del+0x64/0x100
      lr : dsa_slave_switchdev_event_work+0x130/0x1bc
      Call trace:
       dsa_port_bridge_host_fdb_del+0x64/0x100
       dsa_slave_switchdev_event_work+0x130/0x1bc
       process_one_work+0x294/0x670
       worker_thread+0x80/0x460
      ---[ end trace 0000000000000000 ]---
      Error: dsa_core: Must first remove VLAN uppers having VIDs also present in bridge.
      
      Fix the bug by doing what we do on the normal bridge leave path as well,
      which is to wait until the deferred FDB entries complete executing, then
      exit.
      
      The placement of dsa_flush_workqueue() after switchdev_bridge_port_unoffload()
      guarantees that both the FDB additions and deletions on rollback are waited for.
      
      Fixes: d7d0d423 ("net: dsa: flush switchdev workqueue when leaving the bridge")
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20220507134550.1849834-1-vladimir.oltean@nxp.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      630fd482
    • J
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · d75b4c7d
      Jakub Kicinski 提交于
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2022-05-06
      
      This series contains updates to ice driver only.
      
      Ivan Vecera fixes a race with aux plug/unplug by delaying setting adev
      until initialization is complete and adding locking.
      
      Anatolii ensures VF queues are completely disabled before attempting to
      reconfigure them.
      
      Michal ensures stale Tx timestamps are cleared from hardware.
      
      * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        ice: fix PTP stale Tx timestamps cleanup
        ice: clear stale Tx queue settings before configuring
        ice: Fix race during aux device (un)plugging
      ====================
      
      Link: https://lore.kernel.org/r/20220506174129.4976-1-anthony.l.nguyen@intel.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d75b4c7d
    • F
      net: phy: Fix race condition on link status change · 91a7cda1
      Francesco Dolcini 提交于
      This fixes the following error caused by a race condition between
      phydev->adjust_link() and a MDIO transaction in the phy interrupt
      handler. The issue was reproduced with the ethernet FEC driver and a
      micrel KSZ9031 phy.
      
      [  146.195696] fec 2188000.ethernet eth0: MDIO read timeout
      [  146.201779] ------------[ cut here ]------------
      [  146.206671] WARNING: CPU: 0 PID: 571 at drivers/net/phy/phy.c:942 phy_error+0x24/0x6c
      [  146.214744] Modules linked in: bnep imx_vdoa imx_sdma evbug
      [  146.220640] CPU: 0 PID: 571 Comm: irq/128-2188000 Not tainted 5.18.0-rc3-00080-gd569e869 #9
      [  146.229563] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      [  146.236257]  unwind_backtrace from show_stack+0x10/0x14
      [  146.241640]  show_stack from dump_stack_lvl+0x58/0x70
      [  146.246841]  dump_stack_lvl from __warn+0xb4/0x24c
      [  146.251772]  __warn from warn_slowpath_fmt+0x5c/0xd4
      [  146.256873]  warn_slowpath_fmt from phy_error+0x24/0x6c
      [  146.262249]  phy_error from kszphy_handle_interrupt+0x40/0x48
      [  146.268159]  kszphy_handle_interrupt from irq_thread_fn+0x1c/0x78
      [  146.274417]  irq_thread_fn from irq_thread+0xf0/0x1dc
      [  146.279605]  irq_thread from kthread+0xe4/0x104
      [  146.284267]  kthread from ret_from_fork+0x14/0x28
      [  146.289164] Exception stack(0xe6fa1fb0 to 0xe6fa1ff8)
      [  146.294448] 1fa0:                                     00000000 00000000 00000000 00000000
      [  146.302842] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [  146.311281] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
      [  146.318262] irq event stamp: 12325
      [  146.321780] hardirqs last  enabled at (12333): [<c01984c4>] __up_console_sem+0x50/0x60
      [  146.330013] hardirqs last disabled at (12342): [<c01984b0>] __up_console_sem+0x3c/0x60
      [  146.338259] softirqs last  enabled at (12324): [<c01017f0>] __do_softirq+0x2c0/0x624
      [  146.346311] softirqs last disabled at (12319): [<c01300ac>] __irq_exit_rcu+0x138/0x178
      [  146.354447] ---[ end trace 0000000000000000 ]---
      
      With the FEC driver phydev->adjust_link() calls fec_enet_adjust_link()
      calls fec_stop()/fec_restart() and both these function reset and
      temporary disable the FEC disrupting any MII transaction that
      could be happening at the same time.
      
      fec_enet_adjust_link() and phy_read() can be running at the same time
      when we have one additional interrupt before the phy_state_machine() is
      able to terminate.
      
      Thread 1 (phylib WQ)       | Thread 2 (phy interrupt)
                                 |
                                 | phy_interrupt()            <-- PHY IRQ
                                 |  handle_interrupt()
                                 |   phy_read()
                                 |   phy_trigger_machine()
                                 |    --> schedule phylib WQ
                                 |
                                 |
      phy_state_machine()        |
       phy_check_link_status()   |
        phy_link_change()        |
         phydev->adjust_link()   |
          fec_enet_adjust_link() |
           --> FEC reset         | phy_interrupt()            <-- PHY IRQ
                                 |  phy_read()
                                 |
      
      Fix this by acquiring the phydev lock in phy_interrupt().
      
      Link: https://lore.kernel.org/all/20220422152612.GA510015@francesco-nb.int.toradex.com/
      Fixes: c974bdbc ("net: phy: Use threaded IRQ, to allow IRQ from sleeping devices")
      cc: <stable@vger.kernel.org>
      Signed-off-by: NFrancesco Dolcini <francesco.dolcini@toradex.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20220506060815.327382-1-francesco.dolcini@toradex.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      91a7cda1
    • J
      dim: initialize all struct fields · ee1444b5
      Jesse Brandeburg 提交于
      The W=2 build pointed out that the code wasn't initializing all the
      variables in the dim_cq_moder declarations with the struct initializers.
      The net change here is zero since these structs were already static
      const globals and were initialized with zeros by the compiler, but
      removing compiler warnings has value in and of itself.
      
      lib/dim/net_dim.c: At top level:
      lib/dim/net_dim.c:54:9: warning: missing initializer for field ‘comps’ of ‘const struct dim_cq_moder’ [-Wmissing-field-initializers]
         54 |         NET_DIM_RX_EQE_PROFILES,
            |         ^~~~~~~~~~~~~~~~~~~~~~~
      In file included from lib/dim/net_dim.c:6:
      ./include/linux/dim.h:45:13: note: ‘comps’ declared here
         45 |         u16 comps;
            |             ^~~~~
      
      and repeats for the tx struct, and once you fix the comps entry then
      the cq_period_mode field needs the same treatment.
      
      Use the commonly accepted style to indicate to the compiler that we
      know what we're doing, and add a comma at the end of each struct
      initializer to clean up the issue, and use explicit initializers
      for the fields we are initializing which makes the compiler happy.
      
      While here and fixing these lines, clean up the code slightly with
      a fix for the super long lines by removing the word "_MODERATION" from a
      couple defines only used in this file.
      
      Fixes: f8be17b8 ("lib/dim: Fix -Wunused-const-variable warnings")
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Link: https://lore.kernel.org/r/20220507011038.14568-1-jesse.brandeburg@intel.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      ee1444b5