lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEkJfYPxWBfEnuKeCGEsscVTYy8MrNxCJwdbxS=c2-B0H+HfTA@mail.gmail.com>
Date: Mon, 13 May 2024 20:57:44 +0800
From: Sam Sun <samsun1006219@...il.com>
To: Hillf Danton <hdanton@...a.com>
Cc: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org, axboe@...nel.dk, 
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>, syzkaller-bugs@...glegroups.com, 
	xrivendell7@...il.com
Subject: Re: [Linux kernel bug] INFO: task hung in blk_mq_get_tag

On Mon, May 13, 2024 at 6:54 PM Hillf Danton <hdanton@...a.com> wrote:
>
> On Mon, 13 May 2024 10:38:34 +0800 Sam Sun <samsun1006219@...il.com>
> > Dear developers and maintainers,
> >
> > We encountered a task hung in function blk_mq_get_tag. It was tested
> > against the latest upstream kernel which was compiled by clang 14.
>
> BTW make it clear if repro is available and if you could test patches
> in reply.
>

Thanks for pointing this out! I am happy to help testing patches. As
for repro, I have a C repro available, but it is too long so that I
attached it to the first email. Should I just paste repro with bug
report?

> Thanks for your report. See if the below low-hang pear is sweet, I
> mean see if it could survive your repro.
>
> --- x/block/blk-mq-tag.c
> +++ y/block/blk-mq-tag.c
> @@ -180,8 +180,10 @@ unsigned int blk_mq_get_tag(struct blk_m
>                 sbitmap_prepare_to_wait(bt, ws, &wait, TASK_UNINTERRUPTIBLE);
>
>                 tag = __blk_mq_get_tag(data, bt);
> -               if (tag != BLK_MQ_NO_TAG)
> +               if (tag != BLK_MQ_NO_TAG) {
> +                       sbitmap_finish_wait(bt, ws, &wait);
>                         break;
> +               }
>
>                 bt_prev = bt;
>                 io_schedule();
> @@ -208,8 +210,6 @@ unsigned int blk_mq_get_tag(struct blk_m
>                 ws = bt_wait_ptr(bt, data->hctx);
>         } while (1);
>
> -       sbitmap_finish_wait(bt, ws, &wait);
> -
>  found_tag:
>         /*
>          * Give up this allocation if the hctx is inactive.  The caller will
> --

I applied this patch and tried using the C repro, but it still crashed
with the same task hang kernel dump log.

Best Regards,
Yue

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ