[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1289586803.3185.275.camel@edumazet-laptop>
Date: Fri, 12 Nov 2010 19:33:23 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Alexey Kuznetsov <kuznet@....inr.ac.ru>
Cc: Patrick McHardy <kaber@...sh.net>,
David Lamparter <equinox@...c24.net>,
Eric Paris <eparis@...hat.com>, Hua Zhong <hzhong@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
davem@...emloft.net, pekkas@...core.fi, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, paul.moore@...com,
Damian Lukowski <damian@....rwth-aachen.de>
Subject: Re: a problem tcp_v4_err()
Le vendredi 12 novembre 2010 à 21:29 +0300, Alexey Kuznetsov a écrit :
> Hello!
>
> On Fri, Nov 12, 2010 at 07:12:58PM +0100, Eric Dumazet wrote:
> > I see socket is locked around line 368,
> >
> > bh_lock_sock(sk);
> > /* If too many ICMPs get dropped on busy
> > * servers this needs to be solved differently.
> > */
> > if (sock_owned_by_user(sk))
> > NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
> >
> >
> > Hmm, maybe some goto is missing ;)
>
> It is not missing, sock_owned_by_user() is checked later when some operation which
> cannot be done without lock is required. It was done to save error in sk_err_soft even
> when socket is locked.
>
> This code also _understands_ this: look at
>
> } else if (sock_owned_by_user(sk)) {
> /* RTO revert clocked out retransmission,
> * but socket is locked. Will defer. */
> inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
> HZ/20, TCP_RTO_MAX);
>
> but somehow it considers the manipulations with rto/backoff/write_queue as safe.
> Seems, they are not.
Indeed, right you are, I came to same conclusion.
I CC Damian Lukowski in my previous answer (and this one too)
Thanks !
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists