crypto: rng - Fix extrng EFAULT handling

JIRA: https://issues.redhat.com/browse/RHEL-68420 Upstream Status: RHEL only

When the iov_iter change was added the EFAULT handling became broken. Fix it by checking that copy_to_iter copied the correct number of bytes.

Also make sure that a failure in crypto_rng_get_bytes does not cause previous bytes to be discarded.

Finally update the scheduling code per get_random_bytes_user.

Signed-off-by: Herbert Xu herbert.xu@redhat.com

Merge request reports

Loading