linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Goncalves <bgoncalv@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>,
	CKI Project <cki-project@redhat.com>,
	skt-results-master@redhat.com, linux-block@vger.kernel.org,
	Jens Axboe <axboe@kernel.dk>, Fine Fan <ffan@redhat.com>,
	Jeff Bastian <jbastian@redhat.com>
Subject: Re: ? PANICKED: Test report for kernel 5.13.0-rc3 (block, 30ec225a)
Date: Wed, 16 Jun 2021 12:54:16 +0200	[thread overview]
Message-ID: <CA+QYu4pzbotv4Sj=jMKaUHouVURgMX9TrdrZUwGa7mx7Q5jsAw@mail.gmail.com> (raw)
In-Reply-To: <20210615160027.GA31772@lst.de>

On Tue, Jun 15, 2021 at 6:01 PM Christoph Hellwig <hch@lst.de> wrote:
>
> On Tue, Jun 15, 2021 at 09:58:03PM +0800, Ming Lei wrote:
> > On Tue, Jun 15, 2021 at 7:52 PM Christoph Hellwig <hch@lst.de> wrote:
> > >
> > > On Mon, Jun 14, 2021 at 02:40:58PM +0200, Bruno Goncalves wrote:
> > > > Hi,
> > > >
> > > > We've noticed a kernel oops during the stress-ng test on aarch64 more log
> > > > details on [1]. Christoph, do you think this could be related to the recent
> > > > blk_cleanup_disk changes [2]?
> > >
> > > It doesn't really look very related.  Any chance you could bisect it?
> >
> > It should be the wrong order between freeing tagset and cleanup disk:
> >
> > static void loop_remove(struct loop_device *lo)
> > {
> >         ...
> >         blk_mq_free_tag_set(&lo->tag_set);
> >         blk_cleanup_disk(lo->lo_disk);
> >         ...
> >  }
>
> Indeed.  Something like this should fix the issue:
>
> diff --git a/drivers/block/loop.c b/drivers/block/loop.c
> index 9a48b3f9a15c..e0c4de392eab 100644
> --- a/drivers/block/loop.c
> +++ b/drivers/block/loop.c
> @@ -2172,8 +2172,8 @@ static int loop_add(struct loop_device **l, int i)
>  static void loop_remove(struct loop_device *lo)
>  {
>         del_gendisk(lo->lo_disk);
> -       blk_mq_free_tag_set(&lo->tag_set);
>         blk_cleanup_disk(lo->lo_disk);
> +       blk_mq_free_tag_set(&lo->tag_set);
>         mutex_destroy(&lo->lo_mutex);
>         kfree(lo);
>  }
>
Thank you Christoph and Ming,

I've tested the patch and the panic is gone. I still hit some kernel
oops, but that doesn't seem related to any block change.

Bruno


      reply	other threads:[~2021-06-16 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 12:35 💥 PANICKED: Test report for kernel 5.13.0-rc3 (block, 30ec225a) CKI Project
2021-06-14 12:54 ` Bruno Goncalves
     [not found] ` <CA+QYu4qjrzyjM_zgJ8SSZ-zsodcK=uk8xToAVR3+kmOdNZfgZQ@mail.gmail.com>
2021-06-15 11:52   ` ? " Christoph Hellwig
2021-06-15 13:58     ` Ming Lei
2021-06-15 16:00       ` Christoph Hellwig
2021-06-16 10:54         ` Bruno Goncalves [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='CA+QYu4pzbotv4Sj=jMKaUHouVURgMX9TrdrZUwGa7mx7Q5jsAw@mail.gmail.com' \
    --to=bgoncalv@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=cki-project@redhat.com \
    --cc=ffan@redhat.com \
    --cc=hch@lst.de \
    --cc=jbastian@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=skt-results-master@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).