From d1cd3adde7b6cc1679b4a68d59b0b1c7fac3704b Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Mon, 20 Aug 2018 16:00:23 +0000 Subject: Reorder checks in the read/write(2) family of syscalls to prepare making file operations mp-safe. This change makes it clear that `f_offset' is only accessed in vn_read() and vn_write(), which will help taking it out of the KERNEL_LOCK(). This refactoring uncovered a race in vn_read() which is now documented and will be addressed in a later diff. ok visa@ --- sys/dev/pci/drm/drm_linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/pci/drm') diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index 18ae95f3c18..a414a2623a7 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.29 2018/08/20 14:59:02 visa Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.30 2018/08/20 16:00:22 mpi Exp $ */ /* * Copyright (c) 2013 Jonathan Gray * Copyright (c) 2015, 2016 Mark Kettenis @@ -809,13 +809,13 @@ fence_context_alloc(unsigned int num) } int -dmabuf_read(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred) +dmabuf_read(struct file *fp, struct uio *uio, int fflags) { return (ENXIO); } int -dmabuf_write(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred) +dmabuf_write(struct file *fp, struct uio *uio, int fflags) { return (ENXIO); } -- cgit v1.2.3