From patchwork Mon Dec 28 12:46:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 354411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36C43C4332D for ; Mon, 28 Dec 2020 16:10:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05E4120719 for ; Mon, 28 Dec 2020 16:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388552AbgL1QKT (ORCPT ); Mon, 28 Dec 2020 11:10:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:51952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388513AbgL1NXd (ORCPT ); Mon, 28 Dec 2020 08:23:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 32815207C9; Mon, 28 Dec 2020 13:22:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161772; bh=MjM1C2S8hy4o3teJH+kaPWf6nPImpZwMYpp/5Kwj5kE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H4QsuOH10KZWCJOMZRuFu7UxFMWOOQhEj4fPG23rBB4A4mCxXvmYJo3+SzpwTrGlv g5XiGmmuuLVkWKHY23bUtTzzSb5r6W3wfUV61absRjHhBLtTZ77kuIBTLnaj5jxFS2 SDX/SVaWvc7jE9nDJWkITvliOglmMw98psXtIH/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , Sebastian Andrzej Siewior , Mike Snitzer , Sasha Levin Subject: [PATCH 4.19 076/346] dm table: Remove BUG_ON(in_interrupt()) Date: Mon, 28 Dec 2020 13:46:35 +0100 Message-Id: <20201228124923.470192404@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Thomas Gleixner [ Upstream commit e7b624183d921b49ef0a96329f21647d38865ee9 ] The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context. Issuing a BUG for a wrong calling context is frowned upon and in_interrupt() is deprecated and only covering parts of the wrong contexts. The sanity check for the context is covered by CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin --- drivers/md/dm-table.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 36275c59e4e7b..f849db3035a05 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -1336,12 +1336,6 @@ void dm_table_event_callback(struct dm_table *t, void dm_table_event(struct dm_table *t) { - /* - * You can no longer call dm_table_event() from interrupt - * context, use a bottom half instead. - */ - BUG_ON(in_interrupt()); - mutex_lock(&_event_lock); if (t->event_fn) t->event_fn(t->event_context);