archive mirror
 help / color / mirror / Atom feed
From: Mikulas Patocka <>
To: Mike Snitzer <>
Subject: [dm-devel] [PATCH] dm-writecache: crash on invalid returned status
Date: Tue, 27 Jul 2021 09:45:13 -0400 (EDT)	[thread overview]
Message-ID: <> (raw)

If some "writecache_map_*" function returns invalid status, it is a bug.
So, we should report it and not fail silently.

Signed-off-by: Mikulas Patocka <>

 drivers/md/dm-writecache.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/md/dm-writecache.c
--- linux-2.6.orig/drivers/md/dm-writecache.c	2021-07-27 15:29:19.000000000 +0200
+++ linux-2.6/drivers/md/dm-writecache.c	2021-07-27 15:37:30.000000000 +0200
@@ -1585,10 +1585,13 @@ done:
 	case WC_MAP_ERROR:
-	default:
+	default:
+		BUG();
+		return -1;

dm-devel mailing list

                 reply	other threads:[~2021-07-27 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).