diff mbox series

[for_v23,v3,05/12] x86/sgx: Remove redundant message from WARN on non-emtpy mm_list

Message ID 20191016183745.8226-6-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show
Series x86/sgx: Bug fixes for v23 | expand

Commit Message

Sean Christopherson Oct. 16, 2019, 6:37 p.m. UTC
Use WARN_ON_ONCE() instead of WARN_ONCE() for detecting a non-empty
mm_list during enclave release, the "mm_list non-empty" message doesn't
provide any additional or helpful information.

Suggested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 arch/x86/kernel/cpu/sgx/encl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jarkko Sakkinen Oct. 18, 2019, 12:08 p.m. UTC | #1
On Wed, Oct 16, 2019 at 11:37:38AM -0700, Sean Christopherson wrote:
> Use WARN_ON_ONCE() instead of WARN_ONCE() for detecting a non-empty
> mm_list during enclave release, the "mm_list non-empty" message doesn't
> provide any additional or helpful information.
> 
> Suggested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Applied.

/Jarkko
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index 28e29deaad8f..ae81cd7cd8a8 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -514,7 +514,7 @@  void sgx_encl_release(struct kref *ref)
 	if (encl->backing)
 		fput(encl->backing);
 
-	WARN_ONCE(!list_empty(&encl->mm_list), "mm_list non-empty");
+	WARN_ON_ONCE(!list_empty(&encl->mm_list));
 
 	/* Detect EPC page leak's. */
 	WARN_ON_ONCE(encl->secs_child_cnt);