lkml.org 
[lkml]   [2019]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/2] IMA: Define workqueue for early boot "key" measurements
From
Date
On 12/13/19 5:06 AM, Mimi Zohar wrote:

> I just need to convince myself that this is correct.  Normally before
> reading and writing a flag, there is some sort of locking.  With
> taking the mutex before setting the flag, there is now only a lock
> around the single writer.
>
> Without taking a lock before reading the flag, will the queue always
> be empty is the question.  If it is, then the comment is correct, but
> the code assumes not and processes the list again.  Testing the flag
> after taking the mutex just re-enforces the comment.
>
> Bottom line, does reading the flag need to be lock protected?
>
> Mimi
>

I'll change this function to check the flag again after taking the lock
and process only if the queue has entries. Will send an update today.

Please let me know if you have any concern in other functions in this
file. I'll address them, if any, in today's update.

thanks,
-lakshmi

\
 
 \ /
  Last update: 2019-12-13 16:51    [W:0.042 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site