From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kalle Valo <kvalo@kernel.org>, Jiri Slaby <jirislaby@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
Johannes Berg <johannes.berg@intel.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] wil6210: debugfs: replace in wil_link_stats_write() in wil_link_stats_write()
Date: Wed, 6 Jul 2022 13:39:01 +0300 [thread overview]
Message-ID: <20220706103901.GD2316@kadam> (raw)
In-Reply-To: <YsUydUx6FEz1ETq5@kili>
On Wed, Jul 06, 2022 at 09:57:57AM +0300, Dan Carpenter wrote:
> This code has a check for "if (rc != len) {" so it will fail if the
> simple_write_to_buffer() does not completely fill the buffer. In
> particular it will fail if "*ppos != 0". Although this code works, it is
> more complicated than necessary. Just use strndup_user() instead.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
NAK. This one is buggy. strndup_user() is too strict. This will break
stuff.
regards,
dan carpenter
prev parent reply other threads:[~2022-07-06 10:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 6:55 [PATCH 1/2] wil6210: debugfs: fix info leak in wil_write_file_wmi() Dan Carpenter
2022-07-06 6:57 ` [PATCH 2/2] wil6210: debugfs: replace in wil_link_stats_write() in wil_link_stats_write() Dan Carpenter
2022-07-06 10:39 ` Dan Carpenter [this message]
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=20220706103901.GD2316@kadam \
--to=dan.carpenter@oracle.com \
--cc=jirislaby@kernel.org \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pabeni@redhat.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).