From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6513BC4321A for ; Fri, 28 Jun 2019 15:51:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36FB62063F for ; Fri, 28 Jun 2019 15:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726762AbfF1Pvy (ORCPT ); Fri, 28 Jun 2019 11:51:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34648 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbfF1Pvy (ORCPT ); Fri, 28 Jun 2019 11:51:54 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 484E33086204; Fri, 28 Jun 2019 15:51:38 +0000 (UTC) Received: from treble (ovpn-126-66.rdu2.redhat.com [10.10.126.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0487660160; Fri, 28 Jun 2019 15:51:31 +0000 (UTC) Date: Fri, 28 Jun 2019 10:51:27 -0500 From: Josh Poimboeuf To: Steven Rostedt Cc: Petr Mladek , Miroslav Benes , Johannes Erdfelt , Jessica Yu , Jiri Kosina , mhiramat@kernel.org, Ingo Molnar , tglx@linutronix.de, torvalds@linux-foundation.org, Joe Lawrence , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH] ftrace: Remove possible deadlock between register_kprobe() and ftrace_run_update_code() Message-ID: <20190628155127.b4abyo2wmco6hb2n@treble> References: <20190627081334.12793-1-pmladek@suse.com> <20190628105232.6arwis5u33li6twr@pathway.suse.cz> <20190628095424.1be42e21@gandalf.local.home> <20190628114627.411af7c2@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190628114627.411af7c2@gandalf.local.home> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 28 Jun 2019 15:51:54 +0000 (UTC) Sender: live-patching-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: live-patching@vger.kernel.org On Fri, Jun 28, 2019 at 11:46:27AM -0400, Steven Rostedt wrote: > On Fri, 28 Jun 2019 09:54:24 -0400 > Steven Rostedt wrote: > > > On Fri, 28 Jun 2019 12:52:32 +0200 > > Petr Mladek wrote: > > > > > On Fri 2019-06-28 09:32:03, Miroslav Benes wrote: > > > > On Thu, 27 Jun 2019, Petr Mladek wrote: > > > > > @@ -2611,12 +2610,10 @@ static void ftrace_run_update_code(int command) > > > > > { > > > > > int ret; > > > > > > > > > > - mutex_lock(&text_mutex); > > > > > - > > > > > ret = ftrace_arch_code_modify_prepare(); > > > > > FTRACE_WARN_ON(ret); > > > > > if (ret) > > > > > - goto out_unlock; > > > > > + return ret; > > > > > > > > Should be just "return;", because the function is "static void". > > > > > > Grr, I usually check compiler warnings but I evidently skipped it > > > in this case :-( > > > > > > Steven, should I send a fixed/folloup patch or will you just > > > fix it when pushing? > > > > > > > I'll fix it up. > > Also note, this would have been caught with my test suite, as it checks > for any new warnings. Sadly, I noticed this while reviewing the code, but then somehow got distracted and it vanished. Another review fail... -- Josh