netdev
[Top] [All Lists]

Re: [PATCH 2.6]: Fix device leaks in mirred action

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH 2.6]: Fix device leaks in mirred action
From: jamal <hadi@xxxxxxxxxx>
Date: 04 Nov 2004 08:53:59 -0500
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <4189CC6A.9040007@xxxxxxxxx>
Organization: jamalopolous
References: <4189CC6A.9040007@xxxxxxxxx>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 2004-11-04 at 01:30, Patrick McHardy wrote:
> When a mirred action is created it takes two references to the
> device (dev_get_by_index + dev_hold), but only drops one when
> it gets destroyed. 

Good catch.
The correct fix is to remove the dev_hold(p->dev) call.

> It also leaks a reference when a mirred action
> is replaced.

How? Is this patch supposed to fix that?

cheers,
jamal


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