From: Ray Lee <ray-lk@madrabbit.org>
To: Michael Meeks <michael@ximian.com>, torvalds@transmeta.com
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
evolution <evolution-hackers@ximian.com>,
orbit <orbit-list@gnome.org>
Subject: [PATCH] Re: unix_getname buglet - > 2.5.4(?)
Date: 07 Jan 2003 10:11:12 -0800 [thread overview]
Message-ID: <1041963072.855.13.camel@orca.madrabbit.org> (raw)
In-Reply-To: <1041941192.25619.293.camel@michael.home>
On Tue, 2003-01-07 at 04:06, Michael Meeks wrote:
> 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.
<snip> Your patch was MailerMangled(tm). Below is what I'm running on
2.5.54, using Evolution. The patch is obviously correct (once you look
at the full code, anyway).
Linus, please apply.
Ray
diff -Nurx /home/ray/work/dontdiff linux-2.5.54/net/unix/af_unix.c linux-2.5.54-af_unix.c-fix/net/unix/af_unix.c
--- linux-2.5.54/net/unix/af_unix.c 2003-01-07 09:22:29.000000000 -0800
+++ linux-2.5.54-af_unix.c-fix/net/unix/af_unix.c 2003-01-07 09:55:19.000000000 -0800
@@ -1109,7 +1109,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;
@@ -1124,6 +1124,7 @@
sock_hold(sk);
}
+ u = unix_sk(sk);
unix_state_rlock(sk);
if (!u->addr) {
sunaddr->sun_family = AF_UNIX;
next prev parent reply other threads:[~2003-01-07 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-07 12:06 unix_getname buglet - > 2.5.4(?) Michael Meeks
2003-01-07 18:11 ` Ray Lee [this message]
2003-01-09 0:14 ` Andy Pfiffer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1041963072.855.13.camel@orca.madrabbit.org \
--to=ray-lk@madrabbit.org \
--cc=evolution-hackers@ximian.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ximian.com \
--cc=orbit-list@gnome.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.