summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2022-03-08 10:48:37 +0300
committerJoel Stanley <joel@jms.id.au>2022-03-08 10:48:40 +0300
commitc4c3fba61580d267568c5c9cf10c928a41ba38a4 (patch)
tree96e9f51838e6b792a9d099c7580faeb51eb7d5bd /drivers/char
parentde0980ea2d5360bd1d7472e62231a03c108f20c2 (diff)
parent8993e6067f263765fd26edabf3e3012e3ec4d81e (diff)
downloadlinux-c4c3fba61580d267568c5c9cf10c928a41ba38a4.tar.xz
Merge tag 'v5.15.26' into dev-5.15
This is the 5.15.26 stable release Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/random.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index a27ae3999ff3..ebe86de9d0ac 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1963,7 +1963,10 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
*/
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- input_pool.entropy_count = 0;
+ if (xchg(&input_pool.entropy_count, 0) && random_write_wakeup_bits) {
+ wake_up_interruptible(&random_write_wait);
+ kill_fasync(&fasync, SIGIO, POLL_OUT);
+ }
return 0;
case RNDRESEEDCRNG:
if (!capable(CAP_SYS_ADMIN))