From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754197AbdKAI1I (ORCPT ); Wed, 1 Nov 2017 04:27:08 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:48349 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbdKAI1G (ORCPT ); Wed, 1 Nov 2017 04:27:06 -0400 Date: Wed, 1 Nov 2017 09:26:35 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: Guenter Roeck , linux-kernel@vger.kernel.org, Don Zickus , Ingo Molnar Subject: Re: Crashes in perf_event_ctx_lock_nested In-Reply-To: <20171101081450.waqzz2ftebaw3tal@hirez.programming.kicks-ass.net> Message-ID: References: <20171030224512.GA13592@roeck-us.net> <20171031134850.ynix2zqypmca2mtt@hirez.programming.kicks-ass.net> <20171101081450.waqzz2ftebaw3tal@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 1 Nov 2017, Peter Zijlstra wrote: > On Tue, Oct 31, 2017 at 10:32:00PM +0100, Thomas Gleixner wrote: > > That means we can have the following situation: > > > > lock(watchdog_mutex); > > lockup_detector_reconfigure(); > > cpus_read_lock(); > > stop(); > > park() > > update(); > > start(); > > unpark() > > cpus_read_unlock(); thread runs() > > cleanup(); > > unlock(watchdog_mutex); > > > > Isn't there also a where hardlockup_detector_perf_init() creates an > event to 'probe' stuff, and then hardlockup_detector_perf_enable() > _again_ creates the event? probe() releases the event.