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:	Fri, 14 Jan 2011 10:55:14 +0000
From:	Jack Stone <jwjstone@...tmail.fm>
To:	viresh kumar <viresh.kumar@...com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] fs/eventpoll.c: fix compilation warning

On 14/01/2011 09:38, viresh kumar wrote:
> On 01/14/2011 03:03 PM, Jack Stone wrote:
>>>> -	long slack;
>>>> +	long slack = 0;
>>>> 	wait_queue_t wait;
>>>> 	struct timespec end_time;
>>>> 	ktime_t expires, *to = NULL;
>> I don't think this is the correct fix. This function is fine unless timeout is negative.
>>
>> If a negative timeout is possible then this function will create timer far in the future.
>> I'll leave it up to the maintainer how to solve that one. The two solutions I can see are making
>> timeout unsigned or extending the bottom case of the if to <=0.
>>
>> Either way we should use uninitalized_var() rather than setting it to zero.
> 
> Using uninitialized var gives compilation warning, How should we fix that.
> 

I meant something like
-  long slack;
+  long uninitialized_var(slack);

I just had a go at generating this warning and couldn't. I've tried GCC
4.4.5 (From Fedora 13) and latest sparse.

Thanks,

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