From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756888AbdLVVI4 (ORCPT ); Fri, 22 Dec 2017 16:08:56 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:41790 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756086AbdLVVIw (ORCPT ); Fri, 22 Dec 2017 16:08:52 -0500 X-Google-Smtp-Source: ACJfBot5FARfcu7zRwqVTIV8pXJi1KeAzHzT+0iAyXjHPzyUj5vsY6wOaBzEyOGFyU8RW3ATHI2GeA== Date: Sat, 23 Dec 2017 02:38:48 +0530 From: gaurav jindal To: Peter Zijlstra Cc: mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH]locking:mutex Print warning if trylock in irq context Message-ID: <20171222210848.GA12389@gaurav.jindal> References: <20171222204519.GA12047@gaurav.jindal> <20171222205109.fjlmvwwmpqgzuqw7@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171222205109.fjlmvwwmpqgzuqw7@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 22, 2017 at 09:51:09PM +0100, Peter Zijlstra wrote: > On Sat, Dec 23, 2017 at 02:15:19AM +0530, gaurav jindal wrote: > > Since mutex_trylock must not be called from interrupt context, a robustness > > can be added to this function by throwing a warning if it is called in > > interrupt context. > > It would help to make debugging easier in case of undesired calling of this > > function. > > Or you run with lockdep enabled and not make this thing slower for > everybody. Got the point. thanks for making it clear and consideration.