Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1194719pxb; Wed, 4 Nov 2020 02:30:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8MBjku4eTTYV4U1QBtvpQyWRW6JW5B5Zia0sP2ZXzvdU4yDRdGqrYtBRVqGDy/qI5iujr X-Received: by 2002:a17:906:5247:: with SMTP id y7mr23803132ejm.503.1604485803130; Wed, 04 Nov 2020 02:30:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604485803; cv=none; d=google.com; s=arc-20160816; b=pUpHGlJAvTbP2HjchcLdbqd6pdhDatISXUt8get/ulU8tFmLrC8TWgYsdToz4CpvWz clxrnWjumVJvJ/hrE56i4kJJaIq4NmN/1wXO1d9gxoBgjaxhY7My8Xw6tEB4wX3nl0yy V1OE5631nFjVGjungHo7k29bEf5AJPFSqPd9phaFwmECEx2qNzGYv7AzdOM4Ram/qWN3 Jk1E7pchXiWaPgY7HfcysJDcHg1YmQJENlqjce2mRDKTf3xF7ut7WiijQSAJSBsAmKa1 ezLj+D/Gl/x5AdiT6kv0WS+/+S4Dp69Lp0fFiCg0DqXATPYxU+RuEsUfhCxYvt4TGymg NBWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=QF7gOMWfQDZgYKl8HMctCKSmJoXxRmC5ydZKdzt45/I=; b=jc0YDNUJsKa+hbHEk6ejKcqRnlYqmdRqlXFRTGFi88mmQMI9RFjt8sDC+csifI5RAk roTFlgr6t91+6eLorv5k8UsXJez1Q22vHePxmO83vTPhIqWBbJVdnuu5aaE/dmA27Dkk QtAnSyQ+bkb+mGPDavoTThgbs04PRg/GFWJQC4jt2LpJB2USyieguNW0VoWOOemzXVXm sfsSQy8owaEHyYguuc4Xu90YSyyDgFY+c5Han2Z1gdldL5zPAdNLr03CQS+YMERRZ0ZM xNbJxJL/xNhsQdnS5xIR2nybS2zXQcHUANDi56e6mYgBRCeBiGjDl54P4hkpXMe55o/9 Ku4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iAyysEd2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si1040462edf.79.2020.11.04.02.29.40; Wed, 04 Nov 2020 02:30:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iAyysEd2; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbgKDK0T (ORCPT + 99 others); Wed, 4 Nov 2020 05:26:19 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:48404 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbgKDKYy (ORCPT ); Wed, 4 Nov 2020 05:24:54 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604485493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QF7gOMWfQDZgYKl8HMctCKSmJoXxRmC5ydZKdzt45/I=; b=iAyysEd2Z5k1ZT91y/zLech4NG6DuvCEWaYRM5oB3PUnOI08agh5Lt8Z1edtUyJIL3WJqa +pP/3rDBuyG9A3wAcad8ZGQK+uYdgpHY1dC/dJkr01QlReTMv48nPaKexn/LGcVlDLLOSF dOYMIt1LcBhltGf0BXnrRgSCxLWFx6RiOODHLKCSofy28/mvYvuGsZry4SiXxy+JvnMl+b sYe+Kq2XdZHrfpXFy4l0uorgezpJbG8WNb5e1iAgN5Ui5WQVFdfG5vwjK+ak/SVDlR5dy+ /OMFUDju+zJI+x2tHSc8ajC336KvWvcp8PsSJXWV2EMLlMoh+rnAbxP+aPzA5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604485493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QF7gOMWfQDZgYKl8HMctCKSmJoXxRmC5ydZKdzt45/I=; b=aLraScZgkWsVIFnZXILsnEAOiqFRSIC3DgMrnzRtPqWpbl5PAy0FtBlncddV4j+/KAcnG2 pvsU2Sq6YtqYp1Ag== To: Mike Galbraith , Gratian Crisan , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Brandon Streiff , Ingo Molnar , Darren Hart , James Minor , Sebastian Andrzej Siewior Subject: Re: BUG_ON(!newowner) in fixup_pi_state_owner() In-Reply-To: <5f536491708682fc3b86cb5b7bc1e05ffa3521e7.camel@gmx.de> References: <87a6w6x7bb.fsf@ni.com> <878sbixbk4.fsf@ni.com> <2376f4e71c638aee215a4911e5efed14c5adf56e.camel@gmx.de> <5f536491708682fc3b86cb5b7bc1e05ffa3521e7.camel@gmx.de> Date: Wed, 04 Nov 2020 11:24:52 +0100 Message-ID: <874km5mnbf.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 04 2020 at 08:42, Mike Galbraith wrote: > On Wed, 2020-11-04 at 01:56 +0100, Mike Galbraith wrote: > --- a/kernel/futex.c > +++ b/kernel/futex.c > @@ -2383,7 +2383,18 @@ static int fixup_pi_state_owner(u32 __us > * Since we just failed the trylock; there must be an owner. > */ > newowner = rt_mutex_owner(&pi_state->pi_mutex); > - BUG_ON(!newowner); > + > + /* > + * Why? Because I know what I'm doing with these beasts? Nope, > + * but what the hell, a busy restart loop let f_boosted become > + * owner, so go for it. Box still boots, works, no longer makes > + * boom with fbomb_v2, and as an added bonus, didn't even blow > + * futextests all up. Maybe it'll help... or not, we'll see. > + */ > + if (unlikely(!newowner)) { > + err = -EAGAIN; > + goto handle_err; Yes, that cures it, but does not really explain why newowner is NULL. Lemme stare more.