summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2019-08-02 00:39:18 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-08-02 00:39:18 -0400
commit05dd6a126c85d26f83048865ac6d0f7a425d353c (patch)
treed577751ddb471fbd280ebfdf71fbc6d65600eb14
parent64552a8193c7ba9b7da0e0ee3f3b91c78a8a497e (diff)
downloadlongterm-queue-4.18-05dd6a126c85d26f83048865ac6d0f7a425d353c.tar.gz
bcache: ctxt refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/bcache-avoid-potential-memleak-of-list-of-journal_re.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/queue/bcache-avoid-potential-memleak-of-list-of-journal_re.patch b/queue/bcache-avoid-potential-memleak-of-list-of-journal_re.patch
index 0f2e837..78c8815 100644
--- a/queue/bcache-avoid-potential-memleak-of-list-of-journal_re.patch
+++ b/queue/bcache-avoid-potential-memleak-of-list-of-journal_re.patch
@@ -1,4 +1,4 @@
-From 95f18c9d1310730d075499a75aaf13bcd60405a7 Mon Sep 17 00:00:00 2001
+From 2839ea3bda642cb97c4221dfec800c16f53a1f40 Mon Sep 17 00:00:00 2001
From: Shenghui Wang <shhuiw@foxmail.com>
Date: Thu, 25 Apr 2019 00:48:43 +0800
Subject: [PATCH] bcache: avoid potential memleak of list of journal_replay(s)
@@ -27,21 +27,21 @@ Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
-index 3f34b96ebbc3..0ffe9acee9d8 100644
+index 035267a73ff4..f78916eb95af 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
-@@ -1790,6 +1790,8 @@ static int run_cache_set(struct cache_set *c)
+@@ -1751,6 +1751,8 @@ static void run_cache_set(struct cache_set *c)
struct cache *ca;
struct closure cl;
- unsigned int i;
+ unsigned i;
+ LIST_HEAD(journal);
+ struct journal_replay *l;
closure_init_stack(&cl);
-@@ -1949,6 +1951,12 @@ static int run_cache_set(struct cache_set *c)
+@@ -1906,6 +1908,12 @@ static void run_cache_set(struct cache_set *c)
set_bit(CACHE_SET_RUNNING, &c->flags);
- return 0;
+ return;
err:
+ while (!list_empty(&journal)) {
+ l = list_first_entry(&journal, struct journal_replay, list);