[BUG] # macsmc_hwmon: NULL-deref in resume freezes Intel Macs on suspend/resume (carrying code t2linux already reverted)
bug
### Pre-flight checklist
- [x] I have searched existing issues and this is not a duplicate.
- [x] I have read the [Contributing Guidelines](https://github.com/CachyOS/linux-cachyos/blob/master/CONTRIBUTING.md).
- [x] I have verified the issue is reproducible with the latest available CachyOS kernel.
- [x] I have tried to reproduce the issue on Arch Linux's `linux` kernel.
### Upstream / vanilla kernel check
I have not tested with a vanilla/upstream kernel
### Kernel variant
linux-cachyos (EEVDF, Clang)
### System information (cachyos-bugreport.sh)
```text
https://paste.cachyos.org/p/79b543d.log
```
### Manual system information (if cachyos-bugreport.sh is unavailable)
```text
```
### Bug description
`linux-cachyos` (via the `CachyOS/linux` fork tarball, tag `cachyos-7.1.2-3`) ships the experimental **macsmc-based Intel-Mac SMC** driver series. Its `macsmc_hwmon_resume()` dereferences a NULL pointer, hard-freezing the machine on resume from suspend on Intel Macs (reproduced on iMac19,1).
The upstream source of these patches — **t2linux/linux-t2-patches — already reverted this entire series back to `applesmc`** on 2026-06-22 (commit `519ec3b` "Revert to applesmc"), before the `cachyos-7.1.2-3` build. CachyOS is carrying abandoned pre-revert code.
### Steps to reproduce
1. Suspend
2. Resume , happens every time on the 19,1 iMac.
### Expected behavior
Resume should not crash.
### Actual behavior
There's a crash and the system freezes.
### Logs / stack traces
```text
Call Trace:
<TASK>
oops_end+0x3b/0xe0
page_fault_oops+0x3fc/0x460
? ring_buffer_lock_reserve+0x2d0/0x380
exc_page_fault+0x66/0xd0
asm_exc_page_fault+0x26/0x30
RIP: 0010:macsmc_hwmon_resume+0x2b/0x160 [macsmc_hwmon]
? __pfx_macsmc_hwmon_resume+0x10/0x10 [macsmc_hwmon]
? __pfx_platform_pm_resume+0x10/0x10
device_resume+0x39c/0x990
dpm_resume+0x224/0x350
suspend_devices_and_enter+0x81b/0x9d0
pm_suspend+0x2c9/0x5a0
state_store+0x100/0x120
kernfs_fop_write_iter.llvm.5958117789424819207+0x186/0x1a0
__x64_sys_write+0x251/0x440
do_syscall_64+0xa6/0x3e0
? __x64_sys_fcntl.cold+0x1ab/0x6f4
? do_syscall_64+0xe4/0x3e0
? __x64_sys_fcntl.cold+0x5d/0x6f4
? get_close_on_exec+0x36/0x40
? __x64_sys_fcntl.cold+0x419/0x6f4
? do_syscall_64+0x65/0x3e0
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7fb13e2a7eca
</TASK>
```
### Additional system information
_No response_
0 条评论