]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mm, KVM: Fix warning when !CONFIG_PREEMPT_COUNT
authorRoman Kagan <rkagan@virtuozzo.com>
Mon, 17 Jul 2017 09:49:07 +0000 (12:49 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 18 Jul 2017 08:49:18 +0000 (10:49 +0200)
commitc4b74c7b6e7181a0df479eed5dfeb461fea97955
tree6614f5e86d8587101cbe733a8c40238efa275fdd
parentab839eaf660e842fe8da0bd1d23b9529ae08a681
x86/mm, KVM: Fix warning when !CONFIG_PREEMPT_COUNT

A recent commit:

  69327b8178df ("x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant")

introduced a VM_WARN_ON(!in_atomic()) which generates false positives
on every VM entry on !CONFIG_PREEMPT_COUNT kernels.

Replace it with a test for preemptible(), which appears to match the
original intent and works across different CONFIG_PREEMPT* variations.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Nadav Amit <nadav.amit@gmail.com>
Cc: Nadav Amit <namit@vmware.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kvm@vger.kernel.org
Cc: linux-mm@kvack.org
Fixes: 69327b8178df ("x86/mm, KVM: Teach KVM's VMX code that CR3 isn't a constant")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/mmu_context.h