Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2019 17:11:45 +0000 (UTC)
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346600 - head/sys/powerpc/pseries
Message-ID:  <201904231711.x3NHBjtL096417@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luporl
Date: Tue Apr 23 17:11:45 2019
New Revision: 346600
URL: https://svnweb.freebsd.org/changeset/base/346600

Log:
  [PPC64] Fix wrong KASSERT in mphyp_pte_insert()
  
  As mphyp_pte_unset() can also remove PTE entries, and as this can
  happen in parallel with PTEs evicted by mphyp_pte_insert(), there
  is a (rare) chance the PTE being evicted gets removed before
  mphyp_pte_insert() is able to do so. Thus, the KASSERT should
  check wether the result is H_SUCCESS or H_NOT_FOUND, to avoid
  panics if the situation described above occurs.
  
  More details about this issue can be found in PR 237470.
  
  PR:		237470
  Reviewed by:	jhibbits
  Differential Revision:	https://reviews.freebsd.org/D20012

Modified:
  head/sys/powerpc/pseries/mmu_phyp.c

Modified: head/sys/powerpc/pseries/mmu_phyp.c
==============================================================================
--- head/sys/powerpc/pseries/mmu_phyp.c	Tue Apr 23 17:05:57 2019	(r346599)
+++ head/sys/powerpc/pseries/mmu_phyp.c	Tue Apr 23 17:11:45 2019	(r346600)
@@ -453,7 +453,7 @@ mphyp_pte_insert(mmu_t mmu, struct pvo_entry *pvo)
 		    evicted.pte_hi & LPTE_AVPN_MASK, 0, &junk, &lastptelo,
 		    &junk);
 		moea64_pte_overflow++;
-		KASSERT(result == H_SUCCESS,
+		KASSERT(result == H_SUCCESS || result == H_NOT_FOUND,
 		    ("Error evicting page: %d", (int)result));
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904231711.x3NHBjtL096417>