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: <412032fa04259cbb7f4d286b8346c551e370214a.camel@kernel.crashing.org>
Date:   Fri, 19 Jun 2020 13:17:07 +1000
From:   Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, linux-serial@...r.kernel.org
Subject: Re: [PATCH v1 5/6] console: Propagate error code from console
 ->setup()

On Thu, 2020-06-18 at 19:47 +0300, Andy Shevchenko wrote:
> Since console ->setup() hook returns meaningful error codes,
> propagate it to the caller of try_enable_new_console().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> 

Acked-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>

> ---A
>  kernel/printk/printk.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 8c14835be46c..aaea3ad182e1 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2668,7 +2668,7 @@ early_param("keep_bootcon", keep_bootcon_setup);
>  static int try_enable_new_console(struct console *newcon, bool user_specified)
>  {
>  	struct console_cmdline *c;
> -	int i;
> +	int i, err;
>  
>  	for (i = 0, c = console_cmdline;
>  	     i < MAX_CMDLINECONSOLES && c->name[0];
> @@ -2691,8 +2691,8 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
>  				return 0;
>  
>  			if (newcon->setup &&
> -			    newcon->setup(newcon, c->options) != 0)
> -				return -EIO;
> +			    (err = newcon->setup(newcon, c->options)) != 0)
> +				return err;
>  		}
>  		newcon->flags |= CON_ENABLED;
>  		if (i == preferred_console) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ