lkml.org 
[lkml]   [2019]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[RFC PATCH 2/5] signal/kvm: Stop using sigprocmask in kvm_sigset_(activate|deactivate)

Instead of jumping through hoops call __set_current_blocked directly.
As well as directly manipulating real_blocked.

This is in preparation for modifying the code to always keep
real_blocked in sync with blocked except in the rare cases when the
kernel needs to override it.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
virt/kvm/kvm_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f0d13d9d125d..8575a1010bfc 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2240,7 +2240,8 @@ void kvm_sigset_activate(struct kvm_vcpu *vcpu)
* ->real_blocked don't care as long ->real_blocked is always a subset
* of ->blocked.
*/
- sigprocmask(SIG_SETMASK, &vcpu->sigset, &current->real_blocked);
+ current->real_blocked = current->blocked;
+ __set_current_blocked(&vcpu->sigset);
}

void kvm_sigset_deactivate(struct kvm_vcpu *vcpu)
@@ -2248,7 +2249,7 @@ void kvm_sigset_deactivate(struct kvm_vcpu *vcpu)
if (!vcpu->sigset_active)
return;

- sigprocmask(SIG_SETMASK, &current->real_blocked, NULL);
+ __set_current_blocked(&current->real_blocked);
sigemptyset(&current->real_blocked);
}

--
2.21.0.dirty
\
 
 \ /
  Last update: 2019-06-07 23:42    [W:0.141 / U:28.032 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site