Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1555005pxf; Fri, 19 Mar 2021 09:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlxxEC54lW3LPnCqpaHqqgiqreXhE0GJjWWORwi00tU0WBSho0wK7Zrut+0gnOyBXHfRbT X-Received: by 2002:aa7:c709:: with SMTP id i9mr10716072edq.319.1616171925995; Fri, 19 Mar 2021 09:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616171925; cv=none; d=google.com; s=arc-20160816; b=zYPFAfJOio3aj1n23sQU9myJa0kJ9qgVfPDL7Neu2NeVoJEZiWJWReCzjgIAB+6vls dmSa4vfPvVkq5M239RiwfkOTOx95QublBQkDAy0NWMbuZP7lPrkui+z/ZwCkBcw+jKkD NzKCPpS8l26P8ZrpwsrcQkG6CApXtwLcwCo8tpxs1zpqPesUImvmw617RZNn332x0vrU sUFUyk3pD5+sX3V9KTEnUxMgu/8D5n1xo3db4A1GrwSFwC3k+b5s07tZdAK6n5o0R+wS XzxFfr5RJMGZVUS6Psb7nJxR1430QVbjfvNdeH/2IQMVrHBqNUTgMm7wipQNO082OJNp d5Vg== 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=HWtSeJGlejGX6DUHZGA52P2hmiKkPnfshPd9CTnwi/o=; b=SWXw5PX439fhTizLbLCZ491yyOngNlzB2BxPIcLitNcKC+se+GolI0rhZiJEvDvawu 9IMnUPOLNBoMMtiuogt8uk7z9WS9ZZFCf0uS5ohFniwTzOW9OOIj2kc3sSAMNW59nKW2 72KX4As93xAeHD8SAlSFg7sHMjeQkVqiKSLG5FufJYuHPfc0RltRkXktqNUO9cZzHMKT POFAia21Lmz2LXXE+fEvkoMhrnv8MojTGl79G3/xOeSYF8yy0S7yQrsBQ/FOJ08IbqQM SZIwcbEwoOW2wkaPn87TyYSndIyp1OCa8OKMF7PTrtp5UPdlRdYNvA7Btqmg1/PdR2OD TdXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZuDXGH84; 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 c13si4855566eje.45.2021.03.19.09.38.23; Fri, 19 Mar 2021 09:38:45 -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=ZuDXGH84; 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 S230125AbhCSQh0 (ORCPT + 99 others); Fri, 19 Mar 2021 12:37:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:56020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbhCSQhJ (ORCPT ); Fri, 19 Mar 2021 12:37:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7CF526148E; Fri, 19 Mar 2021 16:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616171829; bh=vze3nZ9XGVQKBDHy8nsHBoCFG5qVh398Hqss19Pvgcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZuDXGH84pbQdkB3SSfKOf0aSsTvCpyL0Mlax46k9BnxI/78JRYfBGQ2Qr2YtVdJn+ +7goMlBb6oAJyl9Qb30pwkTAqQgWmQhNQjgXl8nb1a3ww1E/DwhVaGpthffkGr0xMt N2IGeaTnwA67m9c7v9kVMO/gt49gBoZGXgI/mqjnNOt+5PBKF5oZNWxR6MvsDRavEa PBb45JvsX0r0zNhl4PUDHvffqnE/q7fLzk1idS65IIgQaTkZgPHOBWzDKge8xsL+j1 BbBFN0v6c04fP2PJj0cc6KD/0bqT+XX4wgAufxTc9NIiIv5Za2YZZ8/aslQq883f0v 3/BDim9n61K6Q== From: Mark Brown To: amelie.delaunay@foss.st.com, Alain Volmat Cc: Mark Brown , mcoquelin.stm32@gmail.com, fabrice.gasnier@foss.st.com, alexandre.torgue@foss.st.com, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, antonio.borneo@foss.st.com, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] spi: stm32: Fix use-after-free on unbind Date: Fri, 19 Mar 2021 16:37:03 +0000 Message-Id: <161617166734.9851.4969692619964809885.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <1616052290-10887-1-git-send-email-alain.volmat@foss.st.com> References: <1616052290-10887-1-git-send-email-alain.volmat@foss.st.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 Thu, 18 Mar 2021 08:24:50 +0100, Alain Volmat wrote: > stm32_spi_remove() accesses the driver's private data after calling > spi_unregister_master() even though that function releases the last > reference on the spi_master and thereby frees the private data. > > Fix by switching over to the new devm_spi_alloc_master() helper which > keeps the private data accessible until the driver has unbound. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: stm32: Fix use-after-free on unbind commit: 79c6246ae8793448c05da86a4c82298eed8549b0 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