netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	netdev@vger.kernel.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
	Zwane Mwaikambo <zwane@arm.linux.org.uk>,
	"Theodore Ts'o" <tytso@mit.edu>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Chuck Wolber <chuckw@quantumlinux.com>,
	torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk,
	herbert@gondor.apana.org.au, phillips@istop.com
Subject: [patch 07/11] NET: Fix zero-size datagram reception
Date: Fri, 23 Dec 2005 14:27:45 -0800	[thread overview]
Message-ID: <20051223222745.GH18252@kroah.com> (raw)
In-Reply-To: <20051223222652.GA18252@kroah.com>

[-- Attachment #1: fix-zero-size-datagram-reception.patch --]
[-- Type: text/plain, Size: 657 bytes --]

From: Herbert Xu <herbert@gondor.apana.org.au>

The recent rewrite of skb_copy_datagram_iovec broke the reception of
zero-size datagrams.  This patch fixes it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/core/datagram.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.14.1.orig/net/core/datagram.c
+++ linux-2.6.14.1/net/core/datagram.c
@@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct
 {
 	int i, err, fraglen, end = 0;
 	struct sk_buff *next = skb_shinfo(skb)->frag_list;
+
+	if (!len)
+		return 0;
+
 next_skb:
 	fraglen = skb_headlen(skb);
 	i = -1;

--

      parent reply	other threads:[~2005-12-23 22:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051109182205.294803000@press.kroah.org>
     [not found] ` <20051109183614.GA3670@kroah.com>
2005-11-09 18:36   ` [patch 05/11] tcp: BIC max increment too large Greg KH
2005-11-09 18:36   ` [patch 06/11] airo.c/airo_cs.c: correct prototypes Greg KH
2005-11-09 18:37   ` [patch 07/11] NET: Fix zero-size datagram reception Greg KH
     [not found] ` <20051223222652.GA18252@kroah.com>
2005-12-23 22:27   ` [patch 05/11] tcp: BIC max increment too large Greg KH
2005-12-23 22:27   ` [patch 06/11] airo.c/airo_cs.c: correct prototypes Greg KH
2005-12-23 22:27   ` Greg KH [this message]

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=20051223222745.GH18252@kroah.com \
    --to=gregkh@suse.de \
    --cc=acme@ghostprotocols.net \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=chuckw@quantumlinux.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmforbes@linuxtx.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=phillips@istop.com \
    --cc=rdunlap@xenotime.net \
    --cc=stable@kernel.org \
    --cc=torvalds@osdl.org \
    --cc=tytso@mit.edu \
    --cc=zwane@arm.linux.org.uk \
    /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 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).