1. 02 Jul, 2024 2 commits
    • Russell King (Oracle)'s avatar
      net: phy: fix potential use of NULL pointer in phy_suspend() · 19e6ad2c
      Russell King (Oracle) authored
      phy_suspend() checks the WoL status, and then dereferences
      phydrv->flags if (and only if) we decided that WoL has been enabled
      on either the PHY or the netdev.
      
      We then check whether phydrv was NULL, but we've potentially already
      dereferenced the pointer.
      
      If phydrv is NULL, then phy_ethtool_get_wol() will return an error
      and leave wol.wolopts set to zero. However, if netdev->wol_enabled
      is true, then we would dereference a NULL pointer.
      
      Checking the PHY drivers, the only place that phydev->wol_enabled is
      checked by them is in their suspend/resume callbacks and nowhere else
      (which is correct, because phylib only updates this in phy_suspend()).
      
      So, move the NULL pointer check earlier to avoid a NULL pointer
      dereference. Leave the check for phydrv->suspend in place as a driver
      may populate the .resume method but not the .suspend method.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://patch.msgid.link/E1sN8tn-00GDCZ-Jj@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      19e6ad2c
    • Jakub Kicinski's avatar
      Merge tag 'linux-can-next-for-6.11-20240629' of... · 1eea11e9
      Jakub Kicinski authored
      Merge tag 'linux-can-next-for-6.11-20240629' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can-next 2024-06-29
      
      Geert Uytterhoeven contributes 3 patches with small improvements and
      cleanups for the rcar_canfd driver.
      
      A patch by Christophe JAILLET constifies the struct m_can_ops in the
      m_can driver to reduce the code size.
      
      The last 9 patches are by me an work around erratum DS80000789E 6 of
      mcp2518fd.
      
      * tag 'linux-can-next-for-6.11-20240629' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next:
        can: mcp251xfd: tef: update workaround for erratum DS80000789E 6 of mcp2518fd
        can: mcp251xfd: tef: prepare to workaround broken TEF FIFO tail index erratum
        can: mcp251xfd: rx: add workaround for erratum DS80000789E 6 of mcp2518fd
        can: mcp251xfd: rx: prepare to workaround broken RX FIFO head index erratum
        can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function
        can: mcp251xfd: clarify the meaning of timestamp
        can: mcp251xfd: move mcp251xfd_timestamp_start()/stop() into mcp251xfd_chip_start/stop()
        can: mcp251xfd: update errata references
        can: mcp251xfd: properly indent labels
        can: gs_usb: add VID/PID for Xylanta SAINT3 product family
        can: m_can: Constify struct m_can_ops
        can: rcar_canfd: Remove superfluous parentheses in address calculations
        can: rcar_canfd: Improve printing of global operational state
        can: rcar_canfd: Simplify clock handling
      ====================
      
      Link: https://patch.msgid.link/20240629114017.1080160-1-mkl@pengutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1eea11e9
  2. 01 Jul, 2024 20 commits
  3. 29 Jun, 2024 18 commits