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 E4DB6C433EF for ; Sat, 16 Oct 2021 00:14:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 75098611F0 for ; Sat, 16 Oct 2021 00:14:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 75098611F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HWNtY6v9fz3cCY for ; Sat, 16 Oct 2021 11:14:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel-com.20210112.gappssmtp.com header.i=@intel-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=22FCMxDj; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=intel.com (client-ip=2607:f8b0:4864:20::42f; helo=mail-pf1-x42f.google.com; envelope-from=dan.j.williams@intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel-com.20210112.gappssmtp.com header.i=@intel-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=22FCMxDj; dkim-atps=neutral Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HWNsp6Xdhz2yns for ; Sat, 16 Oct 2021 11:13:59 +1100 (AEDT) Received: by mail-pf1-x42f.google.com with SMTP id y7so9666696pfg.8 for ; Fri, 15 Oct 2021 17:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rQCqnCKj+Qob3RGhvKowF7vjQkMvz3jzVYQ6ojJDBgk=; b=22FCMxDjuptu5z2WXUhWAGeGxsQDD/V8j37BH7gzChQavhMTsYfwOs16+0368VAEwm H9Kn5GtjOlGOoLtQHyP63Q2TpGtOd+bYEeoJ7yrQrZF8Gd5SjSTBe4bjtPPHCkHVAMnX IKOrAb7pR6jb0J/r9z7kk4abkd4nzTZJqkNyspbONodFaBFVZGgHceRMhIUL1AnjE8EE QtZ+EolKR2dxl4bSkgWIlNfGf3FEfjjORJKFElmg1CgQAa4omqi87tX+bb0lzqw7atj/ 9H8nfrhpQOc6LGhupM+SVewu7XdQegTluU6pnHJSo4uAockAmkpsZzfTuVIRBEfs5F0h AY8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rQCqnCKj+Qob3RGhvKowF7vjQkMvz3jzVYQ6ojJDBgk=; b=wocHACwans0LTxT80TFotFgdQ2h9az0W9AMZ9lLhk3UGBl6GT7kQrbJJqiMOTlMMla u6GCFFE9fWoezTls5WmznbfjsjVySgZzb62TIkXR+vSpFyX/JAAGkXYD+92SmicmDqEk s/YAW+M9w3xdKIjegqXrkVT1xGHiksnQ1AY00a5ryxjQD6qu0HbfQrWoSLetrPmuf1ZA D0CY3SN2k+L5l1qhs/KQkVmvMDLOL7tl+owTEjtBd9UgErVIUF0Tl1UCTeCPBREGz38P 6IZ9SgkkRBMlmtjWseCfJono40cngf36EUFbalp+kJz3QBVIK6NOw9ICU6Lc4JoUUVo2 qTfw== X-Gm-Message-State: AOAM531SjBiHKiPCDd1fF8d6A3aYexz1RixZlryltKIRTeQaDgdhgkui t3AIgoM37G0pbPAl9VXMjUveKYyM+oUhFyjz7ZhuNQ== X-Google-Smtp-Source: ABdhPJyHjqiChiYGgEV/QjEsOo/jEjfBLMsWIS4VVM51yMBTI+afNI+/nTgDPsjRchZ2uu+6VeHhZ/gjMvW7ySA684s= X-Received: by 2002:a63:6bc2:: with SMTP id g185mr6607076pgc.356.1634343237273; Fri, 15 Oct 2021 17:13:57 -0700 (PDT) MIME-Version: 1.0 References: <20211015235219.2191207-1-mcgrof@kernel.org> <20211015235219.2191207-7-mcgrof@kernel.org> In-Reply-To: <20211015235219.2191207-7-mcgrof@kernel.org> From: Dan Williams Date: Fri, 15 Oct 2021 17:13:48 -0700 Message-ID: Subject: Re: [PATCH 06/13] nvdimm/blk: avoid calling del_gendisk() on early failures To: Luis Chamberlain Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux NVDIMM , vigneshr@ti.com, linux-nvme@lists.infradead.org, Paul Mackerras , miquel.raynal@bootlin.com, "Weiny, Ira" , Christoph Hellwig , Dave Jiang , Sagi Grimberg , Minchan Kim , Vishal L Verma , Nitin Gupta , linux-block@vger.kernel.org, Keith Busch , Jens Axboe , Geoff Levand , Linux Kernel Mailing List , Jim Paris , senozhatsky@chromium.org, Richard Weinberger , linux-mtd@lists.infradead.org, linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Oct 15, 2021 at 4:53 PM Luis Chamberlain wrote: > > If nd_integrity_init() fails we'd get del_gendisk() called, > but that's not correct as we should only call that if we're > done with device_add_disk(). Fix this by providing unwinding > prior to the devm call being registered and moving the devm > registration to the very end. > > This should fix calling del_gendisk() if nd_integrity_init() > fails. I only spotted this issue through code inspection. It > does not fix any real world bug. > Just fyi, I'm preparing patches to delete this driver completely as it is unused by any shipping platform. I hope to get that removal into v5.16.