1. 06 May, 2024 1 commit
  2. 02 May, 2024 1 commit
    • Rafael J. Wysocki's avatar
      Merge tag 'thermal-v6.10-rc1' of... · e1242ff0
      Rafael J. Wysocki authored
      Merge tag 'thermal-v6.10-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux into thermal
      
      Merge updates of thermal drivers for v6.10 from Daniel Lezcano:
      
      "- Add QCM2290 compatible DT bindings for Lmh and fix a null pointer
         dereference in the lmh driver in case the SCM is not present (Konrad
         Dybcio)
      
       - Use the strreplace() function instead of doing it manually in the
         Armada driver (Rasmus Villemoes)
      
       - Convert st,stih407-thermal to DT schema and fix up missing
         properties (Raphael Gallais-Pou)
      
       - Add suspend/resume by restoring the context of the tsens sensor
         (Priyansh Jain)
      
       - Support A1 SoC family Thermal Sensor controller and add the DT
         bindings (Dmitry Rokosov)
      
       - Improve the temperature approximation calculation and consolidate
         the Tj constant into a shared area of the structure instead of
         duplicating it on the Rcar Gen3 (Niklas Söderlund)
      
       - Fix the Mediatek LVTS sensor coefficient for the MT8192 in order to support
         it correctly (Hsin-Te Yuan)
      
       - Fix a null pointer dereference on the tsens driver when the function
         compute_intercept_slope() is called with a null parameter (Aleksandr
         Mishin)
      
       - Remove some unused fields in struct qpnp_tm_chip and k3_bandgap
         (Christophe Jaillet)
      
       - Fixup calibration efuse data decoding, consolidate the code by
         checking boundaries and refactor some part of the LVTS Mediatek
         driver. After setting the scene, add MT8186 and MT8188 along with
         the DT bindings (Nicolas Pitre)
      
       - Add Loongson-2K2000 support after some minor code adjustements and
         providing the DT bindings definition (Binbin Zhou)"
      
      * tag 'thermal-v6.10-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (28 commits)
        thermal/drivers/loongson2: Add Loongson-2K2000 support
        dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition
        dt-bindings: thermal: loongson,ls2k-thermal: Add Loongson-2K0500 compatible
        thermal/drivers/loongson2: Trivial code style adjustment
        thermal/drivers/mediatek/lvts_thermal: Add MT8188 support
        dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8188
        thermal/drivers/mediatek/lvts_thermal: Allow early empty sensor slots
        thermal/drivers/mediatek/lvts_thermal: Provision for gt variable location
        thermal/drivers/mediatek/lvts_thermal: Add MT8186 support
        dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for MT8186
        thermal/drivers/mediatek/lvts_thermal: Guard against efuse data buffer overflow
        thermal/drivers/mediatek/lvts_thermal: Use offsets for every calibration byte
        thermal/drivers/mediatek/lvts_thermal: Remove .hw_tshut_temp
        thermal/drivers/mediatek/lvts_thermal: Move comment
        thermal/drivers/mediatek/lvts_thermal: Retrieve all calibration bytes
        thermal/drivers/k3_bandgap: Remove some unused fields in struct k3_bandgap
        thermal/drivers/qcom: Remove some unused fields in struct qpnp_tm_chip
        thermal/drivers/tsens: Fix null pointer dereference
        thermal/drivers/mediatek/lvts_thermal: Add coeff for mt8192
        thermal/drivers/rcar_gen3: Update temperature approximation calculation
        ...
      e1242ff0
  3. 26 Apr, 2024 3 commits
    • Rafael J. Wysocki's avatar
      thermal/debugfs: Prevent use-after-free from occurring after cdev removal · d351eb0a
      Rafael J. Wysocki authored
      Since thermal_debug_cdev_remove() does not run under cdev->lock, it can
      run in parallel with thermal_debug_cdev_state_update() and it may free
      the struct thermal_debugfs object used by the latter after it has been
      checked against NULL.
      
      If that happens, thermal_debug_cdev_state_update() will access memory
      that has been freed already causing the kernel to crash.
      
      Address this by using cdev->lock in thermal_debug_cdev_remove() around
      the cdev->debugfs value check (in case the same cdev is removed at the
      same time in two different threads) and its reset to NULL.
      
      Fixes: 755113d7 ("thermal/debugfs: Add thermal cooling device debugfs information")
      Cc :6.8+ <stable@vger.kernel.org> # 6.8+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      d351eb0a
    • Rafael J. Wysocki's avatar
      thermal/debugfs: Fix two locking issues with thermal zone debug · c7f7c372
      Rafael J. Wysocki authored
      With the current thermal zone locking arrangement in the debugfs code,
      user space can open the "mitigations" file for a thermal zone before
      the zone's debugfs pointer is set which will result in a NULL pointer
      dereference in tze_seq_start().
      
      Moreover, thermal_debug_tz_remove() is not called under the thermal
      zone lock, so it can run in parallel with the other functions accessing
      the thermal zone's struct thermal_debugfs object.  Then, it may clear
      tz->debugfs after one of those functions has checked it and the
      struct thermal_debugfs object may be freed prematurely.
      
      To address the first problem, pass a pointer to the thermal zone's
      struct thermal_debugfs object to debugfs_create_file() in
      thermal_debug_tz_add() and make tze_seq_start(), tze_seq_next(),
      tze_seq_stop(), and tze_seq_show() retrieve it from s->private
      instead of a pointer to the thermal zone object.  This will ensure
      that tz_debugfs will be valid across the "mitigations" file accesses
      until thermal_debugfs_remove_id() called by thermal_debug_tz_remove()
      removes that file.
      
      To address the second problem, use tz->lock in thermal_debug_tz_remove()
      around the tz->debugfs value check (in case the same thermal zone is
      removed at the same time in two different threads) and its reset to NULL.
      
      Fixes: 7ef01f22 ("thermal/debugfs: Add thermal debugfs information for mitigation episodes")
      Cc :6.8+ <stable@vger.kernel.org> # 6.8+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      c7f7c372
    • Rafael J. Wysocki's avatar
      thermal/debugfs: Free all thermal zone debug memory on zone removal · 72c1afff
      Rafael J. Wysocki authored
      Because thermal_debug_tz_remove() does not free all memory allocated for
      thermal zone diagnostics, some of that memory becomes unreachable after
      freeing the thermal zone's struct thermal_debugfs object.
      
      Address this by making thermal_debug_tz_remove() free all of the memory
      in question.
      
      Fixes: 7ef01f22 ("thermal/debugfs: Add thermal debugfs information for mitigation episodes")
      Cc :6.8+ <stable@vger.kernel.org> # 6.8+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      72c1afff
  4. 23 Apr, 2024 28 commits
  5. 21 Apr, 2024 7 commits
    • Linus Torvalds's avatar
      Linux 6.9-rc5 · ed30a4a5
      Linus Torvalds authored
      ed30a4a5
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 48cf398f
      Linus Torvalds authored
      Pull char / misc driver fixes from Greg KH:
       "Here are some small char/misc and other driver fixes for 6.9-rc5.
        Included in here are the following:
      
         - binder driver fix for reported problem
      
         - speakup crash fix
      
         - mei driver fixes for reported problems
      
         - comdei driver fix
      
         - interconnect driver fixes
      
         - rtsx driver fix
      
         - peci.h kernel doc fix
      
        All of these have been in linux-next for over a week with no reported
        problems"
      
      * tag 'char-misc-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        peci: linux/peci.h: fix Excess kernel-doc description warning
        binder: check offset alignment in binder_get_object()
        comedi: vmk80xx: fix incomplete endpoint checking
        mei: vsc: Unregister interrupt handler for system suspend
        Revert "mei: vsc: Call wake_up() in the threaded IRQ handler"
        misc: rtsx: Fix rts5264 driver status incorrect when card removed
        mei: me: disable RPL-S on SPS and IGN firmwares
        speakup: Avoid crash on very long word
        interconnect: Don't access req_list while it's being manipulated
        interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
      48cf398f
    • Linus Torvalds's avatar
      Merge tag 'driver-core-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core · 4e90ba75
      Linus Torvalds authored
      Pull kernfs bugfix and documentation update from Greg KH:
       "Here are two changes for 6.9-rc5 that deal with "driver core" stuff,
        that do the following:
      
         - sysfs reference leak fix
      
         - embargoed-hardware-issues.rst update for Power
      
        Both of these have been in linux-next for over a week with no reported
        issues"
      
      * tag 'driver-core-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation: embargoed-hardware-issues.rst: Add myself for Power
        fs: sysfs: Fix reference leak in sysfs_break_active_protection()
      4e90ba75
    • Linus Torvalds's avatar
      Merge tag 'tty-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · c0c6b5c0
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty and serial driver fixes for 6.9-rc5 that
        resolve a bunch of reported problems. Included in here are:
      
         - MAINTAINERS and .mailmap update for Richard Genoud
      
         - serial core regression fixes from 6.9-rc1 changes
      
         - pci id cleanups
      
         - serial core crash fix
      
         - stm32 driver fixes
      
         - 8250 driver fixes
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'tty-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: stm32: Reset .throttled state in .startup()
        serial: stm32: Return IRQ_NONE in the ISR if no handling happend
        serial: core: Fix missing shutdown and startup for serial base port
        serial: core: Clearing the circular buffer before NULLifying it
        MAINTAINERS: mailmap: update Richard Genoud's email address
        serial/pmac_zilog: Remove flawed mitigation for rx irq flood
        serial: 8250_pci: Remove redundant PCI IDs
        serial: core: Fix regression when runtime PM is not enabled
        serial: mxs-auart: add spinlock around changing cts state
        serial: 8250_dw: Revert: Do not reclock if already at correct rate
        serial: 8250_lpc18xx: disable clks on error in probe()
      c0c6b5c0
    • Linus Torvalds's avatar
      Merge tag 'usb-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 5fa0ab45
      Linus Torvalds authored
      Pull USB / Thunderbolt driver fixes from Greg KH:
       "Here are some small USB and Thunderbolt driver fixes for 6.9-rc5.
        Included in here are:
      
         - MAINTAINER file update for invalid email address
      
         - usb-serial device id updates
      
         - typec driver fixes
      
         - thunderbolt / usb4 driver fixes
      
         - usb core shutdown fixes
      
         - cdc-wdm driver revert for reported problem in -rc1
      
         - usb gadget driver fixes
      
         - xhci driver fixes
      
        All of these have been in linux-next for a while with no reported
        problems"
      
      * tag 'usb-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (25 commits)
        USB: serial: option: add Telit FN920C04 rmnet compositions
        usb: dwc3: ep0: Don't reset resource alloc flag
        Revert "usb: cdc-wdm: close race between read and workqueue"
        USB: serial: option: add Rolling RW101-GL and RW135-GL support
        USB: serial: option: add Lonsung U8300/U9300 product
        USB: serial: option: add support for Fibocom FM650/FG650
        USB: serial: option: support Quectel EM060K sub-models
        USB: serial: option: add Fibocom FM135-GL variants
        usb: misc: onboard_usb_hub: Disable the USB hub clock on failure
        thunderbolt: Avoid notify PM core about runtime PM resume
        thunderbolt: Fix wake configurations after device unplug
        usb: dwc2: host: Fix dereference issue in DDMA completion flow.
        usb: typec: mux: it5205: Fix ChipID value typo
        MAINTAINERS: Drop Li Yang as their email address stopped working
        usb: gadget: fsl: Initialize udc before using it
        usb: Disable USB3 LPM at shutdown
        usb: gadget: f_ncm: Fix UAF ncm object at re-bind after usb ep transport error
        usb: typec: tcpm: Correct the PDO counting in pd_set
        usb: gadget: functionfs: Wait for fences before enqueueing DMABUF
        usb: gadget: functionfs: Fix inverted DMA fence direction
        ...
      5fa0ab45
    • Linus Torvalds's avatar
      Merge tag 'sched_urgent_for_v6.9_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3b680865
      Linus Torvalds authored
      Pull scheduler fix from Borislav Petkov:
      
       - Add a missing memory barrier in the concurrency ID mm switching
      
      * tag 'sched_urgent_for_v6.9_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Add missing memory barrier in switch_mm_cid
      3b680865
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.9_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d07a0b86
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Fix CPU feature dependencies of GFNI, VAES, and VPCLMULQDQ
      
       - Print the correct error code when FRED reports a bad event type
      
       - Add a FRED-specific INT80 handler without the special dances that
         need to happen in the current one
      
       - Enable the using-the-default-return-thunk-but-you-should-not warning
         only on configs which actually enable those special return thunks
      
       - Check the proper feature flags when selecting BHI retpoline
         mitigation
      
      * tag 'x86_urgent_for_v6.9_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpufeatures: Fix dependencies for GFNI, VAES, and VPCLMULQDQ
        x86/fred: Fix incorrect error code printout in fred_bad_type()
        x86/fred: Fix INT80 emulation for FRED
        x86/retpolines: Enable the default thunk warning only on relevant configs
        x86/bugs: Fix BHI retpoline check
      d07a0b86