From: Ping-Ke Shih <pkshih@realtek.com>
To: Zhang Shurong <zhang_shurong@foxmail.com>
Cc: "tony0620emma@gmail.com" <tony0620emma@gmail.com>,
"kvalo@kernel.org" <kvalo@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 1/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_copy_from_user
Date: Thu, 27 Apr 2023 00:43:44 +0000 [thread overview]
Message-ID: <b7621cdcdf8f4d53b7bd035f5c992d32@realtek.com> (raw)
In-Reply-To: <tencent_D2EB102CC7435C0110154E62ECA6A7D67505@qq.com>
> -----Original Message-----
> From: Zhang Shurong <zhang_shurong@foxmail.com>
> Sent: Thursday, April 27, 2023 1:02 AM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: tony0620emma@gmail.com; kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> pabeni@redhat.com; linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> Zhang Shurong <zhang_shurong@foxmail.com>
> Subject: [PATCH v3 1/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_copy_from_user
>
> If there is a failure during copy_from_user or user-provided data
> buffer is invalid, rtw_debugfs_copy_from_user should return negative
> error code instead of a positive value count.
>
> Fix this bug by returning correct error code. Moreover, the check
> of buffer against null is removed since it will be handled by
> copy_from_user.
>
> Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
[...]
next prev parent reply other threads:[~2023-04-27 0:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1682526135.git.zhang_shurong@foxmail.com>
2023-04-26 17:02 ` [PATCH v3 1/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_copy_from_user Zhang Shurong
2023-04-27 0:43 ` Ping-Ke Shih [this message]
2023-05-05 7:38 ` Kalle Valo
2023-04-26 17:02 ` [PATCH v3 2/2] wifi: rtw88: fix incorrect error codes in rtw_debugfs_set_* Zhang Shurong
2023-04-27 0:43 ` Ping-Ke Shih
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=b7621cdcdf8f4d53b7bd035f5c992d32@realtek.com \
--to=pkshih@realtek.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tony0620emma@gmail.com \
--cc=zhang_shurong@foxmail.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;
as well as URLs for NNTP newsgroup(s).