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]
Date: Mon, 13 May 2024 18:54:13 +0800
From: Hillf Danton <hdanton@...a.com>
To: Sam Sun <samsun1006219@...il.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, 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 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
--

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ