[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20111226.151547.564743129441895726.davem@davemloft.net>
Date: Mon, 26 Dec 2011 15:15:47 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: weiyj.lk@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] packet: fix dev refcnt leak when bind fail
From: Wei Yongjun <weiyj.lk@...il.com>
Date: Mon, 26 Dec 2011 17:02:59 +0800
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> If bind is fail such as bind is called after set PACKET_FANOUT
> sock option, the dev refcnt will leak.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
The device pointer is stored in ->prot_hook.dev
Therefore, it will be released at the latest in packet_release() or
earlier if another bind() attempt is done on the socket.
There is no leak here as far as I can see.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists