Here is patch to fix the call to mach_port_set_ktype in SMP kernels. In summary the call tried to acquire the same lock twice and obviously deadlocked on itself in doing so.
I had hoped to inline the revised ipc_kobject_set() function but that was difficult without more significant modification of the headers.
