Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp166182pxj; Tue, 15 Jun 2021 23:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycMCcwyTb5Dp0KR3GFX6bXMp5UO/nbyYYTFyLe5yghVS7lOMR1YIw0UJePbGVwyfwobMz2 X-Received: by 2002:a17:906:1792:: with SMTP id t18mr3449676eje.38.1623823269260; Tue, 15 Jun 2021 23:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623823269; cv=none; d=google.com; s=arc-20160816; b=URoQ1ZvKSr67m5Mdn7Cfo35nYJQdrFj25cXffVWY8Yj+/SbeMrwhBPkAFD5+DMT1Ot GNvogqmhnw0Vjr9mFGfdfSdQPDRN1v5xny6jCvnXfpCeT+IqqN8+NGbbySX/cTPdHfGl xCms7WZ3WEKB7tjQDyKDqoycKRKYJ7cryIcw+2pFQ4LtAm970MijpK1WCYYycNy/lR5I 9gnEs2gV88pWAQg3o7YIJu+eu3rFefwfNWCEY5GvjDvcTrkDA914Byn1YUy5jIDCvQqn u8WFGk0P1i97SXDeTR/5qVI+jv5fsR8BwpH5EKAq6L3UR5PAUFYrQaU+4X+uh3AVLxf7 ThYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=6o2++wp3mzDB60pqIbQAizqx98CrlRSOwBDWbj2M7lc=; b=ncfAG5F7p4p9+5/njvf23N+8djd6+651p3WkqyArS+ohjoFcxpixuoTSzKTxlM8oYZ QOqUXlmceIZLZYZz7qtSAue9MqWOzBjqgJOuGmgXfORiY8bnnwDuLwY+MhbqiiWVMV0q lFMueNGjkqezz+7O5UyjFkY45vypsPoXThGpx4lPB6dz8nqiXolVH9l6T4d3+wkO8anj ta/K34+RhjDpDLOAUal71piPIggHqwwkHChHLlnmDU+/WTWJH7wdCvIUvMc3gb6Kj9qZ 3Xi2HGkPnK3MQhljZblljwLrgMB+V273xlrm+ZTh6MLXcbxjfnsas5f19OktDdRGfO8a ydkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=jBYt0LGp; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=udIsree2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si1405770ejy.385.2021.06.15.23.00.46; Tue, 15 Jun 2021 23:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=jBYt0LGp; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=udIsree2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230515AbhFPF7J (ORCPT + 99 others); Wed, 16 Jun 2021 01:59:09 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:40961 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbhFPF7I (ORCPT ); Wed, 16 Jun 2021 01:59:08 -0400 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75ce2563-3d34-a578-200d-8ec5f259d405@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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