修复bug:ip_plugin和fqdn_plugin的扫描线程可能访问到无效的EX_data_container,导致#26; plugin的扫描线程和更新线程发生线程不安全访问EX_data_rt中的uthash。
This commit is contained in:
@@ -24,4 +24,6 @@ MAAT_RULE_EX_DATA EX_data_rt_get_EX_data_by_container(struct EX_data_rt* ex_rt,
|
||||
size_t EX_data_rt_list_all_ex_container(struct EX_data_rt* ex_rt, struct EX_data_container*** ex_container_array);
|
||||
void* EX_data_container_get_user_data(struct EX_data_container* ex_container);
|
||||
size_t EX_data_rt_get_ex_container_count(struct EX_data_rt* ex_rt);
|
||||
void EX_data_rt_garbage_collection(struct EX_data_rt* ex_rt);
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "Maat_table.h"
|
||||
#include "Maat_ex_data.h"
|
||||
#include "Maat_garbage_collection.h"
|
||||
|
||||
#include "IPMatcher.h"
|
||||
#include "gram_index_engine.h"
|
||||
@@ -19,8 +18,7 @@ struct fqdn_plugin_runtime
|
||||
{
|
||||
struct FQDN_engine* fqdn_engine;
|
||||
struct FQDN_engine* new_fqdn_engine;
|
||||
struct EX_data_rt* ex_data_rt; //for fqdn_plugin ONLY
|
||||
struct Maat_garbage_bin* bin;
|
||||
struct EX_data_rt* ex_data_rt;
|
||||
int changed_flag;
|
||||
};
|
||||
struct plugin_runtime
|
||||
@@ -34,7 +32,6 @@ struct ip_plugin_runtime
|
||||
struct EX_data_rt* ex_data_rt;
|
||||
struct ip_matcher* ip_matcher;
|
||||
struct ip_matcher* new_ip_matcher;
|
||||
struct Maat_garbage_bin* bin;
|
||||
int changed_flag;
|
||||
};
|
||||
struct expr_runtime
|
||||
@@ -88,6 +85,8 @@ void Maat_table_runtime_digest_del(struct Maat_table_runtime* table_rt, int expr
|
||||
int Maat_table_runtime_digest_batch_udpate(struct Maat_table_runtime* table_rt);
|
||||
|
||||
void Maat_table_runtime_plugin_new_row(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, const char* row, void *logger);
|
||||
void Maat_table_runtime_plugin_garbage_collection(struct Maat_table_runtime* table_rt);
|
||||
|
||||
void Maat_table_runtime_ip_plugin_new_row(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, const char* row, void *logger);
|
||||
|
||||
int Maat_table_runtime_ip_plugin_commit_ex_schema(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, void* logger);
|
||||
|
||||
Reference in New Issue
Block a user