From: Greg KH <gregkh@linuxfoundation.org>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
straube.linux@gmail.com, dan.carpenter@oracle.com,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev
Subject: Re: [PATCH v3 0/4] staging: r8188eu: add error handling of usb read errors
Date: Tue, 7 Jun 2022 13:07:39 +0200 [thread overview]
Message-ID: <Yp8xezHITGrxv47H@kroah.com> (raw)
In-Reply-To: <cover.1654543286.git.paskripkin@gmail.com>
On Mon, Jun 06, 2022 at 10:36:46PM +0300, Pavel Skripkin wrote:
> 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 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/cover.1652911343.git.paskripkin@gmail.com/
> v2: https://lore.kernel.org/linux-staging/cover.1652994483.git.paskripkin@gmail.com/
>
> 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(-)
After applying, I get the following build warning which breaks the
build:
drivers/staging/r8188eu/core/rtw_mlme_ext.c:6826:13: error: unused variable ‘res’ [-Werror=unused-variable]
6826 | int res;
| ^~~
Please test-build your patches before sending them out :(
greg k-h
next prev parent reply other threads:[~2022-06-07 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 19:36 [PATCH v3 0/4] staging: r8188eu: add error handling of usb read errors Pavel Skripkin
2022-06-06 19:36 ` [PATCH v3 1/4] staging: r8188eu: add error handling of rtw_read8 Pavel Skripkin
2022-06-06 19:37 ` [PATCH v3 2/4] staging: r8188eu: add error handling of rtw_read16 Pavel Skripkin
2022-06-06 19:37 ` [PATCH v3 3/4] staging: r8188eu: add error handling of rtw_read32 Pavel Skripkin
2022-06-06 19:37 ` [PATCH v3 4/4] MAINTAINERS: add myself as r8188eu reviewer Pavel Skripkin
2022-06-07 11:07 ` Greg KH [this message]
2022-06-07 19:04 ` [PATCH v3 0/4] staging: r8188eu: add error handling of usb read errors Pavel Skripkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yp8xezHITGrxv47H@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox