From: Jason Wang Date: Fri, 11 Jan 2013 16:59:34 +0000 (+0000) Subject: tuntap: fix leaking reference count X-Git-Tag: v3.8-rc4~29^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd38bd853082355641d0034aaf368e13ef2438f8;p=pandora-kernel.git tuntap: fix leaking reference count Reference count leaking of both module and sock were found: - When a detached file were closed, its sock refcnt from device were not released, solving this by add the sock_put(). - The module were hold or drop unconditionally in TUNSETPERSIST, which means we if we set the persist flag for N times, we need unset it for another N times. Solving this by only hold or drop an reference when there's a flag change and also drop the reference count when the persist device is deleted. Signed-off-by: Jason Wang Signed-off-by: David S. Miller --- Reading git-diff-tree failed