Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2609891pxb; Sun, 17 Oct 2021 20:24:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8hdDEVeGgRoPXhgd+MlLxFI0/+GNht/9dDmMFmUHVjpwclOfeoSSnwFVXZjfdCamwdVk2 X-Received: by 2002:a17:90b:18f:: with SMTP id t15mr45265995pjs.19.1634527498604; Sun, 17 Oct 2021 20:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634527498; cv=none; d=google.com; s=arc-20160816; b=NpHy/EDzITp+OMRfIUlC0J61OWfPi5krXfqVmYWRIa9SIEosL7Qjct7yxl/RkVCTgk PKH+I9veOSph1ckAEV8Dwscc9KE/GdVoXLA5Pght68to7RUpSANCekSvbvkYfeTsmeQB cWyRhcZF+f+eUs+P5XQNEfVtCl9n/+TF/fMi3U2+ZA5oAcA5zxfeYXW4g/uozcyL1laz OX4INWBWZPIKlNUkc6Fx6UjSjv7M4rPIgP4QfE05sMRnCloZfjEIS6p53XzEgP9MAsTF ljTpM19UfMFp7SiaMXTVcqB2RdkHBv4bCEG7PxswHR4ziLuCv+mY//brwkdwsF64jHkw ADtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rQCqnCKj+Qob3RGhvKowF7vjQkMvz3jzVYQ6ojJDBgk=; b=ArHSE111LhhtHIFYCMIIBm2Ls7J+6Yi9EWA0y8A4k8x22ZawF/LBKdNgIBNSEVRrf9 eJFyFxq1H+c6Z0eJxpmTHNg+w+k6Bjf1golCYvRPhYSsU2FQODsQHCoFffId6H/9CM1B ANsMKJ0QAQ140JGeO0ga1MqWfIY4+JqcVeVFMEO9gjAOoMjgBg8jCOFnzPFzBLgko3gO l3KeF3tVlPBTX906LYD9Z0psxV0ZYSKQcRx7HaPm+Ymb+dN2a3qyhZt0IQw8yl5BIfYR iMVoBhBoSy1yxwSDQi2m4LWOlmEp8tE9GWPvQ/2P5PvwqGmPYuCuUzq0Y10AG+XSc2hu U6rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=22FCMxDj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 66si18715617pga.561.2021.10.17.20.24.47; Sun, 17 Oct 2021 20:24:58 -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=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=22FCMxDj; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239203AbhJPAQI (ORCPT + 98 others); Fri, 15 Oct 2021 20:16:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231881AbhJPAQF (ORCPT ); Fri, 15 Oct 2021 20:16:05 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6CF7C061762 for ; Fri, 15 Oct 2021 17:13:57 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id y7so9666695pfg.8 for ; Fri, 15 Oct 2021 17:13:57 -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=g3eYP6gN1HSlF3iClx9/CjNAFJLZJAvVyUrKwlUsg1BqLNXlIisZAbyee/2GAVYOh9 HChvduJrAE5WCsnHJqJfqgRUHxRiTdhF/glHZ9tmOoWAkxru7+dKLt4VQzL46Db8hsyA uu+zg/PCpsB0fY03C+M15JHToRrZJQjnVaCzjV8XnJGVcxcdoyeIWyNBSH71y4eUIYsX Yyz6j3tRBVYruDrXmJPi8g58midf2vmdiET0qbHuyj+gcx0wIQ+Irt0cDYmp+2OWi8Xi 3Ghu0pIGkFoEUwmE69aq3tm0Gls599O54T9s86RVIwYN/lSYxpH+C/ZEAZlYhCx8hOLA kemA== X-Gm-Message-State: AOAM532QYau1eNAa1kI5dzxt1zJ3ULE1zAx8urC9PJSykGqAYdTxSykz bNAWyzjDB8csHkRsvVp23EZyDqgTp+oQKSUrCBzbIQl9Qpg= 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 Cc: Jens Axboe , Geoff Levand , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jim Paris , Minchan Kim , Nitin Gupta , senozhatsky@chromium.org, Richard Weinberger , miquel.raynal@bootlin.com, vigneshr@ti.com, Vishal L Verma , Dave Jiang , "Weiny, Ira" , Keith Busch , Christoph Hellwig , Sagi Grimberg , linux-block@vger.kernel.org, linuxppc-dev , linux-mtd@lists.infradead.org, Linux NVDIMM , linux-nvme@lists.infradead.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.