Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2084385ybl; Thu, 15 Aug 2019 06:20:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAywk1llYbYza17cpKersoT/QviQa2bSUO3ZC/VGWODyKAFSFaeXWgw2Avj4LlpjCcyTNR X-Received: by 2002:a62:e401:: with SMTP id r1mr5544879pfh.193.1565875232097; Thu, 15 Aug 2019 06:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565875232; cv=none; d=google.com; s=arc-20160816; b=spHPGpzij1KxLDC5kxC6CtqyuXrW7VI17Iz1paZmp2h3mAYoiSmLYlT8S4INZ+1G+x 414+xKVRG4ENuAkbIGwLzRtwA+tsKPCshrH5jdOqUUZKF7FUJWZ01zE0TDSMEZE+qEvO ug0IUFUgZvL5Mf1Qu61WEQN+LlOuJtiF9PLQvcSx0ejmwFdUIl1qIF1V+RWg3F/6bbam fw1VSVdE/4klSElv6S/g/LoOVUBrhUDP/0OifLS35p58jg5GRAXaDAK2MDatNKmUMl0v WVQqohLUYCXUPbHBP3tW7C0/XxquyCwmWoJaI74adtH3UTvjicpGTmCUSbdujVbPx97U jaig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=J8sM+KCRjQpeHCvWplYAPIbFGoufgFQ4kMTNgbM6fy8=; b=xqvW06wqIIO/kRSUzTe/oJSqpyrKHWgXnN+gVyuclfKEr41K4eRtnznBOdWiBAt4KF Ab4KQoiWWNKVhYUzHf7JZkcd/ZCHxBHdWBdZi7UD3QFiZdDQ2v/OdrKtpSrj0aW/tAyJ 8FChW3l+ih96yxlVJjeyI6La/5ZpuWaUIZVd6F1m+5XmPQu3kfEtCelWczPaY63U46fH UekYuHliLRCdCxdBSkz/aRtPgF2e/WUBEN1bOlbOhaUNTEVvDyf2mI+kaCOfldCFP62r 2wCzU1GiwafiP8+bD4pau07dvXSMQBzE3WjEAmpU2ZYeFuxPiG/kf67hO7ngrkaLExhs O1Rw== ARC-Authentication-Results: i=1; mx.google.com; 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 a21si1798338pgv.185.2019.08.15.06.20.14; Thu, 15 Aug 2019 06:20:32 -0700 (PDT) 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; 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 S1732184AbfHONRV convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Aug 2019 09:17:21 -0400 Received: from esa2.mentor.iphmx.com ([68.232.141.98]:4217 "EHLO esa2.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731747AbfHONRV (ORCPT ); Thu, 15 Aug 2019 09:17:21 -0400 IronPort-SDR: CZqAmgBqt90rwvWsRi5vb1fTTKYZGxvJ8oRExRKJmAhQ5naPKaZRbd3x2eRSL8ttmHc9JNHtWf cMeQrgsoDf1/NfvWXi4sJYwoAUJFAtafVEyG06KKfrj6xa2B/6YJrhgMffLzO0DAZfOeC4QsKZ 0N4dDOjx9lcDlyFNP2Nb5/k8AtQOve2z93CvUJzBpuMmNZgPZZU5f7tduxfoZEsrrC4qS0ykW/ snBWW7ge4GdPY+vGRBDfBFHkyt1ZgycdoWEZ8+huNq949KuAhVaPPwY6fz9XsOeD9VsLu8yg8B oNI= X-IronPort-AV: E=Sophos;i="5.64,389,1559548800"; d="scan'208";a="40459753" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 15 Aug 2019 05:17:07 -0800 IronPort-SDR: SpxPcx9utDYLec0NRy33av/mbpCMPViEgzxb2qwobB+PebuBH/m1zx6KKp/ZKyjsHqT7Z1DNMi fpTU6iUVS3viYdAGY/2fbxzVRQnnfp60Wbl2Up/BHwV5c3HpF361gDMv9YJ6JJdypjliG6O/Sq uWjLV7NKvapZ8aiO0GFyqzC1KJx7RPLGrqC1OSoMQzv6wh/QnWNWZxna3Kb7NRKSvLVmAFnIMs 4F9xPfYCrx8JSnjT9eyBRie9IyRBkW9c8zXJHPeV/fH6Ts57T2xWCxRAg3lPHmnaFWYeFxDh3Z HpI= From: "Schmid, Carsten" To: Wei Yang CC: Linus Torvalds , "bp@suse.de" , "dan.j.williams@intel.com" , "mingo@kernel.org" , "dave.hansen@linux.intel.com" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "osalvador@suse.de" , "rdunlap@infradead.org" , "richardw.yang@linux.intel.com" , "gregkh@linuxfoundation.org" , Hans de Goede Subject: AW: [PATCH v2] kernel/resource.c: invalidate parent when freed resource has childs Thread-Topic: [PATCH v2] kernel/resource.c: invalidate parent when freed resource has childs Thread-Index: AQHVUq5kcb5Ex7JpNUSktSjVjdFue6b6xMYAgAEUHnCAAESkAIAAERsQ Date: Thu, 15 Aug 2019 13:17:01 +0000 Message-ID: References: <1565278859475.1962@mentor.com> <1565358624103.3694@mentor.com> <20190809223831.fk4uyrzscr366syr@master> <1565794104204.54092@mentor.com> <20190814162932.alwo7g4664c2dtp3@master> <20190815130328.yk4cybuuqnzb7xrx@master> In-Reply-To: <20190815130328.yk4cybuuqnzb7xrx@master> Accept-Language: de-DE, en-IE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [137.202.0.90] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > My gut feeling is this is the problem from mal-functional driver, e.g. > xhci-hcd. We do our best to protect core kernel from it instead of do the > cleanup for it. Agree. My intention wasn't to fix mal-functional driver, but to give it a hint that it's doing something wrong. (In the xhci-hcd case the patch indirectly avoids the later use-after-free in driver, a nice side effect here) I think the same what Linus meant with > I'm less interested in the xhci-hcd case - which I certainly *hope* is > fixed already? - than in "if this happens somewhere else". What about giving only a WARN_ONCE? Wouldn't hurt but notice developers and ease bug hunting. Would be fine for me too. Finally, i also could put the patch in a private branch named "useful_patches" ;-) but then the community won't benefit. > > So my suggestion is to look into why xhci-hcd behave like this and fix that. > xhci-hcd fix proposal @ Hans de Goede already. Best regards Carsten