emulators/virtualbox-ose-additions-legacy: Import improvements from non legacy port
Import changes from commit1b2394551c
to legacy port: In the virtualbox virtual filesystem code we ship as a patch some code in an else block is commented out. This produces a code path in which a pointer variable is dereferenced in an unassigned state, causing random crashes. Lacking a better fix, give a default value of NULL to the pointer, which at least avoids the random pointer dereference issue. PR: 255386 Alsso import fix for building on recent head from cec55f41e10f13: Fix build after head commit b4a58fbf640409a1 (vfs: remove cn_thread) MFH: 2021Q4 (cherry picked from commitc43e12a46f
)
This commit is contained in:
parent
2040f3e693
commit
705ba6bb02
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= virtualbox-ose
|
||||
PORTVERSION= 5.2.44
|
||||
PORTREVISION= 8
|
||||
PORTREVISION= 9
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/
|
||||
PKGNAMESUFFIX?= -legacy
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2020-07-09 16:50:11 UTC
|
||||
--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2021-07-28 16:16:27 UTC
|
||||
+++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
|
||||
@@ -1,10 +1,6 @@
|
||||
-/* $Id: vboxvfs_vnops.c $ */
|
||||
-/** @file
|
||||
- * Description.
|
||||
- */
|
||||
-
|
||||
/*
|
||||
* Copyright (C) 2008-2017 Oracle Corporation
|
||||
+ * Copyright (C) 2017 Mahdi Mokhtari
|
||||
*
|
||||
* This file is part of VirtualBox Open Source Edition (OSE), as
|
||||
* available from http://www.virtualbox.org. This file is free software;
|
||||
@@ -14,228 +10,1347 @@
|
||||
@@ -14,228 +14,1354 @@
|
||||
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
||||
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
||||
*/
|
||||
|
@ -172,6 +160,9 @@
|
|||
+ .vop_write = vboxfs_write,
|
||||
+ .vop_bmap = VOP_EOPNOTSUPP
|
||||
};
|
||||
+#if __FreeBSD_version > 1300068
|
||||
+VFS_VOP_VECTOR_REGISTER(vboxfs_vnodeops);
|
||||
+#endif
|
||||
|
||||
-static int vboxvfs_access(struct vop_access_args *ap)
|
||||
+static uint64_t
|
||||
|
@ -1128,7 +1119,7 @@
|
|||
+ struct vnode *vp = ap->a_vp;
|
||||
+ struct uio *uio = ap->a_uio;
|
||||
+ struct vboxfs_node *dir = VP_TO_VBOXFS_NODE(vp);
|
||||
+ struct vboxfs_node *node;
|
||||
+ struct vboxfs_node *node = NULL;
|
||||
+ struct sffs_dirent *dirent = NULL;
|
||||
+ sffs_dirents_t *cur_buf;
|
||||
+ off_t offset = 0;
|
||||
|
@ -1406,7 +1397,11 @@
|
|||
+ cnp->cn_flags & DOWHITEOUT &&
|
||||
+ cnp->cn_flags & ISWHITEOUT))) {
|
||||
+ error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred,
|
||||
+#if __FreeBSD_version < 1400037
|
||||
+ cnp->cn_thread);
|
||||
+#else
|
||||
+ curthread);
|
||||
+#endif
|
||||
+ if (error != 0)
|
||||
+ goto out;
|
||||
+
|
||||
|
|
Loading…
Reference in New Issue
Block a user