[lkml]   [2018]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms()

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 accessors have been tightened and
>> __this_cpu_read() cannot be used in a preemptible context.
>> syzkaller reported this leading to the following kernel BUG while
>> fuzzing sendmsg:
> How about reverting f7c83bcbfaf5 instead?
> Thanks,

Because that would not be nice.

this_cpu_read() is faster than going through raw_smp_processor_id() and

 \ /
  Last update: 2018-03-08 17:32    [W:0.047 / U:0.380 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site