diff options
author | kib <kib@FreeBSD.org> | 2013-04-28 19:12:09 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-04-28 19:12:09 +0000 |
commit | ebecd57ee2dd46812376994b4fb9cf9c81af71c5 (patch) | |
tree | f5f1fdcfe24acd5d7cba9de8738765abf6e8d874 /sys/dev/ciss/ciss.c | |
parent | 0e1bea778f3efcfe057a0617c4536ea6c867d2a0 (diff) | |
download | FreeBSD-src-ebecd57ee2dd46812376994b4fb9cf9c81af71c5.zip FreeBSD-src-ebecd57ee2dd46812376994b4fb9cf9c81af71c5.tar.gz |
Eliminate the layering violation in the kern_sendfile(). When quering
the file size, use VOP_GETATTR() instead of accessing vnode vm_object
un_pager.vnp.vnp_size.
Take the shared vnode lock earlier to cover the added VOP_GETATTR()
call and, as consequence, the whole internal sendfile loop. Reduce vm
object lock scope to not protect the local calculations.
Note that this is the last misuse of the vnp_size in the tree, the
others were removed from the ELF image activator by r230246.
Reviewed by: alc
Tested by: pho, bf (previous version)
MFC after: 1 week
Diffstat (limited to 'sys/dev/ciss/ciss.c')
0 files changed, 0 insertions, 0 deletions