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

2018-03-08 Thread Herbert Xu
On Thu, Mar 08, 2018 at 08:31:47AM -0800, Eric Dumazet wrote: > > Because that would not be nice. > > this_cpu_read() is faster than going through raw_smp_processor_id() and > per_cpu_ptr() I see. In that case I have no objections to this patch. Thanks, -- Email: Herbert Xu

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

2018-03-08 Thread Eric Dumazet
On 03/07/2018 11:33 PM, Herbert Xu wrote: On Wed, Mar 07, 2018 at 11:24:16AM -0800, Greg Hackmann wrote: f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a __this_cpu_read() call inside ipcomp_alloc_tfms(). Since this call was introduced, the rules around per-cpu

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

2018-03-07 Thread Herbert Xu
On Wed, Mar 07, 2018 at 11:24:16AM -0800, Greg Hackmann wrote: > f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a > __this_cpu_read() call inside ipcomp_alloc_tfms(). Since this call was > introduced, the rules around per-cpu accessors have been tightened and >

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

2018-03-07 Thread Greg Hackmann
On 03/07/2018 12:21 PM, Eric Dumazet wrote: > On Wed, 2018-03-07 at 11:24 -0800, Greg Hackmann wrote: >> f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added >> a >> __this_cpu_read() call inside ipcomp_alloc_tfms().  Since this call >> was >> introduced, the rules around per-cpu

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

2018-03-07 Thread Eric Dumazet
On Wed, 2018-03-07 at 11:24 -0800, Greg Hackmann wrote: > f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added > a > __this_cpu_read() call inside ipcomp_alloc_tfms().  Since this call > was > introduced, the rules around per-cpu accessors have been tightened > and >

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

2018-03-07 Thread Greg Hackmann
f7c83bcbfaf5 ("net: xfrm: use __this_cpu_read per-cpu helper") added a __this_cpu_read() call inside ipcomp_alloc_tfms(). Since this call was introduced, the rules around per-cpu accessors have been tightened and __this_cpu_read() cannot be used in a preemptible context. syzkaller reported this