After cem's changes to OCF, I found the zfs crypto code was unstable without aesni. After advice from mmacy and jhb, I added locking, and that fixed it up. After that, I then made it finer-grained by putting the locking code in cryptosoft.
NB: This is admittedly not as fine-grained as it should be. I note that aesni uses per-CPU locks, and that's an option, but it adds complexity and risk.