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]
Date:	Mon, 8 Aug 2011 00:26:50 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	lethal@...ux-sh.org
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, linux-sh@...r.kernel.org,
	Magnus Damm <magnus.damm@...il.com>
Subject: [PATCH] sh: Fix boot crash related to SCI

From: Rafael J. Wysocki <rjw@...k.pl>

Commit d006199e72a9cf9537ff567ffa07c3f343b9182a (serial:
sh-sci: Regtype probing doesn't need to be fatal.) made
sci_init_single() return when sci_probe_regmap() succeeds, although
it should return when sci_probe_regmap() fails.  This causes systems
using the serial sh-sci driver to crash during boot.

Fix the problem by using the right return condition.

Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
 drivers/tty/serial/sh-sci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/tty/serial/sh-sci.c
===================================================================
--- linux-2.6.orig/drivers/tty/serial/sh-sci.c
+++ linux-2.6/drivers/tty/serial/sh-sci.c
@@ -1889,7 +1889,7 @@ static int __devinit sci_init_single(str
 
 	if (p->regtype == SCIx_PROBE_REGTYPE) {
 		ret = sci_probe_regmap(p);
-		if (unlikely(!ret))
+		if (unlikely(ret))
 			return ret;
 	}
 
--
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