Re: [PATCH v4] x86/sgx: Fix the call order of synchronize_srcu() in sgx_release()

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

 



On 1/20/21 6:43 AM, Jarkko Sakkinen wrote:
>> So why do you need the synchronize_srcu() call when this process sees an
>> empty mm_list already?
>>
>> Thx.
> The other process aka some process using the enclave calls list_del_rcu()
> (and synchronize_srcu()), which starts a new grace period. If we don't
> do it, then the cleanup_srcu() will race with that grace period.

To me, this is only a partial explanation.

That goal of synchronize_srcu() is to wait for the completion of a
*previous* grace period: one that might have observed the old state of
the list.

Could you explain the *actual* effects of the misplaced
synchronize_srcu()?  If the race _occurs_, what is the side-effect?



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux