Re: [PATCH] drivers/tty/amiserial.c: add missing tty_unlock

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

 



On 04/19/2012 06:12 PM, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@xxxxxxx>
> 
> tty_unlock is used on all other exits from the function.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx>

Acked-by: Jiri Slaby <jslaby@xxxxxxx>

This is broken since 2008 BTW.

> ---
>  drivers/tty/amiserial.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
> index 24145c3..6cc4358 100644
> --- a/drivers/tty/amiserial.c
> +++ b/drivers/tty/amiserial.c
> @@ -1073,8 +1073,10 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
>  		    (new_serial.close_delay != port->close_delay) ||
>  		    (new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
>  		    ((new_serial.flags & ~ASYNC_USR_MASK) !=
> -		     (port->flags & ~ASYNC_USR_MASK)))
> +		     (port->flags & ~ASYNC_USR_MASK))) {
> +			tty_unlock();
>  			return -EPERM;
> +		}
>  		port->flags = ((port->flags & ~ASYNC_USR_MASK) |
>  			       (new_serial.flags & ASYNC_USR_MASK));
>  		state->custom_divisor = new_serial.custom_divisor;


-- 
js
suse labs

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux