freebsd-skq/sys/cddl
avg 80919a9e8a fix zfs_getpages crash when called from sendfile, followup to r329363
It turns out that sendfile_swapin() has an optimization where it may
insert pointers to bogus_page into the page array that it passes to
VOP_GETPAGES.  That happens to work with buffer cache, because it
extensively uses bogus_page internally, so it has the necessary checks.
However, ZFS did not expect bogus_page as VOP_GETPAGES(9) does not
document such a (ab)use of bogus_page.

So, this commit adds checks and handling of bogus_page.

I expect that use of bogus_page with VOP_GETPAGES will get documented
sooner rather than later.

Reported by:	Andrew Reilly <areilly@bigpond.net.au>, delphij
Tested by:	Andrew Reilly <areilly@bigpond.net.au>
Requested by:	many
MFC after:	1 week
2018-05-25 07:29:52 +00:00
..
boot/zfs Mark two things as unused (since they are only sometimes used) and 2017-12-03 04:55:33 +00:00
compat/opensolaris Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
contrib/opensolaris fix zfs_getpages crash when called from sendfile, followup to r329363 2018-05-25 07:29:52 +00:00
dev DTrace aarch64: Avoid calling unwind_frame() in the probe context. 2018-05-12 15:35:26 +00:00