From: Patrick McHardy <kaber@trash.net>
To: Krzysztof Oledzki <olenf@ans.pl>, stable@kernel.org
Cc: Harald Welte <laforge@netfilter.org>,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
Pablo Neira Ayuso <pablo@eurodev.net>
Subject: Re: [PATCH] CTA_PROTO_NUM is u_int8_t not u_int16_t (was Re: CTA_PROTO_NUM u_int8_t or u_int16_t)
Date: Tue, 13 Dec 2005 12:22:03 +0100 [thread overview]
Message-ID: <439EAEDB.8080207@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0512131041090.928@bizon.gios.gov.pl>
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
Krzysztof Oledzki wrote:
> The review cycle for the 2.6.14.4 was started. I can't find this fix in
> listed patches and it seems 2.6.14 needs little different patch than
> 2.6.15: s/size_t/int/.
>
> Patch attached, not sure what to do with Signed-off-by lines so please
> feel free to correct it.
>
> Any chances for submitting it into -stable for inclusion in 2.6.14.4?
Sorry, I wanted to wait until the patch hit Linus' tree and
forgot about it. Unfortunately ctnetlink has a number of other
issues in 2.6.14 that don't fulfil the -stable requirements,
so in the end its still pretty unusable.
Anyway, this patch fixes a deadlock when dumping the conntrack
table which has already hit a number of people. Please consider
for -stable.
The patch Krzysztof attached went into 2.6.15-rc and fixes an
attribute sizes that was used inconsistently. Without this patch
compatiblity will break once we fix up the userspace side. The
first released kernel with ctnetlink was 2.6.14, so far the only
user known to me is a tool in beta-stage that lives in netfilter
SVN. We would prefer to have no incompatiblities between at least
2.6.14.x and later kernels, so is something like this acceptable
for -stable? If yes I'll send a patch that applies cleanly to
2.6.14.3.
[-- Attachment #2: ctnl-01.diff --]
[-- Type: text/x-patch, Size: 1468 bytes --]
[NETFILTER]: Fix unbalanced read_unlock_bh in ctnetlink
NFA_NEST calls NFA_PUT which jumps to nfattr_failure if the skb has no
room left. We call read_unlock_bh at nfattr_failure for the NFA_PUT inside
the locked section, so move NFA_NEST inside the locked section too.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
commit 266c8543480e2202ab63d1d604a5ca049f350cd8
tree 77c754dce63f39e1f9dc2d1768ecd348c1d50c74
parent 6636568cf85ef5898a892e90fcc88b61cca9ca27
author Patrick McHardy <kaber@trash.net> Mon, 05 Dec 2005 13:37:33 -0800
committer David S. Miller <davem@davemloft.net> Mon, 05 Dec 2005 13:37:33 -0800
net/ipv4/netfilter/ip_conntrack_proto_tcp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
index aeb7353..e7fa29e 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -341,9 +341,10 @@ static int tcp_print_conntrack(struct se
static int tcp_to_nfattr(struct sk_buff *skb, struct nfattr *nfa,
const struct ip_conntrack *ct)
{
- struct nfattr *nest_parms = NFA_NEST(skb, CTA_PROTOINFO_TCP);
+ struct nfattr *nest_parms;
read_lock_bh(&tcp_lock);
+ nest_parms = NFA_NEST(skb, CTA_PROTOINFO_TCP);
NFA_PUT(skb, CTA_PROTOINFO_TCP_STATE, sizeof(u_int8_t),
&ct->proto.tcp.state);
read_unlock_bh(&tcp_lock);
next prev parent reply other threads:[~2005-12-13 11:22 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 14:40 CTA_PROTO_NUM u_int8_t or u_int16_t Krzysztof Oledzki
2005-11-21 14:53 ` Pablo Neira
2005-11-21 17:03 ` Patrick McHardy
2005-11-21 17:48 ` Pablo Neira
2005-11-21 21:26 ` Krzysztof Oledzki
2005-11-22 4:42 ` Patrick McHardy
2005-11-22 19:04 ` [PATCH] CTA_PROTO_NUM is u_int8_t not u_int16_t (was Re: CTA_PROTO_NUM u_int8_t or u_int16_t) Pablo Neira
2005-11-22 20:29 ` Krzysztof Oledzki
2005-11-22 22:06 ` Harald Welte
2005-11-23 1:06 ` Patrick McHardy
2005-11-23 1:15 ` Pablo Neira
2005-11-23 9:47 ` Patrick McHardy
2005-11-23 10:31 ` Krzysztof Oledzki
2005-11-24 20:07 ` Harald Welte
2005-11-24 20:21 ` Harald Welte
2005-11-24 23:24 ` Krzysztof Oledzki
2005-11-24 23:33 ` Patrick McHardy
2005-11-24 23:54 ` Krzysztof Oledzki
2005-11-25 0:11 ` Patrick McHardy
2005-11-25 0:22 ` Pablo Neira
2005-11-25 0:26 ` Krzysztof Oledzki
2005-11-25 0:28 ` Krzysztof Oledzki
2005-11-25 8:44 ` Harald Welte
2005-11-25 9:23 ` Krzysztof Oledzki
2005-11-25 11:09 ` Harald Welte
2005-11-25 13:25 ` Patrick McHardy
2005-11-26 0:16 ` Pablo Neira Ayuso
2005-11-27 22:28 ` Krzysztof Oledzki
2005-11-29 4:09 ` Harald Welte
2005-11-29 23:07 ` Patrick McHardy
2005-12-04 3:31 ` Pablo Neira Ayuso
2005-12-04 16:05 ` Patrick McHardy
2005-12-04 16:35 ` Patrick McHardy
2005-12-04 19:48 ` [PATCH] CTA_PROTO_NUM is u_int8_t not u_int16_t David S. Miller
2005-12-04 20:02 ` Patrick McHardy
2005-12-04 20:20 ` David S. Miller
2005-12-13 9:56 ` [PATCH] CTA_PROTO_NUM is u_int8_t not u_int16_t (was Re: CTA_PROTO_NUM u_int8_t or u_int16_t) Krzysztof Oledzki
2005-12-13 11:22 ` Patrick McHardy [this message]
2005-12-13 11:32 ` Pablo Neira Ayuso
-- strict thread matches above, loose matches on Subject: below --
2005-12-13 11:26 [PATCH] CTA_PROTO_NUM is u_int8_t not u_int16_t (was Re: CTA_PROTO_NUM u_int8_t or u_int16_t)] Patrick McHardy
2005-12-13 11:51 ` Krzysztof Oledzki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=439EAEDB.8080207@trash.net \
--to=kaber@trash.net \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=olenf@ans.pl \
--cc=pablo@eurodev.net \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.