From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix double call of dev_queue_xmit
Date: Sat, 28 Jan 2017 10:43:02 +0100 [thread overview]
Message-ID: <2805784.b2EcoZjk5T@sven-edge> (raw)
In-Reply-To: <20170128092526.9219-1-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
On Samstag, 28. Januar 2017 10:25:25 CET Sven Eckelmann wrote:
> The net_xmit_eval has side effects because it is not making sure that e
> isn't evaluated twice.
>
> #define net_xmit_eval(e) ((e) == NET_XMIT_CN ? 0 : (e))
>
> The code proposed by David Miller
>
> return net_xmit_eval(dev_queue_xmit(skb));
>
> will therefore get transformed into
>
> return ((dev_queue_xmit(skb)) == NET_XMIT_CN ? 0 : (dev_queue_xmit(skb)))
>
> dev_queue_xmit will therefore be tried again (with an already consumed skb)
> whenever the return code is not NET_XMIT_CN.
>
> Fixes: 17efab9867c5 ("batman-adv: Simplify handling of NET_XMIT_CN")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> net/batman-adv/send.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
I was so embarrassed about not catching these two that I've already applied
them an prepared the changes for net-next.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-01-28 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-28 9:25 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix double call of dev_queue_xmit Sven Eckelmann
2017-01-28 9:25 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix includes for IS_ERR/ERR_PTR Sven Eckelmann
2017-01-28 21:22 ` Linus Lüssing
2017-01-28 21:24 ` Linus Lüssing
2017-01-28 9:43 ` Sven Eckelmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-01-28 10:56 [B.A.T.M.A.N.] [PATCH 0/2] pull request for net-next: batman-adv 2017-01-28 Simon Wunderlich
2017-01-28 10:56 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix double call of dev_queue_xmit Simon Wunderlich
2017-01-30 12:07 ` David Laight
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=2805784.b2EcoZjk5T@sven-edge \
--to=sven@narfation.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