On Sun, Dec 11, 2005 at 08:35:08PM -0800, David S. Miller wrote: > From: Andrew Morton <[EMAIL PROTECTED]> > Date: Sun, 11 Dec 2005 18:39:32 -0800 > > > Odd net behaviour with Dave's net-2.6.16 tree. > ... > > - i cannot login with xdm, as soon as i login, the X server restarts. > > Login with startx works (.xinitrc is a symlink to .xsession) > > It works fine with 2.6.15-rc5-mm1. > > If you need any log please ask. > > > > - there is a warning when pinging an inexistent ip > > (it works fine with 2.6.15-rc5-mm1 too) > > 32-bit x86 ping binary running on an x86_64 system? That might be a > clue for the second bug. > > The first one is mysterious without some more info. > > Can you retest for the ping bug after reverting the following patch? > > Thanks. > > diff-tree 07dda0399dded840d4d1fde39d1cbb0b37123606 (from > 2fbe0a2c52cafa9e6533d0a1747617a46bf8bac6) > Author: Benjamin LaHaise <[EMAIL PROTECTED]> > Date: Sun Dec 11 17:28:15 2005 -0800 > > [NET]: Avoid atomic xchg() for non-error case > > It also looks like there were 2 places where the test on sk_err was > missing from the event wait logic (in sk_stream_wait_connect and > sk_stream_wait_memory), while the rest of the sock_error() users look > to be doing the right thing. This version of the patch fixes those, > and cleans up a few places that were testing ->sk_err directly. > > Signed-off-by: Benjamin LaHaise <[EMAIL PROTECTED]> > Signed-off-by: David S. Miller <[EMAIL PROTECTED]> > > diff --git a/include/net/sock.h b/include/net/sock.h > index 982b4ec..6036340 100644 > --- a/include/net/sock.h > +++ b/include/net/sock.h > @@ -1166,8 +1166,11 @@ static inline int sock_queue_err_skb(str > > static inline int sock_error(struct sock *sk) > { > - int err = xchg(&sk->sk_err, 0); > - return -err; > + int err; > + if (likely(!sk->sk_err)) > + return 0; > + err = xchg(&sk->sk_err, 0); > + return unlikely(-err); the 'return unlikely(-err)' isn't in gitweb (http://kernel.org/git/?p=linux/kernel/git/davem/net-2.6.16.git;a=commit;h=eaa9fba6511857dd2dc6f7f99a4564148c238081) changing it to 'return -err' makes ping and xdm happy again. (i don't understand how the unlikely can make a performance difference).
Anyway, since i'm using gcc-4 (tested with 4.0.2 and 4.1-beta) maybe it is a gcc bug. I'm currently rebuilding my kernel with gcc-3.4. regards, Benoit -- powered by bash/screen/(urxvt/fvwm|linux-console)/gentoo/gnu/linux OS - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html