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]
Message-ID: <20211018161533.55691170@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 18 Oct 2021 16:15:33 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Denis Kirjanov <dkirjanov@...e.de>
Cc:     Zheyu Ma <zheyuma97@...il.com>, isdn@...ux-pingi.de,
        davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mISDN: Fix return values of the probe function

On Mon, 18 Oct 2021 20:06:51 +0300 Denis Kirjanov wrote:
> 10/18/21 5:20 PM, Zheyu Ma пишет:
> > During the process of driver probing, the probe function should return < 0
> > for failure, otherwise, the kernel will treat value > 0 as success.  
> 
> setup_card() checks for the return value.
> Thus it makes sense to submit the patch with net-next tag

setup_card() propagates the value returned by setup_hw() which in turn
gets propagated by hfc_probe() and hits local_pci_probe():

	/*
	 * Probe function should return < 0 for failure, 0 for success
	 * Treat values > 0 as success, but warn.
	 */
	pci_warn(pci_dev, "Driver probe function unexpectedly returned %d\n",
		 rc);
	return 0;

But you're right, this is a minor bug, hfc_remove_pci() checks if
driver data is already NULL so there will be no crash. Just a driver
bound to a device even though probe failed. Still net material tho.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ