[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ba0969cecac9a8e677d1b1eed1a5742@visp.net.lb>
Date: Sun, 29 Apr 2012 11:46:05 +0300
From: Denys Fedoryshchenko <denys@...p.net.lb>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>,
<jmorris@...ei.org>, <yoshfuji@...ux-ipv6.org>, <kaber@...sh.net>,
<linux-kernel@...r.kernel.org>,
Glauber Costa <glommer@...allels.com>
Subject: Re: inconsistent lock/deadlock crash, vanilla 3.3.4, 32bit, tcp
On 2012-04-29 11:27, Eric Dumazet wrote:
>
>
> OK, so when we have memory pressure we can call
> percpu_counter_read_positive() with SOFTIRQ enabled, and lockdep
> complains...
>
> This bug was probably added in 2008, in commit 1748376b6626a
> (net: Use a percpu_counter for sockets_allocated)
>
> I'll have to backport the following patch, can you test it please ?
>
> Thanks !
>
> net/core/sock.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/core/sock.c b/net/core/sock.c
> index b2e14c0..08fc929 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -1818,7 +1818,9 @@ int __sk_mem_schedule(struct sock *sk, int
> size, int kind)
>
> if (!sk_under_memory_pressure(sk))
> return 1;
> + local_bh_disable();
> alloc = sk_sockets_allocated_read_positive(sk);
> + local_bh_enable();
> if (sk_prot_mem_limits(sk, 2) > alloc *
> sk_mem_pages(sk->sk_wmem_queued +
> atomic_read(&sk->sk_rmem_alloc) +
I will try to deploy it and test as soon as someone will powercycle
server on other side.
--
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