Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753762AbcKHJ7B (ORCPT ); Tue, 8 Nov 2016 04:59:01 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40344 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753061AbcKHJ5C (ORCPT ); Tue, 8 Nov 2016 04:57:02 -0500 Date: Tue, 8 Nov 2016 10:56:55 +0100 From: Martin Schwidefsky To: Steven Rostedt Cc: Heiko Carstens , Tejun Heo , linux-kernel@vger.kernel.org, Sebastian Ott Subject: Re: [PATCH] percpu: use notrace variant of preempt_disable/preempt_enable In-Reply-To: <20161107122716.6e4597a7@gandalf.local.home> References: <20161103135838.GB9487@osiris> <20161107122716.6e4597a7@gandalf.local.home> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110809-0036-0000-0000-00000255151F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110809-0037-0000-0000-00001329905F Message-Id: <20161108105655.129ee2d7@mschwide> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-08_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611080183 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1276 Lines: 34 On Mon, 7 Nov 2016 12:27:16 -0500 Steven Rostedt wrote: > On Thu, 3 Nov 2016 14:58:38 +0100 > Heiko Carstens wrote: > > > Commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap like > > events do") added a couple of this_cpu_read calls to the ftrace code. > > > > On x86 this is not a problem, since it has single instructions to read > > percpu data. Other architectures which use the generic variant now > > have additional preempt_disable and preempt_enable calls in the core > > ftrace code. This may lead to recursive calls and in result to a dead > > machine, e.g. if preemption and debugging options are enabled. > > > > To fix this use the notrace variant of preempt_disable and > > preempt_enable within the generic percpu code. > > > > Reported-and-bisected-by: Sebastian Ott > > Tested-by: Sebastian Ott > > Fixes: 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap like events do") > > Signed-off-by: Heiko Carstens > > Acked-by: Steven Rostedt > > Feel free to push this in your tree. Ok, will do. Thanks. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.