Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2615138pxk; Sun, 4 Oct 2020 06:01:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWfWWiuQo1+xjDb2IYsXVf877OYYSe7gz0b/4QG/II0r+tob4BrjW1PrNQzGLFK72w9hBl X-Received: by 2002:a17:906:aec1:: with SMTP id me1mr10935637ejb.225.1601816513778; Sun, 04 Oct 2020 06:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601816513; cv=none; d=google.com; s=arc-20160816; b=fVwRi4dDf+XljiUruD0OoSSxHa4NfyeTNRRk2xN3BGKEYN16CXMOuDEA7UADOSPeWN dbm7zeAnArnwS4EOkJdmpY9yywwrpbTh3VonPB4PxRtTWLAdJjD03kkNsABZ94rcHkRI 7JmDIokrRVdKH/StyJqCJBCNxcay9wgRZle4fncUUXLzxLv5WrlvWwNjSbJZtYN/o6bh T1I0eACsTZEs7H/r1tvrSE3SDbmdOib8elG+31FV6lEKPy4js6PfdyS42frodT8vkeKn 71RFNAU+2Cgj9cGWeDrP8Z+tKXv1vZTrvBW3vsNmNbUB25Fuf0tjUglJT0uFSSIfmymb PDTg== 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; bh=Z6ZD2H8FpZ0rHEUXMbv7/Pm4od+MzLpFsZTxyNgOqbU=; b=g07d4Meo07BDplo5x3ugdXunP+AOviRZmlMqAK7YTKduBEWmzNh9UK4VQAFpopSVmK qaD+RbfiM1uPUCYPtFM7zkFekzKQ0WzTODqVuB3Gu+PlziWzFYhVj3UfzZ7RbIXH0AOL Y1TQpetlcF7c8j1n1j0rWfBP4dN8l6HLJExQkkaOIdjVRjIyXJIy2z8KjM7j49k7nlnl mIrDNghT9HX88uc+YAvJPux9RBp1M14yyD/ZaU/N3lN6GfjIzhRJyop1MjK978txnXyH vq51qRiO61LEZosEqKhgPFvxrZeqHASqCPY8PPQUtU7i9T+Y0XVIlKfi6LlkAvxNbRUt lbLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aKYWqbO2; 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 g1si5994737ejf.109.2020.10.04.06.01.30; Sun, 04 Oct 2020 06:01:53 -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=default header.b=aKYWqbO2; 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 S1726128AbgJDM6G (ORCPT + 99 others); Sun, 4 Oct 2020 08:58:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbgJDM6G (ORCPT ); Sun, 4 Oct 2020 08:58:06 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1CFF206C1; Sun, 4 Oct 2020 12:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601816286; bh=q7voBvalkDYpHVnayj03vU/GtK9W1LMSggDb9TuxEdA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aKYWqbO2Upswj3dhmabn599HhUBqmJwFxKEqXlj39Rnb/2xBIPUVLCDFldQFMS8OG ZV/EKiQRDq6JRFGelptrTRSMBq/5JelWEJATKt5eBeU/ucOUngOEU4qHQg2hjPw1iO exZcipQgx1U2ntWRSjw3HDwl+OdIyJDJLYJm1J1A= Date: Sun, 4 Oct 2020 08:58:04 -0400 From: Sasha Levin To: Sascha Hauer Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Mark Brown , linux-spi@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.8 28/29] spi: fsl-dspi: fix use-after-free in remove path Message-ID: <20201004125804.GL2415204@sasha-vm> References: <20200929013027.2406344-1-sashal@kernel.org> <20200929013027.2406344-28-sashal@kernel.org> <20200929062216.GL11648@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200929062216.GL11648@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 08:22:16AM +0200, Sascha Hauer wrote: >Hi Sasha, > >On Mon, Sep 28, 2020 at 09:30:25PM -0400, Sasha Levin wrote: >> From: Sascha Hauer >> >> [ Upstream commit 530b5affc675ade5db4a03f04ed7cd66806c8a1a ] >> >> spi_unregister_controller() not only unregisters the controller, but >> also frees the controller. This will free the driver data with it, so >> we must not access it later dspi_remove(). >> >> Solve this by allocating the driver data separately from the SPI >> controller. >> >> Signed-off-by: Sascha Hauer >> Link: https://lore.kernel.org/r/20200923131026.20707-1-s.hauer@pengutronix.de >> Signed-off-by: Mark Brown >> Signed-off-by: Sasha Levin >> --- >> drivers/spi/spi-fsl-dspi.c | 12 +++++++----- >> 1 file changed, 7 insertions(+), 5 deletions(-) > >This patch causes a regression and shouldn't be applied without the fix >in https://lkml.org/lkml/2020/9/28/300. Looks like the fix didn't make it yet, so I'll drop the patch. -- Thanks, Sasha