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: <af7b544920184403a22f326c3c8f0d560bf1b4d0.camel@sipsolutions.net>
Date: Fri, 23 May 2025 09:59:34 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Pei Xiao <xiaopei01@...inos.cn>, miriam.rachel.korenblit@...el.com, 
	emmanuel.grumbach@...el.com, linux-wireless@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: iwlwifi: cfg:  Limit cb_size to valid range

On Fri, 2025-05-23 at 14:04 +0800, Pei Xiao wrote:
> 
>  
> -	WARN_ON(RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans)) > 12);
> +	cb_size = RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans));
> +	if (unlikely(cb_size > 12)) {
> +		WARN_ON(1);
> 

What's wrong with "if (WARN_ON(...))"?!?

Not that I think it even really needs to be there but I guess working
around a compiler warning could be worth it.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ