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=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 3710DC48BE6 for ; Wed, 16 Jun 2021 05:59:01 +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 F0BA76128C for ; Wed, 16 Jun 2021 05:59:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0BA76128C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=BGM4lbTg24bUQeyJCKBpUuHi1k0B7QFLfYY2O1bJiVI=; b=ljE/SdAvUUJzu7 VmDl9eCiBDiu3uqDLWh5Jet+t4nlndh8CECV4jjSfpaxVske0I88/A0/F+VC/CjEIzP6SMvoamlLH L76E0ZQUoT+9RZR1kZfbUfj+CV/4gjEs0Ue0cFxB/huSPdLK12zJf9vJBJXO+9AolXlAeov634R/6 x1mGe0AD1+NPzQNAz3K5/T2To4NkDCqUf4qOwC9JpfI97AU9rH9uXy6GVxeoLAmFA0WYOkyL8dkrA dGZ8I17AijwLiyBv+cqrF/ZUKDdgS1MZYzUTRs6dZBVBGjQ1Rf4agDiCs0RDs9wokrmHq6EXZmdqZ XvXsB8xiaGwHwyd+KVrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltOY1-004xtS-Sf; Wed, 16 Jun 2021 05:57:10 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltOXy-004xsw-7w for linux-arm-kernel@lists.infradead.org; Wed, 16 Jun 2021 05:57:07 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 875CF580540; Wed, 16 Jun 2021 01:57:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 16 Jun 2021 01:57:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=6o2++wp3mzDB60pqIbQAizqx98C rlRSOwBDWbj2M7lc=; b=jBYt0LGpFJAtwLVmkqHh+GIs0Es+j2fONLOGzANuUL8 0aTSr75ozKKLq3WTb/DAg9JdfcMyy3PLqza4Zl7OuplyN9KJ38JXkSqTKB4vdpym 5G9lVVJK6Ve4x9/98UE1ctPhdAgPrCJTj5oHGoINMxLrHPPJM6Md553eDB1mSBzY Y4d2MrT8zj0O8EavljCAsub08xqUsCG8/rMnKsY7pGF3WhUTlcnOHFvaZJLhNKvA IaiMJBNeAhHRzBhU1aXYdZF9VQuMv1UfEX4U6s2hysVtAP7OpTdp35vWowpf65Gf /mbOPxFx+EYwYuUyhLUcDKRR3WItDsiF29dBacMMT1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6o2++w p3mzDB60pqIbQAizqx98CrlRSOwBDWbj2M7lc=; b=udIsree2BW1sB+/LAyCoHG MMqXLv5fYUKMxtBV8t5Zld4pUgPS+Zh1gfM4L9KgwCHqbUZ2ZzP70bhrG4exUmSX FnV+RCUERLLqe3RwgXNMf5w234SPYhN/2070ocg2cVJtBe+vzwQdY6MKdGSMI5g7 U2Gj+O3jfnuz4FlbpR2sltf9uwpvDJgvz4Qe6V3LmTNoI41FcuojfGNv+5dj5kbE 6FN15yXZvKwYTb0SNz/ifCCYL5Km+KlRMXE0KF6g8TqBhuVyO6BQxUeSI42/mLIM FwoB/9xHrmSbqNIRI7ff9w/1MGrQY2/lUuPSxOyJ5cCWEh7DeVN71JP85I0uJ0+A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvkedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepveeuhe ejgfffgfeivddukedvkedtleelleeghfeljeeiueeggeevueduudekvdetnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Jun 2021 01:57:00 -0400 (EDT) Date: Wed, 16 Jun 2021 07:56:58 +0200 From: Greg KH To: Siddharth Gupta Cc: bjorn.andersson@linaro.org, ohad@wizery.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, psodagud@codeaurora.org, stable@vger.kernel.org Subject: Re: [PATCH v4 4/4] remoteproc: core: Cleanup device in case of failure Message-ID: References: <1623783824-13395-1-git-send-email-sidgup@codeaurora.org> <1623783824-13395-5-git-send-email-sidgup@codeaurora.org> <75ce2563-3d34-a578-200d-8ec5f259d405@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <75ce2563-3d34-a578-200d-8ec5f259d405@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_225706_407885_898322C0 X-CRM114-Status: GOOD ( 15.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 15, 2021 at 01:21:11PM -0700, Siddharth Gupta wrote: > > On 6/15/2021 12:06 PM, Greg KH wrote: > > On Tue, Jun 15, 2021 at 12:03:44PM -0700, Siddharth Gupta wrote: > > > When a failure occurs in rproc_add() it returns an error, but does > > > not cleanup after itself. This change adds the failure path in such > > > cases. > > > > > > Signed-off-by: Siddharth Gupta > > > Cc: stable@vger.kernel.org > > > --- > > > drivers/remoteproc/remoteproc_core.c | 15 ++++++++++++--- > > > 1 file changed, 12 insertions(+), 3 deletions(-) > > Why is this needed for stable kernels? And again, a Fixes: tag? > Patch 2 and patch 3 are leading up to fix rproc_add() > in case of a failure. This means we'll have errors with > use after free unless we call device_del() or cdev_del(), > also the sysfs and devtempfs nodes will also not be > removed. Then please explain that better in the changelogs. At it is, no one knows this. greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel