]> git.proxmox.com Git - mirror_zfs.git/commit
Fix uio_prefaultpages for 0 length iovec
authorChunwei Chen <david.chen@osnexus.com>
Tue, 8 Dec 2015 20:26:18 +0000 (12:26 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Dec 2015 00:19:55 +0000 (16:19 -0800)
commit502923bb447cdf4f9bc1271a46dfc11d5e0f2e9b
tree1b9cb1f509679226f7c574c24d2a1e55fd5fe66a
parenteba9e745dcfce252fc6c451cdf07c55bf975f1f6
Fix uio_prefaultpages for 0 length iovec

Userspace can freely pass in whatever iovec it feels like, and it's perfectly
legal to pass an iovec which contains a zero length segment. In the current
implementation, uio_prefaultpages would touch an out of bound byte in the
"last byte" logic. While this probably wouldn't cause any critical error, we
would like uio_prefaultpages to be able to continue gracefully.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4078
module/zcommon/zfs_uio.c