Re: 1.3.16 bugs

Jon Tombs (jon@gte.esi.us.es)
Thu, 10 Aug 1995 18:01:29 +0200 (MET DST)


David Mosberger-Tang said:
>
> Before you try out 1.3.16 on an Alpha, you may want to apply at least
> the following patch to net/unix/af_unix.c:
>
> --- af_unix.c~ Tue Aug 8 15:46:08 1995
> +++ af_unix.c Tue Aug 8 17:11:32 1995
> @@ -937,7 +937,9 @@
> iov.iov_base=ubuf;
> iov.iov_len=size;
> msg.msg_name=(void *)sa;
> - msg.msg_namelen=get_user(addr_len);
> + msg.msg_namelen=0;
> + if (addr_len)
> + msg.msg_namelen=get_user(addr_len);
> msg.msg_accrights=NULL;
> msg.msg_iov=&iov;
> msg.msg_iovlen=1;
>
> Otherwise, the kernel crashes solidly with a 0-pointer dereference
> when trying to start gpm, for example (actually, anything that invokes
> unix_read() or unix_recv(). I don't think this is the above patch
> will be the final solution, but at least it works for now.
>
> Unfortunately, even after applying this patch, pppd (v2.1, patchlevel
> 2) doesn't work for me---it simply hangs. Haven't looked into this
> one yet. If anybody has a patch already, I'd love to hear about it.

syslogd also hangs for me, it seems that the unix_accept function
rejects sockets that are not of type STREAM or in state LISTEN. Syslog
passes a socket which is neither, and enters and endless loop attempting
to accept. Removing the two tests in the unix_accept() fixes syslogd for
me. Not sure if the bug is really with syslog or the checks are incorrect or
something else in the kernel passes the wrong socket....

Jon.