Lockdep violation in the serial driver

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-serial@...>, Kernel development list <linux-kernel@...>
Cc: Rafael J. Wysocki <rjw@...>
Date: Friday, July 27, 2007 - 5:33 pm

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

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Lockdep violation in the serial driver, Alan Stern, (Fri Jul 27, 5:33 pm)