Re: ? PANICKED: Test report for kernel 5.13.0-rc3 (block, 30ec225a)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx> 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);
 }



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux