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-195-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:34 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 194/437] scsi: qla2xxx: convert to read/write iterators

Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
 drivers/scsi/qla2xxx/qla_dfs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c
index 55ff3d7482b3..6aacdb5c65aa 100644
--- a/drivers/scsi/qla2xxx/qla_dfs.c
+++ b/drivers/scsi/qla2xxx/qla_dfs.c
@@ -490,7 +490,7 @@ qla2x00_dfs_fce_release(struct inode *inode, struct file *file)
 
 static const struct file_operations dfs_fce_ops = {
 	.open		= qla2x00_dfs_fce_open,
-	.read		= seq_read,
+	.read_iter	= seq_read_iter,
 	.llseek		= seq_lseek,
 	.release	= qla2x00_dfs_fce_release,
 };
@@ -569,13 +569,13 @@ qla_dfs_naqp_show(struct seq_file *s, void *unused)
 		}							\
 	} while (0)
 
-static ssize_t
-qla_dfs_naqp_write(struct file *file, const char __user *buffer,
-    size_t count, loff_t *pos)
+static ssize_t qla_dfs_naqp_write_iter(struct kiocb *iocb,
+				       struct iov_iter *from)
 {
-	struct seq_file *s = file->private_data;
+	struct seq_file *s = iocb->ki_filp->private_data;
 	struct scsi_qla_host *vha = s->private;
 	struct qla_hw_data *ha = vha->hw;
+	size_t count = iov_iter_count(from);
 	char *buf;
 	int rc = 0;
 	unsigned long num_act_qp;
@@ -591,7 +591,7 @@ qla_dfs_naqp_write(struct file *file, const char __user *buffer,
 		    vha->host_no);
 		return -EINVAL;
 	}
-	buf = memdup_user_nul(buffer, count);
+	buf = iterdup_nul(from, count);
 	if (IS_ERR(buf)) {
 		pr_err("host%ld: fail to copy user buffer.",
 		    vha->host_no);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ