mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
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:
parent
53953407b6
commit
900017e84b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118882
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user