dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: dinghao.liu@zju.edu.cn
To: "Heinz Mauelshagen" <heinzm@redhat.com>
Cc: dm-devel@redhat.com, kjlu@umn.edu,
	Mike Snitzer <snitzer@redhat.com>,
	Alasdair Kergon <agk@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [dm-devel] [PATCH] dm raid: add missed unlock in raid_ctr
Date: Mon, 6 Sep 2021 10:14:24 +0800 (GMT+08:00)	[thread overview]
Message-ID: <37fdfa89.be2a1.17bb8e29eee.Coremail.dinghao.liu@zju.edu.cn> (raw)
In-Reply-To: <CAM23VxrzCk4XxbsG3dwqCq2PAnxNiEXoFXyp=t4t41o32THYrA@mail.gmail.com>


> > On Fri, Sep 3, 2021 at 10:02 AM Dinghao Liu dinghao.liu@zju.edu.cn> wrote:
> > mddev_unlock() is called on all paths after we call mddev_lock_nointr(),
> > except for three error handling paths, which may cause a deadlock. This
> > bug is suggested by a static analysis tool, please advise.
> > Hi,    
> >     
> >     correct, those unlock calls are missing.    
> >
> >     As we are bailing out after md_run() with lock held,     
> >     we can clean the lot of error paths underneath up by jumping to before
> >     md_stop() and add the mddev_unlock upfront it like:    
    
Thanks for your advice! I will fix this and send a new patch soon.

Regards,
Dinghao


--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


      reply	other threads:[~2021-09-06  8:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  7:55 [dm-devel] [PATCH] dm raid: add missed unlock in raid_ctr Dinghao Liu
2021-09-03 13:30 ` Heinz Mauelshagen
2021-09-06  2:14   ` dinghao.liu [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=37fdfa89.be2a1.17bb8e29eee.Coremail.dinghao.liu@zju.edu.cn \
    --to=dinghao.liu@zju.edu.cn \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=heinzm@redhat.com \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snitzer@redhat.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;
as well as URLs for NNTP newsgroup(s).