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, 30 Aug 2022 08:49:51 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     "D. Starke" <daniel.starke@...mens.com>,
        linux-serial@...r.kernel.org, gregkh@...uxfoundation.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/6] tty: n_gsm: name gsm tty device minors

On 23. 08. 22, 8:22, D. Starke wrote:
> From: Daniel Starke <daniel.starke@...mens.com>
> 
> Add a macro which defines the possible number of virtual devices for n_gsm
> to improve code readability.

Reviewed-by: Jiri Slaby <jirislaby@...nel.org>

> Signed-off-by: Daniel Starke <daniel.starke@...mens.com>
> ---
>   drivers/tty/n_gsm.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> No changes since v1.
> 
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index 5bf09d129357..ed399d57b197 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
> @@ -164,6 +164,9 @@ struct gsm_dlci {
>   	struct net_device *net; /* network interface, if created */
>   };
>   
> +/* Total number of supported devices */
> +#define GSM_TTY_MINORS		256
> +
>   /* DLCI 0, 62/63 are special or reserved see gsmtty_open */
>   
>   #define NUM_DLCI		64
> @@ -3748,7 +3751,7 @@ static int __init gsm_init(void)
>   		return status;
>   	}
>   
> -	gsm_tty_driver = tty_alloc_driver(256, TTY_DRIVER_REAL_RAW |
> +	gsm_tty_driver = tty_alloc_driver(GSM_TTY_MINORS, TTY_DRIVER_REAL_RAW |
>   			TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK);
>   	if (IS_ERR(gsm_tty_driver)) {
>   		pr_err("gsm_init: tty allocation failed.\n");

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ