Re: inconsistent lock/deadlock crash, vanilla 3.3.4, 32bit, tcp

From: David Miller
Date: Mon Apr 30 2012 - 13:40:41 EST


From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Sun, 29 Apr 2012 11:21:56 +0200

> From: Eric Dumazet <edumazet@xxxxxxxxxx>
>
> [PATCH] net: fix sk_sockets_allocated_read_positive
>
> Denys Fedoryshchenko reported frequent crashes on a proxy server and kindly
> provided a lockdep report that explains it all :
...
> Bug is that sk_sockets_allocated_read_positive() calls
> percpu_counter_sum_positive() without BH being disabled.
>
> This bug was added in commit 180d8cd942ce33
> (foundations of per-cgroup memory pressure controlling.), since previous
> code was using percpu_counter_read_positive() which is IRQ safe.
>
> In __sk_mem_schedule() we dont need the precise count of allocated
> sockets and can revert to previous behavior.
>
> Reported-by: Denys Fedoryshchenko <denys@xxxxxxxxxxx>
> Sined-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/