Re: [PATCH] bridge: netfilter: fix a memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 23, 2010 at 12:36 PM, David Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Changli Gao <xiaosuo@xxxxxxxxx>
> Date: Fri, 20 Aug 2010 13:03:16 +0800
>
>> nf_bridge_alloc() always reset the skb->nf_bridge, so we should always
>> put the old one. skb->nf_bridge->use is initialized in nf_bridge_alloc(),
>> so we don't need to initialize it again.
>>
>> Signed-off-by: Changli Gao <xiaosuo@xxxxxxxxx>
>
> We just memcpy()'d 'nf_bridge' to 'tmp', that why the ->use count is
> going to be something other than '1'.  It now has the ->use count that
> 'nf_bridge' did.
>
> And that is why we must explicitly do atomic_set() on 'tmp'.
>

Oops, thanks. I'll post a update.


-- 
Regards,
Changli Gao(xiaosuo@xxxxxxxxx)
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux