Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/opencrypto Return ENOSPC instead of ENOMEM when there is...



details:   https://anonhg.NetBSD.org/src/rev/3a13ae2a3207
branches:  trunk
changeset: 804181:3a13ae2a3207
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Nov 27 20:30:05 2014 +0000

description:
Return ENOSPC instead of ENOMEM when there is no room in the buffer to
store results. ENOMEM in this subsystem means we cannot allocate more
requests or internal buffers for xforms.

diffstat:

 sys/opencrypto/cryptodev.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 55574159d261 -r 3a13ae2a3207 sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c        Thu Nov 27 20:00:09 2014 +0000
+++ b/sys/opencrypto/cryptodev.c        Thu Nov 27 20:30:05 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptodev.c,v 1.81 2014/09/05 09:23:40 matt Exp $ */
+/*     $NetBSD: cryptodev.c,v 1.82 2014/11/27 20:30:05 christos Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $   */
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.81 2014/09/05 09:23:40 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.82 2014/11/27 20:30:05 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -695,7 +695,7 @@
        /* let the user know how much data was returned */
        if (crp->crp_olen) {
                if (crp->crp_olen > (cop->dst_len ? cop->dst_len : cop->len)) {
-                       error = ENOMEM;
+                       error = ENOSPC;
                        goto bail;
                }
                dst_len = cop->dst_len = crp->crp_olen;



Home | Main Index | Thread Index | Old Index