Received: by 10.223.185.116 with SMTP id b49csp7543229wrg; Thu, 1 Mar 2018 07:11:44 -0800 (PST) X-Google-Smtp-Source: AG47ELu0OxCVVzNAvDWJdgBDnBhtnfH5FBJZbFkk6eMC+7gFcGov2Fn+T7e6UVXhrSWbuSJjtQyU X-Received: by 10.101.64.139 with SMTP id t11mr1794921pgp.304.1519917104538; Thu, 01 Mar 2018 07:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519917104; cv=none; d=google.com; s=arc-20160816; b=0W6mKah3MdvQMv4tb9Igzp7SJdTEtQXBBHpdIakNyHFN0DNL2SNHQS/9YMwrBrEALn 6IFhu3gwa1pf8qkOZr1ovITqePX0LjZjdqA84pU7rgOVSYzyZBSU4IzkJqMilbTYO1g1 2PVRih12paR+UvkaYlSszChoBhneJhmc9OHqNe85fkBbTpOY7CiPRoj+Wiug/Pytyxx+ xMlSULqMl5Cs1qus4XPMsTySYOG7cUKUIIWy2VTBi3Q/A88a8ZZlqnaOncd+gbuq95uD 4xskzZ/9qXcI8XwCUy/E+dLUGAZwl2aR2X3qaF7zCRcMKBDEHgLOvWYUdlb891Dcc56C EGMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=wtTl7B04Bu39+95qAyZ13Q8SR3/fgKASgsKLmY3lj7M=; b=habRIqts/ss4vK64YlkajNSGP7wqRU2VB2WriwrZwk58TPxJHSYCNUg0aGrvs7L6oM GOotpSa3KtEAQlm+hRnuad4asANDTMwuzyE/trJ+9Ibcvm31PeIci9cpU8rSsMfxsnNI CPRAoF+/qTp6mWo8DJZsCbEke/9xN1KTUWgdIQw0VCMOrgwp1ANPU560Uxg9c9a+q2nQ MK6UIq+UOeyElKXLeHG0U54+BqD8Y53p9ox7leTveafEYI2Si55GCSMSNqsyHIAJsMtd lArjcFE9iK69J+UVCCV55fB3CGaqUjrt1+o/EEJxVGRbebXTQeB6CDgTG0fBWhjK5ZoM nKtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=U0zMiLP7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b91-v6si3148609plb.268.2018.03.01.07.11.29; Thu, 01 Mar 2018 07:11:44 -0800 (PST) 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=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=U0zMiLP7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031765AbeCAPJK (ORCPT + 99 others); Thu, 1 Mar 2018 10:09:10 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:50411 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031666AbeCAPJH (ORCPT ); Thu, 1 Mar 2018 10:09:07 -0500 Received: by mail-wm0-f42.google.com with SMTP id w128so12669194wmw.0 for ; Thu, 01 Mar 2018 07:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=javigon-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wtTl7B04Bu39+95qAyZ13Q8SR3/fgKASgsKLmY3lj7M=; b=U0zMiLP7LqQmkJV+8Y0fUXinpD5BwV14XDOwz/V3l9W//Xe0bivGIIAXbsvGDQnBiG QLHBuThhXa2PgLFRKO3FXL01IXzVevEmkZQ7wP1t7sRzsH+are8EDW3cjVzBJBj8Bo9k g5GH2oDh6gRo2Hg/GarfXkFFVpCw6HNXPFVaLn3n2jxUjnd6jLt5rAxGwLJvrxBHpMGl E9c5RLHDxxhilJLO4nShOCzOtTathlcBCpojoyz8twsb0Le4PPxWaIKKg4yJWcvzpf/8 xaXPlC1UQXU8tRNpMT/cSEwyqYcxrypkCUuw8L2Gnp1jJbQe7dtmZzC1aM9C8s+VeO4S rsPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wtTl7B04Bu39+95qAyZ13Q8SR3/fgKASgsKLmY3lj7M=; b=U2TXpViQPMn6j1y2ScgPpA7FK4gFfx0cuzQU88J7XvZd2Of0sEAcR180NPMxb2baZd DLfvkU5Yogd05LlVsgN2m+Es0DRpBdzVMgoBMsi42CJ2HerTYtumGHMTftU/K+jTsfXO vNAVPIobYuXINwsuUELtaU1t/9BzHqW7MhGNc/nQ6AcfQRggmD1Cq/X3N/SYkmAU/tlY ww/Sbmcg1pawnnFUoNJywYpEXDJBPzznm7h55nsnCXbG95hIWoOGy3E0xL10o+rm+9B3 OzbPDgiyQFqNePEHehVj+KBzE94QC9AYPPIXV6Ix1Z+JOMDAHtrDHA5HiKVUaA0Kd6+f 9IgQ== X-Gm-Message-State: APf1xPBnuCbGikTaWmPi22EcY/erbbMbJQsqgUrQVXR0DqB2EORzddFi 46w4aLsz8RVbYMJAUwz8mBuPJQ== X-Received: by 10.80.244.161 with SMTP id s30mr3248325edm.262.1519916946735; Thu, 01 Mar 2018 07:09:06 -0800 (PST) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id 26sm5529348eds.26.2018.03.01.07.09.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 07:09:06 -0800 (PST) From: "=?UTF-8?q?Javier=20Gonz=C3=A1lez?=" X-Google-Original-From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: mb@lightnvm.io Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, dan.carpenter@oracle.com, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= Subject: [PATCH] lightnvm: pblk: refactor init/exit sequences Date: Thu, 1 Mar 2018 16:08:55 +0100 Message-Id: <1519916936-30079-1-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The init/exit sequences have grown in a very bad way. Refactor them to eliminate dependencies across initialization modules. One of these dependencies caused a bad double free when introducing a preparation patch for 2.0 bad block identification. This was reported by Dan Carpenter and 0-DAY. Matias, Since you have not send the PR to Jens, please squash this patch with: lightnvm: pblk: refactor bad block identification You will notice that I had queued this patch on the 2.0 series. I did the rebase now, which is probably what I should have done from the beginning. Since I'll be sending a V5 for it, this should not be a problem. Thanks, Javier Javier González (1): lightnvm: pblk: refactor init/exit sequences drivers/lightnvm/pblk-init.c | 412 +++++++++++++++++++++---------------------- 1 file changed, 206 insertions(+), 206 deletions(-) -- 2.7.4