Pavel Emelyanov a8ddc9163c netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations
The thing is that recent_mt_destroy first flushes the entries
from table with the recent_table_flush and only *after* this
removes the proc file, corresponding to that table.

Thus, if we manage to write to this file the '+XXX' command we
will leak some entries. If we manage to write there a 'clean'
command we'll race in two recent_table_flush flows, since the
recent_mt_destroy calls this outside the recent_lock.

The proper solution as I see it is to remove the proc file first
and then go on with flushing the table. This flushing becomes
safe w/o the lock, since the table is already inaccessible from
the outside.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31 00:38:31 -07:00
..
2008-07-16 20:31:16 -07:00
2008-07-16 20:20:11 -07:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-07-16 20:20:11 -07:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-03-06 16:22:02 -08:00
2008-06-11 21:00:38 -07:00
2008-07-16 20:19:49 -07:00
2008-05-01 08:03:58 -07:00
2008-06-11 21:00:38 -07:00
2008-07-10 16:51:32 -07:00
2008-07-25 21:43:18 -07:00
2008-03-26 16:51:09 -07:00
2008-03-26 16:51:09 -07:00