From: Andrew Morton <akpm@linux-foundation.org>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: call dlm_lockres_put without resource spinlock
Date: Wed, 1 Oct 2014 15:55:49 -0700 [thread overview]
Message-ID: <20141001155549.e64a41bbf797482eb388f65b@linux-foundation.org> (raw)
In-Reply-To: <542526C3.2090302@huawei.com>
On Fri, 26 Sep 2014 16:41:39 +0800 alex chen <alex.chen@huawei.com> wrote:
> dlm_lockres_put should be called without &res->spinlock, otherwise a
> deadlock case may happen.
>
> spin_lock(&res->spinlock)
> ...
> dlm_lockres_put
> ->dlm_lockres_release
> ->dlm_print_one_lock_resource
> ->spin_lock(&res->spinlock)
>
> Signed-off-by: Alex Chen <alex.chen@huawei.com>
> Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
> ---
> fs/ocfs2/dlm/dlmrecovery.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
> index 45067fa..3365839 100644
> --- a/fs/ocfs2/dlm/dlmrecovery.c
> +++ b/fs/ocfs2/dlm/dlmrecovery.c
> @@ -1710,9 +1710,12 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data,
> BUG();
This code does a GFP_ATOMIC allocation attempt and if that fails, it
goes BUG().
Guys, GFP_ATOMIC is unreliable. This isn't production quality code :(
next prev parent reply other threads:[~2014-10-01 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 8:41 [Ocfs2-devel] [PATCH] ocfs2/dlm: call dlm_lockres_put without resource spinlock alex chen
2014-10-01 22:55 ` Andrew Morton [this message]
2014-10-08 1:48 ` Joseph Qi
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=20141001155549.e64a41bbf797482eb388f65b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ocfs2-devel@oss.oracle.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