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: <YWfdY/ws353nJEiE@kroah.com>
Date:   Thu, 14 Oct 2021 09:33:55 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Francesco Dolcini <francesco.dolcini@...adex.com>
Cc:     Jiri Slaby <jirislaby@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Stefan Agner <stefan@...er.ch>, linux-serial@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] serial: imx: fix crash when un/re-binding console

On Thu, Oct 14, 2021 at 09:10:52AM +0200, Francesco Dolcini wrote:
> From: Stefan Agner <stefan@...er.ch>
> 
> If the device used as a serial console gets un/re-binded, then
> register_console() will call imx_uart_setup_console() again.
> Drop __init so that imx_uart_setup_console() can be safely called
> at runtime.
> 
> Signed-off-by: Stefan Agner <stefan@...er.ch>
> Signed-off-by: Francesco Dolcini <francesco.dolcini@...adex.com>
> ---
>  drivers/tty/serial/imx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

What commit does this "fix"?  Should this go to stable kernels?  If so,
how far back?

> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 8b121cd869e9..51a9f9423b1a 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -2017,7 +2017,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
>   * If the port was already initialised (eg, by a boot loader),
>   * try to determine the current setup.
>   */
> -static void __init
> +static void
>  imx_uart_console_get_options(struct imx_port *sport, int *baud,
>  			     int *parity, int *bits)
>  {
> @@ -2076,7 +2076,7 @@ imx_uart_console_get_options(struct imx_port *sport, int *baud,
>  	}
>  }
>  
> -static int __init
> +static int
>  imx_uart_console_setup(struct console *co, char *options)

Why didn't we get a build warning about this section being called by
code that was not thrown away?  That feels odd...

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ