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:	Tue, 29 May 2007 16:12:22 +0100 (BST)
From:	"Maciej W. Rozycki" <macro@...ux-mips.org>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Jeff Garzik <jgarzik@...ox.com>
cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] defxx: Fix the handling of ioremap() failures

 If ioremap_nocache() is unfortunate enough to fail, the error code is not 
set correctly leading to a false success from dfx_register().  This change 
fixes the problem.

Signed-off-by: Maciej W. Rozycki <macro@...ux-mips.org>
---

 Please apply.

  Maciej

patch-mips-2.6.21-20070502-defxx-ioremap-0
diff -up --recursive --new-file linux-mips-2.6.21-20070502.macro/drivers/net/defxx.c linux-mips-2.6.21-20070502/drivers/net/defxx.c
--- linux-mips-2.6.21-20070502.macro/drivers/net/defxx.c	2007-02-21 05:56:25.000000000 +0000
+++ linux-mips-2.6.21-20070502/drivers/net/defxx.c	2007-05-16 21:26:43.000000000 +0000
@@ -566,6 +566,7 @@ static int __devinit dfx_register(struct
 		bp->base.mem = ioremap_nocache(bar_start, bar_len);
 		if (!bp->base.mem) {
 			printk(KERN_ERR "%s: Cannot map MMIO\n", print_name);
+			err = -ENOMEM;
 			goto err_out_region;
 		}
 	} else {
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists