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, 19 Jul 2023 05:32:27 +0000
From:   "Tian, Kevin" <kevin.tian@...el.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Paolo Bonzini <pbonzini@...hat.com>
CC:     Alex Williamson <alex.williamson@...hat.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        "Christopherson,, Sean" <seanjc@...gle.com>,
        "Bradescu, Roxana" <roxabee@...gle.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 2/2] kvm/vfio: avoid bouncing the mutex when adding and
 deleting groups

> From: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Sent: Saturday, July 15, 2023 6:46 AM
>
> @@ -165,30 +161,26 @@ static int kvm_vfio_group_add(struct kvm_device
> *dev, unsigned int fd)
>  	list_for_each_entry(kvg, &kv->group_list, node) {
>  		if (kvg->file == filp) {
>  			ret = -EEXIST;
> -			goto err_unlock;
> +			goto out_unlock;
>  		}
>  	}
> 
>  	kvg = kzalloc(sizeof(*kvg), GFP_KERNEL_ACCOUNT);
>  	if (!kvg) {
>  		ret = -ENOMEM;
> -		goto err_unlock;
> +		goto out_unlock;
>  	}
> 
> -	kvg->file = filp;
> +	kvg->file = get_file(filp);

Why is another reference required here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ