Re: [PATCH] kernel: fix data race in put_pid

From: Eric Dumazet
Date: Fri Sep 18 2015 - 12:15:41 EST


On Fri, 2015-09-18 at 13:22 +0200, Peter Zijlstra wrote:

...

>
> +#ifndef atomic_read_ctrl
> +static inline int atomic_read_ctrl(atomic_t *v)

const atomic_t *v

> +{
> + int val = atomic_read(v);
> + smp_read_barrier_depends(); /* Enforce control dependency. */
> + return val;
> +}
> +#endif



--
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/