* [dm-devel] [PATCH] dm table: Remove BUG_ON(in_interrupt())
@ 2020-11-13 14:19 Sebastian Andrzej Siewior
2020-11-13 18:51 ` [dm-devel] " Mike Snitzer
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2020-11-13 14:19 UTC (permalink / raw)
To: dm-devel
Cc: Thomas Gleixner, Alasdair Kergon, Sebastian Andrzej Siewior,
Mike Snitzer
From: Thomas Gleixner <tglx@linutronix.de>
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 <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: dm-devel@redhat.com
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>
---
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 ce543b761be7b..2073ee8d18f4f 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1247,12 +1247,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);
--
2.29.2
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [dm-devel] dm table: Remove BUG_ON(in_interrupt())
2020-11-13 14:19 [dm-devel] [PATCH] dm table: Remove BUG_ON(in_interrupt()) Sebastian Andrzej Siewior
@ 2020-11-13 18:51 ` Mike Snitzer
0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2020-11-13 18:51 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: dm-devel, Thomas Gleixner, Alasdair Kergon
On Fri, Nov 13 2020 at 9:19am -0500,
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> 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 <tglx@linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: dm-devel@redhat.com
> Cc: Mike Snitzer <snitzer@redhat.com>
> Cc: Alasdair Kergon <agk@redhat.com>
I picked this up for 5.11, thanks.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-16 9:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13 14:19 [dm-devel] [PATCH] dm table: Remove BUG_ON(in_interrupt()) Sebastian Andrzej Siewior
2020-11-13 18:51 ` [dm-devel] " Mike Snitzer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.