markj 20c5c1bf19 Disallow fcntl(F_READAHEAD) when the vnode is not a regular file.
The mountpoint may not have defined an iosize parameter, so an attempt
to configure readahead on a device file can lead to a divide-by-zero
crash.

The sequential heuristic is not applied to I/O to or from device files,
and posix_fadvise(2) returns an error when v_type != VREG, so perform
the same check here.

Reported by:	syzbot+e4b682208761aa5bc53a@syzkaller.appspotmail.com
Reviewed by:	kib
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21864
2019-10-02 15:45:49 +00:00
..
2019-09-30 21:00:19 +00:00
2019-09-28 23:08:19 +00:00
2019-09-27 18:43:36 +00:00
2019-08-25 17:13:00 +00:00
2019-09-30 15:59:07 +00:00
2019-09-27 19:17:40 +00:00
2019-09-27 18:43:36 +00:00
2019-09-29 03:26:29 +00:00
2019-09-27 18:43:36 +00:00