lkml.org 
[lkml]   [2021]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Re: [PATCH] dm raid: add missed unlock in raid_ctr

> > 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

\
 
 \ /
  Last update: 2021-09-06 04:14    [W:0.035 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site