Re: [Evolution] Fwd: unix_getname buglet - > 2.5.4(?) [Was: kernel 2.5 and evolution]

On Tue, 2003-01-07 at 09:05, Mika Liljeberg wrote:
Well, looks like you guys already got there. I Just found this on the
kernel list after eyeballing the very same problem in the kernel code.

heh, i guess I should have read this before digging through the code
just now :)




-----Forwarded Message-----

From: Michael Meeks <michael ximian com>
To: linux-kernel vger kernel org
Cc: evolution <evolution-hackers ximian com>, orbit <orbit-list gnome org>
Subject: unix_getname buglet - > 2.5.4(?)
Date: 07 Jan 2003 12:06:32 +0000

Hi there,

      Evolution is non-functioning on recent 2.5.X kernels, due to
mal-performance in getpeername => net/unix/af_unix.c (unix_getname),
where it seems we switch 'sk' on 'peer', but not the (previously)
typecast pointer to it; this fixes it.

--- af_unix.c.old       Tue Jan  7 11:59:09 2003
+++ af_unix.c   Tue Jan  7 12:00:45 2003
@@ -1097,7 +1097,7 @@
 static int unix_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer)
        struct sock *sk = sock->sk;
-       struct unix_sock *u = unix_sk(sk);
+       struct unix_sock *u;
        struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr;
        int err = 0;
@@ -1112,6 +1112,7 @@
+       u = unix_sk(sk);
        if (!u->addr) {
                sunaddr->sun_family = AF_UNIX;

      Thanks Joaquim Fellmann (AFAIR) who chased this down to bitkeeper
changeset Sadly I didn't have time to read the rest of that
changeset to see if the mistake pops up elsewhere as well. Please CC me
with replies, not on linux-kernel.


              Michael Meeks.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]