Calling physio() with no buf pointer panics
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 | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Sam Vaughan