summaryrefslogtreecommitdiffstats
path: root/sys/dev/safe
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-08-13 20:42:53 +0000
committersam <sam@FreeBSD.org>2003-08-13 20:42:53 +0000
commit87156e6b9c7d5f3508533dfa673defcbe846c814 (patch)
treebe223827876c789a98d8dd61bf3e05538a5f1ec3 /sys/dev/safe
parentfb44318364d0692e4c00579a4f4435020c01ec90 (diff)
downloadFreeBSD-src-87156e6b9c7d5f3508533dfa673defcbe846c814.zip
FreeBSD-src-87156e6b9c7d5f3508533dfa673defcbe846c814.tar.gz
o add missing {}'s that to safe_dmamap_uniform that caused extraneous copies
for partly-aligned operations through /dev/crypto (unlikely) o add missing case in iov code that never showed up because of the above bug Submitted by: "Jason L. Wright" <jason@thought.net> MFC after: 3 days
Diffstat (limited to 'sys/dev/safe')
-rw-r--r--sys/dev/safe/safe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/safe/safe.c b/sys/dev/safe/safe.c
index fe1ce7b..67f9233 100644
--- a/sys/dev/safe/safe.c
+++ b/sys/dev/safe/safe.c
@@ -1254,7 +1254,8 @@ safe_process(void *arg, struct cryptop *crp, int hint)
err = EINVAL;
goto errout;
}
- }
+ } else
+ re->re_dst = re->re_src;
} else if (crp->crp_flags & CRYPTO_F_IMBUF) {
if (nicealign && uniform == 1) {
/*
@@ -2061,11 +2062,12 @@ safe_dmamap_uniform(const struct safe_operand *op)
if (op->nsegs > 0) {
int i;
- for (i = 0; i < op->nsegs-1; i++)
+ for (i = 0; i < op->nsegs-1; i++) {
if (op->segs[i].ds_len % SAFE_MAX_DSIZE)
return (0);
if (op->segs[i].ds_len != SAFE_MAX_DSIZE)
result = 2;
+ }
}
return (result);
}
OpenPOWER on IntegriCloud