Re: [PATCH RFC] serial: imx: fix locking in set_termios()

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

 



Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> writes:

> On Thu, Jun 06, 2019 at 10:59:37AM +0300, Sergey Organov wrote:
>> imx_uart_set_termios() called imx_uart_rts_active(), or
>> imx_uart_rts_inactive() before taking port->port.lock.
>> 
>> As a consequence, sport->port.mctrl that these functions modify
>> could have been changed without holding port->port.lock.
>> 
>> Moved locking of port->port.lock above the calls to fix the issue.
>> 
>> Signed-off-by: Sergey Organov <sorganov@xxxxxxxxx>
>> ---
>>  drivers/tty/serial/imx.c | 24 ++++++++++++++----------
>>  1 file changed, 14 insertions(+), 10 deletions(-)
>
> I do not review "RFC" patches as obviously the submitter doesn't think
> they are actually correct :)

Oops! Noticed. As an excuse, there is no: "Don't put "RFC" in if you'd
like Greg to review the patch" in the submitting-patches :)

Lock-correctness is delicate matter that is hard to test, reviewing by
the experts in the filed being probably the best testing strategy
available, and thus your review, Greg, is in fact one of those I'd
especially like to achieve.

I'll re-post the patch without "RFC" anyway if I don't get any
objections, after a while.

Thanks!

-- Sergey



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux