From: Martin Schiller <ms@dev.tdt.de>
To: David Miller <davem@davemloft.net>
Cc: andrew.hendry@gmail.com, khc@pm.waw.pl, isdn@linux-pingi.de,
edumazet@google.com, linux-x25@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] wan/hdlc_x25: fix skb handling
Date: Fri, 05 Apr 2019 08:56:44 +0200 [thread overview]
Message-ID: <cf0354c31dd1a20c07d38bd465df5896@dev.tdt.de> (raw)
In-Reply-To: <20190404.173240.1338878948110207179.davem@davemloft.net>
On 2019-04-05 02:32, David Miller wrote:
> From: Martin Schiller <ms@dev.tdt.de>
> Date: Wed, 3 Apr 2019 07:01:16 +0200
>
>> /* X.25 to LAPB */
>> switch (skb->data[0]) {
>> case X25_IFACE_DATA: /* Data to be transmitted */
>> - skb_pull(skb, 1);
>> - if ((result = lapb_data_request(dev, skb)) != LAPB_OK)
>> - dev_kfree_skb(skb);
>> - return NETDEV_TX_OK;
>> + skbn = skb_copy(skb, GFP_ATOMIC);
>> + skb_pull(skbn, 1);
>> + skb_reset_network_header(skbn);
>> + if ((result = lapb_data_request(dev, skbn)) != LAPB_OK)
>> + dev_kfree_skb(skbn);
>
> This leaks 'skb'.
What exactly do you mean?
'skb' will get freed at the end of x25_xmit() function:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wan/hdlc_x25.c#n129
>
> No way I'm applying this stuff.
next prev parent reply other threads:[~2019-04-05 6:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 5:01 [PATCH 1/4] net/x25: call skb_reset_network_header where needed Martin Schiller
2019-04-03 5:01 ` [PATCH 2/4] wan/hdlc_x25: fix skb handling Martin Schiller
2019-04-05 0:32 ` David Miller
2019-04-05 6:56 ` Martin Schiller [this message]
2019-04-05 19:15 ` David Miller
2019-04-08 6:07 ` Martin Schiller
2019-04-03 5:01 ` [PATCH 3/4] isdn/i4l/isdn_x25iface: call skb_reset_network_header Martin Schiller
2019-04-03 5:01 ` [PATCH 4/4] isdn/i4l: Call notifiers before and after changing device type Martin Schiller
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=cf0354c31dd1a20c07d38bd465df5896@dev.tdt.de \
--to=ms@dev.tdt.de \
--cc=andrew.hendry@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=isdn@linux-pingi.de \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x25@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).