Received: by 10.223.185.116 with SMTP id b49csp7602204wrg; Thu, 1 Mar 2018 08:04:19 -0800 (PST) X-Google-Smtp-Source: AG47ELvNf8FyaRMhqcE44nSjVygLFNDBEjrtXk9kVMdEujArE7wrJTcnkKT9pl1jWcdspKEy3F/d X-Received: by 10.99.114.24 with SMTP id n24mr1846335pgc.400.1519920109672; Thu, 01 Mar 2018 08:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519920109; cv=none; d=google.com; s=arc-20160816; b=n+FjM4gBTCIi1MhO/Wmn4lYpB+9A6mX4rK8cig59xV6VStSUWbCA3sv/5T89IhE/Sn qgyqm+ioHpnjKzrhzlu2XE6oxu3nJmid+7D2QLUNvngI2metJtmmfZfG9F/1dXHxKwti 7aFubkON1HjKqK+wPC1IMghlTieuFv1JgHSr8kJVJi9CcgG9xogCzo6W/W5u+zyCrr9I YdyuS/CI7XU98K/07qsoeiIHAOPrOGl641TVsu+NqL7x7UoRlP8+PsjK95uiHQJrRWBx 8BuJBcMX4QqURoEKvObuEbp0RDk15vcYdpTeHmF6fQU8GmpCG2TTmY3bvunqzAqJWj9/ tTfw== 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=13C+HjT19Dbgjc95fd27GGTY1srK1OmTEiYKD1aJHcU=; b=Yt4+t/p/2fqIJdTI5AtVdE2afA9IDlpRDUMS1dHfgHK5CEP6gWk66fTrQXyHp+E1pP 15KtiwDpihfGLGiJ2CGKEQqAgHIi4RFiSLV0EutPp0rKfnhwrQQKpzM/uQ/Ku7/KE1ZR nrHUA3hTjcOiLA1RGCNEyVBfbMTk2cyyb7U6BWYCMqBqzJeFL60u7Jk2nisOgBBtx1sR WTKnWTzNvn3rlLfMT2qxqLRRLDQijwXREaXfr1Dp6AwhEmKxztas6Tb/FMFJJ4oU7ZoD WX9qc9s0V53F3mdICTqA7uoefgUVKOmgk4GUWySvOQ7dBU8OLXSiTuRipHdj5dIUIidb Zjcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=iAPbQ/Jb; 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 33-v6si3231894plg.227.2018.03.01.08.01.27; Thu, 01 Mar 2018 08:01:49 -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=iAPbQ/Jb; 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 S1032733AbeCAQAP (ORCPT + 99 others); Thu, 1 Mar 2018 11:00:15 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:55974 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031541AbeCAQAM (ORCPT ); Thu, 1 Mar 2018 11:00:12 -0500 Received: by mail-wm0-f50.google.com with SMTP id q83so13099576wme.5 for ; Thu, 01 Mar 2018 08:00:11 -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=13C+HjT19Dbgjc95fd27GGTY1srK1OmTEiYKD1aJHcU=; b=iAPbQ/Jbb8eWh/ixJeM4QtUyEGsUZxan3Z3NAUVGS8I6PJGEkWyZc208IwD2xGL2v8 JqPC6J5KMGWU5UcrrGMbk8ngdbzOpnwgcnTatSG0MHZTZdjMORAOyv6uHV/ZtgojqF7j dO71qTAgIvOxnTDi+QPwapO6IjHDXNYtZWmUoZF7Xs3YFUO0MXcVZXO/c1sHr2QkcLr4 XMNqwR4RU1ORnr4QyUGitX7P1NQ1TntsEpNTK4OvWNHjodTaQ7UymTClIjc1lJt6AHJt 49Hs8GTbdc/zhLrJGk2hZZfGCHJ9CIzlkxnFdVamIcDre/31Jq72PY0lzq8yIMc2zcLj C2aA== 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=13C+HjT19Dbgjc95fd27GGTY1srK1OmTEiYKD1aJHcU=; b=jkprCnfy1B/T0ZHwqtRnmLJqTbRzWgz8chxXyn2sYitNUpWmwSQAp3NhTFXTOVeKPH 8kusf3P7AzQcROg1ntUEjFCOUFkAL4/opRGO5NS88Fo04ot44PJcqIFOHGUTJDnv1Vn5 oDMJDgyB0aimxk2f2F2Zux4twue15QGYrFrDtQyaga5gRUmuZY79M/1Rj+38A2u+mKnR umJa5inCTCZGqvvNxcuGKhejFoCPgfPmeXoqmo5PUWwIUvB9aK+NSKZSqVFm8mn4+VVG OKk94IDhdoUkDnc19PuKBVvsfUSOXQf/XviyxiB4fiLxrkqjekIbdWOIRkkPE2b8p4mV PcSg== X-Gm-Message-State: APf1xPCtPsfFkAUqlNEr+sY8FsGICiYKwhi/a0fTp//k7Oxqr+L04E/X fyuLMHBbEdXpFVl0saidV0PhlA== X-Received: by 10.80.154.6 with SMTP id o6mr3445229edb.146.1519920010951; Thu, 01 Mar 2018 08:00:10 -0800 (PST) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id r2sm3817005edm.82.2018.03.01.08.00.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 08:00:10 -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 V2] lightnvm: pblk: refactor init/exit sequences Date: Thu, 1 Mar 2018 16:59:57 +0100 Message-Id: <1519919998-20829-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 # Changes since V1 - Remove double check for factory initialization 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 | 415 +++++++++++++++++++++---------------------- 1 file changed, 206 insertions(+), 209 deletions(-) -- 2.7.4