[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250902094945.2957566-1-maobibo@loongson.cn>
Date: Tue, 2 Sep 2025 17:49:41 +0800
From: Bibo Mao <maobibo@...ngson.cn>
To: Huacai Chen <chenhuacai@...nel.org>,
Xianglai Li <lixianglai@...ngson.cn>
Cc: WANG Xuerui <kernel@...0n.name>,
kvm@...r.kernel.org,
loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/4] Move copy_from_user out of preempt disabled context
Function copy_from_user() and copy_to_user() may sleep because of page
fault, and they cannot be called with preempt disabled context, such as
spin_lock hold context.
Here this patch set move copy_from_user out of preempt disabled context,
local variable is added in spinlock context at first and then put to user
memory from local variable without spinlock.
Bibo Mao (4):
LoongArch: KVM: Avoid use copy_from_user with lock hold in
kvm_eiointc_regs_access
LoongArch: KVM: Avoid use copy_from_user with lock hold in
kvm_eiointc_sw_status_access
LoongArch: KVM: Avoid use copy_from_user with lock hold in
kvm_eiointc_ctrl_access
LoongArch: KVM: Avoid use copy_from_user with lock hold in
kvm_pch_pic_regs_access
arch/loongarch/kvm/intc/eiointc.c | 87 +++++++++++++++++++------------
arch/loongarch/kvm/intc/pch_pic.c | 22 +++++---
2 files changed, 68 insertions(+), 41 deletions(-)
base-commit: b320789d6883cc00ac78ce83bccbfe7ed58afcf0
--
2.39.3
Powered by blists - more mailing lists