From: Eric Dumazet Subject: Re: [PATCH] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms() Date: Thu, 8 Mar 2018 08:31:47 -0800 Message-ID: References: <20180307192416.233202-1-ghackmann@google.com> <20180308073328.GA8111@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Steffen Klassert , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org To: Herbert Xu , Greg Hackmann Return-path: In-Reply-To: <20180308073328.GA8111@gondor.apana.org.au> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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 per_cpu_ptr()