[PATCH 2.6.29] libertas rx.c -- fix memory leak in rx.c

Dan Williams dcbw at redhat.com
Mon Apr 6 16:38:07 EDT 2009


On Wed, 2009-04-01 at 13:38 -0700, Philip Rakity wrote:
> 
> if there is an error then routine lbs_process_rxed_packet in rx.c does not free the skb.
> 
> signed off by: prakity at yahoo.com

Looks good; though could you re-send to both
linux-wireless at vger.kernel.org and stable at vger.kernel.org, and use the
following subject:

[PATCH] libertas: don't leak skb on receive error

and also format the signed-off-by like so:

Signed-off-by: Philip Rakity <prakity at yahoo.com>

Then it should get into both the next major kernel and the current
stable kernels too.

Thanks!
Dan


> diff -ru linux-2.6.29/drivers/net/wireless/libertas/rx.c.old linux-2.6.29/drivers/net/wireless/libertas/rx.c 
> --- linux-2.6.29/drivers/net/wireless/libertas/rx.c.old    2009-04-01 13:19:26.000000000 -0700
> +++ linux-2.6.29/drivers/net/wireless/libertas/rx.c    2009-04-01 13:19:57.000000000 -0700
> @@ -170,6 +170,7 @@
>          lbs_deb_rx("rx err: frame received with bad length\n");
>          priv->stats.rx_length_errors++;
>          ret = 0;
> +        kfree_skb(skb);
>          goto done;
>      }
>  
> @@ -181,6 +182,7 @@
>          lbs_pr_alert("rxpd not ok\n");
>          priv->stats.rx_errors++;
>          ret = 0;
> +        kfree_skb(skb);
>          goto done;
>      }
> 
> 
>       
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev




More information about the libertas-dev mailing list