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-next>] [day] [month] [year] [list]
Message-ID: <70d84870-2d7a-77b2-175b-ef1ff3cb6c38@jakma.org>
Date:   Tue, 20 Jul 2021 21:10:37 +0100 (BST)
From:   Paul Jakma <paul@...ma.org>
To:     davem@...emloft.net
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        netdev@...r.kernel.org, stable <stable@...r.kernel.org>,
        Kangjie Lu <kjlu@....edu>
Subject: [PATCH] NIU: fix missing revert of return and fix the driver

The revert of commit 26fd962 missed out on reverting an incorrect change 
to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears to 
be a normal path - treating it as an error and return -EINVAL was 
breaking VPD_SCAN and causing the driver to fail to load.

Fix it, so my Neptune card works again.

Cc: Kangjie Lu <kjlu@....edu>
Cc: Shannon Nelson <shannon.lee.nelson@...il.com>
Cc: David S. Miller <davem@...emloft.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Fixes: 7930742d ('Revert "niu: fix missing checks of niu_pci_eeprom_read"')
Cc: stable <stable@...r.kernel.org>
Signed-off-by: Paul Jakma <paul@...ma.org>
---

--- e6e337708c22f80824b82d4af645f20715730ad0/drivers/net/ethernet/sun/niu.c	2021-07-20 20:51:52.054770659 +0100
+++ fix/drivers/net/ethernet/sun/niu.c	2021-07-20 20:49:02.194870695 +0100
@@ -8192,7 +8192,7 @@
  		if (err < 0)
  			return err;
  		if (err == 1)
-			return -EINVAL;
+			return 0;
  	}
  	return 0;
  }
-- 
Paul Jakma | paul@...ma.org | @pjakma | Key ID: 0xD86BF79464A2FF6A
Fortune:
How sharper than a serpent's tooth is a sister's "See?"
 		-- Linus Van Pelt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ