summaryrefslogtreecommitdiff
path: root/usr/src/uts/sfmmu
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-04-11 00:05:31 +0300
committerToomas Soome <tsoome@me.com>2020-04-24 21:03:27 +0300
commit12551037071c8ef2216bb540edd94a5bff5e90ae (patch)
tree952bbc44a4a8d7a8c077fb181bba89e79b62177b /usr/src/uts/sfmmu
parent13c31a0ee516ab913296f7367d3c09a79ff3ba21 (diff)
downloadillumos-joyent-12551037071c8ef2216bb540edd94a5bff5e90ae.tar.gz
12532 unix: NULL pointer errors
Reviewed by: Gary Mills <gary_mills@fastmail.fm> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/sfmmu')
-rw-r--r--usr/src/uts/sfmmu/vm/hat_sfmmu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/uts/sfmmu/vm/hat_sfmmu.c b/usr/src/uts/sfmmu/vm/hat_sfmmu.c
index 13e6a1cdfe..2c6f5fb87f 100644
--- a/usr/src/uts/sfmmu/vm/hat_sfmmu.c
+++ b/usr/src/uts/sfmmu/vm/hat_sfmmu.c
@@ -1940,7 +1940,7 @@ hat_free_end(struct hat *sfmmup)
ASSERT(sfmmup->sfmmu_ttecnt[TTE256M] == 0);
if (sfmmup->sfmmu_rmstat) {
- hat_freestat(sfmmup->sfmmu_as, NULL);
+ hat_freestat(sfmmup->sfmmu_as, 0);
}
while (sfmmup->sfmmu_tsb != NULL) {
@@ -10085,7 +10085,7 @@ sfmmu_check_page_sizes(sfmmu_t *sfmmup, int growing)
* Kernel threads, processes with small address spaces not using
* large pages, and dummy ISM HATs need not apply.
*/
- if (sfmmup == ksfmmup || sfmmup->sfmmu_ismhat != NULL)
+ if (sfmmup == ksfmmup || sfmmup->sfmmu_ismhat != 0)
return;
if (!SFMMU_LGPGS_INUSE(sfmmup) &&
@@ -12077,7 +12077,7 @@ sfmmu_ismtlbcache_demap(caddr_t addr, sfmmu_t *ism_sfmmup,
*/
ASSERT(ism_sfmmup->sfmmu_ismhat);
ASSERT(MUTEX_HELD(&ism_mlist_lock));
- addr = addr - ISMID_STARTADDR;
+ addr = (caddr_t)((uintptr_t)addr - (uintptr_t)ISMID_STARTADDR);
for (ment = ism_sfmmup->sfmmu_iment; ment; ment = ment->iment_next) {