aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/netfilter/nf_conntrack_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index aa042c489685..10256079e634 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -729,7 +729,6 @@ void nf_conntrack_alter_reply(struct nf_conn *ct,
729 struct nf_conn_help *help = nfct_help(ct); 729 struct nf_conn_help *help = nfct_help(ct);
730 struct nf_conntrack_helper *helper; 730 struct nf_conntrack_helper *helper;
731 731
732 write_lock_bh(&nf_conntrack_lock);
733 /* Should be unconfirmed, so not in hash table yet */ 732 /* Should be unconfirmed, so not in hash table yet */
734 NF_CT_ASSERT(!nf_ct_is_confirmed(ct)); 733 NF_CT_ASSERT(!nf_ct_is_confirmed(ct));
735 734
@@ -738,8 +737,9 @@ void nf_conntrack_alter_reply(struct nf_conn *ct,
738 737
739 ct->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply; 738 ct->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply;
740 if (ct->master || (help && help->expecting != 0)) 739 if (ct->master || (help && help->expecting != 0))
741 goto out; 740 return;
742 741
742 rcu_read_lock();
743 helper = __nf_ct_helper_find(newreply); 743 helper = __nf_ct_helper_find(newreply);
744 if (helper == NULL) { 744 if (helper == NULL) {
745 if (help) 745 if (help)
@@ -757,7 +757,7 @@ void nf_conntrack_alter_reply(struct nf_conn *ct,
757 757
758 rcu_assign_pointer(help->helper, helper); 758 rcu_assign_pointer(help->helper, helper);
759out: 759out:
760 write_unlock_bh(&nf_conntrack_lock); 760 rcu_read_unlock();
761} 761}
762EXPORT_SYMBOL_GPL(nf_conntrack_alter_reply); 762EXPORT_SYMBOL_GPL(nf_conntrack_alter_reply);
763 763