Introduce a mutex lock around syslog-type commands

This patch should make the driver thread-safe and also make it possible
to run in PORT LOCKING mode at the same time.