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]
Message-ID: <Yf04R+REP6WahIIr@kroah.com>
Date:   Fri, 4 Feb 2022 15:29:27 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiri Slaby <jirislaby@...nel.org>
Subject: Re: [PATCH v1 1/1] serial: core: Drop duplicate NULL check in
 uart_*shutdown()

On Wed, Feb 02, 2022 at 06:56:48PM +0200, Andy Shevchenko wrote:
> The free_page(addr), which becomes free_pages(addr, 0) checks addr
> against 0. No need to repeat this check in the callers.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/tty/serial/serial_core.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index 57f472268b6d..59f93040d807 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -328,8 +328,7 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
>  	state->xmit.buf = NULL;
>  	spin_unlock_irqrestore(&uport->lock, flags);
>  
> -	if (xmit_buf)
> -		free_page((unsigned long)xmit_buf);
> +	free_page((unsigned long)xmit_buf);
>  }
>  
>  /**
> @@ -1621,8 +1620,7 @@ static void uart_tty_port_shutdown(struct tty_port *port)
>  	state->xmit.buf = NULL;
>  	spin_unlock_irq(&uport->lock);
>  
> -	if (buf)
> -		free_page((unsigned long)buf);
> +	free_page((unsigned long)buf);
>  }
>  
>  static void uart_wait_until_sent(struct tty_struct *tty, int timeout)
> -- 
> 2.34.1
> 

What branch is this against?  It fails to apply to my tty-next branch :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ