lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Jun 2019 13:55:42 +0000
From:   Erwan LE RAY <erwan.leray@...com>
To:     Borut Seljak <borut.seljak@....net>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre TORGUE <alexandre.torgue@...com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        Jiri Slaby <jslaby@...e.com>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: Fwd: [PATCH] serial: stm32: fix a recursive locking in
 stm32_config_rs485


> Hi Borut,
>
> Please add the following line in the commit message (before your 
> sign-off) in a V2 of your patch:
>
> fixes: 1bcda09d291081 ("serial: stm32: add support for RS485 hardware 
> control mode")
>
> I'm OK with the patch itself.
>
> Erwan.
>
>
> Subject: [PATCH] serial: stm32: fix a recursive locking in
>> stm32_config_rs485
>> Date: Tue,  4 Jun 2019 11:54:51 +0200
>> From: Borut Seljak <borut.seljak@....net>
>> CC: Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue
>> <alexandre.torgue@...com>, Greg Kroah-Hartman
>> <gregkh@...uxfoundation.org>, linux-kernel@...r.kernel.org,
>> borut.seljak@....net, linux-serial@...r.kernel.org, Jiri Slaby
>> <jslaby@...e.com>, linux-stm32@...md-mailman.stormreply.com,
>> linux-arm-kernel@...ts.infradead.org
>>
>> Remove spin_lock_irqsave in stm32_config_rs485, it cause recursive 
>> locking.
>> Already locked in uart_set_rs485_config.
>>
>> Signed-off-by: Borut Seljak <borut.seljak@....net>
>> ---
>>   drivers/tty/serial/stm32-usart.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/stm32-usart.c
>> b/drivers/tty/serial/stm32-usart.c
>> index e8d7a7bb4339..da373a465f51 100644
>> --- a/drivers/tty/serial/stm32-usart.c
>> +++ b/drivers/tty/serial/stm32-usart.c
>> @@ -107,7 +107,6 @@ static int stm32_config_rs485(struct uart_port 
>> *port,
>>       bool over8;
>>       unsigned long flags;
>>   -    spin_lock_irqsave(&port->lock, flags);
>>       stm32_clr_bits(port, ofs->cr1, BIT(cfg->uart_enable_bit));
>>        port->rs485 = *rs485conf;
>> @@ -147,7 +146,6 @@ static int stm32_config_rs485(struct uart_port 
>> *port,
>>       }
>>        stm32_set_bits(port, ofs->cr1, BIT(cfg->uart_enable_bit));
>> -    spin_unlock_irqrestore(&port->lock, flags);
>>        return 0;
>>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ