[PATCH 2.6.20 07/10] nfnetlink_log: fix module
mirq-linux at rere.qmqm.pl
Wed Feb 14 18:07:21 CET 2007
On Wed, Feb 14, 2007 at 05:46:38PM +0100, Patrick McHardy wrote:
> Micha³ Miros³aw wrote:
>> On Tue, Feb 13, 2007 at 01:48:03PM +0100, Patrick McHardy wrote:
>>>I think we should just cancel the timer on destruction.
>> It won't solve a race between destroying the instance and logging a
>> packet. It could happen that:
> This is easily fixable by adding a synchronize_rcu() call
> after removing the instance from the global list.
> nfulnl_log_packet() is called within a RCU read-side
> critical section, so once synchronize_rcu() returns we're
> guaranteed no CPU is within nfulnl_log_packet anymore with
> this instance. And I think it is really preferable to having
> the timer armed after destroying the instance.
That looks better indeed. I'll start on reading what's RCU and
how to use it properly. :)
More information about the netfilter-devel