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]
Message-ID: <17e3dc55-6e6e-a4e8-f082-4b57144467af@grimberg.me>
Date:   Fri, 4 Oct 2019 17:02:29 -0700
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Colin King <colin.king@...onical.com>,
        Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>, linux-nvme@...ts.infradead.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nvme: fix uninitialized return of ret when
 sysfs_create_link fails

This was already fixed and merged (by Dan)

On 10/2/19 5:43 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently when the call to sysfs_create_link fails the error exit
> path returns an uninitialized value in variable ret. Fix this by
> returning the error code returned from the failed call to
> sysfs_create_link.
> 
> Addresses-Coverity: ("Uninitialized scalar variable")
> Fixes: 32fd90c40768 ("nvme: change locking for the per-subsystem controller list")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>   drivers/nvme/host/core.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 63b37d08ac98..f6acbff3e3bc 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2540,8 +2540,9 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
>   		list_add_tail(&subsys->entry, &nvme_subsystems);
>   	}
>   
> -	if (sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
> -			dev_name(ctrl->device))) {
> +	ret = sysfs_create_link(&subsys->dev.kobj, &ctrl->device->kobj,
> +				dev_name(ctrl->device));
> +	if (ret) {
>   		dev_err(ctrl->device,
>   			"failed to create sysfs link from subsystem.\n");
>   		goto out_put_subsystem;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ