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] [day] [month] [year] [list]
Date:   Sun, 12 Dec 2021 14:32:33 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     xkernel <xkernel.wang@...mail.com>, jejb@...ux.ibm.com,
        martin.petersen@...cle.com
Cc:     alim.akhtar@...sung.com, avri.altman@....com,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ufs: ufshcd-pltfrm: check the return value of
 kstrdup()

On 12/11/21 10:14, xkernel wrote:
> kstrdup() can return NULL if some internal memory errors happen, so it
> is better to check the return value of it.
> 
> Signed-off-by: xkernel <xkernel.wang@...mail.com>

Is xkernel the name of a person or the name of a robot? Patches should 
be signed by a person even if these have been generated by a robot.

> +		clki->name = kstrdup(name, GFP_KERNEL);
> +		if (!clki->name) {
> +			ret = -ENOMEM;
> +			devm_kfree(dev, clki);
> +			goto out;
> +		}

Is the devm_kfree() call necessary? Is it useful?

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ