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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Feb 2008 15:29:48 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Harvey Harrison <harvey.harrison@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] char: fix sparse variable shadowing and int as NULL
 pointer in rocket.c

On Fri, 22 Feb 2008 09:46:59 -0800
Harvey Harrison <harvey.harrison@...il.com> wrote:
>
> Subject: [PATCH] char: fix sparse variable shadowing and int as NULL pointer in rocket.c
>

Please try to make the patch titles big-endian.  This one could have been

char: rocket.c: fix sparse variable shadowing and int as NULL pointer

or even

rocket.c: fix sparse variable shadowing and int as NULL pointer

> Nested min() macros shadow _x, separate into two lines.
> drivers/char/rocket.c:451:7: warning: symbol '_x' shadows an earlier one
> drivers/char/rocket.c:451:7: originally declared here
> drivers/char/rocket.c:451:7: warning: symbol '_x' shadows an earlier one
> drivers/char/rocket.c:451:7: originally declared here
> drivers/char/rocket.c:451:7: warning: symbol '_y' shadows an earlier one
> drivers/char/rocket.c:451:7: originally declared here
> drivers/char/rocket.c:1754:7: warning: symbol '_x' shadows an earlier one
> drivers/char/rocket.c:1754:7: originally declared here
> drivers/char/rocket.c:1754:7: warning: symbol '_x' shadows an earlier one
> drivers/char/rocket.c:1754:7: originally declared here
> drivers/char/rocket.c:1754:7: warning: symbol '_y' shadows an earlier one
> drivers/char/rocket.c:1754:7: originally declared here
> drivers/char/rocket.c:1751:20: warning: Using plain integer as NULL pointer
> 

That's really a sparse glitch.  There's nothing we can sanely do about it.

> ---
>  drivers/char/rocket.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
> index 72f2892..2778d64 100644
> --- a/drivers/char/rocket.c
> +++ b/drivers/char/rocket.c
> @@ -448,7 +448,8 @@ static void rp_do_transmit(struct r_port *info)
>  	while (1) {
>  		if (tty->stopped || tty->hw_stopped)
>  			break;
> -		c = min(info->xmit_fifo_room, min(info->xmit_cnt, XMIT_BUF_SIZE - info->xmit_tail));
> +		c = min(info->xmit_fifo_room, info->xmit_cnt);
> +		c = min(c, XMIT_BUF_SIZE - info->xmit_tail);

Apart from things like that.

Probably this code is cleaner than the old version so let's do it, but it
seems that we need a general fix.

--
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