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

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

diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 386981c6976a..c8047981eb9e 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -553,6 +553,7 @@ sg_read(struct file *filp, char __user *buf, size_t count, loff_t * ppos)
 	kfree(old_hdr);
 	return retval;
 }
+FOPS_READ_ITER_HELPER(sg_read);
 
 static ssize_t
 sg_new_read(Sg_fd * sfp, char __user *buf, size_t count, Sg_request * srp)
@@ -707,6 +708,7 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
 	k = sg_common_write(sfp, srp, cmnd, sfp->timeout, blocking);
 	return (k < 0) ? k : count;
 }
+FOPS_WRITE_ITER_HELPER(sg_write);
 
 static ssize_t
 sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf,
@@ -1412,8 +1414,8 @@ sg_rq_end_io(struct request *rq, blk_status_t status)
 
 static const struct file_operations sg_fops = {
 	.owner = THIS_MODULE,
-	.read = sg_read,
-	.write = sg_write,
+	.read_iter = sg_read_iter,
+	.write_iter = sg_write_iter,
 	.poll = sg_poll,
 	.unlocked_ioctl = sg_ioctl,
 	.compat_ioctl = compat_ptr_ioctl,
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ