Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp640925pxf; Thu, 8 Apr 2021 09:56:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhdQJgzGgkfYeaWt/w/AnOFE76ApvUCM+kK1ASJGJ3nEuwCPa+JgiGt2YaqO8BLfDlWi0/ X-Received: by 2002:a05:6402:350f:: with SMTP id b15mr12628285edd.6.1617901012727; Thu, 08 Apr 2021 09:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617901012; cv=none; d=google.com; s=arc-20160816; b=D4nfuzUBxmvgf0WMrnqS//DRIdKYvqI+w1dBNhgWnp9cU0bj49+wgVy3OID0XUvGl1 dfNV6vcUMzvtBxJ5z1q7mbIJZkVwvA9vOpqUN7TvWkJtMOmVmDL4rS1qvMytb9X2USZy NfUHScl1ooUB4tOlIBSF0BmMAzBfpqvI/9QPtHEUn/b0IEUYwhqc8beUGGWXvlW8T5EO QcaFezQR408Gmcxwb4/MtpIajTSo2HfAbK6TwuZi+jfhtlOQ+3LCS8Uoc4N03A+XKTbA o7bzOQeeutG7VAXMbx5uWeC5j9ZW6WwE6C3G2PehUJx333kdHhpwoDmLpZGw1sBjZ7tD h3jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QsvCxs5/gwM1PbbpPz/mjL7cnX0sJm1OMzs0D+DxbGI=; b=fdC1HcE8ehi4tCA4FgefuwwJnK0xy3XM+nG+5f6kViNLxVGwXjgHTPwZG48dWciZBj 2QpnlDoBLiksnfmtF7nkXg7vwf/pyD+dGm301HtW3gzw1gWYbQGSqum8YRjaLT4YfOVv msUTNiilhdE8+xc5GF9zS/kkak7BAJIUbwzfY1sl4DZ5kIbA0fjxCK8r6KsaqNk3TEM9 iOpWZwhIqQfDx16mKN7i7O5UYNhcxhOzJJ8e3WpUnpDhg5FfCuhaQGCZJafLOZquN0nI viXPF/5p+mXrL38E/h1mmpHhwdRXDnXXVtWaoWyD/7AIUK4ajkOj2P8sHD8ibzhSeAlm F/Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XNZsOZPm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si5357364edy.462.2021.04.08.09.56.29; Thu, 08 Apr 2021 09:56:52 -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=@kernel.org header.s=k20201202 header.b=XNZsOZPm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232344AbhDHQzb (ORCPT + 99 others); Thu, 8 Apr 2021 12:55:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:41350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231752AbhDHQzY (ORCPT ); Thu, 8 Apr 2021 12:55:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E5DBA610CB; Thu, 8 Apr 2021 16:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617900913; bh=rbTuItiTLFrD2UbPN0IdtgNS9mA9OgOsKwcubsBPYNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XNZsOZPmvJkKgwtcS2YKhgyARl9pGvz7IJbNYMHlheeG0YM1oNpXaJoS3xk1nSZ/L 17+d8VA4EhI7yGma93bBPe8zK7cb4KBSHOsXA1hWKWoMKR0Y2GUN9VU+sppPFhG9M6 HmtKSNLkXiCsnyx12qrZ3ScqZifFRm+387PGcDHrSnqbgJ1u8iFH5IO4A/rWQ5Gkzi v8s5S/JnrVI9WpUQdQc7NJ1wAZxneEIU6F0hxqX/xP14mGs9ENq6ZUkECiUMPEzuNk IeJMxjd82Roq4zna+zhNoCUyxo7dai2z7dSJawUaSjatIZCNlNd2sJwPRNcqErA/RR tEQBzYdWKbrcQ== From: Mark Brown To: "William A. Kennington III" Cc: Mark Brown , Joel Stanley , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: Fix use-after-free with devm_spi_alloc_* Date: Thu, 8 Apr 2021 17:54:34 +0100 Message-Id: <161790025317.17096.2046216267474815618.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210407095527.2771582-1-wak@google.com> References: <20210407095527.2771582-1-wak@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Apr 2021 02:55:27 -0700, William A. Kennington III wrote: > We can't rely on the contents of the devres list during > spi_unregister_controller(), as the list is already torn down at the > time we perform devres_find() for devm_spi_release_controller. This > causes devices registered with devm_spi_alloc_{master,slave}() to be > mistakenly identified as legacy, non-devm managed devices and have their > reference counters decremented below 0. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: Fix use-after-free with devm_spi_alloc_* commit: 794aaf01444d4e765e2b067cba01cc69c1c68ed9 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark