git: aesni(4): Properly align the context memory using out kmall

看板DFBSD_commit作者時間14年前 (2011/08/02 12:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 35b7857839738a2813bd18f098ebc725254a70a8 Author: Sepherosa Ziehau <sephe@dragonflybsd.org> Date: Tue Aug 2 12:11:12 2011 +0800 aesni(4): Properly align the context memory using out kmalloc(9) feature DragonFly's kmalloc(9) will return 2^n aligned memory if the allocation size is 2^n; use this feature instead of using a local hack. While I'm here, release the spinlock and call kmalloc(9) w/ M_WAITOK; the check/free race is absolutely acceptable here, but the failure of kmalloc(9) w/ M_NOWAIT is probably not accetable on the init path. Summary of changes: sys/dev/crypto/aesni/aesni.c | 40 ++++++++++++++++++++++++---------------- sys/dev/crypto/aesni/aesni.h | 5 ++--- 2 files changed, 26 insertions(+), 19 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/35b7857839738a2813bd18f098ebc725254a70a8 -- DragonFly BSD source repository
文章代碼(AID): #1EDtt8Vu (DFBSD_commit)