Lockdep violation in the serial driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want to make some changes to the Power Management core, and one of
the side effects will be to make it illegal for a driver to acquire a
mutex within its suspend() or resume() method if that mutex was locked
while the device was registered.

Unfortunately the serial core does exactly that.  In 
drivers/serial/serial_core.c the uart_add_one_port() routine holds 
state->mutex while calling tty_register_device(), and the same mutex is 
acquired by uart_suspend_port() and uart_resume_port().

Can anybody suggest a way around this?  Does the mutex really need to 
be locked at all these times?  Can it be released before calling 
tty_register_device()?  Or could two separate mutexes be used?

Thanks,

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux