]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-aufs2-no-const-grsec.patch
- resurect kernel-aufs2-no-const-grsec.patch with new way of dealing with things...
[packages/kernel.git] / kernel-aufs2-no-const-grsec.patch
CommitLineData
52daa4ad
AM
1--- linux-3.0/fs/aufs/dynop.c 2011-08-24 12:17:44.788277908 +0200
2+++ linux-3.0/fs/aufs/dynop.c 2011-08-24 12:11:22.375748361 +0200
3@@ -149,9 +149,11 @@
4 #define DySet(func, dst, src, h_op, h_sb) do { \
5 DyDbgInc(cnt); \
6 if (h_op->func) { \
7- if (src.func) \
8- dst.func = src.func; \
9- else \
10+ if (src.func) { \
11+ pax_open_kernel(); \
12+ *(void **)&dst.func = src.func; \
13+ pax_close_kernel(); \
14+ } else \
15 AuDbg("%s %s\n", au_sbtype(h_sb), #func); \
16 } \
17 } while (0)
18@@ -159,7 +161,9 @@
19 #define DySetForce(func, dst, src) do { \
20 AuDebugOn(!src.func); \
21 DyDbgInc(cnt); \
22- dst.func = src.func; \
23+ pax_open_kernel(); \
24+ *(void **)&dst.func = src.func; \
25+ pax_close_kernel(); \
26 } while (0)
27
28 #define DySetAop(func) \
29@@ -266,15 +270,17 @@
30 */
31 static void dy_adx(struct au_dyaop *dyaop, int do_dx)
32 {
33+ pax_open_kernel();
34 if (!do_dx) {
35- dyaop->da_op.direct_IO = NULL;
36- dyaop->da_op.get_xip_mem = NULL;
37+ *(void **)&dyaop->da_op.direct_IO = NULL;
38+ *(void **)&dyaop->da_op.get_xip_mem = NULL;
39 } else {
40- dyaop->da_op.direct_IO = aufs_aop.direct_IO;
41- dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
42+ *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO;
43+ *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
44 if (!dyaop->da_get_xip_mem)
45- dyaop->da_op.get_xip_mem = NULL;
46+ *(void **)&dyaop->da_op.get_xip_mem = NULL;
47 }
48+ pax_close_kernel();
49 }
50
51 static struct au_dyaop *dy_aget(struct au_branch *br,
This page took 0.06654 seconds and 4 git commands to generate.