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:   Thu, 23 Nov 2017 15:13:06 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Stefano Manni <stefano.manni@...il.com>
Cc:     Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        James Simmons <jsimmons@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        lustre-devel@...ts.lustre.org
Subject: Re: [PATCH 1/4] staging: lustre: fixed signedness of some socklnd
 params

On Wed, Nov 22, 2017 at 08:38:28PM +0100, Stefano Manni wrote:
> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
> index 5663a4c..2ad89ca 100644
> --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
> +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c
> @@ -43,7 +43,7 @@ MODULE_PARM_DESC(peer_timeout, "Seconds without aliveness news to declare peer d
>   * Number of daemons in each thread pool which is percpt,
>   * we will estimate reasonable value based on CPUs if it's not set.
>   */
> -static unsigned int nscheds;
> +static int nscheds;

I've looked through this series and I feel like none of these are real
bugs.  It's just about type safety and being consistent.  Which are good
things.  I'm not sure that I like the parts where we make the variables
signed.

Here "nscheds" is the number of threads.  How can we have a negative
number?  I think it should be unsigned.  It's way more tricky to change
the rest of the code, and leave nscheds unsigned int but I think it's
probably the right thing.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ