All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] tty: mxser: forever loops on error
Date: Tue, 09 Apr 2013 05:50:35 +0000	[thread overview]
Message-ID: <5163AC2B.7060804@ispras.ru> (raw)
In-Reply-To: <20130409051838.GB1516@longonot.mountain>

Hi Dan,

Thank you for the patch.

We are also trying to fix the issue:
https://lkml.org/lkml/2013/2/19/29
https://lkml.org/lkml/2013/4/8/55

and the fix is finally in Greg's tty git tree since yesterday:
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
(tty-linus branch).

Best regards,
Alexey


On 04/09/2013 09:18 AM, Dan Carpenter wrote:
> 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@oracle.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);
>


WARNING: multiple messages have this Message-ID (diff)
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jiri Slaby <jirislaby@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] tty: mxser: forever loops on error
Date: Tue, 09 Apr 2013 09:50:35 +0400	[thread overview]
Message-ID: <5163AC2B.7060804@ispras.ru> (raw)
In-Reply-To: <20130409051838.GB1516@longonot.mountain>

Hi Dan,

Thank you for the patch.

We are also trying to fix the issue:
https://lkml.org/lkml/2013/2/19/29
https://lkml.org/lkml/2013/4/8/55

and the fix is finally in Greg's tty git tree since yesterday:
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
(tty-linus branch).

Best regards,
Alexey


On 04/09/2013 09:18 AM, Dan Carpenter wrote:
> 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@oracle.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);
>


  reply	other threads:[~2013-04-09  5:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09  5:18 [patch] tty: mxser: forever loops on error Dan Carpenter
2013-04-09  5:18 ` Dan Carpenter
2013-04-09  5:50 ` Alexey Khoroshilov [this message]
2013-04-09  5:50   ` Alexey Khoroshilov
2013-04-09  6:22   ` Dan Carpenter
2013-04-09  6:22     ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5163AC2B.7060804@ispras.ru \
    --to=khoroshilov@ispras.ru \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.