netdev
[Top] [All Lists]

Re: [PATCH 11/12] orinoco: monitor mode support

To: Francois Romieu <romieu@xxxxxxxxxxxxx>
Subject: Re: [PATCH 11/12] orinoco: monitor mode support
From: Pavel Roskin <proski@xxxxxxx>
Date: Tue, 17 May 2005 15:43:14 -0400
Cc: Christoph Hellwig <hch@xxxxxx>, jgarzik@xxxxxxxxx, hermes@xxxxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20050514173947.GA32235@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20050514153100.GL3643@xxxxxx> <20050514173947.GA32235@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 2005-05-14 at 19:39 +0200, Francois Romieu wrote:
> > + drop:
> > +   stats->rx_errors++;
> > +   stats->rx_dropped++;
> > +}
> 
> -> leak (skb).

Indeed.  Thank you!  Please apply this on top of the original patches:

Signed-off-by: Pavel Roskin <proski@xxxxxxx>

--- orinoco.c
+++ orinoco.c
@@ -1180,7 +1180,7 @@ static void orinoco_rx_monitor(struct ne
        u16 fc;
        int err;
        int len;
-       struct sk_buff *skb;
+       struct sk_buff *skb = NULL;
        struct orinoco_private *priv = netdev_priv(dev);
        struct net_device_stats *stats = &priv->stats;
        hermes_t *hw = &priv->hw;
@@ -1268,6 +1268,8 @@ static void orinoco_rx_monitor(struct ne
  drop:
        stats->rx_errors++;
        stats->rx_dropped++;
+       if (skb)
+               dev_kfree_skb_irq(skb);
 }
 
 static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)


-- 
Regards,
Pavel Roskin


<Prev in Thread] Current Thread [Next in Thread>