From 6bd4f7ca0ef936d4e355b60a534d1efc45dff893 Mon Sep 17 00:00:00 2001 From: anton Date: Mon, 21 Jan 2019 18:09:21 +0000 Subject: Introduce a dedicated entry point data structure for file locks. This new data structure allows for better tracking of pending lock operations which is essential in order to prevent a use-after-free once the underlying vnode is gone. Inspired by the lockf implementation in FreeBSD. ok visa@ Reported-by: syzbot+d5540a236382f50f1dac@syzkaller.appspotmail.com --- sys/msdosfs/denode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/msdosfs') diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h index 5fe1d8862cd..3a3f629df52 100644 --- a/sys/msdosfs/denode.h +++ b/sys/msdosfs/denode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: denode.h,v 1.33 2018/05/07 14:43:01 mpi Exp $ */ +/* $OpenBSD: denode.h,v 1.34 2019/01/21 18:09:21 anton Exp $ */ /* $NetBSD: denode.h,v 1.24 1997/10/17 11:23:39 ws Exp $ */ /*- @@ -148,7 +148,7 @@ struct denode { int de_fndcnt; /* number of slots before de_fndoffset */ long de_refcnt; /* reference count */ struct msdosfsmount *de_pmp; /* addr of our mount struct */ - struct lockf *de_lockf; /* byte level lock list */ + struct lockf_state *de_lockf; /* byte level lock list */ struct rrwlock de_lock; /* denode lock */ u_char de_Name[11]; /* name, from DOS directory entry */ u_char de_Attributes; /* attributes, from directory entry */ -- cgit v1.2.3-59-g8ed1b