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-420-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:19:19 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 419/437] media: media-devnode: convert to read/write iterators

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

diff --git a/drivers/media/mc/mc-devnode.c b/drivers/media/mc/mc-devnode.c
index 7f67825c8757..43e3297e0447 100644
--- a/drivers/media/mc/mc-devnode.c
+++ b/drivers/media/mc/mc-devnode.c
@@ -78,6 +78,7 @@ static ssize_t media_read(struct file *filp, char __user *buf,
 		return -EIO;
 	return devnode->fops->read(filp, buf, sz, off);
 }
+FOPS_READ_ITER_HELPER(media_read);
 
 static ssize_t media_write(struct file *filp, const char __user *buf,
 		size_t sz, loff_t *off)
@@ -90,6 +91,7 @@ static ssize_t media_write(struct file *filp, const char __user *buf,
 		return -EIO;
 	return devnode->fops->write(filp, buf, sz, off);
 }
+FOPS_WRITE_ITER_HELPER(media_write);
 
 static __poll_t media_poll(struct file *filp,
 			       struct poll_table_struct *poll)
@@ -195,8 +197,8 @@ static int media_release(struct inode *inode, struct file *filp)
 
 static const struct file_operations media_devnode_fops = {
 	.owner = THIS_MODULE,
-	.read = media_read,
-	.write = media_write,
+	.read_iter = media_read_iter,
+	.write_iter = media_write_iter,
 	.open = media_open,
 	.unlocked_ioctl = media_ioctl,
 #ifdef CONFIG_COMPAT
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ