Yes, probably. I did have a bad feeling about the locking, but itseemed to behave well during testing. Wonder why I didn't see this.

So what's happening is that tty_open() holds big_tty_mutex whilecalling acm_tty_open which takes open_lock, and acm_tty_close holdsopen_lock while calling tty_port_close_start which takesbig_tty_mutex?

Not sure how to solve this. Not taking the lock before callingtty_port_close_start means the tty_port may get freed before itreturns.