Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Make sure ERESTART doesn't come flying ou...
details: https://anonhg.NetBSD.org/src/rev/bc8dbb25572c
branches: trunk
changeset: 847082:bc8dbb25572c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Dec 09 14:56:18 2019 +0000
description:
Make sure ERESTART doesn't come flying out to userland.
I picked ERESTART to mean `all channels are occupied' because that's
what opencrypto(9) uses to decide whether to queue a request, but
it's not appropriate for sysctl(2) to return that.
diffstat:
sys/arch/arm/sunxi/sun8i_crypto.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r f087f2ac91b9 -r bc8dbb25572c sys/arch/arm/sunxi/sun8i_crypto.c
--- a/sys/arch/arm/sunxi/sun8i_crypto.c Mon Dec 09 14:56:06 2019 +0000
+++ b/sys/arch/arm/sunxi/sun8i_crypto.c Mon Dec 09 14:56:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i_crypto.c,v 1.3 2019/12/09 14:56:06 riastradh Exp $ */
+/* $NetBSD: sun8i_crypto.c,v 1.4 2019/12/09 14:56:18 riastradh Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.3 2019/12/09 14:56:06 riastradh Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.4 2019/12/09 14:56:18 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1232,8 +1232,11 @@
/* Submit the TRNG task. */
error = sun8i_crypto_submit_trng(sc, req->cu_task, size);
- if (error)
+ if (error) {
+ if (error == ERESTART)
+ error = EBUSY;
goto out2;
+ }
/* Wait for the request to complete. */
mutex_enter(&req->cu_lock);
Home |
Main Index |
Thread Index |
Old Index