diff options
| author | Jesper Dangaard Brouer <[email protected]> | 2014-03-03 14:45:39 +0100 |
|---|---|---|
| committer | Pablo Neira Ayuso <[email protected]> | 2014-03-07 11:40:47 +0100 |
| commit | e1b207dac13ddb2f8ddebc7dc9729a97421909bd (patch) | |
| tree | 971503a1e212f5f42b3e50d9540c9ee409bf30fd /include/linux/timerqueue.h | |
| parent | b7779d06f9950e14a008a2de970b44233fe49c86 (diff) | |
netfilter: avoid race with exp->master ct
Preparation for disconnecting the nf_conntrack_lock from the
expectations code. Once the nf_conntrack_lock is lifted, a race
condition is exposed.
The expectations master conntrack exp->master, can race with
delete operations, as the refcnt increment happens too late in
init_conntrack(). Race is against other CPUs invoking
->destroy() (destroy_conntrack()), or nf_ct_delete() (via timeout
or early_drop()).
Avoid this race in nf_ct_find_expectation() by using atomic_inc_not_zero(),
and checking if nf_ct_is_dying() (path via nf_ct_delete()).
Signed-off-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions