Need help for dead lock of nvme shutdown_lock

Keith Busch keith.busch at intel.com
Wed Oct 12 06:53:39 PDT 2016


On Wed, Oct 12, 2016 at 05:33:01PM +0800, 陈晓光 wrote:
> 2016-10-12 17:15 GMT+08:00 Shan Hai <shan.hai at oracle.com>:
> >
> > On Wed, Oct 12, 2016 at 03:44:34PM +0800, 陈晓光 wrote:
> > > Dear maintainers of NVME
> > > I met a dead lock issue when I was using NVME.
> > > the shutdown_lock may cause dead lock when nvme_reset_work is working
> > > and nvme_timeout happens.
> > > I checked the latest mainline code, it seems still have such issue,
> > > please help, thank you!
> > > below is the log:
> > >
> >
> > Hi Xiaoguang,
> >
> > Would you please try the below patch?
> >
> >
> Thank you very much for the quick fix, Shan
> This can absolutely fix the dead lock issue I met.
> Will this be submitted to mainline?

NAK!

First of all, you can't complete a request while the controller still
owns it. You're risking data and/or memory corruption from doing that.

Secondly, there is no such mainline kernel that tries to disable the
controller in a softirq context. Whoever built your kernel needs to
cherry pick 287922eb, "block: defer timeouts to a workqueue".



More information about the Linux-nvme mailing list