> I can't see where in the kernel we're *not* using CMSG_DATA().  This 
> was fixed a while ago and tested ok on beast (for 3 descriptors 
> AFAIR).  Are we looking at the same code (I'm looking in /sys/kern) ?

Have a look in uipc_usrreq.c:unp_internalize(), it uses (cm+1) to
find where the data is to be written out in the CREDS case and uses
(cm+1) to find where the descriptors start in the RIGHTS case. The
reallocation code seems to be broken (it attaches a cluster to a
mbuf it is still using, currupting the data in the mbuf). If I
enable it on the 386, where it is unnecessaey usually, and pass
about 50 discriptors I get a panic.

I've had a look at what other people have done about this issue.
The NetBSD people seem to have taken the fix I'm proposing. Solaris
and BSD/OS don't provide the required alignment and just define
CMSG_DATA(cm) to be (cm+1).

        David.

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

Reply via email to