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:   Wed, 2 Mar 2022 14:13:03 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Iouri Tarassov <iourit@...ux.microsoft.com>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
        wei.liu@...nel.org, linux-hyperv@...r.kernel.org,
        linux-kernel@...r.kernel.org, spronovo@...rosoft.com,
        spronovo@...ux.microsoft.com, gregkh@...uxfoundation.org
Subject: Re: [PATCH v3 12/30] drivers: hv: dxgkrnl: Sharing of dxgresource
 objects

On Tue, Mar 01, 2022 at 11:45:59AM -0800, Iouri Tarassov wrote:
[...]
>  
> +static int dxgsharedresource_seal(struct dxgsharedresource *shared_resource)
> +{
> +	int ret = 0;
> +	int i = 0;
> +	u8 *private_data;
> +	u32 data_size;
> +	struct dxgresource *resource;
> +	struct dxgallocation *alloc;
> +
> +	pr_debug("Sealing resource: %p", shared_resource);
> +
> +	down_write(&shared_resource->adapter->shared_resource_list_lock);
> +	if (shared_resource->sealed) {
> +		pr_debug("Resource already sealed");
> +		goto cleanup;
> +	}
> +	shared_resource->sealed = 1;
> +	if (!list_empty(&shared_resource->resource_list_head)) {
[...]
> +		}
> +cleanup1:

Please just name it unlock ... 

> +		mutex_unlock(&resource->resource_mutex);
> +	}
> +cleanup:

... and rename this to done because you are not cleaning up anything.

> +	up_write(&shared_resource->adapter->shared_resource_list_lock);
> +	return ret;
> +}
> +

Thanks,
Wei.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ