diff mbox

ieee802154: dont leak skbs in ieee802154_fake_xmit()

Message ID 4B052BCA.4020901@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Nov. 19, 2009, 11:28 a.m. UTC
ieee802154_fake_xmit() should free skbs since it returns NETDEV_TX_OK

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Baryshkov Nov. 19, 2009, 3:57 p.m. UTC | #1
On Thu, Nov 19, 2009 at 2:28 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> ieee802154_fake_xmit() should free skbs since it returns NETDEV_TX_OK

Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

David, please apply.
David Miller Nov. 19, 2009, 8:27 p.m. UTC | #2
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date: Thu, 19 Nov 2009 18:57:48 +0300

> On Thu, Nov 19, 2009 at 2:28 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> ieee802154_fake_xmit() should free skbs since it returns NETDEV_TX_OK
> 
> Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> 
> David, please apply.

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/ieee802154/fakehard.c b/drivers/ieee802154/fakehard.c
index 96a2959..7c544f7 100644
--- a/drivers/ieee802154/fakehard.c
+++ b/drivers/ieee802154/fakehard.c
@@ -260,15 +260,12 @@  static int ieee802154_fake_close(struct net_device *dev)
 static netdev_tx_t ieee802154_fake_xmit(struct sk_buff *skb,
 					      struct net_device *dev)
 {
-	skb->iif = dev->ifindex;
-	skb->dev = dev;
 	dev->stats.tx_packets++;
 	dev->stats.tx_bytes += skb->len;
 
-	dev->trans_start = jiffies;
-
 	/* FIXME: do hardware work here ... */
 
+	dev_kfree_skb(skb);
 	return NETDEV_TX_OK;
 }