> 7. utrace_attach_task() has an implicit wmb() between "->utrace = new_utrace"
>    and "->utrace_flags = REAP", this is good.
> 
>    But, for example, tracehook_force_sigpending() does not have rmb(),
>    this means utrace_interrupt_pending() can OOPS in theory.

Ok.  Please send a patch.  Off hand it seems to me it isn't worth using a
barrier because the winner of that race doesn't matter.  So:

        struct utrace *utrace = task_utrace_struct(current);
        return likely(utrace) && utrace->resume == UTRACE_INTERRUPT;

is fine, right?  (With comment changes to explain the need for the check.)


Thanks,
Roland

Reply via email to