"Luck, Tony" <tony.l...@intel.com> writes:

>>      for (;;) {
>>              entry = mce_log_get_idx_check(mcelog.next);
>
> Can't this get even simpler? Do we need the loop? The mutex
> will now protect us while we check to see if there is a slot
> to stash this new entry. Also just say:

IMHO the warning is just bogus. There's nothing here that actually
uses RCU. I would just remove it.

>>                      if (entry >= MCE_LOG_LEN) {
>> -                            set_bit(MCE_OVERFLOW,
>> -                                    (unsigned long *)&mcelog.flags);
>> +                            set_bit(MCE_OVERFLOW, (unsigned long 
>> *)&mcelog.flags);
>
> Need to mutex_unlock(&mce_chrdev_read_mutex); here.

And yes that too.

-Andi

Reply via email to