Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3053849rwe; Mon, 29 Aug 2022 05:12:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ufl/SdzV16yfdhqc2w16H7gijP6q4bs4J1NEFvqA1fsuHL3/1XunYlc1a+MOwB25kkB65 X-Received: by 2002:a05:6402:100c:b0:447:9153:8fdf with SMTP id c12-20020a056402100c00b0044791538fdfmr16568462edu.187.1661775145820; Mon, 29 Aug 2022 05:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661775145; cv=none; d=google.com; s=arc-20160816; b=koW9kczgqVj96y7yhO3j9/+RuNFvA3yQ/h0OhIBjUGhaW5kzI8tymRPFJj6wfveAsp O8zIFAce/X1HKH9VE2tIj0DIwmxlkZXX2gt1Avr0T6okYmYAgKQmygh4WHsoT/Z2NbZ0 WN8nJOppadutoWo7geUq5srjb8ZxJAN24c5Q/X0CPiebZjDkw5tsBMsZdOzQ9TNuNk/H Veu1/Y1aFcQjoi6aoS9Y8hsW4yZF1kfUV7M7y3Hk4Ig9EHzPFoIUxlFdb1NP4LKXHX/A D1ohXuFE9Uqvlqkz8RJ9hrDFHMJ0JLAMFFrenGVz8AEkWUubxBoy0QD9W1QKIqAzmpEe 1hFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3T3O8hrAhPAxI4dkAjFg3mmvsF7CLQLHZSt6Tb/GMhk=; b=ax0juSRdhVYC7Y9uwgAfk2P/3cVSP4CInWA13XYi+vtAN6rZuUUMMsuqgYnJrBW5Gf 4EXPp+bbX0SGqbnznGgvBqwyF1BgMPjQMJTkpW8rztKzXfm/ReilvljlYv/RpTcF4s0G yYiuZSWBrz6sqziXM03vrI4sZKMXMx0773VU/bjBOaLczR8slMMQ3njELbJwlENW7pQW NGnW+yXAN19yKp3MtzsJajKdpQyf7SGvB8iIPMmzyjEeu7pM4SYiV1zY0bJaIclnWtfY Xnqi1pxUAxhVqLf9ZLlQsCqc3UJa6rxBWixI7RCUG64+DhaG4+9JqvZn3ln+VGfnnxsy DsYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kQ1yTuHJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a056402150e00b00446eaa6faddsi5819393edw.445.2022.08.29.05.11.51; Mon, 29 Aug 2022 05:12:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kQ1yTuHJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231607AbiH2LUS (ORCPT + 99 others); Mon, 29 Aug 2022 07:20:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231621AbiH2LSw (ORCPT ); Mon, 29 Aug 2022 07:18:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3542E10FE3; Mon, 29 Aug 2022 04:12:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 22A1D6122D; Mon, 29 Aug 2022 11:12:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31CAFC433C1; Mon, 29 Aug 2022 11:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771533; bh=Gzqy99RAUTU08sK5XGOmICQ9ne5up2T8DJBSaBHVxPc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQ1yTuHJdzAj/tGDyJPTNwjjintTJmIkZMgjjPNYj8zK4lMj5BEIVHtBqAHFu770B 0pFaPhrB1Jnbd1iUjRAfggjjXPHlNQFfTvDlVJatDbbzFcdbiXGY84INd4JSw4f80q Q8L5ybL2jkc14WzDLwG+oZiq7I8TnTkFB9c/Gdys= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guoqing Jiang , Song Liu Subject: [PATCH 5.10 77/86] Revert "md-raid: destroy the bitmap after destroying the thread" Date: Mon, 29 Aug 2022 12:59:43 +0200 Message-Id: <20220829105759.666602652@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105756.500128871@linuxfoundation.org> References: <20220829105756.500128871@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guoqing Jiang commit 1d258758cf06a0734482989911d184dd5837ed4e upstream. This reverts commit e151db8ecfb019b7da31d076130a794574c89f6f. Because it obviously breaks clustered raid as noticed by Neil though it fixed KASAN issue for dm-raid, let's revert it and fix KASAN issue in next commit. [1]. https://lore.kernel.org/linux-raid/a6657e08-b6a7-358b-2d2a-0ac37d49d23a@linux.dev/T/#m95ac225cab7409f66c295772483d091084a6d470 Fixes: e151db8ecfb0 ("md-raid: destroy the bitmap after destroying the thread") Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu Signed-off-by: Greg Kroah-Hartman --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6278,11 +6278,11 @@ static void mddev_detach(struct mddev *m static void __md_stop(struct mddev *mddev) { struct md_personality *pers = mddev->pers; + md_bitmap_destroy(mddev); mddev_detach(mddev); /* Ensure ->event_work is done */ if (mddev->event_work.func) flush_workqueue(md_misc_wq); - md_bitmap_destroy(mddev); spin_lock(&mddev->lock); mddev->pers = NULL; spin_unlock(&mddev->lock);