Linux ocfs2 filesystem development
 help / color / mirror / Atom feed
From: Mark Fasheh <mfasheh@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 05/15] ocfs2/dlm: fix race between dispatched_work and	dlm_lockres_grab_inflight_worker
Date: Wed, 17 Dec 2014 10:31:36 -0800	[thread overview]
Message-ID: <20141217183136.GP7238@wotan.suse.de> (raw)
In-Reply-To: <548f65d7.mLvwv5K/G+Eyb58w%akpm@linux-foundation.org>

On Mon, Dec 15, 2014 at 02:51:03PM -0800, Andrew Morton wrote:
> From: Joseph Qi <joseph.qi@huawei.com>
> Subject: ocfs2/dlm: fix race between dispatched_work and dlm_lockres_grab_inflight_worker
> 
> ac4fef4d23ed ("ocfs2/dlm: do not purge lockres that is queued for assert
> master") may have the following possible race case:
> 
> dlm_dispatch_assert_master       dlm_wq
> ========================================================================
> queue_work(dlm->quedlm_worker,
> 	&dlm->dispatched_work);
>                                  dispatch work,
> 				 dlm_lockres_drop_inflight_worker
> 				 *BUG_ON(res->inflight_assert_workers == 0)*
> dlm_lockres_grab_inflight_worker
> inflight_assert_workers++
> 
> So ensure inflight_assert_workers to be increased first.

Good catch, thank you Joseph.

Reviewed-by: Mark Fasheh <mfasheh@suse.de>
	--Mark

--
Mark Fasheh

      reply	other threads:[~2014-12-17 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 22:51 [Ocfs2-devel] [patch 05/15] ocfs2/dlm: fix race between dispatched_work and dlm_lockres_grab_inflight_worker akpm at linux-foundation.org
2014-12-17 18:31 ` Mark Fasheh [this message]

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=20141217183136.GP7238@wotan.suse.de \
    --to=mfasheh@suse.de \
    --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