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: <8734tdaal1.fsf@kernel.org>
Date: Tue, 27 Feb 2024 22:58:18 +0200
From: Kalle Valo <kvalo@...nel.org>
To: Javier Martinez Canillas <javierm@...hat.com>
Cc: linux-kernel@...r.kernel.org,  Nishanth Menon <nm@...com>,  Breno Leitao
 <leitao@...ian.org>,  Li Zetao <lizetao1@...wei.com>,
  linux-wireless@...r.kernel.org
Subject: Re: [PATCH] wlcore: sdio: warn only once for
 wl12xx_sdio_raw_{read,write}() failures

Javier Martinez Canillas <javierm@...hat.com> writes:

> Report these failures only once, instead of keep logging the warnings for
> the same condition every time that a SDIO read or write is attempted. This
> behaviour is spammy and unnecessarily pollutes the kernel log buffer.

Removing error messages is not usually a good idea, it would be much
better to fix the root cause.

> For example, on an AM625 BeaglePlay board where accessing a SDIO WiFi chip
> fails with an -110 error:
>
>   $ dmesg | grep "sdio write\|read failed (-110)" | wc -l
>   39

-110 is -ETIMEDOUT. Why is it timing out?

> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
> ---
>
>  drivers/net/wireless/ti/wlcore/sdio.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
> index eb5482ed76ae..47ecf33a0fbe 100644
> --- a/drivers/net/wireless/ti/wlcore/sdio.c
> +++ b/drivers/net/wireless/ti/wlcore/sdio.c
> @@ -75,8 +75,8 @@ static int __must_check wl12xx_sdio_raw_read(struct device *child, int addr,
>  
>  	sdio_release_host(func);
>  
> -	if (WARN_ON(ret))
> -		dev_err(child->parent, "sdio read failed (%d)\n", ret);
> +	if (WARN_ON_ONCE(ret))
> +		dev_err_once(child->parent, "sdio read failed (%d)\n", ret);

WARN_ON() feels excessive here, maybe remove that entirely? But
dev_err_ratelimited() feels more approriate than printing the error just
once.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ