Eric Dumazet 9915672d41 af_unix: limit unix_tot_inflight
Vegard Nossum found a unix socket OOM was possible, posting an exploit
program.

My analysis is we can eat all LOWMEM memory before unix_gc() being
called from unix_release_sock(). Moreover, the thread blocked in
unix_gc() can consume huge amount of time to perform cleanup because of
huge working set.

One way to handle this is to have a sensible limit on unix_tot_inflight,
tested from wait_for_unix_gc() and to force a call to unix_gc() if this
limit is hit.

This solves the OOM and also reduce overall latencies, and should not
slowdown normal workloads.

Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-24 09:15:27 -08:00
..
2010-10-25 13:09:44 -07:00
2010-10-25 13:09:43 -07:00
2010-11-12 14:07:14 -08:00
2010-10-28 10:27:01 -07:00
2010-11-10 12:12:00 -08:00
2010-09-23 14:33:39 -07:00
2010-09-23 14:33:39 -07:00
2010-10-21 15:44:13 +02:00
2010-09-23 14:33:39 -07:00
2010-04-20 16:37:13 -07:00
2010-11-10 12:12:00 -08:00
2010-10-29 04:16:28 -04:00
2010-11-24 09:15:27 -08:00
2010-08-09 11:25:17 +02:00
2010-10-15 15:53:27 +02:00