HomeFreeBSD

netmap: fix issues in nm_os_extmem_create()

Description

netmap: fix issues in nm_os_extmem_create()

  • Call vm_object_reference() before vm_map_lookup_done().
  • Use vm_mmap_to_errno() to convert vm_map_* return values to errno.
  • Fix memory leak of e->obj.

Approved by: re (gjb)
Reported by: markj
Reviewed by: markj
MFC after: 1 week

(cherry picked from commit ee7ffaa2e6e08b63efb4673610875d40964d5058)
(cherry picked from commit 3e4127f8f2933029034ac618a0013f434cb4a420)

Details

Provenance
vmaffioneAuthored on Mar 20 2021, 5:15 PM
Parents
rGf7e3976ed033: netmap: fix memory leak in NETMAP_REQ_PORT_INFO_GET
Branches
Unknown
Tags
Unknown