summaryrefslogtreecommitdiff
path: root/debian/patches/fix-locking0001-vm-collapse-unreachable-branch-into-assertion.patch
blob: de441e86cd9e5a4f85bc4e2da26d303ac7120e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From ecf0b595a31a9e267ed8e67caeaafbeec054a840 Mon Sep 17 00:00:00 2001
From: Justus Winter <4winter@informatik.uni-hamburg.de>
Date: Mon, 17 Aug 2015 21:33:33 +0200
Subject: [PATCH gnumach 1/3] vm: collapse unreachable branch into assertion

* vm/vm_object.c (vm_object_collapse): Collapse unreachable branch
into assertion.
---
 vm/vm_object.c | 31 +++----------------------------
 1 file changed, 3 insertions(+), 28 deletions(-)

diff --git a/vm/vm_object.c b/vm/vm_object.c
index deac0c2..133181f 100644
--- a/vm/vm_object.c
+++ b/vm/vm_object.c
@@ -2465,34 +2465,9 @@ void vm_object_collapse(
 					VM_PAGE_FREE(p);
 				    }
 				    else {
-					if (pp != VM_PAGE_NULL) {
-					    /*
-					     *	Parent has an absent page...
-					     *	it's not being paged in, so
-					     *	it must really be missing from
-					     *	the parent.
-					     *
-					     *	Throw out the absent page...
-					     *	any faults looking for that
-					     *	page will restart with the new
-					     *	one.
-					     */
-
-					    /*
-					     *	This should never happen -- the
-					     *	parent cannot have ever had an
-					     *	external memory object, and thus
-					     *	cannot have absent pages.
-					     */
-					    panic("vm_object_collapse: bad case");
-
-					    VM_PAGE_FREE(pp);
-
-					    /*
-					     *	Fall through to move the backing
-					     *	object's page up.
-					     */
-					}
+					assert(pp == VM_PAGE_NULL || !
+					       "vm_object_collapse: bad case");
+
 					/*
 					 *	Parent now has no page.
 					 *	Move the backing object's page up.
-- 
2.1.4