Searched hist:dd38bd853082355641d0034aaf368e13ef2438f8 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/ |
H A D | tun.c | diff dd38bd853082355641d0034aaf368e13ef2438f8 Fri Jan 11 10:59:34 CST 2013 Jason Wang <jasowang@redhat.com> 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 <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|