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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
diff --git a/modules/linux/vmci/linux/driver.c b/modules/linux/vmci/linux/driver.c
index a34de66..799d69f 100644
--- a/modules/linux/vmci/linux/driver.c
+++ b/modules/linux/vmci/linux/driver.c
@@ -124,7 +124,7 @@ static struct pci_driver vmci_driver = {
.name = "vmci",
.id_table = vmci_ids,
.probe = vmci_probe_device,
- .remove = __devexit_p(vmci_remove_device),
+ .remove = vmci_remove_device,
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
@@ -1750,7 +1750,7 @@ vmci_enable_msix(struct pci_dev *pdev) // IN
*-----------------------------------------------------------------------------
*/
-static int __devinit
+static int
vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device
const struct pci_device_id *id) // IN: matching device ID
{
@@ -1978,7 +1978,7 @@ vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device
*-----------------------------------------------------------------------------
*/
-static void __devexit
+static void
vmci_remove_device(struct pci_dev* pdev)
{
struct vmci_device *dev = pci_get_drvdata(pdev);
--- ./modules/linux/vsock/linux/af_vsock.c.orig 2013-03-12 10:38:52.592399593 +0000
+++ ./modules/linux/vsock/linux/af_vsock.c 2013-03-12 13:15:43.405983373 +0000
@@ -319,7 +319,7 @@
.sendpage = sock_no_sendpage,
};
-static struct proto_ops vsockVmciStreamOps = {
+static struct proto_ops vsockVmciStreamOps __read_mostly = {
.family = VSOCK_INVALID_FAMILY,
.owner = THIS_MODULE,
.release = VSockVmciRelease,
@@ -3159,19 +3159,21 @@
* when a hard-coded, currently-available value gets assigned to someone
* else in the future.
*/
+ pax_open_kernel();
for (i = NPROTO - 1; i >= 0; i--) {
- vsockVmciFamilyOps.family = i;
+ *(void **)&vsockVmciFamilyOps.family = i;
err = sock_register(&vsockVmciFamilyOps);
if (err) {
Warning("Could not register address family %d.\n", i);
- vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY;
+ *(void **)&vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY;
} else {
- vsockVmciDgramOps.family = i;
- vsockVmciStreamOps.family = i;
+ *(void **)&vsockVmciDgramOps.family = i;
+ *(void **)&vsockVmciStreamOps.family = i;
err = i;
break;
}
}
+ pax_close_kernel();
return err;
}
@@ -3202,8 +3204,10 @@
sock_unregister(vsockVmciFamilyOps.family);
}
- vsockVmciDgramOps.family = vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY;
- vsockVmciStreamOps.family = vsockVmciFamilyOps.family;
+ pax_open_kernel();
+ *(void **)&vsockVmciDgramOps.family = *(void **)&vsockVmciFamilyOps.family = VSOCK_INVALID_FAMILY;
+ *(void **)&vsockVmciStreamOps.family = vsockVmciFamilyOps.family;
+ pax_close_kernel();
}
--- ./modules/linux/shared/compat_mm.h.orig 2013-03-12 13:23:12.973400354 +0000
+++ ./modules/linux/shared/compat_mm.h 2013-03-12 13:36:43.680968670 +0000
@@ -99,8 +99,16 @@
vmtruncate(inode, size); \
result; \
})
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
#define compat_vmtruncate(inode, size) vmtruncate(inode, size)
+#else
+#define compat_vmtruncate(inode, len) \
+({ \
+ int result = inode_newsize_ok(inode, len); \
+ if (!result) \
+ truncate_setsize(inode, len); \
+ result; \
+})
#endif
|