Re: [PATCH v2 net] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()

From: Steffen Klassert
Date: Tue Mar 13 2018 - 02:50:14 EST


On Wed, Mar 07, 2018 at 02:42:53PM -0800, Greg Hackmann wrote:
> f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a
> __this_cpu_read() call inside ipcomp_alloc_tfms().
>
> At the time, __this_cpu_read() required the caller to either not care
> about races or to handle preemption/interrupt issues. 3.15 tightened
> the rules around some per-cpu operations, and now __this_cpu_read()
> should never be used in a preemptible context. On 3.15 and later, we
> need to use this_cpu_read() instead.
>

...

> Signed-off-by: Greg Hackmann <ghackmann@xxxxxxxxxx>

Patch applied, thanks!