* linux-next: manual merge of the net-next tree with the net tree
@ 2012-09-25 2:34 Stephen Rothwell
2012-09-25 5:10 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2012-09-25 2:34 UTC (permalink / raw)
To: David Miller, netdev; +Cc: linux-next, linux-kernel, Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 590 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got a conflict in
net/ipv4/raw.c between commit ab43ed8b7490 ("ipv4: raw: fix icmp_filter
()") from the net tree and commit 5640f7685831 ("net: use a per task frag
allocator") from the net-next tree.
They are basically the same patch (for this file) except the net-next
version adds two pr_err() calls. I used the net-next version and can carry
the fix as necessary (no action is required).
I do wonder if this change belongs in the net-next patch?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: manual merge of the net-next tree with the net tree
2012-09-25 2:34 linux-next: manual merge of the net-next tree with the net tree Stephen Rothwell
@ 2012-09-25 5:10 ` Eric Dumazet
2012-09-25 5:13 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2012-09-25 5:10 UTC (permalink / raw)
To: Stephen Rothwell
Cc: David Miller, netdev, linux-next, linux-kernel, Eric Dumazet
On Tue, 2012-09-25 at 12:34 +1000, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the net-next tree got a conflict in
> net/ipv4/raw.c between commit ab43ed8b7490 ("ipv4: raw: fix icmp_filter
> ()") from the net tree and commit 5640f7685831 ("net: use a per task frag
> allocator") from the net-next tree.
>
> They are basically the same patch (for this file) except the net-next
> version adds two pr_err() calls. I used the net-next version and can carry
> the fix as necessary (no action is required).
>
> I do wonder if this change belongs in the net-next patch?
Oops, my bad, net/ipv4/raw.c changes in 5640f7685831 ("net: use a per
task frag allocator") should not be there :
I accidentally left a debugging version of the patch I sent to fix the
icmp bug.
Sorry David for this, I am not sure how I can help on this ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: manual merge of the net-next tree with the net tree
2012-09-25 5:10 ` Eric Dumazet
@ 2012-09-25 5:13 ` David Miller
2012-09-25 5:23 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2012-09-25 5:13 UTC (permalink / raw)
To: eric.dumazet; +Cc: sfr, netdev, linux-next, linux-kernel, edumazet
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 25 Sep 2012 07:10:42 +0200
> Oops, my bad, net/ipv4/raw.c changes in 5640f7685831 ("net: use a per
> task frag allocator") should not be there :
>
> I accidentally left a debugging version of the patch I sent to fix the
> icmp bug.
>
> Sorry David for this, I am not sure how I can help on this ?
The thing to do is send me a patch to revert the raw.c change from
net-next, right?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: linux-next: manual merge of the net-next tree with the net tree
2012-09-25 5:13 ` David Miller
@ 2012-09-25 5:23 ` Eric Dumazet
2012-09-25 6:21 ` [PATCH net-next] net: raw: revert unrelated change Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2012-09-25 5:23 UTC (permalink / raw)
To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel, edumazet
On Tue, 2012-09-25 at 01:13 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Tue, 25 Sep 2012 07:10:42 +0200
>
> > Oops, my bad, net/ipv4/raw.c changes in 5640f7685831 ("net: use a per
> > task frag allocator") should not be there :
> >
> > I accidentally left a debugging version of the patch I sent to fix the
> > icmp bug.
> >
> > Sorry David for this, I am not sure how I can help on this ?
>
> The thing to do is send me a patch to revert the raw.c change from
> net-next, right?
Sure, I'll do that after my breakfast and some coffee ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next] net: raw: revert unrelated change
2012-09-25 5:23 ` Eric Dumazet
@ 2012-09-25 6:21 ` Eric Dumazet
2012-09-25 7:11 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2012-09-25 6:21 UTC (permalink / raw)
To: David Miller; +Cc: sfr, netdev, linux-next, linux-kernel
From: Eric Dumazet <edumazet@google.com>
Commit 5640f7685831 ("net: use a per task frag allocator")
accidentally contained an unrelated change to net/ipv4/raw.c,
later committed (without the pr_err() debugging bits) in
net tree as commit ab43ed8b749 (ipv4: raw: fix icmp_filter())
This patch reverts this glitch, noticed by Stephen Rothwell.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/ipv4/raw.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index a80740b..f242578 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -131,23 +131,18 @@ found:
* 0 - deliver
* 1 - block
*/
-static int icmp_filter(const struct sock *sk, const struct sk_buff *skb)
+static __inline__ int icmp_filter(struct sock *sk, struct sk_buff *skb)
{
- struct icmphdr _hdr;
- const struct icmphdr *hdr;
-
- pr_err("icmp_filter skb_transport_offset %d data-head %ld len %d/%d\n",
- skb_transport_offset(skb), skb->data - skb->head, skb->len, skb->data_len);
- hdr = skb_header_pointer(skb, skb_transport_offset(skb),
- sizeof(_hdr), &_hdr);
- pr_err("head %p data %p hdr %p type %d\n", skb->head, skb->data, hdr, hdr ? hdr->type : -1);
- if (!hdr)
+ int type;
+
+ if (!pskb_may_pull(skb, sizeof(struct icmphdr)))
return 1;
- if (hdr->type < 32) {
+ type = icmp_hdr(skb)->type;
+ if (type < 32) {
__u32 data = raw_sk(sk)->filter.data;
- return ((1U << hdr->type) & data) != 0;
+ return ((1 << type) & data) != 0;
}
/* Do not block unknown ICMP types */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next] net: raw: revert unrelated change
2012-09-25 6:21 ` [PATCH net-next] net: raw: revert unrelated change Eric Dumazet
@ 2012-09-25 7:11 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-09-25 7:11 UTC (permalink / raw)
To: eric.dumazet; +Cc: sfr, netdev, linux-next, linux-kernel
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 25 Sep 2012 08:21:16 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> Commit 5640f7685831 ("net: use a per task frag allocator")
> accidentally contained an unrelated change to net/ipv4/raw.c,
> later committed (without the pr_err() debugging bits) in
> net tree as commit ab43ed8b749 (ipv4: raw: fix icmp_filter())
>
> This patch reverts this glitch, noticed by Stephen Rothwell.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-25 7:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25 2:34 linux-next: manual merge of the net-next tree with the net tree Stephen Rothwell
2012-09-25 5:10 ` Eric Dumazet
2012-09-25 5:13 ` David Miller
2012-09-25 5:23 ` Eric Dumazet
2012-09-25 6:21 ` [PATCH net-next] net: raw: revert unrelated change Eric Dumazet
2012-09-25 7:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).