From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, vivien.didelot@savoirfairelinux.com,
Woojung.Huh@microchip.com, UNGLinuxDriver@microchip.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net v2 0/2] net: dsa: Fix tag_ksz.c
Date: Tue, 22 Aug 2017 15:12:13 -0700 [thread overview]
Message-ID: <20170822221215.16305-1-f.fainelli@gmail.com> (raw)
This implements David's suggestion of providing low-level functions
to control whether skb_pad() and skb_put_padto() should be freeing
the passed skb.
We make use of it to fix a double free in net/dsa/tag_ksz.c that would
occur if we kept using skb_put_padto() in both places.
Florian Fainelli (2):
net: core: Specify skb_pad()/skb_put_padto() SKB freeing
net: dsa: skb_put_padto() already frees nskb
include/linux/skbuff.h | 41 +++++++++++++++++++++++++++++++++++++----
net/core/skbuff.c | 13 ++++++++-----
net/dsa/tag_ksz.c | 10 ++++++----
3 files changed, 51 insertions(+), 13 deletions(-)
--
2.9.3
next reply other threads:[~2017-08-22 22:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 22:12 Florian Fainelli [this message]
2017-08-22 22:12 ` [PATCH net v2 1/2] net: core: Specify skb_pad()/skb_put_padto() SKB freeing Florian Fainelli
2017-08-23 21:42 ` Woojung.Huh
2017-08-22 22:12 ` [PATCH net v2 2/2] net: dsa: skb_put_padto() already frees nskb Florian Fainelli
2017-08-23 21:42 ` Woojung.Huh
2017-08-24 3:37 ` [PATCH net v2 0/2] net: dsa: Fix tag_ksz.c David Miller
2017-08-24 4:40 ` [PATCH net] net: dsa: use consume_skb() Eric Dumazet
2017-08-24 5:14 ` David Miller
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=20170822221215.16305-1-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/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).