NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/60558: nvmm(4): suspend/resume/detach issues



>Number:         60558
>Category:       kern
>Synopsis:       nvmm(4): suspend/resume/detach issues
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 08 13:00:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10
>Organization:
The NvmmBSD Suspension, Inc.
>Environment:
>Description:

	1. The logic to coordinate suspend/resume around nvmm ioctls
	   involves taking a global mutex to check whether we're
	   suspending.  This could be a performance bottleneck when
	   many VMs are running in parallel.

	2. nvmm_detach is racy, partly because of PR kern/60547:
	   fileops(9) can't be safely unloaded in a module.  Need to:

	   (a) mark that we're detaching,

	   (b) suspend nvmm ioctls and make sure nvmm_enter_sig fails
	       promptly when detaching,

	   (c) wait for all concurrent fileops to return, and then

	   (d) finally we can safely free all the resources.

>How-To-Repeat:

	code inspection

>Fix:

	1. pserialize(9)/localcount(9)

	2. (a) mark that we're detaching,
	   (b) suspend nvmm ioctls and make sure nvmm_enter_sig fails
	       promptly when detaching,
	   (c) wait for all concurrent fileops to return, and then
	   (d) finally we can safely free all the resources.




Home | Main Index | Thread Index | Old Index