MFC r182960 (with XEN-related chunks removed): The user_ldt_alloc() function shall return with dt_lock locked. The user_ldt_free() function shall return with dt_lock unlocked. Error handling code in both functions do not handle this, fix it by doing necessary lock/unlock.
MFC r182960 (with XEN-related chunks removed):
The user_ldt_alloc() function shall return with dt_lock locked.
The user_ldt_free() function shall return with dt_lock unlocked.
Error handling code in both functions do not handle this, fix it by
doing necessary lock/unlock.

While there, fix minor style nits.

Approved by:	re (kensmith)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase