One question about ghes_notify_nmi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Aili Yao <yaoaili@xxxxxxxxxxxx>

Hi!

Sorry for my ignorance,When I look in to this code, I am totally condused.
The Line 1136 has guarranted that Only one NMI will enter following code I think, Is
this right? if so, what is ghes_notify_lock_nmi going to pretect?
Can any one help correct me?

   1131 static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs)
   1132 {
   1133         static DEFINE_RAW_SPINLOCK(ghes_notify_lock_nmi);
   1134         int ret = NMI_DONE;
   1135 
   1136         if (!atomic_add_unless(&ghes_in_nmi, 1, 1))
   1137                 return ret;
   1138 
   1139         raw_spin_lock(&ghes_notify_lock_nmi);
   1140         if (!ghes_in_nmi_spool_from_list(&ghes_nmi, FIX_APEI_GHES_NMI))
   1141                 ret = NMI_HANDLED;
   1142         raw_spin_unlock(&ghes_notify_lock_nmi);
   1143 
   1144         atomic_dec(&ghes_in_nmi);
   1145         return ret;
   1146 }

Thanks
Aili Yao




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux