lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1352189429-3024-1-git-send-email-harvey.huawei.yang@gmail.com>
Date:	Tue,  6 Nov 2012 16:10:29 +0800
From:	Harvey Yang <harvey.huawei.yang@...il.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Matt Mooney <mfm@...eddisk.com>
Cc:	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	"harvey.yang" <harvey.huawei.yang@...il.com>
Subject: [PATCH 1/1] staging: usbip: put usb_device and kill event handler thread in error cleanups.

From: harvey.yang <harvey.huawei.yang@...il.com>

If probe returns with error, the kthread is still alive even when all usbip modules unloaded. So do cleanups in error handler.

Signed-off-by: harvey.yang <harvey.huawei.yang@...il.com>
---
 drivers/staging/usbip/stub_dev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c
index c8d79a7..16a6868 100644
--- a/drivers/staging/usbip/stub_dev.c
+++ b/drivers/staging/usbip/stub_dev.c
@@ -432,6 +432,8 @@ static int stub_probe(struct usb_interface *interface,
 		dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid);
 		usb_set_intfdata(interface, NULL);
 		usb_put_intf(interface);
+		usb_put_dev(udev);
+		kthread_stop_put(sdev->ud.eh);
 
 		busid_priv->interf_count = 0;
 		busid_priv->sdev = NULL;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ