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
This commit is contained in:
Sam Leffler 2003-08-13 20:42:53 +00:00
parent 53953407b6
commit 900017e84b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118882

View File

@ -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);
}