Commit eb2c179
crypto: rng - Fix extrng EFAULT handling
JIRA: https://issues.redhat.com/browse/RHEL-70652
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>1 parent 04ae76b commit eb2c179
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
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 | | |
| |||
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | | - | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
0 commit comments