Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto fix cryptointr() can process unexpected request.



details:   https://anonhg.NetBSD.org/src/rev/c4e6ac458cd2
branches:  trunk
changeset: 353677:c4e6ac458cd2
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed May 17 11:03:42 2017 +0000

description:
fix cryptointr() can process unexpected request.

If migrate crp is linked after batch crp, "submit" is already set to
the batch crp. So, cryptointr() can process the batch crp instead of
the target migrate crp.

diffstat:

 sys/opencrypto/crypto.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r f9d963794276 -r c4e6ac458cd2 sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c   Wed May 17 09:03:12 2017 +0000
+++ b/sys/opencrypto/crypto.c   Wed May 17 11:03:42 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crypto.c,v 1.68 2017/05/17 07:12:50 knakahara Exp $ */
+/*     $NetBSD: crypto.c,v 1.69 2017/05/17 11:03:42 knakahara Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $   */
 /*     $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
 
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.68 2017/05/17 07:12:50 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.69 2017/05/17 11:03:42 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/reboot.h>
@@ -1262,8 +1262,7 @@
                        cap = crypto_checkdriver(hid);
                        if (cap == NULL || cap->cc_process == NULL) {
                                /* Op needs to be migrated, process it. */
-                               if (submit == NULL)
-                                       submit = crp;
+                               submit = crp;
                                break;
                        }
                        if (!cap->cc_qblocked) {



Home | Main Index | Thread Index | Old Index