Project

General

Profile

Bug #5253

kmem_alloc/kmem_zalloc won't fail with KM_SLEEP

Added by Josef Sipek about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2014-10-23
Due date:
% Done:

60%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

Passing KM_SLEEP to kmem_alloc or kmem_zalloc guarantees that the return value is not NULL. Therefore any NULL pointer checking on these calls is simply unnecessary and it obfuscates the code.


Related issues

Related to illumos gate - Bug #5254: getrbuf won't fail with KM_SLEEPNew2014-10-23

Actions

Also available in: Atom PDF