[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1381451475-24551-2-git-send-email-kmo@daterainc.com>
Date: Thu, 10 Oct 2013 17:31:15 -0700
From: Kent Overstreet <kmo@...erainc.com>
To: torvalds@...ux-foundation.org, axboe@...nel.dk
Cc: linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
Kent Overstreet <kmo@...erainc.com>
Subject: [PATCH] bcache: Fix a null ptr deref regression
c0f04d8 was fixing a reported data corruption bug, but it seems some
last minute refactoring or rebasing introduced a null pointer deref.
Signed-off-by: Kent Overstreet <kmo@...erainc.com>
Cc: linux-stable <stable@...r.kernel.org> # >= v3.10
Reported-by: Gabriel de Perthuis <g2p.code@...il.com>
---
drivers/md/bcache/request.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 71eb233..b6a74bc 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -996,6 +996,7 @@ static void request_write(struct cached_dev *dc, struct search *s)
closure_bio_submit(bio, cl, s->d);
} else {
bch_writeback_add(dc);
+ s->op.cache_bio = bio;
if (bio->bi_rw & REQ_FLUSH) {
/* Also need to send a flush to the backing device */
@@ -1008,8 +1009,6 @@ static void request_write(struct cached_dev *dc, struct search *s)
flush->bi_private = cl;
closure_bio_submit(flush, cl, s->d);
- } else {
- s->op.cache_bio = bio;
}
}
out:
--
1.8.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists