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.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 69078C43603 for ; Tue, 17 Dec 2019 18:36:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14C32206EC for ; Tue, 17 Dec 2019 18:36:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hggBHpqh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14C32206EC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VQPiq2HIUlakWupZH6ZyXHVgygob0C8bI3Y6PWYMY9w=; b=hggBHpqhjERQZ5 e+j4k7ydmKIIfydDjjiLJWt2QQQpEEvaDbPWeZY4IS18mP0ksctzH2KKpVsGwn3Mrfhphv86H+zMH 9azkJw30HIS4NT39l1VVgLcM7tHvtU75IEurZqIgS8wUToZmuwuqt/GYdzq574CHpSQuX9IzcP7gN BC+BIhmtwmhCCXnd52aKq0yFbUnlYVij3Hib8mI7ujTyFBGEIZEj90UYMbzypiQQMMPlFXQPEoR5A TP4XuIJOzjZ/B8Q9D6h/G87oZGF3GUBwbnWiJm3YEbTTwq9ztQcosrw2jBwx9kPRlkYK5IZHP1WJJ WC1usmtVKG0Xpe/Tg65Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihHi0-0002l9-MI; Tue, 17 Dec 2019 18:36:36 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihHhH-0001x4-E9 for linux-arm-kernel@lists.infradead.org; Tue, 17 Dec 2019 18:35:53 +0000 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 8BE4C8116; Tue, 17 Dec 2019 18:36:30 +0000 (UTC) Date: Tue, 17 Dec 2019 10:35:48 -0800 From: Tony Lindgren To: santosh.shilimkar@oracle.com Subject: Re: [PATCH] soc: ti: wkup_m3_ipc: Fix race condition with rproc_boot Message-ID: <20191217183548.GE35479@atomide.com> References: <20191212040314.14753-1-d-gerlach@ti.com> <20191217182534.GD35479@atomide.com> <05b9f0ff-bbc2-d8a7-3261-54c03a149db8@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <05b9f0ff-bbc2-d8a7-3261-54c03a149db8@oracle.com> User-Agent: Mutt/1.12.2 (2019-09-21) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191217_103551_528117_F4928B0A X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, Dave Gerlach , linux-kernel@vger.kernel.org, Santosh Shilimkar , Suman Anna , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org * santosh.shilimkar@oracle.com [191217 18:33]: > On 12/17/19 10:25 AM, Tony Lindgren wrote: > > Hi, > > > > * Dave Gerlach [191211 20:02]: > > > Any user of wkup_m3_ipc calls wkup_m3_ipc_get to get a handle and this > > > checks the value of the static variable m3_ipc_state to see if the > > > wkup_m3 is ready. Currently this is populated during probe before > > > rproc_boot has been called, meaning there is a window of time that > > > wkup_m3_ipc_get can return a valid handle but the wkup_m3 itself is not > > > ready, leading to invalid IPC calls to the wkup_m3 and system > > > instability. > > > > > > To avoid this, move the population of the m3_ipc_state variable until > > > after rproc_boot has succeeded to guarantee a valid and usable handle > > > is always returned. > > > > Santosh, do you want me to pick this one into my fixes branch? > > > Sure, go ahead. > > Acked-by: Santosh Shilimkar OK thanks applying into fixes. Tony _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel