Received: by 2002:a17:90a:37e8:0:0:0:0 with SMTP id v95csp8820117pjb; Tue, 1 Oct 2019 04:44:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKo98UrDS1p2pKy8MAJwj9+MCCfOrUG/g6lNMVC4eu7xA5rcSSN7yyN8ZQAVuuK/v59pp4 X-Received: by 2002:a17:906:1a08:: with SMTP id i8mr23950763ejf.231.1569930266258; Tue, 01 Oct 2019 04:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569930266; cv=none; d=google.com; s=arc-20160816; b=RFYsS2Hgo6RqqZtCzF9Ppbw1SHKdp3tCdVQBmDeuHZ1N6u7ew/sm+oG6YiM/k+BZHO fq5NWRwvU3Qzf6Fz927M8CMM/6AK4py8grKC2EbNd81wyKUOKwN8D1AyjNkA/Ih6ZqqR DpXLEui4zUt5gzPO4UcqfZ24uqvDDMe1m7Q2EOYw8/g4oJSRYGVew/0guelSijYe7LnC Y+gK9NMmO1Z9jq8mLXDvAcuItognCis+aO4ppQjhmrYhrn3NHFV78LxNMsITi2X89iox KT2BAuuHMp6ziftNnT8zuq/X5Nk6JlYeTJ8az18dtCZVhfpLdbmorg5cRlh91mWkO9bP pz2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=y1E3R8dLROwbz+u7OaMfdoIIhxQX9FooeMJGxRhUgSc=; b=cUxk8tjoXYyyb6S1lvYxGdsuhUB5lnV5QvQe419cIc3WX6O+D3OraSQaYybDm6BXw1 fBl25wzrm78708OdiYipKBIQGbYX9wgUUG7AjJcMaTFvcIdw/u+gSK8YV6uxi3ujZqBl a8L/Un9beFYZ46Q2U7wWQ/wl4Ord6RJRrgxbuEYxVsKjuMxdzfcIghg//JBRRVGwnGUA vlRxGIPawkBBRoE7RdXxKP7aQF0MgaGoFBIWINgrfFQOGBUJx3k4uViQM5l+jLYpqXft /MvY9SunRsNw/tmI63l/wui6vBosKBpIdBpLEWM0Nr4Yu2YGucG3j4ajkQJeMLkNcrJE nxfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=xwRDywKy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w58si481839edc.312.2019.10.01.04.44.01; Tue, 01 Oct 2019 04:44:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=xwRDywKy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387707AbfJALlZ (ORCPT + 99 others); Tue, 1 Oct 2019 07:41:25 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:41432 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387681AbfJALlT (ORCPT ); Tue, 1 Oct 2019 07:41:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=y1E3R8dLROwbz+u7OaMfdoIIhxQX9FooeMJGxRhUgSc=; b=xwRDywKyS94HRdedy8s646tUp 27khmRCQ2coohEPGb5rQxVNMszzyodgQm8jAM01Z7xkR1ljJVRJ3hNnHnP/INxE7b3OiGvMpH2ZnK O/oEznclYQx5CkNUgSfBSXElIZxFphEfBZ6eyiLPl9DW/NENZnQfGAw0nHL9XhDuqf+ac=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iFGWi-0004Zb-UE; Tue, 01 Oct 2019 11:41:08 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 62C2E2742A31; Tue, 1 Oct 2019 12:41:08 +0100 (BST) Date: Tue, 1 Oct 2019 12:41:08 +0100 From: Mark Brown To: Geert Uytterhoeven Cc: Lukasz Majewski , Colin Ian King , linux-spi , Krzysztof Kozlowski , Linux Kernel Mailing List , kbuild test robot , Julia Lawall , Dan Carpenter Subject: Re: [PATCH] spi: Avoid calling spi_slave_abort() with kfreed spidev Message-ID: <20191001114108.GA4786@sirena.co.uk> References: <20191001090657.25721-1-lukma@denx.de> <20191001113420.032dbfef@jawa> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: X-Cookie: Keep refrigerated. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 01, 2019 at 12:00:07PM +0200, Geert Uytterhoeven wrote: > On Tue, Oct 1, 2019 at 11:34 AM Lukasz Majewski wrote: > > > On Tue, Oct 1, 2019 at 11:07 AM Lukasz Majewski wrote: > > The if (!dofree) prevents from calling spi_slave_abort() when > > spidev->spi == NULL and spidev is kfree'd. > If spidev->users != 0, the block checking spidev->spi == NULL is never > executed, and spi_slave_abort() will be called. > I'm wondering if spidev->spi can be NULL if spidev->users is still positive. It *shouldn't* be. I think we have other problems if it is. --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl2TO1MACgkQJNaLcl1U h9Co+gf9EMfuNyB92VOoFo9okqWdMzDPwyTkYJyk6HSgVicME9grYfHDe81a7GjJ 9Dph4fdIVAcDkIFL/MbVPi3hsJCKFy+8QV1htiKYl32T9J3fKWROCKUD67c+PDwb 6LV+0EZCb5He4bdw3/CbrMsLhDTMedQL0/smyCNVcfj9WNeRBX64tv+48sE6lCaZ bIGvhUppBJfIjDUU9hmKBweOp7XdMvGQE8SZmhruhgVEl/XICBkL73hYrHyW0QnJ 6FTJmaYLaW8nTDsk9XEiCM/AV8yC+hGdQhlEg4VxiGJ+1sm3QfXvyqYVQo7umAkV hNXIGjDoZ61XFt7E/0SnzKLru/taCg== =mQ+T -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--