staging: r8188eu: add error handling of usb read errors
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 1 replyIn review
- v34 patches 2 repliesSuperseded
- v24 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 7 replies | Superseded |
Changes in v4 from the cover letter
fix build error in 1/4 caused by unused local variable
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | staging: r8188eu: add error handling of rtw_read8drivers/ drivers/ drivers/ +13 more | +418 | 0 replies | |
| 2/4 | staging: r8188eu: add error handling of rtw_read16drivers/ drivers/ drivers/ +4 more | +73 | 0 replies | |
| 3/4 | staging: r8188eu: add error handling of rtw_read32drivers/ drivers/ drivers/ +11 more | +202 | 0 replies | |
| 4/4 | MAINTAINERS: add myself as r8188eu reviewerMAINTAINERS | +1 | 1 reply |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Dan Carpenter | Phillip Potter | Larry Finger |
|---|---|---|---|
| 1/4 | |||
| 2/4 | |||
| 3/4 | |||
| 4/4 | A-b | A-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 0/4] staging: r8188eu: add error handling of usb read errors
Hi,
it's reincarnation of my old series for adding sane error handling in r8818eu.
*Problem*
Old code was returning just stack variable in case of read error. It's not the best approach, since passing around stack data might cause device misconfiguration or even kernel data leakage
To solve this I've changed rtw_read{8,16,32} prototypes to return an error via return value and data via passed pointer. Some work should be done to propogate an error down to calltrace, but it's good way to at least start doing sane I/O error handling
Tested locally on qemu with TP-Link TL-WN722N v2/v3 [Realtek RTL8188EUS] device. More testing is welcomed, of course :)
_NOTE_
Series is based on top of staging-testing branch.
Changes since v3:
fix build error in 1/4 caused by unused local variable
Changes since v2:
get rid of (void)res and return an error from function instead of hiding it
Changes since v1:
addresses issues found by Dan and self review. Mostly related to returning _FAIL instead of -errno, since callers expect _FAIL/_SUCCESS
v1: https://lore.kernel.org/linux-staging/[email protected]/
v2: https://lore.kernel.org/linux-staging/[email protected]/
v3: https://lore.kernel.org/linux-staging/[email protected]/
Pavel Skripkin (4):
staging: r8188eu: add error handling of rtw_read8
staging: r8188eu: add error handling of rtw_read16
staging: r8188eu: add error handling of rtw_read32
MAINTAINERS: add myself as r8188eu reviewer
MAINTAINERS | 1 + drivers/staging/r8188eu/core/rtw_cmd.c | 15 +- drivers/staging/r8188eu/core/rtw_efuse.c | 33 ++- drivers/staging/r8188eu/core/rtw_fw.c | 72 +++-- drivers/staging/r8188eu/core/rtw_led.c | 16 +- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 62 ++++- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 9 +- drivers/staging/r8188eu/core/rtw_wlan_util.c | 20 +- .../r8188eu/hal/Hal8188ERateAdaptive.c | 21 +- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 21 +- drivers/staging/r8188eu/hal/HalPwrSeqCmd.c | 9 +- drivers/staging/r8188eu/hal/hal_com.c | 27 +- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 37 ++- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 6 +- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 136 +++++++--- drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 30 ++- drivers/staging/r8188eu/hal/usb_halinit.c | 251 +++++++++++++++--- drivers/staging/r8188eu/hal/usb_ops_linux.c | 33 ++- drivers/staging/r8188eu/include/rtw_io.h | 6 +- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 47 +++- drivers/staging/r8188eu/os_dep/os_intfs.c | 19 +- 21 files changed, 693 insertions(+), 178 deletions(-)
Signature · 1 line
2.36.1