Subject: Re: netfilter 00/31: netfilter update

From: Patrick McHardy <[email-masked]>
Date: Thu, 11 Jun 2009 16:54:49 +0200

Patrick McHardy wrote:
> David Miller wrote:
>> This stuff isn't ready, sorry I had to undo my pull:
>>
>> net/netfilter/nf_conntrack_proto_tcp.c: In function 'tcp_packet':
>> net/netfilter/nf_conntrack_proto_tcp.c:947: error: 'tcp_lock' 
>> undeclared (first use in this function)
>> net/netfilter/nf_conntrack_proto_tcp.c:947: error: (Each undeclared 
>> identifier is reported only once
>> net/netfilter/nf_conntrack_proto_tcp.c:947: error: for each function 
>> it appears in.)
>> make[2]: *** [net/netfilter/nf_conntrack_proto_tcp.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
> 
> That odd, my tree doesn't have a single reference to tcp_lock left.
> I'll check what went wrong, sorry.

This came in through a net-2.6.git merge after I cloned my tree. I
usually do a test merge of a fresh clone of your tree with mine before
sending the pull request, but forgot this time. I guess I'll add this
step to my pull-request-script to make sure it doesn't happen again.

I've now merged your latest tree and added the attached patch on top
to fix the compile error. This will unfortunately leave a small window
of commits that don't compile cleanly. If you prefer to have this fixed
differently, please let me know, otherwise

Please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6.git master

Thanks!

commit 334a47f6345560af047f164c356d71c3226965d5
Author: Patrick McHardy <[email-masked]>
Date:   Thu Jun 11 16:16:09 2009 +0200

    netfilter: nf_ct_tcp: fix up build after merge
    
    Replace the last occurence of tcp_lock by the per-conntrack lock.
    
    Signed-off-by: Patrick McHardy <[email-masked]>

diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 5142e60..33fc0a4 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -944,7 +944,7 @@ static int tcp_packet(struct nf_conn *ct,
 		    && (ct->proto.tcp.seen[!dir].flags & IP_CT_TCP_FLAG_MAXACK_SET)
 		    && before(ntohl(th->seq), ct->proto.tcp.seen[!dir].td_maxack)) {
 			/* Invalid RST  */
-			write_unlock_bh(&tcp_lock);
+			spin_unlock_bh(&ct->lock);
 			if (LOG_INVALID(net, IPPROTO_TCP))
 				nf_log_packet(pf, 0, skb, NULL, NULL, NULL,
 					  "nf_ct_tcp: invalid RST ");