Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2525403imj; Mon, 11 Feb 2019 04:25:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IZW5EpJjuXzjCZ3j4uTD6JDiFifMww8v18Cj2GjCNOwop9LtSpK1RctJyUj0TgXg+t/h2GD X-Received: by 2002:a63:e20a:: with SMTP id q10mr8700000pgh.206.1549887948501; Mon, 11 Feb 2019 04:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549887948; cv=none; d=google.com; s=arc-20160816; b=Fs1GmHs4q4W3jVO8VJoXL70MM3cDT3YcZQA/fImiF+KLkf7o9pvJTsXOW3Dk/yJZj2 7ffVPYcZh1LmtuC9/IuW4iRk5VFFrBjiqaNG5b7Qh0scKqSftvTgJV1kqp29Gcq6fugQ SenkD9OdTiikFWYpKganBoRjabq2sOpoo+fHKqcRRFDxV9x6PU9co8QTmSy01nMxpfzg fdhUOLarSNLVoglEOXNyBAPmeL0TFb/hZpb3Tm4iU3pGXA8+5ZLXj9dZao+sI31dWkUO wNweYg267P8KVI6To7uU5r7yLylJJ4z4/7/EGxd1kdT4pGgHepyh1UuJp+saZGCCFOOV 1UGw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KPfj6O2aC060Aqi37cieoJdRqiRZa7RZ5+dNEdZ/P94=; b=eGxUk+6SVO8dUUhjKTkqH8epbdxz9JuMTmtunFe07aeUy0ZNCEhDJMJ5oiqTW+wx0/ 6kynKzNjp4oR5CxGXOnTR0tWm9Nrkx/xaSgXGHBLiTWRZ2jc2yL00AVHKouHc75h9z/B 2bq6jP7cDgahohZfa+TDBcxOn3mtRH8ORgkjaK69WwqBZMwoQhjxyWbugII6tqCq0d0W DhjF3DFCLR4CXYzzK5bGNPNNvuyFZK7YcIEOhQvMzbDRd2aejw9FPcN8Qd4oV5FQQDxj dl10Fy26bcvBsxmoXNdnkxlIRsFzz9+ERKCgYzIPb6BWhi5SxBGKjgToVlQewJQIHFWQ LI2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b="1bj/j4qv"; 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 33si10356974pls.408.2019.02.11.04.25.30; Mon, 11 Feb 2019 04:25:48 -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=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b="1bj/j4qv"; 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 S1727315AbfBKMZV (ORCPT + 99 others); Mon, 11 Feb 2019 07:25:21 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:38574 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727147AbfBKMZT (ORCPT ); Mon, 11 Feb 2019 07:25:19 -0500 Received: by mail-lf1-f67.google.com with SMTP id n15so3452799lfe.5 for ; Mon, 11 Feb 2019 04:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KPfj6O2aC060Aqi37cieoJdRqiRZa7RZ5+dNEdZ/P94=; b=1bj/j4qvjt92z2YEKndx3N/g6jFbxGaZJ7pCGJf/pl0Ul3ogiiUjttyADP2GErlMuY brvWbrLgR1YlLiScjSGyHuUa6XKrg1q+cQKIowPryuYh1Qn6wv9AZdk68yRUTYQGaPTc 2y0F/oaEh5cclchgFjrrd421BIIgHUp7W8BaNF7MSklfLWlgs7zW3G7mYctncr4jUKJq Kbm8yRQdrwQEIHrNSy9srlRyBbJLqm5UzIySHHDc0gVC5Cy6iFK/abEvXRwLmXOsMjxH IMHygEwX8IRSIge6RttFv1io1HFodXqLYM1D3n31Vf4jLv/Fugf7KeAXOn5b1ExjN6cb GQ5Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=KPfj6O2aC060Aqi37cieoJdRqiRZa7RZ5+dNEdZ/P94=; b=DcH4tpWa8HyLrwzk3FzOY5Im/0xOLL1z81eDdAmvMUbTbLdworp4/sLx7dALGRBl8g K1Ic83nqdb5XIk2I4fLzCF9TlesTOAkuD89B86ggabLa4sMgHi7wie/nygXDfiG7xI6J efSQTPop7xE1BW5Li3WPCN6NISLdMkyLy3RKfx4SyHm4Y3Ul0HvCSbPOClNNJKPmFAWd RCoZDE+QRy4CViBTcdWc0Som/8rgAambDPTjqaCmrgw8AOX8YqPic3eQHEkeG2yQIJRc kca44IXiEXq9wPBQQo19m0H/UKOfksFRenp+BnhPTc34o0CabxrnjUAF7JyxxSSPJDQg 2/UA== X-Gm-Message-State: AHQUAuaK4g/gFMg8lD1w5gbFA2VQ/p8pBBeFGyRzZO1jqcajChpyiBgk X2nlVf+Zw4fMjt7fdlqelMcg9A== X-Received: by 2002:ac2:4343:: with SMTP id o3mr19806315lfl.129.1549887917145; Mon, 11 Feb 2019 04:25:17 -0800 (PST) Received: from skyninja.webspeed.dk (2-111-91-225-cable.dk.customer.tdc.net. [2.111.91.225]) by smtp.gmail.com with ESMTPSA id d70sm2278481lfe.14.2019.02.11.04.25.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 04:25:16 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Holmberg , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 1/8] lightnvm: pblk: stop taking the free lock in in pblk_lines_free Date: Mon, 11 Feb 2019 13:25:02 +0100 Message-Id: <20190211122509.19910-2-mb@lightnvm.io> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190211122509.19910-1-mb@lightnvm.io> References: <20190211122509.19910-1-mb@lightnvm.io> 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 From: Hans Holmberg pblk_line_meta_free might sleep (it can end up calling vfree, depending on how we allocate lba lists), and this can lead to a BUG() if we wake up on a different cpu and release the lock. As there is no point of grabbing the free lock when pblk has shut down, remove the lock. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index f9a3e47b6a93..eb0135c77805 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -584,14 +584,12 @@ static void pblk_lines_free(struct pblk *pblk) struct pblk_line *line; int i; - spin_lock(&l_mg->free_lock); for (i = 0; i < l_mg->nr_lines; i++) { line = &pblk->lines[i]; pblk_line_free(line); pblk_line_meta_free(l_mg, line); } - spin_unlock(&l_mg->free_lock); pblk_line_mg_free(pblk); -- 2.19.1