From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C09B9C433EF for ; Mon, 4 Oct 2021 18:40:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85E4461409 for ; Mon, 4 Oct 2021 18:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 85E4461409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ubsQJtwutQpNTkBcCv5q/t2DMLKn2PMa4v4Ls0Tf0hk=; b=bVWXrHR+3b9+QE mVTsKoucfnkSUg0ACTSluO4AetzAsV/kQVHQ2YbCenZst1V06KzCnxjfOudPuDP9meU0lH3QzoHs4 HlI/AuY01Ndif7nF4Vh1qwPNb2ovXfqtAWjJdLNh/ZNMVX3AAiiABqufSnjO/LYWlLmQIwXBu8E1Q 1o9kX0vLqhOO5AezA7UrTXvJvq+fHuduWTnYgaYQqqD8PB0xSoR9c0llQUn+cWXwOPyEvsCkFw9n9 2YkeosjUUs4L1zwTw0n6/ey0igGm835Sz0ULlmcyUztWiIgJVsBrUGtEqxmEnCg+QcYVS+Yg6XQLs BcOwsZZZibdRGoYu4tDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXSqY-007iaV-3n; Mon, 04 Oct 2021 18:37:54 +0000 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXSqT-007iYv-5l for linux-arm-kernel@lists.infradead.org; Mon, 04 Oct 2021 18:37:50 +0000 Received: by mail-qv1-xf2d.google.com with SMTP id z3so3760715qvl.9 for ; Mon, 04 Oct 2021 11:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=opQXkszJB/xI/CFEweHtwFwzXpmjuocqMiJ4mS50dYE=; b=b7Sh25BKHqelVTUcxTNbaN7jMfAOYIXUxdy8ORjjPICT01gZjKGqrFxfeU8Td2HxAU deli6t51BPPmLSPTseE4YGU7NCy9xdl1WR4WqYEun72GUtgyDDAQ/8/NfcXgxc+B2t+G GhMb++XgNidvQo/CzOOKZoSqmEQ4Nek6Bb00LwhlGiwqq1obtL2Gs/L/cFjlZRek9St8 CwyCua8bpBHQF+qeD+dKv7uECPhddXcOXfPY1u7mFKmj6Xxzl/lTMbEong4sBDyEpAeJ +8qOMh9UMezoWD83TfRgtW+oW16N9FpXpoKRgVhTp6FAXdoDZrGpeZUSkcKfxr42Paly bZPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=opQXkszJB/xI/CFEweHtwFwzXpmjuocqMiJ4mS50dYE=; b=S/NpjtwVcqmCZxrRSV2cwGEGfRM2lu0XaqgoPKHCreklz1/APi2M80gcK8T0iGSkAm xOviTUC9f5ZjcVvgaUSPhH9FOcslyOJbcu7qZdJdJgekpeiSIRqu2JtntP/NC8BBRb6x 1Fzp8eFHzYU76EBF/Cuzm9Dv6QgVrpevGhy4ZnemCitpCM/g253XyBMJzD4s61NSTMfM jm3kAv02J8hXf2KMT8uRE93Ovavzw0ozK1G6faZbmEVdTlWm9pUUVSNJzG70zmyhw32O NLrCSbw10OWCd3PbF1urMJOVqNf+Ekz0O8h1a7kDaur6mH8TFOL2/sDI5N9qUF4U0BQR cEDw== X-Gm-Message-State: AOAM532P6Xr6j3sIoOsD/0OH8+sc2LSVPSqpTzuklKRbQQV5VjkJqr2S 0rWvSOXXVv1036TlXrTCEoM89A== X-Google-Smtp-Source: ABdhPJxvpKiddo40Ttp/UXy5PfhHTvizcb3Vya8u5FCSvClWPUbTrUxGC7x7DyatGadHStH7piuIWA== X-Received: by 2002:a05:6214:1269:: with SMTP id r9mr23630686qvv.35.1633372667814; Mon, 04 Oct 2021 11:37:47 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id w23sm22967qts.89.2021.10.04.11.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 11:37:47 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1mXSqQ-00AZUO-JW; Mon, 04 Oct 2021 15:37:46 -0300 Date: Mon, 4 Oct 2021 15:37:46 -0300 From: Jason Gunthorpe To: Lino Sanfilippo Cc: Mark Brown , f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, nsaenz@kernel.org, linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, p.rosenberger@kunbus.com, linux-integrity@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] spi: bcm2835: do not unregister controller in shutdown handler Message-ID: <20211004183746.GC3544071@ziepe.ca> References: <20210928195657.5573-1-LinoSanfilippo@gmx.de> <20211001175422.GA53652@sirena.org.uk> <2c4d7115-7a02-f79e-c91b-3c2dd54051b2@gmx.de> <20211004131756.GW3544071@ziepe.ca> <20211004154436.GY3544071@ziepe.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211004_113749_327432_08BE03D7 X-CRM114-Status: GOOD ( 14.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 04, 2021 at 08:30:52PM +0200, Lino Sanfilippo wrote: > On 04.10.21 at 17:44, Jason Gunthorpe wrote: > > > > > Well, that is up to the driver implementing this. It looks like device > > shutdown is called before the userspace is all nuked so yes, > > concurrency with userspace is a possible concern here. > > > > So the TPM driver has to handle remove() after shutdown() anyway, right? > Because even if not caused by the BCM2835 drivers controller unregistration > something else could unload the module and the problem (NULL pointer access) > would be the same. Technically yes, remove shouldn't crash in this ordering - but it should be difficult for remove to be called after shutdown in any normal system. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel