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] [day] [month] [year] [list]
Date: Mon, 27 May 2024 18:00:48 +0200
From: "Sven Peter" <sven@...npeter.dev>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 "Hector Martin" <marcan@...can.st>,
 "Alyssa Rosenzweig" <alyssa@...enzweig.io>,
 "Marcel Holtmann" <marcel@...tmann.org>,
 "Luiz Augusto von Dentz" <luiz.dentz@...il.com>, asahi@...ts.linux.dev,
 linux-arm-kernel@...ts.infradead.org, linux-bluetooth@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org
Subject: Re: [PATCH 1/1] Bluetooth: hci_bcm4377: Convert PCIBIOS_* return codes to
 errnos

Hi,


On Mon, May 27, 2024, at 15:25, Ilpo Järvinen wrote:
> bcm4377_init_cfg() uses pci_{read,write}_config_dword() that return
> PCIBIOS_* codes. The return codes are returned into the calling
> bcm4377_probe() which directly returns the error which is of incorrect
> type (a probe should return normal errnos).

Good catch!

>
> Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal
> errno before returning it from bcm4377_init_cfg. This conversion is the
> easiest by adding a label next to return and doing the conversion there
> once rather than adding pcibios_err_to_errno() into every single return
> statement.

Given that bcm4377_init_cfg is only called at one place from bcm4377_probe
we could also just do something like

	ret = bcm4377_init_cfg(bcm4377);
	if (ret)
		return pcibios_err_to_errno(ret);

there, but either way is fine with me.


Best,


Sven


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ