From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752895AbcJCPpa (ORCPT ); Mon, 3 Oct 2016 11:45:30 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:57788 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbcJCPpW (ORCPT ); Mon, 3 Oct 2016 11:45:22 -0400 Date: Mon, 3 Oct 2016 17:45:14 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: mingo@kernel.org, tglx@linutronix.de, juri.lelli@arm.com, xlpang@redhat.com, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, jdesfossez@efficios.com, bristot@redhat.com Subject: Re: [RFC][PATCH 4/4] futex: Rewrite FUTEX_UNLOCK_PI Message-ID: <20161003154514.GF3117@twins.programming.kicks-ass.net> References: <20161003091234.879763059@infradead.org> <20161003091847.704255067@infradead.org> <20161003113624.04f1f9f2@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161003113624.04f1f9f2@gandalf.local.home> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 03, 2016 at 11:36:24AM -0400, Steven Rostedt wrote: > > + WARN_ON_ONCE(!atomic_inc_not_zero(&pi_state->refcount)); > > Don't we have a rule where WARN_ON() and BUG_ON() should never have > "side effects"? That is, they should only check values, but their > contents should not update values. not that I'm aware, there's various places in the kernel (including kref.h) that relies on WARN_ON*() having side effects.