From: akpm@linux-foundation.org
To: akpm@linux-foundation.org, gustavo@embeddedor.com,
henrywolfeburns@gmail.com, linux-mm@kvack.org,
mm-commits@vger.kernel.org, shakeelb@google.com,
torvalds@linux-foundation.org, vitalywool@gmail.com
Subject: [patch 4/7] mm/z3fold.c: fix lock/unlock imbalance in z3fold_page_isolate
Date: Fri, 30 Aug 2019 16:04:43 -0700 [thread overview]
Message-ID: <20190830230443.qFvaKz7QH%akpm@linux-foundation.org> (raw)
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: mm/z3fold.c: fix lock/unlock imbalance in z3fold_page_isolate
Fix lock/unlock imbalance by unlocking *zhdr* before return.
Addresses Coverity ID 1452811 ("Missing unlock")
Link: http://lkml.kernel.org/r/20190826030634.GA4379@embeddedor
Fixes: d776aaa9895e ("mm/z3fold.c: fix race between migration and destruction")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Henry Burns <henrywolfeburns@gmail.com>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/z3fold.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/z3fold.c~mm-z3foldc-fix-lock-unlock-imbalance-in-z3fold_page_isolate
+++ a/mm/z3fold.c
@@ -1406,6 +1406,7 @@ static bool z3fold_page_isolate(struct p
* should freak out.
*/
WARN(1, "Z3fold is experiencing kref problems\n");
+ z3fold_page_unlock(zhdr);
return false;
}
z3fold_page_unlock(zhdr);
_
reply other threads:[~2019-08-30 23:04 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190830230443.qFvaKz7QH%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gustavo@embeddedor.com \
--cc=henrywolfeburns@gmail.com \
--cc=linux-mm@kvack.org \
--cc=mm-commits@vger.kernel.org \
--cc=shakeelb@google.com \
--cc=torvalds@linux-foundation.org \
--cc=vitalywool@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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