* netpoll bug - kgdboe on x86_64
@ 2004-01-14 0:18 Jim Houston
2004-01-14 0:26 ` Pavel Machek
2004-01-14 1:04 ` Matt Mackall
0 siblings, 2 replies; 3+ messages in thread
From: Jim Houston @ 2004-01-14 0:18 UTC (permalink / raw)
To: mpm; +Cc: linux-kernel, pavel, amitkale
Hi Matt,
I'm trying to get kgdboe working on x86_64. I noticed that
netpoll_rx is calling the rx_hook with negative values for the length.
The attached patch fixes the problem.
Jim Houston - Concurrent Computer Corp.
---
--- 2.6.1-rc1-mm2.orig/net/core/netpoll.c 2004-01-05 13:15:31.000000000 -0500
+++ 2.6.1-rc1-mm2/net/core/netpoll.c 2004-01-13 18:58:09.311479928 -0500
@@ -400,7 +400,7 @@ int netpoll_rx(struct sk_buff *skb)
if (np->rx_hook)
np->rx_hook(np, ntohs(uh->source),
- (char *)(uh+1), ulen-sizeof(uh)-4);
+ (char *)(uh+1), ulen-sizeof(struct udphdr));
return 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: netpoll bug - kgdboe on x86_64
2004-01-14 0:18 netpoll bug - kgdboe on x86_64 Jim Houston
@ 2004-01-14 0:26 ` Pavel Machek
2004-01-14 1:04 ` Matt Mackall
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2004-01-14 0:26 UTC (permalink / raw)
To: Jim Houston; +Cc: mpm, linux-kernel, pavel, amitkale
Hi!
[Hmm, nice return address, Jim]
> I'm trying to get kgdboe working on x86_64. I noticed that
> netpoll_rx is calling the rx_hook with negative values for the length.
> The attached patch fixes the problem.
I was able to make -mm stuff work on i386, and there were not any
strange problems. (Hope this encourages you :-)
> Jim Houston - Concurrent Computer Corp.
>
> ---
>
> --- 2.6.1-rc1-mm2.orig/net/core/netpoll.c 2004-01-05 13:15:31.000000000 -0500
> +++ 2.6.1-rc1-mm2/net/core/netpoll.c 2004-01-13 18:58:09.311479928 -0500
> @@ -400,7 +400,7 @@ int netpoll_rx(struct sk_buff *skb)
>
> if (np->rx_hook)
> np->rx_hook(np, ntohs(uh->source),
> - (char *)(uh+1), ulen-sizeof(uh)-4);
> + (char *)(uh+1), ulen-sizeof(struct udphdr));
>
> return 1;
> }
--
Horseback riding is like software...
...vgf orggre jura vgf serr.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: netpoll bug - kgdboe on x86_64
2004-01-14 0:18 netpoll bug - kgdboe on x86_64 Jim Houston
2004-01-14 0:26 ` Pavel Machek
@ 2004-01-14 1:04 ` Matt Mackall
1 sibling, 0 replies; 3+ messages in thread
From: Matt Mackall @ 2004-01-14 1:04 UTC (permalink / raw)
Cc: linux-kernel, pavel, amitkale
On Tue, Jan 13, 2004 at 07:18:30PM -0500, Jim Houston wrote:
>
> Hi Matt,
Jim, fix your email address, you sent that as Jim Houston <jhouston@new.localdomain>.
> I'm trying to get kgdboe working on x86_64. I noticed that
> netpoll_rx is calling the rx_hook with negative values for the length.
> The attached patch fixes the problem.
This patch looks correct. I can't recall what I was thinking when I
tossed the -4 in there. It looks suspiciously like I did it to
mindlessly compensate for a bug where I took the sizeof a pointer
rather than a type, but I would _never_ do that. I'll send this on to
jgarzik who's queueing netpoll stuff for me.
> Jim Houston - Concurrent Computer Corp.
>
>
> +++ 2.6.1-rc1-mm2/net/core/netpoll.c 2004-01-13 18:58:09.311479928 -0500
> @@ -400,7 +400,7 @@ int netpoll_rx(struct sk_buff *skb)
>
> if (np->rx_hook)
> np->rx_hook(np, ntohs(uh->source),
> - (char *)(uh+1), ulen-sizeof(uh)-4);
> + (char *)(uh+1), ulen-sizeof(struct udphdr));
>
> return 1;
> }
--
Matt Mackall : http://www.selenic.com : Linux development and consulting
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-01-14 1:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 0:18 netpoll bug - kgdboe on x86_64 Jim Houston
2004-01-14 0:26 ` Pavel Machek
2004-01-14 1:04 ` Matt Mackall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox