> __pnotify_exit() would need to call the exit callback for all clients
> except for the client failing the fork call. To do this wouldn't the
> following be needed in __pnotify_fork()?
If the fork fails in copy_process, we go to cleanup in copy_process,
not exit.c. So, with the revision, if the the pnotify kernel module
subscriber returns a failure for the process, that failure is passed
along to the copy_process call. There, we go to bad_fork_cleanup_namespace
where a pnotify_exit is done on the process that failed to fork.
In the old version, the pnotify_exit would have also been run within
__pnotify_fork. In the new version, we don't run the pnotify_exit
from __pnotify_fork because we know it will be run in the fork failure
path of copy_process. That should mean that pnotify_exit will only
execute once. I think that means that your suggestion for adding
a pnotify_unsubscribe isn't necessary? The unsubscribe is done by
__pnotify_exit in this case. Or am I still missing the point here?
Sorry if it isn't getting through my head.
See the RCU test version of pnotify in the download site under
pnotify-test. My attempts at posting that patch to the list seem to be
eaten by the list server right now. When that's fixed, I'll start posting