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:	Mon, 21 Mar 2016 18:42:56 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org, bp@...en8.de
Subject: Re: [PATCH] KVM: fix spin_lock_init order on x86



On 21/03/2016 16:19, Paolo Bonzini wrote:
>>> >> +	spin_lock_init(&kvm->mmu_lock);
>>> >> +	kvm->mm = current->mm;
>>> >> +	atomic_inc(&kvm->mm->mm_count);
>> > 
>> > current->mm->mm_count is incremented here.
>> > 
>>> >> +	kvm_eventfd_init(kvm);
>>> >> +	mutex_init(&kvm->lock);
>>> >> +	mutex_init(&kvm->irq_lock);
>>> >> +	mutex_init(&kvm->slots_lock);
>>> >> +	atomic_set(&kvm->users_count, 1);
>>> >> +	INIT_LIST_HEAD(&kvm->devices);
>>> >> +
>>> >>  	r = kvm_arch_init_vm(kvm, type);
>>> >>  	if (r)
>>> >>  		goto out_err_no_disable;
>> > 
>> > 
>> > But out_err_no_disable wont decrement it in case of an error.
>> > 
>> > This is not clear to me where the cleanup is done ?
> Indeed, a slightly more complex patch is necessary.  Will try again,
> this time not doing this as the first thing in the morning.

And not even _that_ more complex, just a single mmdrop is necessary.
The mmdrop in fact was absent even before the patch, and the patch
actually makes it easier to fix the lack of mmdrop.  Meaning it now
qualifies for stable.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ