Skip to contentSkip to conversation

Patch "[iov_iter] new privimitive: iov_iter_revert()" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Apr 18, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

[iov_iter] new privimitive: iov_iter_revert()

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
new-privimitive-iov_iter_revert.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 27c0e3748e41ca79171ffa3e97415a20af6facd0 Mon Sep 17 00:00:00 2001

From: Al Viro <[email protected]>
Date: Fri, 17 Feb 2017 18:42:24 -0500
Subject: [iov_iter] new privimitive: iov_iter_revert()

From: Al Viro <[email protected]>

commit 27c0e3748e41ca79171ffa3e97415a20af6facd0 upstream.

opposite to iov_iter_advance(); the caller is responsible for never using it to move back past the initial position.

---
 include/linux/uio.h |    6 ++++
 lib/iov_iter.c      |   63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 1 deletion(-)
include/linux/uio.h +5 -1
@@ -39,7 +39,10 @@ struct iov_iter {
 	};
 	union {
 		unsigned long nr_segs;
-		int idx;
+		struct {
+			int idx;
+			int start_idx;
+		};
 	};
 };
 
@@ -81,6 +84,7 @@ unsigned long iov_shorten(struct iovec *
 size_t iov_iter_copy_from_user_atomic(struct page *page,
 		struct iov_iter *i, unsigned long offset, size_t bytes);
 void iov_iter_advance(struct iov_iter *i, size_t bytes);
+void iov_iter_revert(struct iov_iter *i, size_t bytes);
 int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
 size_t iov_iter_single_seg_count(const struct iov_iter *i);
 size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
lib/iov_iter.c +63 -0

75 lines not on this page · raw message

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/make-skb_copy_datagram_msg-et.al.-preserve-msg_iter-on-error.patch queue-4.9/new-privimitive-iov_iter_revert.patch queue-4.9/x86-pmem-fix-broken-__copy_user_nocache-cache-bypass-assumptions.patch