netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib/dynamic_queue_limits.c: relax BUG_ON to WARN_ON in dql_complete()
@ 2017-10-18 15:45 Ard Biesheuvel
  2017-10-18 16:11 ` David Laight
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ard Biesheuvel @ 2017-10-18 15:45 UTC (permalink / raw)
  To: linux-kernel, netdev, davem; +Cc: Ard Biesheuvel

Even though calling dql_completed() with a count that exceeds the
queued count is a serious error, it still does not justify bringing
down the entire kernel with a BUG_ON(). So relax it to a WARN_ON()
instead.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 lib/dynamic_queue_limits.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index f346715e2255..24ce495d78f3 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -23,7 +23,7 @@ void dql_completed(struct dql *dql, unsigned int count)
 	num_queued = ACCESS_ONCE(dql->num_queued);
 
 	/* Can't complete more than what's in queue */
-	BUG_ON(count > num_queued - dql->num_completed);
+	WARN_ON(count > num_queued - dql->num_completed);
 
 	completed = dql->num_completed + count;
 	limit = dql->limit;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-19 11:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-18 15:45 [PATCH] lib/dynamic_queue_limits.c: relax BUG_ON to WARN_ON in dql_complete() Ard Biesheuvel
2017-10-18 16:11 ` David Laight
2017-10-18 16:29 ` Eric Dumazet
2017-10-18 17:57   ` Ard Biesheuvel
2017-10-18 18:45     ` Eric Dumazet
2017-10-18 19:32       ` Ard Biesheuvel
2017-10-19 10:57 ` David Miller
2017-10-19 11:14   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).