lkml.org 
[lkml]   [2015]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [V4 PATCH 3/4] kexec: Fix race between panic() and crash_kexec() called directly
On Mon, Sep 28, 2015 at 07:08:19AM +0000, 河合英宏 / KAWAI,HIDEHIRO wrote:
> > >> kernel/kexec_core.c:899:3: note: in expansion of macro 'atomic_xchg'
> > atomic_xchg(&panic_cpu, -1);
> > ^
>
> I changed to use atomic_xchg() instead of atomic_set() in V3
> because atomic_set() doesn't mean memory barrier. However,
> I thought again and there is no need of barrier; there is no
> problem if a competitor sees old value of panic_cpu or new one.
> So, atomic_set() is sufficient and using it will remove this warning.
>
> I will resend the fixed version later.

So if you rely on the memory barrier; you should have also put a comment
on explaining the ordering requirements.


\
 
 \ /
  Last update: 2015-09-30 14:01    [W:0.067 / U:20.132 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site