[Devel] [PATCH RH9] fuse: pcs: do not use sendpage on pages which cannot be sendpaged

Alexey Kuznetsov kuznet at acronis.com
Mon Apr 17 17:31:39 MSK 2023


Use the same approach as in iscsi iscsi_tcp_segment_map() which makes
the same operation
in the same context.

In vz7 we added iov_iter_get_pages() infrastructure ourselves and we
did it in safe way.
We checked page before doing any manipulations on it right in core of
iov_iter_get_pages()
and terminated iov_iter_get_pages() if the page looked dubious. We
cannot make this now because
this function is used in many places over kernel and not all the
places are sensitive
to origin of pages but all of them definitely will crash if
iov_iter_get_pages() returns error.

This patch will work for now. I still believe this place deserves
further investigation.
It smells like mainstream could be wrong. Look at my comment in code
for the reasons of doubts.

Affects: #PSBM-146821, #PSBM-146846
https://jira.vzint.dev/browse/PSBM-146821
https://jira.vzint.dev/browse/PSBM-146846

Signed-off-by: Alexey Kuznetsov <kuznet at acronis.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fuse-pcs-do-not-use-sendpage-on-pages-which-cannot-b.patch
Type: text/x-patch
Size: 3321 bytes
Desc: 0001-fuse-pcs-do-not-use-sendpage-on-pages-which-cannot-b.patch
URL: <http://lists.openvz.org/pipermail/devel/attachments/20230417/a3026e54/attachment-0005.bin>


More information about the Devel mailing list