Commit 12b7f5f
committed
Merge: crypto: rng - Fix extrng EFAULT handling
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6000
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>
Approved-by: Vladis Dronov <vdronov@redhat.com>
Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
| 309 | + | |
309 | 310 | | |
310 | 311 | | |
311 | | - | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
0 commit comments