soreceive_generic and soreceive_dgram error checking

Mario Oshogbo oshogbo at FreeBSD.org
Mon Jul 15 13:03:28 UTC 2013


Hi,

I'm a student working in GSoC project. My task on this summer is to
write some new features for capsicum framework. Currently I working on
writing two new rights (CAP_SEND_RIGHTS and CAP_RECV_RIGHTS). I have
some questions about error checking in the soreceive_generic and the
soreceive_dgram.

I noticed that after calling dom_externalize function there was no
explicit error checks. After code analysis of soreceive_generic is
likely that error will be returned property. But still, are we need
some more things to do after calling dom_externalize or we could
simply jump to the release if we got some error from that function?

The more puzzling situation is with sorecive_dgram. After calling
dom_externalize we don't check the error anywhere. We also don't
return the error on the end of the function. Even if we change "return
0" to the "return error" there is still the chance that error will be
override by other function (like uimove). Its there any
contraindications to add after calling dom_externalize simply check
returned value and handle error?

I also attach diff with my proposal of error checking in both functions.
Should we apply it for both function or we should only change
soreceive_dgram or ma by none?
Should we make some other changes in soreceive_dgram?

I will be very grateful for any help,
oshogbo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uipc_socket.diff
Type: application/octet-stream
Size: 698 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20130715/8620a7b0/attachment.obj>


More information about the freebsd-net mailing list