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]
Message-ID: <dd8d077d-4e04-490b-bf2c-dbeba8010db0@suswa.mountain>
Date: Fri, 5 Jul 2024 23:15:54 +0200
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Aleksandr Mishin <amishin@...rgos.ru>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Zhang Shurong <zhang_shurong@...mail.com>,
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
	lvc-project@...uxtesting.org
Subject: Re: [PATCH] staging: ks7010: Remove unneeded check in
 ks_wlan_get_range()

On Fri, Jul 05, 2024 at 11:44:34PM +0300, Aleksandr Mishin wrote:
> In ks_wlan_get_range() variable 'i' which value is always 12, is compared
> to 2. This check is unneeded and should be removed.
> 
> Remove unneeded check to clean up the code.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
> Signed-off-by: Aleksandr Mishin <amishin@...rgos.ru>
> ---
>  drivers/staging/ks7010/ks_wlan_net.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index 0fb97a79ad0b..d56dae73e7ed 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -972,10 +972,7 @@ static int ks_wlan_get_range(struct net_device *dev,
>  	 * in bit/s that we can expect using this interface.
>  	 * May be use for QoS stuff... Jean II
>  	 */
> -	if (i > 2)
> -		range->throughput = 5000 * 1000;
> -	else
> -		range->throughput = 1500 * 1000;
> +	range->throughput = 5000 * 1000;
>  

This is part of a custom IOCTL.  According to the comment, we're
providing the 5 million as information to the user which I guess they
might use for QoS stuff...  It's kind of pointless.

Anway, the patch doesn't make anything worse.

Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>

KTODO: delete custom ioctls in ks7010.  (requires careful audit or testing)

regards,
dan carpenter



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ