Hi,

When using the user-mode library, I found that calling
ecrt_master_deactivate does not properly release the domain memory mapping.
In particular, the following sequence:

 - ecrt_request_master
 - (domain set up)
 - ecrt_master_activate
 - ecrt_master_deactivate
 - (domain set up)
 - ecrt_master_activate
 - ecrt_master_deactivate
 - ecrt_master_release

Does *not* result in actually releasing the master kernel module -- the
master thread remains running and the master module cannot be unloaded until
the application process terminates.

It's especially noticeable when the first domain is non-empty and the second
is empty -- during ecrt_master_release the call to munmap will fail with
EINVAL because master->process_data is non-NULL but
master->process_data_size is 0.

The attached patch resolves this by moving the munmap to
ecrt_master_deactivate instead of ecrt_master_release.

Regards,
Gavin Lambert


Attachment: lib-deactivate.patch
Description: Binary data

_______________________________________________
etherlab-dev mailing list
etherlab-dev@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-dev

Reply via email to