All of lore.kernel.org
 help / color / mirror / Atom feed
* unix_getname buglet - > 2.5.4(?)
@ 2003-01-07 12:06 Michael Meeks
  2003-01-07 18:11 ` [PATCH] " Ray Lee
  2003-01-09  0:14 ` Andy Pfiffer
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Meeks @ 2003-01-07 12:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: evolution, orbit

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 @@
                sock_hold(sk);
        }
  
+       u = unix_sk(sk);
        unix_state_rlock(sk);
        if (!u->addr) {
                sunaddr->sun_family = AF_UNIX;

	Thanks Joaquim Fellmann (AFAIR) who chased this down to bitkeeper
changeset 1.262.2.2. 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.

	HTH,

		Michael Meeks.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-09  0:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-07 12:06 unix_getname buglet - > 2.5.4(?) Michael Meeks
2003-01-07 18:11 ` [PATCH] " Ray Lee
2003-01-09  0:14 ` Andy Pfiffer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.