]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "niu: fix missing checks of niu_pci_eeprom_read"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 May 2021 11:56:49 +0000 (13:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:33:21 +0000 (17:33 +0200)
commitfca6f6c4ea65e8cd3d962d13f7fd71e31fbced49
tree8bd7326a27cb21558166a2bcd066f7891702016e
parent511196d6d657ca3f3a55197d11389da519bd5133
Revert "niu: fix missing checks of niu_pci_eeprom_read"

This reverts commit a73c04611c40d9d15c876f4b90024bd17beff1b9.

Because of recent interactions with developers from @umn.edu, all
commits from them have been recently re-reviewed to ensure if they were
correct or not.

Upon review, this commit was found to be incorrect for the reasons
below, so it must be reverted.  It will be fixed up "correctly" in a
later kernel change.

The change here was incorrect.  While it is nice to check if
niu_pci_eeprom_read() succeeded or not when using the data, any error
that might have happened was not propagated upwards properly, causing
the kernel to assume that these reads were successful, which results in
invalid data in the buffer that was to contain the successfully read
data.

Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Shannon Nelson <shannon.lee.nelson@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Fixes: a73c04611c40 ("niu: fix missing checks of niu_pci_eeprom_read")
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-23-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sun/niu.c