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: <20170228090540.wrgm52x72zbter63@var.youpi.perso.aquilenet.fr>
Date:   Tue, 28 Feb 2017 10:05:40 +0100
From:   Samuel Thibault <samuel.thibault@...-lyon.org>
To:     "Pranay Kr. Srivastava" <pranjas@...il.com>
Cc:     w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
        gregkh@...uxfoundation.org, sfr@...b.auug.org.au,
        speakup@...ux-speakup.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH SPEAKUP v2 2/3] remove unecessary initial allocation of vc

Pranay Kr. Srivastava, on mar. 28 févr. 2017 13:57:54 +0530, wrote:
> This patch removes the unnecessary allocation of
> current foreground vc during initialization.
> 
> This initialization is already handled in the loop
> that follows it for all available virtual consoles.
> 
> Signed-off-by: Pranay Kr. Srivastava <pranjas@...il.com>

Reviewed-by: Samuel Thibault <samuel.thibault@...-lyon.org>

> ---
>  drivers/staging/speakup/main.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
> index a1d5b66..ca817ca 100644
> --- a/drivers/staging/speakup/main.c
> +++ b/drivers/staging/speakup/main.c
> @@ -2317,7 +2317,6 @@ static int __init speakup_init(void)
>  {
>  	int i;
>  	long err = 0;
> -	struct st_spk_t *first_console;
>  	struct vc_data *vc = vc_cons[fg_console].d;
>  	struct var_t *var;
>  
> @@ -2342,15 +2341,6 @@ static int __init speakup_init(void)
>  	if (err)
>  		goto error_virtkeyboard;
>  
> -	first_console = kzalloc(sizeof(*first_console), GFP_KERNEL);
> -	if (!first_console) {
> -		err = -ENOMEM;
> -		goto error_alloc;
> -	}
> -
> -	speakup_console[vc->vc_num] = first_console;
> -	speakup_date(vc);
> -
>  	for (i = 0; i < MAX_NR_CONSOLES; i++)
>  		if (vc_cons[i].d) {
>  			err = speakup_allocate(vc_cons[i].d);
> @@ -2412,7 +2402,6 @@ static int __init speakup_init(void)
>  	for (i = 0; i < MAX_NR_CONSOLES; i++)
>  		kfree(speakup_console[i]);
>  
> -error_alloc:
>  	speakup_remove_virtual_keyboard();
>  
>  error_virtkeyboard:
> -- 
> 2.10.2
> 

-- 
Samuel
<i> ben oui ce serait idiot, mais osb
  -+- m'en fous de faire un truc débile ! -+-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ