On 08/19, Oleg Nesterov wrote:
>
> If ->vfork_stop was set, it was set by us, no need to take utrace->lock
> to check it.

Oh. Yes, but...

I hope I missed something, but I'm _afraid_ we may have problems.

Looks like we can almost never use utrace->xxx:1 fields without ->lock.
Suppose that, for example, utrace_control(UTRACE_REPORT) does

        utrace->report = 1;

But report/interrupt/etc are all bitfields :1. Doesn't this mean compiler
can do anything it wants with the word where these bitfields live? Can't
it temporary (say) clear ->interrupt while setting ->report ?

IOW, as a perl programmer I need your help with "C". Do we have any
guarantee that compiler will always update the word "as a whole" ?

Oleg.

Reply via email to