• Hidetoshi Seto's avatar
    x86, mce: Do not call del_timer_sync() in IRQ context · 9aaef96f
    Hidetoshi Seto authored
    del_timer_sync() can cause a deadlock when called in interrupt context.
    It is used with on_each_cpu() in some parts for sysfs files like bank*,
    check_interval, cmci_disabled and ignore_ce.
    
    However, use of on_each_cpu() results in calling the function passed
    as the argument in interrupt context. This causes a flood of nested
    warnings from del_timer_sync() (it runs on each CPU) caused even by a
    simple file access like:
    
    $ echo 300 > /sys/devices/system/machinecheck/machinecheck0/check_interval
    
    Fortunately, these MCE-specific files are rarely used and AFAIK only few
    MCE geeks experience this warning.
    
    To remove the warning, move timer deletion outside of the interrupt
    context.
    Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
    9aaef96f
mce.c 50.1 KB