lkml.org 
[lkml]   [2015]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: fix data race in put_pid
On Fri, Sep 18, 2015 at 10:57:32AM +0200, Peter Zijlstra wrote:
> diff --git a/arch/metag/include/asm/atomic_lnkget.h b/arch/metag/include/asm/atomic_lnkget.h
> index 21c4c268b86c..1bd21c933435 100644
> --- a/arch/metag/include/asm/atomic_lnkget.h
> +++ b/arch/metag/include/asm/atomic_lnkget.h
> @@ -3,7 +3,8 @@
>
> #define ATOMIC_INIT(i) { (i) }
>
> -#define atomic_set(v, i) ((v)->counter = (i))
> +/* XXX: should be LNKSETD ? */
> +#define atomic_set(v, i) WRITE_ONCE((v)->counter, (i))
>
> #include <linux/compiler.h>
>

James?


\
 
 \ /
  Last update: 2015-09-18 12:01    [W:0.140 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site