]> git.ipfire.org Git - thirdparty/xtables-addons.git/commit
geoip: lock timing correctness
authorJan Engelhardt <jengelh@computergmbh.de>
Mon, 17 Mar 2008 13:37:37 +0000 (14:37 +0100)
committerJan Engelhardt <jengelh@computergmbh.de>
Sat, 22 Mar 2008 02:59:45 +0000 (03:59 +0100)
commit93c7d0ac4702cd9d30a5bd6a6f7c85797076c619
tree4b3eaf6f606e38eb0337748b7d418b6956806d37
parentdf063ab61c256f6c3508fd4c6665b07943315fff
geoip: lock timing correctness

find_node: The reference count needs to be increased while the lock
is held. Otherwise, the node may disappear right after the lock was
released and increase was attempted, leading to an oops.

remove_node: The reference count needs to be checked while the lock
is held. Otherwise, the node may be used in the match function or
returned from find_node while it has a zero refcount.
extensions/xt_geoip.c