提交 88d2d28b 编写于 作者: D David S. Miller
...@@ -808,9 +808,9 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest, ...@@ -808,9 +808,9 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,
dest->u_threshold = udest->u_threshold; dest->u_threshold = udest->u_threshold;
dest->l_threshold = udest->l_threshold; dest->l_threshold = udest->l_threshold;
spin_lock(&dest->dst_lock); spin_lock_bh(&dest->dst_lock);
ip_vs_dst_reset(dest); ip_vs_dst_reset(dest);
spin_unlock(&dest->dst_lock); spin_unlock_bh(&dest->dst_lock);
if (add) if (add)
ip_vs_new_estimator(&dest->stats); ip_vs_new_estimator(&dest->stats);
......
...@@ -85,6 +85,8 @@ EXPORT_SYMBOL(nf_log_unregister); ...@@ -85,6 +85,8 @@ EXPORT_SYMBOL(nf_log_unregister);
int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger) int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger)
{ {
if (pf >= ARRAY_SIZE(nf_loggers))
return -EINVAL;
mutex_lock(&nf_log_mutex); mutex_lock(&nf_log_mutex);
if (__find_logger(pf, logger->name) == NULL) { if (__find_logger(pf, logger->name) == NULL) {
mutex_unlock(&nf_log_mutex); mutex_unlock(&nf_log_mutex);
...@@ -98,6 +100,8 @@ EXPORT_SYMBOL(nf_log_bind_pf); ...@@ -98,6 +100,8 @@ EXPORT_SYMBOL(nf_log_bind_pf);
void nf_log_unbind_pf(u_int8_t pf) void nf_log_unbind_pf(u_int8_t pf)
{ {
if (pf >= ARRAY_SIZE(nf_loggers))
return;
mutex_lock(&nf_log_mutex); mutex_lock(&nf_log_mutex);
rcu_assign_pointer(nf_loggers[pf], NULL); rcu_assign_pointer(nf_loggers[pf], NULL);
mutex_unlock(&nf_log_mutex); mutex_unlock(&nf_log_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册