From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: [RFC PATCH 2/5] signal/kvm: Stop using sigprocmask in kvm_sigset_(activate|deactivate) Date: Fri, 07 Jun 2019 16:41:58 -0500 Message-ID: <878sudax95.fsf_-_@xmission.com> References: <20190522032144.10995-1-deepa.kernel@gmail.com> <20190529161157.GA27659@redhat.com> <20190604134117.GA29963@redhat.com> <20190606140814.GA13440@redhat.com> <87k1dxaxcl.fsf_-_@xmission.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <87k1dxaxcl.fsf_-_@xmission.com> (Eric W. Biederman's message of "Fri, 07 Jun 2019 16:39:54 -0500") Sender: owner-linux-aio@kvack.org To: Oleg Nesterov Cc: Andrew Morton , Deepa Dinamani , linux-kernel@vger.kernel.org, arnd@arndb.de, dbueso@suse.de, axboe@kernel.dk, dave@stgolabs.net, e@80x24.org, jbaron@akamai.com, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, omar.kilani@gmail.com, tglx@linutronix.de, Al Viro , Linus Torvalds , David Laight , linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org 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" --- 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, ¤t->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, ¤t->real_blocked, NULL); + __set_current_blocked(¤t->real_blocked); sigemptyset(¤t->real_blocked); } -- 2.21.0.dirty -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out01.mta.xmission.com ([166.70.13.231]:53098 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730065AbfFGVmN (ORCPT ); Fri, 7 Jun 2019 17:42:13 -0400 From: ebiederm@xmission.com (Eric W. Biederman) References: <20190522032144.10995-1-deepa.kernel@gmail.com> <20190529161157.GA27659@redhat.com> <20190604134117.GA29963@redhat.com> <20190606140814.GA13440@redhat.com> <87k1dxaxcl.fsf_-_@xmission.com> Date: Fri, 07 Jun 2019 16:41:58 -0500 In-Reply-To: <87k1dxaxcl.fsf_-_@xmission.com> (Eric W. Biederman's message of "Fri, 07 Jun 2019 16:39:54 -0500") Message-ID: <878sudax95.fsf_-_@xmission.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [RFC PATCH 2/5] signal/kvm: Stop using sigprocmask in kvm_sigset_(activate|deactivate) Sender: linux-arch-owner@vger.kernel.org List-ID: To: Oleg Nesterov Cc: Andrew Morton , Deepa Dinamani , linux-kernel@vger.kernel.org, arnd@arndb.de, dbueso@suse.de, axboe@kernel.dk, dave@stgolabs.net, e@80x24.org, jbaron@akamai.com, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, omar.kilani@gmail.com, tglx@linutronix.de, Al Viro , Linus Torvalds , David Laight , linux-arch@vger.kernel.org Message-ID: <20190607214158.GSew5U9umtlQ-BmZpmMfInGu8b-oArtJGS8ozXIP8R4@z> 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" --- 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, ¤t->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, ¤t->real_blocked, NULL); + __set_current_blocked(¤t->real_blocked); sigemptyset(¤t->real_blocked); } -- 2.21.0.dirty