aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/safe
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2003-08-13 20:42:53 +0000
committerSam Leffler <sam@FreeBSD.org>2003-08-13 20:42:53 +0000
commit900017e84b52e01027f9b5eb445d0997a88387a0 (patch)
treebe223827876c789a98d8dd61bf3e05538a5f1ec3 /sys/dev/safe
parent53953407b64c459cea6e9065d901ceb0b527c795 (diff)
downloadsrc-900017e84b52e01027f9b5eb445d0997a88387a0.tar.gz
src-900017e84b52e01027f9b5eb445d0997a88387a0.zip
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
Notes
Notes: svn path=/head/; revision=118882
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 fe1ce7b33cad..67f9233e60c4 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);
}