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: <alpine.LRH.2.00.1806251541470.1881@gjva.wvxbf.pm>
Date:   Mon, 25 Jun 2018 15:42:39 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Petr Mladek <pmladek@...e.com>
cc:     Namit Gupta <gupta.namit@...sung.com>,
        sergey.senozhatsky@...il.com, rostedt@...dmis.org,
        linux-kernel@...r.kernel.org, pankaj.m@...sung.com,
        a.sahrawat@...sung.com, himanshu.m@...sung.com
Subject: Re: [PATCH] printk: remove unnecessary kmalloc() from syslog during
 clear

On Mon, 25 Jun 2018, Petr Mladek wrote:

> @@ -1426,7 +1428,8 @@ static int syslog_print_all(char __user *buf, int size, bool clear)
>  	}
>  	logbuf_unlock_irq();
>  
> -	kfree(text);
> +	if (text)
> +		kfree(text);

Nit: you don't need to duplicate the check kfree() is doing anyway.

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ