[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18142.39804.387020.852675@notabene.brown>
Date: Wed, 5 Sep 2007 13:05:16 +0100
From: Neil Brown <neilb@...e.de>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: cebbert@...hat.com (Chuck Ebbert), netdev@...r.kernel.org
Subject: Re: Oops in 2.6.22.1: skb_copy_and_csum_datagram_iovec()
On Wednesday August 22, herbert@...dor.apana.org.au wrote:
> Chuck Ebbert <cebbert@...hat.com> wrote:
> > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=253290
> >
> > 18:57:54 osama kernel: [<c05be67f>] kernel_recvmsg+0x31/0x40
> > 18:57:54 osama kernel: [<e0bc52d4>] svc_udp_recvfrom+0x114/0x368 [sunrpc]
>
> svc_udp_recvfrom is calling kernel_recvmsg with iov == NULL.
iov == NULL used to work.
I think it stopped working at
commit 759e5d006462d53fb708daa8284b4ad909415da1
Previously, as len==0, MSG_TRUNC would get set, so copy_only would get
set, so skb_copy_datagram_iovec would get called, and that handles a
len of 0.
Now, skb_copy_and_csum_datagram_iovec gets called unless
skb_csum_unnecessary(skb), which now kills us.
We could 'fix' it by making skb_copy_and_csum_datagram_iovec just
return if len==0, or don't call it from udp_recvmsg in that case.
The reason that I call kernel_recvmsg with iov == NULL is that I want
to collect the source/dest addresses of the packet, but I don't want
to actually read the data - I want to just get a reference to the skb
(to avoid needless copy where possible) later.
So I call kernel_recvmsg with MSG_PEEK, and don't bother with an
iovec.
I guess a could send an empty iovec rather than a NULL, but it used to
work....
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists