Bug 9451 - [devel-6.6] x86/hpet: Read HPET directly if panic in progress
Summary: [devel-6.6] x86/hpet: Read HPET directly if panic in progress
Status: NEW
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-28 17:03 UTC by LeoLiu-oc
Modified: 2024-07-30 18:48 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LeoLiu-oc zhaoxin_group 2024-06-28 17:03:12 UTC
When the clocksource of the system is HPET,a CPU executing read_hpet might
be interrupted by #GP/#PF to executing the panic,this may lead to
read_hpet dead loops:

CPU x				    CPU x
----                                ----
read_hpet()
  arch_spin_trylock(&hpet.lock)
  [CPU x got the hpet.lock]         #GP/#PF happened
                                    panic()
                                      kmsg_dump()
                                        pstore_dump()
                                          pstore_record_init()
                                            ktime_get_real_fast_ns()
                                              read_hpet()
                                              [dead loops]

To avoid this dead loops, read HPET directly if panic in progress.
Comment 1 小龙 admin 2024-07-30 18:48:31 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3449