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>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 6 Aug 2007 14:20:59 +0200
From:	Olaf Hering <olh@...e.de>
To:	Stefan Richter <stefanr@...6.in-berlin.de>,
	linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: [PATCH] fix crash in sbp2_remove_device() when dma_set_mask() fails

Fix crash in sbp2_remove_device() when dma_set_mask() fails.

Signed-off-by: Olaf Hering <olh@...e.de>

---
 drivers/ieee1394/sbp2.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -929,13 +929,14 @@ static void sbp2_remove_device(struct sb
 	if (!lu)
 		return;
 
-	hi = lu->hi;
-
 	if (lu->shost) {
 		scsi_remove_host(lu->shost);
 		scsi_host_put(lu->shost);
 	}
 	flush_scheduled_work();
+	hi = lu->hi;
+	if (!hi)
+		return;
 	sbp2util_remove_command_orb_pool(lu);
 
 	list_del(&lu->lu_list);
@@ -977,8 +978,7 @@ static void sbp2_remove_device(struct sb
 
 	lu->ud->device.driver_data = NULL;
 
-	if (hi)
-		module_put(hi->host->driver->owner);
+	module_put(hi->host->driver->owner);
 
 	kfree(lu);
 }
-
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