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-prev] [day] [month] [year] [list]
Date:	Sun, 17 Jan 2010 12:40:36 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Julia Lawall <julia@...u.dk>
CC:	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	Dimitri Sivanich <sivanich@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 1/9] drivers/char: Eliminate useless code

Julia Lawall wrote:
> The variable x is initialized twice to the same (side effect-free)
> expression.  Drop one initialization.
[...]
> --- a/drivers/char/mmtimer.c
> +++ b/drivers/char/mmtimer.c
> @@ -546,9 +546,9 @@ static void mmtimer_tasklet(unsigned long data)
>  {
>  	int nodeid = data;
>  	struct mmtimer_node *mn = &timers[nodeid];
> -	struct mmtimer *x = rb_entry(mn->next, struct mmtimer, list);
> +	struct mmtimer *x;
>  	struct k_itimer *t;
>  	unsigned long flags;

The next x = rb_entry(mn->next, struct mmtimer, list); is preceded by a
test whether mn->next is NULL.

Unless that test is redundant too, your patch fixes a potential NULL
pointer dereference, introduced by commit cbacdd95 "SGI Altix mmtimer:
allow larger number of timers per node" in 2.6.26.
-- 
Stefan Richter
-=====-==-=- ---= =---=
http://arcgraph.de/sr/
--
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