lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-314-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:17:33 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 313/437] drivers/net/wireless/st: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/net/wireless/st/cw1200/debug.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/st/cw1200/debug.c b/drivers/net/wireless/st/cw1200/debug.c
index 8686929c70df..425fc06a9d38 100644
--- a/drivers/net/wireless/st/cw1200/debug.c
+++ b/drivers/net/wireless/st/cw1200/debug.c
@@ -332,15 +332,15 @@ static int cw1200_counters_show(struct seq_file *seq, void *v)
 
 DEFINE_SHOW_ATTRIBUTE(cw1200_counters);
 
-static ssize_t cw1200_wsm_dumps(struct file *file,
-	const char __user *user_buf, size_t count, loff_t *ppos)
+static ssize_t cw1200_wsm_dumps(struct kiocb *iocb, struct iov_iter *from)
 {
-	struct cw1200_common *priv = file->private_data;
+	struct cw1200_common *priv = iocb->ki_filp->private_data;
+	size_t count = iov_iter_count(from);
 	char buf[1];
 
 	if (!count)
 		return -EINVAL;
-	if (copy_from_user(buf, user_buf, 1))
+	if (!copy_from_iter_full(buf, 1, from))
 		return -EFAULT;
 
 	if (buf[0] == '1')
@@ -353,7 +353,7 @@ static ssize_t cw1200_wsm_dumps(struct file *file,
 
 static const struct file_operations fops_wsm_dumps = {
 	.open = simple_open,
-	.write = cw1200_wsm_dumps,
+	.write_iter = cw1200_wsm_dumps,
 	.llseek = default_llseek,
 };
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ