lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v2] tty: cyclades: TIOCSERGETLSR should should store to a uint
On 03/05/2012 07:07 PM, Dan Carpenter wrote:
> TIOCSERGETLSR should be saved in a uint so the cast here to unsigned
> long is a bug.
>
> Reported-by: Jiri Slaby <jslaby@suse.cz>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

ACK. Thanks.

> ---
> v2: completely different from v1.
>
> diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
> index c9bf779..5575fee 100644
> --- a/drivers/tty/cyclades.c
> +++ b/drivers/tty/cyclades.c
> @@ -2413,7 +2413,7 @@ static int get_lsr_info(struct cyclades_port *info, unsigned int __user *value)
> /* Not supported yet */
> return -EINVAL;
> }
> - return put_user(result, (unsigned long __user *)value);
> + return put_user(result, value);
> }
>
> static int cy_tiocmget(struct tty_struct *tty)
--
js
suse labs


\
 
 \ /
  Last update: 2012-03-06 15:11    [W:0.041 / U:2.596 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site