[PPC] Add missing SLB allocation KASSERT
Although PPC SLB code doesn't handle allocation failures, which are rare, in most places it asserts that the pointer returned by uma_zalloc() is not NULL, making it easier to identify the failure and avoiding an invalid pointer dereference. This change simply adds a missing KASSERT in SLB code.
This commit is contained in:
parent
545151d107
commit
54fdf3bf19
@ -416,6 +416,7 @@ slb_alloc_tree(void)
|
||||
struct slbtnode *root;
|
||||
|
||||
root = uma_zalloc(slbt_zone, M_NOWAIT | M_ZERO);
|
||||
KASSERT(root != NULL, ("unhandled NULL case"));
|
||||
root->ua_level = UAD_ROOT_LEVEL;
|
||||
|
||||
return (root);
|
||||
|
Loading…
Reference in New Issue
Block a user