public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+c52ab18308964d248092@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [crypto?] INFO: task hung in hwrng_fillfn
Date: Sat, 25 Nov 2023 19:52:54 -0800	[thread overview]
Message-ID: <000000000000cc7d45060b061e5b@google.com> (raw)
In-Reply-To: <0000000000003d77e6060af9f233@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [crypto?] INFO: task hung in hwrng_fillfn
Author: eadavis@qq.com

please test task hung in hwrng_fillfn

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 98b1cc82c4af

diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 420f155d251f..ebfa5eab84df 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -501,7 +501,10 @@ static int hwrng_fillfn(void *unused)
 		rng = get_current_rng();
 		if (IS_ERR(rng) || !rng)
 			break;
-		mutex_lock(&reading_mutex);
+		if (mutex_lock_interruptible(&reading_mutex)) {
+			put_rng(rng);
+			return = -ERESTARTSYS;
+		}
 		rc = rng_get_data(rng, rng_fillbuf,
 				  rng_buffer_size(), 1);
 		if (current_quality != rng->quality)


  reply	other threads:[~2023-11-26  3:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25 13:21 [syzbot] [crypto?] INFO: task hung in hwrng_fillfn syzbot
2023-11-26  3:52 ` syzbot [this message]
2023-11-26  4:05 ` syzbot
2023-11-26  4:06 ` syzbot
2023-11-26  5:35 ` syzbot
2023-11-29  2:59 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot
     [not found] <20231126015722.882-1-hdanton@sina.com>
2023-11-26  2:20 ` [syzbot] [crypto?] INFO: task hung in hwrng_fillfn syzbot
     [not found] <tencent_F212DD467B099FAEFC2ECD4C9227CFC6C306@qq.com>
2023-11-26  3:58 ` syzbot
     [not found] <tencent_47250CBA28BB4A33079E2C1B9A4B071BF408@qq.com>
2023-11-26  4:11 ` syzbot
     [not found] <tencent_AEB0786A6F682DF96F6C94A4E8A2EDEACC0A@qq.com>
2023-11-26  4:37 ` syzbot
     [not found] <tencent_0C6106DF136B0364296703BF044A977D1705@qq.com>
2023-11-26  6:08 ` syzbot
     [not found] <tencent_DB6F26C7B37BA362296123A96443F7759705@qq.com>
2023-11-29  3:23 ` syzbot

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=000000000000cc7d45060b061e5b@google.com \
    --to=syzbot+c52ab18308964d248092@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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