From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Xu Subject: Re: [PATCH v2 net] net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms() Date: Thu, 8 Mar 2018 16:23:12 +0800 Message-ID: <20180308082312.GA8403@gondor.apana.org.au> References: <20180307224253.152470-1-ghackmann@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Steffen Klassert , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Greg Hackmann Return-path: Content-Disposition: inline In-Reply-To: <20180307224253.152470-1-ghackmann@google.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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. > > syzkaller reported this leading to the following kernel BUG while > fuzzing sendmsg: Please explain why we can't revert f7c83bcbfaf5 instead. Your patch contradicts the comment above the line that you're changing. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt