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  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, 9 Apr 2013 08:18:38 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Jiri Slaby <jirislaby@...il.com>,
	Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] tty: mxser: forever loops on error

There were a couple signedness bugs decrementing "i" which would lead to
a forever loops.

I've made a couple other variables signed as well because they are all
related array offsets and it would be weird if they weren't the same
type.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index d996038..a095859 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -2556,9 +2556,9 @@ static int mxser_probe(struct pci_dev *pdev,
 {
 #ifdef CONFIG_PCI
 	struct mxser_board *brd;
-	unsigned int i, j;
 	unsigned long ioaddress;
 	struct device *tty_dev;
+	int i, j;
 	int retval = -EINVAL;
 
 	for (i = 0; i < MXSER_BOARDS; i++)
@@ -2700,7 +2700,7 @@ static int __init mxser_module_init(void)
 {
 	struct mxser_board *brd;
 	struct device *tty_dev;
-	unsigned int b, i, m;
+	int b, i, m;
 	int retval;
 
 	mxvar_sdriver = alloc_tty_driver(MXSER_PORTS + 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