public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
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 next 2/2] batman-adv: fix potential kernel paging error for unicast transmissions
Date: Fri, 2 Aug 2013 09:18:06 +0200	[thread overview]
Message-ID: <20130802071806.GE3936@ritirata.org> (raw)
In-Reply-To: <201308021205.28767.lindner_marek@yahoo.de>

[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]

On Fri, Aug 02, 2013 at 12:05:28PM +0800, Marek Lindner wrote:
> On Monday, July 29, 2013 04:17:57 Antonio Quartulli wrote:
> > Il 27.07.2013 03:24 Linus Lüssing ha scritto:
> > > batadv_send_skb_prepare_unicast(_4addr) might reallocate the skb's
> > > data. If it does then our ethhdr pointer is not valid anymore in
> > > batadv_send_skb_unicast(), resulting in a kernel paging error.
> > > 
> > > This patch fixes this issue by storing the few bytes we are interested
> > > in on the stack before modifying the skb.
> > 
> > Good fix! thanks!
> > 
> > 
> > However, I think it would be nice to send another patch aiming master
> > which could polish this situation a bit better: e.g. by calling
> > skb_reset_mac_header() in the batadv_send_skb_prepare_unicast_*
> > functions and then get the Ethernet header with eth_hdr() right after
> > having changed the skb.
> 
> I like that approach because it seems cleaner that way. Is there a reason not 
> do it right away ?

I thought the second approach would consist in a bigger patch and so I preferred
to send this to net and the bigger patch to net-next later.

But you may be right. The change I suggested is not really big.
Linus, would you like to provide "the next" patch so that we can clearly
understand if it is worth sending to net or not?

Cheers,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-08-02  7:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27  1:24 [B.A.T.M.A.N.] [PATCH next 1/2] batman-adv: check return type of unicast packet preparations Linus Lüssing
2013-07-27  1:24 ` [B.A.T.M.A.N.] [PATCH next 2/2] batman-adv: fix potential kernel paging error for unicast transmissions Linus Lüssing
2013-07-28 20:17   ` Antonio Quartulli
2013-08-02  4:05     ` Marek Lindner
2013-08-02  7:18       ` Antonio Quartulli [this message]
2013-08-02  8:04         ` Linus Lüssing
2013-07-28 20:14 ` [B.A.T.M.A.N.] [PATCH next 1/2] batman-adv: check return type of unicast packet preparations Antonio Quartulli
2013-08-02  4:02   ` 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=20130802071806.GE3936@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