Re: [PATCH] kernel: fix data race in put_pid
From: Peter Zijlstra
Date: Fri Sep 18 2015 - 05:33:09 EST
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/