staging: usbip: Don't leak struct file.
authorBernard Blackham <bernard@largestprime.net>
Sun, 21 Oct 2012 19:45:00 +0000 (06:45 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 20:38:04 +0000 (13:38 -0700)
commit3d0a2a22c91e58bfe933115d63cdce60ad2b3a11
tree73c1fdcac0186bcadb54124a94d92d6b971f7c9b
parentc7f0089931dfaefba81001c88449250867582ba6
staging: usbip: Don't leak struct file.

usbip takes a reference on a struct file which is passed in via
sysfs.  Previously, this reference was never cleaned up, although
the socket it referred to was.

This patch drops the corresponding reference (found with the
socket's ->file backpointer) instead of just closing the socket.

Signed-off-by: Bernard Blackham <b-linuxgit@largestprime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/stub_dev.c
drivers/staging/usbip/usbip_common.c
drivers/staging/usbip/vhci_hcd.c
drivers/staging/usbip/vhci_sysfs.c