Calling physio() with no buf pointer panics
Calling physio() with no buf pointer panics
- Subject: Calling physio() with no buf pointer panics
- From: Sam Vaughan <email@hidden>
- Date: Thu, 17 Jul 2003 14:30:06 +1000
In the physio() function in xnu/bsd/kern/physio.c, there's a panic if
the supplied buf pointer is NULL. There's also a commented-out call on
the previous line to getphysbuf(), and an ifdef'd out call to
putphysbuf at the end.
According to the algorithm for physio() on p.203, figure 6.3 of The
Documentation*, physio should allocate a buffer if one wasn't passed in.
Is there any reason for the removal of this code? getphysbuf() and
putphysbuf() don't seem to be defined anywhere, which is a pretty good
reason I guess. If I allocate my own struct buf for this purpose, is
there a recommended call to make to initialise it correctly?
Thanks,
Sam
* The Design and Implementation of the 4.4 BSD Operating System,
McKusick et al, Addison Wesley 1996, for those new to Apple's BSD
kernel documentation ;-)
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.