HomeFreeBSD

bnxt(4): Fix ioctls when user addresses are inaccessable.

Description

bnxt(4): Fix ioctls when user addresses are inaccessable.

Check copyin's error code (differ adding copyout checks at this time).

Don't directly access user memory in the switch statement.

Since bnxt_ioctl_data isn't all that big, use a stack allocation.

Reviewed by: jhb
MFC after: 3 days
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23933

Details