Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752675AbaFFFkT (ORCPT ); Fri, 6 Jun 2014 01:40:19 -0400 Received: from www.linutronix.de ([62.245.132.108]:53486 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbaFFFkR (ORCPT ); Fri, 6 Jun 2014 01:40:17 -0400 Date: Fri, 6 Jun 2014 07:40:10 +0200 (CEST) From: Thomas Gleixner To: Steven Rostedt cc: Brad Mouring , linux-rt-users , LKML , Peter Zijlstra , Ingo Molnar , Clark Williams Subject: Re: [PATCH 1/1] rtmutex: Handle when top lock owner changes In-Reply-To: <20140605231940.1fc277a4@gandalf.local.home> Message-ID: References: <1400855410-14773-1-git-send-email-brad.mouring@ni.com> <1400855410-14773-2-git-send-email-brad.mouring@ni.com> <20140603210609.62de6451@gandalf.local.home> <20140605231940.1fc277a4@gandalf.local.home> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) 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 Thu, 5 Jun 2014, Steven Rostedt wrote: > On Wed, 4 Jun 2014 17:32:37 +0200 (CEST) > Thomas Gleixner wrote: > + /* > + * When we dropped the spinlocks, if the owner of the lock we > + * are currently processing changed since we chain walked > + * to that lock, we are done with the chain walk. The previous > + * owner was obviously running to release it. > + */ > + if (lock && rt_mutex_owner(lock) != task) > + goto out_unlock_pi; NO. You CANNOT derefernce lock after dropping the locks. It might be gone already. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/