HomeFreeBSD

Add a reference count to cryptodev sessions.

Description

Add a reference count to cryptodev sessions.

This prevents use-after-free races with crypto requests (which may
sleep) and CIOCFSESSION as well as races from current CIOCFSESSION
requests.

admbugs: 949
Reported by: Yuval Kanarenstein <yuvalk@ssd-disclosure.com>
Reviewed by: cem
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D23077

Details

Provenance
jhbAuthored on
Reviewer
cem
Differential Revision
D23077: Add a reference count to cryptodev sessions.
Parents
rS356506: Fix copy-paste bug in HMB free code.
Branches
Unknown
Tags
Unknown