projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fa0340
)
bcache: Fix a null ptr deref in journal replay
author
Kent Overstreet
<kmo@daterainc.com>
Tue, 25 Feb 2014 03:55:28 +0000
(19:55 -0800)
committer
Kent Overstreet
<kmo@daterainc.com>
Tue, 18 Mar 2014 02:01:03 +0000
(19:01 -0700)
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/journal.c
patch
|
blob
|
history
diff --git
a/drivers/md/bcache/journal.c
b/drivers/md/bcache/journal.c
index e38c5997bf12706afa0e649bd96e80d284a9a758..97e6a92da9999f1b25e8c8fb6a30315932b17584 100644
(file)
--- a/
drivers/md/bcache/journal.c
+++ b/
drivers/md/bcache/journal.c
@@
-287,9
+287,13
@@
void bch_journal_mark(struct cache_set *c, struct list_head *list)
k < bset_bkey_last(&i->j);
k = bkey_next(k)) {
unsigned j;
+ struct bucket *g;
for (j = 0; j < KEY_PTRS(k); j++) {
- struct bucket *g = PTR_BUCKET(c, k, j);
+ if (!ptr_available(c, k, j))
+ continue;
+
+ g = PTR_BUCKET(c, k, j);
atomic_inc(&g->pin);
if (g->prio == BTREE_PRIO &&