On 12-Jan-01 Jason Smethers wrote:
> I've got some kernel code that passes untrusted data containing mutic.
> I'd like to be able to check if the mutic have been initialized and
> return an error if they haven't. As of now I don't see a standard way
> of checking for initialization. I'd like to do it this way to abstract
> out the way things are locked, and in FreeBSD's case the mutex's
> description.
> 
> I known I can do this other ways, but it'd be nice if there was a
> standard way to check for this. Just a thought, or else I'd have a
> diff =O.

Umm, well, you could write a function that walked the all_mtx list and checked
if the mutex was in that list.  However, I think that you are using the wrong
tool for your problem here. :)  I'm not sure validating mutexes is the way to
validate all the data you are receiving.

> Thanks
> - Jason

-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to