Received: by 10.223.176.46 with SMTP id f43csp435481wra; Fri, 19 Jan 2018 21:03:59 -0800 (PST) X-Google-Smtp-Source: AH8x22675YtBLTF0Vhx1klxpMJBAcBM8fMcoQJG5uECQDVYifRVozXVHe7U8pjiX5a3wsirgG/Uf X-Received: by 10.99.94.69 with SMTP id s66mr862886pgb.145.1516424639338; Fri, 19 Jan 2018 21:03:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516424639; cv=none; d=google.com; s=arc-20160816; b=VR22bSOZSmirSNc3McSW3Nby5uzBhgsIJsbbz83F0WN7iewP2tG+pfwqzElbG7LM2K EP5/kT8idSxD0IBBYuMayRC1NJt4c5hAbMWgvf4Xgdta4o0sYH7OHLFEEegDoI91Ncvd pYWaP60xLpTXStBqliMc5VMXmYEkgC24zVWfD7FfzV98jWdDq0s4DNV9arq8AsImNA+A IoUznrKeaqasNH7rpGxJsy53oYaGQyVKezHiKN0cAGtMW/95wPmCKWm9WlrELgne+8ok ywMFOztiH3LKnxNV0SdYYGEag0x9ZHKPyJ/yXtOVSsx2BgblDJFqtr3RYroaQ0pJsayD kM9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=AHld9oK1+eCh30q8V7DKjMULxe5ktINRQaR+uXcglmk=; b=eYi1g3F1eKxcHBm0gh2ex1pihq64Zx/cliKONoYA2YFSM9/HnNv6/lrL4AevoYgsbz /Fg2rq5+JApo3SVSgHn2Lu604O1oZVRJE5l7wT/wPYrEiLg9SwoJ6KjZMzuTDHm+ZO9M p2OBDxSbAUOTX6A0RebIDXgRuc7i5uRbeXynzQQV81FFvPbZjq6cVSk3ueIf69nUmYRb zuDDgFK7yt6nD1tQHum5gWVExzH0jjOPxs3GYVOZ8RfxkmXcfnx42FsnBFugtsrYbTbS lDJ860UfioySGCMFa4Pk1f5W7AxRfaVCJnw5M3TxB/kY3xaei4U8OZSlk+jsuQeSEPmd ghEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fmGwccQg; dkim=pass header.i=@codeaurora.org header.s=default header.b=gS34FggM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q27si10717655pfl.135.2018.01.19.21.03.07; Fri, 19 Jan 2018 21:03:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fmGwccQg; dkim=pass header.i=@codeaurora.org header.s=default header.b=gS34FggM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754185AbeATE4c (ORCPT + 99 others); Fri, 19 Jan 2018 23:56:32 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35612 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753151AbeATE4Y (ORCPT ); Fri, 19 Jan 2018 23:56:24 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 449EC608CB; Sat, 20 Jan 2018 04:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516424184; bh=ahvLTv45wnRSTPfqmWsnq1IKsgBQ2aO2QhXBdpA1mF8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fmGwccQgdqpsc0mzNeWkK96HC94QYCugj4w/9iO42LDlMx5aOVVI6YNsqTfBmBFuT XF+q/K/pSwHZXTKhEXvGoAaQ12DDSVJo/jsohslvDxB/B3C4E/w+qQWNikv4IZPRj8 yznzAn68Rei0X01X+Z5/aW1fgoteZLlyrqJL10tQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: pkondeti@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7EC7E60398; Sat, 20 Jan 2018 04:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516424183; bh=ahvLTv45wnRSTPfqmWsnq1IKsgBQ2aO2QhXBdpA1mF8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gS34FggM++JvKFjI1D/GjVGUZ0yX0iRmh+IGpIUUt9sdocFHUvMq9rDA8EJIKdgzH DmKpHaexHxOpG+Vr2qIpm7dRxeUNegFqqDXhSXAyKmUsQNNYXE/szmf6BJ2lIx4hwW OhA/RuC1Uae7w3G4uCKC12S9MPxh/s0yZgEAB3p0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7EC7E60398 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pkondeti@codeaurora.org Date: Sat, 20 Jan 2018 10:26:16 +0530 From: Pavan Kondeti To: Steven Rostedt Cc: williams@redhat.com, Ingo Molnar , LKML , Peter Zijlstra , Thomas Gleixner , bristot@redhat.com, jkacur@redhat.com, efault@gmx.de, hpa@zytor.com, torvalds@linux-foundation.org, swood@redhat.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:sched/core] sched/rt: Simplify the IPI based RT balancing logic Message-ID: <20180120045616.GA25886@codeaurora.org> References: <20170424114732.1aac6dc4@gandalf.local.home> <20180119100353.7f9f5154@gandalf.local.home> <20180119174617.GA6563@codeaurora.org> <20180119131121.22dac3d3@gandalf.local.home> <20180119131254.69a9d848@gandalf.local.home> <20180119185756.GC6563@codeaurora.org> <20180119145115.139e0784@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180119145115.139e0784@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On Fri, Jan 19, 2018 at 02:51:15PM -0500, Steven Rostedt wrote: > On Sat, 20 Jan 2018 00:27:56 +0530 > Pavan Kondeti wrote: > > > Hi Steve, > > > > Thanks for the patch. > > > > On Fri, Jan 19, 2018 at 01:12:54PM -0500, Steven Rostedt wrote: > > > On Fri, 19 Jan 2018 13:11:21 -0500 > > > Steven Rostedt wrote: > > > > > > > void rto_push_irq_work_func(struct irq_work *work) > > > > { > > > > + struct root_domain *rd = > > > > + container_of(work, struct root_domain, rto_push_work); > > > > struct rq *rq; > > > > > > Notice that I also remove the dependency on rq from getting the rd. > > > > > > > Nice. This snippet it self solves the original problem, I reported. > > I will test your patch and let you know the results. > > > > > > I'll break the patch up into two then. One with this snippet, and the > other with the rd ref counting. > Yeah, this snippet fixed the original problem. I have not seen "use after free" of rd in my testing. But I can see we are operating on a rd for which refcount is 0. After applying your refcount patch, it never happened. I also verified that we are freeing the rd via IRQ work by dropping the last reference. Thanks for your help with the patches. Please copy linux-stable for the 1st patch. Feel free to use Tested-by: Pavankumar Kondeti Thanks, Pavan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.