From: Antonio Quartulli <ordex@autistici.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Receive fragmented packets and merge
Date: Tue, 23 Apr 2013 21:30:04 +0200 [thread overview]
Message-ID: <20130423193004.GA16603@ritirata.org> (raw)
In-Reply-To: <201304240317.27196.lindner_marek@yahoo.de>
[-- Attachment #1: Type: text/plain, Size: 958 bytes --]
On Wed, Apr 24, 2013 at 03:17:26AM +0800, Marek Lindner wrote:
> On Sunday, April 21, 2013 00:17:33 Martin Hundebøll wrote:
>
>
> > + /* Make room for the rest of the fragments. */
> > + if (pskb_expand_head(skb_out, 0, size - skb->len, GFP_ATOMIC) < 0) {
> > + kfree_skb(skb_out);
> > + goto free;
> > + }
>
> If pskb_expand_head() really fails this function will lead to a crash because
> skb_out points to undefined memory.
I'm not sure about this. pskb_expand_head() can only fail in the early phase and
in that case it seems to return the original skb as it was.
>
> Btw, is pskb_expand_head() enough to handle all cases ? Did you try this with
> a large (4000 bytes or more) packet ?
>
I don't personally see any problem with this. But maybe I am overlooking
something..however, proper testing will make everybody happy :P
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-04-23 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-20 16:17 [B.A.T.M.A.N.] [PATCH 0/3] Fragmentation version 2 Martin Hundebøll
2013-04-20 16:17 ` [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: Remove old fragmentation code Martin Hundebøll
2013-04-23 17:32 ` Marek Lindner
2013-04-20 16:17 ` [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: Receive fragmented packets and merge Martin Hundebøll
2013-04-23 19:17 ` Marek Lindner
2013-04-23 19:30 ` Antonio Quartulli [this message]
2013-04-23 19:43 ` Marek Lindner
2013-04-23 19:47 ` Antonio Quartulli
2013-04-20 16:17 ` [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: Fragment and send skbs larger than mtu Martin Hundebøll
2013-04-23 19:35 ` Marek Lindner
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=20130423193004.GA16603@ritirata.org \
--to=ordex@autistici.org \
--cc=b.a.t.m.a.n@lists.open-mesh.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox