Bug #678

ntxn could blow pointer in mac_alloc()

Added by Richard Elling about 3 years ago. Updated about 3 years ago.

Status:Rejected Start date:2011-01-29
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:- Spent time: -
Target version:-
Difficulty:Medium Tags:needs-triage

Description

By inspection,

http://src.illumos.org/source/xref/illumos-opengrok/usr/src/uts/common/io/mac/mac_provider.c#88

the return value of kmem_zalloc() is not checked before using it as a pointer for assignment. The return value could be NULL, causing a blown pointer.

History

Updated by Yuri Pankov about 3 years ago

Quoting kmem_alloc(9F):

KM_SLEEP allocations may sleep but are guaranteed to succeed.

So it's likely shouldn't be a problem?

Updated by Garrett D'Amore about 3 years ago

  • Status changed from New to Rejected

Correct. By definition KM_SLEEP allocations never fail. (They may take forever to satisfy though.)

This is not a bug. Closing.

Also available in: Atom PDF