blob: 58cf3f9d59b38301457c495226354af027cb7702 [file] [log] [blame]
Brad Bishopf3fd2882019-06-21 08:06:37 -04001It fails to stop rngd. It just shows warnings when stop rngd such as by:
2
3$ systemctl stop rngd.service
4
5but stalls shutdown untill daemon rngd is killed.
6
7Backport patch to fix the issue.
8
9Upstream-Status: Backport [https://bugzilla.redhat.com/show_bug.cgi?id=1690364#c8]
10
11Signed-off-by: Kai Kang <kai.kang@windriver.com>
12---
13diff --git a/rngd_jitter.c b/rngd_jitter.c
14index 54070ae..7a69bf9 100644
15--- a/rngd_jitter.c
16+++ b/rngd_jitter.c
17@@ -280,7 +280,7 @@ static void *thread_entropy_task(void *data)
18
19 /* Write to pipe */
20 written = 0;
21- while(written != me->buf_sz) {
22+ while(me->active && written != me->buf_sz) {
23 message(LOG_DAEMON|LOG_DEBUG, "Writing to pipe\n");
24 ret = write(me->pipe_fd, &tmpbuf[written], me->buf_sz - written);
25 message(LOG_DAEMON|LOG_DEBUG, "DONE Writing to pipe with return %ld\n", ret);