Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/ufs/ffs
Ben Harris <bjh21%netbsd.org@localhost> writes:
> In article <20060323133853.GA1468%beta.martani.n2.repy.czf@localhost> you
> write:
>>On Thu, Mar 23, 2006 at 11:16:48AM +0000, Juergen Hannken-Illjes wrote:
>>> Log Message:
>>> ffs_balloc*(): Add an assertion for "bpp != NULL" if B_METAONLY is set.
>>
>>Why? bpp is immediately dereferenced, so if it is NULL, the kernel will
>>panic anyway.
>
> NULL dereferences in the kernel don't always cause panics. In
> particular, read dereferences don't panic on some NetBSD/arm platforms,
> and even write dereferences don't panic on NetBSD/acorn26.
However, on most platforms, they do cause panics, and certainly such
dereferences are not "correct" code -- you are in an unknown state
once you've done such a thing.
Perry
Home |
Main Index |
Thread Index |
Old Index