System crash when EoE is used together with user-mode application

Thank you for 'ethercat'.

Apparently, nobody has ever tested a user-mode application while EoE is in use. I frequently experienced system crashes and freezes. Looking into the code I realized that the ioctl() which is responsible for EoE TX/RX activity fails to lock the 'io_sem' semaphore. I will create a merge request shortly...