virtio: console: Disable lseek(2) for port file operations
The ports are char devices; do not have seeking capabilities. Calling nonseekable_open() from the fops_open() call and setting the llseek fops pointer to no_llseek ensures an lseek() call from userspace returns -ESPIPE. Signed-off-by: NAmit Shah <amit.shah@redhat.com> CC: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
Showing
想要评论请 注册 或 登录