Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-patchset:master commit in: 4.4.8/, 4.5.2/
Date: Sat, 30 Apr 2016 00:53:50
Message-Id: 1461977572.c724961ddb517e3d599cc88d13ae5b5c7614753e.blueness@gentoo
1 commit: c724961ddb517e3d599cc88d13ae5b5c7614753e
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 30 00:52:52 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 30 00:52:52 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=c724961d
7
8 grsecurity-3.1-4.5.2-201604282058
9
10 4.4.8/4427_force_XATTR_PAX_tmpfs.patch | 35 -
11 {4.4.8 => 4.5.2}/0000_README | 6 +-
12 .../1001_linux-4.5.2.patch | 2008 +-
13 .../4420_grsecurity-3.1-4.5.2-201604282058.patch | 41813 ++++++++++++++++---
14 {4.4.8 => 4.5.2}/4425_grsec_remove_EI_PAX.patch | 0
15 4.5.2/4427_force_XATTR_PAX_tmpfs.patch | 57 +
16 .../4430_grsec-remove-localversion-grsec.patch | 0
17 {4.4.8 => 4.5.2}/4435_grsec-mute-warnings.patch | 0
18 .../4440_grsec-remove-protected-paths.patch | 0
19 .../4450_grsec-kconfig-default-gids.patch | 0
20 .../4465_selinux-avc_audit-log-curr_ip.patch | 0
21 {4.4.8 => 4.5.2}/4470_disable-compat_vdso.patch | 2 +-
22 {4.4.8 => 4.5.2}/4475_emutramp_default_on.patch | 0
23 13 files changed, 35965 insertions(+), 7956 deletions(-)
24
25 diff --git a/4.4.8/4427_force_XATTR_PAX_tmpfs.patch b/4.4.8/4427_force_XATTR_PAX_tmpfs.patch
26 deleted file mode 100644
27 index f6aea64..0000000
28 --- a/4.4.8/4427_force_XATTR_PAX_tmpfs.patch
29 +++ /dev/null
30 @@ -1,35 +0,0 @@
31 -From: Anthony G. Basile <blueness@g.o>
32 -
33 -For users that emerge without XATTR_PAX support enabled, we still want user.pax.flags
34 -namespace supported on tmpfs so that the PaX markings survive emerge.
35 -
36 -diff -Naur a/mm/shmem.c b/mm/shmem.c
37 ---- a/mm/shmem.c 2013-06-11 21:00:18.000000000 -0400
38 -+++ b/mm/shmem.c 2013-06-11 21:08:18.000000000 -0400
39 -@@ -2564,11 +2564,7 @@
40 - static int shmem_xattr_validate(const char *name)
41 - {
42 - struct { const char *prefix; size_t len; } arr[] = {
43 --
44 --#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
45 - { XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN},
46 --#endif
47 --
48 - { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
49 - { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
50 - };
51 -@@ -2624,14 +2620,12 @@
52 - if (err)
53 - return err;
54 -
55 --#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
56 - if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) {
57 - if (strcmp(name, XATTR_NAME_PAX_FLAGS))
58 - return -EOPNOTSUPP;
59 - if (size > 8)
60 - return -EINVAL;
61 - }
62 --#endif
63 -
64 - return simple_xattr_set(&info->xattrs, name, value, size, flags);
65 - }
66
67 diff --git a/4.4.8/0000_README b/4.5.2/0000_README
68 similarity index 94%
69 rename from 4.4.8/0000_README
70 rename to 4.5.2/0000_README
71 index 31bb556..6857874 100644
72 --- a/4.4.8/0000_README
73 +++ b/4.5.2/0000_README
74 @@ -2,11 +2,11 @@ README
75 -----------------------------------------------------------------------------
76 Individual Patch Descriptions:
77 -----------------------------------------------------------------------------
78 -Patch: 1007_linux-4.4.8.patch
79 +Patch: 1001_linux-4.5.2.patch
80 From: http://www.kernel.org
81 -Desc: Linux 4.4.8
82 +Desc: Linux 4.5.2
83
84 -Patch: 4420_grsecurity-3.1-4.4.8-201604252206.patch
85 +Patch: 4420_grsecurity-3.1-4.5.2-201604282058.patch
86 From: http://www.grsecurity.net
87 Desc: hardened-sources base patch from upstream grsecurity
88
89
90 diff --git a/4.4.8/1007_linux-4.4.8.patch b/4.5.2/1001_linux-4.5.2.patch
91 similarity index 77%
92 rename from 4.4.8/1007_linux-4.4.8.patch
93 rename to 4.5.2/1001_linux-4.5.2.patch
94 index e8c236b..2c2064e 100644
95 --- a/4.4.8/1007_linux-4.4.8.patch
96 +++ b/4.5.2/1001_linux-4.5.2.patch
97 @@ -22,10 +22,10 @@ index 08a4a32..0326154 100644
98 trstn
99 tdi
100 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
101 -index 742f69d..0e4102a 100644
102 +index 9a53c92..21e4b48 100644
103 --- a/Documentation/kernel-parameters.txt
104 +++ b/Documentation/kernel-parameters.txt
105 -@@ -3928,6 +3928,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
106 +@@ -4016,6 +4016,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
107 sector if the number is odd);
108 i = IGNORE_DEVICE (don't bind to this
109 device);
110 @@ -35,17 +35,35 @@ index 742f69d..0e4102a 100644
111 unlock ejectable media);
112 m = MAX_SECTORS_64 (don't transfer more
113 diff --git a/Makefile b/Makefile
114 -index 5a493e7..1928fcd 100644
115 +index c621889..1ecaaeb 100644
116 --- a/Makefile
117 +++ b/Makefile
118 @@ -1,6 +1,6 @@
119 VERSION = 4
120 - PATCHLEVEL = 4
121 --SUBLEVEL = 7
122 -+SUBLEVEL = 8
123 + PATCHLEVEL = 5
124 +-SUBLEVEL = 1
125 ++SUBLEVEL = 2
126 EXTRAVERSION =
127 NAME = Blurry Fish Butt
128
129 +diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
130 +index 7d0cba6f..c86ea8a 100644
131 +--- a/arch/arm/kernel/setup.c
132 ++++ b/arch/arm/kernel/setup.c
133 +@@ -430,11 +430,13 @@ static void __init patch_aeabi_idiv(void)
134 + pr_info("CPU: div instructions available: patching division code\n");
135 +
136 + fn_addr = ((uintptr_t)&__aeabi_uidiv) & ~1;
137 ++ asm ("" : "+g" (fn_addr));
138 + ((u32 *)fn_addr)[0] = udiv_instruction();
139 + ((u32 *)fn_addr)[1] = bx_lr_instruction();
140 + flush_icache_range(fn_addr, fn_addr + 8);
141 +
142 + fn_addr = ((uintptr_t)&__aeabi_idiv) & ~1;
143 ++ asm ("" : "+g" (fn_addr));
144 + ((u32 *)fn_addr)[0] = sdiv_instruction();
145 + ((u32 *)fn_addr)[1] = bx_lr_instruction();
146 + flush_icache_range(fn_addr, fn_addr + 8);
147 diff --git a/arch/arm64/include/asm/opcodes.h b/arch/arm64/include/asm/opcodes.h
148 index 4e603ea..123f45d 100644
149 --- a/arch/arm64/include/asm/opcodes.h
150 @@ -57,7 +75,7 @@ index 4e603ea..123f45d 100644
151 +
152 #include <../../arm/include/asm/opcodes.h>
153 diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
154 -index 8aee3ae..c1492ba 100644
155 +index c536c9e..0931155 100644
156 --- a/arch/arm64/kernel/debug-monitors.c
157 +++ b/arch/arm64/kernel/debug-monitors.c
158 @@ -186,20 +186,21 @@ static void clear_regs_spsr_ss(struct pt_regs *regs)
159 @@ -177,7 +195,7 @@ index bdeed9d..433c4b9 100644
160 irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
161
162 diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c
163 -index 5740bcf..6c37b93 100644
164 +index b518f02..1c01d6e 100644
165 --- a/arch/mips/alchemy/devboards/db1550.c
166 +++ b/arch/mips/alchemy/devboards/db1550.c
167 @@ -514,7 +514,7 @@ static void __init db1550_devices(void)
168 @@ -268,6 +286,60 @@ index 490cea5..5c62065 100644
169 break;
170
171 case msa_st_op:
172 +diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
173 +index 14f655c..86ed376 100644
174 +--- a/arch/parisc/Kconfig
175 ++++ b/arch/parisc/Kconfig
176 +@@ -29,6 +29,7 @@ config PARISC
177 + select TTY # Needed for pdc_cons.c
178 + select HAVE_DEBUG_STACKOVERFLOW
179 + select HAVE_ARCH_AUDITSYSCALL
180 ++ select HAVE_ARCH_SECCOMP_FILTER
181 + select ARCH_NO_COHERENT_DMA_MMAP
182 +
183 + help
184 +diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h
185 +index 0448a2c..3387307 100644
186 +--- a/arch/parisc/include/asm/compat.h
187 ++++ b/arch/parisc/include/asm/compat.h
188 +@@ -183,6 +183,13 @@ typedef struct compat_siginfo {
189 + int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
190 + int _fd;
191 + } _sigpoll;
192 ++
193 ++ /* SIGSYS */
194 ++ struct {
195 ++ compat_uptr_t _call_addr; /* calling user insn */
196 ++ int _syscall; /* triggering system call number */
197 ++ compat_uint_t _arch; /* AUDIT_ARCH_* of syscall */
198 ++ } _sigsys;
199 + } _sifields;
200 + } compat_siginfo_t;
201 +
202 +diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h
203 +index a5eba95..637ce8d 100644
204 +--- a/arch/parisc/include/asm/syscall.h
205 ++++ b/arch/parisc/include/asm/syscall.h
206 +@@ -39,6 +39,19 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
207 + }
208 + }
209 +
210 ++static inline void syscall_set_return_value(struct task_struct *task,
211 ++ struct pt_regs *regs,
212 ++ int error, long val)
213 ++{
214 ++ regs->gr[28] = error ? error : val;
215 ++}
216 ++
217 ++static inline void syscall_rollback(struct task_struct *task,
218 ++ struct pt_regs *regs)
219 ++{
220 ++ /* do nothing */
221 ++}
222 ++
223 + static inline int syscall_get_arch(void)
224 + {
225 + int arch = AUDIT_ARCH_PARISC;
226 diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
227 index 0abdd4c..1960b87 100644
228 --- a/arch/parisc/include/asm/uaccess.h
229 @@ -313,6 +385,69 @@ index 568b2c6..3cad8aa 100644
230 EXPORT_SYMBOL(fixup_get_user_skip_1);
231 EXPORT_SYMBOL(fixup_get_user_skip_2);
232 EXPORT_SYMBOL(fixup_put_user_skip_1);
233 +diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
234 +index ce0b2b4..8fb81a3 100644
235 +--- a/arch/parisc/kernel/ptrace.c
236 ++++ b/arch/parisc/kernel/ptrace.c
237 +@@ -270,7 +270,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
238 + long do_syscall_trace_enter(struct pt_regs *regs)
239 + {
240 + /* Do the secure computing check first. */
241 +- secure_computing_strict(regs->gr[20]);
242 ++ if (secure_computing() == -1)
243 ++ return -1;
244 +
245 + if (test_thread_flag(TIF_SYSCALL_TRACE) &&
246 + tracehook_report_syscall_entry(regs)) {
247 +@@ -296,7 +297,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
248 + regs->gr[23] & 0xffffffff);
249 +
250 + out:
251 +- return regs->gr[20];
252 ++ /*
253 ++ * Sign extend the syscall number to 64bit since it may have been
254 ++ * modified by a compat ptrace call
255 ++ */
256 ++ return (int) ((u32) regs->gr[20]);
257 + }
258 +
259 + void do_syscall_trace_exit(struct pt_regs *regs)
260 +diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c
261 +index 984abbe..c342b2e 100644
262 +--- a/arch/parisc/kernel/signal32.c
263 ++++ b/arch/parisc/kernel/signal32.c
264 +@@ -371,6 +371,11 @@ copy_siginfo_to_user32 (compat_siginfo_t __user *to, const siginfo_t *from)
265 + val = (compat_int_t)from->si_int;
266 + err |= __put_user(val, &to->si_int);
267 + break;
268 ++ case __SI_SYS >> 16:
269 ++ err |= __put_user(ptr_to_compat(from->si_call_addr), &to->si_call_addr);
270 ++ err |= __put_user(from->si_syscall, &to->si_syscall);
271 ++ err |= __put_user(from->si_arch, &to->si_arch);
272 ++ break;
273 + }
274 + }
275 + return err;
276 +diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
277 +index fbafa0d..c976ebf 100644
278 +--- a/arch/parisc/kernel/syscall.S
279 ++++ b/arch/parisc/kernel/syscall.S
280 +@@ -329,6 +329,7 @@ tracesys_next:
281 +
282 + ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
283 + LDREG TI_TASK(%r1), %r1
284 ++ LDREG TASK_PT_GR28(%r1), %r28 /* Restore return value */
285 + LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */
286 + LDREG TASK_PT_GR25(%r1), %r25
287 + LDREG TASK_PT_GR24(%r1), %r24
288 +@@ -342,6 +343,7 @@ tracesys_next:
289 + stw %r21, -56(%r30) /* 6th argument */
290 + #endif
291 +
292 ++ cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */
293 + comiclr,>>= __NR_Linux_syscalls, %r20, %r0
294 + b,n .Ltracesys_nosys
295 +
296 diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
297 index 553b098..77e2262 100644
298 --- a/arch/parisc/kernel/traps.c
299 @@ -371,11 +506,24 @@ index a762864..f906444 100644
300 d->fault_space = regs->isr;
301 d->fault_addr = regs->ior;
302
303 +diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
304 +index 3c5736e..54ed9c7 100644
305 +--- a/arch/powerpc/kernel/process.c
306 ++++ b/arch/powerpc/kernel/process.c
307 +@@ -854,7 +854,7 @@ void restore_tm_state(struct pt_regs *regs)
308 + static inline void save_sprs(struct thread_struct *t)
309 + {
310 + #ifdef CONFIG_ALTIVEC
311 +- if (cpu_has_feature(cpu_has_feature(CPU_FTR_ALTIVEC)))
312 ++ if (cpu_has_feature(CPU_FTR_ALTIVEC))
313 + t->vrsave = mfspr(SPRN_VRSAVE);
314 + #endif
315 + #ifdef CONFIG_PPC_BOOK3S_64
316 diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
317 -index 9833fee..807f159 100644
318 +index 744e24b..4a811ca 100644
319 --- a/arch/powerpc/mm/hugetlbpage.c
320 +++ b/arch/powerpc/mm/hugetlbpage.c
321 -@@ -486,13 +486,13 @@ static void hugepd_free(struct mmu_gather *tlb, void *hugepte)
322 +@@ -414,13 +414,13 @@ static void hugepd_free(struct mmu_gather *tlb, void *hugepte)
323 {
324 struct hugepd_freelist **batchp;
325
326 @@ -391,11 +539,43 @@ index 9833fee..807f159 100644
327 return;
328 }
329
330 +diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c
331 +index 13dab0c..3776aca 100644
332 +--- a/arch/s390/mm/gup.c
333 ++++ b/arch/s390/mm/gup.c
334 +@@ -20,9 +20,9 @@
335 + static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
336 + unsigned long end, int write, struct page **pages, int *nr)
337 + {
338 ++ struct page *head, *page;
339 + unsigned long mask;
340 + pte_t *ptep, pte;
341 +- struct page *page;
342 +
343 + mask = (write ? _PAGE_PROTECT : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
344 +
345 +@@ -37,12 +37,14 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
346 + return 0;
347 + VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
348 + page = pte_page(pte);
349 +- if (!page_cache_get_speculative(page))
350 ++ head = compound_head(page);
351 ++ if (!page_cache_get_speculative(head))
352 + return 0;
353 + if (unlikely(pte_val(pte) != pte_val(*ptep))) {
354 +- put_page(page);
355 ++ put_page(head);
356 + return 0;
357 + }
358 ++ VM_BUG_ON_PAGE(compound_head(page) != head, page);
359 + pages[*nr] = page;
360 + (*nr)++;
361 +
362 diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
363 -index 30cfd64..9d2abb2 100644
364 +index 44adbb8..f8dba20 100644
365 --- a/arch/x86/include/asm/kvm_host.h
366 +++ b/arch/x86/include/asm/kvm_host.h
367 -@@ -41,7 +41,7 @@
368 +@@ -42,7 +42,7 @@
369
370 #define KVM_PIO_PAGE_OFFSET 1
371 #define KVM_COALESCED_MMIO_PAGE_OFFSET 2
372 @@ -404,24 +584,11 @@ index 30cfd64..9d2abb2 100644
373
374 #define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS
375
376 -diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
377 -index fa1195d..164e3f8 100644
378 ---- a/arch/x86/include/asm/pci_x86.h
379 -+++ b/arch/x86/include/asm/pci_x86.h
380 -@@ -93,6 +93,8 @@ extern raw_spinlock_t pci_config_lock;
381 - extern int (*pcibios_enable_irq)(struct pci_dev *dev);
382 - extern void (*pcibios_disable_irq)(struct pci_dev *dev);
383 -
384 -+extern bool mp_should_keep_irq(struct device *dev);
385 -+
386 - struct pci_raw_ops {
387 - int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn,
388 - int reg, int len, u32 *val);
389 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
390 -index 8bfc5fc..7eb4ebd 100644
391 +index d47d231..eca5bd9 100644
392 --- a/arch/x86/kvm/x86.c
393 +++ b/arch/x86/kvm/x86.c
394 -@@ -6024,12 +6024,10 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, bool req_int_win)
395 +@@ -6074,12 +6074,10 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, bool req_int_win)
396 }
397
398 /* try to inject new event if pending */
399 @@ -438,7 +605,7 @@ index 8bfc5fc..7eb4ebd 100644
400 } else if (kvm_cpu_has_injectable_intr(vcpu)) {
401 /*
402 * Because interrupts can be injected asynchronously, we are
403 -@@ -6474,10 +6472,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
404 +@@ -6548,10 +6546,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
405 if (inject_pending_event(vcpu, req_int_win) != 0)
406 req_immediate_exit = true;
407 /* enable NMI/IRQ window open exits if needed */
408 @@ -455,128 +622,6 @@ index 8bfc5fc..7eb4ebd 100644
409
410 if (kvm_lapic_enabled(vcpu)) {
411 update_cr8_intercept(vcpu);
412 -diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
413 -index eccd4d9..8fd6f44 100644
414 ---- a/arch/x86/pci/common.c
415 -+++ b/arch/x86/pci/common.c
416 -@@ -673,28 +673,22 @@ int pcibios_add_device(struct pci_dev *dev)
417 - return 0;
418 - }
419 -
420 --int pcibios_alloc_irq(struct pci_dev *dev)
421 -+int pcibios_enable_device(struct pci_dev *dev, int mask)
422 - {
423 -- /*
424 -- * If the PCI device was already claimed by core code and has
425 -- * MSI enabled, probing of the pcibios IRQ will overwrite
426 -- * dev->irq. So bail out if MSI is already enabled.
427 -- */
428 -- if (pci_dev_msi_enabled(dev))
429 -- return -EBUSY;
430 -+ int err;
431 -
432 -- return pcibios_enable_irq(dev);
433 --}
434 -+ if ((err = pci_enable_resources(dev, mask)) < 0)
435 -+ return err;
436 -
437 --void pcibios_free_irq(struct pci_dev *dev)
438 --{
439 -- if (pcibios_disable_irq)
440 -- pcibios_disable_irq(dev);
441 -+ if (!pci_dev_msi_enabled(dev))
442 -+ return pcibios_enable_irq(dev);
443 -+ return 0;
444 - }
445 -
446 --int pcibios_enable_device(struct pci_dev *dev, int mask)
447 -+void pcibios_disable_device (struct pci_dev *dev)
448 - {
449 -- return pci_enable_resources(dev, mask);
450 -+ if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq)
451 -+ pcibios_disable_irq(dev);
452 - }
453 -
454 - int pci_ext_cfg_avail(void)
455 -diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
456 -index 0d24e7c..8b93e63 100644
457 ---- a/arch/x86/pci/intel_mid_pci.c
458 -+++ b/arch/x86/pci/intel_mid_pci.c
459 -@@ -215,7 +215,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
460 - int polarity;
461 - int ret;
462 -
463 -- if (pci_has_managed_irq(dev))
464 -+ if (dev->irq_managed && dev->irq > 0)
465 - return 0;
466 -
467 - switch (intel_mid_identify_cpu()) {
468 -@@ -256,13 +256,10 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
469 -
470 - static void intel_mid_pci_irq_disable(struct pci_dev *dev)
471 - {
472 -- if (pci_has_managed_irq(dev)) {
473 -+ if (!mp_should_keep_irq(&dev->dev) && dev->irq_managed &&
474 -+ dev->irq > 0) {
475 - mp_unmap_irq(dev->irq);
476 - dev->irq_managed = 0;
477 -- /*
478 -- * Don't reset dev->irq here, otherwise
479 -- * intel_mid_pci_irq_enable() will fail on next call.
480 -- */
481 - }
482 - }
483 -
484 -diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
485 -index 32e7034..9bd1154 100644
486 ---- a/arch/x86/pci/irq.c
487 -+++ b/arch/x86/pci/irq.c
488 -@@ -1202,7 +1202,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
489 - struct pci_dev *temp_dev;
490 - int irq;
491 -
492 -- if (pci_has_managed_irq(dev))
493 -+ if (dev->irq_managed && dev->irq > 0)
494 - return 0;
495 -
496 - irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
497 -@@ -1230,7 +1230,8 @@ static int pirq_enable_irq(struct pci_dev *dev)
498 - }
499 - dev = temp_dev;
500 - if (irq >= 0) {
501 -- pci_set_managed_irq(dev, irq);
502 -+ dev->irq_managed = 1;
503 -+ dev->irq = irq;
504 - dev_info(&dev->dev, "PCI->APIC IRQ transform: "
505 - "INT %c -> IRQ %d\n", 'A' + pin - 1, irq);
506 - return 0;
507 -@@ -1256,10 +1257,24 @@ static int pirq_enable_irq(struct pci_dev *dev)
508 - return 0;
509 - }
510 -
511 -+bool mp_should_keep_irq(struct device *dev)
512 -+{
513 -+ if (dev->power.is_prepared)
514 -+ return true;
515 -+#ifdef CONFIG_PM
516 -+ if (dev->power.runtime_status == RPM_SUSPENDING)
517 -+ return true;
518 -+#endif
519 -+
520 -+ return false;
521 -+}
522 -+
523 - static void pirq_disable_irq(struct pci_dev *dev)
524 - {
525 -- if (io_apic_assign_pci_irqs && pci_has_managed_irq(dev)) {
526 -+ if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) &&
527 -+ dev->irq_managed && dev->irq) {
528 - mp_unmap_irq(dev->irq);
529 -- pci_reset_managed_irq(dev);
530 -+ dev->irq = 0;
531 -+ dev->irq_managed = 0;
532 - }
533 - }
534 diff --git a/crypto/asymmetric_keys/pkcs7_trust.c b/crypto/asymmetric_keys/pkcs7_trust.c
535 index 90d6d47..ecdb5a2 100644
536 --- a/crypto/asymmetric_keys/pkcs7_trust.c
537 @@ -590,58 +635,8 @@ index 90d6d47..ecdb5a2 100644
538 for (p = pkcs7->certs; p; p = p->next)
539 p->seen = false;
540
541 -diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
542 -index c933675..8a10a7a 100644
543 ---- a/drivers/acpi/pci_irq.c
544 -+++ b/drivers/acpi/pci_irq.c
545 -@@ -409,7 +409,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
546 - return 0;
547 - }
548 -
549 -- if (pci_has_managed_irq(dev))
550 -+ if (dev->irq_managed && dev->irq > 0)
551 - return 0;
552 -
553 - entry = acpi_pci_irq_lookup(dev, pin);
554 -@@ -454,7 +454,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
555 - kfree(entry);
556 - return rc;
557 - }
558 -- pci_set_managed_irq(dev, rc);
559 -+ dev->irq = rc;
560 -+ dev->irq_managed = 1;
561 -
562 - if (link)
563 - snprintf(link_desc, sizeof(link_desc), " -> Link[%s]", link);
564 -@@ -477,9 +478,17 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
565 - u8 pin;
566 -
567 - pin = dev->pin;
568 -- if (!pin || !pci_has_managed_irq(dev))
569 -+ if (!pin || !dev->irq_managed || dev->irq <= 0)
570 - return;
571 -
572 -+ /* Keep IOAPIC pin configuration when suspending */
573 -+ if (dev->dev.power.is_prepared)
574 -+ return;
575 -+#ifdef CONFIG_PM
576 -+ if (dev->dev.power.runtime_status == RPM_SUSPENDING)
577 -+ return;
578 -+#endif
579 -+
580 - entry = acpi_pci_irq_lookup(dev, pin);
581 - if (!entry)
582 - return;
583 -@@ -499,6 +508,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
584 - dev_dbg(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
585 - if (gsi >= 0) {
586 - acpi_unregister_gsi(gsi);
587 -- pci_reset_managed_irq(dev);
588 -+ dev->irq_managed = 0;
589 - }
590 - }
591 diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
592 -index 81ea69f..fbdddd6 100644
593 +index 4a87678..9745cf9 100644
594 --- a/drivers/block/rbd.c
595 +++ b/drivers/block/rbd.c
596 @@ -1955,7 +1955,7 @@ static struct ceph_osd_request *rbd_osd_req_create(
597 @@ -671,11 +666,89 @@ index 81ea69f..fbdddd6 100644
598 if (!obj_request->bio_list)
599 goto out_unwind;
600 } else if (type == OBJ_REQUEST_PAGES) {
601 +diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
602 +index 99b375c..90c1511 100644
603 +--- a/drivers/gpio/gpio-pca953x.c
604 ++++ b/drivers/gpio/gpio-pca953x.c
605 +@@ -18,6 +18,7 @@
606 + #include <linux/i2c.h>
607 + #include <linux/platform_data/pca953x.h>
608 + #include <linux/slab.h>
609 ++#include <asm/unaligned.h>
610 + #include <linux/of_platform.h>
611 + #include <linux/acpi.h>
612 +
613 +@@ -159,7 +160,7 @@ static int pca953x_write_regs(struct pca953x_chip *chip, int reg, u8 *val)
614 + switch (chip->chip_type) {
615 + case PCA953X_TYPE:
616 + ret = i2c_smbus_write_word_data(chip->client,
617 +- reg << 1, (u16) *val);
618 ++ reg << 1, cpu_to_le16(get_unaligned((u16 *)val)));
619 + break;
620 + case PCA957X_TYPE:
621 + ret = i2c_smbus_write_byte_data(chip->client, reg << 1,
622 +diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
623 +index b2b7b78..76ac906 100644
624 +--- a/drivers/gpio/gpio-pxa.c
625 ++++ b/drivers/gpio/gpio-pxa.c
626 +@@ -283,8 +283,8 @@ static int pxa_gpio_direction_output(struct gpio_chip *chip,
627 + writel_relaxed(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET));
628 +
629 + ret = pinctrl_gpio_direction_output(chip->base + offset);
630 +- if (!ret)
631 +- return 0;
632 ++ if (ret)
633 ++ return ret;
634 +
635 + spin_lock_irqsave(&gpio_lock, flags);
636 +
637 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
638 +index 7a4b101..75cb5b9 100644
639 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
640 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
641 +@@ -816,10 +816,13 @@ static int amdgpu_cgs_get_active_displays_info(void *cgs_device,
642 + struct drm_device *ddev = adev->ddev;
643 + struct drm_crtc *crtc;
644 + uint32_t line_time_us, vblank_lines;
645 ++ struct cgs_mode_info *mode_info;
646 +
647 + if (info == NULL)
648 + return -EINVAL;
649 +
650 ++ mode_info = info->mode_info;
651 ++
652 + if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) {
653 + list_for_each_entry(crtc,
654 + &ddev->mode_config.crtc_list, head) {
655 +@@ -828,7 +831,7 @@ static int amdgpu_cgs_get_active_displays_info(void *cgs_device,
656 + info->active_display_mask |= (1 << amdgpu_crtc->crtc_id);
657 + info->display_count++;
658 + }
659 +- if (info->mode_info != NULL &&
660 ++ if (mode_info != NULL &&
661 + crtc->enabled && amdgpu_crtc->enabled &&
662 + amdgpu_crtc->hw_mode.clock) {
663 + line_time_us = (amdgpu_crtc->hw_mode.crtc_htotal * 1000) /
664 +@@ -836,10 +839,10 @@ static int amdgpu_cgs_get_active_displays_info(void *cgs_device,
665 + vblank_lines = amdgpu_crtc->hw_mode.crtc_vblank_end -
666 + amdgpu_crtc->hw_mode.crtc_vdisplay +
667 + (amdgpu_crtc->v_border * 2);
668 +- info->mode_info->vblank_time_us = vblank_lines * line_time_us;
669 +- info->mode_info->refresh_rate = drm_mode_vrefresh(&amdgpu_crtc->hw_mode);
670 +- info->mode_info->ref_clock = adev->clock.spll.reference_freq;
671 +- info->mode_info++;
672 ++ mode_info->vblank_time_us = vblank_lines * line_time_us;
673 ++ mode_info->refresh_rate = drm_mode_vrefresh(&amdgpu_crtc->hw_mode);
674 ++ mode_info->ref_clock = adev->clock.spll.reference_freq;
675 ++ mode_info = NULL;
676 + }
677 + }
678 + }
679 diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
680 -index 272110c..ea87033 100644
681 +index b806079..53964b1 100644
682 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
683 +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
684 -@@ -898,14 +898,6 @@ static int gmc_v7_0_early_init(void *handle)
685 +@@ -902,14 +902,6 @@ static int gmc_v7_0_early_init(void *handle)
686 gmc_v7_0_set_gart_funcs(adev);
687 gmc_v7_0_set_irq_funcs(adev);
688
689 @@ -690,7 +763,7 @@ index 272110c..ea87033 100644
690 return 0;
691 }
692
693 -@@ -926,6 +918,14 @@ static int gmc_v7_0_sw_init(void *handle)
694 +@@ -930,6 +922,14 @@ static int gmc_v7_0_sw_init(void *handle)
695 if (r)
696 return r;
697
698 @@ -706,10 +779,10 @@ index 272110c..ea87033 100644
699 if (r)
700 return r;
701 diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
702 -index ba4ad00..0842308 100644
703 +index 3efd455..e59251f 100644
704 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
705 +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
706 -@@ -852,14 +852,6 @@ static int gmc_v8_0_early_init(void *handle)
707 +@@ -856,14 +856,6 @@ static int gmc_v8_0_early_init(void *handle)
708 gmc_v8_0_set_gart_funcs(adev);
709 gmc_v8_0_set_irq_funcs(adev);
710
711 @@ -724,7 +797,7 @@ index ba4ad00..0842308 100644
712 return 0;
713 }
714
715 -@@ -870,6 +862,8 @@ static int gmc_v8_0_late_init(void *handle)
716 +@@ -874,6 +866,8 @@ static int gmc_v8_0_late_init(void *handle)
717 return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0);
718 }
719
720 @@ -733,7 +806,7 @@ index ba4ad00..0842308 100644
721 static int gmc_v8_0_sw_init(void *handle)
722 {
723 int r;
724 -@@ -880,6 +874,19 @@ static int gmc_v8_0_sw_init(void *handle)
725 +@@ -884,6 +878,19 @@ static int gmc_v8_0_sw_init(void *handle)
726 if (r)
727 return r;
728
729 @@ -875,10 +948,10 @@ index a82b891..7285adb 100644
730 if (rps->vce_active) {
731 rps->evclk = rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].evclk;
732 diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
733 -index 62c7b1d..73e41a8 100644
734 +index 200419d..18a2acb 100644
735 --- a/drivers/gpu/drm/udl/udl_fb.c
736 +++ b/drivers/gpu/drm/udl/udl_fb.c
737 -@@ -539,7 +539,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
738 +@@ -538,7 +538,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
739 out_destroy_fbi:
740 drm_fb_helper_release_fbi(helper);
741 out_gfree:
742 @@ -901,7 +974,7 @@ index 2a0a784..d7528e0 100644
743 return 0;
744 }
745 diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
746 -index 5dd426f..0df32fe 100644
747 +index ad71160..ae83af6 100644
748 --- a/drivers/hid/usbhid/hid-core.c
749 +++ b/drivers/hid/usbhid/hid-core.c
750 @@ -951,14 +951,6 @@ static int usbhid_output_report(struct hid_device *hid, __u8 *buf, size_t count)
751 @@ -1029,10 +1102,10 @@ index 5dd426f..0df32fe 100644
752 if (status >= 0 && hid->driver && hid->driver->reset_resume) {
753 int ret = hid->driver->reset_resume(hid);
754 diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
755 -index 01a4f05..3c0f47a 100644
756 +index 99ef77f..94a8875 100644
757 --- a/drivers/hid/wacom_wac.c
758 +++ b/drivers/hid/wacom_wac.c
759 -@@ -2493,6 +2493,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
760 +@@ -2409,6 +2409,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
761 }
762
763 /*
764 @@ -1075,7 +1148,7 @@ index 36544c4..303d0c9 100644
765 sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group);
766 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
767 diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
768 -index 2d33f1e..291c61a 100644
769 +index c73331f7..2072a31 100644
770 --- a/drivers/iio/accel/bmc150-accel-core.c
771 +++ b/drivers/iio/accel/bmc150-accel-core.c
772 @@ -547,7 +547,7 @@ static int bmc150_accel_get_axis(struct bmc150_accel_data *data,
773 @@ -1113,7 +1186,7 @@ index 2d33f1e..291c61a 100644
774 .event_spec = &bmc150_accel_event, \
775 .num_event_specs = 1 \
776 diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c
777 -index 02ff789..acb3b30 100644
778 +index bbce3b0..4dac567 100644
779 --- a/drivers/iio/gyro/bmg160_core.c
780 +++ b/drivers/iio/gyro/bmg160_core.c
781 @@ -452,7 +452,7 @@ static int bmg160_get_temp(struct bmg160_data *data, int *val)
782 @@ -1160,6 +1233,18 @@ index 02ff789..acb3b30 100644
783 }
784 mutex_unlock(&data->mutex);
785
786 +diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
787 +index 139ae91..5b6abc5 100644
788 +--- a/drivers/iio/industrialio-buffer.c
789 ++++ b/drivers/iio/industrialio-buffer.c
790 +@@ -645,6 +645,7 @@ static int iio_verify_update(struct iio_dev *indio_dev,
791 + unsigned int modes;
792 +
793 + memset(config, 0, sizeof(*config));
794 ++ config->watermark = ~0;
795 +
796 + /*
797 + * If there is just one buffer and we are removing it there is nothing
798 diff --git a/drivers/iio/magnetometer/st_magn.h b/drivers/iio/magnetometer/st_magn.h
799 index 06a4d9c..9daca46 100644
800 --- a/drivers/iio/magnetometer/st_magn.h
801 @@ -1187,10 +1272,10 @@ index 0e3b009..515bb8b 100644
802
803 ret = iommu_group_add_device(group, dev);
804 diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
805 -index 15516a6..323aad3 100644
806 +index 2d782ce..7ae89c6 100644
807 --- a/drivers/media/platform/coda/coda-common.c
808 +++ b/drivers/media/platform/coda/coda-common.c
809 -@@ -2119,14 +2119,12 @@ static int coda_probe(struct platform_device *pdev)
810 +@@ -2118,14 +2118,12 @@ static int coda_probe(struct platform_device *pdev)
811
812 pdev_id = of_id ? of_id->data : platform_get_device_id(pdev);
813
814 @@ -1222,10 +1307,10 @@ index 6310aca..d41ae95 100644
815
816 vsp1_sru_write(sru, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5);
817 diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
818 -index 0934024..d91ded7 100644
819 +index 9e29e70..d898880 100644
820 --- a/drivers/media/usb/au0828/au0828-core.c
821 +++ b/drivers/media/usb/au0828/au0828-core.c
822 -@@ -159,7 +159,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
823 +@@ -192,7 +192,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
824 Set the status so poll routines can check and avoid
825 access after disconnect.
826 */
827 @@ -1257,7 +1342,7 @@ index b0f0679..3d6687f 100644
828 au8522_rc_clear(ir, 0xe0, 1 << 4);
829 }
830 diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
831 -index 45c622e..7b2fe1b 100644
832 +index a136257..8bc69af 100644
833 --- a/drivers/media/usb/au0828/au0828-video.c
834 +++ b/drivers/media/usb/au0828/au0828-video.c
835 @@ -104,14 +104,13 @@ static inline void print_err_status(struct au0828_dev *dev,
836 @@ -1289,7 +1374,7 @@ index 45c622e..7b2fe1b 100644
837 return 0;
838
839 if (urb->status < 0) {
840 -@@ -766,10 +765,10 @@ static int au0828_stream_interrupt(struct au0828_dev *dev)
841 +@@ -822,10 +821,10 @@ static int au0828_stream_interrupt(struct au0828_dev *dev)
842 int ret = 0;
843
844 dev->stream_state = STREAM_INTERRUPT;
845 @@ -1302,7 +1387,7 @@ index 45c622e..7b2fe1b 100644
846 dprintk(1, "%s device is misconfigured!\n", __func__);
847 return ret;
848 }
849 -@@ -958,7 +957,7 @@ static int au0828_v4l2_open(struct file *filp)
850 +@@ -1014,7 +1013,7 @@ static int au0828_v4l2_open(struct file *filp)
851 int ret;
852
853 dprintk(1,
854 @@ -1311,7 +1396,7 @@ index 45c622e..7b2fe1b 100644
855 __func__, dev->std_set_in_tuner_core, dev->dev_state,
856 dev->streaming_users, dev->users);
857
858 -@@ -977,7 +976,7 @@ static int au0828_v4l2_open(struct file *filp)
859 +@@ -1033,7 +1032,7 @@ static int au0828_v4l2_open(struct file *filp)
860 au0828_analog_stream_enable(dev);
861 au0828_analog_stream_reset(dev);
862 dev->stream_state = STREAM_OFF;
863 @@ -1320,7 +1405,7 @@ index 45c622e..7b2fe1b 100644
864 }
865 dev->users++;
866 mutex_unlock(&dev->lock);
867 -@@ -991,7 +990,7 @@ static int au0828_v4l2_close(struct file *filp)
868 +@@ -1047,7 +1046,7 @@ static int au0828_v4l2_close(struct file *filp)
869 struct video_device *vdev = video_devdata(filp);
870
871 dprintk(1,
872 @@ -1329,7 +1414,7 @@ index 45c622e..7b2fe1b 100644
873 __func__, dev->std_set_in_tuner_core, dev->dev_state,
874 dev->streaming_users, dev->users);
875
876 -@@ -1007,7 +1006,7 @@ static int au0828_v4l2_close(struct file *filp)
877 +@@ -1063,7 +1062,7 @@ static int au0828_v4l2_close(struct file *filp)
878 del_timer_sync(&dev->vbi_timeout);
879 }
880
881 @@ -1338,7 +1423,7 @@ index 45c622e..7b2fe1b 100644
882 goto end;
883
884 if (dev->users == 1) {
885 -@@ -1036,7 +1035,7 @@ static void au0828_init_tuner(struct au0828_dev *dev)
886 +@@ -1092,7 +1091,7 @@ static void au0828_init_tuner(struct au0828_dev *dev)
887 .type = V4L2_TUNER_ANALOG_TV,
888 };
889
890 @@ -1347,7 +1432,7 @@ index 45c622e..7b2fe1b 100644
891 dev->std_set_in_tuner_core, dev->dev_state);
892
893 if (dev->std_set_in_tuner_core)
894 -@@ -1108,7 +1107,7 @@ static int vidioc_querycap(struct file *file, void *priv,
895 +@@ -1164,7 +1163,7 @@ static int vidioc_querycap(struct file *file, void *priv,
896 struct video_device *vdev = video_devdata(file);
897 struct au0828_dev *dev = video_drvdata(file);
898
899 @@ -1356,7 +1441,7 @@ index 45c622e..7b2fe1b 100644
900 dev->std_set_in_tuner_core, dev->dev_state);
901
902 strlcpy(cap->driver, "au0828", sizeof(cap->driver));
903 -@@ -1151,7 +1150,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
904 +@@ -1207,7 +1206,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
905 {
906 struct au0828_dev *dev = video_drvdata(file);
907
908 @@ -1365,7 +1450,7 @@ index 45c622e..7b2fe1b 100644
909 dev->std_set_in_tuner_core, dev->dev_state);
910
911 f->fmt.pix.width = dev->width;
912 -@@ -1170,7 +1169,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
913 +@@ -1226,7 +1225,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
914 {
915 struct au0828_dev *dev = video_drvdata(file);
916
917 @@ -1374,7 +1459,7 @@ index 45c622e..7b2fe1b 100644
918 dev->std_set_in_tuner_core, dev->dev_state);
919
920 return au0828_set_format(dev, VIDIOC_TRY_FMT, f);
921 -@@ -1182,7 +1181,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
922 +@@ -1238,7 +1237,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
923 struct au0828_dev *dev = video_drvdata(file);
924 int rc;
925
926 @@ -1383,7 +1468,7 @@ index 45c622e..7b2fe1b 100644
927 dev->std_set_in_tuner_core, dev->dev_state);
928
929 rc = check_dev(dev);
930 -@@ -1204,7 +1203,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
931 +@@ -1260,7 +1259,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
932 {
933 struct au0828_dev *dev = video_drvdata(file);
934
935 @@ -1392,7 +1477,7 @@ index 45c622e..7b2fe1b 100644
936 dev->std_set_in_tuner_core, dev->dev_state);
937
938 if (norm == dev->std)
939 -@@ -1236,7 +1235,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
940 +@@ -1292,7 +1291,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
941 {
942 struct au0828_dev *dev = video_drvdata(file);
943
944 @@ -1401,7 +1486,7 @@ index 45c622e..7b2fe1b 100644
945 dev->std_set_in_tuner_core, dev->dev_state);
946
947 *norm = dev->std;
948 -@@ -1259,7 +1258,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
949 +@@ -1315,7 +1314,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
950 [AU0828_VMUX_DEBUG] = "tv debug"
951 };
952
953 @@ -1410,7 +1495,7 @@ index 45c622e..7b2fe1b 100644
954 dev->std_set_in_tuner_core, dev->dev_state);
955
956 tmp = input->index;
957 -@@ -1289,7 +1288,7 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
958 +@@ -1345,7 +1344,7 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
959 {
960 struct au0828_dev *dev = video_drvdata(file);
961
962 @@ -1419,7 +1504,7 @@ index 45c622e..7b2fe1b 100644
963 dev->std_set_in_tuner_core, dev->dev_state);
964
965 *i = dev->ctrl_input;
966 -@@ -1300,7 +1299,7 @@ static void au0828_s_input(struct au0828_dev *dev, int index)
967 +@@ -1356,7 +1355,7 @@ static void au0828_s_input(struct au0828_dev *dev, int index)
968 {
969 int i;
970
971 @@ -1428,7 +1513,7 @@ index 45c622e..7b2fe1b 100644
972 dev->std_set_in_tuner_core, dev->dev_state);
973
974 switch (AUVI_INPUT(index).type) {
975 -@@ -1385,7 +1384,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
976 +@@ -1441,7 +1440,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
977 {
978 struct au0828_dev *dev = video_drvdata(file);
979
980 @@ -1437,7 +1522,7 @@ index 45c622e..7b2fe1b 100644
981 dev->std_set_in_tuner_core, dev->dev_state);
982
983 a->index = dev->ctrl_ainput;
984 -@@ -1405,7 +1404,7 @@ static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio
985 +@@ -1461,7 +1460,7 @@ static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio
986 if (a->index != dev->ctrl_ainput)
987 return -EINVAL;
988
989 @@ -1446,7 +1531,7 @@ index 45c622e..7b2fe1b 100644
990 dev->std_set_in_tuner_core, dev->dev_state);
991 return 0;
992 }
993 -@@ -1417,7 +1416,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
994 +@@ -1473,7 +1472,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
995 if (t->index != 0)
996 return -EINVAL;
997
998 @@ -1455,7 +1540,7 @@ index 45c622e..7b2fe1b 100644
999 dev->std_set_in_tuner_core, dev->dev_state);
1000
1001 strcpy(t->name, "Auvitek tuner");
1002 -@@ -1437,7 +1436,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
1003 +@@ -1493,7 +1492,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
1004 if (t->index != 0)
1005 return -EINVAL;
1006
1007 @@ -1464,7 +1549,7 @@ index 45c622e..7b2fe1b 100644
1008 dev->std_set_in_tuner_core, dev->dev_state);
1009
1010 au0828_init_tuner(dev);
1011 -@@ -1459,7 +1458,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
1012 +@@ -1515,7 +1514,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
1013
1014 if (freq->tuner != 0)
1015 return -EINVAL;
1016 @@ -1473,7 +1558,7 @@ index 45c622e..7b2fe1b 100644
1017 dev->std_set_in_tuner_core, dev->dev_state);
1018 freq->frequency = dev->ctrl_freq;
1019 return 0;
1020 -@@ -1474,7 +1473,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1021 +@@ -1530,7 +1529,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
1022 if (freq->tuner != 0)
1023 return -EINVAL;
1024
1025 @@ -1482,7 +1567,7 @@ index 45c622e..7b2fe1b 100644
1026 dev->std_set_in_tuner_core, dev->dev_state);
1027
1028 au0828_init_tuner(dev);
1029 -@@ -1500,7 +1499,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
1030 +@@ -1556,7 +1555,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
1031 {
1032 struct au0828_dev *dev = video_drvdata(file);
1033
1034 @@ -1491,7 +1576,7 @@ index 45c622e..7b2fe1b 100644
1035 dev->std_set_in_tuner_core, dev->dev_state);
1036
1037 format->fmt.vbi.samples_per_line = dev->vbi_width;
1038 -@@ -1526,7 +1525,7 @@ static int vidioc_cropcap(struct file *file, void *priv,
1039 +@@ -1582,7 +1581,7 @@ static int vidioc_cropcap(struct file *file, void *priv,
1040 if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
1041 return -EINVAL;
1042
1043 @@ -1500,7 +1585,7 @@ index 45c622e..7b2fe1b 100644
1044 dev->std_set_in_tuner_core, dev->dev_state);
1045
1046 cc->bounds.left = 0;
1047 -@@ -1548,7 +1547,7 @@ static int vidioc_g_register(struct file *file, void *priv,
1048 +@@ -1604,7 +1603,7 @@ static int vidioc_g_register(struct file *file, void *priv,
1049 {
1050 struct au0828_dev *dev = video_drvdata(file);
1051
1052 @@ -1509,7 +1594,7 @@ index 45c622e..7b2fe1b 100644
1053 dev->std_set_in_tuner_core, dev->dev_state);
1054
1055 reg->val = au0828_read(dev, reg->reg);
1056 -@@ -1561,7 +1560,7 @@ static int vidioc_s_register(struct file *file, void *priv,
1057 +@@ -1617,7 +1616,7 @@ static int vidioc_s_register(struct file *file, void *priv,
1058 {
1059 struct au0828_dev *dev = video_drvdata(file);
1060
1061 @@ -1519,7 +1604,7 @@ index 45c622e..7b2fe1b 100644
1062
1063 return au0828_writereg(dev, reg->reg, reg->val);
1064 diff --git a/drivers/media/usb/au0828/au0828.h b/drivers/media/usb/au0828/au0828.h
1065 -index 60b5939..d1b6405a 100644
1066 +index 8276072..b28a05d 100644
1067 --- a/drivers/media/usb/au0828/au0828.h
1068 +++ b/drivers/media/usb/au0828/au0828.h
1069 @@ -21,6 +21,7 @@
1070 @@ -1552,37 +1637,8 @@ index 60b5939..d1b6405a 100644
1071 enum au0828_stream_state stream_state;
1072 wait_queue_head_t open;
1073
1074 -diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
1075 -index b693206..d1dc1a1 100644
1076 ---- a/drivers/media/usb/usbvision/usbvision-video.c
1077 -+++ b/drivers/media/usb/usbvision/usbvision-video.c
1078 -@@ -1463,9 +1463,23 @@ static int usbvision_probe(struct usb_interface *intf,
1079 -
1080 - if (usbvision_device_data[model].interface >= 0)
1081 - interface = &dev->actconfig->interface[usbvision_device_data[model].interface]->altsetting[0];
1082 -- else
1083 -+ else if (ifnum < dev->actconfig->desc.bNumInterfaces)
1084 - interface = &dev->actconfig->interface[ifnum]->altsetting[0];
1085 -+ else {
1086 -+ dev_err(&intf->dev, "interface %d is invalid, max is %d\n",
1087 -+ ifnum, dev->actconfig->desc.bNumInterfaces - 1);
1088 -+ ret = -ENODEV;
1089 -+ goto err_usb;
1090 -+ }
1091 -+
1092 -+ if (interface->desc.bNumEndpoints < 2) {
1093 -+ dev_err(&intf->dev, "interface %d has %d endpoints, but must"
1094 -+ " have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
1095 -+ ret = -ENODEV;
1096 -+ goto err_usb;
1097 -+ }
1098 - endpoint = &interface->endpoint[1].desc;
1099 -+
1100 - if (!usb_endpoint_xfer_isoc(endpoint)) {
1101 - dev_err(&intf->dev, "%s: interface %d. has non-ISO endpoint!\n",
1102 - __func__, ifnum);
1103 diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
1104 -index 45ee07d..6101548 100644
1105 +index df3b8ec..a04d0f7 100644
1106 --- a/drivers/mmc/host/sdhci-pci-core.c
1107 +++ b/drivers/mmc/host/sdhci-pci-core.c
1108 @@ -390,6 +390,7 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
1109 @@ -1638,11 +1694,142 @@ index d1a0b4d..89e7151 100644
1110 #define PCI_DEVICE_ID_INTEL_APL_SD 0x5aca
1111 #define PCI_DEVICE_ID_INTEL_APL_EMMC 0x5acc
1112 #define PCI_DEVICE_ID_INTEL_APL_SDIO 0x5ad0
1113 +diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
1114 +index c7f27fe..452bf500 100644
1115 +--- a/drivers/mmc/host/sdhci-pxav3.c
1116 ++++ b/drivers/mmc/host/sdhci-pxav3.c
1117 +@@ -309,8 +309,30 @@ static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs)
1118 + __func__, uhs, ctrl_2);
1119 + }
1120 +
1121 ++static void pxav3_set_power(struct sdhci_host *host, unsigned char mode,
1122 ++ unsigned short vdd)
1123 ++{
1124 ++ struct mmc_host *mmc = host->mmc;
1125 ++ u8 pwr = host->pwr;
1126 ++
1127 ++ sdhci_set_power(host, mode, vdd);
1128 ++
1129 ++ if (host->pwr == pwr)
1130 ++ return;
1131 ++
1132 ++ if (host->pwr == 0)
1133 ++ vdd = 0;
1134 ++
1135 ++ if (!IS_ERR(mmc->supply.vmmc)) {
1136 ++ spin_unlock_irq(&host->lock);
1137 ++ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
1138 ++ spin_lock_irq(&host->lock);
1139 ++ }
1140 ++}
1141 ++
1142 + static const struct sdhci_ops pxav3_sdhci_ops = {
1143 + .set_clock = sdhci_set_clock,
1144 ++ .set_power = pxav3_set_power,
1145 + .platform_send_init_74_clocks = pxav3_gen_init_74_clocks,
1146 + .get_max_clock = sdhci_pltfm_clk_get_max_clock,
1147 + .set_bus_width = sdhci_set_bus_width,
1148 +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
1149 +index 8059d72..6d485b5 100644
1150 +--- a/drivers/mmc/host/sdhci.c
1151 ++++ b/drivers/mmc/host/sdhci.c
1152 +@@ -1250,10 +1250,24 @@ clock_set:
1153 + }
1154 + EXPORT_SYMBOL_GPL(sdhci_set_clock);
1155 +
1156 +-static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
1157 +- unsigned short vdd)
1158 ++static void sdhci_set_power_reg(struct sdhci_host *host, unsigned char mode,
1159 ++ unsigned short vdd)
1160 + {
1161 + struct mmc_host *mmc = host->mmc;
1162 ++
1163 ++ spin_unlock_irq(&host->lock);
1164 ++ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
1165 ++ spin_lock_irq(&host->lock);
1166 ++
1167 ++ if (mode != MMC_POWER_OFF)
1168 ++ sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
1169 ++ else
1170 ++ sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
1171 ++}
1172 ++
1173 ++void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
1174 ++ unsigned short vdd)
1175 ++{
1176 + u8 pwr = 0;
1177 +
1178 + if (mode != MMC_POWER_OFF) {
1179 +@@ -1285,7 +1299,6 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
1180 + sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
1181 + if (host->quirks2 & SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON)
1182 + sdhci_runtime_pm_bus_off(host);
1183 +- vdd = 0;
1184 + } else {
1185 + /*
1186 + * Spec says that we should clear the power reg before setting
1187 +@@ -1316,12 +1329,20 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
1188 + if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER)
1189 + mdelay(10);
1190 + }
1191 ++}
1192 ++EXPORT_SYMBOL_GPL(sdhci_set_power);
1193 +
1194 +- if (!IS_ERR(mmc->supply.vmmc)) {
1195 +- spin_unlock_irq(&host->lock);
1196 +- mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
1197 +- spin_lock_irq(&host->lock);
1198 +- }
1199 ++static void __sdhci_set_power(struct sdhci_host *host, unsigned char mode,
1200 ++ unsigned short vdd)
1201 ++{
1202 ++ struct mmc_host *mmc = host->mmc;
1203 ++
1204 ++ if (host->ops->set_power)
1205 ++ host->ops->set_power(host, mode, vdd);
1206 ++ else if (!IS_ERR(mmc->supply.vmmc))
1207 ++ sdhci_set_power_reg(host, mode, vdd);
1208 ++ else
1209 ++ sdhci_set_power(host, mode, vdd);
1210 + }
1211 +
1212 + /*****************************************************************************\
1213 +@@ -1471,7 +1492,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
1214 + }
1215 + }
1216 +
1217 +- sdhci_set_power(host, ios->power_mode, ios->vdd);
1218 ++ __sdhci_set_power(host, ios->power_mode, ios->vdd);
1219 +
1220 + if (host->ops->platform_send_init_74_clocks)
1221 + host->ops->platform_send_init_74_clocks(host, ios->power_mode);
1222 +diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
1223 +index 0115e99..033d72b 100644
1224 +--- a/drivers/mmc/host/sdhci.h
1225 ++++ b/drivers/mmc/host/sdhci.h
1226 +@@ -529,6 +529,8 @@ struct sdhci_ops {
1227 + #endif
1228 +
1229 + void (*set_clock)(struct sdhci_host *host, unsigned int clock);
1230 ++ void (*set_power)(struct sdhci_host *host, unsigned char mode,
1231 ++ unsigned short vdd);
1232 +
1233 + int (*enable_dma)(struct sdhci_host *host);
1234 + unsigned int (*get_max_clock)(struct sdhci_host *host);
1235 +@@ -660,6 +662,8 @@ static inline bool sdhci_sdio_irq_enabled(struct sdhci_host *host)
1236 + }
1237 +
1238 + void sdhci_set_clock(struct sdhci_host *host, unsigned int clock);
1239 ++void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
1240 ++ unsigned short vdd);
1241 + void sdhci_set_bus_width(struct sdhci_host *host, int width);
1242 + void sdhci_reset(struct sdhci_host *host, u8 mask);
1243 + void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
1244 diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
1245 -index 28bbca0..b3d70a7 100644
1246 +index b7f1a99..5ec8195 100644
1247 --- a/drivers/net/bonding/bond_main.c
1248 +++ b/drivers/net/bonding/bond_main.c
1249 -@@ -3260,6 +3260,30 @@ static int bond_close(struct net_device *bond_dev)
1250 +@@ -3308,6 +3308,30 @@ static int bond_close(struct net_device *bond_dev)
1251 return 0;
1252 }
1253
1254 @@ -1673,7 +1860,7 @@ index 28bbca0..b3d70a7 100644
1255 static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
1256 struct rtnl_link_stats64 *stats)
1257 {
1258 -@@ -3268,43 +3292,23 @@ static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
1259 +@@ -3316,43 +3340,23 @@ static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
1260 struct list_head *iter;
1261 struct slave *slave;
1262
1263 @@ -1727,7 +1914,7 @@ index 28bbca0..b3d70a7 100644
1264
1265 return stats;
1266 }
1267 -@@ -4118,6 +4122,7 @@ void bond_setup(struct net_device *bond_dev)
1268 +@@ -4166,6 +4170,7 @@ void bond_setup(struct net_device *bond_dev)
1269 struct bonding *bond = netdev_priv(bond_dev);
1270
1271 spin_lock_init(&bond->mode_lock);
1272 @@ -1736,7 +1923,7 @@ index 28bbca0..b3d70a7 100644
1273
1274 /* Initialize pointers */
1275 diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
1276 -index 17f017a..0fb3f8d 100644
1277 +index d7e01a7..6746fd0 100644
1278 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
1279 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
1280 @@ -1197,7 +1197,7 @@ static unsigned int __bcmgenet_tx_reclaim(struct net_device *dev,
1281 @@ -1757,31 +1944,46 @@ index 17f017a..0fb3f8d 100644
1282 length_status = (skb_len << DMA_BUFLENGTH_SHIFT) | dma_desc_flags |
1283 (priv->hw_params->qtag_mask << DMA_TX_QTAG_SHIFT) |
1284 DMA_TX_APPEND_CRC;
1285 -diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
1286 -index 060dd39..973dade 100644
1287 ---- a/drivers/net/ethernet/jme.c
1288 -+++ b/drivers/net/ethernet/jme.c
1289 -@@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
1290 - jme_reset_phy_processor(jme);
1291 - jme_phy_calibration(jme);
1292 - jme_phy_setEA(jme);
1293 -- jme_start_irq(jme);
1294 - netif_device_attach(netdev);
1295 -
1296 - atomic_inc(&jme->link_changing);
1297 -
1298 - jme_reset_link(jme);
1299 -
1300 -+ jme_start_irq(jme);
1301 +diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
1302 +index acb1c5b..2ee05ce 100644
1303 +--- a/drivers/net/ethernet/marvell/mvneta.c
1304 ++++ b/drivers/net/ethernet/marvell/mvneta.c
1305 +@@ -3070,17 +3070,17 @@ static int mvneta_stop(struct net_device *dev)
1306 + struct mvneta_port *pp = netdev_priv(dev);
1307 +
1308 + /* Inform that we are stopping so we don't want to setup the
1309 +- * driver for new CPUs in the notifiers
1310 ++ * driver for new CPUs in the notifiers. The code of the
1311 ++ * notifier for CPU online is protected by the same spinlock,
1312 ++ * so when we get the lock, the notifer work is done.
1313 + */
1314 + spin_lock(&pp->lock);
1315 + pp->is_stopped = true;
1316 ++ spin_unlock(&pp->lock);
1317 +
1318 - return 0;
1319 - }
1320 + mvneta_stop_dev(pp);
1321 + mvneta_mdio_remove(pp);
1322 + unregister_cpu_notifier(&pp->cpu_notifier);
1323 +- /* Now that the notifier are unregistered, we can release le
1324 +- * lock
1325 +- */
1326 +- spin_unlock(&pp->lock);
1327 + on_each_cpu(mvneta_percpu_disable, pp, true);
1328 + free_percpu_irq(dev->irq, pp->ports);
1329 + mvneta_cleanup_rxqs(pp);
1330 +@@ -3612,6 +3612,7 @@ static int mvneta_probe(struct platform_device *pdev)
1331 + dev->ethtool_ops = &mvneta_eth_tool_ops;
1332 +
1333 + pp = netdev_priv(dev);
1334 ++ spin_lock_init(&pp->lock);
1335 + pp->phy_node = phy_node;
1336 + pp->phy_interface = phy_mode;
1337
1338 diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
1339 -index cad6c44..d314d96 100644
1340 +index 25ce1b0..cd9b2b2 100644
1341 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
1342 +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
1343 -@@ -3132,7 +3132,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
1344 +@@ -3141,7 +3141,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
1345 case QP_TRANS_RTS2RTS:
1346 case QP_TRANS_SQD2SQD:
1347 case QP_TRANS_SQD2RTS:
1348 @@ -1790,7 +1992,7 @@ index cad6c44..d314d96 100644
1349 if (optpar & MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH) {
1350 port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
1351 if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB)
1352 -@@ -3151,6 +3151,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
1353 +@@ -3160,6 +3160,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
1354 if (qp_ctx->alt_path.mgid_index >= num_gids)
1355 return -EINVAL;
1356 }
1357 @@ -1799,10 +2001,10 @@ index cad6c44..d314d96 100644
1358 default:
1359 break;
1360 diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
1361 -index 4365c8b..605f641 100644
1362 +index 3b89ed2..65a115f 100644
1363 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
1364 +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
1365 -@@ -61,6 +61,8 @@ struct mlxsw_sp {
1366 +@@ -118,6 +118,8 @@ struct mlxsw_sp {
1367 #define MLXSW_SP_DEFAULT_LEARNING_INTERVAL 100
1368 unsigned int interval; /* ms */
1369 } fdb_notify;
1370 @@ -1810,12 +2012,12 @@ index 4365c8b..605f641 100644
1371 +#define MLXSW_SP_MAX_AGEING_TIME 1000000
1372 #define MLXSW_SP_DEFAULT_AGEING_TIME 300
1373 u32 ageing_time;
1374 - struct {
1375 + struct mlxsw_sp_upper master_bridge;
1376 diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
1377 -index 7dbeafa..d4c4c2b 100644
1378 +index 7b56098..e1c74ef 100644
1379 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
1380 +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
1381 -@@ -232,8 +232,13 @@ static int mlxsw_sp_port_attr_br_ageing_set(struct mlxsw_sp_port *mlxsw_sp_port,
1382 +@@ -311,8 +311,13 @@ static int mlxsw_sp_port_attr_br_ageing_set(struct mlxsw_sp_port *mlxsw_sp_port,
1383 unsigned long ageing_jiffies = clock_t_to_jiffies(ageing_clock_t);
1384 u32 ageing_time = jiffies_to_msecs(ageing_jiffies) / 1000;
1385
1386 @@ -1972,24 +2174,11 @@ index 9979764..b28e73e 100644
1387 skb = new_skb;
1388
1389 /* Frame error, so drop the packet. */
1390 -diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
1391 -index 689a4a5..1ef0393 100644
1392 ---- a/drivers/net/ethernet/qualcomm/qca_spi.c
1393 -+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
1394 -@@ -811,7 +811,7 @@ qcaspi_netdev_setup(struct net_device *dev)
1395 - dev->netdev_ops = &qcaspi_netdev_ops;
1396 - qcaspi_set_ethtool_ops(dev);
1397 - dev->watchdog_timeo = QCASPI_TX_TIMEOUT;
1398 -- dev->flags = IFF_MULTICAST;
1399 -+ dev->priv_flags &= ~IFF_TX_SKB_SHARING;
1400 - dev->tx_queue_len = 100;
1401 -
1402 - qca = netdev_priv(dev);
1403 diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
1404 -index 6a8fc0f..36fc942 100644
1405 +index 7384499..01f6d5b 100644
1406 --- a/drivers/net/ethernet/renesas/sh_eth.c
1407 +++ b/drivers/net/ethernet/renesas/sh_eth.c
1408 -@@ -1185,11 +1185,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
1409 +@@ -1136,11 +1136,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
1410 break;
1411 sh_eth_set_receive_align(skb);
1412
1413 @@ -1997,33 +2186,33 @@ index 6a8fc0f..36fc942 100644
1414 - rxdesc = &mdp->rx_ring[i];
1415 /* The size of the buffer is a multiple of 32 bytes. */
1416 buf_len = ALIGN(mdp->rx_buf_sz, 32);
1417 -- rxdesc->len = cpu_to_edmac(mdp, buf_len << 16);
1418 +- rxdesc->len = cpu_to_le32(buf_len << 16);
1419 dma_addr = dma_map_single(&ndev->dev, skb->data, buf_len,
1420 DMA_FROM_DEVICE);
1421 if (dma_mapping_error(&ndev->dev, dma_addr)) {
1422 -@@ -1197,6 +1194,10 @@ static void sh_eth_ring_format(struct net_device *ndev)
1423 +@@ -1148,6 +1145,10 @@ static void sh_eth_ring_format(struct net_device *ndev)
1424 break;
1425 }
1426 mdp->rx_skbuff[i] = skb;
1427 +
1428 + /* RX descriptor */
1429 + rxdesc = &mdp->rx_ring[i];
1430 -+ rxdesc->len = cpu_to_edmac(mdp, buf_len << 16);
1431 - rxdesc->addr = cpu_to_edmac(mdp, dma_addr);
1432 - rxdesc->status = cpu_to_edmac(mdp, RD_RACT | RD_RFP);
1433 ++ rxdesc->len = cpu_to_le32(buf_len << 16);
1434 + rxdesc->addr = cpu_to_le32(dma_addr);
1435 + rxdesc->status = cpu_to_le32(RD_RACT | RD_RFP);
1436
1437 -@@ -1212,7 +1213,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
1438 +@@ -1163,7 +1164,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
1439 mdp->dirty_rx = (u32) (i - mdp->num_rx_ring);
1440
1441 /* Mark the last entry as wrapping the ring. */
1442 -- rxdesc->status |= cpu_to_edmac(mdp, RD_RDLE);
1443 +- rxdesc->status |= cpu_to_le32(RD_RDLE);
1444 + if (rxdesc)
1445 -+ rxdesc->status |= cpu_to_edmac(mdp, RD_RDLE);
1446 ++ rxdesc->status |= cpu_to_le32(RD_RDLE);
1447
1448 memset(mdp->tx_ring, 0, tx_ringsize);
1449
1450 diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
1451 -index 52ec3d6..2b34622 100644
1452 +index 166a7fc..f39e719 100644
1453 --- a/drivers/net/ethernet/rocker/rocker.c
1454 +++ b/drivers/net/ethernet/rocker/rocker.c
1455 @@ -239,6 +239,7 @@ struct rocker {
1456 @@ -2071,7 +2260,7 @@ index 52ec3d6..2b34622 100644
1457 if (err) {
1458 dev_err(&pdev->dev, "failed to probe ports\n");
1459 diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
1460 -index 0fc5219..159a687 100644
1461 +index d636d05..95394ed 100644
1462 --- a/drivers/net/macvtap.c
1463 +++ b/drivers/net/macvtap.c
1464 @@ -760,6 +760,8 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
1465 @@ -2099,10 +2288,10 @@ index 0fc5219..159a687 100644
1466
1467 skb = macvtap_alloc_skb(&q->sk, MACVTAP_RESERVE, copylen,
1468 diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
1469 -index 9a863c6..174e06e 100644
1470 +index d61da9ec..aafe237 100644
1471 --- a/drivers/net/ppp/ppp_generic.c
1472 +++ b/drivers/net/ppp/ppp_generic.c
1473 -@@ -567,7 +567,7 @@ static int get_filter(void __user *arg, struct sock_filter **p)
1474 +@@ -575,7 +575,7 @@ static int get_filter(void __user *arg, struct sock_filter **p)
1475
1476 static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1477 {
1478 @@ -2111,7 +2300,7 @@ index 9a863c6..174e06e 100644
1479 struct ppp *ppp;
1480 int err = -EFAULT, val, val2, i;
1481 struct ppp_idle idle;
1482 -@@ -577,9 +577,14 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1483 +@@ -585,9 +585,14 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1484 void __user *argp = (void __user *)arg;
1485 int __user *p = argp;
1486
1487 @@ -2129,7 +2318,7 @@ index 9a863c6..174e06e 100644
1488
1489 if (cmd == PPPIOCDETACH) {
1490 /*
1491 -@@ -594,7 +599,6 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1492 +@@ -602,7 +607,6 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1493 * this fd and reopening /dev/ppp.
1494 */
1495 err = -EINVAL;
1496 @@ -2137,7 +2326,7 @@ index 9a863c6..174e06e 100644
1497 if (pf->kind == INTERFACE) {
1498 ppp = PF_TO_PPP(pf);
1499 rtnl_lock();
1500 -@@ -608,15 +612,13 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1501 +@@ -616,15 +620,13 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1502 } else
1503 pr_warn("PPPIOCDETACH file->f_count=%ld\n",
1504 atomic_long_read(&file->f_count));
1505 @@ -2154,7 +2343,7 @@ index 9a863c6..174e06e 100644
1506 pch = PF_TO_CHANNEL(pf);
1507
1508 switch (cmd) {
1509 -@@ -638,17 +640,16 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1510 +@@ -646,17 +648,16 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1511 err = chan->ops->ioctl(chan, cmd, arg);
1512 up_read(&pch->chan_sem);
1513 }
1514 @@ -2175,7 +2364,7 @@ index 9a863c6..174e06e 100644
1515 ppp = PF_TO_PPP(pf);
1516 switch (cmd) {
1517 case PPPIOCSMRU:
1518 -@@ -823,7 +824,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1519 +@@ -831,7 +832,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
1520 default:
1521 err = -ENOTTY;
1522 }
1523 @@ -2186,7 +2375,7 @@ index 9a863c6..174e06e 100644
1524 return err;
1525 }
1526
1527 -@@ -836,7 +840,6 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
1528 +@@ -844,7 +848,6 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
1529 struct ppp_net *pn;
1530 int __user *p = (int __user *)arg;
1531
1532 @@ -2194,7 +2383,7 @@ index 9a863c6..174e06e 100644
1533 switch (cmd) {
1534 case PPPIOCNEWUNIT:
1535 /* Create a new ppp unit */
1536 -@@ -886,7 +889,7 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
1537 +@@ -894,7 +897,7 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
1538 default:
1539 err = -ENOTTY;
1540 }
1541 @@ -2203,7 +2392,7 @@ index 9a863c6..174e06e 100644
1542 return err;
1543 }
1544
1545 -@@ -2290,7 +2293,7 @@ int ppp_register_net_channel(struct net *net, struct ppp_channel *chan)
1546 +@@ -2304,7 +2307,7 @@ int ppp_register_net_channel(struct net *net, struct ppp_channel *chan)
1547
1548 pch->ppp = NULL;
1549 pch->chan = chan;
1550 @@ -2212,7 +2401,7 @@ index 9a863c6..174e06e 100644
1551 chan->ppp = pch;
1552 init_ppp_file(&pch->file, CHANNEL);
1553 pch->file.hdrlen = chan->hdrlen;
1554 -@@ -2387,6 +2390,8 @@ ppp_unregister_channel(struct ppp_channel *chan)
1555 +@@ -2401,6 +2404,8 @@ ppp_unregister_channel(struct ppp_channel *chan)
1556 spin_lock_bh(&pn->all_channels_lock);
1557 list_del(&pch->list);
1558 spin_unlock_bh(&pn->all_channels_lock);
1559 @@ -2221,16 +2410,8 @@ index 9a863c6..174e06e 100644
1560
1561 pch->file.dead = 1;
1562 wake_up_interruptible(&pch->file.rwait);
1563 -@@ -2803,6 +2808,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit,
1564 -
1565 - out2:
1566 - mutex_unlock(&pn->all_ppp_mutex);
1567 -+ rtnl_unlock();
1568 - free_netdev(dev);
1569 - out1:
1570 - *retp = ret;
1571 diff --git a/drivers/net/tun.c b/drivers/net/tun.c
1572 -index f0db770..2d186bd 100644
1573 +index 88bb8cc..81ecc2e 100644
1574 --- a/drivers/net/tun.c
1575 +++ b/drivers/net/tun.c
1576 @@ -621,7 +621,8 @@ static int tun_attach(struct tun_struct *tun, struct file *file, bool skip_filte
1577 @@ -2259,7 +2440,7 @@ index f0db770..2d186bd 100644
1578 break;
1579 }
1580 }
1581 -@@ -1463,6 +1462,8 @@ static void tun_setup(struct net_device *dev)
1582 +@@ -1466,6 +1465,8 @@ static void tun_setup(struct net_device *dev)
1583
1584 dev->ethtool_ops = &tun_ethtool_ops;
1585 dev->destructor = tun_free_netdev;
1586 @@ -2268,7 +2449,7 @@ index f0db770..2d186bd 100644
1587 }
1588
1589 /* Trivial set of netlink ops to allow deleting tun or tap
1590 -@@ -1804,7 +1805,7 @@ static void tun_detach_filter(struct tun_struct *tun, int n)
1591 +@@ -1807,7 +1808,7 @@ static void tun_detach_filter(struct tun_struct *tun, int n)
1592
1593 for (i = 0; i < n; i++) {
1594 tfile = rtnl_dereference(tun->tfiles[i]);
1595 @@ -2277,7 +2458,7 @@ index f0db770..2d186bd 100644
1596 }
1597
1598 tun->filter_attached = false;
1599 -@@ -1817,7 +1818,8 @@ static int tun_attach_filter(struct tun_struct *tun)
1600 +@@ -1820,7 +1821,8 @@ static int tun_attach_filter(struct tun_struct *tun)
1601
1602 for (i = 0; i < tun->numqueues; i++) {
1603 tfile = rtnl_dereference(tun->tfiles[i]);
1604 @@ -2287,54 +2468,11 @@ index f0db770..2d186bd 100644
1605 if (ret) {
1606 tun_detach_filter(tun, i);
1607 return ret;
1608 -diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
1609 -index 3da70bf..7cba2c3 100644
1610 ---- a/drivers/net/usb/cdc_ether.c
1611 -+++ b/drivers/net/usb/cdc_ether.c
1612 -@@ -160,6 +160,12 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
1613 - info->u = header.usb_cdc_union_desc;
1614 - info->header = header.usb_cdc_header_desc;
1615 - info->ether = header.usb_cdc_ether_desc;
1616 -+ if (!info->u) {
1617 -+ if (rndis)
1618 -+ goto skip;
1619 -+ else /* in that case a quirk is mandatory */
1620 -+ goto bad_desc;
1621 -+ }
1622 - /* we need a master/control interface (what we're
1623 - * probed with) and a slave/data interface; union
1624 - * descriptors sort this all out.
1625 -@@ -256,7 +262,7 @@ skip:
1626 - goto bad_desc;
1627 - }
1628 -
1629 -- } else if (!info->header || !info->u || (!rndis && !info->ether)) {
1630 -+ } else if (!info->header || (!rndis && !info->ether)) {
1631 - dev_dbg(&intf->dev, "missing cdc %s%s%sdescriptor\n",
1632 - info->header ? "" : "header ",
1633 - info->u ? "" : "union ",
1634 -diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
1635 -index e8a1144..8c2bb77 100644
1636 ---- a/drivers/net/usb/cdc_ncm.c
1637 -+++ b/drivers/net/usb/cdc_ncm.c
1638 -@@ -794,7 +794,11 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
1639 -
1640 - iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber;
1641 -
1642 -- /* reset data interface */
1643 -+ /* Reset data interface. Some devices will not reset properly
1644 -+ * unless they are configured first. Toggle the altsetting to
1645 -+ * force a reset
1646 -+ */
1647 -+ usb_set_interface(dev->udev, iface_no, data_altsetting);
1648 - temp = usb_set_interface(dev->udev, iface_no, 0);
1649 - if (temp) {
1650 - dev_dbg(&intf->dev, "set interface failed\n");
1651 diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
1652 -index 982e0acd..a34f491 100644
1653 +index a3a4ccf..1232a8c6 100644
1654 --- a/drivers/net/usb/qmi_wwan.c
1655 +++ b/drivers/net/usb/qmi_wwan.c
1656 -@@ -699,6 +699,7 @@ static const struct usb_device_id products[] = {
1657 +@@ -844,6 +844,7 @@ static const struct usb_device_id products[] = {
1658 {QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */
1659 {QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
1660 {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */
1661 @@ -2342,86 +2480,6 @@ index 982e0acd..a34f491 100644
1662 {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
1663 {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
1664 {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
1665 -@@ -718,8 +719,10 @@ static const struct usb_device_id products[] = {
1666 - {QMI_FIXED_INTF(0x1199, 0x9061, 8)}, /* Sierra Wireless Modem */
1667 - {QMI_FIXED_INTF(0x1199, 0x9070, 8)}, /* Sierra Wireless MC74xx/EM74xx */
1668 - {QMI_FIXED_INTF(0x1199, 0x9070, 10)}, /* Sierra Wireless MC74xx/EM74xx */
1669 -- {QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx/EM74xx */
1670 -- {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx/EM74xx */
1671 -+ {QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx */
1672 -+ {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx */
1673 -+ {QMI_FIXED_INTF(0x1199, 0x9079, 8)}, /* Sierra Wireless EM74xx */
1674 -+ {QMI_FIXED_INTF(0x1199, 0x9079, 10)}, /* Sierra Wireless EM74xx */
1675 - {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
1676 - {QMI_FIXED_INTF(0x1bbb, 0x0203, 2)}, /* Alcatel L800MA */
1677 - {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
1678 -diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
1679 -index 0744bf2..c2ea4e5 100644
1680 ---- a/drivers/net/usb/usbnet.c
1681 -+++ b/drivers/net/usb/usbnet.c
1682 -@@ -1766,6 +1766,13 @@ out3:
1683 - if (info->unbind)
1684 - info->unbind (dev, udev);
1685 - out1:
1686 -+ /* subdrivers must undo all they did in bind() if they
1687 -+ * fail it, but we may fail later and a deferred kevent
1688 -+ * may trigger an error resubmitting itself and, worse,
1689 -+ * schedule a timer. So we kill it all just in case.
1690 -+ */
1691 -+ cancel_work_sync(&dev->kevent);
1692 -+ del_timer_sync(&dev->delay);
1693 - free_netdev(net);
1694 - out:
1695 - return status;
1696 -diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
1697 -index 0a242b2..903bda4 100644
1698 ---- a/drivers/net/vrf.c
1699 -+++ b/drivers/net/vrf.c
1700 -@@ -114,20 +114,23 @@ static struct dst_ops vrf_dst_ops = {
1701 - #if IS_ENABLED(CONFIG_IPV6)
1702 - static bool check_ipv6_frame(const struct sk_buff *skb)
1703 - {
1704 -- const struct ipv6hdr *ipv6h = (struct ipv6hdr *)skb->data;
1705 -- size_t hlen = sizeof(*ipv6h);
1706 -+ const struct ipv6hdr *ipv6h;
1707 -+ struct ipv6hdr _ipv6h;
1708 - bool rc = true;
1709 -
1710 -- if (skb->len < hlen)
1711 -+ ipv6h = skb_header_pointer(skb, 0, sizeof(_ipv6h), &_ipv6h);
1712 -+ if (!ipv6h)
1713 - goto out;
1714 -
1715 - if (ipv6h->nexthdr == NEXTHDR_ICMP) {
1716 - const struct icmp6hdr *icmph;
1717 -+ struct icmp6hdr _icmph;
1718 -
1719 -- if (skb->len < hlen + sizeof(*icmph))
1720 -+ icmph = skb_header_pointer(skb, sizeof(_ipv6h),
1721 -+ sizeof(_icmph), &_icmph);
1722 -+ if (!icmph)
1723 - goto out;
1724 -
1725 -- icmph = (struct icmp6hdr *)(skb->data + sizeof(*ipv6h));
1726 - switch (icmph->icmp6_type) {
1727 - case NDISC_ROUTER_SOLICITATION:
1728 - case NDISC_ROUTER_ADVERTISEMENT:
1729 -diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
1730 -index e0fcda4..3c0df70 100644
1731 ---- a/drivers/net/vxlan.c
1732 -+++ b/drivers/net/vxlan.c
1733 -@@ -1306,8 +1306,10 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
1734 - gbp = (struct vxlanhdr_gbp *)vxh;
1735 - md->gbp = ntohs(gbp->policy_id);
1736 -
1737 -- if (tun_dst)
1738 -+ if (tun_dst) {
1739 - tun_dst->u.tun_info.key.tun_flags |= TUNNEL_VXLAN_OPT;
1740 -+ tun_dst->u.tun_info.options_len = sizeof(*md);
1741 -+ }
1742 -
1743 - if (gbp->dont_learn)
1744 - md->gbp |= VXLAN_GBP_DONT_LEARN;
1745 diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
1746 index 44541dbc..69b994f 100644
1747 --- a/drivers/net/wan/farsync.c
1748 @@ -2436,10 +2494,10 @@ index 44541dbc..69b994f 100644
1749 dev->irq = card->irq;
1750
1751 diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
1752 -index cc81482..113a43f 100644
1753 +index 73fb423..a794157 100644
1754 --- a/drivers/net/wireless/ath/ath9k/eeprom.c
1755 +++ b/drivers/net/wireless/ath/ath9k/eeprom.c
1756 -@@ -403,10 +403,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
1757 +@@ -477,10 +477,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
1758
1759 if (match) {
1760 if (AR_SREV_9287(ah)) {
1761 @@ -2451,7 +2509,7 @@ index cc81482..113a43f 100644
1762 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
1763 data_9287[idxL].pwrPdg[i],
1764 data_9287[idxL].vpdPdg[i],
1765 -@@ -416,7 +415,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
1766 +@@ -490,7 +489,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
1767 } else if (eeprom_4k) {
1768 for (i = 0; i < numXpdGains; i++) {
1769 minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
1770 @@ -2460,7 +2518,7 @@ index cc81482..113a43f 100644
1771 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
1772 data_4k[idxL].pwrPdg[i],
1773 data_4k[idxL].vpdPdg[i],
1774 -@@ -426,7 +425,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
1775 +@@ -500,7 +499,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
1776 } else {
1777 for (i = 0; i < numXpdGains; i++) {
1778 minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
1779 @@ -2470,7 +2528,7 @@ index cc81482..113a43f 100644
1780 data_def[idxL].pwrPdg[i],
1781 data_def[idxL].vpdPdg[i],
1782 diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
1783 -index 496b9b6..5f47356 100644
1784 +index 576eb70..cdbab06 100644
1785 --- a/drivers/nvdimm/bus.c
1786 +++ b/drivers/nvdimm/bus.c
1787 @@ -335,7 +335,7 @@ static const struct nd_cmd_desc __nd_cmd_dimm_descs[] = {
1788 @@ -2483,10 +2541,10 @@ index 496b9b6..5f47356 100644
1789 [ND_CMD_SMART_THRESHOLD] = {
1790 .out_num = 2,
1791 diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
1792 -index 71805a1..9d39745 100644
1793 +index ae81a2f..f0b56b3 100644
1794 --- a/drivers/nvdimm/pfn_devs.c
1795 +++ b/drivers/nvdimm/pfn_devs.c
1796 -@@ -275,7 +275,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn)
1797 +@@ -315,7 +315,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn)
1798 } else {
1799 /* from init we validate */
1800 if (memcmp(nd_pfn->uuid, pfn_sb->uuid, 16) != 0)
1801 @@ -2494,7 +2552,7 @@ index 71805a1..9d39745 100644
1802 + return -ENODEV;
1803 }
1804
1805 - /*
1806 + if (nd_pfn->align > nvdimm_namespace_capacity(ndns)) {
1807 diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
1808 index 4c2fa05..944674e 100644
1809 --- a/drivers/pcmcia/db1xxx_ss.c
1810 @@ -2566,10 +2624,10 @@ index a5bb939..1029aa7 100644
1811
1812 imx_pinctrl_desc.name = dev_name(&pdev->dev);
1813 diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
1814 -index eebfae0..f844b4a 100644
1815 +index 3524061..c8969dd 100644
1816 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
1817 +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
1818 -@@ -995,7 +995,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
1819 +@@ -990,7 +990,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
1820 int val;
1821
1822 if (pull)
1823 @@ -2579,7 +2637,7 @@ index eebfae0..f844b4a 100644
1824 seq_printf(s, " gpio-%-3d (%-20.20s) in %s %s",
1825 gpio,
1826 diff --git a/drivers/pinctrl/pinctrl-pistachio.c b/drivers/pinctrl/pinctrl-pistachio.c
1827 -index 85c9046..6b1a47f 100644
1828 +index 856f736..2673cd9 100644
1829 --- a/drivers/pinctrl/pinctrl-pistachio.c
1830 +++ b/drivers/pinctrl/pinctrl-pistachio.c
1831 @@ -469,27 +469,27 @@ static const char * const pistachio_mips_pll_lock_groups[] = {
1832 @@ -2676,7 +2734,7 @@ index 00265f0..8b381d6 100644
1833
1834 static int sun8i_a33_pinctrl_probe(struct platform_device *pdev)
1835 diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
1836 -index dead97d..a4a5b50 100644
1837 +index 7a2465f..884c2b3 100644
1838 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
1839 +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
1840 @@ -578,7 +578,7 @@ static void sunxi_pinctrl_irq_release_resources(struct irq_data *d)
1841 @@ -2808,8 +2866,23 @@ index e248e81..0afce1a 100644
1842 }
1843
1844 static inline u32 sunxi_irq_status_offset(u16 irq)
1845 +diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
1846 +index b1bf42b..1deb6ad 100644
1847 +--- a/drivers/scsi/scsi.c
1848 ++++ b/drivers/scsi/scsi.c
1849 +@@ -784,8 +784,9 @@ void scsi_attach_vpd(struct scsi_device *sdev)
1850 + int pg83_supported = 0;
1851 + unsigned char __rcu *vpd_buf, *orig_vpd_buf = NULL;
1852 +
1853 +- if (sdev->skip_vpd_pages)
1854 ++ if (!scsi_device_supports_vpd(sdev))
1855 + return;
1856 ++
1857 + retry_pg0:
1858 + vpd_buf = kmalloc(vpd_len, GFP_KERNEL);
1859 + if (!vpd_buf)
1860 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
1861 -index cc84ea7..0d7c6e8 100644
1862 +index 5a5457a..974ca5b 100644
1863 --- a/drivers/scsi/sd.c
1864 +++ b/drivers/scsi/sd.c
1865 @@ -1275,18 +1275,19 @@ static int sd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
1866 @@ -2853,10 +2926,27 @@ index cc84ea7..0d7c6e8 100644
1867 blk_queue_physical_block_size(sdp->request_queue,
1868 sdkp->physical_block_size);
1869 sdkp->device->sector_size = sector_size;
1870 -@@ -2812,11 +2805,6 @@ static int sd_try_extended_inquiry(struct scsi_device *sdp)
1871 - return 0;
1872 +@@ -2795,28 +2788,6 @@ static void sd_read_write_same(struct scsi_disk *sdkp, unsigned char *buffer)
1873 + sdkp->ws10 = 1;
1874 }
1875
1876 +-static int sd_try_extended_inquiry(struct scsi_device *sdp)
1877 +-{
1878 +- /* Attempt VPD inquiry if the device blacklist explicitly calls
1879 +- * for it.
1880 +- */
1881 +- if (sdp->try_vpd_pages)
1882 +- return 1;
1883 +- /*
1884 +- * Although VPD inquiries can go to SCSI-2 type devices,
1885 +- * some USB ones crash on receiving them, and the pages
1886 +- * we currently ask for are for SPC-3 and beyond
1887 +- */
1888 +- if (sdp->scsi_level > SCSI_SPC_2 && !sdp->skip_vpd_pages)
1889 +- return 1;
1890 +- return 0;
1891 +-}
1892 +-
1893 -static inline u32 logical_to_sectors(struct scsi_device *sdev, u32 blocks)
1894 -{
1895 - return blocks << (ilog2(sdev->sector_size) - 9);
1896 @@ -2865,7 +2955,16 @@ index cc84ea7..0d7c6e8 100644
1897 /**
1898 * sd_revalidate_disk - called the first time a new disk is seen,
1899 * performs disk spin up, read_capacity, etc.
1900 -@@ -2900,7 +2888,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
1901 +@@ -2856,7 +2827,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
1902 + if (sdkp->media_present) {
1903 + sd_read_capacity(sdkp, buffer);
1904 +
1905 +- if (sd_try_extended_inquiry(sdp)) {
1906 ++ if (scsi_device_supports_vpd(sdp)) {
1907 + sd_read_block_provisioning(sdkp);
1908 + sd_read_block_limits(sdkp);
1909 + sd_read_block_characteristics(sdkp);
1910 +@@ -2900,7 +2871,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
1911 /* Combine with controller limits */
1912 q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q));
1913
1914 @@ -2915,32 +3014,6 @@ index e237e9f..df56021 100644
1915 mutex_lock(&dev->buffer_lock);
1916 ion_buffer_add(dev, buffer);
1917 mutex_unlock(&dev->buffer_lock);
1918 -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
1919 -index 2a27488..84df093 100644
1920 ---- a/drivers/usb/core/hub.c
1921 -+++ b/drivers/usb/core/hub.c
1922 -@@ -5392,6 +5392,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
1923 - }
1924 -
1925 - bos = udev->bos;
1926 -+ udev->bos = NULL;
1927 -
1928 - for (i = 0; i < SET_CONFIG_TRIES; ++i) {
1929 -
1930 -@@ -5484,11 +5485,8 @@ done:
1931 - usb_set_usb2_hardware_lpm(udev, 1);
1932 - usb_unlocked_enable_lpm(udev);
1933 - usb_enable_ltm(udev);
1934 -- /* release the new BOS descriptor allocated by hub_port_init() */
1935 -- if (udev->bos != bos) {
1936 -- usb_release_bos_descriptor(udev);
1937 -- udev->bos = bos;
1938 -- }
1939 -+ usb_release_bos_descriptor(udev);
1940 -+ udev->bos = bos;
1941 - return 0;
1942 -
1943 - re_enumerate:
1944 diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
1945 index c0f5c65..f1893e0 100644
1946 --- a/drivers/usb/renesas_usbhs/fifo.c
1947 @@ -2964,7 +3037,7 @@ index c0f5c65..f1893e0 100644
1948 schedule_work(&pkt->work);
1949
1950 diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
1951 -index 8f7a78e..fa14198 100644
1952 +index 657f967..2510535 100644
1953 --- a/drivers/usb/renesas_usbhs/mod_gadget.c
1954 +++ b/drivers/usb/renesas_usbhs/mod_gadget.c
1955 @@ -158,10 +158,14 @@ static void usbhsg_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
1956 @@ -2984,7 +3057,7 @@ index 8f7a78e..fa14198 100644
1957
1958 static void usbhsg_queue_push(struct usbhsg_uep *uep,
1959 diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
1960 -index ce0cd6e..9baf081 100644
1961 +index c90a7e4..e4ade8d 100644
1962 --- a/drivers/usb/storage/uas.c
1963 +++ b/drivers/usb/storage/uas.c
1964 @@ -2,7 +2,7 @@
1965 @@ -3085,7 +3158,7 @@ index 43576ed..9de988a 100644
1966 f |= US_FL_NOT_LOCKABLE;
1967 break;
1968 diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
1969 -index 8e5cf19..4469202 100644
1970 +index 7760fc1..1f413a2 100644
1971 --- a/drivers/virtio/virtio_pci_modern.c
1972 +++ b/drivers/virtio/virtio_pci_modern.c
1973 @@ -17,6 +17,7 @@
1974 @@ -3162,10 +3235,10 @@ index 524c221..4436778 100644
1975 }
1976
1977 diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
1978 -index 0f09526..5e5db36 100644
1979 +index 098bb8f..9a30ca6 100644
1980 --- a/fs/btrfs/file.c
1981 +++ b/fs/btrfs/file.c
1982 -@@ -1885,7 +1885,7 @@ static int start_ordered_ops(struct inode *inode, loff_t start, loff_t end)
1983 +@@ -1883,7 +1883,7 @@ static int start_ordered_ops(struct inode *inode, loff_t start, loff_t end)
1984 */
1985 int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
1986 {
1987 @@ -3175,10 +3248,10 @@ index 0f09526..5e5db36 100644
1988 struct btrfs_root *root = BTRFS_I(inode)->root;
1989 struct btrfs_trans_handle *trans;
1990 diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
1991 -index 323e12c..0e044d7 100644
1992 +index 978c3a8..849a30a 100644
1993 --- a/fs/btrfs/tree-log.c
1994 +++ b/fs/btrfs/tree-log.c
1995 -@@ -4406,6 +4406,127 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans,
1996 +@@ -4414,6 +4414,127 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans,
1997 return ret;
1998 }
1999
2000 @@ -3306,7 +3379,7 @@ index 323e12c..0e044d7 100644
2001 /* log a single inode in the tree log.
2002 * At least one parent directory for this inode must exist in the tree
2003 * or be logged already.
2004 -@@ -4578,6 +4699,22 @@ again:
2005 +@@ -4586,6 +4707,22 @@ again:
2006 if (min_key.type == BTRFS_INODE_ITEM_KEY)
2007 need_log_inode_item = false;
2008
2009 @@ -3330,10 +3403,10 @@ index 323e12c..0e044d7 100644
2010 if (min_key.type == BTRFS_XATTR_ITEM_KEY) {
2011 if (ins_nr == 0)
2012 diff --git a/fs/dcache.c b/fs/dcache.c
2013 -index 877bcbb..18effa3 100644
2014 +index 2398f9f9..7566b26 100644
2015 --- a/fs/dcache.c
2016 +++ b/fs/dcache.c
2017 -@@ -1666,7 +1666,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
2018 +@@ -1667,7 +1667,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
2019 DCACHE_OP_REVALIDATE |
2020 DCACHE_OP_WEAK_REVALIDATE |
2021 DCACHE_OP_DELETE |
2022 @@ -3343,7 +3416,7 @@ index 877bcbb..18effa3 100644
2023 dentry->d_op = op;
2024 if (!op)
2025 return;
2026 -@@ -1684,6 +1685,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
2027 +@@ -1685,6 +1686,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
2028 dentry->d_flags |= DCACHE_OP_PRUNE;
2029 if (op->d_select_inode)
2030 dentry->d_flags |= DCACHE_OP_SELECT_INODE;
2031 @@ -3352,11 +3425,44 @@ index 877bcbb..18effa3 100644
2032
2033 }
2034 EXPORT_SYMBOL(d_set_d_op);
2035 +diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
2036 +index 38f7562..ecb5439 100644
2037 +--- a/fs/ext4/crypto.c
2038 ++++ b/fs/ext4/crypto.c
2039 +@@ -475,13 +475,16 @@ uint32_t ext4_validate_encryption_key_size(uint32_t mode, uint32_t size)
2040 + */
2041 + static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags)
2042 + {
2043 +- struct inode *dir = d_inode(dentry->d_parent);
2044 +- struct ext4_crypt_info *ci = EXT4_I(dir)->i_crypt_info;
2045 ++ struct dentry *dir;
2046 ++ struct ext4_crypt_info *ci;
2047 + int dir_has_key, cached_with_key;
2048 +
2049 +- if (!ext4_encrypted_inode(dir))
2050 ++ dir = dget_parent(dentry);
2051 ++ if (!ext4_encrypted_inode(d_inode(dir))) {
2052 ++ dput(dir);
2053 + return 0;
2054 +-
2055 ++ }
2056 ++ ci = EXT4_I(d_inode(dir))->i_crypt_info;
2057 + if (ci && ci->ci_keyring_key &&
2058 + (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
2059 + (1 << KEY_FLAG_REVOKED) |
2060 +@@ -491,6 +494,7 @@ static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags)
2061 + /* this should eventually be an flag in d_flags */
2062 + cached_with_key = dentry->d_fsdata != NULL;
2063 + dir_has_key = (ci != NULL);
2064 ++ dput(dir);
2065 +
2066 + /*
2067 + * If the dentry was cached without the key, and it is a
2068 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
2069 -index cc7ca4e..d4156e1 100644
2070 +index 157b458a..b213449 100644
2071 --- a/fs/ext4/ext4.h
2072 +++ b/fs/ext4/ext4.h
2073 -@@ -850,6 +850,29 @@ do { \
2074 +@@ -900,6 +900,29 @@ do { \
2075 #include "extents_status.h"
2076
2077 /*
2078 @@ -3386,8 +3492,43 @@ index cc7ca4e..d4156e1 100644
2079 * fourth extended file system inode data in memory
2080 */
2081 struct ext4_inode_info {
2082 +diff --git a/fs/ext4/file.c b/fs/ext4/file.c
2083 +index 4cd318f..38847f3 100644
2084 +--- a/fs/ext4/file.c
2085 ++++ b/fs/ext4/file.c
2086 +@@ -335,7 +335,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
2087 + struct super_block *sb = inode->i_sb;
2088 + struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
2089 + struct vfsmount *mnt = filp->f_path.mnt;
2090 +- struct inode *dir = filp->f_path.dentry->d_parent->d_inode;
2091 ++ struct dentry *dir;
2092 + struct path path;
2093 + char buf[64], *cp;
2094 + int ret;
2095 +@@ -379,14 +379,18 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
2096 + if (ext4_encryption_info(inode) == NULL)
2097 + return -ENOKEY;
2098 + }
2099 +- if (ext4_encrypted_inode(dir) &&
2100 +- !ext4_is_child_context_consistent_with_parent(dir, inode)) {
2101 ++
2102 ++ dir = dget_parent(file_dentry(filp));
2103 ++ if (ext4_encrypted_inode(d_inode(dir)) &&
2104 ++ !ext4_is_child_context_consistent_with_parent(d_inode(dir), inode)) {
2105 + ext4_warning(inode->i_sb,
2106 + "Inconsistent encryption contexts: %lu/%lu\n",
2107 +- (unsigned long) dir->i_ino,
2108 ++ (unsigned long) d_inode(dir)->i_ino,
2109 + (unsigned long) inode->i_ino);
2110 ++ dput(dir);
2111 + return -EPERM;
2112 + }
2113 ++ dput(dir);
2114 + /*
2115 + * Set up the jbd2_inode if we are opening the inode for
2116 + * writing and the journal is present
2117 diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
2118 -index e032a04..9bdbf98 100644
2119 +index 4098acc..796ff0e 100644
2120 --- a/fs/ext4/move_extent.c
2121 +++ b/fs/ext4/move_extent.c
2122 @@ -60,10 +60,10 @@ ext4_double_down_write_data_sem(struct inode *first, struct inode *second)
2123 @@ -3403,7 +3544,7 @@ index e032a04..9bdbf98 100644
2124
2125 }
2126 }
2127 -@@ -483,6 +483,13 @@ mext_check_arguments(struct inode *orig_inode,
2128 +@@ -484,6 +484,13 @@ mext_check_arguments(struct inode *orig_inode,
2129 return -EBUSY;
2130 }
2131
2132 @@ -3418,10 +3559,10 @@ index e032a04..9bdbf98 100644
2133 if (!(ext4_test_inode_flag(orig_inode, EXT4_INODE_EXTENTS))) {
2134 ext4_debug("ext4 move extent: orig file is not extents "
2135 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
2136 -index c9ab67d..ba1cf0b 100644
2137 +index 3ed01ec..a76ca67 100644
2138 --- a/fs/ext4/super.c
2139 +++ b/fs/ext4/super.c
2140 -@@ -1292,9 +1292,9 @@ static int set_qf_name(struct super_block *sb, int qtype, substring_t *args)
2141 +@@ -1324,9 +1324,9 @@ static int set_qf_name(struct super_block *sb, int qtype, substring_t *args)
2142 return -1;
2143 }
2144 if (ext4_has_feature_quota(sb)) {
2145 @@ -3434,7 +3575,7 @@ index c9ab67d..ba1cf0b 100644
2146 }
2147 qname = match_strdup(args);
2148 if (!qname) {
2149 -@@ -1657,10 +1657,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
2150 +@@ -1689,10 +1689,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
2151 return -1;
2152 }
2153 if (ext4_has_feature_quota(sb)) {
2154 @@ -3448,7 +3589,7 @@ index c9ab67d..ba1cf0b 100644
2155 }
2156 sbi->s_jquota_fmt = m->mount_opt;
2157 #endif
2158 -@@ -1721,11 +1721,11 @@ static int parse_options(char *options, struct super_block *sb,
2159 +@@ -1753,11 +1753,11 @@ static int parse_options(char *options, struct super_block *sb,
2160 #ifdef CONFIG_QUOTA
2161 if (ext4_has_feature_quota(sb) &&
2162 (test_opt(sb, USRQUOTA) || test_opt(sb, GRPQUOTA))) {
2163 @@ -3465,7 +3606,7 @@ index c9ab67d..ba1cf0b 100644
2164 if (test_opt(sb, USRQUOTA) && sbi->s_qf_names[USRQUOTA])
2165 clear_opt(sb, USRQUOTA);
2166
2167 -@@ -4936,6 +4936,20 @@ static int ext4_quota_on_mount(struct super_block *sb, int type)
2168 +@@ -5021,6 +5021,20 @@ static int ext4_quota_on_mount(struct super_block *sb, int type)
2169 EXT4_SB(sb)->s_jquota_fmt, type);
2170 }
2171
2172 @@ -3486,7 +3627,7 @@ index c9ab67d..ba1cf0b 100644
2173 /*
2174 * Standard function to be called on quota_on
2175 */
2176 -@@ -4975,8 +4989,12 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
2177 +@@ -5060,8 +5074,12 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
2178 if (err)
2179 return err;
2180 }
2181 @@ -3501,7 +3642,7 @@ index c9ab67d..ba1cf0b 100644
2182 }
2183
2184 static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
2185 -@@ -5002,8 +5020,11 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
2186 +@@ -5088,8 +5106,11 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
2187
2188 /* Don't account quota for quota files to avoid recursion */
2189 qf_inode->i_flags |= S_NOQUOTA;
2190 @@ -3514,7 +3655,7 @@ index c9ab67d..ba1cf0b 100644
2191 return err;
2192 }
2193 diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
2194 -index ce5a218..5fc2162 100644
2195 +index 9cce670..7ded177 100644
2196 --- a/fs/nfs/dir.c
2197 +++ b/fs/nfs/dir.c
2198 @@ -377,7 +377,7 @@ int nfs_readdir_xdr_filler(struct page **pages, nfs_readdir_descriptor_t *desc,
2199 @@ -3545,10 +3686,10 @@ index ce5a218..5fc2162 100644
2200 nfs_readdir_descriptor_t my_desc,
2201 *desc = &my_desc;
2202 diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
2203 -index 3e2071a..f714b98 100644
2204 +index 86faecf..847b678 100644
2205 --- a/fs/nfs/inode.c
2206 +++ b/fs/nfs/inode.c
2207 -@@ -927,7 +927,7 @@ int nfs_open(struct inode *inode, struct file *filp)
2208 +@@ -940,7 +940,7 @@ int nfs_open(struct inode *inode, struct file *filp)
2209 {
2210 struct nfs_open_context *ctx;
2211
2212 @@ -3558,7 +3699,7 @@ index 3e2071a..f714b98 100644
2213 return PTR_ERR(ctx);
2214 nfs_file_set_open_context(filp, ctx);
2215 diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
2216 -index db9b5fe..679e003 100644
2217 +index 57ca1c8..2a9ff14 100644
2218 --- a/fs/nfs/nfs4file.c
2219 +++ b/fs/nfs/nfs4file.c
2220 @@ -26,7 +26,7 @@ static int
2221 @@ -3580,10 +3721,10 @@ index db9b5fe..679e003 100644
2222 if (IS_ERR(ctx))
2223 goto out;
2224 diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
2225 -index 000b2ed..a1acc60 100644
2226 +index 619ad4b..4399ea8 100644
2227 --- a/fs/overlayfs/super.c
2228 +++ b/fs/overlayfs/super.c
2229 -@@ -276,6 +276,37 @@ static void ovl_dentry_release(struct dentry *dentry)
2230 +@@ -295,6 +295,37 @@ static void ovl_dentry_release(struct dentry *dentry)
2231 }
2232 }
2233
2234 @@ -3621,7 +3762,7 @@ index 000b2ed..a1acc60 100644
2235 static int ovl_dentry_revalidate(struct dentry *dentry, unsigned int flags)
2236 {
2237 struct ovl_entry *oe = dentry->d_fsdata;
2238 -@@ -320,11 +351,13 @@ static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags)
2239 +@@ -339,11 +370,13 @@ static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags)
2240 static const struct dentry_operations ovl_dentry_operations = {
2241 .d_release = ovl_dentry_release,
2242 .d_select_inode = ovl_d_select_inode,
2243 @@ -3649,7 +3790,7 @@ index 22ab246..eeae401 100644
2244 #endif /* GCC_VERSION >= 40500 */
2245
2246 diff --git a/include/linux/dcache.h b/include/linux/dcache.h
2247 -index 8a2e009..f513dd8 100644
2248 +index c4b5f4b..03dda7b 100644
2249 --- a/include/linux/dcache.h
2250 +++ b/include/linux/dcache.h
2251 @@ -161,6 +161,7 @@ struct dentry_operations {
2252 @@ -3682,16 +3823,18 @@ index 8a2e009..f513dd8 100644
2253 +
2254 #endif /* __LINUX_DCACHE_H */
2255 diff --git a/include/linux/filter.h b/include/linux/filter.h
2256 -index 5972ffe..5110d42 100644
2257 +index 43aa1f8..a51a536 100644
2258 --- a/include/linux/filter.h
2259 +++ b/include/linux/filter.h
2260 -@@ -446,8 +446,12 @@ int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
2261 +@@ -465,10 +465,14 @@ int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
2262 void bpf_prog_destroy(struct bpf_prog *fp);
2263
2264 int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
2265 +int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk,
2266 + bool locked);
2267 int sk_attach_bpf(u32 ufd, struct sock *sk);
2268 + int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk);
2269 + int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk);
2270 int sk_detach_filter(struct sock *sk);
2271 +int __sk_detach_filter(struct sock *sk, bool locked);
2272 +
2273 @@ -3699,10 +3842,10 @@ index 5972ffe..5110d42 100644
2274 unsigned int len);
2275
2276 diff --git a/include/linux/fs.h b/include/linux/fs.h
2277 -index 22c5a0c..ab3d8d9 100644
2278 +index 2c7f8d9..83c77b0 100644
2279 --- a/include/linux/fs.h
2280 +++ b/include/linux/fs.h
2281 -@@ -1207,6 +1207,16 @@ static inline struct inode *file_inode(const struct file *f)
2282 +@@ -1234,6 +1234,16 @@ static inline struct inode *file_inode(const struct file *f)
2283 return f->f_inode;
2284 }
2285
2286 @@ -3735,10 +3878,10 @@ index a338a688..dcb89e3 100644
2287
2288 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
2289 diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
2290 -index 3143c84..04c068e 100644
2291 +index 5440b7b..6d1d8f4 100644
2292 --- a/include/linux/netdevice.h
2293 +++ b/include/linux/netdevice.h
2294 -@@ -265,6 +265,7 @@ struct header_ops {
2295 +@@ -267,6 +267,7 @@ struct header_ops {
2296 void (*cache_update)(struct hh_cache *hh,
2297 const struct net_device *dev,
2298 const unsigned char *haddr);
2299 @@ -3746,7 +3889,7 @@ index 3143c84..04c068e 100644
2300 };
2301
2302 /* These flag bits are private to the generic network queueing
2303 -@@ -1398,8 +1399,7 @@ enum netdev_priv_flags {
2304 +@@ -1420,8 +1421,7 @@ enum netdev_priv_flags {
2305 * @dma: DMA channel
2306 * @mtu: Interface MTU value
2307 * @type: Interface hardware type
2308 @@ -3756,7 +3899,7 @@ index 3143c84..04c068e 100644
2309 *
2310 * @needed_headroom: Extra headroom the hardware may need, but not in all
2311 * cases can this be guaranteed
2312 -@@ -2493,6 +2493,24 @@ static inline int dev_parse_header(const struct sk_buff *skb,
2313 +@@ -2627,6 +2627,24 @@ static inline int dev_parse_header(const struct sk_buff *skb,
2314 return dev->header_ops->parse(skb, haddr);
2315 }
2316
2317 @@ -3781,93 +3924,6 @@ index 3143c84..04c068e 100644
2318 typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
2319 int register_gifconf(unsigned int family, gifconf_func_t *gifconf);
2320 static inline int unregister_gifconf(unsigned int family)
2321 -diff --git a/include/linux/pci.h b/include/linux/pci.h
2322 -index 4e554bf..e89c7ee 100644
2323 ---- a/include/linux/pci.h
2324 -+++ b/include/linux/pci.h
2325 -@@ -989,23 +989,6 @@ static inline int pci_is_managed(struct pci_dev *pdev)
2326 - return pdev->is_managed;
2327 - }
2328 -
2329 --static inline void pci_set_managed_irq(struct pci_dev *pdev, unsigned int irq)
2330 --{
2331 -- pdev->irq = irq;
2332 -- pdev->irq_managed = 1;
2333 --}
2334 --
2335 --static inline void pci_reset_managed_irq(struct pci_dev *pdev)
2336 --{
2337 -- pdev->irq = 0;
2338 -- pdev->irq_managed = 0;
2339 --}
2340 --
2341 --static inline bool pci_has_managed_irq(struct pci_dev *pdev)
2342 --{
2343 -- return pdev->irq_managed && pdev->irq > 0;
2344 --}
2345 --
2346 - void pci_disable_device(struct pci_dev *dev);
2347 -
2348 - extern unsigned int pcibios_max_latency;
2349 -diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
2350 -index 75f136a..4fde618 100644
2351 ---- a/include/linux/skbuff.h
2352 -+++ b/include/linux/skbuff.h
2353 -@@ -1908,6 +1908,30 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
2354 - skb->tail += len;
2355 - }
2356 -
2357 -+/**
2358 -+ * skb_tailroom_reserve - adjust reserved_tailroom
2359 -+ * @skb: buffer to alter
2360 -+ * @mtu: maximum amount of headlen permitted
2361 -+ * @needed_tailroom: minimum amount of reserved_tailroom
2362 -+ *
2363 -+ * Set reserved_tailroom so that headlen can be as large as possible but
2364 -+ * not larger than mtu and tailroom cannot be smaller than
2365 -+ * needed_tailroom.
2366 -+ * The required headroom should already have been reserved before using
2367 -+ * this function.
2368 -+ */
2369 -+static inline void skb_tailroom_reserve(struct sk_buff *skb, unsigned int mtu,
2370 -+ unsigned int needed_tailroom)
2371 -+{
2372 -+ SKB_LINEAR_ASSERT(skb);
2373 -+ if (mtu < skb_tailroom(skb) - needed_tailroom)
2374 -+ /* use at most mtu */
2375 -+ skb->reserved_tailroom = skb_tailroom(skb) - mtu;
2376 -+ else
2377 -+ /* use up to all available space */
2378 -+ skb->reserved_tailroom = needed_tailroom;
2379 -+}
2380 -+
2381 - #define ENCAP_TYPE_ETHER 0
2382 - #define ENCAP_TYPE_IPPROTO 1
2383 -
2384 -@@ -2724,6 +2748,23 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb,
2385 -
2386 - unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
2387 -
2388 -+static inline void skb_postpush_rcsum(struct sk_buff *skb,
2389 -+ const void *start, unsigned int len)
2390 -+{
2391 -+ /* For performing the reverse operation to skb_postpull_rcsum(),
2392 -+ * we can instead of ...
2393 -+ *
2394 -+ * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
2395 -+ *
2396 -+ * ... just use this equivalent version here to save a few
2397 -+ * instructions. Feeding csum of 0 in csum_partial() and later
2398 -+ * on adding skb->csum is equivalent to feed skb->csum in the
2399 -+ * first place.
2400 -+ */
2401 -+ if (skb->ip_summed == CHECKSUM_COMPLETE)
2402 -+ skb->csum = csum_partial(start, len, skb->csum);
2403 -+}
2404 -+
2405 - /**
2406 - * pskb_trim_rcsum - trim received skb and update checksum
2407 - * @skb: buffer to trim
2408 diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
2409 index 7f5f78b..245f57d 100644
2410 --- a/include/linux/usb_usual.h
2411 @@ -3882,10 +3938,10 @@ index 7f5f78b..245f57d 100644
2412 #define US_FLAG(name, value) US_FL_##name = value ,
2413 enum { US_DO_ALL_FLAGS };
2414 diff --git a/include/net/bonding.h b/include/net/bonding.h
2415 -index c1740a2..93abe5f 100644
2416 +index ee6c520..791800d 100644
2417 --- a/include/net/bonding.h
2418 +++ b/include/net/bonding.h
2419 -@@ -214,6 +214,7 @@ struct bonding {
2420 +@@ -215,6 +215,7 @@ struct bonding {
2421 * ALB mode (6) - to sync the use and modifications of its hash table
2422 */
2423 spinlock_t mode_lock;
2424 @@ -3893,6 +3949,42 @@ index c1740a2..93abe5f 100644
2425 u8 send_peer_notif;
2426 u8 igmp_retrans;
2427 #ifdef CONFIG_PROC_FS
2428 +diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
2429 +index f63a167..ba93c0f 100644
2430 +--- a/include/scsi/scsi_device.h
2431 ++++ b/include/scsi/scsi_device.h
2432 +@@ -513,6 +513,31 @@ static inline int scsi_device_tpgs(struct scsi_device *sdev)
2433 + return sdev->inquiry ? (sdev->inquiry[5] >> 4) & 0x3 : 0;
2434 + }
2435 +
2436 ++/**
2437 ++ * scsi_device_supports_vpd - test if a device supports VPD pages
2438 ++ * @sdev: the &struct scsi_device to test
2439 ++ *
2440 ++ * If the 'try_vpd_pages' flag is set it takes precedence.
2441 ++ * Otherwise we will assume VPD pages are supported if the
2442 ++ * SCSI level is at least SPC-3 and 'skip_vpd_pages' is not set.
2443 ++ */
2444 ++static inline int scsi_device_supports_vpd(struct scsi_device *sdev)
2445 ++{
2446 ++ /* Attempt VPD inquiry if the device blacklist explicitly calls
2447 ++ * for it.
2448 ++ */
2449 ++ if (sdev->try_vpd_pages)
2450 ++ return 1;
2451 ++ /*
2452 ++ * Although VPD inquiries can go to SCSI-2 type devices,
2453 ++ * some USB ones crash on receiving them, and the pages
2454 ++ * we currently ask for are for SPC-3 and beyond
2455 ++ */
2456 ++ if (sdev->scsi_level > SCSI_SPC_2 && !sdev->skip_vpd_pages)
2457 ++ return 1;
2458 ++ return 0;
2459 ++}
2460 ++
2461 + #define MODULE_ALIAS_SCSI_DEVICE(type) \
2462 + MODULE_ALIAS("scsi:t-" __stringify(type) "*")
2463 + #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x"
2464 diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
2465 index 4504ca6..50da680 100644
2466 --- a/kernel/bpf/helpers.c
2467 @@ -3906,47 +3998,11 @@ index 4504ca6..50da680 100644
2468 return 0;
2469 }
2470
2471 -diff --git a/kernel/events/core.c b/kernel/events/core.c
2472 -index faf2067..1e889a0 100644
2473 ---- a/kernel/events/core.c
2474 -+++ b/kernel/events/core.c
2475 -@@ -1580,14 +1580,14 @@ event_sched_out(struct perf_event *event,
2476 -
2477 - perf_pmu_disable(event->pmu);
2478 -
2479 -+ event->tstamp_stopped = tstamp;
2480 -+ event->pmu->del(event, 0);
2481 -+ event->oncpu = -1;
2482 - event->state = PERF_EVENT_STATE_INACTIVE;
2483 - if (event->pending_disable) {
2484 - event->pending_disable = 0;
2485 - event->state = PERF_EVENT_STATE_OFF;
2486 - }
2487 -- event->tstamp_stopped = tstamp;
2488 -- event->pmu->del(event, 0);
2489 -- event->oncpu = -1;
2490 -
2491 - if (!is_software_event(event))
2492 - cpuctx->active_oncpu--;
2493 -@@ -8583,7 +8583,12 @@ err_context:
2494 - perf_unpin_context(ctx);
2495 - put_ctx(ctx);
2496 - err_alloc:
2497 -- free_event(event);
2498 -+ /*
2499 -+ * If event_file is set, the fput() above will have called ->release()
2500 -+ * and that will take care of freeing the event.
2501 -+ */
2502 -+ if (!event_file)
2503 -+ free_event(event);
2504 - err_cpus:
2505 - put_online_cpus();
2506 - err_task:
2507 diff --git a/mm/page_isolation.c b/mm/page_isolation.c
2508 -index 4568fd5..00c9646 100644
2509 +index 92c4c36..31555b6 100644
2510 --- a/mm/page_isolation.c
2511 +++ b/mm/page_isolation.c
2512 -@@ -283,11 +283,11 @@ struct page *alloc_migrate_target(struct page *page, unsigned long private,
2513 +@@ -289,11 +289,11 @@ struct page *alloc_migrate_target(struct page *page, unsigned long private,
2514 * now as a simple work-around, we use the next node for destination.
2515 */
2516 if (PageHuge(page)) {
2517 @@ -3991,10 +4047,10 @@ index b563a3f..2fa3be9 100644
2518
2519 EXPORT_SYMBOL(ax25_header_ops);
2520 diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
2521 -index 5f3f645..eff69cb 100644
2522 +index b3cca12..e2670c5 100644
2523 --- a/net/bridge/br_stp.c
2524 +++ b/net/bridge/br_stp.c
2525 -@@ -567,6 +567,14 @@ int br_set_max_age(struct net_bridge *br, unsigned long val)
2526 +@@ -568,6 +568,14 @@ int br_set_max_age(struct net_bridge *br, unsigned long val)
2527
2528 }
2529
2530 @@ -4009,7 +4065,7 @@ index 5f3f645..eff69cb 100644
2531 int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
2532 {
2533 struct switchdev_attr attr = {
2534 -@@ -577,11 +585,8 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
2535 +@@ -579,11 +587,8 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
2536 unsigned long t = clock_t_to_jiffies(ageing_time);
2537 int err;
2538
2539 @@ -4023,10 +4079,10 @@ index 5f3f645..eff69cb 100644
2540
2541 br->ageing_time = t;
2542 diff --git a/net/core/filter.c b/net/core/filter.c
2543 -index 37157c4..f393a22 100644
2544 +index bba502f..fb2951c 100644
2545 --- a/net/core/filter.c
2546 +++ b/net/core/filter.c
2547 -@@ -1139,7 +1139,8 @@ void bpf_prog_destroy(struct bpf_prog *fp)
2548 +@@ -1147,7 +1147,8 @@ void bpf_prog_destroy(struct bpf_prog *fp)
2549 }
2550 EXPORT_SYMBOL_GPL(bpf_prog_destroy);
2551
2552 @@ -4036,7 +4092,7 @@ index 37157c4..f393a22 100644
2553 {
2554 struct sk_filter *fp, *old_fp;
2555
2556 -@@ -1155,10 +1156,8 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
2557 +@@ -1163,10 +1164,8 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
2558 return -ENOMEM;
2559 }
2560
2561 @@ -4048,7 +4104,7 @@ index 37157c4..f393a22 100644
2562 if (old_fp)
2563 sk_filter_uncharge(sk, old_fp);
2564
2565 -@@ -1175,7 +1174,8 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
2566 +@@ -1245,7 +1244,8 @@ struct bpf_prog *__get_filter(struct sock_fprog *fprog, struct sock *sk)
2567 * occurs or there is insufficient memory for the filter a negative
2568 * errno code is returned. On success the return is zero.
2569 */
2570 @@ -4056,9 +4112,9 @@ index 37157c4..f393a22 100644
2571 +int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk,
2572 + bool locked)
2573 {
2574 - unsigned int fsize = bpf_classic_proglen(fprog);
2575 - unsigned int bpf_fsize = bpf_prog_size(fprog->len);
2576 -@@ -1213,7 +1213,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
2577 + struct bpf_prog *prog = __get_filter(fprog, sk);
2578 + int err;
2579 +@@ -1253,7 +1253,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
2580 if (IS_ERR(prog))
2581 return PTR_ERR(prog);
2582
2583 @@ -4067,7 +4123,7 @@ index 37157c4..f393a22 100644
2584 if (err < 0) {
2585 __bpf_prog_release(prog);
2586 return err;
2587 -@@ -1221,7 +1221,12 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
2588 +@@ -1261,7 +1261,12 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
2589
2590 return 0;
2591 }
2592 @@ -4079,18 +4135,18 @@ index 37157c4..f393a22 100644
2593 + return __sk_attach_filter(fprog, sk, sock_owned_by_user(sk));
2594 +}
2595
2596 - int sk_attach_bpf(u32 ufd, struct sock *sk)
2597 + int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk)
2598 {
2599 -@@ -1240,7 +1245,7 @@ int sk_attach_bpf(u32 ufd, struct sock *sk)
2600 - return -EINVAL;
2601 - }
2602 +@@ -1307,7 +1312,7 @@ int sk_attach_bpf(u32 ufd, struct sock *sk)
2603 + if (IS_ERR(prog))
2604 + return PTR_ERR(prog);
2605
2606 - err = __sk_attach_prog(prog, sk);
2607 + err = __sk_attach_prog(prog, sk, sock_owned_by_user(sk));
2608 if (err < 0) {
2609 bpf_prog_put(prog);
2610 return err;
2611 -@@ -1913,7 +1918,7 @@ static int __init register_sk_filter_ops(void)
2612 +@@ -2105,7 +2110,7 @@ static int __init register_sk_filter_ops(void)
2613 }
2614 late_initcall(register_sk_filter_ops);
2615
2616 @@ -4099,7 +4155,7 @@ index 37157c4..f393a22 100644
2617 {
2618 int ret = -ENOENT;
2619 struct sk_filter *filter;
2620 -@@ -1921,8 +1926,7 @@ int sk_detach_filter(struct sock *sk)
2621 +@@ -2113,8 +2118,7 @@ int sk_detach_filter(struct sock *sk)
2622 if (sock_flag(sk, SOCK_FILTER_LOCKED))
2623 return -EPERM;
2624
2625 @@ -4109,7 +4165,7 @@ index 37157c4..f393a22 100644
2626 if (filter) {
2627 RCU_INIT_POINTER(sk->sk_filter, NULL);
2628 sk_filter_uncharge(sk, filter);
2629 -@@ -1931,7 +1935,12 @@ int sk_detach_filter(struct sock *sk)
2630 +@@ -2123,7 +2127,12 @@ int sk_detach_filter(struct sock *sk)
2631
2632 return ret;
2633 }
2634 @@ -4124,7 +4180,7 @@ index 37157c4..f393a22 100644
2635 int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf,
2636 unsigned int len)
2637 diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
2638 -index 34ba7a0..ca966f7 100644
2639 +index 8261d95..215e613 100644
2640 --- a/net/core/rtnetlink.c
2641 +++ b/net/core/rtnetlink.c
2642 @@ -905,6 +905,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
2643 @@ -4135,47 +4191,6 @@ index 34ba7a0..ca966f7 100644
2644 + nla_total_size(1); /* IFLA_PROTO_DOWN */
2645
2646 }
2647 -diff --git a/net/core/skbuff.c b/net/core/skbuff.c
2648 -index 5bf88f5..8616d11 100644
2649 ---- a/net/core/skbuff.c
2650 -+++ b/net/core/skbuff.c
2651 -@@ -2948,6 +2948,24 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page,
2652 - EXPORT_SYMBOL_GPL(skb_append_pagefrags);
2653 -
2654 - /**
2655 -+ * skb_push_rcsum - push skb and update receive checksum
2656 -+ * @skb: buffer to update
2657 -+ * @len: length of data pulled
2658 -+ *
2659 -+ * This function performs an skb_push on the packet and updates
2660 -+ * the CHECKSUM_COMPLETE checksum. It should be used on
2661 -+ * receive path processing instead of skb_push unless you know
2662 -+ * that the checksum difference is zero (e.g., a valid IP header)
2663 -+ * or you are setting ip_summed to CHECKSUM_NONE.
2664 -+ */
2665 -+static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)
2666 -+{
2667 -+ skb_push(skb, len);
2668 -+ skb_postpush_rcsum(skb, skb->data, len);
2669 -+ return skb->data;
2670 -+}
2671 -+
2672 -+/**
2673 - * skb_pull_rcsum - pull skb and update receive checksum
2674 - * @skb: buffer to update
2675 - * @len: length of data pulled
2676 -@@ -4084,9 +4102,9 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
2677 - if (!pskb_may_pull(skb_chk, offset))
2678 - goto err;
2679 -
2680 -- __skb_pull(skb_chk, offset);
2681 -+ skb_pull_rcsum(skb_chk, offset);
2682 - ret = skb_chkf(skb_chk);
2683 -- __skb_push(skb_chk, offset);
2684 -+ skb_push_rcsum(skb_chk, offset);
2685 -
2686 - if (ret)
2687 - goto err;
2688 diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
2689 index 902d606..8be8f27 100644
2690 --- a/net/dccp/ipv4.c
2691 @@ -4189,6 +4204,40 @@ index 902d606..8be8f27 100644
2692 if (!between48(seq, dccp_rsk(req)->dreq_iss, dccp_rsk(req)->dreq_gss)) {
2693 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
2694 } else {
2695 +diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
2696 +index fa4daba..d8fb47f 100644
2697 +--- a/net/dsa/dsa.c
2698 ++++ b/net/dsa/dsa.c
2699 +@@ -935,6 +935,14 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
2700 + {
2701 + int i;
2702 +
2703 ++ dst->master_netdev->dsa_ptr = NULL;
2704 ++
2705 ++ /* If we used a tagging format that doesn't have an ethertype
2706 ++ * field, make sure that all packets from this point get sent
2707 ++ * without the tag and go through the regular receive path.
2708 ++ */
2709 ++ wmb();
2710 ++
2711 + for (i = 0; i < dst->pd->nr_chips; i++) {
2712 + struct dsa_switch *ds = dst->ds[i];
2713 +
2714 +@@ -988,14 +996,6 @@ static int dsa_suspend(struct device *d)
2715 + struct dsa_switch_tree *dst = platform_get_drvdata(pdev);
2716 + int i, ret = 0;
2717 +
2718 +- dst->master_netdev->dsa_ptr = NULL;
2719 +-
2720 +- /* If we used a tagging format that doesn't have an ethertype
2721 +- * field, make sure that all packets from this point get sent
2722 +- * without the tag and go through the regular receive path.
2723 +- */
2724 +- wmb();
2725 +-
2726 + for (i = 0; i < dst->pd->nr_chips; i++) {
2727 + struct dsa_switch *ds = dst->ds[i];
2728 +
2729 diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
2730 index f6303b1..0212591 100644
2731 --- a/net/ipv4/devinet.c
2732 @@ -4263,64 +4312,6 @@ index 4734475..8a9246d 100644
2733 if (!(ok & BRD_OK))
2734 fib_magic(RTM_DELROUTE, RTN_BROADCAST, ifa->ifa_broadcast, 32, prim);
2735 if (subnet && ifa->ifa_prefixlen < 31) {
2736 -diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
2737 -index 05e4cba..b3086cf 100644
2738 ---- a/net/ipv4/igmp.c
2739 -+++ b/net/ipv4/igmp.c
2740 -@@ -356,9 +356,8 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, unsigned int mtu)
2741 - skb_dst_set(skb, &rt->dst);
2742 - skb->dev = dev;
2743 -
2744 -- skb->reserved_tailroom = skb_end_offset(skb) -
2745 -- min(mtu, skb_end_offset(skb));
2746 - skb_reserve(skb, hlen);
2747 -+ skb_tailroom_reserve(skb, mtu, tlen);
2748 -
2749 - skb_reset_network_header(skb);
2750 - pip = ip_hdr(skb);
2751 -diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
2752 -index 49f0285..f2ad521 100644
2753 ---- a/net/ipv4/ip_output.c
2754 -+++ b/net/ipv4/ip_output.c
2755 -@@ -1237,13 +1237,16 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
2756 - if (!skb)
2757 - return -EINVAL;
2758 -
2759 -- cork->length += size;
2760 - if ((size + skb->len > mtu) &&
2761 - (sk->sk_protocol == IPPROTO_UDP) &&
2762 - (rt->dst.dev->features & NETIF_F_UFO)) {
2763 -+ if (skb->ip_summed != CHECKSUM_PARTIAL)
2764 -+ return -EOPNOTSUPP;
2765 -+
2766 - skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
2767 - skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
2768 - }
2769 -+ cork->length += size;
2770 -
2771 - while (size > 0) {
2772 - if (skb_is_gso(skb)) {
2773 -diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
2774 -index cbb51f3..ce30c8b 100644
2775 ---- a/net/ipv4/ip_tunnel.c
2776 -+++ b/net/ipv4/ip_tunnel.c
2777 -@@ -663,6 +663,8 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
2778 - inner_iph = (const struct iphdr *)skb_inner_network_header(skb);
2779 - connected = (tunnel->parms.iph.daddr != 0);
2780 -
2781 -+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
2782 -+
2783 - dst = tnl_params->daddr;
2784 - if (dst == 0) {
2785 - /* NBMA tunnel */
2786 -@@ -760,7 +762,6 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
2787 - tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
2788 - tunnel->err_count--;
2789 -
2790 -- memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
2791 - dst_link_failure(skb);
2792 - } else
2793 - tunnel->err_count = 0;
2794 diff --git a/net/ipv4/netfilter/nf_nat_masquerade_ipv4.c b/net/ipv4/netfilter/nf_nat_masquerade_ipv4.c
2795 index c6eb421..ea91058 100644
2796 --- a/net/ipv4/netfilter/nf_nat_masquerade_ipv4.c
2797 @@ -4347,10 +4338,10 @@ index c6eb421..ea91058 100644
2798 }
2799
2800 diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
2801 -index 8c7e631..048418b 100644
2802 +index 487ac67..a7b1a90 100644
2803 --- a/net/ipv4/tcp_ipv4.c
2804 +++ b/net/ipv4/tcp_ipv4.c
2805 -@@ -320,8 +320,6 @@ void tcp_req_err(struct sock *sk, u32 seq, bool abort)
2806 +@@ -319,8 +319,6 @@ void tcp_req_err(struct sock *sk, u32 seq, bool abort)
2807 /* ICMPs are not backlogged, hence we cannot get
2808 * an established socket here.
2809 */
2810 @@ -4359,45 +4350,11 @@ index 8c7e631..048418b 100644
2811 if (seq != tcp_rsk(req)->snt_isn) {
2812 NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
2813 } else if (abort) {
2814 -diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
2815 -index c8cbc2b..a726d78 100644
2816 ---- a/net/ipv4/tcp_metrics.c
2817 -+++ b/net/ipv4/tcp_metrics.c
2818 -@@ -550,7 +550,7 @@ reset:
2819 - */
2820 - if (crtt > tp->srtt_us) {
2821 - /* Set RTO like tcp_rtt_estimator(), but from cached RTT. */
2822 -- crtt /= 8 * USEC_PER_MSEC;
2823 -+ crtt /= 8 * USEC_PER_SEC / HZ;
2824 - inet_csk(sk)->icsk_rto = crtt + max(2 * crtt, tcp_rto_min(sk));
2825 - } else if (tp->srtt_us == 0) {
2826 - /* RFC6298: 5.7 We've failed to get a valid RTT sample from
2827 -diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
2828 -index ac6b196..9475a27 100644
2829 ---- a/net/ipv4/tcp_minisocks.c
2830 -+++ b/net/ipv4/tcp_minisocks.c
2831 -@@ -458,7 +458,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
2832 -
2833 - newtp->rcv_wup = newtp->copied_seq =
2834 - newtp->rcv_nxt = treq->rcv_isn + 1;
2835 -- newtp->segs_in = 0;
2836 -+ newtp->segs_in = 1;
2837 -
2838 - newtp->snd_sml = newtp->snd_una =
2839 - newtp->snd_nxt = newtp->snd_up = treq->snt_isn + 1;
2840 -@@ -818,6 +818,7 @@ int tcp_child_process(struct sock *parent, struct sock *child,
2841 - int ret = 0;
2842 - int state = child->sk_state;
2843 -
2844 -+ tcp_sk(child)->segs_in += max_t(u16, 1, skb_shinfo(skb)->gso_segs);
2845 - if (!sock_owned_by_user(child)) {
2846 - ret = tcp_rcv_state_process(child, skb);
2847 - /* Wakeup parent, send SIGIO */
2848 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
2849 -index 7f8ab46..21fbb54 100644
2850 +index 95d2f19..eb8933b 100644
2851 --- a/net/ipv4/udp.c
2852 +++ b/net/ipv4/udp.c
2853 -@@ -1990,10 +1990,14 @@ void udp_v4_early_demux(struct sk_buff *skb)
2854 +@@ -2082,10 +2082,14 @@ void udp_v4_early_demux(struct sk_buff *skb)
2855 if (!in_dev)
2856 return;
2857
2858 @@ -4416,51 +4373,8 @@ index 7f8ab46..21fbb54 100644
2859 sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr,
2860 uh->source, iph->saddr, dif);
2861 } else if (skb->pkt_type == PACKET_HOST) {
2862 -diff --git a/net/ipv4/udp_tunnel.c b/net/ipv4/udp_tunnel.c
2863 -index aba4286..280a9bd 100644
2864 ---- a/net/ipv4/udp_tunnel.c
2865 -+++ b/net/ipv4/udp_tunnel.c
2866 -@@ -89,6 +89,8 @@ int udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
2867 - uh->source = src_port;
2868 - uh->len = htons(skb->len);
2869 -
2870 -+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
2871 -+
2872 - udp_set_csum(nocheck, skb, src, dst, skb->len);
2873 -
2874 - return iptunnel_xmit(sk, rt, skb, src, dst, IPPROTO_UDP,
2875 -diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
2876 -index 5c5d23e..9508a20 100644
2877 ---- a/net/ipv6/exthdrs_core.c
2878 -+++ b/net/ipv6/exthdrs_core.c
2879 -@@ -257,7 +257,11 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
2880 - *fragoff = _frag_off;
2881 - return hp->nexthdr;
2882 - }
2883 -- return -ENOENT;
2884 -+ if (!found)
2885 -+ return -ENOENT;
2886 -+ if (fragoff)
2887 -+ *fragoff = _frag_off;
2888 -+ break;
2889 - }
2890 - hdrlen = 8;
2891 - } else if (nexthdr == NEXTHDR_AUTH) {
2892 -diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
2893 -index e5ea177..4650c68 100644
2894 ---- a/net/ipv6/ip6_gre.c
2895 -+++ b/net/ipv6/ip6_gre.c
2896 -@@ -778,6 +778,8 @@ static inline int ip6gre_xmit_ipv4(struct sk_buff *skb, struct net_device *dev)
2897 - __u32 mtu;
2898 - int err;
2899 -
2900 -+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
2901 -+
2902 - if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
2903 - encap_limit = t->parms.encap_limit;
2904 -
2905 diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
2906 -index 31144c4..a175152 100644
2907 +index a163102..2a6606c 100644
2908 --- a/net/ipv6/ip6_output.c
2909 +++ b/net/ipv6/ip6_output.c
2910 @@ -1091,8 +1091,8 @@ static inline int ip6_ufo_append_data(struct sock *sk,
2911 @@ -4493,7 +4407,7 @@ index 31144c4..a175152 100644
2912 if (err)
2913 goto error;
2914 diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
2915 -index 137fca4..3991b21 100644
2916 +index 6c5dfec..3991b21 100644
2917 --- a/net/ipv6/ip6_tunnel.c
2918 +++ b/net/ipv6/ip6_tunnel.c
2919 @@ -343,12 +343,12 @@ static int ip6_tnl_create2(struct net_device *dev)
2920 @@ -4510,35 +4424,11 @@ index 137fca4..3991b21 100644
2921
2922 dev_hold(dev);
2923 ip6_tnl_link(ip6n, t);
2924 -@@ -1180,6 +1180,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
2925 - u8 tproto;
2926 - int err;
2927 -
2928 -+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
2929 -+
2930 - tproto = ACCESS_ONCE(t->parms.proto);
2931 - if (tproto != IPPROTO_IPIP && tproto != 0)
2932 - return -1;
2933 -diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
2934 -index 5ee56d0..d64ee7e 100644
2935 ---- a/net/ipv6/mcast.c
2936 -+++ b/net/ipv6/mcast.c
2937 -@@ -1574,9 +1574,8 @@ static struct sk_buff *mld_newpack(struct inet6_dev *idev, unsigned int mtu)
2938 - return NULL;
2939 -
2940 - skb->priority = TC_PRIO_CONTROL;
2941 -- skb->reserved_tailroom = skb_end_offset(skb) -
2942 -- min(mtu, skb_end_offset(skb));
2943 - skb_reserve(skb, hlen);
2944 -+ skb_tailroom_reserve(skb, mtu, tlen);
2945 -
2946 - if (__ipv6_get_lladdr(idev, &addr_buf, IFA_F_TENTATIVE)) {
2947 - /* <draft-ietf-magma-mld-source-05.txt>:
2948 diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
2949 -index 9da3287..6665e1a 100644
2950 +index 422dd01..6794120 100644
2951 --- a/net/ipv6/udp.c
2952 +++ b/net/ipv6/udp.c
2953 -@@ -837,8 +837,8 @@ start_lookup:
2954 +@@ -883,8 +883,8 @@ start_lookup:
2955 flush_stack(stack, count, skb, count - 1);
2956 } else {
2957 if (!inner_flushed)
2958 @@ -4549,20 +4439,6 @@ index 9da3287..6665e1a 100644
2959 consume_skb(skb);
2960 }
2961 return 0;
2962 -@@ -916,11 +916,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
2963 - ret = udpv6_queue_rcv_skb(sk, skb);
2964 - sock_put(sk);
2965 -
2966 -- /* a return value > 0 means to resubmit the input, but
2967 -- * it wants the return to be -protocol, or 0
2968 -- */
2969 -+ /* a return value > 0 means to resubmit the input */
2970 - if (ret > 0)
2971 -- return -ret;
2972 -+ return ret;
2973 -
2974 - return 0;
2975 - }
2976 diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
2977 index ec22078..42de4cc 100644
2978 --- a/net/l2tp/l2tp_ip.c
2979 @@ -4622,7 +4498,7 @@ index a2c8747..9ee4ddb 100644
2980 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, ptr, length);
2981 }
2982 diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
2983 -index 6a12b0f..980e9e9 100644
2984 +index 978d3bc..1b33d89 100644
2985 --- a/net/mac80211/ibss.c
2986 +++ b/net/mac80211/ibss.c
2987 @@ -7,6 +7,7 @@
2988 @@ -4633,7 +4509,7 @@ index 6a12b0f..980e9e9 100644
2989 *
2990 * This program is free software; you can redistribute it and/or modify
2991 * it under the terms of the GNU General Public License version 2 as
2992 -@@ -1484,14 +1485,21 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
2993 +@@ -1485,14 +1486,21 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
2994
2995 sdata_info(sdata, "Trigger new scan to find an IBSS to join\n");
2996
2997 @@ -4678,10 +4554,10 @@ index c9e325d..7a2b791 100644
2998 }
2999
3000 diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
3001 -index 4cbf36c..a3bb8f7 100644
3002 +index 60d093f..261df74 100644
3003 --- a/net/mac80211/rx.c
3004 +++ b/net/mac80211/rx.c
3005 -@@ -2250,7 +2250,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
3006 +@@ -2249,7 +2249,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
3007 struct ieee80211_local *local = rx->local;
3008 struct ieee80211_sub_if_data *sdata = rx->sdata;
3009 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
3010 @@ -4690,7 +4566,7 @@ index 4cbf36c..a3bb8f7 100644
3011
3012 hdr = (struct ieee80211_hdr *) skb->data;
3013 hdrlen = ieee80211_hdrlen(hdr->frame_control);
3014 -@@ -2319,7 +2319,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
3015 +@@ -2318,7 +2318,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
3016 ether_addr_equal(sdata->vif.addr, hdr->addr3))
3017 return RX_CONTINUE;
3018
3019 @@ -4701,10 +4577,10 @@ index 4cbf36c..a3bb8f7 100644
3020 IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_congestion);
3021 return RX_DROP_MONITOR;
3022 diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
3023 -index f91d187..67066d0 100644
3024 +index a4a4f89..23ed038 100644
3025 --- a/net/mac80211/sta_info.c
3026 +++ b/net/mac80211/sta_info.c
3027 -@@ -256,11 +256,11 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
3028 +@@ -257,11 +257,11 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
3029 }
3030
3031 /* Caller must hold local->sta_mtx */
3032 @@ -4720,7 +4596,7 @@ index f91d187..67066d0 100644
3033 }
3034
3035 static void sta_deliver_ps_frames(struct work_struct *wk)
3036 -@@ -484,11 +484,17 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3037 +@@ -498,11 +498,17 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3038 {
3039 struct ieee80211_local *local = sta->local;
3040 struct ieee80211_sub_if_data *sdata = sta->sdata;
3041 @@ -4739,7 +4615,7 @@ index f91d187..67066d0 100644
3042 /* check if STA exists already */
3043 if (sta_info_get_bss(sdata, sta->sta.addr)) {
3044 err = -EEXIST;
3045 -@@ -503,7 +509,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3046 +@@ -517,7 +523,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3047 set_sta_flag(sta, WLAN_STA_BLOCK_BA);
3048
3049 /* make the station visible */
3050 @@ -4750,7 +4626,7 @@ index f91d187..67066d0 100644
3051
3052 list_add_tail_rcu(&sta->list, &local->sta_list);
3053
3054 -@@ -520,10 +528,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3055 +@@ -534,10 +542,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3056 ieee80211_sta_debugfs_add(sta);
3057 rate_control_add_sta_debugfs(sta);
3058
3059 @@ -4764,7 +4640,7 @@ index f91d187..67066d0 100644
3060
3061 sta_dbg(sdata, "Inserted STA %pM\n", sta->sta.addr);
3062
3063 -@@ -538,6 +545,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3064 +@@ -552,6 +559,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
3065 out_remove:
3066 sta_info_hash_del(local, sta);
3067 list_del_rcu(&sta->list);
3068 @@ -4772,7 +4648,7 @@ index f91d187..67066d0 100644
3069 local->num_sta--;
3070 synchronize_net();
3071 __cleanup_single_sta(sta);
3072 -@@ -882,7 +890,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
3073 +@@ -898,7 +906,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
3074 {
3075 struct ieee80211_local *local = sta->local;
3076 struct ieee80211_sub_if_data *sdata = sta->sdata;
3077 @@ -4781,7 +4657,7 @@ index f91d187..67066d0 100644
3078 int ret;
3079
3080 /*
3081 -@@ -920,8 +928,11 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
3082 +@@ -936,8 +944,11 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
3083
3084 sta_dbg(sdata, "Removed STA %pM\n", sta->sta.addr);
3085
3086 @@ -4796,10 +4672,10 @@ index f91d187..67066d0 100644
3087 rate_control_remove_sta_debugfs(sta);
3088 ieee80211_sta_debugfs_remove(sta);
3089 diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
3090 -index c32fc41..881bc20 100644
3091 +index b18c5ed..0b80a71 100644
3092 --- a/net/mpls/af_mpls.c
3093 +++ b/net/mpls/af_mpls.c
3094 -@@ -518,6 +518,9 @@ static struct net_device *find_outdev(struct net *net,
3095 +@@ -543,6 +543,9 @@ static struct net_device *find_outdev(struct net *net,
3096 if (!dev)
3097 return ERR_PTR(-ENODEV);
3098
3099 @@ -4892,25 +4768,12 @@ index 992396a..da1ae0e1 100644
3100 sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
3101
3102 if (!gso_type && (len > dev->mtu + reserve + extra_len) &&
3103 -diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
3104 -index ec52912..ce46f1c 100644
3105 ---- a/net/sctp/ipv6.c
3106 -+++ b/net/sctp/ipv6.c
3107 -@@ -526,6 +526,8 @@ static int sctp_v6_cmp_addr(const union sctp_addr *addr1,
3108 - }
3109 - return 0;
3110 - }
3111 -+ if (addr1->v6.sin6_port != addr2->v6.sin6_port)
3112 -+ return 0;
3113 - if (!ipv6_addr_equal(&addr1->v6.sin6_addr, &addr2->v6.sin6_addr))
3114 - return 0;
3115 - /* If this is a linklocal address, compare the scope_id. */
3116 diff --git a/net/socket.c b/net/socket.c
3117 -index d730ef9..263b334 100644
3118 +index c044d1e..db13ae8 100644
3119 --- a/net/socket.c
3120 +++ b/net/socket.c
3121 -@@ -2238,31 +2238,31 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
3122 - break;
3123 +@@ -2240,31 +2240,31 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
3124 + cond_resched();
3125 }
3126
3127 -out_put:
3128 @@ -4960,136 +4823,6 @@ index d730ef9..263b334 100644
3129 }
3130
3131 SYSCALL_DEFINE5(recvmmsg, int, fd, struct mmsghdr __user *, mmsg,
3132 -diff --git a/net/tipc/socket.c b/net/tipc/socket.c
3133 -index b53246f..e53003c 100644
3134 ---- a/net/tipc/socket.c
3135 -+++ b/net/tipc/socket.c
3136 -@@ -673,7 +673,7 @@ static int tipc_sendmcast(struct socket *sock, struct tipc_name_seq *seq,
3137 - struct tipc_sock *tsk = tipc_sk(sk);
3138 - struct net *net = sock_net(sk);
3139 - struct tipc_msg *mhdr = &tsk->phdr;
3140 -- struct sk_buff_head *pktchain = &sk->sk_write_queue;
3141 -+ struct sk_buff_head pktchain;
3142 - struct iov_iter save = msg->msg_iter;
3143 - uint mtu;
3144 - int rc;
3145 -@@ -687,14 +687,16 @@ static int tipc_sendmcast(struct socket *sock, struct tipc_name_seq *seq,
3146 - msg_set_nameupper(mhdr, seq->upper);
3147 - msg_set_hdr_sz(mhdr, MCAST_H_SIZE);
3148 -
3149 -+ skb_queue_head_init(&pktchain);
3150 -+
3151 - new_mtu:
3152 - mtu = tipc_bcast_get_mtu(net);
3153 -- rc = tipc_msg_build(mhdr, msg, 0, dsz, mtu, pktchain);
3154 -+ rc = tipc_msg_build(mhdr, msg, 0, dsz, mtu, &pktchain);
3155 - if (unlikely(rc < 0))
3156 - return rc;
3157 -
3158 - do {
3159 -- rc = tipc_bcast_xmit(net, pktchain);
3160 -+ rc = tipc_bcast_xmit(net, &pktchain);
3161 - if (likely(!rc))
3162 - return dsz;
3163 -
3164 -@@ -704,7 +706,7 @@ new_mtu:
3165 - if (!rc)
3166 - continue;
3167 - }
3168 -- __skb_queue_purge(pktchain);
3169 -+ __skb_queue_purge(&pktchain);
3170 - if (rc == -EMSGSIZE) {
3171 - msg->msg_iter = save;
3172 - goto new_mtu;
3173 -@@ -863,7 +865,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz)
3174 - struct net *net = sock_net(sk);
3175 - struct tipc_msg *mhdr = &tsk->phdr;
3176 - u32 dnode, dport;
3177 -- struct sk_buff_head *pktchain = &sk->sk_write_queue;
3178 -+ struct sk_buff_head pktchain;
3179 - struct sk_buff *skb;
3180 - struct tipc_name_seq *seq;
3181 - struct iov_iter save;
3182 -@@ -924,17 +926,18 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz)
3183 - msg_set_hdr_sz(mhdr, BASIC_H_SIZE);
3184 - }
3185 -
3186 -+ skb_queue_head_init(&pktchain);
3187 - save = m->msg_iter;
3188 - new_mtu:
3189 - mtu = tipc_node_get_mtu(net, dnode, tsk->portid);
3190 -- rc = tipc_msg_build(mhdr, m, 0, dsz, mtu, pktchain);
3191 -+ rc = tipc_msg_build(mhdr, m, 0, dsz, mtu, &pktchain);
3192 - if (rc < 0)
3193 - return rc;
3194 -
3195 - do {
3196 -- skb = skb_peek(pktchain);
3197 -+ skb = skb_peek(&pktchain);
3198 - TIPC_SKB_CB(skb)->wakeup_pending = tsk->link_cong;
3199 -- rc = tipc_node_xmit(net, pktchain, dnode, tsk->portid);
3200 -+ rc = tipc_node_xmit(net, &pktchain, dnode, tsk->portid);
3201 - if (likely(!rc)) {
3202 - if (sock->state != SS_READY)
3203 - sock->state = SS_CONNECTING;
3204 -@@ -946,7 +949,7 @@ new_mtu:
3205 - if (!rc)
3206 - continue;
3207 - }
3208 -- __skb_queue_purge(pktchain);
3209 -+ __skb_queue_purge(&pktchain);
3210 - if (rc == -EMSGSIZE) {
3211 - m->msg_iter = save;
3212 - goto new_mtu;
3213 -@@ -1016,7 +1019,7 @@ static int __tipc_send_stream(struct socket *sock, struct msghdr *m, size_t dsz)
3214 - struct net *net = sock_net(sk);
3215 - struct tipc_sock *tsk = tipc_sk(sk);
3216 - struct tipc_msg *mhdr = &tsk->phdr;
3217 -- struct sk_buff_head *pktchain = &sk->sk_write_queue;
3218 -+ struct sk_buff_head pktchain;
3219 - DECLARE_SOCKADDR(struct sockaddr_tipc *, dest, m->msg_name);
3220 - u32 portid = tsk->portid;
3221 - int rc = -EINVAL;
3222 -@@ -1044,17 +1047,19 @@ static int __tipc_send_stream(struct socket *sock, struct msghdr *m, size_t dsz)
3223 -
3224 - timeo = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
3225 - dnode = tsk_peer_node(tsk);
3226 -+ skb_queue_head_init(&pktchain);
3227 -
3228 - next:
3229 - save = m->msg_iter;
3230 - mtu = tsk->max_pkt;
3231 - send = min_t(uint, dsz - sent, TIPC_MAX_USER_MSG_SIZE);
3232 -- rc = tipc_msg_build(mhdr, m, sent, send, mtu, pktchain);
3233 -+ rc = tipc_msg_build(mhdr, m, sent, send, mtu, &pktchain);
3234 - if (unlikely(rc < 0))
3235 - return rc;
3236 -+
3237 - do {
3238 - if (likely(!tsk_conn_cong(tsk))) {
3239 -- rc = tipc_node_xmit(net, pktchain, dnode, portid);
3240 -+ rc = tipc_node_xmit(net, &pktchain, dnode, portid);
3241 - if (likely(!rc)) {
3242 - tsk->sent_unacked++;
3243 - sent += send;
3244 -@@ -1063,7 +1068,7 @@ next:
3245 - goto next;
3246 - }
3247 - if (rc == -EMSGSIZE) {
3248 -- __skb_queue_purge(pktchain);
3249 -+ __skb_queue_purge(&pktchain);
3250 - tsk->max_pkt = tipc_node_get_mtu(net, dnode,
3251 - portid);
3252 - m->msg_iter = save;
3253 -@@ -1077,7 +1082,7 @@ next:
3254 - rc = tipc_wait_for_sndpkt(sock, &timeo);
3255 - } while (!rc);
3256 -
3257 -- __skb_queue_purge(pktchain);
3258 -+ __skb_queue_purge(&pktchain);
3259 - return sent ? sent : rc;
3260 - }
3261 -
3262 diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
3263 index ad7f5b3..1c4ad47 100644
3264 --- a/net/xfrm/xfrm_input.c
3265 @@ -5111,10 +4844,10 @@ index ad7f5b3..1c4ad47 100644
3266 if (nexthdr <= 0) {
3267 if (nexthdr == -EBADMSG) {
3268 diff --git a/sound/core/timer.c b/sound/core/timer.c
3269 -index f24c9fc..b982d1b 100644
3270 +index dca817f..e5e7e43 100644
3271 --- a/sound/core/timer.c
3272 +++ b/sound/core/timer.c
3273 -@@ -1051,8 +1051,8 @@ static int snd_timer_s_start(struct snd_timer * timer)
3274 +@@ -1041,8 +1041,8 @@ static int snd_timer_s_start(struct snd_timer * timer)
3275 njiff += timer->sticks - priv->correction;
3276 priv->correction = 0;
3277 }
3278 @@ -5125,63 +4858,36 @@ index f24c9fc..b982d1b 100644
3279 return 0;
3280 }
3281
3282 +diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
3283 +index e68fa44..0c95856 100644
3284 +--- a/sound/pci/hda/patch_hdmi.c
3285 ++++ b/sound/pci/hda/patch_hdmi.c
3286 +@@ -1623,6 +1623,8 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
3287 +
3288 + mutex_lock(&per_pin->lock);
3289 + pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE);
3290 ++ eld->monitor_present = pin_eld->monitor_present;
3291 ++
3292 + if (pin_eld->monitor_present)
3293 + eld->eld_valid = !!(present & AC_PINSENSE_ELDV);
3294 + else
3295 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
3296 -index 6968b79..1402ba9 100644
3297 +index 4f5ca0b..1402ba9 100644
3298 --- a/sound/pci/hda/patch_realtek.c
3299 +++ b/sound/pci/hda/patch_realtek.c
3300 -@@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
3301 -
3302 - static void alc_headset_mode_default(struct hda_codec *codec)
3303 - {
3304 -+ static struct coef_fw coef0225[] = {
3305 -+ UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
3306 -+ {}
3307 -+ };
3308 - static struct coef_fw coef0255[] = {
3309 - WRITE_COEF(0x45, 0xc089),
3310 - WRITE_COEF(0x45, 0xc489),
3311 -@@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
3312 - };
3313 -
3314 - switch (codec->core.vendor_id) {
3315 -+ case 0x10ec0225:
3316 -+ alc_process_coef_fw(codec, coef0225);
3317 -+ break;
3318 - case 0x10ec0255:
3319 - case 0x10ec0256:
3320 - alc_process_coef_fw(codec, coef0255);
3321 -@@ -4750,6 +4757,10 @@ enum {
3322 - ALC293_FIXUP_LENOVO_SPK_NOISE,
3323 - ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
3324 +@@ -4759,6 +4759,8 @@ enum {
3325 ALC255_FIXUP_DELL_SPK_NOISE,
3326 -+ ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
3327 -+ ALC280_FIXUP_HP_HEADSET_MIC,
3328 + ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
3329 + ALC280_FIXUP_HP_HEADSET_MIC,
3330 + ALC221_FIXUP_HP_FRONT_MIC,
3331 + ALC292_FIXUP_TPT460,
3332 };
3333
3334 static const struct hda_fixup alc269_fixups[] = {
3335 -@@ -5375,6 +5386,36 @@ static const struct hda_fixup alc269_fixups[] = {
3336 +@@ -5401,6 +5403,19 @@ static const struct hda_fixup alc269_fixups[] = {
3337 .chained = true,
3338 - .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
3339 + .chain_id = ALC269_FIXUP_HEADSET_MIC,
3340 },
3341 -+ [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
3342 -+ .type = HDA_FIXUP_VERBS,
3343 -+ .v.verbs = (const struct hda_verb[]) {
3344 -+ /* Disable pass-through path for FRONT 14h */
3345 -+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
3346 -+ { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
3347 -+ {}
3348 -+ },
3349 -+ .chained = true,
3350 -+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
3351 -+ },
3352 -+ [ALC280_FIXUP_HP_HEADSET_MIC] = {
3353 -+ .type = HDA_FIXUP_FUNC,
3354 -+ .v.func = alc_fixup_disable_aamix,
3355 -+ .chained = true,
3356 -+ .chain_id = ALC269_FIXUP_HEADSET_MIC,
3357 -+ },
3358 + [ALC221_FIXUP_HP_FRONT_MIC] = {
3359 + .type = HDA_FIXUP_PINS,
3360 + .v.pins = (const struct hda_pintbl[]) {
3361 @@ -5198,16 +4904,15 @@ index 6968b79..1402ba9 100644
3362 };
3363
3364 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3365 -@@ -5479,6 +5520,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3366 - SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
3367 +@@ -5506,6 +5521,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3368 SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
3369 SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
3370 -+ SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
3371 + SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
3372 + SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
3373 SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
3374 SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
3375 SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
3376 -@@ -5527,7 +5570,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3377 +@@ -5554,7 +5570,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3378 SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
3379 SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
3380 SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
3381 @@ -5216,7 +4921,7 @@ index 6968b79..1402ba9 100644
3382 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
3383 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
3384 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
3385 -@@ -5622,6 +5665,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
3386 +@@ -5649,6 +5665,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
3387 {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
3388 {.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
3389 {.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
3390 @@ -5224,20 +4929,7 @@ index 6968b79..1402ba9 100644
3391 {}
3392 };
3393 #define ALC225_STANDARD_PINS \
3394 -@@ -5648,10 +5692,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
3395 - {0x21, 0x03211020}
3396 -
3397 - static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
3398 -- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
3399 -+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
3400 - ALC225_STANDARD_PINS,
3401 - {0x14, 0x901701a0}),
3402 -- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
3403 -+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
3404 - ALC225_STANDARD_PINS,
3405 - {0x14, 0x901701b0}),
3406 - SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
3407 -@@ -6379,6 +6423,7 @@ enum {
3408 +@@ -6406,6 +6423,7 @@ enum {
3409 ALC668_FIXUP_AUTO_MUTE,
3410 ALC668_FIXUP_DELL_DISABLE_AAMIX,
3411 ALC668_FIXUP_DELL_XPS13,
3412 @@ -5245,7 +4937,7 @@ index 6968b79..1402ba9 100644
3413 };
3414
3415 static const struct hda_fixup alc662_fixups[] = {
3416 -@@ -6619,6 +6664,12 @@ static const struct hda_fixup alc662_fixups[] = {
3417 +@@ -6646,6 +6664,12 @@ static const struct hda_fixup alc662_fixups[] = {
3418 .type = HDA_FIXUP_FUNC,
3419 .v.func = alc_fixup_bass_chmap,
3420 },
3421 @@ -5258,7 +4950,7 @@ index 6968b79..1402ba9 100644
3422 };
3423
3424 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
3425 -@@ -6641,8 +6692,9 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
3426 +@@ -6668,8 +6692,9 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
3427 SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
3428 SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
3429 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
3430
3431 diff --git a/4.4.8/4420_grsecurity-3.1-4.4.8-201604252206.patch b/4.5.2/4420_grsecurity-3.1-4.5.2-201604282058.patch
3432 similarity index 86%
3433 rename from 4.4.8/4420_grsecurity-3.1-4.4.8-201604252206.patch
3434 rename to 4.5.2/4420_grsecurity-3.1-4.5.2-201604282058.patch
3435 index a7a3280..00a02a9 100644
3436 --- a/4.4.8/4420_grsecurity-3.1-4.4.8-201604252206.patch
3437 +++ b/4.5.2/4420_grsecurity-3.1-4.5.2-201604282058.patch
3438 @@ -311,10 +311,10 @@ index 13f888a..250729b 100644
3439 A typical pattern in a Kbuild file looks like this:
3440
3441 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
3442 -index 0e4102a..d24a808 100644
3443 +index 21e4b48..82bb512 100644
3444 --- a/Documentation/kernel-parameters.txt
3445 +++ b/Documentation/kernel-parameters.txt
3446 -@@ -1282,6 +1282,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3447 +@@ -1300,6 +1300,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3448 [KNL] Should the hard-lockup detector generate
3449 backtraces on all cpus.
3450 Format: <integer>
3451 @@ -327,7 +327,7 @@ index 0e4102a..d24a808 100644
3452
3453 hashdist= [KNL,NUMA] Large hashes allocated during boot
3454 are distributed across NUMA nodes. Defaults on
3455 -@@ -2418,6 +2424,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3456 +@@ -2476,6 +2482,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3457 noexec=on: enable non-executable mappings (default)
3458 noexec=off: disable non-executable mappings
3459
3460 @@ -338,7 +338,7 @@ index 0e4102a..d24a808 100644
3461 nosmap [X86]
3462 Disable SMAP (Supervisor Mode Access Prevention)
3463 even if it is supported by processor.
3464 -@@ -2716,6 +2726,35 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3465 +@@ -2772,6 +2782,35 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3466 the specified number of seconds. This is to be used if
3467 your oopses keep scrolling off the screen.
3468
3469 @@ -374,49 +374,8 @@ index 0e4102a..d24a808 100644
3470 pcbit= [HW,ISDN]
3471
3472 pcd. [PARIDE]
3473 -diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
3474 -index 88152f2..302b5ed 100644
3475 ---- a/Documentation/sysctl/fs.txt
3476 -+++ b/Documentation/sysctl/fs.txt
3477 -@@ -32,6 +32,8 @@ Currently, these files are in /proc/sys/fs:
3478 - - nr_open
3479 - - overflowuid
3480 - - overflowgid
3481 -+- pipe-user-pages-hard
3482 -+- pipe-user-pages-soft
3483 - - protected_hardlinks
3484 - - protected_symlinks
3485 - - suid_dumpable
3486 -@@ -159,6 +161,27 @@ The default is 65534.
3487 -
3488 - ==============================================================
3489 -
3490 -+pipe-user-pages-hard:
3491 -+
3492 -+Maximum total number of pages a non-privileged user may allocate for pipes.
3493 -+Once this limit is reached, no new pipes may be allocated until usage goes
3494 -+below the limit again. When set to 0, no limit is applied, which is the default
3495 -+setting.
3496 -+
3497 -+==============================================================
3498 -+
3499 -+pipe-user-pages-soft:
3500 -+
3501 -+Maximum total number of pages a non-privileged user may allocate for pipes
3502 -+before the pipe size gets limited to a single page. Once this limit is reached,
3503 -+new pipes will be limited to a single page in size for this user in order to
3504 -+limit total memory usage, and trying to increase them using fcntl() will be
3505 -+denied until usage goes below the limit again. The default value allows to
3506 -+allocate up to 1024 pipes at their default size. When set to 0, no limit is
3507 -+applied.
3508 -+
3509 -+==============================================================
3510 -+
3511 - protected_hardlinks:
3512 -
3513 - A long-standing class of security issues is the hardlink-based
3514 diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
3515 -index af70d15..ccd3786 100644
3516 +index a93b414..f50a50b 100644
3517 --- a/Documentation/sysctl/kernel.txt
3518 +++ b/Documentation/sysctl/kernel.txt
3519 @@ -42,6 +42,7 @@ show up in /proc/sys/kernel:
3520 @@ -449,7 +408,7 @@ index af70d15..ccd3786 100644
3521
3522 A toggle value indicating if modules are allowed to be loaded
3523 diff --git a/Makefile b/Makefile
3524 -index 1928fcd..e58439b 100644
3525 +index 1ecaaeb..8e81686 100644
3526 --- a/Makefile
3527 +++ b/Makefile
3528 @@ -298,7 +298,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
3529 @@ -474,7 +433,7 @@ index 1928fcd..e58439b 100644
3530 $(Q)$(MAKE) $(build)=scripts/basic
3531 $(Q)rm -f .tmp_quiet_recordmcount
3532
3533 -@@ -616,6 +618,8 @@ endif
3534 +@@ -622,6 +624,8 @@ endif
3535 # Tell gcc to never replace conditional load with a non-conditional one
3536 KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
3537
3538 @@ -483,7 +442,7 @@ index 1928fcd..e58439b 100644
3539 ifdef CONFIG_READABLE_ASM
3540 # Disable optimizations that make assembler listings hard to read.
3541 # reorder blocks reorders the control in the function
3542 -@@ -708,7 +712,7 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
3543 +@@ -714,7 +718,7 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
3544 else
3545 KBUILD_CFLAGS += -g
3546 endif
3547 @@ -492,7 +451,7 @@ index 1928fcd..e58439b 100644
3548 endif
3549 ifdef CONFIG_DEBUG_INFO_DWARF4
3550 KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,)
3551 -@@ -879,7 +883,7 @@ export mod_sign_cmd
3552 +@@ -886,7 +890,7 @@ export mod_sign_cmd
3553
3554
3555 ifeq ($(KBUILD_EXTMOD),)
3556 @@ -501,7 +460,7 @@ index 1928fcd..e58439b 100644
3557
3558 vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
3559 $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
3560 -@@ -930,6 +934,8 @@ endif
3561 +@@ -937,6 +941,8 @@ endif
3562
3563 # The actual objects are generated when descending,
3564 # make sure no implicit rule kicks in
3565 @@ -510,7 +469,7 @@ index 1928fcd..e58439b 100644
3566 $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
3567
3568 # Handle descending into subdirectories listed in $(vmlinux-dirs)
3569 -@@ -939,7 +945,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
3570 +@@ -946,7 +952,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
3571 # Error messages still appears in the original language
3572
3573 PHONY += $(vmlinux-dirs)
3574 @@ -519,7 +478,7 @@ index 1928fcd..e58439b 100644
3575 $(Q)$(MAKE) $(build)=$@
3576
3577 define filechk_kernel.release
3578 -@@ -982,10 +988,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
3579 +@@ -989,10 +995,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
3580
3581 archprepare: archheaders archscripts prepare1 scripts_basic
3582
3583 @@ -533,7 +492,7 @@ index 1928fcd..e58439b 100644
3584 prepare: prepare0
3585
3586 # Generate some files
3587 -@@ -1096,6 +1105,8 @@ all: modules
3588 +@@ -1103,6 +1112,8 @@ all: modules
3589 # using awk while concatenating to the final file.
3590
3591 PHONY += modules
3592 @@ -542,7 +501,7 @@ index 1928fcd..e58439b 100644
3593 modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
3594 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
3595 @$(kecho) ' Building modules, stage 2.';
3596 -@@ -1111,7 +1122,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
3597 +@@ -1118,7 +1129,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
3598
3599 # Target to prepare building external modules
3600 PHONY += modules_prepare
3601 @@ -551,7 +510,7 @@ index 1928fcd..e58439b 100644
3602
3603 # Target to install modules
3604 PHONY += modules_install
3605 -@@ -1177,7 +1188,11 @@ MRPROPER_FILES += .config .config.old .version .old_version \
3606 +@@ -1184,7 +1195,11 @@ MRPROPER_FILES += .config .config.old .version .old_version \
3607 Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
3608 signing_key.pem signing_key.priv signing_key.x509 \
3609 x509.genkey extra_certificates signing_key.x509.keyid \
3610 @@ -564,7 +523,7 @@ index 1928fcd..e58439b 100644
3611
3612 # clean - Delete most, but leave enough to build external modules
3613 #
3614 -@@ -1216,7 +1231,7 @@ distclean: mrproper
3615 +@@ -1223,7 +1238,7 @@ distclean: mrproper
3616 @find $(srctree) $(RCS_FIND_IGNORE) \
3617 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
3618 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
3619 @@ -573,7 +532,7 @@ index 1928fcd..e58439b 100644
3620 -type f -print | xargs rm -f
3621
3622
3623 -@@ -1383,6 +1398,8 @@ PHONY += $(module-dirs) modules
3624 +@@ -1390,6 +1405,8 @@ PHONY += $(module-dirs) modules
3625 $(module-dirs): crmodverdir $(objtree)/Module.symvers
3626 $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
3627
3628 @@ -582,7 +541,7 @@ index 1928fcd..e58439b 100644
3629 modules: $(module-dirs)
3630 @$(kecho) ' Building modules, stage 2.';
3631 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
3632 -@@ -1524,17 +1541,21 @@ else
3633 +@@ -1531,17 +1548,21 @@ else
3634 target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
3635 endif
3636
3637 @@ -608,7 +567,7 @@ index 1928fcd..e58439b 100644
3638 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
3639 %.symtypes: %.c prepare scripts FORCE
3640 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
3641 -@@ -1546,11 +1567,15 @@ endif
3642 +@@ -1553,11 +1574,15 @@ endif
3643 $(build)=$(build-dir)
3644 # Make sure the latest headers are built for Documentation
3645 Documentation/: headers_install
3646 @@ -729,15 +688,15 @@ index a9a1195..e9b8417 100644
3647
3648 #define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
3649 diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
3650 -index 2fd00b7..cfd5069 100644
3651 +index 936bc8f..bb1859f 100644
3652 --- a/arch/alpha/kernel/module.c
3653 +++ b/arch/alpha/kernel/module.c
3654 @@ -160,7 +160,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
3655
3656 /* The small sections were sorted to the end of the segment.
3657 The following should definitely cover them. */
3658 -- gp = (u64)me->module_core + me->core_size - 0x8000;
3659 -+ gp = (u64)me->module_core_rw + me->core_size_rw - 0x8000;
3660 +- gp = (u64)me->core_layout.base + me->core_layout.size - 0x8000;
3661 ++ gp = (u64)me->core_layout.base_rw + me->core_layout.size_rw - 0x8000;
3662 got = sechdrs[me->arch.gotsecindex].sh_addr;
3663
3664 for (i = 0; i < n; i++) {
3665 @@ -957,7 +916,7 @@ index 4a905bd..0a4da53 100644
3666 /* Allow reads even for write-only mappings */
3667 if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
3668 diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
3669 -index 6312f60..bd07545 100644
3670 +index 8a188bc..26608f1 100644
3671 --- a/arch/arc/Kconfig
3672 +++ b/arch/arc/Kconfig
3673 @@ -528,6 +528,7 @@ config ARC_DBG_TLB_MISS_COUNT
3674 @@ -969,10 +928,10 @@ index 6312f60..bd07545 100644
3675 Counts number of I and D TLB Misses and exports them via Debugfs
3676 The counters can be cleared via Debugfs as well
3677 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
3678 -index 34e1569..b48ad87 100644
3679 +index 4f799e5..261490f 100644
3680 --- a/arch/arm/Kconfig
3681 +++ b/arch/arm/Kconfig
3682 -@@ -1690,6 +1690,7 @@ config HIGHPTE
3683 +@@ -1622,6 +1622,7 @@ config HIGHPTE
3684 config CPU_SW_DOMAIN_PAN
3685 bool "Enable use of CPU domains to implement privileged no-access"
3686 depends on MMU && !ARM_LPAE
3687 @@ -980,7 +939,7 @@ index 34e1569..b48ad87 100644
3688 default y
3689 help
3690 Increase kernel security by ensuring that normal kernel accesses
3691 -@@ -1766,7 +1767,7 @@ config ALIGNMENT_TRAP
3692 +@@ -1698,7 +1699,7 @@ config ALIGNMENT_TRAP
3693
3694 config UACCESS_WITH_MEMCPY
3695 bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()"
3696 @@ -989,7 +948,7 @@ index 34e1569..b48ad87 100644
3697 default y if CPU_FEROCEON
3698 help
3699 Implement faster copy_to_user and clear_user methods for CPU
3700 -@@ -2001,6 +2002,7 @@ config KEXEC
3701 +@@ -1953,6 +1954,7 @@ config KEXEC
3702 depends on (!SMP || PM_SLEEP_SMP)
3703 depends on !CPU_V7M
3704 select KEXEC_CORE
3705 @@ -998,7 +957,7 @@ index 34e1569..b48ad87 100644
3706 kexec is a system call that implements the ability to shutdown your
3707 current kernel, and to start another kernel. It is like a reboot
3708 diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
3709 -index ddbb361..caf403d 100644
3710 +index c6b6175..2884505 100644
3711 --- a/arch/arm/Kconfig.debug
3712 +++ b/arch/arm/Kconfig.debug
3713 @@ -7,6 +7,7 @@ config ARM_PTDUMP
3714 @@ -1663,12 +1622,12 @@ index 97882f9..0cc6ef1 100644
3715 #include <asm-generic/cmpxchg-local.h>
3716
3717 diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
3718 -index 0f84249..8e83c55 100644
3719 +index 3848259..bee9d84 100644
3720 --- a/arch/arm/include/asm/cpuidle.h
3721 +++ b/arch/arm/include/asm/cpuidle.h
3722 @@ -32,7 +32,7 @@ struct device_node;
3723 struct cpuidle_ops {
3724 - int (*suspend)(int cpu, unsigned long arg);
3725 + int (*suspend)(unsigned long arg);
3726 int (*init)(struct device_node *, int cpu);
3727 -};
3728 +} __no_const;
3729 @@ -1828,7 +1787,7 @@ index 9e614a1..3302cca 100644
3730 struct dma_struct {
3731 void *addr; /* single DMA address */
3732 diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
3733 -index f98c7f3..e5c626d 100644
3734 +index 9b7c328..2dfe68b 100644
3735 --- a/arch/arm/include/asm/mach/map.h
3736 +++ b/arch/arm/include/asm/mach/map.h
3737 @@ -23,17 +23,19 @@ struct map_desc {
3738 @@ -1988,7 +1947,7 @@ index aeddd28..207745c 100644
3739 * These are the memory types, defined to be compatible with
3740 * pre-ARMv6 CPUs cacheable and bufferable bits: n/a,n/a,C,B
3741 diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
3742 -index a745a2a..481350a 100644
3743 +index dc46398..70dab92 100644
3744 --- a/arch/arm/include/asm/pgtable-3level.h
3745 +++ b/arch/arm/include/asm/pgtable-3level.h
3746 @@ -80,6 +80,7 @@
3747 @@ -1999,8 +1958,8 @@ index a745a2a..481350a 100644
3748 #define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */
3749 #define L_PTE_DIRTY (_AT(pteval_t, 1) << 55)
3750 #define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56)
3751 -@@ -91,10 +92,12 @@
3752 - #define L_PMD_SECT_SPLITTING (_AT(pmdval_t, 1) << 56)
3753 +@@ -90,10 +91,12 @@
3754 + #define L_PMD_SECT_DIRTY (_AT(pmdval_t, 1) << 55)
3755 #define L_PMD_SECT_NONE (_AT(pmdval_t, 1) << 57)
3756 #define L_PMD_SECT_RDONLY (_AT(pteval_t, 1) << 58)
3757 +#define PMD_SECT_RDONLY PMD_SECT_AP2
3758 @@ -2393,10 +2352,10 @@ index 5af0ed1..cea83883 100644
3759 #define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */
3760
3761 diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
3762 -index f89811f..1d110d1 100644
3763 +index 7e45f69..2c047db 100644
3764 --- a/arch/arm/kernel/armksyms.c
3765 +++ b/arch/arm/kernel/armksyms.c
3766 -@@ -58,7 +58,7 @@ EXPORT_SYMBOL(arm_delay_ops);
3767 +@@ -59,7 +59,7 @@ EXPORT_SYMBOL(arm_delay_ops);
3768
3769 /* networking */
3770 EXPORT_SYMBOL(csum_partial);
3771 @@ -2406,7 +2365,7 @@ index f89811f..1d110d1 100644
3772 EXPORT_SYMBOL(__csum_ipv6_magic);
3773
3774 diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
3775 -index 318da33..373689f 100644
3776 +index 703926e..39aa432 100644
3777 --- a/arch/arm/kernel/cpuidle.c
3778 +++ b/arch/arm/kernel/cpuidle.c
3779 @@ -19,7 +19,7 @@ extern struct of_cpuidle_method __cpuidle_method_of_table[];
3780 @@ -2791,7 +2750,7 @@ index 059c3da..8e45cfc 100644
3781 flush_icache_range((unsigned long)base + offset, offset +
3782 length);
3783 diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c
3784 -index 097e2e2..3927085 100644
3785 +index 0c7efc3..3927085 100644
3786 --- a/arch/arm/kernel/module-plts.c
3787 +++ b/arch/arm/kernel/module-plts.c
3788 @@ -30,17 +30,12 @@ struct plt_entries {
3789 @@ -2800,7 +2759,7 @@ index 097e2e2..3927085 100644
3790
3791 -static bool in_init(const struct module *mod, u32 addr)
3792 -{
3793 -- return addr - (u32)mod->module_init < mod->init_size;
3794 +- return addr - (u32)mod->init_layout.base < mod->init_layout.size;
3795 -}
3796 -
3797 u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val)
3798 @@ -3066,10 +3025,10 @@ index 3826935..8ed63ed 100644
3799
3800 /*
3801 diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
3802 -index 20edd34..e18ac81 100644
3803 +index c86ea8a..fd03a2d 100644
3804 --- a/arch/arm/kernel/setup.c
3805 +++ b/arch/arm/kernel/setup.c
3806 -@@ -110,21 +110,23 @@ EXPORT_SYMBOL(elf_hwcap);
3807 +@@ -113,21 +113,23 @@ EXPORT_SYMBOL(elf_hwcap);
3808 unsigned int elf_hwcap2 __read_mostly;
3809 EXPORT_SYMBOL(elf_hwcap2);
3810
3811 @@ -3098,7 +3057,7 @@ index 20edd34..e18ac81 100644
3812 EXPORT_SYMBOL(outer_cache);
3813 #endif
3814
3815 -@@ -255,9 +257,13 @@ static int __get_cpu_architecture(void)
3816 +@@ -258,9 +260,13 @@ static int __get_cpu_architecture(void)
3817 * Register 0 and check for VMSAv7 or PMSAv7 */
3818 unsigned int mmfr0 = read_cpuid_ext(CPUID_EXT_MMFR0);
3819 if ((mmfr0 & 0x0000000f) >= 0x00000003 ||
3820 @@ -3172,10 +3131,10 @@ index 7b8f214..ece8e28 100644
3821 - return page;
3822 -}
3823 diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
3824 -index b263613..93419ed 100644
3825 +index 37312f6..bb32c9b 100644
3826 --- a/arch/arm/kernel/smp.c
3827 +++ b/arch/arm/kernel/smp.c
3828 -@@ -78,7 +78,7 @@ enum ipi_msg_type {
3829 +@@ -82,7 +82,7 @@ enum ipi_msg_type {
3830
3831 static DECLARE_COMPLETION(cpu_running);
3832
3833 @@ -3271,19 +3230,19 @@ index 8b60fde..8d986dd 100644
3834 # ifdef CONFIG_ARM_KERNMEM_PERMS
3835 . = ALIGN(1<<SECTION_SHIFT);
3836 diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
3837 -index e06fd29..0d3f8ab 100644
3838 +index dda1959..0de41b4 100644
3839 --- a/arch/arm/kvm/arm.c
3840 +++ b/arch/arm/kvm/arm.c
3841 -@@ -57,7 +57,7 @@ static unsigned long hyp_default_vectors;
3842 +@@ -58,7 +58,7 @@ static unsigned long hyp_default_vectors;
3843 static DEFINE_PER_CPU(struct kvm_vcpu *, kvm_arm_running_vcpu);
3844
3845 /* The VMID used in the VTTBR */
3846 -static atomic64_t kvm_vmid_gen = ATOMIC64_INIT(1);
3847 +static atomic64_unchecked_t kvm_vmid_gen = ATOMIC64_INIT(1);
3848 - static u8 kvm_next_vmid;
3849 + static u32 kvm_next_vmid;
3850 + static unsigned int kvm_vmid_bits __read_mostly;
3851 static DEFINE_SPINLOCK(kvm_vmid_lock);
3852 -
3853 -@@ -380,7 +380,7 @@ void force_vm_exit(const cpumask_t *mask)
3854 +@@ -387,7 +387,7 @@ void force_vm_exit(const cpumask_t *mask)
3855 */
3856 static bool need_new_vmid_gen(struct kvm *kvm)
3857 {
3858 @@ -3292,7 +3251,7 @@ index e06fd29..0d3f8ab 100644
3859 }
3860
3861 /**
3862 -@@ -413,7 +413,7 @@ static void update_vttbr(struct kvm *kvm)
3863 +@@ -420,7 +420,7 @@ static void update_vttbr(struct kvm *kvm)
3864
3865 /* First user of a new VMID generation? */
3866 if (unlikely(kvm_next_vmid == 0)) {
3867 @@ -3301,7 +3260,7 @@ index e06fd29..0d3f8ab 100644
3868 kvm_next_vmid = 1;
3869
3870 /*
3871 -@@ -430,7 +430,7 @@ static void update_vttbr(struct kvm *kvm)
3872 +@@ -437,7 +437,7 @@ static void update_vttbr(struct kvm *kvm)
3873 kvm_call_hyp(__kvm_flush_vm_context);
3874 }
3875
3876 @@ -3309,7 +3268,7 @@ index e06fd29..0d3f8ab 100644
3877 + kvm->arch.vmid_gen = atomic64_read_unchecked(&kvm_vmid_gen);
3878 kvm->arch.vmid = kvm_next_vmid;
3879 kvm_next_vmid++;
3880 -
3881 + kvm_next_vmid &= (1 << kvm_vmid_bits) - 1;
3882 diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S
3883 index 6ee2f67..d1cce76 100644
3884 --- a/arch/arm/lib/copy_page.S
3885 @@ -3351,10 +3310,10 @@ index 8044591..c9b2609 100644
3886 .const_udelay = __loop_const_udelay,
3887 .udelay = __loop_udelay,
3888 diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
3889 -index 588bbc2..4f57e0b 100644
3890 +index 6bd1089..e999400 100644
3891 --- a/arch/arm/lib/uaccess_with_memcpy.c
3892 +++ b/arch/arm/lib/uaccess_with_memcpy.c
3893 -@@ -85,7 +85,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
3894 +@@ -84,7 +84,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
3895 return 1;
3896 }
3897
3898 @@ -3363,7 +3322,7 @@ index 588bbc2..4f57e0b 100644
3899 __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
3900 {
3901 unsigned long ua_flags;
3902 -@@ -158,7 +158,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n)
3903 +@@ -157,7 +157,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n)
3904 return n;
3905 }
3906
3907 @@ -3447,7 +3406,7 @@ index 65024af..70bf184 100644
3908 .resume = dummy_cpu_resume,
3909 .scu_prepare = dummy_scu_prepare,
3910 diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
3911 -index 79e1f87..6dd91e3 100644
3912 +index c625cc1..3f47aae 100644
3913 --- a/arch/arm/mach-omap2/omap-smp.c
3914 +++ b/arch/arm/mach-omap2/omap-smp.c
3915 @@ -19,6 +19,7 @@
3916 @@ -3459,10 +3418,10 @@ index 79e1f87..6dd91e3 100644
3917
3918 #include <asm/smp_scu.h>
3919 diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
3920 -index 72ebc4c..18c4406 100644
3921 +index f7ff3b9..e6d5420 100644
3922 --- a/arch/arm/mach-omap2/omap_device.c
3923 +++ b/arch/arm/mach-omap2/omap_device.c
3924 -@@ -504,7 +504,7 @@ void omap_device_delete(struct omap_device *od)
3925 +@@ -515,7 +515,7 @@ void omap_device_delete(struct omap_device *od)
3926 struct platform_device __init *omap_device_build(const char *pdev_name,
3927 int pdev_id,
3928 struct omap_hwmod *oh,
3929 @@ -3471,7 +3430,7 @@ index 72ebc4c..18c4406 100644
3930 {
3931 struct omap_hwmod *ohs[] = { oh };
3932
3933 -@@ -532,7 +532,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
3934 +@@ -543,7 +543,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
3935 struct platform_device __init *omap_device_build_ss(const char *pdev_name,
3936 int pdev_id,
3937 struct omap_hwmod **ohs,
3938 @@ -3500,7 +3459,7 @@ index 78c02b3..c94109a 100644
3939 struct omap_device *omap_device_alloc(struct platform_device *pdev,
3940 struct omap_hwmod **ohs, int oh_cnt);
3941 diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
3942 -index 8e0bd59..1d0b85e 100644
3943 +index b6d62e4..6ba9f74 100644
3944 --- a/arch/arm/mach-omap2/omap_hwmod.c
3945 +++ b/arch/arm/mach-omap2/omap_hwmod.c
3946 @@ -200,10 +200,10 @@ struct omap_hwmod_soc_ops {
3947 @@ -3564,7 +3523,7 @@ index ff0a68c..b312aa0 100644
3948 sizeof(struct omap_wd_timer_platform_data));
3949 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
3950 diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
3951 -index 911884f..2f3aa90 100644
3952 +index aba75c8..b55a9d7 100644
3953 --- a/arch/arm/mach-shmobile/platsmp-apmu.c
3954 +++ b/arch/arm/mach-shmobile/platsmp-apmu.c
3955 @@ -22,6 +22,7 @@
3956 @@ -3575,7 +3534,7 @@ index 911884f..2f3aa90 100644
3957 #include "common.h"
3958 #include "platsmp-apmu.h"
3959
3960 -@@ -233,6 +234,8 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
3961 +@@ -232,6 +233,8 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
3962
3963 void __init shmobile_smp_apmu_suspend_init(void)
3964 {
3965 @@ -3623,7 +3582,7 @@ index 8538910..2f39bc4 100644
3966 #include <linux/delay.h>
3967 #include <linux/io.h>
3968 diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
3969 -index f66816c..228b951 100644
3970 +index 7cd9865..a00b6ab 100644
3971 --- a/arch/arm/mach-zynq/platsmp.c
3972 +++ b/arch/arm/mach-zynq/platsmp.c
3973 @@ -24,6 +24,7 @@
3974 @@ -3635,7 +3594,7 @@ index f66816c..228b951 100644
3975 #include "common.h"
3976
3977 diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
3978 -index 4121886..d24c0a1 100644
3979 +index 549f6d3..909a9dc 100644
3980 --- a/arch/arm/mm/Kconfig
3981 +++ b/arch/arm/mm/Kconfig
3982 @@ -442,6 +442,7 @@ config CPU_32v5
3983 @@ -3682,7 +3641,7 @@ index 4121886..d24c0a1 100644
3984 select GENERIC_TIME_VSYSCALL
3985 help
3986 diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
3987 -index 493692d..42a4504 100644
3988 +index 9f9d542..5189649 100644
3989 --- a/arch/arm/mm/cache-l2x0.c
3990 +++ b/arch/arm/mm/cache-l2x0.c
3991 @@ -44,7 +44,7 @@ struct l2c_init_data {
3992 @@ -3993,10 +3952,10 @@ index 05ec5e0..0b70277 100644
3993 unsigned long search_exception_table(unsigned long addr);
3994 void early_abt_enable(void);
3995 diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
3996 -index 7f8cd1b..6ac64cd 100644
3997 +index 49bd081..a4502de 100644
3998 --- a/arch/arm/mm/init.c
3999 +++ b/arch/arm/mm/init.c
4000 -@@ -742,7 +742,46 @@ void free_tcmmem(void)
4001 +@@ -745,7 +745,46 @@ void free_tcmmem(void)
4002 {
4003 #ifdef CONFIG_HAVE_TCM
4004 extern char __tcm_start, __tcm_end;
4005 @@ -4044,10 +4003,10 @@ index 7f8cd1b..6ac64cd 100644
4006 free_reserved_area(&__tcm_start, &__tcm_end, -1, "TCM link");
4007 #endif
4008 diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
4009 -index 0c81056..97279f7 100644
4010 +index 66a978d..e808c4b 100644
4011 --- a/arch/arm/mm/ioremap.c
4012 +++ b/arch/arm/mm/ioremap.c
4013 -@@ -405,9 +405,9 @@ __arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached)
4014 +@@ -406,9 +406,9 @@ __arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached)
4015 unsigned int mtype;
4016
4017 if (cached)
4018 @@ -4060,7 +4019,7 @@ index 0c81056..97279f7 100644
4019 return __arm_ioremap_caller(phys_addr, size, mtype,
4020 __builtin_return_address(0));
4021 diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
4022 -index 407dc78..047ce9d 100644
4023 +index 66353ca..8aad9f8 100644
4024 --- a/arch/arm/mm/mmap.c
4025 +++ b/arch/arm/mm/mmap.c
4026 @@ -59,6 +59,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
4027 @@ -4092,7 +4051,7 @@ index 407dc78..047ce9d 100644
4028 return addr;
4029 }
4030
4031 -@@ -99,6 +103,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
4032 +@@ -99,19 +103,21 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
4033 info.high_limit = TASK_SIZE;
4034 info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
4035 info.align_offset = pgoff << PAGE_SHIFT;
4036 @@ -4100,7 +4059,16 @@ index 407dc78..047ce9d 100644
4037 return vm_unmapped_area(&info);
4038 }
4039
4040 -@@ -112,6 +117,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
4041 + unsigned long
4042 +-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
4043 +- const unsigned long len, const unsigned long pgoff,
4044 +- const unsigned long flags)
4045 ++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
4046 ++ unsigned long len, unsigned long pgoff,
4047 ++ unsigned long flags)
4048 + {
4049 + struct vm_area_struct *vma;
4050 + struct mm_struct *mm = current->mm;
4051 unsigned long addr = addr0;
4052 int do_align = 0;
4053 int aliasing = cache_is_vipt_aliasing();
4054 @@ -4137,7 +4105,7 @@ index 407dc78..047ce9d 100644
4055 addr = vm_unmapped_area(&info);
4056
4057 /*
4058 -@@ -183,14 +193,30 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
4059 +@@ -182,14 +192,30 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
4060 {
4061 unsigned long random_factor = 0UL;
4062
4063 @@ -4169,7 +4137,7 @@ index 407dc78..047ce9d 100644
4064 }
4065 }
4066 diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
4067 -index 4867f5d..dbfed1e 100644
4068 +index 434d76f..af843d5 100644
4069 --- a/arch/arm/mm/mmu.c
4070 +++ b/arch/arm/mm/mmu.c
4071 @@ -243,7 +243,15 @@ __setup("noalign", noalign_setup);
4072 @@ -4374,7 +4342,7 @@ index 4867f5d..dbfed1e 100644
4073 break;
4074 }
4075 pr_info("Memory policy: %sData cache %s\n",
4076 -@@ -896,7 +937,7 @@ static void __init create_mapping(struct map_desc *md)
4077 +@@ -958,7 +999,7 @@ static void __init create_mapping(struct map_desc *md)
4078 return;
4079 }
4080
4081 @@ -4383,7 +4351,7 @@ index 4867f5d..dbfed1e 100644
4082 md->virtual >= PAGE_OFFSET && md->virtual < FIXADDR_START &&
4083 (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) {
4084 pr_warn("BUG: mapping for 0x%08llx at 0x%08lx out of vmalloc space\n",
4085 -@@ -1266,18 +1307,15 @@ void __init arm_mm_memblock_reserve(void)
4086 +@@ -1309,18 +1350,15 @@ void __init arm_mm_memblock_reserve(void)
4087 * Any other function or debugging method which may touch any device _will_
4088 * crash the kernel.
4089 */
4090 @@ -4406,7 +4374,7 @@ index 4867f5d..dbfed1e 100644
4091
4092 /*
4093 * Clear page table except top pmd used by early fixmaps
4094 -@@ -1293,7 +1331,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
4095 +@@ -1336,7 +1374,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
4096 map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK);
4097 map.virtual = MODULES_VADDR;
4098 map.length = ((unsigned long)_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK;
4099 @@ -4415,7 +4383,7 @@ index 4867f5d..dbfed1e 100644
4100 create_mapping(&map);
4101 #endif
4102
4103 -@@ -1304,14 +1342,14 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
4104 +@@ -1347,14 +1385,14 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
4105 map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS);
4106 map.virtual = FLUSH_BASE;
4107 map.length = SZ_1M;
4108 @@ -4432,7 +4400,7 @@ index 4867f5d..dbfed1e 100644
4109 create_mapping(&map);
4110 #endif
4111
4112 -@@ -1320,7 +1358,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
4113 +@@ -1363,7 +1401,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
4114 * location (0xffff0000). If we aren't using high-vectors, also
4115 * create a mapping at the low-vectors virtual address.
4116 */
4117 @@ -4441,7 +4409,7 @@ index 4867f5d..dbfed1e 100644
4118 map.virtual = 0xffff0000;
4119 map.length = PAGE_SIZE;
4120 #ifdef CONFIG_KUSER_HELPERS
4121 -@@ -1383,8 +1421,10 @@ static void __init kmap_init(void)
4122 +@@ -1426,8 +1464,10 @@ static void __init kmap_init(void)
4123 static void __init map_lowmem(void)
4124 {
4125 struct memblock_region *reg;
4126 @@ -4452,7 +4420,7 @@ index 4867f5d..dbfed1e 100644
4127
4128 /* Map all the lowmem memory banks. */
4129 for_each_memblock(memory, reg) {
4130 -@@ -1397,11 +1437,48 @@ static void __init map_lowmem(void)
4131 +@@ -1443,11 +1483,48 @@ static void __init map_lowmem(void)
4132 if (start >= end)
4133 break;
4134
4135 @@ -4502,7 +4470,7 @@ index 4867f5d..dbfed1e 100644
4136
4137 create_mapping(&map);
4138 } else if (start >= kernel_x_end) {
4139 -@@ -1425,7 +1502,7 @@ static void __init map_lowmem(void)
4140 +@@ -1471,7 +1548,7 @@ static void __init map_lowmem(void)
4141 map.pfn = __phys_to_pfn(kernel_x_start);
4142 map.virtual = __phys_to_virt(kernel_x_start);
4143 map.length = kernel_x_end - kernel_x_start;
4144 @@ -4511,7 +4479,7 @@ index 4867f5d..dbfed1e 100644
4145
4146 create_mapping(&map);
4147
4148 -@@ -1438,6 +1515,7 @@ static void __init map_lowmem(void)
4149 +@@ -1484,6 +1561,7 @@ static void __init map_lowmem(void)
4150 create_mapping(&map);
4151 }
4152 }
4153 @@ -4519,20 +4487,6 @@ index 4867f5d..dbfed1e 100644
4154 }
4155 }
4156
4157 -diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c
4158 -index cf30daf..d19b1ad 100644
4159 ---- a/arch/arm/mm/pageattr.c
4160 -+++ b/arch/arm/mm/pageattr.c
4161 -@@ -49,6 +49,9 @@ static int change_memory_common(unsigned long addr, int numpages,
4162 - WARN_ON_ONCE(1);
4163 - }
4164 -
4165 -+ if (!numpages)
4166 -+ return 0;
4167 -+
4168 - if (start < MODULES_VADDR || start >= MODULES_END)
4169 - return -EINVAL;
4170 -
4171 diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
4172 index 93d0b6d..2db6d99 100644
4173 --- a/arch/arm/net/bpf_jit_32.c
4174 @@ -4677,7 +4631,7 @@ index a5bc92d..0bb4730 100644
4175 + pax_close_kernel();
4176 }
4177 diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
4178 -index 04fb73b..368beca 100644
4179 +index e13c4bf..3feaea7 100644
4180 --- a/arch/arm64/Kconfig.debug
4181 +++ b/arch/arm64/Kconfig.debug
4182 @@ -6,6 +6,7 @@ config ARM64_PTDUMP
4183 @@ -4762,7 +4716,7 @@ index b2ede967..865eed5 100644
4184 #define user_addr_max get_fs
4185
4186 diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
4187 -index 354144e..f8c556b 100644
4188 +index a6e757c..00fc586 100644
4189 --- a/arch/arm64/mm/dma-mapping.c
4190 +++ b/arch/arm64/mm/dma-mapping.c
4191 @@ -132,7 +132,7 @@ static void __dma_free_coherent(struct device *dev, size_t size,
4192 @@ -5036,10 +4990,10 @@ index 69952c18..4fa2908 100644
4193 #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
4194
4195 diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
4196 -index eb0249e..388ff32 100644
4197 +index fb0515e..ca9715a 100644
4198 --- a/arch/ia64/Kconfig
4199 +++ b/arch/ia64/Kconfig
4200 -@@ -519,6 +519,7 @@ config KEXEC
4201 +@@ -518,6 +518,7 @@ config KEXEC
4202 bool "kexec system call"
4203 depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
4204 select KEXEC_CORE
4205 @@ -5261,84 +5215,57 @@ index 4f3fb6cc..254055e 100644
4206 })
4207
4208 diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
4209 -index b15933c..098b1c8 100644
4210 +index 6ab0ae7..88f1b60 100644
4211 --- a/arch/ia64/kernel/module.c
4212 +++ b/arch/ia64/kernel/module.c
4213 -@@ -484,15 +484,39 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
4214 - }
4215 -
4216 +@@ -486,13 +486,13 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
4217 static inline int
4218 -+in_init_rx (const struct module *mod, uint64_t addr)
4219 -+{
4220 -+ return addr - (uint64_t) mod->module_init_rx < mod->init_size_rx;
4221 -+}
4222 -+
4223 -+static inline int
4224 -+in_init_rw (const struct module *mod, uint64_t addr)
4225 -+{
4226 -+ return addr - (uint64_t) mod->module_init_rw < mod->init_size_rw;
4227 -+}
4228 -+
4229 -+static inline int
4230 in_init (const struct module *mod, uint64_t addr)
4231 {
4232 -- return addr - (uint64_t) mod->module_init < mod->init_size;
4233 -+ return in_init_rx(mod, addr) || in_init_rw(mod, addr);
4234 -+}
4235 -+
4236 -+static inline int
4237 -+in_core_rx (const struct module *mod, uint64_t addr)
4238 -+{
4239 -+ return addr - (uint64_t) mod->module_core_rx < mod->core_size_rx;
4240 -+}
4241 -+
4242 -+static inline int
4243 -+in_core_rw (const struct module *mod, uint64_t addr)
4244 -+{
4245 -+ return addr - (uint64_t) mod->module_core_rw < mod->core_size_rw;
4246 +- return addr - (uint64_t) mod->init_layout.base < mod->init_layout.size;
4247 ++ return within_module_init(addr, mod);
4248 }
4249
4250 static inline int
4251 in_core (const struct module *mod, uint64_t addr)
4252 {
4253 -- return addr - (uint64_t) mod->module_core < mod->core_size;
4254 -+ return in_core_rx(mod, addr) || in_core_rw(mod, addr);
4255 +- return addr - (uint64_t) mod->core_layout.base < mod->core_layout.size;
4256 ++ return within_module_core(addr, mod);
4257 }
4258
4259 static inline int
4260 -@@ -675,7 +699,14 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
4261 - break;
4262 +@@ -676,6 +676,14 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
4263
4264 case RV_BDREL:
4265 -- val -= (uint64_t) (in_init(mod, val) ? mod->module_init : mod->module_core);
4266 -+ if (in_init_rx(mod, val))
4267 -+ val -= (uint64_t) mod->module_init_rx;
4268 -+ else if (in_init_rw(mod, val))
4269 -+ val -= (uint64_t) mod->module_init_rw;
4270 -+ else if (in_core_rx(mod, val))
4271 -+ val -= (uint64_t) mod->module_core_rx;
4272 -+ else if (in_core_rw(mod, val))
4273 -+ val -= (uint64_t) mod->module_core_rw;
4274 + val -= (uint64_t) (in_init(mod, val) ? mod->init_layout.base : mod->core_layout.base);
4275 ++ if (within_module_rx(val, &mod->init_layout))
4276 ++ val -= mod->init_layout.base_rx;
4277 ++ else if (within_module_rw(val, &mod->init_layout))
4278 ++ val -= mod->init_layout.base_rw;
4279 ++ else if (within_module_rx(val, &mod->core_layout))
4280 ++ val -= mod->core_layout.base_rx;
4281 ++ else if (within_module_rw(val, &mod->core_layout))
4282 ++ val -= mod->core_layout.base_rw;
4283 break;
4284
4285 case RV_LTV:
4286 -@@ -810,15 +841,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
4287 +@@ -810,15 +818,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
4288 * addresses have been selected...
4289 */
4290 uint64_t gp;
4291 -- if (mod->core_size > MAX_LTOFF)
4292 -+ if (mod->core_size_rx + mod->core_size_rw > MAX_LTOFF)
4293 +- if (mod->core_layout.size > MAX_LTOFF)
4294 ++ if (mod->core_layout.size_rx + mod->core_layout.size_rw > MAX_LTOFF)
4295 /*
4296 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated
4297 * at the end of the module.
4298 */
4299 -- gp = mod->core_size - MAX_LTOFF / 2;
4300 -+ gp = mod->core_size_rx + mod->core_size_rw - MAX_LTOFF / 2;
4301 +- gp = mod->core_layout.size - MAX_LTOFF / 2;
4302 ++ gp = mod->core_layout.size_rx + mod->core_layout.size_rw - MAX_LTOFF / 2;
4303 else
4304 -- gp = mod->core_size / 2;
4305 -- gp = (uint64_t) mod->module_core + ((gp + 7) & -8);
4306 -+ gp = (mod->core_size_rx + mod->core_size_rw) / 2;
4307 -+ gp = (uint64_t) mod->module_core_rx + ((gp + 7) & -8);
4308 +- gp = mod->core_layout.size / 2;
4309 +- gp = (uint64_t) mod->core_layout.base + ((gp + 7) & -8);
4310 ++ gp = (mod->core_layout.size_rx + mod->core_layout.size_rw) / 2;
4311 ++ gp = (uint64_t) mod->core_layout.base_rx + ((gp + 7) & -8);
4312 mod->arch.gp = gp;
4313 DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
4314 }
4315 @@ -5594,10 +5521,10 @@ index 4efe96a..60e8699 100644
4316 #define SMP_CACHE_BYTES L1_CACHE_BYTES
4317
4318 diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
4319 -index db45961..6932668 100644
4320 +index d3da79d..e607104 100644
4321 --- a/arch/mips/Kconfig
4322 +++ b/arch/mips/Kconfig
4323 -@@ -2642,6 +2642,7 @@ source "kernel/Kconfig.preempt"
4324 +@@ -2656,6 +2656,7 @@ source "kernel/Kconfig.preempt"
4325 config KEXEC
4326 bool "Kexec system call"
4327 select KEXEC_CORE
4328 @@ -6255,10 +6182,10 @@ index b4db69f..8f3b093 100644
4329 #define SMP_CACHE_SHIFT L1_CACHE_SHIFT
4330 #define SMP_CACHE_BYTES L1_CACHE_BYTES
4331 diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
4332 -index b01a6ff..aa29db0 100644
4333 +index e090fc3..eae24400 100644
4334 --- a/arch/mips/include/asm/elf.h
4335 +++ b/arch/mips/include/asm/elf.h
4336 -@@ -420,6 +420,13 @@ extern const char *__elf_platform;
4337 +@@ -425,6 +425,13 @@ extern const char *__elf_platform;
4338 #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
4339 #endif
4340
4341 @@ -6418,7 +6345,7 @@ index b336037..5b874cc 100644
4342
4343 /*
4344 diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
4345 -index 18826aa..f5a6216 100644
4346 +index 9a4fe01..3aa92e9 100644
4347 --- a/arch/mips/include/asm/pgtable.h
4348 +++ b/arch/mips/include/asm/pgtable.h
4349 @@ -20,6 +20,9 @@
4350 @@ -6486,7 +6413,7 @@ index 095ecaf..f1da6ff 100644
4351 likely(__access_ok((addr), (size), __access_mask))
4352
4353 diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
4354 -index 1188e00..41cf144 100644
4355 +index 1b992c6..4f250db 100644
4356 --- a/arch/mips/kernel/binfmt_elfn32.c
4357 +++ b/arch/mips/kernel/binfmt_elfn32.c
4358 @@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
4359 @@ -6504,7 +6431,7 @@ index 1188e00..41cf144 100644
4360 #include <linux/module.h>
4361 #include <linux/elfcore.h>
4362 diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
4363 -index 9287678..f870e47 100644
4364 +index abd3aff..ab1b84a 100644
4365 --- a/arch/mips/kernel/binfmt_elfo32.c
4366 +++ b/arch/mips/kernel/binfmt_elfo32.c
4367 @@ -70,6 +70,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
4368 @@ -6590,10 +6517,10 @@ index f63a289..53037c22 100644
4369
4370 /* Run the generated entry code */
4371 diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
4372 -index f2975d4..f61d355 100644
4373 +index eddd5fd..97314be 100644
4374 --- a/arch/mips/kernel/process.c
4375 +++ b/arch/mips/kernel/process.c
4376 -@@ -541,18 +541,6 @@ out:
4377 +@@ -539,18 +539,6 @@ out:
4378 return pc;
4379 }
4380
4381 @@ -6613,10 +6540,10 @@ index f2975d4..f61d355 100644
4382 {
4383 struct pt_regs *regs;
4384 diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
4385 -index 4f0ac78..491124a 100644
4386 +index a5279b2..50b73be 100644
4387 --- a/arch/mips/kernel/ptrace.c
4388 +++ b/arch/mips/kernel/ptrace.c
4389 -@@ -873,6 +873,10 @@ long arch_ptrace(struct task_struct *child, long request,
4390 +@@ -870,6 +870,10 @@ long arch_ptrace(struct task_struct *child, long request,
4391 return ret;
4392 }
4393
4394 @@ -6627,7 +6554,7 @@ index 4f0ac78..491124a 100644
4395 /*
4396 * Notification of system call entry/exit
4397 * - triggered by current->work.syscall_trace
4398 -@@ -891,6 +895,11 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
4399 +@@ -888,6 +892,11 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
4400 tracehook_report_syscall_entry(regs))
4401 ret = -1;
4402
4403 @@ -6640,21 +6567,21 @@ index 4f0ac78..491124a 100644
4404 trace_sys_enter(regs, regs->regs[2]);
4405
4406 diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c
4407 -index 2242bdd..b284048 100644
4408 +index 4472a7f..c5905e6 100644
4409 --- a/arch/mips/kernel/sync-r4k.c
4410 +++ b/arch/mips/kernel/sync-r4k.c
4411 @@ -18,8 +18,8 @@
4412 #include <asm/mipsregs.h>
4413
4414 - static atomic_t count_start_flag = ATOMIC_INIT(0);
4415 + static unsigned int initcount = 0;
4416 -static atomic_t count_count_start = ATOMIC_INIT(0);
4417 -static atomic_t count_count_stop = ATOMIC_INIT(0);
4418 +static atomic_unchecked_t count_count_start = ATOMIC_INIT(0);
4419 +static atomic_unchecked_t count_count_stop = ATOMIC_INIT(0);
4420 - static atomic_t count_reference = ATOMIC_INIT(0);
4421
4422 #define COUNTON 100
4423 -@@ -58,13 +58,13 @@ void synchronise_count_master(int cpu)
4424 + #define NR_LOOPS 3
4425 +@@ -46,13 +46,13 @@ void synchronise_count_master(int cpu)
4426
4427 for (i = 0; i < NR_LOOPS; i++) {
4428 /* slaves loop on '!= 2' */
4429 @@ -6665,15 +6592,15 @@ index 2242bdd..b284048 100644
4430 + atomic_set_unchecked(&count_count_stop, 0);
4431 smp_wmb();
4432
4433 - /* this lets the slaves write their count register */
4434 + /* Let the slave writes its count register */
4435 - atomic_inc(&count_count_start);
4436 + atomic_inc_unchecked(&count_count_start);
4437
4438 + /* Count will be initialised to current timer */
4439 + if (i == 1)
4440 +@@ -67,11 +67,11 @@ void synchronise_count_master(int cpu)
4441 /*
4442 - * Everyone initialises count in the last loop:
4443 -@@ -75,11 +75,11 @@ void synchronise_count_master(int cpu)
4444 - /*
4445 - * Wait for all slaves to leave the synchronization point:
4446 + * Wait for slave to leave the synchronization point:
4447 */
4448 - while (atomic_read(&count_count_stop) != 1)
4449 + while (atomic_read_unchecked(&count_count_stop) != 1)
4450 @@ -6686,8 +6613,8 @@ index 2242bdd..b284048 100644
4451 }
4452 /* Arrange for an interrupt in a short while */
4453 write_c0_compare(read_c0_count() + COUNTON);
4454 -@@ -112,8 +112,8 @@ void synchronise_count_slave(int cpu)
4455 - initcount = atomic_read(&count_reference);
4456 +@@ -96,8 +96,8 @@ void synchronise_count_slave(int cpu)
4457 + */
4458
4459 for (i = 0; i < NR_LOOPS; i++) {
4460 - atomic_inc(&count_count_start);
4461 @@ -6697,7 +6624,7 @@ index 2242bdd..b284048 100644
4462 mb();
4463
4464 /*
4465 -@@ -122,8 +122,8 @@ void synchronise_count_slave(int cpu)
4466 +@@ -106,8 +106,8 @@ void synchronise_count_slave(int cpu)
4467 if (i == NR_LOOPS-1)
4468 write_c0_count(initcount);
4469
4470 @@ -6709,7 +6636,7 @@ index 2242bdd..b284048 100644
4471 }
4472 /* Arrange for an interrupt in a short while */
4473 diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
4474 -index ca9a810..e00a026 100644
4475 +index bf14da9..d1e0ded 100644
4476 --- a/arch/mips/kernel/traps.c
4477 +++ b/arch/mips/kernel/traps.c
4478 @@ -697,7 +697,18 @@ asmlinkage void do_ov(struct pt_regs *regs)
4479 @@ -6903,8 +6830,25 @@ index 4b88fa0..b16bc17 100644
4480 tsk->thread.cp0_badvaddr = address;
4481 tsk->thread.error_code = write;
4482 if (show_unhandled_signals &&
4483 +diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
4484 +index 7e5fa09..65c1072 100644
4485 +--- a/arch/mips/mm/init.c
4486 ++++ b/arch/mips/mm/init.c
4487 +@@ -468,10 +468,10 @@ void __init mem_init(void)
4488 +
4489 + #ifdef CONFIG_64BIT
4490 + if ((unsigned long) &_text > (unsigned long) CKSEG0)
4491 +- /* The -4 is a hack so that user tools don't have to handle
4492 ++ /* The -0x2000-4 is a hack so that user tools don't have to handle
4493 + the overflow. */
4494 + kclist_add(&kcore_kseg0, (void *) CKSEG0,
4495 +- 0x80000000 - 4, KCORE_TEXT);
4496 ++ 0x80000000 - 0x2000 - 4, KCORE_TEXT);
4497 + #endif
4498 + }
4499 + #endif /* !CONFIG_NEED_MULTIPLE_NODES */
4500 diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c
4501 -index 5c81fdd..db158d3 100644
4502 +index 3530376..81fb96b 100644
4503 --- a/arch/mips/mm/mmap.c
4504 +++ b/arch/mips/mm/mmap.c
4505 @@ -59,6 +59,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
4506 @@ -6978,7 +6922,7 @@ index 5c81fdd..db158d3 100644
4507
4508 -static inline unsigned long brk_rnd(void)
4509 -{
4510 -- unsigned long rnd = get_random_int();
4511 +- unsigned long rnd = get_random_long();
4512 -
4513 - rnd = rnd << PAGE_SHIFT;
4514 - /* 8MB for 32bit, 256MB for 64bit */
4515 @@ -7120,6 +7064,19 @@ index bcb5df2..84fabd2 100644
4516 #define L1_CACHE_WAYDISP 0x1000 /* distance from one way to the next */
4517
4518 #define L1_CACHE_TAG_VALID 0x00000001 /* cache tag valid bit */
4519 +diff --git a/arch/nios2/lib/memset.c b/arch/nios2/lib/memset.c
4520 +index c2cfcb1..2fcefe7 100644
4521 +--- a/arch/nios2/lib/memset.c
4522 ++++ b/arch/nios2/lib/memset.c
4523 +@@ -68,7 +68,7 @@ void *memset(void *s, int c, size_t count)
4524 + "=r" (charcnt), /* %1 Output */
4525 + "=r" (dwordcnt), /* %2 Output */
4526 + "=r" (fill8reg), /* %3 Output */
4527 +- "=r" (wrkrega) /* %4 Output */
4528 ++ "=&r" (wrkrega) /* %4 Output only */
4529 + : "r" (c), /* %5 Input */
4530 + "0" (s), /* %0 Input/Output */
4531 + "1" (count) /* %1 Input/Output */
4532 diff --git a/arch/openrisc/include/asm/cache.h b/arch/openrisc/include/asm/cache.h
4533 index 4ce7a01..449202a 100644
4534 --- a/arch/openrisc/include/asm/cache.h
4535 @@ -7263,105 +7220,79 @@ index 1960b87..e8f57e3 100644
4536 else
4537 copy_from_user_overflow();
4538 diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
4539 -index 3c63a82..b1d6ee9 100644
4540 +index b9d75d9..dae5c9a 100644
4541 --- a/arch/parisc/kernel/module.c
4542 +++ b/arch/parisc/kernel/module.c
4543 -@@ -98,16 +98,38 @@
4544 -
4545 - /* three functions to determine where in the module core
4546 +@@ -100,14 +100,12 @@
4547 * or init pieces the location is */
4548 -+static inline int in_init_rx(struct module *me, void *loc)
4549 -+{
4550 -+ return (loc >= me->module_init_rx &&
4551 -+ loc < (me->module_init_rx + me->init_size_rx));
4552 -+}
4553 -+
4554 -+static inline int in_init_rw(struct module *me, void *loc)
4555 -+{
4556 -+ return (loc >= me->module_init_rw &&
4557 -+ loc < (me->module_init_rw + me->init_size_rw));
4558 -+}
4559 -+
4560 static inline int in_init(struct module *me, void *loc)
4561 {
4562 -- return (loc >= me->module_init &&
4563 -- loc <= (me->module_init + me->init_size));
4564 -+ return in_init_rx(me, loc) || in_init_rw(me, loc);
4565 -+}
4566 -+
4567 -+static inline int in_core_rx(struct module *me, void *loc)
4568 -+{
4569 -+ return (loc >= me->module_core_rx &&
4570 -+ loc < (me->module_core_rx + me->core_size_rx));
4571 -+}
4572 -+
4573 -+static inline int in_core_rw(struct module *me, void *loc)
4574 -+{
4575 -+ return (loc >= me->module_core_rw &&
4576 -+ loc < (me->module_core_rw + me->core_size_rw));
4577 +- return (loc >= me->init_layout.base &&
4578 +- loc <= (me->init_layout.base + me->init_layout.size));
4579 ++ within_module_init((unsigned long)loc, me);
4580 }
4581
4582 static inline int in_core(struct module *me, void *loc)
4583 {
4584 -- return (loc >= me->module_core &&
4585 -- loc <= (me->module_core + me->core_size));
4586 -+ return in_core_rx(me, loc) || in_core_rw(me, loc);
4587 +- return (loc >= me->core_layout.base &&
4588 +- loc <= (me->core_layout.base + me->core_layout.size));
4589 ++ within_module_core((unsigned long)loc, me);
4590 }
4591
4592 static inline int in_local(struct module *me, void *loc)
4593 -@@ -367,13 +389,13 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
4594 +@@ -367,13 +365,13 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
4595 }
4596
4597 /* align things a bit */
4598 -- me->core_size = ALIGN(me->core_size, 16);
4599 -- me->arch.got_offset = me->core_size;
4600 -- me->core_size += gots * sizeof(struct got_entry);
4601 -+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
4602 -+ me->arch.got_offset = me->core_size_rw;
4603 -+ me->core_size_rw += gots * sizeof(struct got_entry);
4604 -
4605 -- me->core_size = ALIGN(me->core_size, 16);
4606 -- me->arch.fdesc_offset = me->core_size;
4607 -- me->core_size += fdescs * sizeof(Elf_Fdesc);
4608 -+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
4609 -+ me->arch.fdesc_offset = me->core_size_rw;
4610 -+ me->core_size_rw += fdescs * sizeof(Elf_Fdesc);
4611 +- me->core_layout.size = ALIGN(me->core_layout.size, 16);
4612 +- me->arch.got_offset = me->core_layout.size;
4613 +- me->core_layout.size += gots * sizeof(struct got_entry);
4614 ++ me->core_layout.size_rw = ALIGN(me->core_layout.size_rw, 16);
4615 ++ me->arch.got_offset = me->core_layout.size_rw;
4616 ++ me->core_layout.size_rw += gots * sizeof(struct got_entry);
4617 +
4618 +- me->core_layout.size = ALIGN(me->core_layout.size, 16);
4619 +- me->arch.fdesc_offset = me->core_layout.size;
4620 +- me->core_layout.size += fdescs * sizeof(Elf_Fdesc);
4621 ++ me->core_layout.size_rw = ALIGN(me->core_layout.size_rw, 16);
4622 ++ me->arch.fdesc_offset = me->core_layout.size_rw;
4623 ++ me->core_layout.size_rw += fdescs * sizeof(Elf_Fdesc);
4624
4625 me->arch.got_max = gots;
4626 me->arch.fdesc_max = fdescs;
4627 -@@ -391,7 +413,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
4628 +@@ -391,7 +389,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
4629
4630 BUG_ON(value == 0);
4631
4632 -- got = me->module_core + me->arch.got_offset;
4633 -+ got = me->module_core_rw + me->arch.got_offset;
4634 +- got = me->core_layout.base + me->arch.got_offset;
4635 ++ got = me->core_layout.base_rw + me->arch.got_offset;
4636 for (i = 0; got[i].addr; i++)
4637 if (got[i].addr == value)
4638 goto out;
4639 -@@ -409,7 +431,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
4640 +@@ -409,7 +407,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
4641 #ifdef CONFIG_64BIT
4642 static Elf_Addr get_fdesc(struct module *me, unsigned long value)
4643 {
4644 -- Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset;
4645 -+ Elf_Fdesc *fdesc = me->module_core_rw + me->arch.fdesc_offset;
4646 +- Elf_Fdesc *fdesc = me->core_layout.base + me->arch.fdesc_offset;
4647 ++ Elf_Fdesc *fdesc = me->core_layout.base_rw + me->arch.fdesc_offset;
4648
4649 if (!value) {
4650 printk(KERN_ERR "%s: zero OPD requested!\n", me->name);
4651 -@@ -427,7 +449,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
4652 +@@ -427,7 +425,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
4653
4654 /* Create new one */
4655 fdesc->addr = value;
4656 -- fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset;
4657 -+ fdesc->gp = (Elf_Addr)me->module_core_rw + me->arch.got_offset;
4658 +- fdesc->gp = (Elf_Addr)me->core_layout.base + me->arch.got_offset;
4659 ++ fdesc->gp = (Elf_Addr)me->core_layout.base_rw + me->arch.got_offset;
4660 return (Elf_Addr)fdesc;
4661 }
4662 #endif /* CONFIG_64BIT */
4663 -@@ -839,7 +861,7 @@ register_unwind_table(struct module *me,
4664 +@@ -839,7 +837,7 @@ register_unwind_table(struct module *me,
4665
4666 table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr;
4667 end = table + sechdrs[me->arch.unwind_section].sh_size;
4668 -- gp = (Elf_Addr)me->module_core + me->arch.got_offset;
4669 -+ gp = (Elf_Addr)me->module_core_rw + me->arch.got_offset;
4670 +- gp = (Elf_Addr)me->core_layout.base + me->arch.got_offset;
4671 ++ gp = (Elf_Addr)me->core_layout.base_rw + me->arch.got_offset;
4672
4673 DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
4674 me->arch.unwind_section, table, end, gp);
4675 @@ -7626,10 +7557,10 @@ index f906444..0bb73ae 100644
4676 /*
4677 * If for any reason at all we couldn't handle the fault, make
4678 diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
4679 -index db49e0d..de977a0 100644
4680 +index 9faa18c..6061610 100644
4681 --- a/arch/powerpc/Kconfig
4682 +++ b/arch/powerpc/Kconfig
4683 -@@ -421,6 +421,7 @@ config KEXEC
4684 +@@ -419,6 +419,7 @@ config KEXEC
4685 bool "kexec system call"
4686 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
4687 select KEXEC_CORE
4688 @@ -8150,6 +8081,18 @@ index 55f106e..70cc82a 100644
4689 " subf %0,%2,%0 \n\
4690 2:"
4691 : "=&r" (t)
4692 +diff --git a/arch/powerpc/include/asm/book3s/32/hash.h b/arch/powerpc/include/asm/book3s/32/hash.h
4693 +index 264b754..187b7f6 100644
4694 +--- a/arch/powerpc/include/asm/book3s/32/hash.h
4695 ++++ b/arch/powerpc/include/asm/book3s/32/hash.h
4696 +@@ -20,6 +20,7 @@
4697 + #define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */
4698 + #define _PAGE_USER 0x004 /* usermode access allowed */
4699 + #define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
4700 ++#define _PAGE_EXEC _PAGE_GUARDED
4701 + #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
4702 + #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
4703 + #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
4704 diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h
4705 index 5f8229e..385d90b 100644
4706 --- a/arch/powerpc/include/asm/cache.h
4707 @@ -8313,7 +8256,7 @@ index 8565c25..2865190 100644
4708 return (vm_flags & VM_SAO) ? __pgprot(_PAGE_SAO) : __pgprot(0);
4709 }
4710 diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
4711 -index 3140c19..0c43168 100644
4712 +index e34124f..c146c14 100644
4713 --- a/arch/powerpc/include/asm/page.h
4714 +++ b/arch/powerpc/include/asm/page.h
4715 @@ -230,8 +230,9 @@ extern long long virt_phys_offset;
4716 @@ -8364,13 +8307,13 @@ index d908a46..3753f71 100644
4717 #include <asm-generic/getorder.h>
4718
4719 diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h
4720 -index 4b0be20..c15a27d 100644
4721 +index 69ef28a..216486d 100644
4722 --- a/arch/powerpc/include/asm/pgalloc-64.h
4723 +++ b/arch/powerpc/include/asm/pgalloc-64.h
4724 @@ -54,6 +54,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
4725 #ifndef CONFIG_PPC_64K_PAGES
4726
4727 - #define pgd_populate(MM, PGD, PUD) pgd_set(PGD, PUD)
4728 + #define pgd_populate(MM, PGD, PUD) pgd_set(PGD, (unsigned long)PUD)
4729 +#define pgd_populate_kernel(MM, PGD, PUD) pgd_populate((MM), (PGD), (PUD))
4730
4731 static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
4732 @@ -8384,10 +8327,10 @@ index 4b0be20..c15a27d 100644
4733 + pud_populate(mm, pud, pmd);
4734 +}
4735 +
4736 - #define pmd_populate(mm, pmd, pte_page) \
4737 - pmd_populate_kernel(mm, pmd, page_address(pte_page))
4738 - #define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, (unsigned long)(pte))
4739 -@@ -173,6 +179,7 @@ extern void __tlb_remove_table(void *_table);
4740 + static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
4741 + pte_t *pte)
4742 + {
4743 +@@ -172,6 +178,7 @@ extern void __tlb_remove_table(void *_table);
4744 #endif
4745
4746 #define pud_populate(mm, pud, pmd) pud_set(pud, (unsigned long)pmd)
4747 @@ -8396,31 +8339,19 @@ index 4b0be20..c15a27d 100644
4748 static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
4749 pte_t *pte)
4750 diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
4751 -index b64b421..cc8447a 100644
4752 +index ac9fb11..4efa476 100644
4753 --- a/arch/powerpc/include/asm/pgtable.h
4754 +++ b/arch/powerpc/include/asm/pgtable.h
4755 -@@ -2,6 +2,7 @@
4756 +@@ -1,6 +1,7 @@
4757 + #ifndef _ASM_POWERPC_PGTABLE_H
4758 #define _ASM_POWERPC_PGTABLE_H
4759 - #ifdef __KERNEL__
4760
4761 +#include <linux/const.h>
4762 #ifndef __ASSEMBLY__
4763 #include <linux/mmdebug.h>
4764 #include <linux/mmzone.h>
4765 -diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h
4766 -index 62cfb0c..50c6402 100644
4767 ---- a/arch/powerpc/include/asm/pte-hash32.h
4768 -+++ b/arch/powerpc/include/asm/pte-hash32.h
4769 -@@ -20,6 +20,7 @@
4770 - #define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */
4771 - #define _PAGE_USER 0x004 /* usermode access allowed */
4772 - #define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
4773 -+#define _PAGE_EXEC _PAGE_GUARDED
4774 - #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
4775 - #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
4776 - #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
4777 diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
4778 -index 2220f7a..5a9420e 100644
4779 +index c4cb2ff..b04130e 100644
4780 --- a/arch/powerpc/include/asm/reg.h
4781 +++ b/arch/powerpc/include/asm/reg.h
4782 @@ -253,6 +253,7 @@
4783 @@ -8537,7 +8468,7 @@ index 7efee4a..48d47cc 100644
4784 #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
4785 _TIF_NOTIFY_RESUME | _TIF_UPROBE | \
4786 diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
4787 -index 2a8ebae..5643c6f 100644
4788 +index b7c20f0..4adc0f1 100644
4789 --- a/arch/powerpc/include/asm/uaccess.h
4790 +++ b/arch/powerpc/include/asm/uaccess.h
4791 @@ -58,6 +58,7 @@
4792 @@ -8548,7 +8479,7 @@ index 2a8ebae..5643c6f 100644
4793 #define access_ok(type, addr, size) \
4794 (__chk_user_ptr(addr), \
4795 __access_ok((__force unsigned long)(addr), (size), get_fs()))
4796 -@@ -318,52 +319,6 @@ do { \
4797 +@@ -303,52 +304,6 @@ do { \
4798 extern unsigned long __copy_tofrom_user(void __user *to,
4799 const void __user *from, unsigned long size);
4800
4801 @@ -8601,7 +8532,7 @@ index 2a8ebae..5643c6f 100644
4802 static inline unsigned long __copy_from_user_inatomic(void *to,
4803 const void __user *from, unsigned long n)
4804 {
4805 -@@ -387,6 +342,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
4806 +@@ -372,6 +327,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
4807 if (ret == 0)
4808 return 0;
4809 }
4810 @@ -8612,7 +8543,7 @@ index 2a8ebae..5643c6f 100644
4811 return __copy_tofrom_user((__force void __user *)to, from, n);
4812 }
4813
4814 -@@ -413,6 +372,10 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
4815 +@@ -398,6 +357,10 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
4816 if (ret == 0)
4817 return 0;
4818 }
4819 @@ -8623,7 +8554,7 @@ index 2a8ebae..5643c6f 100644
4820 return __copy_tofrom_user(to, (__force const void __user *)from, n);
4821 }
4822
4823 -@@ -430,6 +393,92 @@ static inline unsigned long __copy_to_user(void __user *to,
4824 +@@ -415,6 +378,92 @@ static inline unsigned long __copy_to_user(void __user *to,
4825 return __copy_to_user_inatomic(to, from, size);
4826 }
4827
4828 @@ -8717,7 +8648,7 @@ index 2a8ebae..5643c6f 100644
4829
4830 static inline unsigned long clear_user(void __user *addr, unsigned long size)
4831 diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
4832 -index ba33693..d8db875 100644
4833 +index 794f22a..f8de42b 100644
4834 --- a/arch/powerpc/kernel/Makefile
4835 +++ b/arch/powerpc/kernel/Makefile
4836 @@ -14,6 +14,11 @@ CFLAGS_prom_init.o += -fPIC
4837 @@ -8764,10 +8695,10 @@ index 488e631..6cdd928 100644
4838 ld r4,_DAR(r1)
4839 bl bad_page_fault
4840 diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
4841 -index 0a0399c2..262a2e6 100644
4842 +index 7716ceb..6018173 100644
4843 --- a/arch/powerpc/kernel/exceptions-64s.S
4844 +++ b/arch/powerpc/kernel/exceptions-64s.S
4845 -@@ -1591,10 +1591,10 @@ handle_page_fault:
4846 +@@ -1572,10 +1572,10 @@ handle_page_fault:
4847 11: ld r4,_DAR(r1)
4848 ld r5,_DSISR(r1)
4849 addi r3,r1,STACK_FRAME_OVERHEAD
4850 @@ -8801,7 +8732,7 @@ index 290559d..0094ddb 100644
4851 #endif
4852 }
4853 diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
4854 -index c94d2e0..992a9ce 100644
4855 +index 2c01665..85a54a8 100644
4856 --- a/arch/powerpc/kernel/module_32.c
4857 +++ b/arch/powerpc/kernel/module_32.c
4858 @@ -158,7 +158,7 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
4859 @@ -8817,14 +8748,14 @@ index c94d2e0..992a9ce 100644
4860
4861 pr_debug("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
4862 /* Init, or core PLT? */
4863 -- if (location >= mod->module_core
4864 -- && location < mod->module_core + mod->core_size)
4865 -+ if ((location >= mod->module_core_rx && location < mod->module_core_rx + mod->core_size_rx) ||
4866 -+ (location >= mod->module_core_rw && location < mod->module_core_rw + mod->core_size_rw))
4867 +- if (location >= mod->core_layout.base
4868 +- && location < mod->core_layout.base + mod->core_layout.size)
4869 ++ if ((location >= mod->core_layout.base_rx && location < mod->core_layout.base_rx + mod->core_layout.size_rx) ||
4870 ++ (location >= mod->core_layout.base_rw && location < mod->core_layout.base_rw + mod->core_layout.size_rw))
4871 entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr;
4872 - else
4873 -+ else if ((location >= mod->module_init_rx && location < mod->module_init_rx + mod->init_size_rx) ||
4874 -+ (location >= mod->module_init_rw && location < mod->module_init_rw + mod->init_size_rw))
4875 ++ else if ((location >= mod->init_layout.base_rx && location < mod->init_layout.base_rx + mod->init_layout.size_rx) ||
4876 ++ (location >= mod->init_layout.base_rw && location < mod->init_layout.base_rw + mod->init_layout.size_rw))
4877 entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;
4878 + else {
4879 + printk(KERN_ERR "%s: invalid R_PPC_REL24 entry found\n", mod->name);
4880 @@ -8837,16 +8768,16 @@ index c94d2e0..992a9ce 100644
4881 }
4882 #ifdef CONFIG_DYNAMIC_FTRACE
4883 module->arch.tramp =
4884 -- do_plt_call(module->module_core,
4885 -+ do_plt_call(module->module_core_rx,
4886 +- do_plt_call(module->core_layout.base,
4887 ++ do_plt_call(module->core_layout.base_rx,
4888 (unsigned long)ftrace_caller,
4889 sechdrs, module);
4890 #endif
4891 diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
4892 -index ef2ad2d..645e131 100644
4893 +index 54ed9c7..f7d6e72 100644
4894 --- a/arch/powerpc/kernel/process.c
4895 +++ b/arch/powerpc/kernel/process.c
4896 -@@ -1069,8 +1069,8 @@ void show_regs(struct pt_regs * regs)
4897 +@@ -1185,8 +1185,8 @@ void show_regs(struct pt_regs * regs)
4898 * Lookup NIP late so we have the best change of getting the
4899 * above info out without failing
4900 */
4901 @@ -8857,7 +8788,7 @@ index ef2ad2d..645e131 100644
4902 #endif
4903 show_stack(current, (unsigned long *) regs->gpr[1]);
4904 if (!user_mode(regs))
4905 -@@ -1586,10 +1586,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
4906 +@@ -1695,10 +1695,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
4907 newsp = stack[0];
4908 ip = stack[STACK_FRAME_LR_SAVE];
4909 if (!firstframe || ip != lr) {
4910 @@ -8870,7 +8801,7 @@ index ef2ad2d..645e131 100644
4911 (void *)current->ret_stack[curr_frame].ret);
4912 curr_frame--;
4913 }
4914 -@@ -1609,7 +1609,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
4915 +@@ -1718,7 +1718,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
4916 struct pt_regs *regs = (struct pt_regs *)
4917 (sp + STACK_FRAME_OVERHEAD);
4918 lr = regs->link;
4919 @@ -8879,7 +8810,7 @@ index ef2ad2d..645e131 100644
4920 regs->trap, (void *)regs->nip, (void *)lr);
4921 firstframe = 1;
4922 }
4923 -@@ -1645,49 +1645,3 @@ void notrace __ppc64_runlatch_off(void)
4924 +@@ -1754,49 +1754,3 @@ void notrace __ppc64_runlatch_off(void)
4925 mtspr(SPRN_CTRLT, ctrl);
4926 }
4927 #endif /* CONFIG_PPC64 */
4928 @@ -8897,9 +8828,9 @@ index ef2ad2d..645e131 100644
4929 -
4930 - /* 8MB for 32bit, 1GB for 64bit */
4931 - if (is_32bit_task())
4932 -- rnd = (long)(get_random_int() % (1<<(23-PAGE_SHIFT)));
4933 +- rnd = (get_random_long() % (1UL<<(23-PAGE_SHIFT)));
4934 - else
4935 -- rnd = (long)(get_random_int() % (1<<(30-PAGE_SHIFT)));
4936 +- rnd = (get_random_long() % (1UL<<(30-PAGE_SHIFT)));
4937 -
4938 - return rnd << PAGE_SHIFT;
4939 -}
4940 @@ -8930,10 +8861,10 @@ index ef2ad2d..645e131 100644
4941 -}
4942 -
4943 diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
4944 -index 737c0d0..59c7417 100644
4945 +index 30a03c0..e2d507b 100644
4946 --- a/arch/powerpc/kernel/ptrace.c
4947 +++ b/arch/powerpc/kernel/ptrace.c
4948 -@@ -1800,6 +1800,10 @@ static int do_seccomp(struct pt_regs *regs)
4949 +@@ -1801,6 +1801,10 @@ static int do_seccomp(struct pt_regs *regs)
4950 static inline int do_seccomp(struct pt_regs *regs) { return 0; }
4951 #endif /* CONFIG_SECCOMP */
4952
4953 @@ -8944,7 +8875,7 @@ index 737c0d0..59c7417 100644
4954 /**
4955 * do_syscall_trace_enter() - Do syscall tracing on kernel entry.
4956 * @regs: the pt_regs of the task to trace (current)
4957 -@@ -1828,6 +1832,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
4958 +@@ -1829,6 +1833,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
4959 if (do_seccomp(regs))
4960 return -1;
4961
4962 @@ -8956,7 +8887,7 @@ index 737c0d0..59c7417 100644
4963 if (test_thread_flag(TIF_SYSCALL_TRACE)) {
4964 /*
4965 * The tracer may decide to abort the syscall, if so tracehook
4966 -@@ -1870,6 +1879,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
4967 +@@ -1871,6 +1880,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
4968 {
4969 int step;
4970
4971 @@ -8969,10 +8900,10 @@ index 737c0d0..59c7417 100644
4972
4973 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
4974 diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
4975 -index ef7c24e..755a485 100644
4976 +index b6aa378..a491f51 100644
4977 --- a/arch/powerpc/kernel/signal_32.c
4978 +++ b/arch/powerpc/kernel/signal_32.c
4979 -@@ -1018,7 +1018,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
4980 +@@ -1000,7 +1000,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
4981 /* Save user registers on the stack */
4982 frame = &rt_sf->uc.uc_mcontext;
4983 addr = frame;
4984 @@ -8982,10 +8913,10 @@ index ef7c24e..755a485 100644
4985 tramp = current->mm->context.vdso_base + vdso32_rt_sigtramp;
4986 } else {
4987 diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
4988 -index c676ece..188c057 100644
4989 +index 2552079..a290dc8a 100644
4990 --- a/arch/powerpc/kernel/signal_64.c
4991 +++ b/arch/powerpc/kernel/signal_64.c
4992 -@@ -769,7 +769,7 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
4993 +@@ -751,7 +751,7 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
4994 current->thread.fp_state.fpscr = 0;
4995
4996 /* Set up to return from userspace. */
4997 @@ -8995,7 +8926,7 @@ index c676ece..188c057 100644
4998 } else {
4999 err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
5000 diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
5001 -index 37de90f..12472ac 100644
5002 +index b6becc7..31a89c4 100644
5003 --- a/arch/powerpc/kernel/traps.c
5004 +++ b/arch/powerpc/kernel/traps.c
5005 @@ -36,6 +36,7 @@
5006 @@ -9053,7 +8984,7 @@ index 37de90f..12472ac 100644
5007 * has no FPU, in that case the reason flags will be 0 */
5008
5009 diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
5010 -index b457bfa..9018cde 100644
5011 +index def1b8b..51ae209 100644
5012 --- a/arch/powerpc/kernel/vdso.c
5013 +++ b/arch/powerpc/kernel/vdso.c
5014 @@ -34,6 +34,7 @@
5015 @@ -9218,7 +9149,7 @@ index a67c6d7..a662e6d 100644
5016 goto bail;
5017 }
5018 diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c
5019 -index 0f0502e..bc3e7a3 100644
5020 +index 4087705..7e75693 100644
5021 --- a/arch/powerpc/mm/mmap.c
5022 +++ b/arch/powerpc/mm/mmap.c
5023 @@ -86,6 +86,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
5024 @@ -9255,7 +9186,7 @@ index 0f0502e..bc3e7a3 100644
5025 }
5026 }
5027 diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
5028 -index 0f432a7..abfe841 100644
5029 +index 42954f0..a8252e2 100644
5030 --- a/arch/powerpc/mm/slice.c
5031 +++ b/arch/powerpc/mm/slice.c
5032 @@ -105,7 +105,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
5033 @@ -9267,7 +9198,7 @@ index 0f432a7..abfe841 100644
5034 }
5035
5036 static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice)
5037 -@@ -277,6 +277,12 @@ static unsigned long slice_find_area_bottomup(struct mm_struct *mm,
5038 +@@ -276,6 +276,12 @@ static unsigned long slice_find_area_bottomup(struct mm_struct *mm,
5039 info.align_offset = 0;
5040
5041 addr = TASK_UNMAPPED_BASE;
5042 @@ -9280,7 +9211,7 @@ index 0f432a7..abfe841 100644
5043 while (addr < TASK_SIZE) {
5044 info.low_limit = addr;
5045 if (!slice_scan_available(addr, available, 1, &addr))
5046 -@@ -410,6 +416,11 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
5047 +@@ -409,6 +415,11 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
5048 if (fixed && addr > (mm->task_size - len))
5049 return -ENOMEM;
5050
5051 @@ -9292,8 +9223,23 @@ index 0f432a7..abfe841 100644
5052 /* If hint, make sure it matches our alignment restrictions */
5053 if (!fixed && addr) {
5054 addr = _ALIGN_UP(addr, 1ul << pshift);
5055 +@@ -554,10 +565,10 @@ unsigned long arch_get_unmapped_area(struct file *filp,
5056 + }
5057 +
5058 + unsigned long arch_get_unmapped_area_topdown(struct file *filp,
5059 +- const unsigned long addr0,
5060 +- const unsigned long len,
5061 +- const unsigned long pgoff,
5062 +- const unsigned long flags)
5063 ++ unsigned long addr0,
5064 ++ unsigned long len,
5065 ++ unsigned long pgoff,
5066 ++ unsigned long flags)
5067 + {
5068 + return slice_get_unmapped_area(addr0, len, flags,
5069 + current->mm->context.user_psize, 1);
5070 diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
5071 -index 5038fd5..87a2033 100644
5072 +index 2936a00..2e73ed6 100644
5073 --- a/arch/powerpc/platforms/cell/spufs/file.c
5074 +++ b/arch/powerpc/platforms/cell/spufs/file.c
5075 @@ -263,9 +263,9 @@ spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
5076 @@ -9309,10 +9255,10 @@ index 5038fd5..87a2033 100644
5077 struct spu_context *ctx = vma->vm_file->private_data;
5078 unsigned long offset = address - vma->vm_start;
5079 diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug
5080 -index c56878e..073d04e 100644
5081 +index 26c5d5be..a308c28 100644
5082 --- a/arch/s390/Kconfig.debug
5083 +++ b/arch/s390/Kconfig.debug
5084 -@@ -21,6 +21,7 @@ config S390_PTDUMP
5085 +@@ -9,6 +9,7 @@ config S390_PTDUMP
5086 bool "Export kernel pagetable layout to userspace via debugfs"
5087 depends on DEBUG_KERNEL
5088 select DEBUG_FS
5089 @@ -9356,10 +9302,10 @@ index 4d7ccac..d03d0ad 100644
5090
5091 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
5092 diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
5093 -index bab6739..f0d5493 100644
5094 +index 563ab9f..65d8bd4 100644
5095 --- a/arch/s390/include/asm/elf.h
5096 +++ b/arch/s390/include/asm/elf.h
5097 -@@ -163,6 +163,13 @@ extern unsigned int vdso_enabled;
5098 +@@ -167,6 +167,13 @@ extern unsigned int vdso_enabled;
5099 (STACK_TOP / 3 * 2) : \
5100 (STACK_TOP / 3 * 2) & ~((1UL << 32) - 1))
5101
5102 @@ -9426,23 +9372,23 @@ index 9dd4cc4..36f4b84 100644
5103 return n;
5104 }
5105 diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
5106 -index 0c1a679..e1df357 100644
5107 +index 7873e17..d21af5b 100644
5108 --- a/arch/s390/kernel/module.c
5109 +++ b/arch/s390/kernel/module.c
5110 @@ -159,11 +159,11 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
5111
5112 /* Increase core size by size of got & plt and set start
5113 offsets for got and plt. */
5114 -- me->core_size = ALIGN(me->core_size, 4);
5115 -- me->arch.got_offset = me->core_size;
5116 -- me->core_size += me->arch.got_size;
5117 -- me->arch.plt_offset = me->core_size;
5118 -- me->core_size += me->arch.plt_size;
5119 -+ me->core_size_rw = ALIGN(me->core_size_rw, 4);
5120 -+ me->arch.got_offset = me->core_size_rw;
5121 -+ me->core_size_rw += me->arch.got_size;
5122 -+ me->arch.plt_offset = me->core_size_rx;
5123 -+ me->core_size_rx += me->arch.plt_size;
5124 +- me->core_layout.size = ALIGN(me->core_layout.size, 4);
5125 +- me->arch.got_offset = me->core_layout.size;
5126 +- me->core_layout.size += me->arch.got_size;
5127 +- me->arch.plt_offset = me->core_layout.size;
5128 +- me->core_layout.size += me->arch.plt_size;
5129 ++ me->core_layout.size_rw = ALIGN(me->core_layout.size_rw, 4);
5130 ++ me->arch.got_offset = me->core_layout.size_rw;
5131 ++ me->core_layout.size_rw += me->arch.got_size;
5132 ++ me->arch.plt_offset = me->core_layout.size_rx;
5133 ++ me->core_layout.size_rx += me->arch.plt_size;
5134 return 0;
5135 }
5136
5137 @@ -9450,8 +9396,8 @@ index 0c1a679..e1df357 100644
5138 if (info->got_initialized == 0) {
5139 Elf_Addr *gotent;
5140
5141 -- gotent = me->module_core + me->arch.got_offset +
5142 -+ gotent = me->module_core_rw + me->arch.got_offset +
5143 +- gotent = me->core_layout.base + me->arch.got_offset +
5144 ++ gotent = me->core_layout.base_rw + me->arch.got_offset +
5145 info->got_offset;
5146 *gotent = val;
5147 info->got_initialized = 1;
5148 @@ -9459,8 +9405,8 @@ index 0c1a679..e1df357 100644
5149 rc = apply_rela_bits(loc, val, 0, 64, 0);
5150 else if (r_type == R_390_GOTENT ||
5151 r_type == R_390_GOTPLTENT) {
5152 -- val += (Elf_Addr) me->module_core - loc;
5153 -+ val += (Elf_Addr) me->module_core_rw - loc;
5154 +- val += (Elf_Addr) me->core_layout.base - loc;
5155 ++ val += (Elf_Addr) me->core_layout.base_rw - loc;
5156 rc = apply_rela_bits(loc, val, 1, 32, 1);
5157 }
5158 break;
5159 @@ -9468,8 +9414,8 @@ index 0c1a679..e1df357 100644
5160 case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */
5161 if (info->plt_initialized == 0) {
5162 unsigned int *ip;
5163 -- ip = me->module_core + me->arch.plt_offset +
5164 -+ ip = me->module_core_rx + me->arch.plt_offset +
5165 +- ip = me->core_layout.base + me->arch.plt_offset +
5166 ++ ip = me->core_layout.base_rx + me->arch.plt_offset +
5167 info->plt_offset;
5168 ip[0] = 0x0d10e310; /* basr 1,0; lg 1,10(1); br 1 */
5169 ip[1] = 0x100a0004;
5170 @@ -9477,8 +9423,8 @@ index 0c1a679..e1df357 100644
5171 val - loc + 0xffffUL < 0x1ffffeUL) ||
5172 (r_type == R_390_PLT32DBL &&
5173 val - loc + 0xffffffffULL < 0x1fffffffeULL)))
5174 -- val = (Elf_Addr) me->module_core +
5175 -+ val = (Elf_Addr) me->module_core_rx +
5176 +- val = (Elf_Addr) me->core_layout.base +
5177 ++ val = (Elf_Addr) me->core_layout.base_rx +
5178 me->arch.plt_offset +
5179 info->plt_offset;
5180 val += rela->r_addend - loc;
5181 @@ -9486,8 +9432,8 @@ index 0c1a679..e1df357 100644
5182 case R_390_GOTOFF32: /* 32 bit offset to GOT. */
5183 case R_390_GOTOFF64: /* 64 bit offset to GOT. */
5184 val = val + rela->r_addend -
5185 -- ((Elf_Addr) me->module_core + me->arch.got_offset);
5186 -+ ((Elf_Addr) me->module_core_rw + me->arch.got_offset);
5187 +- ((Elf_Addr) me->core_layout.base + me->arch.got_offset);
5188 ++ ((Elf_Addr) me->core_layout.base_rw + me->arch.got_offset);
5189 if (r_type == R_390_GOTOFF16)
5190 rc = apply_rela_bits(loc, val, 0, 16, 0);
5191 else if (r_type == R_390_GOTOFF32)
5192 @@ -9495,13 +9441,13 @@ index 0c1a679..e1df357 100644
5193 break;
5194 case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */
5195 case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */
5196 -- val = (Elf_Addr) me->module_core + me->arch.got_offset +
5197 -+ val = (Elf_Addr) me->module_core_rw + me->arch.got_offset +
5198 +- val = (Elf_Addr) me->core_layout.base + me->arch.got_offset +
5199 ++ val = (Elf_Addr) me->core_layout.base_rw + me->arch.got_offset +
5200 rela->r_addend - loc;
5201 if (r_type == R_390_GOTPC)
5202 rc = apply_rela_bits(loc, val, 1, 32, 0);
5203 diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
5204 -index 114ee8b..7d1123f 100644
5205 +index 2bba7df..587489f 100644
5206 --- a/arch/s390/kernel/process.c
5207 +++ b/arch/s390/kernel/process.c
5208 @@ -233,23 +233,3 @@ unsigned long get_wchan(struct task_struct *p)
5209 @@ -9529,9 +9475,22 @@ index 114ee8b..7d1123f 100644
5210 - return (ret > mm->brk) ? ret : mm->brk;
5211 -}
5212 diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
5213 -index ea01477..ff5ec44 100644
5214 +index 45c4daa..42703fb 100644
5215 --- a/arch/s390/mm/mmap.c
5216 +++ b/arch/s390/mm/mmap.c
5217 +@@ -200,9 +200,9 @@ s390_get_unmapped_area(struct file *filp, unsigned long addr,
5218 + }
5219 +
5220 + static unsigned long
5221 +-s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr,
5222 +- const unsigned long len, const unsigned long pgoff,
5223 +- const unsigned long flags)
5224 ++s390_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
5225 ++ unsigned long len, unsigned long pgoff,
5226 ++ unsigned long flags)
5227 + {
5228 + struct mm_struct *mm = current->mm;
5229 + unsigned long area;
5230 @@ -229,6 +229,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
5231 {
5232 unsigned long random_factor = 0UL;
5233 @@ -9623,7 +9582,7 @@ index ef9e555..331bd29 100644
5234 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
5235
5236 diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
5237 -index 6777177..cb5e44f 100644
5238 +index 6777177..d44b592 100644
5239 --- a/arch/sh/mm/mmap.c
5240 +++ b/arch/sh/mm/mmap.c
5241 @@ -36,6 +36,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
5242 @@ -9662,7 +9621,18 @@ index 6777177..cb5e44f 100644
5243 info.high_limit = TASK_SIZE;
5244 info.align_mask = do_colour_align ? (PAGE_MASK & shm_align_mask) : 0;
5245 info.align_offset = pgoff << PAGE_SHIFT;
5246 -@@ -85,6 +89,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
5247 +@@ -77,14 +81,15 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
5248 + }
5249 +
5250 + unsigned long
5251 +-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
5252 +- const unsigned long len, const unsigned long pgoff,
5253 +- const unsigned long flags)
5254 ++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
5255 ++ unsigned long len, unsigned long pgoff,
5256 ++ unsigned long flags)
5257 + {
5258 + struct vm_area_struct *vma;
5259 struct mm_struct *mm = current->mm;
5260 unsigned long addr = addr0;
5261 int do_colour_align;
5262 @@ -10232,7 +10202,7 @@ index bd56c28..4b63d83 100644
5263 #include <asm/uaccess_64.h>
5264 #else
5265 diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
5266 -index 64ee103..388aef0 100644
5267 +index 57aca27..a87e6eb 100644
5268 --- a/arch/sparc/include/asm/uaccess_32.h
5269 +++ b/arch/sparc/include/asm/uaccess_32.h
5270 @@ -47,6 +47,7 @@
5271 @@ -10243,7 +10213,7 @@ index 64ee103..388aef0 100644
5272 #define access_ok(type, addr, size) \
5273 ({ (void)(type); __access_ok((unsigned long)(addr), size); })
5274
5275 -@@ -313,27 +314,46 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon
5276 +@@ -248,27 +249,46 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon
5277
5278 static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
5279 {
5280 @@ -10295,7 +10265,7 @@ index 64ee103..388aef0 100644
5281 }
5282
5283 diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
5284 -index ea6e9a2..5703598 100644
5285 +index e9a51d6..3ef910c 100644
5286 --- a/arch/sparc/include/asm/uaccess_64.h
5287 +++ b/arch/sparc/include/asm/uaccess_64.h
5288 @@ -10,6 +10,7 @@
5289 @@ -10318,7 +10288,7 @@ index ea6e9a2..5703598 100644
5290 static inline int access_ok(int type, const void __user * addr, unsigned long size)
5291 {
5292 return 1;
5293 -@@ -250,8 +256,15 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from,
5294 +@@ -210,8 +216,15 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from,
5295 static inline unsigned long __must_check
5296 copy_from_user(void *to, const void __user *from, unsigned long size)
5297 {
5298 @@ -10335,7 +10305,7 @@ index ea6e9a2..5703598 100644
5299 if (unlikely(ret))
5300 ret = copy_from_user_fixup(to, from, size);
5301
5302 -@@ -267,8 +280,15 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from,
5303 +@@ -227,8 +240,15 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from,
5304 static inline unsigned long __must_check
5305 copy_to_user(void __user *to, const void *from, unsigned long size)
5306 {
5307 @@ -10541,7 +10511,7 @@ index 646988d..b88905f 100644
5308 info.flags = 0;
5309 info.length = len;
5310 diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
5311 -index c690c8e..1d5798e 100644
5312 +index b489e97..44620ad 100644
5313 --- a/arch/sparc/kernel/sys_sparc_64.c
5314 +++ b/arch/sparc/kernel/sys_sparc_64.c
5315 @@ -89,13 +89,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
5316 @@ -10603,7 +10573,19 @@ index c690c8e..1d5798e 100644
5317 info.high_limit = task_size;
5318 addr = vm_unmapped_area(&info);
5319 }
5320 -@@ -150,6 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
5321 +@@ -141,15 +152,16 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
5322 + }
5323 +
5324 + unsigned long
5325 +-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
5326 +- const unsigned long len, const unsigned long pgoff,
5327 +- const unsigned long flags)
5328 ++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
5329 ++ unsigned long len, unsigned long pgoff,
5330 ++ unsigned long flags)
5331 + {
5332 + struct vm_area_struct *vma;
5333 + struct mm_struct *mm = current->mm;
5334 unsigned long task_size = STACK_TOP32;
5335 unsigned long addr = addr0;
5336 int do_color_align;
5337 @@ -10676,7 +10658,7 @@ index c690c8e..1d5798e 100644
5338 +#endif
5339 +
5340 if (current->flags & PF_RANDOMIZE) {
5341 - unsigned long val = get_random_int();
5342 + unsigned long val = get_random_long();
5343 if (test_thread_flag(TIF_32BIT))
5344 @@ -275,7 +301,7 @@ static unsigned long mmap_rnd(void)
5345
5346 @@ -10714,7 +10696,7 @@ index c690c8e..1d5798e 100644
5347 }
5348 }
5349 diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
5350 -index bb00089..e0ea580 100644
5351 +index c4a1b5c..c5e0ef3 100644
5352 --- a/arch/sparc/kernel/syscalls.S
5353 +++ b/arch/sparc/kernel/syscalls.S
5354 @@ -62,7 +62,7 @@ sys32_rt_sigreturn:
5355 @@ -10726,7 +10708,7 @@ index bb00089..e0ea580 100644
5356 be,pt %icc, rtrap
5357 nop
5358 call syscall_trace_leave
5359 -@@ -194,7 +194,7 @@ linux_sparc_syscall32:
5360 +@@ -230,7 +230,7 @@ linux_sparc_syscall32:
5361
5362 srl %i3, 0, %o3 ! IEU0
5363 srl %i2, 0, %o2 ! IEU0 Group
5364 @@ -10735,7 +10717,7 @@ index bb00089..e0ea580 100644
5365 bne,pn %icc, linux_syscall_trace32 ! CTI
5366 mov %i0, %l5 ! IEU1
5367 5: call %l7 ! CTI Group brk forced
5368 -@@ -218,7 +218,7 @@ linux_sparc_syscall:
5369 +@@ -254,7 +254,7 @@ linux_sparc_syscall:
5370
5371 mov %i3, %o3 ! IEU1
5372 mov %i4, %o4 ! IEU0 Group
5373 @@ -10744,7 +10726,7 @@ index bb00089..e0ea580 100644
5374 bne,pn %icc, linux_syscall_trace ! CTI Group
5375 mov %i0, %l5 ! IEU0
5376 2: call %l7 ! CTI Group brk forced
5377 -@@ -233,7 +233,7 @@ ret_sys_call:
5378 +@@ -269,7 +269,7 @@ ret_sys_call:
5379
5380 cmp %o0, -ERESTART_RESTARTBLOCK
5381 bgeu,pn %xcc, 1f
5382 @@ -11478,7 +11460,7 @@ index c399e7b..2387414 100644
5383 if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
5384 goto bad_area;
5385 diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
5386 -index dbabe57..d34d315 100644
5387 +index cb841a3..f2061fb 100644
5388 --- a/arch/sparc/mm/fault_64.c
5389 +++ b/arch/sparc/mm/fault_64.c
5390 @@ -23,6 +23,9 @@
5391 @@ -11500,7 +11482,7 @@ index dbabe57..d34d315 100644
5392 printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr);
5393 dump_stack();
5394 unhandled_fault(regs->tpc, current, regs);
5395 -@@ -279,6 +282,466 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs)
5396 +@@ -276,6 +279,466 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs)
5397 show_regs(regs);
5398 }
5399
5400 @@ -11967,7 +11949,7 @@ index dbabe57..d34d315 100644
5401 asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
5402 {
5403 enum ctx_state prev_state = exception_enter();
5404 -@@ -353,6 +816,29 @@ retry:
5405 +@@ -350,6 +813,29 @@ retry:
5406 if (!vma)
5407 goto bad_area;
5408
5409 @@ -11998,7 +11980,7 @@ index dbabe57..d34d315 100644
5410 * load/store/atomic was a write or not, it only says that there
5411 * was no match. So in such a case we (carefully) read the
5412 diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c
5413 -index 131eaf4..285ea31 100644
5414 +index 131eaf4..4ad6678 100644
5415 --- a/arch/sparc/mm/hugetlbpage.c
5416 +++ b/arch/sparc/mm/hugetlbpage.c
5417 @@ -25,8 +25,10 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp,
5418 @@ -12037,13 +12019,19 @@ index 131eaf4..285ea31 100644
5419 info.high_limit = task_size;
5420 addr = vm_unmapped_area(&info);
5421 }
5422 -@@ -55,7 +64,8 @@ static unsigned long
5423 - hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
5424 - const unsigned long len,
5425 - const unsigned long pgoff,
5426 +@@ -52,10 +61,11 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp,
5427 + }
5428 +
5429 + static unsigned long
5430 +-hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
5431 +- const unsigned long len,
5432 +- const unsigned long pgoff,
5433 - const unsigned long flags)
5434 -+ const unsigned long flags,
5435 -+ const unsigned long offset)
5436 ++hugetlb_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
5437 ++ unsigned long len,
5438 ++ unsigned long pgoff,
5439 ++ unsigned long flags,
5440 ++ unsigned long offset)
5441 {
5442 struct mm_struct *mm = current->mm;
5443 unsigned long addr = addr0;
5444 @@ -12104,7 +12092,7 @@ index 131eaf4..285ea31 100644
5445
5446 pte_t *huge_pte_alloc(struct mm_struct *mm,
5447 diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
5448 -index 3025bd5..4934c29 100644
5449 +index 6f21685..5831fed 100644
5450 --- a/arch/sparc/mm/init_64.c
5451 +++ b/arch/sparc/mm/init_64.c
5452 @@ -189,9 +189,9 @@ unsigned long sparc64_kern_sec_context __read_mostly;
5453 @@ -12142,10 +12130,10 @@ index 3025bd5..4934c29 100644
5454 #endif /* CONFIG_DEBUG_DCFLUSH */
5455 }
5456 diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
5457 -index 8ec7a45..b0c6dc1 100644
5458 +index de4a4ff..477c014 100644
5459 --- a/arch/tile/Kconfig
5460 +++ b/arch/tile/Kconfig
5461 -@@ -205,6 +205,7 @@ source "kernel/Kconfig.hz"
5462 +@@ -203,6 +203,7 @@ source "kernel/Kconfig.hz"
5463 config KEXEC
5464 bool "kexec system call"
5465 select KEXEC_CORE
5466 @@ -12276,7 +12264,7 @@ index 2e0a6b1..a64d0f5 100644
5467
5468 #endif
5469 diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
5470 -index 71c5d13..4c7b9f1 100644
5471 +index f878bec..ca09300 100644
5472 --- a/arch/um/include/asm/page.h
5473 +++ b/arch/um/include/asm/page.h
5474 @@ -14,6 +14,9 @@
5475 @@ -12290,7 +12278,7 @@ index 71c5d13..4c7b9f1 100644
5476
5477 struct page;
5478 diff --git a/arch/um/include/asm/pgtable-3level.h b/arch/um/include/asm/pgtable-3level.h
5479 -index 2b4274e..754fe06 100644
5480 +index bae8523..ba9484b 100644
5481 --- a/arch/um/include/asm/pgtable-3level.h
5482 +++ b/arch/um/include/asm/pgtable-3level.h
5483 @@ -58,6 +58,7 @@
5484 @@ -12346,10 +12334,10 @@ index ad8f795..2c7eec6 100644
5485 /*
5486 * Memory returned by kmalloc() may be used for DMA, so we must make
5487 diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
5488 -index 436639a..3d211bb 100644
5489 +index 3bf45a0..7b04039 100644
5490 --- a/arch/x86/Kconfig
5491 +++ b/arch/x86/Kconfig
5492 -@@ -36,14 +36,13 @@ config X86
5493 +@@ -38,14 +38,13 @@ config X86
5494 select ARCH_MIGHT_HAVE_PC_SERIO
5495 select ARCH_SUPPORTS_ATOMIC_RMW
5496 select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
5497 @@ -12365,7 +12353,7 @@ index 436639a..3d211bb 100644
5498 select ARCH_WANT_FRAME_POINTERS
5499 select ARCH_WANT_IPC_PARSE_VERSION if X86_32
5500 select ARCH_WANT_OPTIONAL_GPIOLIB
5501 -@@ -87,7 +86,7 @@ config X86
5502 +@@ -91,7 +90,7 @@ config X86
5503 select HAVE_ARCH_TRACEHOOK
5504 select HAVE_ARCH_TRANSPARENT_HUGEPAGE
5505 select HAVE_BPF_JIT if X86_64
5506 @@ -12374,7 +12362,7 @@ index 436639a..3d211bb 100644
5507 select HAVE_CMPXCHG_DOUBLE
5508 select HAVE_CMPXCHG_LOCAL
5509 select HAVE_CONTEXT_TRACKING if X86_64
5510 -@@ -276,7 +275,7 @@ config X86_64_SMP
5511 +@@ -290,7 +289,7 @@ config X86_64_SMP
5512
5513 config X86_32_LAZY_GS
5514 def_bool y
5515 @@ -12383,7 +12371,7 @@ index 436639a..3d211bb 100644
5516
5517 config ARCH_HWEIGHT_CFLAGS
5518 string
5519 -@@ -648,6 +647,7 @@ config SCHED_OMIT_FRAME_POINTER
5520 +@@ -674,6 +673,7 @@ config SCHED_OMIT_FRAME_POINTER
5521
5522 menuconfig HYPERVISOR_GUEST
5523 bool "Linux guest support"
5524 @@ -12391,7 +12379,7 @@ index 436639a..3d211bb 100644
5525 ---help---
5526 Say Y here to enable options for running Linux under various hyper-
5527 visors. This option enables basic hypervisor detection and platform
5528 -@@ -1039,6 +1039,7 @@ config VM86
5529 +@@ -1073,6 +1073,7 @@ config VM86
5530
5531 config X86_16BIT
5532 bool "Enable support for 16-bit segments" if EXPERT
5533 @@ -12399,7 +12387,7 @@ index 436639a..3d211bb 100644
5534 default y
5535 depends on MODIFY_LDT_SYSCALL
5536 ---help---
5537 -@@ -1193,6 +1194,7 @@ choice
5538 +@@ -1227,6 +1228,7 @@ choice
5539
5540 config NOHIGHMEM
5541 bool "off"
5542 @@ -12407,7 +12395,7 @@ index 436639a..3d211bb 100644
5543 ---help---
5544 Linux can use up to 64 Gigabytes of physical memory on x86 systems.
5545 However, the address space of 32-bit x86 processors is only 4
5546 -@@ -1229,6 +1231,7 @@ config NOHIGHMEM
5547 +@@ -1263,6 +1265,7 @@ config NOHIGHMEM
5548
5549 config HIGHMEM4G
5550 bool "4GB"
5551 @@ -12415,7 +12403,7 @@ index 436639a..3d211bb 100644
5552 ---help---
5553 Select this if you have a 32-bit processor and between 1 and 4
5554 gigabytes of physical RAM.
5555 -@@ -1281,7 +1284,7 @@ config PAGE_OFFSET
5556 +@@ -1315,7 +1318,7 @@ config PAGE_OFFSET
5557 hex
5558 default 0xB0000000 if VMSPLIT_3G_OPT
5559 default 0x80000000 if VMSPLIT_2G
5560 @@ -12424,7 +12412,7 @@ index 436639a..3d211bb 100644
5561 default 0x40000000 if VMSPLIT_1G
5562 default 0xC0000000
5563 depends on X86_32
5564 -@@ -1302,7 +1305,6 @@ config X86_PAE
5565 +@@ -1336,7 +1339,6 @@ config X86_PAE
5566
5567 config ARCH_PHYS_ADDR_T_64BIT
5568 def_bool y
5569 @@ -12432,7 +12420,7 @@ index 436639a..3d211bb 100644
5570
5571 config ARCH_DMA_ADDR_T_64BIT
5572 def_bool y
5573 -@@ -1433,7 +1435,7 @@ config ARCH_PROC_KCORE_TEXT
5574 +@@ -1467,7 +1469,7 @@ config ARCH_PROC_KCORE_TEXT
5575
5576 config ILLEGAL_POINTER_VALUE
5577 hex
5578 @@ -12441,7 +12429,7 @@ index 436639a..3d211bb 100644
5579 default 0xdead000000000000 if X86_64
5580
5581 source "mm/Kconfig"
5582 -@@ -1742,6 +1744,7 @@ source kernel/Kconfig.hz
5583 +@@ -1776,6 +1778,7 @@ source kernel/Kconfig.hz
5584 config KEXEC
5585 bool "kexec system call"
5586 select KEXEC_CORE
5587 @@ -12449,7 +12437,7 @@ index 436639a..3d211bb 100644
5588 ---help---
5589 kexec is a system call that implements the ability to shutdown your
5590 current kernel, and to start another kernel. It is like a reboot
5591 -@@ -1924,7 +1927,9 @@ config X86_NEED_RELOCS
5592 +@@ -1958,7 +1961,9 @@ config X86_NEED_RELOCS
5593
5594 config PHYSICAL_ALIGN
5595 hex "Alignment value to which kernel should be aligned"
5596 @@ -12460,7 +12448,7 @@ index 436639a..3d211bb 100644
5597 range 0x2000 0x1000000 if X86_32
5598 range 0x200000 0x1000000 if X86_64
5599 ---help---
5600 -@@ -2007,6 +2012,7 @@ config COMPAT_VDSO
5601 +@@ -2041,6 +2046,7 @@ config COMPAT_VDSO
5602 def_bool n
5603 prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
5604 depends on X86_32 || IA32_EMULATION
5605 @@ -12468,7 +12456,7 @@ index 436639a..3d211bb 100644
5606 ---help---
5607 Certain buggy versions of glibc will crash if they are
5608 presented with a 32-bit vDSO that is not mapped at the address
5609 -@@ -2047,15 +2053,6 @@ choice
5610 +@@ -2081,15 +2087,6 @@ choice
5611
5612 If unsure, select "Emulate".
5613
5614 @@ -12484,7 +12472,7 @@ index 436639a..3d211bb 100644
5615 config LEGACY_VSYSCALL_EMULATE
5616 bool "Emulate"
5617 help
5618 -@@ -2136,6 +2133,22 @@ config MODIFY_LDT_SYSCALL
5619 +@@ -2170,6 +2167,22 @@ config MODIFY_LDT_SYSCALL
5620
5621 Saying 'N' here may make sense for embedded or server kernels.
5622
5623 @@ -12539,18 +12527,18 @@ index 3ba5ff2..44bdacc 100644
5624 config X86_MINIMUM_CPU_FAMILY
5625 int
5626 diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
5627 -index 137dfa9..6efdd4e 100644
5628 +index 9b18ed9..9528749 100644
5629 --- a/arch/x86/Kconfig.debug
5630 +++ b/arch/x86/Kconfig.debug
5631 -@@ -72,6 +72,7 @@ config X86_PTDUMP
5632 - bool "Export kernel pagetable layout to userspace via debugfs"
5633 +@@ -55,6 +55,7 @@ config X86_PTDUMP
5634 + tristate "Export kernel pagetable layout to userspace via debugfs"
5635 depends on DEBUG_KERNEL
5636 select DEBUG_FS
5637 + depends on !GRKERNSEC_KMEM
5638 select X86_PTDUMP_CORE
5639 ---help---
5640 Say Y here if you want to show the kernel pagetable layout in a
5641 -@@ -94,7 +95,7 @@ config EFI_PGT_DUMP
5642 +@@ -77,7 +78,7 @@ config EFI_PGT_DUMP
5643 config DEBUG_RODATA
5644 bool "Write protect kernel read-only data structures"
5645 default y
5646 @@ -12559,7 +12547,7 @@ index 137dfa9..6efdd4e 100644
5647 ---help---
5648 Mark the kernel read-only data as write-protected in the pagetables,
5649 in order to catch accidental (and incorrect) writes to such const
5650 -@@ -140,7 +141,7 @@ config DEBUG_WX
5651 +@@ -123,7 +124,7 @@ config DEBUG_WX
5652
5653 config DEBUG_SET_MODULE_RONX
5654 bool "Set loadable kernel module data as NX and text as RO"
5655 @@ -12568,7 +12556,7 @@ index 137dfa9..6efdd4e 100644
5656 ---help---
5657 This option helps catch unintended modifications to loadable
5658 kernel module's text and read-only data. It also prevents execution
5659 -@@ -392,6 +393,7 @@ config X86_DEBUG_FPU
5660 +@@ -375,6 +376,7 @@ config X86_DEBUG_FPU
5661 config PUNIT_ATOM_DEBUG
5662 tristate "ATOM Punit debug driver"
5663 select DEBUG_FS
5664 @@ -12619,7 +12607,7 @@ index 4086abc..52a0a9b 100644
5665 +*** Please upgrade your binutils to 2.18 or newer
5666 +endef
5667 diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
5668 -index 2ee62db..5f320a9 100644
5669 +index bbe1a62..ec6a3ec 100644
5670 --- a/arch/x86/boot/Makefile
5671 +++ b/arch/x86/boot/Makefile
5672 @@ -58,6 +58,9 @@ clean-files += cpustr.h
5673 @@ -12631,7 +12619,7 @@ index 2ee62db..5f320a9 100644
5674 +endif
5675 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
5676 GCOV_PROFILE := n
5677 -
5678 + UBSAN_SANITIZE := n
5679 diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
5680 index 878e4b9..20537ab 100644
5681 --- a/arch/x86/boot/bitops.h
5682 @@ -12668,16 +12656,33 @@ index 9011a88..06aa820 100644
5683 }
5684
5685 diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
5686 -index 0a291cd..9686efc 100644
5687 +index f9ce75d..0b1600d 100644
5688 --- a/arch/x86/boot/compressed/Makefile
5689 +++ b/arch/x86/boot/compressed/Makefile
5690 -@@ -30,6 +30,9 @@ KBUILD_CFLAGS += $(cflags-y)
5691 +@@ -30,6 +30,26 @@ KBUILD_CFLAGS += $(cflags-y)
5692 KBUILD_CFLAGS += -mno-mmx -mno-sse
5693 KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
5694 KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
5695 +ifdef CONSTIFY_PLUGIN
5696 +KBUILD_CFLAGS += -fplugin-arg-constify_plugin-no-constify
5697 +endif
5698 ++
5699 ++ifdef CONFIG_DEBUG_INFO
5700 ++ifdef CONFIG_DEBUG_INFO_SPLIT
5701 ++KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
5702 ++else
5703 ++KBUILD_CFLAGS += -g
5704 ++endif
5705 ++KBUILD_AFLAGS += -Wa,--gdwarf-2
5706 ++endif
5707 ++ifdef CONFIG_DEBUG_INFO_DWARF4
5708 ++KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,)
5709 ++endif
5710 ++
5711 ++ifdef CONFIG_DEBUG_INFO_REDUCED
5712 ++KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
5713 ++ $(call cc-option,-fno-var-tracking)
5714 ++endif
5715
5716 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
5717 GCOV_PROFILE := n
5718 @@ -12971,7 +12976,7 @@ index 9105655..41779c1 100644
5719 movq r1,r2; \
5720 movq r3,r4; \
5721 diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
5722 -index 6bd2c6c..368c93e 100644
5723 +index 6bd2c6c..cd46c9d 100644
5724 --- a/arch/x86/crypto/aesni-intel_asm.S
5725 +++ b/arch/x86/crypto/aesni-intel_asm.S
5726 @@ -31,6 +31,7 @@
5727 @@ -13253,7 +13258,7 @@ index 6bd2c6c..368c93e 100644
5728 ret
5729 ENDPROC(_key_expansion_256b)
5730
5731 -@@ -1905,6 +1912,7 @@ ENTRY(aesni_set_key)
5732 +@@ -1905,13 +1912,14 @@ ENTRY(aesni_set_key)
5733 #ifndef __x86_64__
5734 popl KEYP
5735 #endif
5736 @@ -13261,6 +13266,14 @@ index 6bd2c6c..368c93e 100644
5737 ret
5738 ENDPROC(aesni_set_key)
5739
5740 + /*
5741 + * void aesni_enc(struct crypto_aes_ctx *ctx, u8 *dst, const u8 *src)
5742 + */
5743 +-ENTRY(aesni_enc)
5744 ++RAP_ENTRY(aesni_enc)
5745 + #ifndef __x86_64__
5746 + pushl KEYP
5747 + pushl KLEN
5748 @@ -1927,6 +1935,7 @@ ENTRY(aesni_enc)
5749 popl KLEN
5750 popl KEYP
5751 @@ -13277,7 +13290,7 @@ index 6bd2c6c..368c93e 100644
5752 ret
5753 ENDPROC(_aesni_enc1)
5754
5755 -@@ -2094,6 +2104,7 @@ _aesni_enc4:
5756 +@@ -2094,13 +2104,14 @@ _aesni_enc4:
5757 AESENCLAST KEY STATE2
5758 AESENCLAST KEY STATE3
5759 AESENCLAST KEY STATE4
5760 @@ -13285,6 +13298,14 @@ index 6bd2c6c..368c93e 100644
5761 ret
5762 ENDPROC(_aesni_enc4)
5763
5764 + /*
5765 + * void aesni_dec (struct crypto_aes_ctx *ctx, u8 *dst, const u8 *src)
5766 + */
5767 +-ENTRY(aesni_dec)
5768 ++RAP_ENTRY(aesni_dec)
5769 + #ifndef __x86_64__
5770 + pushl KEYP
5771 + pushl KLEN
5772 @@ -2117,6 +2128,7 @@ ENTRY(aesni_dec)
5773 popl KLEN
5774 popl KEYP
5775 @@ -13373,8 +13394,24 @@ index 6bd2c6c..368c93e 100644
5776 ret
5777 ENDPROC(aesni_xts_crypt8)
5778
5779 +diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
5780 +index 3633ad6..2bf146f 100644
5781 +--- a/arch/x86/crypto/aesni-intel_glue.c
5782 ++++ b/arch/x86/crypto/aesni-intel_glue.c
5783 +@@ -82,9 +82,9 @@ struct aesni_xts_ctx {
5784 +
5785 + asmlinkage int aesni_set_key(struct crypto_aes_ctx *ctx, const u8 *in_key,
5786 + unsigned int key_len);
5787 +-asmlinkage void aesni_enc(struct crypto_aes_ctx *ctx, u8 *out,
5788 ++asmlinkage void aesni_enc(void *ctx, u8 *out,
5789 + const u8 *in);
5790 +-asmlinkage void aesni_dec(struct crypto_aes_ctx *ctx, u8 *out,
5791 ++asmlinkage void aesni_dec(void *ctx, u8 *out,
5792 + const u8 *in);
5793 + asmlinkage void aesni_ecb_enc(struct crypto_aes_ctx *ctx, u8 *out,
5794 + const u8 *in, unsigned int len);
5795 diff --git a/arch/x86/crypto/blowfish-x86_64-asm_64.S b/arch/x86/crypto/blowfish-x86_64-asm_64.S
5796 -index 246c670..466e2d6 100644
5797 +index 246c670..4fb7603 100644
5798 --- a/arch/x86/crypto/blowfish-x86_64-asm_64.S
5799 +++ b/arch/x86/crypto/blowfish-x86_64-asm_64.S
5800 @@ -21,6 +21,7 @@
5801 @@ -13385,7 +13422,7 @@ index 246c670..466e2d6 100644
5802
5803 .file "blowfish-x86_64-asm.S"
5804 .text
5805 -@@ -149,9 +150,11 @@ ENTRY(__blowfish_enc_blk)
5806 +@@ -149,13 +150,15 @@ ENTRY(__blowfish_enc_blk)
5807 jnz .L__enc_xor;
5808
5809 write_block();
5810 @@ -13397,6 +13434,11 @@ index 246c670..466e2d6 100644
5811 ret;
5812 ENDPROC(__blowfish_enc_blk)
5813
5814 +-ENTRY(blowfish_dec_blk)
5815 ++RAP_ENTRY(blowfish_dec_blk)
5816 + /* input:
5817 + * %rdi: ctx, CTX
5818 + * %rsi: dst
5819 @@ -183,6 +186,7 @@ ENTRY(blowfish_dec_blk)
5820
5821 movq %r11, %rbp;
5822 @@ -13413,7 +13455,7 @@ index 246c670..466e2d6 100644
5823 ret;
5824
5825 .L__enc_xor4:
5826 -@@ -341,6 +346,7 @@ ENTRY(__blowfish_enc_blk_4way)
5827 +@@ -341,10 +346,11 @@ ENTRY(__blowfish_enc_blk_4way)
5828
5829 popq %rbx;
5830 popq %rbp;
5831 @@ -13421,6 +13463,11 @@ index 246c670..466e2d6 100644
5832 ret;
5833 ENDPROC(__blowfish_enc_blk_4way)
5834
5835 +-ENTRY(blowfish_dec_blk_4way)
5836 ++RAP_ENTRY(blowfish_dec_blk_4way)
5837 + /* input:
5838 + * %rdi: ctx, CTX
5839 + * %rsi: dst
5840 @@ -375,5 +381,6 @@ ENTRY(blowfish_dec_blk_4way)
5841 popq %rbx;
5842 popq %rbp;
5843 @@ -13429,7 +13476,7 @@ index 246c670..466e2d6 100644
5844 ret;
5845 ENDPROC(blowfish_dec_blk_4way)
5846 diff --git a/arch/x86/crypto/camellia-aesni-avx-asm_64.S b/arch/x86/crypto/camellia-aesni-avx-asm_64.S
5847 -index ce71f92..1dce7ec 100644
5848 +index ce71f92..059975a 100644
5849 --- a/arch/x86/crypto/camellia-aesni-avx-asm_64.S
5850 +++ b/arch/x86/crypto/camellia-aesni-avx-asm_64.S
5851 @@ -16,6 +16,7 @@
5852 @@ -13472,7 +13519,16 @@ index ce71f92..1dce7ec 100644
5853 ret;
5854
5855 .align 8
5856 -@@ -904,6 +909,7 @@ ENTRY(camellia_ecb_enc_16way)
5857 +@@ -884,7 +889,7 @@ __camellia_dec_blk16:
5858 + jmp .Ldec_max24;
5859 + ENDPROC(__camellia_dec_blk16)
5860 +
5861 +-ENTRY(camellia_ecb_enc_16way)
5862 ++RAP_ENTRY(camellia_ecb_enc_16way)
5863 + /* input:
5864 + * %rdi: ctx, CTX
5865 + * %rsi: dst (16 blocks)
5866 +@@ -904,10 +909,11 @@ ENTRY(camellia_ecb_enc_16way)
5867 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
5868 %xmm8, %rsi);
5869
5870 @@ -13480,7 +13536,12 @@ index ce71f92..1dce7ec 100644
5871 ret;
5872 ENDPROC(camellia_ecb_enc_16way)
5873
5874 -@@ -932,6 +938,7 @@ ENTRY(camellia_ecb_dec_16way)
5875 +-ENTRY(camellia_ecb_dec_16way)
5876 ++RAP_ENTRY(camellia_ecb_dec_16way)
5877 + /* input:
5878 + * %rdi: ctx, CTX
5879 + * %rsi: dst (16 blocks)
5880 +@@ -932,10 +938,11 @@ ENTRY(camellia_ecb_dec_16way)
5881 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
5882 %xmm8, %rsi);
5883
5884 @@ -13488,6 +13549,11 @@ index ce71f92..1dce7ec 100644
5885 ret;
5886 ENDPROC(camellia_ecb_dec_16way)
5887
5888 +-ENTRY(camellia_cbc_dec_16way)
5889 ++RAP_ENTRY(camellia_cbc_dec_16way)
5890 + /* input:
5891 + * %rdi: ctx, CTX
5892 + * %rsi: dst (16 blocks)
5893 @@ -981,6 +988,7 @@ ENTRY(camellia_cbc_dec_16way)
5894 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
5895 %xmm8, %rsi);
5896 @@ -13496,6 +13562,15 @@ index ce71f92..1dce7ec 100644
5897 ret;
5898 ENDPROC(camellia_cbc_dec_16way)
5899
5900 +@@ -990,7 +998,7 @@ ENDPROC(camellia_cbc_dec_16way)
5901 + vpslldq $8, tmp, tmp; \
5902 + vpsubq tmp, x, x;
5903 +
5904 +-ENTRY(camellia_ctr_16way)
5905 ++RAP_ENTRY(camellia_ctr_16way)
5906 + /* input:
5907 + * %rdi: ctx, CTX
5908 + * %rsi: dst (16 blocks)
5909 @@ -1092,6 +1100,7 @@ ENTRY(camellia_ctr_16way)
5910 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
5911 %xmm8, %rsi);
5912 @@ -13504,7 +13579,7 @@ index ce71f92..1dce7ec 100644
5913 ret;
5914 ENDPROC(camellia_ctr_16way)
5915
5916 -@@ -1234,6 +1243,7 @@ camellia_xts_crypt_16way:
5917 +@@ -1234,10 +1243,11 @@ camellia_xts_crypt_16way:
5918 %xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
5919 %xmm8, %rsi);
5920
5921 @@ -13512,8 +13587,22 @@ index ce71f92..1dce7ec 100644
5922 ret;
5923 ENDPROC(camellia_xts_crypt_16way)
5924
5925 +-ENTRY(camellia_xts_enc_16way)
5926 ++RAP_ENTRY(camellia_xts_enc_16way)
5927 + /* input:
5928 + * %rdi: ctx, CTX
5929 + * %rsi: dst (16 blocks)
5930 +@@ -1251,7 +1261,7 @@ ENTRY(camellia_xts_enc_16way)
5931 + jmp camellia_xts_crypt_16way;
5932 + ENDPROC(camellia_xts_enc_16way)
5933 +
5934 +-ENTRY(camellia_xts_dec_16way)
5935 ++RAP_ENTRY(camellia_xts_dec_16way)
5936 + /* input:
5937 + * %rdi: ctx, CTX
5938 + * %rsi: dst (16 blocks)
5939 diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
5940 -index 0e0b886..5a3123c 100644
5941 +index 0e0b886..7bad080 100644
5942 --- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
5943 +++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
5944 @@ -11,6 +11,7 @@
5945 @@ -13556,7 +13645,16 @@ index 0e0b886..5a3123c 100644
5946 ret;
5947
5948 .align 8
5949 -@@ -948,6 +953,7 @@ ENTRY(camellia_ecb_enc_32way)
5950 +@@ -924,7 +929,7 @@ __camellia_dec_blk32:
5951 + jmp .Ldec_max24;
5952 + ENDPROC(__camellia_dec_blk32)
5953 +
5954 +-ENTRY(camellia_ecb_enc_32way)
5955 ++RAP_ENTRY(camellia_ecb_enc_32way)
5956 + /* input:
5957 + * %rdi: ctx, CTX
5958 + * %rsi: dst (32 blocks)
5959 +@@ -948,10 +953,11 @@ ENTRY(camellia_ecb_enc_32way)
5960
5961 vzeroupper;
5962
5963 @@ -13564,7 +13662,12 @@ index 0e0b886..5a3123c 100644
5964 ret;
5965 ENDPROC(camellia_ecb_enc_32way)
5966
5967 -@@ -980,6 +986,7 @@ ENTRY(camellia_ecb_dec_32way)
5968 +-ENTRY(camellia_ecb_dec_32way)
5969 ++RAP_ENTRY(camellia_ecb_dec_32way)
5970 + /* input:
5971 + * %rdi: ctx, CTX
5972 + * %rsi: dst (32 blocks)
5973 +@@ -980,10 +986,11 @@ ENTRY(camellia_ecb_dec_32way)
5974
5975 vzeroupper;
5976
5977 @@ -13572,6 +13675,11 @@ index 0e0b886..5a3123c 100644
5978 ret;
5979 ENDPROC(camellia_ecb_dec_32way)
5980
5981 +-ENTRY(camellia_cbc_dec_32way)
5982 ++RAP_ENTRY(camellia_cbc_dec_32way)
5983 + /* input:
5984 + * %rdi: ctx, CTX
5985 + * %rsi: dst (32 blocks)
5986 @@ -1046,6 +1053,7 @@ ENTRY(camellia_cbc_dec_32way)
5987
5988 vzeroupper;
5989 @@ -13580,6 +13688,15 @@ index 0e0b886..5a3123c 100644
5990 ret;
5991 ENDPROC(camellia_cbc_dec_32way)
5992
5993 +@@ -1063,7 +1071,7 @@ ENDPROC(camellia_cbc_dec_32way)
5994 + vpslldq $8, tmp1, tmp1; \
5995 + vpsubq tmp1, x, x;
5996 +
5997 +-ENTRY(camellia_ctr_32way)
5998 ++RAP_ENTRY(camellia_ctr_32way)
5999 + /* input:
6000 + * %rdi: ctx, CTX
6001 + * %rsi: dst (32 blocks)
6002 @@ -1184,6 +1192,7 @@ ENTRY(camellia_ctr_32way)
6003
6004 vzeroupper;
6005 @@ -13588,7 +13705,7 @@ index 0e0b886..5a3123c 100644
6006 ret;
6007 ENDPROC(camellia_ctr_32way)
6008
6009 -@@ -1349,6 +1358,7 @@ camellia_xts_crypt_32way:
6010 +@@ -1349,10 +1358,11 @@ camellia_xts_crypt_32way:
6011
6012 vzeroupper;
6013
6014 @@ -13596,8 +13713,22 @@ index 0e0b886..5a3123c 100644
6015 ret;
6016 ENDPROC(camellia_xts_crypt_32way)
6017
6018 +-ENTRY(camellia_xts_enc_32way)
6019 ++RAP_ENTRY(camellia_xts_enc_32way)
6020 + /* input:
6021 + * %rdi: ctx, CTX
6022 + * %rsi: dst (32 blocks)
6023 +@@ -1367,7 +1377,7 @@ ENTRY(camellia_xts_enc_32way)
6024 + jmp camellia_xts_crypt_32way;
6025 + ENDPROC(camellia_xts_enc_32way)
6026 +
6027 +-ENTRY(camellia_xts_dec_32way)
6028 ++RAP_ENTRY(camellia_xts_dec_32way)
6029 + /* input:
6030 + * %rdi: ctx, CTX
6031 + * %rsi: dst (32 blocks)
6032 diff --git a/arch/x86/crypto/camellia-x86_64-asm_64.S b/arch/x86/crypto/camellia-x86_64-asm_64.S
6033 -index 310319c..db3d7b5 100644
6034 +index 310319c..9253a8f 100644
6035 --- a/arch/x86/crypto/camellia-x86_64-asm_64.S
6036 +++ b/arch/x86/crypto/camellia-x86_64-asm_64.S
6037 @@ -21,6 +21,7 @@
6038 @@ -13608,7 +13739,7 @@ index 310319c..db3d7b5 100644
6039
6040 .file "camellia-x86_64-asm_64.S"
6041 .text
6042 -@@ -228,12 +229,14 @@ ENTRY(__camellia_enc_blk)
6043 +@@ -228,16 +229,18 @@ ENTRY(__camellia_enc_blk)
6044 enc_outunpack(mov, RT1);
6045
6046 movq RRBP, %rbp;
6047 @@ -13623,6 +13754,11 @@ index 310319c..db3d7b5 100644
6048 ret;
6049 ENDPROC(__camellia_enc_blk)
6050
6051 +-ENTRY(camellia_dec_blk)
6052 ++RAP_ENTRY(camellia_dec_blk)
6053 + /* input:
6054 + * %rdi: ctx, CTX
6055 + * %rsi: dst
6056 @@ -272,6 +275,7 @@ ENTRY(camellia_dec_blk)
6057 dec_outunpack();
6058
6059 @@ -13639,7 +13775,7 @@ index 310319c..db3d7b5 100644
6060 ret;
6061
6062 .L__enc2_xor:
6063 -@@ -470,6 +475,7 @@ ENTRY(__camellia_enc_blk_2way)
6064 +@@ -470,10 +475,11 @@ ENTRY(__camellia_enc_blk_2way)
6065
6066 movq RRBP, %rbp;
6067 popq %rbx;
6068 @@ -13647,6 +13783,11 @@ index 310319c..db3d7b5 100644
6069 ret;
6070 ENDPROC(__camellia_enc_blk_2way)
6071
6072 +-ENTRY(camellia_dec_blk_2way)
6073 ++RAP_ENTRY(camellia_dec_blk_2way)
6074 + /* input:
6075 + * %rdi: ctx, CTX
6076 + * %rsi: dst
6077 @@ -510,5 +516,6 @@ ENTRY(camellia_dec_blk_2way)
6078
6079 movq RRBP, %rbp;
6080 @@ -13654,8 +13795,118 @@ index 310319c..db3d7b5 100644
6081 + pax_force_retaddr
6082 ret;
6083 ENDPROC(camellia_dec_blk_2way)
6084 +diff --git a/arch/x86/crypto/camellia_aesni_avx2_glue.c b/arch/x86/crypto/camellia_aesni_avx2_glue.c
6085 +index d844569..edaf489 100644
6086 +--- a/arch/x86/crypto/camellia_aesni_avx2_glue.c
6087 ++++ b/arch/x86/crypto/camellia_aesni_avx2_glue.c
6088 +@@ -27,20 +27,20 @@
6089 + #define CAMELLIA_AESNI_AVX2_PARALLEL_BLOCKS 32
6090 +
6091 + /* 32-way AVX2/AES-NI parallel cipher functions */
6092 +-asmlinkage void camellia_ecb_enc_32way(struct camellia_ctx *ctx, u8 *dst,
6093 ++asmlinkage void camellia_ecb_enc_32way(void *ctx, u8 *dst,
6094 + const u8 *src);
6095 +-asmlinkage void camellia_ecb_dec_32way(struct camellia_ctx *ctx, u8 *dst,
6096 ++asmlinkage void camellia_ecb_dec_32way(void *ctx, u8 *dst,
6097 + const u8 *src);
6098 +
6099 +-asmlinkage void camellia_cbc_dec_32way(struct camellia_ctx *ctx, u8 *dst,
6100 ++asmlinkage void camellia_cbc_dec_32way(void *ctx, u8 *dst,
6101 + const u8 *src);
6102 +-asmlinkage void camellia_ctr_32way(struct camellia_ctx *ctx, u8 *dst,
6103 +- const u8 *src, le128 *iv);
6104 ++asmlinkage void camellia_ctr_32way(void *ctx, u128 *dst,
6105 ++ const u128 *src, le128 *iv);
6106 +
6107 +-asmlinkage void camellia_xts_enc_32way(struct camellia_ctx *ctx, u8 *dst,
6108 +- const u8 *src, le128 *iv);
6109 +-asmlinkage void camellia_xts_dec_32way(struct camellia_ctx *ctx, u8 *dst,
6110 +- const u8 *src, le128 *iv);
6111 ++asmlinkage void camellia_xts_enc_32way(void *ctx, u128 *dst,
6112 ++ const u128 *src, le128 *iv);
6113 ++asmlinkage void camellia_xts_dec_32way(void *ctx, u128 *dst,
6114 ++ const u128 *src, le128 *iv);
6115 +
6116 + static const struct common_glue_ctx camellia_enc = {
6117 + .num_funcs = 4,
6118 +diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c
6119 +index 93d8f29..4218a74 100644
6120 +--- a/arch/x86/crypto/camellia_aesni_avx_glue.c
6121 ++++ b/arch/x86/crypto/camellia_aesni_avx_glue.c
6122 +@@ -26,28 +26,28 @@
6123 + #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16
6124 +
6125 + /* 16-way parallel cipher functions (avx/aes-ni) */
6126 +-asmlinkage void camellia_ecb_enc_16way(struct camellia_ctx *ctx, u8 *dst,
6127 ++asmlinkage void camellia_ecb_enc_16way(void *ctx, u8 *dst,
6128 + const u8 *src);
6129 + EXPORT_SYMBOL_GPL(camellia_ecb_enc_16way);
6130 +
6131 +-asmlinkage void camellia_ecb_dec_16way(struct camellia_ctx *ctx, u8 *dst,
6132 ++asmlinkage void camellia_ecb_dec_16way(void *ctx, u8 *dst,
6133 + const u8 *src);
6134 + EXPORT_SYMBOL_GPL(camellia_ecb_dec_16way);
6135 +
6136 +-asmlinkage void camellia_cbc_dec_16way(struct camellia_ctx *ctx, u8 *dst,
6137 ++asmlinkage void camellia_cbc_dec_16way(void *ctx, u8 *dst,
6138 + const u8 *src);
6139 + EXPORT_SYMBOL_GPL(camellia_cbc_dec_16way);
6140 +
6141 +-asmlinkage void camellia_ctr_16way(struct camellia_ctx *ctx, u8 *dst,
6142 +- const u8 *src, le128 *iv);
6143 ++asmlinkage void camellia_ctr_16way(void *ctx, u128 *dst,
6144 ++ const u128 *src, le128 *iv);
6145 + EXPORT_SYMBOL_GPL(camellia_ctr_16way);
6146 +
6147 +-asmlinkage void camellia_xts_enc_16way(struct camellia_ctx *ctx, u8 *dst,
6148 +- const u8 *src, le128 *iv);
6149 ++asmlinkage void camellia_xts_enc_16way(void *ctx, u128 *dst,
6150 ++ const u128 *src, le128 *iv);
6151 + EXPORT_SYMBOL_GPL(camellia_xts_enc_16way);
6152 +
6153 +-asmlinkage void camellia_xts_dec_16way(struct camellia_ctx *ctx, u8 *dst,
6154 +- const u8 *src, le128 *iv);
6155 ++asmlinkage void camellia_xts_dec_16way(void *ctx, u128 *dst,
6156 ++ const u128 *src, le128 *iv);
6157 + EXPORT_SYMBOL_GPL(camellia_xts_dec_16way);
6158 +
6159 + void camellia_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv)
6160 +diff --git a/arch/x86/crypto/camellia_glue.c b/arch/x86/crypto/camellia_glue.c
6161 +index 5c8b626..934a4b6 100644
6162 +--- a/arch/x86/crypto/camellia_glue.c
6163 ++++ b/arch/x86/crypto/camellia_glue.c
6164 +@@ -39,7 +39,7 @@
6165 + asmlinkage void __camellia_enc_blk(struct camellia_ctx *ctx, u8 *dst,
6166 + const u8 *src, bool xor);
6167 + EXPORT_SYMBOL_GPL(__camellia_enc_blk);
6168 +-asmlinkage void camellia_dec_blk(struct camellia_ctx *ctx, u8 *dst,
6169 ++asmlinkage void camellia_dec_blk(void *ctx, u8 *dst,
6170 + const u8 *src);
6171 + EXPORT_SYMBOL_GPL(camellia_dec_blk);
6172 +
6173 +@@ -47,7 +47,7 @@ EXPORT_SYMBOL_GPL(camellia_dec_blk);
6174 + asmlinkage void __camellia_enc_blk_2way(struct camellia_ctx *ctx, u8 *dst,
6175 + const u8 *src, bool xor);
6176 + EXPORT_SYMBOL_GPL(__camellia_enc_blk_2way);
6177 +-asmlinkage void camellia_dec_blk_2way(struct camellia_ctx *ctx, u8 *dst,
6178 ++asmlinkage void camellia_dec_blk_2way(void *ctx, u8 *dst,
6179 + const u8 *src);
6180 + EXPORT_SYMBOL_GPL(camellia_dec_blk_2way);
6181 +
6182 +@@ -1279,8 +1279,10 @@ static int camellia_setkey(struct crypto_tfm *tfm, const u8 *in_key,
6183 + &tfm->crt_flags);
6184 + }
6185 +
6186 +-void camellia_decrypt_cbc_2way(void *ctx, u128 *dst, const u128 *src)
6187 ++void camellia_decrypt_cbc_2way(void *ctx, u8 *_dst, const u8 *_src)
6188 + {
6189 ++ u128 *dst = (u128 *)_dst;
6190 ++ u128 *src = (u128 *)_src;
6191 + u128 iv = *src;
6192 +
6193 + camellia_dec_blk_2way(ctx, (u8 *)dst, (u8 *)src);
6194 diff --git a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
6195 -index c35fd5d..2d8c7db 100644
6196 +index c35fd5d..563138e 100644
6197 --- a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
6198 +++ b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
6199 @@ -24,6 +24,7 @@
6200 @@ -13682,7 +13933,16 @@ index c35fd5d..2d8c7db 100644
6201 ret;
6202
6203 .L__skip_dec:
6204 -@@ -388,6 +391,7 @@ ENTRY(cast5_ecb_enc_16way)
6205 +@@ -359,7 +362,7 @@ __cast5_dec_blk16:
6206 + jmp .L__dec_tail;
6207 + ENDPROC(__cast5_dec_blk16)
6208 +
6209 +-ENTRY(cast5_ecb_enc_16way)
6210 ++RAP_ENTRY(cast5_ecb_enc_16way)
6211 + /* input:
6212 + * %rdi: ctx, CTX
6213 + * %rsi: dst
6214 +@@ -388,10 +391,11 @@ ENTRY(cast5_ecb_enc_16way)
6215 vmovdqu RR4, (6*4*4)(%r11);
6216 vmovdqu RL4, (7*4*4)(%r11);
6217
6218 @@ -13690,6 +13950,11 @@ index c35fd5d..2d8c7db 100644
6219 ret;
6220 ENDPROC(cast5_ecb_enc_16way)
6221
6222 +-ENTRY(cast5_ecb_dec_16way)
6223 ++RAP_ENTRY(cast5_ecb_dec_16way)
6224 + /* input:
6225 + * %rdi: ctx, CTX
6226 + * %rsi: dst
6227 @@ -420,6 +424,7 @@ ENTRY(cast5_ecb_dec_16way)
6228 vmovdqu RR4, (6*4*4)(%r11);
6229 vmovdqu RL4, (7*4*4)(%r11);
6230 @@ -13794,7 +14059,7 @@ index c35fd5d..2d8c7db 100644
6231 ret;
6232 ENDPROC(cast5_ctr_16way)
6233 diff --git a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
6234 -index e3531f8..e123f35 100644
6235 +index e3531f8..564f08b 100644
6236 --- a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
6237 +++ b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
6238 @@ -24,6 +24,7 @@
6239 @@ -13813,7 +14078,7 @@ index e3531f8..e123f35 100644
6240 ret;
6241 ENDPROC(__cast6_enc_blk8)
6242
6243 -@@ -340,6 +342,7 @@ __cast6_dec_blk8:
6244 +@@ -340,10 +342,11 @@ __cast6_dec_blk8:
6245 outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM);
6246 outunpack_blocks(RA2, RB2, RC2, RD2, RTMP, RX, RKRF, RKM);
6247
6248 @@ -13821,7 +14086,12 @@ index e3531f8..e123f35 100644
6249 ret;
6250 ENDPROC(__cast6_dec_blk8)
6251
6252 -@@ -358,6 +361,7 @@ ENTRY(cast6_ecb_enc_8way)
6253 +-ENTRY(cast6_ecb_enc_8way)
6254 ++RAP_ENTRY(cast6_ecb_enc_8way)
6255 + /* input:
6256 + * %rdi: ctx, CTX
6257 + * %rsi: dst
6258 +@@ -358,10 +361,11 @@ ENTRY(cast6_ecb_enc_8way)
6259
6260 store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6261
6262 @@ -13829,7 +14099,12 @@ index e3531f8..e123f35 100644
6263 ret;
6264 ENDPROC(cast6_ecb_enc_8way)
6265
6266 -@@ -376,6 +380,7 @@ ENTRY(cast6_ecb_dec_8way)
6267 +-ENTRY(cast6_ecb_dec_8way)
6268 ++RAP_ENTRY(cast6_ecb_dec_8way)
6269 + /* input:
6270 + * %rdi: ctx, CTX
6271 + * %rsi: dst
6272 +@@ -376,33 +380,35 @@ ENTRY(cast6_ecb_dec_8way)
6273
6274 store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6275
6276 @@ -13837,7 +14112,11 @@ index e3531f8..e123f35 100644
6277 ret;
6278 ENDPROC(cast6_ecb_dec_8way)
6279
6280 -@@ -386,19 +391,20 @@ ENTRY(cast6_cbc_dec_8way)
6281 +-ENTRY(cast6_cbc_dec_8way)
6282 ++RAP_ENTRY(cast6_cbc_dec_8way)
6283 + /* input:
6284 + * %rdi: ctx, CTX
6285 + * %rsi: dst
6286 * %rdx: src
6287 */
6288
6289 @@ -13862,7 +14141,12 @@ index e3531f8..e123f35 100644
6290 ret;
6291 ENDPROC(cast6_cbc_dec_8way)
6292
6293 -@@ -410,20 +416,21 @@ ENTRY(cast6_ctr_8way)
6294 +-ENTRY(cast6_ctr_8way)
6295 ++RAP_ENTRY(cast6_ctr_8way)
6296 + /* input:
6297 + * %rdi: ctx, CTX
6298 + * %rsi: dst
6299 +@@ -410,24 +416,25 @@ ENTRY(cast6_ctr_8way)
6300 * %rcx: iv (little endian, 128bit)
6301 */
6302
6303 @@ -13888,7 +14172,12 @@ index e3531f8..e123f35 100644
6304 ret;
6305 ENDPROC(cast6_ctr_8way)
6306
6307 -@@ -446,6 +453,7 @@ ENTRY(cast6_xts_enc_8way)
6308 +-ENTRY(cast6_xts_enc_8way)
6309 ++RAP_ENTRY(cast6_xts_enc_8way)
6310 + /* input:
6311 + * %rdi: ctx, CTX
6312 + * %rsi: dst
6313 +@@ -446,10 +453,11 @@ ENTRY(cast6_xts_enc_8way)
6314 /* dst <= regs xor IVs(in dst) */
6315 store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6316
6317 @@ -13896,6 +14185,11 @@ index e3531f8..e123f35 100644
6318 ret;
6319 ENDPROC(cast6_xts_enc_8way)
6320
6321 +-ENTRY(cast6_xts_dec_8way)
6322 ++RAP_ENTRY(cast6_xts_dec_8way)
6323 + /* input:
6324 + * %rdi: ctx, CTX
6325 + * %rsi: dst
6326 @@ -468,5 +476,6 @@ ENTRY(cast6_xts_dec_8way)
6327 /* dst <= regs xor IVs(in dst) */
6328 store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6329 @@ -13903,6 +14197,39 @@ index e3531f8..e123f35 100644
6330 + pax_force_retaddr
6331 ret;
6332 ENDPROC(cast6_xts_dec_8way)
6333 +diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x86/crypto/cast6_avx_glue.c
6334 +index fca4595..e5d2127 100644
6335 +--- a/arch/x86/crypto/cast6_avx_glue.c
6336 ++++ b/arch/x86/crypto/cast6_avx_glue.c
6337 +@@ -41,20 +41,20 @@
6338 +
6339 + #define CAST6_PARALLEL_BLOCKS 8
6340 +
6341 +-asmlinkage void cast6_ecb_enc_8way(struct cast6_ctx *ctx, u8 *dst,
6342 ++asmlinkage void cast6_ecb_enc_8way(void *ctx, u8 *dst,
6343 + const u8 *src);
6344 +-asmlinkage void cast6_ecb_dec_8way(struct cast6_ctx *ctx, u8 *dst,
6345 ++asmlinkage void cast6_ecb_dec_8way(void *ctx, u8 *dst,
6346 + const u8 *src);
6347 +
6348 +-asmlinkage void cast6_cbc_dec_8way(struct cast6_ctx *ctx, u8 *dst,
6349 ++asmlinkage void cast6_cbc_dec_8way(void *ctx, u8 *dst,
6350 + const u8 *src);
6351 +-asmlinkage void cast6_ctr_8way(struct cast6_ctx *ctx, u8 *dst, const u8 *src,
6352 ++asmlinkage void cast6_ctr_8way(void *ctx, u128 *dst, const u128 *src,
6353 + le128 *iv);
6354 +
6355 +-asmlinkage void cast6_xts_enc_8way(struct cast6_ctx *ctx, u8 *dst,
6356 +- const u8 *src, le128 *iv);
6357 +-asmlinkage void cast6_xts_dec_8way(struct cast6_ctx *ctx, u8 *dst,
6358 +- const u8 *src, le128 *iv);
6359 ++asmlinkage void cast6_xts_enc_8way(void *ctx, u128 *dst,
6360 ++ const u128 *src, le128 *iv);
6361 ++asmlinkage void cast6_xts_dec_8way(void *ctx, u128 *dst,
6362 ++ const u128 *src, le128 *iv);
6363 +
6364 + static void cast6_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv)
6365 + {
6366 diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
6367 index 4fe27e0..2885e731 100644
6368 --- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
6369 @@ -13958,6 +14285,19 @@ index 5d1e007..098cb4f 100644
6370 + pax_force_retaddr
6371 ret
6372 ENDPROC(clmul_ghash_update)
6373 +diff --git a/arch/x86/crypto/glue_helper.c b/arch/x86/crypto/glue_helper.c
6374 +index 6a85598..fed2ada 100644
6375 +--- a/arch/x86/crypto/glue_helper.c
6376 ++++ b/arch/x86/crypto/glue_helper.c
6377 +@@ -165,7 +165,7 @@ __glue_cbc_decrypt_128bit(const struct common_glue_ctx *gctx,
6378 + src -= num_blocks - 1;
6379 + dst -= num_blocks - 1;
6380 +
6381 +- gctx->funcs[i].fn_u.cbc(ctx, dst, src);
6382 ++ gctx->funcs[i].fn_u.cbc(ctx, (u8 *)dst, (u8 *)src);
6383 +
6384 + nbytes -= bsize;
6385 + if (nbytes < bsize)
6386 diff --git a/arch/x86/crypto/salsa20-x86_64-asm_64.S b/arch/x86/crypto/salsa20-x86_64-asm_64.S
6387 index 9279e0b..c4b3d2c 100644
6388 --- a/arch/x86/crypto/salsa20-x86_64-asm_64.S
6389 @@ -13992,7 +14332,7 @@ index 9279e0b..c4b3d2c 100644
6390 ret
6391 ENDPROC(salsa20_ivsetup)
6392 diff --git a/arch/x86/crypto/serpent-avx-x86_64-asm_64.S b/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
6393 -index 2f202f4..d9164d6 100644
6394 +index 2f202f4..e671172 100644
6395 --- a/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
6396 +++ b/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
6397 @@ -24,6 +24,7 @@
6398 @@ -14011,7 +14351,7 @@ index 2f202f4..d9164d6 100644
6399 ret;
6400 ENDPROC(__serpent_enc_blk8_avx)
6401
6402 -@@ -672,6 +674,7 @@ __serpent_dec_blk8_avx:
6403 +@@ -672,10 +674,11 @@ __serpent_dec_blk8_avx:
6404 write_blocks(RC1, RD1, RB1, RE1, RK0, RK1, RK2);
6405 write_blocks(RC2, RD2, RB2, RE2, RK0, RK1, RK2);
6406
6407 @@ -14019,7 +14359,12 @@ index 2f202f4..d9164d6 100644
6408 ret;
6409 ENDPROC(__serpent_dec_blk8_avx)
6410
6411 -@@ -688,6 +691,7 @@ ENTRY(serpent_ecb_enc_8way_avx)
6412 +-ENTRY(serpent_ecb_enc_8way_avx)
6413 ++RAP_ENTRY(serpent_ecb_enc_8way_avx)
6414 + /* input:
6415 + * %rdi: ctx, CTX
6416 + * %rsi: dst
6417 +@@ -688,10 +691,11 @@ ENTRY(serpent_ecb_enc_8way_avx)
6418
6419 store_8way(%rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6420
6421 @@ -14027,7 +14372,12 @@ index 2f202f4..d9164d6 100644
6422 ret;
6423 ENDPROC(serpent_ecb_enc_8way_avx)
6424
6425 -@@ -704,6 +708,7 @@ ENTRY(serpent_ecb_dec_8way_avx)
6426 +-ENTRY(serpent_ecb_dec_8way_avx)
6427 ++RAP_ENTRY(serpent_ecb_dec_8way_avx)
6428 + /* input:
6429 + * %rdi: ctx, CTX
6430 + * %rsi: dst
6431 +@@ -704,10 +708,11 @@ ENTRY(serpent_ecb_dec_8way_avx)
6432
6433 store_8way(%rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
6434
6435 @@ -14035,7 +14385,12 @@ index 2f202f4..d9164d6 100644
6436 ret;
6437 ENDPROC(serpent_ecb_dec_8way_avx)
6438
6439 -@@ -720,6 +725,7 @@ ENTRY(serpent_cbc_dec_8way_avx)
6440 +-ENTRY(serpent_cbc_dec_8way_avx)
6441 ++RAP_ENTRY(serpent_cbc_dec_8way_avx)
6442 + /* input:
6443 + * %rdi: ctx, CTX
6444 + * %rsi: dst
6445 +@@ -720,10 +725,11 @@ ENTRY(serpent_cbc_dec_8way_avx)
6446
6447 store_cbc_8way(%rdx, %rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
6448
6449 @@ -14043,7 +14398,12 @@ index 2f202f4..d9164d6 100644
6450 ret;
6451 ENDPROC(serpent_cbc_dec_8way_avx)
6452
6453 -@@ -738,6 +744,7 @@ ENTRY(serpent_ctr_8way_avx)
6454 +-ENTRY(serpent_ctr_8way_avx)
6455 ++RAP_ENTRY(serpent_ctr_8way_avx)
6456 + /* input:
6457 + * %rdi: ctx, CTX
6458 + * %rsi: dst
6459 +@@ -738,10 +744,11 @@ ENTRY(serpent_ctr_8way_avx)
6460
6461 store_ctr_8way(%rdx, %rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6462
6463 @@ -14051,7 +14411,12 @@ index 2f202f4..d9164d6 100644
6464 ret;
6465 ENDPROC(serpent_ctr_8way_avx)
6466
6467 -@@ -758,6 +765,7 @@ ENTRY(serpent_xts_enc_8way_avx)
6468 +-ENTRY(serpent_xts_enc_8way_avx)
6469 ++RAP_ENTRY(serpent_xts_enc_8way_avx)
6470 + /* input:
6471 + * %rdi: ctx, CTX
6472 + * %rsi: dst
6473 +@@ -758,10 +765,11 @@ ENTRY(serpent_xts_enc_8way_avx)
6474 /* dst <= regs xor IVs(in dst) */
6475 store_xts_8way(%rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
6476
6477 @@ -14059,6 +14424,11 @@ index 2f202f4..d9164d6 100644
6478 ret;
6479 ENDPROC(serpent_xts_enc_8way_avx)
6480
6481 +-ENTRY(serpent_xts_dec_8way_avx)
6482 ++RAP_ENTRY(serpent_xts_dec_8way_avx)
6483 + /* input:
6484 + * %rdi: ctx, CTX
6485 + * %rsi: dst
6486 @@ -778,5 +786,6 @@ ENTRY(serpent_xts_dec_8way_avx)
6487 /* dst <= regs xor IVs(in dst) */
6488 store_xts_8way(%rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
6489 @@ -14067,7 +14437,7 @@ index 2f202f4..d9164d6 100644
6490 ret;
6491 ENDPROC(serpent_xts_dec_8way_avx)
6492 diff --git a/arch/x86/crypto/serpent-avx2-asm_64.S b/arch/x86/crypto/serpent-avx2-asm_64.S
6493 -index b222085..abd483c 100644
6494 +index b222085..c43efce 100644
6495 --- a/arch/x86/crypto/serpent-avx2-asm_64.S
6496 +++ b/arch/x86/crypto/serpent-avx2-asm_64.S
6497 @@ -15,6 +15,7 @@
6498 @@ -14086,7 +14456,7 @@ index b222085..abd483c 100644
6499 ret;
6500 ENDPROC(__serpent_enc_blk16)
6501
6502 -@@ -664,6 +666,7 @@ __serpent_dec_blk16:
6503 +@@ -664,10 +666,11 @@ __serpent_dec_blk16:
6504 write_blocks(RC1, RD1, RB1, RE1, RK0, RK1, RK2);
6505 write_blocks(RC2, RD2, RB2, RE2, RK0, RK1, RK2);
6506
6507 @@ -14094,7 +14464,12 @@ index b222085..abd483c 100644
6508 ret;
6509 ENDPROC(__serpent_dec_blk16)
6510
6511 -@@ -684,6 +687,7 @@ ENTRY(serpent_ecb_enc_16way)
6512 +-ENTRY(serpent_ecb_enc_16way)
6513 ++RAP_ENTRY(serpent_ecb_enc_16way)
6514 + /* input:
6515 + * %rdi: ctx, CTX
6516 + * %rsi: dst
6517 +@@ -684,10 +687,11 @@ ENTRY(serpent_ecb_enc_16way)
6518
6519 vzeroupper;
6520
6521 @@ -14102,7 +14477,12 @@ index b222085..abd483c 100644
6522 ret;
6523 ENDPROC(serpent_ecb_enc_16way)
6524
6525 -@@ -704,6 +708,7 @@ ENTRY(serpent_ecb_dec_16way)
6526 +-ENTRY(serpent_ecb_dec_16way)
6527 ++RAP_ENTRY(serpent_ecb_dec_16way)
6528 + /* input:
6529 + * %rdi: ctx, CTX
6530 + * %rsi: dst
6531 +@@ -704,10 +708,11 @@ ENTRY(serpent_ecb_dec_16way)
6532
6533 vzeroupper;
6534
6535 @@ -14110,7 +14490,12 @@ index b222085..abd483c 100644
6536 ret;
6537 ENDPROC(serpent_ecb_dec_16way)
6538
6539 -@@ -725,6 +730,7 @@ ENTRY(serpent_cbc_dec_16way)
6540 +-ENTRY(serpent_cbc_dec_16way)
6541 ++RAP_ENTRY(serpent_cbc_dec_16way)
6542 + /* input:
6543 + * %rdi: ctx, CTX
6544 + * %rsi: dst
6545 +@@ -725,10 +730,11 @@ ENTRY(serpent_cbc_dec_16way)
6546
6547 vzeroupper;
6548
6549 @@ -14118,7 +14503,12 @@ index b222085..abd483c 100644
6550 ret;
6551 ENDPROC(serpent_cbc_dec_16way)
6552
6553 -@@ -748,6 +754,7 @@ ENTRY(serpent_ctr_16way)
6554 +-ENTRY(serpent_ctr_16way)
6555 ++RAP_ENTRY(serpent_ctr_16way)
6556 + /* input:
6557 + * %rdi: ctx, CTX
6558 + * %rsi: dst (16 blocks)
6559 +@@ -748,10 +754,11 @@ ENTRY(serpent_ctr_16way)
6560
6561 vzeroupper;
6562
6563 @@ -14126,7 +14516,12 @@ index b222085..abd483c 100644
6564 ret;
6565 ENDPROC(serpent_ctr_16way)
6566
6567 -@@ -772,6 +779,7 @@ ENTRY(serpent_xts_enc_16way)
6568 +-ENTRY(serpent_xts_enc_16way)
6569 ++RAP_ENTRY(serpent_xts_enc_16way)
6570 + /* input:
6571 + * %rdi: ctx, CTX
6572 + * %rsi: dst (16 blocks)
6573 +@@ -772,10 +779,11 @@ ENTRY(serpent_xts_enc_16way)
6574
6575 vzeroupper;
6576
6577 @@ -14134,6 +14529,11 @@ index b222085..abd483c 100644
6578 ret;
6579 ENDPROC(serpent_xts_enc_16way)
6580
6581 +-ENTRY(serpent_xts_dec_16way)
6582 ++RAP_ENTRY(serpent_xts_dec_16way)
6583 + /* input:
6584 + * %rdi: ctx, CTX
6585 + * %rsi: dst (16 blocks)
6586 @@ -796,5 +804,6 @@ ENTRY(serpent_xts_dec_16way)
6587
6588 vzeroupper;
6589 @@ -14175,6 +14575,94 @@ index acc066c..1559cc4 100644
6590 + pax_force_retaddr
6591 ret;
6592 ENDPROC(serpent_dec_blk_8way)
6593 +diff --git a/arch/x86/crypto/serpent_avx2_glue.c b/arch/x86/crypto/serpent_avx2_glue.c
6594 +index 6d19834..a08fbe9 100644
6595 +--- a/arch/x86/crypto/serpent_avx2_glue.c
6596 ++++ b/arch/x86/crypto/serpent_avx2_glue.c
6597 +@@ -27,18 +27,18 @@
6598 + #define SERPENT_AVX2_PARALLEL_BLOCKS 16
6599 +
6600 + /* 16-way AVX2 parallel cipher functions */
6601 +-asmlinkage void serpent_ecb_enc_16way(struct serpent_ctx *ctx, u8 *dst,
6602 ++asmlinkage void serpent_ecb_enc_16way(void *ctx, u8 *dst,
6603 + const u8 *src);
6604 +-asmlinkage void serpent_ecb_dec_16way(struct serpent_ctx *ctx, u8 *dst,
6605 ++asmlinkage void serpent_ecb_dec_16way(void *ctx, u8 *dst,
6606 + const u8 *src);
6607 +-asmlinkage void serpent_cbc_dec_16way(void *ctx, u128 *dst, const u128 *src);
6608 ++asmlinkage void serpent_cbc_dec_16way(void *ctx, u8 *dst, const u8 *src);
6609 +
6610 + asmlinkage void serpent_ctr_16way(void *ctx, u128 *dst, const u128 *src,
6611 + le128 *iv);
6612 +-asmlinkage void serpent_xts_enc_16way(struct serpent_ctx *ctx, u8 *dst,
6613 +- const u8 *src, le128 *iv);
6614 +-asmlinkage void serpent_xts_dec_16way(struct serpent_ctx *ctx, u8 *dst,
6615 +- const u8 *src, le128 *iv);
6616 ++asmlinkage void serpent_xts_enc_16way(void *ctx, u128 *dst,
6617 ++ const u128 *src, le128 *iv);
6618 ++asmlinkage void serpent_xts_dec_16way(void *ctx, u128 *dst,
6619 ++ const u128 *src, le128 *iv);
6620 +
6621 + static const struct common_glue_ctx serpent_enc = {
6622 + .num_funcs = 3,
6623 +diff --git a/arch/x86/crypto/serpent_avx_glue.c b/arch/x86/crypto/serpent_avx_glue.c
6624 +index 5dc3702..10f232a 100644
6625 +--- a/arch/x86/crypto/serpent_avx_glue.c
6626 ++++ b/arch/x86/crypto/serpent_avx_glue.c
6627 +@@ -41,28 +41,28 @@
6628 + #include <asm/crypto/glue_helper.h>
6629 +
6630 + /* 8-way parallel cipher functions */
6631 +-asmlinkage void serpent_ecb_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
6632 ++asmlinkage void serpent_ecb_enc_8way_avx(void *ctx, u8 *dst,
6633 + const u8 *src);
6634 + EXPORT_SYMBOL_GPL(serpent_ecb_enc_8way_avx);
6635 +
6636 +-asmlinkage void serpent_ecb_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
6637 ++asmlinkage void serpent_ecb_dec_8way_avx(void *ctx, u8 *dst,
6638 + const u8 *src);
6639 + EXPORT_SYMBOL_GPL(serpent_ecb_dec_8way_avx);
6640 +
6641 +-asmlinkage void serpent_cbc_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
6642 ++asmlinkage void serpent_cbc_dec_8way_avx(void *ctx, u8 *dst,
6643 + const u8 *src);
6644 + EXPORT_SYMBOL_GPL(serpent_cbc_dec_8way_avx);
6645 +
6646 +-asmlinkage void serpent_ctr_8way_avx(struct serpent_ctx *ctx, u8 *dst,
6647 +- const u8 *src, le128 *iv);
6648 ++asmlinkage void serpent_ctr_8way_avx(void *ctx, u128 *dst,
6649 ++ const u128 *src, le128 *iv);
6650 + EXPORT_SYMBOL_GPL(serpent_ctr_8way_avx);
6651 +
6652 +-asmlinkage void serpent_xts_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
6653 +- const u8 *src, le128 *iv);
6654 ++asmlinkage void serpent_xts_enc_8way_avx(void *ctx, u128 *dst,
6655 ++ const u128 *src, le128 *iv);
6656 + EXPORT_SYMBOL_GPL(serpent_xts_enc_8way_avx);
6657 +
6658 +-asmlinkage void serpent_xts_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
6659 +- const u8 *src, le128 *iv);
6660 ++asmlinkage void serpent_xts_dec_8way_avx(void *ctx, u128 *dst,
6661 ++ const u128 *src, le128 *iv);
6662 + EXPORT_SYMBOL_GPL(serpent_xts_dec_8way_avx);
6663 +
6664 + void __serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src, le128 *iv)
6665 +diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c
6666 +index 3643dd5..17d5e30 100644
6667 +--- a/arch/x86/crypto/serpent_sse2_glue.c
6668 ++++ b/arch/x86/crypto/serpent_sse2_glue.c
6669 +@@ -45,8 +45,10 @@
6670 + #include <asm/crypto/serpent-sse2.h>
6671 + #include <asm/crypto/glue_helper.h>
6672 +
6673 +-static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src)
6674 ++static void serpent_decrypt_cbc_xway(void *ctx, u8 *_dst, const u8 *_src)
6675 + {
6676 ++ u128 *dst = (u128 *)_dst;
6677 ++ const u128 *src = (const u128 *)_src;
6678 + u128 ivs[SERPENT_PARALLEL_BLOCKS - 1];
6679 + unsigned int j;
6680 +
6681 diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
6682 index a841e97..8381c09d 100644
6683 --- a/arch/x86/crypto/sha-mb/sha1_mb.c
6684 @@ -14193,7 +14681,7 @@ index a841e97..8381c09d 100644
6685 }
6686 }
6687 diff --git a/arch/x86/crypto/sha1_ssse3_asm.S b/arch/x86/crypto/sha1_ssse3_asm.S
6688 -index a410950..9dfe7ad 100644
6689 +index a410950..02d2056 100644
6690 --- a/arch/x86/crypto/sha1_ssse3_asm.S
6691 +++ b/arch/x86/crypto/sha1_ssse3_asm.S
6692 @@ -29,6 +29,7 @@
6693 @@ -14204,7 +14692,13 @@ index a410950..9dfe7ad 100644
6694
6695 #define CTX %rdi // arg1
6696 #define BUF %rsi // arg2
6697 -@@ -75,9 +76,9 @@
6698 +@@ -71,13 +72,14 @@
6699 + * param: function's name
6700 + */
6701 + .macro SHA1_VECTOR_ASM name
6702 +- ENTRY(\name)
6703 ++ALIGN
6704 ++ RAP_ENTRY(\name)
6705
6706 push %rbx
6707 push %rbp
6708 @@ -14216,7 +14710,7 @@ index a410950..9dfe7ad 100644
6709 sub $64, %rsp # allocate workspace
6710 and $~15, %rsp # align stack
6711
6712 -@@ -99,11 +100,12 @@
6713 +@@ -99,11 +101,12 @@
6714 xor %rax, %rax
6715 rep stosq
6716
6717 @@ -14231,8 +14725,161 @@ index a410950..9dfe7ad 100644
6718 ret
6719
6720 ENDPROC(\name)
6721 +diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c
6722 +index dd14616..53358bb 100644
6723 +--- a/arch/x86/crypto/sha1_ssse3_glue.c
6724 ++++ b/arch/x86/crypto/sha1_ssse3_glue.c
6725 +@@ -31,8 +31,8 @@
6726 + #include <crypto/sha1_base.h>
6727 + #include <asm/fpu/api.h>
6728 +
6729 +-typedef void (sha1_transform_fn)(u32 *digest, const char *data,
6730 +- unsigned int rounds);
6731 ++typedef void (sha1_transform_fn)(struct sha1_state *digest, const u8 *data,
6732 ++ int rounds);
6733 +
6734 + static int sha1_update(struct shash_desc *desc, const u8 *data,
6735 + unsigned int len, sha1_transform_fn *sha1_xform)
6736 +@@ -47,8 +47,7 @@ static int sha1_update(struct shash_desc *desc, const u8 *data,
6737 + BUILD_BUG_ON(offsetof(struct sha1_state, state) != 0);
6738 +
6739 + kernel_fpu_begin();
6740 +- sha1_base_do_update(desc, data, len,
6741 +- (sha1_block_fn *)sha1_xform);
6742 ++ sha1_base_do_update(desc, data, len, sha1_xform);
6743 + kernel_fpu_end();
6744 +
6745 + return 0;
6746 +@@ -62,29 +61,26 @@ static int sha1_finup(struct shash_desc *desc, const u8 *data,
6747 +
6748 + kernel_fpu_begin();
6749 + if (len)
6750 +- sha1_base_do_update(desc, data, len,
6751 +- (sha1_block_fn *)sha1_xform);
6752 +- sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_xform);
6753 ++ sha1_base_do_update(desc, data, len, sha1_xform);
6754 ++ sha1_base_do_finalize(desc, sha1_xform);
6755 + kernel_fpu_end();
6756 +
6757 + return sha1_base_finish(desc, out);
6758 + }
6759 +
6760 +-asmlinkage void sha1_transform_ssse3(u32 *digest, const char *data,
6761 +- unsigned int rounds);
6762 ++asmlinkage void sha1_transform_ssse3(struct sha1_state *digest, const u8 *data,
6763 ++ int rounds);
6764 +
6765 + static int sha1_ssse3_update(struct shash_desc *desc, const u8 *data,
6766 + unsigned int len)
6767 + {
6768 +- return sha1_update(desc, data, len,
6769 +- (sha1_transform_fn *) sha1_transform_ssse3);
6770 ++ return sha1_update(desc, data, len, sha1_transform_ssse3);
6771 + }
6772 +
6773 + static int sha1_ssse3_finup(struct shash_desc *desc, const u8 *data,
6774 + unsigned int len, u8 *out)
6775 + {
6776 +- return sha1_finup(desc, data, len, out,
6777 +- (sha1_transform_fn *) sha1_transform_ssse3);
6778 ++ return sha1_finup(desc, data, len, out, sha1_transform_ssse3);
6779 + }
6780 +
6781 + /* Add padding and return the message digest. */
6782 +@@ -124,21 +120,19 @@ static void unregister_sha1_ssse3(void)
6783 + }
6784 +
6785 + #ifdef CONFIG_AS_AVX
6786 +-asmlinkage void sha1_transform_avx(u32 *digest, const char *data,
6787 +- unsigned int rounds);
6788 ++asmlinkage void sha1_transform_avx(struct sha1_state *digest, const u8 *data,
6789 ++ int rounds);
6790 +
6791 + static int sha1_avx_update(struct shash_desc *desc, const u8 *data,
6792 + unsigned int len)
6793 + {
6794 +- return sha1_update(desc, data, len,
6795 +- (sha1_transform_fn *) sha1_transform_avx);
6796 ++ return sha1_update(desc, data, len, sha1_transform_avx);
6797 + }
6798 +
6799 + static int sha1_avx_finup(struct shash_desc *desc, const u8 *data,
6800 + unsigned int len, u8 *out)
6801 + {
6802 +- return sha1_finup(desc, data, len, out,
6803 +- (sha1_transform_fn *) sha1_transform_avx);
6804 ++ return sha1_finup(desc, data, len, out, sha1_transform_avx);
6805 + }
6806 +
6807 + static int sha1_avx_final(struct shash_desc *desc, u8 *out)
6808 +@@ -196,8 +190,8 @@ static inline void unregister_sha1_avx(void) { }
6809 + #if defined(CONFIG_AS_AVX2) && (CONFIG_AS_AVX)
6810 + #define SHA1_AVX2_BLOCK_OPTSIZE 4 /* optimal 4*64 bytes of SHA1 blocks */
6811 +
6812 +-asmlinkage void sha1_transform_avx2(u32 *digest, const char *data,
6813 +- unsigned int rounds);
6814 ++asmlinkage void sha1_transform_avx2(struct sha1_state *digest, const u8 *data,
6815 ++ int rounds);
6816 +
6817 + static bool avx2_usable(void)
6818 + {
6819 +@@ -209,8 +203,8 @@ static bool avx2_usable(void)
6820 + return false;
6821 + }
6822 +
6823 +-static void sha1_apply_transform_avx2(u32 *digest, const char *data,
6824 +- unsigned int rounds)
6825 ++static void sha1_apply_transform_avx2(struct sha1_state *digest, const u8 *data,
6826 ++ int rounds)
6827 + {
6828 + /* Select the optimal transform based on data block size */
6829 + if (rounds >= SHA1_AVX2_BLOCK_OPTSIZE)
6830 +@@ -222,15 +216,13 @@ static void sha1_apply_transform_avx2(u32 *digest, const char *data,
6831 + static int sha1_avx2_update(struct shash_desc *desc, const u8 *data,
6832 + unsigned int len)
6833 + {
6834 +- return sha1_update(desc, data, len,
6835 +- (sha1_transform_fn *) sha1_apply_transform_avx2);
6836 ++ return sha1_update(desc, data, len, sha1_apply_transform_avx2);
6837 + }
6838 +
6839 + static int sha1_avx2_finup(struct shash_desc *desc, const u8 *data,
6840 + unsigned int len, u8 *out)
6841 + {
6842 +- return sha1_finup(desc, data, len, out,
6843 +- (sha1_transform_fn *) sha1_apply_transform_avx2);
6844 ++ return sha1_finup(desc, data, len, out, sha1_apply_transform_avx2);
6845 + }
6846 +
6847 + static int sha1_avx2_final(struct shash_desc *desc, u8 *out)
6848 +@@ -274,21 +266,19 @@ static inline void unregister_sha1_avx2(void) { }
6849 + #endif
6850 +
6851 + #ifdef CONFIG_AS_SHA1_NI
6852 +-asmlinkage void sha1_ni_transform(u32 *digest, const char *data,
6853 +- unsigned int rounds);
6854 ++asmlinkage void sha1_ni_transform(struct sha1_state *digest, const u8 *data,
6855 ++ int rounds);
6856 +
6857 + static int sha1_ni_update(struct shash_desc *desc, const u8 *data,
6858 + unsigned int len)
6859 + {
6860 +- return sha1_update(desc, data, len,
6861 +- (sha1_transform_fn *) sha1_ni_transform);
6862 ++ return sha1_update(desc, data, len, sha1_ni_transform);
6863 + }
6864 +
6865 + static int sha1_ni_finup(struct shash_desc *desc, const u8 *data,
6866 + unsigned int len, u8 *out)
6867 + {
6868 +- return sha1_finup(desc, data, len, out,
6869 +- (sha1_transform_fn *) sha1_ni_transform);
6870 ++ return sha1_finup(desc, data, len, out, sha1_ni_transform);
6871 + }
6872 +
6873 + static int sha1_ni_final(struct shash_desc *desc, u8 *out)
6874 diff --git a/arch/x86/crypto/sha256-avx-asm.S b/arch/x86/crypto/sha256-avx-asm.S
6875 -index 92b3b5d..0dc1dcb 100644
6876 +index 92b3b5d..8732479 100644
6877 --- a/arch/x86/crypto/sha256-avx-asm.S
6878 +++ b/arch/x86/crypto/sha256-avx-asm.S
6879 @@ -49,6 +49,7 @@
6880 @@ -14243,7 +14890,17 @@ index 92b3b5d..0dc1dcb 100644
6881
6882 ## assume buffers not aligned
6883 #define VMOVDQ vmovdqu
6884 -@@ -460,6 +461,7 @@ done_hash:
6885 +@@ -347,8 +348,7 @@ a = TMP_
6886 + ## arg 3 : Num blocks
6887 + ########################################################################
6888 + .text
6889 +-ENTRY(sha256_transform_avx)
6890 +-.align 32
6891 ++RAP_ENTRY(sha256_transform_avx)
6892 + pushq %rbx
6893 + pushq %rbp
6894 + pushq %r13
6895 +@@ -460,6 +460,7 @@ done_hash:
6896 popq %r13
6897 popq %rbp
6898 popq %rbx
6899 @@ -14252,7 +14909,7 @@ index 92b3b5d..0dc1dcb 100644
6900 ENDPROC(sha256_transform_avx)
6901
6902 diff --git a/arch/x86/crypto/sha256-avx2-asm.S b/arch/x86/crypto/sha256-avx2-asm.S
6903 -index 570ec5e..cf2b625 100644
6904 +index 570ec5e..9bcfa25 100644
6905 --- a/arch/x86/crypto/sha256-avx2-asm.S
6906 +++ b/arch/x86/crypto/sha256-avx2-asm.S
6907 @@ -50,6 +50,7 @@
6908 @@ -14263,7 +14920,17 @@ index 570ec5e..cf2b625 100644
6909
6910 ## assume buffers not aligned
6911 #define VMOVDQ vmovdqu
6912 -@@ -720,6 +721,7 @@ done_hash:
6913 +@@ -528,8 +529,7 @@ STACK_SIZE = _RSP + _RSP_SIZE
6914 + ## arg 3 : Num blocks
6915 + ########################################################################
6916 + .text
6917 +-ENTRY(sha256_transform_rorx)
6918 +-.align 32
6919 ++RAP_ENTRY(sha256_transform_rorx)
6920 + pushq %rbx
6921 + pushq %rbp
6922 + pushq %r12
6923 +@@ -720,6 +720,7 @@ done_hash:
6924 popq %r12
6925 popq %rbp
6926 popq %rbx
6927 @@ -14272,7 +14939,7 @@ index 570ec5e..cf2b625 100644
6928 ENDPROC(sha256_transform_rorx)
6929
6930 diff --git a/arch/x86/crypto/sha256-ssse3-asm.S b/arch/x86/crypto/sha256-ssse3-asm.S
6931 -index 2cedc44..5144899 100644
6932 +index 2cedc44..6fb8582 100644
6933 --- a/arch/x86/crypto/sha256-ssse3-asm.S
6934 +++ b/arch/x86/crypto/sha256-ssse3-asm.S
6935 @@ -47,6 +47,7 @@
6936 @@ -14283,7 +14950,18 @@ index 2cedc44..5144899 100644
6937
6938 ## assume buffers not aligned
6939 #define MOVDQ movdqu
6940 -@@ -471,6 +472,7 @@ done_hash:
6941 +@@ -352,9 +353,7 @@ a = TMP_
6942 + ## arg 2 : pointer to input data
6943 + ## arg 3 : Num blocks
6944 + ########################################################################
6945 +-.text
6946 +-ENTRY(sha256_transform_ssse3)
6947 +-.align 32
6948 ++RAP_ENTRY(sha256_transform_ssse3)
6949 + pushq %rbx
6950 + pushq %rbp
6951 + pushq %r13
6952 +@@ -471,6 +470,7 @@ done_hash:
6953 popq %rbp
6954 popq %rbx
6955
6956 @@ -14291,8 +14969,80 @@ index 2cedc44..5144899 100644
6957 ret
6958 ENDPROC(sha256_transform_ssse3)
6959
6960 +diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c
6961 +index 5f4d608..ddce00d 100644
6962 +--- a/arch/x86/crypto/sha256_ssse3_glue.c
6963 ++++ b/arch/x86/crypto/sha256_ssse3_glue.c
6964 +@@ -40,9 +40,9 @@
6965 + #include <asm/fpu/api.h>
6966 + #include <linux/string.h>
6967 +
6968 +-asmlinkage void sha256_transform_ssse3(u32 *digest, const char *data,
6969 +- u64 rounds);
6970 +-typedef void (sha256_transform_fn)(u32 *digest, const char *data, u64 rounds);
6971 ++asmlinkage void sha256_transform_ssse3(struct sha256_state *digest, const u8 *data,
6972 ++ int rounds);
6973 ++typedef void (sha256_transform_fn)(struct sha256_state *digest, const u8 *data, int rounds);
6974 +
6975 + static int sha256_update(struct shash_desc *desc, const u8 *data,
6976 + unsigned int len, sha256_transform_fn *sha256_xform)
6977 +@@ -57,8 +57,7 @@ static int sha256_update(struct shash_desc *desc, const u8 *data,
6978 + BUILD_BUG_ON(offsetof(struct sha256_state, state) != 0);
6979 +
6980 + kernel_fpu_begin();
6981 +- sha256_base_do_update(desc, data, len,
6982 +- (sha256_block_fn *)sha256_xform);
6983 ++ sha256_base_do_update(desc, data, len, sha256_xform);
6984 + kernel_fpu_end();
6985 +
6986 + return 0;
6987 +@@ -72,9 +71,8 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data,
6988 +
6989 + kernel_fpu_begin();
6990 + if (len)
6991 +- sha256_base_do_update(desc, data, len,
6992 +- (sha256_block_fn *)sha256_xform);
6993 +- sha256_base_do_finalize(desc, (sha256_block_fn *)sha256_xform);
6994 ++ sha256_base_do_update(desc, data, len, sha256_xform);
6995 ++ sha256_base_do_finalize(desc, sha256_xform);
6996 + kernel_fpu_end();
6997 +
6998 + return sha256_base_finish(desc, out);
6999 +@@ -146,8 +144,8 @@ static void unregister_sha256_ssse3(void)
7000 + }
7001 +
7002 + #ifdef CONFIG_AS_AVX
7003 +-asmlinkage void sha256_transform_avx(u32 *digest, const char *data,
7004 +- u64 rounds);
7005 ++asmlinkage void sha256_transform_avx(struct sha256_state *digest, const u8 *data,
7006 ++ int rounds);
7007 +
7008 + static int sha256_avx_update(struct shash_desc *desc, const u8 *data,
7009 + unsigned int len)
7010 +@@ -230,8 +228,8 @@ static inline void unregister_sha256_avx(void) { }
7011 + #endif
7012 +
7013 + #if defined(CONFIG_AS_AVX2) && defined(CONFIG_AS_AVX)
7014 +-asmlinkage void sha256_transform_rorx(u32 *digest, const char *data,
7015 +- u64 rounds);
7016 ++asmlinkage void sha256_transform_rorx(struct sha256_state *digest, const u8 *data,
7017 ++ int rounds);
7018 +
7019 + static int sha256_avx2_update(struct shash_desc *desc, const u8 *data,
7020 + unsigned int len)
7021 +@@ -312,8 +310,8 @@ static inline void unregister_sha256_avx2(void) { }
7022 + #endif
7023 +
7024 + #ifdef CONFIG_AS_SHA256_NI
7025 +-asmlinkage void sha256_ni_transform(u32 *digest, const char *data,
7026 +- u64 rounds); /*unsigned int rounds);*/
7027 ++asmlinkage void sha256_ni_transform(struct sha256_state *digest, const u8 *data,
7028 ++ int rounds); /*unsigned int rounds);*/
7029 +
7030 + static int sha256_ni_update(struct shash_desc *desc, const u8 *data,
7031 + unsigned int len)
7032 diff --git a/arch/x86/crypto/sha512-avx-asm.S b/arch/x86/crypto/sha512-avx-asm.S
7033 -index 565274d..af6bc08 100644
7034 +index 565274d..779d34a 100644
7035 --- a/arch/x86/crypto/sha512-avx-asm.S
7036 +++ b/arch/x86/crypto/sha512-avx-asm.S
7037 @@ -49,6 +49,7 @@
7038 @@ -14303,7 +15053,17 @@ index 565274d..af6bc08 100644
7039
7040 .text
7041
7042 -@@ -364,6 +365,7 @@ updateblock:
7043 +@@ -277,7 +278,8 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
7044 + # message blocks.
7045 + # L is the message length in SHA512 blocks
7046 + ########################################################################
7047 +-ENTRY(sha512_transform_avx)
7048 ++ALIGN
7049 ++RAP_ENTRY(sha512_transform_avx)
7050 + cmp $0, msglen
7051 + je nowork
7052 +
7053 +@@ -364,6 +366,7 @@ updateblock:
7054 mov frame_RSPSAVE(%rsp), %rsp
7055
7056 nowork:
7057 @@ -14312,7 +15072,7 @@ index 565274d..af6bc08 100644
7058 ENDPROC(sha512_transform_avx)
7059
7060 diff --git a/arch/x86/crypto/sha512-avx2-asm.S b/arch/x86/crypto/sha512-avx2-asm.S
7061 -index 1f20b35..f25c8c1 100644
7062 +index 1f20b35..ab1f3a8 100644
7063 --- a/arch/x86/crypto/sha512-avx2-asm.S
7064 +++ b/arch/x86/crypto/sha512-avx2-asm.S
7065 @@ -51,6 +51,7 @@
7066 @@ -14323,7 +15083,17 @@ index 1f20b35..f25c8c1 100644
7067
7068 .text
7069
7070 -@@ -678,6 +679,7 @@ done_hash:
7071 +@@ -568,7 +569,8 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
7072 + # message blocks.
7073 + # L is the message length in SHA512 blocks
7074 + ########################################################################
7075 +-ENTRY(sha512_transform_rorx)
7076 ++ALIGN
7077 ++RAP_ENTRY(sha512_transform_rorx)
7078 + # Allocate Stack Space
7079 + mov %rsp, %rax
7080 + sub $frame_size, %rsp
7081 +@@ -678,6 +680,7 @@ done_hash:
7082
7083 # Restore Stack Pointer
7084 mov frame_RSPSAVE(%rsp), %rsp
7085 @@ -14332,7 +15102,7 @@ index 1f20b35..f25c8c1 100644
7086 ENDPROC(sha512_transform_rorx)
7087
7088 diff --git a/arch/x86/crypto/sha512-ssse3-asm.S b/arch/x86/crypto/sha512-ssse3-asm.S
7089 -index e610e29..ffcb5ed 100644
7090 +index e610e29..83f1cde 100644
7091 --- a/arch/x86/crypto/sha512-ssse3-asm.S
7092 +++ b/arch/x86/crypto/sha512-ssse3-asm.S
7093 @@ -48,6 +48,7 @@
7094 @@ -14343,7 +15113,17 @@ index e610e29..ffcb5ed 100644
7095
7096 .text
7097
7098 -@@ -363,6 +364,7 @@ updateblock:
7099 +@@ -275,7 +276,8 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
7100 + # message blocks.
7101 + # L is the message length in SHA512 blocks.
7102 + ########################################################################
7103 +-ENTRY(sha512_transform_ssse3)
7104 ++ALIGN
7105 ++RAP_ENTRY(sha512_transform_ssse3)
7106 +
7107 + cmp $0, msglen
7108 + je nowork
7109 +@@ -363,6 +365,7 @@ updateblock:
7110 mov frame_RSPSAVE(%rsp), %rsp
7111
7112 nowork:
7113 @@ -14351,8 +15131,70 @@ index e610e29..ffcb5ed 100644
7114 ret
7115 ENDPROC(sha512_transform_ssse3)
7116
7117 +diff --git a/arch/x86/crypto/sha512_ssse3_glue.c b/arch/x86/crypto/sha512_ssse3_glue.c
7118 +index 34e5083..eb57a5e 100644
7119 +--- a/arch/x86/crypto/sha512_ssse3_glue.c
7120 ++++ b/arch/x86/crypto/sha512_ssse3_glue.c
7121 +@@ -39,10 +39,10 @@
7122 +
7123 + #include <linux/string.h>
7124 +
7125 +-asmlinkage void sha512_transform_ssse3(u64 *digest, const char *data,
7126 +- u64 rounds);
7127 ++asmlinkage void sha512_transform_ssse3(struct sha512_state *digest, const u8 *data,
7128 ++ int rounds);
7129 +
7130 +-typedef void (sha512_transform_fn)(u64 *digest, const char *data, u64 rounds);
7131 ++typedef void (sha512_transform_fn)(struct sha512_state *digest, const u8 *data, int rounds);
7132 +
7133 + static int sha512_update(struct shash_desc *desc, const u8 *data,
7134 + unsigned int len, sha512_transform_fn *sha512_xform)
7135 +@@ -57,8 +57,7 @@ static int sha512_update(struct shash_desc *desc, const u8 *data,
7136 + BUILD_BUG_ON(offsetof(struct sha512_state, state) != 0);
7137 +
7138 + kernel_fpu_begin();
7139 +- sha512_base_do_update(desc, data, len,
7140 +- (sha512_block_fn *)sha512_xform);
7141 ++ sha512_base_do_update(desc, data, len, sha512_xform);
7142 + kernel_fpu_end();
7143 +
7144 + return 0;
7145 +@@ -72,9 +71,8 @@ static int sha512_finup(struct shash_desc *desc, const u8 *data,
7146 +
7147 + kernel_fpu_begin();
7148 + if (len)
7149 +- sha512_base_do_update(desc, data, len,
7150 +- (sha512_block_fn *)sha512_xform);
7151 +- sha512_base_do_finalize(desc, (sha512_block_fn *)sha512_xform);
7152 ++ sha512_base_do_update(desc, data, len, sha512_xform);
7153 ++ sha512_base_do_finalize(desc, sha512_xform);
7154 + kernel_fpu_end();
7155 +
7156 + return sha512_base_finish(desc, out);
7157 +@@ -146,8 +144,8 @@ static void unregister_sha512_ssse3(void)
7158 + }
7159 +
7160 + #ifdef CONFIG_AS_AVX
7161 +-asmlinkage void sha512_transform_avx(u64 *digest, const char *data,
7162 +- u64 rounds);
7163 ++asmlinkage void sha512_transform_avx(struct sha512_state *digest, const u8 *data,
7164 ++ int rounds);
7165 + static bool avx_usable(void)
7166 + {
7167 + if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
7168 +@@ -229,8 +227,8 @@ static inline void unregister_sha512_avx(void) { }
7169 + #endif
7170 +
7171 + #if defined(CONFIG_AS_AVX2) && defined(CONFIG_AS_AVX)
7172 +-asmlinkage void sha512_transform_rorx(u64 *digest, const char *data,
7173 +- u64 rounds);
7174 ++asmlinkage void sha512_transform_rorx(struct sha512_state *digest, const u8 *data,
7175 ++ int rounds);
7176 +
7177 + static int sha512_avx2_update(struct shash_desc *desc, const u8 *data,
7178 + unsigned int len)
7179 diff --git a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
7180 -index 0505813..b067311 100644
7181 +index 0505813..912c9c1 100644
7182 --- a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
7183 +++ b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
7184 @@ -24,6 +24,7 @@
7185 @@ -14371,7 +15213,7 @@ index 0505813..b067311 100644
7186 ret;
7187 ENDPROC(__twofish_enc_blk8)
7188
7189 -@@ -324,6 +326,7 @@ __twofish_dec_blk8:
7190 +@@ -324,10 +326,11 @@ __twofish_dec_blk8:
7191 outunpack_blocks(RA1, RB1, RC1, RD1, RK1, RX0, RY0, RK2);
7192 outunpack_blocks(RA2, RB2, RC2, RD2, RK1, RX0, RY0, RK2);
7193
7194 @@ -14379,7 +15221,12 @@ index 0505813..b067311 100644
7195 ret;
7196 ENDPROC(__twofish_dec_blk8)
7197
7198 -@@ -342,6 +345,7 @@ ENTRY(twofish_ecb_enc_8way)
7199 +-ENTRY(twofish_ecb_enc_8way)
7200 ++RAP_ENTRY(twofish_ecb_enc_8way)
7201 + /* input:
7202 + * %rdi: ctx, CTX
7203 + * %rsi: dst
7204 +@@ -342,10 +345,11 @@ ENTRY(twofish_ecb_enc_8way)
7205
7206 store_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2);
7207
7208 @@ -14387,7 +15234,12 @@ index 0505813..b067311 100644
7209 ret;
7210 ENDPROC(twofish_ecb_enc_8way)
7211
7212 -@@ -360,6 +364,7 @@ ENTRY(twofish_ecb_dec_8way)
7213 +-ENTRY(twofish_ecb_dec_8way)
7214 ++RAP_ENTRY(twofish_ecb_dec_8way)
7215 + /* input:
7216 + * %rdi: ctx, CTX
7217 + * %rsi: dst
7218 +@@ -360,33 +364,35 @@ ENTRY(twofish_ecb_dec_8way)
7219
7220 store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
7221
7222 @@ -14395,7 +15247,11 @@ index 0505813..b067311 100644
7223 ret;
7224 ENDPROC(twofish_ecb_dec_8way)
7225
7226 -@@ -370,19 +375,20 @@ ENTRY(twofish_cbc_dec_8way)
7227 +-ENTRY(twofish_cbc_dec_8way)
7228 ++RAP_ENTRY(twofish_cbc_dec_8way)
7229 + /* input:
7230 + * %rdi: ctx, CTX
7231 + * %rsi: dst
7232 * %rdx: src
7233 */
7234
7235 @@ -14420,7 +15276,12 @@ index 0505813..b067311 100644
7236 ret;
7237 ENDPROC(twofish_cbc_dec_8way)
7238
7239 -@@ -394,20 +400,21 @@ ENTRY(twofish_ctr_8way)
7240 +-ENTRY(twofish_ctr_8way)
7241 ++RAP_ENTRY(twofish_ctr_8way)
7242 + /* input:
7243 + * %rdi: ctx, CTX
7244 + * %rsi: dst
7245 +@@ -394,24 +400,25 @@ ENTRY(twofish_ctr_8way)
7246 * %rcx: iv (little endian, 128bit)
7247 */
7248
7249 @@ -14446,7 +15307,12 @@ index 0505813..b067311 100644
7250 ret;
7251 ENDPROC(twofish_ctr_8way)
7252
7253 -@@ -430,6 +437,7 @@ ENTRY(twofish_xts_enc_8way)
7254 +-ENTRY(twofish_xts_enc_8way)
7255 ++RAP_ENTRY(twofish_xts_enc_8way)
7256 + /* input:
7257 + * %rdi: ctx, CTX
7258 + * %rsi: dst
7259 +@@ -430,10 +437,11 @@ ENTRY(twofish_xts_enc_8way)
7260 /* dst <= regs xor IVs(in dst) */
7261 store_xts_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2);
7262
7263 @@ -14454,6 +15320,11 @@ index 0505813..b067311 100644
7264 ret;
7265 ENDPROC(twofish_xts_enc_8way)
7266
7267 +-ENTRY(twofish_xts_dec_8way)
7268 ++RAP_ENTRY(twofish_xts_dec_8way)
7269 + /* input:
7270 + * %rdi: ctx, CTX
7271 + * %rsi: dst
7272 @@ -452,5 +460,6 @@ ENTRY(twofish_xts_dec_8way)
7273 /* dst <= regs xor IVs(in dst) */
7274 store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
7275 @@ -14461,8 +15332,21 @@ index 0505813..b067311 100644
7276 + pax_force_retaddr
7277 ret;
7278 ENDPROC(twofish_xts_dec_8way)
7279 +diff --git a/arch/x86/crypto/twofish-i586-asm_32.S b/arch/x86/crypto/twofish-i586-asm_32.S
7280 +index 694ea45..91cc5b2 100644
7281 +--- a/arch/x86/crypto/twofish-i586-asm_32.S
7282 ++++ b/arch/x86/crypto/twofish-i586-asm_32.S
7283 +@@ -220,7 +220,7 @@
7284 + xor %esi, d ## D;\
7285 + ror $1, d ## D;
7286 +
7287 +-ENTRY(twofish_enc_blk)
7288 ++RAP_ENTRY(twofish_enc_blk)
7289 + push %ebp /* save registers according to calling convention*/
7290 + push %ebx
7291 + push %esi
7292 diff --git a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
7293 -index 1c3b7ce..02f578d 100644
7294 +index 1c3b7ce..c9912c7 100644
7295 --- a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
7296 +++ b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
7297 @@ -21,6 +21,7 @@
7298 @@ -14481,7 +15365,7 @@ index 1c3b7ce..02f578d 100644
7299 ret;
7300
7301 .L__enc_xor3:
7302 -@@ -269,6 +271,7 @@ ENTRY(__twofish_enc_blk_3way)
7303 +@@ -269,10 +271,11 @@ ENTRY(__twofish_enc_blk_3way)
7304 popq %r13;
7305 popq %r14;
7306 popq %r15;
7307 @@ -14489,6 +15373,11 @@ index 1c3b7ce..02f578d 100644
7308 ret;
7309 ENDPROC(__twofish_enc_blk_3way)
7310
7311 +-ENTRY(twofish_dec_blk_3way)
7312 ++RAP_ENTRY(twofish_dec_blk_3way)
7313 + /* input:
7314 + * %rdi: ctx, CTX
7315 + * %rsi: dst
7316 @@ -308,5 +311,6 @@ ENTRY(twofish_dec_blk_3way)
7317 popq %r13;
7318 popq %r14;
7319 @@ -14497,7 +15386,7 @@ index 1c3b7ce..02f578d 100644
7320 ret;
7321 ENDPROC(twofish_dec_blk_3way)
7322 diff --git a/arch/x86/crypto/twofish-x86_64-asm_64.S b/arch/x86/crypto/twofish-x86_64-asm_64.S
7323 -index a350c99..c1bac24 100644
7324 +index a350c99..080c5ab 100644
7325 --- a/arch/x86/crypto/twofish-x86_64-asm_64.S
7326 +++ b/arch/x86/crypto/twofish-x86_64-asm_64.S
7327 @@ -22,6 +22,7 @@
7328 @@ -14508,7 +15397,16 @@ index a350c99..c1bac24 100644
7329
7330 #define a_offset 0
7331 #define b_offset 4
7332 -@@ -265,6 +266,7 @@ ENTRY(twofish_enc_blk)
7333 +@@ -215,7 +216,7 @@
7334 + xor %r8d, d ## D;\
7335 + ror $1, d ## D;
7336 +
7337 +-ENTRY(twofish_enc_blk)
7338 ++RAP_ENTRY(twofish_enc_blk)
7339 + pushq R1
7340 +
7341 + /* %rdi contains the ctx address */
7342 +@@ -265,10 +266,11 @@ ENTRY(twofish_enc_blk)
7343
7344 popq R1
7345 movl $1,%eax
7346 @@ -14516,6 +15414,11 @@ index a350c99..c1bac24 100644
7347 ret
7348 ENDPROC(twofish_enc_blk)
7349
7350 +-ENTRY(twofish_dec_blk)
7351 ++RAP_ENTRY(twofish_dec_blk)
7352 + pushq R1
7353 +
7354 + /* %rdi contains the ctx address */
7355 @@ -317,5 +319,6 @@ ENTRY(twofish_dec_blk)
7356
7357 popq R1
7358 @@ -14523,11 +15426,121 @@ index a350c99..c1bac24 100644
7359 + pax_force_retaddr
7360 ret
7361 ENDPROC(twofish_dec_blk)
7362 +diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c
7363 +index b7a3904b..3e4d0d6 100644
7364 +--- a/arch/x86/crypto/twofish_avx_glue.c
7365 ++++ b/arch/x86/crypto/twofish_avx_glue.c
7366 +@@ -46,24 +46,25 @@
7367 + #define TWOFISH_PARALLEL_BLOCKS 8
7368 +
7369 + /* 8-way parallel cipher functions */
7370 +-asmlinkage void twofish_ecb_enc_8way(struct twofish_ctx *ctx, u8 *dst,
7371 ++asmlinkage void twofish_ecb_enc_8way(void *ctx, u8 *dst,
7372 + const u8 *src);
7373 +-asmlinkage void twofish_ecb_dec_8way(struct twofish_ctx *ctx, u8 *dst,
7374 ++asmlinkage void twofish_ecb_dec_8way(void *ctx, u8 *dst,
7375 + const u8 *src);
7376 +
7377 +-asmlinkage void twofish_cbc_dec_8way(struct twofish_ctx *ctx, u8 *dst,
7378 ++asmlinkage void twofish_cbc_dec_8way(void *ctx, u8 *dst,
7379 + const u8 *src);
7380 +-asmlinkage void twofish_ctr_8way(struct twofish_ctx *ctx, u8 *dst,
7381 +- const u8 *src, le128 *iv);
7382 ++asmlinkage void twofish_ctr_8way(void *ctx, u128 *dst,
7383 ++ const u128 *src, le128 *iv);
7384 +
7385 +-asmlinkage void twofish_xts_enc_8way(struct twofish_ctx *ctx, u8 *dst,
7386 +- const u8 *src, le128 *iv);
7387 +-asmlinkage void twofish_xts_dec_8way(struct twofish_ctx *ctx, u8 *dst,
7388 +- const u8 *src, le128 *iv);
7389 ++asmlinkage void twofish_xts_enc_8way(void *ctx, u128 *dst,
7390 ++ const u128 *src, le128 *iv);
7391 ++asmlinkage void twofish_xts_dec_8way(void *ctx, u128 *dst,
7392 ++ const u128 *src, le128 *iv);
7393 +
7394 +-static inline void twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,
7395 ++static inline void twofish_enc_blk_3way(void *_ctx, u8 *dst,
7396 + const u8 *src)
7397 + {
7398 ++ struct twofish_ctx *ctx = _ctx;
7399 + __twofish_enc_blk_3way(ctx, dst, src, false);
7400 + }
7401 +
7402 +diff --git a/arch/x86/crypto/twofish_glue.c b/arch/x86/crypto/twofish_glue.c
7403 +index 77e06c2..a45c27b 100644
7404 +--- a/arch/x86/crypto/twofish_glue.c
7405 ++++ b/arch/x86/crypto/twofish_glue.c
7406 +@@ -44,10 +44,10 @@
7407 + #include <linux/module.h>
7408 + #include <linux/types.h>
7409 +
7410 +-asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst,
7411 ++asmlinkage void twofish_enc_blk(void *ctx, u8 *dst,
7412 + const u8 *src);
7413 + EXPORT_SYMBOL_GPL(twofish_enc_blk);
7414 +-asmlinkage void twofish_dec_blk(struct twofish_ctx *ctx, u8 *dst,
7415 ++asmlinkage void twofish_dec_blk(void *ctx, u8 *dst,
7416 + const u8 *src);
7417 + EXPORT_SYMBOL_GPL(twofish_dec_blk);
7418 +
7419 +diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c
7420 +index 56d8a08..a9f21f5 100644
7421 +--- a/arch/x86/crypto/twofish_glue_3way.c
7422 ++++ b/arch/x86/crypto/twofish_glue_3way.c
7423 +@@ -36,21 +36,21 @@
7424 + EXPORT_SYMBOL_GPL(__twofish_enc_blk_3way);
7425 + EXPORT_SYMBOL_GPL(twofish_dec_blk_3way);
7426 +
7427 +-static inline void twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,
7428 ++static inline void twofish_enc_blk_3way(void *ctx, u8 *dst,
7429 + const u8 *src)
7430 + {
7431 + __twofish_enc_blk_3way(ctx, dst, src, false);
7432 + }
7433 +
7434 +-static inline void twofish_enc_blk_xor_3way(struct twofish_ctx *ctx, u8 *dst,
7435 ++static inline void twofish_enc_blk_xor_3way(void *ctx, u8 *dst,
7436 + const u8 *src)
7437 + {
7438 + __twofish_enc_blk_3way(ctx, dst, src, true);
7439 + }
7440 +
7441 +-void twofish_dec_blk_cbc_3way(void *ctx, u128 *dst, const u128 *src)
7442 ++void twofish_dec_blk_cbc_3way(void *ctx, u8 *_dst, const u8 *_src)
7443 + {
7444 +- u128 ivs[2];
7445 ++ u128 ivs[2], *dst = (u128 *)_dst, *src = (u128 *)_src;
7446 +
7447 + ivs[0] = src[0];
7448 + ivs[1] = src[1];
7449 +@@ -118,10 +118,10 @@ static const struct common_glue_ctx twofish_ctr = {
7450 +
7451 + .funcs = { {
7452 + .num_blocks = 3,
7453 +- .fn_u = { .ecb = GLUE_FUNC_CAST(twofish_enc_blk_ctr_3way) }
7454 ++ .fn_u = { .ctr = GLUE_CTR_FUNC_CAST(twofish_enc_blk_ctr_3way) }
7455 + }, {
7456 + .num_blocks = 1,
7457 +- .fn_u = { .ecb = GLUE_FUNC_CAST(twofish_enc_blk_ctr) }
7458 ++ .fn_u = { .ctr = GLUE_CTR_FUNC_CAST(twofish_enc_blk_ctr) }
7459 + } }
7460 + };
7461 +
7462 +diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile
7463 +index bd55ded..1310c8e 100644
7464 +--- a/arch/x86/entry/Makefile
7465 ++++ b/arch/x86/entry/Makefile
7466 +@@ -9,3 +9,5 @@ obj-y += vsyscall/
7467 +
7468 + obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o
7469 +
7470 ++CFLAGS_REMOVE_syscall_32.o = $(RAP_PLUGIN_ABS_CFLAGS)
7471 ++CFLAGS_REMOVE_syscall_64.o = $(RAP_PLUGIN_ABS_CFLAGS)
7472 diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
7473 -index 3c71dd9..008b8db 100644
7474 +index e32206e0..809adae 100644
7475 --- a/arch/x86/entry/calling.h
7476 +++ b/arch/x86/entry/calling.h
7477 -@@ -93,23 +93,26 @@ For 32-bit we have the following conventions - kernel is built with
7478 +@@ -95,23 +95,26 @@ For 32-bit we have the following conventions - kernel is built with
7479 .endm
7480
7481 .macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1
7482 @@ -14563,7 +15576,7 @@ index 3c71dd9..008b8db 100644
7483 .endm
7484 .macro SAVE_C_REGS offset=0
7485 SAVE_C_REGS_HELPER \offset, 1, 1, 1, 1
7486 -@@ -128,67 +131,78 @@ For 32-bit we have the following conventions - kernel is built with
7487 +@@ -130,67 +133,78 @@ For 32-bit we have the following conventions - kernel is built with
7488 .endm
7489
7490 .macro SAVE_EXTRA_REGS offset=0
7491 @@ -14670,7 +15683,7 @@ index 3c71dd9..008b8db 100644
7492
7493 .macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
7494 diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
7495 -index 1a4477c..9bc8a3a 100644
7496 +index 1a4477c..0031513 100644
7497 --- a/arch/x86/entry/common.c
7498 +++ b/arch/x86/entry/common.c
7499 @@ -32,9 +32,7 @@
7500 @@ -14761,7 +15774,60 @@ index 1a4477c..9bc8a3a 100644
7501 /*
7502 * First do one-time work. If these work items are enabled, we
7503 * want to run them exactly once per syscall exit with IRQs on.
7504 -@@ -415,6 +432,7 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
7505 +@@ -387,10 +404,52 @@ __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
7506 + * the high bits are zero. Make sure we zero-extend all
7507 + * of the args.
7508 + */
7509 ++#ifdef CONFIG_PAX_RAP
7510 ++#ifdef CONFIG_X86_64
7511 ++ asm volatile("movl %[param1],%%edi\n\t"
7512 ++ "movl %[param2],%%esi\n\t"
7513 ++ "movl %[param3],%%edx\n\t"
7514 ++ "movl %[param4],%%ecx\n\t"
7515 ++ "movl %[param5],%%r8d\n\t"
7516 ++ "movl %[param6],%%r9d\n\t"
7517 ++ "call *%P[syscall]\n\t"
7518 ++ "mov %%rax,%[result]\n\t"
7519 ++ : [result] "=m" (regs->ax)
7520 ++ : [syscall] "m" (ia32_sys_call_table[nr]),
7521 ++ [param1] "m" (regs->bx),
7522 ++ [param2] "m" (regs->cx),
7523 ++ [param3] "m" (regs->dx),
7524 ++ [param4] "m" (regs->si),
7525 ++ [param5] "m" (regs->di),
7526 ++ [param6] "m" (regs->bp)
7527 ++ : "di", "si", "dx", "cx", "r8", "r9", "memory");
7528 ++#else
7529 ++#error XXX VERIFY
7530 ++ asm volatile("pushl %[param6]\n\t"
7531 ++ "pushl %[param5]\n\t"
7532 ++ "pushl %[param4]\n\t"
7533 ++ "pushl %[param3]\n\t"
7534 ++ "pushl %[param2]\n\t"
7535 ++ "pushl %[param1]\n\t"
7536 ++ "call *%P[syscall]\n\t"
7537 ++ "addl $6*8,%%esp\n\t"
7538 ++ "mov %%eax,%[result]\n\t"
7539 ++ : [result] "=m" (regs->ax)
7540 ++ : [syscall] "m" (ia32_sys_call_table[nr]),
7541 ++ [param1] "m" (regs->bx),
7542 ++ [param2] "m" (regs->cx),
7543 ++ [param3] "m" (regs->dx),
7544 ++ [param4] "m" (regs->si),
7545 ++ [param5] "m" (regs->di),
7546 ++ [param6] "m" (regs->bp)
7547 ++ : "ax", "dx", "cx", "memory");
7548 ++#endif
7549 ++#else
7550 + regs->ax = ia32_sys_call_table[nr](
7551 + (unsigned int)regs->bx, (unsigned int)regs->cx,
7552 + (unsigned int)regs->dx, (unsigned int)regs->si,
7553 + (unsigned int)regs->di, (unsigned int)regs->bp);
7554 ++#endif
7555 + }
7556 +
7557 + syscall_return_slowpath(regs);
7558 +@@ -415,6 +474,7 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
7559
7560 unsigned long landing_pad = (unsigned long)current->mm->context.vdso +
7561 vdso_image_32.sym_int80_landing_pad;
7562 @@ -14769,7 +15835,7 @@ index 1a4477c..9bc8a3a 100644
7563
7564 /*
7565 * SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward
7566 -@@ -435,11 +453,9 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
7567 +@@ -435,11 +495,9 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
7568 * Micro-optimization: the pointer we're following is explicitly
7569 * 32 bits, so it can't be out of range.
7570 */
7571 @@ -14784,7 +15850,7 @@ index 1a4477c..9bc8a3a 100644
7572 ) {
7573
7574 diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
7575 -index f3b6d54..d41929e 100644
7576 +index bb3e376..567eb30 100644
7577 --- a/arch/x86/entry/entry_32.S
7578 +++ b/arch/x86/entry/entry_32.S
7579 @@ -147,13 +147,157 @@
7580 @@ -15015,7 +16081,7 @@ index f3b6d54..d41929e 100644
7581 #endif
7582
7583 # SYSENTER call handler stub
7584 -@@ -300,6 +461,10 @@ sysenter_past_esp:
7585 +@@ -301,6 +462,10 @@ sysenter_past_esp:
7586 pushl %eax /* pt_regs->orig_ax */
7587 SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest */
7588
7589 @@ -15026,7 +16092,7 @@ index f3b6d54..d41929e 100644
7590 /*
7591 * User mode is traced as though IRQs are on, and SYSENTER
7592 * turned them off.
7593 -@@ -312,11 +477,20 @@ sysenter_past_esp:
7594 +@@ -313,11 +478,20 @@ sysenter_past_esp:
7595 ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
7596 "jmp .Lsyscall_32_done", X86_FEATURE_XENPV
7597
7598 @@ -15047,8 +16113,8 @@ index f3b6d54..d41929e 100644
7599 PTGS_TO_GS
7600 popl %ebx /* pt_regs->bx */
7601 addl $2*4, %esp /* skip pt_regs->cx and pt_regs->dx */
7602 -@@ -332,10 +506,16 @@ sysenter_past_esp:
7603 - ENABLE_INTERRUPTS_SYSEXIT
7604 +@@ -334,10 +508,16 @@ sysenter_past_esp:
7605 + sysexit
7606
7607 .pushsection .fixup, "ax"
7608 -2: movl $0, PT_FS(%esp)
7609 @@ -15066,7 +16132,7 @@ index f3b6d54..d41929e 100644
7610 PTGS_TO_GS_EX
7611 ENDPROC(entry_SYSENTER_32)
7612
7613 -@@ -345,6 +525,10 @@ ENTRY(entry_INT80_32)
7614 +@@ -347,6 +527,10 @@ ENTRY(entry_INT80_32)
7615 pushl %eax /* pt_regs->orig_ax */
7616 SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest */
7617
7618 @@ -15077,7 +16143,7 @@ index f3b6d54..d41929e 100644
7619 /*
7620 * User mode is traced as though IRQs are on. Unlike the 64-bit
7621 * case, INT80 is a trap gate on 32-bit kernels, so interrupts
7622 -@@ -355,6 +539,13 @@ ENTRY(entry_INT80_32)
7623 +@@ -357,6 +541,13 @@ ENTRY(entry_INT80_32)
7624 call do_syscall_32_irqs_on
7625 .Lsyscall_32_done:
7626
7627 @@ -15091,7 +16157,7 @@ index f3b6d54..d41929e 100644
7628 restore_all:
7629 TRACE_IRQS_IRET
7630 restore_all_notrace:
7631 -@@ -409,14 +600,34 @@ ldt_ss:
7632 +@@ -411,14 +602,34 @@ ldt_ss:
7633 * compensating for the offset by changing to the ESPFIX segment with
7634 * a base address that matches for the difference.
7635 */
7636 @@ -15129,7 +16195,7 @@ index f3b6d54..d41929e 100644
7637 pushl $__ESPFIX_SS
7638 pushl %eax /* new kernel esp */
7639 /*
7640 -@@ -440,8 +651,15 @@ ENDPROC(entry_INT80_32)
7641 +@@ -442,8 +653,15 @@ ENDPROC(entry_INT80_32)
7642 */
7643 #ifdef CONFIG_X86_ESPFIX32
7644 /* fixup the stack */
7645 @@ -15147,7 +16213,7 @@ index f3b6d54..d41929e 100644
7646 shl $16, %eax
7647 addl %esp, %eax /* the adjusted stack pointer */
7648 pushl $__KERNEL_DS
7649 -@@ -477,7 +695,7 @@ ENTRY(irq_entries_start)
7650 +@@ -479,7 +697,7 @@ ENTRY(irq_entries_start)
7651 jmp common_interrupt
7652 .align 8
7653 .endr
7654 @@ -15156,7 +16222,7 @@ index f3b6d54..d41929e 100644
7655
7656 /*
7657 * the CPU automatically disables interrupts when executing an IRQ vector,
7658 -@@ -524,7 +742,7 @@ ENTRY(coprocessor_error)
7659 +@@ -526,7 +744,7 @@ ENTRY(coprocessor_error)
7660 pushl $0
7661 pushl $do_coprocessor_error
7662 jmp error_code
7663 @@ -15165,7 +16231,7 @@ index f3b6d54..d41929e 100644
7664
7665 ENTRY(simd_coprocessor_error)
7666 ASM_CLAC
7667 -@@ -538,25 +756,25 @@ ENTRY(simd_coprocessor_error)
7668 +@@ -540,7 +758,7 @@ ENTRY(simd_coprocessor_error)
7669 pushl $do_simd_coprocessor_error
7670 #endif
7671 jmp error_code
7672 @@ -15174,28 +16240,16 @@ index f3b6d54..d41929e 100644
7673
7674 ENTRY(device_not_available)
7675 ASM_CLAC
7676 - pushl $-1 # mark this as an int
7677 - pushl $do_device_not_available
7678 - jmp error_code
7679 --END(device_not_available)
7680 -+ENDPROC(device_not_available)
7681 -
7682 - #ifdef CONFIG_PARAVIRT
7683 +@@ -553,7 +771,7 @@ END(device_not_available)
7684 ENTRY(native_iret)
7685 iret
7686 _ASM_EXTABLE(native_iret, iret_exc)
7687 -END(native_iret)
7688 +ENDPROC(native_iret)
7689 -
7690 - ENTRY(native_irq_enable_sysexit)
7691 - sti
7692 - sysexit
7693 --END(native_irq_enable_sysexit)
7694 -+ENDPROC(native_irq_enable_sysexit)
7695 #endif
7696
7697 ENTRY(overflow)
7698 -@@ -564,59 +782,59 @@ ENTRY(overflow)
7699 +@@ -561,59 +779,59 @@ ENTRY(overflow)
7700 pushl $0
7701 pushl $do_overflow
7702 jmp error_code
7703 @@ -15264,7 +16318,7 @@ index f3b6d54..d41929e 100644
7704
7705 #ifdef CONFIG_X86_MCE
7706 ENTRY(machine_check)
7707 -@@ -624,7 +842,7 @@ ENTRY(machine_check)
7708 +@@ -621,7 +839,7 @@ ENTRY(machine_check)
7709 pushl $0
7710 pushl machine_check_vector
7711 jmp error_code
7712 @@ -15273,7 +16327,7 @@ index f3b6d54..d41929e 100644
7713 #endif
7714
7715 ENTRY(spurious_interrupt_bug)
7716 -@@ -632,7 +850,7 @@ ENTRY(spurious_interrupt_bug)
7717 +@@ -629,7 +847,7 @@ ENTRY(spurious_interrupt_bug)
7718 pushl $0
7719 pushl $do_spurious_interrupt_bug
7720 jmp error_code
7721 @@ -15282,7 +16336,7 @@ index f3b6d54..d41929e 100644
7722
7723 #ifdef CONFIG_XEN
7724 /*
7725 -@@ -739,7 +957,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
7726 +@@ -736,7 +954,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
7727
7728 ENTRY(mcount)
7729 ret
7730 @@ -15291,7 +16345,7 @@ index f3b6d54..d41929e 100644
7731
7732 ENTRY(ftrace_caller)
7733 pushl %eax
7734 -@@ -769,7 +987,7 @@ ftrace_graph_call:
7735 +@@ -766,7 +984,7 @@ ftrace_graph_call:
7736 .globl ftrace_stub
7737 ftrace_stub:
7738 ret
7739 @@ -15300,7 +16354,7 @@ index f3b6d54..d41929e 100644
7740
7741 ENTRY(ftrace_regs_caller)
7742 pushf /* push flags before compare (in cs location) */
7743 -@@ -867,7 +1085,7 @@ trace:
7744 +@@ -864,7 +1082,7 @@ trace:
7745 popl %ecx
7746 popl %eax
7747 jmp ftrace_stub
7748 @@ -15309,7 +16363,7 @@ index f3b6d54..d41929e 100644
7749 #endif /* CONFIG_DYNAMIC_FTRACE */
7750 #endif /* CONFIG_FUNCTION_TRACER */
7751
7752 -@@ -885,7 +1103,7 @@ ENTRY(ftrace_graph_caller)
7753 +@@ -882,7 +1100,7 @@ ENTRY(ftrace_graph_caller)
7754 popl %ecx
7755 popl %eax
7756 ret
7757 @@ -15318,7 +16372,7 @@ index f3b6d54..d41929e 100644
7758
7759 .globl return_to_handler
7760 return_to_handler:
7761 -@@ -904,7 +1122,7 @@ ENTRY(trace_page_fault)
7762 +@@ -901,7 +1119,7 @@ ENTRY(trace_page_fault)
7763 ASM_CLAC
7764 pushl $trace_do_page_fault
7765 jmp error_code
7766 @@ -15327,7 +16381,7 @@ index f3b6d54..d41929e 100644
7767 #endif
7768
7769 ENTRY(page_fault)
7770 -@@ -933,14 +1151,17 @@ error_code:
7771 +@@ -930,14 +1148,17 @@ error_code:
7772 movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
7773 REG_TO_PTGS %ecx
7774 SET_KERNEL_GS %ecx
7775 @@ -15347,16 +16401,25 @@ index f3b6d54..d41929e 100644
7776
7777 /*
7778 * Debug traps and NMI can happen at the one SYSENTER instruction
7779 -@@ -978,7 +1199,7 @@ debug_stack_correct:
7780 +@@ -962,7 +1183,7 @@ END(page_fault)
7781 + pushl $sysenter_past_esp
7782 + .endm
7783 +
7784 +-ENTRY(debug)
7785 ++ENTRY(int1)
7786 + ASM_CLAC
7787 + cmpl $entry_SYSENTER_32, (%esp)
7788 + jne debug_stack_correct
7789 +@@ -975,7 +1196,7 @@ debug_stack_correct:
7790 movl %esp, %eax # pt_regs pointer
7791 call do_debug
7792 jmp ret_from_exception
7793 -END(debug)
7794 -+ENDPROC(debug)
7795 ++ENDPROC(int1)
7796
7797 /*
7798 * NMI is doubly nasty. It can happen _while_ we're handling
7799 -@@ -1017,6 +1238,9 @@ nmi_stack_correct:
7800 +@@ -1014,6 +1235,9 @@ nmi_stack_correct:
7801 xorl %edx, %edx # zero error code
7802 movl %esp, %eax # pt_regs pointer
7803 call do_nmi
7804 @@ -15366,7 +16429,16 @@ index f3b6d54..d41929e 100644
7805 jmp restore_all_notrace
7806
7807 nmi_stack_fixup:
7808 -@@ -1050,11 +1274,14 @@ nmi_espfix_stack:
7809 +@@ -1023,7 +1247,7 @@ nmi_stack_fixup:
7810 + nmi_debug_stack_check:
7811 + cmpw $__KERNEL_CS, 16(%esp)
7812 + jne nmi_stack_correct
7813 +- cmpl $debug, (%esp)
7814 ++ cmpl $int1, (%esp)
7815 + jb nmi_stack_correct
7816 + cmpl $debug_esp_fix_insn, (%esp)
7817 + ja nmi_stack_correct
7818 +@@ -1047,11 +1271,14 @@ nmi_espfix_stack:
7819 FIXUP_ESPFIX_STACK # %eax == %esp
7820 xorl %edx, %edx # zero error code
7821 call do_nmi
7822 @@ -15382,7 +16454,7 @@ index f3b6d54..d41929e 100644
7823
7824 ENTRY(int3)
7825 ASM_CLAC
7826 -@@ -1065,17 +1292,17 @@ ENTRY(int3)
7827 +@@ -1062,17 +1289,17 @@ ENTRY(int3)
7828 movl %esp, %eax # pt_regs pointer
7829 call do_int3
7830 jmp ret_from_exception
7831 @@ -15404,7 +16476,7 @@ index f3b6d54..d41929e 100644
7832 +ENDPROC(async_page_fault)
7833 #endif
7834 diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
7835 -index a55697d..66473ae 100644
7836 +index 9d34d3c..2398c40 100644
7837 --- a/arch/x86/entry/entry_64.S
7838 +++ b/arch/x86/entry/entry_64.S
7839 @@ -36,6 +36,8 @@
7840 @@ -16012,9 +17084,9 @@ index a55697d..66473ae 100644
7841 /*
7842 * We need to tell lockdep that IRQs are off. We can't do this until
7843 * we fix gsbase, and we should do it before enter_from_user_mode
7844 -@@ -524,7 +951,9 @@ END(irq_entries_start)
7845 - call enter_from_user_mode
7846 - #endif
7847 +@@ -522,7 +949,9 @@ END(irq_entries_start)
7848 +
7849 + CALL_enter_from_user_mode
7850
7851 -1:
7852 + jmp 2f
7853 @@ -16023,7 +17095,7 @@ index a55697d..66473ae 100644
7854 /*
7855 * Save previous stack pointer, optionally switch to interrupt stack.
7856 * irq_count is used to check if a CPU is already on an interrupt stack
7857 -@@ -536,6 +965,7 @@ END(irq_entries_start)
7858 +@@ -534,6 +963,7 @@ END(irq_entries_start)
7859 incl PER_CPU_VAR(irq_count)
7860 cmovzq PER_CPU_VAR(irq_stack_ptr), %rsp
7861 pushq %rdi
7862 @@ -16031,7 +17103,7 @@ index a55697d..66473ae 100644
7863 /* We entered an interrupt context - irqs are off: */
7864 TRACE_IRQS_OFF
7865
7866 -@@ -567,6 +997,8 @@ ret_from_intr:
7867 +@@ -565,6 +995,8 @@ ret_from_intr:
7868 GLOBAL(retint_user)
7869 mov %rsp,%rdi
7870 call prepare_exit_to_usermode
7871 @@ -16040,7 +17112,7 @@ index a55697d..66473ae 100644
7872 TRACE_IRQS_IRETQ
7873 SWAPGS
7874 jmp restore_regs_and_iret
7875 -@@ -584,6 +1016,21 @@ retint_kernel:
7876 +@@ -582,6 +1014,21 @@ retint_kernel:
7877 jmp 0b
7878 1:
7879 #endif
7880 @@ -16062,7 +17134,7 @@ index a55697d..66473ae 100644
7881 /*
7882 * The iretq could re-enable interrupts:
7883 */
7884 -@@ -627,15 +1074,15 @@ native_irq_return_ldt:
7885 +@@ -625,15 +1072,15 @@ native_irq_return_ldt:
7886 SWAPGS
7887 movq PER_CPU_VAR(espfix_waddr), %rdi
7888 movq %rax, (0*8)(%rdi) /* RAX */
7889 @@ -16083,7 +17155,7 @@ index a55697d..66473ae 100644
7890 movq %rax, (4*8)(%rdi)
7891 andl $0xffff0000, %eax
7892 popq %rdi
7893 -@@ -645,7 +1092,7 @@ native_irq_return_ldt:
7894 +@@ -643,7 +1090,7 @@ native_irq_return_ldt:
7895 popq %rax
7896 jmp native_irq_return_iret
7897 #endif
7898 @@ -16092,7 +17164,7 @@ index a55697d..66473ae 100644
7899
7900 /*
7901 * APIC interrupts.
7902 -@@ -657,7 +1104,7 @@ ENTRY(\sym)
7903 +@@ -655,7 +1102,7 @@ ENTRY(\sym)
7904 .Lcommon_\sym:
7905 interrupt \do_sym
7906 jmp ret_from_intr
7907 @@ -16101,7 +17173,7 @@ index a55697d..66473ae 100644
7908 .endm
7909
7910 #ifdef CONFIG_TRACING
7911 -@@ -722,7 +1169,7 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt
7912 +@@ -720,7 +1167,7 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt
7913 /*
7914 * Exception entry points.
7915 */
7916 @@ -16110,7 +17182,7 @@ index a55697d..66473ae 100644
7917
7918 .macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1
7919 ENTRY(\sym)
7920 -@@ -769,6 +1216,12 @@ ENTRY(\sym)
7921 +@@ -767,6 +1214,12 @@ ENTRY(\sym)
7922 .endif
7923
7924 .if \shift_ist != -1
7925 @@ -16123,7 +17195,7 @@ index a55697d..66473ae 100644
7926 subq $EXCEPTION_STKSZ, CPU_TSS_IST(\shift_ist)
7927 .endif
7928
7929 -@@ -812,7 +1265,7 @@ ENTRY(\sym)
7930 +@@ -810,7 +1263,7 @@ ENTRY(\sym)
7931
7932 jmp error_exit /* %ebx: no swapgs flag */
7933 .endif
7934 @@ -16132,7 +17204,7 @@ index a55697d..66473ae 100644
7935 .endm
7936
7937 #ifdef CONFIG_TRACING
7938 -@@ -854,8 +1307,9 @@ gs_change:
7939 +@@ -852,8 +1305,9 @@ gs_change:
7940 2: mfence /* workaround */
7941 SWAPGS
7942 popfq
7943 @@ -16143,7 +17215,7 @@ index a55697d..66473ae 100644
7944
7945 _ASM_EXTABLE(gs_change, bad_gs)
7946 .section .fixup, "ax"
7947 -@@ -877,8 +1331,9 @@ ENTRY(do_softirq_own_stack)
7948 +@@ -875,8 +1329,9 @@ ENTRY(do_softirq_own_stack)
7949 call __do_softirq
7950 leaveq
7951 decl PER_CPU_VAR(irq_count)
7952 @@ -16154,7 +17226,7 @@ index a55697d..66473ae 100644
7953
7954 #ifdef CONFIG_XEN
7955 idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
7956 -@@ -914,7 +1369,7 @@ ENTRY(xen_do_hypervisor_callback) /* do_hypervisor_callback(struct *pt_regs) */
7957 +@@ -912,7 +1367,7 @@ ENTRY(xen_do_hypervisor_callback) /* do_hypervisor_callback(struct *pt_regs) */
7958 call xen_maybe_preempt_hcall
7959 #endif
7960 jmp error_exit
7961 @@ -16163,7 +17235,7 @@ index a55697d..66473ae 100644
7962
7963 /*
7964 * Hypervisor uses this for application faults while it executes.
7965 -@@ -959,7 +1414,7 @@ ENTRY(xen_failsafe_callback)
7966 +@@ -957,7 +1412,7 @@ ENTRY(xen_failsafe_callback)
7967 SAVE_C_REGS
7968 SAVE_EXTRA_REGS
7969 jmp error_exit
7970 @@ -16172,7 +17244,16 @@ index a55697d..66473ae 100644
7971
7972 apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
7973 xen_hvm_callback_vector xen_evtchn_do_upcall
7974 -@@ -1008,8 +1463,34 @@ ENTRY(paranoid_entry)
7975 +@@ -969,7 +1424,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
7976 + hyperv_callback_vector hyperv_vector_handler
7977 + #endif /* CONFIG_HYPERV */
7978 +
7979 +-idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
7980 ++idtentry int1 do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
7981 + idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
7982 + idtentry stack_segment do_stack_segment has_error_code=1
7983 +
7984 +@@ -1006,8 +1461,34 @@ ENTRY(paranoid_entry)
7985 js 1f /* negative -> in kernel */
7986 SWAPGS
7987 xorl %ebx, %ebx
7988 @@ -16209,7 +17290,7 @@ index a55697d..66473ae 100644
7989
7990 /*
7991 * "Paranoid" exit path from exception stack. This is invoked
7992 -@@ -1026,19 +1507,26 @@ END(paranoid_entry)
7993 +@@ -1024,19 +1505,26 @@ END(paranoid_entry)
7994 ENTRY(paranoid_exit)
7995 DISABLE_INTERRUPTS(CLBR_NONE)
7996 TRACE_IRQS_OFF_DEBUG
7997 @@ -16238,7 +17319,7 @@ index a55697d..66473ae 100644
7998
7999 /*
8000 * Save all registers in pt_regs, and switch gs if needed.
8001 -@@ -1052,13 +1540,18 @@ ENTRY(error_entry)
8002 +@@ -1050,13 +1538,18 @@ ENTRY(error_entry)
8003 testb $3, CS+8(%rsp)
8004 jz .Lerror_kernelspace
8005
8006 @@ -16258,10 +17339,10 @@ index a55697d..66473ae 100644
8007 .Lerror_entry_from_usermode_after_swapgs:
8008 /*
8009 * We need to tell lockdep that IRQs are off. We can't do this until
8010 -@@ -1069,10 +1562,12 @@ ENTRY(error_entry)
8011 - #ifdef CONFIG_CONTEXT_TRACKING
8012 - call enter_from_user_mode
8013 - #endif
8014 +@@ -1065,10 +1558,12 @@ ENTRY(error_entry)
8015 + */
8016 + TRACE_IRQS_OFF
8017 + CALL_enter_from_user_mode
8018 + pax_force_retaddr
8019 ret
8020
8021 @@ -16271,7 +17352,7 @@ index a55697d..66473ae 100644
8022 ret
8023
8024 /*
8025 -@@ -1090,14 +1585,16 @@ ENTRY(error_entry)
8026 +@@ -1086,14 +1581,16 @@ ENTRY(error_entry)
8027 cmpq %rax, RIP+8(%rsp)
8028 je .Lbstep_iret
8029 cmpq $gs_change, RIP+8(%rsp)
8030 @@ -16290,7 +17371,7 @@ index a55697d..66473ae 100644
8031
8032 .Lbstep_iret:
8033 /* Fix truncated RIP */
8034 -@@ -1111,6 +1608,12 @@ ENTRY(error_entry)
8035 +@@ -1107,6 +1604,12 @@ ENTRY(error_entry)
8036 */
8037 SWAPGS
8038
8039 @@ -16303,7 +17384,7 @@ index a55697d..66473ae 100644
8040 /*
8041 * Pretend that the exception came from user mode: set up pt_regs
8042 * as if we faulted immediately after IRET and clear EBX so that
8043 -@@ -1121,11 +1624,11 @@ ENTRY(error_entry)
8044 +@@ -1117,11 +1620,11 @@ ENTRY(error_entry)
8045 mov %rax, %rsp
8046 decl %ebx
8047 jmp .Lerror_entry_from_usermode_after_swapgs
8048 @@ -16317,7 +17398,7 @@ index a55697d..66473ae 100644
8049 * 1: already in kernel mode, don't need SWAPGS
8050 * 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode
8051 */
8052 -@@ -1133,10 +1636,10 @@ ENTRY(error_exit)
8053 +@@ -1129,10 +1632,10 @@ ENTRY(error_exit)
8054 movl %ebx, %eax
8055 DISABLE_INTERRUPTS(CLBR_NONE)
8056 TRACE_IRQS_OFF
8057 @@ -16330,7 +17411,7 @@ index a55697d..66473ae 100644
8058
8059 /* Runs on exception stack */
8060 ENTRY(nmi)
8061 -@@ -1190,6 +1693,8 @@ ENTRY(nmi)
8062 +@@ -1186,6 +1689,8 @@ ENTRY(nmi)
8063 * other IST entries.
8064 */
8065
8066 @@ -16339,7 +17420,7 @@ index a55697d..66473ae 100644
8067 /* Use %rdx as our temp variable throughout */
8068 pushq %rdx
8069
8070 -@@ -1233,6 +1738,12 @@ ENTRY(nmi)
8071 +@@ -1229,6 +1734,12 @@ ENTRY(nmi)
8072 pushq %r14 /* pt_regs->r14 */
8073 pushq %r15 /* pt_regs->r15 */
8074
8075 @@ -16352,7 +17433,7 @@ index a55697d..66473ae 100644
8076 /*
8077 * At this point we no longer need to worry about stack damage
8078 * due to nesting -- we're on the normal thread stack and we're
8079 -@@ -1243,12 +1754,19 @@ ENTRY(nmi)
8080 +@@ -1239,12 +1750,19 @@ ENTRY(nmi)
8081 movq $-1, %rsi
8082 call do_nmi
8083
8084 @@ -16372,7 +17453,7 @@ index a55697d..66473ae 100644
8085 jmp restore_c_regs_and_iret
8086
8087 .Lnmi_from_kernel:
8088 -@@ -1370,6 +1888,7 @@ nested_nmi_out:
8089 +@@ -1366,6 +1884,7 @@ nested_nmi_out:
8090 popq %rdx
8091
8092 /* We are returning to kernel mode, so this cannot result in a fault. */
8093 @@ -16380,7 +17461,7 @@ index a55697d..66473ae 100644
8094 INTERRUPT_RETURN
8095
8096 first_nmi:
8097 -@@ -1398,7 +1917,7 @@ first_nmi:
8098 +@@ -1394,7 +1913,7 @@ first_nmi:
8099 pushq %rsp /* RSP (minus 8 because of the previous push) */
8100 addq $8, (%rsp) /* Fix up RSP */
8101 pushfq /* RFLAGS */
8102 @@ -16389,7 +17470,7 @@ index a55697d..66473ae 100644
8103 pushq $1f /* RIP */
8104 INTERRUPT_RETURN /* continues at repeat_nmi below */
8105 1:
8106 -@@ -1443,20 +1962,22 @@ end_repeat_nmi:
8107 +@@ -1439,20 +1958,22 @@ end_repeat_nmi:
8108 ALLOC_PT_GPREGS_ON_STACK
8109
8110 /*
8111 @@ -16415,7 +17496,7 @@ index a55697d..66473ae 100644
8112 jnz nmi_restore
8113 nmi_swapgs:
8114 SWAPGS_UNSAFE_STACK
8115 -@@ -1467,6 +1988,8 @@ nmi_restore:
8116 +@@ -1463,6 +1984,8 @@ nmi_restore:
8117 /* Point RSP at the "iret" frame. */
8118 REMOVE_PT_GPREGS_FROM_STACK 6*8
8119
8120 @@ -16424,7 +17505,7 @@ index a55697d..66473ae 100644
8121 /*
8122 * Clear "NMI executing". Set DF first so that we can easily
8123 * distinguish the remaining code between here and IRET from
8124 -@@ -1484,9 +2007,9 @@ nmi_restore:
8125 +@@ -1480,9 +2003,9 @@ nmi_restore:
8126 * mode, so this cannot result in a fault.
8127 */
8128 INTERRUPT_RETURN
8129 @@ -16437,10 +17518,10 @@ index a55697d..66473ae 100644
8130 -END(ignore_sysret)
8131 +ENDPROC(ignore_sysret)
8132 diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
8133 -index 15cfeba..da22a57 100644
8134 +index 3c990ee..d49c8f4 100644
8135 --- a/arch/x86/entry/entry_64_compat.S
8136 +++ b/arch/x86/entry/entry_64_compat.S
8137 -@@ -13,8 +13,10 @@
8138 +@@ -13,11 +13,39 @@
8139 #include <asm/irqflags.h>
8140 #include <asm/asm.h>
8141 #include <asm/smap.h>
8142 @@ -16451,10 +17532,6 @@ index 15cfeba..da22a57 100644
8143
8144 .section .entry.text, "ax"
8145
8146 -@@ -25,6 +27,32 @@ ENTRY(native_usergs_sysret32)
8147 - ENDPROC(native_usergs_sysret32)
8148 - #endif
8149 -
8150 + .macro pax_enter_kernel_user
8151 + pax_set_fptr_mask
8152 +#ifdef CONFIG_PAX_MEMORY_UDEREF
8153 @@ -16484,7 +17561,7 @@ index 15cfeba..da22a57 100644
8154 /*
8155 * 32-bit SYSENTER instruction entry.
8156 *
8157 -@@ -76,26 +104,36 @@ ENTRY(entry_SYSENTER_compat)
8158 +@@ -69,26 +97,36 @@ ENTRY(entry_SYSENTER_compat)
8159 ASM_CLAC /* Clear AC after saving FLAGS */
8160
8161 pushq $__USER32_CS /* pt_regs->cs */
8162 @@ -16531,7 +17608,7 @@ index 15cfeba..da22a57 100644
8163 /*
8164 * Sysenter doesn't filter flags, so we need to clear NT
8165 * ourselves. To save a few cycles, we can check whether
8166 -@@ -181,17 +219,27 @@ ENTRY(entry_SYSCALL_compat)
8167 +@@ -174,17 +212,27 @@ ENTRY(entry_SYSCALL_compat)
8168 pushq %rdx /* pt_regs->dx */
8169 pushq %rbp /* pt_regs->cx (stashed in bp) */
8170 pushq $-ENOSYS /* pt_regs->ax */
8171 @@ -16568,7 +17645,7 @@ index 15cfeba..da22a57 100644
8172
8173 /*
8174 * User mode is traced as though IRQs are on, and SYSENTER
8175 -@@ -207,11 +255,18 @@ ENTRY(entry_SYSCALL_compat)
8176 +@@ -200,11 +248,18 @@ ENTRY(entry_SYSCALL_compat)
8177
8178 /* Opportunistic SYSRET */
8179 sysret32_from_system_call:
8180 @@ -16587,16 +17664,16 @@ index 15cfeba..da22a57 100644
8181 addq $RAX, %rsp /* Skip r8-r15 */
8182 popq %rax /* pt_regs->rax */
8183 popq %rdx /* Skip pt_regs->cx */
8184 -@@ -239,7 +294,7 @@ sysret32_from_system_call:
8185 - xorq %r10, %r10
8186 +@@ -233,7 +288,7 @@ sysret32_from_system_call:
8187 movq RSP-ORIG_RAX(%rsp), %rsp
8188 - USERGS_SYSRET32
8189 + swapgs
8190 + sysretl
8191 -END(entry_SYSCALL_compat)
8192 +ENDPROC(entry_SYSCALL_compat)
8193
8194 /*
8195 * Emulated IA32 system calls via int 0x80.
8196 -@@ -286,11 +341,11 @@ ENTRY(entry_INT80_compat)
8197 +@@ -280,11 +335,11 @@ ENTRY(entry_INT80_compat)
8198 pushq %rdx /* pt_regs->dx */
8199 pushq %rcx /* pt_regs->cx */
8200 pushq $-ENOSYS /* pt_regs->ax */
8201 @@ -16613,7 +17690,7 @@ index 15cfeba..da22a57 100644
8202 pushq %rbx /* pt_regs->rbx */
8203 pushq %rbp /* pt_regs->rbp */
8204 pushq %r12 /* pt_regs->r12 */
8205 -@@ -299,6 +354,12 @@ ENTRY(entry_INT80_compat)
8206 +@@ -293,6 +348,12 @@ ENTRY(entry_INT80_compat)
8207 pushq %r15 /* pt_regs->r15 */
8208 cld
8209
8210 @@ -16626,7 +17703,7 @@ index 15cfeba..da22a57 100644
8211 /*
8212 * User mode is traced as though IRQs are on, and the interrupt
8213 * gate turned them off.
8214 -@@ -310,10 +371,12 @@ ENTRY(entry_INT80_compat)
8215 +@@ -304,10 +365,12 @@ ENTRY(entry_INT80_compat)
8216 .Lsyscall_32_done:
8217
8218 /* Go back to user mode. */
8219 @@ -16661,10 +17738,10 @@ index efb2b93..8a9cb8e 100644
8220 _ASM_NOKPROBE(restore)
8221 #endif
8222 diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
8223 -index 265c0ed..a706eb9 100644
8224 +index c854541..1786538 100644
8225 --- a/arch/x86/entry/vdso/Makefile
8226 +++ b/arch/x86/entry/vdso/Makefile
8227 -@@ -69,7 +69,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
8228 +@@ -70,7 +70,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
8229 -fno-omit-frame-pointer -foptimize-sibling-calls \
8230 -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
8231
8232 @@ -16673,7 +17750,7 @@ index 265c0ed..a706eb9 100644
8233
8234 #
8235 # vDSO code runs in userspace and -pg doesn't help with profiling anyway.
8236 -@@ -139,6 +139,7 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
8237 +@@ -140,6 +140,7 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
8238 KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32))
8239 KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32))
8240 KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32))
8241 @@ -16681,7 +17758,7 @@ index 265c0ed..a706eb9 100644
8242 KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic
8243 KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector)
8244 KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
8245 -@@ -162,7 +163,7 @@ quiet_cmd_vdso = VDSO $@
8246 +@@ -163,7 +164,7 @@ quiet_cmd_vdso = VDSO $@
8247 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
8248 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
8249
8250 @@ -16690,6 +17767,17 @@ index 265c0ed..a706eb9 100644
8251 $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS)
8252 GCOV_PROFILE := n
8253
8254 +diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c
8255 +index 1a50e09..3e25e7a 100644
8256 +--- a/arch/x86/entry/vdso/vclock_gettime.c
8257 ++++ b/arch/x86/entry/vdso/vclock_gettime.c
8258 +@@ -330,5 +330,5 @@ notrace time_t __vdso_time(time_t *t)
8259 + *t = result;
8260 + return result;
8261 + }
8262 +-int time(time_t *t)
8263 ++time_t time(time_t *t)
8264 + __attribute__((weak, alias("__vdso_time")));
8265 diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
8266 index 0224987..0359810 100644
8267 --- a/arch/x86/entry/vdso/vdso2c.h
8268 @@ -16731,10 +17819,10 @@ index 0224987..0359810 100644
8269
8270 fprintf(outfile, "const struct vdso_image %s = {\n", name);
8271 diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
8272 -index 64df471..8346804 100644
8273 +index b8f69e2..2489643 100644
8274 --- a/arch/x86/entry/vdso/vma.c
8275 +++ b/arch/x86/entry/vdso/vma.c
8276 -@@ -19,10 +19,7 @@
8277 +@@ -20,10 +20,7 @@
8278 #include <asm/page.h>
8279 #include <asm/hpet.h>
8280 #include <asm/desc.h>
8281 @@ -16746,9 +17834,9 @@ index 64df471..8346804 100644
8282
8283 void __init init_vdso_image(const struct vdso_image *image)
8284 {
8285 -@@ -101,6 +98,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
8286 - .pages = no_pages,
8287 +@@ -103,6 +100,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
8288 };
8289 + struct pvclock_vsyscall_time_info *pvti;
8290
8291 +#ifdef CONFIG_PAX_RANDMMAP
8292 + if (mm->pax_flags & MF_PAX_RANDMMAP)
8293 @@ -16758,7 +17846,7 @@ index 64df471..8346804 100644
8294 if (calculate_addr) {
8295 addr = vdso_addr(current->mm->start_stack,
8296 image->size - image->sym_vvar_start);
8297 -@@ -111,14 +113,14 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
8298 +@@ -113,14 +115,14 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
8299 down_write(&mm->mmap_sem);
8300
8301 addr = get_unmapped_area(NULL, addr,
8302 @@ -16775,15 +17863,14 @@ index 64df471..8346804 100644
8303
8304 /*
8305 * MAYWRITE to allow gdb to COW and set breakpoints
8306 -@@ -163,15 +165,12 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
8307 - hpet_address >> PAGE_SHIFT,
8308 - PAGE_SIZE,
8309 - pgprot_noncached(PAGE_READONLY));
8310 +@@ -178,14 +180,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
8311 + __pa(pvti) >> PAGE_SHIFT,
8312 + PAGE_SIZE,
8313 + PAGE_READONLY);
8314 -
8315 - if (ret)
8316 - goto up_fail;
8317 }
8318 - #endif
8319
8320 up_fail:
8321 if (ret)
8322 @@ -16792,7 +17879,7 @@ index 64df471..8346804 100644
8323
8324 up_write(&mm->mmap_sem);
8325 return ret;
8326 -@@ -190,9 +189,6 @@ static int load_vdso32(void)
8327 +@@ -204,9 +203,6 @@ static int load_vdso32(void)
8328 #ifdef CONFIG_X86_64
8329 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
8330 {
8331 @@ -16802,7 +17889,7 @@ index 64df471..8346804 100644
8332 return map_vdso(&vdso_image_64, true);
8333 }
8334
8335 -@@ -201,12 +197,8 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
8336 +@@ -215,12 +211,8 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
8337 int uses_interp)
8338 {
8339 #ifdef CONFIG_X86_X32_ABI
8340 @@ -16816,7 +17903,7 @@ index 64df471..8346804 100644
8341 #endif
8342 #ifdef CONFIG_IA32_EMULATION
8343 return load_vdso32();
8344 -@@ -223,15 +215,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
8345 +@@ -237,15 +229,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
8346 #endif
8347
8348 #ifdef CONFIG_X86_64
8349 @@ -17179,10 +18266,10 @@ index 7bfc85b..65d1ec4 100644
8350 ALTINSTR_REPLACEMENT(newinstr2, feature2, 2) \
8351 ".popsection"
8352 diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
8353 -index 163769d..d41133e 100644
8354 +index e8c4fba..8d42c8c 100644
8355 --- a/arch/x86/include/asm/apic.h
8356 +++ b/arch/x86/include/asm/apic.h
8357 -@@ -45,7 +45,7 @@ static inline void generic_apic_probe(void)
8358 +@@ -50,7 +50,7 @@ static inline void generic_apic_probe(void)
8359
8360 #ifdef CONFIG_X86_LOCAL_APIC
8361
8362 @@ -17214,10 +18301,10 @@ index 20370c6..a2eb9b0 100644
8363 "popl %%ebp\n\t"
8364 "popl %%edi\n\t"
8365 diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
8366 -index ae5fb83..f6a093d 100644
8367 +index 3e86742..1b19554 100644
8368 --- a/arch/x86/include/asm/atomic.h
8369 +++ b/arch/x86/include/asm/atomic.h
8370 -@@ -28,6 +28,17 @@ static __always_inline int atomic_read(const atomic_t *v)
8371 +@@ -27,6 +27,17 @@ static __always_inline int atomic_read(const atomic_t *v)
8372 }
8373
8374 /**
8375 @@ -17235,7 +18322,7 @@ index ae5fb83..f6a093d 100644
8376 * atomic_set - set atomic variable
8377 * @v: pointer of type atomic_t
8378 * @i: required value
8379 -@@ -40,6 +51,18 @@ static __always_inline void atomic_set(atomic_t *v, int i)
8380 +@@ -39,6 +50,18 @@ static __always_inline void atomic_set(atomic_t *v, int i)
8381 }
8382
8383 /**
8384 @@ -17254,7 +18341,7 @@ index ae5fb83..f6a093d 100644
8385 * atomic_add - add integer to atomic variable
8386 * @i: integer value to add
8387 * @v: pointer of type atomic_t
8388 -@@ -48,7 +71,29 @@ static __always_inline void atomic_set(atomic_t *v, int i)
8389 +@@ -47,7 +70,29 @@ static __always_inline void atomic_set(atomic_t *v, int i)
8390 */
8391 static __always_inline void atomic_add(int i, atomic_t *v)
8392 {
8393 @@ -17285,7 +18372,7 @@ index ae5fb83..f6a093d 100644
8394 : "+m" (v->counter)
8395 : "ir" (i));
8396 }
8397 -@@ -62,7 +107,29 @@ static __always_inline void atomic_add(int i, atomic_t *v)
8398 +@@ -61,7 +106,29 @@ static __always_inline void atomic_add(int i, atomic_t *v)
8399 */
8400 static __always_inline void atomic_sub(int i, atomic_t *v)
8401 {
8402 @@ -17316,7 +18403,7 @@ index ae5fb83..f6a093d 100644
8403 : "+m" (v->counter)
8404 : "ir" (i));
8405 }
8406 -@@ -78,7 +145,7 @@ static __always_inline void atomic_sub(int i, atomic_t *v)
8407 +@@ -77,7 +144,7 @@ static __always_inline void atomic_sub(int i, atomic_t *v)
8408 */
8409 static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
8410 {
8411 @@ -17325,7 +18412,7 @@ index ae5fb83..f6a093d 100644
8412 }
8413
8414 /**
8415 -@@ -89,7 +156,27 @@ static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
8416 +@@ -88,7 +155,27 @@ static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
8417 */
8418 static __always_inline void atomic_inc(atomic_t *v)
8419 {
8420 @@ -17354,7 +18441,7 @@ index ae5fb83..f6a093d 100644
8421 : "+m" (v->counter));
8422 }
8423
8424 -@@ -101,7 +188,27 @@ static __always_inline void atomic_inc(atomic_t *v)
8425 +@@ -100,7 +187,27 @@ static __always_inline void atomic_inc(atomic_t *v)
8426 */
8427 static __always_inline void atomic_dec(atomic_t *v)
8428 {
8429 @@ -17383,7 +18470,7 @@ index ae5fb83..f6a093d 100644
8430 : "+m" (v->counter));
8431 }
8432
8433 -@@ -115,7 +222,7 @@ static __always_inline void atomic_dec(atomic_t *v)
8434 +@@ -114,7 +221,7 @@ static __always_inline void atomic_dec(atomic_t *v)
8435 */
8436 static __always_inline int atomic_dec_and_test(atomic_t *v)
8437 {
8438 @@ -17392,7 +18479,7 @@ index ae5fb83..f6a093d 100644
8439 }
8440
8441 /**
8442 -@@ -128,7 +235,20 @@ static __always_inline int atomic_dec_and_test(atomic_t *v)
8443 +@@ -127,7 +234,20 @@ static __always_inline int atomic_dec_and_test(atomic_t *v)
8444 */
8445 static __always_inline int atomic_inc_and_test(atomic_t *v)
8446 {
8447 @@ -17414,7 +18501,7 @@ index ae5fb83..f6a093d 100644
8448 }
8449
8450 /**
8451 -@@ -142,7 +262,7 @@ static __always_inline int atomic_inc_and_test(atomic_t *v)
8452 +@@ -141,7 +261,7 @@ static __always_inline int atomic_inc_and_test(atomic_t *v)
8453 */
8454 static __always_inline int atomic_add_negative(int i, atomic_t *v)
8455 {
8456 @@ -17423,7 +18510,7 @@ index ae5fb83..f6a093d 100644
8457 }
8458
8459 /**
8460 -@@ -152,7 +272,19 @@ static __always_inline int atomic_add_negative(int i, atomic_t *v)
8461 +@@ -151,7 +271,19 @@ static __always_inline int atomic_add_negative(int i, atomic_t *v)
8462 *
8463 * Atomically adds @i to @v and returns @i + @v
8464 */
8465 @@ -17444,7 +18531,7 @@ index ae5fb83..f6a093d 100644
8466 {
8467 return i + xadd(&v->counter, i);
8468 }
8469 -@@ -164,15 +296,24 @@ static __always_inline int atomic_add_return(int i, atomic_t *v)
8470 +@@ -163,15 +295,24 @@ static __always_inline int atomic_add_return(int i, atomic_t *v)
8471 *
8472 * Atomically subtracts @i from @v and returns @v - @i
8473 */
8474 @@ -17471,7 +18558,7 @@ index ae5fb83..f6a093d 100644
8475 {
8476 return cmpxchg(&v->counter, old, new);
8477 }
8478 -@@ -182,6 +323,11 @@ static inline int atomic_xchg(atomic_t *v, int new)
8479 +@@ -181,6 +322,11 @@ static inline int atomic_xchg(atomic_t *v, int new)
8480 return xchg(&v->counter, new);
8481 }
8482
8483 @@ -17483,7 +18570,7 @@ index ae5fb83..f6a093d 100644
8484 #define ATOMIC_OP(op) \
8485 static inline void atomic_##op(int i, atomic_t *v) \
8486 { \
8487 -@@ -208,12 +354,25 @@ ATOMIC_OP(xor)
8488 +@@ -207,12 +353,25 @@ ATOMIC_OP(xor)
8489 */
8490 static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)
8491 {
8492 @@ -17512,7 +18599,7 @@ index ae5fb83..f6a093d 100644
8493 if (likely(old == c))
8494 break;
8495 c = old;
8496 -@@ -222,6 +381,49 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)
8497 +@@ -221,6 +380,49 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)
8498 }
8499
8500 /**
8501 @@ -17563,10 +18650,10 @@ index ae5fb83..f6a093d 100644
8502 * @v: pointer to type int
8503 *
8504 diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
8505 -index a11c30b..66fd8a0 100644
8506 +index a984111..9c1ae68 100644
8507 --- a/arch/x86/include/asm/atomic64_32.h
8508 +++ b/arch/x86/include/asm/atomic64_32.h
8509 -@@ -12,6 +12,14 @@ typedef struct {
8510 +@@ -11,6 +11,14 @@ typedef struct {
8511 u64 __aligned(8) counter;
8512 } atomic64_t;
8513
8514 @@ -17581,7 +18668,7 @@ index a11c30b..66fd8a0 100644
8515 #define ATOMIC64_INIT(val) { (val) }
8516
8517 #define __ATOMIC64_DECL(sym) void atomic64_##sym(atomic64_t *, ...)
8518 -@@ -37,21 +45,31 @@ typedef struct {
8519 +@@ -36,21 +44,31 @@ typedef struct {
8520 ATOMIC64_DECL_ONE(sym##_386)
8521
8522 ATOMIC64_DECL_ONE(add_386);
8523 @@ -17613,7 +18700,7 @@ index a11c30b..66fd8a0 100644
8524 ATOMIC64_DECL(dec_if_positive);
8525 ATOMIC64_DECL(inc_not_zero);
8526 ATOMIC64_DECL(add_unless);
8527 -@@ -77,6 +95,21 @@ static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n
8528 +@@ -76,6 +94,21 @@ static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n
8529 }
8530
8531 /**
8532 @@ -17635,7 +18722,7 @@ index a11c30b..66fd8a0 100644
8533 * atomic64_xchg - xchg atomic64 variable
8534 * @v: pointer to type atomic64_t
8535 * @n: value to assign
8536 -@@ -112,6 +145,22 @@ static inline void atomic64_set(atomic64_t *v, long long i)
8537 +@@ -111,6 +144,22 @@ static inline void atomic64_set(atomic64_t *v, long long i)
8538 }
8539
8540 /**
8541 @@ -17658,7 +18745,7 @@ index a11c30b..66fd8a0 100644
8542 * atomic64_read - read atomic64 variable
8543 * @v: pointer to type atomic64_t
8544 *
8545 -@@ -125,6 +174,19 @@ static inline long long atomic64_read(const atomic64_t *v)
8546 +@@ -124,6 +173,19 @@ static inline long long atomic64_read(const atomic64_t *v)
8547 }
8548
8549 /**
8550 @@ -17678,7 +18765,7 @@ index a11c30b..66fd8a0 100644
8551 * atomic64_add_return - add and return
8552 * @i: integer value to add
8553 * @v: pointer to type atomic64_t
8554 -@@ -139,6 +201,21 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v)
8555 +@@ -138,6 +200,21 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v)
8556 return i;
8557 }
8558
8559 @@ -17700,7 +18787,7 @@ index a11c30b..66fd8a0 100644
8560 /*
8561 * Other variants with different arithmetic operators:
8562 */
8563 -@@ -158,6 +235,14 @@ static inline long long atomic64_inc_return(atomic64_t *v)
8564 +@@ -157,6 +234,14 @@ static inline long long atomic64_inc_return(atomic64_t *v)
8565 return a;
8566 }
8567
8568 @@ -17715,7 +18802,7 @@ index a11c30b..66fd8a0 100644
8569 static inline long long atomic64_dec_return(atomic64_t *v)
8570 {
8571 long long a;
8572 -@@ -182,6 +267,21 @@ static inline long long atomic64_add(long long i, atomic64_t *v)
8573 +@@ -181,6 +266,21 @@ static inline long long atomic64_add(long long i, atomic64_t *v)
8574 }
8575
8576 /**
8577 @@ -18248,11 +19335,11 @@ index acdee09..e5c31cd 100644
8578 struct compat_timespec {
8579 compat_time_t tv_sec;
8580 diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
8581 -index f7ba9fb..d3945be 100644
8582 +index 7ad8c94..00a0aa3 100644
8583 --- a/arch/x86/include/asm/cpufeature.h
8584 +++ b/arch/x86/include/asm/cpufeature.h
8585 -@@ -217,7 +217,8 @@
8586 - #define X86_FEATURE_PFTHRESHOLD ( 8*32+14) /* AMD pause filter threshold */
8587 +@@ -203,7 +203,8 @@
8588 +
8589 #define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer vmmcall to vmcall */
8590 #define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */
8591 -
8592 @@ -18261,7 +19348,7 @@ index f7ba9fb..d3945be 100644
8593
8594 /* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
8595 #define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* {RD/WR}{FS/GS}BASE instructions*/
8596 -@@ -225,7 +226,7 @@
8597 +@@ -211,7 +212,7 @@
8598 #define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */
8599 #define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */
8600 #define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */
8601 @@ -18270,7 +19357,7 @@ index f7ba9fb..d3945be 100644
8602 #define X86_FEATURE_BMI2 ( 9*32+ 8) /* 2nd group bit manipulation extensions */
8603 #define X86_FEATURE_ERMS ( 9*32+ 9) /* Enhanced REP MOVSB/STOSB */
8604 #define X86_FEATURE_INVPCID ( 9*32+10) /* Invalidate Processor Context ID */
8605 -@@ -461,7 +462,8 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
8606 +@@ -462,7 +463,8 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
8607
8608 #ifdef CONFIG_X86_DEBUG_STATIC_CPU_HAS
8609 t_warn:
8610 @@ -18280,7 +19367,7 @@ index f7ba9fb..d3945be 100644
8611 return false;
8612 #endif
8613
8614 -@@ -482,7 +484,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
8615 +@@ -483,7 +485,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
8616 ".section .discard,\"aw\",@progbits\n"
8617 " .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
8618 ".previous\n"
8619 @@ -18289,7 +19376,7 @@ index f7ba9fb..d3945be 100644
8620 "3: movb $1,%0\n"
8621 "4:\n"
8622 ".previous\n"
8623 -@@ -517,7 +519,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
8624 +@@ -518,7 +520,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
8625 " .byte 5f - 4f\n" /* repl len */
8626 " .byte 3b - 2b\n" /* pad len */
8627 ".previous\n"
8628 @@ -18298,7 +19385,7 @@ index f7ba9fb..d3945be 100644
8629 "4: jmp %l[t_no]\n"
8630 "5:\n"
8631 ".previous\n"
8632 -@@ -552,7 +554,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
8633 +@@ -553,7 +555,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
8634 ".section .discard,\"aw\",@progbits\n"
8635 " .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
8636 ".previous\n"
8637 @@ -18307,7 +19394,7 @@ index f7ba9fb..d3945be 100644
8638 "3: movb $0,%0\n"
8639 "4:\n"
8640 ".previous\n"
8641 -@@ -567,7 +569,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
8642 +@@ -568,7 +570,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
8643 ".section .discard,\"aw\",@progbits\n"
8644 " .byte 0xff + (6f-5f) - (4b-3b)\n" /* size check */
8645 ".previous\n"
8646 @@ -18316,6 +19403,208 @@ index f7ba9fb..d3945be 100644
8647 "5: movb $1,%0\n"
8648 "6:\n"
8649 ".previous\n"
8650 +diff --git a/arch/x86/include/asm/crypto/camellia.h b/arch/x86/include/asm/crypto/camellia.h
8651 +index bb93333..e3d3d57 100644
8652 +--- a/arch/x86/include/asm/crypto/camellia.h
8653 ++++ b/arch/x86/include/asm/crypto/camellia.h
8654 +@@ -39,34 +39,35 @@ extern int xts_camellia_setkey(struct crypto_tfm *tfm, const u8 *key,
8655 + /* regular block cipher functions */
8656 + asmlinkage void __camellia_enc_blk(struct camellia_ctx *ctx, u8 *dst,
8657 + const u8 *src, bool xor);
8658 +-asmlinkage void camellia_dec_blk(struct camellia_ctx *ctx, u8 *dst,
8659 ++asmlinkage void camellia_dec_blk(void *ctx, u8 *dst,
8660 + const u8 *src);
8661 +
8662 + /* 2-way parallel cipher functions */
8663 + asmlinkage void __camellia_enc_blk_2way(struct camellia_ctx *ctx, u8 *dst,
8664 + const u8 *src, bool xor);
8665 +-asmlinkage void camellia_dec_blk_2way(struct camellia_ctx *ctx, u8 *dst,
8666 ++asmlinkage void camellia_dec_blk_2way(void *ctx, u8 *dst,
8667 + const u8 *src);
8668 +
8669 + /* 16-way parallel cipher functions (avx/aes-ni) */
8670 +-asmlinkage void camellia_ecb_enc_16way(struct camellia_ctx *ctx, u8 *dst,
8671 ++asmlinkage void camellia_ecb_enc_16way(void *ctx, u8 *dst,
8672 + const u8 *src);
8673 +-asmlinkage void camellia_ecb_dec_16way(struct camellia_ctx *ctx, u8 *dst,
8674 ++asmlinkage void camellia_ecb_dec_16way(void *ctx, u8 *dst,
8675 + const u8 *src);
8676 +
8677 +-asmlinkage void camellia_cbc_dec_16way(struct camellia_ctx *ctx, u8 *dst,
8678 ++asmlinkage void camellia_cbc_dec_16way(void *ctx, u8 *dst,
8679 + const u8 *src);
8680 +-asmlinkage void camellia_ctr_16way(struct camellia_ctx *ctx, u8 *dst,
8681 +- const u8 *src, le128 *iv);
8682 ++asmlinkage void camellia_ctr_16way(void *ctx, u128 *dst,
8683 ++ const u128 *src, le128 *iv);
8684 +
8685 +-asmlinkage void camellia_xts_enc_16way(struct camellia_ctx *ctx, u8 *dst,
8686 +- const u8 *src, le128 *iv);
8687 +-asmlinkage void camellia_xts_dec_16way(struct camellia_ctx *ctx, u8 *dst,
8688 +- const u8 *src, le128 *iv);
8689 ++asmlinkage void camellia_xts_enc_16way(void *ctx, u128 *dst,
8690 ++ const u128 *src, le128 *iv);
8691 ++asmlinkage void camellia_xts_dec_16way(void *ctx, u128 *dst,
8692 ++ const u128 *src, le128 *iv);
8693 +
8694 +-static inline void camellia_enc_blk(struct camellia_ctx *ctx, u8 *dst,
8695 ++static inline void camellia_enc_blk(void *_ctx, u8 *dst,
8696 + const u8 *src)
8697 + {
8698 ++ struct camellia_ctx *ctx = _ctx;
8699 + __camellia_enc_blk(ctx, dst, src, false);
8700 + }
8701 +
8702 +@@ -76,9 +77,10 @@ static inline void camellia_enc_blk_xor(struct camellia_ctx *ctx, u8 *dst,
8703 + __camellia_enc_blk(ctx, dst, src, true);
8704 + }
8705 +
8706 +-static inline void camellia_enc_blk_2way(struct camellia_ctx *ctx, u8 *dst,
8707 ++static inline void camellia_enc_blk_2way(void *_ctx, u8 *dst,
8708 + const u8 *src)
8709 + {
8710 ++ struct camellia_ctx *ctx = _ctx;
8711 + __camellia_enc_blk_2way(ctx, dst, src, false);
8712 + }
8713 +
8714 +@@ -89,7 +91,7 @@ static inline void camellia_enc_blk_xor_2way(struct camellia_ctx *ctx, u8 *dst,
8715 + }
8716 +
8717 + /* glue helpers */
8718 +-extern void camellia_decrypt_cbc_2way(void *ctx, u128 *dst, const u128 *src);
8719 ++extern void camellia_decrypt_cbc_2way(void *ctx, u8 *dst, const u8 *src);
8720 + extern void camellia_crypt_ctr(void *ctx, u128 *dst, const u128 *src,
8721 + le128 *iv);
8722 + extern void camellia_crypt_ctr_2way(void *ctx, u128 *dst, const u128 *src,
8723 +diff --git a/arch/x86/include/asm/crypto/glue_helper.h b/arch/x86/include/asm/crypto/glue_helper.h
8724 +index 03bb106..9e7a45c 100644
8725 +--- a/arch/x86/include/asm/crypto/glue_helper.h
8726 ++++ b/arch/x86/include/asm/crypto/glue_helper.h
8727 +@@ -11,16 +11,16 @@
8728 + #include <crypto/b128ops.h>
8729 +
8730 + typedef void (*common_glue_func_t)(void *ctx, u8 *dst, const u8 *src);
8731 +-typedef void (*common_glue_cbc_func_t)(void *ctx, u128 *dst, const u128 *src);
8732 ++typedef void (*common_glue_cbc_func_t)(void *ctx, u8 *dst, const u8 *src);
8733 + typedef void (*common_glue_ctr_func_t)(void *ctx, u128 *dst, const u128 *src,
8734 + le128 *iv);
8735 + typedef void (*common_glue_xts_func_t)(void *ctx, u128 *dst, const u128 *src,
8736 + le128 *iv);
8737 +
8738 +-#define GLUE_FUNC_CAST(fn) ((common_glue_func_t)(fn))
8739 +-#define GLUE_CBC_FUNC_CAST(fn) ((common_glue_cbc_func_t)(fn))
8740 +-#define GLUE_CTR_FUNC_CAST(fn) ((common_glue_ctr_func_t)(fn))
8741 +-#define GLUE_XTS_FUNC_CAST(fn) ((common_glue_xts_func_t)(fn))
8742 ++#define GLUE_FUNC_CAST(fn) (fn)
8743 ++#define GLUE_CBC_FUNC_CAST(fn) (fn)
8744 ++#define GLUE_CTR_FUNC_CAST(fn) (fn)
8745 ++#define GLUE_XTS_FUNC_CAST(fn) (fn)
8746 +
8747 + struct common_glue_func_entry {
8748 + unsigned int num_blocks; /* number of blocks that @fn will process */
8749 +diff --git a/arch/x86/include/asm/crypto/serpent-avx.h b/arch/x86/include/asm/crypto/serpent-avx.h
8750 +index 33c2b8a..586871f 100644
8751 +--- a/arch/x86/include/asm/crypto/serpent-avx.h
8752 ++++ b/arch/x86/include/asm/crypto/serpent-avx.h
8753 +@@ -16,20 +16,20 @@ struct serpent_xts_ctx {
8754 + struct serpent_ctx crypt_ctx;
8755 + };
8756 +
8757 +-asmlinkage void serpent_ecb_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
8758 ++asmlinkage void serpent_ecb_enc_8way_avx(void *ctx, u8 *dst,
8759 + const u8 *src);
8760 +-asmlinkage void serpent_ecb_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
8761 ++asmlinkage void serpent_ecb_dec_8way_avx(void *ctx, u8 *dst,
8762 + const u8 *src);
8763 +
8764 +-asmlinkage void serpent_cbc_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
8765 ++asmlinkage void serpent_cbc_dec_8way_avx(void *ctx, u8 *dst,
8766 + const u8 *src);
8767 +-asmlinkage void serpent_ctr_8way_avx(struct serpent_ctx *ctx, u8 *dst,
8768 +- const u8 *src, le128 *iv);
8769 ++asmlinkage void serpent_ctr_8way_avx(void *ctx, u128 *dst,
8770 ++ const u128 *src, le128 *iv);
8771 +
8772 +-asmlinkage void serpent_xts_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
8773 +- const u8 *src, le128 *iv);
8774 +-asmlinkage void serpent_xts_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
8775 +- const u8 *src, le128 *iv);
8776 ++asmlinkage void serpent_xts_enc_8way_avx(void *ctx, u128 *dst,
8777 ++ const u128 *src, le128 *iv);
8778 ++asmlinkage void serpent_xts_dec_8way_avx(void *ctx, u128 *dst,
8779 ++ const u128 *src, le128 *iv);
8780 +
8781 + extern void __serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src,
8782 + le128 *iv);
8783 +diff --git a/arch/x86/include/asm/crypto/serpent-sse2.h b/arch/x86/include/asm/crypto/serpent-sse2.h
8784 +index e6e77df..fe42081 100644
8785 +--- a/arch/x86/include/asm/crypto/serpent-sse2.h
8786 ++++ b/arch/x86/include/asm/crypto/serpent-sse2.h
8787 +@@ -13,7 +13,7 @@ asmlinkage void __serpent_enc_blk_4way(struct serpent_ctx *ctx, u8 *dst,
8788 + asmlinkage void serpent_dec_blk_4way(struct serpent_ctx *ctx, u8 *dst,
8789 + const u8 *src);
8790 +
8791 +-static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
8792 ++static inline void serpent_enc_blk_xway(void *ctx, u8 *dst,
8793 + const u8 *src)
8794 + {
8795 + __serpent_enc_blk_4way(ctx, dst, src, false);
8796 +@@ -25,7 +25,7 @@ static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
8797 + __serpent_enc_blk_4way(ctx, dst, src, true);
8798 + }
8799 +
8800 +-static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
8801 ++static inline void serpent_dec_blk_xway(void *ctx, u8 *dst,
8802 + const u8 *src)
8803 + {
8804 + serpent_dec_blk_4way(ctx, dst, src);
8805 +@@ -40,7 +40,7 @@ asmlinkage void __serpent_enc_blk_8way(struct serpent_ctx *ctx, u8 *dst,
8806 + asmlinkage void serpent_dec_blk_8way(struct serpent_ctx *ctx, u8 *dst,
8807 + const u8 *src);
8808 +
8809 +-static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
8810 ++static inline void serpent_enc_blk_xway(void *ctx, u8 *dst,
8811 + const u8 *src)
8812 + {
8813 + __serpent_enc_blk_8way(ctx, dst, src, false);
8814 +@@ -52,7 +52,7 @@ static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
8815 + __serpent_enc_blk_8way(ctx, dst, src, true);
8816 + }
8817 +
8818 +-static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
8819 ++static inline void serpent_dec_blk_xway(void *ctx, u8 *dst,
8820 + const u8 *src)
8821 + {
8822 + serpent_dec_blk_8way(ctx, dst, src);
8823 +diff --git a/arch/x86/include/asm/crypto/twofish.h b/arch/x86/include/asm/crypto/twofish.h
8824 +index 878c51c..86fc65f 100644
8825 +--- a/arch/x86/include/asm/crypto/twofish.h
8826 ++++ b/arch/x86/include/asm/crypto/twofish.h
8827 +@@ -17,19 +17,19 @@ struct twofish_xts_ctx {
8828 + };
8829 +
8830 + /* regular block cipher functions from twofish_x86_64 module */
8831 +-asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst,
8832 ++asmlinkage void twofish_enc_blk(void *ctx, u8 *dst,
8833 + const u8 *src);
8834 +-asmlinkage void twofish_dec_blk(struct twofish_ctx *ctx, u8 *dst,
8835 ++asmlinkage void twofish_dec_blk(void *ctx, u8 *dst,
8836 + const u8 *src);
8837 +
8838 + /* 3-way parallel cipher functions */
8839 +-asmlinkage void __twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,
8840 ++asmlinkage void __twofish_enc_blk_3way(void *ctx, u8 *dst,
8841 + const u8 *src, bool xor);
8842 +-asmlinkage void twofish_dec_blk_3way(struct twofish_ctx *ctx, u8 *dst,
8843 ++asmlinkage void twofish_dec_blk_3way(void *ctx, u8 *dst,
8844 + const u8 *src);
8845 +
8846 + /* helpers from twofish_x86_64-3way module */
8847 +-extern void twofish_dec_blk_cbc_3way(void *ctx, u128 *dst, const u128 *src);
8848 ++extern void twofish_dec_blk_cbc_3way(void *ctx, u8 *dst, const u8 *src);
8849 + extern void twofish_enc_blk_ctr(void *ctx, u128 *dst, const u128 *src,
8850 + le128 *iv);
8851 + extern void twofish_enc_blk_ctr_3way(void *ctx, u128 *dst, const u128 *src,
8852 diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
8853 index 4e10d73..7319a47 100644
8854 --- a/arch/x86/include/asm/desc.h
8855 @@ -18718,10 +20007,10 @@ index 1c7eefe..d0e4702 100644
8856 };
8857
8858 diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h
8859 -index 3c3550c..ca9e4c3 100644
8860 +index 0fd440d..5f883a5 100644
8861 --- a/arch/x86/include/asm/fpu/internal.h
8862 +++ b/arch/x86/include/asm/fpu/internal.h
8863 -@@ -97,8 +97,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
8864 +@@ -98,8 +98,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
8865 #define user_insn(insn, output, input...) \
8866 ({ \
8867 int err; \
8868 @@ -18734,7 +20023,7 @@ index 3c3550c..ca9e4c3 100644
8869 "2: " ASM_CLAC "\n" \
8870 ".section .fixup,\"ax\"\n" \
8871 "3: movl $-1,%[err]\n" \
8872 -@@ -107,6 +110,7 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
8873 +@@ -108,6 +111,7 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
8874 _ASM_EXTABLE(1b, 3b) \
8875 : [err] "=r" (err), output \
8876 : "0"(0), input); \
8877 @@ -18742,7 +20031,7 @@ index 3c3550c..ca9e4c3 100644
8878 err; \
8879 })
8880
8881 -@@ -186,9 +190,9 @@ static inline int copy_user_to_fregs(struct fregs_state __user *fx)
8882 +@@ -187,9 +191,9 @@ static inline int copy_user_to_fregs(struct fregs_state __user *fx)
8883 static inline void copy_fxregs_to_kernel(struct fpu *fpu)
8884 {
8885 if (config_enabled(CONFIG_X86_32))
8886 @@ -18754,7 +20043,7 @@ index 3c3550c..ca9e4c3 100644
8887 else {
8888 /* Using "rex64; fxsave %0" is broken because, if the memory
8889 * operand uses any extended registers for addressing, a second
8890 -@@ -205,15 +209,15 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
8891 +@@ -206,15 +210,15 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
8892 * an extended register is needed for addressing (fix submitted
8893 * to mainline 2005-11-21).
8894 *
8895 @@ -18773,25 +20062,20 @@ index 3c3550c..ca9e4c3 100644
8896 }
8897 }
8898
8899 -@@ -388,12 +392,16 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
8900 +@@ -386,9 +390,11 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
8901 if (unlikely(err))
8902 return -EFAULT;
8903
8904 + pax_open_userland();
8905 - __asm__ __volatile__(ASM_STAC "\n"
8906 -- "1:"XSAVE"\n"
8907 -+ "1:"
8908 -+ __copyuser_seg
8909 -+ XSAVE"\n"
8910 - "2: " ASM_CLAC "\n"
8911 - xstate_fault(err)
8912 - : "D" (buf), "a" (-1), "d" (-1), "0" (err)
8913 - : "memory");
8914 + stac();
8915 +- XSTATE_OP(XSAVE, buf, -1, -1, err);
8916 ++ XSTATE_OP(__copyuser_seg XSAVE, buf, -1, -1, err);
8917 + clac();
8918 + pax_close_userland();
8919 +
8920 return err;
8921 }
8922 -
8923 -@@ -402,17 +410,21 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
8924 +@@ -398,14 +404,16 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
8925 */
8926 static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
8927 {
8928 @@ -18799,23 +20083,18 @@ index 3c3550c..ca9e4c3 100644
8929 + struct xregs_state *xstate = ((__force_kernel struct xregs_state *)buf);
8930 u32 lmask = mask;
8931 u32 hmask = mask >> 32;
8932 - int err = 0;
8933 + int err;
8934
8935 + pax_open_userland();
8936 - __asm__ __volatile__(ASM_STAC "\n"
8937 -- "1:"XRSTOR"\n"
8938 -+ "1:"
8939 -+ __copyuser_seg
8940 -+ XRSTOR"\n"
8941 - "2: " ASM_CLAC "\n"
8942 - xstate_fault(err)
8943 - : "D" (xstate), "a" (lmask), "d" (hmask), "0" (err)
8944 - : "memory"); /* memory required? */
8945 + stac();
8946 +- XSTATE_OP(XRSTOR, xstate, lmask, hmask, err);
8947 ++ XSTATE_OP(__copyuser_seg XRSTOR, xstate, lmask, hmask, err);
8948 + clac();
8949 + pax_close_userland();
8950 +
8951 return err;
8952 }
8953 -
8954 -@@ -429,7 +441,7 @@ static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
8955 +@@ -423,7 +431,7 @@ static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
8956 static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
8957 {
8958 if (likely(use_xsave())) {
8959 @@ -18824,7 +20103,7 @@ index 3c3550c..ca9e4c3 100644
8960 return 1;
8961 }
8962
8963 -@@ -442,7 +454,7 @@ static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
8964 +@@ -436,7 +444,7 @@ static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
8965 * Legacy FPU register saving, FNSAVE always clears FPU registers,
8966 * so we have to mark them inactive:
8967 */
8968 @@ -18833,7 +20112,7 @@ index 3c3550c..ca9e4c3 100644
8969
8970 return 0;
8971 }
8972 -@@ -471,7 +483,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate)
8973 +@@ -465,7 +473,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate)
8974 "fnclex\n\t"
8975 "emms\n\t"
8976 "fildl %P[addr]" /* set F?P to defined value */
8977 @@ -18842,7 +20121,7 @@ index 3c3550c..ca9e4c3 100644
8978 }
8979
8980 __copy_kernel_to_fpregs(fpstate);
8981 -@@ -611,7 +623,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
8982 +@@ -605,7 +613,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
8983 if (fpu.preload) {
8984 new_fpu->counter++;
8985 __fpregs_activate(new_fpu);
8986 @@ -18851,7 +20130,7 @@ index 3c3550c..ca9e4c3 100644
8987 } else {
8988 __fpregs_deactivate_hw();
8989 }
8990 -@@ -623,7 +635,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
8991 +@@ -617,7 +625,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
8992 if (fpu_want_lazy_restore(new_fpu, cpu))
8993 fpu.preload = 0;
8994 else
8995 @@ -18860,7 +20139,7 @@ index 3c3550c..ca9e4c3 100644
8996 fpregs_activate(new_fpu);
8997 }
8998 }
8999 -@@ -643,7 +655,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
9000 +@@ -637,7 +645,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
9001 static inline void switch_fpu_finish(struct fpu *new_fpu, fpu_switch_t fpu_switch)
9002 {
9003 if (fpu_switch.preload)
9004 @@ -19022,10 +20301,10 @@ index b4c1f54..e290c08 100644
9005 pagefault_enable();
9006
9007 diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
9008 -index 59caa55..e4d3fec 100644
9009 +index 84b3d19..8ea9f03 100644
9010 --- a/arch/x86/include/asm/hw_irq.h
9011 +++ b/arch/x86/include/asm/hw_irq.h
9012 -@@ -159,8 +159,8 @@ static inline void unlock_vector_lock(void) {}
9013 +@@ -164,8 +164,8 @@ static inline void unlock_vector_lock(void) {}
9014 #endif /* CONFIG_X86_LOCAL_APIC */
9015
9016 /* Statistics */
9017 @@ -19163,6 +20442,31 @@ index 4421b5d..8543006 100644
9018
9019 #define flush_insn_slot(p) do { } while (0)
9020
9021 +diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
9022 +index e9cd7be..0f3574f 100644
9023 +--- a/arch/x86/include/asm/kvm_emulate.h
9024 ++++ b/arch/x86/include/asm/kvm_emulate.h
9025 +@@ -279,6 +279,8 @@ enum x86emul_mode {
9026 + #define X86EMUL_SMM_MASK (1 << 6)
9027 + #define X86EMUL_SMM_INSIDE_NMI_MASK (1 << 7)
9028 +
9029 ++struct fastop;
9030 ++
9031 + struct x86_emulate_ctxt {
9032 + const struct x86_emulate_ops *ops;
9033 +
9034 +@@ -311,7 +313,10 @@ struct x86_emulate_ctxt {
9035 + struct operand src;
9036 + struct operand src2;
9037 + struct operand dst;
9038 +- int (*execute)(struct x86_emulate_ctxt *ctxt);
9039 ++ union {
9040 ++ int (*execute)(struct x86_emulate_ctxt *ctxt);
9041 ++ void (*fastop)(struct fastop *fake);
9042 ++ } u;
9043 + int (*check_perm)(struct x86_emulate_ctxt *ctxt);
9044 + /*
9045 + * The following six fields are cleared together,
9046 diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
9047 index 4ad6560..75c7bdd 100644
9048 --- a/arch/x86/include/asm/local.h
9049 @@ -19600,7 +20904,7 @@ index bfd9b2a..0d64fc2 100644
9050
9051 #define activate_mm(prev, next) \
9052 diff --git a/arch/x86/include/asm/module.h b/arch/x86/include/asm/module.h
9053 -index e3b7819..b257c64 100644
9054 +index e3b7819..ba128ec 100644
9055 --- a/arch/x86/include/asm/module.h
9056 +++ b/arch/x86/include/asm/module.h
9057 @@ -5,6 +5,7 @@
9058 @@ -19611,7 +20915,7 @@ index e3b7819..b257c64 100644
9059 #elif defined CONFIG_M486
9060 #define MODULE_PROC_FAMILY "486 "
9061 #elif defined CONFIG_M586
9062 -@@ -57,8 +58,20 @@
9063 +@@ -57,8 +58,26 @@
9064 #error unknown processor family
9065 #endif
9066
9067 @@ -19631,7 +20935,13 @@ index e3b7819..b257c64 100644
9068 +#define MODULE_PAX_UDEREF ""
9069 +#endif
9070 +
9071 -+#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_PAX_KERNEXEC MODULE_PAX_UDEREF
9072 ++#ifdef CONFIG_PAX_RAP
9073 ++#define MODULE_PAX_RAP "RAP "
9074 ++#else
9075 ++#define MODULE_PAX_RAP ""
9076 ++#endif
9077 ++
9078 ++#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_PAX_KERNEXEC MODULE_PAX_UDEREF MODULE_PAX_RAP
9079 +
9080 #endif /* _ASM_X86_MODULE_H */
9081 diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
9082 @@ -19775,10 +21085,10 @@ index b3bebf9..cb419e7 100644
9083
9084 #define __phys_reloc_hide(x) (x)
9085 diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
9086 -index c759b3c..043875b 100644
9087 +index f619250..8b851d8 100644
9088 --- a/arch/x86/include/asm/paravirt.h
9089 +++ b/arch/x86/include/asm/paravirt.h
9090 -@@ -536,7 +536,7 @@ static inline pmd_t __pmd(pmdval_t val)
9091 +@@ -510,7 +510,7 @@ static inline pmd_t __pmd(pmdval_t val)
9092 return (pmd_t) { ret };
9093 }
9094
9095 @@ -19787,7 +21097,7 @@ index c759b3c..043875b 100644
9096 {
9097 pmdval_t ret;
9098
9099 -@@ -602,6 +602,18 @@ static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
9100 +@@ -576,6 +576,18 @@ static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
9101 val);
9102 }
9103
9104 @@ -19806,7 +21116,7 @@ index c759b3c..043875b 100644
9105 static inline void pgd_clear(pgd_t *pgdp)
9106 {
9107 set_pgd(pgdp, __pgd(0));
9108 -@@ -686,6 +698,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
9109 +@@ -660,6 +672,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
9110 pv_mmu_ops.set_fixmap(idx, phys, flags);
9111 }
9112
9113 @@ -19828,7 +21138,7 @@ index c759b3c..043875b 100644
9114 #if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS)
9115
9116 #ifdef CONFIG_QUEUED_SPINLOCKS
9117 -@@ -909,7 +936,7 @@ extern void default_banner(void);
9118 +@@ -883,7 +910,7 @@ extern void default_banner(void);
9119
9120 #define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4)
9121 #define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
9122 @@ -19837,7 +21147,7 @@ index c759b3c..043875b 100644
9123 #endif
9124
9125 #define INTERRUPT_RETURN \
9126 -@@ -979,6 +1006,21 @@ extern void default_banner(void);
9127 +@@ -941,6 +968,21 @@ extern void default_banner(void);
9128 PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret64), \
9129 CLBR_NONE, \
9130 jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret64))
9131 @@ -19860,7 +21170,7 @@ index c759b3c..043875b 100644
9132
9133 #endif /* __ASSEMBLY__ */
9134 diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
9135 -index 3d44191..1992d40 100644
9136 +index 77db561..bc4a1ea 100644
9137 --- a/arch/x86/include/asm/paravirt_types.h
9138 +++ b/arch/x86/include/asm/paravirt_types.h
9139 @@ -89,7 +89,7 @@ struct pv_init_ops {
9140 @@ -19887,7 +21197,7 @@ index 3d44191..1992d40 100644
9141
9142 struct pv_cpu_ops {
9143 /* hooks for various privileged instructions */
9144 -@@ -195,7 +195,7 @@ struct pv_cpu_ops {
9145 +@@ -178,7 +178,7 @@ struct pv_cpu_ops {
9146
9147 void (*start_context_switch)(struct task_struct *prev);
9148 void (*end_context_switch)(struct task_struct *next);
9149 @@ -19896,25 +21206,16 @@ index 3d44191..1992d40 100644
9150
9151 struct pv_irq_ops {
9152 /*
9153 -@@ -218,7 +218,7 @@ struct pv_irq_ops {
9154 +@@ -201,7 +201,7 @@ struct pv_irq_ops {
9155 #ifdef CONFIG_X86_64
9156 void (*adjust_exception_frame)(void);
9157 #endif
9158 -};
9159 +} __no_randomize_layout;
9160
9161 - struct pv_apic_ops {
9162 - #ifdef CONFIG_X86_LOCAL_APIC
9163 -@@ -226,7 +226,7 @@ struct pv_apic_ops {
9164 - unsigned long start_eip,
9165 - unsigned long start_esp);
9166 - #endif
9167 --};
9168 -+} __no_const __no_randomize_layout;
9169 -
9170 struct pv_mmu_ops {
9171 unsigned long (*read_cr2)(void);
9172 -@@ -316,6 +316,7 @@ struct pv_mmu_ops {
9173 +@@ -285,6 +285,7 @@ struct pv_mmu_ops {
9174 struct paravirt_callee_save make_pud;
9175
9176 void (*set_pgd)(pgd_t *pudp, pgd_t pgdval);
9177 @@ -19922,7 +21223,7 @@ index 3d44191..1992d40 100644
9178 #endif /* CONFIG_PGTABLE_LEVELS == 4 */
9179 #endif /* CONFIG_PGTABLE_LEVELS >= 3 */
9180
9181 -@@ -327,7 +328,13 @@ struct pv_mmu_ops {
9182 +@@ -296,7 +297,13 @@ struct pv_mmu_ops {
9183 an mfn. We can tell which is which from the index. */
9184 void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
9185 phys_addr_t phys, pgprot_t flags);
9186 @@ -19937,7 +21238,7 @@ index 3d44191..1992d40 100644
9187
9188 struct arch_spinlock;
9189 #ifdef CONFIG_SMP
9190 -@@ -349,11 +356,14 @@ struct pv_lock_ops {
9191 +@@ -318,11 +325,14 @@ struct pv_lock_ops {
9192 struct paravirt_callee_save lock_spinning;
9193 void (*unlock_kick)(struct arch_spinlock *lock, __ticket_t ticket);
9194 #endif /* !CONFIG_QUEUED_SPINLOCKS */
9195 @@ -19954,8 +21255,8 @@ index 3d44191..1992d40 100644
9196 struct paravirt_patch_template {
9197 struct pv_init_ops pv_init_ops;
9198 struct pv_time_ops pv_time_ops;
9199 -@@ -362,7 +372,7 @@ struct paravirt_patch_template {
9200 - struct pv_apic_ops pv_apic_ops;
9201 +@@ -330,7 +340,7 @@ struct paravirt_patch_template {
9202 + struct pv_irq_ops pv_irq_ops;
9203 struct pv_mmu_ops pv_mmu_ops;
9204 struct pv_lock_ops pv_lock_ops;
9205 -};
9206 @@ -20066,7 +21367,7 @@ index cdaa58c..ae30f0d 100644
9207
9208 static inline void pud_clear(pud_t *pudp)
9209 diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
9210 -index 6ec0c8b..1e50b49 100644
9211 +index 0687c47..7425416 100644
9212 --- a/arch/x86/include/asm/pgtable.h
9213 +++ b/arch/x86/include/asm/pgtable.h
9214 @@ -54,6 +54,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
9215 @@ -20077,7 +21378,7 @@ index 6ec0c8b..1e50b49 100644
9216 #define pgd_clear(pgd) native_pgd_clear(pgd)
9217 #endif
9218
9219 -@@ -91,12 +92,53 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
9220 +@@ -88,12 +89,53 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
9221
9222 #define arch_end_context_switch(prev) do {} while(0)
9223
9224 @@ -20131,7 +21432,7 @@ index 6ec0c8b..1e50b49 100644
9225 static inline int pte_dirty(pte_t pte)
9226 {
9227 return pte_flags(pte) & _PAGE_DIRTY;
9228 -@@ -157,6 +199,11 @@ static inline unsigned long pud_pfn(pud_t pud)
9229 +@@ -154,6 +196,11 @@ static inline unsigned long pud_pfn(pud_t pud)
9230 return (pud_val(pud) & pud_pfn_mask(pud)) >> PAGE_SHIFT;
9231 }
9232
9233 @@ -20143,7 +21444,7 @@ index 6ec0c8b..1e50b49 100644
9234 #define pte_page(pte) pfn_to_page(pte_pfn(pte))
9235
9236 static inline int pmd_large(pmd_t pte)
9237 -@@ -210,9 +257,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
9238 +@@ -209,9 +256,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
9239 return pte_clear_flags(pte, _PAGE_RW);
9240 }
9241
9242 @@ -20174,7 +21475,7 @@ index 6ec0c8b..1e50b49 100644
9243 }
9244
9245 static inline pte_t pte_mkdirty(pte_t pte)
9246 -@@ -445,6 +512,16 @@ pte_t *populate_extra_pte(unsigned long vaddr);
9247 +@@ -459,6 +526,16 @@ pte_t *populate_extra_pte(unsigned long vaddr);
9248 #endif
9249
9250 #ifndef __ASSEMBLY__
9251 @@ -20191,7 +21492,7 @@ index 6ec0c8b..1e50b49 100644
9252 #include <linux/mm_types.h>
9253 #include <linux/mmdebug.h>
9254 #include <linux/log2.h>
9255 -@@ -638,7 +715,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)
9256 +@@ -659,7 +736,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)
9257 * Currently stuck as a macro due to indirect forward reference to
9258 * linux/mmzone.h's __section_mem_map_addr() definition:
9259 */
9260 @@ -20200,7 +21501,7 @@ index 6ec0c8b..1e50b49 100644
9261
9262 /* to find an entry in a page-table-directory. */
9263 static inline unsigned long pud_index(unsigned long address)
9264 -@@ -653,7 +730,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
9265 +@@ -674,7 +751,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
9266
9267 static inline int pgd_bad(pgd_t pgd)
9268 {
9269 @@ -20209,7 +21510,7 @@ index 6ec0c8b..1e50b49 100644
9270 }
9271
9272 static inline int pgd_none(pgd_t pgd)
9273 -@@ -676,7 +753,12 @@ static inline int pgd_none(pgd_t pgd)
9274 +@@ -697,7 +774,12 @@ static inline int pgd_none(pgd_t pgd)
9275 * pgd_offset() returns a (pgd_t *)
9276 * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
9277 */
9278 @@ -20223,7 +21524,7 @@ index 6ec0c8b..1e50b49 100644
9279 /*
9280 * a shortcut which implies the use of the kernel's pgd, instead
9281 * of a process's
9282 -@@ -687,6 +769,25 @@ static inline int pgd_none(pgd_t pgd)
9283 +@@ -708,6 +790,25 @@ static inline int pgd_none(pgd_t pgd)
9284 #define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)
9285 #define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
9286
9287 @@ -20249,7 +21550,7 @@ index 6ec0c8b..1e50b49 100644
9288 #ifndef __ASSEMBLY__
9289
9290 extern int direct_gbpages;
9291 -@@ -853,11 +954,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
9292 +@@ -862,11 +963,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
9293 * dst and src can be on the same page, but the range must not overlap,
9294 * and must not cross a page boundary.
9295 */
9296 @@ -20444,22 +21745,24 @@ index e6844df..432b56e 100644
9297
9298 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
9299 diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
9300 -index 79c9185..d1e3128 100644
9301 +index 4432ab7..43778ff 100644
9302 --- a/arch/x86/include/asm/pgtable_types.h
9303 +++ b/arch/x86/include/asm/pgtable_types.h
9304 -@@ -85,8 +85,10 @@
9305 -
9306 - #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
9307 +@@ -87,9 +87,12 @@
9308 #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
9309 + #define _PAGE_DEVMAP (_AT(u64, 1) << _PAGE_BIT_DEVMAP)
9310 + #define __HAVE_ARCH_PTE_DEVMAP
9311 -#else
9312 +#elif defined(CONFIG_KMEMCHECK) || defined(CONFIG_MEM_SOFT_DIRTY)
9313 #define _PAGE_NX (_AT(pteval_t, 0))
9314 + #define _PAGE_DEVMAP (_AT(pteval_t, 0))
9315 +#else
9316 +#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN)
9317 ++#define _PAGE_DEVMAP (_AT(pteval_t, 0))
9318 #endif
9319
9320 #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
9321 -@@ -141,6 +143,9 @@ enum page_cache_mode {
9322 +@@ -144,6 +147,9 @@ enum page_cache_mode {
9323 #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
9324 _PAGE_ACCESSED)
9325
9326 @@ -20469,7 +21772,7 @@ index 79c9185..d1e3128 100644
9327 #define __PAGE_KERNEL_EXEC \
9328 (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
9329 #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
9330 -@@ -148,7 +153,7 @@ enum page_cache_mode {
9331 +@@ -151,7 +157,7 @@ enum page_cache_mode {
9332 #define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
9333 #define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
9334 #define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_NOCACHE)
9335 @@ -20478,7 +21781,7 @@ index 79c9185..d1e3128 100644
9336 #define __PAGE_KERNEL_VVAR (__PAGE_KERNEL_RO | _PAGE_USER)
9337 #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
9338 #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
9339 -@@ -194,7 +199,7 @@ enum page_cache_mode {
9340 +@@ -197,7 +203,7 @@ enum page_cache_mode {
9341 #ifdef CONFIG_X86_64
9342 #define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC
9343 #else
9344 @@ -20487,7 +21790,7 @@ index 79c9185..d1e3128 100644
9345 #define PDE_IDENT_ATTR 0x063 /* PRESENT+RW+DIRTY+ACCESSED */
9346 #define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
9347 #endif
9348 -@@ -233,7 +238,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
9349 +@@ -236,7 +242,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
9350 {
9351 return native_pgd_val(pgd) & PTE_FLAGS_MASK;
9352 }
9353 @@ -20505,7 +21808,7 @@ index 79c9185..d1e3128 100644
9354 #if CONFIG_PGTABLE_LEVELS > 3
9355 typedef struct { pudval_t pud; } pud_t;
9356
9357 -@@ -247,8 +262,6 @@ static inline pudval_t native_pud_val(pud_t pud)
9358 +@@ -250,8 +266,6 @@ static inline pudval_t native_pud_val(pud_t pud)
9359 return pud.pud;
9360 }
9361 #else
9362 @@ -20514,7 +21817,7 @@ index 79c9185..d1e3128 100644
9363 static inline pudval_t native_pud_val(pud_t pud)
9364 {
9365 return native_pgd_val(pud.pgd);
9366 -@@ -268,8 +281,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
9367 +@@ -271,8 +285,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
9368 return pmd.pmd;
9369 }
9370 #else
9371 @@ -20523,7 +21826,7 @@ index 79c9185..d1e3128 100644
9372 static inline pmdval_t native_pmd_val(pmd_t pmd)
9373 {
9374 return native_pgd_val(pmd.pud.pgd);
9375 -@@ -386,7 +397,6 @@ typedef struct page *pgtable_t;
9376 +@@ -389,7 +401,6 @@ typedef struct page *pgtable_t;
9377
9378 extern pteval_t __supported_pte_mask;
9379 extern void set_nx(void);
9380 @@ -20532,7 +21835,7 @@ index 79c9185..d1e3128 100644
9381 #define pgprot_writecombine pgprot_writecombine
9382 extern pgprot_t pgprot_writecombine(pgprot_t prot);
9383 diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h
9384 -index d8ce3ec..96b12e2 100644
9385 +index c57fd1e..426fc11 100644
9386 --- a/arch/x86/include/asm/pmem.h
9387 +++ b/arch/x86/include/asm/pmem.h
9388 @@ -41,7 +41,7 @@ static inline void arch_memcpy_to_pmem(void __pmem *dst, const void *src,
9389 @@ -20558,7 +21861,7 @@ index 01bcde8..a6f1377 100644
9390
9391 /*
9392 diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
9393 -index 2d5a50c..9fc95aaf 100644
9394 +index 20c11d1..f4a4f69 100644
9395 --- a/arch/x86/include/asm/processor.h
9396 +++ b/arch/x86/include/asm/processor.h
9397 @@ -136,7 +136,7 @@ struct cpuinfo_x86 {
9398 @@ -20820,7 +22123,7 @@ index 9c6b890..5305f53 100644
9399 u32 gdt_base;
9400 #else
9401 diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
9402 -index a82c4f1..ac45053 100644
9403 +index 2cb1cc2..787d524 100644
9404 --- a/arch/x86/include/asm/reboot.h
9405 +++ b/arch/x86/include/asm/reboot.h
9406 @@ -6,13 +6,13 @@
9407 @@ -21228,10 +22531,10 @@ index ba665eb..0f72938 100644
9408
9409 static __always_inline void clac(void)
9410 diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
9411 -index 222a6a3..839da8d 100644
9412 +index dfcf072..97cd79a 100644
9413 --- a/arch/x86/include/asm/smp.h
9414 +++ b/arch/x86/include/asm/smp.h
9415 -@@ -35,7 +35,7 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
9416 +@@ -26,7 +26,7 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
9417 /* cpus sharing the last level cache: */
9418 DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
9419 DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_llc_id);
9420 @@ -21240,7 +22543,7 @@ index 222a6a3..839da8d 100644
9421
9422 static inline struct cpumask *cpu_llc_shared_mask(int cpu)
9423 {
9424 -@@ -68,7 +68,7 @@ struct smp_ops {
9425 +@@ -59,7 +59,7 @@ struct smp_ops {
9426
9427 void (*send_call_func_ipi)(const struct cpumask *mask);
9428 void (*send_call_func_single_ipi)(int cpu);
9429 @@ -21249,7 +22552,7 @@ index 222a6a3..839da8d 100644
9430
9431 /* Globals due to paravirt */
9432 extern void set_cpu_sibling_map(int cpu);
9433 -@@ -182,14 +182,8 @@ extern unsigned disabled_cpus;
9434 +@@ -170,14 +170,8 @@ extern unsigned disabled_cpus;
9435 extern int safe_smp_processor_id(void);
9436
9437 #elif defined(CONFIG_X86_64_SMP)
9438 @@ -21598,8 +22901,30 @@ index 6df2029..a359a58 100644
9439 asm volatile("invlpg (%0)" ::"r" (addr) : "memory");
9440 }
9441
9442 +diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
9443 +index c3496619..3f3a7dc 100644
9444 +--- a/arch/x86/include/asm/traps.h
9445 ++++ b/arch/x86/include/asm/traps.h
9446 +@@ -10,7 +10,7 @@
9447 + #define dotraplinkage __visible
9448 +
9449 + asmlinkage void divide_error(void);
9450 +-asmlinkage void debug(void);
9451 ++asmlinkage void int1(void);
9452 + asmlinkage void nmi(void);
9453 + asmlinkage void int3(void);
9454 + asmlinkage void xen_debug(void);
9455 +@@ -107,7 +107,7 @@ extern int panic_on_unrecovered_nmi;
9456 +
9457 + void math_emulate(struct math_emu_info *);
9458 + #ifndef CONFIG_X86_32
9459 +-asmlinkage void smp_thermal_interrupt(void);
9460 ++asmlinkage void smp_thermal_interrupt(struct pt_regs *regs);
9461 + asmlinkage void smp_threshold_interrupt(void);
9462 + asmlinkage void smp_deferred_error_interrupt(void);
9463 + #endif
9464 diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
9465 -index 09b1b0a..8f56367 100644
9466 +index a4a30e4..44891b7 100644
9467 --- a/arch/x86/include/asm/uaccess.h
9468 +++ b/arch/x86/include/asm/uaccess.h
9469 @@ -7,6 +7,7 @@
9470 @@ -21662,8 +22987,8 @@ index 09b1b0a..8f56367 100644
9471
9472 /*
9473 * The exception table consists of pairs of addresses relative to the
9474 -@@ -135,11 +169,13 @@ extern int __get_user_8(void);
9475 - extern int __get_user_bad(void);
9476 +@@ -138,11 +172,13 @@ extern int __get_user_bad(void);
9477 + #define __uaccess_end() clac()
9478
9479 /*
9480 - * This is a type: either unsigned long, if the argument fits into
9481 @@ -21679,7 +23004,7 @@ index 09b1b0a..8f56367 100644
9482
9483 /**
9484 * get_user: - Get a simple variable from user space.
9485 -@@ -178,10 +214,12 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
9486 +@@ -181,10 +217,12 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
9487 register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
9488 __chk_user_ptr(ptr); \
9489 might_fault(); \
9490 @@ -21692,7 +23017,7 @@ index 09b1b0a..8f56367 100644
9491 __builtin_expect(__ret_gu, 0); \
9492 })
9493
9494 -@@ -189,13 +227,21 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
9495 +@@ -192,13 +230,21 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
9496 asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
9497 : "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
9498
9499 @@ -21709,26 +23034,26 @@ index 09b1b0a..8f56367 100644
9500
9501 #ifdef CONFIG_X86_32
9502 #define __put_user_asm_u64(x, addr, err, errret) \
9503 - asm volatile(ASM_STAC "\n" \
9504 + asm volatile("\n" \
9505 - "1: movl %%eax,0(%2)\n" \
9506 - "2: movl %%edx,4(%2)\n" \
9507 + "1: "__copyuser_seg"movl %%eax,0(%2)\n" \
9508 + "2: "__copyuser_seg"movl %%edx,4(%2)\n" \
9509 - "3: " ASM_CLAC "\n" \
9510 + "3:" \
9511 ".section .fixup,\"ax\"\n" \
9512 "4: movl %3,%0\n" \
9513 -@@ -208,8 +254,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
9514 +@@ -211,8 +257,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
9515
9516 #define __put_user_asm_ex_u64(x, addr) \
9517 - asm volatile(ASM_STAC "\n" \
9518 + asm volatile("\n" \
9519 - "1: movl %%eax,0(%1)\n" \
9520 - "2: movl %%edx,4(%1)\n" \
9521 + "1: "__copyuser_seg"movl %%eax,0(%1)\n" \
9522 + "2: "__copyuser_seg"movl %%edx,4(%1)\n" \
9523 - "3: " ASM_CLAC "\n" \
9524 + "3:" \
9525 _ASM_EXTABLE_EX(1b, 2b) \
9526 _ASM_EXTABLE_EX(2b, 3b) \
9527 -@@ -257,10 +303,11 @@ extern void __put_user_8(void);
9528 +@@ -260,10 +306,11 @@ extern void __put_user_8(void);
9529 #define put_user(x, ptr) \
9530 ({ \
9531 int __ret_pu; \
9532 @@ -21742,7 +23067,7 @@ index 09b1b0a..8f56367 100644
9533 switch (sizeof(*(ptr))) { \
9534 case 1: \
9535 __put_user_x(1, __pu_val, ptr, __ret_pu); \
9536 -@@ -278,6 +325,7 @@ extern void __put_user_8(void);
9537 +@@ -281,6 +328,7 @@ extern void __put_user_8(void);
9538 __put_user_x(X, __pu_val, ptr, __ret_pu); \
9539 break; \
9540 } \
9541 @@ -21750,7 +23075,7 @@ index 09b1b0a..8f56367 100644
9542 __builtin_expect(__ret_pu, 0); \
9543 })
9544
9545 -@@ -341,10 +389,10 @@ do { \
9546 +@@ -348,10 +396,10 @@ do { \
9547 __chk_user_ptr(ptr); \
9548 switch (size) { \
9549 case 1: \
9550 @@ -21763,16 +23088,16 @@ index 09b1b0a..8f56367 100644
9551 break; \
9552 case 4: \
9553 __get_user_asm(x, ptr, retval, "l", "k", "=r", errret); \
9554 -@@ -358,27 +406,31 @@ do { \
9555 +@@ -365,17 +413,21 @@ do { \
9556 } while (0)
9557
9558 #define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
9559 +do { \
9560 + pax_open_userland(); \
9561 - asm volatile(ASM_STAC "\n" \
9562 + asm volatile("\n" \
9563 - "1: mov"itype" %2,%"rtype"1\n" \
9564 + "1: "__copyuser_seg"mov"itype" %2,%"rtype"1\n"\
9565 - "2: " ASM_CLAC "\n" \
9566 + "2:\n" \
9567 ".section .fixup,\"ax\"\n" \
9568 "3: mov %3,%0\n" \
9569 - " xor"itype" %"rtype"1,%"rtype"1\n" \
9570 @@ -21787,8 +23112,9 @@ index 09b1b0a..8f56367 100644
9571 + pax_close_userland(); \
9572 +} while (0)
9573
9574 - #define __get_user_size_ex(x, ptr, size) \
9575 - do { \
9576 + /*
9577 + * This doesn't do __uaccess_begin/end - the exception handling
9578 +@@ -386,10 +438,10 @@ do { \
9579 __chk_user_ptr(ptr); \
9580 switch (size) { \
9581 case 1: \
9582 @@ -21801,7 +23127,7 @@ index 09b1b0a..8f56367 100644
9583 break; \
9584 case 4: \
9585 __get_user_asm_ex(x, ptr, "l", "k", "=r"); \
9586 -@@ -392,7 +444,7 @@ do { \
9587 +@@ -403,7 +455,7 @@ do { \
9588 } while (0)
9589
9590 #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
9591 @@ -21810,13 +23136,10 @@ index 09b1b0a..8f56367 100644
9592 "2:\n" \
9593 _ASM_EXTABLE_EX(1b, 2b) \
9594 : ltype(x) : "m" (__m(addr)))
9595 -@@ -407,15 +459,26 @@ do { \
9596 - #define __get_user_nocheck(x, ptr, size) \
9597 - ({ \
9598 - int __gu_err; \
9599 -- unsigned long __gu_val; \
9600 -+ __inttype(*(ptr)) __gu_val; \
9601 +@@ -424,13 +476,24 @@ do { \
9602 + __uaccess_begin(); \
9603 __get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
9604 + __uaccess_end(); \
9605 - (x) = (__force __typeof__(*(ptr)))__gu_val; \
9606 + (x) = (__typeof__(*(ptr)))__gu_val; \
9607 __builtin_expect(__gu_err, 0); \
9608 @@ -21840,19 +23163,19 @@ index 09b1b0a..8f56367 100644
9609
9610 /*
9611 * Tell gcc we read from memory instead of writing: this is because
9612 -@@ -423,8 +486,10 @@ struct __large_struct { unsigned long buf[100]; };
9613 +@@ -438,8 +501,10 @@ struct __large_struct { unsigned long buf[100]; };
9614 * aliasing issues.
9615 */
9616 #define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
9617 +do { \
9618 + pax_open_userland(); \
9619 - asm volatile(ASM_STAC "\n" \
9620 + asm volatile("\n" \
9621 - "1: mov"itype" %"rtype"1,%2\n" \
9622 + "1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
9623 - "2: " ASM_CLAC "\n" \
9624 + "2:\n" \
9625 ".section .fixup,\"ax\"\n" \
9626 "3: mov %3,%0\n" \
9627 -@@ -432,10 +497,12 @@ struct __large_struct { unsigned long buf[100]; };
9628 +@@ -447,10 +512,12 @@ struct __large_struct { unsigned long buf[100]; };
9629 ".previous\n" \
9630 _ASM_EXTABLE(1b, 3b) \
9631 : "=r"(err) \
9632 @@ -21867,21 +23190,21 @@ index 09b1b0a..8f56367 100644
9633 "2:\n" \
9634 _ASM_EXTABLE_EX(1b, 2b) \
9635 : : ltype(x), "m" (__m(addr)))
9636 -@@ -445,11 +512,13 @@ struct __large_struct { unsigned long buf[100]; };
9637 +@@ -460,11 +527,13 @@ struct __large_struct { unsigned long buf[100]; };
9638 */
9639 #define uaccess_try do { \
9640 current_thread_info()->uaccess_err = 0; \
9641 + pax_open_userland(); \
9642 - stac(); \
9643 + __uaccess_begin(); \
9644 barrier();
9645
9646 #define uaccess_catch(err) \
9647 - clac(); \
9648 + __uaccess_end(); \
9649 + pax_close_userland(); \
9650 (err) |= (current_thread_info()->uaccess_err ? -EFAULT : 0); \
9651 } while (0)
9652
9653 -@@ -475,8 +544,12 @@ struct __large_struct { unsigned long buf[100]; };
9654 +@@ -490,8 +559,12 @@ struct __large_struct { unsigned long buf[100]; };
9655 * On error, the variable @x is set to zero.
9656 */
9657
9658 @@ -21894,7 +23217,7 @@ index 09b1b0a..8f56367 100644
9659
9660 /**
9661 * __put_user: - Write a simple value into user space, with less checking.
9662 -@@ -499,8 +572,12 @@ struct __large_struct { unsigned long buf[100]; };
9663 +@@ -514,8 +587,12 @@ struct __large_struct { unsigned long buf[100]; };
9664 * Returns zero on success, or -EFAULT on error.
9665 */
9666
9667 @@ -21907,7 +23230,7 @@ index 09b1b0a..8f56367 100644
9668
9669 #define __get_user_unaligned __get_user
9670 #define __put_user_unaligned __put_user
9671 -@@ -518,7 +595,7 @@ struct __large_struct { unsigned long buf[100]; };
9672 +@@ -533,7 +610,7 @@ struct __large_struct { unsigned long buf[100]; };
9673 #define get_user_ex(x, ptr) do { \
9674 unsigned long __gue_val; \
9675 __get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \
9676 @@ -21916,7 +23239,7 @@ index 09b1b0a..8f56367 100644
9677 } while (0)
9678
9679 #define put_user_try uaccess_try
9680 -@@ -536,7 +613,7 @@ extern __must_check long strlen_user(const char __user *str);
9681 +@@ -551,7 +628,7 @@ extern __must_check long strlen_user(const char __user *str);
9682 extern __must_check long strnlen_user(const char __user *str, long n);
9683
9684 unsigned long __must_check clear_user(void __user *mem, unsigned long len);
9685 @@ -21925,7 +23248,7 @@ index 09b1b0a..8f56367 100644
9686
9687 extern void __cmpxchg_wrong_size(void)
9688 __compiletime_error("Bad argument size for cmpxchg");
9689 -@@ -544,21 +621,22 @@ extern void __cmpxchg_wrong_size(void)
9690 +@@ -559,22 +636,23 @@ extern void __cmpxchg_wrong_size(void)
9691 #define __user_atomic_cmpxchg_inatomic(uval, ptr, old, new, size) \
9692 ({ \
9693 int __ret = 0; \
9694 @@ -21936,13 +23259,14 @@ index 09b1b0a..8f56367 100644
9695 + __typeof__(*(uval)) __old = (old); \
9696 + __typeof__(*(uval)) __new = (new); \
9697 + pax_open_userland(); \
9698 + __uaccess_begin(); \
9699 switch (size) { \
9700 case 1: \
9701 { \
9702 - asm volatile("\t" ASM_STAC "\n" \
9703 + asm volatile("\n" \
9704 - "1:\t" LOCK_PREFIX "cmpxchgb %4, %2\n" \
9705 + "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgb %4, %2\n"\
9706 - "2:\t" ASM_CLAC "\n" \
9707 + "2:\n" \
9708 "\t.section .fixup, \"ax\"\n" \
9709 "3:\tmov %3, %0\n" \
9710 "\tjmp 2b\n" \
9711 @@ -21953,13 +23277,13 @@ index 09b1b0a..8f56367 100644
9712 : "i" (-EFAULT), "q" (__new), "1" (__old) \
9713 : "memory" \
9714 ); \
9715 -@@ -567,14 +645,14 @@ extern void __cmpxchg_wrong_size(void)
9716 +@@ -583,14 +661,14 @@ extern void __cmpxchg_wrong_size(void)
9717 case 2: \
9718 { \
9719 - asm volatile("\t" ASM_STAC "\n" \
9720 + asm volatile("\n" \
9721 - "1:\t" LOCK_PREFIX "cmpxchgw %4, %2\n" \
9722 + "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgw %4, %2\n"\
9723 - "2:\t" ASM_CLAC "\n" \
9724 + "2:\n" \
9725 "\t.section .fixup, \"ax\"\n" \
9726 "3:\tmov %3, %0\n" \
9727 "\tjmp 2b\n" \
9728 @@ -21970,13 +23294,13 @@ index 09b1b0a..8f56367 100644
9729 : "i" (-EFAULT), "r" (__new), "1" (__old) \
9730 : "memory" \
9731 ); \
9732 -@@ -583,14 +661,14 @@ extern void __cmpxchg_wrong_size(void)
9733 +@@ -599,14 +677,14 @@ extern void __cmpxchg_wrong_size(void)
9734 case 4: \
9735 { \
9736 - asm volatile("\t" ASM_STAC "\n" \
9737 + asm volatile("\n" \
9738 - "1:\t" LOCK_PREFIX "cmpxchgl %4, %2\n" \
9739 + "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgl %4, %2\n"\
9740 - "2:\t" ASM_CLAC "\n" \
9741 + "2:\n" \
9742 "\t.section .fixup, \"ax\"\n" \
9743 "3:\tmov %3, %0\n" \
9744 "\tjmp 2b\n" \
9745 @@ -21987,13 +23311,13 @@ index 09b1b0a..8f56367 100644
9746 : "i" (-EFAULT), "r" (__new), "1" (__old) \
9747 : "memory" \
9748 ); \
9749 -@@ -602,14 +680,14 @@ extern void __cmpxchg_wrong_size(void)
9750 +@@ -618,14 +696,14 @@ extern void __cmpxchg_wrong_size(void)
9751 __cmpxchg_wrong_size(); \
9752 \
9753 - asm volatile("\t" ASM_STAC "\n" \
9754 + asm volatile("\n" \
9755 - "1:\t" LOCK_PREFIX "cmpxchgq %4, %2\n" \
9756 + "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgq %4, %2\n"\
9757 - "2:\t" ASM_CLAC "\n" \
9758 + "2:\n" \
9759 "\t.section .fixup, \"ax\"\n" \
9760 "3:\tmov %3, %0\n" \
9761 "\tjmp 2b\n" \
9762 @@ -22004,15 +23328,15 @@ index 09b1b0a..8f56367 100644
9763 : "i" (-EFAULT), "r" (__new), "1" (__old) \
9764 : "memory" \
9765 ); \
9766 -@@ -618,6 +696,7 @@ extern void __cmpxchg_wrong_size(void)
9767 - default: \
9768 +@@ -635,6 +713,7 @@ extern void __cmpxchg_wrong_size(void)
9769 __cmpxchg_wrong_size(); \
9770 } \
9771 + __uaccess_end(); \
9772 + pax_close_userland(); \
9773 *__uval = __old; \
9774 __ret; \
9775 })
9776 -@@ -641,17 +720,6 @@ extern struct movsl_mask {
9777 +@@ -658,17 +737,6 @@ extern struct movsl_mask {
9778
9779 #define ARCH_HAS_NOCACHE_UACCESS 1
9780
9781 @@ -22030,7 +23354,7 @@ index 09b1b0a..8f56367 100644
9782 #ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
9783 # define copy_user_diag __compiletime_error
9784 #else
9785 -@@ -661,7 +729,7 @@ unsigned long __must_check _copy_to_user(void __user *to, const void *from,
9786 +@@ -678,7 +746,7 @@ unsigned long __must_check _copy_to_user(void __user *to, const void *from,
9787 extern void copy_user_diag("copy_from_user() buffer size is too small")
9788 copy_from_user_overflow(void);
9789 extern void copy_user_diag("copy_to_user() buffer size is too small")
9790 @@ -22039,7 +23363,7 @@ index 09b1b0a..8f56367 100644
9791
9792 #undef copy_user_diag
9793
9794 -@@ -674,7 +742,7 @@ __copy_from_user_overflow(void) __asm__("copy_from_user_overflow");
9795 +@@ -691,7 +759,7 @@ __copy_from_user_overflow(void) __asm__("copy_from_user_overflow");
9796
9797 extern void
9798 __compiletime_warning("copy_to_user() buffer size is not provably correct")
9799 @@ -22048,7 +23372,7 @@ index 09b1b0a..8f56367 100644
9800 #define __copy_to_user_overflow(size, count) __copy_to_user_overflow()
9801
9802 #else
9803 -@@ -689,10 +757,16 @@ __copy_from_user_overflow(int size, unsigned long count)
9804 +@@ -706,10 +774,16 @@ __copy_from_user_overflow(int size, unsigned long count)
9805
9806 #endif
9807
9808 @@ -22066,7 +23390,7 @@ index 09b1b0a..8f56367 100644
9809
9810 might_fault();
9811
9812 -@@ -714,12 +788,15 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
9813 +@@ -731,12 +805,15 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
9814 * case, and do only runtime checking for non-constant sizes.
9815 */
9816
9817 @@ -22088,7 +23412,7 @@ index 09b1b0a..8f56367 100644
9818
9819 return n;
9820 }
9821 -@@ -727,17 +804,18 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
9822 +@@ -744,17 +821,18 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
9823 static inline unsigned long __must_check
9824 copy_to_user(void __user *to, const void *from, unsigned long n)
9825 {
9826 @@ -22115,7 +23439,7 @@ index 09b1b0a..8f56367 100644
9827 return n;
9828 }
9829 diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h
9830 -index f5dcb52..da2c15b 100644
9831 +index 3fe0eac..18dfa8b 100644
9832 --- a/arch/x86/include/asm/uaccess_32.h
9833 +++ b/arch/x86/include/asm/uaccess_32.h
9834 @@ -40,9 +40,14 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero
9835 @@ -22134,7 +23458,7 @@ index f5dcb52..da2c15b 100644
9836 if (__builtin_constant_p(n)) {
9837 unsigned long ret;
9838
9839 -@@ -87,12 +92,16 @@ static __always_inline unsigned long __must_check
9840 +@@ -95,12 +100,16 @@ static __always_inline unsigned long __must_check
9841 __copy_to_user(void __user *to, const void *from, unsigned long n)
9842 {
9843 might_fault();
9844 @@ -22152,7 +23476,7 @@ index f5dcb52..da2c15b 100644
9845 /* Avoid zeroing the tail if the copy fails..
9846 * If 'n' is constant and 1, 2, or 4, we do still zero on a failure,
9847 * but as the zeroing behaviour is only significant when n is not
9848 -@@ -143,6 +152,12 @@ static __always_inline unsigned long
9849 +@@ -157,6 +166,12 @@ static __always_inline unsigned long
9850 __copy_from_user(void *to, const void __user *from, unsigned long n)
9851 {
9852 might_fault();
9853 @@ -22165,7 +23489,7 @@ index f5dcb52..da2c15b 100644
9854 if (__builtin_constant_p(n)) {
9855 unsigned long ret;
9856
9857 -@@ -165,6 +180,10 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
9858 +@@ -185,6 +200,10 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
9859 const void __user *from, unsigned long n)
9860 {
9861 might_fault();
9862 @@ -22176,7 +23500,7 @@ index f5dcb52..da2c15b 100644
9863 if (__builtin_constant_p(n)) {
9864 unsigned long ret;
9865
9866 -@@ -187,7 +206,10 @@ static __always_inline unsigned long
9867 +@@ -213,7 +232,10 @@ static __always_inline unsigned long
9868 __copy_from_user_inatomic_nocache(void *to, const void __user *from,
9869 unsigned long n)
9870 {
9871 @@ -22189,7 +23513,7 @@ index f5dcb52..da2c15b 100644
9872
9873 #endif /* _ASM_X86_UACCESS_32_H */
9874 diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
9875 -index f2f9b39..2ae1bf8 100644
9876 +index b89c34c..93a6bce 100644
9877 --- a/arch/x86/include/asm/uaccess_64.h
9878 +++ b/arch/x86/include/asm/uaccess_64.h
9879 @@ -10,6 +10,9 @@
9880 @@ -22213,7 +23537,7 @@ index f2f9b39..2ae1bf8 100644
9881 {
9882 unsigned ret;
9883
9884 -@@ -46,121 +49,170 @@ copy_user_generic(void *to, const void *from, unsigned len)
9885 +@@ -46,152 +49,201 @@ copy_user_generic(void *to, const void *from, unsigned len)
9886 }
9887
9888 __must_check unsigned long
9889 @@ -22250,43 +23574,57 @@ index f2f9b39..2ae1bf8 100644
9890 - return copy_user_generic(dst, (__force void *)src, size);
9891 + return copy_user_generic(dst, (__force_kernel const void *)____m(src), size);
9892 switch (size) {
9893 -- case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src,
9894 -+ case 1:__get_user_asm(*(u8 *)dst, (const u8 __user *)src,
9895 + case 1:
9896 + __uaccess_begin();
9897 +- __get_user_asm(*(u8 *)dst, (u8 __user *)src,
9898 ++ __get_user_asm(*(u8 *)dst, (const u8 __user *)src,
9899 ret, "b", "b", "=q", 1);
9900 + __uaccess_end();
9901 return ret;
9902 -- case 2:__get_user_asm(*(u16 *)dst, (u16 __user *)src,
9903 -+ case 2:__get_user_asm(*(u16 *)dst, (const u16 __user *)src,
9904 + case 2:
9905 + __uaccess_begin();
9906 +- __get_user_asm(*(u16 *)dst, (u16 __user *)src,
9907 ++ __get_user_asm(*(u16 *)dst, (const u16 __user *)src,
9908 ret, "w", "w", "=r", 2);
9909 + __uaccess_end();
9910 return ret;
9911 -- case 4:__get_user_asm(*(u32 *)dst, (u32 __user *)src,
9912 -+ case 4:__get_user_asm(*(u32 *)dst, (const u32 __user *)src,
9913 + case 4:
9914 + __uaccess_begin();
9915 +- __get_user_asm(*(u32 *)dst, (u32 __user *)src,
9916 ++ __get_user_asm(*(u32 *)dst, (const u32 __user *)src,
9917 ret, "l", "k", "=r", 4);
9918 + __uaccess_end();
9919 return ret;
9920 -- case 8:__get_user_asm(*(u64 *)dst, (u64 __user *)src,
9921 -+ case 8:__get_user_asm(*(u64 *)dst, (const u64 __user *)src,
9922 + case 8:
9923 + __uaccess_begin();
9924 +- __get_user_asm(*(u64 *)dst, (u64 __user *)src,
9925 ++ __get_user_asm(*(u64 *)dst, (const u64 __user *)src,
9926 ret, "q", "", "=r", 8);
9927 + __uaccess_end();
9928 return ret;
9929 case 10:
9930 + __uaccess_begin();
9931 - __get_user_asm(*(u64 *)dst, (u64 __user *)src,
9932 + __get_user_asm(*(u64 *)dst, (const u64 __user *)src,
9933 ret, "q", "", "=r", 10);
9934 - if (unlikely(ret))
9935 - return ret;
9936 - __get_user_asm(*(u16 *)(8 + (char *)dst),
9937 -- (u16 __user *)(8 + (char __user *)src),
9938 -+ (const u16 __user *)(8 + (const char __user *)src),
9939 - ret, "w", "w", "=r", 2);
9940 + if (likely(!ret))
9941 + __get_user_asm(*(u16 *)(8 + (char *)dst),
9942 +- (u16 __user *)(8 + (char __user *)src),
9943 ++ (const u16 __user *)(8 + (const char __user *)src),
9944 + ret, "w", "w", "=r", 2);
9945 + __uaccess_end();
9946 return ret;
9947 case 16:
9948 + __uaccess_begin();
9949 - __get_user_asm(*(u64 *)dst, (u64 __user *)src,
9950 + __get_user_asm(*(u64 *)dst, (const u64 __user *)src,
9951 ret, "q", "", "=r", 16);
9952 - if (unlikely(ret))
9953 - return ret;
9954 - __get_user_asm(*(u64 *)(8 + (char *)dst),
9955 -- (u64 __user *)(8 + (char __user *)src),
9956 -+ (const u64 __user *)(8 + (const char __user *)src),
9957 - ret, "q", "", "=r", 8);
9958 + if (likely(!ret))
9959 + __get_user_asm(*(u64 *)(8 + (char *)dst),
9960 +- (u64 __user *)(8 + (char __user *)src),
9961 ++ (const u64 __user *)(8 + (const char __user *)src),
9962 + ret, "q", "", "=r", 8);
9963 + __uaccess_end();
9964 return ret;
9965 default:
9966 - return copy_user_generic(dst, (__force void *)src, size);
9967 @@ -22332,43 +23670,59 @@ index f2f9b39..2ae1bf8 100644
9968 - return copy_user_generic((__force void *)dst, src, size);
9969 + return copy_user_generic((__force_kernel void *)____m(dst), src, size);
9970 switch (size) {
9971 -- case 1:__put_user_asm(*(u8 *)src, (u8 __user *)dst,
9972 -+ case 1:__put_user_asm(*(const u8 *)src, (u8 __user *)dst,
9973 + case 1:
9974 + __uaccess_begin();
9975 +- __put_user_asm(*(u8 *)src, (u8 __user *)dst,
9976 ++ __put_user_asm(*(const u8 *)src, (u8 __user *)dst,
9977 ret, "b", "b", "iq", 1);
9978 + __uaccess_end();
9979 return ret;
9980 -- case 2:__put_user_asm(*(u16 *)src, (u16 __user *)dst,
9981 -+ case 2:__put_user_asm(*(const u16 *)src, (u16 __user *)dst,
9982 + case 2:
9983 + __uaccess_begin();
9984 +- __put_user_asm(*(u16 *)src, (u16 __user *)dst,
9985 ++ __put_user_asm(*(const u16 *)src, (u16 __user *)dst,
9986 ret, "w", "w", "ir", 2);
9987 + __uaccess_end();
9988 return ret;
9989 -- case 4:__put_user_asm(*(u32 *)src, (u32 __user *)dst,
9990 -+ case 4:__put_user_asm(*(const u32 *)src, (u32 __user *)dst,
9991 + case 4:
9992 + __uaccess_begin();
9993 +- __put_user_asm(*(u32 *)src, (u32 __user *)dst,
9994 ++ __put_user_asm(*(const u32 *)src, (u32 __user *)dst,
9995 ret, "l", "k", "ir", 4);
9996 + __uaccess_end();
9997 return ret;
9998 -- case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst,
9999 -+ case 8:__put_user_asm(*(const u64 *)src, (u64 __user *)dst,
10000 + case 8:
10001 + __uaccess_begin();
10002 +- __put_user_asm(*(u64 *)src, (u64 __user *)dst,
10003 ++ __put_user_asm(*(const u64 *)src, (u64 __user *)dst,
10004 ret, "q", "", "er", 8);
10005 + __uaccess_end();
10006 return ret;
10007 case 10:
10008 + __uaccess_begin();
10009 - __put_user_asm(*(u64 *)src, (u64 __user *)dst,
10010 + __put_user_asm(*(const u64 *)src, (u64 __user *)dst,
10011 ret, "q", "", "er", 10);
10012 - if (unlikely(ret))
10013 - return ret;
10014 - asm("":::"memory");
10015 -- __put_user_asm(4[(u16 *)src], 4 + (u16 __user *)dst,
10016 -+ __put_user_asm(4[(const u16 *)src], 4 + (u16 __user *)dst,
10017 - ret, "w", "w", "ir", 2);
10018 + if (likely(!ret)) {
10019 + asm("":::"memory");
10020 +- __put_user_asm(4[(u16 *)src], 4 + (u16 __user *)dst,
10021 ++ __put_user_asm(4[(const u16 *)src], 4 + (u16 __user *)dst,
10022 + ret, "w", "w", "ir", 2);
10023 + }
10024 + __uaccess_end();
10025 return ret;
10026 case 16:
10027 + __uaccess_begin();
10028 - __put_user_asm(*(u64 *)src, (u64 __user *)dst,
10029 + __put_user_asm(*(const u64 *)src, (u64 __user *)dst,
10030 ret, "q", "", "er", 16);
10031 - if (unlikely(ret))
10032 - return ret;
10033 - asm("":::"memory");
10034 -- __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst,
10035 -+ __put_user_asm(1[(const u64 *)src], 1 + (u64 __user *)dst,
10036 - ret, "q", "", "er", 8);
10037 + if (likely(!ret)) {
10038 + asm("":::"memory");
10039 +- __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst,
10040 ++ __put_user_asm(1[(const u64 *)src], 1 + (u64 __user *)dst,
10041 + ret, "q", "", "er", 8);
10042 + }
10043 + __uaccess_end();
10044 return ret;
10045 default:
10046 - return copy_user_generic((__force void *)dst, src, size);
10047 @@ -22411,39 +23765,40 @@ index f2f9b39..2ae1bf8 100644
10048 switch (size) {
10049 case 1: {
10050 u8 tmp;
10051 + __uaccess_begin();
10052 - __get_user_asm(tmp, (u8 __user *)src,
10053 + __get_user_asm(tmp, (const u8 __user *)src,
10054 ret, "b", "b", "=q", 1);
10055 if (likely(!ret))
10056 __put_user_asm(tmp, (u8 __user *)dst,
10057 -@@ -169,7 +221,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10058 - }
10059 +@@ -202,7 +254,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10060 case 2: {
10061 u16 tmp;
10062 + __uaccess_begin();
10063 - __get_user_asm(tmp, (u16 __user *)src,
10064 + __get_user_asm(tmp, (const u16 __user *)src,
10065 ret, "w", "w", "=r", 2);
10066 if (likely(!ret))
10067 __put_user_asm(tmp, (u16 __user *)dst,
10068 -@@ -179,7 +231,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10069 -
10070 +@@ -214,7 +266,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10071 case 4: {
10072 u32 tmp;
10073 + __uaccess_begin();
10074 - __get_user_asm(tmp, (u32 __user *)src,
10075 + __get_user_asm(tmp, (const u32 __user *)src,
10076 ret, "l", "k", "=r", 4);
10077 if (likely(!ret))
10078 __put_user_asm(tmp, (u32 __user *)dst,
10079 -@@ -188,7 +240,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10080 - }
10081 +@@ -225,7 +277,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10082 case 8: {
10083 u64 tmp;
10084 + __uaccess_begin();
10085 - __get_user_asm(tmp, (u64 __user *)src,
10086 + __get_user_asm(tmp, (const u64 __user *)src,
10087 ret, "q", "", "=r", 8);
10088 if (likely(!ret))
10089 __put_user_asm(tmp, (u64 __user *)dst,
10090 -@@ -196,41 +248,58 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10091 +@@ -234,41 +286,58 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
10092 return ret;
10093 }
10094 default:
10095 @@ -22529,10 +23884,10 @@ index 5b238981..77fdd78 100644
10096
10097 #define WORD_AT_A_TIME_CONSTANTS { REPEAT_BYTE(0x01), REPEAT_BYTE(0x80) }
10098 diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
10099 -index cd0fc0c..64e7559 100644
10100 +index 1ae89a2..a279bf4 100644
10101 --- a/arch/x86/include/asm/x86_init.h
10102 +++ b/arch/x86/include/asm/x86_init.h
10103 -@@ -128,7 +128,7 @@ struct x86_init_ops {
10104 +@@ -126,7 +126,7 @@ struct x86_init_ops {
10105 struct x86_init_timers timers;
10106 struct x86_init_iommu iommu;
10107 struct x86_init_pci pci;
10108 @@ -22541,7 +23896,7 @@ index cd0fc0c..64e7559 100644
10109
10110 /**
10111 * struct x86_cpuinit_ops - platform specific cpu hotplug setups
10112 -@@ -139,7 +139,7 @@ struct x86_cpuinit_ops {
10113 +@@ -137,7 +137,7 @@ struct x86_cpuinit_ops {
10114 void (*setup_percpu_clockev)(void);
10115 void (*early_percpu_clock_init)(void);
10116 void (*fixup_cpu_id)(struct cpuinfo_x86 *c, int node);
10117 @@ -22550,7 +23905,7 @@ index cd0fc0c..64e7559 100644
10118
10119 struct timespec;
10120
10121 -@@ -167,7 +167,7 @@ struct x86_platform_ops {
10122 +@@ -165,7 +165,7 @@ struct x86_platform_ops {
10123 void (*save_sched_clock_state)(void);
10124 void (*restore_sched_clock_state)(void);
10125 void (*apic_post_init)(void);
10126 @@ -22559,7 +23914,7 @@ index cd0fc0c..64e7559 100644
10127
10128 struct pci_dev;
10129
10130 -@@ -176,12 +176,12 @@ struct x86_msi_ops {
10131 +@@ -174,12 +174,12 @@ struct x86_msi_ops {
10132 void (*teardown_msi_irq)(unsigned int irq);
10133 void (*teardown_msi_irqs)(struct pci_dev *dev);
10134 void (*restore_msi_irqs)(struct pci_dev *dev);
10135 @@ -22931,10 +24286,10 @@ index 25f9093..f630040 100644
10136 bp_int3_handler = handler;
10137 bp_int3_addr = (u8 *)addr + sizeof(int3);
10138 diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
10139 -index 2f69e3b..f301e5f 100644
10140 +index 8a5cdda..ef3aabc 100644
10141 --- a/arch/x86/kernel/apic/apic.c
10142 +++ b/arch/x86/kernel/apic/apic.c
10143 -@@ -171,7 +171,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR;
10144 +@@ -177,7 +177,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR;
10145 /*
10146 * Debug level, exported for io_apic.c
10147 */
10148 @@ -22943,7 +24298,7 @@ index 2f69e3b..f301e5f 100644
10149
10150 int pic_mode;
10151
10152 -@@ -1868,7 +1868,7 @@ static void __smp_error_interrupt(struct pt_regs *regs)
10153 +@@ -1878,7 +1878,7 @@ static void __smp_error_interrupt(struct pt_regs *regs)
10154 apic_write(APIC_ESR, 0);
10155 v = apic_read(APIC_ESR);
10156 ack_APIC_irq();
10157 @@ -22953,7 +24308,7 @@ index 2f69e3b..f301e5f 100644
10158 apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x",
10159 smp_processor_id(), v);
10160 diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
10161 -index f92ab36..1884323 100644
10162 +index 9968f30..b06feae 100644
10163 --- a/arch/x86/kernel/apic/apic_flat_64.c
10164 +++ b/arch/x86/kernel/apic/apic_flat_64.c
10165 @@ -25,7 +25,7 @@
10166 @@ -22974,7 +24329,7 @@ index f92ab36..1884323 100644
10167 .name = "flat",
10168 .probe = flat_probe,
10169 .acpi_madt_oem_check = flat_acpi_madt_oem_check,
10170 -@@ -259,7 +259,7 @@ static int physflat_probe(void)
10171 +@@ -249,7 +249,7 @@ static int physflat_probe(void)
10172 return 0;
10173 }
10174
10175 @@ -22984,10 +24339,10 @@ index f92ab36..1884323 100644
10176 .name = "physical flat",
10177 .probe = physflat_probe,
10178 diff --git a/arch/x86/kernel/apic/apic_noop.c b/arch/x86/kernel/apic/apic_noop.c
10179 -index 0d96749..ce6b722 100644
10180 +index 331a7a0..2173347 100644
10181 --- a/arch/x86/kernel/apic/apic_noop.c
10182 +++ b/arch/x86/kernel/apic/apic_noop.c
10183 -@@ -108,7 +108,7 @@ static void noop_apic_write(u32 reg, u32 v)
10184 +@@ -109,7 +109,7 @@ static void noop_apic_write(u32 reg, u32 v)
10185 WARN_ON_ONCE(cpu_has_apic && !disable_apic);
10186 }
10187
10188 @@ -22997,10 +24352,10 @@ index 0d96749..ce6b722 100644
10189 .probe = noop_probe,
10190 .acpi_madt_oem_check = NULL,
10191 diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c
10192 -index 971cf88..a8e01ae 100644
10193 +index cf9bd89..75fcb85 100644
10194 --- a/arch/x86/kernel/apic/bigsmp_32.c
10195 +++ b/arch/x86/kernel/apic/bigsmp_32.c
10196 -@@ -147,7 +147,7 @@ static int probe_bigsmp(void)
10197 +@@ -142,7 +142,7 @@ static int probe_bigsmp(void)
10198 return dmi_bigsmp;
10199 }
10200
10201 @@ -23010,7 +24365,7 @@ index 971cf88..a8e01ae 100644
10202 .name = "bigsmp",
10203 .probe = probe_bigsmp,
10204 diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
10205 -index fdb0fbf..1426add 100644
10206 +index fdb0fbf..352c2f0 100644
10207 --- a/arch/x86/kernel/apic/io_apic.c
10208 +++ b/arch/x86/kernel/apic/io_apic.c
10209 @@ -1682,7 +1682,7 @@ static unsigned int startup_ioapic_irq(struct irq_data *data)
10210 @@ -23040,6 +24395,15 @@ index fdb0fbf..1426add 100644
10211 .name = "IO-APIC",
10212 .irq_startup = startup_ioapic_irq,
10213 .irq_mask = mask_ioapic_irq,
10214 +@@ -1878,7 +1878,7 @@ static struct irq_chip ioapic_chip __read_mostly = {
10215 + .flags = IRQCHIP_SKIP_SET_WAKE,
10216 + };
10217 +
10218 +-static struct irq_chip ioapic_ir_chip __read_mostly = {
10219 ++static struct irq_chip ioapic_ir_chip = {
10220 + .name = "IR-IO-APIC",
10221 + .irq_startup = startup_ioapic_irq,
10222 + .irq_mask = mask_ioapic_irq,
10223 @@ -1936,7 +1936,7 @@ static void ack_lapic_irq(struct irq_data *data)
10224 ack_APIC_irq();
10225 }
10226 @@ -23050,10 +24414,10 @@ index fdb0fbf..1426add 100644
10227 .irq_mask = mask_lapic_irq,
10228 .irq_unmask = unmask_lapic_irq,
10229 diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
10230 -index 5f1feb6..199d454 100644
10231 +index ade2532..5fc7f4f9 100644
10232 --- a/arch/x86/kernel/apic/msi.c
10233 +++ b/arch/x86/kernel/apic/msi.c
10234 -@@ -267,7 +267,7 @@ static void hpet_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
10235 +@@ -269,7 +269,7 @@ static void hpet_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
10236 hpet_msi_write(irq_data_get_irq_handler_data(data), msg);
10237 }
10238
10239 @@ -23063,7 +24427,7 @@ index 5f1feb6..199d454 100644
10240 .irq_unmask = hpet_msi_unmask,
10241 .irq_mask = hpet_msi_mask,
10242 diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c
10243 -index 7694ae6..5abb08e 100644
10244 +index f316e34..48c21c5 100644
10245 --- a/arch/x86/kernel/apic/probe_32.c
10246 +++ b/arch/x86/kernel/apic/probe_32.c
10247 @@ -72,7 +72,7 @@ static int probe_default(void)
10248 @@ -23075,7 +24439,7 @@ index 7694ae6..5abb08e 100644
10249
10250 .name = "default",
10251 .probe = probe_default,
10252 -@@ -126,7 +126,7 @@ static struct apic apic_default = {
10253 +@@ -127,7 +127,7 @@ static struct apic apic_default = {
10254
10255 apic_driver(apic_default);
10256
10257 @@ -23085,10 +24449,10 @@ index 7694ae6..5abb08e 100644
10258
10259 static int cmdline_apic __initdata;
10260 diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
10261 -index 7af2505..d1ea63f 100644
10262 +index ad59d70..c3570b7 100644
10263 --- a/arch/x86/kernel/apic/vector.c
10264 +++ b/arch/x86/kernel/apic/vector.c
10265 -@@ -36,6 +36,7 @@ static struct irq_chip lapic_controller;
10266 +@@ -37,6 +37,7 @@ static struct irq_chip lapic_controller;
10267 static struct apic_chip_data *legacy_irq_data[NR_IRQS_LEGACY];
10268 #endif
10269
10270 @@ -23096,7 +24460,7 @@ index 7af2505..d1ea63f 100644
10271 void lock_vector_lock(void)
10272 {
10273 /* Used to the online set of cpus does not change
10274 -@@ -44,6 +45,7 @@ void lock_vector_lock(void)
10275 +@@ -45,6 +46,7 @@ void lock_vector_lock(void)
10276 raw_spin_lock(&vector_lock);
10277 }
10278
10279 @@ -23105,10 +24469,10 @@ index 7af2505..d1ea63f 100644
10280 {
10281 raw_spin_unlock(&vector_lock);
10282 diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
10283 -index cc8311c..d72f027 100644
10284 +index aca8b75..4c1a7f5 100644
10285 --- a/arch/x86/kernel/apic/x2apic_cluster.c
10286 +++ b/arch/x86/kernel/apic/x2apic_cluster.c
10287 -@@ -234,7 +234,7 @@ static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask,
10288 +@@ -242,7 +242,7 @@ static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask,
10289 cpumask_and(retmask, mask, per_cpu(cpus_in_cluster, cpu));
10290 }
10291
10292 @@ -23118,10 +24482,10 @@ index cc8311c..d72f027 100644
10293 .name = "cluster x2apic",
10294 .probe = x2apic_cluster_probe,
10295 diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
10296 -index 662e915..e721634 100644
10297 +index a1242e2..0e7f712 100644
10298 --- a/arch/x86/kernel/apic/x2apic_phys.c
10299 +++ b/arch/x86/kernel/apic/x2apic_phys.c
10300 -@@ -90,7 +90,7 @@ static int x2apic_phys_probe(void)
10301 +@@ -98,7 +98,7 @@ static int x2apic_phys_probe(void)
10302 return apic == &apic_x2apic_phys;
10303 }
10304
10305 @@ -23131,7 +24495,7 @@ index 662e915..e721634 100644
10306 .name = "physical x2apic",
10307 .probe = x2apic_phys_probe,
10308 diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
10309 -index 4a13946..067ed8c 100644
10310 +index 624db005..86c508a 100644
10311 --- a/arch/x86/kernel/apic/x2apic_uv_x.c
10312 +++ b/arch/x86/kernel/apic/x2apic_uv_x.c
10313 @@ -374,7 +374,7 @@ static int uv_probe(void)
10314 @@ -23228,7 +24592,7 @@ index 052c9c3..bc22ccdba 100644
10315 proc_create("apm", 0, NULL, &apm_file_ops);
10316
10317 diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
10318 -index 439df97..884bc37 100644
10319 +index 84a7524..e8edc49 100644
10320 --- a/arch/x86/kernel/asm-offsets.c
10321 +++ b/arch/x86/kernel/asm-offsets.c
10322 @@ -32,6 +32,8 @@ void common(void) {
10323 @@ -23240,8 +24604,8 @@ index 439df97..884bc37 100644
10324
10325 BLANK();
10326 OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx);
10327 -@@ -70,8 +72,26 @@ void common(void) {
10328 - #endif
10329 +@@ -67,8 +69,26 @@ void common(void) {
10330 + OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
10331 OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
10332 OFFSET(PV_MMU_read_cr2, pv_mmu_ops, read_cr2);
10333 +
10334 @@ -23268,10 +24632,10 @@ index 439df97..884bc37 100644
10335 BLANK();
10336 OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
10337 diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
10338 -index d8f42f9..a46f1fc 100644
10339 +index f2edafb..460f4e6 100644
10340 --- a/arch/x86/kernel/asm-offsets_64.c
10341 +++ b/arch/x86/kernel/asm-offsets_64.c
10342 -@@ -59,6 +59,7 @@ int main(void)
10343 +@@ -58,6 +58,7 @@ int main(void)
10344 BLANK();
10345 #undef ENTRY
10346
10347 @@ -23295,10 +24659,10 @@ index 5803130..c899b3d 100644
10348 obj-y += common.o
10349 obj-y += rdrand.o
10350 diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
10351 -index a8816b3..a9c0bf8 100644
10352 +index a07956a..368a2eb 100644
10353 --- a/arch/x86/kernel/cpu/amd.c
10354 +++ b/arch/x86/kernel/cpu/amd.c
10355 -@@ -767,7 +767,7 @@ static void init_amd(struct cpuinfo_x86 *c)
10356 +@@ -766,7 +766,7 @@ static void init_amd(struct cpuinfo_x86 *c)
10357 static unsigned int amd_size_cache(struct cpuinfo_x86 *c, unsigned int size)
10358 {
10359 /* AMD errata T13 (order #21922) */
10360 @@ -23328,7 +24692,7 @@ index 04f0fe5..3c0598c 100644
10361
10362 /*
10363 diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
10364 -index c2b7522..a9a9453 100644
10365 +index 37830de..54677f5 100644
10366 --- a/arch/x86/kernel/cpu/common.c
10367 +++ b/arch/x86/kernel/cpu/common.c
10368 @@ -92,60 +92,6 @@ static const struct cpu_dev default_cpu = {
10369 @@ -23511,7 +24875,7 @@ index c2b7522..a9a9453 100644
10370 gdt_descr.size = GDT_SIZE - 1;
10371 load_gdt(&gdt_descr);
10372 /* Reload the per-cpu base */
10373 -@@ -919,6 +968,20 @@ static void identify_cpu(struct cpuinfo_x86 *c)
10374 +@@ -916,6 +965,20 @@ static void identify_cpu(struct cpuinfo_x86 *c)
10375 setup_smep(c);
10376 setup_smap(c);
10377
10378 @@ -23532,7 +24896,7 @@ index c2b7522..a9a9453 100644
10379 /*
10380 * The vendor-specific functions might have changed features.
10381 * Now we do "generic changes."
10382 -@@ -993,7 +1056,7 @@ void enable_sep_cpu(void)
10383 +@@ -990,7 +1053,7 @@ void enable_sep_cpu(void)
10384 int cpu;
10385
10386 cpu = get_cpu();
10387 @@ -23541,7 +24905,7 @@ index c2b7522..a9a9453 100644
10388
10389 if (!boot_cpu_has(X86_FEATURE_SEP))
10390 goto out;
10391 -@@ -1139,10 +1202,12 @@ static __init int setup_disablecpuid(char *arg)
10392 +@@ -1136,10 +1199,12 @@ static __init int setup_disablecpuid(char *arg)
10393 }
10394 __setup("clearcpuid=", setup_disablecpuid);
10395
10396 @@ -23557,7 +24921,7 @@ index c2b7522..a9a9453 100644
10397
10398 DEFINE_PER_CPU_FIRST(union irq_stack_union,
10399 irq_stack_union) __aligned(PAGE_SIZE) __visible;
10400 -@@ -1254,21 +1319,21 @@ EXPORT_PER_CPU_SYMBOL(current_task);
10401 +@@ -1251,21 +1316,21 @@ EXPORT_PER_CPU_SYMBOL(current_task);
10402 DEFINE_PER_CPU(int, __preempt_count) = INIT_PREEMPT_COUNT;
10403 EXPORT_PER_CPU_SYMBOL(__preempt_count);
10404
10405 @@ -23586,7 +24950,7 @@ index c2b7522..a9a9453 100644
10406 /*
10407 * Clear all 6 debug registers:
10408 */
10409 -@@ -1344,7 +1409,7 @@ void cpu_init(void)
10410 +@@ -1341,7 +1406,7 @@ void cpu_init(void)
10411 */
10412 load_ucode_ap();
10413
10414 @@ -23595,7 +24959,7 @@ index c2b7522..a9a9453 100644
10415 oist = &per_cpu(orig_ist, cpu);
10416
10417 #ifdef CONFIG_NUMA
10418 -@@ -1376,7 +1441,6 @@ void cpu_init(void)
10419 +@@ -1373,7 +1438,6 @@ void cpu_init(void)
10420 wrmsrl(MSR_KERNEL_GS_BASE, 0);
10421 barrier();
10422
10423 @@ -23603,7 +24967,7 @@ index c2b7522..a9a9453 100644
10424 x2apic_setup();
10425
10426 /*
10427 -@@ -1428,7 +1492,7 @@ void cpu_init(void)
10428 +@@ -1425,7 +1489,7 @@ void cpu_init(void)
10429 {
10430 int cpu = smp_processor_id();
10431 struct task_struct *curr = current;
10432 @@ -23613,7 +24977,7 @@ index c2b7522..a9a9453 100644
10433
10434 wait_for_master_cpu(cpu);
10435 diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
10436 -index e38d338..48498df 100644
10437 +index 0b6c523..54d8406 100644
10438 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c
10439 +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
10440 @@ -519,25 +519,23 @@ cache_private_attrs_is_visible(struct kobject *kobj,
10441 @@ -23665,7 +25029,7 @@ index e38d338..48498df 100644
10442
10443 return &cache_private_group;
10444 diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
10445 -index 7e8a736..c00fc59 100644
10446 +index a006f4c..9c0afe2 100644
10447 --- a/arch/x86/kernel/cpu/mcheck/mce.c
10448 +++ b/arch/x86/kernel/cpu/mcheck/mce.c
10449 @@ -47,6 +47,7 @@
10450 @@ -23676,7 +25040,7 @@ index 7e8a736..c00fc59 100644
10451
10452 #include "mce-internal.h"
10453
10454 -@@ -212,8 +213,7 @@ static struct notifier_block mce_srao_nb;
10455 +@@ -211,8 +212,7 @@ static struct notifier_block mce_srao_nb;
10456 void mce_register_decode_chain(struct notifier_block *nb)
10457 {
10458 /* Ensure SRAO notifier has the highest priority in the decode chain. */
10459 @@ -23686,7 +25050,7 @@ index 7e8a736..c00fc59 100644
10460
10461 atomic_notifier_chain_register(&x86_mce_decoder_chain, nb);
10462 }
10463 -@@ -237,7 +237,7 @@ static void print_mce(struct mce *m)
10464 +@@ -236,7 +236,7 @@ static void print_mce(struct mce *m)
10465 !(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "",
10466 m->cs, m->ip);
10467
10468 @@ -23695,7 +25059,7 @@ index 7e8a736..c00fc59 100644
10469 print_symbol("{%s}", m->ip);
10470 pr_cont("\n");
10471 }
10472 -@@ -270,10 +270,10 @@ static void print_mce(struct mce *m)
10473 +@@ -269,10 +269,10 @@ static void print_mce(struct mce *m)
10474
10475 #define PANIC_TIMEOUT 5 /* 5 seconds */
10476
10477 @@ -23708,7 +25072,7 @@ index 7e8a736..c00fc59 100644
10478
10479 /* Panic in progress. Enable interrupts and wait for final IPI */
10480 static void wait_for_panic(void)
10481 -@@ -297,7 +297,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
10482 +@@ -296,7 +296,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
10483 /*
10484 * Make sure only one CPU runs in machine check panic
10485 */
10486 @@ -23717,7 +25081,7 @@ index 7e8a736..c00fc59 100644
10487 wait_for_panic();
10488 barrier();
10489
10490 -@@ -305,7 +305,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
10491 +@@ -304,7 +304,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
10492 console_verbose();
10493 } else {
10494 /* Don't log too much for fake panic */
10495 @@ -23726,7 +25090,7 @@ index 7e8a736..c00fc59 100644
10496 return;
10497 }
10498 /* First print corrected ones that are still unlogged */
10499 -@@ -344,7 +344,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
10500 +@@ -343,7 +343,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
10501 if (!fake_panic) {
10502 if (panic_timeout == 0)
10503 panic_timeout = mca_cfg.panic_timeout;
10504 @@ -23735,7 +25099,7 @@ index 7e8a736..c00fc59 100644
10505 } else
10506 pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg);
10507 }
10508 -@@ -697,7 +697,7 @@ static int mce_timed_out(u64 *t, const char *msg)
10509 +@@ -717,7 +717,7 @@ static int mce_timed_out(u64 *t, const char *msg)
10510 * might have been modified by someone else.
10511 */
10512 rmb();
10513 @@ -23744,7 +25108,7 @@ index 7e8a736..c00fc59 100644
10514 wait_for_panic();
10515 if (!mca_cfg.monarch_timeout)
10516 goto out;
10517 -@@ -1669,7 +1669,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
10518 +@@ -1671,7 +1671,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
10519 }
10520
10521 /* Call the installed machine check handler for this CPU setup. */
10522 @@ -23753,7 +25117,7 @@ index 7e8a736..c00fc59 100644
10523 unexpected_machine_check;
10524
10525 /*
10526 -@@ -1698,7 +1698,9 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c)
10527 +@@ -1700,7 +1700,9 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c)
10528 return;
10529 }
10530
10531 @@ -23763,7 +25127,7 @@ index 7e8a736..c00fc59 100644
10532
10533 __mcheck_cpu_init_generic();
10534 __mcheck_cpu_init_vendor(c);
10535 -@@ -1729,7 +1731,7 @@ void mcheck_cpu_clear(struct cpuinfo_x86 *c)
10536 +@@ -1731,7 +1733,7 @@ void mcheck_cpu_clear(struct cpuinfo_x86 *c)
10537 */
10538
10539 static DEFINE_SPINLOCK(mce_chrdev_state_lock);
10540 @@ -23772,7 +25136,7 @@ index 7e8a736..c00fc59 100644
10541 static int mce_chrdev_open_exclu; /* already open exclusive? */
10542
10543 static int mce_chrdev_open(struct inode *inode, struct file *file)
10544 -@@ -1737,7 +1739,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
10545 +@@ -1739,7 +1741,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
10546 spin_lock(&mce_chrdev_state_lock);
10547
10548 if (mce_chrdev_open_exclu ||
10549 @@ -23781,7 +25145,7 @@ index 7e8a736..c00fc59 100644
10550 spin_unlock(&mce_chrdev_state_lock);
10551
10552 return -EBUSY;
10553 -@@ -1745,7 +1747,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
10554 +@@ -1747,7 +1749,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
10555
10556 if (file->f_flags & O_EXCL)
10557 mce_chrdev_open_exclu = 1;
10558 @@ -23790,7 +25154,7 @@ index 7e8a736..c00fc59 100644
10559
10560 spin_unlock(&mce_chrdev_state_lock);
10561
10562 -@@ -1756,7 +1758,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
10563 +@@ -1758,7 +1760,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
10564 {
10565 spin_lock(&mce_chrdev_state_lock);
10566
10567 @@ -23799,7 +25163,7 @@ index 7e8a736..c00fc59 100644
10568 mce_chrdev_open_exclu = 0;
10569
10570 spin_unlock(&mce_chrdev_state_lock);
10571 -@@ -2446,7 +2448,7 @@ static __init void mce_init_banks(void)
10572 +@@ -2448,7 +2450,7 @@ static __init void mce_init_banks(void)
10573
10574 for (i = 0; i < mca_cfg.banks; i++) {
10575 struct mce_bank *b = &mce_banks[i];
10576 @@ -23808,7 +25172,7 @@ index 7e8a736..c00fc59 100644
10577
10578 sysfs_attr_init(&a->attr);
10579 a->attr.name = b->attrname;
10580 -@@ -2553,7 +2555,7 @@ struct dentry *mce_get_debugfs_dir(void)
10581 +@@ -2555,7 +2557,7 @@ struct dentry *mce_get_debugfs_dir(void)
10582 static void mce_reset(void)
10583 {
10584 cpu_missing = 0;
10585 @@ -23862,10 +25226,10 @@ index 01dd870..6fd1c59 100644
10586 wmb();
10587
10588 diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
10589 -index ac8975a..37d9aa6 100644
10590 +index 4f4735b..05b4ca6 100644
10591 --- a/arch/x86/kernel/cpu/microcode/intel.c
10592 +++ b/arch/x86/kernel/cpu/microcode/intel.c
10593 -@@ -1016,13 +1016,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
10594 +@@ -1012,13 +1012,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
10595
10596 static int get_ucode_user(void *to, const void *from, size_t n)
10597 {
10598 @@ -23895,7 +25259,7 @@ index 20e242e..14b1629 100644
10599 .detect = ms_hyperv_platform,
10600 .init_platform = ms_hyperv_init_platform,
10601 diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
10602 -index 3b533cf..b40d426 100644
10603 +index c870af1..173e1cc 100644
10604 --- a/arch/x86/kernel/cpu/mtrr/generic.c
10605 +++ b/arch/x86/kernel/cpu/mtrr/generic.c
10606 @@ -723,7 +723,8 @@ static DEFINE_RAW_SPINLOCK(set_atomicity_lock);
10607 @@ -23919,7 +25283,7 @@ index 3b533cf..b40d426 100644
10608 /* Flush TLBs (no need to flush caches - they are disabled) */
10609 count_vm_tlb_event(NR_TLB_LOCAL_FLUSH_ALL);
10610 diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
10611 -index f891b47..9dff300 100644
10612 +index 5c3d149..a052b18 100644
10613 --- a/arch/x86/kernel/cpu/mtrr/main.c
10614 +++ b/arch/x86/kernel/cpu/mtrr/main.c
10615 @@ -72,7 +72,7 @@ static DEFINE_MUTEX(mtrr_mutex);
10616 @@ -23945,10 +25309,10 @@ index 951884d..4796b75 100644
10617 extern int generic_get_free_region(unsigned long base, unsigned long size,
10618 int replace_reg);
10619 diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
10620 -index a3aeb2c..935e1d7 100644
10621 +index 6532f5b..5de6c88 100644
10622 --- a/arch/x86/kernel/cpu/perf_event.c
10623 +++ b/arch/x86/kernel/cpu/perf_event.c
10624 -@@ -1531,7 +1531,7 @@ static void __init pmu_check_apic(void)
10625 +@@ -1534,7 +1534,7 @@ static void __init pmu_check_apic(void)
10626
10627 }
10628
10629 @@ -23957,7 +25321,7 @@ index a3aeb2c..935e1d7 100644
10630 .name = "format",
10631 .attrs = NULL,
10632 };
10633 -@@ -1630,7 +1630,7 @@ static struct attribute *events_attr[] = {
10634 +@@ -1642,7 +1642,7 @@ static struct attribute *events_attr[] = {
10635 NULL,
10636 };
10637
10638 @@ -23966,7 +25330,7 @@ index a3aeb2c..935e1d7 100644
10639 .name = "events",
10640 .attrs = events_attr,
10641 };
10642 -@@ -2216,7 +2216,7 @@ valid_user_frame(const void __user *fp, unsigned long size)
10643 +@@ -2228,7 +2228,7 @@ valid_user_frame(const void __user *fp, unsigned long size)
10644 static unsigned long get_segment_base(unsigned int segment)
10645 {
10646 struct desc_struct *desc;
10647 @@ -23975,7 +25339,7 @@ index a3aeb2c..935e1d7 100644
10648
10649 if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) {
10650 #ifdef CONFIG_MODIFY_LDT_SYSCALL
10651 -@@ -2238,7 +2238,7 @@ static unsigned long get_segment_base(unsigned int segment)
10652 +@@ -2250,7 +2250,7 @@ static unsigned long get_segment_base(unsigned int segment)
10653 if (idx > GDT_ENTRIES)
10654 return 0;
10655
10656 @@ -23984,20 +25348,20 @@ index a3aeb2c..935e1d7 100644
10657 }
10658
10659 return get_desc_base(desc);
10660 -@@ -2328,7 +2328,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
10661 +@@ -2355,7 +2355,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
10662 break;
10663
10664 perf_callchain_store(entry, frame.return_address);
10665 -- fp = frame.next_frame;
10666 -+ fp = (const void __force_user *)frame.next_frame;
10667 +- fp = (void __user *)frame.next_frame;
10668 ++ fp = (void __force_user *)frame.next_frame;
10669 }
10670 + pagefault_enable();
10671 }
10672 -
10673 diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
10674 -index ee70445..7c6859c 100644
10675 +index 98be6d6..b44c81a 100644
10676 --- a/arch/x86/kernel/cpu/perf_event.h
10677 +++ b/arch/x86/kernel/cpu/perf_event.h
10678 -@@ -792,7 +792,7 @@ static inline void set_linear_ip(struct pt_regs *regs, unsigned long ip)
10679 +@@ -787,7 +787,7 @@ static inline void set_linear_ip(struct pt_regs *regs, unsigned long ip)
10680 regs->cs = kernel_ip(ip) ? __KERNEL_CS : __USER_CS;
10681 if (regs->flags & X86_VM_MASK)
10682 regs->flags ^= (PERF_EFLAGS_VM | X86_VM_MASK);
10683 @@ -24007,9 +25371,25 @@ index ee70445..7c6859c 100644
10684
10685 ssize_t x86_event_sysfs_show(char *page, u64 config, u64 event);
10686 diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
10687 -index 97242a9..cf9c30e 100644
10688 +index 97242a9..ba15e8c 100644
10689 --- a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
10690 +++ b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
10691 +@@ -80,12 +80,12 @@ static struct attribute_group amd_iommu_format_group = {
10692 + * sysfs events attributes
10693 + *---------------------------------------------*/
10694 + struct amd_iommu_event_desc {
10695 +- struct kobj_attribute attr;
10696 ++ struct device_attribute attr;
10697 + const char *event;
10698 + };
10699 +
10700 +-static ssize_t _iommu_event_show(struct kobject *kobj,
10701 +- struct kobj_attribute *attr, char *buf)
10702 ++static ssize_t _iommu_event_show(struct device *dev,
10703 ++ struct device_attribute *attr, char *buf)
10704 + {
10705 + struct amd_iommu_event_desc *event =
10706 + container_of(attr, struct amd_iommu_event_desc, attr);
10707 @@ -402,7 +402,7 @@ static void perf_iommu_del(struct perf_event *event, int flags)
10708 static __init int _init_events_attrs(struct perf_amd_iommu *perf_iommu)
10709 {
10710 @@ -24020,10 +25400,10 @@ index 97242a9..cf9c30e 100644
10711
10712 while (amd_iommu_v2_event_descs[i].attr.attr.name)
10713 diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
10714 -index 078de2e..7ac50e5 100644
10715 +index 760aec1..3c64694 100644
10716 --- a/arch/x86/kernel/cpu/perf_event_intel.c
10717 +++ b/arch/x86/kernel/cpu/perf_event_intel.c
10718 -@@ -2140,6 +2140,8 @@ __intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
10719 +@@ -2185,6 +2185,8 @@ __intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
10720 }
10721
10722 static void
10723 @@ -24032,7 +25412,7 @@ index 078de2e..7ac50e5 100644
10724 intel_start_scheduling(struct cpu_hw_events *cpuc)
10725 {
10726 struct intel_excl_cntrs *excl_cntrs = cpuc->excl_cntrs;
10727 -@@ -2149,14 +2151,18 @@ intel_start_scheduling(struct cpu_hw_events *cpuc)
10728 +@@ -2194,14 +2196,18 @@ intel_start_scheduling(struct cpu_hw_events *cpuc)
10729 /*
10730 * nothing needed if in group validation mode
10731 */
10732 @@ -24053,7 +25433,7 @@ index 078de2e..7ac50e5 100644
10733
10734 xl = &excl_cntrs->states[tid];
10735
10736 -@@ -2196,6 +2202,8 @@ static void intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cnt
10737 +@@ -2241,6 +2247,8 @@ static void intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cnt
10738 }
10739
10740 static void
10741 @@ -24062,7 +25442,7 @@ index 078de2e..7ac50e5 100644
10742 intel_stop_scheduling(struct cpu_hw_events *cpuc)
10743 {
10744 struct intel_excl_cntrs *excl_cntrs = cpuc->excl_cntrs;
10745 -@@ -2205,13 +2213,18 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
10746 +@@ -2250,13 +2258,18 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
10747 /*
10748 * nothing needed if in group validation mode
10749 */
10750 @@ -24083,7 +25463,7 @@ index 078de2e..7ac50e5 100644
10751
10752 xl = &excl_cntrs->states[tid];
10753
10754 -@@ -2394,19 +2407,22 @@ static void intel_put_excl_constraints(struct cpu_hw_events *cpuc,
10755 +@@ -2439,19 +2452,22 @@ static void intel_put_excl_constraints(struct cpu_hw_events *cpuc,
10756 * unused now.
10757 */
10758 if (hwc->idx >= 0) {
10759 @@ -24108,7 +25488,7 @@ index 078de2e..7ac50e5 100644
10760 raw_spin_unlock(&excl_cntrs->lock);
10761 }
10762 }
10763 -@@ -3279,10 +3295,10 @@ __init int intel_pmu_init(void)
10764 +@@ -3360,10 +3376,10 @@ __init int intel_pmu_init(void)
10765 x86_pmu.num_counters_fixed = max((int)edx.split.num_counters_fixed, 3);
10766
10767 if (boot_cpu_has(X86_FEATURE_PDCM)) {
10768 @@ -24169,7 +25549,7 @@ index a316ca9..99344f4 100644
10769 ret = intel_cqm_setup_rmid_cache();
10770 if (ret)
10771 diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
10772 -index 7abb2b8..ea24517 100644
10773 +index 9551401..649b91c 100644
10774 --- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
10775 +++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
10776 @@ -598,7 +598,7 @@ int intel_pmu_drain_bts_buffer(void)
10777 @@ -24181,7 +25561,7 @@ index 7abb2b8..ea24517 100644
10778
10779 x86_pmu.drain_pebs(&regs);
10780 }
10781 -@@ -869,7 +869,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
10782 +@@ -876,7 +876,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
10783 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
10784 unsigned long from = cpuc->lbr_entries[0].from;
10785 unsigned long old_to, to = cpuc->lbr_entries[0].to;
10786 @@ -24190,7 +25570,7 @@ index 7abb2b8..ea24517 100644
10787 int is_64bit = 0;
10788 void *kaddr;
10789 int size;
10790 -@@ -921,6 +921,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
10791 +@@ -928,6 +928,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
10792 } else {
10793 kaddr = (void *)to;
10794 }
10795 @@ -24198,7 +25578,7 @@ index 7abb2b8..ea24517 100644
10796
10797 do {
10798 struct insn insn;
10799 -@@ -1069,7 +1070,7 @@ static void setup_pebs_sample_data(struct perf_event *event,
10800 +@@ -1076,7 +1077,7 @@ static void setup_pebs_sample_data(struct perf_event *event,
10801 }
10802
10803 if (event->attr.precise_ip > 1 && x86_pmu.intel_cap.pebs_format >= 2) {
10804 @@ -24208,10 +25588,10 @@ index 7abb2b8..ea24517 100644
10805 } else if (event->attr.precise_ip > 1 && intel_pmu_pebs_fixup_ip(regs))
10806 regs->flags |= PERF_EFLAGS_EXACT;
10807 diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
10808 -index 659f01e..ef67d60 100644
10809 +index 653f88d..11b6b78 100644
10810 --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
10811 +++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
10812 -@@ -686,7 +686,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
10813 +@@ -704,7 +704,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
10814 * Ensure we don't blindy read any address by validating it is
10815 * a known text address.
10816 */
10817 @@ -24220,7 +25600,7 @@ index 659f01e..ef67d60 100644
10818 addr = (void *)from;
10819 /*
10820 * Assume we can get the maximum possible size
10821 -@@ -708,7 +708,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
10822 +@@ -726,7 +726,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
10823 #ifdef CONFIG_X86_64
10824 is64 = kernel_ip((unsigned long)addr) || !test_thread_flag(TIF_IA32);
10825 #endif
10826 @@ -24230,10 +25610,10 @@ index 659f01e..ef67d60 100644
10827 if (!insn.opcode.got)
10828 return X86_BR_ABORT;
10829 diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c
10830 -index 868e119..be39b45 100644
10831 +index c0bbd10..727ae15e 100644
10832 --- a/arch/x86/kernel/cpu/perf_event_intel_pt.c
10833 +++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c
10834 -@@ -132,14 +132,10 @@ static const struct attribute_group *pt_attr_groups[] = {
10835 +@@ -133,14 +133,10 @@ static const struct attribute_group *pt_attr_groups[] = {
10836
10837 static int __init pt_pmu_hw_init(void)
10838 {
10839 @@ -24250,7 +25630,7 @@ index 868e119..be39b45 100644
10840 for (i = 0; i < PT_CPUID_LEAVES; i++) {
10841 cpuid_count(20, i,
10842 &pt_pmu.caps[CR_EAX + i*PT_CPUID_REGS_NUM],
10843 -@@ -148,39 +144,25 @@ static int __init pt_pmu_hw_init(void)
10844 +@@ -149,39 +145,25 @@ static int __init pt_pmu_hw_init(void)
10845 &pt_pmu.caps[CR_EDX + i*PT_CPUID_REGS_NUM]);
10846 }
10847
10848 @@ -24298,7 +25678,7 @@ index 868e119..be39b45 100644
10849 }
10850
10851 #define RTIT_CTL_CYC_PSB (RTIT_CTL_CYCLEACC | \
10852 -@@ -996,7 +978,7 @@ static void pt_event_start(struct perf_event *event, int mode)
10853 +@@ -997,7 +979,7 @@ static void pt_event_start(struct perf_event *event, int mode)
10854 return;
10855 }
10856
10857 @@ -24307,7 +25687,7 @@ index 868e119..be39b45 100644
10858 event->hw.state = 0;
10859
10860 pt_config_buffer(buf->cur->table, buf->cur_idx,
10861 -@@ -1012,7 +994,7 @@ static void pt_event_stop(struct perf_event *event, int mode)
10862 +@@ -1013,7 +995,7 @@ static void pt_event_stop(struct perf_event *event, int mode)
10863 * Protect against the PMI racing with disabling wrmsr,
10864 * see comment in intel_pt_interrupt().
10865 */
10866 @@ -24317,10 +25697,28 @@ index 868e119..be39b45 100644
10867
10868 if (event->hw.state == PERF_HES_STOPPED)
10869 diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
10870 -index ed446bd..413b10e 100644
10871 +index 24a351a..d429cd7 100644
10872 --- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
10873 +++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
10874 -@@ -496,7 +496,7 @@ static struct attribute *rapl_events_knl_attr[] = {
10875 +@@ -97,14 +97,14 @@ static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
10876 + #define RAPL_EVENT_MASK 0xFFULL
10877 +
10878 + #define DEFINE_RAPL_FORMAT_ATTR(_var, _name, _format) \
10879 +-static ssize_t __rapl_##_var##_show(struct kobject *kobj, \
10880 +- struct kobj_attribute *attr, \
10881 ++static ssize_t __rapl_##_var##_show(struct device *dev, \
10882 ++ struct device_attribute *attr, \
10883 + char *page) \
10884 + { \
10885 + BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE); \
10886 + return sprintf(page, _format "\n"); \
10887 + } \
10888 +-static struct kobj_attribute format_attr_##_var = \
10889 ++static struct device_attribute format_attr_##_var = \
10890 + __ATTR(_name, 0444, __rapl_##_var##_show, NULL)
10891 +
10892 + #define RAPL_CNTR_WIDTH 32 /* 32-bit rapl counters */
10893 +@@ -483,7 +483,7 @@ static struct attribute *rapl_events_knl_attr[] = {
10894 NULL,
10895 };
10896
10897 @@ -24330,9 +25728,20 @@ index ed446bd..413b10e 100644
10898 .attrs = NULL, /* patched at runtime */
10899 };
10900 diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
10901 -index 61215a6..ceee0e5 100644
10902 +index 3bf41d4..b5dc2c2 100644
10903 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
10904 +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
10905 +@@ -74,8 +74,8 @@ end:
10906 + return map;
10907 + }
10908 +
10909 +-ssize_t uncore_event_show(struct kobject *kobj,
10910 +- struct kobj_attribute *attr, char *buf)
10911 ++ssize_t uncore_event_show(struct device *dev,
10912 ++ struct device_attribute *attr, char *buf)
10913 + {
10914 + struct uncore_event_desc *event =
10915 + container_of(attr, struct uncore_event_desc, attr);
10916 @@ -785,7 +785,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types)
10917 static int __init uncore_type_init(struct intel_uncore_type *type)
10918 {
10919 @@ -24343,18 +25752,50 @@ index 61215a6..ceee0e5 100644
10920 int i, j;
10921
10922 diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
10923 -index 2f0a4a9..8f4b802 100644
10924 +index a7086b8..ccac9b1 100644
10925 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
10926 +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
10927 -@@ -115,7 +115,7 @@ struct intel_uncore_box {
10928 +@@ -113,9 +113,9 @@ struct intel_uncore_box {
10929 + #define UNCORE_BOX_FLAG_INITIATED 0
10930 +
10931 struct uncore_event_desc {
10932 - struct kobj_attribute attr;
10933 +- struct kobj_attribute attr;
10934 ++ struct device_attribute attr;
10935 const char *config;
10936 -};
10937 +} __do_const;
10938
10939 struct pci2phy_map {
10940 struct list_head list;
10941 +@@ -126,8 +126,8 @@ struct pci2phy_map {
10942 + int uncore_pcibus_to_physid(struct pci_bus *bus);
10943 + struct pci2phy_map *__find_pci2phy_map(int segment);
10944 +
10945 +-ssize_t uncore_event_show(struct kobject *kobj,
10946 +- struct kobj_attribute *attr, char *buf);
10947 ++ssize_t uncore_event_show(struct device *dev,
10948 ++ struct device_attribute *attr, char *buf);
10949 +
10950 + #define INTEL_UNCORE_EVENT_DESC(_name, _config) \
10951 + { \
10952 +@@ -136,14 +136,14 @@ ssize_t uncore_event_show(struct kobject *kobj,
10953 + }
10954 +
10955 + #define DEFINE_UNCORE_FORMAT_ATTR(_var, _name, _format) \
10956 +-static ssize_t __uncore_##_var##_show(struct kobject *kobj, \
10957 +- struct kobj_attribute *attr, \
10958 ++static ssize_t __uncore_##_var##_show(struct device *dev, \
10959 ++ struct device_attribute *attr, \
10960 + char *page) \
10961 + { \
10962 + BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE); \
10963 + return sprintf(page, _format "\n"); \
10964 + } \
10965 +-static struct kobj_attribute format_attr_##_var = \
10966 ++static struct device_attribute format_attr_##_var = \
10967 + __ATTR(_name, 0444, __uncore_##_var##_show, NULL)
10968 +
10969 + static inline unsigned uncore_pci_box_ctl(struct intel_uncore_box *box)
10970 diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
10971 index 628a059..83bced6 100644
10972 --- a/arch/x86/kernel/cpu/vmware.c
10973 @@ -24627,7 +26068,7 @@ index 464ffd6..01f2cda 100644
10974 +EXPORT_SYMBOL(pax_check_alloca);
10975 +#endif
10976 diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
10977 -index 5f1c626..14b4999 100644
10978 +index 5f1c626..059e830 100644
10979 --- a/arch/x86/kernel/dumpstack_64.c
10980 +++ b/arch/x86/kernel/dumpstack_64.c
10981 @@ -153,12 +153,12 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
10982 @@ -24681,7 +26122,7 @@ index 5f1c626..14b4999 100644
10983 * exception stack:
10984 */
10985 + if ((u16)stack_end[-1] != __KERNEL_DS)
10986 -+ break;
10987 ++ goto out;
10988 stack = (unsigned long *) stack_end[-2];
10989 done = 0;
10990 break;
10991 @@ -24695,7 +26136,7 @@ index 5f1c626..14b4999 100644
10992 ops, data, stack_end, &graph);
10993 /*
10994 * We link to the next stack (which would be
10995 -@@ -237,10 +239,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
10996 +@@ -237,10 +239,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
10997 }
10998 }
10999
11000 @@ -24703,10 +26144,11 @@ index 5f1c626..14b4999 100644
11001 - * This handles the process stack:
11002 - */
11003 - bp = ops->walk_stack(tinfo, stack, bp, ops, data, NULL, &graph);
11004 ++out:
11005 put_cpu();
11006 }
11007 EXPORT_SYMBOL(dump_trace);
11008 -@@ -347,8 +345,55 @@ int is_valid_bugaddr(unsigned long ip)
11009 +@@ -347,8 +346,55 @@ int is_valid_bugaddr(unsigned long ip)
11010 {
11011 unsigned short ud2;
11012
11013 @@ -24888,7 +26330,7 @@ index 4d38416..ec7cc4e 100644
11014 unlock_done:
11015 mutex_unlock(&espfix_init_mutex);
11016 diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
11017 -index d25097c..4c36ff6 100644
11018 +index d5804ad..4c36ff6 100644
11019 --- a/arch/x86/kernel/fpu/core.c
11020 +++ b/arch/x86/kernel/fpu/core.c
11021 @@ -127,7 +127,7 @@ void __kernel_fpu_end(void)
11022 @@ -24954,19 +26396,7 @@ index d25097c..4c36ff6 100644
11023 fpu->counter++;
11024 kernel_fpu_enable();
11025 }
11026 -@@ -409,8 +409,10 @@ static inline void copy_init_fpstate_to_fpregs(void)
11027 - {
11028 - if (use_xsave())
11029 - copy_kernel_to_xregs(&init_fpstate.xsave, -1);
11030 -- else
11031 -+ else if (static_cpu_has(X86_FEATURE_FXSR))
11032 - copy_kernel_to_fxregs(&init_fpstate.fxsave);
11033 -+ else
11034 -+ copy_kernel_to_fregs(&init_fpstate.fsave);
11035 - }
11036 -
11037 - /*
11038 -@@ -442,25 +444,25 @@ void fpu__clear(struct fpu *fpu)
11039 +@@ -444,25 +444,25 @@ void fpu__clear(struct fpu *fpu)
11040 static inline unsigned short get_fpu_cwd(struct fpu *fpu)
11041 {
11042 if (cpu_has_fxsr) {
11043 @@ -24998,10 +26428,10 @@ index d25097c..4c36ff6 100644
11044 return MXCSR_DEFAULT;
11045 }
11046 diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
11047 -index be39b5f..1095798 100644
11048 +index bd08fb7..dc29a0a 100644
11049 --- a/arch/x86/kernel/fpu/init.c
11050 +++ b/arch/x86/kernel/fpu/init.c
11051 -@@ -42,7 +42,7 @@ static void fpu__init_cpu_generic(void)
11052 +@@ -45,7 +45,7 @@ static void fpu__init_cpu_generic(void)
11053 /* Flush out any pending x87 state: */
11054 #ifdef CONFIG_MATH_EMULATION
11055 if (!cpu_has_fpu)
11056 @@ -25010,22 +26440,22 @@ index be39b5f..1095798 100644
11057 else
11058 #endif
11059 asm volatile ("fninit");
11060 -@@ -129,7 +129,7 @@ static void __init fpu__init_system_generic(void)
11061 - * Set up the legacy init FPU context. (xstate init might overwrite this
11062 - * with a more modern format, if the CPU supports it.)
11063 - */
11064 -- fpstate_init_fxstate(&init_fpstate.fxsave);
11065 -+ fpstate_init(&init_fpstate);
11066 -
11067 - fpu__init_system_mxcsr();
11068 - }
11069 -@@ -143,42 +143,7 @@ static void __init fpu__init_system_generic(void)
11070 +@@ -148,51 +148,7 @@ static void __init fpu__init_system_generic(void)
11071 unsigned int xstate_size;
11072 EXPORT_SYMBOL_GPL(xstate_size);
11073
11074 --/* Enforce that 'MEMBER' is the last field of 'TYPE': */
11075 +-/* Get alignment of the TYPE. */
11076 +-#define TYPE_ALIGN(TYPE) offsetof(struct { char x; TYPE test; }, test)
11077 +-
11078 +-/*
11079 +- * Enforce that 'MEMBER' is the last field of 'TYPE'.
11080 +- *
11081 +- * Align the computed size with alignment of the TYPE,
11082 +- * because that's how C aligns structs.
11083 +- */
11084 -#define CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) \
11085 -- BUILD_BUG_ON(sizeof(TYPE) != offsetofend(TYPE, MEMBER))
11086 +- BUILD_BUG_ON(sizeof(TYPE) != ALIGN(offsetofend(TYPE, MEMBER), \
11087 +- TYPE_ALIGN(TYPE)))
11088 -
11089 -/*
11090 - * We append the 'struct fpu' to the task_struct:
11091 @@ -25063,7 +26493,7 @@ index be39b5f..1095798 100644
11092
11093 /*
11094 * Set up the xstate_size based on the legacy FPU context size.
11095 -@@ -331,7 +296,6 @@ void __init fpu__init_system(struct cpuinfo_x86 *c)
11096 +@@ -400,7 +356,6 @@ void __init fpu__init_system(struct cpuinfo_x86 *c)
11097 fpu__init_system_generic();
11098 fpu__init_system_xstate_size_legacy();
11099 fpu__init_system_xstate();
11100 @@ -25261,10 +26691,10 @@ index 31c6a60..523f27e 100644
11101 } else {
11102 sanitize_restored_xstate(tsk, &env, xfeatures, fx_only);
11103 diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
11104 -index 70fc312..30dfd14 100644
11105 +index d425cda5..011b570 100644
11106 --- a/arch/x86/kernel/fpu/xstate.c
11107 +++ b/arch/x86/kernel/fpu/xstate.c
11108 -@@ -109,14 +109,14 @@ EXPORT_SYMBOL_GPL(cpu_has_xfeatures);
11109 +@@ -110,14 +110,14 @@ EXPORT_SYMBOL_GPL(cpu_has_xfeatures);
11110 */
11111 void fpstate_sanitize_xstate(struct fpu *fpu)
11112 {
11113 @@ -25289,7 +26719,7 @@ index 70fc312..30dfd14 100644
11114 + return get_xsave_addr(&fpu->state->xsave, xsave_state);
11115 }
11116 diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
11117 -index 311bcf3..83b8e85 100644
11118 +index 29408d6..cd88f18 100644
11119 --- a/arch/x86/kernel/ftrace.c
11120 +++ b/arch/x86/kernel/ftrace.c
11121 @@ -89,7 +89,7 @@ static unsigned long text_ip_addr(unsigned long ip)
11122 @@ -25307,10 +26737,10 @@ index 311bcf3..83b8e85 100644
11123
11124 + ip = ktla_ktva(ip);
11125 +
11126 + ftrace_expected = old_code;
11127 +
11128 /*
11129 - * Note: Due to modules and __init, code can
11130 - * disappear and change, we need to protect against faulting
11131 -@@ -230,7 +232,7 @@ static int update_ftrace_func(unsigned long ip, void *new)
11132 +@@ -233,7 +235,7 @@ static int update_ftrace_func(unsigned long ip, void *new)
11133 unsigned char old[MCOUNT_INSN_SIZE];
11134 int ret;
11135
11136 @@ -25319,7 +26749,7 @@ index 311bcf3..83b8e85 100644
11137
11138 ftrace_update_func = ip;
11139 /* Make sure the breakpoints see the ftrace_update_func update */
11140 -@@ -311,7 +313,7 @@ static int add_break(unsigned long ip, const char *old)
11141 +@@ -314,7 +316,7 @@ static int add_break(unsigned long ip, const char *old)
11142 unsigned char replaced[MCOUNT_INSN_SIZE];
11143 unsigned char brk = BREAKPOINT_INSTRUCTION;
11144
11145 @@ -25327,8 +26757,8 @@ index 311bcf3..83b8e85 100644
11146 + if (probe_kernel_read(replaced, (void *)ktla_ktva(ip), MCOUNT_INSN_SIZE))
11147 return -EFAULT;
11148
11149 - /* Make sure it is what we expect it to be */
11150 -@@ -674,11 +676,11 @@ static unsigned char *ftrace_jmp_replace(unsigned long ip, unsigned long addr)
11151 + ftrace_expected = old;
11152 +@@ -681,11 +683,11 @@ static unsigned char *ftrace_jmp_replace(unsigned long ip, unsigned long addr)
11153 /* Module allocation simplifies allocating memory for code */
11154 static inline void *alloc_tramp(unsigned long size)
11155 {
11156 @@ -25342,7 +26772,7 @@ index 311bcf3..83b8e85 100644
11157 }
11158 #else
11159 /* Trampolines can only be created if modules are supported */
11160 -@@ -757,7 +759,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11161 +@@ -764,7 +766,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11162 *tramp_size = size + MCOUNT_INSN_SIZE + sizeof(void *);
11163
11164 /* Copy ftrace_caller onto the trampoline memory */
11165 @@ -25352,7 +26782,7 @@ index 311bcf3..83b8e85 100644
11166 if (WARN_ON(ret < 0)) {
11167 tramp_free(trampoline);
11168 return 0;
11169 -@@ -767,6 +771,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11170 +@@ -774,6 +778,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11171
11172 /* The trampoline ends with a jmp to ftrace_return */
11173 jmp = ftrace_jmp_replace(ip, (unsigned long)ftrace_return);
11174 @@ -25360,7 +26790,7 @@ index 311bcf3..83b8e85 100644
11175 memcpy(trampoline + size, jmp, MCOUNT_INSN_SIZE);
11176
11177 /*
11178 -@@ -779,6 +784,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11179 +@@ -786,6 +791,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11180
11181 ptr = (unsigned long *)(trampoline + size + MCOUNT_INSN_SIZE);
11182 *ptr = (unsigned long)ops;
11183 @@ -25368,7 +26798,7 @@ index 311bcf3..83b8e85 100644
11184
11185 op_offset -= start_offset;
11186 memcpy(&op_ptr, trampoline + op_offset, OP_REF_SIZE);
11187 -@@ -796,7 +802,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11188 +@@ -803,7 +809,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
11189 op_ptr.offset = offset;
11190
11191 /* put in the new offset to the ftrace_ops */
11192 @@ -25379,7 +26809,7 @@ index 311bcf3..83b8e85 100644
11193 /* ALLOC_TRAMP flags lets us know we created it */
11194 ops->flags |= FTRACE_OPS_FL_ALLOC_TRAMP;
11195 diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
11196 -index f129a9a..af8f6da 100644
11197 +index 2c0f340..76c1d24 100644
11198 --- a/arch/x86/kernel/head64.c
11199 +++ b/arch/x86/kernel/head64.c
11200 @@ -68,12 +68,12 @@ again:
11201 @@ -26811,7 +28241,7 @@ index 47190bd..0165c4d 100644
11202 .detect = kvm_detect,
11203 .x2apic_available = kvm_para_available,
11204 diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
11205 -index 2bd81e3..2d5e042 100644
11206 +index 72cef58..252d1b0 100644
11207 --- a/arch/x86/kernel/kvmclock.c
11208 +++ b/arch/x86/kernel/kvmclock.c
11209 @@ -29,7 +29,7 @@
11210 @@ -26831,8 +28261,8 @@ index 2bd81e3..2d5e042 100644
11211 +static struct pvclock_vsyscall_time_info hv_clock[NR_CPUS] __page_aligned_bss;
11212 static struct pvclock_wall_clock wall_clock;
11213
11214 - /*
11215 -@@ -156,7 +156,7 @@ bool kvm_check_and_clear_guest_paused(void)
11216 + struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void)
11217 +@@ -161,7 +161,7 @@ bool kvm_check_and_clear_guest_paused(void)
11218 struct pvclock_vcpu_time_info *src;
11219 int cpu = smp_processor_id();
11220
11221 @@ -26841,7 +28271,7 @@ index 2bd81e3..2d5e042 100644
11222 return ret;
11223
11224 src = &hv_clock[cpu].pvti;
11225 -@@ -183,7 +183,7 @@ int kvm_register_clock(char *txt)
11226 +@@ -188,7 +188,7 @@ int kvm_register_clock(char *txt)
11227 int low, high, ret;
11228 struct pvclock_vcpu_time_info *src;
11229
11230 @@ -26850,7 +28280,7 @@ index 2bd81e3..2d5e042 100644
11231 return 0;
11232
11233 src = &hv_clock[cpu].pvti;
11234 -@@ -243,7 +243,6 @@ static void kvm_shutdown(void)
11235 +@@ -248,7 +248,6 @@ static void kvm_shutdown(void)
11236 void __init kvmclock_init(void)
11237 {
11238 struct pvclock_vcpu_time_info *vcpu_time;
11239 @@ -26858,7 +28288,7 @@ index 2bd81e3..2d5e042 100644
11240 int size, cpu;
11241 u8 flags;
11242
11243 -@@ -261,15 +260,8 @@ void __init kvmclock_init(void)
11244 +@@ -266,15 +265,8 @@ void __init kvmclock_init(void)
11245 printk(KERN_INFO "kvm-clock: Using msrs %x and %x",
11246 msr_kvm_system_time, msr_kvm_wall_clock);
11247
11248 @@ -26875,7 +28305,7 @@ index 2bd81e3..2d5e042 100644
11249 return;
11250 }
11251
11252 -@@ -310,7 +302,7 @@ int __init kvm_setup_vsyscall_timeinfo(void)
11253 +@@ -314,7 +306,7 @@ int __init kvm_setup_vsyscall_timeinfo(void)
11254 struct pvclock_vcpu_time_info *vcpu_time;
11255 unsigned int size;
11256
11257 @@ -26967,23 +28397,23 @@ index 6acc9dd..f72931d 100644
11258 case 0:
11259 ret = read_ldt(ptr, bytecount);
11260 diff --git a/arch/x86/kernel/livepatch.c b/arch/x86/kernel/livepatch.c
11261 -index d1d35cc..d5b1193 100644
11262 +index 92fc1a5..478b427 100644
11263 --- a/arch/x86/kernel/livepatch.c
11264 +++ b/arch/x86/kernel/livepatch.c
11265 -@@ -41,8 +41,10 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
11266 - int ret, numpages, size = 4;
11267 - bool readonly;
11268 +@@ -38,8 +38,10 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
11269 + {
11270 + size_t size = 4;
11271 unsigned long val;
11272 -- unsigned long core = (unsigned long)mod->module_core;
11273 -- unsigned long core_size = mod->core_size;
11274 -+ unsigned long core_rx = (unsigned long)mod->module_core_rx;
11275 -+ unsigned long core_rw = (unsigned long)mod->module_core_rw;
11276 -+ unsigned long core_size_rx = mod->core_size_rx;
11277 -+ unsigned long core_size_rw = mod->core_size_rw;
11278 +- unsigned long core = (unsigned long)mod->core_layout.base;
11279 +- unsigned long core_size = mod->core_layout.size;
11280 ++ unsigned long core_rx = (unsigned long)mod->core_layout.base_rx;
11281 ++ unsigned long core_rw = (unsigned long)mod->core_layout.base_rw;
11282 ++ unsigned long core_size_rx = mod->core_layout.size_rx;
11283 ++ unsigned long core_size_rw = mod->core_layout.size_rw;
11284
11285 switch (type) {
11286 case R_X86_64_NONE:
11287 -@@ -65,14 +67,15 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
11288 +@@ -62,7 +64,8 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
11289 return -EINVAL;
11290 }
11291
11292 @@ -26993,14 +28423,6 @@ index d1d35cc..d5b1193 100644
11293 /* loc does not point to any symbol inside the module */
11294 return -EINVAL;
11295
11296 - readonly = false;
11297 -
11298 - #ifdef CONFIG_DEBUG_SET_MODULE_RONX
11299 -- if (loc < core + mod->core_ro_size)
11300 -+ if (loc < core_rx + core_size_rx)
11301 - readonly = true;
11302 - #endif
11303 -
11304 diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
11305 index 469b23d..5449cfe 100644
11306 --- a/arch/x86/kernel/machine_kexec_32.c
11307 @@ -27033,7 +28455,7 @@ index 469b23d..5449cfe 100644
11308 relocate_kernel_ptr = control_page;
11309 page_list[PA_CONTROL_PAGE] = __pa(control_page);
11310 diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
11311 -index 87e1762..994fdb6 100644
11312 +index 87e1762..f08a93d 100644
11313 --- a/arch/x86/kernel/mcount_64.S
11314 +++ b/arch/x86/kernel/mcount_64.S
11315 @@ -7,7 +7,7 @@
11316 @@ -27056,10 +28478,12 @@ index 87e1762..994fdb6 100644
11317
11318 ENTRY(ftrace_caller)
11319 /* save_mcount_regs fills in first two parameters */
11320 -@@ -181,8 +182,9 @@ GLOBAL(ftrace_graph_call)
11321 +@@ -180,9 +181,10 @@ GLOBAL(ftrace_graph_call)
11322 + jmp ftrace_stub
11323 #endif
11324
11325 - GLOBAL(ftrace_stub)
11326 +-GLOBAL(ftrace_stub)
11327 ++RAP_ENTRY(ftrace_stub)
11328 + pax_force_retaddr
11329 retq
11330 -END(ftrace_caller)
11331 @@ -27266,7 +28690,7 @@ index 005c03e..7000fe4 100644
11332 if ((s64)val != *(s32 *)loc)
11333 goto overflow;
11334 diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
11335 -index 113e707..0a690e1 100644
11336 +index 64f9616..c94695d 100644
11337 --- a/arch/x86/kernel/msr.c
11338 +++ b/arch/x86/kernel/msr.c
11339 @@ -39,6 +39,7 @@
11340 @@ -27277,7 +28701,7 @@ index 113e707..0a690e1 100644
11341
11342 #include <asm/processor.h>
11343 #include <asm/msr.h>
11344 -@@ -105,6 +106,11 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
11345 +@@ -83,6 +84,11 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
11346 int err = 0;
11347 ssize_t bytes = 0;
11348
11349 @@ -27289,7 +28713,7 @@ index 113e707..0a690e1 100644
11350 if (count % 8)
11351 return -EINVAL; /* Invalid chunk size */
11352
11353 -@@ -152,6 +158,10 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
11354 +@@ -130,6 +136,10 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
11355 err = -EBADF;
11356 break;
11357 }
11358 @@ -27300,7 +28724,7 @@ index 113e707..0a690e1 100644
11359 if (copy_from_user(&regs, uregs, sizeof regs)) {
11360 err = -EFAULT;
11361 break;
11362 -@@ -235,7 +245,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb,
11363 +@@ -213,7 +223,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb,
11364 return notifier_from_errno(err);
11365 }
11366
11367 @@ -27310,10 +28734,10 @@ index 113e707..0a690e1 100644
11368 };
11369
11370 diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
11371 -index 697f90d..8b1c639 100644
11372 +index 8a2cdd7..5b45fda 100644
11373 --- a/arch/x86/kernel/nmi.c
11374 +++ b/arch/x86/kernel/nmi.c
11375 -@@ -98,16 +98,16 @@ fs_initcall(nmi_warning_debugfs);
11376 +@@ -99,16 +99,16 @@ fs_initcall(nmi_warning_debugfs);
11377
11378 static void nmi_max_handler(struct irq_work *w)
11379 {
11380 @@ -27333,7 +28757,7 @@ index 697f90d..8b1c639 100644
11381 }
11382
11383 static int nmi_handle(unsigned int type, struct pt_regs *regs)
11384 -@@ -134,11 +134,11 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
11385 +@@ -135,11 +135,11 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
11386 delta = sched_clock() - delta;
11387 trace_nmi_handler(a->handler, (int)delta, thishandled);
11388
11389 @@ -27348,7 +28772,7 @@ index 697f90d..8b1c639 100644
11390 }
11391
11392 rcu_read_unlock();
11393 -@@ -148,7 +148,7 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
11394 +@@ -149,7 +149,7 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
11395 }
11396 NOKPROBE_SYMBOL(nmi_handle);
11397
11398 @@ -27357,7 +28781,7 @@ index 697f90d..8b1c639 100644
11399 {
11400 struct nmi_desc *desc = nmi_to_desc(type);
11401 unsigned long flags;
11402 -@@ -156,7 +156,8 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
11403 +@@ -157,7 +157,8 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
11404 if (!action->handler)
11405 return -EINVAL;
11406
11407 @@ -27367,7 +28791,7 @@ index 697f90d..8b1c639 100644
11408
11409 spin_lock_irqsave(&desc->lock, flags);
11410
11411 -@@ -174,9 +175,9 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
11412 +@@ -175,9 +176,9 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
11413 * event confuses some handlers (kdump uses this flag)
11414 */
11415 if (action->flags & NMI_FLAG_FIRST)
11416 @@ -27379,7 +28803,7 @@ index 697f90d..8b1c639 100644
11417
11418 spin_unlock_irqrestore(&desc->lock, flags);
11419 return 0;
11420 -@@ -199,7 +200,7 @@ void unregister_nmi_handler(unsigned int type, const char *name)
11421 +@@ -200,7 +201,7 @@ void unregister_nmi_handler(unsigned int type, const char *name)
11422 if (!strcmp(n->name, name)) {
11423 WARN(in_nmi(),
11424 "Trying to free NMI (%s) from NMI context!\n", n->name);
11425 @@ -27388,7 +28812,7 @@ index 697f90d..8b1c639 100644
11426 break;
11427 }
11428 }
11429 -@@ -481,6 +482,17 @@ static DEFINE_PER_CPU(int, update_debug_stack);
11430 +@@ -501,6 +502,17 @@ static DEFINE_PER_CPU(int, update_debug_stack);
11431 dotraplinkage notrace void
11432 do_nmi(struct pt_regs *regs, long error_code)
11433 {
11434 @@ -27442,7 +28866,7 @@ index 33ee3e0..da3519a 100644
11435 #ifdef CONFIG_QUEUED_SPINLOCKS
11436 .queued_spin_lock_slowpath = native_queued_spin_lock_slowpath,
11437 diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
11438 -index c2130ae..d52ca15 100644
11439 +index f08ac28..0151389 100644
11440 --- a/arch/x86/kernel/paravirt.c
11441 +++ b/arch/x86/kernel/paravirt.c
11442 @@ -64,6 +64,9 @@ u64 _paravirt_ident_64(u64 x)
11443 @@ -27455,7 +28879,7 @@ index c2130ae..d52ca15 100644
11444
11445 void __init default_banner(void)
11446 {
11447 -@@ -150,16 +153,20 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
11448 +@@ -139,15 +142,19 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
11449
11450 if (opfunc == NULL)
11451 /* If there's no function, patch it with a ud2a (BUG) */
11452 @@ -27463,8 +28887,7 @@ index c2130ae..d52ca15 100644
11453 - else if (opfunc == _paravirt_nop)
11454 + ret = paravirt_patch_insns(insnbuf, len, (const char *)ktva_ktla((unsigned long)ud2a), ud2a+sizeof(ud2a));
11455 + else if (opfunc == (void *)_paravirt_nop)
11456 - /* If the operation is a nop, then nop the callsite */
11457 - ret = paravirt_patch_nop();
11458 + ret = 0;
11459
11460 /* identity functions just return their single argument */
11461 - else if (opfunc == _paravirt_ident_32)
11462 @@ -27479,8 +28902,8 @@ index c2130ae..d52ca15 100644
11463 +#endif
11464
11465 else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) ||
11466 - #ifdef CONFIG_X86_32
11467 -@@ -186,7 +193,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
11468 + type == PARAVIRT_PATCH(pv_cpu_ops.usergs_sysret64))
11469 +@@ -170,7 +177,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
11470 if (insn_len > len || start == NULL)
11471 insn_len = len;
11472 else
11473 @@ -27489,7 +28912,7 @@ index c2130ae..d52ca15 100644
11474
11475 return insn_len;
11476 }
11477 -@@ -310,7 +317,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
11478 +@@ -292,7 +299,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
11479 return this_cpu_read(paravirt_lazy_mode);
11480 }
11481
11482 @@ -27498,7 +28921,7 @@ index c2130ae..d52ca15 100644
11483 .name = "bare hardware",
11484 .paravirt_enabled = 0,
11485 .kernel_rpl = 0,
11486 -@@ -321,16 +328,16 @@ struct pv_info pv_info = {
11487 +@@ -303,16 +310,16 @@ struct pv_info pv_info = {
11488 #endif
11489 };
11490
11491 @@ -27518,7 +28941,7 @@ index c2130ae..d52ca15 100644
11492 .save_fl = __PV_IS_CALLEE_SAVE(native_save_fl),
11493 .restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl),
11494 .irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable),
11495 -@@ -342,7 +349,7 @@ __visible struct pv_irq_ops pv_irq_ops = {
11496 +@@ -324,7 +331,7 @@ __visible struct pv_irq_ops pv_irq_ops = {
11497 #endif
11498 };
11499
11500 @@ -27527,17 +28950,10 @@ index c2130ae..d52ca15 100644
11501 .cpuid = native_cpuid,
11502 .get_debugreg = native_get_debugreg,
11503 .set_debugreg = native_set_debugreg,
11504 -@@ -403,21 +410,26 @@ NOKPROBE_SYMBOL(native_get_debugreg);
11505 +@@ -379,15 +386,20 @@ NOKPROBE_SYMBOL(native_get_debugreg);
11506 NOKPROBE_SYMBOL(native_set_debugreg);
11507 NOKPROBE_SYMBOL(native_load_idt);
11508
11509 --struct pv_apic_ops pv_apic_ops = {
11510 -+struct pv_apic_ops pv_apic_ops __read_only= {
11511 - #ifdef CONFIG_X86_LOCAL_APIC
11512 - .startup_ipi_hook = paravirt_nop,
11513 - #endif
11514 - };
11515 -
11516 -#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_PAE)
11517 +#ifdef CONFIG_X86_32
11518 +#ifdef CONFIG_X86_PAE
11519 @@ -27557,7 +28973,7 @@ index c2130ae..d52ca15 100644
11520
11521 .read_cr2 = native_read_cr2,
11522 .write_cr2 = native_write_cr2,
11523 -@@ -467,6 +479,7 @@ struct pv_mmu_ops pv_mmu_ops = {
11524 +@@ -434,6 +446,7 @@ struct pv_mmu_ops pv_mmu_ops = {
11525 .make_pud = PTE_IDENT,
11526
11527 .set_pgd = native_set_pgd,
11528 @@ -27565,7 +28981,7 @@ index c2130ae..d52ca15 100644
11529 #endif
11530 #endif /* CONFIG_PGTABLE_LEVELS >= 3 */
11531
11532 -@@ -487,6 +500,12 @@ struct pv_mmu_ops pv_mmu_ops = {
11533 +@@ -454,6 +467,12 @@ struct pv_mmu_ops pv_mmu_ops = {
11534 },
11535
11536 .set_fixmap = native_set_fixmap,
11537 @@ -27579,7 +28995,7 @@ index c2130ae..d52ca15 100644
11538
11539 EXPORT_SYMBOL_GPL(pv_time_ops);
11540 diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c
11541 -index 8aa0558..465512e 100644
11542 +index e70087a..b083377 100644
11543 --- a/arch/x86/kernel/paravirt_patch_64.c
11544 +++ b/arch/x86/kernel/paravirt_patch_64.c
11545 @@ -9,7 +9,11 @@ DEF_NATIVE(pv_irq_ops, save_fl, "pushfq; popq %rax");
11546 @@ -27594,7 +29010,7 @@ index 8aa0558..465512e 100644
11547 DEF_NATIVE(pv_cpu_ops, clts, "clts");
11548 DEF_NATIVE(pv_cpu_ops, wbinvd, "wbinvd");
11549
11550 -@@ -62,7 +66,11 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
11551 +@@ -59,7 +63,11 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
11552 PATCH_SITE(pv_mmu_ops, read_cr3);
11553 PATCH_SITE(pv_mmu_ops, write_cr3);
11554 PATCH_SITE(pv_cpu_ops, clts);
11555 @@ -27607,7 +29023,7 @@ index 8aa0558..465512e 100644
11556 #if defined(CONFIG_PARAVIRT_SPINLOCKS) && defined(CONFIG_QUEUED_SPINLOCKS)
11557 case PARAVIRT_PATCH(pv_lock_ops.queued_spin_unlock):
11558 diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
11559 -index 0497f71..7186c0d 100644
11560 +index 833b1d3..f839e8b 100644
11561 --- a/arch/x86/kernel/pci-calgary_64.c
11562 +++ b/arch/x86/kernel/pci-calgary_64.c
11563 @@ -1347,7 +1347,7 @@ static void __init get_tce_space_from_tar(void)
11564 @@ -27633,7 +29049,7 @@ index 35ccf75..7a15747 100644
11565 #define DEBUG 1
11566
11567 diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
11568 -index adf0392..88a7576 100644
11569 +index 7c577a1..3557b10 100644
11570 --- a/arch/x86/kernel/pci-swiotlb.c
11571 +++ b/arch/x86/kernel/pci-swiotlb.c
11572 @@ -40,7 +40,7 @@ void x86_swiotlb_free_coherent(struct device *dev, size_t size,
11573 @@ -27923,7 +29339,7 @@ index 9f95091..6885108 100644
11574 return prev_p;
11575 }
11576 diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
11577 -index 4cbb60f..7cc4cb4 100644
11578 +index 9f75187..9b2d358 100644
11579 --- a/arch/x86/kernel/process_64.c
11580 +++ b/arch/x86/kernel/process_64.c
11581 @@ -160,9 +160,10 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long sp,
11582 @@ -27982,10 +29398,10 @@ index 4cbb60f..7cc4cb4 100644
11583 * Now maybe reload the debug registers and handle I/O bitmaps
11584 */
11585 diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
11586 -index 558f50e..2312c52 100644
11587 +index 32e9d9c..afd5732 100644
11588 --- a/arch/x86/kernel/ptrace.c
11589 +++ b/arch/x86/kernel/ptrace.c
11590 -@@ -184,10 +184,10 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)
11591 +@@ -169,10 +169,10 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)
11592 unsigned long sp = (unsigned long)&regs->sp;
11593 u32 *prev_esp;
11594
11595 @@ -27998,7 +29414,7 @@ index 558f50e..2312c52 100644
11596 if (prev_esp)
11597 return (unsigned long)prev_esp;
11598
11599 -@@ -444,6 +444,20 @@ static int putreg(struct task_struct *child,
11600 +@@ -429,6 +429,20 @@ static int putreg(struct task_struct *child,
11601 if (child->thread.gs != value)
11602 return do_arch_prctl(child, ARCH_SET_GS, value);
11603 return 0;
11604 @@ -28019,7 +29435,7 @@ index 558f50e..2312c52 100644
11605 #endif
11606 }
11607
11608 -@@ -580,7 +594,7 @@ static void ptrace_triggered(struct perf_event *bp,
11609 +@@ -565,7 +579,7 @@ static void ptrace_triggered(struct perf_event *bp,
11610 static unsigned long ptrace_get_dr7(struct perf_event *bp[])
11611 {
11612 int i;
11613 @@ -28028,7 +29444,7 @@ index 558f50e..2312c52 100644
11614 struct arch_hw_breakpoint *info;
11615
11616 for (i = 0; i < HBP_NUM; i++) {
11617 -@@ -814,7 +828,7 @@ long arch_ptrace(struct task_struct *child, long request,
11618 +@@ -799,7 +813,7 @@ long arch_ptrace(struct task_struct *child, long request,
11619 unsigned long addr, unsigned long data)
11620 {
11621 int ret;
11622 @@ -28037,7 +29453,7 @@ index 558f50e..2312c52 100644
11623
11624 switch (request) {
11625 /* read the word at location addr in the USER area. */
11626 -@@ -899,14 +913,14 @@ long arch_ptrace(struct task_struct *child, long request,
11627 +@@ -884,14 +898,14 @@ long arch_ptrace(struct task_struct *child, long request,
11628 if ((int) addr < 0)
11629 return -EIO;
11630 ret = do_get_thread_area(child, addr,
11631 @@ -28054,7 +29470,7 @@ index 558f50e..2312c52 100644
11632 break;
11633 #endif
11634
11635 -@@ -1294,7 +1308,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
11636 +@@ -1279,7 +1293,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
11637
11638 #ifdef CONFIG_X86_64
11639
11640 @@ -28063,7 +29479,7 @@ index 558f50e..2312c52 100644
11641 [REGSET_GENERAL] = {
11642 .core_note_type = NT_PRSTATUS,
11643 .n = sizeof(struct user_regs_struct) / sizeof(long),
11644 -@@ -1335,7 +1349,7 @@ static const struct user_regset_view user_x86_64_view = {
11645 +@@ -1320,7 +1334,7 @@ static const struct user_regset_view user_x86_64_view = {
11646 #endif /* CONFIG_X86_64 */
11647
11648 #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
11649 @@ -28072,7 +29488,7 @@ index 558f50e..2312c52 100644
11650 [REGSET_GENERAL] = {
11651 .core_note_type = NT_PRSTATUS,
11652 .n = sizeof(struct user_regs_struct32) / sizeof(u32),
11653 -@@ -1388,7 +1402,7 @@ static const struct user_regset_view user_x86_32_view = {
11654 +@@ -1373,7 +1387,7 @@ static const struct user_regset_view user_x86_32_view = {
11655 */
11656 u64 xstate_fx_sw_bytes[USER_XSTATE_FX_SW_WORDS];
11657
11658 @@ -28081,7 +29497,7 @@ index 558f50e..2312c52 100644
11659 {
11660 #ifdef CONFIG_X86_64
11661 x86_64_regsets[REGSET_XSTATE].n = size / sizeof(u64);
11662 -@@ -1423,7 +1437,7 @@ static void fill_sigtrap_info(struct task_struct *tsk,
11663 +@@ -1408,7 +1422,7 @@ static void fill_sigtrap_info(struct task_struct *tsk,
11664 memset(info, 0, sizeof(*info));
11665 info->si_signo = SIGTRAP;
11666 info->si_code = si_code;
11667 @@ -28091,7 +29507,7 @@ index 558f50e..2312c52 100644
11668
11669 void user_single_step_siginfo(struct task_struct *tsk,
11670 diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
11671 -index 2f355d2..e75ed0a 100644
11672 +index 99bfc02..c85b4c4 100644
11673 --- a/arch/x86/kernel/pvclock.c
11674 +++ b/arch/x86/kernel/pvclock.c
11675 @@ -51,11 +51,11 @@ void pvclock_touch_watchdogs(void)
11676 @@ -28123,7 +29539,7 @@ index 2f355d2..e75ed0a 100644
11677
11678 return ret;
11679 diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
11680 -index f660d63..564a120 100644
11681 +index ab0adc0..502dfc2 100644
11682 --- a/arch/x86/kernel/reboot.c
11683 +++ b/arch/x86/kernel/reboot.c
11684 @@ -70,6 +70,11 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
11685 @@ -28261,7 +29677,7 @@ index 98111b3..73ca125 100644
11686 identity_mapped:
11687 /* set return address to 0 if not preserving context */
11688 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
11689 -index d2bbe34..9d8fdaa 100644
11690 +index d3d80e6..5c5b8de 100644
11691 --- a/arch/x86/kernel/setup.c
11692 +++ b/arch/x86/kernel/setup.c
11693 @@ -112,6 +112,7 @@
11694 @@ -28497,7 +29913,7 @@ index cb6282c..7cda5d0 100644
11695 }
11696
11697 diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
11698 -index 12c8286..aa65d13 100644
11699 +index 658777c..6285f88 100644
11700 --- a/arch/x86/kernel/smp.c
11701 +++ b/arch/x86/kernel/smp.c
11702 @@ -336,7 +336,7 @@ static int __init nonmi_ipi_setup(char *str)
11703 @@ -28510,7 +29926,7 @@ index 12c8286..aa65d13 100644
11704 .smp_prepare_cpus = native_smp_prepare_cpus,
11705 .smp_cpus_done = native_smp_cpus_done,
11706 diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
11707 -index fbabe4f..c686333 100644
11708 +index 24d57f7..36e49a2 100644
11709 --- a/arch/x86/kernel/smpboot.c
11710 +++ b/arch/x86/kernel/smpboot.c
11711 @@ -213,14 +213,17 @@ static void notrace start_secondary(void *unused)
11712 @@ -28535,7 +29951,7 @@ index fbabe4f..c686333 100644
11713 /*
11714 * Check TSC synchronization with the BP:
11715 */
11716 -@@ -810,16 +813,15 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
11717 +@@ -803,16 +806,15 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
11718 alternatives_enable_smp();
11719
11720 per_cpu(current_task, cpu) = idle;
11721 @@ -28554,7 +29970,7 @@ index fbabe4f..c686333 100644
11722 }
11723
11724 /*
11725 -@@ -840,9 +842,11 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
11726 +@@ -833,9 +835,11 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
11727 unsigned long timeout;
11728
11729 idle->thread.sp = (unsigned long) (((struct pt_regs *)
11730 @@ -28567,7 +29983,7 @@ index fbabe4f..c686333 100644
11731 initial_code = (unsigned long)start_secondary;
11732 stack_start = idle->thread.sp;
11733
11734 -@@ -990,6 +994,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
11735 +@@ -983,6 +987,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
11736
11737 common_cpu_up(cpu, tidle);
11738
11739 @@ -28609,7 +30025,7 @@ index c9a0738..f0ab628 100644
11740 switch (opcode[i]) {
11741 diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
11742 new file mode 100644
11743 -index 0000000..5877189
11744 +index 0000000..920e413
11745 --- /dev/null
11746 +++ b/arch/x86/kernel/sys_i386_32.c
11747 @@ -0,0 +1,189 @@
11748 @@ -28737,9 +30153,9 @@ index 0000000..5877189
11749 +}
11750 +
11751 +unsigned long
11752 -+arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
11753 -+ const unsigned long len, const unsigned long pgoff,
11754 -+ const unsigned long flags)
11755 ++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
11756 ++ unsigned long len, unsigned long pgoff,
11757 ++ unsigned long flags)
11758 +{
11759 + struct vm_area_struct *vma;
11760 + struct mm_struct *mm = current->mm;
11761 @@ -28803,7 +30219,7 @@ index 0000000..5877189
11762 + return arch_get_unmapped_area(filp, addr0, len, pgoff, flags);
11763 +}
11764 diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
11765 -index 10e0272..b4bb9a7 100644
11766 +index 10e0272..a73232f 100644
11767 --- a/arch/x86/kernel/sys_x86_64.c
11768 +++ b/arch/x86/kernel/sys_x86_64.c
11769 @@ -97,8 +97,8 @@ out:
11770 @@ -28854,7 +30270,7 @@ index 10e0272..b4bb9a7 100644
11771 return addr;
11772 }
11773
11774 -@@ -157,6 +161,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
11775 +@@ -157,18 +161,20 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
11776 info.align_mask = get_align_mask();
11777 info.align_offset += get_align_bits();
11778 }
11779 @@ -28862,7 +30278,15 @@ index 10e0272..b4bb9a7 100644
11780 return vm_unmapped_area(&info);
11781 }
11782
11783 -@@ -169,6 +174,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
11784 + unsigned long
11785 +-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
11786 +- const unsigned long len, const unsigned long pgoff,
11787 +- const unsigned long flags)
11788 ++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
11789 ++ unsigned long len, unsigned long pgoff,
11790 ++ unsigned long flags)
11791 + {
11792 + struct vm_area_struct *vma;
11793 struct mm_struct *mm = current->mm;
11794 unsigned long addr = addr0;
11795 struct vm_unmapped_area_info info;
11796 @@ -29048,7 +30472,7 @@ index 1c113db..287b42e 100644
11797 static int trace_irq_vector_refcount;
11798 static DEFINE_MUTEX(irq_vector_mutex);
11799 diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
11800 -index ade185a..2452e8b 100644
11801 +index ade185a..4c354a0 100644
11802 --- a/arch/x86/kernel/traps.c
11803 +++ b/arch/x86/kernel/traps.c
11804 @@ -70,7 +70,7 @@
11805 @@ -29087,7 +30511,7 @@ index ade185a..2452e8b 100644
11806 struct pt_regs *regs, long error_code)
11807 {
11808 if (v8086_mode(regs)) {
11809 -@@ -202,8 +202,20 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str,
11810 +@@ -202,8 +202,25 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str,
11811 if (!fixup_exception(regs)) {
11812 tsk->thread.error_code = error_code;
11813 tsk->thread.trap_nr = trapnr;
11814 @@ -29097,6 +30521,11 @@ index ade185a..2452e8b 100644
11815 + str = "PAX: suspicious stack segment fault";
11816 +#endif
11817 +
11818 ++#ifdef CONFIG_PAX_RAP
11819 ++ if (trapnr == X86_TRAP_UD)
11820 ++ str = "PAX: overwritten function pointer or return address detected";
11821 ++#endif
11822 ++
11823 die(str, regs, error_code);
11824 }
11825 +
11826 @@ -29108,7 +30537,7 @@ index ade185a..2452e8b 100644
11827 return 0;
11828 }
11829
11830 -@@ -242,7 +254,7 @@ static siginfo_t *fill_trap_info(struct pt_regs *regs, int signr, int trapnr,
11831 +@@ -242,7 +259,7 @@ static siginfo_t *fill_trap_info(struct pt_regs *regs, int signr, int trapnr,
11832 }
11833
11834 static void
11835 @@ -29117,7 +30546,7 @@ index ade185a..2452e8b 100644
11836 long error_code, siginfo_t *info)
11837 {
11838 struct task_struct *tsk = current;
11839 -@@ -266,7 +278,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
11840 +@@ -266,7 +283,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
11841 if (show_unhandled_signals && unhandled_signal(tsk, signr) &&
11842 printk_ratelimit()) {
11843 pr_info("%s[%d] trap %s ip:%lx sp:%lx error:%lx",
11844 @@ -29126,7 +30555,7 @@ index ade185a..2452e8b 100644
11845 regs->ip, regs->sp, error_code);
11846 print_vma_addr(" in ", regs->ip);
11847 pr_cont("\n");
11848 -@@ -347,6 +359,11 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code)
11849 +@@ -347,6 +364,11 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code)
11850 tsk->thread.error_code = error_code;
11851 tsk->thread.trap_nr = X86_TRAP_DF;
11852
11853 @@ -29138,7 +30567,7 @@ index ade185a..2452e8b 100644
11854 #ifdef CONFIG_DOUBLEFAULT
11855 df_debug(regs, error_code);
11856 #endif
11857 -@@ -459,11 +476,35 @@ do_general_protection(struct pt_regs *regs, long error_code)
11858 +@@ -459,11 +481,35 @@ do_general_protection(struct pt_regs *regs, long error_code)
11859 tsk->thread.error_code = error_code;
11860 tsk->thread.trap_nr = X86_TRAP_GP;
11861 if (notify_die(DIE_GPF, "general protection fault", regs, error_code,
11862 @@ -29175,7 +30604,7 @@ index ade185a..2452e8b 100644
11863 tsk->thread.error_code = error_code;
11864 tsk->thread.trap_nr = X86_TRAP_GP;
11865
11866 -@@ -559,6 +600,9 @@ struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s)
11867 +@@ -559,6 +605,9 @@ struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s)
11868 container_of(task_pt_regs(current),
11869 struct bad_iret_stack, regs);
11870
11871 @@ -29185,8 +30614,35 @@ index ade185a..2452e8b 100644
11872 /* Copy the IRET target to the new stack. */
11873 memmove(&new_stack->regs.ip, (void *)s->regs.sp, 5*8);
11874
11875 +@@ -805,7 +854,7 @@ void __init early_trap_init(void)
11876 + * since we don't have trace_debug and it will be reset to
11877 + * 'debug' in trap_init() by set_intr_gate_ist().
11878 + */
11879 +- set_intr_gate_notrace(X86_TRAP_DB, debug);
11880 ++ set_intr_gate_notrace(X86_TRAP_DB, int1);
11881 + /* int3 can be called from all */
11882 + set_system_intr_gate(X86_TRAP_BP, &int3);
11883 + #ifdef CONFIG_X86_32
11884 +@@ -890,7 +939,7 @@ void __init trap_init(void)
11885 + * in early_trap_init(). However, ITS works only after
11886 + * cpu_init() loads TSS. See comments in early_trap_init().
11887 + */
11888 +- set_intr_gate_ist(X86_TRAP_DB, &debug, DEBUG_STACK);
11889 ++ set_intr_gate_ist(X86_TRAP_DB, &int1, DEBUG_STACK);
11890 + /* int3 can be called from all */
11891 + set_system_intr_gate_ist(X86_TRAP_BP, &int3, DEBUG_STACK);
11892 +
11893 +@@ -898,7 +947,7 @@ void __init trap_init(void)
11894 +
11895 + #ifdef CONFIG_X86_64
11896 + memcpy(&debug_idt_table, &idt_table, IDT_ENTRIES * 16);
11897 +- set_nmi_gate(X86_TRAP_DB, &debug);
11898 ++ set_nmi_gate(X86_TRAP_DB, &int1);
11899 + set_nmi_gate(X86_TRAP_BP, &int3);
11900 + #endif
11901 + }
11902 diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
11903 -index c7c4d9c..ddd1454 100644
11904 +index 3d743da..d74c208 100644
11905 --- a/arch/x86/kernel/tsc.c
11906 +++ b/arch/x86/kernel/tsc.c
11907 @@ -151,7 +151,7 @@ static void cyc2ns_write_end(int cpu, struct cyc2ns_data *data)
11908 @@ -29221,7 +30677,7 @@ index bf4db6e..624137c 100644
11909 force_sig_info(SIGSEGV, SEND_SIG_FORCED, current);
11910 }
11911 diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
11912 -index 4cf401f..ae8c9cf 100644
11913 +index 07efb35..2bf8766 100644
11914 --- a/arch/x86/kernel/verify_cpu.S
11915 +++ b/arch/x86/kernel/verify_cpu.S
11916 @@ -20,6 +20,7 @@
11917 @@ -29233,7 +30689,7 @@ index 4cf401f..ae8c9cf 100644
11918 * verify_cpu, returns the status of longmode and SSE in register %eax.
11919 * 0: Success 1: Failure
11920 diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
11921 -index 5246193..c6bed42 100644
11922 +index e574b85..5514c57 100644
11923 --- a/arch/x86/kernel/vm86_32.c
11924 +++ b/arch/x86/kernel/vm86_32.c
11925 @@ -144,7 +144,7 @@ void save_v86_state(struct kernel_vm86_regs *regs, int retval)
11926 @@ -29245,7 +30701,7 @@ index 5246193..c6bed42 100644
11927 tsk->thread.sp0 = vm86->saved_sp0;
11928 tsk->thread.sysenter_cs = __KERNEL_CS;
11929 load_sp0(tss, &tsk->thread);
11930 -@@ -259,6 +259,13 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
11931 +@@ -263,6 +263,13 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
11932 return -EPERM;
11933 }
11934
11935 @@ -29259,7 +30715,7 @@ index 5246193..c6bed42 100644
11936 if (!vm86) {
11937 if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL)))
11938 return -ENOMEM;
11939 -@@ -354,7 +361,7 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
11940 +@@ -358,7 +365,7 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
11941 vm86->saved_sp0 = tsk->thread.sp0;
11942 lazy_save_gs(vm86->regs32.gs);
11943
11944 @@ -29267,8 +30723,8 @@ index 5246193..c6bed42 100644
11945 + tss = cpu_tss + get_cpu();
11946 /* make room for real-mode segments */
11947 tsk->thread.sp0 += 16;
11948 - if (cpu_has_sep)
11949 -@@ -535,7 +542,7 @@ static void do_int(struct kernel_vm86_regs *regs, int i,
11950 +
11951 +@@ -541,7 +548,7 @@ static void do_int(struct kernel_vm86_regs *regs, int i,
11952 goto cannot_handle;
11953 if (i == 0x21 && is_revectored(AH(regs), &vm86->int21_revectored))
11954 goto cannot_handle;
11955 @@ -29277,7 +30733,7 @@ index 5246193..c6bed42 100644
11956 if (get_user(segoffs, intr_ptr))
11957 goto cannot_handle;
11958 if ((segoffs >> 16) == BIOSSEG)
11959 -@@ -828,6 +835,14 @@ static inline int get_and_reset_irq(int irqnumber)
11960 +@@ -834,6 +841,14 @@ static inline int get_and_reset_irq(int irqnumber)
11961 static int do_vm86_irq_handling(int subfunction, int irqnumber)
11962 {
11963 int ret;
11964 @@ -29584,10 +31040,10 @@ index a0695be..33e180c 100644
11965 +EXPORT_SYMBOL(cpu_pgd);
11966 +#endif
11967 diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
11968 -index 3839628..2e5b5b35 100644
11969 +index dad5fe9..ce5f4ba 100644
11970 --- a/arch/x86/kernel/x86_init.c
11971 +++ b/arch/x86/kernel/x86_init.c
11972 -@@ -92,7 +92,7 @@ struct x86_cpuinit_ops x86_cpuinit = {
11973 +@@ -91,7 +91,7 @@ struct x86_cpuinit_ops x86_cpuinit = {
11974 static void default_nmi_init(void) { };
11975 static int default_i8042_detect(void) { return 1; };
11976
11977 @@ -29596,7 +31052,7 @@ index 3839628..2e5b5b35 100644
11978 .calibrate_tsc = native_calibrate_tsc,
11979 .get_wallclock = mach_get_cmos_time,
11980 .set_wallclock = mach_set_rtc_mmss,
11981 -@@ -108,7 +108,7 @@ struct x86_platform_ops x86_platform = {
11982 +@@ -107,7 +107,7 @@ struct x86_platform_ops x86_platform = {
11983 EXPORT_SYMBOL_GPL(x86_platform);
11984
11985 #if defined(CONFIG_PCI_MSI)
11986 @@ -29605,7 +31061,7 @@ index 3839628..2e5b5b35 100644
11987 .setup_msi_irqs = native_setup_msi_irqs,
11988 .teardown_msi_irq = native_teardown_msi_irq,
11989 .teardown_msi_irqs = default_teardown_msi_irqs,
11990 -@@ -137,7 +137,7 @@ void arch_restore_msi_irqs(struct pci_dev *dev)
11991 +@@ -136,7 +136,7 @@ void arch_restore_msi_irqs(struct pci_dev *dev)
11992 }
11993 #endif
11994
11995 @@ -29666,9 +31122,18 @@ index 6525e92..28559d2 100644
11996
11997 out:
11998 diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
11999 -index b9b09fe..138addd 100644
12000 +index b9b09fe..2e1cfb3 100644
12001 --- a/arch/x86/kvm/emulate.c
12002 +++ b/arch/x86/kvm/emulate.c
12003 +@@ -959,7 +959,7 @@ static int em_bsr_c(struct x86_emulate_ctxt *ctxt)
12004 + static u8 test_cc(unsigned int condition, unsigned long flags)
12005 + {
12006 + u8 rc;
12007 +- void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf);
12008 ++ void (*fop)(struct fastop *) = (void *)em_setcc + 4 * (condition & 0xf);
12009 +
12010 + flags = (flags & EFLAGS_MASK) | X86_EFLAGS_IF;
12011 + asm("push %[flags]; popf; call *%[fastop]"
12012 @@ -1881,7 +1881,7 @@ static int em_push_sreg(struct x86_emulate_ctxt *ctxt)
12013 static int em_pop_sreg(struct x86_emulate_ctxt *ctxt)
12014 {
12015 @@ -29696,6 +31161,37 @@ index b9b09fe..138addd 100644
12016 0xffffffff00000000ULL,
12017 0, 0, 0, /* CR3 checked later */
12018 CR4_RESERVED_BITS,
12019 +@@ -4956,7 +4956,10 @@ done_prefixes:
12020 + if (ctxt->d == 0)
12021 + return EMULATION_FAILED;
12022 +
12023 +- ctxt->execute = opcode.u.execute;
12024 ++ if (ctxt->d & Fastop)
12025 ++ ctxt->u.fastop = opcode.u.fastop;
12026 ++ else
12027 ++ ctxt->u.execute = opcode.u.execute;
12028 +
12029 + if (unlikely(ctxt->ud) && likely(!(ctxt->d & EmulateOnUD)))
12030 + return EMULATION_FAILED;
12031 +@@ -5267,15 +5270,14 @@ special_insn:
12032 + else
12033 + ctxt->eflags &= ~X86_EFLAGS_RF;
12034 +
12035 +- if (ctxt->execute) {
12036 ++ if (ctxt->u.execute) {
12037 + if (ctxt->d & Fastop) {
12038 +- void (*fop)(struct fastop *) = (void *)ctxt->execute;
12039 +- rc = fastop(ctxt, fop);
12040 ++ rc = fastop(ctxt, ctxt->u.fastop);
12041 + if (rc != X86EMUL_CONTINUE)
12042 + goto done;
12043 + goto writeback;
12044 + }
12045 +- rc = ctxt->execute(ctxt);
12046 ++ rc = ctxt->u.execute(ctxt);
12047 + if (rc != X86EMUL_CONTINUE)
12048 + goto done;
12049 + goto writeback;
12050 diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
12051 index 7cc2360..6ae1236 100644
12052 --- a/arch/x86/kvm/i8259.c
12053 @@ -29766,7 +31262,7 @@ index 7cc2360..6ae1236 100644
12054 {
12055 struct kvm_kpic_state *s = opaque;
12056 diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
12057 -index 88d0a92..fa8b52a 100644
12058 +index 1facfd6..51dcfd3 100644
12059 --- a/arch/x86/kvm/ioapic.c
12060 +++ b/arch/x86/kvm/ioapic.c
12061 @@ -405,6 +405,8 @@ static void kvm_ioapic_eoi_inject_work(struct work_struct *work)
12062 @@ -29779,10 +31275,10 @@ index 88d0a92..fa8b52a 100644
12063 {
12064 int i;
12065 diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
12066 -index 4d30b86..94115f0 100644
12067 +index 36591fa..3b2fa3f 100644
12068 --- a/arch/x86/kvm/lapic.c
12069 +++ b/arch/x86/kvm/lapic.c
12070 -@@ -56,7 +56,7 @@
12071 +@@ -57,7 +57,7 @@
12072 #define APIC_BUS_CYCLE_NS 1
12073
12074 /* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
12075 @@ -29792,7 +31288,7 @@ index 4d30b86..94115f0 100644
12076 #define APIC_LVT_NUM 6
12077 /* 14 is the version for Xeon and Pentium 8.4.8*/
12078 diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
12079 -index 7be8a25..7d71250 100644
12080 +index 2ce4f05..ab8fa72 100644
12081 --- a/arch/x86/kvm/paging_tmpl.h
12082 +++ b/arch/x86/kvm/paging_tmpl.h
12083 @@ -335,7 +335,7 @@ retry_walk:
12084 @@ -29805,10 +31301,10 @@ index 7be8a25..7d71250 100644
12085 goto error;
12086 walker->ptep_user[walker->level - 1] = ptep_user;
12087 diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
12088 -index 899c40f..a114588 100644
12089 +index c13a64b..2075a7c 100644
12090 --- a/arch/x86/kvm/svm.c
12091 +++ b/arch/x86/kvm/svm.c
12092 -@@ -3490,7 +3490,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
12093 +@@ -3529,7 +3529,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
12094 int cpu = raw_smp_processor_id();
12095
12096 struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
12097 @@ -29820,7 +31316,7 @@ index 899c40f..a114588 100644
12098 load_TR_desc();
12099 }
12100
12101 -@@ -3885,6 +3889,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
12102 +@@ -3928,6 +3932,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
12103 #endif
12104 #endif
12105
12106 @@ -29831,7 +31327,7 @@ index 899c40f..a114588 100644
12107 reload_tss(vcpu);
12108
12109 local_irq_disable();
12110 -@@ -4260,7 +4268,7 @@ static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu)
12111 +@@ -4303,7 +4311,7 @@ static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu)
12112 {
12113 }
12114
12115 @@ -29841,25 +31337,27 @@ index 899c40f..a114588 100644
12116 .disabled_by_bios = is_disabled,
12117 .hardware_setup = svm_hardware_setup,
12118 diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
12119 -index f34ab71..049ebd8 100644
12120 +index 539062e..0aa69ab 100644
12121 --- a/arch/x86/kvm/vmx.c
12122 +++ b/arch/x86/kvm/vmx.c
12123 -@@ -1514,12 +1514,12 @@ static void vmcs_write64(unsigned long field, u64 value)
12124 - #endif
12125 +@@ -1575,14 +1575,14 @@ static __always_inline void vmcs_writel(unsigned long field, unsigned long value
12126 + __vmcs_writel(field, value);
12127 }
12128
12129 --static void vmcs_clear_bits(unsigned long field, u32 mask)
12130 -+static void vmcs_clear_bits(unsigned long field, unsigned long mask)
12131 +-static __always_inline void vmcs_clear_bits(unsigned long field, u32 mask)
12132 ++static __always_inline void vmcs_clear_bits(unsigned long field, unsigned long mask)
12133 {
12134 - vmcs_writel(field, vmcs_readl(field) & ~mask);
12135 + BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000,
12136 + "vmcs_clear_bits does not support 64-bit fields");
12137 + __vmcs_writel(field, __vmcs_readl(field) & ~mask);
12138 }
12139
12140 --static void vmcs_set_bits(unsigned long field, u32 mask)
12141 -+static void vmcs_set_bits(unsigned long field, unsigned long mask)
12142 +-static __always_inline void vmcs_set_bits(unsigned long field, u32 mask)
12143 ++static __always_inline void vmcs_set_bits(unsigned long field, unsigned long mask)
12144 {
12145 - vmcs_writel(field, vmcs_readl(field) | mask);
12146 - }
12147 -@@ -1786,7 +1786,11 @@ static void reload_tss(void)
12148 + BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000,
12149 + "vmcs_set_bits does not support 64-bit fields");
12150 +@@ -1851,7 +1851,11 @@ static void reload_tss(void)
12151 struct desc_struct *descs;
12152
12153 descs = (void *)gdt->address;
12154 @@ -29871,7 +31369,7 @@ index f34ab71..049ebd8 100644
12155 load_TR_desc();
12156 }
12157
12158 -@@ -2078,6 +2082,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
12159 +@@ -2143,6 +2147,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
12160 vmcs_writel(HOST_TR_BASE, kvm_read_tr_base()); /* 22.2.4 */
12161 vmcs_writel(HOST_GDTR_BASE, gdt->address); /* 22.2.4 */
12162
12163 @@ -29882,7 +31380,7 @@ index f34ab71..049ebd8 100644
12164 rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp);
12165 vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */
12166
12167 -@@ -2395,7 +2403,7 @@ static void setup_msrs(struct vcpu_vmx *vmx)
12168 +@@ -2460,7 +2468,7 @@ static void setup_msrs(struct vcpu_vmx *vmx)
12169 * guest_tsc = (host_tsc * tsc multiplier) >> 48 + tsc_offset
12170 * -- Intel TSC Scaling for Virtualization White Paper, sec 1.3
12171 */
12172 @@ -29891,7 +31389,7 @@ index f34ab71..049ebd8 100644
12173 {
12174 u64 host_tsc, tsc_offset;
12175
12176 -@@ -4633,7 +4641,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
12177 +@@ -4693,7 +4701,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
12178 unsigned long cr4;
12179
12180 vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */
12181 @@ -29902,7 +31400,7 @@ index f34ab71..049ebd8 100644
12182
12183 /* Save the most likely value for this task's CR4 in the VMCS. */
12184 cr4 = cr4_read_shadow();
12185 -@@ -4660,7 +4671,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
12186 +@@ -4720,7 +4731,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
12187 vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */
12188 vmx->host_idt_base = dt.address;
12189
12190 @@ -29911,7 +31409,7 @@ index f34ab71..049ebd8 100644
12191
12192 rdmsr(MSR_IA32_SYSENTER_CS, low32, high32);
12193 vmcs_write32(HOST_IA32_SYSENTER_CS, low32);
12194 -@@ -6210,11 +6221,17 @@ static __init int hardware_setup(void)
12195 +@@ -6277,11 +6288,17 @@ static __init int hardware_setup(void)
12196 * page upon invalidation. No need to do anything if not
12197 * using the APIC_ACCESS_ADDR VMCS field.
12198 */
12199 @@ -29931,23 +31429,7 @@ index f34ab71..049ebd8 100644
12200
12201 if (enable_ept && !cpu_has_vmx_ept_2m_page())
12202 kvm_disable_largepages();
12203 -@@ -6231,6 +6248,7 @@ static __init int hardware_setup(void)
12204 - kvm_tsc_scaling_ratio_frac_bits = 48;
12205 - }
12206 -
12207 -+ pax_open_kernel();
12208 - if (enable_apicv)
12209 - kvm_x86_ops->update_cr8_intercept = NULL;
12210 - else {
12211 -@@ -6239,6 +6257,7 @@ static __init int hardware_setup(void)
12212 - kvm_x86_ops->deliver_posted_interrupt = NULL;
12213 - kvm_x86_ops->sync_pir_to_irr = vmx_sync_pir_to_irr_dummy;
12214 - }
12215 -+ pax_close_kernel();
12216 -
12217 - vmx_disable_intercept_for_msr(MSR_FS_BASE, false);
12218 - vmx_disable_intercept_for_msr(MSR_GS_BASE, false);
12219 -@@ -6293,10 +6312,12 @@ static __init int hardware_setup(void)
12220 +@@ -6351,10 +6368,12 @@ static __init int hardware_setup(void)
12221 enable_pml = 0;
12222
12223 if (!enable_pml) {
12224 @@ -29960,7 +31442,7 @@ index f34ab71..049ebd8 100644
12225 }
12226
12227 kvm_set_posted_intr_wakeup_handler(wakeup_handler);
12228 -@@ -8615,6 +8636,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12229 +@@ -8673,6 +8692,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12230 "jmp 2f \n\t"
12231 "1: " __ex(ASM_VMX_VMRESUME) "\n\t"
12232 "2: "
12233 @@ -29973,7 +31455,7 @@ index f34ab71..049ebd8 100644
12234 /* Save guest registers, load host registers, keep flags */
12235 "mov %0, %c[wordsize](%%" _ASM_SP ") \n\t"
12236 "pop %0 \n\t"
12237 -@@ -8667,6 +8694,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12238 +@@ -8725,6 +8750,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12239 #endif
12240 [cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)),
12241 [wordsize]"i"(sizeof(ulong))
12242 @@ -29985,7 +31467,7 @@ index f34ab71..049ebd8 100644
12243 : "cc", "memory"
12244 #ifdef CONFIG_X86_64
12245 , "rax", "rbx", "rdi", "rsi"
12246 -@@ -8680,7 +8712,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12247 +@@ -8738,7 +8768,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12248 if (debugctlmsr)
12249 update_debugctlmsr(debugctlmsr);
12250
12251 @@ -29994,7 +31476,7 @@ index f34ab71..049ebd8 100644
12252 /*
12253 * The sysexit path does not restore ds/es, so we must set them to
12254 * a reasonable value ourselves.
12255 -@@ -8689,8 +8721,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12256 +@@ -8747,8 +8777,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
12257 * may be executed in interrupt context, which saves and restore segments
12258 * around it, nullifying its effect.
12259 */
12260 @@ -30015,7 +31497,7 @@ index f34ab71..049ebd8 100644
12261 #endif
12262
12263 vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)
12264 -@@ -10772,7 +10814,7 @@ out:
12265 +@@ -10830,7 +10870,7 @@ out:
12266 return ret;
12267 }
12268
12269 @@ -30025,10 +31507,10 @@ index f34ab71..049ebd8 100644
12270 .disabled_by_bios = vmx_disabled_by_bios,
12271 .hardware_setup = hardware_setup,
12272 diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
12273 -index 7eb4ebd..9431608 100644
12274 +index eca5bd9..5cf1b68 100644
12275 --- a/arch/x86/kvm/x86.c
12276 +++ b/arch/x86/kvm/x86.c
12277 -@@ -1937,8 +1937,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
12278 +@@ -1945,8 +1945,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
12279 {
12280 struct kvm *kvm = vcpu->kvm;
12281 int lm = is_long_mode(vcpu);
12282 @@ -30039,7 +31521,7 @@ index 7eb4ebd..9431608 100644
12283 u8 blob_size = lm ? kvm->arch.xen_hvm_config.blob_size_64
12284 : kvm->arch.xen_hvm_config.blob_size_32;
12285 u32 page_num = data & ~PAGE_MASK;
12286 -@@ -2636,6 +2636,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
12287 +@@ -2647,6 +2647,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
12288 if (n < msr_list.nmsrs)
12289 goto out;
12290 r = -EFAULT;
12291 @@ -30048,7 +31530,7 @@ index 7eb4ebd..9431608 100644
12292 if (copy_to_user(user_msr_list->indices, &msrs_to_save,
12293 num_msrs_to_save * sizeof(u32)))
12294 goto out;
12295 -@@ -3029,7 +3031,7 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,
12296 +@@ -3047,7 +3049,7 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,
12297
12298 static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
12299 {
12300 @@ -30057,7 +31539,7 @@ index 7eb4ebd..9431608 100644
12301 u64 xstate_bv = xsave->header.xfeatures;
12302 u64 valid;
12303
12304 -@@ -3065,7 +3067,7 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
12305 +@@ -3083,7 +3085,7 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
12306
12307 static void load_xsave(struct kvm_vcpu *vcpu, u8 *src)
12308 {
12309 @@ -30066,7 +31548,7 @@ index 7eb4ebd..9431608 100644
12310 u64 xstate_bv = *(u64 *)(src + XSAVE_HDR_OFFSET);
12311 u64 valid;
12312
12313 -@@ -3109,7 +3111,7 @@ static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
12314 +@@ -3127,7 +3129,7 @@ static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
12315 fill_xsave((u8 *) guest_xsave->region, vcpu);
12316 } else {
12317 memcpy(guest_xsave->region,
12318 @@ -30075,7 +31557,7 @@ index 7eb4ebd..9431608 100644
12319 sizeof(struct fxregs_state));
12320 *(u64 *)&guest_xsave->region[XSAVE_HDR_OFFSET / sizeof(u32)] =
12321 XFEATURE_MASK_FPSSE;
12322 -@@ -3134,7 +3136,7 @@ static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,
12323 +@@ -3152,7 +3154,7 @@ static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,
12324 } else {
12325 if (xstate_bv & ~XFEATURE_MASK_FPSSE)
12326 return -EINVAL;
12327 @@ -30084,7 +31566,7 @@ index 7eb4ebd..9431608 100644
12328 guest_xsave->region, sizeof(struct fxregs_state));
12329 }
12330 return 0;
12331 -@@ -6362,6 +6364,7 @@ void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
12332 +@@ -6422,6 +6424,7 @@ void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
12333 * exiting to the userspace. Otherwise, the value will be returned to the
12334 * userspace.
12335 */
12336 @@ -30092,7 +31574,7 @@ index 7eb4ebd..9431608 100644
12337 static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
12338 {
12339 int r;
12340 -@@ -6612,6 +6615,7 @@ out:
12341 +@@ -6686,6 +6689,7 @@ out:
12342 return r;
12343 }
12344
12345 @@ -30100,7 +31582,7 @@ index 7eb4ebd..9431608 100644
12346 static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu)
12347 {
12348 if (!kvm_arch_vcpu_runnable(vcpu) &&
12349 -@@ -7159,7 +7163,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
12350 +@@ -7233,7 +7237,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
12351 int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
12352 {
12353 struct fxregs_state *fxsave =
12354 @@ -30109,7 +31591,7 @@ index 7eb4ebd..9431608 100644
12355
12356 memcpy(fpu->fpr, fxsave->st_space, 128);
12357 fpu->fcw = fxsave->cwd;
12358 -@@ -7176,7 +7180,7 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
12359 +@@ -7250,7 +7254,7 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
12360 int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
12361 {
12362 struct fxregs_state *fxsave =
12363 @@ -30118,7 +31600,7 @@ index 7eb4ebd..9431608 100644
12364
12365 memcpy(fxsave->st_space, fpu->fpr, 128);
12366 fxsave->cwd = fpu->fcw;
12367 -@@ -7192,9 +7196,9 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
12368 +@@ -7266,9 +7270,9 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
12369
12370 static void fx_init(struct kvm_vcpu *vcpu)
12371 {
12372 @@ -30130,7 +31612,7 @@ index 7eb4ebd..9431608 100644
12373 host_xcr0 | XSTATE_COMPACTION_ENABLED;
12374
12375 /*
12376 -@@ -7218,7 +7222,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
12377 +@@ -7292,7 +7296,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
12378 kvm_put_guest_xcr0(vcpu);
12379 vcpu->guest_fpu_loaded = 1;
12380 __kernel_fpu_begin();
12381 @@ -30139,7 +31621,7 @@ index 7eb4ebd..9431608 100644
12382 trace_kvm_fpu(1);
12383 }
12384
12385 -@@ -7521,6 +7525,8 @@ bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
12386 +@@ -7595,6 +7599,8 @@ bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
12387
12388 struct static_key kvm_no_apic_vcpu __read_mostly;
12389
12390 @@ -30148,7 +31630,7 @@ index 7eb4ebd..9431608 100644
12391 int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
12392 {
12393 struct page *page;
12394 -@@ -7537,11 +7543,14 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
12395 +@@ -7612,11 +7618,14 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
12396 else
12397 vcpu->arch.mp_state = KVM_MP_STATE_UNINITIALIZED;
12398
12399 @@ -30167,7 +31649,7 @@ index 7eb4ebd..9431608 100644
12400 vcpu->arch.pio_data = page_address(page);
12401
12402 kvm_set_tsc_khz(vcpu, max_tsc_khz);
12403 -@@ -7597,6 +7606,9 @@ fail_mmu_destroy:
12404 +@@ -7674,6 +7683,9 @@ fail_mmu_destroy:
12405 kvm_mmu_destroy(vcpu);
12406 fail_free_pio_data:
12407 free_page((unsigned long)vcpu->arch.pio_data);
12408 @@ -30177,7 +31659,7 @@ index 7eb4ebd..9431608 100644
12409 fail:
12410 return r;
12411 }
12412 -@@ -7614,6 +7626,8 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
12413 +@@ -7692,6 +7704,8 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
12414 free_page((unsigned long)vcpu->arch.pio_data);
12415 if (!lapic_in_kernel(vcpu))
12416 static_key_slow_dec(&kvm_no_apic_vcpu);
12417 @@ -30187,7 +31669,7 @@ index 7eb4ebd..9431608 100644
12418
12419 void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu)
12420 diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
12421 -index a43b2ea..e64e453 100644
12422 +index 4ba229a..470f861 100644
12423 --- a/arch/x86/lguest/boot.c
12424 +++ b/arch/x86/lguest/boot.c
12425 @@ -1336,9 +1336,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
12426 @@ -32779,10 +34261,10 @@ index 5e044d5..d342fce 100644
12427
12428 #define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs))
12429 diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
12430 -index 65c47fd..3e0fd98 100644
12431 +index f9d38a4..556175f 100644
12432 --- a/arch/x86/mm/Makefile
12433 +++ b/arch/x86/mm/Makefile
12434 -@@ -33,3 +33,7 @@ obj-$(CONFIG_ACPI_NUMA) += srat.o
12435 +@@ -34,3 +34,7 @@ obj-$(CONFIG_ACPI_NUMA) += srat.o
12436 obj-$(CONFIG_NUMA_EMU) += numa_emulation.o
12437
12438 obj-$(CONFIG_X86_INTEL_MPX) += mpx.o
12439 @@ -33590,10 +35072,10 @@ index e830c71..f7e9e6c 100644
12440 + return ret ? -EFAULT : 0;
12441 +}
12442 diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
12443 -index ae9a37b..c5f8310 100644
12444 +index d8a798d..6f803ca 100644
12445 --- a/arch/x86/mm/gup.c
12446 +++ b/arch/x86/mm/gup.c
12447 -@@ -266,7 +266,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
12448 +@@ -302,7 +302,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
12449 addr = start;
12450 len = (unsigned long) nr_pages << PAGE_SHIFT;
12451 end = start + len;
12452 @@ -33602,7 +35084,7 @@ index ae9a37b..c5f8310 100644
12453 (void __user *)start, len)))
12454 return 0;
12455
12456 -@@ -342,6 +342,10 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
12457 +@@ -378,6 +378,10 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
12458 goto slow_irqon;
12459 #endif
12460
12461 @@ -33639,7 +35121,7 @@ index a6d7392..3b105a8 100644
12462
12463 return (void *)vaddr;
12464 diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
12465 -index 42982b2..7168fc3 100644
12466 +index 740d7ac..4091827 100644
12467 --- a/arch/x86/mm/hugetlbpage.c
12468 +++ b/arch/x86/mm/hugetlbpage.c
12469 @@ -74,23 +74,24 @@ int pud_huge(pud_t pud)
12470 @@ -34204,10 +35686,10 @@ index cb4ef3d..377ec5a 100644
12471 printk(KERN_INFO "Write protecting the kernel text: %luk\n",
12472 size >> 10);
12473 diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
12474 -index ec081fe..14e8743 100644
12475 +index 5488d21..6063860 100644
12476 --- a/arch/x86/mm/init_64.c
12477 +++ b/arch/x86/mm/init_64.c
12478 -@@ -136,7 +136,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
12479 +@@ -137,7 +137,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
12480 * around without checking the pgd every time.
12481 */
12482
12483 @@ -34216,7 +35698,7 @@ index ec081fe..14e8743 100644
12484 EXPORT_SYMBOL_GPL(__supported_pte_mask);
12485
12486 int force_personality32;
12487 -@@ -169,7 +169,12 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12488 +@@ -170,7 +170,12 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12489
12490 for (address = start; address <= end; address += PGDIR_SIZE) {
12491 const pgd_t *pgd_ref = pgd_offset_k(address);
12492 @@ -34229,7 +35711,7 @@ index ec081fe..14e8743 100644
12493
12494 /*
12495 * When it is called after memory hot remove, pgd_none()
12496 -@@ -180,6 +185,25 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12497 +@@ -181,6 +186,25 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12498 continue;
12499
12500 spin_lock(&pgd_lock);
12501 @@ -34255,7 +35737,7 @@ index ec081fe..14e8743 100644
12502 list_for_each_entry(page, &pgd_list, lru) {
12503 pgd_t *pgd;
12504 spinlock_t *pgt_lock;
12505 -@@ -188,6 +212,7 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12506 +@@ -189,6 +213,7 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12507 /* the pgt_lock only for Xen */
12508 pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
12509 spin_lock(pgt_lock);
12510 @@ -34263,7 +35745,7 @@ index ec081fe..14e8743 100644
12511
12512 if (!pgd_none(*pgd_ref) && !pgd_none(*pgd))
12513 BUG_ON(pgd_page_vaddr(*pgd)
12514 -@@ -201,7 +226,10 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12515 +@@ -202,7 +227,10 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
12516 set_pgd(pgd, *pgd_ref);
12517 }
12518
12519 @@ -34274,7 +35756,7 @@ index ec081fe..14e8743 100644
12520 }
12521 spin_unlock(&pgd_lock);
12522 }
12523 -@@ -234,7 +262,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
12524 +@@ -235,7 +263,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
12525 {
12526 if (pgd_none(*pgd)) {
12527 pud_t *pud = (pud_t *)spp_getpage();
12528 @@ -34283,7 +35765,7 @@ index ec081fe..14e8743 100644
12529 if (pud != pud_offset(pgd, 0))
12530 printk(KERN_ERR "PAGETABLE BUG #00! %p <-> %p\n",
12531 pud, pud_offset(pgd, 0));
12532 -@@ -246,7 +274,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
12533 +@@ -247,7 +275,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
12534 {
12535 if (pud_none(*pud)) {
12536 pmd_t *pmd = (pmd_t *) spp_getpage();
12537 @@ -34292,7 +35774,7 @@ index ec081fe..14e8743 100644
12538 if (pmd != pmd_offset(pud, 0))
12539 printk(KERN_ERR "PAGETABLE BUG #01! %p <-> %p\n",
12540 pmd, pmd_offset(pud, 0));
12541 -@@ -275,7 +303,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
12542 +@@ -276,7 +304,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
12543 pmd = fill_pmd(pud, vaddr);
12544 pte = fill_pte(pmd, vaddr);
12545
12546 @@ -34302,7 +35784,7 @@ index ec081fe..14e8743 100644
12547
12548 /*
12549 * It's enough to flush this one mapping.
12550 -@@ -337,14 +367,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
12551 +@@ -338,14 +368,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
12552 pgd = pgd_offset_k((unsigned long)__va(phys));
12553 if (pgd_none(*pgd)) {
12554 pud = (pud_t *) spp_getpage();
12555 @@ -34319,7 +35801,7 @@ index ec081fe..14e8743 100644
12556 }
12557 pmd = pmd_offset(pud, phys);
12558 BUG_ON(!pmd_none(*pmd));
12559 -@@ -585,7 +613,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
12560 +@@ -586,7 +614,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
12561 prot);
12562
12563 spin_lock(&init_mm.page_table_lock);
12564 @@ -34328,7 +35810,7 @@ index ec081fe..14e8743 100644
12565 spin_unlock(&init_mm.page_table_lock);
12566 }
12567 __flush_tlb_all();
12568 -@@ -626,7 +654,7 @@ kernel_physical_mapping_init(unsigned long start,
12569 +@@ -627,7 +655,7 @@ kernel_physical_mapping_init(unsigned long start,
12570 page_size_mask);
12571
12572 spin_lock(&init_mm.page_table_lock);
12573 @@ -34354,7 +35836,7 @@ index 9c0ff04..9020d5f 100644
12574
12575 return (void *)vaddr;
12576 diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
12577 -index b9c78f3..c757af4 100644
12578 +index 0d8d53d..5f7315c 100644
12579 --- a/arch/x86/mm/ioremap.c
12580 +++ b/arch/x86/mm/ioremap.c
12581 @@ -59,8 +59,8 @@ static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
12582 @@ -34464,7 +35946,7 @@ index b4f2e7e..96c9c3e 100644
12583
12584 pte = kmemcheck_pte_lookup(address);
12585 diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
12586 -index 844b06d..f363c86 100644
12587 +index 72bb52f..4bc6d52 100644
12588 --- a/arch/x86/mm/mmap.c
12589 +++ b/arch/x86/mm/mmap.c
12590 @@ -52,7 +52,7 @@ static unsigned long stack_maxrandom_size(void)
12591 @@ -34631,18 +36113,9 @@ index ef05755..7125725 100644
12592 err_out:
12593 /* info might be NULL, but kfree() handles that */
12594 diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
12595 -index c3b3f65..5bfe5dc 100644
12596 +index d04f809..683f0be 100644
12597 --- a/arch/x86/mm/numa.c
12598 +++ b/arch/x86/mm/numa.c
12599 -@@ -469,7 +469,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
12600 - {
12601 - int i, nid;
12602 - nodemask_t numa_kernel_nodes = NODE_MASK_NONE;
12603 -- unsigned long start, end;
12604 -+ u64 start, end;
12605 - struct memblock_region *r;
12606 -
12607 - /*
12608 @@ -508,7 +508,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
12609 }
12610 }
12611 @@ -34653,10 +36126,10 @@ index c3b3f65..5bfe5dc 100644
12612 unsigned long uninitialized_var(pfn_align);
12613 int i, nid;
12614 diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
12615 -index b599a78..4ac899d 100644
12616 +index 9cf96d8..ce09f13 100644
12617 --- a/arch/x86/mm/pageattr.c
12618 +++ b/arch/x86/mm/pageattr.c
12619 -@@ -259,7 +259,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12620 +@@ -264,7 +264,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12621 */
12622 #ifdef CONFIG_PCI_BIOS
12623 if (pcibios_enabled && within(pfn, BIOS_BEGIN >> PAGE_SHIFT, BIOS_END >> PAGE_SHIFT))
12624 @@ -34665,7 +36138,7 @@ index b599a78..4ac899d 100644
12625 #endif
12626
12627 /*
12628 -@@ -267,9 +267,10 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12629 +@@ -272,9 +272,10 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12630 * Does not cover __inittext since that is gone later on. On
12631 * 64bit we do not enforce !NX on the low mapping
12632 */
12633 @@ -34678,7 +36151,7 @@ index b599a78..4ac899d 100644
12634 /*
12635 * The .rodata section needs to be read-only. Using the pfn
12636 * catches all aliases.
12637 -@@ -277,6 +278,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12638 +@@ -282,6 +283,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12639 if (within(pfn, __pa_symbol(__start_rodata) >> PAGE_SHIFT,
12640 __pa_symbol(__end_rodata) >> PAGE_SHIFT))
12641 pgprot_val(forbidden) |= _PAGE_RW;
12642 @@ -34686,7 +36159,7 @@ index b599a78..4ac899d 100644
12643
12644 #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
12645 /*
12646 -@@ -315,6 +317,13 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12647 +@@ -320,6 +322,13 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
12648 }
12649 #endif
12650
12651 @@ -34700,7 +36173,7 @@ index b599a78..4ac899d 100644
12652 prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
12653
12654 return prot;
12655 -@@ -451,23 +460,37 @@ EXPORT_SYMBOL_GPL(slow_virt_to_phys);
12656 +@@ -456,23 +465,37 @@ EXPORT_SYMBOL_GPL(slow_virt_to_phys);
12657 static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
12658 {
12659 /* change init_mm */
12660 @@ -34740,7 +36213,7 @@ index b599a78..4ac899d 100644
12661 }
12662
12663 static int
12664 -@@ -704,6 +727,10 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
12665 +@@ -709,6 +732,10 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
12666 return 0;
12667 }
12668
12669 @@ -34751,7 +36224,7 @@ index b599a78..4ac899d 100644
12670 static int split_large_page(struct cpa_data *cpa, pte_t *kpte,
12671 unsigned long address)
12672 {
12673 -@@ -1147,6 +1174,9 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
12674 +@@ -1152,6 +1179,9 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
12675 }
12676 }
12677
12678 @@ -34761,7 +36234,7 @@ index b599a78..4ac899d 100644
12679 static int __change_page_attr(struct cpa_data *cpa, int primary)
12680 {
12681 unsigned long address;
12682 -@@ -1205,7 +1235,9 @@ repeat:
12683 +@@ -1210,7 +1240,9 @@ repeat:
12684 * Do we really change anything ?
12685 */
12686 if (pte_val(old_pte) != pte_val(new_pte)) {
12687 @@ -34772,19 +36245,19 @@ index b599a78..4ac899d 100644
12688 }
12689 cpa->numpages = 1;
12690 diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
12691 -index 188e3e0..5c75446 100644
12692 +index f4ae536..e250eec 100644
12693 --- a/arch/x86/mm/pat.c
12694 +++ b/arch/x86/mm/pat.c
12695 -@@ -588,7 +588,7 @@ int free_memtype(u64 start, u64 end)
12696 +@@ -589,7 +589,7 @@ int free_memtype(u64 start, u64 end)
12697
12698 - if (!entry) {
12699 + if (IS_ERR(entry)) {
12700 pr_info("x86/PAT: %s:%d freeing invalid memtype [mem %#010Lx-%#010Lx]\n",
12701 - current->comm, current->pid, start, end - 1);
12702 + current->comm, task_pid_nr(current), start, end - 1);
12703 return -EINVAL;
12704 }
12705
12706 -@@ -711,8 +711,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
12707 +@@ -712,8 +712,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
12708
12709 while (cursor < to) {
12710 if (!devmem_is_allowed(pfn)) {
12711 @@ -34795,7 +36268,7 @@ index 188e3e0..5c75446 100644
12712 return 0;
12713 }
12714 cursor += PAGE_SIZE;
12715 -@@ -782,7 +782,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size,
12716 +@@ -783,7 +783,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size,
12717
12718 if (ioremap_change_attr((unsigned long)__va(base), id_sz, pcm) < 0) {
12719 pr_info("x86/PAT: %s:%d ioremap_change_attr failed %s for [mem %#010Lx-%#010Lx]\n",
12720 @@ -34804,7 +36277,7 @@ index 188e3e0..5c75446 100644
12721 cattr_name(pcm),
12722 base, (unsigned long long)(base + size-1));
12723 return -EINVAL;
12724 -@@ -817,7 +817,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
12725 +@@ -818,7 +818,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
12726 pcm = lookup_memtype(paddr);
12727 if (want_pcm != pcm) {
12728 pr_warn("x86/PAT: %s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s\n",
12729 @@ -34813,7 +36286,7 @@ index 188e3e0..5c75446 100644
12730 cattr_name(want_pcm),
12731 (unsigned long long)paddr,
12732 (unsigned long long)(paddr + size - 1),
12733 -@@ -838,7 +838,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
12734 +@@ -839,7 +839,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
12735 !is_new_memtype_allowed(paddr, size, want_pcm, pcm)) {
12736 free_memtype(paddr, paddr + size);
12737 pr_err("x86/PAT: %s:%d map pfn expected mapping type %s for [mem %#010Lx-%#010Lx], got %s\n",
12738 @@ -34823,10 +36296,10 @@ index 188e3e0..5c75446 100644
12739 (unsigned long long)paddr,
12740 (unsigned long long)(paddr + size - 1),
12741 diff --git a/arch/x86/mm/pat_rbtree.c b/arch/x86/mm/pat_rbtree.c
12742 -index 6393108..890adda 100644
12743 +index 2f770225..22a4d23 100644
12744 --- a/arch/x86/mm/pat_rbtree.c
12745 +++ b/arch/x86/mm/pat_rbtree.c
12746 -@@ -161,7 +161,7 @@ success:
12747 +@@ -171,7 +171,7 @@ success:
12748
12749 failure:
12750 pr_info("x86/PAT: %s:%d conflicting memory types %Lx-%Lx %s<->%s\n",
12751 @@ -34885,7 +36358,7 @@ index 9f0614d..92ae64a 100644
12752 p += get_opcode(p, &opcode);
12753 for (i = 0; i < ARRAY_SIZE(imm_wop); i++)
12754 diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
12755 -index fb0a9dd..5ab49c4 100644
12756 +index 4eb287e..e91945b 100644
12757 --- a/arch/x86/mm/pgtable.c
12758 +++ b/arch/x86/mm/pgtable.c
12759 @@ -98,10 +98,75 @@ static inline void pgd_list_del(pgd_t *pgd)
12760 @@ -35173,7 +36646,7 @@ index fb0a9dd..5ab49c4 100644
12761 pgd_dtor(pgd);
12762 paravirt_pgd_free(mm, pgd);
12763 _pgd_free(pgd);
12764 -@@ -544,6 +616,55 @@ void __init reserve_top_address(unsigned long reserve)
12765 +@@ -526,6 +598,50 @@ void __init reserve_top_address(unsigned long reserve)
12766
12767 int fixmaps_set;
12768
12769 @@ -35192,11 +36665,6 @@ index fb0a9dd..5ab49c4 100644
12770 + case VSYSCALL_PAGE:
12771 + break;
12772 +#endif
12773 -+
12774 -+#ifdef CONFIG_PARAVIRT_CLOCK
12775 -+ case PVCLOCK_FIXMAP_BEGIN ... PVCLOCK_FIXMAP_END:
12776 -+ break;
12777 -+#endif
12778 + }
12779 +
12780 + pgd = pgd_offset_k(address);
12781 @@ -35229,7 +36697,7 @@ index fb0a9dd..5ab49c4 100644
12782 void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
12783 {
12784 unsigned long address = __fix_to_virt(idx);
12785 -@@ -554,6 +675,7 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
12786 +@@ -536,6 +652,7 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
12787 }
12788 set_pte_vaddr(address, pte);
12789 fixmaps_set++;
12790 @@ -35237,7 +36705,7 @@ index fb0a9dd..5ab49c4 100644
12791 }
12792
12793 void native_set_fixmap(enum fixed_addresses idx, phys_addr_t phys,
12794 -@@ -620,9 +742,11 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
12795 +@@ -602,9 +719,11 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
12796
12797 prot = pgprot_4k_2_large(prot);
12798
12799 @@ -35268,7 +36736,7 @@ index 75cc097..79a097f 100644
12800 /*
12801 * It's enough to flush this one mapping.
12802 diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
12803 -index 90555bf..f5f1828 100644
12804 +index 92e2eac..92fc081 100644
12805 --- a/arch/x86/mm/setup_nx.c
12806 +++ b/arch/x86/mm/setup_nx.c
12807 @@ -5,8 +5,10 @@
12808 @@ -35293,7 +36761,7 @@ index 90555bf..f5f1828 100644
12809 void x86_configure_nx(void)
12810 {
12811 +#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
12812 - if (cpu_has_nx && !disable_nx)
12813 + if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx)
12814 __supported_pte_mask |= _PAGE_NX;
12815 else
12816 +#endif
12817 @@ -35449,7 +36917,7 @@ index 4093216..44b6b83 100644
12818 + pax_force_retaddr
12819 ret
12820 diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
12821 -index 7599197..8e986f3 100644
12822 +index 4286f36..54471fd 100644
12823 --- a/arch/x86/net/bpf_jit_comp.c
12824 +++ b/arch/x86/net/bpf_jit_comp.c
12825 @@ -14,7 +14,11 @@
12826 @@ -35474,7 +36942,7 @@ index 7599197..8e986f3 100644
12827 }
12828
12829 struct jit_context {
12830 -@@ -1030,7 +1036,9 @@ common_load:
12831 +@@ -1060,7 +1066,9 @@ common_load:
12832 pr_err("bpf_jit_compile fatal error\n");
12833 return -EFAULT;
12834 }
12835 @@ -35484,7 +36952,7 @@ index 7599197..8e986f3 100644
12836 }
12837 proglen += ilen;
12838 addrs[i] = proglen;
12839 -@@ -1107,7 +1115,6 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
12840 +@@ -1137,7 +1145,6 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
12841
12842 if (image) {
12843 bpf_flush_icache(header, image + proglen);
12844 @@ -35492,7 +36960,7 @@ index 7599197..8e986f3 100644
12845 prog->bpf_func = (void *)image;
12846 prog->jited = 1;
12847 }
12848 -@@ -1120,12 +1127,8 @@ void bpf_jit_free(struct bpf_prog *fp)
12849 +@@ -1150,12 +1157,8 @@ void bpf_jit_free(struct bpf_prog *fp)
12850 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
12851 struct bpf_binary_header *header = (void *)addr;
12852
12853 @@ -35535,7 +37003,7 @@ index 4e664bd..2beeaa2 100644
12854 return NULL;
12855
12856 diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
12857 -index 1d2e639..f6ef82a 100644
12858 +index 1d2e639..d7f0e67 100644
12859 --- a/arch/x86/oprofile/nmi_int.c
12860 +++ b/arch/x86/oprofile/nmi_int.c
12861 @@ -23,6 +23,7 @@
12862 @@ -35546,6 +37014,15 @@ index 1d2e639..f6ef82a 100644
12863
12864 #include "op_counter.h"
12865 #include "op_x86_model.h"
12866 +@@ -614,7 +615,7 @@ enum __force_cpu_type {
12867 +
12868 + static int force_cpu_type;
12869 +
12870 +-static int set_cpu_type(const char *str, struct kernel_param *kp)
12871 ++static int set_cpu_type(const char *str, const struct kernel_param *kp)
12872 + {
12873 + if (!strcmp(str, "timer")) {
12874 + force_cpu_type = timer;
12875 @@ -785,8 +786,11 @@ int __init op_nmi_init(struct oprofile_operations *ops)
12876 if (ret)
12877 return ret;
12878 @@ -35671,7 +37148,7 @@ index 9bd1154..e9d4656 100644
12879 .callback = fix_broken_hp_bios_irq9,
12880 .ident = "HP Pavilion N5400 Series Laptop",
12881 diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
12882 -index 9b83b90..2c256c5 100644
12883 +index 9770e55..76067ec 100644
12884 --- a/arch/x86/pci/pcbios.c
12885 +++ b/arch/x86/pci/pcbios.c
12886 @@ -79,7 +79,7 @@ union bios32 {
12887 @@ -35803,129 +37280,51 @@ index 9b83b90..2c256c5 100644
12888 : "memory");
12889 local_irq_restore(flags);
12890
12891 -@@ -189,7 +235,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12892 -
12893 - switch (len) {
12894 - case 1:
12895 -- __asm__("lcall *(%%esi); cld\n\t"
12896 -+ __asm__("movw %w6, %%ds\n\t"
12897 -+ "lcall *%%ss:(%%esi); cld\n\t"
12898 -+ "push %%ss\n\t"
12899 -+ "pop %%ds\n\t"
12900 - "jc 1f\n\t"
12901 - "xor %%ah, %%ah\n"
12902 - "1:"
12903 -@@ -198,7 +247,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12904 - : "1" (PCIBIOS_READ_CONFIG_BYTE),
12905 - "b" (bx),
12906 - "D" ((long)reg),
12907 -- "S" (&pci_indirect));
12908 -+ "S" (&pci_indirect),
12909 -+ "r" (__PCIBIOS_DS));
12910 - /*
12911 - * Zero-extend the result beyond 8 bits, do not trust the
12912 - * BIOS having done it:
12913 -@@ -206,7 +256,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12914 - *value &= 0xff;
12915 - break;
12916 - case 2:
12917 -- __asm__("lcall *(%%esi); cld\n\t"
12918 -+ __asm__("movw %w6, %%ds\n\t"
12919 -+ "lcall *%%ss:(%%esi); cld\n\t"
12920 -+ "push %%ss\n\t"
12921 -+ "pop %%ds\n\t"
12922 - "jc 1f\n\t"
12923 - "xor %%ah, %%ah\n"
12924 - "1:"
12925 -@@ -215,7 +268,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12926 - : "1" (PCIBIOS_READ_CONFIG_WORD),
12927 - "b" (bx),
12928 - "D" ((long)reg),
12929 -- "S" (&pci_indirect));
12930 -+ "S" (&pci_indirect),
12931 -+ "r" (__PCIBIOS_DS));
12932 - /*
12933 - * Zero-extend the result beyond 16 bits, do not trust the
12934 - * BIOS having done it:
12935 -@@ -223,7 +277,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12936 - *value &= 0xffff;
12937 - break;
12938 - case 4:
12939 -- __asm__("lcall *(%%esi); cld\n\t"
12940 -+ __asm__("movw %w6, %%ds\n\t"
12941 -+ "lcall *%%ss:(%%esi); cld\n\t"
12942 -+ "push %%ss\n\t"
12943 -+ "pop %%ds\n\t"
12944 - "jc 1f\n\t"
12945 - "xor %%ah, %%ah\n"
12946 - "1:"
12947 -@@ -232,7 +289,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12948 - : "1" (PCIBIOS_READ_CONFIG_DWORD),
12949 - "b" (bx),
12950 - "D" ((long)reg),
12951 -- "S" (&pci_indirect));
12952 -+ "S" (&pci_indirect),
12953 -+ "r" (__PCIBIOS_DS));
12954 +@@ -202,7 +248,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
12955 break;
12956 }
12957
12958 -@@ -256,7 +314,10 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
12959 -
12960 - switch (len) {
12961 - case 1:
12962 -- __asm__("lcall *(%%esi); cld\n\t"
12963 -+ __asm__("movw %w6, %%ds\n\t"
12964 -+ "lcall *%%ss:(%%esi); cld\n\t"
12965 -+ "push %%ss\n\t"
12966 -+ "pop %%ds\n\t"
12967 - "jc 1f\n\t"
12968 - "xor %%ah, %%ah\n"
12969 - "1:"
12970 -@@ -265,10 +326,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
12971 - "c" (value),
12972 - "b" (bx),
12973 - "D" ((long)reg),
12974 -- "S" (&pci_indirect));
12975 -+ "S" (&pci_indirect),
12976 -+ "r" (__PCIBIOS_DS));
12977 - break;
12978 - case 2:
12979 -- __asm__("lcall *(%%esi); cld\n\t"
12980 -+ __asm__("movw %w6, %%ds\n\t"
12981 -+ "lcall *%%ss:(%%esi); cld\n\t"
12982 -+ "push %%ss\n\t"
12983 -+ "pop %%ds\n\t"
12984 - "jc 1f\n\t"
12985 - "xor %%ah, %%ah\n"
12986 - "1:"
12987 -@@ -277,10 +342,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
12988 - "c" (value),
12989 - "b" (bx),
12990 - "D" ((long)reg),
12991 -- "S" (&pci_indirect));
12992 -+ "S" (&pci_indirect),
12993 -+ "r" (__PCIBIOS_DS));
12994 - break;
12995 - case 4:
12996 -- __asm__("lcall *(%%esi); cld\n\t"
12997 -+ __asm__("movw %w6, %%ds\n\t"
12998 -+ "lcall *%%ss:(%%esi); cld\n\t"
12999 -+ "push %%ss\n\t"
13000 -+ "pop %%ds\n\t"
13001 - "jc 1f\n\t"
13002 - "xor %%ah, %%ah\n"
13003 - "1:"
13004 -@@ -289,7 +358,8 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
13005 - "c" (value),
13006 - "b" (bx),
13007 - "D" ((long)reg),
13008 -- "S" (&pci_indirect));
13009 -+ "S" (&pci_indirect),
13010 -+ "r" (__PCIBIOS_DS));
13011 +- __asm__("lcall *(%%esi); cld\n\t"
13012 ++ __asm__("movw %w6, %%ds\n\t"
13013 ++ "lcall *%%ss:(%%esi); cld\n\t"
13014 ++ "push %%ss\n\t"
13015 ++ "pop %%ds\n\t"
13016 + "jc 1f\n\t"
13017 + "xor %%ah, %%ah\n"
13018 + "1:"
13019 +@@ -211,7 +260,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
13020 + : "1" (number),
13021 + "b" (bx),
13022 + "D" ((long)reg),
13023 +- "S" (&pci_indirect));
13024 ++ "S" (&pci_indirect),
13025 ++ "r" (__PCIBIOS_DS));
13026 + /*
13027 + * Zero-extend the result beyond 8 or 16 bits, do not trust the
13028 + * BIOS having done it:
13029 +@@ -250,7 +300,10 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
13030 break;
13031 }
13032
13033 -@@ -394,10 +464,13 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
13034 +- __asm__("lcall *(%%esi); cld\n\t"
13035 ++ __asm__("movw %w6, %%ds\n\t"
13036 ++ "lcall *%%ss:(%%esi); cld\n\t"
13037 ++ "push %%ss\n\t"
13038 ++ "pop %%ds\n\t"
13039 + "jc 1f\n\t"
13040 + "xor %%ah, %%ah\n"
13041 + "1:"
13042 +@@ -259,7 +312,8 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
13043 + "c" (value),
13044 + "b" (bx),
13045 + "D" ((long)reg),
13046 +- "S" (&pci_indirect));
13047 ++ "S" (&pci_indirect),
13048 ++ "r" (__PCIBIOS_DS));
13049 +
13050 + raw_spin_unlock_irqrestore(&pci_config_lock, flags);
13051 +
13052 +@@ -362,10 +416,13 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
13053
13054 DBG("PCI: Fetching IRQ routing table... ");
13055 __asm__("push %%es\n\t"
13056 @@ -35940,7 +37339,7 @@ index 9b83b90..2c256c5 100644
13057 "jc 1f\n\t"
13058 "xor %%ah, %%ah\n"
13059 "1:"
13060 -@@ -408,7 +481,8 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
13061 +@@ -376,7 +433,8 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
13062 "1" (0),
13063 "D" ((long) &opt),
13064 "S" (&pci_indirect),
13065 @@ -35950,7 +37349,7 @@ index 9b83b90..2c256c5 100644
13066 : "memory");
13067 DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
13068 if (ret & 0xff00)
13069 -@@ -432,7 +506,10 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
13070 +@@ -400,7 +458,10 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
13071 {
13072 int ret;
13073
13074 @@ -35962,7 +37361,7 @@ index 9b83b90..2c256c5 100644
13075 "jc 1f\n\t"
13076 "xor %%ah, %%ah\n"
13077 "1:"
13078 -@@ -440,7 +517,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
13079 +@@ -408,7 +469,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
13080 : "0" (PCIBIOS_SET_PCI_HW_INT),
13081 "b" ((dev->bus->number << 8) | dev->devfn),
13082 "c" ((irq << 8) | (pin + 10)),
13083 @@ -35972,6 +37371,35 @@ index 9b83b90..2c256c5 100644
13084 return !(ret & 0xff00);
13085 }
13086 EXPORT_SYMBOL(pcibios_set_irq_routing);
13087 +diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c
13088 +index d57e480..20eb97a 100644
13089 +--- a/arch/x86/pci/vmd.c
13090 ++++ b/arch/x86/pci/vmd.c
13091 +@@ -374,7 +374,7 @@ static void vmd_teardown_dma_ops(struct vmd_dev *vmd)
13092 + #define ASSIGN_VMD_DMA_OPS(source, dest, fn) \
13093 + do { \
13094 + if (source->fn) \
13095 +- dest->fn = vmd_##fn; \
13096 ++ *(void **)&dest->fn = vmd_##fn; \
13097 + } while (0)
13098 +
13099 + static void vmd_setup_dma_ops(struct vmd_dev *vmd)
13100 +@@ -388,6 +388,7 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
13101 +
13102 + if (!source)
13103 + return;
13104 ++ pax_open_kernel();
13105 + ASSIGN_VMD_DMA_OPS(source, dest, alloc);
13106 + ASSIGN_VMD_DMA_OPS(source, dest, free);
13107 + ASSIGN_VMD_DMA_OPS(source, dest, mmap);
13108 +@@ -405,6 +406,7 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
13109 + #ifdef ARCH_HAS_DMA_GET_REQUIRED_MASK
13110 + ASSIGN_VMD_DMA_OPS(source, dest, get_required_mask);
13111 + #endif
13112 ++ pax_close_kernel();
13113 + add_dma_domain(domain);
13114 + }
13115 + #undef ASSIGN_VMD_DMA_OPS
13116 diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
13117 index ed5b673..24d2d53 100644
13118 --- a/arch/x86/platform/efi/efi_32.c
13119 @@ -36221,7 +37649,7 @@ index 86d0f9e..6d499f4 100644
13120 ENDPROC(efi_call)
13121
13122 diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c
13123 -index 1bbc21e..8a50853 100644
13124 +index 90bb997..3cca066 100644
13125 --- a/arch/x86/platform/intel-mid/intel-mid.c
13126 +++ b/arch/x86/platform/intel-mid/intel-mid.c
13127 @@ -63,7 +63,7 @@ enum intel_mid_timer_options intel_mid_timer_options;
13128 @@ -36318,10 +37746,10 @@ index d6ee929..3637cb5 100644
13129 .getproplen = olpc_dt_getproplen,
13130 .getproperty = olpc_dt_getproperty,
13131 diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
13132 -index 9ab5279..8ba4611 100644
13133 +index d5f6499..12939f1 100644
13134 --- a/arch/x86/power/cpu.c
13135 +++ b/arch/x86/power/cpu.c
13136 -@@ -134,11 +134,8 @@ static void do_fpu_end(void)
13137 +@@ -159,11 +159,8 @@ static void do_fpu_end(void)
13138 static void fix_processor_context(void)
13139 {
13140 int cpu = smp_processor_id();
13141 @@ -36335,7 +37763,7 @@ index 9ab5279..8ba4611 100644
13142 set_tss_desc(cpu, t); /*
13143 * This just modifies memory; should not be
13144 * necessary. But... This is necessary, because
13145 -@@ -147,10 +144,6 @@ static void fix_processor_context(void)
13146 +@@ -172,10 +169,6 @@ static void fix_processor_context(void)
13147 */
13148
13149 #ifdef CONFIG_X86_64
13150 @@ -36375,10 +37803,10 @@ index 0b7a63d..dff2199 100644
13151 #endif
13152 }
13153 diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
13154 -index 2730d77..2e4cd19 100644
13155 +index 3e75fcf..4cfefb8 100644
13156 --- a/arch/x86/realmode/rm/Makefile
13157 +++ b/arch/x86/realmode/rm/Makefile
13158 -@@ -68,5 +68,8 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
13159 +@@ -68,6 +68,9 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
13160
13161 KBUILD_CFLAGS := $(LINUXINCLUDE) $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
13162 -I$(srctree)/arch/x86/boot
13163 @@ -36387,6 +37815,7 @@ index 2730d77..2e4cd19 100644
13164 +endif
13165 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
13166 GCOV_PROFILE := n
13167 + UBSAN_SANITIZE := n
13168 diff --git a/arch/x86/realmode/rm/header.S b/arch/x86/realmode/rm/header.S
13169 index a28221d..93c40f1 100644
13170 --- a/arch/x86/realmode/rm/header.S
13171 @@ -36514,7 +37943,7 @@ index 604a37e..e49702a 100644
13172 relocs-objs := relocs_32.o relocs_64.o relocs_common.o
13173 PHONY += relocs
13174 diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
13175 -index 0c2fae8..88d7719 100644
13176 +index 0c2fae8..1d2a079 100644
13177 --- a/arch/x86/tools/relocs.c
13178 +++ b/arch/x86/tools/relocs.c
13179 @@ -1,5 +1,7 @@
13180 @@ -36533,7 +37962,15 @@ index 0c2fae8..88d7719 100644
13181
13182 struct relocs {
13183 uint32_t *offset;
13184 -@@ -386,9 +389,39 @@ static void read_ehdr(FILE *fp)
13185 +@@ -45,6 +48,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
13186 + "^(xen_irq_disable_direct_reloc$|"
13187 + "xen_save_fl_direct_reloc$|"
13188 + "VDSO|"
13189 ++ "__rap_hash_|"
13190 + "__crc_)",
13191 +
13192 + /*
13193 +@@ -386,9 +390,39 @@ static void read_ehdr(FILE *fp)
13194 }
13195 }
13196
13197 @@ -36574,7 +38011,7 @@ index 0c2fae8..88d7719 100644
13198 Elf_Shdr shdr;
13199
13200 secs = calloc(ehdr.e_shnum, sizeof(struct section));
13201 -@@ -423,7 +456,7 @@ static void read_shdrs(FILE *fp)
13202 +@@ -423,7 +457,7 @@ static void read_shdrs(FILE *fp)
13203
13204 static void read_strtabs(FILE *fp)
13205 {
13206 @@ -36583,7 +38020,7 @@ index 0c2fae8..88d7719 100644
13207 for (i = 0; i < ehdr.e_shnum; i++) {
13208 struct section *sec = &secs[i];
13209 if (sec->shdr.sh_type != SHT_STRTAB) {
13210 -@@ -448,7 +481,7 @@ static void read_strtabs(FILE *fp)
13211 +@@ -448,7 +482,7 @@ static void read_strtabs(FILE *fp)
13212
13213 static void read_symtabs(FILE *fp)
13214 {
13215 @@ -36592,7 +38029,7 @@ index 0c2fae8..88d7719 100644
13216 for (i = 0; i < ehdr.e_shnum; i++) {
13217 struct section *sec = &secs[i];
13218 if (sec->shdr.sh_type != SHT_SYMTAB) {
13219 -@@ -479,9 +512,11 @@ static void read_symtabs(FILE *fp)
13220 +@@ -479,9 +513,11 @@ static void read_symtabs(FILE *fp)
13221 }
13222
13223
13224 @@ -36606,7 +38043,7 @@ index 0c2fae8..88d7719 100644
13225 for (i = 0; i < ehdr.e_shnum; i++) {
13226 struct section *sec = &secs[i];
13227 if (sec->shdr.sh_type != SHT_REL_TYPE) {
13228 -@@ -501,9 +536,22 @@ static void read_relocs(FILE *fp)
13229 +@@ -501,9 +537,22 @@ static void read_relocs(FILE *fp)
13230 die("Cannot read symbol table: %s\n",
13231 strerror(errno));
13232 }
13233 @@ -36630,7 +38067,7 @@ index 0c2fae8..88d7719 100644
13234 rel->r_info = elf_xword_to_cpu(rel->r_info);
13235 #if (SHT_REL_TYPE == SHT_RELA)
13236 rel->r_addend = elf_xword_to_cpu(rel->r_addend);
13237 -@@ -515,7 +563,7 @@ static void read_relocs(FILE *fp)
13238 +@@ -515,7 +564,7 @@ static void read_relocs(FILE *fp)
13239
13240 static void print_absolute_symbols(void)
13241 {
13242 @@ -36639,7 +38076,7 @@ index 0c2fae8..88d7719 100644
13243 const char *format;
13244
13245 if (ELF_BITS == 64)
13246 -@@ -528,7 +576,7 @@ static void print_absolute_symbols(void)
13247 +@@ -528,7 +577,7 @@ static void print_absolute_symbols(void)
13248 for (i = 0; i < ehdr.e_shnum; i++) {
13249 struct section *sec = &secs[i];
13250 char *sym_strtab;
13251 @@ -36648,7 +38085,7 @@ index 0c2fae8..88d7719 100644
13252
13253 if (sec->shdr.sh_type != SHT_SYMTAB) {
13254 continue;
13255 -@@ -555,7 +603,7 @@ static void print_absolute_symbols(void)
13256 +@@ -555,7 +604,7 @@ static void print_absolute_symbols(void)
13257
13258 static void print_absolute_relocs(void)
13259 {
13260 @@ -36657,7 +38094,7 @@ index 0c2fae8..88d7719 100644
13261 const char *format;
13262
13263 if (ELF_BITS == 64)
13264 -@@ -568,7 +616,7 @@ static void print_absolute_relocs(void)
13265 +@@ -568,7 +617,7 @@ static void print_absolute_relocs(void)
13266 struct section *sec_applies, *sec_symtab;
13267 char *sym_strtab;
13268 Elf_Sym *sh_symtab;
13269 @@ -36666,7 +38103,7 @@ index 0c2fae8..88d7719 100644
13270 if (sec->shdr.sh_type != SHT_REL_TYPE) {
13271 continue;
13272 }
13273 -@@ -645,13 +693,13 @@ static void add_reloc(struct relocs *r, uint32_t offset)
13274 +@@ -645,13 +694,13 @@ static void add_reloc(struct relocs *r, uint32_t offset)
13275 static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
13276 Elf_Sym *sym, const char *symname))
13277 {
13278 @@ -36682,7 +38119,7 @@ index 0c2fae8..88d7719 100644
13279 struct section *sec = &secs[i];
13280
13281 if (sec->shdr.sh_type != SHT_REL_TYPE) {
13282 -@@ -697,7 +745,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
13283 +@@ -697,7 +746,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
13284 * kernel data and does not require special treatment.
13285 *
13286 */
13287 @@ -36691,7 +38128,7 @@ index 0c2fae8..88d7719 100644
13288 static Elf_Addr per_cpu_load_addr;
13289
13290 static void percpu_init(void)
13291 -@@ -830,6 +878,23 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
13292 +@@ -830,6 +879,23 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
13293 {
13294 unsigned r_type = ELF32_R_TYPE(rel->r_info);
13295 int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname);
13296 @@ -36715,7 +38152,7 @@ index 0c2fae8..88d7719 100644
13297
13298 switch (r_type) {
13299 case R_386_NONE:
13300 -@@ -968,7 +1033,7 @@ static int write32_as_text(uint32_t v, FILE *f)
13301 +@@ -968,7 +1034,7 @@ static int write32_as_text(uint32_t v, FILE *f)
13302
13303 static void emit_relocs(int as_text, int use_real_mode)
13304 {
13305 @@ -36724,7 +38161,7 @@ index 0c2fae8..88d7719 100644
13306 int (*write_reloc)(uint32_t, FILE *) = write32;
13307 int (*do_reloc)(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
13308 const char *symname);
13309 -@@ -1078,10 +1143,11 @@ void process(FILE *fp, int use_real_mode, int as_text,
13310 +@@ -1078,10 +1144,11 @@ void process(FILE *fp, int use_real_mode, int as_text,
13311 {
13312 regex_init(use_real_mode);
13313 read_ehdr(fp);
13314 @@ -36776,7 +38213,7 @@ index c7b15f3..cc09a65 100644
13315 This is the Linux Xen port. Enabling this will allow the
13316 kernel to boot in a paravirtualized environment under the
13317 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
13318 -index beab8c7..9a29803 100644
13319 +index e3679db..16b93d1 100644
13320 --- a/arch/x86/xen/enlighten.c
13321 +++ b/arch/x86/xen/enlighten.c
13322 @@ -131,8 +131,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
13323 @@ -36817,8 +38254,17 @@ index beab8c7..9a29803 100644
13324 BUG_ON(va & ~PAGE_MASK);
13325
13326 for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {
13327 -@@ -1271,7 +1267,7 @@ static const struct pv_apic_ops xen_apic_ops __initconst = {
13328 - #endif
13329 +@@ -777,7 +773,7 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
13330 + * so we should never see them. Warn if
13331 + * there's an unexpected IST-using fault handler.
13332 + */
13333 +- if (addr == (unsigned long)debug)
13334 ++ if (addr == (unsigned long)int1)
13335 + addr = (unsigned long)xen_debug;
13336 + else if (addr == (unsigned long)int3)
13337 + addr = (unsigned long)xen_int3;
13338 +@@ -1262,7 +1258,7 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = {
13339 + .end_context_switch = xen_end_context_switch,
13340 };
13341
13342 -static void xen_reboot(int reason)
13343 @@ -36826,7 +38272,7 @@ index beab8c7..9a29803 100644
13344 {
13345 struct sched_shutdown r = { .reason = reason };
13346 int cpu;
13347 -@@ -1279,26 +1275,26 @@ static void xen_reboot(int reason)
13348 +@@ -1270,26 +1266,26 @@ static void xen_reboot(int reason)
13349 for_each_online_cpu(cpu)
13350 xen_pmu_finish(cpu);
13351
13352 @@ -36859,7 +38305,7 @@ index beab8c7..9a29803 100644
13353 {
13354 if (pm_power_off)
13355 pm_power_off();
13356 -@@ -1451,8 +1447,11 @@ static void __ref xen_setup_gdt(int cpu)
13357 +@@ -1442,8 +1438,11 @@ static void __ref xen_setup_gdt(int cpu)
13358 pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry_boot;
13359 pv_cpu_ops.load_gdt = xen_load_gdt_boot;
13360
13361 @@ -36873,7 +38319,7 @@ index beab8c7..9a29803 100644
13362
13363 pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry;
13364 pv_cpu_ops.load_gdt = xen_load_gdt;
13365 -@@ -1570,7 +1569,17 @@ asmlinkage __visible void __init xen_start_kernel(void)
13366 +@@ -1560,7 +1559,17 @@ asmlinkage __visible void __init xen_start_kernel(void)
13367 __userpte_alloc_gfp &= ~__GFP_HIGHMEM;
13368
13369 /* Work out if we support NX */
13370 @@ -36892,7 +38338,7 @@ index beab8c7..9a29803 100644
13371
13372 /* Get mfn list */
13373 xen_build_dynamic_phys_to_machine();
13374 -@@ -1598,13 +1607,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
13375 +@@ -1588,13 +1597,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
13376
13377 machine_ops = xen_machine_ops;
13378
13379 @@ -36907,7 +38353,7 @@ index beab8c7..9a29803 100644
13380
13381 #ifdef CONFIG_ACPI_NUMA
13382 diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
13383 -index cb5e266..cd5bcab 100644
13384 +index c913ca4..b6d8c05 100644
13385 --- a/arch/x86/xen/mmu.c
13386 +++ b/arch/x86/xen/mmu.c
13387 @@ -1950,7 +1950,11 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
13388 @@ -36954,7 +38400,7 @@ index cb5e266..cd5bcab 100644
13389 #endif
13390
13391 /* This will work as long as patching hasn't happened yet
13392 -@@ -2473,6 +2489,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
13393 +@@ -2472,6 +2488,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
13394 .pud_val = PV_CALLEE_SAVE(xen_pud_val),
13395 .make_pud = PV_CALLEE_SAVE(xen_make_pud),
13396 .set_pgd = xen_set_pgd_hyper,
13397 @@ -37016,10 +38462,10 @@ index 3f4ebf0..f074dc1 100644
13398 }
13399
13400 diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
13401 -index fd92a64..1f72641 100644
13402 +index feb6d40..e59382c 100644
13403 --- a/arch/x86/xen/xen-asm_32.S
13404 +++ b/arch/x86/xen/xen-asm_32.S
13405 -@@ -99,7 +99,7 @@ ENTRY(xen_iret)
13406 +@@ -85,7 +85,7 @@ ENTRY(xen_iret)
13407 pushw %fs
13408 movl $(__KERNEL_PERCPU), %eax
13409 movl %eax, %fs
13410 @@ -37051,7 +38497,7 @@ index b65f59a..c43f9c6 100644
13411 mov %rsi,xen_start_info
13412 mov $init_thread_union+THREAD_SIZE,%rsp
13413 diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
13414 -index 1399423..b1ae0fa 100644
13415 +index 4140b07..a391b69 100644
13416 --- a/arch/x86/xen/xen-ops.h
13417 +++ b/arch/x86/xen/xen-ops.h
13418 @@ -16,8 +16,6 @@ void xen_syscall_target(void);
13419 @@ -37102,7 +38548,7 @@ index 2f33760..835e50a 100644
13420 #define XCHAL_ICACHE_SIZE 8192 /* I-cache size in bytes or 0 */
13421 #define XCHAL_DCACHE_SIZE 8192 /* D-cache size in bytes or 0 */
13422 diff --git a/block/bio.c b/block/bio.c
13423 -index d4d1443..bb167da 100644
13424 +index cf75915..02d854f 100644
13425 --- a/block/bio.c
13426 +++ b/block/bio.c
13427 @@ -1143,7 +1143,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
13428 @@ -37124,7 +38570,7 @@ index d4d1443..bb167da 100644
13429
13430 nr_pages += end - start;
13431 diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
13432 -index 5a37188..0361054 100644
13433 +index 66e6f1a..8fb30f4 100644
13434 --- a/block/blk-cgroup.c
13435 +++ b/block/blk-cgroup.c
13436 @@ -561,10 +561,10 @@ u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd,
13437 @@ -37159,7 +38605,7 @@ index 5a37188..0361054 100644
13438 percpu_counter_sum_positive(&rwstat->cpu_cnt[i]),
13439 &sum.aux_cnt[i]);
13440 }
13441 -@@ -877,13 +877,13 @@ static int blkcg_print_stat(struct seq_file *sf, void *v)
13442 +@@ -886,13 +886,13 @@ static int blkcg_print_stat(struct seq_file *sf, void *v)
13443
13444 rwstat = blkg_rwstat_recursive_sum(blkg, NULL,
13445 offsetof(struct blkcg_gq, stat_bytes));
13446 @@ -37177,24 +38623,11 @@ index 5a37188..0361054 100644
13447
13448 spin_unlock_irq(blkg->q->queue_lock);
13449
13450 -diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
13451 -index 0736729..2ec3b48 100644
13452 ---- a/block/blk-iopoll.c
13453 -+++ b/block/blk-iopoll.c
13454 -@@ -74,7 +74,7 @@ void blk_iopoll_complete(struct blk_iopoll *iop)
13455 - }
13456 - EXPORT_SYMBOL(blk_iopoll_complete);
13457 -
13458 --static void blk_iopoll_softirq(struct softirq_action *h)
13459 -+static __latent_entropy void blk_iopoll_softirq(void)
13460 - {
13461 - struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll);
13462 - int rearm = 0, budget = blk_iopoll_budget;
13463 diff --git a/block/blk-map.c b/block/blk-map.c
13464 -index f565e11..f05b424 100644
13465 +index a54f054..760b494 100644
13466 --- a/block/blk-map.c
13467 +++ b/block/blk-map.c
13468 -@@ -214,7 +214,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
13469 +@@ -245,7 +245,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
13470 if (!len || !kbuf)
13471 return -EINVAL;
13472
13473 @@ -37285,10 +38718,10 @@ index f678c73..f35aa18 100644
13474 err = -EFAULT;
13475 goto out;
13476 diff --git a/block/genhd.c b/block/genhd.c
13477 -index e5cafa51..65e4557 100644
13478 +index 9f42526..fcc8648 100644
13479 --- a/block/genhd.c
13480 +++ b/block/genhd.c
13481 -@@ -470,21 +470,24 @@ static char *bdevt_str(dev_t devt, char *buf)
13482 +@@ -471,21 +471,24 @@ static char *bdevt_str(dev_t devt, char *buf)
13483
13484 /*
13485 * Register device numbers dev..(dev+range-1)
13486 @@ -37405,8 +38838,34 @@ index 0774799..7afc734 100644
13487 if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len))
13488 goto error;
13489
13490 +diff --git a/crypto/cast6_generic.c b/crypto/cast6_generic.c
13491 +index 058c8d7..55229dd 100644
13492 +--- a/crypto/cast6_generic.c
13493 ++++ b/crypto/cast6_generic.c
13494 +@@ -181,8 +181,9 @@ static inline void QBAR(u32 *block, u8 *Kr, u32 *Km)
13495 + block[2] ^= F1(block[3], Kr[0], Km[0]);
13496 + }
13497 +
13498 +-void __cast6_encrypt(struct cast6_ctx *c, u8 *outbuf, const u8 *inbuf)
13499 ++void __cast6_encrypt(void *_c, u8 *outbuf, const u8 *inbuf)
13500 + {
13501 ++ struct cast6_ctx *c = _c;
13502 + const __be32 *src = (const __be32 *)inbuf;
13503 + __be32 *dst = (__be32 *)outbuf;
13504 + u32 block[4];
13505 +@@ -219,8 +220,9 @@ static void cast6_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf)
13506 + __cast6_encrypt(crypto_tfm_ctx(tfm), outbuf, inbuf);
13507 + }
13508 +
13509 +-void __cast6_decrypt(struct cast6_ctx *c, u8 *outbuf, const u8 *inbuf)
13510 ++void __cast6_decrypt(void *_c, u8 *outbuf, const u8 *inbuf)
13511 + {
13512 ++ struct cast6_ctx *c = _c;
13513 + const __be32 *src = (const __be32 *)inbuf;
13514 + __be32 *dst = (__be32 *)outbuf;
13515 + u32 block[4];
13516 diff --git a/crypto/cryptd.c b/crypto/cryptd.c
13517 -index c81861b..dbf894f 100644
13518 +index 7921251..ba86330 100644
13519 --- a/crypto/cryptd.c
13520 +++ b/crypto/cryptd.c
13521 @@ -63,7 +63,7 @@ struct cryptd_blkcipher_ctx {
13522 @@ -37453,6 +38912,75 @@ index ee9cfb9..30b36ed 100644
13523 if (!ret)
13524 kobject_uevent(&pinst->kobj, KOBJ_ADD);
13525
13526 +diff --git a/crypto/salsa20_generic.c b/crypto/salsa20_generic.c
13527 +index f550b5d..8488beb 100644
13528 +--- a/crypto/salsa20_generic.c
13529 ++++ b/crypto/salsa20_generic.c
13530 +@@ -104,7 +104,7 @@ static void salsa20_wordtobyte(u8 output[64], const u32 input[16])
13531 + static const char sigma[16] = "expand 32-byte k";
13532 + static const char tau[16] = "expand 16-byte k";
13533 +
13534 +-static void salsa20_keysetup(struct salsa20_ctx *ctx, const u8 *k, u32 kbytes)
13535 ++static void __salsa20_keysetup(struct salsa20_ctx *ctx, const u8 *k, u32 kbytes)
13536 + {
13537 + const char *constants;
13538 +
13539 +@@ -128,7 +128,7 @@ static void salsa20_keysetup(struct salsa20_ctx *ctx, const u8 *k, u32 kbytes)
13540 + ctx->input[15] = U8TO32_LITTLE(constants + 12);
13541 + }
13542 +
13543 +-static void salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv)
13544 ++static void __salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv)
13545 + {
13546 + ctx->input[6] = U8TO32_LITTLE(iv + 0);
13547 + ctx->input[7] = U8TO32_LITTLE(iv + 4);
13548 +@@ -136,7 +136,7 @@ static void salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv)
13549 + ctx->input[9] = 0;
13550 + }
13551 +
13552 +-static void salsa20_encrypt_bytes(struct salsa20_ctx *ctx, u8 *dst,
13553 ++static void __salsa20_encrypt_bytes(struct salsa20_ctx *ctx, u8 *dst,
13554 + const u8 *src, unsigned int bytes)
13555 + {
13556 + u8 buf[64];
13557 +@@ -170,7 +170,7 @@ static int setkey(struct crypto_tfm *tfm, const u8 *key,
13558 + unsigned int keysize)
13559 + {
13560 + struct salsa20_ctx *ctx = crypto_tfm_ctx(tfm);
13561 +- salsa20_keysetup(ctx, key, keysize);
13562 ++ __salsa20_keysetup(ctx, key, keysize);
13563 + return 0;
13564 + }
13565 +
13566 +@@ -186,24 +186,24 @@ static int encrypt(struct blkcipher_desc *desc,
13567 + blkcipher_walk_init(&walk, dst, src, nbytes);
13568 + err = blkcipher_walk_virt_block(desc, &walk, 64);
13569 +
13570 +- salsa20_ivsetup(ctx, walk.iv);
13571 ++ __salsa20_ivsetup(ctx, walk.iv);
13572 +
13573 + if (likely(walk.nbytes == nbytes))
13574 + {
13575 +- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
13576 ++ __salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
13577 + walk.src.virt.addr, nbytes);
13578 + return blkcipher_walk_done(desc, &walk, 0);
13579 + }
13580 +
13581 + while (walk.nbytes >= 64) {
13582 +- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
13583 ++ __salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
13584 + walk.src.virt.addr,
13585 + walk.nbytes - (walk.nbytes % 64));
13586 + err = blkcipher_walk_done(desc, &walk, walk.nbytes % 64);
13587 + }
13588 +
13589 + if (walk.nbytes) {
13590 +- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
13591 ++ __salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
13592 + walk.src.virt.addr, walk.nbytes);
13593 + err = blkcipher_walk_done(desc, &walk, 0);
13594 + }
13595 diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
13596 index ea5815c..5880da6 100644
13597 --- a/crypto/scatterwalk.c
13598 @@ -37480,6 +39008,32 @@ index ea5815c..5880da6 100644
13599 return;
13600
13601 scatterwalk_start(&walk, sg);
13602 +diff --git a/crypto/serpent_generic.c b/crypto/serpent_generic.c
13603 +index 94970a7..f0c8d26 100644
13604 +--- a/crypto/serpent_generic.c
13605 ++++ b/crypto/serpent_generic.c
13606 +@@ -442,8 +442,9 @@ int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
13607 + }
13608 + EXPORT_SYMBOL_GPL(serpent_setkey);
13609 +
13610 +-void __serpent_encrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src)
13611 ++void __serpent_encrypt(void *_ctx, u8 *dst, const u8 *src)
13612 + {
13613 ++ struct serpent_ctx *ctx = _ctx;
13614 + const u32 *k = ctx->expkey;
13615 + const __le32 *s = (const __le32 *)src;
13616 + __le32 *d = (__le32 *)dst;
13617 +@@ -507,8 +508,9 @@ static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
13618 + __serpent_encrypt(ctx, dst, src);
13619 + }
13620 +
13621 +-void __serpent_decrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src)
13622 ++void __serpent_decrypt(void *_ctx, u8 *dst, const u8 *src)
13623 + {
13624 ++ struct serpent_ctx *ctx = _ctx;
13625 + const u32 *k = ctx->expkey;
13626 + const __le32 *s = (const __le32 *)src;
13627 + __le32 *d = (__le32 *)dst;
13628 diff --git a/crypto/zlib.c b/crypto/zlib.c
13629 index d51a30a..b6891a3 100644
13630 --- a/crypto/zlib.c
13631 @@ -37525,11 +39079,24 @@ index d51a30a..b6891a3 100644
13632 : DEF_WBITS;
13633
13634 stream->workspace = vzalloc(zlib_inflate_workspacesize());
13635 +diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
13636 +index f71b756..b96847c 100644
13637 +--- a/drivers/acpi/ac.c
13638 ++++ b/drivers/acpi/ac.c
13639 +@@ -70,7 +70,7 @@ static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
13640 +
13641 + #ifdef CONFIG_ACPI_PROCFS_POWER
13642 + extern struct proc_dir_entry *acpi_lock_ac_dir(void);
13643 +-extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
13644 ++extern void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
13645 + static int acpi_ac_open_fs(struct inode *inode, struct file *file);
13646 + #endif
13647 +
13648 diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
13649 -index 5fdac39..ce3c90e 100644
13650 +index a76f8be..28cef93 100644
13651 --- a/drivers/acpi/acpi_video.c
13652 +++ b/drivers/acpi/acpi_video.c
13653 -@@ -412,7 +412,7 @@ static int video_enable_only_lcd(const struct dmi_system_id *d)
13654 +@@ -426,7 +426,7 @@ static int video_set_report_key_events(const struct dmi_system_id *id)
13655 return 0;
13656 }
13657
13658 @@ -37539,7 +39106,7 @@ index 5fdac39..ce3c90e 100644
13659 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
13660 */
13661 diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
13662 -index d62a616..387dbd0 100644
13663 +index f76e0ea..4b83315 100644
13664 --- a/drivers/acpi/acpica/hwxfsleep.c
13665 +++ b/drivers/acpi/acpica/hwxfsleep.c
13666 @@ -70,11 +70,12 @@ static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
13667 @@ -37622,6 +39189,19 @@ index 3dd9c46..cf0678f 100644
13668 period = duration;
13669 do_div(period, (count + 1));
13670 if (period > max_period) {
13671 +diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
13672 +index b719ab3..371e2a6 100644
13673 +--- a/drivers/acpi/battery.c
13674 ++++ b/drivers/acpi/battery.c
13675 +@@ -75,7 +75,7 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
13676 +
13677 + #ifdef CONFIG_ACPI_PROCFS_POWER
13678 + extern struct proc_dir_entry *acpi_lock_battery_dir(void);
13679 +-extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
13680 ++extern void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
13681 +
13682 + enum acpi_battery_files {
13683 + info_tag = 0,
13684 diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c
13685 index a83e3c6..c3d617f 100644
13686 --- a/drivers/acpi/bgrt.c
13687 @@ -37662,7 +39242,7 @@ index 96809cd..6a49f979 100644
13688 .callback = dmi_disable_osi_vista,
13689 .ident = "Fujitsu Siemens",
13690 diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
13691 -index a212cef..443c9c4 100644
13692 +index 891c42d..ac31987 100644
13693 --- a/drivers/acpi/bus.c
13694 +++ b/drivers/acpi/bus.c
13695 @@ -63,7 +63,7 @@ static int set_copy_dsdt(const struct dmi_system_id *id)
13696 @@ -37699,10 +39279,10 @@ index c68e724..e863008 100644
13697 /* parse the table header to get the table length */
13698 if (count <= sizeof(struct acpi_table_header))
13699 diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
13700 -index 08a02cd..1fa9787 100644
13701 +index cd2c3d6..2031a4a 100644
13702 --- a/drivers/acpi/device_pm.c
13703 +++ b/drivers/acpi/device_pm.c
13704 -@@ -1024,6 +1024,8 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
13705 +@@ -1025,6 +1025,8 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
13706
13707 #endif /* CONFIG_PM_SLEEP */
13708
13709 @@ -37711,7 +39291,7 @@ index 08a02cd..1fa9787 100644
13710 static struct dev_pm_domain acpi_general_pm_domain = {
13711 .ops = {
13712 .runtime_suspend = acpi_subsys_runtime_suspend,
13713 -@@ -1040,6 +1042,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
13714 +@@ -1041,6 +1043,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
13715 .restore_early = acpi_subsys_resume_early,
13716 #endif
13717 },
13718 @@ -37719,7 +39299,7 @@ index 08a02cd..1fa9787 100644
13719 };
13720
13721 /**
13722 -@@ -1117,7 +1120,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
13723 +@@ -1118,7 +1121,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
13724 acpi_device_wakeup(adev, ACPI_STATE_S0, false);
13725 }
13726
13727 @@ -37728,7 +39308,7 @@ index 08a02cd..1fa9787 100644
13728 }
13729 EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);
13730 diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
13731 -index b420fb4..e8d7e29 100644
13732 +index b420fb4..b66c430 100644
13733 --- a/drivers/acpi/ec.c
13734 +++ b/drivers/acpi/ec.c
13735 @@ -1503,7 +1503,7 @@ static int ec_clear_on_resume(const struct dmi_system_id *id)
13736 @@ -37740,6 +39320,24 @@ index b420fb4..e8d7e29 100644
13737 {
13738 ec_skip_dsdt_scan, "Compal JFL92", {
13739 DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"),
13740 +@@ -1610,7 +1610,7 @@ error:
13741 + return -ENODEV;
13742 + }
13743 +
13744 +-static int param_set_event_clearing(const char *val, struct kernel_param *kp)
13745 ++static int param_set_event_clearing(const char *val, const struct kernel_param *kp)
13746 + {
13747 + int result = 0;
13748 +
13749 +@@ -1628,7 +1628,7 @@ static int param_set_event_clearing(const char *val, struct kernel_param *kp)
13750 + return result;
13751 + }
13752 +
13753 +-static int param_get_event_clearing(char *buffer, struct kernel_param *kp)
13754 ++static int param_get_event_clearing(char *buffer, const struct kernel_param *kp)
13755 + {
13756 + switch (ec_event_clearing) {
13757 + case ACPI_EC_EVT_TIMING_STATUS:
13758 diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
13759 index 7188e53..6012bc4 100644
13760 --- a/drivers/acpi/pci_slot.c
13761 @@ -37780,7 +39378,7 @@ index 7cfbda4..74f738c 100644
13762 set_no_mwait, "Extensa 5220", {
13763 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
13764 diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
13765 -index e3322ad..4a03c27 100644
13766 +index f054cad..e3c1453 100644
13767 --- a/drivers/acpi/sleep.c
13768 +++ b/drivers/acpi/sleep.c
13769 @@ -148,7 +148,7 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
13770 @@ -37793,9 +39391,36 @@ index e3322ad..4a03c27 100644
13771 .callback = init_old_suspend_ordering,
13772 .ident = "Abit KN9 (nForce4 variant)",
13773 diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
13774 -index 0243d37..774aa56 100644
13775 +index 0243d37..dcf52db 100644
13776 --- a/drivers/acpi/sysfs.c
13777 +++ b/drivers/acpi/sysfs.c
13778 +@@ -227,7 +227,7 @@ module_param_cb(trace_method_name, &param_ops_trace_method, &trace_method_name,
13779 + module_param_cb(trace_debug_layer, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_layer, 0644);
13780 + module_param_cb(trace_debug_level, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_level, 0644);
13781 +
13782 +-static int param_set_trace_state(const char *val, struct kernel_param *kp)
13783 ++static int param_set_trace_state(const char *val, const struct kernel_param *kp)
13784 + {
13785 + acpi_status status;
13786 + const char *method = trace_method_name;
13787 +@@ -263,7 +263,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
13788 + return 0;
13789 + }
13790 +
13791 +-static int param_get_trace_state(char *buffer, struct kernel_param *kp)
13792 ++static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
13793 + {
13794 + if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
13795 + return sprintf(buffer, "disable");
13796 +@@ -292,7 +292,7 @@ MODULE_PARM_DESC(aml_debug_output,
13797 + "To enable/disable the ACPI Debug Object output.");
13798 +
13799 + /* /sys/module/acpi/parameters/acpica_version */
13800 +-static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
13801 ++static int param_get_acpica_version(char *buffer, const struct kernel_param *kp)
13802 + {
13803 + int result;
13804 +
13805 @@ -486,11 +486,11 @@ static u32 num_counters;
13806 static struct attribute **all_attrs;
13807 static u32 acpi_gpe_count;
13808 @@ -37810,6 +39435,22 @@ index 0243d37..774aa56 100644
13809
13810 static void delete_gpe_attr_array(void)
13811 {
13812 +@@ -777,13 +777,13 @@ static void __exit interrupt_stats_exit(void)
13813 + }
13814 +
13815 + static ssize_t
13816 +-acpi_show_profile(struct device *dev, struct device_attribute *attr,
13817 ++acpi_show_profile(struct kobject *kobj, struct kobj_attribute *attr,
13818 + char *buf)
13819 + {
13820 + return sprintf(buf, "%d\n", acpi_gbl_FADT.preferred_profile);
13821 + }
13822 +
13823 +-static const struct device_attribute pm_profile_attr =
13824 ++static const struct kobj_attribute pm_profile_attr =
13825 + __ATTR(pm_profile, S_IRUGO, acpi_show_profile, NULL);
13826 +
13827 + static ssize_t hotplug_enabled_show(struct kobject *kobj,
13828 diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
13829 index 82707f9..a6b19f5 100644
13830 --- a/drivers/acpi/thermal.c
13831 @@ -37824,7 +39465,7 @@ index 82707f9..a6b19f5 100644
13832 * Award BIOS on this AOpen makes thermal control almost worthless.
13833 * http://bugzilla.kernel.org/show_bug.cgi?id=8842
13834 diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
13835 -index 80e55cb..f660caf 100644
13836 +index 1316ddd..0f10a1d 100644
13837 --- a/drivers/acpi/video_detect.c
13838 +++ b/drivers/acpi/video_detect.c
13839 @@ -41,7 +41,6 @@ ACPI_MODULE_NAME("video");
13840 @@ -37835,7 +39476,7 @@ index 80e55cb..f660caf 100644
13841 static struct work_struct backlight_notify_work;
13842
13843 static enum acpi_backlight_type acpi_backlight_cmdline = acpi_backlight_undef;
13844 -@@ -294,6 +293,10 @@ static int acpi_video_backlight_notify(struct notifier_block *nb,
13845 +@@ -311,6 +310,10 @@ static int acpi_video_backlight_notify(struct notifier_block *nb,
13846 return NOTIFY_OK;
13847 }
13848
13849 @@ -37846,7 +39487,7 @@ index 80e55cb..f660caf 100644
13850 /*
13851 * Determine which type of backlight interface to use on this system,
13852 * First check cmdline, then dmi quirks, then do autodetect.
13853 -@@ -324,8 +327,6 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
13854 +@@ -341,8 +344,6 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
13855 &video_caps, NULL);
13856 INIT_WORK(&backlight_notify_work,
13857 acpi_video_backlight_notify_work);
13858 @@ -37855,11 +39496,24 @@ index 80e55cb..f660caf 100644
13859 if (backlight_register_notifier(&backlight_nb) == 0)
13860 backlight_notifier_registered = true;
13861 init_done = true;
13862 +diff --git a/drivers/android/binder.c b/drivers/android/binder.c
13863 +index 7d00b7a..d5fd80d 100644
13864 +--- a/drivers/android/binder.c
13865 ++++ b/drivers/android/binder.c
13866 +@@ -120,7 +120,7 @@ static DECLARE_WAIT_QUEUE_HEAD(binder_user_error_wait);
13867 + static int binder_stop_on_user_error;
13868 +
13869 + static int binder_set_stop_on_user_error(const char *val,
13870 +- struct kernel_param *kp)
13871 ++ const struct kernel_param *kp)
13872 + {
13873 + int ret;
13874 +
13875 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
13876 -index b79cb10..7daa9f7 100644
13877 +index 55e257c..28b9a25 100644
13878 --- a/drivers/ata/libata-core.c
13879 +++ b/drivers/ata/libata-core.c
13880 -@@ -102,7 +102,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
13881 +@@ -103,7 +103,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
13882 static void ata_dev_xfermask(struct ata_device *dev);
13883 static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
13884
13885 @@ -37868,7 +39522,7 @@ index b79cb10..7daa9f7 100644
13886
13887 struct ata_force_param {
13888 const char *name;
13889 -@@ -4801,7 +4801,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
13890 +@@ -4804,7 +4804,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
13891 struct ata_port *ap;
13892 unsigned int tag;
13893
13894 @@ -37877,7 +39531,7 @@ index b79cb10..7daa9f7 100644
13895 ap = qc->ap;
13896
13897 qc->flags = 0;
13898 -@@ -4818,7 +4818,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
13899 +@@ -4821,7 +4821,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
13900 struct ata_port *ap;
13901 struct ata_link *link;
13902
13903 @@ -37886,7 +39540,7 @@ index b79cb10..7daa9f7 100644
13904 WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
13905 ap = qc->ap;
13906 link = qc->dev->link;
13907 -@@ -5925,6 +5925,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
13908 +@@ -5928,6 +5928,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
13909 return;
13910
13911 spin_lock(&lock);
13912 @@ -37894,7 +39548,7 @@ index b79cb10..7daa9f7 100644
13913
13914 for (cur = ops->inherits; cur; cur = cur->inherits) {
13915 void **inherit = (void **)cur;
13916 -@@ -5938,8 +5939,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
13917 +@@ -5941,8 +5942,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
13918 if (IS_ERR(*pp))
13919 *pp = NULL;
13920
13921 @@ -37905,7 +39559,7 @@ index b79cb10..7daa9f7 100644
13922 spin_unlock(&lock);
13923 }
13924
13925 -@@ -6135,7 +6137,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
13926 +@@ -6138,7 +6140,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
13927
13928 /* give ports names and add SCSI hosts */
13929 for (i = 0; i < host->n_ports; i++) {
13930 @@ -38834,10 +40488,10 @@ index ddc4ceb..36e29aa 100644
13931 }
13932
13933 diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
13934 -index 3d7fb65..0f26393 100644
13935 +index 6ac2b2b..6373ebd 100644
13936 --- a/drivers/atm/solos-pci.c
13937 +++ b/drivers/atm/solos-pci.c
13938 -@@ -843,7 +843,7 @@ static void solos_bh(unsigned long card_arg)
13939 +@@ -849,7 +849,7 @@ static void solos_bh(unsigned long card_arg)
13940 }
13941 atm_charge(vcc, skb->truesize);
13942 vcc->push(vcc, skb);
13943 @@ -38846,7 +40500,7 @@ index 3d7fb65..0f26393 100644
13944 break;
13945
13946 case PKT_STATUS:
13947 -@@ -1124,7 +1124,7 @@ static uint32_t fpga_tx(struct solos_card *card)
13948 +@@ -1130,7 +1130,7 @@ static uint32_t fpga_tx(struct solos_card *card)
13949 vcc = SKB_CB(oldskb)->vcc;
13950
13951 if (vcc) {
13952 @@ -38987,7 +40641,7 @@ index 8fc654f..36e28e9 100644
13953 LIST_HEAD(todo);
13954 int cnt;
13955 diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
13956 -index 68f0314..ca2a609 100644
13957 +index 44a74cf..a5dd826 100644
13958 --- a/drivers/base/devtmpfs.c
13959 +++ b/drivers/base/devtmpfs.c
13960 @@ -354,7 +354,7 @@ int devtmpfs_mount(const char *mntdir)
13961 @@ -39028,7 +40682,7 @@ index 560751b..3a4847a 100644
13962 static ssize_t show_node_state(struct device *dev,
13963 struct device_attribute *attr, char *buf)
13964 diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c
13965 -index 5df4575..986184b 100644
13966 +index 279e539..b87ed03 100644
13967 --- a/drivers/base/platform-msi.c
13968 +++ b/drivers/base/platform-msi.c
13969 @@ -24,6 +24,8 @@
13970 @@ -39037,10 +40691,10 @@ index 5df4575..986184b 100644
13971
13972 +#include <asm/pgtable.h>
13973 +
13974 - #define DEV_ID_SHIFT 24
13975 + #define DEV_ID_SHIFT 21
13976 + #define MAX_DEV_MSIS (1 << (32 - DEV_ID_SHIFT))
13977
13978 - /*
13979 -@@ -77,10 +79,12 @@ static void platform_msi_update_dom_ops(struct msi_domain_info *info)
13980 +@@ -81,10 +83,12 @@ static void platform_msi_update_dom_ops(struct msi_domain_info *info)
13981
13982 BUG_ON(!ops);
13983
13984 @@ -39055,7 +40709,7 @@ index 5df4575..986184b 100644
13985 }
13986
13987 static void platform_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
13988 -@@ -98,16 +102,18 @@ static void platform_msi_update_chip_ops(struct msi_domain_info *info)
13989 +@@ -102,16 +106,18 @@ static void platform_msi_update_chip_ops(struct msi_domain_info *info)
13990 struct irq_chip *chip = info->chip;
13991
13992 BUG_ON(!chip);
13993 @@ -39078,12 +40732,12 @@ index 5df4575..986184b 100644
13994 + pax_close_kernel();
13995 }
13996
13997 - static void platform_msi_free_descs(struct device *dev)
13998 + static void platform_msi_free_descs(struct device *dev, int base, int nvec)
13999 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
14000 -index 65f50ec..acab2a1 100644
14001 +index 301b785..82070c6 100644
14002 --- a/drivers/base/power/domain.c
14003 +++ b/drivers/base/power/domain.c
14004 -@@ -1810,8 +1810,11 @@ int genpd_dev_pm_attach(struct device *dev)
14005 +@@ -1804,8 +1804,10 @@ int genpd_dev_pm_attach(struct device *dev)
14006 goto out;
14007 }
14008
14009 @@ -39093,15 +40747,76 @@ index 65f50ec..acab2a1 100644
14010 + *(void **)&dev->pm_domain->detach = genpd_dev_pm_detach;
14011 + *(void **)&dev->pm_domain->sync = genpd_dev_pm_sync;
14012 + pax_close_kernel();
14013 -+
14014 - ret = genpd_poweron(pd);
14015
14016 - out:
14017 + mutex_lock(&pd->lock);
14018 + ret = genpd_poweron(pd, 0);
14019 diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
14020 -index e1a10a0..a6bc363 100644
14021 +index 4c70550..223bba1 100644
14022 --- a/drivers/base/power/runtime.c
14023 +++ b/drivers/base/power/runtime.c
14024 -@@ -263,8 +263,8 @@ static int rpm_check_suspend_allowed(struct device *dev)
14025 +@@ -16,35 +16,32 @@
14026 +
14027 + typedef int (*pm_callback_t)(struct device *);
14028 +
14029 +-static pm_callback_t __rpm_get_callback(struct device *dev, size_t cb_offset)
14030 +-{
14031 +- pm_callback_t cb;
14032 +- const struct dev_pm_ops *ops;
14033 +-
14034 +- if (dev->pm_domain)
14035 +- ops = &dev->pm_domain->ops;
14036 +- else if (dev->type && dev->type->pm)
14037 +- ops = dev->type->pm;
14038 +- else if (dev->class && dev->class->pm)
14039 +- ops = dev->class->pm;
14040 +- else if (dev->bus && dev->bus->pm)
14041 +- ops = dev->bus->pm;
14042 +- else
14043 +- ops = NULL;
14044 +-
14045 +- if (ops)
14046 +- cb = *(pm_callback_t *)((void *)ops + cb_offset);
14047 +- else
14048 +- cb = NULL;
14049 +-
14050 +- if (!cb && dev->driver && dev->driver->pm)
14051 +- cb = *(pm_callback_t *)((void *)dev->driver->pm + cb_offset);
14052 +-
14053 +- return cb;
14054 +-}
14055 +-
14056 +-#define RPM_GET_CALLBACK(dev, callback) \
14057 +- __rpm_get_callback(dev, offsetof(struct dev_pm_ops, callback))
14058 ++#define RPM_GET_CALLBACK(dev, callback) \
14059 ++({ \
14060 ++ pm_callback_t cb; \
14061 ++ const struct dev_pm_ops *ops; \
14062 ++ \
14063 ++ if (dev->pm_domain) \
14064 ++ ops = &dev->pm_domain->ops; \
14065 ++ else if (dev->type && dev->type->pm) \
14066 ++ ops = dev->type->pm; \
14067 ++ else if (dev->class && dev->class->pm) \
14068 ++ ops = dev->class->pm; \
14069 ++ else if (dev->bus && dev->bus->pm) \
14070 ++ ops = dev->bus->pm; \
14071 ++ else \
14072 ++ ops = NULL; \
14073 ++ \
14074 ++ if (ops) \
14075 ++ cb = ops->callback; \
14076 ++ else \
14077 ++ cb = NULL; \
14078 ++ \
14079 ++ if (!cb && dev->driver && dev->driver->pm) \
14080 ++ cb = dev->driver->pm->callback; \
14081 ++ \
14082 ++ cb; \
14083 ++})
14084 +
14085 + static int rpm_resume(struct device *dev, int rpmflags);
14086 + static int rpm_suspend(struct device *dev, int rpmflags);
14087 +@@ -263,8 +260,8 @@ static int rpm_check_suspend_allowed(struct device *dev)
14088 * @cb: Runtime PM callback to run.
14089 * @dev: Device to run the callback for.
14090 */
14091 @@ -39111,7 +40826,7 @@ index e1a10a0..a6bc363 100644
14092 {
14093 int retval;
14094
14095 -@@ -412,8 +412,8 @@ static int rpm_callback(int (*cb)(struct device *), struct device *dev)
14096 +@@ -412,8 +409,8 @@ static int rpm_callback(int (*cb)(struct device *), struct device *dev)
14097 *
14098 * This function must be called under dev->power.lock with interrupts disabled.
14099 */
14100 @@ -39121,7 +40836,7 @@ index e1a10a0..a6bc363 100644
14101 {
14102 int (*callback)(struct device *);
14103 struct device *parent = NULL;
14104 -@@ -594,8 +594,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
14105 +@@ -594,8 +591,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
14106 *
14107 * This function must be called under dev->power.lock with interrupts disabled.
14108 */
14109 @@ -39184,32 +40899,32 @@ index a1e0b9a..81fc106 100644
14110
14111 split_counters(&cnt, &inpr);
14112 diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
14113 -index 3f0a7e2..8195e50 100644
14114 +index 1ee3d40..3274424 100644
14115 --- a/drivers/base/regmap/regmap-debugfs.c
14116 +++ b/drivers/base/regmap/regmap-debugfs.c
14117 -@@ -401,7 +401,7 @@ static ssize_t regmap_access_read_file(struct file *file,
14118 - char __user *user_buf, size_t count,
14119 - loff_t *ppos)
14120 - {
14121 -- int reg_len, tot_len;
14122 -+ size_t reg_len, tot_len;
14123 - size_t buf_pos = 0;
14124 - loff_t p = 0;
14125 - ssize_t ret;
14126 -@@ -434,7 +434,7 @@ static ssize_t regmap_access_read_file(struct file *file,
14127 - /* Format the register */
14128 - snprintf(buf + buf_pos, count - buf_pos,
14129 - "%.*x: %c %c %c %c\n",
14130 -- reg_len, i,
14131 -+ (int)reg_len, i,
14132 - regmap_readable(map, i) ? 'y' : 'n',
14133 - regmap_writeable(map, i) ? 'y' : 'n',
14134 - regmap_volatile(map, i) ? 'y' : 'n',
14135 +@@ -400,7 +400,7 @@ static const struct file_operations regmap_reg_ranges_fops = {
14136 + static int regmap_access_show(struct seq_file *s, void *ignored)
14137 + {
14138 + struct regmap *map = s->private;
14139 +- int i, reg_len;
14140 ++ size_t i, reg_len;
14141 +
14142 + reg_len = regmap_calc_reg_len(map->max_register);
14143 +
14144 +@@ -410,7 +410,7 @@ static int regmap_access_show(struct seq_file *s, void *ignored)
14145 + continue;
14146 +
14147 + /* Format the register */
14148 +- seq_printf(s, "%.*x: %c %c %c %c\n", reg_len, i,
14149 ++ seq_printf(s, "%.*x: %c %c %c %c\n", (int)reg_len, i,
14150 + regmap_readable(map, i) ? 'y' : 'n',
14151 + regmap_writeable(map, i) ? 'y' : 'n',
14152 + regmap_volatile(map, i) ? 'y' : 'n',
14153 diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
14154 -index 4ac63c0..9007855 100644
14155 +index ee54e84..f00a29c 100644
14156 --- a/drivers/base/regmap/regmap.c
14157 +++ b/drivers/base/regmap/regmap.c
14158 -@@ -344,8 +344,8 @@ static void regmap_unlock_mutex(void *__map)
14159 +@@ -401,8 +401,8 @@ static void regmap_unlock_mutex(void *__map)
14160 mutex_unlock(&map->mutex);
14161 }
14162
14163 @@ -39219,7 +40934,7 @@ index 4ac63c0..9007855 100644
14164 {
14165 struct regmap *map = __map;
14166 unsigned long flags;
14167 -@@ -354,8 +354,8 @@ __acquires(&map->spinlock)
14168 +@@ -411,8 +411,8 @@ __acquires(&map->spinlock)
14169 map->spinlock_flags = flags;
14170 }
14171
14172 @@ -39252,10 +40967,10 @@ index 8d98a32..61d3165 100644
14173 }
14174 EXPORT_SYMBOL_GPL(unregister_syscore_ops);
14175 diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
14176 -index 0422c47..b222c7a 100644
14177 +index 63c2064..34fae98 100644
14178 --- a/drivers/block/cciss.c
14179 +++ b/drivers/block/cciss.c
14180 -@@ -3024,7 +3024,7 @@ static void start_io(ctlr_info_t *h)
14181 +@@ -3018,7 +3018,7 @@ static void start_io(ctlr_info_t *h)
14182 while (!list_empty(&h->reqQ)) {
14183 c = list_entry(h->reqQ.next, CommandList_struct, list);
14184 /* can't do anything if fifo is full */
14185 @@ -39264,7 +40979,7 @@ index 0422c47..b222c7a 100644
14186 dev_warn(&h->pdev->dev, "fifo full\n");
14187 break;
14188 }
14189 -@@ -3034,7 +3034,7 @@ static void start_io(ctlr_info_t *h)
14190 +@@ -3028,7 +3028,7 @@ static void start_io(ctlr_info_t *h)
14191 h->Qdepth--;
14192
14193 /* Tell the controller execute command */
14194 @@ -39273,7 +40988,7 @@ index 0422c47..b222c7a 100644
14195
14196 /* Put job onto the completed Q */
14197 addQ(&h->cmpQ, c);
14198 -@@ -3460,17 +3460,17 @@ startio:
14199 +@@ -3454,17 +3454,17 @@ startio:
14200
14201 static inline unsigned long get_next_completion(ctlr_info_t *h)
14202 {
14203 @@ -39294,7 +41009,7 @@ index 0422c47..b222c7a 100644
14204 (h->interrupts_enabled == 0));
14205 }
14206
14207 -@@ -3503,7 +3503,7 @@ static inline u32 next_command(ctlr_info_t *h)
14208 +@@ -3497,7 +3497,7 @@ static inline u32 next_command(ctlr_info_t *h)
14209 u32 a;
14210
14211 if (unlikely(!(h->transMethod & CFGTBL_Trans_Performant)))
14212 @@ -39303,7 +41018,7 @@ index 0422c47..b222c7a 100644
14213
14214 if ((*(h->reply_pool_head) & 1) == (h->reply_pool_wraparound)) {
14215 a = *(h->reply_pool_head); /* Next cmd in ring buffer */
14216 -@@ -4060,7 +4060,7 @@ static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
14217 +@@ -4054,7 +4054,7 @@ static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
14218 trans_support & CFGTBL_Trans_use_short_tags);
14219
14220 /* Change the access methods to the performant access methods */
14221 @@ -39312,7 +41027,7 @@ index 0422c47..b222c7a 100644
14222 h->transMethod = CFGTBL_Trans_Performant;
14223
14224 return;
14225 -@@ -4334,7 +4334,7 @@ static int cciss_pci_init(ctlr_info_t *h)
14226 +@@ -4328,7 +4328,7 @@ static int cciss_pci_init(ctlr_info_t *h)
14227 if (prod_index < 0)
14228 return -ENODEV;
14229 h->product_name = products[prod_index].product_name;
14230 @@ -39321,7 +41036,7 @@ index 0422c47..b222c7a 100644
14231
14232 if (cciss_board_disabled(h)) {
14233 dev_warn(&h->pdev->dev, "controller appears to be disabled\n");
14234 -@@ -5065,7 +5065,7 @@ reinit_after_soft_reset:
14235 +@@ -5059,7 +5059,7 @@ reinit_after_soft_reset:
14236 }
14237
14238 /* make sure the board interrupts are off */
14239 @@ -39330,7 +41045,7 @@ index 0422c47..b222c7a 100644
14240 rc = cciss_request_irq(h, do_cciss_msix_intr, do_cciss_intx);
14241 if (rc)
14242 goto clean2;
14243 -@@ -5115,7 +5115,7 @@ reinit_after_soft_reset:
14244 +@@ -5109,7 +5109,7 @@ reinit_after_soft_reset:
14245 * fake ones to scoop up any residual completions.
14246 */
14247 spin_lock_irqsave(&h->lock, flags);
14248 @@ -39339,7 +41054,7 @@ index 0422c47..b222c7a 100644
14249 spin_unlock_irqrestore(&h->lock, flags);
14250 free_irq(h->intr[h->intr_mode], h);
14251 rc = cciss_request_irq(h, cciss_msix_discard_completions,
14252 -@@ -5135,9 +5135,9 @@ reinit_after_soft_reset:
14253 +@@ -5129,9 +5129,9 @@ reinit_after_soft_reset:
14254 dev_info(&h->pdev->dev, "Board READY.\n");
14255 dev_info(&h->pdev->dev,
14256 "Waiting for stale completions to drain.\n");
14257 @@ -39351,7 +41066,7 @@ index 0422c47..b222c7a 100644
14258
14259 rc = controller_reset_failed(h->cfgtable);
14260 if (rc)
14261 -@@ -5160,7 +5160,7 @@ reinit_after_soft_reset:
14262 +@@ -5154,7 +5154,7 @@ reinit_after_soft_reset:
14263 cciss_scsi_setup(h);
14264
14265 /* Turn the interrupts on so we can service requests */
14266 @@ -39360,7 +41075,7 @@ index 0422c47..b222c7a 100644
14267
14268 /* Get the firmware version */
14269 inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL);
14270 -@@ -5232,7 +5232,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
14271 +@@ -5226,7 +5226,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
14272 kfree(flush_buf);
14273 if (return_code != IO_OK)
14274 dev_warn(&h->pdev->dev, "Error flushing cache\n");
14275 @@ -39559,10 +41274,10 @@ index be73e9d..7fbf140 100644
14276 cmdlist_t *reqQ;
14277 cmdlist_t *cmpQ;
14278 diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
14279 -index 9462d27..4b9f997 100644
14280 +index 92d6fc0..e4e1e27 100644
14281 --- a/drivers/block/drbd/drbd_bitmap.c
14282 +++ b/drivers/block/drbd/drbd_bitmap.c
14283 -@@ -1027,7 +1027,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho
14284 +@@ -1019,7 +1019,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho
14285 submit_bio(rw, bio);
14286 /* this should not count as user activity and cause the
14287 * resync to throttle -- see drbd_rs_should_slow_down(). */
14288 @@ -39572,10 +41287,10 @@ index 9462d27..4b9f997 100644
14289 }
14290
14291 diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
14292 -index e66d453..edaae71 100644
14293 +index 34bc84e..8bac095 100644
14294 --- a/drivers/block/drbd/drbd_int.h
14295 +++ b/drivers/block/drbd/drbd_int.h
14296 -@@ -386,7 +386,7 @@ struct drbd_epoch {
14297 +@@ -382,7 +382,7 @@ struct drbd_epoch {
14298 struct drbd_connection *connection;
14299 struct list_head list;
14300 unsigned int barrier_nr;
14301 @@ -39584,7 +41299,7 @@ index e66d453..edaae71 100644
14302 atomic_t active; /* increased on every req. added, and dec on every finished. */
14303 unsigned long flags;
14304 };
14305 -@@ -947,7 +947,7 @@ struct drbd_device {
14306 +@@ -951,7 +951,7 @@ struct drbd_device {
14307 unsigned int al_tr_number;
14308 int al_tr_cycle;
14309 wait_queue_head_t seq_wait;
14310 @@ -39593,7 +41308,7 @@ index e66d453..edaae71 100644
14311 unsigned int peer_seq;
14312 spinlock_t peer_seq_lock;
14313 unsigned long comm_bm_set; /* communicated number of set bits. */
14314 -@@ -956,8 +956,8 @@ struct drbd_device {
14315 +@@ -960,8 +960,8 @@ struct drbd_device {
14316 struct mutex own_state_mutex;
14317 struct mutex *state_mutex; /* either own_state_mutex or first_peer_device(device)->connection->cstate_mutex */
14318 char congestion_reason; /* Why we where congested... */
14319 @@ -39605,10 +41320,10 @@ index e66d453..edaae71 100644
14320 int rs_last_events; /* counter of read or write "events" (unit sectors)
14321 * on the lower level device when we last looked. */
14322 diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
14323 -index 74d97f4..bb5a486 100644
14324 +index 5b43dfb..d5f6e5c 100644
14325 --- a/drivers/block/drbd/drbd_main.c
14326 +++ b/drivers/block/drbd/drbd_main.c
14327 -@@ -1328,7 +1328,7 @@ static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet
14328 +@@ -1329,7 +1329,7 @@ static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet
14329 p->sector = sector;
14330 p->block_id = block_id;
14331 p->blksize = blksize;
14332 @@ -39617,7 +41332,7 @@ index 74d97f4..bb5a486 100644
14333 return drbd_send_command(peer_device, sock, cmd, sizeof(*p), NULL, 0);
14334 }
14335
14336 -@@ -1634,7 +1634,7 @@ int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *
14337 +@@ -1635,7 +1635,7 @@ int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *
14338 return -EIO;
14339 p->sector = cpu_to_be64(req->i.sector);
14340 p->block_id = (unsigned long)req;
14341 @@ -39626,7 +41341,7 @@ index 74d97f4..bb5a486 100644
14342 dp_flags = bio_flags_to_wire(peer_device->connection, req->master_bio->bi_rw);
14343 if (device->state.conn >= C_SYNC_SOURCE &&
14344 device->state.conn <= C_PAUSED_SYNC_T)
14345 -@@ -1915,8 +1915,8 @@ void drbd_init_set_defaults(struct drbd_device *device)
14346 +@@ -1907,8 +1907,8 @@ void drbd_init_set_defaults(struct drbd_device *device)
14347 atomic_set(&device->unacked_cnt, 0);
14348 atomic_set(&device->local_cnt, 0);
14349 atomic_set(&device->pp_in_use_by_net, 0);
14350 @@ -39637,7 +41352,7 @@ index 74d97f4..bb5a486 100644
14351 atomic_set(&device->ap_in_flight, 0);
14352 atomic_set(&device->md_io.in_use, 0);
14353
14354 -@@ -2683,8 +2683,8 @@ void drbd_destroy_connection(struct kref *kref)
14355 +@@ -2675,8 +2675,8 @@ void drbd_destroy_connection(struct kref *kref)
14356 struct drbd_connection *connection = container_of(kref, struct drbd_connection, kref);
14357 struct drbd_resource *resource = connection->resource;
14358
14359 @@ -39649,17 +41364,21 @@ index 74d97f4..bb5a486 100644
14360
14361 idr_destroy(&connection->peer_devices);
14362 diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
14363 -index e80cbef..42533f1 100644
14364 +index c055c5e..5cb3c1e 100644
14365 --- a/drivers/block/drbd/drbd_nl.c
14366 +++ b/drivers/block/drbd/drbd_nl.c
14367 -@@ -3637,13 +3637,13 @@ finish:
14368 +@@ -89,8 +89,8 @@ int drbd_adm_get_initial_state(struct sk_buff *skb, struct netlink_callback *cb)
14369 + #include "drbd_nla.h"
14370 + #include <linux/genl_magic_func.h>
14371
14372 - void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib)
14373 - {
14374 -- static atomic_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
14375 -+ static atomic_unchecked_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
14376 - struct sk_buff *msg;
14377 - struct drbd_genlmsghdr *d_out;
14378 +-static atomic_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
14379 +-static atomic_t notify_genl_seq = ATOMIC_INIT(2); /* two. */
14380 ++static atomic_unchecked_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
14381 ++static atomic_unchecked_t notify_genl_seq = ATOMIC_INIT(2); /* two. */
14382 +
14383 + DEFINE_MUTEX(notification_mutex);
14384 +
14385 +@@ -4374,7 +4374,7 @@ void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib)
14386 unsigned seq;
14387 int err = -ENOMEM;
14388
14389 @@ -39668,11 +41387,56 @@ index e80cbef..42533f1 100644
14390 msg = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
14391 if (!msg)
14392 goto failed;
14393 +@@ -4426,7 +4426,7 @@ void notify_resource_state(struct sk_buff *skb,
14394 + int err;
14395 +
14396 + if (!skb) {
14397 +- seq = atomic_inc_return(&notify_genl_seq);
14398 ++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
14399 + skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
14400 + err = -ENOMEM;
14401 + if (!skb)
14402 +@@ -4477,7 +4477,7 @@ void notify_device_state(struct sk_buff *skb,
14403 + int err;
14404 +
14405 + if (!skb) {
14406 +- seq = atomic_inc_return(&notify_genl_seq);
14407 ++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
14408 + skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
14409 + err = -ENOMEM;
14410 + if (!skb)
14411 +@@ -4526,7 +4526,7 @@ void notify_connection_state(struct sk_buff *skb,
14412 + int err;
14413 +
14414 + if (!skb) {
14415 +- seq = atomic_inc_return(&notify_genl_seq);
14416 ++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
14417 + skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
14418 + err = -ENOMEM;
14419 + if (!skb)
14420 +@@ -4576,7 +4576,7 @@ void notify_peer_device_state(struct sk_buff *skb,
14421 + int err;
14422 +
14423 + if (!skb) {
14424 +- seq = atomic_inc_return(&notify_genl_seq);
14425 ++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
14426 + skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
14427 + err = -ENOMEM;
14428 + if (!skb)
14429 +@@ -4619,7 +4619,7 @@ void notify_helper(enum drbd_notification_type type,
14430 + {
14431 + struct drbd_resource *resource = device ? device->resource : connection->resource;
14432 + struct drbd_helper_info helper_info;
14433 +- unsigned int seq = atomic_inc_return(&notify_genl_seq);
14434 ++ unsigned int seq = atomic_inc_return_unchecked(&notify_genl_seq);
14435 + struct sk_buff *skb = NULL;
14436 + struct drbd_genlmsghdr *dh;
14437 + int err;
14438 diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
14439 -index b4b5680..4ae7b27 100644
14440 +index 1957fe8..de39941 100644
14441 --- a/drivers/block/drbd/drbd_receiver.c
14442 +++ b/drivers/block/drbd/drbd_receiver.c
14443 -@@ -871,7 +871,7 @@ int drbd_connected(struct drbd_peer_device *peer_device)
14444 +@@ -895,7 +895,7 @@ int drbd_connected(struct drbd_peer_device *peer_device)
14445 struct drbd_device *device = peer_device->device;
14446 int err;
14447
14448 @@ -39681,7 +41445,7 @@ index b4b5680..4ae7b27 100644
14449 device->peer_seq = 0;
14450
14451 device->state_mutex = peer_device->connection->agreed_pro_version < 100 ?
14452 -@@ -1234,7 +1234,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
14453 +@@ -1266,7 +1266,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
14454 do {
14455 next_epoch = NULL;
14456
14457 @@ -39690,7 +41454,7 @@ index b4b5680..4ae7b27 100644
14458
14459 switch (ev & ~EV_CLEANUP) {
14460 case EV_PUT:
14461 -@@ -1274,7 +1274,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
14462 +@@ -1306,7 +1306,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
14463 rv = FE_DESTROYED;
14464 } else {
14465 epoch->flags = 0;
14466 @@ -39699,7 +41463,7 @@ index b4b5680..4ae7b27 100644
14467 /* atomic_set(&epoch->active, 0); is already zero */
14468 if (rv == FE_STILL_LIVE)
14469 rv = FE_RECYCLED;
14470 -@@ -1551,7 +1551,7 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
14471 +@@ -1577,7 +1577,7 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
14472 conn_wait_active_ee_empty(connection);
14473 drbd_flush(connection);
14474
14475 @@ -39708,7 +41472,7 @@ index b4b5680..4ae7b27 100644
14476 epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO);
14477 if (epoch)
14478 break;
14479 -@@ -1565,11 +1565,11 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
14480 +@@ -1591,11 +1591,11 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
14481 }
14482
14483 epoch->flags = 0;
14484 @@ -39722,7 +41486,7 @@ index b4b5680..4ae7b27 100644
14485 list_add(&epoch->list, &connection->current_epoch->list);
14486 connection->current_epoch = epoch;
14487 connection->epochs++;
14488 -@@ -1781,7 +1781,9 @@ static int e_end_resync_block(struct drbd_work *w, int unused)
14489 +@@ -1807,7 +1807,9 @@ static int e_end_resync_block(struct drbd_work *w, int unused)
14490 }
14491
14492 static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t sector,
14493 @@ -39733,7 +41497,7 @@ index b4b5680..4ae7b27 100644
14494 {
14495 struct drbd_device *device = peer_device->device;
14496 struct drbd_peer_request *peer_req;
14497 -@@ -1803,7 +1805,7 @@ static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t secto
14498 +@@ -1829,7 +1831,7 @@ static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t secto
14499 list_add_tail(&peer_req->w.list, &device->sync_ee);
14500 spin_unlock_irq(&device->resource->req_lock);
14501
14502 @@ -39742,7 +41506,7 @@ index b4b5680..4ae7b27 100644
14503 if (drbd_submit_peer_request(device, peer_req, WRITE, DRBD_FAULT_RS_WR) == 0)
14504 return 0;
14505
14506 -@@ -1901,7 +1903,7 @@ static int receive_RSDataReply(struct drbd_connection *connection, struct packet
14507 +@@ -1927,7 +1929,7 @@ static int receive_RSDataReply(struct drbd_connection *connection, struct packet
14508 drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size);
14509 }
14510
14511 @@ -39751,7 +41515,7 @@ index b4b5680..4ae7b27 100644
14512
14513 return err;
14514 }
14515 -@@ -2291,7 +2293,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
14516 +@@ -2317,7 +2319,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
14517
14518 err = wait_for_and_update_peer_seq(peer_device, peer_seq);
14519 drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size);
14520 @@ -39760,7 +41524,7 @@ index b4b5680..4ae7b27 100644
14521 err2 = drbd_drain_block(peer_device, pi->size);
14522 if (!err)
14523 err = err2;
14524 -@@ -2335,7 +2337,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
14525 +@@ -2361,7 +2363,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
14526
14527 spin_lock(&connection->epoch_lock);
14528 peer_req->epoch = connection->current_epoch;
14529 @@ -39769,7 +41533,7 @@ index b4b5680..4ae7b27 100644
14530 atomic_inc(&peer_req->epoch->active);
14531 spin_unlock(&connection->epoch_lock);
14532
14533 -@@ -2480,7 +2482,7 @@ bool drbd_rs_c_min_rate_throttle(struct drbd_device *device)
14534 +@@ -2506,7 +2508,7 @@ bool drbd_rs_c_min_rate_throttle(struct drbd_device *device)
14535
14536 curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
14537 (int)part_stat_read(&disk->part0, sectors[1]) -
14538 @@ -39778,7 +41542,7 @@ index b4b5680..4ae7b27 100644
14539
14540 if (atomic_read(&device->ap_actlog_cnt)
14541 || curr_events - device->rs_last_events > 64) {
14542 -@@ -2619,7 +2621,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
14543 +@@ -2645,7 +2647,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
14544 device->use_csums = true;
14545 } else if (pi->cmd == P_OV_REPLY) {
14546 /* track progress, we may need to throttle */
14547 @@ -39787,7 +41551,7 @@ index b4b5680..4ae7b27 100644
14548 peer_req->w.cb = w_e_end_ov_reply;
14549 dec_rs_pending(device);
14550 /* drbd_rs_begin_io done when we sent this request,
14551 -@@ -2692,7 +2694,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
14552 +@@ -2718,7 +2720,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
14553 goto out_free_e;
14554
14555 submit_for_resync:
14556 @@ -39796,7 +41560,7 @@ index b4b5680..4ae7b27 100644
14557
14558 submit:
14559 update_receiver_timing_details(connection, drbd_submit_peer_request);
14560 -@@ -4565,7 +4567,7 @@ struct data_cmd {
14561 +@@ -4591,7 +4593,7 @@ struct data_cmd {
14562 int expect_payload;
14563 size_t pkt_size;
14564 int (*fn)(struct drbd_connection *, struct packet_info *);
14565 @@ -39805,7 +41569,7 @@ index b4b5680..4ae7b27 100644
14566
14567 static struct data_cmd drbd_cmd_handler[] = {
14568 [P_DATA] = { 1, sizeof(struct p_data), receive_Data },
14569 -@@ -4679,7 +4681,7 @@ static void conn_disconnect(struct drbd_connection *connection)
14570 +@@ -4709,7 +4711,7 @@ static void conn_disconnect(struct drbd_connection *connection)
14571 if (!list_empty(&connection->current_epoch->list))
14572 drbd_err(connection, "ASSERTION FAILED: connection->current_epoch->list not empty\n");
14573 /* ok, no more ee's on the fly, it is safe to reset the epoch_size */
14574 @@ -39814,7 +41578,7 @@ index b4b5680..4ae7b27 100644
14575 connection->send.seen_any_write_yet = false;
14576
14577 drbd_info(connection, "Connection closed\n");
14578 -@@ -5183,7 +5185,7 @@ static int got_IsInSync(struct drbd_connection *connection, struct packet_info *
14579 +@@ -5213,7 +5215,7 @@ static int got_IsInSync(struct drbd_connection *connection, struct packet_info *
14580 put_ldev(device);
14581 }
14582 dec_rs_pending(device);
14583 @@ -39823,20 +41587,113 @@ index b4b5680..4ae7b27 100644
14584
14585 return 0;
14586 }
14587 -@@ -5471,7 +5473,7 @@ static int connection_finish_peer_reqs(struct drbd_connection *connection)
14588 - struct asender_cmd {
14589 +@@ -5464,7 +5466,7 @@ static int got_skip(struct drbd_connection *connection, struct packet_info *pi)
14590 + struct meta_sock_cmd {
14591 size_t pkt_size;
14592 int (*fn)(struct drbd_connection *connection, struct packet_info *);
14593 -};
14594 +} __do_const;
14595
14596 - static struct asender_cmd asender_tbl[] = {
14597 - [P_PING] = { 0, got_Ping },
14598 + static void set_rcvtimeo(struct drbd_connection *connection, bool ping_timeout)
14599 + {
14600 +diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
14601 +index 5a7ef78..bbd058b 100644
14602 +--- a/drivers/block/drbd/drbd_state.c
14603 ++++ b/drivers/block/drbd/drbd_state.c
14604 +@@ -1497,9 +1497,10 @@ int drbd_bitmap_io_from_worker(struct drbd_device *device,
14605 +
14606 + void notify_resource_state_change(struct sk_buff *skb,
14607 + unsigned int seq,
14608 +- struct drbd_resource_state_change *resource_state_change,
14609 ++ void *_resource_state_change,
14610 + enum drbd_notification_type type)
14611 + {
14612 ++ struct drbd_resource_state_change *resource_state_change = _resource_state_change;
14613 + struct drbd_resource *resource = resource_state_change->resource;
14614 + struct resource_info resource_info = {
14615 + .res_role = resource_state_change->role[NEW],
14616 +@@ -1513,9 +1514,10 @@ void notify_resource_state_change(struct sk_buff *skb,
14617 +
14618 + void notify_connection_state_change(struct sk_buff *skb,
14619 + unsigned int seq,
14620 +- struct drbd_connection_state_change *connection_state_change,
14621 ++ void *_connection_state_change,
14622 + enum drbd_notification_type type)
14623 + {
14624 ++ struct drbd_connection_state_change *connection_state_change = _connection_state_change;
14625 + struct drbd_connection *connection = connection_state_change->connection;
14626 + struct connection_info connection_info = {
14627 + .conn_connection_state = connection_state_change->cstate[NEW],
14628 +@@ -1527,9 +1529,10 @@ void notify_connection_state_change(struct sk_buff *skb,
14629 +
14630 + void notify_device_state_change(struct sk_buff *skb,
14631 + unsigned int seq,
14632 +- struct drbd_device_state_change *device_state_change,
14633 ++ void *_device_state_change,
14634 + enum drbd_notification_type type)
14635 + {
14636 ++ struct drbd_device_state_change *device_state_change = _device_state_change;
14637 + struct drbd_device *device = device_state_change->device;
14638 + struct device_info device_info = {
14639 + .dev_disk_state = device_state_change->disk_state[NEW],
14640 +@@ -1540,9 +1543,10 @@ void notify_device_state_change(struct sk_buff *skb,
14641 +
14642 + void notify_peer_device_state_change(struct sk_buff *skb,
14643 + unsigned int seq,
14644 +- struct drbd_peer_device_state_change *p,
14645 ++ void *_p,
14646 + enum drbd_notification_type type)
14647 + {
14648 ++ struct drbd_peer_device_state_change *p = _p;
14649 + struct drbd_peer_device *peer_device = p->peer_device;
14650 + struct peer_device_info peer_device_info = {
14651 + .peer_repl_state = p->repl_state[NEW],
14652 +diff --git a/drivers/block/drbd/drbd_state.h b/drivers/block/drbd/drbd_state.h
14653 +index bd98953..488e501 100644
14654 +--- a/drivers/block/drbd/drbd_state.h
14655 ++++ b/drivers/block/drbd/drbd_state.h
14656 +@@ -126,7 +126,7 @@ extern enum drbd_state_rv _drbd_set_state(struct drbd_device *, union drbd_state
14657 + enum chg_state_flags,
14658 + struct completion *done);
14659 + extern void print_st_err(struct drbd_device *, union drbd_state,
14660 +- union drbd_state, int);
14661 ++ union drbd_state, enum drbd_state_rv);
14662 +
14663 + enum drbd_state_rv
14664 + _conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val,
14665 +diff --git a/drivers/block/drbd/drbd_state_change.h b/drivers/block/drbd/drbd_state_change.h
14666 +index 9e503a1..ac60262 100644
14667 +--- a/drivers/block/drbd/drbd_state_change.h
14668 ++++ b/drivers/block/drbd/drbd_state_change.h
14669 +@@ -45,19 +45,19 @@ extern void forget_state_change(struct drbd_state_change *);
14670 +
14671 + extern void notify_resource_state_change(struct sk_buff *,
14672 + unsigned int,
14673 +- struct drbd_resource_state_change *,
14674 ++ void *,
14675 + enum drbd_notification_type type);
14676 + extern void notify_connection_state_change(struct sk_buff *,
14677 + unsigned int,
14678 +- struct drbd_connection_state_change *,
14679 ++ void *,
14680 + enum drbd_notification_type type);
14681 + extern void notify_device_state_change(struct sk_buff *,
14682 + unsigned int,
14683 +- struct drbd_device_state_change *,
14684 ++ void *,
14685 + enum drbd_notification_type type);
14686 + extern void notify_peer_device_state_change(struct sk_buff *,
14687 + unsigned int,
14688 +- struct drbd_peer_device_state_change *,
14689 ++ void *,
14690 + enum drbd_notification_type type);
14691 +
14692 + #endif /* DRBD_STATE_CHANGE_H */
14693 diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
14694 -index 5578c14..a05f791 100644
14695 +index eff716c..4c52ef7 100644
14696 --- a/drivers/block/drbd/drbd_worker.c
14697 +++ b/drivers/block/drbd/drbd_worker.c
14698 -@@ -94,7 +94,8 @@ void drbd_md_endio(struct bio *bio)
14699 +@@ -87,7 +87,8 @@ void drbd_md_endio(struct bio *bio)
14700 /* reads on behalf of the partner,
14701 * "submitted" by the receiver
14702 */
14703 @@ -39846,7 +41703,7 @@ index 5578c14..a05f791 100644
14704 {
14705 unsigned long flags = 0;
14706 struct drbd_peer_device *peer_device = peer_req->peer_device;
14707 -@@ -115,7 +116,8 @@ static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __rele
14708 +@@ -108,7 +109,8 @@ static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __rele
14709
14710 /* writes on behalf of the partner, or resync writes,
14711 * "submitted" by the receiver, final stage. */
14712 @@ -39856,7 +41713,7 @@ index 5578c14..a05f791 100644
14713 {
14714 unsigned long flags = 0;
14715 struct drbd_peer_device *peer_device = peer_req->peer_device;
14716 -@@ -386,7 +388,7 @@ static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector,
14717 +@@ -391,7 +393,7 @@ static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector,
14718 list_add_tail(&peer_req->w.list, &device->read_ee);
14719 spin_unlock_irq(&device->resource->req_lock);
14720
14721 @@ -39865,7 +41722,7 @@ index 5578c14..a05f791 100644
14722 if (drbd_submit_peer_request(device, peer_req, READ, DRBD_FAULT_RS_RD) == 0)
14723 return 0;
14724
14725 -@@ -531,7 +533,7 @@ static int drbd_rs_number_requests(struct drbd_device *device)
14726 +@@ -536,7 +538,7 @@ static int drbd_rs_number_requests(struct drbd_device *device)
14727 unsigned int sect_in; /* Number of sectors that came in since the last turn */
14728 int number, mxb;
14729
14730 @@ -39874,7 +41731,7 @@ index 5578c14..a05f791 100644
14731 device->rs_in_flight -= sect_in;
14732
14733 rcu_read_lock();
14734 -@@ -1573,8 +1575,8 @@ void drbd_rs_controller_reset(struct drbd_device *device)
14735 +@@ -1583,8 +1585,8 @@ void drbd_rs_controller_reset(struct drbd_device *device)
14736 struct gendisk *disk = device->ldev->backing_bdev->bd_contains->bd_disk;
14737 struct fifo_buffer *plan;
14738
14739 @@ -39885,6 +41742,38 @@ index 5578c14..a05f791 100644
14740 device->rs_in_flight = 0;
14741 device->rs_last_events =
14742 (int)part_stat_read(&disk->part0, sectors[0]) +
14743 +diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
14744 +index 84708a5..95c0e55 100644
14745 +--- a/drivers/block/floppy.c
14746 ++++ b/drivers/block/floppy.c
14747 +@@ -961,6 +961,10 @@ static void empty(void)
14748 + {
14749 + }
14750 +
14751 ++static void empty2(int i)
14752 ++{
14753 ++}
14754 ++
14755 + static void (*floppy_work_fn)(void);
14756 +
14757 + static void floppy_work_workfn(struct work_struct *work)
14758 +@@ -1953,14 +1957,14 @@ static const struct cont_t wakeup_cont = {
14759 + .interrupt = empty,
14760 + .redo = do_wakeup,
14761 + .error = empty,
14762 +- .done = (done_f)empty
14763 ++ .done = empty2
14764 + };
14765 +
14766 + static const struct cont_t intr_cont = {
14767 + .interrupt = empty,
14768 + .redo = process_fd_request,
14769 + .error = empty,
14770 +- .done = (done_f)empty
14771 ++ .done = empty2
14772 + };
14773 +
14774 + static int wait_til_done(void (*handler)(void), bool interruptible)
14775 diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
14776 index d06c62e..cd04d96 100644
14777 --- a/drivers/block/pktcdvd.c
14778 @@ -39908,7 +41797,7 @@ index d06c62e..cd04d96 100644
14779 if (ti.nwa_v) {
14780 pd->nwa = be32_to_cpu(ti.next_writable);
14781 diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
14782 -index fbdddd6..060ff07 100644
14783 +index 9745cf9..8dbe1b5 100644
14784 --- a/drivers/block/rbd.c
14785 +++ b/drivers/block/rbd.c
14786 @@ -64,7 +64,7 @@
14787 @@ -39991,7 +41880,7 @@ index e5565fb..71be10b4 100644
14788 + .command_completed = smart1_completed,
14789 };
14790 diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
14791 -index 57eb935..eafd6b8 100644
14792 +index 24a652f..2dffae6 100644
14793 --- a/drivers/bluetooth/btwilink.c
14794 +++ b/drivers/bluetooth/btwilink.c
14795 @@ -275,7 +275,7 @@ static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
14796 @@ -40034,7 +41923,7 @@ index 577cc4b..bfe0c2d 100644
14797 return 0;
14798 }
14799 diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
14800 -index c206ccd..375691c 100644
14801 +index 1b257ea..ea76b22 100644
14802 --- a/drivers/cdrom/cdrom.c
14803 +++ b/drivers/cdrom/cdrom.c
14804 @@ -610,7 +610,6 @@ int register_cdrom(struct cdrom_device_info *cdi)
14805 @@ -40076,7 +41965,7 @@ index c206ccd..375691c 100644
14806 if (cgc.buffer)
14807 break;
14808
14809 -@@ -3435,7 +3436,7 @@ static int cdrom_print_info(const char *header, int val, char *info,
14810 +@@ -3431,7 +3432,7 @@ static int cdrom_print_info(const char *header, int val, char *info,
14811 struct cdrom_device_info *cdi;
14812 int ret;
14813
14814 @@ -40182,7 +42071,7 @@ index 4f94375..413694e 100644
14815 return -EINVAL;
14816 else
14817 diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
14818 -index 240b6cf..e0ba20c 100644
14819 +index be54e53..50272fe 100644
14820 --- a/drivers/char/hpet.c
14821 +++ b/drivers/char/hpet.c
14822 @@ -574,7 +574,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
14823 @@ -40195,7 +42084,7 @@ index 240b6cf..e0ba20c 100644
14824 {
14825 struct hpet_timer __iomem *timer;
14826 diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
14827 -index e3536da..b1617f0 100644
14828 +index 94fb407..603dd43 100644
14829 --- a/drivers/char/ipmi/ipmi_msghandler.c
14830 +++ b/drivers/char/ipmi/ipmi_msghandler.c
14831 @@ -436,7 +436,7 @@ struct ipmi_smi {
14832 @@ -40217,9 +42106,9 @@ index e3536da..b1617f0 100644
14833 - ((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
14834 + ((unsigned int) atomic_read_unchecked(&(intf)->stats[IPMI_STAT_ ## stat]))
14835
14836 - static char *addr_src_to_str[] = { "invalid", "hotmod", "hardcoded", "SPMI",
14837 - "ACPI", "SMBIOS", "PCI",
14838 -@@ -2834,7 +2834,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
14839 + static const char * const addr_src_to_str[] = {
14840 + "invalid", "hotmod", "hardcoded", "SPMI", "ACPI", "SMBIOS", "PCI",
14841 +@@ -2835,7 +2835,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
14842 INIT_LIST_HEAD(&intf->cmd_rcvrs);
14843 init_waitqueue_head(&intf->waitq);
14844 for (i = 0; i < IPMI_NUM_STATS; i++)
14845 @@ -40228,11 +42117,24 @@ index e3536da..b1617f0 100644
14846
14847 intf->proc_dir = NULL;
14848
14849 +diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
14850 +index 9f2e3be..676c910 100644
14851 +--- a/drivers/char/ipmi/ipmi_poweroff.c
14852 ++++ b/drivers/char/ipmi/ipmi_poweroff.c
14853 +@@ -66,7 +66,7 @@ static void (*specific_poweroff_func)(ipmi_user_t user);
14854 + /* Holds the old poweroff function so we can restore it on removal. */
14855 + static void (*old_poweroff_func)(void);
14856 +
14857 +-static int set_param_ifnum(const char *val, struct kernel_param *kp)
14858 ++static int set_param_ifnum(const char *val, const struct kernel_param *kp)
14859 + {
14860 + int rv = param_set_int(val, kp);
14861 + if (rv)
14862 diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
14863 -index 4cc72fa..4c6f80d 100644
14864 +index 7fddd86..f5b038e 100644
14865 --- a/drivers/char/ipmi/ipmi_si_intf.c
14866 +++ b/drivers/char/ipmi/ipmi_si_intf.c
14867 -@@ -300,7 +300,7 @@ struct smi_info {
14868 +@@ -302,7 +302,7 @@ struct smi_info {
14869 unsigned char slave_addr;
14870
14871 /* Counters and things for the proc filesystem. */
14872 @@ -40241,7 +42143,7 @@ index 4cc72fa..4c6f80d 100644
14873
14874 struct task_struct *thread;
14875
14876 -@@ -309,9 +309,9 @@ struct smi_info {
14877 +@@ -311,9 +311,9 @@ struct smi_info {
14878 };
14879
14880 #define smi_inc_stat(smi, stat) \
14881 @@ -40253,7 +42155,25 @@ index 4cc72fa..4c6f80d 100644
14882
14883 #define SI_MAX_PARMS 4
14884
14885 -@@ -3620,7 +3620,7 @@ static int try_smi_init(struct smi_info *new_smi)
14886 +@@ -1345,7 +1345,7 @@ static unsigned int num_slave_addrs;
14887 + #define IPMI_MEM_ADDR_SPACE 1
14888 + static const char * const addr_space_to_str[] = { "i/o", "mem" };
14889 +
14890 +-static int hotmod_handler(const char *val, struct kernel_param *kp);
14891 ++static int hotmod_handler(const char *val, const struct kernel_param *kp);
14892 +
14893 + module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200);
14894 + MODULE_PARM_DESC(hotmod, "Add and remove interfaces. See"
14895 +@@ -1806,7 +1806,7 @@ static struct smi_info *smi_info_alloc(void)
14896 + return info;
14897 + }
14898 +
14899 +-static int hotmod_handler(const char *val, struct kernel_param *kp)
14900 ++static int hotmod_handler(const char *val, const struct kernel_param *kp)
14901 + {
14902 + char *str = kstrdup(val, GFP_KERNEL);
14903 + int rv;
14904 +@@ -3623,7 +3623,7 @@ static int try_smi_init(struct smi_info *new_smi)
14905 atomic_set(&new_smi->req_events, 0);
14906 new_smi->run_to_completion = false;
14907 for (i = 0; i < SI_NUM_STATS; i++)
14908 @@ -40263,7 +42183,7 @@ index 4cc72fa..4c6f80d 100644
14909 new_smi->interrupt_disabled = true;
14910 atomic_set(&new_smi->need_watch, 0);
14911 diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
14912 -index 90e6246..58acb77 100644
14913 +index 5f1c3d0..8fca936 100644
14914 --- a/drivers/char/ipmi/ipmi_ssif.c
14915 +++ b/drivers/char/ipmi/ipmi_ssif.c
14916 @@ -284,17 +284,17 @@ struct ssif_info {
14917 @@ -40307,7 +42227,7 @@ index 90e6246..58acb77 100644
14918 if (ssif_info->supports_pec)
14919 ssif_info->client->flags |= I2C_CLIENT_PEC;
14920 diff --git a/drivers/char/mem.c b/drivers/char/mem.c
14921 -index 6b1721f..fda9398 100644
14922 +index 4f6f94c..1e20d2f5 100644
14923 --- a/drivers/char/mem.c
14924 +++ b/drivers/char/mem.c
14925 @@ -18,6 +18,7 @@
14926 @@ -40456,10 +42376,10 @@ index 6b1721f..fda9398 100644
14927
14928 return tty_init();
14929 diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
14930 -index 97c2d8d..aa03a89 100644
14931 +index 0129232..422edaa 100644
14932 --- a/drivers/char/nvram.c
14933 +++ b/drivers/char/nvram.c
14934 -@@ -247,7 +247,7 @@ static ssize_t nvram_read(struct file *file, char __user *buf,
14935 +@@ -235,7 +235,7 @@ static ssize_t nvram_read(struct file *file, char __user *buf,
14936
14937 spin_unlock_irq(&rtc_lock);
14938
14939 @@ -40541,7 +42461,7 @@ index 45df4bf..22d88d4 100644
14940
14941 if (cmd != SIOCWANDEV)
14942 diff --git a/drivers/char/random.c b/drivers/char/random.c
14943 -index d0da5d8..739fd3a 100644
14944 +index b583e53..f3bb4ac 100644
14945 --- a/drivers/char/random.c
14946 +++ b/drivers/char/random.c
14947 @@ -289,9 +289,6 @@
14948 @@ -40843,10 +42763,10 @@ index b5bcd77..0f7bd99 100644
14949 return 0;
14950 }
14951 diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
14952 -index cec1ee2..d8e33a0 100644
14953 +index 51eef87..d944fa7 100644
14954 --- a/drivers/cpufreq/acpi-cpufreq.c
14955 +++ b/drivers/cpufreq/acpi-cpufreq.c
14956 -@@ -687,8 +687,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
14957 +@@ -682,8 +682,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
14958 data->acpi_perf_cpu = cpu;
14959 policy->driver_data = data;
14960
14961 @@ -40860,7 +42780,7 @@ index cec1ee2..d8e33a0 100644
14962
14963 result = acpi_processor_register_performance(perf, cpu);
14964 if (result)
14965 -@@ -821,7 +824,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
14966 +@@ -816,7 +819,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
14967 policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu);
14968 break;
14969 case ACPI_ADR_SPACE_FIXED_HARDWARE:
14970 @@ -40871,24 +42791,24 @@ index cec1ee2..d8e33a0 100644
14971 break;
14972 default:
14973 break;
14974 -@@ -916,8 +921,10 @@ static void __init acpi_cpufreq_boost_init(void)
14975 +@@ -910,8 +915,10 @@ static void __init acpi_cpufreq_boost_init(void)
14976 if (!msrs)
14977 return;
14978
14979 -- acpi_cpufreq_driver.boost_supported = true;
14980 +- acpi_cpufreq_driver.set_boost = set_boost;
14981 - acpi_cpufreq_driver.boost_enabled = boost_state(0);
14982 + pax_open_kernel();
14983 -+ *(bool *)&acpi_cpufreq_driver.boost_supported = true;
14984 ++ *(void **)&acpi_cpufreq_driver.set_boost = set_boost;
14985 + *(bool *)&acpi_cpufreq_driver.boost_enabled = boost_state(0);
14986 + pax_close_kernel();
14987
14988 cpu_notifier_register_begin();
14989
14990 diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
14991 -index 90d6408..0df4580 100644
14992 +index 0ca74d0..15705fb 100644
14993 --- a/drivers/cpufreq/cpufreq-dt.c
14994 +++ b/drivers/cpufreq/cpufreq-dt.c
14995 -@@ -456,7 +456,9 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
14996 +@@ -461,7 +461,9 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
14997 if (!IS_ERR(cpu_reg))
14998 regulator_put(cpu_reg);
14999
15000 @@ -40900,9 +42820,24 @@ index 90d6408..0df4580 100644
15001 ret = cpufreq_register_driver(&dt_cpufreq_driver);
15002 if (ret)
15003 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
15004 -index 8412ce5..3a40e15 100644
15005 +index e979ec7..a024e16 100644
15006 --- a/drivers/cpufreq/cpufreq.c
15007 +++ b/drivers/cpufreq/cpufreq.c
15008 +@@ -474,12 +474,12 @@ EXPORT_SYMBOL_GPL(cpufreq_freq_transition_end);
15009 + * SYSFS INTERFACE *
15010 + *********************************************************************/
15011 + static ssize_t show_boost(struct kobject *kobj,
15012 +- struct attribute *attr, char *buf)
15013 ++ struct kobj_attribute *attr, char *buf)
15014 + {
15015 + return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
15016 + }
15017 +
15018 +-static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
15019 ++static ssize_t store_boost(struct kobject *kobj, struct kobj_attribute *attr,
15020 + const char *buf, size_t count)
15021 + {
15022 + int ret, enable;
15023 @@ -2048,7 +2048,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
15024 read_unlock_irqrestore(&cpufreq_driver_lock, flags);
15025
15026 @@ -40941,32 +42876,18 @@ index 8412ce5..3a40e15 100644
15027 write_unlock_irqrestore(&cpufreq_driver_lock, flags);
15028
15029 pr_err("%s: Cannot %s BOOST\n",
15030 -@@ -2350,8 +2354,11 @@ static int create_boost_sysfs_file(void)
15031 - * Check if driver provides function to enable boost -
15032 - * if not, use cpufreq_boost_set_sw as default
15033 - */
15034 -- if (!cpufreq_driver->set_boost)
15035 -- cpufreq_driver->set_boost = cpufreq_boost_set_sw;
15036 -+ if (!cpufreq_driver->set_boost) {
15037 -+ pax_open_kernel();
15038 -+ *(void **)&cpufreq_driver->set_boost = cpufreq_boost_set_sw;
15039 -+ pax_close_kernel();
15040 -+ }
15041 -
15042 - ret = sysfs_create_file(cpufreq_global_kobject, &boost.attr);
15043 - if (ret)
15044 -@@ -2375,7 +2382,9 @@ int cpufreq_enable_boost_support(void)
15045 +@@ -2361,7 +2365,9 @@ int cpufreq_enable_boost_support(void)
15046 if (cpufreq_boost_supported())
15047 return 0;
15048
15049 -- cpufreq_driver->boost_supported = true;
15050 +- cpufreq_driver->set_boost = cpufreq_boost_set_sw;
15051 + pax_open_kernel();
15052 -+ *(bool *)&cpufreq_driver->boost_supported = true;
15053 ++ *(void **)&cpufreq_driver->set_boost = cpufreq_boost_set_sw;
15054 + pax_close_kernel();
15055
15056 /* This will get removed on driver unregister */
15057 return create_boost_sysfs_file();
15058 -@@ -2432,8 +2441,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
15059 +@@ -2418,8 +2424,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
15060 cpufreq_driver = driver_data;
15061 write_unlock_irqrestore(&cpufreq_driver_lock, flags);
15062
15063 @@ -40978,13 +42899,13 @@ index 8412ce5..3a40e15 100644
15064 + pax_close_kernel();
15065 + }
15066
15067 - ret = create_boost_sysfs_file();
15068 - if (ret)
15069 + if (cpufreq_boost_supported()) {
15070 + ret = create_boost_sysfs_file();
15071 diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
15072 -index d994b0f..b0b9d15 100644
15073 +index e0d1110..575e673 100644
15074 --- a/drivers/cpufreq/cpufreq_governor.c
15075 +++ b/drivers/cpufreq/cpufreq_governor.c
15076 -@@ -465,7 +465,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy,
15077 +@@ -497,7 +497,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy,
15078 cs_dbs_info->down_skip = 0;
15079 cs_dbs_info->requested_freq = policy->cur;
15080 } else {
15081 @@ -40994,10 +42915,28 @@ index d994b0f..b0b9d15 100644
15082
15083 od_dbs_info->rate_mult = 1;
15084 diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
15085 -index 5621bb0..a854d3c 100644
15086 +index 91e767a0..3b40724 100644
15087 --- a/drivers/cpufreq/cpufreq_governor.h
15088 +++ b/drivers/cpufreq/cpufreq_governor.h
15089 -@@ -217,7 +217,7 @@ struct common_dbs_data {
15090 +@@ -75,7 +75,7 @@ __ATTR(_name, 0644, show_##_name##_gov_pol, store_##_name##_gov_pol)
15091 + /* Create show/store routines */
15092 + #define show_one(_gov, file_name) \
15093 + static ssize_t show_##file_name##_gov_sys \
15094 +-(struct kobject *kobj, struct attribute *attr, char *buf) \
15095 ++(struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
15096 + { \
15097 + struct _gov##_dbs_tuners *tuners = _gov##_dbs_cdata.gdbs_data->tuners; \
15098 + return sprintf(buf, "%u\n", tuners->file_name); \
15099 +@@ -91,7 +91,7 @@ static ssize_t show_##file_name##_gov_pol \
15100 +
15101 + #define store_one(_gov, file_name) \
15102 + static ssize_t store_##file_name##_gov_sys \
15103 +-(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) \
15104 ++(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) \
15105 + { \
15106 + struct dbs_data *dbs_data = _gov##_dbs_cdata.gdbs_data; \
15107 + return store_##file_name(dbs_data, buf, count); \
15108 +@@ -219,7 +219,7 @@ struct common_dbs_data {
15109 void (*exit)(struct dbs_data *dbs_data, bool notify);
15110
15111 /* Governor specific ops, see below */
15112 @@ -41006,7 +42945,7 @@ index 5621bb0..a854d3c 100644
15113
15114 /*
15115 * Protects governor's data (struct dbs_data and struct common_dbs_data)
15116 -@@ -239,7 +239,7 @@ struct od_ops {
15117 +@@ -241,7 +241,7 @@ struct od_ops {
15118 unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy,
15119 unsigned int freq_next, unsigned int relation);
15120 void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq);
15121 @@ -41015,11 +42954,20 @@ index 5621bb0..a854d3c 100644
15122
15123 static inline int delay_for_sampling_rate(unsigned int sampling_rate)
15124 {
15125 +@@ -256,7 +256,7 @@ static inline int delay_for_sampling_rate(unsigned int sampling_rate)
15126 +
15127 + #define declare_show_sampling_rate_min(_gov) \
15128 + static ssize_t show_sampling_rate_min_gov_sys \
15129 +-(struct kobject *kobj, struct attribute *attr, char *buf) \
15130 ++(struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
15131 + { \
15132 + struct dbs_data *dbs_data = _gov##_dbs_cdata.gdbs_data; \
15133 + return sprintf(buf, "%u\n", dbs_data->min_sampling_rate); \
15134 diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
15135 -index 03ac6ce..2d7a94b 100644
15136 +index eae5107..26e7a39 100644
15137 --- a/drivers/cpufreq/cpufreq_ondemand.c
15138 +++ b/drivers/cpufreq/cpufreq_ondemand.c
15139 -@@ -509,7 +509,7 @@ static void od_exit(struct dbs_data *dbs_data, bool notify)
15140 +@@ -534,7 +534,7 @@ static void od_exit(struct dbs_data *dbs_data, bool notify)
15141
15142 define_get_cpu_dbs_routines(od_cpu_dbs_info);
15143
15144 @@ -41028,7 +42976,7 @@ index 03ac6ce..2d7a94b 100644
15145 .powersave_bias_init_cpu = ondemand_powersave_bias_init_cpu,
15146 .powersave_bias_target = generic_powersave_bias_target,
15147 .freq_increase = dbs_freq_increase,
15148 -@@ -568,14 +568,18 @@ void od_register_powersave_bias_handler(unsigned int (*f)
15149 +@@ -593,14 +593,18 @@ void od_register_powersave_bias_handler(unsigned int (*f)
15150 (struct cpufreq_policy *, unsigned int, unsigned int),
15151 unsigned int powersave_bias)
15152 {
15153 @@ -41050,15 +42998,11 @@ index 03ac6ce..2d7a94b 100644
15154 }
15155 EXPORT_SYMBOL_GPL(od_unregister_powersave_bias_handler);
15156 diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
15157 -index 98fb882..9f1d2a4 100644
15158 +index cd83d47..3ad4309 100644
15159 --- a/drivers/cpufreq/intel_pstate.c
15160 +++ b/drivers/cpufreq/intel_pstate.c
15161 -@@ -138,10 +138,10 @@ struct pstate_funcs {
15162 - struct cpu_defaults {
15163 - struct pstate_adjust_policy pid_policy;
15164 - struct pstate_funcs funcs;
15165 --};
15166 -+} __do_const;
15167 +@@ -147,7 +147,7 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu);
15168 + static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu);
15169
15170 static struct pstate_adjust_policy pid_params;
15171 -static struct pstate_funcs pstate_funcs;
15172 @@ -41066,7 +43010,68 @@ index 98fb882..9f1d2a4 100644
15173 static int hwp_active;
15174
15175 struct perf_limits {
15176 -@@ -840,19 +840,19 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate, bool force)
15177 +@@ -374,13 +374,13 @@ static void __init intel_pstate_debug_expose_params(void)
15178 + /************************** sysfs begin ************************/
15179 + #define show_one(file_name, object) \
15180 + static ssize_t show_##file_name \
15181 +- (struct kobject *kobj, struct attribute *attr, char *buf) \
15182 ++ (struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
15183 + { \
15184 + return sprintf(buf, "%u\n", limits->object); \
15185 + }
15186 +
15187 + static ssize_t show_turbo_pct(struct kobject *kobj,
15188 +- struct attribute *attr, char *buf)
15189 ++ struct kobj_attribute *attr, char *buf)
15190 + {
15191 + struct cpudata *cpu;
15192 + int total, no_turbo, turbo_pct;
15193 +@@ -396,7 +396,7 @@ static ssize_t show_turbo_pct(struct kobject *kobj,
15194 + }
15195 +
15196 + static ssize_t show_num_pstates(struct kobject *kobj,
15197 +- struct attribute *attr, char *buf)
15198 ++ struct kobj_attribute *attr, char *buf)
15199 + {
15200 + struct cpudata *cpu;
15201 + int total;
15202 +@@ -407,7 +407,7 @@ static ssize_t show_num_pstates(struct kobject *kobj,
15203 + }
15204 +
15205 + static ssize_t show_no_turbo(struct kobject *kobj,
15206 +- struct attribute *attr, char *buf)
15207 ++ struct kobj_attribute *attr, char *buf)
15208 + {
15209 + ssize_t ret;
15210 +
15211 +@@ -420,7 +420,7 @@ static ssize_t show_no_turbo(struct kobject *kobj,
15212 + return ret;
15213 + }
15214 +
15215 +-static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
15216 ++static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
15217 + const char *buf, size_t count)
15218 + {
15219 + unsigned int input;
15220 +@@ -444,7 +444,7 @@ static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
15221 + return count;
15222 + }
15223 +
15224 +-static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
15225 ++static ssize_t store_max_perf_pct(struct kobject *a, struct kobj_attribute *b,
15226 + const char *buf, size_t count)
15227 + {
15228 + unsigned int input;
15229 +@@ -469,7 +469,7 @@ static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
15230 + return count;
15231 + }
15232 +
15233 +-static ssize_t store_min_perf_pct(struct kobject *a, struct attribute *b,
15234 ++static ssize_t store_min_perf_pct(struct kobject *a, struct kobj_attribute *b,
15235 + const char *buf, size_t count)
15236 + {
15237 + unsigned int input;
15238 +@@ -850,19 +850,19 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate, bool force)
15239
15240 cpu->pstate.current_pstate = pstate;
15241
15242 @@ -41094,7 +43099,16 @@ index 98fb882..9f1d2a4 100644
15243 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate, false);
15244 }
15245
15246 -@@ -1210,15 +1210,15 @@ static unsigned int force_load;
15247 +@@ -1016,7 +1016,7 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
15248 +
15249 + from = cpu->pstate.current_pstate;
15250 +
15251 +- target_pstate = pstate_funcs.get_target_pstate(cpu);
15252 ++ target_pstate = pstate_funcs->get_target_pstate(cpu);
15253 +
15254 + intel_pstate_set_pstate(cpu, target_pstate, true);
15255 +
15256 +@@ -1249,15 +1249,15 @@ static unsigned int force_load;
15257
15258 static int intel_pstate_msrs_not_valid(void)
15259 {
15260 @@ -41114,7 +43128,7 @@ index 98fb882..9f1d2a4 100644
15261 {
15262 pid_params.sample_rate_ms = policy->sample_rate_ms;
15263 pid_params.p_gain_pct = policy->p_gain_pct;
15264 -@@ -1230,13 +1230,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy)
15265 +@@ -1269,15 +1269,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy)
15266
15267 static void copy_cpu_funcs(struct pstate_funcs *funcs)
15268 {
15269 @@ -41125,6 +43139,8 @@ index 98fb882..9f1d2a4 100644
15270 - pstate_funcs.get_scaling = funcs->get_scaling;
15271 - pstate_funcs.set = funcs->set;
15272 - pstate_funcs.get_vid = funcs->get_vid;
15273 +- pstate_funcs.get_target_pstate = funcs->get_target_pstate;
15274 +-
15275 + pstate_funcs = funcs;
15276 }
15277
15278 @@ -41328,6 +43344,38 @@ index fb9f511..213e6cc 100644
15279 if (!cpuidle_curr_governor ||
15280 cpuidle_curr_governor->rating < gov->rating)
15281 cpuidle_switch_governor(gov);
15282 +diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c
15283 +index 63bd5a4..eea2dff 100644
15284 +--- a/drivers/cpuidle/governors/ladder.c
15285 ++++ b/drivers/cpuidle/governors/ladder.c
15286 +@@ -173,6 +173,15 @@ static void ladder_reflect(struct cpuidle_device *dev, int index)
15287 +
15288 + static struct cpuidle_governor ladder_governor = {
15289 + .name = "ladder",
15290 ++ .rating = 25,
15291 ++ .enable = ladder_enable_device,
15292 ++ .select = ladder_select_state,
15293 ++ .reflect = ladder_reflect,
15294 ++ .owner = THIS_MODULE,
15295 ++};
15296 ++
15297 ++static struct cpuidle_governor ladder_governor_nohz = {
15298 ++ .name = "ladder",
15299 + .rating = 10,
15300 + .enable = ladder_enable_device,
15301 + .select = ladder_select_state,
15302 +@@ -190,10 +199,8 @@ static int __init init_ladder(void)
15303 + * governor is better so give it a higher rating than the menu
15304 + * governor.
15305 + */
15306 +- if (!tick_nohz_enabled)
15307 +- ladder_governor.rating = 25;
15308 +
15309 +- return cpuidle_register_governor(&ladder_governor);
15310 ++ return cpuidle_register_governor(tick_nohz_enabled ? &ladder_governor_nohz : &ladder_governor);
15311 + }
15312 +
15313 + postcore_initcall(init_ladder);
15314 diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
15315 index 832a2c3..1794080 100644
15316 --- a/drivers/cpuidle/sysfs.c
15317 @@ -41370,10 +43418,10 @@ index 8ef06fa..ab9945f 100644
15318 state.msg_bits = rctx->msg_bits;
15319 state.first = rctx->first;
15320 diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
15321 -index ca5c71a..df88d0c 100644
15322 +index eee2c7e..268aa3e 100644
15323 --- a/drivers/crypto/hifn_795x.c
15324 +++ b/drivers/crypto/hifn_795x.c
15325 -@@ -49,7 +49,7 @@ module_param_string(hifn_pll_ref, hifn_pll_ref, sizeof(hifn_pll_ref), 0444);
15326 +@@ -37,7 +37,7 @@ module_param_string(hifn_pll_ref, hifn_pll_ref, sizeof(hifn_pll_ref), 0444);
15327 MODULE_PARM_DESC(hifn_pll_ref,
15328 "PLL reference clock (pci[freq] or ext[freq], default ext)");
15329
15330 @@ -41382,12 +43430,12 @@ index ca5c71a..df88d0c 100644
15331
15332 #define ACRYPTO_OP_DECRYPT 0
15333 #define ACRYPTO_OP_ENCRYPT 1
15334 -@@ -2575,7 +2575,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
15335 +@@ -2483,7 +2483,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
15336 goto err_out_disable_pci_device;
15337
15338 snprintf(name, sizeof(name), "hifn%d",
15339 -- atomic_inc_return(&hifn_dev_number)-1);
15340 -+ atomic_inc_return_unchecked(&hifn_dev_number)-1);
15341 +- atomic_inc_return(&hifn_dev_number) - 1);
15342 ++ atomic_inc_return_unchecked(&hifn_dev_number) - 1);
15343
15344 err = pci_request_regions(pdev, name);
15345 if (err)
15346 @@ -41413,7 +43461,7 @@ index bd985e7..74071e4 100644
15347 u64 len;
15348 int src_nents;
15349 diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
15350 -index 6ec55b4..27b314e 100644
15351 +index 683cca9..7ca2e0f 100644
15352 --- a/drivers/crypto/marvell/hash.c
15353 +++ b/drivers/crypto/marvell/hash.c
15354 @@ -45,69 +45,25 @@ mv_cesa_ahash_req_iter_next_op(struct mv_cesa_ahash_dma_iter *iter)
15355 @@ -41546,7 +43594,7 @@ index 6ec55b4..27b314e 100644
15356 return mv_cesa_dma_add_data_transfer(chain,
15357 CESA_SA_DATA_SRAM_OFFSET,
15358 ahashdreq->cache_dma,
15359 -@@ -844,10 +798,6 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
15360 +@@ -848,10 +802,6 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
15361 if (!cache_ptr)
15362 return 0;
15363
15364 @@ -41557,7 +43605,7 @@ index 6ec55b4..27b314e 100644
15365 memcpy(creq->cache, cache, cache_ptr);
15366 creq->cache_ptr = cache_ptr;
15367
15368 -@@ -856,9 +806,14 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
15369 +@@ -860,9 +810,14 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
15370
15371 static int mv_cesa_md5_init(struct ahash_request *req)
15372 {
15373 @@ -41572,7 +43620,7 @@ index 6ec55b4..27b314e 100644
15374
15375 mv_cesa_ahash_init(req, &tmpl, true);
15376
15377 -@@ -919,9 +874,15 @@ struct ahash_alg mv_md5_alg = {
15378 +@@ -923,9 +878,15 @@ struct ahash_alg mv_md5_alg = {
15379
15380 static int mv_cesa_sha1_init(struct ahash_request *req)
15381 {
15382 @@ -41588,7 +43636,7 @@ index 6ec55b4..27b314e 100644
15383
15384 mv_cesa_ahash_init(req, &tmpl, false);
15385
15386 -@@ -982,9 +943,18 @@ struct ahash_alg mv_sha1_alg = {
15387 +@@ -986,9 +947,18 @@ struct ahash_alg mv_sha1_alg = {
15388
15389 static int mv_cesa_sha256_init(struct ahash_request *req)
15390 {
15391 @@ -41607,11 +43655,71 @@ index 6ec55b4..27b314e 100644
15392
15393 mv_cesa_ahash_init(req, &tmpl, false);
15394
15395 +diff --git a/drivers/crypto/qat/qat_common/adf_aer.c b/drivers/crypto/qat/qat_common/adf_aer.c
15396 +index e78a1d7..f6ef8aa 100644
15397 +--- a/drivers/crypto/qat/qat_common/adf_aer.c
15398 ++++ b/drivers/crypto/qat/qat_common/adf_aer.c
15399 +@@ -56,7 +56,7 @@
15400 + static struct workqueue_struct *device_reset_wq;
15401 +
15402 + static pci_ers_result_t adf_error_detected(struct pci_dev *pdev,
15403 +- pci_channel_state_t state)
15404 ++ enum pci_channel_state state)
15405 + {
15406 + struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
15407 +
15408 +diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c
15409 +index 1117a8b..6f9dd73 100644
15410 +--- a/drivers/crypto/qat/qat_common/adf_sriov.c
15411 ++++ b/drivers/crypto/qat/qat_common/adf_sriov.c
15412 +@@ -93,7 +93,7 @@ static void adf_iov_send_resp(struct work_struct *work)
15413 + kfree(pf2vf_resp);
15414 + }
15415 +
15416 +-static void adf_vf2pf_bh_handler(void *data)
15417 ++static void adf_vf2pf_bh_handler(unsigned long data)
15418 + {
15419 + struct adf_accel_vf_info *vf_info = (struct adf_accel_vf_info *)data;
15420 + struct adf_pf2vf_resp *pf2vf_resp;
15421 +@@ -131,7 +131,7 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev)
15422 + vf_info->vf_nr = i;
15423 +
15424 + tasklet_init(&vf_info->vf2pf_bh_tasklet,
15425 +- (void *)adf_vf2pf_bh_handler,
15426 ++ adf_vf2pf_bh_handler,
15427 + (unsigned long)vf_info);
15428 + mutex_init(&vf_info->pf2vf_lock);
15429 + ratelimit_state_init(&vf_info->vf2pf_ratelimit,
15430 +diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c
15431 +index 09427b3..50f7306 100644
15432 +--- a/drivers/crypto/qat/qat_common/adf_vf_isr.c
15433 ++++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c
15434 +@@ -90,9 +90,9 @@ static void adf_disable_msi(struct adf_accel_dev *accel_dev)
15435 + pci_disable_msi(pdev);
15436 + }
15437 +
15438 +-static void adf_pf2vf_bh_handler(void *data)
15439 ++static void adf_pf2vf_bh_handler(unsigned long data)
15440 + {
15441 +- struct adf_accel_dev *accel_dev = data;
15442 ++ struct adf_accel_dev *accel_dev = (struct adf_accel_dev *)data;
15443 + struct adf_hw_device_data *hw_data = accel_dev->hw_device;
15444 + struct adf_bar *pmisc =
15445 + &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)];
15446 +@@ -143,7 +143,7 @@ err:
15447 + static int adf_setup_pf2vf_bh(struct adf_accel_dev *accel_dev)
15448 + {
15449 + tasklet_init(&accel_dev->vf.pf2vf_bh_tasklet,
15450 +- (void *)adf_pf2vf_bh_handler, (unsigned long)accel_dev);
15451 ++ adf_pf2vf_bh_handler, (unsigned long)accel_dev);
15452 +
15453 + mutex_init(&accel_dev->vf.vf2pf_lock);
15454 + return 0;
15455 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
15456 -index ca848cc..9049c89 100644
15457 +index 984c5e9..c873659 100644
15458 --- a/drivers/devfreq/devfreq.c
15459 +++ b/drivers/devfreq/devfreq.c
15460 -@@ -671,7 +671,7 @@ int devfreq_add_governor(struct devfreq_governor *governor)
15461 +@@ -717,7 +717,7 @@ int devfreq_add_governor(struct devfreq_governor *governor)
15462 goto err_out;
15463 }
15464
15465 @@ -41620,7 +43728,7 @@ index ca848cc..9049c89 100644
15466
15467 list_for_each_entry(devfreq, &devfreq_list, node) {
15468 int ret = 0;
15469 -@@ -759,7 +759,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
15470 +@@ -805,7 +805,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
15471 }
15472 }
15473
15474 @@ -41658,10 +43766,10 @@ index 11707df..2ea96f7 100644
15475
15476 /* Run before NMI debug handler and KGDB */
15477 diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
15478 -index 5358737..2064670 100644
15479 +index a979003..773b7f0 100644
15480 --- a/drivers/edac/edac_device.c
15481 +++ b/drivers/edac/edac_device.c
15482 -@@ -474,9 +474,9 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
15483 +@@ -468,9 +468,9 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
15484 */
15485 int edac_device_alloc_index(void)
15486 {
15487 @@ -41673,10 +43781,32 @@ index 5358737..2064670 100644
15488 }
15489 EXPORT_SYMBOL_GPL(edac_device_alloc_index);
15490
15491 +diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c
15492 +index 93da1a4..5e2c149 100644
15493 +--- a/drivers/edac/edac_device_sysfs.c
15494 ++++ b/drivers/edac/edac_device_sysfs.c
15495 +@@ -749,7 +749,7 @@ static int edac_device_add_main_sysfs_attributes(
15496 + */
15497 + while (sysfs_attrib->attr.name != NULL) {
15498 + err = sysfs_create_file(&edac_dev->kobj,
15499 +- (struct attribute*) sysfs_attrib);
15500 ++ &sysfs_attrib->attr);
15501 + if (err)
15502 + goto err_out;
15503 +
15504 diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
15505 -index 58aed67..e6817a1 100644
15506 +index 26e65ab..9a1e25d 100644
15507 --- a/drivers/edac/edac_mc_sysfs.c
15508 +++ b/drivers/edac/edac_mc_sysfs.c
15509 +@@ -50,7 +50,7 @@ int edac_mc_get_poll_msec(void)
15510 + return edac_mc_poll_msec;
15511 + }
15512 +
15513 +-static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
15514 ++static int edac_set_poll_msec(const char *val, const struct kernel_param *kp)
15515 + {
15516 + unsigned long l;
15517 + int ret;
15518 @@ -154,7 +154,7 @@ static const char * const edac_caps[] = {
15519 struct dev_ch_attribute {
15520 struct device_attribute attr;
15521 @@ -41686,8 +43816,21 @@ index 58aed67..e6817a1 100644
15522
15523 #define DEVICE_CHANNEL(_name, _mode, _show, _store, _var) \
15524 static struct dev_ch_attribute dev_attr_legacy_##_name = \
15525 +diff --git a/drivers/edac/edac_module.c b/drivers/edac/edac_module.c
15526 +index 5f8543b..46aa017 100644
15527 +--- a/drivers/edac/edac_module.c
15528 ++++ b/drivers/edac/edac_module.c
15529 +@@ -19,7 +19,7 @@
15530 +
15531 + #ifdef CONFIG_EDAC_DEBUG
15532 +
15533 +-static int edac_set_debug_level(const char *buf, struct kernel_param *kp)
15534 ++static int edac_set_debug_level(const char *buf, const struct kernel_param *kp)
15535 + {
15536 + unsigned long val;
15537 + int ret;
15538 diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
15539 -index b4b3860..08d7faa 100644
15540 +index 9968538..fa53f93 100644
15541 --- a/drivers/edac/edac_pci.c
15542 +++ b/drivers/edac/edac_pci.c
15543 @@ -29,7 +29,7 @@
15544 @@ -41699,7 +43842,7 @@ index b4b3860..08d7faa 100644
15545
15546 /*
15547 * edac_pci_alloc_ctl_info
15548 -@@ -314,7 +314,7 @@ EXPORT_SYMBOL_GPL(edac_pci_reset_delay_period);
15549 +@@ -255,7 +255,7 @@ static void edac_pci_workq_teardown(struct edac_pci_ctl_info *pci)
15550 */
15551 int edac_pci_alloc_index(void)
15552 {
15553 @@ -41709,7 +43852,7 @@ index b4b3860..08d7faa 100644
15554 EXPORT_SYMBOL_GPL(edac_pci_alloc_index);
15555
15556 diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
15557 -index 24d877f..4e30133 100644
15558 +index 6e3428b..9bdb207 100644
15559 --- a/drivers/edac/edac_pci_sysfs.c
15560 +++ b/drivers/edac/edac_pci_sysfs.c
15561 @@ -23,8 +23,8 @@ static int edac_pci_log_pe = 1; /* log PCI parity errors */
15562 @@ -41732,7 +43875,7 @@ index 24d877f..4e30133 100644
15563
15564 /* Set of show/store abstract level functions for PCI Parity object */
15565 static ssize_t edac_pci_dev_show(struct kobject *kobj, struct attribute *attr,
15566 -@@ -576,7 +576,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15567 +@@ -564,7 +564,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15568 edac_printk(KERN_CRIT, EDAC_PCI,
15569 "Signaled System Error on %s\n",
15570 pci_name(dev));
15571 @@ -41741,7 +43884,7 @@ index 24d877f..4e30133 100644
15572 }
15573
15574 if (status & (PCI_STATUS_PARITY)) {
15575 -@@ -584,7 +584,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15576 +@@ -572,7 +572,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15577 "Master Data Parity Error on %s\n",
15578 pci_name(dev));
15579
15580 @@ -41750,7 +43893,7 @@ index 24d877f..4e30133 100644
15581 }
15582
15583 if (status & (PCI_STATUS_DETECTED_PARITY)) {
15584 -@@ -592,7 +592,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15585 +@@ -580,7 +580,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15586 "Detected Parity Error on %s\n",
15587 pci_name(dev));
15588
15589 @@ -41759,7 +43902,7 @@ index 24d877f..4e30133 100644
15590 }
15591 }
15592
15593 -@@ -615,7 +615,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15594 +@@ -603,7 +603,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15595 edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
15596 "Signaled System Error on %s\n",
15597 pci_name(dev));
15598 @@ -41768,7 +43911,7 @@ index 24d877f..4e30133 100644
15599 }
15600
15601 if (status & (PCI_STATUS_PARITY)) {
15602 -@@ -623,7 +623,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15603 +@@ -611,7 +611,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15604 "Master Data Parity Error on "
15605 "%s\n", pci_name(dev));
15606
15607 @@ -41777,7 +43920,7 @@ index 24d877f..4e30133 100644
15608 }
15609
15610 if (status & (PCI_STATUS_DETECTED_PARITY)) {
15611 -@@ -631,7 +631,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15612 +@@ -619,7 +619,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
15613 "Detected Parity Error on %s\n",
15614 pci_name(dev));
15615
15616 @@ -41786,7 +43929,7 @@ index 24d877f..4e30133 100644
15617 }
15618 }
15619 }
15620 -@@ -669,7 +669,7 @@ void edac_pci_do_parity_check(void)
15621 +@@ -657,7 +657,7 @@ void edac_pci_do_parity_check(void)
15622 if (!check_pci_errors)
15623 return;
15624
15625 @@ -41795,7 +43938,7 @@ index 24d877f..4e30133 100644
15626
15627 /* scan all PCI devices looking for a Parity Error on devices and
15628 * bridges.
15629 -@@ -681,7 +681,7 @@ void edac_pci_do_parity_check(void)
15630 +@@ -669,7 +669,7 @@ void edac_pci_do_parity_check(void)
15631 /* Only if operator has selected panic on PCI Error */
15632 if (edac_pci_get_panic_on_pe()) {
15633 /* If the count is different 'after' from 'before' */
15634 @@ -41842,6 +43985,28 @@ index 57ea7f4..af06b76 100644
15635
15636 card->driver->update_phy_reg(card, 4,
15637 PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
15638 +diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
15639 +index 36a7c2d..3cea1bf 100644
15640 +--- a/drivers/firewire/core-cdev.c
15641 ++++ b/drivers/firewire/core-cdev.c
15642 +@@ -970,7 +970,7 @@ static int ioctl_create_iso_context(struct client *client, union ioctl_arg *arg)
15643 + {
15644 + struct fw_cdev_create_iso_context *a = &arg->create_iso_context;
15645 + struct fw_iso_context *context;
15646 +- fw_iso_callback_t cb;
15647 ++ void *cb;
15648 + int ret;
15649 +
15650 + BUILD_BUG_ON(FW_CDEV_ISO_CONTEXT_TRANSMIT != FW_ISO_CONTEXT_TRANSMIT ||
15651 +@@ -995,7 +995,7 @@ static int ioctl_create_iso_context(struct client *client, union ioctl_arg *arg)
15652 + break;
15653 +
15654 + case FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL:
15655 +- cb = (fw_iso_callback_t)iso_mc_callback;
15656 ++ cb = iso_mc_callback;
15657 + break;
15658 +
15659 + default:
15660 diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
15661 index f9e3aee..269dbdb 100644
15662 --- a/drivers/firewire/core-device.c
15663 @@ -41855,6 +44020,19 @@ index f9e3aee..269dbdb 100644
15664
15665 static ssize_t show_immediate(struct device *dev,
15666 struct device_attribute *dattr, char *buf)
15667 +diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
15668 +index 38c0aa6..95466e4 100644
15669 +--- a/drivers/firewire/core-iso.c
15670 ++++ b/drivers/firewire/core-iso.c
15671 +@@ -162,7 +162,7 @@ size_t fw_iso_buffer_lookup(struct fw_iso_buffer *buffer, dma_addr_t completed)
15672 +
15673 + struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
15674 + int type, int channel, int speed, size_t header_size,
15675 +- fw_iso_callback_t callback, void *callback_data)
15676 ++ void *callback, void *callback_data)
15677 + {
15678 + struct fw_iso_context *ctx;
15679 +
15680 diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
15681 index d6a09b9..18e90dd 100644
15682 --- a/drivers/firewire/core-transaction.c
15683 @@ -41908,7 +44086,7 @@ index c2f5117..e36414d 100644
15684 /*
15685 * FIXME: Make sure this bitmask is cleared when we clear the busReset
15686 diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
15687 -index 94a58a0..f5eba42 100644
15688 +index 94a58a0..5b8dd03 100644
15689 --- a/drivers/firmware/dmi-id.c
15690 +++ b/drivers/firmware/dmi-id.c
15691 @@ -16,7 +16,7 @@
15692 @@ -41920,11 +44098,27 @@ index 94a58a0..f5eba42 100644
15693 #define to_dmi_dev_attr(_dev_attr) \
15694 container_of(_dev_attr, struct dmi_device_attribute, dev_attr)
15695
15696 +@@ -159,9 +159,14 @@ static int dmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
15697 + return 0;
15698 + }
15699 +
15700 ++static void dmi_dev_release(struct device *dev)
15701 ++{
15702 ++ kfree(dev);
15703 ++}
15704 ++
15705 + static struct class dmi_class = {
15706 + .name = "dmi",
15707 +- .dev_release = (void(*)(struct device *)) kfree,
15708 ++ .dev_release = dmi_dev_release,
15709 + .dev_uevent = dmi_dev_uevent,
15710 + };
15711 +
15712 diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
15713 -index 0e08e66..7824b4a 100644
15714 +index 88bebe1..c7b636f 100644
15715 --- a/drivers/firmware/dmi_scan.c
15716 +++ b/drivers/firmware/dmi_scan.c
15717 -@@ -690,14 +690,18 @@ static int __init dmi_init(void)
15718 +@@ -712,14 +712,18 @@ static int __init dmi_init(void)
15719 if (!dmi_table)
15720 goto err_tables;
15721
15722 @@ -41969,10 +44163,10 @@ index d425374..1da1716 100644
15723 EXPORT_SYMBOL_GPL(cper_next_record_id);
15724
15725 diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
15726 -index 027ca21..65689be 100644
15727 +index 2cd37da..8bcbe8b 100644
15728 --- a/drivers/firmware/efi/efi.c
15729 +++ b/drivers/firmware/efi/efi.c
15730 -@@ -174,14 +174,16 @@ static struct attribute_group efi_subsys_attr_group = {
15731 +@@ -176,14 +176,16 @@ static struct attribute_group efi_subsys_attr_group = {
15732 };
15733
15734 static struct efivars generic_efivars;
15735 @@ -42072,10 +44266,10 @@ index 5de3ed2..d839c56 100644
15736 .sysfs_ops = &memmap_attr_ops,
15737 .default_attrs = def_attrs,
15738 diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
15739 -index d24f35d..5875c5d 100644
15740 +index f25cd79..7b7ad07 100644
15741 --- a/drivers/firmware/psci.c
15742 +++ b/drivers/firmware/psci.c
15743 -@@ -54,7 +54,7 @@ bool psci_tos_resident_on(int cpu)
15744 +@@ -55,7 +55,7 @@ bool psci_tos_resident_on(int cpu)
15745 return cpu == resident_cpu;
15746 }
15747
15748 @@ -42085,10 +44279,10 @@ index d24f35d..5875c5d 100644
15749 typedef unsigned long (psci_fn)(unsigned long, unsigned long,
15750 unsigned long, unsigned long);
15751 diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
15752 -index 5e71538..00b7406 100644
15753 +index cd007a6..6fd1a2e 100644
15754 --- a/drivers/gpio/gpio-davinci.c
15755 +++ b/drivers/gpio/gpio-davinci.c
15756 -@@ -441,9 +441,9 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
15757 +@@ -439,9 +439,9 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
15758 return &gpio_unbanked.chip;
15759 };
15760
15761 @@ -42100,7 +44294,7 @@ index 5e71538..00b7406 100644
15762
15763 gpio_unbanked = *irq_get_chip(irq);
15764 return &gpio_unbanked;
15765 -@@ -473,7 +473,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
15766 +@@ -471,7 +471,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
15767 struct davinci_gpio_regs __iomem *g;
15768 struct irq_domain *irq_domain = NULL;
15769 const struct of_device_id *match;
15770 @@ -42110,7 +44304,7 @@ index 5e71538..00b7406 100644
15771
15772 /*
15773 diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
15774 -index 6bca1e1..ed8b22e 100644
15775 +index 8d32ccc..2d2ca61 100644
15776 --- a/drivers/gpio/gpio-em.c
15777 +++ b/drivers/gpio/gpio-em.c
15778 @@ -274,7 +274,7 @@ static int em_gio_probe(struct platform_device *pdev)
15779 @@ -42123,7 +44317,7 @@ index 6bca1e1..ed8b22e 100644
15780 unsigned int ngpios;
15781 int ret;
15782 diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
15783 -index 4ba7ed5..1536b5d 100644
15784 +index a489338..3c0a85b 100644
15785 --- a/drivers/gpio/gpio-ich.c
15786 +++ b/drivers/gpio/gpio-ich.c
15787 @@ -94,7 +94,7 @@ struct ichx_desc {
15788 @@ -42136,7 +44330,7 @@ index 4ba7ed5..1536b5d 100644
15789 static struct {
15790 spinlock_t lock;
15791 diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
15792 -index f7fbb46..cee8e40 100644
15793 +index 189f672..c52c254 100644
15794 --- a/drivers/gpio/gpio-omap.c
15795 +++ b/drivers/gpio/gpio-omap.c
15796 @@ -1069,7 +1069,7 @@ static void omap_gpio_mod_init(struct gpio_bank *bank)
15797 @@ -42158,10 +44352,10 @@ index f7fbb46..cee8e40 100644
15798
15799 match = of_match_device(of_match_ptr(omap_gpio_match), dev);
15800 diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
15801 -index 2a81224..ec01fb3 100644
15802 +index d9ab0cd..406ce88 100644
15803 --- a/drivers/gpio/gpio-rcar.c
15804 +++ b/drivers/gpio/gpio-rcar.c
15805 -@@ -398,7 +398,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
15806 +@@ -421,7 +421,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
15807 struct gpio_rcar_priv *p;
15808 struct resource *io, *irq;
15809 struct gpio_chip *gpio_chip;
15810 @@ -42169,9 +44363,9 @@ index 2a81224..ec01fb3 100644
15811 + irq_chip_no_const *irq_chip;
15812 struct device *dev = &pdev->dev;
15813 const char *name = dev_name(dev);
15814 - int ret;
15815 + unsigned int npins;
15816 diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
15817 -index c1caa45..f0f97d2 100644
15818 +index ac8deb0..f3caa10 100644
15819 --- a/drivers/gpio/gpio-vr41xx.c
15820 +++ b/drivers/gpio/gpio-vr41xx.c
15821 @@ -224,7 +224,7 @@ static int giu_get_irq(unsigned int irq)
15822 @@ -42184,10 +44378,10 @@ index c1caa45..f0f97d2 100644
15823 return -EINVAL;
15824 }
15825 diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
15826 -index 4e4c308..d041d75 100644
15827 +index 5c1ba87..ab4a059 100644
15828 --- a/drivers/gpio/gpiolib.c
15829 +++ b/drivers/gpio/gpiolib.c
15830 -@@ -638,8 +638,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
15831 +@@ -669,8 +669,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
15832 }
15833
15834 if (gpiochip->irqchip) {
15835 @@ -42200,7 +44394,7 @@ index 4e4c308..d041d75 100644
15836 gpiochip->irqchip = NULL;
15837 }
15838 }
15839 -@@ -715,8 +717,10 @@ int _gpiochip_irqchip_add(struct gpio_chip *gpiochip,
15840 +@@ -747,8 +749,10 @@ int _gpiochip_irqchip_add(struct gpio_chip *gpiochip,
15841 */
15842 if (!irqchip->irq_request_resources &&
15843 !irqchip->irq_release_resources) {
15844 @@ -42214,10 +44408,19 @@ index 4e4c308..d041d75 100644
15845
15846 /*
15847 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
15848 -index bb1099c..8eff7b2 100644
15849 +index 5e7770f..a84a2c6 100644
15850 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
15851 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
15852 -@@ -2338,7 +2338,7 @@ static inline void amdgpu_unregister_atpx_handler(void) {}
15853 +@@ -1733,7 +1733,7 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor);
15854 + * amdgpu smumgr functions
15855 + */
15856 + struct amdgpu_smumgr_funcs {
15857 +- int (*check_fw_load_finish)(struct amdgpu_device *adev, uint32_t fwtype);
15858 ++ int (*check_fw_load_finish)(struct amdgpu_device *adev, enum AMDGPU_UCODE_ID fwtype);
15859 + int (*request_smu_load_fw)(struct amdgpu_device *adev);
15860 + int (*request_smu_specific_fw)(struct amdgpu_device *adev, uint32_t fwtype);
15861 + };
15862 +@@ -2345,7 +2345,7 @@ static inline void amdgpu_unregister_atpx_handler(void) {}
15863 * KMS
15864 */
15865 extern const struct drm_ioctl_desc amdgpu_ioctls_kms[];
15866 @@ -42226,11 +44429,24 @@ index bb1099c..8eff7b2 100644
15867
15868 int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags);
15869 int amdgpu_driver_unload_kms(struct drm_device *dev);
15870 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
15871 +index 81dc6b6..2762d6b 100644
15872 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
15873 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
15874 +@@ -493,7 +493,7 @@ static int amdgpu_atpx_init(void)
15875 + * look up whether we are the integrated or discrete GPU (all asics).
15876 + * Returns the client id.
15877 + */
15878 +-static int amdgpu_atpx_get_client_id(struct pci_dev *pdev)
15879 ++static enum vga_switcheroo_client_id amdgpu_atpx_get_client_id(struct pci_dev *pdev)
15880 + {
15881 + if (amdgpu_atpx_priv.dhandle == ACPI_HANDLE(&pdev->dev))
15882 + return VGA_SWITCHEROO_IGD;
15883 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
15884 -index 8e99514..3d68786 100644
15885 +index 75cb5b9..2f6481f 100644
15886 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
15887 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
15888 -@@ -737,44 +737,44 @@ static int amdgpu_cgs_get_firmware_info(void *cgs_device,
15889 +@@ -1066,48 +1066,48 @@ int amdgpu_cgs_call_acpi_method(void *cgs_device,
15890 }
15891
15892 static const struct cgs_ops amdgpu_cgs_ops = {
15893 @@ -42253,6 +44469,7 @@ index 8e99514..3d68786 100644
15894 - amdgpu_cgs_write_pci_config_byte,
15895 - amdgpu_cgs_write_pci_config_word,
15896 - amdgpu_cgs_write_pci_config_dword,
15897 +- amdgpu_cgs_get_pci_resource,
15898 - amdgpu_cgs_atom_get_data_table,
15899 - amdgpu_cgs_atom_get_cmd_table_revs,
15900 - amdgpu_cgs_atom_exec_cmd_table,
15901 @@ -42265,7 +44482,10 @@ index 8e99514..3d68786 100644
15902 - amdgpu_cgs_set_camera_voltages,
15903 - amdgpu_cgs_get_firmware_info,
15904 - amdgpu_cgs_set_powergating_state,
15905 -- amdgpu_cgs_set_clockgating_state
15906 +- amdgpu_cgs_set_clockgating_state,
15907 +- amdgpu_cgs_get_active_displays_info,
15908 +- amdgpu_cgs_call_acpi_method,
15909 +- amdgpu_cgs_query_system_info,
15910 + .gpu_mem_info = amdgpu_cgs_gpu_mem_info,
15911 + .gmap_kmem = amdgpu_cgs_gmap_kmem,
15912 + .gunmap_kmem = amdgpu_cgs_gunmap_kmem,
15913 @@ -42285,6 +44505,7 @@ index 8e99514..3d68786 100644
15914 + .write_pci_config_byte = amdgpu_cgs_write_pci_config_byte,
15915 + .write_pci_config_word = amdgpu_cgs_write_pci_config_word,
15916 + .write_pci_config_dword = amdgpu_cgs_write_pci_config_dword,
15917 ++ .get_pci_resource = amdgpu_cgs_get_pci_resource,
15918 + .atom_get_data_table = amdgpu_cgs_atom_get_data_table,
15919 + .atom_get_cmd_table_revs = amdgpu_cgs_atom_get_cmd_table_revs,
15920 + .atom_exec_cmd_table = amdgpu_cgs_atom_exec_cmd_table,
15921 @@ -42297,7 +44518,10 @@ index 8e99514..3d68786 100644
15922 + .set_camera_voltages = amdgpu_cgs_set_camera_voltages,
15923 + .get_firmware_info = amdgpu_cgs_get_firmware_info,
15924 + .set_powergating_state = amdgpu_cgs_set_powergating_state,
15925 -+ .set_clockgating_state = amdgpu_cgs_set_clockgating_state
15926 ++ .set_clockgating_state = amdgpu_cgs_set_clockgating_state,
15927 ++ .get_active_displays_info = amdgpu_cgs_get_active_displays_info,
15928 ++ .call_acpi_method = amdgpu_cgs_call_acpi_method,
15929 ++ .query_system_info = amdgpu_cgs_query_system_info
15930 };
15931
15932 static const struct cgs_os_ops amdgpu_cgs_os_ops = {
15933 @@ -42310,11 +44534,51 @@ index 8e99514..3d68786 100644
15934 };
15935
15936 void *amdgpu_cgs_create_device(struct amdgpu_device *adev)
15937 +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
15938 +index 119cdc2..fd6698c 100644
15939 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
15940 ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
15941 +@@ -701,7 +701,7 @@ static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector)
15942 + return ret;
15943 + }
15944 +
15945 +-static int amdgpu_connector_lvds_mode_valid(struct drm_connector *connector,
15946 ++static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector,
15947 + struct drm_display_mode *mode)
15948 + {
15949 + struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector);
15950 +@@ -838,7 +838,7 @@ static int amdgpu_connector_vga_get_modes(struct drm_connector *connector)
15951 + return ret;
15952 + }
15953 +
15954 +-static int amdgpu_connector_vga_mode_valid(struct drm_connector *connector,
15955 ++static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector,
15956 + struct drm_display_mode *mode)
15957 + {
15958 + struct drm_device *dev = connector->dev;
15959 +@@ -1158,7 +1158,7 @@ static void amdgpu_connector_dvi_force(struct drm_connector *connector)
15960 + amdgpu_connector->use_digital = true;
15961 + }
15962 +
15963 +-static int amdgpu_connector_dvi_mode_valid(struct drm_connector *connector,
15964 ++static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector,
15965 + struct drm_display_mode *mode)
15966 + {
15967 + struct drm_device *dev = connector->dev;
15968 +@@ -1427,7 +1427,7 @@ out:
15969 + return ret;
15970 + }
15971 +
15972 +-static int amdgpu_connector_dp_mode_valid(struct drm_connector *connector,
15973 ++static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector,
15974 + struct drm_display_mode *mode)
15975 + {
15976 + struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
15977 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
15978 -index 9d88023..5fe8189 100644
15979 +index d6c68d0..ea00f37 100644
15980 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
15981 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
15982 -@@ -1081,7 +1081,7 @@ static bool amdgpu_switcheroo_can_switch(struct pci_dev *pdev)
15983 +@@ -1091,7 +1091,7 @@ static bool amdgpu_switcheroo_can_switch(struct pci_dev *pdev)
15984 * locking inversion with the driver load path. And the access here is
15985 * completely racy anyway. So don't bother with locking for now.
15986 */
15987 @@ -42324,10 +44588,10 @@ index 9d88023..5fe8189 100644
15988
15989 static const struct vga_switcheroo_client_ops amdgpu_switcheroo_ops = {
15990 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
15991 -index 8d6668c..ea61792 100644
15992 +index 9ef1db8..bfd5d78 100644
15993 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
15994 +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
15995 -@@ -481,7 +481,7 @@ static struct drm_driver kms_driver = {
15996 +@@ -495,7 +495,7 @@ static struct drm_driver kms_driver = {
15997 .driver_features =
15998 DRIVER_USE_AGP |
15999 DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
16000 @@ -42336,7 +44600,7 @@ index 8d6668c..ea61792 100644
16001 .dev_priv_size = 0,
16002 .load = amdgpu_driver_load_kms,
16003 .open = amdgpu_driver_open_kms,
16004 -@@ -532,9 +532,6 @@ static struct drm_driver kms_driver = {
16005 +@@ -546,9 +546,6 @@ static struct drm_driver kms_driver = {
16006 .patchlevel = KMS_DRIVER_PATCHLEVEL,
16007 };
16008
16009 @@ -42346,7 +44610,7 @@ index 8d6668c..ea61792 100644
16010 static struct pci_driver amdgpu_kms_pci_driver = {
16011 .name = DRIVER_NAME,
16012 .id_table = pciidlist,
16013 -@@ -552,22 +549,23 @@ static int __init amdgpu_init(void)
16014 +@@ -566,22 +563,23 @@ static int __init amdgpu_init(void)
16015 }
16016 #endif
16017 DRM_INFO("amdgpu kernel modesetting enabled.\n");
16018 @@ -42386,8 +44650,74 @@ index e23843f..9ecc6f3 100644
16019 };
16020 -int amdgpu_max_kms_ioctl = ARRAY_SIZE(amdgpu_ioctls_kms);
16021 +const int amdgpu_max_kms_ioctl = ARRAY_SIZE(amdgpu_ioctls_kms);
16022 +diff --git a/drivers/gpu/drm/amd/amdgpu/fiji_smc.c b/drivers/gpu/drm/amd/amdgpu/fiji_smc.c
16023 +index e35340a..9f6d286 100644
16024 +--- a/drivers/gpu/drm/amd/amdgpu/fiji_smc.c
16025 ++++ b/drivers/gpu/drm/amd/amdgpu/fiji_smc.c
16026 +@@ -513,7 +513,7 @@ static int fiji_smu_request_load_fw(struct amdgpu_device *adev)
16027 + return 0;
16028 + }
16029 +
16030 +-static uint32_t fiji_smu_get_mask_for_fw_type(uint32_t fw_type)
16031 ++static uint32_t fiji_smu_get_mask_for_fw_type(enum AMDGPU_UCODE_ID fw_type)
16032 + {
16033 + switch (fw_type) {
16034 + case AMDGPU_UCODE_ID_SDMA0:
16035 +@@ -539,7 +539,7 @@ static uint32_t fiji_smu_get_mask_for_fw_type(uint32_t fw_type)
16036 + }
16037 +
16038 + static int fiji_smu_check_fw_load_finish(struct amdgpu_device *adev,
16039 +- uint32_t fw_type)
16040 ++ enum AMDGPU_UCODE_ID fw_type)
16041 + {
16042 + uint32_t fw_mask = fiji_smu_get_mask_for_fw_type(fw_type);
16043 + int i;
16044 +diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_smc.c b/drivers/gpu/drm/amd/amdgpu/iceland_smc.c
16045 +index 090486c..699728e 100644
16046 +--- a/drivers/gpu/drm/amd/amdgpu/iceland_smc.c
16047 ++++ b/drivers/gpu/drm/amd/amdgpu/iceland_smc.c
16048 +@@ -418,7 +418,7 @@ static enum AMDGPU_UCODE_ID iceland_convert_fw_type(uint32_t fw_type)
16049 + }
16050 + }
16051 +
16052 +-static uint32_t iceland_smu_get_mask_for_fw_type(uint32_t fw_type)
16053 ++static uint32_t iceland_smu_get_mask_for_fw_type(enum AMDGPU_UCODE_ID fw_type)
16054 + {
16055 + switch (fw_type) {
16056 + case AMDGPU_UCODE_ID_SDMA0:
16057 +@@ -556,7 +556,7 @@ static int iceland_smu_request_load_fw(struct amdgpu_device *adev)
16058 + }
16059 +
16060 + static int iceland_smu_check_fw_load_finish(struct amdgpu_device *adev,
16061 +- uint32_t fw_type)
16062 ++ enum AMDGPU_UCODE_ID fw_type)
16063 + {
16064 + uint32_t fw_mask = iceland_smu_get_mask_for_fw_type(fw_type);
16065 + int i;
16066 +diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_smc.c b/drivers/gpu/drm/amd/amdgpu/tonga_smc.c
16067 +index 361c49a..1113506 100644
16068 +--- a/drivers/gpu/drm/amd/amdgpu/tonga_smc.c
16069 ++++ b/drivers/gpu/drm/amd/amdgpu/tonga_smc.c
16070 +@@ -515,7 +515,7 @@ static int tonga_smu_request_load_fw(struct amdgpu_device *adev)
16071 + return 0;
16072 + }
16073 +
16074 +-static uint32_t tonga_smu_get_mask_for_fw_type(uint32_t fw_type)
16075 ++static uint32_t tonga_smu_get_mask_for_fw_type(enum AMDGPU_UCODE_ID fw_type)
16076 + {
16077 + switch (fw_type) {
16078 + case AMDGPU_UCODE_ID_SDMA0:
16079 +@@ -541,7 +541,7 @@ static uint32_t tonga_smu_get_mask_for_fw_type(uint32_t fw_type)
16080 + }
16081 +
16082 + static int tonga_smu_check_fw_load_finish(struct amdgpu_device *adev,
16083 +- uint32_t fw_type)
16084 ++ enum AMDGPU_UCODE_ID fw_type)
16085 + {
16086 + uint32_t fw_mask = tonga_smu_get_mask_for_fw_type(fw_type);
16087 + int i;
16088 diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
16089 -index c6a1b4c..32873f8 100644
16090 +index d2b49c0..478e036 100644
16091 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
16092 +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
16093 @@ -419,7 +419,7 @@ static int kfd_ioctl_set_memory_policy(struct file *filep,
16094 @@ -42844,10 +45174,10 @@ index 7b69070..d7bd78b 100644
16095 if (retval != 0)
16096 return retval;
16097 diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
16098 -index 3a4820e..ece12c8 100644
16099 +index 8b2becd..2d8f572 100644
16100 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
16101 +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
16102 -@@ -135,7 +135,7 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
16103 +@@ -139,7 +139,7 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
16104 if (r)
16105 return r;
16106
16107 @@ -42855,9 +45185,9 @@ index 3a4820e..ece12c8 100644
16108 + atomic_set_unchecked(&entity->fence_seq, 0);
16109 entity->fence_context = fence_context_alloc(1);
16110
16111 - /* Add the entity to the run queue */
16112 + return 0;
16113 diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
16114 -index a0f0ae5..1771582 100644
16115 +index 9403145..b8842f1 100644
16116 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
16117 +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
16118 @@ -49,7 +49,7 @@ struct amd_sched_entity {
16119 @@ -42883,10 +45213,10 @@ index 87c78ee..59dc36e 100644
16120 s_entity->fence_context, seq);
16121
16122 diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
16123 -index 77ab93d..ae69bac 100644
16124 +index 3bd7e1c..565fe46 100644
16125 --- a/drivers/gpu/drm/armada/armada_drv.c
16126 +++ b/drivers/gpu/drm/armada/armada_drv.c
16127 -@@ -217,6 +217,7 @@ static struct drm_driver armada_drm_driver = {
16128 +@@ -218,6 +218,7 @@ static struct drm_driver armada_drm_driver = {
16129 .driver_features = DRIVER_GEM | DRIVER_MODESET |
16130 DRIVER_HAVE_IRQ | DRIVER_PRIME,
16131 .ioctls = armada_ioctls,
16132 @@ -42894,7 +45224,7 @@ index 77ab93d..ae69bac 100644
16133 .fops = &armada_drm_fops,
16134 };
16135
16136 -@@ -337,8 +338,6 @@ static int __init armada_drm_init(void)
16137 +@@ -338,8 +339,6 @@ static int __init armada_drm_init(void)
16138 {
16139 int ret;
16140
16141 @@ -42903,11 +45233,62 @@ index 77ab93d..ae69bac 100644
16142 ret = platform_driver_register(&armada_lcd_platform_driver);
16143 if (ret)
16144 return ret;
16145 +diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
16146 +index 0123458..4169580 100644
16147 +--- a/drivers/gpu/drm/ast/ast_mode.c
16148 ++++ b/drivers/gpu/drm/ast/ast_mode.c
16149 +@@ -789,7 +789,7 @@ static int ast_get_modes(struct drm_connector *connector)
16150 + return 0;
16151 + }
16152 +
16153 +-static int ast_mode_valid(struct drm_connector *connector,
16154 ++static enum drm_mode_status ast_mode_valid(struct drm_connector *connector,
16155 + struct drm_display_mode *mode)
16156 + {
16157 + struct ast_private *ast = connector->dev->dev_private;
16158 +diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
16159 +index 2849f1b..86f509b 100644
16160 +--- a/drivers/gpu/drm/bochs/bochs_kms.c
16161 ++++ b/drivers/gpu/drm/bochs/bochs_kms.c
16162 +@@ -210,7 +210,7 @@ int bochs_connector_get_modes(struct drm_connector *connector)
16163 + return count;
16164 + }
16165 +
16166 +-static int bochs_connector_mode_valid(struct drm_connector *connector,
16167 ++static enum drm_mode_status bochs_connector_mode_valid(struct drm_connector *connector,
16168 + struct drm_display_mode *mode)
16169 + {
16170 + struct bochs_device *bochs =
16171 +diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
16172 +index 9a7b446..33576d3 100644
16173 +--- a/drivers/gpu/drm/drm_atomic.c
16174 ++++ b/drivers/gpu/drm/drm_atomic.c
16175 +@@ -1339,6 +1339,11 @@ EXPORT_SYMBOL(drm_atomic_async_commit);
16176 + * The big monstor ioctl
16177 + */
16178 +
16179 ++static void free_vblank_event(struct drm_pending_event *event)
16180 ++{
16181 ++ kfree(event);
16182 ++}
16183 ++
16184 + static struct drm_pending_vblank_event *create_vblank_event(
16185 + struct drm_device *dev, struct drm_file *file_priv, uint64_t user_data)
16186 + {
16187 +@@ -1366,7 +1371,7 @@ static struct drm_pending_vblank_event *create_vblank_event(
16188 + e->event.user_data = user_data;
16189 + e->base.event = &e->event.base;
16190 + e->base.file_priv = file_priv;
16191 +- e->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
16192 ++ e->base.destroy = free_vblank_event;
16193 +
16194 + out:
16195 + return e;
16196 diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
16197 -index 24c5434..d4671de 100644
16198 +index f619121..ef03460 100644
16199 --- a/drivers/gpu/drm/drm_crtc.c
16200 +++ b/drivers/gpu/drm/drm_crtc.c
16201 -@@ -4090,7 +4090,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
16202 +@@ -4152,7 +4152,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
16203 goto done;
16204 }
16205
16206 @@ -42916,11 +45297,33 @@ index 24c5434..d4671de 100644
16207 &prop_enum->name, DRM_PROP_NAME_LEN)) {
16208 ret = -EFAULT;
16209 goto done;
16210 +@@ -5229,6 +5229,11 @@ out:
16211 + return ret;
16212 + }
16213 +
16214 ++static void drm_mode_page_flip_dmabuf_destroy(struct drm_pending_event *event)
16215 ++{
16216 ++ kfree(event);
16217 ++}
16218 ++
16219 + /**
16220 + * drm_mode_page_flip_ioctl - schedule an asynchronous fb update
16221 + * @dev: DRM device
16222 +@@ -5327,8 +5332,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
16223 + e->event.user_data = page_flip->user_data;
16224 + e->base.event = &e->event.base;
16225 + e->base.file_priv = file_priv;
16226 +- e->base.destroy =
16227 +- (void (*) (struct drm_pending_event *)) kfree;
16228 ++ e->base.destroy = drm_mode_page_flip_dmabuf_destroy;
16229 + }
16230 +
16231 + crtc->primary->old_fb = crtc->primary->fb;
16232 diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
16233 -index 7dd6728..6271b191 100644
16234 +index 167c8d3..bf13708 100644
16235 --- a/drivers/gpu/drm/drm_drv.c
16236 +++ b/drivers/gpu/drm/drm_drv.c
16237 -@@ -471,7 +471,7 @@ void drm_unplug_dev(struct drm_device *dev)
16238 +@@ -467,7 +467,7 @@ void drm_unplug_dev(struct drm_device *dev)
16239
16240 drm_device_set_unplugged(dev);
16241
16242 @@ -42930,7 +45333,7 @@ index 7dd6728..6271b191 100644
16243 }
16244 mutex_unlock(&drm_global_mutex);
16245 diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
16246 -index 6b5625e..d49b9fb 100644
16247 +index 1ea8790..03efb49 100644
16248 --- a/drivers/gpu/drm/drm_fops.c
16249 +++ b/drivers/gpu/drm/drm_fops.c
16250 @@ -89,7 +89,7 @@ int drm_open(struct inode *inode, struct file *filp)
16251 @@ -42951,7 +45354,7 @@ index 6b5625e..d49b9fb 100644
16252 drm_minor_release(minor);
16253 return retcode;
16254 }
16255 -@@ -405,7 +405,7 @@ int drm_release(struct inode *inode, struct file *filp)
16256 +@@ -407,7 +407,7 @@ int drm_release(struct inode *inode, struct file *filp)
16257
16258 mutex_lock(&drm_global_mutex);
16259
16260 @@ -42960,7 +45363,7 @@ index 6b5625e..d49b9fb 100644
16261
16262 mutex_lock(&dev->struct_mutex);
16263 list_del(&file_priv->lhead);
16264 -@@ -420,10 +420,10 @@ int drm_release(struct inode *inode, struct file *filp)
16265 +@@ -422,10 +422,10 @@ int drm_release(struct inode *inode, struct file *filp)
16266 * Begin inline drm_release
16267 */
16268
16269 @@ -42973,7 +45376,7 @@ index 6b5625e..d49b9fb 100644
16270
16271 /* if the master has gone away we can't do anything with the lock */
16272 if (file_priv->minor->master)
16273 -@@ -493,7 +493,7 @@ int drm_release(struct inode *inode, struct file *filp)
16274 +@@ -495,7 +495,7 @@ int drm_release(struct inode *inode, struct file *filp)
16275 * End inline drm_release
16276 */
16277
16278 @@ -43139,8 +45542,33 @@ index 8ce2a0c..d09a8f6 100644
16279 unsigned int nr = DRM_IOCTL_NR(cmd);
16280 int retcode = -EINVAL;
16281 char stack_kdata[128];
16282 +diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
16283 +index 1fe1457..a3e7822 100644
16284 +--- a/drivers/gpu/drm/drm_irq.c
16285 ++++ b/drivers/gpu/drm/drm_irq.c
16286 +@@ -1646,6 +1646,11 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
16287 + return 0;
16288 + }
16289 +
16290 ++static void drm_vblank_dmabuf_destroy(struct drm_pending_event *event)
16291 ++{
16292 ++ kfree(event);
16293 ++}
16294 ++
16295 + static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
16296 + union drm_wait_vblank *vblwait,
16297 + struct drm_file *file_priv)
16298 +@@ -1670,7 +1675,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
16299 + e->event.user_data = vblwait->request.signal;
16300 + e->base.event = &e->event.base;
16301 + e->base.file_priv = file_priv;
16302 +- e->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
16303 ++ e->base.destroy = drm_vblank_dmabuf_destroy;
16304 +
16305 + spin_lock_irqsave(&dev->event_lock, flags);
16306 +
16307 diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
16308 -index fcd2a86..f50489e 100644
16309 +index a1fff11..425c24b 100644
16310 --- a/drivers/gpu/drm/drm_pci.c
16311 +++ b/drivers/gpu/drm/drm_pci.c
16312 @@ -308,7 +308,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
16313 @@ -43164,7 +45592,7 @@ index fcd2a86..f50489e 100644
16314 for (i = 0; pdriver->id_table[i].vendor != 0; i++) {
16315 pid = &pdriver->id_table[i];
16316
16317 -@@ -457,7 +460,7 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
16318 +@@ -477,7 +480,7 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
16319 } else {
16320 list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
16321 legacy_dev_list) {
16322 @@ -43174,10 +45602,10 @@ index fcd2a86..f50489e 100644
16323 }
16324 }
16325 diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
16326 -index 2c6019d..6508989 100644
16327 +index 68f0f36..4e8daee 100644
16328 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
16329 +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
16330 -@@ -616,7 +616,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
16331 +@@ -605,7 +605,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
16332 struct component_match *match;
16333
16334 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
16335 @@ -43185,33 +45613,96 @@ index 2c6019d..6508989 100644
16336
16337 match = exynos_drm_match_add(&pdev->dev);
16338 if (IS_ERR(match))
16339 -diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
16340 -index d4813e0..6c1ab4d 100644
16341 ---- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
16342 -+++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
16343 -@@ -825,10 +825,16 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,
16344 - u32 pipeconf_reg = PIPEACONF;
16345 - u32 dspcntr_reg = DSPACNTR;
16346 -
16347 -- u32 pipeconf = dev_priv->pipeconf[pipe];
16348 -- u32 dspcntr = dev_priv->dspcntr[pipe];
16349 -+ u32 pipeconf;
16350 -+ u32 dspcntr;
16351 - u32 mipi = MIPI_PORT_EN | PASS_FROM_SPHY_TO_AFE | SEL_FLOPPED_HSTX;
16352 -
16353 -+ if (pipe == -1)
16354 -+ return;
16355 -+
16356 -+ pipeconf = dev_priv->pipeconf[pipe];
16357 -+ dspcntr = dev_priv->dspcntr[pipe];
16358 +diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
16359 +index 8dfe6e1..e7957e6 100644
16360 +--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
16361 ++++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
16362 +@@ -1060,6 +1060,11 @@ int exynos_g2d_get_ver_ioctl(struct drm_device *drm_dev, void *data,
16363 + return 0;
16364 + }
16365 +
16366 ++static void exynos_g2d_dmabuf_destroy(struct drm_pending_event *event)
16367 ++{
16368 ++ kfree(event);
16369 ++}
16370 +
16371 - if (pipe) {
16372 - pipeconf_reg = PIPECCONF;
16373 - dspcntr_reg = DSPCCNTR;
16374 + int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
16375 + struct drm_file *file)
16376 + {
16377 +@@ -1118,7 +1123,7 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
16378 + e->event.user_data = req->user_data;
16379 + e->base.event = &e->event.base;
16380 + e->base.file_priv = file;
16381 +- e->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
16382 ++ e->base.destroy = exynos_g2d_dmabuf_destroy;
16383 +
16384 + node->event = e;
16385 + }
16386 +diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
16387 +index d0717a8..563f087 100644
16388 +--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
16389 ++++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
16390 +@@ -64,7 +64,7 @@ static void cdv_intel_crt_dpms(struct drm_encoder *encoder, int mode)
16391 + REG_WRITE(reg, temp);
16392 + }
16393 +
16394 +-static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
16395 ++static enum drm_mode_status cdv_intel_crt_mode_valid(struct drm_connector *connector,
16396 + struct drm_display_mode *mode)
16397 + {
16398 + if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
16399 +diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
16400 +index 7bb1f1af..a35770e 100644
16401 +--- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
16402 ++++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
16403 +@@ -505,7 +505,7 @@ static void cdv_intel_edp_backlight_off (struct gma_encoder *intel_encoder)
16404 + msleep(intel_dp->backlight_off_delay);
16405 + }
16406 +
16407 +-static int
16408 ++static enum drm_mode_status
16409 + cdv_intel_dp_mode_valid(struct drm_connector *connector,
16410 + struct drm_display_mode *mode)
16411 + {
16412 +diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
16413 +index ddf2d77..4e9e184 100644
16414 +--- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
16415 ++++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
16416 +@@ -223,7 +223,7 @@ static int cdv_hdmi_get_modes(struct drm_connector *connector)
16417 + return ret;
16418 + }
16419 +
16420 +-static int cdv_hdmi_mode_valid(struct drm_connector *connector,
16421 ++static enum drm_mode_status cdv_hdmi_mode_valid(struct drm_connector *connector,
16422 + struct drm_display_mode *mode)
16423 + {
16424 + if (mode->clock > 165000)
16425 +diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
16426 +index 813ef23..17928d6 100644
16427 +--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
16428 ++++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
16429 +@@ -244,7 +244,7 @@ static void cdv_intel_lvds_restore(struct drm_connector *connector)
16430 + {
16431 + }
16432 +
16433 +-static int cdv_intel_lvds_mode_valid(struct drm_connector *connector,
16434 ++static enum drm_mode_status cdv_intel_lvds_mode_valid(struct drm_connector *connector,
16435 + struct drm_display_mode *mode)
16436 + {
16437 + struct drm_device *dev = connector->dev;
16438 diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
16439 -index 89f705c..d262d0b 100644
16440 +index d758f4c..7828190 100644
16441 --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
16442 +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
16443 +@@ -351,7 +351,7 @@ static int mdfld_dsi_connector_get_modes(struct drm_connector *connector)
16444 + return 0;
16445 + }
16446 +
16447 +-static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
16448 ++static enum drm_mode_status mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
16449 + struct drm_display_mode *mode)
16450 + {
16451 + struct mdfld_dsi_connector *dsi_connector =
16452 @@ -382,14 +382,14 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
16453 return MODE_OK;
16454 }
16455 @@ -43230,6 +45721,19 @@ index 89f705c..d262d0b 100644
16456 }
16457
16458 static struct drm_encoder *mdfld_dsi_connector_best_encoder(
16459 +diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
16460 +index 2d18499..3d5f8b9 100644
16461 +--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
16462 ++++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
16463 +@@ -509,7 +509,7 @@ static void oaktrail_hdmi_dpms(struct drm_encoder *encoder, int mode)
16464 + HDMI_WRITE(HDMI_VIDEO_REG, temp);
16465 + }
16466 +
16467 +-static int oaktrail_hdmi_mode_valid(struct drm_connector *connector,
16468 ++static enum drm_mode_status oaktrail_hdmi_mode_valid(struct drm_connector *connector,
16469 + struct drm_display_mode *mode)
16470 + {
16471 + if (mode->clock > 165000)
16472 diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
16473 index 92e7e57..5d74ff5 100644
16474 --- a/drivers/gpu/drm/gma500/psb_drv.c
16475 @@ -43242,6 +45746,58 @@ index 92e7e57..5d74ff5 100644
16476
16477 psb_modeset_init(dev);
16478 psb_fbdev_init(dev);
16479 +diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
16480 +index 2a3b7c6..fbd3fa3 100644
16481 +--- a/drivers/gpu/drm/gma500/psb_intel_drv.h
16482 ++++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
16483 +@@ -255,7 +255,7 @@ extern int intelfb_remove(struct drm_device *dev,
16484 + extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
16485 + const struct drm_display_mode *mode,
16486 + struct drm_display_mode *adjusted_mode);
16487 +-extern int psb_intel_lvds_mode_valid(struct drm_connector *connector,
16488 ++extern enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
16489 + struct drm_display_mode *mode);
16490 + extern int psb_intel_lvds_set_property(struct drm_connector *connector,
16491 + struct drm_property *property,
16492 +diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
16493 +index b1b9331..6b254ef 100644
16494 +--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
16495 ++++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
16496 +@@ -343,7 +343,7 @@ static void psb_intel_lvds_restore(struct drm_connector *connector)
16497 + }
16498 + }
16499 +
16500 +-int psb_intel_lvds_mode_valid(struct drm_connector *connector,
16501 ++enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
16502 + struct drm_display_mode *mode)
16503 + {
16504 + struct drm_psb_private *dev_priv = connector->dev->dev_private;
16505 +diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
16506 +index e787d37..91622fd 100644
16507 +--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
16508 ++++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
16509 +@@ -1158,7 +1158,7 @@ static void psb_intel_sdvo_dpms(struct drm_encoder *encoder, int mode)
16510 + return;
16511 + }
16512 +
16513 +-static int psb_intel_sdvo_mode_valid(struct drm_connector *connector,
16514 ++static enum drm_mode_status psb_intel_sdvo_mode_valid(struct drm_connector *connector,
16515 + struct drm_display_mode *mode)
16516 + {
16517 + struct psb_intel_sdvo *psb_intel_sdvo = intel_attached_sdvo(connector);
16518 +diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
16519 +index f8ee740..223ee4c 100644
16520 +--- a/drivers/gpu/drm/i2c/tda998x_drv.c
16521 ++++ b/drivers/gpu/drm/i2c/tda998x_drv.c
16522 +@@ -864,7 +864,7 @@ tda998x_encoder_mode_fixup(struct drm_encoder *encoder,
16523 + return true;
16524 + }
16525 +
16526 +-static int tda998x_connector_mode_valid(struct drm_connector *connector,
16527 ++static enum drm_mode_status tda998x_connector_mode_valid(struct drm_connector *connector,
16528 + struct drm_display_mode *mode)
16529 + {
16530 + /* TDA19988 dotclock can go up to 165MHz */
16531 diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
16532 index d918567..6cfd904 100644
16533 --- a/drivers/gpu/drm/i810/i810_dma.c
16534 @@ -43296,11 +45852,24 @@ index 93ec5dc..204ec92 100644
16535
16536 #define I810_BASE(reg) ((unsigned long) \
16537 dev_priv->mmio_map->handle)
16538 +diff --git a/drivers/gpu/drm/i915/dvo.h b/drivers/gpu/drm/i915/dvo.h
16539 +index 5e6a301..b6e143e 100644
16540 +--- a/drivers/gpu/drm/i915/dvo.h
16541 ++++ b/drivers/gpu/drm/i915/dvo.h
16542 +@@ -74,7 +74,7 @@ struct intel_dvo_dev_ops {
16543 + *
16544 + * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
16545 + */
16546 +- int (*mode_valid)(struct intel_dvo_device *dvo,
16547 ++ enum drm_mode_status (*mode_valid)(struct intel_dvo_device *dvo,
16548 + struct drm_display_mode *mode);
16549 +
16550 + /*
16551 diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
16552 -index 61fcb3b..bad2d5f 100644
16553 +index d70d96f..d3a598e 100644
16554 --- a/drivers/gpu/drm/i915/i915_dma.c
16555 +++ b/drivers/gpu/drm/i915/i915_dma.c
16556 -@@ -354,7 +354,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
16557 +@@ -356,7 +356,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
16558 * locking inversion with the driver load path. And the access here is
16559 * completely racy anyway. So don't bother with locking for now.
16560 */
16561 @@ -43309,14 +45878,14 @@ index 61fcb3b..bad2d5f 100644
16562 }
16563
16564 static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
16565 -@@ -1331,4 +1331,4 @@ const struct drm_ioctl_desc i915_ioctls[] = {
16566 +@@ -1334,4 +1334,4 @@ const struct drm_ioctl_desc i915_ioctls[] = {
16567 DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_SETPARAM, i915_gem_context_setparam_ioctl, DRM_RENDER_ALLOW),
16568 };
16569
16570 -int i915_max_ioctl = ARRAY_SIZE(i915_ioctls);
16571 +const int i915_max_ioctl = ARRAY_SIZE(i915_ioctls);
16572 diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
16573 -index a6ad938..ad4ff46 100644
16574 +index f357058..5638302 100644
16575 --- a/drivers/gpu/drm/i915/i915_drv.c
16576 +++ b/drivers/gpu/drm/i915/i915_drv.c
16577 @@ -40,7 +40,7 @@
16578 @@ -43328,7 +45897,7 @@ index a6ad938..ad4ff46 100644
16579
16580 #define GEN_DEFAULT_PIPEOFFSETS \
16581 .pipe_offsets = { PIPE_A_OFFSET, PIPE_B_OFFSET, \
16582 -@@ -1690,7 +1690,7 @@ static const struct file_operations i915_driver_fops = {
16583 +@@ -1672,7 +1672,7 @@ static const struct file_operations i915_driver_fops = {
16584 .llseek = noop_llseek,
16585 };
16586
16587 @@ -43337,7 +45906,7 @@ index a6ad938..ad4ff46 100644
16588 /* Don't use MTRRs here; the Xserver or userspace app should
16589 * deal with them for Intel hardware.
16590 */
16591 -@@ -1740,6 +1740,7 @@ static struct pci_driver i915_pci_driver = {
16592 +@@ -1722,6 +1722,7 @@ static struct pci_driver i915_pci_driver = {
16593
16594 static int __init i915_init(void)
16595 {
16596 @@ -43345,7 +45914,7 @@ index a6ad938..ad4ff46 100644
16597 driver.num_ioctls = i915_max_ioctl;
16598
16599 /*
16600 -@@ -1757,6 +1758,7 @@ static int __init i915_init(void)
16601 +@@ -1739,6 +1740,7 @@ static int __init i915_init(void)
16602 #endif
16603
16604 if (!(driver.driver_features & DRIVER_MODESET)) {
16605 @@ -43353,7 +45922,7 @@ index a6ad938..ad4ff46 100644
16606 /* Silently fail loading to not upset userspace. */
16607 DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
16608 return 0;
16609 -@@ -1764,6 +1766,7 @@ static int __init i915_init(void)
16610 +@@ -1746,6 +1748,7 @@ static int __init i915_init(void)
16611
16612 if (i915.nuclear_pageflip)
16613 driver.driver_features |= DRIVER_ATOMIC;
16614 @@ -43362,10 +45931,10 @@ index a6ad938..ad4ff46 100644
16615 return drm_pci_init(&driver, &i915_pci_driver);
16616 }
16617 diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
16618 -index d3ce4da..73a3dda 100644
16619 +index b0847b9..c6116c8 100644
16620 --- a/drivers/gpu/drm/i915/i915_drv.h
16621 +++ b/drivers/gpu/drm/i915/i915_drv.h
16622 -@@ -2637,7 +2637,7 @@ struct drm_i915_cmd_table {
16623 +@@ -2665,7 +2665,7 @@ struct drm_i915_cmd_table {
16624 #include "i915_trace.h"
16625
16626 extern const struct drm_ioctl_desc i915_ioctls[];
16627 @@ -43375,10 +45944,10 @@ index d3ce4da..73a3dda 100644
16628 extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
16629 extern int i915_resume_switcheroo(struct drm_device *dev);
16630 diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
16631 -index 6ed7d63a..1863cfa 100644
16632 +index dccb517..c5da26b 100644
16633 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
16634 +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
16635 -@@ -965,12 +965,12 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
16636 +@@ -1001,12 +1001,12 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
16637 static int
16638 validate_exec_list(struct drm_device *dev,
16639 struct drm_i915_gem_exec_object2 *exec,
16640 @@ -43394,10 +45963,10 @@ index 6ed7d63a..1863cfa 100644
16641 invalid_flags = __EXEC_OBJECT_UNKNOWN_FLAGS;
16642 if (USES_FULL_PPGTT(dev))
16643 diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
16644 -index 86c7500..f4d2025 100644
16645 +index 56f4f2e..5f6e773 100644
16646 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
16647 +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
16648 -@@ -2953,8 +2953,8 @@ static void chv_setup_private_ppat(struct drm_i915_private *dev_priv)
16649 +@@ -3011,8 +3011,8 @@ static void chv_setup_private_ppat(struct drm_i915_private *dev_priv)
16650
16651 static int gen8_gmch_probe(struct drm_device *dev,
16652 u64 *gtt_total,
16653 @@ -43408,7 +45977,7 @@ index 86c7500..f4d2025 100644
16654 u64 *mappable_end)
16655 {
16656 struct drm_i915_private *dev_priv = dev->dev_private;
16657 -@@ -3001,8 +3001,8 @@ static int gen8_gmch_probe(struct drm_device *dev,
16658 +@@ -3062,8 +3062,8 @@ static int gen8_gmch_probe(struct drm_device *dev,
16659
16660 static int gen6_gmch_probe(struct drm_device *dev,
16661 u64 *gtt_total,
16662 @@ -43419,7 +45988,7 @@ index 86c7500..f4d2025 100644
16663 u64 *mappable_end)
16664 {
16665 struct drm_i915_private *dev_priv = dev->dev_private;
16666 -@@ -3052,8 +3052,8 @@ static void gen6_gmch_remove(struct i915_address_space *vm)
16667 +@@ -3113,8 +3113,8 @@ static void gen6_gmch_remove(struct i915_address_space *vm)
16668
16669 static int i915_gmch_probe(struct drm_device *dev,
16670 u64 *gtt_total,
16671 @@ -43430,7 +45999,7 @@ index 86c7500..f4d2025 100644
16672 u64 *mappable_end)
16673 {
16674 struct drm_i915_private *dev_priv = dev->dev_private;
16675 -@@ -3121,8 +3121,8 @@ int i915_gem_gtt_init(struct drm_device *dev)
16676 +@@ -3182,8 +3182,8 @@ int i915_gem_gtt_init(struct drm_device *dev)
16677 /* GMADR is the PCI mmio aperture into the global GTT. */
16678 DRM_INFO("Memory usable by graphics device = %lluM\n",
16679 gtt->base.total >> 20);
16680 @@ -43442,10 +46011,10 @@ index 86c7500..f4d2025 100644
16681 if (intel_iommu_gfx_mapped)
16682 DRM_INFO("VT-d active for gfx access\n");
16683 diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
16684 -index a216397..2906614 100644
16685 +index b448ad8..422a8c5 100644
16686 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
16687 +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
16688 -@@ -344,11 +344,11 @@ struct i915_address_space {
16689 +@@ -341,11 +341,11 @@ struct i915_address_space {
16690 struct i915_gtt {
16691 struct i915_address_space base;
16692
16693 @@ -43459,7 +46028,7 @@ index a216397..2906614 100644
16694
16695 /** "Graphics Stolen Memory" holds the global PTEs */
16696 void __iomem *gsm;
16697 -@@ -359,7 +359,7 @@ struct i915_gtt {
16698 +@@ -356,7 +356,7 @@ struct i915_gtt {
16699
16700 /* global gtt ops */
16701 int (*gtt_probe)(struct drm_device *dev, u64 *gtt_total,
16702 @@ -43502,10 +46071,10 @@ index 97f3a56..32c712e 100644
16703 ret = drm_ioctl(filp, cmd, arg);
16704
16705 diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
16706 -index 0f42a27..8d376ee 100644
16707 +index fa8afa7..0bac957 100644
16708 --- a/drivers/gpu/drm/i915/i915_irq.c
16709 +++ b/drivers/gpu/drm/i915/i915_irq.c
16710 -@@ -4399,14 +4399,15 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
16711 +@@ -4490,14 +4490,15 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
16712
16713 pm_qos_add_request(&dev_priv->pm_qos, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);
16714
16715 @@ -43524,7 +46093,7 @@ index 0f42a27..8d376ee 100644
16716 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
16717 }
16718
16719 -@@ -4418,32 +4419,32 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
16720 +@@ -4509,32 +4510,32 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
16721 if (!IS_GEN2(dev_priv))
16722 dev->vblank_disable_immediate = true;
16723
16724 @@ -43577,7 +46146,7 @@ index 0f42a27..8d376ee 100644
16725 if (IS_BROXTON(dev))
16726 dev_priv->display.hpd_irq_setup = bxt_hpd_irq_setup;
16727 else if (HAS_PCH_SPT(dev))
16728 -@@ -4451,35 +4452,36 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
16729 +@@ -4542,35 +4543,36 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
16730 else
16731 dev_priv->display.hpd_irq_setup = ilk_hpd_irq_setup;
16732 } else if (HAS_PCH_SPLIT(dev)) {
16733 @@ -43635,10 +46204,10 @@ index 0f42a27..8d376ee 100644
16734
16735 /**
16736 diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
16737 -index f859a5b..c6ef76b 100644
16738 +index 46947ff..c3efaa4 100644
16739 --- a/drivers/gpu/drm/i915/intel_display.c
16740 +++ b/drivers/gpu/drm/i915/intel_display.c
16741 -@@ -14731,13 +14731,13 @@ struct intel_quirk {
16742 +@@ -15106,13 +15106,13 @@ struct intel_quirk {
16743 int subsystem_vendor;
16744 int subsystem_device;
16745 void (*hook)(struct drm_device *dev);
16746 @@ -43654,7 +46223,7 @@ index f859a5b..c6ef76b 100644
16747
16748 static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
16749 {
16750 -@@ -14745,18 +14745,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
16751 +@@ -15120,18 +15120,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
16752 return 1;
16753 }
16754
16755 @@ -43686,10 +46255,10 @@ index f859a5b..c6ef76b 100644
16756 },
16757 };
16758 diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
16759 -index 7b990b4..452d7e4 100644
16760 +index 2f57d79..7152e6e 100644
16761 --- a/drivers/gpu/drm/imx/imx-drm-core.c
16762 +++ b/drivers/gpu/drm/imx/imx-drm-core.c
16763 -@@ -354,7 +354,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
16764 +@@ -348,7 +348,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
16765 if (imxdrm->pipes >= MAX_CRTC)
16766 return -EINVAL;
16767
16768 @@ -43822,6 +46391,32 @@ index 792f924..aeb1334 100644
16769
16770 -int mga_max_ioctl = ARRAY_SIZE(mga_ioctls);
16771 +const int mga_max_ioctl = ARRAY_SIZE(mga_ioctls);
16772 +diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
16773 +index dc13c48..7d8d1cd 100644
16774 +--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
16775 ++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
16776 +@@ -1586,7 +1586,7 @@ static uint32_t mga_vga_calculate_mode_bandwidth(struct drm_display_mode *mode,
16777 +
16778 + #define MODE_BANDWIDTH MODE_BAD
16779 +
16780 +-static int mga_vga_mode_valid(struct drm_connector *connector,
16781 ++static enum drm_mode_status mga_vga_mode_valid(struct drm_connector *connector,
16782 + struct drm_display_mode *mode)
16783 + {
16784 + struct drm_device *dev = connector->dev;
16785 +diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
16786 +index d5e6938..3c38707 100644
16787 +--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
16788 ++++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
16789 +@@ -193,7 +193,7 @@ static int nouveau_dsm_power_state(enum vga_switcheroo_client_id id,
16790 + return nouveau_dsm_set_discrete_state(nouveau_dsm_priv.dhandle, state);
16791 + }
16792 +
16793 +-static int nouveau_dsm_get_client_id(struct pci_dev *pdev)
16794 ++static enum vga_switcheroo_client_id nouveau_dsm_get_client_id(struct pci_dev *pdev)
16795 + {
16796 + /* easy option one - intel vendor ID means Integrated */
16797 + if (pdev->vendor == PCI_VENDOR_ID_INTEL)
16798 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
16799 index 4dca65a..3486961 100644
16800 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
16801 @@ -43835,11 +46430,24 @@ index 4dca65a..3486961 100644
16802
16803 #define BIT_TABLE(id, funcid) ((struct bit_table){ id, parse_bit_##funcid##_tbl_entry })
16804
16805 +diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
16806 +index fcebfae..2a7341d 100644
16807 +--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
16808 ++++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
16809 +@@ -843,7 +843,7 @@ get_tmds_link_bandwidth(struct drm_connector *connector, bool hdmi)
16810 + return 112000;
16811 + }
16812 +
16813 +-static int
16814 ++static enum drm_mode_status
16815 + nouveau_connector_mode_valid(struct drm_connector *connector,
16816 + struct drm_display_mode *mode)
16817 + {
16818 diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
16819 -index 1d3ee51..5fb4449 100644
16820 +index 2f2f252e..305b42e 100644
16821 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
16822 +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
16823 -@@ -76,9 +76,8 @@ MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1
16824 +@@ -80,9 +80,8 @@ MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1
16825 int nouveau_runtime_pm = -1;
16826 module_param_named(runpm, nouveau_runtime_pm, int, 0400);
16827
16828 @@ -43850,7 +46458,7 @@ index 1d3ee51..5fb4449 100644
16829
16830 static u64
16831 nouveau_pci_name(struct pci_dev *pdev)
16832 -@@ -915,7 +914,7 @@ nouveau_driver_fops = {
16833 +@@ -919,7 +918,7 @@ nouveau_driver_fops = {
16834 };
16835
16836 static struct drm_driver
16837 @@ -43859,16 +46467,16 @@ index 1d3ee51..5fb4449 100644
16838 .driver_features =
16839 DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER |
16840 DRIVER_KMS_LEGACY_CONTEXT,
16841 -@@ -927,6 +926,8 @@ driver_stub = {
16842 +@@ -931,6 +930,8 @@ driver_stub = {
16843 .postclose = nouveau_drm_postclose,
16844 .lastclose = nouveau_vga_lastclose,
16845
16846 + .set_busid = drm_pci_set_busid,
16847 +
16848 #if defined(CONFIG_DEBUG_FS)
16849 - .debugfs_init = nouveau_debugfs_init,
16850 - .debugfs_cleanup = nouveau_debugfs_takedown,
16851 -@@ -1064,10 +1065,10 @@ err_free:
16852 + .debugfs_init = nouveau_drm_debugfs_init,
16853 + .debugfs_cleanup = nouveau_drm_debugfs_cleanup,
16854 +@@ -1063,10 +1064,10 @@ err_free:
16855 static int __init
16856 nouveau_drm_init(void)
16857 {
16858 @@ -43883,7 +46491,7 @@ index 1d3ee51..5fb4449 100644
16859 nouveau_display_options();
16860
16861 diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h
16862 -index a02813e..c30a6b0 100644
16863 +index 5c363ed..98fa924 100644
16864 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h
16865 +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
16866 @@ -124,7 +124,6 @@ struct nouveau_drm {
16867 @@ -43960,6 +46568,31 @@ index d2e7d20..7bbe51f 100644
16868 };
16869
16870 int
16871 +diff --git a/drivers/gpu/drm/nouveau/nouveau_usif.c b/drivers/gpu/drm/nouveau/nouveau_usif.c
16872 +index e9f52ef..b25cd62 100644
16873 +--- a/drivers/gpu/drm/nouveau/nouveau_usif.c
16874 ++++ b/drivers/gpu/drm/nouveau/nouveau_usif.c
16875 +@@ -186,6 +186,11 @@ usif_notify_del(struct drm_file *f, void *data, u32 size, void *argv, u32 argc)
16876 + return ret;
16877 + }
16878 +
16879 ++static void usif_notify_release(struct drm_pending_event *event)
16880 ++{
16881 ++ kfree(event);
16882 ++}
16883 ++
16884 + static int
16885 + usif_notify_get(struct drm_file *f, void *data, u32 size, void *argv, u32 argc)
16886 + {
16887 +@@ -212,7 +217,7 @@ usif_notify_get(struct drm_file *f, void *data, u32 size, void *argv, u32 argc)
16888 + ntfy->p->base.event = &ntfy->p->e.base;
16889 + ntfy->p->base.file_priv = f;
16890 + ntfy->p->base.pid = current->pid;
16891 +- ntfy->p->base.destroy =(void(*)(struct drm_pending_event *))kfree;
16892 ++ ntfy->p->base.destroy = usif_notify_release;
16893 + ntfy->p->e.base.type = DRM_NOUVEAU_EVENT_NVIF;
16894 + ntfy->p->e.base.length = sizeof(ntfy->p->e.base) + ntfy->reply;
16895 +
16896 diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
16897 index af89c36..83ef136 100644
16898 --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
16899 @@ -43973,19 +46606,85 @@ index af89c36..83ef136 100644
16900 }
16901
16902 static const struct vga_switcheroo_client_ops
16903 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
16904 +index b2557e8..2d4f9f4 100644
16905 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
16906 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
16907 +@@ -151,11 +151,16 @@ shadow_fw_init(struct nvkm_bios *bios, const char *name)
16908 + return (void *)fw;
16909 + }
16910 +
16911 ++static void shadow_fw_fini(void *fw)
16912 ++{
16913 ++ release_firmware(fw);
16914 ++}
16915 ++
16916 + static const struct nvbios_source
16917 + shadow_fw = {
16918 + .name = "firmware",
16919 + .init = shadow_fw_init,
16920 +- .fini = (void(*)(void *))release_firmware,
16921 ++ .fini = shadow_fw_fini,
16922 + .read = shadow_fw_read,
16923 + .rw = false,
16924 + };
16925 +diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
16926 +index 9b91da0..b3fa90d 100644
16927 +--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
16928 ++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
16929 +@@ -111,11 +111,16 @@ platform_init(struct nvkm_bios *bios, const char *name)
16930 + return ERR_PTR(ret);
16931 + }
16932 +
16933 ++static void platform_fini(void *data)
16934 ++{
16935 ++ kfree(data);
16936 ++}
16937 ++
16938 + const struct nvbios_source
16939 + nvbios_platform = {
16940 + .name = "PLATFORM",
16941 + .init = platform_init,
16942 +- .fini = (void(*)(void *))kfree,
16943 ++ .fini = platform_fini,
16944 + .read = pcirom_read,
16945 + .rw = true,
16946 + };
16947 diff --git a/drivers/gpu/drm/omapdrm/Makefile b/drivers/gpu/drm/omapdrm/Makefile
16948 -index 778372b..4b81cb4 100644
16949 +index fe4c222..48b7b75 100644
16950 --- a/drivers/gpu/drm/omapdrm/Makefile
16951 +++ b/drivers/gpu/drm/omapdrm/Makefile
16952 -@@ -3,7 +3,7 @@
16953 - # Direct Rendering Infrastructure (DRI)
16954 - #
16955 +@@ -6,7 +6,7 @@
16956 + obj-y += dss/
16957 + obj-y += displays/
16958
16959 -ccflags-y := -Iinclude/drm -Werror
16960 +ccflags-y := -Iinclude/drm
16961 omapdrm-y := omap_drv.o \
16962 omap_irq.o \
16963 omap_debugfs.o \
16964 +diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c
16965 +index ef5b902..47cf7f5 100644
16966 +--- a/drivers/gpu/drm/omapdrm/dss/display.c
16967 ++++ b/drivers/gpu/drm/omapdrm/dss/display.c
16968 +@@ -161,12 +161,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
16969 + if (dssdev->name == NULL)
16970 + dssdev->name = dssdev->alias;
16971 +
16972 ++ pax_open_kernel();
16973 + if (drv && drv->get_resolution == NULL)
16974 +- drv->get_resolution = omapdss_default_get_resolution;
16975 ++ *(void **)&drv->get_resolution = omapdss_default_get_resolution;
16976 + if (drv && drv->get_recommended_bpp == NULL)
16977 +- drv->get_recommended_bpp = omapdss_default_get_recommended_bpp;
16978 ++ *(void **)&drv->get_recommended_bpp = omapdss_default_get_recommended_bpp;
16979 + if (drv && drv->get_timings == NULL)
16980 +- drv->get_timings = omapdss_default_get_timings;
16981 ++ *(void **)&drv->get_timings = omapdss_default_get_timings;
16982 ++ pax_close_kernel();
16983 +
16984 + mutex_lock(&panel_list_mutex);
16985 + list_add_tail(&dssdev->panel_list, &panel_list);
16986 diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
16987 index fdc1833..f307630 100644
16988 --- a/drivers/gpu/drm/qxl/qxl_cmd.c
16989 @@ -44043,6 +46742,19 @@ index 6911b8c..89d6867 100644
16990 seq_printf(m, "%d\n", qdev->irq_received_error);
16991 return 0;
16992 }
16993 +diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
16994 +index 8627651..87df69f 100644
16995 +--- a/drivers/gpu/drm/qxl/qxl_display.c
16996 ++++ b/drivers/gpu/drm/qxl/qxl_display.c
16997 +@@ -831,7 +831,7 @@ static int qxl_conn_get_modes(struct drm_connector *connector)
16998 + return ret;
16999 + }
17000 +
17001 +-static int qxl_conn_mode_valid(struct drm_connector *connector,
17002 ++static enum drm_mode_status qxl_conn_mode_valid(struct drm_connector *connector,
17003 + struct drm_display_mode *mode)
17004 + {
17005 + struct drm_device *ddev = connector->dev;
17006 diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
17007 index 7307b07..8eecdd0 100644
17008 --- a/drivers/gpu/drm/qxl/qxl_drv.c
17009 @@ -44070,7 +46782,7 @@ index 7307b07..8eecdd0 100644
17010 }
17011
17012 diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
17013 -index 01a8694..584fb48 100644
17014 +index 6e6b9b1..4462096 100644
17015 --- a/drivers/gpu/drm/qxl/qxl_drv.h
17016 +++ b/drivers/gpu/drm/qxl/qxl_drv.h
17017 @@ -290,10 +290,10 @@ struct qxl_device {
17018 @@ -44174,7 +46886,7 @@ index 0bf1e20..42a7310 100644
17019 ret = drm_irq_install(qdev->ddev, qdev->ddev->pdev->irq);
17020 qdev->ram_header->int_mask = QXL_INTERRUPT_MASK;
17021 diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
17022 -index 0cbc4c9..0e46686 100644
17023 +index 9534127..3fbab8c 100644
17024 --- a/drivers/gpu/drm/qxl/qxl_ttm.c
17025 +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
17026 @@ -103,7 +103,7 @@ static void qxl_ttm_global_fini(struct qxl_device *qdev)
17027 @@ -44395,8 +47107,70 @@ index b928c17..e5d9400 100644
17028
17029 if (regcomp
17030 (&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
17031 +diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
17032 +index 9bc408c..3bb75f5 100644
17033 +--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
17034 ++++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
17035 +@@ -491,7 +491,7 @@ static int radeon_atpx_init(void)
17036 + * look up whether we are the integrated or discrete GPU (all asics).
17037 + * Returns the client id.
17038 + */
17039 +-static int radeon_atpx_get_client_id(struct pci_dev *pdev)
17040 ++static enum vga_switcheroo_client_id radeon_atpx_get_client_id(struct pci_dev *pdev)
17041 + {
17042 + if (radeon_atpx_priv.dhandle == ACPI_HANDLE(&pdev->dev))
17043 + return VGA_SWITCHEROO_IGD;
17044 +diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
17045 +index 340f3f5..3a0afbe 100644
17046 +--- a/drivers/gpu/drm/radeon/radeon_connectors.c
17047 ++++ b/drivers/gpu/drm/radeon/radeon_connectors.c
17048 +@@ -851,7 +851,7 @@ static int radeon_lvds_get_modes(struct drm_connector *connector)
17049 + return ret;
17050 + }
17051 +
17052 +-static int radeon_lvds_mode_valid(struct drm_connector *connector,
17053 ++static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector,
17054 + struct drm_display_mode *mode)
17055 + {
17056 + struct drm_encoder *encoder = radeon_best_single_encoder(connector);
17057 +@@ -994,7 +994,7 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
17058 + return ret;
17059 + }
17060 +
17061 +-static int radeon_vga_mode_valid(struct drm_connector *connector,
17062 ++static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector,
17063 + struct drm_display_mode *mode)
17064 + {
17065 + struct drm_device *dev = connector->dev;
17066 +@@ -1133,7 +1133,7 @@ static int radeon_tv_get_modes(struct drm_connector *connector)
17067 + return 1;
17068 + }
17069 +
17070 +-static int radeon_tv_mode_valid(struct drm_connector *connector,
17071 ++static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector,
17072 + struct drm_display_mode *mode)
17073 + {
17074 + if ((mode->hdisplay > 1024) || (mode->vdisplay > 768))
17075 +@@ -1464,7 +1464,7 @@ static void radeon_dvi_force(struct drm_connector *connector)
17076 + radeon_connector->use_digital = true;
17077 + }
17078 +
17079 +-static int radeon_dvi_mode_valid(struct drm_connector *connector,
17080 ++static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector,
17081 + struct drm_display_mode *mode)
17082 + {
17083 + struct drm_device *dev = connector->dev;
17084 +@@ -1761,7 +1761,7 @@ out:
17085 + return ret;
17086 + }
17087 +
17088 +-static int radeon_dp_mode_valid(struct drm_connector *connector,
17089 ++static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector,
17090 + struct drm_display_mode *mode)
17091 + {
17092 + struct drm_device *dev = connector->dev;
17093 diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
17094 -index f78f111..3df7de6 100644
17095 +index e239633..4ae1159 100644
17096 --- a/drivers/gpu/drm/radeon/radeon_device.c
17097 +++ b/drivers/gpu/drm/radeon/radeon_device.c
17098 @@ -1259,7 +1259,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
17099 @@ -44409,7 +47183,7 @@ index f78f111..3df7de6 100644
17100
17101 static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = {
17102 diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
17103 -index 5b6a6f5..7f4e55a 100644
17104 +index e266ffc..0392d08 100644
17105 --- a/drivers/gpu/drm/radeon/radeon_drv.c
17106 +++ b/drivers/gpu/drm/radeon/radeon_drv.c
17107 @@ -130,7 +130,7 @@ extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
17108 @@ -44421,7 +47195,7 @@ index 5b6a6f5..7f4e55a 100644
17109 int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
17110 int radeon_mode_dumb_mmap(struct drm_file *filp,
17111 struct drm_device *dev,
17112 -@@ -566,7 +566,7 @@ static struct drm_driver kms_driver = {
17113 +@@ -484,7 +484,7 @@ static struct drm_driver kms_driver = {
17114 .driver_features =
17115 DRIVER_USE_AGP |
17116 DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
17117 @@ -44430,7 +47204,7 @@ index 5b6a6f5..7f4e55a 100644
17118 .load = radeon_driver_load_kms,
17119 .open = radeon_driver_open_kms,
17120 .preclose = radeon_driver_preclose_kms,
17121 -@@ -650,8 +650,11 @@ static int __init radeon_init(void)
17122 +@@ -561,8 +561,11 @@ static int __init radeon_init(void)
17123 DRM_INFO("radeon kernel modesetting enabled.\n");
17124 driver = &kms_driver;
17125 pdriver = &radeon_kms_pci_driver;
17126 @@ -44444,41 +47218,6 @@ index 5b6a6f5..7f4e55a 100644
17127 radeon_register_atpx_handler();
17128
17129 } else {
17130 -@@ -659,8 +662,10 @@ static int __init radeon_init(void)
17131 - DRM_INFO("radeon userspace modesetting enabled.\n");
17132 - driver = &driver_old;
17133 - pdriver = &radeon_pci_driver;
17134 -- driver->driver_features &= ~DRIVER_MODESET;
17135 -- driver->num_ioctls = radeon_max_ioctl;
17136 -+
17137 -+ pax_open_kernel();
17138 -+ *(int *)&driver->num_ioctls = radeon_max_ioctl;
17139 -+ pax_close_kernel();
17140 - #else
17141 - DRM_ERROR("No UMS support in radeon module!\n");
17142 - return -EINVAL;
17143 -diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
17144 -index 0caafc7..32afc20 100644
17145 ---- a/drivers/gpu/drm/radeon/radeon_drv.h
17146 -+++ b/drivers/gpu/drm/radeon/radeon_drv.h
17147 -@@ -264,7 +264,7 @@ typedef struct drm_radeon_private {
17148 -
17149 - /* SW interrupt */
17150 - wait_queue_head_t swi_queue;
17151 -- atomic_t swi_emitted;
17152 -+ atomic_unchecked_t swi_emitted;
17153 - int vblank_crtc;
17154 - uint32_t irq_enable_reg;
17155 - uint32_t r500_disp_irq_reg;
17156 -@@ -336,7 +336,7 @@ typedef struct drm_radeon_kcmd_buffer {
17157 -
17158 - extern int radeon_no_wb;
17159 - extern struct drm_ioctl_desc radeon_ioctls[];
17160 --extern int radeon_max_ioctl;
17161 -+extern const int radeon_max_ioctl;
17162 -
17163 - extern u32 radeon_get_ring_head(drm_radeon_private_t *dev_priv);
17164 - extern void radeon_set_ring_head(drm_radeon_private_t *dev_priv, u32 val);
17165 diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c
17166 index 0b98ea1..a3c770f 100644
17167 --- a/drivers/gpu/drm/radeon/radeon_ioc32.c
17168 @@ -44521,68 +47260,43 @@ index 0b98ea1..a3c770f 100644
17169 else
17170 ret = drm_ioctl(filp, cmd, arg);
17171
17172 -diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c
17173 -index 688afb6..4b95df6 100644
17174 ---- a/drivers/gpu/drm/radeon/radeon_irq.c
17175 -+++ b/drivers/gpu/drm/radeon/radeon_irq.c
17176 -@@ -226,8 +226,8 @@ static int radeon_emit_irq(struct drm_device * dev)
17177 - unsigned int ret;
17178 - RING_LOCALS;
17179 -
17180 -- atomic_inc(&dev_priv->swi_emitted);
17181 -- ret = atomic_read(&dev_priv->swi_emitted);
17182 -+ atomic_inc_unchecked(&dev_priv->swi_emitted);
17183 -+ ret = atomic_read_unchecked(&dev_priv->swi_emitted);
17184 -
17185 - BEGIN_RING(4);
17186 - OUT_RING_REG(RADEON_LAST_SWI_REG, ret);
17187 -@@ -353,7 +353,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
17188 - drm_radeon_private_t *dev_priv =
17189 - (drm_radeon_private_t *) dev->dev_private;
17190 -
17191 -- atomic_set(&dev_priv->swi_emitted, 0);
17192 -+ atomic_set_unchecked(&dev_priv->swi_emitted, 0);
17193 - init_waitqueue_head(&dev_priv->swi_queue);
17194 -
17195 - dev->max_vblank_count = 0x001fffff;
17196 diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
17197 -index d290a8a..e165ba9 100644
17198 +index 414953c..1b26674 100644
17199 --- a/drivers/gpu/drm/radeon/radeon_kms.c
17200 +++ b/drivers/gpu/drm/radeon/radeon_kms.c
17201 +@@ -822,7 +822,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
17202 + * Enable the interrupt on the requested crtc (all asics).
17203 + * Returns 0 on success, -EINVAL on failure.
17204 + */
17205 +-int radeon_enable_vblank_kms(struct drm_device *dev, int crtc)
17206 ++int radeon_enable_vblank_kms(struct drm_device *dev, unsigned int crtc)
17207 + {
17208 + struct radeon_device *rdev = dev->dev_private;
17209 + unsigned long irqflags;
17210 +@@ -848,7 +848,7 @@ int radeon_enable_vblank_kms(struct drm_device *dev, int crtc)
17211 + *
17212 + * Disable the interrupt on the requested crtc (all asics).
17213 + */
17214 +-void radeon_disable_vblank_kms(struct drm_device *dev, int crtc)
17215 ++void radeon_disable_vblank_kms(struct drm_device *dev, unsigned int crtc)
17216 + {
17217 + struct radeon_device *rdev = dev->dev_private;
17218 + unsigned long irqflags;
17219 +@@ -877,7 +877,7 @@ void radeon_disable_vblank_kms(struct drm_device *dev, int crtc)
17220 + * scanout position. (all asics).
17221 + * Returns postive status flags on success, negative error on failure.
17222 + */
17223 +-int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
17224 ++int radeon_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int crtc,
17225 + int *max_error,
17226 + struct timeval *vblank_time,
17227 + unsigned flags)
17228 @@ -946,4 +946,4 @@ const struct drm_ioctl_desc radeon_ioctls_kms[] = {
17229 DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
17230 DRM_IOCTL_DEF_DRV(RADEON_GEM_USERPTR, radeon_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
17231 };
17232 -int radeon_max_kms_ioctl = ARRAY_SIZE(radeon_ioctls_kms);
17233 +const int radeon_max_kms_ioctl = ARRAY_SIZE(radeon_ioctls_kms);
17234 -diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
17235 -index 15aee72..c6df119 100644
17236 ---- a/drivers/gpu/drm/radeon/radeon_state.c
17237 -+++ b/drivers/gpu/drm/radeon/radeon_state.c
17238 -@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file *
17239 - if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
17240 - sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
17241 -
17242 -- if (copy_from_user(&depth_boxes, clear->depth_boxes,
17243 -+ if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS || copy_from_user(&depth_boxes, clear->depth_boxes,
17244 - sarea_priv->nbox * sizeof(depth_boxes[0])))
17245 - return -EFAULT;
17246 -
17247 -@@ -3031,7 +3031,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
17248 - {
17249 - drm_radeon_private_t *dev_priv = dev->dev_private;
17250 - drm_radeon_getparam_t *param = data;
17251 -- int value;
17252 -+ int value = 0;
17253 -
17254 - DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
17255 -
17256 -@@ -3258,4 +3258,4 @@ struct drm_ioctl_desc radeon_ioctls[] = {
17257 - DRM_IOCTL_DEF_DRV(RADEON_CS, r600_cs_legacy_ioctl, DRM_AUTH)
17258 - };
17259 -
17260 --int radeon_max_ioctl = ARRAY_SIZE(radeon_ioctls);
17261 -+const int radeon_max_ioctl = ARRAY_SIZE(radeon_ioctls);
17262 diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
17263 index e06ac54..46eabfd 100644
17264 --- a/drivers/gpu/drm/radeon/radeon_ttm.c
17265 @@ -44685,10 +47399,10 @@ index 93ad8a5..48f0a57 100644
17266 -int sis_max_ioctl = ARRAY_SIZE(sis_ioctls);
17267 +const int sis_max_ioctl = ARRAY_SIZE(sis_ioctls);
17268 diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
17269 -index e9f24a8..d790ccc 100644
17270 +index dde6f20..1969ca6 100644
17271 --- a/drivers/gpu/drm/tegra/dc.c
17272 +++ b/drivers/gpu/drm/tegra/dc.c
17273 -@@ -1654,7 +1654,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
17274 +@@ -1657,7 +1657,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
17275 }
17276
17277 for (i = 0; i < ARRAY_SIZE(debugfs_files); i++)
17278 @@ -44698,7 +47412,7 @@ index e9f24a8..d790ccc 100644
17279 err = drm_debugfs_create_files(dc->debugfs_files,
17280 ARRAY_SIZE(debugfs_files),
17281 diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
17282 -index f0a138e..a390c07 100644
17283 +index 44e1027..3548928 100644
17284 --- a/drivers/gpu/drm/tegra/dsi.c
17285 +++ b/drivers/gpu/drm/tegra/dsi.c
17286 @@ -62,7 +62,7 @@ struct tegra_dsi {
17287 @@ -44711,7 +47425,7 @@ index f0a138e..a390c07 100644
17288 struct dentry *debugfs;
17289
17290 diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
17291 -index 52b32cb..a8b2d5b 100644
17292 +index b7ef492..8968507 100644
17293 --- a/drivers/gpu/drm/tegra/hdmi.c
17294 +++ b/drivers/gpu/drm/tegra/hdmi.c
17295 @@ -64,7 +64,7 @@ struct tegra_hdmi {
17296 @@ -44724,7 +47438,7 @@ index 52b32cb..a8b2d5b 100644
17297 struct dentry *debugfs;
17298 };
17299 diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
17300 -index 3eff7cf..06e8322 100644
17301 +index 757c6e8..710a6ff 100644
17302 --- a/drivers/gpu/drm/tegra/sor.c
17303 +++ b/drivers/gpu/drm/tegra/sor.c
17304 @@ -1003,8 +1003,11 @@ static int tegra_sor_debugfs_init(struct tegra_sor *sor,
17305 @@ -44953,11 +47667,24 @@ index 624d941..106fa1f 100644
17306 p->pool->dev_name, p->pool->name, current->pid,
17307 nr_free, shrink_pages);
17308 }
17309 +diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
17310 +index 4709b54..beb015d 100644
17311 +--- a/drivers/gpu/drm/udl/udl_connector.c
17312 ++++ b/drivers/gpu/drm/udl/udl_connector.c
17313 +@@ -80,7 +80,7 @@ static int udl_get_modes(struct drm_connector *connector)
17314 + return ret;
17315 + }
17316 +
17317 +-static int udl_mode_valid(struct drm_connector *connector,
17318 ++static enum drm_mode_status udl_mode_valid(struct drm_connector *connector,
17319 + struct drm_display_mode *mode)
17320 + {
17321 + struct udl_device *udl = connector->dev->dev_private;
17322 diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
17323 -index 73e41a8..46d7a6a 100644
17324 +index 18a2acb..0ca5376 100644
17325 --- a/drivers/gpu/drm/udl/udl_fb.c
17326 +++ b/drivers/gpu/drm/udl/udl_fb.c
17327 -@@ -367,7 +367,6 @@ static int udl_fb_release(struct fb_info *info, int user)
17328 +@@ -366,7 +366,6 @@ static int udl_fb_release(struct fb_info *info, int user)
17329 fb_deferred_io_cleanup(info);
17330 kfree(info->fbdefio);
17331 info->fbdefio = NULL;
17332 @@ -44965,6 +47692,32 @@ index 73e41a8..46d7a6a 100644
17333 }
17334
17335 pr_warn("released /dev/fb%d user=%d count=%d\n",
17336 +diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
17337 +index f1655ff..e40254b 100644
17338 +--- a/drivers/gpu/drm/vc4/vc4_drv.c
17339 ++++ b/drivers/gpu/drm/vc4/vc4_drv.c
17340 +@@ -142,6 +142,11 @@ static int compare_dev(struct device *dev, void *data)
17341 + return dev == data;
17342 + }
17343 +
17344 ++static int vc4_match(struct device *dev, void *drv)
17345 ++{
17346 ++ return platform_bus_type.match(dev, drv);
17347 ++}
17348 ++
17349 + static void vc4_match_add_drivers(struct device *dev,
17350 + struct component_match **match,
17351 + struct platform_driver *const *drivers,
17352 +@@ -153,8 +158,7 @@ static void vc4_match_add_drivers(struct device *dev,
17353 + struct device_driver *drv = &drivers[i]->driver;
17354 + struct device *p = NULL, *d;
17355 +
17356 +- while ((d = bus_find_device(&platform_bus_type, p, drv,
17357 +- (void *)platform_bus_type.match))) {
17358 ++ while ((d = bus_find_device(&platform_bus_type, p, drv, vc4_match))) {
17359 + put_device(p);
17360 + component_match_add(dev, match, compare_dev, d);
17361 + p = d;
17362 diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c
17363 index d17d8f2..67e8e48b 100644
17364 --- a/drivers/gpu/drm/via/via_dma.c
17365 @@ -45096,6 +47849,19 @@ index ea8172c..6ceff63 100644
17366 irqwait->request.type &= ~_DRM_VBLANK_RELATIVE;
17367 case VIA_IRQ_ABSOLUTE:
17368 break;
17369 +diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
17370 +index a165f03..d89bd6a 100644
17371 +--- a/drivers/gpu/drm/virtio/virtgpu_display.c
17372 ++++ b/drivers/gpu/drm/virtio/virtgpu_display.c
17373 +@@ -330,7 +330,7 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector)
17374 + return count;
17375 + }
17376 +
17377 +-static int virtio_gpu_conn_mode_valid(struct drm_connector *connector,
17378 ++static enum drm_mode_status virtio_gpu_conn_mode_valid(struct drm_connector *connector,
17379 + struct drm_display_mode *mode)
17380 + {
17381 + struct virtio_gpu_output *output =
17382 diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c
17383 index 9fd924c..c64b065 100644
17384 --- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
17385 @@ -45130,6 +47896,31 @@ index 469cdd5..958866a 100644
17386 wait_queue_head_t fence_queue;
17387 wait_queue_head_t fifo_queue;
17388 spinlock_t waiter_lock;
17389 +diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
17390 +index 8e689b4..6c9eb8f 100644
17391 +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
17392 ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
17393 +@@ -1016,6 +1016,11 @@ struct vmw_event_fence_pending {
17394 + struct drm_vmw_event_fence event;
17395 + };
17396 +
17397 ++static void vmw_event_fence_dmabuf_destroy(struct drm_pending_event *event)
17398 ++{
17399 ++ kfree(event);
17400 ++}
17401 ++
17402 + static int vmw_event_fence_action_create(struct drm_file *file_priv,
17403 + struct vmw_fence_obj *fence,
17404 + uint32_t flags,
17405 +@@ -1055,7 +1060,7 @@ static int vmw_event_fence_action_create(struct drm_file *file_priv,
17406 +
17407 + event->base.event = &event->event.base;
17408 + event->base.file_priv = file_priv;
17409 +- event->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
17410 ++ event->base.destroy = vmw_event_fence_dmabuf_destroy;
17411 +
17412 +
17413 + if (flags & DRM_VMW_FE_FLAG_REQ_TIME)
17414 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
17415 index b6a0806..9fb5479 100644
17416 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
17417 @@ -45225,10 +48016,10 @@ index efd1ffd..0ae13ca 100644
17418 marker = list_first_entry(&queue->head,
17419 struct vmw_marker, head);
17420 diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
17421 -index 41edd5a..cb008f0 100644
17422 +index 665ab9f..7006609 100644
17423 --- a/drivers/gpu/vga/vga_switcheroo.c
17424 +++ b/drivers/gpu/vga/vga_switcheroo.c
17425 -@@ -910,7 +910,7 @@ static int vga_switcheroo_runtime_resume(struct device *dev)
17426 +@@ -911,7 +911,7 @@ static int vga_switcheroo_runtime_resume(struct device *dev)
17427 * where the power switch is separate to the device being powered down.
17428 */
17429 int vga_switcheroo_init_domain_pm_ops(struct device *dev,
17430 @@ -45237,7 +48028,7 @@ index 41edd5a..cb008f0 100644
17431 {
17432 /* copy over all the bus versions */
17433 if (dev->bus && dev->bus->pm) {
17434 -@@ -981,7 +981,7 @@ static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev)
17435 +@@ -982,7 +982,7 @@ static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev)
17436 */
17437 int
17438 vga_switcheroo_init_domain_pm_optimus_hdmi_audio(struct device *dev,
17439 @@ -45247,7 +48038,7 @@ index 41edd5a..cb008f0 100644
17440 /* copy over all the bus versions */
17441 if (dev->bus && dev->bus->pm) {
17442 diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
17443 -index ec791e1..169a46d 100644
17444 +index 99446ff..ab93719 100644
17445 --- a/drivers/hid/hid-core.c
17446 +++ b/drivers/hid/hid-core.c
17447 @@ -2584,7 +2584,7 @@ EXPORT_SYMBOL_GPL(hid_ignore);
17448 @@ -45268,6 +48059,19 @@ index ec791e1..169a46d 100644
17449
17450 hid_debug_register(hdev, dev_name(&hdev->dev));
17451 ret = device_add(&hdev->dev);
17452 +diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
17453 +index d6fa496..dde31aa 100644
17454 +--- a/drivers/hid/hid-magicmouse.c
17455 ++++ b/drivers/hid/hid-magicmouse.c
17456 +@@ -34,7 +34,7 @@ module_param(emulate_scroll_wheel, bool, 0644);
17457 + MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel");
17458 +
17459 + static unsigned int scroll_speed = 32;
17460 +-static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
17461 ++static int param_set_scroll_speed(const char *val, const struct kernel_param *kp) {
17462 + unsigned long speed;
17463 + if (!val || kstrtoul(val, 0, &speed) || speed > 63)
17464 + return -EINVAL;
17465 diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
17466 index 5614fee..8a6f5f6 100644
17467 --- a/drivers/hid/hid-sensor-custom.c
17468 @@ -45295,10 +48099,10 @@ index c13fb5b..55a3802 100644
17469
17470 *off += size;
17471 diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
17472 -index 9098f13..19a4855 100644
17473 +index 1161d68..7a42e2c 100644
17474 --- a/drivers/hv/channel.c
17475 +++ b/drivers/hv/channel.c
17476 -@@ -382,7 +382,7 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
17477 +@@ -383,7 +383,7 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
17478 int ret = 0;
17479
17480 next_gpadl_handle =
17481 @@ -45307,7 +48111,7 @@ index 9098f13..19a4855 100644
17482
17483 ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
17484 if (ret)
17485 -@@ -705,9 +705,7 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel,
17486 +@@ -728,9 +728,7 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel,
17487 * Adjust the size down since vmbus_channel_packet_page_buffer is the
17488 * largest size we support
17489 */
17490 @@ -45319,10 +48123,10 @@ index 9098f13..19a4855 100644
17491 packetlen_aligned = ALIGN(packetlen, sizeof(u64));
17492
17493 diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
17494 -index 6341be8..1a2fc8d 100644
17495 +index 11bca51..17bdc9b 100644
17496 --- a/drivers/hv/hv.c
17497 +++ b/drivers/hv/hv.c
17498 -@@ -95,7 +95,7 @@ static u64 do_hypercall(u64 control, void *input, void *output)
17499 +@@ -95,7 +95,7 @@ u64 hv_do_hypercall(u64 control, void *input, void *output)
17500 {
17501 u64 input_address = (input) ? virt_to_phys(input) : 0;
17502 u64 output_address = (output) ? virt_to_phys(output) : 0;
17503 @@ -45331,7 +48135,7 @@ index 6341be8..1a2fc8d 100644
17504 #ifdef CONFIG_X86_64
17505 u64 hv_status = 0;
17506
17507 -@@ -219,7 +219,7 @@ int hv_init(void)
17508 +@@ -218,7 +218,7 @@ int hv_init(void)
17509 /* See if the hypercall page is already set */
17510 rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
17511
17512 @@ -45426,10 +48230,10 @@ index b853b4b..3647b37 100644
17513 cap_msg.caps.cap_bits.balloon = 1;
17514 cap_msg.caps.cap_bits.hot_add = 1;
17515 diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
17516 -index 3782636..7dc4e6c 100644
17517 +index 4ebc796..776f2b1 100644
17518 --- a/drivers/hv/hyperv_vmbus.h
17519 +++ b/drivers/hv/hyperv_vmbus.h
17520 -@@ -654,7 +654,7 @@ enum vmbus_connect_state {
17521 +@@ -568,7 +568,7 @@ enum vmbus_connect_state {
17522 struct vmbus_connection {
17523 enum vmbus_connect_state conn_state;
17524
17525 @@ -45537,11 +48341,11 @@ index c43318d..72f7656 100644
17526 .ident = "Dell Inspiron",
17527 .matches = {
17528 diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c
17529 -index 7a8a6fb..015c1fd 100644
17530 +index 1f64378..2b6e615 100644
17531 --- a/drivers/hwmon/ibmaem.c
17532 +++ b/drivers/hwmon/ibmaem.c
17533 @@ -924,7 +924,7 @@ static int aem_register_sensors(struct aem_data *data,
17534 - struct aem_rw_sensor_template *rw)
17535 + const struct aem_rw_sensor_template *rw)
17536 {
17537 struct device *dev = &data->pdev->dev;
17538 - struct sensor_device_attribute *sensors = data->sensors;
17539 @@ -45563,11 +48367,11 @@ index 17ae2eb..21b71dd 100644
17540 int in_i = 1, temp_i = 1, curr_i = 1, humidity_i = 1;
17541 enum iio_chan_type type;
17542 diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
17543 -index 37f0170..414ec2c 100644
17544 +index 559c596..3de1a96 100644
17545 --- a/drivers/hwmon/nct6683.c
17546 +++ b/drivers/hwmon/nct6683.c
17547 -@@ -397,11 +397,11 @@ static struct attribute_group *
17548 - nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg,
17549 +@@ -404,11 +404,11 @@ nct6683_create_attr_group(struct device *dev,
17550 + const struct sensor_template_group *tg,
17551 int repeat)
17552 {
17553 - struct sensor_device_attribute_2 *a2;
17554 @@ -45582,11 +48386,11 @@ index 37f0170..414ec2c 100644
17555 int i, j, count;
17556
17557 diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
17558 -index d7ebdf8..5d0cfb2 100644
17559 +index d087a8e..54e963a 100644
17560 --- a/drivers/hwmon/nct6775.c
17561 +++ b/drivers/hwmon/nct6775.c
17562 -@@ -1048,10 +1048,10 @@ static struct attribute_group *
17563 - nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
17564 +@@ -1049,10 +1049,10 @@ nct6775_create_attr_group(struct device *dev,
17565 + const struct sensor_template_group *tg,
17566 int repeat)
17567 {
17568 - struct attribute_group *group;
17569 @@ -45727,7 +48531,7 @@ index 65e3240..e6c511d 100644
17570 /* Wrapper access functions for multiplexed SMBus */
17571 static DEFINE_MUTEX(amd756_lock);
17572 diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
17573 -index 1543d35d..6515f503 100644
17574 +index 7368be0..00f2259 100644
17575 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
17576 +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
17577 @@ -61,7 +61,7 @@ struct dw_scl_sda_cfg {
17578 @@ -45791,6 +48595,28 @@ index 37a8a90..4724cbd 100644
17579 sector_t block)
17580 {
17581 ide_hwif_t *hwif = drive->hwif;
17582 +diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
17583 +index d127ace..6ee866f 100644
17584 +--- a/drivers/ide/ide.c
17585 ++++ b/drivers/ide/ide.c
17586 +@@ -244,7 +244,7 @@ struct chs_geom {
17587 + static unsigned int ide_disks;
17588 + static struct chs_geom ide_disks_chs[MAX_HWIFS * MAX_DRIVES];
17589 +
17590 +-static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
17591 ++static int ide_set_disk_chs(const char *str, const struct kernel_param *kp)
17592 + {
17593 + unsigned int a, b, c = 0, h = 0, s = 0, i, j = 1;
17594 +
17595 +@@ -328,7 +328,7 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit)
17596 +
17597 + static unsigned int ide_ignore_cable;
17598 +
17599 +-static int ide_set_ignore_cable(const char *s, struct kernel_param *kp)
17600 ++static int ide_set_ignore_cable(const char *s, const struct kernel_param *kp)
17601 + {
17602 + int i, j = 1;
17603 +
17604 diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
17605 index 146eed70b..7679efd 100644
17606 --- a/drivers/idle/intel_idle.c
17607 @@ -45809,10 +48635,10 @@ index 146eed70b..7679efd 100644
17608 /*
17609 * intel_idle_state_table_update()
17610 diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
17611 -index 159ede6..856c0d5 100644
17612 +index af7cc1e..9d2d06c 100644
17613 --- a/drivers/iio/industrialio-core.c
17614 +++ b/drivers/iio/industrialio-core.c
17615 -@@ -594,7 +594,7 @@ static ssize_t iio_write_channel_info(struct device *dev,
17616 +@@ -603,7 +603,7 @@ static ssize_t iio_write_channel_info(struct device *dev,
17617 }
17618
17619 static
17620 @@ -45835,7 +48661,7 @@ index b13936d..65322b2 100644
17621
17622 if (chipset >= AK_MAX_TYPE) {
17623 diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
17624 -index d6d2b35..a97866a 100644
17625 +index 1d92e09..215593e 100644
17626 --- a/drivers/infiniband/core/cm.c
17627 +++ b/drivers/infiniband/core/cm.c
17628 @@ -115,7 +115,7 @@ static char const counter_group_names[CM_COUNTER_GROUPS]
17629 @@ -45847,6 +48673,15 @@ index d6d2b35..a97866a 100644
17630 };
17631
17632 struct cm_counter_attribute {
17633 +@@ -1432,7 +1432,7 @@ static void cm_format_mra(struct cm_mra_msg *mra_msg,
17634 + static void cm_format_rej(struct cm_rej_msg *rej_msg,
17635 + struct cm_id_private *cm_id_priv,
17636 + enum ib_cm_rej_reason reason,
17637 +- void *ari,
17638 ++ const void *ari,
17639 + u8 ari_length,
17640 + const void *private_data,
17641 + u8 private_data_len)
17642 @@ -1476,7 +1476,7 @@ static void cm_dup_req_handler(struct cm_work *work,
17643 struct ib_mad_send_buf *msg = NULL;
17644 int ret;
17645 @@ -45856,7 +48691,7 @@ index d6d2b35..a97866a 100644
17646 counter[CM_REQ_COUNTER]);
17647
17648 /* Quick state check to discard duplicate REQs. */
17649 -@@ -1862,7 +1862,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
17650 +@@ -1884,7 +1884,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
17651 if (!cm_id_priv)
17652 return;
17653
17654 @@ -45865,7 +48700,7 @@ index d6d2b35..a97866a 100644
17655 counter[CM_REP_COUNTER]);
17656 ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
17657 if (ret)
17658 -@@ -2029,7 +2029,7 @@ static int cm_rtu_handler(struct cm_work *work)
17659 +@@ -2051,7 +2051,7 @@ static int cm_rtu_handler(struct cm_work *work)
17660 if (cm_id_priv->id.state != IB_CM_REP_SENT &&
17661 cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
17662 spin_unlock_irq(&cm_id_priv->lock);
17663 @@ -45874,7 +48709,7 @@ index d6d2b35..a97866a 100644
17664 counter[CM_RTU_COUNTER]);
17665 goto out;
17666 }
17667 -@@ -2212,7 +2212,7 @@ static int cm_dreq_handler(struct cm_work *work)
17668 +@@ -2234,7 +2234,7 @@ static int cm_dreq_handler(struct cm_work *work)
17669 cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id,
17670 dreq_msg->local_comm_id);
17671 if (!cm_id_priv) {
17672 @@ -45883,7 +48718,7 @@ index d6d2b35..a97866a 100644
17673 counter[CM_DREQ_COUNTER]);
17674 cm_issue_drep(work->port, work->mad_recv_wc);
17675 return -EINVAL;
17676 -@@ -2237,7 +2237,7 @@ static int cm_dreq_handler(struct cm_work *work)
17677 +@@ -2259,7 +2259,7 @@ static int cm_dreq_handler(struct cm_work *work)
17678 case IB_CM_MRA_REP_RCVD:
17679 break;
17680 case IB_CM_TIMEWAIT:
17681 @@ -45892,7 +48727,7 @@ index d6d2b35..a97866a 100644
17682 counter[CM_DREQ_COUNTER]);
17683 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
17684 goto unlock;
17685 -@@ -2251,7 +2251,7 @@ static int cm_dreq_handler(struct cm_work *work)
17686 +@@ -2273,7 +2273,7 @@ static int cm_dreq_handler(struct cm_work *work)
17687 cm_free_msg(msg);
17688 goto deref;
17689 case IB_CM_DREQ_RCVD:
17690 @@ -45901,7 +48736,23 @@ index d6d2b35..a97866a 100644
17691 counter[CM_DREQ_COUNTER]);
17692 goto unlock;
17693 default:
17694 -@@ -2618,7 +2618,7 @@ static int cm_mra_handler(struct cm_work *work)
17695 +@@ -2336,12 +2336,13 @@ out:
17696 + }
17697 +
17698 + int ib_send_cm_rej(struct ib_cm_id *cm_id,
17699 +- enum ib_cm_rej_reason reason,
17700 +- void *ari,
17701 ++ int _reason,
17702 ++ const void *ari,
17703 + u8 ari_length,
17704 + const void *private_data,
17705 + u8 private_data_len)
17706 + {
17707 ++ enum ib_cm_rej_reason reason = _reason;
17708 + struct cm_id_private *cm_id_priv;
17709 + struct ib_mad_send_buf *msg;
17710 + unsigned long flags;
17711 +@@ -2640,7 +2641,7 @@ static int cm_mra_handler(struct cm_work *work)
17712 ib_modify_mad(cm_id_priv->av.port->mad_agent,
17713 cm_id_priv->msg, timeout)) {
17714 if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
17715 @@ -45910,7 +48761,7 @@ index d6d2b35..a97866a 100644
17716 counter_group[CM_RECV_DUPLICATES].
17717 counter[CM_MRA_COUNTER]);
17718 goto out;
17719 -@@ -2627,7 +2627,7 @@ static int cm_mra_handler(struct cm_work *work)
17720 +@@ -2649,7 +2650,7 @@ static int cm_mra_handler(struct cm_work *work)
17721 break;
17722 case IB_CM_MRA_REQ_RCVD:
17723 case IB_CM_MRA_REP_RCVD:
17724 @@ -45919,7 +48770,7 @@ index d6d2b35..a97866a 100644
17725 counter[CM_MRA_COUNTER]);
17726 /* fall through */
17727 default:
17728 -@@ -2789,7 +2789,7 @@ static int cm_lap_handler(struct cm_work *work)
17729 +@@ -2811,7 +2812,7 @@ static int cm_lap_handler(struct cm_work *work)
17730 case IB_CM_LAP_IDLE:
17731 break;
17732 case IB_CM_MRA_LAP_SENT:
17733 @@ -45928,7 +48779,7 @@ index d6d2b35..a97866a 100644
17734 counter[CM_LAP_COUNTER]);
17735 if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
17736 goto unlock;
17737 -@@ -2805,7 +2805,7 @@ static int cm_lap_handler(struct cm_work *work)
17738 +@@ -2827,7 +2828,7 @@ static int cm_lap_handler(struct cm_work *work)
17739 cm_free_msg(msg);
17740 goto deref;
17741 case IB_CM_LAP_RCVD:
17742 @@ -45937,7 +48788,32 @@ index d6d2b35..a97866a 100644
17743 counter[CM_LAP_COUNTER]);
17744 goto unlock;
17745 default:
17746 -@@ -3091,7 +3091,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
17747 +@@ -2859,7 +2860,7 @@ deref: cm_deref_id(cm_id_priv);
17748 + static void cm_format_apr(struct cm_apr_msg *apr_msg,
17749 + struct cm_id_private *cm_id_priv,
17750 + enum ib_cm_apr_status status,
17751 +- void *info,
17752 ++ const void *info,
17753 + u8 info_length,
17754 + const void *private_data,
17755 + u8 private_data_len)
17756 +@@ -2879,12 +2880,13 @@ static void cm_format_apr(struct cm_apr_msg *apr_msg,
17757 + }
17758 +
17759 + int ib_send_cm_apr(struct ib_cm_id *cm_id,
17760 +- enum ib_cm_apr_status status,
17761 +- void *info,
17762 ++ int _status,
17763 ++ const void *info,
17764 + u8 info_length,
17765 + const void *private_data,
17766 + u8 private_data_len)
17767 + {
17768 ++ enum ib_cm_apr_status status = _status;
17769 + struct cm_id_private *cm_id_priv;
17770 + struct ib_mad_send_buf *msg;
17771 + unsigned long flags;
17772 +@@ -3113,7 +3115,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
17773 cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv);
17774 if (cur_cm_id_priv) {
17775 spin_unlock_irq(&cm.lock);
17776 @@ -45946,7 +48822,7 @@ index d6d2b35..a97866a 100644
17777 counter[CM_SIDR_REQ_COUNTER]);
17778 goto out; /* Duplicate message. */
17779 }
17780 -@@ -3305,10 +3305,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
17781 +@@ -3327,10 +3329,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
17782 if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
17783 msg->retries = 1;
17784
17785 @@ -45959,7 +48835,7 @@ index d6d2b35..a97866a 100644
17786 &port->counter_group[CM_XMIT_RETRIES].
17787 counter[attr_index]);
17788
17789 -@@ -3534,7 +3534,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
17790 +@@ -3557,7 +3559,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
17791 }
17792
17793 attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id);
17794 @@ -45968,7 +48844,7 @@ index d6d2b35..a97866a 100644
17795 counter[attr_id - CM_ATTR_ID_OFFSET]);
17796
17797 work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
17798 -@@ -3751,7 +3751,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
17799 +@@ -3764,7 +3766,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
17800 cm_attr = container_of(attr, struct cm_counter_attribute, attr);
17801
17802 return sprintf(buf, "%ld\n",
17803 @@ -45978,7 +48854,7 @@ index d6d2b35..a97866a 100644
17804
17805 static const struct sysfs_ops cm_counter_ops = {
17806 diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
17807 -index 9f5ad7c..588cd84 100644
17808 +index 6ac3683..5723799e 100644
17809 --- a/drivers/infiniband/core/fmr_pool.c
17810 +++ b/drivers/infiniband/core/fmr_pool.c
17811 @@ -98,8 +98,8 @@ struct ib_fmr_pool {
17812 @@ -46014,7 +48890,7 @@ index 9f5ad7c..588cd84 100644
17813 !kthread_should_stop())
17814 schedule();
17815 __set_current_state(TASK_RUNNING);
17816 -@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
17817 +@@ -266,8 +266,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
17818 pool->dirty_watermark = params->dirty_watermark;
17819 pool->dirty_len = 0;
17820 spin_lock_init(&pool->pool_lock);
17821 @@ -46025,7 +48901,7 @@ index 9f5ad7c..588cd84 100644
17822 init_waitqueue_head(&pool->force_wait);
17823
17824 pool->thread = kthread_run(ib_fmr_cleanup_thread,
17825 -@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
17826 +@@ -395,11 +395,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
17827 }
17828 spin_unlock_irq(&pool->pool_lock);
17829
17830 @@ -46039,7 +48915,7 @@ index 9f5ad7c..588cd84 100644
17831 return -EINTR;
17832
17833 return 0;
17834 -@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
17835 +@@ -509,7 +509,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
17836 } else {
17837 list_add_tail(&fmr->list, &pool->dirty_list);
17838 if (++pool->dirty_len >= pool->dirty_watermark) {
17839 @@ -46066,11 +48942,32 @@ index d47df93..93e4cfd 100644
17840 }
17841 }
17842 }
17843 +diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
17844 +index 6b4e8a0..271bdc3 100644
17845 +--- a/drivers/infiniband/core/ucm.c
17846 ++++ b/drivers/infiniband/core/ucm.c
17847 +@@ -919,14 +919,14 @@ static ssize_t ib_ucm_send_rej(struct ib_ucm_file *file,
17848 + const char __user *inbuf,
17849 + int in_len, int out_len)
17850 + {
17851 +- return ib_ucm_send_info(file, inbuf, in_len, (void *)ib_send_cm_rej);
17852 ++ return ib_ucm_send_info(file, inbuf, in_len, ib_send_cm_rej);
17853 + }
17854 +
17855 + static ssize_t ib_ucm_send_apr(struct ib_ucm_file *file,
17856 + const char __user *inbuf,
17857 + int in_len, int out_len)
17858 + {
17859 +- return ib_ucm_send_info(file, inbuf, in_len, (void *)ib_send_cm_apr);
17860 ++ return ib_ucm_send_info(file, inbuf, in_len, ib_send_cm_apr);
17861 + }
17862 +
17863 + static ssize_t ib_ucm_send_mra(struct ib_ucm_file *file,
17864 diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
17865 -index 1c02dea..5f1efa6 100644
17866 +index 6c6fbff..6eb969d 100644
17867 --- a/drivers/infiniband/core/uverbs_cmd.c
17868 +++ b/drivers/infiniband/core/uverbs_cmd.c
17869 -@@ -961,6 +961,9 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file,
17870 +@@ -949,6 +949,9 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file,
17871 if (copy_from_user(&cmd, buf, sizeof cmd))
17872 return -EFAULT;
17873
17874 @@ -46081,7 +48978,7 @@ index 1c02dea..5f1efa6 100644
17875 (unsigned long) cmd.response + sizeof resp,
17876 in_len - sizeof cmd, out_len - sizeof resp);
17877 diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
17878 -index 58fce174..f6de2c2 100644
17879 +index 8024ea4..e671455 100644
17880 --- a/drivers/infiniband/hw/cxgb4/device.c
17881 +++ b/drivers/infiniband/hw/cxgb4/device.c
17882 @@ -122,7 +122,7 @@ void c4iw_log_wr_stats(struct t4_wq *wq, struct t4_cqe *cqe)
17883 @@ -46102,7 +48999,7 @@ index 58fce174..f6de2c2 100644
17884 (dev->rdev.wr_log_size - 1);
17885 end = idx - 1;
17886 if (end < 0)
17887 -@@ -860,7 +860,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
17888 +@@ -852,7 +852,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
17889 sizeof(*rdev->wr_log), GFP_KERNEL);
17890 if (rdev->wr_log) {
17891 rdev->wr_log_size = 1 << c4iw_wr_log_size_order;
17892 @@ -46112,7 +49009,7 @@ index 58fce174..f6de2c2 100644
17893 pr_err(MOD "error allocating wr_log. Logging disabled\n");
17894 }
17895 diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
17896 -index 00e55fa..44a2635 100644
17897 +index fb2de75..67d931a 100644
17898 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
17899 +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
17900 @@ -180,7 +180,7 @@ struct c4iw_rdev {
17901 @@ -46125,7 +49022,7 @@ index 00e55fa..44a2635 100644
17902 int wr_log_size;
17903 };
17904 diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
17905 -index e1629ab..22d07b9 100644
17906 +index 7849890..cfabd18 100644
17907 --- a/drivers/infiniband/hw/cxgb4/mem.c
17908 +++ b/drivers/infiniband/hw/cxgb4/mem.c
17909 @@ -256,7 +256,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
17910 @@ -46147,10 +49044,10 @@ index e1629ab..22d07b9 100644
17911 PDBG("%s stag_state 0x%0x type 0x%0x pdid 0x%0x, stag_idx 0x%x\n",
17912 __func__, stag_state, type, pdid, stag_idx);
17913 diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
17914 -index 870e56b..c1985ce 100644
17915 +index d68f506..00ff84a 100644
17916 --- a/drivers/infiniband/hw/mlx4/mad.c
17917 +++ b/drivers/infiniband/hw/mlx4/mad.c
17918 -@@ -98,7 +98,7 @@ __be64 mlx4_ib_gen_node_guid(void)
17919 +@@ -99,7 +99,7 @@ __be64 mlx4_ib_gen_node_guid(void)
17920
17921 __be64 mlx4_ib_get_new_demux_tid(struct mlx4_ib_demux_ctx *ctx)
17922 {
17923 @@ -46173,10 +49070,10 @@ index 99451d8..a9f0747 100644
17924 ctx->mcg_wq = create_singlethread_workqueue(name);
17925 if (!ctx->mcg_wq)
17926 diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
17927 -index 1caa11e..2ebefd7 100644
17928 +index 52ce7b0..8172e21 100644
17929 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
17930 +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
17931 -@@ -450,7 +450,7 @@ struct mlx4_ib_demux_ctx {
17932 +@@ -457,7 +457,7 @@ struct mlx4_ib_demux_ctx {
17933 struct list_head mcg_mgid0_list;
17934 struct workqueue_struct *mcg_wq;
17935 struct mlx4_ib_demux_pv_ctx **tun;
17936 @@ -46270,7 +49167,7 @@ index ed9a989..6aa5dc2 100644
17937 int list_len, u64 iova, u64 total_size,
17938 u32 access, struct mthca_mr *mr)
17939 diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
17940 -index dc2d48c..c1deb7b 100644
17941 +index 9866c35..9c627c9 100644
17942 --- a/drivers/infiniband/hw/mthca/mthca_provider.c
17943 +++ b/drivers/infiniband/hw/mthca/mthca_provider.c
17944 @@ -772,7 +772,7 @@ unlock:
17945 @@ -46364,7 +49261,7 @@ index bd9d132..70d84f4 100644
17946 extern u32 int_mod_timer_init;
17947 extern u32 int_mod_cq_depth_256;
17948 diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
17949 -index 8a3ad17..e1ed4bc 100644
17950 +index cb9f0f2..a0bd53c 100644
17951 --- a/drivers/infiniband/hw/nes/nes_cm.c
17952 +++ b/drivers/infiniband/hw/nes/nes_cm.c
17953 @@ -69,14 +69,14 @@ u32 cm_packets_dropped;
17954 @@ -46392,7 +49289,7 @@ index 8a3ad17..e1ed4bc 100644
17955 @@ -135,28 +135,28 @@ static void record_ird_ord(struct nes_cm_node *, u16, u16);
17956 /* instance of function pointers for client API */
17957 /* set address of this instance to cm_core->cm_ops at cm_core alloc */
17958 - static struct nes_cm_ops nes_cm_api = {
17959 + static const struct nes_cm_ops nes_cm_api = {
17960 - mini_cm_accelerated,
17961 - mini_cm_listen,
17962 - mini_cm_del_listen,
17963 @@ -46517,7 +49414,7 @@ index 8a3ad17..e1ed4bc 100644
17964 nes_disconnect(nesqp, 1);
17965
17966 cm_id->provider_data = nesqp;
17967 -@@ -3278,7 +3278,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
17968 +@@ -3277,7 +3277,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
17969
17970 nes_debug(NES_DBG_CM, "QP%u, cm_node=%p, jiffies = %lu listener = %p\n",
17971 nesqp->hwqp.qp_id, cm_node, jiffies, cm_node->listener);
17972 @@ -46526,7 +49423,7 @@ index 8a3ad17..e1ed4bc 100644
17973
17974 nes_debug(NES_DBG_CM, "netdev refcnt = %u.\n",
17975 netdev_refcnt_read(nesvnic->netdev));
17976 -@@ -3476,7 +3476,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
17977 +@@ -3473,7 +3473,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
17978 struct nes_cm_core *cm_core;
17979 u8 *start_buff;
17980
17981 @@ -46535,7 +49432,7 @@ index 8a3ad17..e1ed4bc 100644
17982 cm_node = (struct nes_cm_node *)cm_id->provider_data;
17983 loopback = cm_node->loopbackpartner;
17984 cm_core = cm_node->cm_core;
17985 -@@ -3541,7 +3541,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
17986 +@@ -3538,7 +3538,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
17987 ntohs(raddr->sin_port), ntohl(laddr->sin_addr.s_addr),
17988 ntohs(laddr->sin_port));
17989
17990 @@ -46544,7 +49441,7 @@ index 8a3ad17..e1ed4bc 100644
17991 nesqp->active_conn = 1;
17992
17993 /* cache the cm_id in the qp */
17994 -@@ -3688,7 +3688,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
17995 +@@ -3685,7 +3685,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
17996 g_cm_core->api->stop_listener(g_cm_core, (void *)cm_node);
17997 return err;
17998 }
17999 @@ -46553,7 +49450,7 @@ index 8a3ad17..e1ed4bc 100644
18000 }
18001
18002 cm_id->add_ref(cm_id);
18003 -@@ -3795,7 +3795,7 @@ static void cm_event_connected(struct nes_cm_event *event)
18004 +@@ -3792,7 +3792,7 @@ static void cm_event_connected(struct nes_cm_event *event)
18005
18006 if (nesqp->destroyed)
18007 return;
18008 @@ -46562,7 +49459,7 @@ index 8a3ad17..e1ed4bc 100644
18009 nes_debug(NES_DBG_CM, "QP%u attempting to connect to 0x%08X:0x%04X on"
18010 " local port 0x%04X. jiffies = %lu.\n",
18011 nesqp->hwqp.qp_id, ntohl(raddr->sin_addr.s_addr),
18012 -@@ -3980,7 +3980,7 @@ static void cm_event_reset(struct nes_cm_event *event)
18013 +@@ -3977,7 +3977,7 @@ static void cm_event_reset(struct nes_cm_event *event)
18014
18015 cm_id->add_ref(cm_id);
18016 ret = cm_id->event_handler(cm_id, &cm_event);
18017 @@ -46571,7 +49468,7 @@ index 8a3ad17..e1ed4bc 100644
18018 cm_event.event = IW_CM_EVENT_CLOSE;
18019 cm_event.status = 0;
18020 cm_event.provider_data = cm_id->provider_data;
18021 -@@ -4020,7 +4020,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
18022 +@@ -4017,7 +4017,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
18023 return;
18024 cm_id = cm_node->cm_id;
18025
18026 @@ -46580,7 +49477,7 @@ index 8a3ad17..e1ed4bc 100644
18027 nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n",
18028 cm_node, cm_id, jiffies);
18029
18030 -@@ -4069,7 +4069,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event)
18031 +@@ -4066,7 +4066,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event)
18032 return;
18033 cm_id = cm_node->cm_id;
18034
18035 @@ -46623,9 +49520,18 @@ index 4166452..fc952c3 100644
18036 }
18037
18038 diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
18039 -index 6a0bdfa..f587041 100644
18040 +index 6a0bdfa..57f9580 100644
18041 --- a/drivers/infiniband/hw/nes/nes_nic.c
18042 +++ b/drivers/infiniband/hw/nes/nes_nic.c
18043 +@@ -462,7 +462,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
18044 + /**
18045 + * nes_netdev_start_xmit
18046 + */
18047 +-static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
18048 ++static netdev_tx_t nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
18049 + {
18050 + struct nes_vnic *nesvnic = netdev_priv(netdev);
18051 + struct nes_device *nesdev = nesvnic->nesdev;
18052 @@ -1274,39 +1274,39 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
18053 target_stat_values[++index] = mh_detected;
18054 target_stat_values[++index] = mh_pauses_sent;
18055 @@ -46687,7 +49593,7 @@ index 6a0bdfa..f587041 100644
18056
18057 /**
18058 diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
18059 -index 137880a..f3248f4 100644
18060 +index 8c4daf7..77a87ab 100644
18061 --- a/drivers/infiniband/hw/nes/nes_verbs.c
18062 +++ b/drivers/infiniband/hw/nes/nes_verbs.c
18063 @@ -46,9 +46,9 @@
18064 @@ -46703,7 +49609,7 @@ index 137880a..f3248f4 100644
18065
18066 static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
18067 static int nes_dereg_mr(struct ib_mr *ib_mr);
18068 -@@ -1114,7 +1114,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
18069 +@@ -1040,7 +1040,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
18070 if (init_attr->create_flags)
18071 return ERR_PTR(-EINVAL);
18072
18073 @@ -46712,7 +49618,7 @@ index 137880a..f3248f4 100644
18074 switch (init_attr->qp_type) {
18075 case IB_QPT_RC:
18076 if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
18077 -@@ -1448,7 +1448,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
18078 +@@ -1374,7 +1374,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
18079 struct iw_cm_event cm_event;
18080 int ret = 0;
18081
18082 @@ -46733,6 +49639,54 @@ index 7df16f7..7e1b21e 100644
18083
18084 #include "qib_common.h"
18085 #include "qib_verbs.h"
18086 +diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
18087 +index 6c8ff10..73cfbb6 100644
18088 +--- a/drivers/infiniband/hw/qib/qib_iba7322.c
18089 ++++ b/drivers/infiniband/hw/qib/qib_iba7322.c
18090 +@@ -150,7 +150,7 @@ static struct kparam_string kp_txselect = {
18091 + .string = txselect_list,
18092 + .maxlen = MAX_ATTEN_LEN
18093 + };
18094 +-static int setup_txselect(const char *, struct kernel_param *);
18095 ++static int setup_txselect(const char *, const struct kernel_param *);
18096 + module_param_call(txselect, setup_txselect, param_get_string,
18097 + &kp_txselect, S_IWUSR | S_IRUGO);
18098 + MODULE_PARM_DESC(txselect,
18099 +@@ -6194,7 +6194,7 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
18100 + }
18101 +
18102 + /* handle the txselect parameter changing */
18103 +-static int setup_txselect(const char *str, struct kernel_param *kp)
18104 ++static int setup_txselect(const char *str, const struct kernel_param *kp)
18105 + {
18106 + struct qib_devdata *dd;
18107 + unsigned long val;
18108 +diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
18109 +index 4758a38..571a55f 100644
18110 +--- a/drivers/infiniband/hw/qib/qib_pcie.c
18111 ++++ b/drivers/infiniband/hw/qib/qib_pcie.c
18112 +@@ -628,7 +628,7 @@ static void qib_tune_pcie_caps(struct qib_devdata *dd)
18113 + * PCI error infrastructure, registered via pci
18114 + */
18115 + static pci_ers_result_t
18116 +-qib_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
18117 ++qib_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
18118 + {
18119 + struct qib_devdata *dd = pci_get_drvdata(pdev);
18120 + pci_ers_result_t ret = PCI_ERS_RESULT_RECOVERED;
18121 +diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
18122 +index 25509bb..0c443df 100644
18123 +--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
18124 ++++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
18125 +@@ -947,7 +947,7 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
18126 + spin_unlock_irqrestore(&priv->lock, flags);
18127 + }
18128 +
18129 +-static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
18130 ++static netdev_tx_t ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
18131 + {
18132 + struct ipoib_dev_priv *priv = netdev_priv(dev);
18133 + struct ipoib_neigh *neigh;
18134 diff --git a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
18135 index cdc7df4..a2fdfdb 100644
18136 --- a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
18137 @@ -46746,6 +49700,40 @@ index cdc7df4..a2fdfdb 100644
18138 .kind = "ipoib",
18139 .maxtype = IFLA_IPOIB_MAX,
18140 .policy = ipoib_policy,
18141 +diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
18142 +index 4328679..5a01e76 100644
18143 +--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
18144 ++++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
18145 +@@ -80,7 +80,7 @@ module_param(srpt_srq_size, int, 0444);
18146 + MODULE_PARM_DESC(srpt_srq_size,
18147 + "Shared receive queue (SRQ) size.");
18148 +
18149 +-static int srpt_get_u64_x(char *buffer, struct kernel_param *kp)
18150 ++static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
18151 + {
18152 + return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
18153 + }
18154 +@@ -223,8 +223,9 @@ static void srpt_srq_event(struct ib_event *event, void *ctx)
18155 + /**
18156 + * srpt_qp_event() - QP event callback function.
18157 + */
18158 +-static void srpt_qp_event(struct ib_event *event, struct srpt_rdma_ch *ch)
18159 ++static void srpt_qp_event(struct ib_event *event, void *_ch)
18160 + {
18161 ++ struct srpt_rdma_ch *ch = _ch;
18162 + pr_debug("QP event %d on cm_id=%p sess_name=%s state=%d\n",
18163 + event->event, ch->cm_id, ch->sess_name, srpt_get_ch_state(ch));
18164 +
18165 +@@ -1908,8 +1909,7 @@ retry:
18166 + }
18167 +
18168 + qp_init->qp_context = (void *)ch;
18169 +- qp_init->event_handler
18170 +- = (void(*)(struct ib_event *, void*))srpt_qp_event;
18171 ++ qp_init->event_handler = srpt_qp_event;
18172 + qp_init->send_cq = ch->cq;
18173 + qp_init->recv_cq = ch->cq;
18174 + qp_init->srq = sdev->srq;
18175 diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
18176 index e9ae3d5..96e4940 100644
18177 --- a/drivers/input/evdev.c
18178 @@ -46863,7 +49851,7 @@ index b604564..3f14ae4 100644
18179
18180 return count;
18181 diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
18182 -index 8f82897..f5efcd9 100644
18183 +index 1ca7f55..2562607 100644
18184 --- a/drivers/input/serio/serio.c
18185 +++ b/drivers/input/serio/serio.c
18186 @@ -512,7 +512,7 @@ static void serio_release_port(struct device *dev)
18187 @@ -46920,7 +49908,7 @@ index 92e2243..8fd9092 100644
18188 .ident = "Shift",
18189 .matches = {
18190 diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
18191 -index d214f22..b3afa9f 100644
18192 +index b6c4d03..880c40b 100644
18193 --- a/drivers/input/touchscreen/sur40.c
18194 +++ b/drivers/input/touchscreen/sur40.c
18195 @@ -197,28 +197,34 @@ static int sur40_command(struct sur40_state *dev,
18196 @@ -46975,7 +49963,7 @@ index d214f22..b3afa9f 100644
18197 }
18198
18199 diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
18200 -index b9094e9..a4885c6 100644
18201 +index a1e75cb..88d1c47 100644
18202 --- a/drivers/iommu/Kconfig
18203 +++ b/drivers/iommu/Kconfig
18204 @@ -109,6 +109,7 @@ config AMD_IOMMU_STATS
18205 @@ -46987,10 +49975,10 @@ index b9094e9..a4885c6 100644
18206 This option enables code in the AMD IOMMU driver to collect various
18207 statistics about whats happening in the driver and exports that
18208 diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
18209 -index fc836f5..9802f00 100644
18210 +index 374c129..928e753 100644
18211 --- a/drivers/iommu/amd_iommu.c
18212 +++ b/drivers/iommu/amd_iommu.c
18213 -@@ -695,11 +695,21 @@ static void copy_cmd_to_buffer(struct amd_iommu *iommu,
18214 +@@ -739,11 +739,21 @@ static void copy_cmd_to_buffer(struct amd_iommu *iommu,
18215
18216 static void build_completion_wait(struct iommu_cmd *cmd, u64 address)
18217 {
18218 @@ -47015,10 +50003,10 @@ index fc836f5..9802f00 100644
18219 CMD_SET_TYPE(cmd, CMD_COMPL_WAIT);
18220 }
18221 diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
18222 -index 4e5118a..6b1675e 100644
18223 +index 2087534..c3f6b6c 100644
18224 --- a/drivers/iommu/arm-smmu-v3.c
18225 +++ b/drivers/iommu/arm-smmu-v3.c
18226 -@@ -1539,7 +1539,7 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain)
18227 +@@ -1554,7 +1554,7 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain)
18228 .iommu_dev = smmu->dev,
18229 };
18230
18231 @@ -47028,7 +50016,7 @@ index 4e5118a..6b1675e 100644
18232 return -ENOMEM;
18233
18234 diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
18235 -index 47dc7a7..aa39188 100644
18236 +index 59ee4b8..6632759 100644
18237 --- a/drivers/iommu/arm-smmu.c
18238 +++ b/drivers/iommu/arm-smmu.c
18239 @@ -341,7 +341,7 @@ enum arm_smmu_domain_stage {
18240 @@ -47040,7 +50028,7 @@ index 47dc7a7..aa39188 100644
18241 spinlock_t pgtbl_lock;
18242 struct arm_smmu_cfg cfg;
18243 enum arm_smmu_domain_stage stage;
18244 -@@ -798,7 +798,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
18245 +@@ -808,7 +808,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
18246 {
18247 int irq, start, ret = 0;
18248 unsigned long ias, oas;
18249 @@ -47049,7 +50037,7 @@ index 47dc7a7..aa39188 100644
18250 struct io_pgtable_cfg pgtbl_cfg;
18251 enum io_pgtable_fmt fmt;
18252 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
18253 -@@ -884,14 +884,16 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
18254 +@@ -894,14 +894,16 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
18255 };
18256
18257 smmu_domain->smmu = smmu;
18258 @@ -47069,7 +50057,7 @@ index 47dc7a7..aa39188 100644
18259
18260 /* Initialise the context bank with our page table cfg */
18261 arm_smmu_init_context_bank(smmu_domain, &pgtbl_cfg);
18262 -@@ -912,7 +914,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
18263 +@@ -922,7 +924,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
18264 mutex_unlock(&smmu_domain->init_mutex);
18265
18266 /* Publish page table ops for map/unmap */
18267 @@ -47078,17 +50066,16 @@ index 47dc7a7..aa39188 100644
18268 return 0;
18269
18270 out_clear_smmu:
18271 -@@ -945,8 +947,7 @@ static void arm_smmu_destroy_domain_context(struct iommu_domain *domain)
18272 +@@ -955,7 +957,7 @@ static void arm_smmu_destroy_domain_context(struct iommu_domain *domain)
18273 free_irq(irq, domain);
18274 }
18275
18276 -- if (smmu_domain->pgtbl_ops)
18277 -- free_io_pgtable_ops(smmu_domain->pgtbl_ops);
18278 +- free_io_pgtable_ops(smmu_domain->pgtbl_ops);
18279 + free_io_pgtable(smmu_domain->pgtbl);
18280 -
18281 __arm_smmu_free_bitmap(smmu->context_map, cfg->cbndx);
18282 }
18283 -@@ -1172,13 +1173,13 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
18284 +
18285 +@@ -1180,13 +1182,13 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
18286 int ret;
18287 unsigned long flags;
18288 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
18289 @@ -47105,7 +50092,7 @@ index 47dc7a7..aa39188 100644
18290 spin_unlock_irqrestore(&smmu_domain->pgtbl_lock, flags);
18291 return ret;
18292 }
18293 -@@ -1189,13 +1190,13 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
18294 +@@ -1197,13 +1199,13 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
18295 size_t ret;
18296 unsigned long flags;
18297 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
18298 @@ -47122,7 +50109,7 @@ index 47dc7a7..aa39188 100644
18299 spin_unlock_irqrestore(&smmu_domain->pgtbl_lock, flags);
18300 return ret;
18301 }
18302 -@@ -1206,7 +1207,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
18303 +@@ -1214,7 +1216,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
18304 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
18305 struct arm_smmu_device *smmu = smmu_domain->smmu;
18306 struct arm_smmu_cfg *cfg = &smmu_domain->cfg;
18307 @@ -47131,7 +50118,7 @@ index 47dc7a7..aa39188 100644
18308 struct device *dev = smmu->dev;
18309 void __iomem *cb_base;
18310 u32 tmp;
18311 -@@ -1227,7 +1228,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
18312 +@@ -1235,7 +1237,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
18313 dev_err(dev,
18314 "iova to phys timed out on %pad. Falling back to software table walk.\n",
18315 &iova);
18316 @@ -47140,7 +50127,7 @@ index 47dc7a7..aa39188 100644
18317 }
18318
18319 phys = readl_relaxed(cb_base + ARM_SMMU_CB_PAR_LO);
18320 -@@ -1248,9 +1249,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
18321 +@@ -1256,9 +1258,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
18322 phys_addr_t ret;
18323 unsigned long flags;
18324 struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
18325 @@ -47152,7 +50139,7 @@ index 47dc7a7..aa39188 100644
18326 return 0;
18327
18328 spin_lock_irqsave(&smmu_domain->pgtbl_lock, flags);
18329 -@@ -1258,7 +1259,7 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
18330 +@@ -1266,7 +1268,7 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
18331 smmu_domain->stage == ARM_SMMU_DOMAIN_S1) {
18332 ret = arm_smmu_iova_to_phys_hard(domain, iova);
18333 } else {
18334 @@ -47161,7 +50148,7 @@ index 47dc7a7..aa39188 100644
18335 }
18336
18337 spin_unlock_irqrestore(&smmu_domain->pgtbl_lock, flags);
18338 -@@ -1676,7 +1677,9 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
18339 +@@ -1685,7 +1687,9 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
18340 size |= SZ_64K | SZ_512M;
18341 }
18342
18343 @@ -47173,23 +50160,20 @@ index 47dc7a7..aa39188 100644
18344
18345 if (smmu->features & ARM_SMMU_FEAT_TRANS_S1)
18346 diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
18347 -index dad768c..6783134 100644
18348 +index 381ca5a..f383021 100644
18349 --- a/drivers/iommu/io-pgtable-arm.c
18350 +++ b/drivers/iommu/io-pgtable-arm.c
18351 -@@ -38,12 +38,6 @@
18352 +@@ -39,9 +39,6 @@
18353 #define io_pgtable_to_data(x) \
18354 container_of((x), struct arm_lpae_io_pgtable, iop)
18355
18356 --#define io_pgtable_ops_to_pgtable(x) \
18357 -- container_of((x), struct io_pgtable, ops)
18358 --
18359 -#define io_pgtable_ops_to_data(x) \
18360 - io_pgtable_to_data(io_pgtable_ops_to_pgtable(x))
18361 -
18362 /*
18363 * For consistency with the architecture, we always consider
18364 * ARM_LPAE_MAX_LEVELS levels, with the walk starting at level n >=0
18365 -@@ -376,10 +370,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
18366 +@@ -376,10 +373,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
18367 return pte;
18368 }
18369
18370 @@ -47202,7 +50186,7 @@ index dad768c..6783134 100644
18371 arm_lpae_iopte *ptep = data->pgd;
18372 int ret, lvl = ARM_LPAE_START_LVL(data);
18373 arm_lpae_iopte prot;
18374 -@@ -524,12 +518,11 @@ static int __arm_lpae_unmap(struct arm_lpae_io_pgtable *data,
18375 +@@ -527,12 +524,11 @@ static int __arm_lpae_unmap(struct arm_lpae_io_pgtable *data,
18376 return __arm_lpae_unmap(data, iova, size, lvl + 1, ptep);
18377 }
18378
18379 @@ -47217,7 +50201,7 @@ index dad768c..6783134 100644
18380 arm_lpae_iopte *ptep = data->pgd;
18381 int lvl = ARM_LPAE_START_LVL(data);
18382
18383 -@@ -540,10 +533,10 @@ static int arm_lpae_unmap(struct io_pgtable_ops *ops, unsigned long iova,
18384 +@@ -543,10 +539,10 @@ static int arm_lpae_unmap(struct io_pgtable_ops *ops, unsigned long iova,
18385 return unmapped;
18386 }
18387
18388 @@ -47230,7 +50214,7 @@ index dad768c..6783134 100644
18389 arm_lpae_iopte pte, *ptep = data->pgd;
18390 int lvl = ARM_LPAE_START_LVL(data);
18391
18392 -@@ -610,6 +603,12 @@ static void arm_lpae_restrict_pgsizes(struct io_pgtable_cfg *cfg)
18393 +@@ -613,6 +609,12 @@ static void arm_lpae_restrict_pgsizes(struct io_pgtable_cfg *cfg)
18394 }
18395 }
18396
18397 @@ -47243,7 +50227,7 @@ index dad768c..6783134 100644
18398 static struct arm_lpae_io_pgtable *
18399 arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
18400 {
18401 -@@ -646,11 +645,7 @@ arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
18402 +@@ -649,11 +651,7 @@ arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
18403 pgd_bits = va_bits - (data->bits_per_level * (data->levels - 1));
18404 data->pgd_size = 1UL << (pgd_bits + ilog2(sizeof(arm_lpae_iopte)));
18405
18406 @@ -47256,7 +50240,7 @@ index dad768c..6783134 100644
18407
18408 return data;
18409 }
18410 -@@ -908,9 +903,9 @@ static struct iommu_gather_ops dummy_tlb_ops __initdata = {
18411 +@@ -911,9 +909,9 @@ static struct iommu_gather_ops dummy_tlb_ops __initdata = {
18412 .tlb_sync = dummy_tlb_sync,
18413 };
18414
18415 @@ -47268,7 +50252,7 @@ index dad768c..6783134 100644
18416 struct io_pgtable_cfg *cfg = &data->iop.cfg;
18417
18418 pr_err("cfg: pgsize_bitmap 0x%lx, ias %u-bit\n",
18419 -@@ -920,9 +915,9 @@ static void __init arm_lpae_dump_ops(struct io_pgtable_ops *ops)
18420 +@@ -923,9 +921,9 @@ static void __init arm_lpae_dump_ops(struct io_pgtable_ops *ops)
18421 data->bits_per_level, data->pgd);
18422 }
18423
18424 @@ -47280,7 +50264,7 @@ index dad768c..6783134 100644
18425 selftest_running = false; \
18426 -EFAULT; \
18427 })
18428 -@@ -937,30 +932,32 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18429 +@@ -940,30 +938,32 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18430 int i, j;
18431 unsigned long iova;
18432 size_t size;
18433 @@ -47322,7 +50306,7 @@ index dad768c..6783134 100644
18434
18435 /*
18436 * Distinct mappings of different granule sizes.
18437 -@@ -970,19 +967,19 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18438 +@@ -973,19 +973,19 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18439 while (j != BITS_PER_LONG) {
18440 size = 1UL << j;
18441
18442 @@ -47348,7 +50332,7 @@ index dad768c..6783134 100644
18443
18444 iova += SZ_1G;
18445 j++;
18446 -@@ -991,15 +988,15 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18447 +@@ -994,15 +994,15 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18448
18449 /* Partial unmap */
18450 size = 1UL << __ffs(cfg->pgsize_bitmap);
18451 @@ -47370,7 +50354,7 @@ index dad768c..6783134 100644
18452
18453 /* Full unmap */
18454 iova = 0;
18455 -@@ -1007,25 +1004,25 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18456 +@@ -1010,25 +1010,25 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
18457 while (j != BITS_PER_LONG) {
18458 size = 1UL << j;
18459
18460 @@ -47444,7 +50428,7 @@ index 6f2e319..c24d09a 100644
18461 io_pgtable_init_table[iop->fmt]->free(iop);
18462 }
18463 diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h
18464 -index ac9e234..a2f206e 100644
18465 +index 36673c8..9b3fcbe 100644
18466 --- a/drivers/iommu/io-pgtable.h
18467 +++ b/drivers/iommu/io-pgtable.h
18468 @@ -78,17 +78,18 @@ struct io_pgtable_cfg {
18469 @@ -47492,7 +50476,7 @@ index ac9e234..a2f206e 100644
18470
18471
18472 /*
18473 -@@ -128,7 +129,7 @@ struct io_pgtable {
18474 +@@ -128,11 +129,9 @@ struct io_pgtable {
18475 enum io_pgtable_fmt fmt;
18476 void *cookie;
18477 struct io_pgtable_cfg cfg;
18478 @@ -47500,7 +50484,11 @@ index ac9e234..a2f206e 100644
18479 + const struct io_pgtable_ops *ops;
18480 };
18481
18482 +-#define io_pgtable_ops_to_pgtable(x) container_of((x), struct io_pgtable, ops)
18483 +-
18484 /**
18485 + * struct io_pgtable_init_fns - Alloc/free a set of page tables for a
18486 + * particular format.
18487 diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
18488 index 515bb8b..c2bb880 100644
18489 --- a/drivers/iommu/iommu.c
18490 @@ -47515,7 +50503,7 @@ index 515bb8b..c2bb880 100644
18491 .ops = ops,
18492 };
18493 diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
18494 -index dfb868e..7447315a 100644
18495 +index 2fdbac6..7095311 100644
18496 --- a/drivers/iommu/ipmmu-vmsa.c
18497 +++ b/drivers/iommu/ipmmu-vmsa.c
18498 @@ -41,7 +41,7 @@ struct ipmmu_vmsa_domain {
18499 @@ -47587,18 +50575,18 @@ index 8adaaea..99dab8e 100644
18500
18501 void ir_ack_apic_edge(struct irq_data *data)
18502 diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
18503 -index abf2ffa..29cac65 100644
18504 +index 8f9ebf7..e614150 100644
18505 --- a/drivers/irqchip/irq-gic.c
18506 +++ b/drivers/irqchip/irq-gic.c
18507 -@@ -382,7 +382,7 @@ static void gic_handle_cascade_irq(struct irq_desc *desc)
18508 +@@ -379,7 +379,7 @@ static void gic_handle_cascade_irq(struct irq_desc *desc)
18509 chained_irq_exit(chip, desc);
18510 }
18511
18512 -static struct irq_chip gic_chip = {
18513 +static irq_chip_no_const gic_chip __read_only = {
18514 - .name = "GIC",
18515 .irq_mask = gic_mask_irq,
18516 .irq_unmask = gic_unmask_irq,
18517 + .irq_eoi = gic_eoi_irq,
18518 diff --git a/drivers/irqchip/irq-i8259.c b/drivers/irqchip/irq-i8259.c
18519 index 6b304eb..6e3a1413 100644
18520 --- a/drivers/irqchip/irq-i8259.c
18521 @@ -47613,10 +50601,10 @@ index 6b304eb..6e3a1413 100644
18522 * Theoretically we do not have to handle this IRQ,
18523 * but in Linux this does not cause problems and is
18524 diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
18525 -index c325806..b18ef0f 100644
18526 +index 713177d..3849ddd 100644
18527 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c
18528 +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
18529 -@@ -384,7 +384,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
18530 +@@ -396,7 +396,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
18531 struct intc_irqpin_iomem *i;
18532 struct resource *io[INTC_IRQPIN_REG_NR];
18533 struct resource *irq;
18534 @@ -47625,6 +50613,19 @@ index c325806..b18ef0f 100644
18535 void (*enable_fn)(struct irq_data *d);
18536 void (*disable_fn)(struct irq_data *d);
18537 const char *name = dev_name(dev);
18538 +diff --git a/drivers/irqchip/irq-ts4800.c b/drivers/irqchip/irq-ts4800.c
18539 +index 4192bdc..dabf7a7 100644
18540 +--- a/drivers/irqchip/irq-ts4800.c
18541 ++++ b/drivers/irqchip/irq-ts4800.c
18542 +@@ -93,7 +93,7 @@ static int ts4800_ic_probe(struct platform_device *pdev)
18543 + {
18544 + struct device_node *node = pdev->dev.of_node;
18545 + struct ts4800_irq_data *data;
18546 +- struct irq_chip *irq_chip;
18547 ++ irq_chip_no_const *irq_chip;
18548 + struct resource *res;
18549 + int parent_irq;
18550 +
18551 diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
18552 index 6a2df32..dc962f1 100644
18553 --- a/drivers/isdn/capi/capi.c
18554 @@ -47738,10 +50739,10 @@ index 600c79b..3752bab 100644
18555
18556 mutex_unlock(&cs->mutex);
18557 diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c
18558 -index 2a506fe..fdbe969 100644
18559 +index d1f8ab9..c0412f2 100644
18560 --- a/drivers/isdn/gigaset/ser-gigaset.c
18561 +++ b/drivers/isdn/gigaset/ser-gigaset.c
18562 -@@ -452,22 +452,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
18563 +@@ -445,22 +445,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
18564 }
18565
18566 static const struct gigaset_ops ops = {
18567 @@ -47854,6 +50855,1042 @@ index 4d9b195..455075c 100644
18568 return -EFAULT;
18569 } else {
18570 memcpy(buf, dp, left);
18571 +diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
18572 +index 7a0bdbd..0a7b7db 100644
18573 +--- a/drivers/isdn/hardware/eicon/capifunc.c
18574 ++++ b/drivers/isdn/hardware/eicon/capifunc.c
18575 +@@ -57,7 +57,7 @@ static u16 diva_send_message(struct capi_ctr *,
18576 + diva_os_message_buffer_s *);
18577 + extern void diva_os_set_controller_struct(struct capi_ctr *);
18578 +
18579 +-extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
18580 ++extern void DIVA_DIDD_Read(void *, int);
18581 +
18582 + /*
18583 + * debug
18584 +@@ -1032,7 +1032,6 @@ static void didd_callback(void *context, DESCRIPTOR *adapter, int removal)
18585 + stop_dbg();
18586 + } else {
18587 + memcpy(&MAdapter, adapter, sizeof(MAdapter));
18588 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18589 + DbgRegister("CAPI20", DRIVERRELEASE_CAPI, DBG_DEFAULT);
18590 + }
18591 + } else if ((adapter->type > 0) && (adapter->type < 16)) { /* IDI Adapter */
18592 +@@ -1060,7 +1059,6 @@ static int divacapi_connect_didd(void)
18593 + for (x = 0; x < MAX_DESCRIPTORS; x++) {
18594 + if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
18595 + memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter));
18596 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18597 + DbgRegister("CAPI20", DRIVERRELEASE_CAPI, DBG_DEFAULT);
18598 + break;
18599 + }
18600 +@@ -1072,7 +1070,7 @@ static int divacapi_connect_didd(void)
18601 + req.didd_notify.e.Req = 0;
18602 + req.didd_notify.e.Rc =
18603 + IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
18604 +- req.didd_notify.info.callback = (void *)didd_callback;
18605 ++ req.didd_notify.info.callback = didd_callback;
18606 + req.didd_notify.info.context = NULL;
18607 + DAdapter.request((ENTITY *)&req);
18608 + if (req.didd_notify.e.Rc != 0xff) {
18609 +diff --git a/drivers/isdn/hardware/eicon/dadapter.c b/drivers/isdn/hardware/eicon/dadapter.c
18610 +index 5142099..642b7de 100644
18611 +--- a/drivers/isdn/hardware/eicon/dadapter.c
18612 ++++ b/drivers/isdn/hardware/eicon/dadapter.c
18613 +@@ -63,10 +63,14 @@ static void no_printf(unsigned char *format, ...)
18614 + ------------------------------------------------------------------------- */
18615 + #include "debuglib.c"
18616 +
18617 ++static void IDI_CALL_LINK_T no_request(ENTITY IDI_CALL_ENTITY_T *i)
18618 ++{
18619 ++}
18620 ++
18621 + static DESCRIPTOR MAdapter = {IDI_DIMAINT, /* Adapter Type */
18622 + 0x00, /* Channels */
18623 + 0x0000, /* Features */
18624 +- (IDI_CALL)no_printf};
18625 ++ no_request};
18626 + /* --------------------------------------------------------------------------
18627 + DAdapter. Only IDI clients with buffer, that is huge enough to
18628 + get all descriptors will receive information about DAdapter
18629 +@@ -100,6 +104,11 @@ void diva_didd_load_time_init(void) {
18630 + void diva_didd_load_time_finit(void) {
18631 + diva_os_destroy_spin_lock(&didd_spin, "didd");
18632 + }
18633 ++
18634 ++static void diva_didd_no_request(ENTITY *e)
18635 ++{
18636 ++}
18637 ++
18638 + /* --------------------------------------------------------------------------
18639 + Called in order to register new adapter in adapter array
18640 + return adapter handle (> 0) on success
18641 +@@ -111,13 +120,12 @@ static int diva_didd_add_descriptor(DESCRIPTOR *d) {
18642 + if (d->type == IDI_DIMAINT) {
18643 + if (d->request) {
18644 + MAdapter.request = d->request;
18645 +- dprintf = (DIVA_DI_PRINTF)d->request;
18646 + diva_notify_adapter_change(&MAdapter, 0); /* Inserted */
18647 + DBG_TRC(("DIMAINT registered, dprintf=%08x", d->request))
18648 + } else {
18649 + DBG_TRC(("DIMAINT removed"))
18650 + diva_notify_adapter_change(&MAdapter, 1); /* About to remove */
18651 +- MAdapter.request = (IDI_CALL)no_printf;
18652 ++ MAdapter.request = diva_didd_no_request;
18653 + dprintf = no_printf;
18654 + }
18655 + return (NEW_MAX_DESCRIPTORS);
18656 +@@ -149,7 +157,7 @@ static int diva_didd_remove_descriptor(IDI_CALL request) {
18657 + DBG_TRC(("DIMAINT removed"))
18658 + dprintf = no_printf;
18659 + diva_notify_adapter_change(&MAdapter, 1); /* About to remove */
18660 +- MAdapter.request = (IDI_CALL)no_printf;
18661 ++ MAdapter.request = diva_didd_no_request;
18662 + return (0);
18663 + }
18664 + for (i = 0; (Adapters && (i < NEW_MAX_DESCRIPTORS)); i++) {
18665 +@@ -222,7 +230,7 @@ static void IDI_CALL_LINK_T diva_dadapter_request( \
18666 + case IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY: {
18667 + diva_didd_adapter_notify_t *pinfo = &syncReq->didd_notify.info;
18668 + pinfo->handle = diva_register_adapter_callback( \
18669 +- (didd_adapter_change_callback_t)pinfo->callback,
18670 ++ pinfo->callback,
18671 + (void IDI_CALL_ENTITY_T *)pinfo->context);
18672 + e->Rc = 0xff;
18673 + } break;
18674 +diff --git a/drivers/isdn/hardware/eicon/diddfunc.c b/drivers/isdn/hardware/eicon/diddfunc.c
18675 +index b0b23ed..e3d4e18 100644
18676 +--- a/drivers/isdn/hardware/eicon/diddfunc.c
18677 ++++ b/drivers/isdn/hardware/eicon/diddfunc.c
18678 +@@ -28,12 +28,12 @@ static DESCRIPTOR _DAdapter;
18679 + /*
18680 + * didd callback function
18681 + */
18682 +-static void *didd_callback(void *context, DESCRIPTOR *adapter,
18683 ++static void didd_callback(void *context, DESCRIPTOR *adapter,
18684 + int removal)
18685 + {
18686 + if (adapter->type == IDI_DADAPTER) {
18687 + DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."))
18688 +- return (NULL);
18689 ++ return;
18690 + } else if (adapter->type == IDI_DIMAINT) {
18691 + if (removal) {
18692 + DbgDeregister();
18693 +@@ -41,7 +41,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
18694 + DbgRegister("DIDD", DRIVERRELEASE_DIDD, DBG_DEFAULT);
18695 + }
18696 + }
18697 +- return (NULL);
18698 + }
18699 +
18700 + /*
18701 +@@ -63,7 +62,7 @@ static int __init connect_didd(void)
18702 + req.didd_notify.e.Req = 0;
18703 + req.didd_notify.e.Rc =
18704 + IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
18705 +- req.didd_notify.info.callback = (void *)didd_callback;
18706 ++ req.didd_notify.info.callback = didd_callback;
18707 + req.didd_notify.info.context = NULL;
18708 + _DAdapter.request((ENTITY *)&req);
18709 + if (req.didd_notify.e.Rc != 0xff)
18710 +diff --git a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c
18711 +index 4be5f88..1dbd479 100644
18712 +--- a/drivers/isdn/hardware/eicon/divasfunc.c
18713 ++++ b/drivers/isdn/hardware/eicon/divasfunc.c
18714 +@@ -130,12 +130,12 @@ static void stop_dbg(void)
18715 + /*
18716 + * didd callback function
18717 + */
18718 +-static void *didd_callback(void *context, DESCRIPTOR *adapter,
18719 ++static void didd_callback(void *context, DESCRIPTOR *adapter,
18720 + int removal)
18721 + {
18722 + if (adapter->type == IDI_DADAPTER) {
18723 + DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."));
18724 +- return (NULL);
18725 ++ return;
18726 + }
18727 +
18728 + if (adapter->type == IDI_DIMAINT) {
18729 +@@ -143,11 +143,9 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
18730 + stop_dbg();
18731 + } else {
18732 + memcpy(&MAdapter, adapter, sizeof(MAdapter));
18733 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18734 + start_dbg();
18735 + }
18736 + }
18737 +- return (NULL);
18738 + }
18739 +
18740 + /*
18741 +@@ -169,7 +167,7 @@ static int __init connect_didd(void)
18742 + req.didd_notify.e.Req = 0;
18743 + req.didd_notify.e.Rc =
18744 + IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
18745 +- req.didd_notify.info.callback = (void *)didd_callback;
18746 ++ req.didd_notify.info.callback = didd_callback;
18747 + req.didd_notify.info.context = NULL;
18748 + DAdapter.request((ENTITY *)&req);
18749 + if (req.didd_notify.e.Rc != 0xff) {
18750 +@@ -179,7 +177,6 @@ static int __init connect_didd(void)
18751 + notify_handle = req.didd_notify.info.handle;
18752 + } else if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
18753 + memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter));
18754 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18755 + start_dbg();
18756 + }
18757 + }
18758 +diff --git a/drivers/isdn/hardware/eicon/divasync.h b/drivers/isdn/hardware/eicon/divasync.h
18759 +index dd6b53a..42661f6 100644
18760 +--- a/drivers/isdn/hardware/eicon/divasync.h
18761 ++++ b/drivers/isdn/hardware/eicon/divasync.h
18762 +@@ -138,7 +138,7 @@ typedef struct _diva_xdi_dma_descriptor_operation {
18763 + #define IDI_SYNC_REQ_DIDD_GET_CFG_LIB_IFC 0x10
18764 + typedef struct _diva_didd_adapter_notify {
18765 + dword handle; /* Notification handle */
18766 +- void *callback;
18767 ++ didd_adapter_change_callback_t callback;
18768 + void *context;
18769 + } diva_didd_adapter_notify_t;
18770 + typedef struct _diva_didd_add_adapter {
18771 +diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c
18772 +index fef6586..22353ff 100644
18773 +--- a/drivers/isdn/hardware/eicon/idifunc.c
18774 ++++ b/drivers/isdn/hardware/eicon/idifunc.c
18775 +@@ -154,18 +154,17 @@ rescan:
18776 + /*
18777 + * DIDD notify callback
18778 + */
18779 +-static void *didd_callback(void *context, DESCRIPTOR *adapter,
18780 ++static void didd_callback(void *context, DESCRIPTOR *adapter,
18781 + int removal)
18782 + {
18783 + if (adapter->type == IDI_DADAPTER) {
18784 + DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."));
18785 +- return (NULL);
18786 ++ return;
18787 + } else if (adapter->type == IDI_DIMAINT) {
18788 + if (removal) {
18789 + stop_dbg();
18790 + } else {
18791 + memcpy(&MAdapter, adapter, sizeof(MAdapter));
18792 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18793 + DbgRegister("User IDI", DRIVERRELEASE_IDI, DBG_DEFAULT);
18794 + }
18795 + } else if ((adapter->type > 0) && (adapter->type < 16)) { /* IDI Adapter */
18796 +@@ -175,7 +174,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
18797 + um_new_card(adapter);
18798 + }
18799 + }
18800 +- return (NULL);
18801 + }
18802 +
18803 + /*
18804 +@@ -197,7 +195,7 @@ static int __init connect_didd(void)
18805 + req.didd_notify.e.Req = 0;
18806 + req.didd_notify.e.Rc =
18807 + IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
18808 +- req.didd_notify.info.callback = (void *)didd_callback;
18809 ++ req.didd_notify.info.callback = didd_callback;
18810 + req.didd_notify.info.context = NULL;
18811 + DAdapter.request((ENTITY *)&req);
18812 + if (req.didd_notify.e.Rc != 0xff) {
18813 +@@ -207,7 +205,6 @@ static int __init connect_didd(void)
18814 + notify_handle = req.didd_notify.info.handle;
18815 + } else if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
18816 + memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter));
18817 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18818 + DbgRegister("User IDI", DRIVERRELEASE_IDI, DBG_DEFAULT);
18819 + } else if ((DIDD_Table[x].type > 0)
18820 + && (DIDD_Table[x].type < 16)) { /* IDI Adapter found */
18821 +diff --git a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c
18822 +index 1cd9aff..1a3e2b6 100644
18823 +--- a/drivers/isdn/hardware/eicon/mntfunc.c
18824 ++++ b/drivers/isdn/hardware/eicon/mntfunc.c
18825 +@@ -26,8 +26,13 @@ extern void DIVA_DIDD_Read(void *, int);
18826 + static dword notify_handle;
18827 + static DESCRIPTOR DAdapter;
18828 + static DESCRIPTOR MAdapter;
18829 ++
18830 ++static void didd_nothing(ENTITY IDI_CALL_ENTITY_T *e)
18831 ++{
18832 ++ diva_maint_prtComp(e);
18833 ++}
18834 + static DESCRIPTOR MaintDescriptor =
18835 +-{ IDI_DIMAINT, 0, 0, (IDI_CALL) diva_maint_prtComp };
18836 ++{ IDI_DIMAINT, 0, 0, didd_nothing };
18837 +
18838 + extern int diva_os_copy_to_user(void *os_handle, void __user *dst,
18839 + const void *src, int length);
18840 +@@ -44,7 +49,7 @@ static void no_printf(unsigned char *x, ...)
18841 + /*
18842 + * DIDD callback function
18843 + */
18844 +-static void *didd_callback(void *context, DESCRIPTOR *adapter,
18845 ++static void didd_callback(void *context, DESCRIPTOR *adapter,
18846 + int removal)
18847 + {
18848 + if (adapter->type == IDI_DADAPTER) {
18849 +@@ -56,7 +61,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
18850 + dprintf = no_printf;
18851 + } else {
18852 + memcpy(&MAdapter, adapter, sizeof(MAdapter));
18853 +- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
18854 + DbgRegister("MAINT", DRIVERRELEASE_MNT, DBG_DEFAULT);
18855 + }
18856 + } else if ((adapter->type > 0) && (adapter->type < 16)) {
18857 +@@ -66,7 +70,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
18858 + diva_mnt_add_xdi_adapter(adapter);
18859 + }
18860 + }
18861 +- return (NULL);
18862 + }
18863 +
18864 + /*
18865 +@@ -88,7 +91,7 @@ static int __init connect_didd(void)
18866 + req.didd_notify.e.Req = 0;
18867 + req.didd_notify.e.Rc =
18868 + IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
18869 +- req.didd_notify.info.callback = (void *)didd_callback;
18870 ++ req.didd_notify.info.callback = didd_callback;
18871 + req.didd_notify.info.context = NULL;
18872 + DAdapter.request((ENTITY *)&req);
18873 + if (req.didd_notify.e.Rc != 0xff)
18874 +diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
18875 +index 292991c..f36f4cb 100644
18876 +--- a/drivers/isdn/hardware/mISDN/avmfritz.c
18877 ++++ b/drivers/isdn/hardware/mISDN/avmfritz.c
18878 +@@ -156,7 +156,7 @@ _set_debug(struct fritzcard *card)
18879 + }
18880 +
18881 + static int
18882 +-set_debug(const char *val, struct kernel_param *kp)
18883 ++set_debug(const char *val, const struct kernel_param *kp)
18884 + {
18885 + int ret;
18886 + struct fritzcard *card;
18887 +diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
18888 +index 28543d7..bd8cf91 100644
18889 +--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
18890 ++++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
18891 +@@ -2856,8 +2856,9 @@ irq_notforus:
18892 + */
18893 +
18894 + static void
18895 +-hfcmulti_dbusy_timer(struct hfc_multi *hc)
18896 ++hfcmulti_dbusy_timer(unsigned long _hc)
18897 + {
18898 ++ //struct hfc_multi *hc = (struct hfc_multi *)_hc;
18899 + }
18900 +
18901 +
18902 +@@ -3878,7 +3879,7 @@ hfcmulti_initmode(struct dchannel *dch)
18903 + if (hc->dnum[pt]) {
18904 + mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
18905 + -1, 0, -1, 0);
18906 +- dch->timer.function = (void *) hfcmulti_dbusy_timer;
18907 ++ dch->timer.function = hfcmulti_dbusy_timer;
18908 + dch->timer.data = (long) dch;
18909 + init_timer(&dch->timer);
18910 + }
18911 +@@ -3986,7 +3987,7 @@ hfcmulti_initmode(struct dchannel *dch)
18912 + hc->chan[i].slot_rx = -1;
18913 + hc->chan[i].conf = -1;
18914 + mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0);
18915 +- dch->timer.function = (void *) hfcmulti_dbusy_timer;
18916 ++ dch->timer.function = hfcmulti_dbusy_timer;
18917 + dch->timer.data = (long) dch;
18918 + init_timer(&dch->timer);
18919 + hc->chan[i - 2].slot_tx = -1;
18920 +diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
18921 +index ff48da6..497fb7b 100644
18922 +--- a/drivers/isdn/hardware/mISDN/hfcpci.c
18923 ++++ b/drivers/isdn/hardware/mISDN/hfcpci.c
18924 +@@ -301,8 +301,9 @@ reset_hfcpci(struct hfc_pci *hc)
18925 + * Timer function called when kernel timer expires
18926 + */
18927 + static void
18928 +-hfcpci_Timer(struct hfc_pci *hc)
18929 ++hfcpci_Timer(unsigned long _hc)
18930 + {
18931 ++ struct hfc_pci *hc = (struct hfc_pci *)_hc;
18932 + hc->hw.timer.expires = jiffies + 75;
18933 + /* WD RESET */
18934 + /*
18935 +@@ -1241,8 +1242,9 @@ hfcpci_int(int intno, void *dev_id)
18936 + * timer callback for D-chan busy resolution. Currently no function
18937 + */
18938 + static void
18939 +-hfcpci_dbusy_timer(struct hfc_pci *hc)
18940 ++hfcpci_dbusy_timer(unsigned long _hc)
18941 + {
18942 ++// struct hfc_pci *hc = (struct hfc_pci *)_hc;
18943 + }
18944 +
18945 + /*
18946 +@@ -1717,7 +1719,7 @@ static void
18947 + inithfcpci(struct hfc_pci *hc)
18948 + {
18949 + printk(KERN_DEBUG "inithfcpci: entered\n");
18950 +- hc->dch.timer.function = (void *) hfcpci_dbusy_timer;
18951 ++ hc->dch.timer.function = hfcpci_dbusy_timer;
18952 + hc->dch.timer.data = (long) &hc->dch;
18953 + init_timer(&hc->dch.timer);
18954 + hc->chanlimit = 2;
18955 +@@ -2044,7 +2046,7 @@ setup_hw(struct hfc_pci *hc)
18956 + Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
18957 + /* At this point the needed PCI config is done */
18958 + /* fifos are still not enabled */
18959 +- hc->hw.timer.function = (void *) hfcpci_Timer;
18960 ++ hc->hw.timer.function = hfcpci_Timer;
18961 + hc->hw.timer.data = (long) hc;
18962 + init_timer(&hc->hw.timer);
18963 + /* default PCM master */
18964 +@@ -2293,9 +2295,9 @@ _hfcpci_softirq(struct device *dev, void *arg)
18965 + }
18966 +
18967 + static void
18968 +-hfcpci_softirq(void *arg)
18969 ++hfcpci_softirq(unsigned long arg)
18970 + {
18971 +- WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, arg,
18972 ++ WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, (void *)arg,
18973 + _hfcpci_softirq) != 0);
18974 +
18975 + /* if next event would be in the past ... */
18976 +@@ -2330,7 +2332,7 @@ HFC_init(void)
18977 + if (poll != HFCPCI_BTRANS_THRESHOLD) {
18978 + printk(KERN_INFO "%s: Using alternative poll value of %d\n",
18979 + __func__, poll);
18980 +- hfc_tl.function = (void *)hfcpci_softirq;
18981 ++ hfc_tl.function = hfcpci_softirq;
18982 + hfc_tl.data = 0;
18983 + init_timer(&hfc_tl);
18984 + hfc_tl.expires = jiffies + tics;
18985 +diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
18986 +index d5bdbaf..a7cdc61 100644
18987 +--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
18988 ++++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
18989 +@@ -244,7 +244,7 @@ _set_debug(struct inf_hw *card)
18990 + }
18991 +
18992 + static int
18993 +-set_debug(const char *val, struct kernel_param *kp)
18994 ++set_debug(const char *val, const struct kernel_param *kp)
18995 + {
18996 + int ret;
18997 + struct inf_hw *card;
18998 +@@ -586,9 +586,10 @@ reset_inf(struct inf_hw *hw)
18999 + }
19000 +
19001 + static int
19002 +-inf_ctrl(struct inf_hw *hw, u32 cmd, u_long arg)
19003 ++inf_ctrl(struct ipac_hw *_hw, u32 cmd, u_long arg)
19004 + {
19005 + int ret = 0;
19006 ++ struct inf_hw *hw = container_of(_hw, struct inf_hw, ipac);
19007 +
19008 + switch (cmd) {
19009 + case HW_RESET_REQ:
19010 +@@ -915,7 +916,7 @@ setup_instance(struct inf_hw *card)
19011 + spin_lock_init(&card->lock);
19012 + card->ipac.isac.hwlock = &card->lock;
19013 + card->ipac.hwlock = &card->lock;
19014 +- card->ipac.ctrl = (void *)&inf_ctrl;
19015 ++ card->ipac.ctrl = &inf_ctrl;
19016 +
19017 + err = setup_io(card);
19018 + if (err)
19019 +diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
19020 +index cb428b9..cb3d37c 100644
19021 +--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
19022 ++++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
19023 +@@ -725,8 +725,9 @@ isac_release(struct isac_hw *isac)
19024 + }
19025 +
19026 + static void
19027 +-dbusy_timer_handler(struct isac_hw *isac)
19028 ++dbusy_timer_handler(unsigned long _isac)
19029 + {
19030 ++ struct isac_hw *isac = (struct isac_hw *)_isac;
19031 + int rbch, star;
19032 + u_long flags;
19033 +
19034 +@@ -794,7 +795,7 @@ isac_init(struct isac_hw *isac)
19035 + }
19036 + isac->mon_tx = NULL;
19037 + isac->mon_rx = NULL;
19038 +- isac->dch.timer.function = (void *) dbusy_timer_handler;
19039 ++ isac->dch.timer.function = dbusy_timer_handler;
19040 + isac->dch.timer.data = (long)isac;
19041 + init_timer(&isac->dch.timer);
19042 + isac->mocr = 0xaa;
19043 +diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
19044 +index afde4ed..e9fcae4 100644
19045 +--- a/drivers/isdn/hardware/mISDN/netjet.c
19046 ++++ b/drivers/isdn/hardware/mISDN/netjet.c
19047 +@@ -111,7 +111,7 @@ _set_debug(struct tiger_hw *card)
19048 + }
19049 +
19050 + static int
19051 +-set_debug(const char *val, struct kernel_param *kp)
19052 ++set_debug(const char *val, const struct kernel_param *kp)
19053 + {
19054 + int ret;
19055 + struct tiger_hw *card;
19056 +diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c
19057 +index 9815bb4..3d6181e 100644
19058 +--- a/drivers/isdn/hardware/mISDN/speedfax.c
19059 ++++ b/drivers/isdn/hardware/mISDN/speedfax.c
19060 +@@ -94,7 +94,7 @@ _set_debug(struct sfax_hw *card)
19061 + }
19062 +
19063 + static int
19064 +-set_debug(const char *val, struct kernel_param *kp)
19065 ++set_debug(const char *val, const struct kernel_param *kp)
19066 + {
19067 + int ret;
19068 + struct sfax_hw *card;
19069 +@@ -186,9 +186,10 @@ reset_speedfax(struct sfax_hw *sf)
19070 + }
19071 +
19072 + static int
19073 +-sfax_ctrl(struct sfax_hw *sf, u32 cmd, u_long arg)
19074 ++sfax_ctrl(void *_sf, u32 cmd, u_long arg)
19075 + {
19076 + int ret = 0;
19077 ++ struct sfax_hw *sf = (struct sfax_hw *)_sf;
19078 +
19079 + switch (cmd) {
19080 + case HW_RESET_REQ:
19081 +@@ -386,7 +387,7 @@ setup_instance(struct sfax_hw *card)
19082 + spin_lock_init(&card->lock);
19083 + card->isac.hwlock = &card->lock;
19084 + card->isar.hwlock = &card->lock;
19085 +- card->isar.ctrl = (void *)&sfax_ctrl;
19086 ++ card->isar.ctrl = &sfax_ctrl;
19087 + card->isac.name = card->name;
19088 + card->isar.name = card->name;
19089 + card->isar.owner = THIS_MODULE;
19090 +diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
19091 +index 7416755..2914e7c 100644
19092 +--- a/drivers/isdn/hardware/mISDN/w6692.c
19093 ++++ b/drivers/isdn/hardware/mISDN/w6692.c
19094 +@@ -101,7 +101,7 @@ _set_debug(struct w6692_hw *card)
19095 + }
19096 +
19097 + static int
19098 +-set_debug(const char *val, struct kernel_param *kp)
19099 ++set_debug(const char *val, const struct kernel_param *kp)
19100 + {
19101 + int ret;
19102 + struct w6692_hw *card;
19103 +@@ -819,8 +819,9 @@ w6692_irq(int intno, void *dev_id)
19104 + }
19105 +
19106 + static void
19107 +-dbusy_timer_handler(struct dchannel *dch)
19108 ++dbusy_timer_handler(unsigned long _dch)
19109 + {
19110 ++ struct dchannel *dch = (struct dchannel *)_dch;
19111 + struct w6692_hw *card = dch->hw;
19112 + int rbch, star;
19113 + u_long flags;
19114 +@@ -852,7 +853,7 @@ void initW6692(struct w6692_hw *card)
19115 + {
19116 + u8 val;
19117 +
19118 +- card->dch.timer.function = (void *)dbusy_timer_handler;
19119 ++ card->dch.timer.function = dbusy_timer_handler;
19120 + card->dch.timer.data = (u_long)&card->dch;
19121 + init_timer(&card->dch.timer);
19122 + w6692_mode(&card->bc[0], ISDN_P_NONE);
19123 +diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
19124 +index 36817e0..b02bb98 100644
19125 +--- a/drivers/isdn/hisax/amd7930_fn.c
19126 ++++ b/drivers/isdn/hisax/amd7930_fn.c
19127 +@@ -685,8 +685,9 @@ DC_Close_Amd7930(struct IsdnCardState *cs) {
19128 +
19129 +
19130 + static void
19131 +-dbusy_timer_handler(struct IsdnCardState *cs)
19132 ++dbusy_timer_handler(unsigned long _cs)
19133 + {
19134 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19135 + u_long flags;
19136 + struct PStack *stptr;
19137 + WORD dtcr, der;
19138 +@@ -789,7 +790,7 @@ void Amd7930_init(struct IsdnCardState *cs)
19139 + void setup_Amd7930(struct IsdnCardState *cs)
19140 + {
19141 + INIT_WORK(&cs->tqueue, Amd7930_bh);
19142 +- cs->dbusytimer.function = (void *) dbusy_timer_handler;
19143 ++ cs->dbusytimer.function = dbusy_timer_handler;
19144 + cs->dbusytimer.data = (long) cs;
19145 + init_timer(&cs->dbusytimer);
19146 + }
19147 +diff --git a/drivers/isdn/hisax/arcofi.c b/drivers/isdn/hisax/arcofi.c
19148 +index 29ec2df..9c7123c 100644
19149 +--- a/drivers/isdn/hisax/arcofi.c
19150 ++++ b/drivers/isdn/hisax/arcofi.c
19151 +@@ -112,7 +112,8 @@ arcofi_fsm(struct IsdnCardState *cs, int event, void *data) {
19152 + }
19153 +
19154 + static void
19155 +-arcofi_timer(struct IsdnCardState *cs) {
19156 ++arcofi_timer(unsigned long _cs) {
19157 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19158 + arcofi_fsm(cs, ARCOFI_TIMEOUT, NULL);
19159 + }
19160 +
19161 +@@ -125,7 +126,7 @@ clear_arcofi(struct IsdnCardState *cs) {
19162 +
19163 + void
19164 + init_arcofi(struct IsdnCardState *cs) {
19165 +- cs->dc.isac.arcofitimer.function = (void *) arcofi_timer;
19166 ++ cs->dc.isac.arcofitimer.function = arcofi_timer;
19167 + cs->dc.isac.arcofitimer.data = (long) cs;
19168 + init_timer(&cs->dc.isac.arcofitimer);
19169 + init_waitqueue_head(&cs->dc.isac.arcofi_wait);
19170 +diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
19171 +index 4fc90de..fda68cd 100644
19172 +--- a/drivers/isdn/hisax/diva.c
19173 ++++ b/drivers/isdn/hisax/diva.c
19174 +@@ -796,8 +796,9 @@ reset_diva(struct IsdnCardState *cs)
19175 + #define DIVA_ASSIGN 1
19176 +
19177 + static void
19178 +-diva_led_handler(struct IsdnCardState *cs)
19179 ++diva_led_handler(unsigned long _cs)
19180 + {
19181 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19182 + int blink = 0;
19183 +
19184 + if ((cs->subtyp == DIVA_IPAC_ISA) ||
19185 +@@ -898,7 +899,7 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg)
19186 + (cs->subtyp != DIVA_IPAC_PCI) &&
19187 + (cs->subtyp != DIVA_IPACX_PCI)) {
19188 + spin_lock_irqsave(&cs->lock, flags);
19189 +- diva_led_handler(cs);
19190 ++ diva_led_handler((unsigned long)cs);
19191 + spin_unlock_irqrestore(&cs->lock, flags);
19192 + }
19193 + return (0);
19194 +@@ -976,7 +977,7 @@ static int setup_diva_common(struct IsdnCardState *cs)
19195 + printk(KERN_INFO "Diva: IPACX Design Id: %x\n",
19196 + MemReadISAC_IPACX(cs, IPACX_ID) & 0x3F);
19197 + } else { /* DIVA 2.0 */
19198 +- cs->hw.diva.tl.function = (void *) diva_led_handler;
19199 ++ cs->hw.diva.tl.function = diva_led_handler;
19200 + cs->hw.diva.tl.data = (long) cs;
19201 + init_timer(&cs->hw.diva.tl);
19202 + cs->readisac = &ReadISAC;
19203 +diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
19204 +index d8ef64d..9c50267 100644
19205 +--- a/drivers/isdn/hisax/elsa.c
19206 ++++ b/drivers/isdn/hisax/elsa.c
19207 +@@ -606,8 +606,9 @@ check_arcofi(struct IsdnCardState *cs)
19208 + #endif /* ARCOFI_USE */
19209 +
19210 + static void
19211 +-elsa_led_handler(struct IsdnCardState *cs)
19212 ++elsa_led_handler(unsigned long _cs)
19213 + {
19214 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19215 + int blink = 0;
19216 +
19217 + if (cs->subtyp == ELSA_PCMCIA || cs->subtyp == ELSA_PCMCIA_IPAC)
19218 +@@ -715,7 +716,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
19219 + init_modem(cs);
19220 + }
19221 + #endif
19222 +- elsa_led_handler(cs);
19223 ++ elsa_led_handler((unsigned long)cs);
19224 + return (ret);
19225 + case (MDL_REMOVE | REQUEST):
19226 + cs->hw.elsa.status &= 0;
19227 +@@ -767,7 +768,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
19228 + else
19229 + cs->hw.elsa.status &= ~ELSA_BAD_PWR;
19230 + }
19231 +- elsa_led_handler(cs);
19232 ++ elsa_led_handler((unsigned long)cs);
19233 + return (ret);
19234 + }
19235 +
19236 +@@ -1147,7 +1148,7 @@ static int setup_elsa_common(struct IsdnCard *card)
19237 + init_arcofi(cs);
19238 + #endif
19239 + setup_isac(cs);
19240 +- cs->hw.elsa.tl.function = (void *) elsa_led_handler;
19241 ++ cs->hw.elsa.tl.function = elsa_led_handler;
19242 + cs->hw.elsa.tl.data = (long) cs;
19243 + init_timer(&cs->hw.elsa.tl);
19244 + /* Teste Timer */
19245 +diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c
19246 +index c7a9471..5409bd3 100644
19247 +--- a/drivers/isdn/hisax/fsm.c
19248 ++++ b/drivers/isdn/hisax/fsm.c
19249 +@@ -85,8 +85,9 @@ FsmChangeState(struct FsmInst *fi, int newstate)
19250 + }
19251 +
19252 + static void
19253 +-FsmExpireTimer(struct FsmTimer *ft)
19254 ++FsmExpireTimer(unsigned long _ft)
19255 + {
19256 ++ struct FsmTimer *ft = (struct FsmTimer *)_ft;
19257 + #if FSM_TIMER_DEBUG
19258 + if (ft->fi->debug)
19259 + ft->fi->printdebug(ft->fi, "FsmExpireTimer %lx", (long) ft);
19260 +@@ -98,7 +99,7 @@ void
19261 + FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
19262 + {
19263 + ft->fi = fi;
19264 +- ft->tl.function = (void *) FsmExpireTimer;
19265 ++ ft->tl.function = FsmExpireTimer;
19266 + ft->tl.data = (long) ft;
19267 + #if FSM_TIMER_DEBUG
19268 + if (ft->fi->debug)
19269 +diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
19270 +index 9600cd7..86ca5a3 100644
19271 +--- a/drivers/isdn/hisax/hfc4s8s_l1.c
19272 ++++ b/drivers/isdn/hisax/hfc4s8s_l1.c
19273 +@@ -299,8 +299,9 @@ Read_hfc16_stable(hfc4s8s_hw *hw, int reg)
19274 + /* D-channel call from HiSax */
19275 + /*****************************/
19276 + static void
19277 +-dch_l2l1(struct hisax_d_if *iface, int pr, void *arg)
19278 ++dch_l2l1(struct hisax_if *_iface, int pr, void *arg)
19279 + {
19280 ++ struct hisax_d_if *iface = container_of(_iface, struct hisax_d_if, ifc);
19281 + struct hfc4s8s_l1 *l1 = iface->ifc.priv;
19282 + struct sk_buff *skb = (struct sk_buff *) arg;
19283 + u_long flags;
19284 +@@ -591,8 +592,9 @@ bch_l2l1(struct hisax_if *ifc, int pr, void *arg)
19285 + /* layer 1 timer function */
19286 + /**************************/
19287 + static void
19288 +-hfc_l1_timer(struct hfc4s8s_l1 *l1)
19289 ++hfc_l1_timer(unsigned long _l1)
19290 + {
19291 ++ struct hfc4s8s_l1 *l1 = (struct hfc4s8s_l1 *)_l1;
19292 + u_long flags;
19293 +
19294 + if (!l1->enabled)
19295 +@@ -1396,16 +1398,16 @@ setup_instance(hfc4s8s_hw *hw)
19296 + l1p = hw->l1 + i;
19297 + spin_lock_init(&l1p->lock);
19298 + l1p->hw = hw;
19299 +- l1p->l1_timer.function = (void *) hfc_l1_timer;
19300 ++ l1p->l1_timer.function = hfc_l1_timer;
19301 + l1p->l1_timer.data = (long) (l1p);
19302 + init_timer(&l1p->l1_timer);
19303 + l1p->st_num = i;
19304 + skb_queue_head_init(&l1p->d_tx_queue);
19305 + l1p->d_if.ifc.priv = hw->l1 + i;
19306 +- l1p->d_if.ifc.l2l1 = (void *) dch_l2l1;
19307 ++ l1p->d_if.ifc.l2l1 = dch_l2l1;
19308 +
19309 + spin_lock_init(&l1p->b_ch[0].lock);
19310 +- l1p->b_ch[0].b_if.ifc.l2l1 = (void *) bch_l2l1;
19311 ++ l1p->b_ch[0].b_if.ifc.l2l1 = bch_l2l1;
19312 + l1p->b_ch[0].b_if.ifc.priv = (void *) &l1p->b_ch[0];
19313 + l1p->b_ch[0].l1p = hw->l1 + i;
19314 + l1p->b_ch[0].bchan = 1;
19315 +@@ -1413,7 +1415,7 @@ setup_instance(hfc4s8s_hw *hw)
19316 + skb_queue_head_init(&l1p->b_ch[0].tx_queue);
19317 +
19318 + spin_lock_init(&l1p->b_ch[1].lock);
19319 +- l1p->b_ch[1].b_if.ifc.l2l1 = (void *) bch_l2l1;
19320 ++ l1p->b_ch[1].b_if.ifc.l2l1 = bch_l2l1;
19321 + l1p->b_ch[1].b_if.ifc.priv = (void *) &l1p->b_ch[1];
19322 + l1p->b_ch[1].l1p = hw->l1 + i;
19323 + l1p->b_ch[1].bchan = 2;
19324 +diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
19325 +index 90449e1..9a5394c 100644
19326 +--- a/drivers/isdn/hisax/hfc_pci.c
19327 ++++ b/drivers/isdn/hisax/hfc_pci.c
19328 +@@ -165,8 +165,9 @@ reset_hfcpci(struct IsdnCardState *cs)
19329 + /* Timer function called when kernel timer expires */
19330 + /***************************************************/
19331 + static void
19332 +-hfcpci_Timer(struct IsdnCardState *cs)
19333 ++hfcpci_Timer(unsigned long _cs)
19334 + {
19335 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19336 + cs->hw.hfcpci.timer.expires = jiffies + 75;
19337 + /* WD RESET */
19338 + /* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcpci.ctmt | 0x80);
19339 +@@ -1095,8 +1096,9 @@ hfcpci_interrupt(int intno, void *dev_id)
19340 + /* timer callback for D-chan busy resolution. Currently no function */
19341 + /********************************************************************/
19342 + static void
19343 +-hfcpci_dbusy_timer(struct IsdnCardState *cs)
19344 ++hfcpci_dbusy_timer(unsigned long _cs)
19345 + {
19346 ++ //struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19347 + }
19348 +
19349 + /*************************************/
19350 +@@ -1582,7 +1584,7 @@ inithfcpci(struct IsdnCardState *cs)
19351 + cs->bcs[1].BC_SetStack = setstack_2b;
19352 + cs->bcs[0].BC_Close = close_hfcpci;
19353 + cs->bcs[1].BC_Close = close_hfcpci;
19354 +- cs->dbusytimer.function = (void *) hfcpci_dbusy_timer;
19355 ++ cs->dbusytimer.function = hfcpci_dbusy_timer;
19356 + cs->dbusytimer.data = (long) cs;
19357 + init_timer(&cs->dbusytimer);
19358 + mode_hfcpci(cs->bcs, 0, 0);
19359 +@@ -1746,7 +1748,7 @@ setup_hfcpci(struct IsdnCard *card)
19360 + cs->BC_Write_Reg = NULL;
19361 + cs->irq_func = &hfcpci_interrupt;
19362 + cs->irq_flags |= IRQF_SHARED;
19363 +- cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer;
19364 ++ cs->hw.hfcpci.timer.function = hfcpci_Timer;
19365 + cs->hw.hfcpci.timer.data = (long) cs;
19366 + init_timer(&cs->hw.hfcpci.timer);
19367 + cs->cardmsg = &hfcpci_card_msg;
19368 +diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
19369 +index 13b2151..d3e0732 100644
19370 +--- a/drivers/isdn/hisax/hfc_sx.c
19371 ++++ b/drivers/isdn/hisax/hfc_sx.c
19372 +@@ -418,8 +418,9 @@ reset_hfcsx(struct IsdnCardState *cs)
19373 + /* Timer function called when kernel timer expires */
19374 + /***************************************************/
19375 + static void
19376 +-hfcsx_Timer(struct IsdnCardState *cs)
19377 ++hfcsx_Timer(unsigned long _cs)
19378 + {
19379 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19380 + cs->hw.hfcsx.timer.expires = jiffies + 75;
19381 + /* WD RESET */
19382 + /* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcsx.ctmt | 0x80);
19383 +@@ -860,8 +861,9 @@ hfcsx_interrupt(int intno, void *dev_id)
19384 + /* timer callback for D-chan busy resolution. Currently no function */
19385 + /********************************************************************/
19386 + static void
19387 +-hfcsx_dbusy_timer(struct IsdnCardState *cs)
19388 ++hfcsx_dbusy_timer(unsigned long _cs)
19389 + {
19390 ++ //struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19391 + }
19392 +
19393 + /*************************************/
19394 +@@ -1495,7 +1497,7 @@ int setup_hfcsx(struct IsdnCard *card)
19395 + } else
19396 + return (0); /* no valid card type */
19397 +
19398 +- cs->dbusytimer.function = (void *) hfcsx_dbusy_timer;
19399 ++ cs->dbusytimer.function = hfcsx_dbusy_timer;
19400 + cs->dbusytimer.data = (long) cs;
19401 + init_timer(&cs->dbusytimer);
19402 + INIT_WORK(&cs->tqueue, hfcsx_bh);
19403 +@@ -1507,7 +1509,7 @@ int setup_hfcsx(struct IsdnCard *card)
19404 + cs->BC_Write_Reg = NULL;
19405 + cs->irq_func = &hfcsx_interrupt;
19406 +
19407 +- cs->hw.hfcsx.timer.function = (void *) hfcsx_Timer;
19408 ++ cs->hw.hfcsx.timer.function = hfcsx_Timer;
19409 + cs->hw.hfcsx.timer.data = (long) cs;
19410 + cs->hw.hfcsx.b_fifo_size = 0; /* fifo size still unknown */
19411 + cs->hw.hfcsx.cirm = ccd_sp_irqtab[cs->irq & 0xF]; /* RAM not evaluated */
19412 +diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
19413 +index 678bd52..1c4f12a 100644
19414 +--- a/drivers/isdn/hisax/hfc_usb.c
19415 ++++ b/drivers/isdn/hisax/hfc_usb.c
19416 +@@ -343,8 +343,10 @@ handle_led(hfcusb_data *hfc, int event)
19417 +
19418 + /* ISDN l1 timer T3 expires */
19419 + static void
19420 +-l1_timer_expire_t3(hfcusb_data *hfc)
19421 ++l1_timer_expire_t3(unsigned long _hfc)
19422 + {
19423 ++ hfcusb_data *hfc = (hfcusb_data *)_hfc;
19424 ++
19425 + hfc->d_if.ifc.l1l2(&hfc->d_if.ifc, PH_DEACTIVATE | INDICATION,
19426 + NULL);
19427 +
19428 +@@ -360,8 +362,10 @@ l1_timer_expire_t3(hfcusb_data *hfc)
19429 +
19430 + /* ISDN l1 timer T4 expires */
19431 + static void
19432 +-l1_timer_expire_t4(hfcusb_data *hfc)
19433 ++l1_timer_expire_t4(unsigned long _hfc)
19434 + {
19435 ++ hfcusb_data *hfc = (hfcusb_data *)_hfc;
19436 ++
19437 + hfc->d_if.ifc.l1l2(&hfc->d_if.ifc, PH_DEACTIVATE | INDICATION,
19438 + NULL);
19439 +
19440 +@@ -1167,12 +1171,12 @@ hfc_usb_init(hfcusb_data *hfc)
19441 + /* init the t3 timer */
19442 + init_timer(&hfc->t3_timer);
19443 + hfc->t3_timer.data = (long) hfc;
19444 +- hfc->t3_timer.function = (void *) l1_timer_expire_t3;
19445 ++ hfc->t3_timer.function = l1_timer_expire_t3;
19446 +
19447 + /* init the t4 timer */
19448 + init_timer(&hfc->t4_timer);
19449 + hfc->t4_timer.data = (long) hfc;
19450 +- hfc->t4_timer.function = (void *) l1_timer_expire_t4;
19451 ++ hfc->t4_timer.function = l1_timer_expire_t4;
19452 +
19453 + /* init the background machinery for control requests */
19454 + hfc->ctrl_read.bRequestType = 0xc0;
19455 +diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c
19456 +index 96d1df0..77a05ee 100644
19457 +--- a/drivers/isdn/hisax/icc.c
19458 ++++ b/drivers/isdn/hisax/icc.c
19459 +@@ -580,8 +580,9 @@ DC_Close_icc(struct IsdnCardState *cs) {
19460 + }
19461 +
19462 + static void
19463 +-dbusy_timer_handler(struct IsdnCardState *cs)
19464 ++dbusy_timer_handler(unsigned long _cs)
19465 + {
19466 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19467 + struct PStack *stptr;
19468 + int rbch, star;
19469 +
19470 +@@ -676,7 +677,7 @@ clear_pending_icc_ints(struct IsdnCardState *cs)
19471 + void setup_icc(struct IsdnCardState *cs)
19472 + {
19473 + INIT_WORK(&cs->tqueue, icc_bh);
19474 +- cs->dbusytimer.function = (void *) dbusy_timer_handler;
19475 ++ cs->dbusytimer.function = dbusy_timer_handler;
19476 + cs->dbusytimer.data = (long) cs;
19477 + init_timer(&cs->dbusytimer);
19478 + }
19479 +diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
19480 +index 9cc26b4..d7fa044 100644
19481 +--- a/drivers/isdn/hisax/ipacx.c
19482 ++++ b/drivers/isdn/hisax/ipacx.c
19483 +@@ -35,7 +35,7 @@
19484 + static void ph_command(struct IsdnCardState *cs, unsigned int command);
19485 + static inline void cic_int(struct IsdnCardState *cs);
19486 + static void dch_l2l1(struct PStack *st, int pr, void *arg);
19487 +-static void dbusy_timer_handler(struct IsdnCardState *cs);
19488 ++static void dbusy_timer_handler(unsigned long _cs);
19489 + static void dch_empty_fifo(struct IsdnCardState *cs, int count);
19490 + static void dch_fill_fifo(struct IsdnCardState *cs);
19491 + static inline void dch_int(struct IsdnCardState *cs);
19492 +@@ -198,8 +198,9 @@ dch_l2l1(struct PStack *st, int pr, void *arg)
19493 + //----------------------------------------------------------
19494 + //----------------------------------------------------------
19495 + static void
19496 +-dbusy_timer_handler(struct IsdnCardState *cs)
19497 ++dbusy_timer_handler(unsigned long _cs)
19498 + {
19499 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19500 + struct PStack *st;
19501 + int rbchd, stard;
19502 +
19503 +@@ -424,7 +425,7 @@ dch_init(struct IsdnCardState *cs)
19504 +
19505 + cs->setstack_d = dch_setstack;
19506 +
19507 +- cs->dbusytimer.function = (void *) dbusy_timer_handler;
19508 ++ cs->dbusytimer.function = dbusy_timer_handler;
19509 + cs->dbusytimer.data = (long) cs;
19510 + init_timer(&cs->dbusytimer);
19511 +
19512 +diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
19513 +index 7fdf78f..eb02640 100644
19514 +--- a/drivers/isdn/hisax/isac.c
19515 ++++ b/drivers/isdn/hisax/isac.c
19516 +@@ -579,8 +579,9 @@ DC_Close_isac(struct IsdnCardState *cs)
19517 + }
19518 +
19519 + static void
19520 +-dbusy_timer_handler(struct IsdnCardState *cs)
19521 ++dbusy_timer_handler(unsigned long _cs)
19522 + {
19523 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19524 + struct PStack *stptr;
19525 + int rbch, star;
19526 +
19527 +@@ -672,7 +673,7 @@ void clear_pending_isac_ints(struct IsdnCardState *cs)
19528 + void setup_isac(struct IsdnCardState *cs)
19529 + {
19530 + INIT_WORK(&cs->tqueue, isac_bh);
19531 +- cs->dbusytimer.function = (void *) dbusy_timer_handler;
19532 ++ cs->dbusytimer.function = dbusy_timer_handler;
19533 + cs->dbusytimer.data = (long) cs;
19534 + init_timer(&cs->dbusytimer);
19535 + }
19536 +diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
19537 +index f4956c7..122d249 100644
19538 +--- a/drivers/isdn/hisax/isar.c
19539 ++++ b/drivers/isdn/hisax/isar.c
19540 +@@ -1267,7 +1267,8 @@ isar_int_main(struct IsdnCardState *cs)
19541 + }
19542 +
19543 + static void
19544 +-ftimer_handler(struct BCState *bcs) {
19545 ++ftimer_handler(unsigned long _bcs) {
19546 ++ struct BCState *bcs = (struct BCState *)_bcs;
19547 + if (bcs->cs->debug)
19548 + debugl1(bcs->cs, "ftimer flags %04lx",
19549 + bcs->Flag);
19550 +@@ -1902,7 +1903,7 @@ void initisar(struct IsdnCardState *cs)
19551 + cs->bcs[1].BC_SetStack = setstack_isar;
19552 + cs->bcs[0].BC_Close = close_isarstate;
19553 + cs->bcs[1].BC_Close = close_isarstate;
19554 +- cs->bcs[0].hw.isar.ftimer.function = (void *) ftimer_handler;
19555 ++ cs->bcs[0].hw.isar.ftimer.function = ftimer_handler;
19556 + cs->bcs[0].hw.isar.ftimer.data = (long) &cs->bcs[0];
19557 + init_timer(&cs->bcs[0].hw.isar.ftimer);
19558 + cs->bcs[1].hw.isar.ftimer.function = (void *) ftimer_handler;
19559 +diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
19560 +index c754706..8b1ffd5 100644
19561 +--- a/drivers/isdn/hisax/isdnl3.c
19562 ++++ b/drivers/isdn/hisax/isdnl3.c
19563 +@@ -160,8 +160,9 @@ newl3state(struct l3_process *pc, int state)
19564 + }
19565 +
19566 + static void
19567 +-L3ExpireTimer(struct L3Timer *t)
19568 ++L3ExpireTimer(unsigned long _t)
19569 + {
19570 ++ struct L3Timer *t = (struct L3Timer *)_t;
19571 + t->pc->st->lli.l4l3(t->pc->st, t->event, t->pc);
19572 + }
19573 +
19574 +@@ -169,7 +170,7 @@ void
19575 + L3InitTimer(struct l3_process *pc, struct L3Timer *t)
19576 + {
19577 + t->pc = pc;
19578 +- t->tl.function = (void *) L3ExpireTimer;
19579 ++ t->tl.function = L3ExpireTimer;
19580 + t->tl.data = (long) t;
19581 + init_timer(&t->tl);
19582 + }
19583 +diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
19584 +index a858955..908285b 100644
19585 +--- a/drivers/isdn/hisax/w6692.c
19586 ++++ b/drivers/isdn/hisax/w6692.c
19587 +@@ -681,8 +681,9 @@ DC_Close_W6692(struct IsdnCardState *cs)
19588 + }
19589 +
19590 + static void
19591 +-dbusy_timer_handler(struct IsdnCardState *cs)
19592 ++dbusy_timer_handler(unsigned long _cs)
19593 + {
19594 ++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
19595 + struct PStack *stptr;
19596 + int rbch, star;
19597 + u_long flags;
19598 +@@ -901,7 +902,7 @@ static void initW6692(struct IsdnCardState *cs, int part)
19599 + if (part & 1) {
19600 + cs->setstack_d = setstack_W6692;
19601 + cs->DC_Close = DC_Close_W6692;
19602 +- cs->dbusytimer.function = (void *) dbusy_timer_handler;
19603 ++ cs->dbusytimer.function = dbusy_timer_handler;
19604 + cs->dbusytimer.data = (long) cs;
19605 + init_timer(&cs->dbusytimer);
19606 + resetW6692(cs);
19607 diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
19608 index 9b856e1..fa03c92 100644
19609 --- a/drivers/isdn/i4l/isdn_common.c
19610 @@ -47989,50 +52026,173 @@ index 358a574..b4987ea 100644
19611 return -EFAULT;
19612 } else
19613 memcpy(msg, buf, count);
19614 +diff --git a/drivers/isdn/mISDN/dsp.h b/drivers/isdn/mISDN/dsp.h
19615 +index fc1733a..27bf261 100644
19616 +--- a/drivers/isdn/mISDN/dsp.h
19617 ++++ b/drivers/isdn/mISDN/dsp.h
19618 +@@ -247,7 +247,7 @@ extern void dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp);
19619 + extern int dsp_cmx_conf(struct dsp *dsp, u32 conf_id);
19620 + extern void dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb);
19621 + extern void dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb);
19622 +-extern void dsp_cmx_send(void *arg);
19623 ++extern void dsp_cmx_send(unsigned long arg);
19624 + extern void dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb);
19625 + extern int dsp_cmx_del_conf_member(struct dsp *dsp);
19626 + extern int dsp_cmx_del_conf(struct dsp_conf *conf);
19627 +@@ -259,7 +259,7 @@ extern u8 *dsp_dtmf_goertzel_decode(struct dsp *dsp, u8 *data, int len,
19628 +
19629 + extern int dsp_tone(struct dsp *dsp, int tone);
19630 + extern void dsp_tone_copy(struct dsp *dsp, u8 *data, int len);
19631 +-extern void dsp_tone_timeout(void *arg);
19632 ++extern void dsp_tone_timeout(unsigned long arg);
19633 +
19634 + extern void dsp_bf_encrypt(struct dsp *dsp, u8 *data, int len);
19635 + extern void dsp_bf_decrypt(struct dsp *dsp, u8 *data, int len);
19636 diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
19637 -index 8e3aa00..65200ac 100644
19638 +index 8e3aa00..723faf8 100644
19639 --- a/drivers/isdn/mISDN/dsp_cmx.c
19640 +++ b/drivers/isdn/mISDN/dsp_cmx.c
19641 -@@ -1625,7 +1625,7 @@ unsigned long dsp_spl_jiffies; /* calculate the next time to fire */
19642 +@@ -1625,8 +1625,8 @@ unsigned long dsp_spl_jiffies; /* calculate the next time to fire */
19643 static u16 dsp_count; /* last sample count */
19644 static int dsp_count_valid; /* if we have last sample count */
19645
19646 -void
19647 +-dsp_cmx_send(void *arg)
19648 +void __intentional_overflow(-1)
19649 - dsp_cmx_send(void *arg)
19650 ++dsp_cmx_send(unsigned long arg)
19651 {
19652 struct dsp_conf *conf;
19653 + struct dsp_conf_member *member;
19654 +diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
19655 +index 0222b1a..67fb76a 100644
19656 +--- a/drivers/isdn/mISDN/dsp_core.c
19657 ++++ b/drivers/isdn/mISDN/dsp_core.c
19658 +@@ -1092,7 +1092,7 @@ dspcreate(struct channel_req *crq)
19659 + ndsp->pcm_bank_tx = -1;
19660 + ndsp->hfc_conf = -1; /* current conference number */
19661 + /* set tone timer */
19662 +- ndsp->tone.tl.function = (void *)dsp_tone_timeout;
19663 ++ ndsp->tone.tl.function = dsp_tone_timeout;
19664 + ndsp->tone.tl.data = (long) ndsp;
19665 + init_timer(&ndsp->tone.tl);
19666 +
19667 +@@ -1204,7 +1204,7 @@ static int __init dsp_init(void)
19668 + }
19669 +
19670 + /* set sample timer */
19671 +- dsp_spl_tl.function = (void *)dsp_cmx_send;
19672 ++ dsp_spl_tl.function = dsp_cmx_send;
19673 + dsp_spl_tl.data = 0;
19674 + init_timer(&dsp_spl_tl);
19675 + dsp_spl_tl.expires = jiffies + dsp_tics;
19676 +diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c
19677 +index 057e0d6..ed229b5 100644
19678 +--- a/drivers/isdn/mISDN/dsp_tones.c
19679 ++++ b/drivers/isdn/mISDN/dsp_tones.c
19680 +@@ -457,9 +457,9 @@ dsp_tone_hw_message(struct dsp *dsp, u8 *sample, int len)
19681 + * timer expires *
19682 + *****************/
19683 + void
19684 +-dsp_tone_timeout(void *arg)
19685 ++dsp_tone_timeout(unsigned long arg)
19686 + {
19687 +- struct dsp *dsp = arg;
19688 ++ struct dsp *dsp = (struct dsp *)arg;
19689 + struct dsp_tone *tone = &dsp->tone;
19690 + struct pattern *pat = (struct pattern *)tone->pattern;
19691 + int index = tone->index;
19692 +diff --git a/drivers/isdn/mISDN/fsm.c b/drivers/isdn/mISDN/fsm.c
19693 +index 26477d4..4fa3876 100644
19694 +--- a/drivers/isdn/mISDN/fsm.c
19695 ++++ b/drivers/isdn/mISDN/fsm.c
19696 +@@ -97,8 +97,9 @@ mISDN_FsmChangeState(struct FsmInst *fi, int newstate)
19697 + EXPORT_SYMBOL(mISDN_FsmChangeState);
19698 +
19699 + static void
19700 +-FsmExpireTimer(struct FsmTimer *ft)
19701 ++FsmExpireTimer(unsigned long _ft)
19702 + {
19703 ++ struct FsmTimer *ft = (struct FsmTimer *)_ft;
19704 + #if FSM_TIMER_DEBUG
19705 + if (ft->fi->debug)
19706 + ft->fi->printdebug(ft->fi, "FsmExpireTimer %lx", (long) ft);
19707 +@@ -110,7 +111,7 @@ void
19708 + mISDN_FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
19709 + {
19710 + ft->fi = fi;
19711 +- ft->tl.function = (void *) FsmExpireTimer;
19712 ++ ft->tl.function = FsmExpireTimer;
19713 + ft->tl.data = (long) ft;
19714 + #if FSM_TIMER_DEBUG
19715 + if (ft->fi->debug)
19716 +diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
19717 +index 67c2187..fc71e33 100644
19718 +--- a/drivers/isdn/mISDN/l1oip_core.c
19719 ++++ b/drivers/isdn/mISDN/l1oip_core.c
19720 +@@ -840,7 +840,7 @@ l1oip_send_bh(struct work_struct *work)
19721 + * timer stuff
19722 + */
19723 + static void
19724 +-l1oip_keepalive(void *data)
19725 ++l1oip_keepalive(unsigned long data)
19726 + {
19727 + struct l1oip *hc = (struct l1oip *)data;
19728 +
19729 +@@ -848,7 +848,7 @@ l1oip_keepalive(void *data)
19730 + }
19731 +
19732 + static void
19733 +-l1oip_timeout(void *data)
19734 ++l1oip_timeout(unsigned long data)
19735 + {
19736 + struct l1oip *hc = (struct l1oip *)data;
19737 + struct dchannel *dch = hc->chan[hc->d_idx].dch;
19738 +@@ -1435,13 +1435,13 @@ init_card(struct l1oip *hc, int pri, int bundle)
19739 + if (ret)
19740 + return ret;
19741 +
19742 +- hc->keep_tl.function = (void *)l1oip_keepalive;
19743 ++ hc->keep_tl.function = l1oip_keepalive;
19744 + hc->keep_tl.data = (ulong)hc;
19745 + init_timer(&hc->keep_tl);
19746 + hc->keep_tl.expires = jiffies + 2 * HZ; /* two seconds first time */
19747 + add_timer(&hc->keep_tl);
19748 +
19749 +- hc->timeout_tl.function = (void *)l1oip_timeout;
19750 ++ hc->timeout_tl.function = l1oip_timeout;
19751 + hc->timeout_tl.data = (ulong)hc;
19752 + init_timer(&hc->timeout_tl);
19753 + hc->timeout_on = 0; /* state that we have timer off */
19754 diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
19755 -index 312ffd3..d060510 100644
19756 +index 9e385b3..7077882 100644
19757 --- a/drivers/lguest/core.c
19758 +++ b/drivers/lguest/core.c
19759 -@@ -96,9 +96,17 @@ static __init int map_switcher(void)
19760 - * The end address needs +1 because __get_vm_area allocates an
19761 - * extra guard page, so we need space for that.
19762 +@@ -87,7 +87,7 @@ static __init int map_switcher(void)
19763 + * Copy in the compiled-in Switcher code (from x86/switcher_32.S).
19764 + * It goes in the first page, which we map in momentarily.
19765 + */
19766 +- memcpy(kmap(lg_switcher_pages[0]), start_switcher_text,
19767 ++ memcpy(kmap(lg_switcher_pages[0]), (void *)ktla_ktva((unsigned long)start_switcher_text),
19768 + end_switcher_text - start_switcher_text);
19769 + kunmap(lg_switcher_pages[0]);
19770 +
19771 +@@ -106,9 +106,16 @@ static __init int map_switcher(void)
19772 + * We want the switcher text to be read-only and executable, and
19773 + * the stacks to be read-write and non-executable.
19774 */
19775 +
19776 +#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
19777 -+ switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
19778 -+ VM_ALLOC | VM_KERNEXEC, switcher_addr, switcher_addr
19779 -+ + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
19780 ++ switcher_text_vma = __get_vm_area(PAGE_SIZE, VM_ALLOC|VM_NO_GUARD|VM_KERNEXEC,
19781 ++ switcher_addr,
19782 ++ switcher_addr + PAGE_SIZE);
19783 +#else
19784 - switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
19785 - VM_ALLOC, switcher_addr, switcher_addr
19786 - + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
19787 + switcher_text_vma = __get_vm_area(PAGE_SIZE, VM_ALLOC|VM_NO_GUARD,
19788 + switcher_addr,
19789 + switcher_addr + PAGE_SIZE);
19790 +#endif
19791 -+
19792 - if (!switcher_vma) {
19793 - err = -ENOMEM;
19794 - printk("lguest: could not map switcher pages high\n");
19795 -@@ -121,7 +129,7 @@ static __init int map_switcher(void)
19796 - * Now the Switcher is mapped at the right address, we can't fail!
19797 - * Copy in the compiled-in Switcher code (from x86/switcher_32.S).
19798 - */
19799 -- memcpy(switcher_vma->addr, start_switcher_text,
19800 -+ memcpy(switcher_vma->addr, (void *)ktla_ktva((unsigned long)start_switcher_text),
19801 - end_switcher_text - start_switcher_text);
19802
19803 - printk(KERN_INFO "lguest: mapped switcher at %p\n",
19804 + if (!switcher_text_vma) {
19805 + err = -ENOMEM;
19806 diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
19807 index e3abebc9..6a35328 100644
19808 --- a/drivers/lguest/page_tables.c
19809 @@ -48154,10 +52314,10 @@ index 40634b0..4f5855e 100644
19810 // Every interrupt can come to us here
19811 // But we must truly tell each apart.
19812 diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
19813 -index 134e4fa..243bffe 100644
19814 +index 307db1e..c35f298 100644
19815 --- a/drivers/lightnvm/rrpc.c
19816 +++ b/drivers/lightnvm/rrpc.c
19817 -@@ -218,7 +218,7 @@ static void rrpc_put_blks(struct rrpc *rrpc)
19818 +@@ -231,7 +231,7 @@ static void rrpc_put_blks(struct rrpc *rrpc)
19819
19820 static struct rrpc_lun *get_next_lun(struct rrpc *rrpc)
19821 {
19822 @@ -48166,7 +52326,7 @@ index 134e4fa..243bffe 100644
19823
19824 return &rrpc->luns[next % rrpc->nr_luns];
19825 }
19826 -@@ -1286,7 +1286,7 @@ static void *rrpc_init(struct nvm_dev *dev, struct gendisk *tdisk,
19827 +@@ -1340,7 +1340,7 @@ static void *rrpc_init(struct nvm_dev *dev, struct gendisk *tdisk,
19828 rrpc->nr_luns = lun_end - lun_begin + 1;
19829
19830 /* simple round-robin strategy */
19831 @@ -48176,10 +52336,10 @@ index 134e4fa..243bffe 100644
19832 ret = rrpc_luns_init(rrpc, lun_begin, lun_end);
19833 if (ret) {
19834 diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
19835 -index a9696a0..75d0008 100644
19836 +index f7b3733..0bed14d 100644
19837 --- a/drivers/lightnvm/rrpc.h
19838 +++ b/drivers/lightnvm/rrpc.h
19839 -@@ -99,7 +99,7 @@ struct rrpc {
19840 +@@ -110,7 +110,7 @@ struct rrpc {
19841 /* Write strategy variables. Move these into each for structure for each
19842 * strategy
19843 */
19844 @@ -48485,10 +52645,10 @@ index b3ff57d..b2e30fb 100644
19845
19846 return size;
19847 diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
19848 -index 4f22e91..5b13fde 100644
19849 +index d80cce4..d7f15c4 100644
19850 --- a/drivers/md/bitmap.c
19851 +++ b/drivers/md/bitmap.c
19852 -@@ -1931,7 +1931,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
19853 +@@ -1927,7 +1927,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
19854 chunk_kb ? "KB" : "B");
19855 if (bitmap->storage.file) {
19856 seq_printf(seq, ", file: ");
19857 @@ -48498,10 +52658,19 @@ index 4f22e91..5b13fde 100644
19858
19859 seq_printf(seq, "\n");
19860 diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
19861 -index 515f83e..56f11f0 100644
19862 +index bb9b92e..001e258 100644
19863 --- a/drivers/md/dm-cache-target.c
19864 +++ b/drivers/md/dm-cache-target.c
19865 -@@ -185,16 +185,16 @@ struct cache_features {
19866 +@@ -118,7 +118,7 @@ static void iot_io_end(struct io_tracker *iot, sector_t len)
19867 + */
19868 + struct dm_hook_info {
19869 + bio_end_io_t *bi_end_io;
19870 +-};
19871 ++} __no_const;
19872 +
19873 + static void dm_hook_bio(struct dm_hook_info *h, struct bio *bio,
19874 + bio_end_io_t *bi_end_io, void *bi_private)
19875 +@@ -182,16 +182,16 @@ struct cache_features {
19876 };
19877
19878 struct cache_stats {
19879 @@ -48528,7 +52697,7 @@ index 515f83e..56f11f0 100644
19880 };
19881
19882 /*
19883 -@@ -273,8 +273,8 @@ struct cache {
19884 +@@ -270,8 +270,8 @@ struct cache {
19885 atomic_t nr_io_migrations;
19886
19887 wait_queue_head_t quiescing_wait;
19888 @@ -48539,7 +52708,31 @@ index 515f83e..56f11f0 100644
19889
19890 /*
19891 * cache_size entries, dirty if set
19892 -@@ -640,7 +640,7 @@ static void set_discard(struct cache *cache, dm_dblock_t b)
19893 +@@ -395,8 +395,10 @@ static struct dm_bio_prison_cell *alloc_prison_cell(struct cache *cache)
19894 + return dm_bio_prison_alloc_cell(cache->prison, GFP_NOWAIT);
19895 + }
19896 +
19897 +-static void free_prison_cell(struct cache *cache, struct dm_bio_prison_cell *cell)
19898 ++static void free_prison_cell(void *_cache, struct dm_bio_prison_cell *cell)
19899 + {
19900 ++ struct cache *cache = _cache;
19901 ++
19902 + dm_bio_prison_free_cell(cache->prison, cell);
19903 + }
19904 +
19905 +@@ -493,8 +495,10 @@ static struct dm_bio_prison_cell *prealloc_get_cell(struct prealloc *p)
19906 + * You can't have more than two cells in a prealloc struct. BUG() will be
19907 + * called if you try and overfill.
19908 + */
19909 +-static void prealloc_put_cell(struct prealloc *p, struct dm_bio_prison_cell *cell)
19910 ++static void prealloc_put_cell(void *_p, struct dm_bio_prison_cell *cell)
19911 + {
19912 ++ struct prealloc *p = _p;
19913 ++
19914 + if (!p->cell2)
19915 + p->cell2 = cell;
19916 +
19917 +@@ -637,7 +641,7 @@ static void set_discard(struct cache *cache, dm_dblock_t b)
19918 unsigned long flags;
19919
19920 BUG_ON(from_dblock(b) >= from_dblock(cache->discard_nr_blocks));
19921 @@ -48548,7 +52741,7 @@ index 515f83e..56f11f0 100644
19922
19923 spin_lock_irqsave(&cache->lock, flags);
19924 set_bit(from_dblock(b), cache->discard_bitset);
19925 -@@ -688,10 +688,10 @@ static void load_stats(struct cache *cache)
19926 +@@ -685,10 +689,10 @@ static void load_stats(struct cache *cache)
19927 struct dm_cache_statistics stats;
19928
19929 dm_cache_metadata_get_stats(cache->cmd, &stats);
19930 @@ -48563,7 +52756,7 @@ index 515f83e..56f11f0 100644
19931 }
19932
19933 static void save_stats(struct cache *cache)
19934 -@@ -701,10 +701,10 @@ static void save_stats(struct cache *cache)
19935 +@@ -698,10 +702,10 @@ static void save_stats(struct cache *cache)
19936 if (get_cache_mode(cache) >= CM_READ_ONLY)
19937 return;
19938
19939 @@ -48578,7 +52771,7 @@ index 515f83e..56f11f0 100644
19940
19941 dm_cache_metadata_set_stats(cache->cmd, &stats);
19942 }
19943 -@@ -1327,7 +1327,7 @@ static bool bio_writes_complete_block(struct cache *cache, struct bio *bio)
19944 +@@ -1324,7 +1328,7 @@ static bool bio_writes_complete_block(struct cache *cache, struct bio *bio)
19945
19946 static void avoid_copy(struct dm_cache_migration *mg)
19947 {
19948 @@ -48587,7 +52780,16 @@ index 515f83e..56f11f0 100644
19949 migration_success_pre_commit(mg);
19950 }
19951
19952 -@@ -1654,13 +1654,13 @@ static bool spare_migration_bandwidth(struct cache *cache)
19953 +@@ -1634,7 +1638,7 @@ static void process_discard_bio(struct cache *cache, struct prealloc *structs,
19954 +
19955 + cell_prealloc = prealloc_get_cell(structs);
19956 + r = bio_detain_range(cache, dblock_to_oblock(cache, b), dblock_to_oblock(cache, e), bio, cell_prealloc,
19957 +- (cell_free_fn) prealloc_put_cell,
19958 ++ prealloc_put_cell,
19959 + structs, &new_ocell);
19960 + if (r > 0)
19961 + return;
19962 +@@ -1651,13 +1655,13 @@ static bool spare_migration_bandwidth(struct cache *cache)
19963
19964 static void inc_hit_counter(struct cache *cache, struct bio *bio)
19965 {
19966 @@ -48603,7 +52805,16 @@ index 515f83e..56f11f0 100644
19967 &cache->stats.read_miss : &cache->stats.write_miss);
19968 }
19969
19970 -@@ -1833,7 +1833,7 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
19971 +@@ -1788,7 +1792,7 @@ static int cell_locker(struct policy_locker *locker, dm_oblock_t b)
19972 + struct dm_bio_prison_cell *cell_prealloc = prealloc_get_cell(l->structs);
19973 +
19974 + return bio_detain(l->cache, b, NULL, cell_prealloc,
19975 +- (cell_free_fn) prealloc_put_cell,
19976 ++ prealloc_put_cell,
19977 + l->structs, &l->cell);
19978 + }
19979 +
19980 +@@ -1830,7 +1834,7 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
19981 */
19982
19983 if (bio_data_dir(bio) == WRITE) {
19984 @@ -48612,7 +52823,7 @@ index 515f83e..56f11f0 100644
19985 invalidate(cache, structs, block, lookup_result.cblock, new_ocell);
19986 release_cell = false;
19987
19988 -@@ -1866,14 +1866,14 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
19989 +@@ -1863,14 +1867,14 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
19990 break;
19991
19992 case POLICY_NEW:
19993 @@ -48630,7 +52841,16 @@ index 515f83e..56f11f0 100644
19994 demote_then_promote(cache, structs, lookup_result.old_oblock,
19995 block, lookup_result.cblock,
19996 ool.cell, new_ocell);
19997 -@@ -1927,7 +1927,7 @@ static int commit(struct cache *cache, bool clean_shutdown)
19998 +@@ -1900,7 +1904,7 @@ static void process_bio(struct cache *cache, struct prealloc *structs,
19999 + */
20000 + cell_prealloc = prealloc_get_cell(structs);
20001 + r = bio_detain(cache, block, bio, cell_prealloc,
20002 +- (cell_free_fn) prealloc_put_cell,
20003 ++ prealloc_put_cell,
20004 + structs, &new_ocell);
20005 + if (r > 0)
20006 + return;
20007 +@@ -1924,7 +1928,7 @@ static int commit(struct cache *cache, bool clean_shutdown)
20008 if (get_cache_mode(cache) >= CM_READ_ONLY)
20009 return -EINVAL;
20010
20011 @@ -48639,7 +52859,7 @@ index 515f83e..56f11f0 100644
20012 r = dm_cache_commit(cache->cmd, clean_shutdown);
20013 if (r)
20014 metadata_operation_failed(cache, "dm_cache_commit", r);
20015 -@@ -2158,32 +2158,32 @@ static void process_invalidation_requests(struct cache *cache)
20016 +@@ -2155,32 +2159,32 @@ static void process_invalidation_requests(struct cache *cache)
20017 *--------------------------------------------------------------*/
20018 static bool is_quiescing(struct cache *cache)
20019 {
20020 @@ -48678,7 +52898,7 @@ index 515f83e..56f11f0 100644
20021 }
20022
20023 static void wait_for_migrations(struct cache *cache)
20024 -@@ -2870,8 +2870,8 @@ static int cache_create(struct cache_args *ca, struct cache **result)
20025 +@@ -2867,8 +2871,8 @@ static int cache_create(struct cache_args *ca, struct cache **result)
20026 init_waitqueue_head(&cache->migration_wait);
20027
20028 init_waitqueue_head(&cache->quiescing_wait);
20029 @@ -48689,7 +52909,7 @@ index 515f83e..56f11f0 100644
20030
20031 r = -ENOMEM;
20032 atomic_set(&cache->nr_dirty, 0);
20033 -@@ -2938,12 +2938,12 @@ static int cache_create(struct cache_args *ca, struct cache **result)
20034 +@@ -2935,12 +2939,12 @@ static int cache_create(struct cache_args *ca, struct cache **result)
20035
20036 load_stats(cache);
20037
20038 @@ -48708,7 +52928,16 @@ index 515f83e..56f11f0 100644
20039
20040 spin_lock_init(&cache->invalidation_lock);
20041 INIT_LIST_HEAD(&cache->invalidation_requests);
20042 -@@ -3554,12 +3554,12 @@ static void cache_status(struct dm_target *ti, status_type_t type,
20043 +@@ -3057,7 +3061,7 @@ static int cache_map(struct dm_target *ti, struct bio *bio)
20044 + }
20045 +
20046 + r = bio_detain(cache, block, bio, cell,
20047 +- (cell_free_fn) free_prison_cell,
20048 ++ free_prison_cell,
20049 + cache, &cell);
20050 + if (r) {
20051 + if (r < 0)
20052 +@@ -3551,12 +3555,12 @@ static void cache_status(struct dm_target *ti, status_type_t type,
20053 cache->sectors_per_block,
20054 (unsigned long long) from_cblock(residency),
20055 (unsigned long long) from_cblock(cache->cache_size),
20056 @@ -48918,7 +53147,7 @@ index cb5d0da..a06db6d 100644
20057 "start=%llu, len=%llu, dev_size=%llu",
20058 dm_device_name(ti->table->md), bdevname(bdev, b),
20059 diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
20060 -index 911ada6..85d4750 100644
20061 +index 185010d..1cc08ad9 100644
20062 --- a/drivers/md/dm-thin-metadata.c
20063 +++ b/drivers/md/dm-thin-metadata.c
20064 @@ -405,7 +405,7 @@ static void __setup_btree_details(struct dm_pool_metadata *pmd)
20065 @@ -49035,10 +53264,10 @@ index c338aeb..671c671 100644
20066
20067 void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
20068 diff --git a/drivers/md/md.c b/drivers/md/md.c
20069 -index b1e1f6b..8fe237a 100644
20070 +index e55e6cf..9d2a4c7 100644
20071 --- a/drivers/md/md.c
20072 +++ b/drivers/md/md.c
20073 -@@ -197,10 +197,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev);
20074 +@@ -198,10 +198,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev);
20075 * start build, activate spare
20076 */
20077 static DECLARE_WAIT_QUEUE_HEAD(md_event_waiters);
20078 @@ -49051,16 +53280,7 @@ index b1e1f6b..8fe237a 100644
20079 wake_up(&md_event_waiters);
20080 }
20081 EXPORT_SYMBOL_GPL(md_new_event);
20082 -@@ -210,7 +210,7 @@ EXPORT_SYMBOL_GPL(md_new_event);
20083 - */
20084 - static void md_new_event_inintr(struct mddev *mddev)
20085 - {
20086 -- atomic_inc(&md_event_count);
20087 -+ atomic_inc_unchecked(&md_event_count);
20088 - wake_up(&md_event_waiters);
20089 - }
20090 -
20091 -@@ -1434,7 +1434,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
20092 +@@ -1424,7 +1424,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
20093 if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_RESHAPE_ACTIVE) &&
20094 (le32_to_cpu(sb->feature_map) & MD_FEATURE_NEW_OFFSET))
20095 rdev->new_data_offset += (s32)le32_to_cpu(sb->new_offset);
20096 @@ -49069,7 +53289,7 @@ index b1e1f6b..8fe237a 100644
20097
20098 rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
20099 bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
20100 -@@ -1703,7 +1703,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
20101 +@@ -1693,7 +1693,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
20102 else
20103 sb->resync_offset = cpu_to_le64(0);
20104
20105 @@ -49078,7 +53298,7 @@ index b1e1f6b..8fe237a 100644
20106
20107 sb->raid_disks = cpu_to_le32(mddev->raid_disks);
20108 sb->size = cpu_to_le64(mddev->dev_sectors);
20109 -@@ -2711,7 +2711,7 @@ __ATTR_PREALLOC(state, S_IRUGO|S_IWUSR, state_show, state_store);
20110 +@@ -2708,7 +2708,7 @@ __ATTR_PREALLOC(state, S_IRUGO|S_IWUSR, state_show, state_store);
20111 static ssize_t
20112 errors_show(struct md_rdev *rdev, char *page)
20113 {
20114 @@ -49087,7 +53307,7 @@ index b1e1f6b..8fe237a 100644
20115 }
20116
20117 static ssize_t
20118 -@@ -2723,7 +2723,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len)
20119 +@@ -2720,7 +2720,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len)
20120 rv = kstrtouint(buf, 10, &n);
20121 if (rv < 0)
20122 return rv;
20123 @@ -49096,7 +53316,7 @@ index b1e1f6b..8fe237a 100644
20124 return len;
20125 }
20126 static struct rdev_sysfs_entry rdev_errors =
20127 -@@ -3167,8 +3167,8 @@ int md_rdev_init(struct md_rdev *rdev)
20128 +@@ -3170,8 +3170,8 @@ int md_rdev_init(struct md_rdev *rdev)
20129 rdev->sb_loaded = 0;
20130 rdev->bb_page = NULL;
20131 atomic_set(&rdev->nr_pending, 0);
20132 @@ -49107,7 +53327,7 @@ index b1e1f6b..8fe237a 100644
20133
20134 INIT_LIST_HEAD(&rdev->same_set);
20135 init_waitqueue_head(&rdev->blocked_wait);
20136 -@@ -4392,7 +4392,7 @@ mismatch_cnt_show(struct mddev *mddev, char *page)
20137 +@@ -4388,7 +4388,7 @@ mismatch_cnt_show(struct mddev *mddev, char *page)
20138 {
20139 return sprintf(page, "%llu\n",
20140 (unsigned long long)
20141 @@ -49116,7 +53336,16 @@ index b1e1f6b..8fe237a 100644
20142 }
20143
20144 static struct md_sysfs_entry md_mismatches = __ATTR_RO(mismatch_cnt);
20145 -@@ -5431,7 +5431,7 @@ static void md_clean(struct mddev *mddev)
20146 +@@ -5076,7 +5076,7 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data)
20147 + return NULL;
20148 + }
20149 +
20150 +-static int add_named_array(const char *val, struct kernel_param *kp)
20151 ++static int add_named_array(const char *val, const struct kernel_param *kp)
20152 + {
20153 + /* val must be "md_*" where * is not all digits.
20154 + * We allocate an array with a large free minor number, and
20155 +@@ -5426,7 +5426,7 @@ static void md_clean(struct mddev *mddev)
20156 mddev->new_layout = 0;
20157 mddev->new_chunk_sectors = 0;
20158 mddev->curr_resync = 0;
20159 @@ -49125,9 +53354,9 @@ index b1e1f6b..8fe237a 100644
20160 mddev->suspend_lo = mddev->suspend_hi = 0;
20161 mddev->sync_speed_min = mddev->sync_speed_max = 0;
20162 mddev->recovery = 0;
20163 -@@ -5847,9 +5847,10 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
20164 +@@ -5841,9 +5841,10 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
20165 info.patch_version = MD_PATCHLEVEL_VERSION;
20166 - info.ctime = mddev->ctime;
20167 + info.ctime = clamp_t(time64_t, mddev->ctime, 0, U32_MAX);
20168 info.level = mddev->level;
20169 - info.size = mddev->dev_sectors / 2;
20170 - if (info.size != mddev->dev_sectors / 2) /* overflow */
20171 @@ -49138,7 +53367,7 @@ index b1e1f6b..8fe237a 100644
20172 info.nr_disks = nr;
20173 info.raid_disks = mddev->raid_disks;
20174 info.md_minor = mddev->md_minor;
20175 -@@ -7391,7 +7392,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
20176 +@@ -7406,7 +7407,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
20177
20178 spin_unlock(&pers_lock);
20179 seq_printf(seq, "\n");
20180 @@ -49147,7 +53376,7 @@ index b1e1f6b..8fe237a 100644
20181 return 0;
20182 }
20183 if (v == (void*)2) {
20184 -@@ -7491,7 +7492,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
20185 +@@ -7506,7 +7507,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
20186 return error;
20187
20188 seq = file->private_data;
20189 @@ -49156,7 +53385,7 @@ index b1e1f6b..8fe237a 100644
20190 return error;
20191 }
20192
20193 -@@ -7508,7 +7509,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
20194 +@@ -7523,7 +7524,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
20195 /* always allow read */
20196 mask = POLLIN | POLLRDNORM;
20197
20198 @@ -49165,7 +53394,7 @@ index b1e1f6b..8fe237a 100644
20199 mask |= POLLERR | POLLPRI;
20200 return mask;
20201 }
20202 -@@ -7608,7 +7609,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
20203 +@@ -7623,7 +7624,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
20204 struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
20205 curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
20206 (int)part_stat_read(&disk->part0, sectors[1]) -
20207 @@ -49174,7 +53403,7 @@ index b1e1f6b..8fe237a 100644
20208 /* sync IO will cause sync_io to increase before the disk_stats
20209 * as sync_io is counted when a request starts, and
20210 * disk_stats is counted when it completes.
20211 -@@ -7859,7 +7860,7 @@ void md_do_sync(struct md_thread *thread)
20212 +@@ -7874,7 +7875,7 @@ void md_do_sync(struct md_thread *thread)
20213 * which defaults to physical size, but can be virtual size
20214 */
20215 max_sectors = mddev->resync_max_sectors;
20216 @@ -49183,11 +53412,25 @@ index b1e1f6b..8fe237a 100644
20217 /* we don't use the checkpoint if there's a bitmap */
20218 if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
20219 j = mddev->resync_min;
20220 +@@ -8870,11 +8871,11 @@ static __exit void md_exit(void)
20221 + subsys_initcall(md_init);
20222 + module_exit(md_exit)
20223 +
20224 +-static int get_ro(char *buffer, struct kernel_param *kp)
20225 ++static int get_ro(char *buffer, const struct kernel_param *kp)
20226 + {
20227 + return sprintf(buffer, "%d", start_readonly);
20228 + }
20229 +-static int set_ro(const char *val, struct kernel_param *kp)
20230 ++static int set_ro(const char *val, const struct kernel_param *kp)
20231 + {
20232 + return kstrtouint(val, 10, (unsigned int *)&start_readonly);
20233 + }
20234 diff --git a/drivers/md/md.h b/drivers/md/md.h
20235 -index dfa57b4..7af9cda 100644
20236 +index b5c4be7..d8da717 100644
20237 --- a/drivers/md/md.h
20238 +++ b/drivers/md/md.h
20239 -@@ -102,13 +102,13 @@ struct md_rdev {
20240 +@@ -96,13 +96,13 @@ struct md_rdev {
20241 * only maintained for arrays that
20242 * support hot removal
20243 */
20244 @@ -49203,7 +53446,7 @@ index dfa57b4..7af9cda 100644
20245 * for reporting to userspace and storing
20246 * in superblock.
20247 */
20248 -@@ -314,7 +314,7 @@ struct mddev {
20249 +@@ -282,7 +282,7 @@ struct mddev {
20250
20251 sector_t resync_max_sectors; /* may be set by personality */
20252
20253 @@ -49212,7 +53455,7 @@ index dfa57b4..7af9cda 100644
20254 * parity/replica mismatch found
20255 */
20256
20257 -@@ -492,7 +492,7 @@ extern void mddev_unlock(struct mddev *mddev);
20258 +@@ -461,7 +461,7 @@ extern void mddev_unlock(struct mddev *mddev);
20259
20260 static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
20261 {
20262 @@ -49256,10 +53499,10 @@ index 3e6d115..ffecdeb 100644
20263 /*----------------------------------------------------------------*/
20264
20265 diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
20266 -index 515554c..51df664 100644
20267 +index bb5bce0..518482b 100644
20268 --- a/drivers/md/raid1.c
20269 +++ b/drivers/md/raid1.c
20270 -@@ -1063,7 +1063,7 @@ static void make_request(struct mddev *mddev, struct bio * bio)
20271 +@@ -1063,7 +1063,7 @@ static void raid1_make_request(struct mddev *mddev, struct bio * bio)
20272 struct blk_plug_cb *cb;
20273 struct raid1_plug_cb *plug = NULL;
20274 int first_clone;
20275 @@ -49296,7 +53539,7 @@ index 515554c..51df664 100644
20276 "md/raid1:%s: read error corrected "
20277 "(%d sectors at %llu on %s)\n",
20278 diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
20279 -index ebb0dd6..2be20c1 100644
20280 +index e3fd725..9e365b2 100644
20281 --- a/drivers/md/raid10.c
20282 +++ b/drivers/md/raid10.c
20283 @@ -1068,7 +1068,7 @@ static void __make_request(struct mddev *mddev, struct bio *bio)
20284 @@ -49377,10 +53620,10 @@ index ebb0dd6..2be20c1 100644
20285
20286 rdev_dec_pending(rdev, mddev);
20287 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
20288 -index 10ce885..b98e542 100644
20289 +index 32d5287..f9e1b58 100644
20290 --- a/drivers/md/raid5.c
20291 +++ b/drivers/md/raid5.c
20292 -@@ -1112,23 +1112,23 @@ async_copy_data(int frombio, struct bio *bio, struct page **page,
20293 +@@ -1110,23 +1110,23 @@ async_copy_data(int frombio, struct bio *bio, struct page **page,
20294 struct bio_vec bvl;
20295 struct bvec_iter iter;
20296 struct page *bio_page;
20297 @@ -49410,7 +53653,7 @@ index 10ce885..b98e542 100644
20298
20299 if (page_offset < 0) {
20300 b_offset = -page_offset;
20301 -@@ -2019,6 +2019,10 @@ static int grow_one_stripe(struct r5conf *conf, gfp_t gfp)
20302 +@@ -2017,6 +2017,10 @@ static int grow_one_stripe(struct r5conf *conf, gfp_t gfp)
20303 return 1;
20304 }
20305
20306 @@ -49421,7 +53664,7 @@ index 10ce885..b98e542 100644
20307 static int grow_stripes(struct r5conf *conf, int num)
20308 {
20309 struct kmem_cache *sc;
20310 -@@ -2029,7 +2033,11 @@ static int grow_stripes(struct r5conf *conf, int num)
20311 +@@ -2027,7 +2031,11 @@ static int grow_stripes(struct r5conf *conf, int num)
20312 "raid%d-%s", conf->level, mdname(conf->mddev));
20313 else
20314 sprintf(conf->cache_name[0],
20315 @@ -49433,7 +53676,7 @@ index 10ce885..b98e542 100644
20316 sprintf(conf->cache_name[1], "%s-alt", conf->cache_name[0]);
20317
20318 conf->active_name = 0;
20319 -@@ -2332,21 +2340,21 @@ static void raid5_end_read_request(struct bio * bi)
20320 +@@ -2330,21 +2338,21 @@ static void raid5_end_read_request(struct bio * bi)
20321 mdname(conf->mddev), STRIPE_SECTORS,
20322 (unsigned long long)s,
20323 bdevname(rdev->bdev, b));
20324 @@ -49459,7 +53702,7 @@ index 10ce885..b98e542 100644
20325 if (test_bit(R5_ReadRepl, &sh->dev[i].flags))
20326 printk_ratelimited(
20327 KERN_WARNING
20328 -@@ -2374,7 +2382,7 @@ static void raid5_end_read_request(struct bio * bi)
20329 +@@ -2372,7 +2380,7 @@ static void raid5_end_read_request(struct bio * bi)
20330 mdname(conf->mddev),
20331 (unsigned long long)s,
20332 bdn);
20333 @@ -49468,7 +53711,7 @@ index 10ce885..b98e542 100644
20334 > conf->max_nr_stripes)
20335 printk(KERN_WARNING
20336 "md/raid:%s: Too many read errors, failing device %s.\n",
20337 -@@ -3746,7 +3754,7 @@ static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh,
20338 +@@ -3744,7 +3752,7 @@ static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh,
20339 */
20340 set_bit(STRIPE_INSYNC, &sh->state);
20341 else {
20342 @@ -49477,7 +53720,7 @@ index 10ce885..b98e542 100644
20343 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery))
20344 /* don't try to repair!! */
20345 set_bit(STRIPE_INSYNC, &sh->state);
20346 -@@ -3898,7 +3906,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
20347 +@@ -3896,7 +3904,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
20348 */
20349 }
20350 } else {
20351 @@ -49486,19 +53729,32 @@ index 10ce885..b98e542 100644
20352 if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery))
20353 /* don't try to repair!! */
20354 set_bit(STRIPE_INSYNC, &sh->state);
20355 +diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
20356 +index ce6a711..f87ae51 100644
20357 +--- a/drivers/media/dvb-core/dvb_net.c
20358 ++++ b/drivers/media/dvb-core/dvb_net.c
20359 +@@ -882,7 +882,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
20360 + return 0;
20361 + }
20362 +
20363 +-static int dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
20364 ++static netdev_tx_t dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
20365 + {
20366 + dev_kfree_skb(skb);
20367 + return NETDEV_TX_OK;
20368 diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
20369 -index 13bb57f..0ca21b2 100644
20370 +index 560450a..4a72ed8 100644
20371 --- a/drivers/media/dvb-core/dvbdev.c
20372 +++ b/drivers/media/dvb-core/dvbdev.c
20373 -@@ -272,7 +272,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
20374 - const struct dvb_device *template, void *priv, int type)
20375 +@@ -428,7 +428,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
20376 + int demux_sink_pads)
20377 {
20378 struct dvb_device *dvbdev;
20379 - struct file_operations *dvbdevfops;
20380 + file_operations_no_const *dvbdevfops;
20381 struct device *clsdev;
20382 int minor;
20383 - int id;
20384 + int id, ret;
20385 diff --git a/drivers/media/dvb-frontends/af9033.h b/drivers/media/dvb-frontends/af9033.h
20386 index 6ad22b6..6e90e2a 100644
20387 --- a/drivers/media/dvb-frontends/af9033.h
20388 @@ -49511,6 +53767,71 @@ index 6ad22b6..6e90e2a 100644
20389 +} __no_const;
20390
20391 #endif /* AF9033_H */
20392 +diff --git a/drivers/media/dvb-frontends/cx24116.c b/drivers/media/dvb-frontends/cx24116.c
20393 +index 8814f36..2adf845 100644
20394 +--- a/drivers/media/dvb-frontends/cx24116.c
20395 ++++ b/drivers/media/dvb-frontends/cx24116.c
20396 +@@ -1462,7 +1462,7 @@ static int cx24116_tune(struct dvb_frontend *fe, bool re_tune,
20397 + return cx24116_read_status(fe, status);
20398 + }
20399 +
20400 +-static int cx24116_get_algo(struct dvb_frontend *fe)
20401 ++static enum dvbfe_algo cx24116_get_algo(struct dvb_frontend *fe)
20402 + {
20403 + return DVBFE_ALGO_HW;
20404 + }
20405 +diff --git a/drivers/media/dvb-frontends/cx24117.c b/drivers/media/dvb-frontends/cx24117.c
20406 +index 5f77bc8..6d34c94 100644
20407 +--- a/drivers/media/dvb-frontends/cx24117.c
20408 ++++ b/drivers/media/dvb-frontends/cx24117.c
20409 +@@ -1555,7 +1555,7 @@ static int cx24117_tune(struct dvb_frontend *fe, bool re_tune,
20410 + return cx24117_read_status(fe, status);
20411 + }
20412 +
20413 +-static int cx24117_get_algo(struct dvb_frontend *fe)
20414 ++static enum dvbfe_algo cx24117_get_algo(struct dvb_frontend *fe)
20415 + {
20416 + return DVBFE_ALGO_HW;
20417 + }
20418 +diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c
20419 +index 3b0ef52..75afcce 100644
20420 +--- a/drivers/media/dvb-frontends/cx24120.c
20421 ++++ b/drivers/media/dvb-frontends/cx24120.c
20422 +@@ -1492,7 +1492,7 @@ static int cx24120_tune(struct dvb_frontend *fe, bool re_tune,
20423 + return cx24120_read_status(fe, status);
20424 + }
20425 +
20426 +-static int cx24120_get_algo(struct dvb_frontend *fe)
20427 ++static enum dvbfe_algo cx24120_get_algo(struct dvb_frontend *fe)
20428 + {
20429 + return DVBFE_ALGO_HW;
20430 + }
20431 +diff --git a/drivers/media/dvb-frontends/cx24123.c b/drivers/media/dvb-frontends/cx24123.c
20432 +index 0fe7fb1..b0bed47 100644
20433 +--- a/drivers/media/dvb-frontends/cx24123.c
20434 ++++ b/drivers/media/dvb-frontends/cx24123.c
20435 +@@ -1009,7 +1009,7 @@ static int cx24123_tune(struct dvb_frontend *fe,
20436 + return retval;
20437 + }
20438 +
20439 +-static int cx24123_get_algo(struct dvb_frontend *fe)
20440 ++static enum dvbfe_algo cx24123_get_algo(struct dvb_frontend *fe)
20441 + {
20442 + return DVBFE_ALGO_HW;
20443 + }
20444 +diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c
20445 +index 24a457d..b206eca 100644
20446 +--- a/drivers/media/dvb-frontends/cxd2820r_core.c
20447 ++++ b/drivers/media/dvb-frontends/cxd2820r_core.c
20448 +@@ -571,7 +571,7 @@ error:
20449 + return DVBFE_ALGO_SEARCH_ERROR;
20450 + }
20451 +
20452 +-static int cxd2820r_get_frontend_algo(struct dvb_frontend *fe)
20453 ++static enum dvbfe_algo cxd2820r_get_frontend_algo(struct dvb_frontend *fe)
20454 + {
20455 + return DVBFE_ALGO_CUSTOM;
20456 + }
20457 diff --git a/drivers/media/dvb-frontends/dib3000.h b/drivers/media/dvb-frontends/dib3000.h
20458 index 6ae9899..07d8543 100644
20459 --- a/drivers/media/dvb-frontends/dib3000.h
20460 @@ -49550,8 +53871,91 @@ index 2b8b4b1..8cef451 100644
20461
20462 #if IS_REACHABLE(CONFIG_DVB_DIB8000)
20463 void *dib8000_attach(struct dib8000_ops *ops);
20464 +diff --git a/drivers/media/dvb-frontends/hd29l2.c b/drivers/media/dvb-frontends/hd29l2.c
20465 +index 40e359f..550aea4 100644
20466 +--- a/drivers/media/dvb-frontends/hd29l2.c
20467 ++++ b/drivers/media/dvb-frontends/hd29l2.c
20468 +@@ -555,7 +555,7 @@ err:
20469 + return DVBFE_ALGO_SEARCH_ERROR;
20470 + }
20471 +
20472 +-static int hd29l2_get_frontend_algo(struct dvb_frontend *fe)
20473 ++static enum dvbfe_algo hd29l2_get_frontend_algo(struct dvb_frontend *fe)
20474 + {
20475 + return DVBFE_ALGO_CUSTOM;
20476 + }
20477 +diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
20478 +index 721fbc0..fe21cc9 100644
20479 +--- a/drivers/media/dvb-frontends/lgdt3306a.c
20480 ++++ b/drivers/media/dvb-frontends/lgdt3306a.c
20481 +@@ -1734,7 +1734,7 @@ static int lgdt3306a_get_tune_settings(struct dvb_frontend *fe,
20482 + return 0;
20483 + }
20484 +
20485 +-static int lgdt3306a_search(struct dvb_frontend *fe)
20486 ++static enum dvbfe_search lgdt3306a_search(struct dvb_frontend *fe)
20487 + {
20488 + enum fe_status status = 0;
20489 + int i, ret;
20490 +diff --git a/drivers/media/dvb-frontends/mt312.c b/drivers/media/dvb-frontends/mt312.c
20491 +index c36e676..6c3f140 100644
20492 +--- a/drivers/media/dvb-frontends/mt312.c
20493 ++++ b/drivers/media/dvb-frontends/mt312.c
20494 +@@ -381,7 +381,7 @@ static int mt312_send_master_cmd(struct dvb_frontend *fe,
20495 + }
20496 +
20497 + static int mt312_send_burst(struct dvb_frontend *fe,
20498 +- const enum fe_sec_mini_cmd c)
20499 ++ enum fe_sec_mini_cmd c)
20500 + {
20501 + struct mt312_state *state = fe->demodulator_priv;
20502 + const u8 mini_tab[2] = { 0x02, 0x03 };
20503 +@@ -405,7 +405,7 @@ static int mt312_send_burst(struct dvb_frontend *fe,
20504 + }
20505 +
20506 + static int mt312_set_tone(struct dvb_frontend *fe,
20507 +- const enum fe_sec_tone_mode t)
20508 ++ enum fe_sec_tone_mode t)
20509 + {
20510 + struct mt312_state *state = fe->demodulator_priv;
20511 + const u8 tone_tab[2] = { 0x01, 0x00 };
20512 +@@ -429,7 +429,7 @@ static int mt312_set_tone(struct dvb_frontend *fe,
20513 + }
20514 +
20515 + static int mt312_set_voltage(struct dvb_frontend *fe,
20516 +- const enum fe_sec_voltage v)
20517 ++ enum fe_sec_voltage v)
20518 + {
20519 + struct mt312_state *state = fe->demodulator_priv;
20520 + const u8 volt_tab[3] = { 0x00, 0x40, 0x00 };
20521 +diff --git a/drivers/media/dvb-frontends/s921.c b/drivers/media/dvb-frontends/s921.c
20522 +index d6a8fa6..b525f9c 100644
20523 +--- a/drivers/media/dvb-frontends/s921.c
20524 ++++ b/drivers/media/dvb-frontends/s921.c
20525 +@@ -464,7 +464,7 @@ static int s921_tune(struct dvb_frontend *fe,
20526 + return rc;
20527 + }
20528 +
20529 +-static int s921_get_algo(struct dvb_frontend *fe)
20530 ++static enum dvbfe_algo s921_get_algo(struct dvb_frontend *fe)
20531 + {
20532 + return DVBFE_ALGO_HW;
20533 + }
20534 +diff --git a/drivers/media/pci/bt8xx/dst.c b/drivers/media/pci/bt8xx/dst.c
20535 +index 4a90eee..2cec315 100644
20536 +--- a/drivers/media/pci/bt8xx/dst.c
20537 ++++ b/drivers/media/pci/bt8xx/dst.c
20538 +@@ -1683,7 +1683,7 @@ static int dst_tune_frontend(struct dvb_frontend* fe,
20539 + return 0;
20540 + }
20541 +
20542 +-static int dst_get_tuning_algo(struct dvb_frontend *fe)
20543 ++static enum dvbfe_algo dst_get_tuning_algo(struct dvb_frontend *fe)
20544 + {
20545 + return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW;
20546 + }
20547 diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
20548 -index aef9acf..722ff02 100644
20549 +index 5f331df..674b0e0 100644
20550 --- a/drivers/media/pci/cx88/cx88-video.c
20551 +++ b/drivers/media/pci/cx88/cx88-video.c
20552 @@ -50,9 +50,9 @@ MODULE_VERSION(CX88_VERSION);
20553 @@ -49568,7 +53972,7 @@ index aef9acf..722ff02 100644
20554 module_param_array(video_nr, int, NULL, 0444);
20555 module_param_array(vbi_nr, int, NULL, 0444);
20556 diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
20557 -index c2e60b4..5eeccc0 100644
20558 +index 374033a..461c38c 100644
20559 --- a/drivers/media/pci/ivtv/ivtv-driver.c
20560 +++ b/drivers/media/pci/ivtv/ivtv-driver.c
20561 @@ -83,7 +83,7 @@ static struct pci_device_id ivtv_pci_tbl[] = {
20562 @@ -49580,6 +53984,32 @@ index c2e60b4..5eeccc0 100644
20563
20564 /* Parameter declarations */
20565 static int cardtype[IVTV_MAX_CARDS];
20566 +diff --git a/drivers/media/pci/pt1/va1j5jf8007s.c b/drivers/media/pci/pt1/va1j5jf8007s.c
20567 +index d0e70dc0..e4fee68 100644
20568 +--- a/drivers/media/pci/pt1/va1j5jf8007s.c
20569 ++++ b/drivers/media/pci/pt1/va1j5jf8007s.c
20570 +@@ -102,7 +102,7 @@ static int va1j5jf8007s_read_snr(struct dvb_frontend *fe, u16 *snr)
20571 + return 0;
20572 + }
20573 +
20574 +-static int va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe)
20575 ++static enum dvbfe_algo va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe)
20576 + {
20577 + return DVBFE_ALGO_HW;
20578 + }
20579 +diff --git a/drivers/media/pci/pt1/va1j5jf8007t.c b/drivers/media/pci/pt1/va1j5jf8007t.c
20580 +index 0268f20..de9dff7 100644
20581 +--- a/drivers/media/pci/pt1/va1j5jf8007t.c
20582 ++++ b/drivers/media/pci/pt1/va1j5jf8007t.c
20583 +@@ -92,7 +92,7 @@ static int va1j5jf8007t_read_snr(struct dvb_frontend *fe, u16 *snr)
20584 + return 0;
20585 + }
20586 +
20587 +-static int va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe)
20588 ++static enum dvbfe_algo va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe)
20589 + {
20590 + return DVBFE_ALGO_HW;
20591 + }
20592 diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
20593 index f50d072..0214f25 100644
20594 --- a/drivers/media/pci/solo6x10/solo6x10-core.c
20595 @@ -49657,6 +54087,28 @@ index 4e7db89..bd7ef95 100644
20596 };
20597
20598 struct zoran_buffer {
20599 +diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c
20600 +index 9d2697f..65fb18f 100644
20601 +--- a/drivers/media/pci/zoran/zoran_card.c
20602 ++++ b/drivers/media/pci/zoran/zoran_card.c
20603 +@@ -1356,7 +1356,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
20604 + if (zr->card.video_codec) {
20605 + codec_name = codecid_to_modulename(zr->card.video_codec);
20606 + if (codec_name) {
20607 +- result = request_module(codec_name);
20608 ++ result = request_module("%s", codec_name);
20609 + if (result) {
20610 + dprintk(1,
20611 + KERN_ERR
20612 +@@ -1368,7 +1368,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
20613 + if (zr->card.video_vfe) {
20614 + vfe_name = codecid_to_modulename(zr->card.video_vfe);
20615 + if (vfe_name) {
20616 +- result = request_module(vfe_name);
20617 ++ result = request_module("%s", vfe_name);
20618 + if (result < 0) {
20619 + dprintk(1,
20620 + KERN_ERR
20621 diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
20622 index 80caa70..d076ecf 100644
20623 --- a/drivers/media/pci/zoran/zoran_driver.c
20624 @@ -49754,7 +54206,7 @@ index a0ec14a..225f4ac 100644
20625 if (done && done != layer->shadow_buf)
20626 vb2_buffer_done(&done->vb.vb2_buf, VB2_BUF_STATE_DONE);
20627 diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
20628 -index dc1c679..30aae739b 100644
20629 +index d9e7f03..2732585 100644
20630 --- a/drivers/media/platform/s5p-tv/mixer_video.c
20631 +++ b/drivers/media/platform/s5p-tv/mixer_video.c
20632 @@ -210,7 +210,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer)
20633 @@ -49866,6 +54318,19 @@ index dd002a4..7fafd8a 100644
20634 .release = mxr_vp_layer_release,
20635 .buffer_set = mxr_vp_buffer_set,
20636 .stream_set = mxr_vp_stream_set,
20637 +diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
20638 +index 46c7186..47130c8 100644
20639 +--- a/drivers/media/platform/soc_camera/soc_camera.c
20640 ++++ b/drivers/media/platform/soc_camera/soc_camera.c
20641 +@@ -1791,7 +1791,7 @@ static int soc_camera_probe(struct soc_camera_host *ici,
20642 + goto eadd;
20643 +
20644 + if (shd->module_name)
20645 +- ret = request_module(shd->module_name);
20646 ++ ret = request_module("%s", shd->module_name);
20647 +
20648 + ret = shd->add_device(icd);
20649 + if (ret < 0)
20650 diff --git a/drivers/media/platform/sti/c8sectpfe/Kconfig b/drivers/media/platform/sti/c8sectpfe/Kconfig
20651 index 7420a50..e6f31a0 100644
20652 --- a/drivers/media/platform/sti/c8sectpfe/Kconfig
20653 @@ -49904,7 +54369,7 @@ index 82affae..42833ec 100644
20654 }
20655
20656 diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
20657 -index 5236035..c622c74 100644
20658 +index 70fd8e8..0088740 100644
20659 --- a/drivers/media/radio/radio-maxiradio.c
20660 +++ b/drivers/media/radio/radio-maxiradio.c
20661 @@ -61,7 +61,7 @@ MODULE_PARM_DESC(radio_nr, "Radio device number");
20662 @@ -49917,7 +54382,7 @@ index 5236035..c622c74 100644
20663 #define PCI_VENDOR_ID_GUILLEMOT 0x5046
20664 #define PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO 0x1001
20665 diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c
20666 -index 050b3bb..79f62b9 100644
20667 +index 85667a9..ec4dc0a 100644
20668 --- a/drivers/media/radio/radio-shark.c
20669 +++ b/drivers/media/radio/radio-shark.c
20670 @@ -79,7 +79,7 @@ struct shark_device {
20671 @@ -49930,7 +54395,7 @@ index 050b3bb..79f62b9 100644
20672 static void shark_write_val(struct snd_tea575x *tea, u32 val)
20673 {
20674 diff --git a/drivers/media/radio/radio-shark2.c b/drivers/media/radio/radio-shark2.c
20675 -index 8654e0d..0608a64 100644
20676 +index 0e65a85..3fa6f5c 100644
20677 --- a/drivers/media/radio/radio-shark2.c
20678 +++ b/drivers/media/radio/radio-shark2.c
20679 @@ -74,7 +74,7 @@ struct shark_device {
20680 @@ -49943,7 +54408,7 @@ index 8654e0d..0608a64 100644
20681 static int shark_write_reg(struct radio_tea5777 *tea, u64 reg)
20682 {
20683 diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
20684 -index 9cbb8cd..2bf2ff3 100644
20685 +index 859f0c0..46e3c75 100644
20686 --- a/drivers/media/radio/radio-si476x.c
20687 +++ b/drivers/media/radio/radio-si476x.c
20688 @@ -1445,7 +1445,7 @@ static int si476x_radio_probe(struct platform_device *pdev)
20689 @@ -50674,8 +55139,147 @@ index 6c3c477..6c435a4 100644
20690 return 1;
20691 }
20692
20693 +diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c
20694 +index fd888a6..0d01210 100644
20695 +--- a/drivers/media/usb/pvrusb2/pvrusb2-context.c
20696 ++++ b/drivers/media/usb/pvrusb2/pvrusb2-context.c
20697 +@@ -103,8 +103,10 @@ static void pvr2_context_destroy(struct pvr2_context *mp)
20698 + }
20699 +
20700 +
20701 +-static void pvr2_context_notify(struct pvr2_context *mp)
20702 ++static void pvr2_context_notify(void *_mp)
20703 + {
20704 ++ struct pvr2_context *mp = _mp;
20705 ++
20706 + pvr2_context_set_notify(mp,!0);
20707 + }
20708 +
20709 +@@ -119,9 +121,7 @@ static void pvr2_context_check(struct pvr2_context *mp)
20710 + pvr2_trace(PVR2_TRACE_CTXT,
20711 + "pvr2_context %p (initialize)", mp);
20712 + /* Finish hardware initialization */
20713 +- if (pvr2_hdw_initialize(mp->hdw,
20714 +- (void (*)(void *))pvr2_context_notify,
20715 +- mp)) {
20716 ++ if (pvr2_hdw_initialize(mp->hdw, pvr2_context_notify, mp)) {
20717 + mp->video_stream.stream =
20718 + pvr2_hdw_get_video_stream(mp->hdw);
20719 + /* Trigger interface initialization. By doing this
20720 +diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
20721 +index 8c95793..2309b9e 100644
20722 +--- a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
20723 ++++ b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
20724 +@@ -101,8 +101,10 @@ static int pvr2_dvb_feed_thread(void *data)
20725 + return stat;
20726 + }
20727 +
20728 +-static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap)
20729 ++static void pvr2_dvb_notify(void *_adap)
20730 + {
20731 ++ struct pvr2_dvb_adapter *adap = _adap;
20732 ++
20733 + wake_up(&adap->buffer_wait_data);
20734 + }
20735 +
20736 +@@ -161,8 +163,7 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap)
20737 + if (!(adap->buffer_storage[idx])) return -ENOMEM;
20738 + }
20739 +
20740 +- pvr2_stream_set_callback(pvr->video_stream.stream,
20741 +- (pvr2_stream_callback) pvr2_dvb_notify, adap);
20742 ++ pvr2_stream_set_callback(pvr->video_stream.stream, pvr2_dvb_notify, adap);
20743 +
20744 + ret = pvr2_stream_set_buffer_count(stream, PVR2_DVB_BUFFER_COUNT);
20745 + if (ret < 0) return ret;
20746 +diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
20747 +index 0533ef2..2248d97 100644
20748 +--- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
20749 ++++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
20750 +@@ -2097,7 +2097,7 @@ static void pvr2_hdw_load_modules(struct pvr2_hdw *hdw)
20751 +
20752 + cm = &hdw->hdw_desc->client_modules;
20753 + for (idx = 0; idx < cm->cnt; idx++) {
20754 +- request_module(cm->lst[idx]);
20755 ++ request_module("%s", cm->lst[idx]);
20756 + }
20757 +
20758 + ct = &hdw->hdw_desc->client_table;
20759 +diff --git a/drivers/media/usb/pvrusb2/pvrusb2-std.c b/drivers/media/usb/pvrusb2/pvrusb2-std.c
20760 +index 9a596a3..38de071 100644
20761 +--- a/drivers/media/usb/pvrusb2/pvrusb2-std.c
20762 ++++ b/drivers/media/usb/pvrusb2/pvrusb2-std.c
20763 +@@ -216,7 +216,7 @@ unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize,
20764 + bufSize -= c2;
20765 + bufPtr += c2;
20766 + c2 = scnprintf(bufPtr,bufSize,
20767 +- ip->name);
20768 ++ "%s", ip->name);
20769 + c1 += c2;
20770 + bufSize -= c2;
20771 + bufPtr += c2;
20772 +diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
20773 +index 81f788b..9619f47 100644
20774 +--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
20775 ++++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
20776 +@@ -1069,8 +1069,10 @@ static int pvr2_v4l2_open(struct file *file)
20777 + }
20778 +
20779 +
20780 +-static void pvr2_v4l2_notify(struct pvr2_v4l2_fh *fhp)
20781 ++static void pvr2_v4l2_notify(void *_fhp)
20782 + {
20783 ++ struct pvr2_v4l2_fh *fhp = _fhp;
20784 ++
20785 + wake_up(&fhp->wait_data);
20786 + }
20787 +
20788 +@@ -1103,7 +1105,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
20789 +
20790 + hdw = fh->channel.mc_head->hdw;
20791 + sp = fh->pdi->stream->stream;
20792 +- pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh);
20793 ++ pvr2_stream_set_callback(sp,pvr2_v4l2_notify,fh);
20794 + pvr2_hdw_set_stream_type(hdw,fh->pdi->config);
20795 + if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
20796 + return pvr2_ioread_set_enabled(fh->rhp,!0);
20797 +diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
20798 +index 4e71488..1bcd8a5 100644
20799 +--- a/drivers/media/usb/uvc/uvc_driver.c
20800 ++++ b/drivers/media/usb/uvc/uvc_driver.c
20801 +@@ -2058,7 +2058,7 @@ static int uvc_reset_resume(struct usb_interface *intf)
20802 + * Module parameters
20803 + */
20804 +
20805 +-static int uvc_clock_param_get(char *buffer, struct kernel_param *kp)
20806 ++static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp)
20807 + {
20808 + if (uvc_clock_param == CLOCK_MONOTONIC)
20809 + return sprintf(buffer, "CLOCK_MONOTONIC");
20810 +@@ -2066,7 +2066,7 @@ static int uvc_clock_param_get(char *buffer, struct kernel_param *kp)
20811 + return sprintf(buffer, "CLOCK_REALTIME");
20812 + }
20813 +
20814 +-static int uvc_clock_param_set(const char *val, struct kernel_param *kp)
20815 ++static int uvc_clock_param_set(const char *val, const struct kernel_param *kp)
20816 + {
20817 + if (strncasecmp(val, "clock_", strlen("clock_")) == 0)
20818 + val += strlen("clock_");
20819 +diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
20820 +index 5b80850..97b8443 100644
20821 +--- a/drivers/media/v4l2-core/v4l2-common.c
20822 ++++ b/drivers/media/v4l2-core/v4l2-common.c
20823 +@@ -268,7 +268,7 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
20824 + BUG_ON(!v4l2_dev);
20825 +
20826 + if (info->modalias[0])
20827 +- request_module(info->modalias);
20828 ++ request_module("%s", info->modalias);
20829 +
20830 + spi = spi_new_device(master, info);
20831 +
20832 diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
20833 -index f38c076..072bb90 100644
20834 +index 019644f..a988084 100644
20835 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
20836 +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
20837 @@ -448,7 +448,7 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
20838 @@ -50733,7 +55337,7 @@ index f38c076..072bb90 100644
20839 }
20840
20841 diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c
20842 -index 5b0a30b..1974b38 100644
20843 +index 06fa5f1..2231dda 100644
20844 --- a/drivers/media/v4l2-core/v4l2-device.c
20845 +++ b/drivers/media/v4l2-core/v4l2-device.c
20846 @@ -74,9 +74,9 @@ int v4l2_device_put(struct v4l2_device *v4l2_dev)
20847 @@ -50749,12 +55353,210 @@ index 5b0a30b..1974b38 100644
20848
20849 if (basename[len - 1] >= '0' && basename[len - 1] <= '9')
20850 diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
20851 -index 7486af2..a1f2e87 100644
20852 +index 8a018c6..83f25a7 100644
20853 --- a/drivers/media/v4l2-core/v4l2-ioctl.c
20854 +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
20855 -@@ -2382,7 +2382,8 @@ struct v4l2_ioctl_info {
20856 - struct file *file, void *fh, void *p);
20857 - } u;
20858 +@@ -2372,49 +2372,222 @@ static int v4l_enum_freq_bands(const struct v4l2_ioctl_ops *ops,
20859 + return -ENOTTY;
20860 + }
20861 +
20862 ++static int v4l_vidioc_g_fbuf(const struct v4l2_ioctl_ops *ops,
20863 ++ struct file *file, void *fh, void *arg)
20864 ++{
20865 ++ return ops->vidioc_g_fbuf(file, fh, arg);
20866 ++}
20867 ++
20868 ++static int v4l_vidioc_s_fbuf(const struct v4l2_ioctl_ops *ops,
20869 ++ struct file *file, void *fh, void *arg)
20870 ++{
20871 ++ return ops->vidioc_s_fbuf(file, fh, arg);
20872 ++}
20873 ++
20874 ++static int v4l_vidioc_expbuf(const struct v4l2_ioctl_ops *ops,
20875 ++ struct file *file, void *fh, void *arg)
20876 ++{
20877 ++ return ops->vidioc_expbuf(file, fh, arg);
20878 ++}
20879 ++
20880 ++static int v4l_vidioc_g_std(const struct v4l2_ioctl_ops *ops,
20881 ++ struct file *file, void *fh, void *arg)
20882 ++{
20883 ++ return ops->vidioc_g_std(file, fh, arg);
20884 ++}
20885 ++
20886 ++static int v4l_vidioc_g_audio(const struct v4l2_ioctl_ops *ops,
20887 ++ struct file *file, void *fh, void *arg)
20888 ++{
20889 ++ return ops->vidioc_g_audio(file, fh, arg);
20890 ++}
20891 ++
20892 ++static int v4l_vidioc_s_audio(const struct v4l2_ioctl_ops *ops,
20893 ++ struct file *file, void *fh, void *arg)
20894 ++{
20895 ++ return ops->vidioc_s_audio(file, fh, arg);
20896 ++}
20897 ++
20898 ++static int v4l_vidioc_g_input(const struct v4l2_ioctl_ops *ops,
20899 ++ struct file *file, void *fh, void *arg)
20900 ++{
20901 ++ return ops->vidioc_g_input(file, fh, arg);
20902 ++}
20903 ++
20904 ++static int v4l_vidioc_g_edid(const struct v4l2_ioctl_ops *ops,
20905 ++ struct file *file, void *fh, void *arg)
20906 ++{
20907 ++ return ops->vidioc_g_edid(file, fh, arg);
20908 ++}
20909 ++
20910 ++static int v4l_vidioc_s_edid(const struct v4l2_ioctl_ops *ops,
20911 ++ struct file *file, void *fh, void *arg)
20912 ++{
20913 ++ return ops->vidioc_s_edid(file, fh, arg);
20914 ++}
20915 ++
20916 ++static int v4l_vidioc_g_output(const struct v4l2_ioctl_ops *ops,
20917 ++ struct file *file, void *fh, void *arg)
20918 ++{
20919 ++ return ops->vidioc_g_output(file, fh, arg);
20920 ++}
20921 ++
20922 ++static int v4l_vidioc_g_audout(const struct v4l2_ioctl_ops *ops,
20923 ++ struct file *file, void *fh, void *arg)
20924 ++{
20925 ++ return ops->vidioc_g_audout(file, fh, arg);
20926 ++}
20927 ++
20928 ++static int v4l_vidioc_s_audout(const struct v4l2_ioctl_ops *ops,
20929 ++ struct file *file, void *fh, void *arg)
20930 ++{
20931 ++ return ops->vidioc_s_audout(file, fh, arg);
20932 ++}
20933 ++
20934 ++static int v4l_vidioc_s_modulator(const struct v4l2_ioctl_ops *ops,
20935 ++ struct file *file, void *fh, void *arg)
20936 ++{
20937 ++ return ops->vidioc_s_modulator(file, fh, arg);
20938 ++}
20939 ++
20940 ++static int v4l_vidioc_g_selection(const struct v4l2_ioctl_ops *ops,
20941 ++ struct file *file, void *fh, void *arg)
20942 ++{
20943 ++ return ops->vidioc_g_selection(file, fh, arg);
20944 ++}
20945 ++
20946 ++static int v4l_vidioc_s_selection(const struct v4l2_ioctl_ops *ops,
20947 ++ struct file *file, void *fh, void *arg)
20948 ++{
20949 ++ return ops->vidioc_s_selection(file, fh, arg);
20950 ++}
20951 ++
20952 ++static int v4l_vidioc_g_jpegcomp(const struct v4l2_ioctl_ops *ops,
20953 ++ struct file *file, void *fh, void *arg)
20954 ++{
20955 ++ return ops->vidioc_g_jpegcomp(file, fh, arg);
20956 ++}
20957 ++
20958 ++static int v4l_vidioc_s_jpegcomp(const struct v4l2_ioctl_ops *ops,
20959 ++ struct file *file, void *fh, void *arg)
20960 ++{
20961 ++ return ops->vidioc_s_jpegcomp(file, fh, arg);
20962 ++}
20963 ++
20964 ++static int v4l_vidioc_enumaudio(const struct v4l2_ioctl_ops *ops,
20965 ++ struct file *file, void *fh, void *arg)
20966 ++{
20967 ++ return ops->vidioc_enumaudio(file, fh, arg);
20968 ++}
20969 ++
20970 ++static int v4l_vidioc_enumaudout(const struct v4l2_ioctl_ops *ops,
20971 ++ struct file *file, void *fh, void *arg)
20972 ++{
20973 ++ return ops->vidioc_enumaudout(file, fh, arg);
20974 ++}
20975 ++
20976 ++static int v4l_vidioc_enum_framesizes(const struct v4l2_ioctl_ops *ops,
20977 ++ struct file *file, void *fh, void *arg)
20978 ++{
20979 ++ return ops->vidioc_enum_framesizes(file, fh, arg);
20980 ++}
20981 ++
20982 ++static int v4l_vidioc_enum_frameintervals(const struct v4l2_ioctl_ops *ops,
20983 ++ struct file *file, void *fh, void *arg)
20984 ++{
20985 ++ return ops->vidioc_enum_frameintervals(file, fh, arg);
20986 ++}
20987 ++
20988 ++static int v4l_vidioc_g_enc_index(const struct v4l2_ioctl_ops *ops,
20989 ++ struct file *file, void *fh, void *arg)
20990 ++{
20991 ++ return ops->vidioc_g_enc_index(file, fh, arg);
20992 ++}
20993 ++
20994 ++static int v4l_vidioc_encoder_cmd(const struct v4l2_ioctl_ops *ops,
20995 ++ struct file *file, void *fh, void *arg)
20996 ++{
20997 ++ return ops->vidioc_encoder_cmd(file, fh, arg);
20998 ++}
20999 ++
21000 ++static int v4l_vidioc_try_encoder_cmd(const struct v4l2_ioctl_ops *ops,
21001 ++ struct file *file, void *fh, void *arg)
21002 ++{
21003 ++ return ops->vidioc_try_encoder_cmd(file, fh, arg);
21004 ++}
21005 ++
21006 ++static int v4l_vidioc_decoder_cmd(const struct v4l2_ioctl_ops *ops,
21007 ++ struct file *file, void *fh, void *arg)
21008 ++{
21009 ++ return ops->vidioc_decoder_cmd(file, fh, arg);
21010 ++}
21011 ++
21012 ++static int v4l_vidioc_try_decoder_cmd(const struct v4l2_ioctl_ops *ops,
21013 ++ struct file *file, void *fh, void *arg)
21014 ++{
21015 ++ return ops->vidioc_try_decoder_cmd(file, fh, arg);
21016 ++}
21017 ++
21018 ++static int v4l_vidioc_s_dv_timings(const struct v4l2_ioctl_ops *ops,
21019 ++ struct file *file, void *fh, void *arg)
21020 ++{
21021 ++ return ops->vidioc_s_dv_timings(file, fh, arg);
21022 ++}
21023 ++
21024 ++static int v4l_vidioc_g_dv_timings(const struct v4l2_ioctl_ops *ops,
21025 ++ struct file *file, void *fh, void *arg)
21026 ++{
21027 ++ return ops->vidioc_g_dv_timings(file, fh, arg);
21028 ++}
21029 ++
21030 ++static int v4l_vidioc_enum_dv_timings(const struct v4l2_ioctl_ops *ops,
21031 ++ struct file *file, void *fh, void *arg)
21032 ++{
21033 ++ return ops->vidioc_enum_dv_timings(file, fh, arg);
21034 ++}
21035 ++
21036 ++static int v4l_vidioc_query_dv_timings(const struct v4l2_ioctl_ops *ops,
21037 ++ struct file *file, void *fh, void *arg)
21038 ++{
21039 ++ return ops->vidioc_query_dv_timings(file, fh, arg);
21040 ++}
21041 ++
21042 ++static int v4l_vidioc_dv_timings_cap(const struct v4l2_ioctl_ops *ops,
21043 ++ struct file *file, void *fh, void *arg)
21044 ++{
21045 ++ return ops->vidioc_dv_timings_cap(file, fh, arg);
21046 ++}
21047 ++
21048 + struct v4l2_ioctl_info {
21049 + unsigned int ioctl;
21050 + u32 flags;
21051 + const char * const name;
21052 +- union {
21053 +- u32 offset;
21054 +- int (*func)(const struct v4l2_ioctl_ops *ops,
21055 +- struct file *file, void *fh, void *p);
21056 +- } u;
21057 ++ int (*func)(const struct v4l2_ioctl_ops *ops,
21058 ++ struct file *file, void *fh, void *p);
21059 void (*debug)(const void *arg, bool write_only);
21060 -};
21061 +} __do_const;
21062 @@ -50762,7 +55564,152 @@ index 7486af2..a1f2e87 100644
21063
21064 /* This control needs a priority check */
21065 #define INFO_FL_PRIO (1 << 0)
21066 -@@ -2566,7 +2567,7 @@ static long __video_do_ioctl(struct file *file,
21067 + /* This control can be valid if the filehandle passes a control handler. */
21068 + #define INFO_FL_CTRL (1 << 1)
21069 +-/* This is a standard ioctl, no need for special code */
21070 +-#define INFO_FL_STD (1 << 2)
21071 + /* This is ioctl has its own function */
21072 +-#define INFO_FL_FUNC (1 << 3)
21073 ++#define INFO_FL_FUNC (1 << 2)
21074 + /* Queuing ioctl */
21075 +-#define INFO_FL_QUEUE (1 << 4)
21076 ++#define INFO_FL_QUEUE (1 << 3)
21077 + /* Zero struct from after the field to the end */
21078 + #define INFO_FL_CLEAR(v4l2_struct, field) \
21079 + ((offsetof(struct v4l2_struct, field) + \
21080 + sizeof(((struct v4l2_struct *)0)->field)) << 16)
21081 + #define INFO_FL_CLEAR_MASK (_IOC_SIZEMASK << 16)
21082 +
21083 +-#define IOCTL_INFO_STD(_ioctl, _vidioc, _debug, _flags) \
21084 +- [_IOC_NR(_ioctl)] = { \
21085 +- .ioctl = _ioctl, \
21086 +- .flags = _flags | INFO_FL_STD, \
21087 +- .name = #_ioctl, \
21088 +- .u.offset = offsetof(struct v4l2_ioctl_ops, _vidioc), \
21089 +- .debug = _debug, \
21090 +- }
21091 +-
21092 + #define IOCTL_INFO_FNC(_ioctl, _func, _debug, _flags) \
21093 + [_IOC_NR(_ioctl)] = { \
21094 + .ioctl = _ioctl, \
21095 + .flags = _flags | INFO_FL_FUNC, \
21096 + .name = #_ioctl, \
21097 +- .u.func = _func, \
21098 ++ .func = _func, \
21099 + .debug = _debug, \
21100 + }
21101 +
21102 +@@ -2425,17 +2598,17 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
21103 + IOCTL_INFO_FNC(VIDIOC_S_FMT, v4l_s_fmt, v4l_print_format, INFO_FL_PRIO),
21104 + IOCTL_INFO_FNC(VIDIOC_REQBUFS, v4l_reqbufs, v4l_print_requestbuffers, INFO_FL_PRIO | INFO_FL_QUEUE),
21105 + IOCTL_INFO_FNC(VIDIOC_QUERYBUF, v4l_querybuf, v4l_print_buffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_buffer, length)),
21106 +- IOCTL_INFO_STD(VIDIOC_G_FBUF, vidioc_g_fbuf, v4l_print_framebuffer, 0),
21107 +- IOCTL_INFO_STD(VIDIOC_S_FBUF, vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO),
21108 ++ IOCTL_INFO_FNC(VIDIOC_G_FBUF, v4l_vidioc_g_fbuf, v4l_print_framebuffer, 0),
21109 ++ IOCTL_INFO_FNC(VIDIOC_S_FBUF, v4l_vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO),
21110 + IOCTL_INFO_FNC(VIDIOC_OVERLAY, v4l_overlay, v4l_print_u32, INFO_FL_PRIO),
21111 + IOCTL_INFO_FNC(VIDIOC_QBUF, v4l_qbuf, v4l_print_buffer, INFO_FL_QUEUE),
21112 +- IOCTL_INFO_STD(VIDIOC_EXPBUF, vidioc_expbuf, v4l_print_exportbuffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_exportbuffer, flags)),
21113 ++ IOCTL_INFO_FNC(VIDIOC_EXPBUF, v4l_vidioc_expbuf, v4l_print_exportbuffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_exportbuffer, flags)),
21114 + IOCTL_INFO_FNC(VIDIOC_DQBUF, v4l_dqbuf, v4l_print_buffer, INFO_FL_QUEUE),
21115 + IOCTL_INFO_FNC(VIDIOC_STREAMON, v4l_streamon, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE),
21116 + IOCTL_INFO_FNC(VIDIOC_STREAMOFF, v4l_streamoff, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE),
21117 + IOCTL_INFO_FNC(VIDIOC_G_PARM, v4l_g_parm, v4l_print_streamparm, INFO_FL_CLEAR(v4l2_streamparm, type)),
21118 + IOCTL_INFO_FNC(VIDIOC_S_PARM, v4l_s_parm, v4l_print_streamparm, INFO_FL_PRIO),
21119 +- IOCTL_INFO_STD(VIDIOC_G_STD, vidioc_g_std, v4l_print_std, 0),
21120 ++ IOCTL_INFO_FNC(VIDIOC_G_STD, v4l_vidioc_g_std, v4l_print_std, 0),
21121 + IOCTL_INFO_FNC(VIDIOC_S_STD, v4l_s_std, v4l_print_std, INFO_FL_PRIO),
21122 + IOCTL_INFO_FNC(VIDIOC_ENUMSTD, v4l_enumstd, v4l_print_standard, INFO_FL_CLEAR(v4l2_standard, index)),
21123 + IOCTL_INFO_FNC(VIDIOC_ENUMINPUT, v4l_enuminput, v4l_print_enuminput, INFO_FL_CLEAR(v4l2_input, index)),
21124 +@@ -2443,19 +2616,19 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
21125 + IOCTL_INFO_FNC(VIDIOC_S_CTRL, v4l_s_ctrl, v4l_print_control, INFO_FL_PRIO | INFO_FL_CTRL),
21126 + IOCTL_INFO_FNC(VIDIOC_G_TUNER, v4l_g_tuner, v4l_print_tuner, INFO_FL_CLEAR(v4l2_tuner, index)),
21127 + IOCTL_INFO_FNC(VIDIOC_S_TUNER, v4l_s_tuner, v4l_print_tuner, INFO_FL_PRIO),
21128 +- IOCTL_INFO_STD(VIDIOC_G_AUDIO, vidioc_g_audio, v4l_print_audio, 0),
21129 +- IOCTL_INFO_STD(VIDIOC_S_AUDIO, vidioc_s_audio, v4l_print_audio, INFO_FL_PRIO),
21130 ++ IOCTL_INFO_FNC(VIDIOC_G_AUDIO, v4l_vidioc_g_audio, v4l_print_audio, 0),
21131 ++ IOCTL_INFO_FNC(VIDIOC_S_AUDIO, v4l_vidioc_s_audio, v4l_print_audio, INFO_FL_PRIO),
21132 + IOCTL_INFO_FNC(VIDIOC_QUERYCTRL, v4l_queryctrl, v4l_print_queryctrl, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_queryctrl, id)),
21133 + IOCTL_INFO_FNC(VIDIOC_QUERYMENU, v4l_querymenu, v4l_print_querymenu, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_querymenu, index)),
21134 +- IOCTL_INFO_STD(VIDIOC_G_INPUT, vidioc_g_input, v4l_print_u32, 0),
21135 ++ IOCTL_INFO_FNC(VIDIOC_G_INPUT, v4l_vidioc_g_input, v4l_print_u32, 0),
21136 + IOCTL_INFO_FNC(VIDIOC_S_INPUT, v4l_s_input, v4l_print_u32, INFO_FL_PRIO),
21137 +- IOCTL_INFO_STD(VIDIOC_G_EDID, vidioc_g_edid, v4l_print_edid, 0),
21138 +- IOCTL_INFO_STD(VIDIOC_S_EDID, vidioc_s_edid, v4l_print_edid, INFO_FL_PRIO),
21139 +- IOCTL_INFO_STD(VIDIOC_G_OUTPUT, vidioc_g_output, v4l_print_u32, 0),
21140 ++ IOCTL_INFO_FNC(VIDIOC_G_EDID, v4l_vidioc_g_edid, v4l_print_edid, 0),
21141 ++ IOCTL_INFO_FNC(VIDIOC_S_EDID, v4l_vidioc_s_edid, v4l_print_edid, INFO_FL_PRIO),
21142 ++ IOCTL_INFO_FNC(VIDIOC_G_OUTPUT, v4l_vidioc_g_output, v4l_print_u32, 0),
21143 + IOCTL_INFO_FNC(VIDIOC_S_OUTPUT, v4l_s_output, v4l_print_u32, INFO_FL_PRIO),
21144 + IOCTL_INFO_FNC(VIDIOC_ENUMOUTPUT, v4l_enumoutput, v4l_print_enumoutput, INFO_FL_CLEAR(v4l2_output, index)),
21145 +- IOCTL_INFO_STD(VIDIOC_G_AUDOUT, vidioc_g_audout, v4l_print_audioout, 0),
21146 +- IOCTL_INFO_STD(VIDIOC_S_AUDOUT, vidioc_s_audout, v4l_print_audioout, INFO_FL_PRIO),
21147 ++ IOCTL_INFO_FNC(VIDIOC_G_AUDOUT, v4l_vidioc_g_audout, v4l_print_audioout, 0),
21148 ++ IOCTL_INFO_FNC(VIDIOC_S_AUDOUT, v4l_vidioc_s_audout, v4l_print_audioout, INFO_FL_PRIO),
21149 + IOCTL_INFO_FNC(VIDIOC_G_MODULATOR, v4l_g_modulator, v4l_print_modulator, INFO_FL_CLEAR(v4l2_modulator, index)),
21150 + IOCTL_INFO_FNC(VIDIOC_S_MODULATOR, v4l_s_modulator, v4l_print_modulator, INFO_FL_PRIO),
21151 + IOCTL_INFO_FNC(VIDIOC_G_FREQUENCY, v4l_g_frequency, v4l_print_frequency, INFO_FL_CLEAR(v4l2_frequency, tuner)),
21152 +@@ -2463,14 +2636,14 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
21153 + IOCTL_INFO_FNC(VIDIOC_CROPCAP, v4l_cropcap, v4l_print_cropcap, INFO_FL_CLEAR(v4l2_cropcap, type)),
21154 + IOCTL_INFO_FNC(VIDIOC_G_CROP, v4l_g_crop, v4l_print_crop, INFO_FL_CLEAR(v4l2_crop, type)),
21155 + IOCTL_INFO_FNC(VIDIOC_S_CROP, v4l_s_crop, v4l_print_crop, INFO_FL_PRIO),
21156 +- IOCTL_INFO_STD(VIDIOC_G_SELECTION, vidioc_g_selection, v4l_print_selection, INFO_FL_CLEAR(v4l2_selection, r)),
21157 +- IOCTL_INFO_STD(VIDIOC_S_SELECTION, vidioc_s_selection, v4l_print_selection, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_selection, r)),
21158 +- IOCTL_INFO_STD(VIDIOC_G_JPEGCOMP, vidioc_g_jpegcomp, v4l_print_jpegcompression, 0),
21159 +- IOCTL_INFO_STD(VIDIOC_S_JPEGCOMP, vidioc_s_jpegcomp, v4l_print_jpegcompression, INFO_FL_PRIO),
21160 ++ IOCTL_INFO_FNC(VIDIOC_G_SELECTION, v4l_vidioc_g_selection, v4l_print_selection, INFO_FL_CLEAR(v4l2_selection, r)),
21161 ++ IOCTL_INFO_FNC(VIDIOC_S_SELECTION, v4l_vidioc_s_selection, v4l_print_selection, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_selection, r)),
21162 ++ IOCTL_INFO_FNC(VIDIOC_G_JPEGCOMP, v4l_vidioc_g_jpegcomp, v4l_print_jpegcompression, 0),
21163 ++ IOCTL_INFO_FNC(VIDIOC_S_JPEGCOMP, v4l_vidioc_s_jpegcomp, v4l_print_jpegcompression, INFO_FL_PRIO),
21164 + IOCTL_INFO_FNC(VIDIOC_QUERYSTD, v4l_querystd, v4l_print_std, 0),
21165 + IOCTL_INFO_FNC(VIDIOC_TRY_FMT, v4l_try_fmt, v4l_print_format, 0),
21166 +- IOCTL_INFO_STD(VIDIOC_ENUMAUDIO, vidioc_enumaudio, v4l_print_audio, INFO_FL_CLEAR(v4l2_audio, index)),
21167 +- IOCTL_INFO_STD(VIDIOC_ENUMAUDOUT, vidioc_enumaudout, v4l_print_audioout, INFO_FL_CLEAR(v4l2_audioout, index)),
21168 ++ IOCTL_INFO_FNC(VIDIOC_ENUMAUDIO, v4l_vidioc_enumaudio, v4l_print_audio, INFO_FL_CLEAR(v4l2_audio, index)),
21169 ++ IOCTL_INFO_FNC(VIDIOC_ENUMAUDOUT, v4l_vidioc_enumaudout, v4l_print_audioout, INFO_FL_CLEAR(v4l2_audioout, index)),
21170 + IOCTL_INFO_FNC(VIDIOC_G_PRIORITY, v4l_g_priority, v4l_print_u32, 0),
21171 + IOCTL_INFO_FNC(VIDIOC_S_PRIORITY, v4l_s_priority, v4l_print_u32, INFO_FL_PRIO),
21172 + IOCTL_INFO_FNC(VIDIOC_G_SLICED_VBI_CAP, v4l_g_sliced_vbi_cap, v4l_print_sliced_vbi_cap, INFO_FL_CLEAR(v4l2_sliced_vbi_cap, type)),
21173 +@@ -2478,26 +2651,26 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
21174 + IOCTL_INFO_FNC(VIDIOC_G_EXT_CTRLS, v4l_g_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL),
21175 + IOCTL_INFO_FNC(VIDIOC_S_EXT_CTRLS, v4l_s_ext_ctrls, v4l_print_ext_controls, INFO_FL_PRIO | INFO_FL_CTRL),
21176 + IOCTL_INFO_FNC(VIDIOC_TRY_EXT_CTRLS, v4l_try_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL),
21177 +- IOCTL_INFO_STD(VIDIOC_ENUM_FRAMESIZES, vidioc_enum_framesizes, v4l_print_frmsizeenum, INFO_FL_CLEAR(v4l2_frmsizeenum, pixel_format)),
21178 +- IOCTL_INFO_STD(VIDIOC_ENUM_FRAMEINTERVALS, vidioc_enum_frameintervals, v4l_print_frmivalenum, INFO_FL_CLEAR(v4l2_frmivalenum, height)),
21179 +- IOCTL_INFO_STD(VIDIOC_G_ENC_INDEX, vidioc_g_enc_index, v4l_print_enc_idx, 0),
21180 +- IOCTL_INFO_STD(VIDIOC_ENCODER_CMD, vidioc_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
21181 +- IOCTL_INFO_STD(VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
21182 +- IOCTL_INFO_STD(VIDIOC_DECODER_CMD, vidioc_decoder_cmd, v4l_print_decoder_cmd, INFO_FL_PRIO),
21183 +- IOCTL_INFO_STD(VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0),
21184 ++ IOCTL_INFO_FNC(VIDIOC_ENUM_FRAMESIZES, v4l_vidioc_enum_framesizes, v4l_print_frmsizeenum, INFO_FL_CLEAR(v4l2_frmsizeenum, pixel_format)),
21185 ++ IOCTL_INFO_FNC(VIDIOC_ENUM_FRAMEINTERVALS, v4l_vidioc_enum_frameintervals, v4l_print_frmivalenum, INFO_FL_CLEAR(v4l2_frmivalenum, height)),
21186 ++ IOCTL_INFO_FNC(VIDIOC_G_ENC_INDEX, v4l_vidioc_g_enc_index, v4l_print_enc_idx, 0),
21187 ++ IOCTL_INFO_FNC(VIDIOC_ENCODER_CMD, v4l_vidioc_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
21188 ++ IOCTL_INFO_FNC(VIDIOC_TRY_ENCODER_CMD, v4l_vidioc_try_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
21189 ++ IOCTL_INFO_FNC(VIDIOC_DECODER_CMD, v4l_vidioc_decoder_cmd, v4l_print_decoder_cmd, INFO_FL_PRIO),
21190 ++ IOCTL_INFO_FNC(VIDIOC_TRY_DECODER_CMD, v4l_vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0),
21191 + IOCTL_INFO_FNC(VIDIOC_DBG_S_REGISTER, v4l_dbg_s_register, v4l_print_dbg_register, 0),
21192 + IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0),
21193 + IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO),
21194 +- IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO),
21195 +- IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0),
21196 ++ IOCTL_INFO_FNC(VIDIOC_S_DV_TIMINGS, v4l_vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO),
21197 ++ IOCTL_INFO_FNC(VIDIOC_G_DV_TIMINGS, v4l_vidioc_g_dv_timings, v4l_print_dv_timings, 0),
21198 + IOCTL_INFO_FNC(VIDIOC_DQEVENT, v4l_dqevent, v4l_print_event, 0),
21199 + IOCTL_INFO_FNC(VIDIOC_SUBSCRIBE_EVENT, v4l_subscribe_event, v4l_print_event_subscription, 0),
21200 + IOCTL_INFO_FNC(VIDIOC_UNSUBSCRIBE_EVENT, v4l_unsubscribe_event, v4l_print_event_subscription, 0),
21201 + IOCTL_INFO_FNC(VIDIOC_CREATE_BUFS, v4l_create_bufs, v4l_print_create_buffers, INFO_FL_PRIO | INFO_FL_QUEUE),
21202 + IOCTL_INFO_FNC(VIDIOC_PREPARE_BUF, v4l_prepare_buf, v4l_print_buffer, INFO_FL_QUEUE),
21203 +- IOCTL_INFO_STD(VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings, v4l_print_enum_dv_timings, 0),
21204 +- IOCTL_INFO_STD(VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings, v4l_print_dv_timings, 0),
21205 +- IOCTL_INFO_STD(VIDIOC_DV_TIMINGS_CAP, vidioc_dv_timings_cap, v4l_print_dv_timings_cap, INFO_FL_CLEAR(v4l2_dv_timings_cap, type)),
21206 ++ IOCTL_INFO_FNC(VIDIOC_ENUM_DV_TIMINGS, v4l_vidioc_enum_dv_timings, v4l_print_enum_dv_timings, 0),
21207 ++ IOCTL_INFO_FNC(VIDIOC_QUERY_DV_TIMINGS, v4l_vidioc_query_dv_timings, v4l_print_dv_timings, 0),
21208 ++ IOCTL_INFO_FNC(VIDIOC_DV_TIMINGS_CAP, v4l_vidioc_dv_timings_cap, v4l_print_dv_timings_cap, INFO_FL_CLEAR(v4l2_dv_timings_cap, type)),
21209 + IOCTL_INFO_FNC(VIDIOC_ENUM_FREQ_BANDS, v4l_enum_freq_bands, v4l_print_freq_band, 0),
21210 + IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_INFO, v4l_dbg_g_chip_info, v4l_print_dbg_chip_info, INFO_FL_CLEAR(v4l2_dbg_chip_info, match)),
21211 + IOCTL_INFO_FNC(VIDIOC_QUERY_EXT_CTRL, v4l_query_ext_ctrl, v4l_print_query_ext_ctrl, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_query_ext_ctrl, id)),
21212 +@@ -2566,7 +2739,7 @@ static long __video_do_ioctl(struct file *file,
21213 struct video_device *vfd = video_devdata(file);
21214 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
21215 bool write_only = false;
21216 @@ -50771,7 +55718,24 @@ index 7486af2..a1f2e87 100644
21217 const struct v4l2_ioctl_info *info;
21218 void *fh = file->private_data;
21219 struct v4l2_fh *vfh = NULL;
21220 -@@ -2657,7 +2658,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
21221 +@@ -2602,14 +2775,8 @@ static long __video_do_ioctl(struct file *file,
21222 + }
21223 +
21224 + write_only = _IOC_DIR(cmd) == _IOC_WRITE;
21225 +- if (info->flags & INFO_FL_STD) {
21226 +- typedef int (*vidioc_op)(struct file *file, void *fh, void *p);
21227 +- const void *p = vfd->ioctl_ops;
21228 +- const vidioc_op *vidioc = p + info->u.offset;
21229 +-
21230 +- ret = (*vidioc)(file, fh, arg);
21231 +- } else if (info->flags & INFO_FL_FUNC) {
21232 +- ret = info->u.func(ops, file, fh, arg);
21233 ++ if (info->flags & INFO_FL_FUNC) {
21234 ++ ret = info->func(ops, file, fh, arg);
21235 + } else if (!ops->vidioc_default) {
21236 + ret = -ENOTTY;
21237 + } else {
21238 +@@ -2657,7 +2824,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
21239 ret = -EINVAL;
21240 break;
21241 }
21242 @@ -50780,7 +55744,7 @@ index 7486af2..a1f2e87 100644
21243 *kernel_ptr = (void **)&buf->m.planes;
21244 *array_size = sizeof(struct v4l2_plane) * buf->length;
21245 ret = 1;
21246 -@@ -2674,7 +2675,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
21247 +@@ -2674,7 +2841,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
21248 ret = -EINVAL;
21249 break;
21250 }
21251 @@ -50789,7 +55753,7 @@ index 7486af2..a1f2e87 100644
21252 *kernel_ptr = (void **)&edid->edid;
21253 *array_size = edid->blocks * 128;
21254 ret = 1;
21255 -@@ -2692,7 +2693,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
21256 +@@ -2692,7 +2859,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
21257 ret = -EINVAL;
21258 break;
21259 }
21260 @@ -50798,7 +55762,7 @@ index 7486af2..a1f2e87 100644
21261 *kernel_ptr = (void **)&ctrls->controls;
21262 *array_size = sizeof(struct v4l2_ext_control)
21263 * ctrls->count;
21264 -@@ -2793,7 +2794,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
21265 +@@ -2793,7 +2960,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
21266 }
21267
21268 if (has_array_args) {
21269 @@ -50854,9 +55818,27 @@ index 6515dfc..3d39b80 100644
21270 gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
21271
21272 diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
21273 -index 5dcc031..e08ecd2 100644
21274 +index 5dcc031..d5e16c2 100644
21275 --- a/drivers/message/fusion/mptbase.c
21276 +++ b/drivers/message/fusion/mptbase.c
21277 +@@ -99,7 +99,7 @@ module_param(mpt_channel_mapping, int, 0);
21278 + MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)");
21279 +
21280 + static int mpt_debug_level;
21281 +-static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
21282 ++static int mpt_set_debug_level(const char *val, const struct kernel_param *kp);
21283 + module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
21284 + &mpt_debug_level, 0600);
21285 + MODULE_PARM_DESC(mpt_debug_level,
21286 +@@ -242,7 +242,7 @@ pci_enable_io_access(struct pci_dev *pdev)
21287 + pci_write_config_word(pdev, PCI_COMMAND, command_reg);
21288 + }
21289 +
21290 +-static int mpt_set_debug_level(const char *val, struct kernel_param *kp)
21291 ++static int mpt_set_debug_level(const char *val, const struct kernel_param *kp)
21292 + {
21293 + int ret = param_set_int(val, kp);
21294 + MPT_ADAPTER *ioc;
21295 @@ -6722,8 +6722,13 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
21296 seq_printf(m, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
21297 seq_printf(m, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
21298 @@ -50883,6 +55865,19 @@ index 5dcc031..e08ecd2 100644
21299 sz = (ioc->reply_sz * ioc->reply_depth) + 128;
21300 seq_printf(m, " {CurRepSz=%d} x {CurRepDepth=%d} = %d bytes ^= 0x%x\n",
21301 ioc->reply_sz, ioc->reply_depth, ioc->reply_sz*ioc->reply_depth, sz);
21302 +diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
21303 +index cbe9607..50db310 100644
21304 +--- a/drivers/message/fusion/mptlan.c
21305 ++++ b/drivers/message/fusion/mptlan.c
21306 +@@ -680,7 +680,7 @@ out:
21307 + }
21308 +
21309 + /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
21310 +-static int
21311 ++static netdev_tx_t
21312 + mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
21313 + {
21314 + struct mpt_lan_priv *priv = netdev_priv(dev);
21315 diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
21316 index 7ebccfa..a0cd0e6 100644
21317 --- a/drivers/message/fusion/mptsas.c
21318 @@ -50936,7 +55931,7 @@ index 7ebccfa..a0cd0e6 100644
21319 mptsas_get_port(struct mptsas_phyinfo *phy_info)
21320 {
21321 diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
21322 -index 0236cd7..53b10d7 100644
21323 +index 69d9fff..62cd090 100644
21324 --- a/drivers/mfd/ab8500-debugfs.c
21325 +++ b/drivers/mfd/ab8500-debugfs.c
21326 @@ -100,7 +100,7 @@ static int irq_last;
21327 @@ -50962,7 +55957,7 @@ index 05b9245..9f05055 100644
21328 .ident = "BBL6",
21329 .matches = {
21330 diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
21331 -index b0fe810..eee08c4 100644
21332 +index 70443b1..e6da89d 100644
21333 --- a/drivers/mfd/max8925-i2c.c
21334 +++ b/drivers/mfd/max8925-i2c.c
21335 @@ -152,7 +152,7 @@ static int max8925_probe(struct i2c_client *client,
21336 @@ -51031,7 +56026,7 @@ index cc8645b..7cc15e4 100644
21337 c2dev->dev = device_create(c2port_class, NULL, 0, c2dev,
21338 "c2port%d", c2dev->id);
21339 diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
21340 -index 99635dd..5098638 100644
21341 +index 99635dd..255bd78 100644
21342 --- a/drivers/misc/kgdbts.c
21343 +++ b/drivers/misc/kgdbts.c
21344 @@ -834,7 +834,7 @@ static void run_plant_and_detach_test(int is_early)
21345 @@ -51052,6 +56047,15 @@ index 99635dd..5098638 100644
21346 BREAK_INSTR_SIZE);
21347 if (memcmp(before, after, BREAK_INSTR_SIZE)) {
21348 printk(KERN_CRIT "kgdbts: ERROR kgdb corrupted memory\n");
21349 +@@ -1130,7 +1130,7 @@ static void kgdbts_put_char(u8 chr)
21350 + ts.run_test(0, chr);
21351 + }
21352 +
21353 +-static int param_set_kgdbts_var(const char *kmessage, struct kernel_param *kp)
21354 ++static int param_set_kgdbts_var(const char *kmessage, const struct kernel_param *kp)
21355 + {
21356 + int len = strlen(kmessage);
21357 +
21358 diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
21359 index fb8705f..dc2f679 100644
21360 --- a/drivers/misc/lis3lv02d/lis3lv02d.c
21361 @@ -51403,10 +56407,42 @@ index c862cd4..0d176fe 100644
21362 extern struct xpc_interface xpc_interface;
21363
21364 diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c
21365 -index 01be66d..e3a0c7e 100644
21366 +index 01be66d..4a305b4 100644
21367 --- a/drivers/misc/sgi-xp/xp_main.c
21368 +++ b/drivers/misc/sgi-xp/xp_main.c
21369 -@@ -78,13 +78,13 @@ xpc_notloaded(void)
21370 +@@ -71,20 +71,42 @@ EXPORT_SYMBOL_GPL(xpc_registrations);
21371 + /*
21372 + * Initialize the XPC interface to indicate that XPC isn't loaded.
21373 + */
21374 +-static enum xp_retval
21375 +-xpc_notloaded(void)
21376 ++static void xpc_notloaded_connect(int ch_number)
21377 ++{
21378 ++}
21379 ++
21380 ++static void xpc_notloaded_disconnect(int ch_number)
21381 ++{
21382 ++}
21383 ++
21384 ++static enum xp_retval xpc_notloaded_send(short partid, int ch_number, u32 flags, void *payload,
21385 ++ u16 payload_size)
21386 ++{
21387 ++ return xpNotLoaded;
21388 ++}
21389 ++
21390 ++static enum xp_retval xpc_notloaded_send_notify(short partid, int ch_number, u32 flags, void *payload,
21391 ++ u16 payload_size, xpc_notify_func func, void *key)
21392 ++{
21393 ++ return xpNotLoaded;
21394 ++}
21395 ++
21396 ++static void xpc_notloaded_received(short partid, int ch_number, void *payload)
21397 ++{
21398 ++}
21399 ++
21400 ++static enum xp_retval xpc_notloaded_partid_to_nasids(short partid, void *nasid_mask)
21401 + {
21402 + return xpNotLoaded;
21403 }
21404
21405 struct xpc_interface xpc_interface = {
21406 @@ -51414,18 +56450,42 @@ index 01be66d..e3a0c7e 100644
21407 - (void (*)(int))xpc_notloaded,
21408 - (enum xp_retval(*)(short, int, u32, void *, u16))xpc_notloaded,
21409 - (enum xp_retval(*)(short, int, u32, void *, u16, xpc_notify_func,
21410 -+ .connect = (void (*)(int))xpc_notloaded,
21411 -+ .disconnect = (void (*)(int))xpc_notloaded,
21412 -+ .send = (enum xp_retval(*)(short, int, u32, void *, u16))xpc_notloaded,
21413 -+ .send_notify = (enum xp_retval(*)(short, int, u32, void *, u16, xpc_notify_func,
21414 - void *))xpc_notloaded,
21415 +- void *))xpc_notloaded,
21416 - (void (*)(short, int, void *))xpc_notloaded,
21417 - (enum xp_retval(*)(short, void *))xpc_notloaded
21418 -+ .received = (void (*)(short, int, void *))xpc_notloaded,
21419 -+ .partid_to_nasids = (enum xp_retval(*)(short, void *))xpc_notloaded
21420 ++ .connect = xpc_notloaded_connect,
21421 ++ .disconnect = xpc_notloaded_disconnect,
21422 ++ .send = xpc_notloaded_send,
21423 ++ .send_notify = xpc_notloaded_send_notify,
21424 ++ .received = xpc_notloaded_received,
21425 ++ .partid_to_nasids = xpc_notloaded_partid_to_nasids
21426 };
21427 EXPORT_SYMBOL_GPL(xpc_interface);
21428
21429 +@@ -115,17 +137,12 @@ EXPORT_SYMBOL_GPL(xpc_set_interface);
21430 + void
21431 + xpc_clear_interface(void)
21432 + {
21433 +- xpc_interface.connect = (void (*)(int))xpc_notloaded;
21434 +- xpc_interface.disconnect = (void (*)(int))xpc_notloaded;
21435 +- xpc_interface.send = (enum xp_retval(*)(short, int, u32, void *, u16))
21436 +- xpc_notloaded;
21437 +- xpc_interface.send_notify = (enum xp_retval(*)(short, int, u32, void *,
21438 +- u16, xpc_notify_func,
21439 +- void *))xpc_notloaded;
21440 +- xpc_interface.received = (void (*)(short, int, void *))
21441 +- xpc_notloaded;
21442 +- xpc_interface.partid_to_nasids = (enum xp_retval(*)(short, void *))
21443 +- xpc_notloaded;
21444 ++ xpc_interface.connect = xpc_notloaded_connect;
21445 ++ xpc_interface.disconnect = xpc_notloaded_disconnect;
21446 ++ xpc_interface.send = xpc_notloaded_send;
21447 ++ xpc_interface.send_notify = xpc_notloaded_send_notify;
21448 ++ xpc_interface.received = xpc_notloaded_received;
21449 ++ xpc_interface.partid_to_nasids = xpc_notloaded_partid_to_nasids;
21450 + }
21451 + EXPORT_SYMBOL_GPL(xpc_clear_interface);
21452 +
21453 diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
21454 index b94d5f7..7f494c5 100644
21455 --- a/drivers/misc/sgi-xp/xpc.h
21456 @@ -51460,6 +56520,114 @@ index 7f32712..8539ab2 100644
21457
21458 /*
21459 * Timer function to enforce the timelimit on the partition disengage.
21460 +diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
21461 +index 557f978..c8ce9fb 100644
21462 +--- a/drivers/misc/sgi-xp/xpnet.c
21463 ++++ b/drivers/misc/sgi-xp/xpnet.c
21464 +@@ -421,7 +421,7 @@ xpnet_send(struct sk_buff *skb, struct xpnet_pending_msg *queued_msg,
21465 + * destination partid. If the destination partid octets are 0xffff,
21466 + * this packet is to be broadcast to all connected partitions.
21467 + */
21468 +-static int
21469 ++static netdev_tx_t
21470 + xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
21471 + {
21472 + struct xpnet_pending_msg *queued_msg;
21473 +diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
21474 +index 71b6455..9cc7886 100644
21475 +--- a/drivers/misc/ti-st/st_kim.c
21476 ++++ b/drivers/misc/ti-st/st_kim.c
21477 +@@ -582,9 +582,10 @@ static int show_list(struct seq_file *s, void *unused)
21478 + return 0;
21479 + }
21480 +
21481 +-static ssize_t show_install(struct device *dev,
21482 +- struct device_attribute *attr, char *buf)
21483 ++static ssize_t show_install(struct kobject *_dev,
21484 ++ struct kobj_attribute *attr, char *buf)
21485 + {
21486 ++ struct device *dev = (struct device *)_dev;
21487 + struct kim_data_s *kim_data = dev_get_drvdata(dev);
21488 + return sprintf(buf, "%d\n", kim_data->ldisc_install);
21489 + }
21490 +@@ -611,47 +612,50 @@ static ssize_t store_baud_rate(struct device *dev,
21491 + }
21492 + #endif /* if DEBUG */
21493 +
21494 +-static ssize_t show_dev_name(struct device *dev,
21495 +- struct device_attribute *attr, char *buf)
21496 ++static ssize_t show_dev_name(struct kobject *_dev,
21497 ++ struct kobj_attribute *attr, char *buf)
21498 + {
21499 ++ struct device *dev = (struct device *)_dev;
21500 + struct kim_data_s *kim_data = dev_get_drvdata(dev);
21501 + return sprintf(buf, "%s\n", kim_data->dev_name);
21502 + }
21503 +
21504 +-static ssize_t show_baud_rate(struct device *dev,
21505 +- struct device_attribute *attr, char *buf)
21506 ++static ssize_t show_baud_rate(struct kobject *_dev,
21507 ++ struct kobj_attribute *attr, char *buf)
21508 + {
21509 ++ struct device *dev = (struct device *)_dev;
21510 + struct kim_data_s *kim_data = dev_get_drvdata(dev);
21511 + return sprintf(buf, "%d\n", kim_data->baud_rate);
21512 + }
21513 +
21514 +-static ssize_t show_flow_cntrl(struct device *dev,
21515 +- struct device_attribute *attr, char *buf)
21516 ++static ssize_t show_flow_cntrl(struct kobject *_dev,
21517 ++ struct kobj_attribute *attr, char *buf)
21518 + {
21519 ++ struct device *dev = (struct device *)_dev;
21520 + struct kim_data_s *kim_data = dev_get_drvdata(dev);
21521 + return sprintf(buf, "%d\n", kim_data->flow_cntrl);
21522 + }
21523 +
21524 + /* structures specific for sysfs entries */
21525 + static struct kobj_attribute ldisc_install =
21526 +-__ATTR(install, 0444, (void *)show_install, NULL);
21527 ++__ATTR(install, 0444, show_install, NULL);
21528 +
21529 + static struct kobj_attribute uart_dev_name =
21530 + #ifdef DEBUG /* TODO: move this to debug-fs if possible */
21531 +-__ATTR(dev_name, 0644, (void *)show_dev_name, (void *)store_dev_name);
21532 ++__ATTR(dev_name, 0644, show_dev_name, store_dev_name);
21533 + #else
21534 +-__ATTR(dev_name, 0444, (void *)show_dev_name, NULL);
21535 ++__ATTR(dev_name, 0444, show_dev_name, NULL);
21536 + #endif
21537 +
21538 + static struct kobj_attribute uart_baud_rate =
21539 + #ifdef DEBUG /* TODO: move to debugfs */
21540 +-__ATTR(baud_rate, 0644, (void *)show_baud_rate, (void *)store_baud_rate);
21541 ++__ATTR(baud_rate, 0644, show_baud_rate, store_baud_rate);
21542 + #else
21543 +-__ATTR(baud_rate, 0444, (void *)show_baud_rate, NULL);
21544 ++__ATTR(baud_rate, 0444, show_baud_rate, NULL);
21545 + #endif
21546 +
21547 + static struct kobj_attribute uart_flow_cntrl =
21548 +-__ATTR(flow_cntrl, 0444, (void *)show_flow_cntrl, NULL);
21549 ++__ATTR(flow_cntrl, 0444, show_flow_cntrl, NULL);
21550 +
21551 + static struct attribute *uim_attrs[] = {
21552 + &ldisc_install.attr,
21553 +diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
21554 +index 7fc9174..bf669b2 100644
21555 +--- a/drivers/mmc/card/mmc_test.c
21556 ++++ b/drivers/mmc/card/mmc_test.c
21557 +@@ -2076,8 +2076,8 @@ static int mmc_test_rw_multiple_size(struct mmc_test_card *test,
21558 + {
21559 + int ret = 0;
21560 + int i;
21561 +- void *pre_req = test->card->host->ops->pre_req;
21562 +- void *post_req = test->card->host->ops->post_req;
21563 ++ void (*pre_req)(struct mmc_host *, struct mmc_request *, bool) = test->card->host->ops->pre_req;
21564 ++ void (*post_req)(struct mmc_host *, struct mmc_request *, int) = test->card->host->ops->post_req;
21565 +
21566 + if (rw->do_nonblock_req &&
21567 + ((!pre_req && post_req) || (pre_req && !post_req))) {
21568 diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
21569 index f695b58..7b7d017 100644
21570 --- a/drivers/mmc/host/dw_mmc.h
21571 @@ -51472,10 +56640,10 @@ index f695b58..7b7d017 100644
21572 +} __do_const;
21573 #endif /* _DW_MMC_H_ */
21574 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
21575 -index acece32..a872279 100644
21576 +index 0d6ca41..d438654 100644
21577 --- a/drivers/mmc/host/mmci.c
21578 +++ b/drivers/mmc/host/mmci.c
21579 -@@ -1633,7 +1633,9 @@ static int mmci_probe(struct amba_device *dev,
21580 +@@ -1634,7 +1634,9 @@ static int mmci_probe(struct amba_device *dev,
21581 mmc->caps |= MMC_CAP_CMD23;
21582
21583 if (variant->busy_detect) {
21584 @@ -51487,7 +56655,7 @@ index acece32..a872279 100644
21585 mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
21586 mmc->max_busy_timeout = 0;
21587 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
21588 -index 7fb0753..ad156f0 100644
21589 +index f6e4d97..57358ff 100644
21590 --- a/drivers/mmc/host/omap_hsmmc.c
21591 +++ b/drivers/mmc/host/omap_hsmmc.c
21592 @@ -2088,7 +2088,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
21593 @@ -51502,10 +56670,10 @@ index 7fb0753..ad156f0 100644
21594
21595 device_init_wakeup(&pdev->dev, true);
21596 diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
21597 -index 1f1582f..b396c3a 100644
21598 +index f25f292..a0e1250 100644
21599 --- a/drivers/mmc/host/sdhci-esdhc-imx.c
21600 +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
21601 -@@ -1191,9 +1191,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
21602 +@@ -1194,9 +1194,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
21603 host->ioaddr + 0x6c);
21604 }
21605
21606 @@ -51552,8 +56720,169 @@ index 9a1a6ff..b8f1a57 100644
21607
21608 if (!ECCBUF_SIZE) {
21609 /* We should fall back to a general writev implementation.
21610 +diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
21611 +index e2c0057..b468819 100644
21612 +--- a/drivers/mtd/devices/block2mtd.c
21613 ++++ b/drivers/mtd/devices/block2mtd.c
21614 +@@ -431,7 +431,7 @@ static int block2mtd_setup2(const char *val)
21615 + }
21616 +
21617 +
21618 +-static int block2mtd_setup(const char *val, struct kernel_param *kp)
21619 ++static int block2mtd_setup(const char *val, const struct kernel_param *kp)
21620 + {
21621 + #ifdef MODULE
21622 + return block2mtd_setup2(val);
21623 +diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
21624 +index 8b66e52..7287696 100644
21625 +--- a/drivers/mtd/devices/phram.c
21626 ++++ b/drivers/mtd/devices/phram.c
21627 +@@ -266,7 +266,7 @@ static int phram_setup(const char *val)
21628 + return ret;
21629 + }
21630 +
21631 +-static int phram_param_call(const char *val, struct kernel_param *kp)
21632 ++static int phram_param_call(const char *val, const struct kernel_param *kp)
21633 + {
21634 + #ifdef MODULE
21635 + return phram_setup(val);
21636 +diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
21637 +index 385305e..8051e87 100644
21638 +--- a/drivers/mtd/maps/gpio-addr-flash.c
21639 ++++ b/drivers/mtd/maps/gpio-addr-flash.c
21640 +@@ -128,7 +128,7 @@ static void gf_copy_from(struct map_info *map, void *to, unsigned long from, ssi
21641 + * @map: MTD map state
21642 + * @ofs: desired offset to write
21643 + */
21644 +-static void gf_write(struct map_info *map, map_word d1, unsigned long ofs)
21645 ++static void gf_write(struct map_info *map, const map_word d1, unsigned long ofs)
21646 + {
21647 + struct async_state *state = gf_map_info_to_state(map);
21648 + uint16_t d;
21649 +diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
21650 +index 6dc97aa..c251b90 100644
21651 +--- a/drivers/mtd/maps/latch-addr-flash.c
21652 ++++ b/drivers/mtd/maps/latch-addr-flash.c
21653 +@@ -52,7 +52,7 @@ static map_word lf_read(struct map_info *map, unsigned long ofs)
21654 + return datum;
21655 + }
21656 +
21657 +-static void lf_write(struct map_info *map, map_word datum, unsigned long ofs)
21658 ++static void lf_write(struct map_info *map, const map_word datum, unsigned long ofs)
21659 + {
21660 + struct latch_addr_flash_info *info;
21661 +
21662 +diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
21663 +index eb0242e..1a4c5b9 100644
21664 +--- a/drivers/mtd/maps/pci.c
21665 ++++ b/drivers/mtd/maps/pci.c
21666 +@@ -59,13 +59,13 @@ static void mtd_pci_copyfrom(struct map_info *_map, void *to, unsigned long from
21667 + memcpy_fromio(to, map->base + map->translate(map, from), len);
21668 + }
21669 +
21670 +-static void mtd_pci_write8(struct map_info *_map, map_word val, unsigned long ofs)
21671 ++static void mtd_pci_write8(struct map_info *_map, const map_word val, unsigned long ofs)
21672 + {
21673 + struct map_pci_info *map = (struct map_pci_info *)_map;
21674 + writeb(val.x[0], map->base + map->translate(map, ofs));
21675 + }
21676 +
21677 +-static void mtd_pci_write32(struct map_info *_map, map_word val, unsigned long ofs)
21678 ++static void mtd_pci_write32(struct map_info *_map, const map_word val, unsigned long ofs)
21679 + {
21680 + struct map_pci_info *map = (struct map_pci_info *)_map;
21681 + writel(val.x[0], map->base + map->translate(map, ofs));
21682 +diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
21683 +index 70bb403..3ae94c6 100644
21684 +--- a/drivers/mtd/maps/pcmciamtd.c
21685 ++++ b/drivers/mtd/maps/pcmciamtd.c
21686 +@@ -161,7 +161,7 @@ static void pcmcia_copy_from_remap(struct map_info *map, void *to, unsigned long
21687 + }
21688 +
21689 +
21690 +-static void pcmcia_write8_remap(struct map_info *map, map_word d, unsigned long adr)
21691 ++static void pcmcia_write8_remap(struct map_info *map, const map_word d, unsigned long adr)
21692 + {
21693 + void __iomem *addr = remap_window(map, adr);
21694 +
21695 +@@ -173,7 +173,7 @@ static void pcmcia_write8_remap(struct map_info *map, map_word d, unsigned long
21696 + }
21697 +
21698 +
21699 +-static void pcmcia_write16_remap(struct map_info *map, map_word d, unsigned long adr)
21700 ++static void pcmcia_write16_remap(struct map_info *map, const map_word d, unsigned long adr)
21701 + {
21702 + void __iomem *addr = remap_window(map, adr);
21703 + if(!addr)
21704 +@@ -256,7 +256,7 @@ static void pcmcia_copy_from(struct map_info *map, void *to, unsigned long from,
21705 + }
21706 +
21707 +
21708 +-static void pcmcia_write8(struct map_info *map, map_word d, unsigned long adr)
21709 ++static void pcmcia_write8(struct map_info *map, const map_word d, unsigned long adr)
21710 + {
21711 + void __iomem *win_base = (void __iomem *)map->map_priv_2;
21712 +
21713 +@@ -269,7 +269,7 @@ static void pcmcia_write8(struct map_info *map, map_word d, unsigned long adr)
21714 + }
21715 +
21716 +
21717 +-static void pcmcia_write16(struct map_info *map, map_word d, unsigned long adr)
21718 ++static void pcmcia_write16(struct map_info *map, const map_word d, unsigned long adr)
21719 + {
21720 + void __iomem *win_base = (void __iomem *)map->map_priv_2;
21721 +
21722 +diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c
21723 +index 556a2df..e771329 100644
21724 +--- a/drivers/mtd/maps/sbc_gxx.c
21725 ++++ b/drivers/mtd/maps/sbc_gxx.c
21726 +@@ -138,7 +138,7 @@ static void sbc_gxx_copy_from(struct map_info *map, void *to, unsigned long from
21727 + }
21728 + }
21729 +
21730 +-static void sbc_gxx_write8(struct map_info *map, map_word d, unsigned long adr)
21731 ++static void sbc_gxx_write8(struct map_info *map, const map_word d, unsigned long adr)
21732 + {
21733 + spin_lock(&sbc_gxx_spin);
21734 + sbc_gxx_page(map, adr);
21735 +diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
21736 +index aa1a616..a47a33d 100644
21737 +--- a/drivers/mtd/nand/cafe_nand.c
21738 ++++ b/drivers/mtd/nand/cafe_nand.c
21739 +@@ -345,7 +345,17 @@ static irqreturn_t cafe_nand_interrupt(int irq, void *id)
21740 + return IRQ_HANDLED;
21741 + }
21742 +
21743 +-static void cafe_nand_bug(struct mtd_info *mtd)
21744 ++static void cafe_nand_bug_hwctl(struct mtd_info *mtd, int mode)
21745 ++{
21746 ++ BUG();
21747 ++}
21748 ++
21749 ++static int cafe_nand_bug_calculate(struct mtd_info *mtd, const uint8_t *dat, uint8_t *ecc_code)
21750 ++{
21751 ++ BUG();
21752 ++}
21753 ++
21754 ++static int cafe_nand_bug_correct(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, uint8_t *calc_ecc)
21755 + {
21756 + BUG();
21757 + }
21758 +@@ -760,9 +770,9 @@ static int cafe_nand_probe(struct pci_dev *pdev,
21759 + cafe->nand.ecc.size = mtd->writesize;
21760 + cafe->nand.ecc.bytes = 14;
21761 + cafe->nand.ecc.strength = 4;
21762 +- cafe->nand.ecc.hwctl = (void *)cafe_nand_bug;
21763 +- cafe->nand.ecc.calculate = (void *)cafe_nand_bug;
21764 +- cafe->nand.ecc.correct = (void *)cafe_nand_bug;
21765 ++ cafe->nand.ecc.hwctl = cafe_nand_bug_hwctl;
21766 ++ cafe->nand.ecc.calculate = cafe_nand_bug_calculate;
21767 ++ cafe->nand.ecc.correct = cafe_nand_bug_correct;
21768 + cafe->nand.ecc.write_page = cafe_nand_write_page_lowlevel;
21769 + cafe->nand.ecc.write_oob = cafe_nand_write_oob;
21770 + cafe->nand.ecc.read_page = cafe_nand_read_page;
21771 diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
21772 -index 67eb2be..d1e2bf5 100644
21773 +index 30bf5f6..9bb67d1 100644
21774 --- a/drivers/mtd/nand/denali.c
21775 +++ b/drivers/mtd/nand/denali.c
21776 @@ -24,6 +24,7 @@
21777 @@ -51565,7 +56894,7 @@ index 67eb2be..d1e2bf5 100644
21778 #include "denali.h"
21779
21780 diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
21781 -index 2064ada..7c62920 100644
21782 +index 235ddcb..778a09d 100644
21783 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
21784 +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
21785 @@ -386,7 +386,7 @@ void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr)
21786 @@ -51590,7 +56919,7 @@ index a5dfbfb..8042ab4 100644
21787 #include <linux/mtd/nand.h>
21788 #include <linux/mtd/nftl.h>
21789 diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
21790 -index c23184a..4115c41 100644
21791 +index b096f8b..727cc94 100644
21792 --- a/drivers/mtd/sm_ftl.c
21793 +++ b/drivers/mtd/sm_ftl.c
21794 @@ -56,7 +56,7 @@ static ssize_t sm_attr_show(struct device *dev, struct device_attribute *attr,
21795 @@ -51602,6 +56931,19 @@ index c23184a..4115c41 100644
21796 struct attribute **attributes;
21797 struct sm_sysfs_attribute *vendor_attribute;
21798 char *vendor;
21799 +diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
21800 +index 22fd19c..54e16b1 100644
21801 +--- a/drivers/mtd/ubi/build.c
21802 ++++ b/drivers/mtd/ubi/build.c
21803 +@@ -1377,7 +1377,7 @@ static int __init bytes_str_to_int(const char *str)
21804 + * This function returns zero in case of success and a negative error code in
21805 + * case of error.
21806 + */
21807 +-static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
21808 ++static int __init ubi_mtd_param_parse(const char *val, const struct kernel_param *kp)
21809 + {
21810 + int i, len;
21811 + struct mtd_dev_param *p;
21812 diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
21813 index db760e8..d53ca99 100644
21814 --- a/drivers/net/bonding/bond_netlink.c
21815 @@ -51616,9 +56958,18 @@ index db760e8..d53ca99 100644
21816 .priv_size = sizeof(struct bonding),
21817 .setup = bond_setup,
21818 diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
21819 -index 615c65d..c6c0439 100644
21820 +index 615c65d..e45dc26 100644
21821 --- a/drivers/net/caif/caif_hsi.c
21822 +++ b/drivers/net/caif/caif_hsi.c
21823 +@@ -1011,7 +1011,7 @@ static void cfhsi_aggregation_tout(unsigned long arg)
21824 + cfhsi_start_tx(cfhsi);
21825 + }
21826 +
21827 +-static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
21828 ++static netdev_tx_t cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
21829 + {
21830 + struct cfhsi *cfhsi = NULL;
21831 + int start_xfer = 0;
21832 @@ -1444,7 +1444,7 @@ err:
21833 return -ENODEV;
21834 }
21835 @@ -51628,6 +56979,45 @@ index 615c65d..c6c0439 100644
21836 .kind = "cfhsi",
21837 .priv_size = sizeof(struct cfhsi),
21838 .setup = cfhsi_setup,
21839 +diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
21840 +index c2dea49..4bf83b5 100644
21841 +--- a/drivers/net/caif/caif_serial.c
21842 ++++ b/drivers/net/caif/caif_serial.c
21843 +@@ -277,7 +277,7 @@ error:
21844 + return tty_wr;
21845 + }
21846 +
21847 +-static int caif_xmit(struct sk_buff *skb, struct net_device *dev)
21848 ++static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev)
21849 + {
21850 + struct ser_device *ser;
21851 +
21852 +diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
21853 +index 4721948..7d77dde 100644
21854 +--- a/drivers/net/caif/caif_spi.c
21855 ++++ b/drivers/net/caif/caif_spi.c
21856 +@@ -486,7 +486,7 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc)
21857 + complete(&cfspi->comp);
21858 + }
21859 +
21860 +-static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
21861 ++static netdev_tx_t cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
21862 + {
21863 + struct cfspi *cfspi = NULL;
21864 + unsigned long flags;
21865 +diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
21866 +index b306210..c5345de 100644
21867 +--- a/drivers/net/caif/caif_virtio.c
21868 ++++ b/drivers/net/caif/caif_virtio.c
21869 +@@ -519,7 +519,7 @@ err:
21870 + }
21871 +
21872 + /* Put the CAIF packet on the virtio ring and kick the receiver */
21873 +-static int cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
21874 ++static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
21875 + {
21876 + struct cfv_info *cfv = netdev_priv(netdev);
21877 + struct buf_info *buf_info;
21878 diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
21879 index 6d04183..d69aee9 100644
21880 --- a/drivers/net/can/Kconfig
21881 @@ -51654,6 +57044,19 @@ index 141c2a4..ca734ed 100644
21882 .kind = "can",
21883 .maxtype = IFLA_CAN_MAX,
21884 .policy = can_policy,
21885 +diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
21886 +index 5d04f54..9586a90 100644
21887 +--- a/drivers/net/can/janz-ican3.c
21888 ++++ b/drivers/net/can/janz-ican3.c
21889 +@@ -1598,7 +1598,7 @@ static int ican3_stop(struct net_device *ndev)
21890 + return 0;
21891 + }
21892 +
21893 +-static int ican3_xmit(struct sk_buff *skb, struct net_device *ndev)
21894 ++static netdev_tx_t ican3_xmit(struct sk_buff *skb, struct net_device *ndev)
21895 + {
21896 + struct ican3_dev *mod = netdev_priv(ndev);
21897 + struct can_frame *cf = (struct can_frame *)skb->data;
21898 diff --git a/drivers/net/can/led.c b/drivers/net/can/led.c
21899 index c1b6676..50a8a51 100644
21900 --- a/drivers/net/can/led.c
21901 @@ -51667,6 +57070,19 @@ index c1b6676..50a8a51 100644
21902 .notifier_call = can_led_notifier,
21903 };
21904
21905 +diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c
21906 +index 68ef0a4..9e4938b 100644
21907 +--- a/drivers/net/can/sun4i_can.c
21908 ++++ b/drivers/net/can/sun4i_can.c
21909 +@@ -409,7 +409,7 @@ static int sun4ican_set_mode(struct net_device *dev, enum can_mode mode)
21910 + * xx xx xx xx ff ll 00 11 22 33 44 55 66 77
21911 + * [ can_id ] [flags] [len] [can data (up to 8 bytes]
21912 + */
21913 +-static int sun4ican_start_xmit(struct sk_buff *skb, struct net_device *dev)
21914 ++static netdev_tx_t sun4ican_start_xmit(struct sk_buff *skb, struct net_device *dev)
21915 + {
21916 + struct sun4ican_priv *priv = netdev_priv(dev);
21917 + struct can_frame *cf = (struct can_frame *)skb->data;
21918 diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
21919 index 674f367..ec3a31f 100644
21920 --- a/drivers/net/can/vcan.c
21921 @@ -51680,6 +57096,19 @@ index 674f367..ec3a31f 100644
21922 .kind = "vcan",
21923 .setup = vcan_setup,
21924 };
21925 +diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
21926 +index c71a035..08768ce 100644
21927 +--- a/drivers/net/can/xilinx_can.c
21928 ++++ b/drivers/net/can/xilinx_can.c
21929 +@@ -386,7 +386,7 @@ static int xcan_do_set_mode(struct net_device *ndev, enum can_mode mode)
21930 + *
21931 + * Return: 0 on success and failure value on error
21932 + */
21933 +-static int xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev)
21934 ++static netdev_tx_t xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev)
21935 + {
21936 + struct xcan_priv *priv = netdev_priv(ndev);
21937 + struct net_device_stats *stats = &ndev->stats;
21938 diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
21939 index 69fc840..77a32fc 100644
21940 --- a/drivers/net/dummy.c
21941 @@ -51694,10 +57123,10 @@ index 69fc840..77a32fc 100644
21942 .setup = dummy_setup,
21943 .validate = dummy_validate,
21944 diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
21945 -index 0443654..4f0aa18 100644
21946 +index c89b9ae..7dcddfd 100644
21947 --- a/drivers/net/ethernet/8390/ax88796.c
21948 +++ b/drivers/net/ethernet/8390/ax88796.c
21949 -@@ -889,9 +889,11 @@ static int ax_probe(struct platform_device *pdev)
21950 +@@ -878,9 +878,11 @@ static int ax_probe(struct platform_device *pdev)
21951 if (ax->plat->reg_offsets)
21952 ei_local->reg_offset = ax->plat->reg_offsets;
21953 else {
21954 @@ -51710,11 +57139,88 @@ index 0443654..4f0aa18 100644
21955 }
21956
21957 if (!request_mem_region(mem->start, mem_size, pdev->name)) {
21958 +diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c
21959 +index ec6eac1..4426e27 100644
21960 +--- a/drivers/net/ethernet/8390/axnet_cs.c
21961 ++++ b/drivers/net/ethernet/8390/axnet_cs.c
21962 +@@ -96,7 +96,7 @@ static void get_8390_hdr(struct net_device *,
21963 + static void block_input(struct net_device *dev, int count,
21964 + struct sk_buff *skb, int ring_offset);
21965 + static void block_output(struct net_device *dev, int count,
21966 +- const u_char *buf, const int start_page);
21967 ++ const u_char *buf, int start_page);
21968 +
21969 + static void axnet_detach(struct pcmcia_device *p_dev);
21970 +
21971 +@@ -667,7 +667,7 @@ static void block_input(struct net_device *dev, int count,
21972 + /*====================================================================*/
21973 +
21974 + static void block_output(struct net_device *dev, int count,
21975 +- const u_char *buf, const int start_page)
21976 ++ const u_char *buf, int start_page)
21977 + {
21978 + unsigned int nic_base = dev->base_addr;
21979 +
21980 +diff --git a/drivers/net/ethernet/8390/ne2k-pci.c b/drivers/net/ethernet/8390/ne2k-pci.c
21981 +index 57e9791..c93b6a0 100644
21982 +--- a/drivers/net/ethernet/8390/ne2k-pci.c
21983 ++++ b/drivers/net/ethernet/8390/ne2k-pci.c
21984 +@@ -172,8 +172,8 @@ static void ne2k_pci_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *
21985 + int ring_page);
21986 + static void ne2k_pci_block_input(struct net_device *dev, int count,
21987 + struct sk_buff *skb, int ring_offset);
21988 +-static void ne2k_pci_block_output(struct net_device *dev, const int count,
21989 +- const unsigned char *buf, const int start_page);
21990 ++static void ne2k_pci_block_output(struct net_device *dev, int count,
21991 ++ const unsigned char *buf, int start_page);
21992 + static const struct ethtool_ops ne2k_pci_ethtool_ops;
21993 +
21994 +
21995 +@@ -563,7 +563,7 @@ static void ne2k_pci_block_input(struct net_device *dev, int count,
21996 + }
21997 +
21998 + static void ne2k_pci_block_output(struct net_device *dev, int count,
21999 +- const unsigned char *buf, const int start_page)
22000 ++ const unsigned char *buf, int start_page)
22001 + {
22002 + long nic_base = NE_BASE;
22003 + unsigned long dma_start;
22004 +diff --git a/drivers/net/ethernet/8390/pcnet_cs.c b/drivers/net/ethernet/8390/pcnet_cs.c
22005 +index 2f79d29..ed5a64e 100644
22006 +--- a/drivers/net/ethernet/8390/pcnet_cs.c
22007 ++++ b/drivers/net/ethernet/8390/pcnet_cs.c
22008 +@@ -1208,7 +1208,7 @@ static void dma_block_input(struct net_device *dev, int count,
22009 + /*====================================================================*/
22010 +
22011 + static void dma_block_output(struct net_device *dev, int count,
22012 +- const u_char *buf, const int start_page)
22013 ++ const u_char *buf, int start_page)
22014 + {
22015 + unsigned int nic_base = dev->base_addr;
22016 + struct pcnet_dev *info = PRIV(dev);
22017 +@@ -1387,7 +1387,7 @@ static void shmem_block_input(struct net_device *dev, int count,
22018 + /*====================================================================*/
22019 +
22020 + static void shmem_block_output(struct net_device *dev, int count,
22021 +- const u_char *buf, const int start_page)
22022 ++ const u_char *buf, int start_page)
22023 + {
22024 + void __iomem *shmem = ei_status.mem + (start_page << 8);
22025 + shmem -= ei_status.tx_start_page << 8;
22026 diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
22027 -index fe64482..9a24726 100644
22028 +index f749e4d..23a27f1 100644
22029 --- a/drivers/net/ethernet/altera/altera_tse_main.c
22030 +++ b/drivers/net/ethernet/altera/altera_tse_main.c
22031 -@@ -1255,7 +1255,7 @@ static int tse_shutdown(struct net_device *dev)
22032 +@@ -551,7 +551,7 @@ static irqreturn_t altera_isr(int irq, void *dev_id)
22033 + * physically contiguous fragment starting at
22034 + * skb->data, for length of skb_headlen(skb).
22035 + */
22036 +-static int tse_start_xmit(struct sk_buff *skb, struct net_device *dev)
22037 ++static netdev_tx_t tse_start_xmit(struct sk_buff *skb, struct net_device *dev)
22038 + {
22039 + struct altera_tse_private *priv = netdev_priv(dev);
22040 + unsigned int txsize = priv->tx_ring_size;
22041 +@@ -1243,7 +1243,7 @@ static int tse_shutdown(struct net_device *dev)
22042 return 0;
22043 }
22044
22045 @@ -51723,7 +57229,7 @@ index fe64482..9a24726 100644
22046 .ndo_open = tse_open,
22047 .ndo_stop = tse_shutdown,
22048 .ndo_start_xmit = tse_start_xmit,
22049 -@@ -1492,11 +1492,13 @@ static int altera_tse_probe(struct platform_device *pdev)
22050 +@@ -1480,11 +1480,13 @@ static int altera_tse_probe(struct platform_device *pdev)
22051 ndev->netdev_ops = &altera_tse_netdev_ops;
22052 altera_tse_set_ethtool_ops(ndev);
22053
22054 @@ -51737,6 +57243,63 @@ index fe64482..9a24726 100644
22055
22056 /* Scatter/gather IO is not supported,
22057 * so it is turned off
22058 +diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
22059 +index 9496005..1fb7ac2 100644
22060 +--- a/drivers/net/ethernet/amd/amd8111e.c
22061 ++++ b/drivers/net/ethernet/amd/amd8111e.c
22062 +@@ -1690,8 +1690,9 @@ static int amd8111e_resume(struct pci_dev *pci_dev)
22063 + return 0;
22064 + }
22065 +
22066 +-static void amd8111e_config_ipg(struct net_device *dev)
22067 ++static void amd8111e_config_ipg(unsigned long _dev)
22068 + {
22069 ++ struct net_device *dev = (struct net_device *)_dev;
22070 + struct amd8111e_priv *lp = netdev_priv(dev);
22071 + struct ipg_info *ipg_data = &lp->ipg_data;
22072 + void __iomem *mmio = lp->mmio;
22073 +@@ -1904,7 +1905,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev,
22074 + if(lp->options & OPTION_DYN_IPG_ENABLE){
22075 + init_timer(&lp->ipg_data.ipg_timer);
22076 + lp->ipg_data.ipg_timer.data = (unsigned long) dev;
22077 +- lp->ipg_data.ipg_timer.function = (void *)&amd8111e_config_ipg;
22078 ++ lp->ipg_data.ipg_timer.function = &amd8111e_config_ipg;
22079 + lp->ipg_data.ipg_timer.expires = jiffies +
22080 + IPG_CONVERGE_JIFFIES;
22081 + lp->ipg_data.ipg = DEFAULT_IPG;
22082 +diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
22083 +index 7ccebae..237f6bb 100644
22084 +--- a/drivers/net/ethernet/amd/pcnet32.c
22085 ++++ b/drivers/net/ethernet/amd/pcnet32.c
22086 +@@ -318,7 +318,7 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *);
22087 + static void pcnet32_load_multicast(struct net_device *dev);
22088 + static void pcnet32_set_multicast_list(struct net_device *);
22089 + static int pcnet32_ioctl(struct net_device *, struct ifreq *, int);
22090 +-static void pcnet32_watchdog(struct net_device *);
22091 ++static void pcnet32_watchdog(unsigned long);
22092 + static int mdio_read(struct net_device *dev, int phy_id, int reg_num);
22093 + static void mdio_write(struct net_device *dev, int phy_id, int reg_num,
22094 + int val);
22095 +@@ -1915,7 +1915,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
22096 +
22097 + init_timer(&lp->watchdog_timer);
22098 + lp->watchdog_timer.data = (unsigned long)dev;
22099 +- lp->watchdog_timer.function = (void *)&pcnet32_watchdog;
22100 ++ lp->watchdog_timer.function = &pcnet32_watchdog;
22101 +
22102 + /* The PCNET32-specific entries in the device structure. */
22103 + dev->netdev_ops = &pcnet32_netdev_ops;
22104 +@@ -2837,8 +2837,9 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
22105 + * Could possibly be changed to use mii_check_media instead.
22106 + */
22107 +
22108 +-static void pcnet32_watchdog(struct net_device *dev)
22109 ++static void pcnet32_watchdog(unsigned long _dev)
22110 + {
22111 ++ struct net_device *dev = (struct net_device *)_dev;
22112 + struct pcnet32_private *lp = netdev_priv(dev);
22113 + unsigned long flags;
22114 +
22115 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
22116 index b6fa891..31ef157 100644
22117 --- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h
22118 @@ -52026,7 +57589,7 @@ index f6a7161..aa98a8b 100644
22119 + .set_rss_lookup_table = xgbe_set_rss_lookup_table,
22120 +};
22121 diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
22122 -index 53ce122..de7d19d 100644
22123 +index 8a9b493..d41363f 100644
22124 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
22125 +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
22126 @@ -245,7 +245,7 @@ static int xgbe_maybe_stop_tx_queue(struct xgbe_channel *channel,
22127 @@ -52184,8 +57747,12 @@ index 53ce122..de7d19d 100644
22128
22129 DBGPR("-->xgbe_close\n");
22130
22131 -@@ -1391,8 +1391,8 @@ static int xgbe_close(struct net_device *netdev)
22132 - static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
22133 +@@ -1388,11 +1388,11 @@ static int xgbe_close(struct net_device *netdev)
22134 + return 0;
22135 + }
22136 +
22137 +-static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
22138 ++static netdev_tx_t xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
22139 {
22140 struct xgbe_prv_data *pdata = netdev_priv(netdev);
22141 - struct xgbe_hw_if *hw_if = &pdata->hw_if;
22142 @@ -52491,11 +58058,111 @@ index e234b99..4f0e2a1 100644
22143 /* Function prototypes*/
22144
22145 void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *);
22146 +diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
22147 +index 5eb9b20..8c5d652 100644
22148 +--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
22149 ++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
22150 +@@ -130,7 +130,7 @@ static void xgene_enet_delete_bufpool(struct xgene_enet_desc_ring *buf_pool)
22151 + buf_pool->tail = tail;
22152 + }
22153 +
22154 +-static irqreturn_t xgene_enet_rx_irq(const int irq, void *data)
22155 ++static irqreturn_t xgene_enet_rx_irq(int irq, void *data)
22156 + {
22157 + struct xgene_enet_desc_ring *rx_ring = data;
22158 +
22159 +@@ -597,7 +597,7 @@ static int xgene_enet_process_ring(struct xgene_enet_desc_ring *ring,
22160 + return processed;
22161 + }
22162 +
22163 +-static int xgene_enet_napi(struct napi_struct *napi, const int budget)
22164 ++static int xgene_enet_napi(struct napi_struct *napi, int budget)
22165 + {
22166 + struct xgene_enet_desc_ring *ring;
22167 + int processed;
22168 +diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
22169 +index 6446af1..e669e35 100644
22170 +--- a/drivers/net/ethernet/arc/emac_main.c
22171 ++++ b/drivers/net/ethernet/arc/emac_main.c
22172 +@@ -645,7 +645,7 @@ static struct net_device_stats *arc_emac_stats(struct net_device *ndev)
22173 + *
22174 + * This function is invoked from upper layers to initiate transmission.
22175 + */
22176 +-static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
22177 ++static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
22178 + {
22179 + struct arc_emac_priv *priv = netdev_priv(ndev);
22180 + unsigned int len, *txbd_curr = &priv->txbd_curr;
22181 +diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
22182 +index 55b118e..6de7cd0 100644
22183 +--- a/drivers/net/ethernet/atheros/alx/main.c
22184 ++++ b/drivers/net/ethernet/atheros/alx/main.c
22185 +@@ -1451,7 +1451,7 @@ static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
22186 +
22187 +
22188 + static pci_ers_result_t alx_pci_error_detected(struct pci_dev *pdev,
22189 +- pci_channel_state_t state)
22190 ++ enum pci_channel_state state)
22191 + {
22192 + struct alx_priv *alx = pci_get_drvdata(pdev);
22193 + struct net_device *netdev = alx->dev;
22194 +diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
22195 +index 8b5988e..672022e 100644
22196 +--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
22197 ++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
22198 +@@ -2719,7 +2719,7 @@ static void atl1c_remove(struct pci_dev *pdev)
22199 + * this device has been detected.
22200 + */
22201 + static pci_ers_result_t atl1c_io_error_detected(struct pci_dev *pdev,
22202 +- pci_channel_state_t state)
22203 ++ enum pci_channel_state state)
22204 + {
22205 + struct net_device *netdev = pci_get_drvdata(pdev);
22206 + struct atl1c_adapter *adapter = netdev_priv(netdev);
22207 +diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
22208 +index 59a03a1..1ae287b 100644
22209 +--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
22210 ++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
22211 +@@ -2485,7 +2485,7 @@ static void atl1e_remove(struct pci_dev *pdev)
22212 + * this device has been detected.
22213 + */
22214 + static pci_ers_result_t
22215 +-atl1e_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
22216 ++atl1e_io_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
22217 + {
22218 + struct net_device *netdev = pci_get_drvdata(pdev);
22219 + struct atl1e_adapter *adapter = netdev_priv(netdev);
22220 +diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
22221 +index 08a23e6..2ffb80f 100644
22222 +--- a/drivers/net/ethernet/aurora/nb8800.c
22223 ++++ b/drivers/net/ethernet/aurora/nb8800.c
22224 +@@ -395,7 +395,7 @@ static void nb8800_tx_dma_start_irq(struct net_device *dev)
22225 + spin_unlock(&priv->tx_lock);
22226 + }
22227 +
22228 +-static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
22229 ++static netdev_tx_t nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
22230 + {
22231 + struct nb8800_priv *priv = netdev_priv(dev);
22232 + struct nb8800_tx_desc *txd;
22233 +diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
22234 +index 8fc3f3c..d97e01e 100644
22235 +--- a/drivers/net/ethernet/broadcom/bnx2.c
22236 ++++ b/drivers/net/ethernet/broadcom/bnx2.c
22237 +@@ -8701,7 +8701,7 @@ static SIMPLE_DEV_PM_OPS(bnx2_pm_ops, bnx2_suspend, bnx2_resume);
22238 + * this device has been detected.
22239 + */
22240 + static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev,
22241 +- pci_channel_state_t state)
22242 ++ enum pci_channel_state state)
22243 + {
22244 + struct net_device *dev = pci_get_drvdata(pdev);
22245 + struct bnx2 *bp = netdev_priv(dev);
22246 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
22247 -index b7d32e8..ea5b559 100644
22248 +index 4cbb03f8..d94eebe 100644
22249 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
22250 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
22251 -@@ -1122,7 +1122,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
22252 +@@ -1115,7 +1115,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
22253 static inline void bnx2x_init_bp_objs(struct bnx2x *bp)
22254 {
22255 /* RX_MODE controlling object */
22256 @@ -52504,6 +58171,561 @@ index b7d32e8..ea5b559 100644
22257
22258 /* multicast configuration controlling object */
22259 bnx2x_init_mcast_obj(bp, &bp->mcast_obj, bp->fp->cl_id, bp->fp->cid,
22260 +diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
22261 +index 1fb8010..0a8dc20 100644
22262 +--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
22263 ++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
22264 +@@ -5621,7 +5621,7 @@ static int bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy,
22265 + return 0;
22266 + }
22267 +
22268 +-static int bnx2x_link_settings_status(struct bnx2x_phy *phy,
22269 ++static u8 bnx2x_link_settings_status(struct bnx2x_phy *phy,
22270 + struct link_params *params,
22271 + struct link_vars *vars)
22272 + {
22273 +@@ -5695,7 +5695,7 @@ static int bnx2x_link_settings_status(struct bnx2x_phy *phy,
22274 + return rc;
22275 + }
22276 +
22277 +-static int bnx2x_warpcore_read_status(struct bnx2x_phy *phy,
22278 ++static u8 bnx2x_warpcore_read_status(struct bnx2x_phy *phy,
22279 + struct link_params *params,
22280 + struct link_vars *vars)
22281 + {
22282 +@@ -7436,7 +7436,7 @@ static void bnx2x_8073_specific_func(struct bnx2x_phy *phy,
22283 + }
22284 + }
22285 +
22286 +-static int bnx2x_8073_config_init(struct bnx2x_phy *phy,
22287 ++static void bnx2x_8073_config_init(struct bnx2x_phy *phy,
22288 + struct link_params *params,
22289 + struct link_vars *vars)
22290 + {
22291 +@@ -7499,7 +7499,7 @@ static int bnx2x_8073_config_init(struct bnx2x_phy *phy,
22292 + if (params->loopback_mode == LOOPBACK_EXT) {
22293 + bnx2x_807x_force_10G(bp, phy);
22294 + DP(NETIF_MSG_LINK, "Forced speed 10G on 807X\n");
22295 +- return 0;
22296 ++ return;
22297 + } else {
22298 + bnx2x_cl45_write(bp, phy,
22299 + MDIO_PMA_DEVAD, MDIO_PMA_REG_BCM_CTRL, 0x0002);
22300 +@@ -7581,7 +7581,6 @@ static int bnx2x_8073_config_init(struct bnx2x_phy *phy,
22301 + bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, 0x1200);
22302 + DP(NETIF_MSG_LINK, "807x Autoneg Restart: Advertise 1G=%x, 10G=%x\n",
22303 + ((val & (1<<5)) > 0), ((val & (1<<7)) > 0));
22304 +- return 0;
22305 + }
22306 +
22307 + static u8 bnx2x_8073_read_status(struct bnx2x_phy *phy,
22308 +@@ -7748,7 +7747,7 @@ static void bnx2x_8073_link_reset(struct bnx2x_phy *phy,
22309 + /******************************************************************/
22310 + /* BCM8705 PHY SECTION */
22311 + /******************************************************************/
22312 +-static int bnx2x_8705_config_init(struct bnx2x_phy *phy,
22313 ++static void bnx2x_8705_config_init(struct bnx2x_phy *phy,
22314 + struct link_params *params,
22315 + struct link_vars *vars)
22316 + {
22317 +@@ -7772,7 +7771,6 @@ static int bnx2x_8705_config_init(struct bnx2x_phy *phy,
22318 + MDIO_WIS_DEVAD, MDIO_WIS_REG_LASI_CNTL, 0x1);
22319 + /* BCM8705 doesn't have microcode, hence the 0 */
22320 + bnx2x_save_spirom_version(bp, params->port, params->shmem_base, 0);
22321 +- return 0;
22322 + }
22323 +
22324 + static u8 bnx2x_8705_read_status(struct bnx2x_phy *phy,
22325 +@@ -8959,7 +8957,7 @@ static u8 bnx2x_8706_8726_read_status(struct bnx2x_phy *phy,
22326 + /******************************************************************/
22327 + /* BCM8706 PHY SECTION */
22328 + /******************************************************************/
22329 +-static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy,
22330 ++static void bnx2x_8706_config_init(struct bnx2x_phy *phy,
22331 + struct link_params *params,
22332 + struct link_vars *vars)
22333 + {
22334 +@@ -9061,11 +9059,9 @@ static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy,
22335 + bnx2x_cl45_write(bp, phy,
22336 + MDIO_PMA_DEVAD, MDIO_PMA_REG_DIGITAL_CTRL, tmp1);
22337 + }
22338 +-
22339 +- return 0;
22340 + }
22341 +
22342 +-static int bnx2x_8706_read_status(struct bnx2x_phy *phy,
22343 ++static u8 bnx2x_8706_read_status(struct bnx2x_phy *phy,
22344 + struct link_params *params,
22345 + struct link_vars *vars)
22346 + {
22347 +@@ -9142,7 +9138,7 @@ static u8 bnx2x_8726_read_status(struct bnx2x_phy *phy,
22348 + }
22349 +
22350 +
22351 +-static int bnx2x_8726_config_init(struct bnx2x_phy *phy,
22352 ++static void bnx2x_8726_config_init(struct bnx2x_phy *phy,
22353 + struct link_params *params,
22354 + struct link_vars *vars)
22355 + {
22356 +@@ -9223,8 +9219,6 @@ static int bnx2x_8726_config_init(struct bnx2x_phy *phy,
22357 + phy->tx_preemphasis[1]);
22358 + }
22359 +
22360 +- return 0;
22361 +-
22362 + }
22363 +
22364 + static void bnx2x_8726_link_reset(struct bnx2x_phy *phy,
22365 +@@ -9360,7 +9354,7 @@ static void bnx2x_8727_config_speed(struct bnx2x_phy *phy,
22366 + }
22367 + }
22368 +
22369 +-static int bnx2x_8727_config_init(struct bnx2x_phy *phy,
22370 ++static void bnx2x_8727_config_init(struct bnx2x_phy *phy,
22371 + struct link_params *params,
22372 + struct link_vars *vars)
22373 + {
22374 +@@ -9442,8 +9436,6 @@ static int bnx2x_8727_config_init(struct bnx2x_phy *phy,
22375 + MDIO_PMA_DEVAD, MDIO_PMA_REG_PHY_IDENTIFIER,
22376 + (tmp2 & 0x7fff));
22377 + }
22378 +-
22379 +- return 0;
22380 + }
22381 +
22382 + static void bnx2x_8727_handle_mod_abs(struct bnx2x_phy *phy,
22383 +@@ -10018,7 +10010,7 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
22384 + return 0;
22385 + }
22386 +
22387 +-static int bnx2x_8481_config_init(struct bnx2x_phy *phy,
22388 ++static void bnx2x_8481_config_init(struct bnx2x_phy *phy,
22389 + struct link_params *params,
22390 + struct link_vars *vars)
22391 + {
22392 +@@ -10032,7 +10024,7 @@ static int bnx2x_8481_config_init(struct bnx2x_phy *phy,
22393 + bnx2x_wait_reset_complete(bp, phy, params);
22394 +
22395 + bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15);
22396 +- return bnx2x_848xx_cmn_config_init(phy, params, vars);
22397 ++ bnx2x_848xx_cmn_config_init(phy, params, vars);
22398 + }
22399 +
22400 + #define PHY848xx_CMDHDLR_WAIT 300
22401 +@@ -10282,7 +10274,7 @@ static u8 bnx2x_84833_get_reset_gpios(struct bnx2x *bp,
22402 + return reset_gpios;
22403 + }
22404 +
22405 +-static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
22406 ++static void bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
22407 + struct link_params *params)
22408 + {
22409 + struct bnx2x *bp = params->bp;
22410 +@@ -10311,8 +10303,6 @@ static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
22411 + udelay(10);
22412 + DP(NETIF_MSG_LINK, "84833 hw reset on pin values 0x%x\n",
22413 + reset_gpios);
22414 +-
22415 +- return 0;
22416 + }
22417 +
22418 + static int bnx2x_8483x_disable_eee(struct bnx2x_phy *phy,
22419 +@@ -10355,7 +10345,7 @@ static int bnx2x_8483x_enable_eee(struct bnx2x_phy *phy,
22420 + }
22421 +
22422 + #define PHY84833_CONSTANT_LATENCY 1193
22423 +-static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
22424 ++static void bnx2x_848x3_config_init(struct bnx2x_phy *phy,
22425 + struct link_params *params,
22426 + struct link_vars *vars)
22427 + {
22428 +@@ -10502,7 +10492,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
22429 + if (rc) {
22430 + DP(NETIF_MSG_LINK, "Failed to configure EEE timers\n");
22431 + bnx2x_8483x_disable_eee(phy, params, vars);
22432 +- return rc;
22433 ++ return;
22434 + }
22435 +
22436 + if ((phy->req_duplex == DUPLEX_FULL) &&
22437 +@@ -10514,7 +10504,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
22438 + rc = bnx2x_8483x_disable_eee(phy, params, vars);
22439 + if (rc) {
22440 + DP(NETIF_MSG_LINK, "Failed to set EEE advertisement\n");
22441 +- return rc;
22442 ++ return;
22443 + }
22444 + } else {
22445 + vars->eee_status &= ~SHMEM_EEE_SUPPORTED_MASK;
22446 +@@ -10553,7 +10543,6 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
22447 + MDIO_84833_TOP_CFG_XGPHY_STRAP1,
22448 + (u16)~MDIO_84833_SUPER_ISOLATE);
22449 + }
22450 +- return rc;
22451 + }
22452 +
22453 + static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
22454 +@@ -11113,7 +11102,7 @@ static void bnx2x_54618se_specific_func(struct bnx2x_phy *phy,
22455 + }
22456 + }
22457 +
22458 +-static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
22459 ++static void bnx2x_54618se_config_init(struct bnx2x_phy *phy,
22460 + struct link_params *params,
22461 + struct link_vars *vars)
22462 + {
22463 +@@ -11315,8 +11304,6 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
22464 +
22465 + bnx2x_cl22_write(bp, phy,
22466 + MDIO_PMA_REG_CTRL, autoneg_val);
22467 +-
22468 +- return 0;
22469 + }
22470 +
22471 +
22472 +@@ -11540,7 +11527,7 @@ static void bnx2x_7101_config_loopback(struct bnx2x_phy *phy,
22473 + MDIO_XS_DEVAD, MDIO_XS_SFX7101_XGXS_TEST1, 0x100);
22474 + }
22475 +
22476 +-static int bnx2x_7101_config_init(struct bnx2x_phy *phy,
22477 ++static void bnx2x_7101_config_init(struct bnx2x_phy *phy,
22478 + struct link_params *params,
22479 + struct link_vars *vars)
22480 + {
22481 +@@ -11577,7 +11564,6 @@ static int bnx2x_7101_config_init(struct bnx2x_phy *phy,
22482 + MDIO_PMA_DEVAD, MDIO_PMA_REG_7101_VER2, &fw_ver2);
22483 + bnx2x_save_spirom_version(bp, params->port,
22484 + (u32)(fw_ver1<<16 | fw_ver2), phy->ver_addr);
22485 +- return 0;
22486 + }
22487 +
22488 + static u8 bnx2x_7101_read_status(struct bnx2x_phy *phy,
22489 +@@ -11746,9 +11732,9 @@ static const struct bnx2x_phy phy_serdes = {
22490 + .speed_cap_mask = 0,
22491 + .req_duplex = 0,
22492 + .rsrv = 0,
22493 +- .config_init = (config_init_t)bnx2x_xgxs_config_init,
22494 +- .read_status = (read_status_t)bnx2x_link_settings_status,
22495 +- .link_reset = (link_reset_t)bnx2x_int_link_reset,
22496 ++ .config_init = bnx2x_xgxs_config_init,
22497 ++ .read_status = bnx2x_link_settings_status,
22498 ++ .link_reset = bnx2x_int_link_reset,
22499 + .config_loopback = (config_loopback_t)NULL,
22500 + .format_fw_ver = (format_fw_ver_t)NULL,
22501 + .hw_reset = (hw_reset_t)NULL,
22502 +@@ -11782,14 +11768,14 @@ static const struct bnx2x_phy phy_xgxs = {
22503 + .speed_cap_mask = 0,
22504 + .req_duplex = 0,
22505 + .rsrv = 0,
22506 +- .config_init = (config_init_t)bnx2x_xgxs_config_init,
22507 +- .read_status = (read_status_t)bnx2x_link_settings_status,
22508 +- .link_reset = (link_reset_t)bnx2x_int_link_reset,
22509 +- .config_loopback = (config_loopback_t)bnx2x_set_xgxs_loopback,
22510 ++ .config_init = bnx2x_xgxs_config_init,
22511 ++ .read_status = bnx2x_link_settings_status,
22512 ++ .link_reset = bnx2x_int_link_reset,
22513 ++ .config_loopback = bnx2x_set_xgxs_loopback,
22514 + .format_fw_ver = (format_fw_ver_t)NULL,
22515 + .hw_reset = (hw_reset_t)NULL,
22516 + .set_link_led = (set_link_led_t)NULL,
22517 +- .phy_specific_func = (phy_specific_func_t)bnx2x_xgxs_specific_func
22518 ++ .phy_specific_func = bnx2x_xgxs_specific_func
22519 + };
22520 + static const struct bnx2x_phy phy_warpcore = {
22521 + .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT,
22522 +@@ -11820,12 +11806,12 @@ static const struct bnx2x_phy phy_warpcore = {
22523 + .speed_cap_mask = 0,
22524 + /* req_duplex = */0,
22525 + /* rsrv = */0,
22526 +- .config_init = (config_init_t)bnx2x_warpcore_config_init,
22527 +- .read_status = (read_status_t)bnx2x_warpcore_read_status,
22528 +- .link_reset = (link_reset_t)bnx2x_warpcore_link_reset,
22529 +- .config_loopback = (config_loopback_t)bnx2x_set_warpcore_loopback,
22530 ++ .config_init = bnx2x_warpcore_config_init,
22531 ++ .read_status = bnx2x_warpcore_read_status,
22532 ++ .link_reset = bnx2x_warpcore_link_reset,
22533 ++ .config_loopback = bnx2x_set_warpcore_loopback,
22534 + .format_fw_ver = (format_fw_ver_t)NULL,
22535 +- .hw_reset = (hw_reset_t)bnx2x_warpcore_hw_reset,
22536 ++ .hw_reset = bnx2x_warpcore_hw_reset,
22537 + .set_link_led = (set_link_led_t)NULL,
22538 + .phy_specific_func = (phy_specific_func_t)NULL
22539 + };
22540 +@@ -11851,13 +11837,13 @@ static const struct bnx2x_phy phy_7101 = {
22541 + .speed_cap_mask = 0,
22542 + .req_duplex = 0,
22543 + .rsrv = 0,
22544 +- .config_init = (config_init_t)bnx2x_7101_config_init,
22545 +- .read_status = (read_status_t)bnx2x_7101_read_status,
22546 +- .link_reset = (link_reset_t)bnx2x_common_ext_link_reset,
22547 +- .config_loopback = (config_loopback_t)bnx2x_7101_config_loopback,
22548 +- .format_fw_ver = (format_fw_ver_t)bnx2x_7101_format_ver,
22549 +- .hw_reset = (hw_reset_t)bnx2x_7101_hw_reset,
22550 +- .set_link_led = (set_link_led_t)bnx2x_7101_set_link_led,
22551 ++ .config_init = bnx2x_7101_config_init,
22552 ++ .read_status = bnx2x_7101_read_status,
22553 ++ .link_reset = bnx2x_common_ext_link_reset,
22554 ++ .config_loopback = bnx2x_7101_config_loopback,
22555 ++ .format_fw_ver = bnx2x_7101_format_ver,
22556 ++ .hw_reset = bnx2x_7101_hw_reset,
22557 ++ .set_link_led = bnx2x_7101_set_link_led,
22558 + .phy_specific_func = (phy_specific_func_t)NULL
22559 + };
22560 + static const struct bnx2x_phy phy_8073 = {
22561 +@@ -11882,14 +11868,14 @@ static const struct bnx2x_phy phy_8073 = {
22562 + .speed_cap_mask = 0,
22563 + .req_duplex = 0,
22564 + .rsrv = 0,
22565 +- .config_init = (config_init_t)bnx2x_8073_config_init,
22566 +- .read_status = (read_status_t)bnx2x_8073_read_status,
22567 +- .link_reset = (link_reset_t)bnx2x_8073_link_reset,
22568 ++ .config_init = bnx2x_8073_config_init,
22569 ++ .read_status = bnx2x_8073_read_status,
22570 ++ .link_reset = bnx2x_8073_link_reset,
22571 + .config_loopback = (config_loopback_t)NULL,
22572 +- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
22573 ++ .format_fw_ver = bnx2x_format_ver,
22574 + .hw_reset = (hw_reset_t)NULL,
22575 + .set_link_led = (set_link_led_t)NULL,
22576 +- .phy_specific_func = (phy_specific_func_t)bnx2x_8073_specific_func
22577 ++ .phy_specific_func = bnx2x_8073_specific_func
22578 + };
22579 + static const struct bnx2x_phy phy_8705 = {
22580 + .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705,
22581 +@@ -11910,11 +11896,11 @@ static const struct bnx2x_phy phy_8705 = {
22582 + .speed_cap_mask = 0,
22583 + .req_duplex = 0,
22584 + .rsrv = 0,
22585 +- .config_init = (config_init_t)bnx2x_8705_config_init,
22586 +- .read_status = (read_status_t)bnx2x_8705_read_status,
22587 +- .link_reset = (link_reset_t)bnx2x_common_ext_link_reset,
22588 ++ .config_init = bnx2x_8705_config_init,
22589 ++ .read_status = bnx2x_8705_read_status,
22590 ++ .link_reset = bnx2x_common_ext_link_reset,
22591 + .config_loopback = (config_loopback_t)NULL,
22592 +- .format_fw_ver = (format_fw_ver_t)bnx2x_null_format_ver,
22593 ++ .format_fw_ver = bnx2x_null_format_ver,
22594 + .hw_reset = (hw_reset_t)NULL,
22595 + .set_link_led = (set_link_led_t)NULL,
22596 + .phy_specific_func = (phy_specific_func_t)NULL
22597 +@@ -11939,11 +11925,11 @@ static const struct bnx2x_phy phy_8706 = {
22598 + .speed_cap_mask = 0,
22599 + .req_duplex = 0,
22600 + .rsrv = 0,
22601 +- .config_init = (config_init_t)bnx2x_8706_config_init,
22602 +- .read_status = (read_status_t)bnx2x_8706_read_status,
22603 +- .link_reset = (link_reset_t)bnx2x_common_ext_link_reset,
22604 ++ .config_init = bnx2x_8706_config_init,
22605 ++ .read_status = bnx2x_8706_read_status,
22606 ++ .link_reset = bnx2x_common_ext_link_reset,
22607 + .config_loopback = (config_loopback_t)NULL,
22608 +- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
22609 ++ .format_fw_ver = bnx2x_format_ver,
22610 + .hw_reset = (hw_reset_t)NULL,
22611 + .set_link_led = (set_link_led_t)NULL,
22612 + .phy_specific_func = (phy_specific_func_t)NULL
22613 +@@ -11971,11 +11957,11 @@ static const struct bnx2x_phy phy_8726 = {
22614 + .speed_cap_mask = 0,
22615 + .req_duplex = 0,
22616 + .rsrv = 0,
22617 +- .config_init = (config_init_t)bnx2x_8726_config_init,
22618 +- .read_status = (read_status_t)bnx2x_8726_read_status,
22619 +- .link_reset = (link_reset_t)bnx2x_8726_link_reset,
22620 +- .config_loopback = (config_loopback_t)bnx2x_8726_config_loopback,
22621 +- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
22622 ++ .config_init = bnx2x_8726_config_init,
22623 ++ .read_status = bnx2x_8726_read_status,
22624 ++ .link_reset = bnx2x_8726_link_reset,
22625 ++ .config_loopback = bnx2x_8726_config_loopback,
22626 ++ .format_fw_ver = bnx2x_format_ver,
22627 + .hw_reset = (hw_reset_t)NULL,
22628 + .set_link_led = (set_link_led_t)NULL,
22629 + .phy_specific_func = (phy_specific_func_t)NULL
22630 +@@ -12002,14 +11988,14 @@ static const struct bnx2x_phy phy_8727 = {
22631 + .speed_cap_mask = 0,
22632 + .req_duplex = 0,
22633 + .rsrv = 0,
22634 +- .config_init = (config_init_t)bnx2x_8727_config_init,
22635 +- .read_status = (read_status_t)bnx2x_8727_read_status,
22636 +- .link_reset = (link_reset_t)bnx2x_8727_link_reset,
22637 ++ .config_init = bnx2x_8727_config_init,
22638 ++ .read_status = bnx2x_8727_read_status,
22639 ++ .link_reset = bnx2x_8727_link_reset,
22640 + .config_loopback = (config_loopback_t)NULL,
22641 +- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
22642 +- .hw_reset = (hw_reset_t)bnx2x_8727_hw_reset,
22643 +- .set_link_led = (set_link_led_t)bnx2x_8727_set_link_led,
22644 +- .phy_specific_func = (phy_specific_func_t)bnx2x_8727_specific_func
22645 ++ .format_fw_ver = bnx2x_format_ver,
22646 ++ .hw_reset = bnx2x_8727_hw_reset,
22647 ++ .set_link_led = bnx2x_8727_set_link_led,
22648 ++ .phy_specific_func = bnx2x_8727_specific_func
22649 + };
22650 + static const struct bnx2x_phy phy_8481 = {
22651 + .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481,
22652 +@@ -12037,13 +12023,13 @@ static const struct bnx2x_phy phy_8481 = {
22653 + .speed_cap_mask = 0,
22654 + .req_duplex = 0,
22655 + .rsrv = 0,
22656 +- .config_init = (config_init_t)bnx2x_8481_config_init,
22657 +- .read_status = (read_status_t)bnx2x_848xx_read_status,
22658 +- .link_reset = (link_reset_t)bnx2x_8481_link_reset,
22659 ++ .config_init = bnx2x_8481_config_init,
22660 ++ .read_status = bnx2x_848xx_read_status,
22661 ++ .link_reset = bnx2x_8481_link_reset,
22662 + .config_loopback = (config_loopback_t)NULL,
22663 +- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
22664 +- .hw_reset = (hw_reset_t)bnx2x_8481_hw_reset,
22665 +- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
22666 ++ .format_fw_ver = bnx2x_848xx_format_ver,
22667 ++ .hw_reset = bnx2x_8481_hw_reset,
22668 ++ .set_link_led = bnx2x_848xx_set_link_led,
22669 + .phy_specific_func = (phy_specific_func_t)NULL
22670 + };
22671 +
22672 +@@ -12074,14 +12060,14 @@ static const struct bnx2x_phy phy_84823 = {
22673 + .speed_cap_mask = 0,
22674 + .req_duplex = 0,
22675 + .rsrv = 0,
22676 +- .config_init = (config_init_t)bnx2x_848x3_config_init,
22677 +- .read_status = (read_status_t)bnx2x_848xx_read_status,
22678 +- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
22679 ++ .config_init = bnx2x_848x3_config_init,
22680 ++ .read_status = bnx2x_848xx_read_status,
22681 ++ .link_reset = bnx2x_848x3_link_reset,
22682 + .config_loopback = (config_loopback_t)NULL,
22683 +- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
22684 ++ .format_fw_ver = bnx2x_848xx_format_ver,
22685 + .hw_reset = (hw_reset_t)NULL,
22686 +- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
22687 +- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
22688 ++ .set_link_led = bnx2x_848xx_set_link_led,
22689 ++ .phy_specific_func = bnx2x_848xx_specific_func
22690 + };
22691 +
22692 + static const struct bnx2x_phy phy_84833 = {
22693 +@@ -12109,14 +12095,14 @@ static const struct bnx2x_phy phy_84833 = {
22694 + .speed_cap_mask = 0,
22695 + .req_duplex = 0,
22696 + .rsrv = 0,
22697 +- .config_init = (config_init_t)bnx2x_848x3_config_init,
22698 +- .read_status = (read_status_t)bnx2x_848xx_read_status,
22699 +- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
22700 ++ .config_init = bnx2x_848x3_config_init,
22701 ++ .read_status = bnx2x_848xx_read_status,
22702 ++ .link_reset = bnx2x_848x3_link_reset,
22703 + .config_loopback = (config_loopback_t)NULL,
22704 +- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
22705 +- .hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy,
22706 +- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
22707 +- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
22708 ++ .format_fw_ver = bnx2x_848xx_format_ver,
22709 ++ .hw_reset = bnx2x_84833_hw_reset_phy,
22710 ++ .set_link_led = bnx2x_848xx_set_link_led,
22711 ++ .phy_specific_func = bnx2x_848xx_specific_func
22712 + };
22713 +
22714 + static const struct bnx2x_phy phy_84834 = {
22715 +@@ -12143,14 +12129,14 @@ static const struct bnx2x_phy phy_84834 = {
22716 + .speed_cap_mask = 0,
22717 + .req_duplex = 0,
22718 + .rsrv = 0,
22719 +- .config_init = (config_init_t)bnx2x_848x3_config_init,
22720 +- .read_status = (read_status_t)bnx2x_848xx_read_status,
22721 +- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
22722 ++ .config_init = bnx2x_848x3_config_init,
22723 ++ .read_status = bnx2x_848xx_read_status,
22724 ++ .link_reset = bnx2x_848x3_link_reset,
22725 + .config_loopback = (config_loopback_t)NULL,
22726 +- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
22727 +- .hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy,
22728 +- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
22729 +- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
22730 ++ .format_fw_ver = bnx2x_848xx_format_ver,
22731 ++ .hw_reset = bnx2x_84833_hw_reset_phy,
22732 ++ .set_link_led = bnx2x_848xx_set_link_led,
22733 ++ .phy_specific_func = bnx2x_848xx_specific_func
22734 + };
22735 +
22736 + static const struct bnx2x_phy phy_84858 = {
22737 +@@ -12177,14 +12163,14 @@ static const struct bnx2x_phy phy_84858 = {
22738 + .speed_cap_mask = 0,
22739 + .req_duplex = 0,
22740 + .rsrv = 0,
22741 +- .config_init = (config_init_t)bnx2x_848x3_config_init,
22742 +- .read_status = (read_status_t)bnx2x_848xx_read_status,
22743 +- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
22744 ++ .config_init = bnx2x_848x3_config_init,
22745 ++ .read_status = bnx2x_848xx_read_status,
22746 ++ .link_reset = bnx2x_848x3_link_reset,
22747 + .config_loopback = (config_loopback_t)NULL,
22748 +- .format_fw_ver = (format_fw_ver_t)bnx2x_8485x_format_ver,
22749 +- .hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy,
22750 +- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
22751 +- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
22752 ++ .format_fw_ver = bnx2x_8485x_format_ver,
22753 ++ .hw_reset = bnx2x_84833_hw_reset_phy,
22754 ++ .set_link_led = bnx2x_848xx_set_link_led,
22755 ++ .phy_specific_func = bnx2x_848xx_specific_func
22756 + };
22757 +
22758 + static const struct bnx2x_phy phy_54618se = {
22759 +@@ -12211,14 +12197,14 @@ static const struct bnx2x_phy phy_54618se = {
22760 + .speed_cap_mask = 0,
22761 + /* req_duplex = */0,
22762 + /* rsrv = */0,
22763 +- .config_init = (config_init_t)bnx2x_54618se_config_init,
22764 +- .read_status = (read_status_t)bnx2x_54618se_read_status,
22765 +- .link_reset = (link_reset_t)bnx2x_54618se_link_reset,
22766 +- .config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback,
22767 ++ .config_init = bnx2x_54618se_config_init,
22768 ++ .read_status = bnx2x_54618se_read_status,
22769 ++ .link_reset = bnx2x_54618se_link_reset,
22770 ++ .config_loopback = bnx2x_54618se_config_loopback,
22771 + .format_fw_ver = (format_fw_ver_t)NULL,
22772 + .hw_reset = (hw_reset_t)NULL,
22773 +- .set_link_led = (set_link_led_t)bnx2x_5461x_set_link_led,
22774 +- .phy_specific_func = (phy_specific_func_t)bnx2x_54618se_specific_func
22775 ++ .set_link_led = bnx2x_5461x_set_link_led,
22776 ++ .phy_specific_func = bnx2x_54618se_specific_func
22777 + };
22778 + /*****************************************************************/
22779 + /* */
22780 +diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
22781 +index b7d2511..a625bae 100644
22782 +--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
22783 ++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
22784 +@@ -126,7 +126,7 @@ struct link_vars;
22785 + struct link_params;
22786 + struct bnx2x_phy;
22787 +
22788 +-typedef u8 (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params,
22789 ++typedef void (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params,
22790 + struct link_vars *vars);
22791 + typedef u8 (*read_status_t)(struct bnx2x_phy *phy, struct link_params *params,
22792 + struct link_vars *vars);
22793 +@@ -134,7 +134,7 @@ typedef void (*link_reset_t)(struct bnx2x_phy *phy,
22794 + struct link_params *params);
22795 + typedef void (*config_loopback_t)(struct bnx2x_phy *phy,
22796 + struct link_params *params);
22797 +-typedef u8 (*format_fw_ver_t)(u32 raw, u8 *str, u16 *len);
22798 ++typedef int (*format_fw_ver_t)(u32 raw, u8 *str, u16 *len);
22799 + typedef void (*hw_reset_t)(struct bnx2x_phy *phy, struct link_params *params);
22800 + typedef void (*set_link_led_t)(struct bnx2x_phy *phy,
22801 + struct link_params *params, u8 mode);
22802 +diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
22803 +index 2bf9c87..5a36b0f 100644
22804 +--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
22805 ++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
22806 +@@ -14130,7 +14130,7 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
22807 + * this device has been detected.
22808 + */
22809 + static pci_ers_result_t bnx2x_io_error_detected(struct pci_dev *pdev,
22810 +- pci_channel_state_t state)
22811 ++ enum pci_channel_state state)
22812 + {
22813 + struct net_device *dev = pci_get_drvdata(pdev);
22814 + struct bnx2x *bp = netdev_priv(dev);
22815 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
22816 index ff702a7..cb3ae16 100644
22817 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
22818 @@ -52543,8 +58765,21 @@ index 4048fc5..333809f 100644
22819
22820 /**
22821 * bnx2x_config_rx_mode - Send and RX_MODE ramrod according to the provided parameters.
22822 +diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
22823 +index 3010080..49824f1 100644
22824 +--- a/drivers/net/ethernet/broadcom/tg3.c
22825 ++++ b/drivers/net/ethernet/broadcom/tg3.c
22826 +@@ -18124,7 +18124,7 @@ static void tg3_shutdown(struct pci_dev *pdev)
22827 + * this device has been detected.
22828 + */
22829 + static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
22830 +- pci_channel_state_t state)
22831 ++ enum pci_channel_state state)
22832 + {
22833 + struct net_device *netdev = pci_get_drvdata(pdev);
22834 + struct tg3 *tp = netdev_priv(netdev);
22835 diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
22836 -index 31c9f82..e65e986 100644
22837 +index 3b5e98e..52b3916 100644
22838 --- a/drivers/net/ethernet/broadcom/tg3.h
22839 +++ b/drivers/net/ethernet/broadcom/tg3.h
22840 @@ -150,6 +150,7 @@
22841 @@ -52555,10 +58790,183 @@ index 31c9f82..e65e986 100644
22842 #define CHIPREV_ID_5750_C2 0x4202
22843 #define CHIPREV_ID_5752_A0_HW 0x5000
22844 #define CHIPREV_ID_5752_A0 0x6000
22845 +diff --git a/drivers/net/ethernet/brocade/bna/bfa_cs.h b/drivers/net/ethernet/brocade/bna/bfa_cs.h
22846 +index 1d11d66..8f7a3cb 100644
22847 +--- a/drivers/net/ethernet/brocade/bna/bfa_cs.h
22848 ++++ b/drivers/net/ethernet/brocade/bna/bfa_cs.h
22849 +@@ -34,10 +34,19 @@ struct bfa_sm_table {
22850 + int state; /*!< state machine encoding */
22851 + char *name; /*!< state name for display */
22852 + };
22853 +-#define BFA_SM(_sm) ((bfa_sm_t)(_sm))
22854 ++#define BFA_SM(_sm) (_sm)
22855 ++
22856 ++#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (_state))
22857 ++#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (_state))
22858 +
22859 + /* State machine with entry actions. */
22860 +-typedef void (*bfa_fsm_t)(void *fsm, int event);
22861 ++struct bfa_ioc;
22862 ++enum ioc_event;
22863 ++struct bfa_iocpf;
22864 ++enum iocpf_event;
22865 ++
22866 ++typedef void (*bfa_fsm_ioc_t)(struct bfa_ioc *fsm, enum ioc_event event);
22867 ++typedef void (*bfa_fsm_iocpf_t)(struct bfa_iocpf *fsm, enum iocpf_event event);
22868 +
22869 + /* oc - object class eg. bfa_ioc
22870 + * st - state, eg. reset
22871 +@@ -49,16 +58,37 @@ typedef void (*bfa_fsm_t)(void *fsm, int event);
22872 + static void oc ## _sm_ ## st ## _entry(otype * fsm)
22873 +
22874 + #define bfa_fsm_set_state(_fsm, _state) do { \
22875 +- (_fsm)->fsm = (bfa_fsm_t)(_state); \
22876 ++ (_fsm)->fsm = (_state); \
22877 + _state ## _entry(_fsm); \
22878 + } while (0)
22879 +
22880 + #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
22881 +-#define bfa_fsm_cmp_state(_fsm, _state) \
22882 +- ((_fsm)->fsm == (bfa_fsm_t)(_state))
22883 ++#define bfa_fsm_cmp_state(_fsm, _state) ((_fsm)->fsm == (_state))
22884 ++
22885 ++/* For converting from state machine function to state encoding. */
22886 ++struct iocpf_sm_table {
22887 ++ bfa_fsm_iocpf_t sm; /*!< state machine function */
22888 ++ int state; /*!< state machine encoding */
22889 ++ char *name; /*!< state name for display */
22890 ++};
22891 ++struct ioc_sm_table {
22892 ++ bfa_fsm_ioc_t sm; /*!< state machine function */
22893 ++ int state; /*!< state machine encoding */
22894 ++ char *name; /*!< state name for display */
22895 ++};
22896 ++
22897 ++static inline int
22898 ++iocpf_sm_to_state(const struct iocpf_sm_table *smt, bfa_fsm_iocpf_t sm)
22899 ++{
22900 ++ int i = 0;
22901 ++
22902 ++ while (smt[i].sm && smt[i].sm != sm)
22903 ++ i++;
22904 ++ return smt[i].state;
22905 ++}
22906 +
22907 + static inline int
22908 +-bfa_sm_to_state(const struct bfa_sm_table *smt, bfa_sm_t sm)
22909 ++ioc_sm_to_state(const struct ioc_sm_table *smt, bfa_fsm_ioc_t sm)
22910 + {
22911 + int i = 0;
22912 +
22913 +diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
22914 +index 9e59663..3564807 100644
22915 +--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
22916 ++++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
22917 +@@ -122,7 +122,7 @@ bfa_fsm_state_decl(bfa_ioc, disabling, struct bfa_ioc, enum ioc_event);
22918 + bfa_fsm_state_decl(bfa_ioc, disabled, struct bfa_ioc, enum ioc_event);
22919 + bfa_fsm_state_decl(bfa_ioc, hwfail, struct bfa_ioc, enum ioc_event);
22920 +
22921 +-static struct bfa_sm_table ioc_sm_table[] = {
22922 ++static struct ioc_sm_table ioc_sm_table[] = {
22923 + {BFA_SM(bfa_ioc_sm_uninit), BFA_IOC_UNINIT},
22924 + {BFA_SM(bfa_ioc_sm_reset), BFA_IOC_RESET},
22925 + {BFA_SM(bfa_ioc_sm_enabling), BFA_IOC_ENABLING},
22926 +@@ -191,7 +191,7 @@ bfa_fsm_state_decl(bfa_iocpf, disabling_sync, struct bfa_iocpf,
22927 + enum iocpf_event);
22928 + bfa_fsm_state_decl(bfa_iocpf, disabled, struct bfa_iocpf, enum iocpf_event);
22929 +
22930 +-static struct bfa_sm_table iocpf_sm_table[] = {
22931 ++static struct iocpf_sm_table iocpf_sm_table[] = {
22932 + {BFA_SM(bfa_iocpf_sm_reset), BFA_IOCPF_RESET},
22933 + {BFA_SM(bfa_iocpf_sm_fwcheck), BFA_IOCPF_FWMISMATCH},
22934 + {BFA_SM(bfa_iocpf_sm_mismatch), BFA_IOCPF_FWMISMATCH},
22935 +@@ -2862,12 +2862,12 @@ static enum bfa_ioc_state
22936 + bfa_ioc_get_state(struct bfa_ioc *ioc)
22937 + {
22938 + enum bfa_iocpf_state iocpf_st;
22939 +- enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm);
22940 ++ enum bfa_ioc_state ioc_st = ioc_sm_to_state(ioc_sm_table, ioc->fsm);
22941 +
22942 + if (ioc_st == BFA_IOC_ENABLING ||
22943 + ioc_st == BFA_IOC_FAIL || ioc_st == BFA_IOC_INITFAIL) {
22944 +
22945 +- iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
22946 ++ iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
22947 +
22948 + switch (iocpf_st) {
22949 + case BFA_IOCPF_SEMWAIT:
22950 +@@ -2985,7 +2985,7 @@ bfa_nw_iocpf_timeout(struct bfa_ioc *ioc)
22951 + {
22952 + enum bfa_iocpf_state iocpf_st;
22953 +
22954 +- iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
22955 ++ iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
22956 +
22957 + if (iocpf_st == BFA_IOCPF_HWINIT)
22958 + bfa_ioc_poll_fwinit(ioc);
22959 +diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.h b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
22960 +index 2c0b4c0..97873eb 100644
22961 +--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.h
22962 ++++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
22963 +@@ -156,7 +156,7 @@ struct bfa_ioc_notify {
22964 + } while (0)
22965 +
22966 + struct bfa_iocpf {
22967 +- bfa_fsm_t fsm;
22968 ++ bfa_fsm_iocpf_t fsm;
22969 + struct bfa_ioc *ioc;
22970 + bool fw_mismatch_notified;
22971 + bool auto_recover;
22972 +@@ -164,7 +164,7 @@ struct bfa_iocpf {
22973 + };
22974 +
22975 + struct bfa_ioc {
22976 +- bfa_fsm_t fsm;
22977 ++ bfa_fsm_ioc_t fsm;
22978 + struct bfa *bfa;
22979 + struct bfa_pcidev pcidev;
22980 + struct timer_list ioc_timer;
22981 +diff --git a/drivers/net/ethernet/brocade/bna/bfa_msgq.h b/drivers/net/ethernet/brocade/bna/bfa_msgq.h
22982 +index 66bc8b5..bf64466 100644
22983 +--- a/drivers/net/ethernet/brocade/bna/bfa_msgq.h
22984 ++++ b/drivers/net/ethernet/brocade/bna/bfa_msgq.h
22985 +@@ -63,8 +63,10 @@ enum bfa_msgq_cmdq_flags {
22986 + BFA_MSGQ_CMDQ_F_DB_UPDATE = 1,
22987 + };
22988 +
22989 ++enum cmdq_event;
22990 ++
22991 + struct bfa_msgq_cmdq {
22992 +- bfa_fsm_t fsm;
22993 ++ void (*fsm)(struct bfa_msgq_cmdq *, enum cmdq_event);
22994 + enum bfa_msgq_cmdq_flags flags;
22995 +
22996 + u16 producer_index;
22997 +@@ -89,8 +91,10 @@ enum bfa_msgq_rspq_flags {
22998 +
22999 + typedef void (*bfa_msgq_mcfunc_t)(void *cbarg, struct bfi_msgq_mhdr *mhdr);
23000 +
23001 ++enum rspq_event;
23002 ++
23003 + struct bfa_msgq_rspq {
23004 +- bfa_fsm_t fsm;
23005 ++ void (*fsm)(struct bfa_msgq_rspq *, enum rspq_event);
23006 + enum bfa_msgq_rspq_flags flags;
23007 +
23008 + u16 producer_index;
23009 diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c
23010 -index 4e5c387..bba8173 100644
23011 +index 4e5c387..0791dab 100644
23012 --- a/drivers/net/ethernet/brocade/bna/bna_enet.c
23013 +++ b/drivers/net/ethernet/brocade/bna/bna_enet.c
23014 +@@ -1265,7 +1265,7 @@ bna_enet_mtu_get(struct bna_enet *enet)
23015 + void
23016 + bna_enet_enable(struct bna_enet *enet)
23017 + {
23018 +- if (enet->fsm != (bfa_sm_t)bna_enet_sm_stopped)
23019 ++ if (enet->fsm != bna_enet_sm_stopped)
23020 + return;
23021 +
23022 + enet->flags |= BNA_ENET_F_ENABLED;
23023 @@ -1676,10 +1676,10 @@ bna_cb_ioceth_reset(void *arg)
23024 }
23025
23026 @@ -52574,6 +58982,204 @@ index 4e5c387..bba8173 100644
23027 };
23028
23029 static void bna_attr_init(struct bna_ioceth *ioceth)
23030 +@@ -1759,12 +1759,12 @@ bna_ioceth_uninit(struct bna_ioceth *ioceth)
23031 + void
23032 + bna_ioceth_enable(struct bna_ioceth *ioceth)
23033 + {
23034 +- if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_ready) {
23035 ++ if (ioceth->fsm == bna_ioceth_sm_ready) {
23036 + bnad_cb_ioceth_ready(ioceth->bna->bnad);
23037 + return;
23038 + }
23039 +
23040 +- if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_stopped)
23041 ++ if (ioceth->fsm == bna_ioceth_sm_stopped)
23042 + bfa_fsm_send_event(ioceth, IOCETH_E_ENABLE);
23043 + }
23044 +
23045 +diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
23046 +index 95bc470..c12be9f 100644
23047 +--- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
23048 ++++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
23049 +@@ -1964,7 +1964,7 @@ static void
23050 + bna_rx_stop(struct bna_rx *rx)
23051 + {
23052 + rx->rx_flags &= ~BNA_RX_F_ENET_STARTED;
23053 +- if (rx->fsm == (bfa_fsm_t) bna_rx_sm_stopped)
23054 ++ if (rx->fsm == bna_rx_sm_stopped)
23055 + bna_rx_mod_cb_rx_stopped(&rx->bna->rx_mod, rx);
23056 + else {
23057 + rx->stop_cbfn = bna_rx_mod_cb_rx_stopped;
23058 +@@ -2543,7 +2543,7 @@ bna_rx_destroy(struct bna_rx *rx)
23059 + void
23060 + bna_rx_enable(struct bna_rx *rx)
23061 + {
23062 +- if (rx->fsm != (bfa_sm_t)bna_rx_sm_stopped)
23063 ++ if (rx->fsm != bna_rx_sm_stopped)
23064 + return;
23065 +
23066 + rx->rx_flags |= BNA_RX_F_ENABLED;
23067 +@@ -3531,7 +3531,7 @@ bna_tx_destroy(struct bna_tx *tx)
23068 + void
23069 + bna_tx_enable(struct bna_tx *tx)
23070 + {
23071 +- if (tx->fsm != (bfa_sm_t)bna_tx_sm_stopped)
23072 ++ if (tx->fsm != bna_tx_sm_stopped)
23073 + return;
23074 +
23075 + tx->flags |= BNA_TX_F_ENABLED;
23076 +diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h
23077 +index c438d03..4653f43 100644
23078 +--- a/drivers/net/ethernet/brocade/bna/bna_types.h
23079 ++++ b/drivers/net/ethernet/brocade/bna/bna_types.h
23080 +@@ -320,8 +320,10 @@ struct bna_attr {
23081 +
23082 + /* IOCEth */
23083 +
23084 ++enum bna_ioceth_event;
23085 ++
23086 + struct bna_ioceth {
23087 +- bfa_fsm_t fsm;
23088 ++ void (*fsm)(struct bna_ioceth *, enum bna_ioceth_event);
23089 + struct bfa_ioc ioc;
23090 +
23091 + struct bna_attr attr;
23092 +@@ -342,8 +344,10 @@ struct bna_pause_config {
23093 + enum bna_status rx_pause;
23094 + };
23095 +
23096 ++enum bna_enet_event;
23097 ++
23098 + struct bna_enet {
23099 +- bfa_fsm_t fsm;
23100 ++ void (*fsm)(struct bna_enet *, enum bna_enet_event);
23101 + enum bna_enet_flags flags;
23102 +
23103 + enum bna_enet_type type;
23104 +@@ -368,8 +372,10 @@ struct bna_enet {
23105 +
23106 + /* Ethport */
23107 +
23108 ++enum bna_ethport_event;
23109 ++
23110 + struct bna_ethport {
23111 +- bfa_fsm_t fsm;
23112 ++ void (*fsm)(struct bna_ethport *, enum bna_ethport_event);
23113 + enum bna_ethport_flags flags;
23114 +
23115 + enum bna_link_status link_status;
23116 +@@ -462,13 +468,15 @@ struct bna_txq {
23117 + };
23118 +
23119 + /* Tx object */
23120 ++enum bna_tx_event;
23121 ++
23122 + struct bna_tx {
23123 + /* This should be the first one */
23124 + struct list_head qe;
23125 + int rid;
23126 + int hw_id;
23127 +
23128 +- bfa_fsm_t fsm;
23129 ++ void (*fsm)(struct bna_tx *, enum bna_tx_event);
23130 + enum bna_tx_flags flags;
23131 +
23132 + enum bna_tx_type type;
23133 +@@ -706,8 +714,10 @@ struct bna_rxp {
23134 + };
23135 +
23136 + /* RxF structure (hardware Rx Function) */
23137 ++enum bna_rxf_event;
23138 ++
23139 + struct bna_rxf {
23140 +- bfa_fsm_t fsm;
23141 ++ void (*fsm)(struct bna_rxf *, enum bna_rxf_event);
23142 +
23143 + struct bfa_msgq_cmd_entry msgq_cmd;
23144 + union {
23145 +@@ -777,13 +787,15 @@ struct bna_rxf {
23146 + };
23147 +
23148 + /* Rx object */
23149 ++enum bna_rx_event;
23150 ++
23151 + struct bna_rx {
23152 + /* This should be the first one */
23153 + struct list_head qe;
23154 + int rid;
23155 + int hw_id;
23156 +
23157 +- bfa_fsm_t fsm;
23158 ++ void (*fsm)(struct bna_rx *, enum bna_rx_event);
23159 +
23160 + enum bna_rx_type type;
23161 +
23162 +diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
23163 +index 771cc26..c681a90 100644
23164 +--- a/drivers/net/ethernet/brocade/bna/bnad.c
23165 ++++ b/drivers/net/ethernet/brocade/bna/bnad.c
23166 +@@ -1118,8 +1118,9 @@ bnad_cb_tx_resume(struct bnad *bnad, struct bna_tx *tx)
23167 + * Free all TxQs buffers and then notify TX_E_CLEANUP_DONE to Tx fsm.
23168 + */
23169 + static void
23170 +-bnad_tx_cleanup(struct delayed_work *work)
23171 ++bnad_tx_cleanup(struct work_struct *_work)
23172 + {
23173 ++ struct delayed_work *work = (struct delayed_work *)_work;
23174 + struct bnad_tx_info *tx_info =
23175 + container_of(work, struct bnad_tx_info, tx_cleanup_work);
23176 + struct bnad *bnad = NULL;
23177 +@@ -1197,7 +1198,7 @@ bnad_cb_rx_stall(struct bnad *bnad, struct bna_rx *rx)
23178 + * Free all RxQs buffers and then notify RX_E_CLEANUP_DONE to Rx fsm.
23179 + */
23180 + static void
23181 +-bnad_rx_cleanup(void *work)
23182 ++bnad_rx_cleanup(struct work_struct *work)
23183 + {
23184 + struct bnad_rx_info *rx_info =
23185 + container_of(work, struct bnad_rx_info, rx_cleanup_work);
23186 +@@ -2021,8 +2022,7 @@ bnad_setup_tx(struct bnad *bnad, u32 tx_id)
23187 + }
23188 + tx_info->tx = tx;
23189 +
23190 +- INIT_DELAYED_WORK(&tx_info->tx_cleanup_work,
23191 +- (work_func_t)bnad_tx_cleanup);
23192 ++ INIT_DELAYED_WORK(&tx_info->tx_cleanup_work, bnad_tx_cleanup);
23193 +
23194 + /* Register ISR for the Tx object */
23195 + if (intr_info->intr_type == BNA_INTR_T_MSIX) {
23196 +@@ -2278,8 +2278,7 @@ bnad_setup_rx(struct bnad *bnad, u32 rx_id)
23197 + rx_info->rx = rx;
23198 + spin_unlock_irqrestore(&bnad->bna_lock, flags);
23199 +
23200 +- INIT_WORK(&rx_info->rx_cleanup_work,
23201 +- (work_func_t)(bnad_rx_cleanup));
23202 ++ INIT_WORK(&rx_info->rx_cleanup_work, bnad_rx_cleanup);
23203 +
23204 + /*
23205 + * Init NAPI, so that state is set to NAPI_STATE_SCHED,
23206 +diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
23207 +index 50c9410..afd792e 100644
23208 +--- a/drivers/net/ethernet/cadence/macb.c
23209 ++++ b/drivers/net/ethernet/cadence/macb.c
23210 +@@ -1279,7 +1279,7 @@ dma_error:
23211 + return 0;
23212 + }
23213 +
23214 +-static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
23215 ++static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
23216 + {
23217 + u16 queue_index = skb_get_queue_mapping(skb);
23218 + struct macb *bp = netdev_priv(dev);
23219 +@@ -2550,7 +2550,7 @@ static int at91ether_close(struct net_device *dev)
23220 + }
23221 +
23222 + /* Transmit packet */
23223 +-static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
23224 ++static netdev_tx_t at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
23225 + {
23226 + struct macb *lp = netdev_priv(dev);
23227 +
23228 diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
23229 index 245c063..74ed9c9 100644
23230 --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
23231 @@ -52600,10 +59206,19 @@ index 245c063..74ed9c9 100644
23232 mdio_cmd->op = op;
23233 mdio_cmd->mdio_addr = loc;
23234 diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
23235 -index b895044..f8ed0c3 100644
23236 +index 34d269c..43dcc17 100644
23237 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
23238 +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
23239 -@@ -1726,7 +1726,7 @@ static void if_cfg_callback(struct octeon_device *oct,
23240 +@@ -475,7 +475,7 @@ static void stop_pci_io(struct octeon_device *oct)
23241 + * this device has been detected.
23242 + */
23243 + static pci_ers_result_t liquidio_pcie_error_detected(struct pci_dev *pdev,
23244 +- pci_channel_state_t state)
23245 ++ enum pci_channel_state state)
23246 + {
23247 + struct octeon_device *oct = pci_get_drvdata(pdev);
23248 +
23249 +@@ -1724,7 +1724,7 @@ static void if_cfg_callback(struct octeon_device *oct,
23250 if (resp->status)
23251 dev_err(&oct->pci_dev->dev, "nic if cfg instruction failed. Status: %llx\n",
23252 CVM_CAST64(resp->status));
23253 @@ -52612,7 +59227,16 @@ index b895044..f8ed0c3 100644
23254
23255 /* This barrier is required to be sure that the response has been
23256 * written fully before waking up the handler
23257 -@@ -3176,7 +3176,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
23258 +@@ -2662,7 +2662,7 @@ static inline u32 get_ipv6_5tuple_tag(struct sk_buff *skb)
23259 + * @returns whether the packet was transmitted to the device okay or not
23260 + * (NETDEV_TX_OK or NETDEV_TX_BUSY)
23261 + */
23262 +-static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
23263 ++static netdev_tx_t liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
23264 + {
23265 + struct lio *lio;
23266 + struct octnet_buf_free_info *finfo;
23267 +@@ -3174,7 +3174,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
23268 dev_dbg(&octeon_dev->pci_dev->dev,
23269 "requesting config for interface %d, iqs %d, oqs %d\n",
23270 i, num_iqueues, num_oqueues);
23271 @@ -52621,7 +59245,7 @@ index b895044..f8ed0c3 100644
23272 ctx->octeon_id = lio_get_device_id(octeon_dev);
23273 init_waitqueue_head(&ctx->wc);
23274
23275 -@@ -3239,8 +3239,11 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
23276 +@@ -3237,8 +3237,11 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
23277 props = &octeon_dev->props[i];
23278 props->netdev = netdev;
23279
23280 @@ -52635,6 +59259,19 @@ index b895044..f8ed0c3 100644
23281
23282 /* Associate the routines that will handle different
23283 * netdev tasks.
23284 +diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
23285 +index 60908ea..4ecee32 100644
23286 +--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
23287 ++++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
23288 +@@ -2996,7 +2996,7 @@ void t3_fatal_err(struct adapter *adapter)
23289 + * this device has been detected.
23290 + */
23291 + static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
23292 +- pci_channel_state_t state)
23293 ++ enum pci_channel_state state)
23294 + {
23295 + struct adapter *adapter = pci_get_drvdata(pdev);
23296 +
23297 diff --git a/drivers/net/ethernet/chelsio/cxgb3/l2t.h b/drivers/net/ethernet/chelsio/cxgb3/l2t.h
23298 index 8cffcdf..aadf043 100644
23299 --- a/drivers/net/ethernet/chelsio/cxgb3/l2t.h
23300 @@ -52648,11 +59285,88 @@ index 8cffcdf..aadf043 100644
23301
23302 #define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb)
23303
23304 +diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
23305 +index b8a5fb0..39f0c9a 100644
23306 +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
23307 ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
23308 +@@ -4103,7 +4103,7 @@ bye:
23309 + /* EEH callbacks */
23310 +
23311 + static pci_ers_result_t eeh_err_detected(struct pci_dev *pdev,
23312 +- pci_channel_state_t state)
23313 ++ enum pci_channel_state state)
23314 + {
23315 + int i;
23316 + struct adapter *adap = pci_get_drvdata(pdev);
23317 +diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
23318 +index 6049f70..6e1f19e 100644
23319 +--- a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
23320 ++++ b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
23321 +@@ -538,7 +538,7 @@ int t4vf_sge_alloc_eth_txq(struct adapter *, struct sge_eth_txq *,
23322 + unsigned int);
23323 + void t4vf_free_sge_resources(struct adapter *);
23324 +
23325 +-int t4vf_eth_xmit(struct sk_buff *, struct net_device *);
23326 ++netdev_tx_t t4vf_eth_xmit(struct sk_buff *, struct net_device *);
23327 + int t4vf_ethrx_handler(struct sge_rspq *, const __be64 *,
23328 + const struct pkt_gl *);
23329 +
23330 +diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
23331 +index 6528231..8503500 100644
23332 +--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
23333 ++++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
23334 +@@ -1159,7 +1159,7 @@ static inline void txq_advance(struct sge_txq *tq, unsigned int n)
23335 + *
23336 + * Add a packet to an SGE Ethernet TX queue. Runs with softirqs disabled.
23337 + */
23338 +-int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
23339 ++netdev_tx_t t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
23340 + {
23341 + u32 wr_mid;
23342 + u64 cntrl, *end;
23343 diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
23344 -index 8966f31..e15a101 100644
23345 +index 3acde3b..284086c 100644
23346 --- a/drivers/net/ethernet/dec/tulip/de4x5.c
23347 +++ b/drivers/net/ethernet/dec/tulip/de4x5.c
23348 -@@ -5373,7 +5373,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
23349 +@@ -912,7 +912,7 @@ static int de4x5_init(struct net_device *dev);
23350 + static int de4x5_sw_reset(struct net_device *dev);
23351 + static int de4x5_rx(struct net_device *dev);
23352 + static int de4x5_tx(struct net_device *dev);
23353 +-static void de4x5_ast(struct net_device *dev);
23354 ++static void de4x5_ast(unsigned long _dev);
23355 + static int de4x5_txur(struct net_device *dev);
23356 + static int de4x5_rx_ovfc(struct net_device *dev);
23357 +
23358 +@@ -1149,7 +1149,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
23359 + lp->gendev = gendev;
23360 + spin_lock_init(&lp->lock);
23361 + init_timer(&lp->timer);
23362 +- lp->timer.function = (void (*)(unsigned long))de4x5_ast;
23363 ++ lp->timer.function = de4x5_ast;
23364 + lp->timer.data = (unsigned long)dev;
23365 + de4x5_parse_params(dev);
23366 +
23367 +@@ -1740,8 +1740,9 @@ de4x5_tx(struct net_device *dev)
23368 + }
23369 +
23370 + static void
23371 +-de4x5_ast(struct net_device *dev)
23372 ++de4x5_ast(unsigned long _dev)
23373 + {
23374 ++ struct net_device *dev = (struct net_device *)_dev;
23375 + struct de4x5_private *lp = netdev_priv(dev);
23376 + int next_tick = DE4X5_AUTOSENSE_MS;
23377 + int dt;
23378 +@@ -2368,7 +2369,7 @@ autoconf_media(struct net_device *dev)
23379 + lp->media = INIT;
23380 + lp->tcount = 0;
23381 +
23382 +- de4x5_ast(dev);
23383 ++ de4x5_ast((unsigned long)dev);
23384 +
23385 + return lp->media;
23386 + }
23387 +@@ -5373,7 +5374,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
23388 for (i=0; i<ETH_ALEN; i++) {
23389 tmp.addr[i] = dev->dev_addr[i];
23390 }
23391 @@ -52661,7 +59375,7 @@ index 8966f31..e15a101 100644
23392 break;
23393
23394 case DE4X5_SET_HWADDR: /* Set the hardware address */
23395 -@@ -5413,7 +5413,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
23396 +@@ -5413,7 +5414,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
23397 spin_lock_irqsave(&lp->lock, flags);
23398 memcpy(&statbuf, &lp->pktStats, ioc->len);
23399 spin_unlock_irqrestore(&lp->lock, flags);
23400 @@ -52671,10 +59385,10 @@ index 8966f31..e15a101 100644
23401 break;
23402 }
23403 diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
23404 -index 8a1d9ff..5cc81dd 100644
23405 +index d1cf127..9d52393 100644
23406 --- a/drivers/net/ethernet/emulex/benet/be_main.c
23407 +++ b/drivers/net/ethernet/emulex/benet/be_main.c
23408 -@@ -551,7 +551,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
23409 +@@ -556,7 +556,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
23410
23411 if (wrapped)
23412 newacc += 65536;
23413 @@ -52683,8 +59397,17 @@ index 8a1d9ff..5cc81dd 100644
23414 }
23415
23416 static void populate_erx_stats(struct be_adapter *adapter,
23417 +@@ -5395,7 +5395,7 @@ static void be_shutdown(struct pci_dev *pdev)
23418 + }
23419 +
23420 + static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev,
23421 +- pci_channel_state_t state)
23422 ++ enum pci_channel_state state)
23423 + {
23424 + struct be_adapter *adapter = pci_get_drvdata(pdev);
23425 +
23426 diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
23427 -index 6d0c5d5..55be363 100644
23428 +index 84384e1..baac17d 100644
23429 --- a/drivers/net/ethernet/faraday/ftgmac100.c
23430 +++ b/drivers/net/ethernet/faraday/ftgmac100.c
23431 @@ -30,6 +30,8 @@
23432 @@ -52709,6 +59432,109 @@ index dce5f7b..2433466 100644
23433
23434 #include "ftmac100.h"
23435
23436 +diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
23437 +index 0c4afe9..d888314 100644
23438 +--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
23439 ++++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
23440 +@@ -422,7 +422,7 @@ static void hip04_start_tx_timer(struct hip04_priv *priv)
23441 + ns, HRTIMER_MODE_REL);
23442 + }
23443 +
23444 +-static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
23445 ++static netdev_tx_t hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
23446 + {
23447 + struct hip04_priv *priv = netdev_priv(ndev);
23448 + struct net_device_stats *stats = &ndev->stats;
23449 +diff --git a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
23450 +index e51892d..3e645f4 100644
23451 +--- a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
23452 ++++ b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
23453 +@@ -601,7 +601,7 @@ static irqreturn_t hix5hd2_interrupt(int irq, void *dev_id)
23454 + return IRQ_HANDLED;
23455 + }
23456 +
23457 +-static int hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
23458 ++static netdev_tx_t hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
23459 + {
23460 + struct hix5hd2_priv *priv = netdev_priv(dev);
23461 + struct hix5hd2_desc *desc;
23462 +diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
23463 +index d4f92ed..38fdf5b 100644
23464 +--- a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
23465 ++++ b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
23466 +@@ -857,16 +857,18 @@ int hns_dsaf_ae_init(struct dsaf_device *dsaf_dev)
23467 + struct hnae_ae_dev *ae_dev = &dsaf_dev->ae_dev;
23468 + static atomic_t id = ATOMIC_INIT(-1);
23469 +
23470 ++ pax_open_kernel();
23471 + switch (dsaf_dev->dsaf_ver) {
23472 + case AE_VERSION_1:
23473 +- hns_dsaf_ops.toggle_ring_irq = hns_ae_toggle_ring_irq;
23474 ++ *(void **)&hns_dsaf_ops.toggle_ring_irq = hns_ae_toggle_ring_irq;
23475 + break;
23476 + case AE_VERSION_2:
23477 +- hns_dsaf_ops.toggle_ring_irq = hns_aev2_toggle_ring_irq;
23478 ++ *(void **)&hns_dsaf_ops.toggle_ring_irq = hns_aev2_toggle_ring_irq;
23479 + break;
23480 + default:
23481 + break;
23482 + }
23483 ++ pax_close_kernel();
23484 +
23485 + snprintf(ae_dev->name, AE_NAME_SIZE, "%s%d", DSAF_DEVICE_NAME,
23486 + (int)atomic_inc_return(&id));
23487 +diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
23488 +index 068789e..f4928f0 100644
23489 +--- a/drivers/net/ethernet/intel/e100.c
23490 ++++ b/drivers/net/ethernet/intel/e100.c
23491 +@@ -3106,7 +3106,7 @@ static void e100_shutdown(struct pci_dev *pdev)
23492 + * @pdev: Pointer to PCI device
23493 + * @state: The current pci connection state
23494 + */
23495 +-static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
23496 ++static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
23497 + {
23498 + struct net_device *netdev = pci_get_drvdata(pdev);
23499 + struct nic *nic = netdev_priv(netdev);
23500 +diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
23501 +index 3fc7bde..de784b9 100644
23502 +--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
23503 ++++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
23504 +@@ -5255,7 +5255,7 @@ static void e1000_netpoll(struct net_device *netdev)
23505 + * this device has been detected.
23506 + */
23507 + static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
23508 +- pci_channel_state_t state)
23509 ++ enum pci_channel_state state)
23510 + {
23511 + struct net_device *netdev = pci_get_drvdata(pdev);
23512 + struct e1000_adapter *adapter = netdev_priv(netdev);
23513 +diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
23514 +index c71ba1b..3d364c1 100644
23515 +--- a/drivers/net/ethernet/intel/e1000e/netdev.c
23516 ++++ b/drivers/net/ethernet/intel/e1000e/netdev.c
23517 +@@ -6734,7 +6734,7 @@ static void e1000_netpoll(struct net_device *netdev)
23518 + * this device has been detected.
23519 + */
23520 + static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
23521 +- pci_channel_state_t state)
23522 ++ enum pci_channel_state state)
23523 + {
23524 + struct net_device *netdev = pci_get_drvdata(pdev);
23525 + struct e1000_adapter *adapter = netdev_priv(netdev);
23526 +diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
23527 +index 4eb7a6f..da3c328 100644
23528 +--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
23529 ++++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
23530 +@@ -2249,7 +2249,7 @@ static int fm10k_suspend(struct pci_dev *pdev,
23531 + * this device has been detected.
23532 + */
23533 + static pci_ers_result_t fm10k_io_error_detected(struct pci_dev *pdev,
23534 +- pci_channel_state_t state)
23535 ++ enum pci_channel_state state)
23536 + {
23537 + struct fm10k_intfc *interface = pci_get_drvdata(pdev);
23538 + struct net_device *netdev = interface->netdev;
23539 diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
23540 index 565ca7c..dcdf764 100644
23541 --- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
23542 @@ -52722,11 +59548,50 @@ index 565ca7c..dcdf764 100644
23543 smp_mb(); /* Force the above update. */
23544 }
23545
23546 +diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
23547 +index 31e5f39..d3a8073 100644
23548 +--- a/drivers/net/ethernet/intel/igb/igb_main.c
23549 ++++ b/drivers/net/ethernet/intel/igb/igb_main.c
23550 +@@ -7612,7 +7612,7 @@ static void igb_netpoll(struct net_device *netdev)
23551 + * this device has been detected.
23552 + **/
23553 + static pci_ers_result_t igb_io_error_detected(struct pci_dev *pdev,
23554 +- pci_channel_state_t state)
23555 ++ enum pci_channel_state state)
23556 + {
23557 + struct net_device *netdev = pci_get_drvdata(pdev);
23558 + struct igb_adapter *adapter = netdev_priv(netdev);
23559 +diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
23560 +index 297af80..ae51655 100644
23561 +--- a/drivers/net/ethernet/intel/igbvf/netdev.c
23562 ++++ b/drivers/net/ethernet/intel/igbvf/netdev.c
23563 +@@ -2507,7 +2507,7 @@ static void igbvf_netpoll(struct net_device *netdev)
23564 + * this device has been detected.
23565 + */
23566 + static pci_ers_result_t igbvf_io_error_detected(struct pci_dev *pdev,
23567 +- pci_channel_state_t state)
23568 ++ enum pci_channel_state state)
23569 + {
23570 + struct net_device *netdev = pci_get_drvdata(pdev);
23571 + struct igbvf_adapter *adapter = netdev_priv(netdev);
23572 +diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
23573 +index c4003a8..e464fee 100644
23574 +--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
23575 ++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
23576 +@@ -9349,7 +9349,7 @@ static void ixgbe_remove(struct pci_dev *pdev)
23577 + * this device has been detected.
23578 + */
23579 + static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
23580 +- pci_channel_state_t state)
23581 ++ enum pci_channel_state state)
23582 + {
23583 + struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
23584 + struct net_device *netdev = adapter->netdev;
23585 diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
23586 -index e5ba040..d47531c 100644
23587 +index ef1504d..e1c3402 100644
23588 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
23589 +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
23590 -@@ -782,7 +782,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
23591 +@@ -1119,7 +1119,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
23592 }
23593
23594 /* update the base incval used to calculate frequency adjustment */
23595 @@ -52735,8 +59600,43 @@ index e5ba040..d47531c 100644
23596 smp_mb();
23597
23598 /* need lock to prevent incorrect read while modifying cyclecounter */
23599 +diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
23600 +index 3558f01..ff4a352 100644
23601 +--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
23602 ++++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
23603 +@@ -3607,7 +3607,7 @@ static int ixgbevf_maybe_stop_tx(struct ixgbevf_ring *tx_ring, int size)
23604 + return __ixgbevf_maybe_stop_tx(tx_ring, size);
23605 + }
23606 +
23607 +-static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
23608 ++static netdev_tx_t ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
23609 + {
23610 + struct ixgbevf_adapter *adapter = netdev_priv(netdev);
23611 + struct ixgbevf_tx_buffer *first;
23612 +@@ -4144,7 +4144,7 @@ static void ixgbevf_remove(struct pci_dev *pdev)
23613 + * this device has been detected.
23614 + **/
23615 + static pci_ers_result_t ixgbevf_io_error_detected(struct pci_dev *pdev,
23616 +- pci_channel_state_t state)
23617 ++ enum pci_channel_state state)
23618 + {
23619 + struct net_device *netdev = pci_get_drvdata(pdev);
23620 + struct ixgbevf_adapter *adapter = netdev_priv(netdev);
23621 +diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
23622 +index 7ace07d..b9eab92 100644
23623 +--- a/drivers/net/ethernet/marvell/pxa168_eth.c
23624 ++++ b/drivers/net/ethernet/marvell/pxa168_eth.c
23625 +@@ -1270,7 +1270,7 @@ static int pxa168_rx_poll(struct napi_struct *napi, int budget)
23626 + return work_done;
23627 + }
23628 +
23629 +-static int pxa168_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
23630 ++static netdev_tx_t pxa168_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
23631 + {
23632 + struct pxa168_eth_private *pep = netdev_priv(dev);
23633 + struct net_device_stats *stats = &dev->stats;
23634 diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
23635 -index e7a5000..982753a 100644
23636 +index 41440b2..0ccefa2 100644
23637 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
23638 +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
23639 @@ -61,7 +61,7 @@ static int mlx4_alloc_pages(struct mlx4_en_priv *priv,
23640 @@ -52749,10 +59649,10 @@ index e7a5000..982753a 100644
23641 if (likely(page))
23642 break;
23643 diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
23644 -index 4421bf54..c07afb0 100644
23645 +index e0946ab..308403f 100644
23646 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
23647 +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
23648 -@@ -475,8 +475,8 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev,
23649 +@@ -477,8 +477,8 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev,
23650 wmb();
23651
23652 /* we want to dirty this cache line once */
23653 @@ -52763,29 +59663,37 @@ index 4421bf54..c07afb0 100644
23654
23655 netdev_tx_completed_queue(ring->tx_queue, packets, bytes);
23656
23657 -diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
23658 -index 1203d89..7895359 100644
23659 ---- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
23660 -+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
23661 -@@ -2033,8 +2033,11 @@ static void mlx5e_build_netdev(struct net_device *netdev)
23662 +diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
23663 +index f8674ae..7ef8ac5 100644
23664 +--- a/drivers/net/ethernet/mellanox/mlx4/main.c
23665 ++++ b/drivers/net/ethernet/mellanox/mlx4/main.c
23666 +@@ -3951,7 +3951,7 @@ static const struct pci_device_id mlx4_pci_table[] = {
23667 + MODULE_DEVICE_TABLE(pci, mlx4_pci_table);
23668
23669 - SET_NETDEV_DEV(netdev, &mdev->pdev->dev);
23670 + static pci_ers_result_t mlx4_pci_err_detected(struct pci_dev *pdev,
23671 +- pci_channel_state_t state)
23672 ++ enum pci_channel_state state)
23673 + {
23674 + struct mlx4_dev_persistent *persist = pci_get_drvdata(pdev);
23675
23676 -- if (priv->params.num_tc > 1)
23677 -- mlx5e_netdev_ops.ndo_select_queue = mlx5e_select_queue;
23678 -+ if (priv->params.num_tc > 1) {
23679 -+ pax_open_kernel();
23680 -+ *(void **)&mlx5e_netdev_ops.ndo_select_queue = mlx5e_select_queue;
23681 -+ pax_close_kernel();
23682 -+ }
23683 +diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
23684 +index 1545a94..418888c 100644
23685 +--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
23686 ++++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
23687 +@@ -1367,7 +1367,7 @@ static void remove_one(struct pci_dev *pdev)
23688 + }
23689
23690 - netdev->netdev_ops = &mlx5e_netdev_ops;
23691 - netdev->watchdog_timeo = 15 * HZ;
23692 + static pci_ers_result_t mlx5_pci_err_detected(struct pci_dev *pdev,
23693 +- pci_channel_state_t state)
23694 ++ enum pci_channel_state state)
23695 + {
23696 + struct mlx5_core_dev *dev = pci_get_drvdata(pdev);
23697 + struct mlx5_priv *priv = &dev->priv;
23698 diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
23699 -index 3be4a23..e89602b 100644
23700 +index a94daa8..d1d3bd0 100644
23701 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
23702 +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
23703 -@@ -1915,7 +1915,7 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *unused,
23704 +@@ -2994,7 +2994,7 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *unused,
23705 return NOTIFY_DONE;
23706 }
23707
23708 @@ -52794,6 +59702,32 @@ index 3be4a23..e89602b 100644
23709 .notifier_call = mlxsw_sp_netdevice_event,
23710 };
23711
23712 +diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
23713 +index 2fc5cd5..6c6108a 100644
23714 +--- a/drivers/net/ethernet/micrel/ks8851_mll.c
23715 ++++ b/drivers/net/ethernet/micrel/ks8851_mll.c
23716 +@@ -1020,7 +1020,7 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
23717 + * spin_lock_irqsave is required because tx and rx should be mutual exclusive.
23718 + * So while tx is in-progress, prevent IRQ interrupt from happenning.
23719 + */
23720 +-static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
23721 ++static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
23722 + {
23723 + int retv = NETDEV_TX_OK;
23724 + struct ks_net *ks = netdev_priv(netdev);
23725 +diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
23726 +index 9ba9758..9c7c77f 100644
23727 +--- a/drivers/net/ethernet/neterion/s2io.c
23728 ++++ b/drivers/net/ethernet/neterion/s2io.c
23729 +@@ -8563,7 +8563,7 @@ static void lro_append_pkt(struct s2io_nic *sp, struct lro *lro,
23730 + * this device has been detected.
23731 + */
23732 + static pci_ers_result_t s2io_io_error_detected(struct pci_dev *pdev,
23733 +- pci_channel_state_t state)
23734 ++ enum pci_channel_state state)
23735 + {
23736 + struct net_device *netdev = pci_get_drvdata(pdev);
23737 + struct s2io_nic *sp = netdev_priv(netdev);
23738 diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
23739 index 6223930..975033d 100644
23740 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
23741 @@ -52819,6 +59753,32 @@ index 6223930..975033d 100644
23742 fifo->mempool =
23743 __vxge_hw_mempool_create(vpath->hldev,
23744 fifo->config->memblock_size,
23745 +diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
23746 +index e0993eb..d8d7f50 100644
23747 +--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
23748 ++++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
23749 +@@ -4043,7 +4043,7 @@ static int vxge_pm_resume(struct pci_dev *pdev)
23750 + * this device has been detected.
23751 + */
23752 + static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
23753 +- pci_channel_state_t state)
23754 ++ enum pci_channel_state state)
23755 + {
23756 + struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
23757 + struct net_device *netdev = hldev->ndev;
23758 +diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
23759 +index 43c618b..bb6e368 100644
23760 +--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
23761 ++++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
23762 +@@ -630,7 +630,7 @@ static void nfp_net_tx_csum(struct nfp_net *nn, struct nfp_net_r_vector *r_vec,
23763 + *
23764 + * Return: NETDEV_TX_OK on success.
23765 + */
23766 +-static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
23767 ++static netdev_tx_t nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
23768 + {
23769 + struct nfp_net *nn = netdev_priv(netdev);
23770 + const struct skb_frag_struct *frag;
23771 diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
23772 index 75e88f4..1db3bf6 100644
23773 --- a/drivers/net/ethernet/nvidia/forcedeth.c
23774 @@ -52834,6 +59794,41 @@ index 75e88f4..1db3bf6 100644
23775 __le32 txvlan;
23776 __le32 flaglen;
23777 };
23778 +diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
23779 +index 3b98b263b..13d2129 100644
23780 +--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
23781 ++++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
23782 +@@ -2131,7 +2131,7 @@ static int pch_gbe_stop(struct net_device *netdev)
23783 + * - NETDEV_TX_OK: Normal end
23784 + * - NETDEV_TX_BUSY: Error end
23785 + */
23786 +-static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
23787 ++static netdev_tx_t pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
23788 + {
23789 + struct pch_gbe_adapter *adapter = netdev_priv(netdev);
23790 + struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring;
23791 +@@ -2447,7 +2447,7 @@ static const struct net_device_ops pch_gbe_netdev_ops = {
23792 + };
23793 +
23794 + static pci_ers_result_t pch_gbe_io_error_detected(struct pci_dev *pdev,
23795 +- pci_channel_state_t state)
23796 ++ enum pci_channel_state state)
23797 + {
23798 + struct net_device *netdev = pci_get_drvdata(pdev);
23799 + struct pch_gbe_adapter *adapter = netdev_priv(netdev);
23800 +diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
23801 +index 6409a06..e5bd4d6 100644
23802 +--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
23803 ++++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
23804 +@@ -1756,7 +1756,7 @@ err_out:
23805 + }
23806 +
23807 + static pci_ers_result_t netxen_io_error_detected(struct pci_dev *pdev,
23808 +- pci_channel_state_t state)
23809 ++ enum pci_channel_state state)
23810 + {
23811 + struct netxen_adapter *adapter = pci_get_drvdata(pdev);
23812 +
23813 diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
23814 index bf89216..4044d8c 100644
23815 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
23816 @@ -52880,6 +59875,19 @@ index 3490675..0b9e15a 100644
23817 break;
23818 default:
23819 dev_err(&adapter->pdev->dev, "Invalid Virtual NIC opmode\n");
23820 +diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
23821 +index 1205f6f..4b7c75b 100644
23822 +--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
23823 ++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
23824 +@@ -3970,7 +3970,7 @@ static void qlcnic_82xx_io_resume(struct pci_dev *pdev)
23825 + }
23826 +
23827 + static pci_ers_result_t qlcnic_io_error_detected(struct pci_dev *pdev,
23828 +- pci_channel_state_t state)
23829 ++ enum pci_channel_state state)
23830 + {
23831 + struct qlcnic_adapter *adapter = pci_get_drvdata(pdev);
23832 + struct qlcnic_hardware_ops *hw_ops = adapter->ahw->hw_ops;
23833 diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
23834 index cda9e60..4019992 100644
23835 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
23836 @@ -52894,7 +59902,7 @@ index cda9e60..4019992 100644
23837 u32 entry_offset, dump, no_entries, buf_offset = 0;
23838 int i, k, ops_cnt, ops_index, dump_size = 0;
23839 diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
23840 -index 79ef799..59bbd1f 100644
23841 +index dd2cf37..e36c9bb 100644
23842 --- a/drivers/net/ethernet/realtek/r8169.c
23843 +++ b/drivers/net/ethernet/realtek/r8169.c
23844 @@ -798,22 +798,22 @@ struct rtl8169_private {
23845 @@ -52924,8 +59932,21 @@ index 79ef799..59bbd1f 100644
23846
23847 int (*set_speed)(struct net_device *, u8 aneg, u16 sp, u8 dpx, u32 adv);
23848 int (*get_settings)(struct net_device *, struct ethtool_cmd *);
23849 +diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
23850 +index 01f6d5b..5584cdb 100644
23851 +--- a/drivers/net/ethernet/renesas/sh_eth.c
23852 ++++ b/drivers/net/ethernet/renesas/sh_eth.c
23853 +@@ -2322,7 +2322,7 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
23854 + }
23855 +
23856 + /* Packet transmit function */
23857 +-static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
23858 ++static netdev_tx_t sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
23859 + {
23860 + struct sh_eth_private *mdp = netdev_priv(ndev);
23861 + struct sh_eth_txdesc *txdesc;
23862 diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
23863 -index 2b34622..c406e81 100644
23864 +index f39e719..d05dce9 100644
23865 --- a/drivers/net/ethernet/rocker/rocker.c
23866 +++ b/drivers/net/ethernet/rocker/rocker.c
23867 @@ -5418,7 +5418,7 @@ out:
23868 @@ -53029,6 +60050,19 @@ index 9d78830..74fc649 100644
23869 if (tx_done != state->packet_count) {
23870 /* Don't free the skbs; they will be picked up on TX
23871 * overflow or channel teardown.
23872 +diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
23873 +index 8af2556..6da27b9 100644
23874 +--- a/drivers/net/ethernet/smsc/smsc911x.c
23875 ++++ b/drivers/net/ethernet/smsc/smsc911x.c
23876 +@@ -1673,7 +1673,7 @@ static int smsc911x_stop(struct net_device *dev)
23877 + }
23878 +
23879 + /* Entry point for transmitting a packet */
23880 +-static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
23881 ++static netdev_tx_t smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
23882 + {
23883 + struct smsc911x_data *pdata = netdev_priv(dev);
23884 + unsigned int freespace;
23885 diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
23886 index 3f20bb1..59add41 100644
23887 --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
23888 @@ -53044,6 +60078,19 @@ index 3f20bb1..59add41 100644
23889 }
23890
23891 /* To mask all all interrupts.*/
23892 +diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
23893 +index af11ed1..21bca5f 100644
23894 +--- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c
23895 ++++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
23896 +@@ -2173,7 +2173,7 @@ static void dwceqos_tx_rollback(struct net_local *lp, struct dwceqos_tx *tx)
23897 + lp->gso_size = tx->prev_gso_size;
23898 + }
23899 +
23900 +-static int dwceqos_start_xmit(struct sk_buff *skb, struct net_device *ndev)
23901 ++static netdev_tx_t dwceqos_start_xmit(struct sk_buff *skb, struct net_device *ndev)
23902 + {
23903 + struct net_local *lp = netdev_priv(ndev);
23904 + struct dwceqos_tx trans;
23905 diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
23906 index 2b7550c..f75bc6c 100644
23907 --- a/drivers/net/ethernet/via/via-rhine.c
23908 @@ -53057,11 +60104,37 @@ index 2b7550c..f75bc6c 100644
23909 {
23910 .ident = "EPIA-M",
23911 .matches = {
23912 +diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
23913 +index 8b282d0..134ab2e 100644
23914 +--- a/drivers/net/ethernet/wiznet/w5100.c
23915 ++++ b/drivers/net/ethernet/wiznet/w5100.c
23916 +@@ -437,7 +437,7 @@ static void w5100_tx_timeout(struct net_device *ndev)
23917 + netif_wake_queue(ndev);
23918 + }
23919 +
23920 +-static int w5100_start_tx(struct sk_buff *skb, struct net_device *ndev)
23921 ++static netdev_tx_t w5100_start_tx(struct sk_buff *skb, struct net_device *ndev)
23922 + {
23923 + struct w5100_priv *priv = netdev_priv(ndev);
23924 + u16 offset;
23925 +diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
23926 +index 8da7b93..719204a 100644
23927 +--- a/drivers/net/ethernet/wiznet/w5300.c
23928 ++++ b/drivers/net/ethernet/wiznet/w5300.c
23929 +@@ -366,7 +366,7 @@ static void w5300_tx_timeout(struct net_device *ndev)
23930 + netif_wake_queue(ndev);
23931 + }
23932 +
23933 +-static int w5300_start_tx(struct sk_buff *skb, struct net_device *ndev)
23934 ++static netdev_tx_t w5300_start_tx(struct sk_buff *skb, struct net_device *ndev)
23935 + {
23936 + struct w5300_priv *priv = netdev_priv(ndev);
23937 +
23938 diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
23939 -index 58efdec..4184f70 100644
23940 +index 0bf7edd..7fc5d06 100644
23941 --- a/drivers/net/geneve.c
23942 +++ b/drivers/net/geneve.c
23943 -@@ -1321,7 +1321,7 @@ nla_put_failure:
23944 +@@ -1443,7 +1443,7 @@ nla_put_failure:
23945 return -EMSGSIZE;
23946 }
23947
23948 @@ -53071,19 +60144,19 @@ index 58efdec..4184f70 100644
23949 .maxtype = IFLA_GENEVE_MAX,
23950 .policy = geneve_policy,
23951 diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
23952 -index 5fa98f5..74440cc 100644
23953 +index fcb92c0..a900f7d 100644
23954 --- a/drivers/net/hyperv/hyperv_net.h
23955 +++ b/drivers/net/hyperv/hyperv_net.h
23956 -@@ -178,7 +178,7 @@ struct rndis_device {
23957 +@@ -162,7 +162,7 @@ struct rndis_device {
23958 +
23959 enum rndis_device_state state;
23960 bool link_state;
23961 - bool link_change;
23962 - atomic_t new_req_id;
23963 + atomic_unchecked_t new_req_id;
23964
23965 spinlock_t request_lock;
23966 struct list_head req_list;
23967 -@@ -628,6 +628,7 @@ struct nvsp_message {
23968 +@@ -619,6 +619,7 @@ struct nvsp_message {
23969 #define NETVSC_PACKET_SIZE 4096
23970
23971 #define VRSS_SEND_TAB_SIZE 16
23972 @@ -53091,7 +60164,7 @@ index 5fa98f5..74440cc 100644
23973
23974 #define RNDIS_MAX_PKT_DEFAULT 8
23975 #define RNDIS_PKT_ALIGN_DEFAULT 8
23976 -@@ -692,13 +693,13 @@ struct netvsc_device {
23977 +@@ -696,13 +697,13 @@ struct netvsc_device {
23978
23979 struct net_device *ndev;
23980
23981 @@ -53107,7 +60180,7 @@ index 5fa98f5..74440cc 100644
23982
23983 /* Holds rndis device info */
23984 void *extension;
23985 -@@ -710,7 +711,7 @@ struct netvsc_device {
23986 +@@ -714,7 +715,7 @@ struct netvsc_device {
23987 /* The sub channel callback buffer */
23988 unsigned char *sub_cb_buf;
23989
23990 @@ -53117,10 +60190,19 @@ index 5fa98f5..74440cc 100644
23991 u32 pkt_align; /* alignment bytes, e.g. 8 */
23992
23993 diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
23994 -index 409b48e..710a23f 100644
23995 +index 98e34fe..19c8206 100644
23996 --- a/drivers/net/hyperv/netvsc_drv.c
23997 +++ b/drivers/net/hyperv/netvsc_drv.c
23998 -@@ -875,6 +875,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
23999 +@@ -348,7 +348,7 @@ not_ip:
24000 + return ret_val;
24001 + }
24002 +
24003 +-static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
24004 ++static netdev_tx_t netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
24005 + {
24006 + struct net_device_context *net_device_ctx = netdev_priv(net);
24007 + struct hv_netvsc_packet *packet = NULL;
24008 +@@ -799,6 +799,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
24009 struct netvsc_device *nvdev = hv_get_drvdata(hdev);
24010 struct netvsc_device_info device_info;
24011 int limit = ETH_DATA_LEN;
24012 @@ -53128,7 +60210,7 @@ index 409b48e..710a23f 100644
24013 int ret = 0;
24014
24015 if (nvdev == NULL || nvdev->destroy)
24016 -@@ -890,6 +891,8 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
24017 +@@ -814,6 +815,8 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
24018 if (ret)
24019 goto out;
24020
24021 @@ -53137,7 +60219,7 @@ index 409b48e..710a23f 100644
24022 nvdev->start_remove = true;
24023 rndis_filter_device_remove(hdev);
24024
24025 -@@ -900,7 +903,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
24026 +@@ -824,7 +827,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
24027
24028 memset(&device_info, 0, sizeof(device_info));
24029 device_info.ring_size = ring_size;
24030 @@ -53147,7 +60229,7 @@ index 409b48e..710a23f 100644
24031 rndis_filter_device_add(hdev, &device_info);
24032
24033 diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
24034 -index 5931a79..b0645bb 100644
24035 +index a37bbda..625cb2a 100644
24036 --- a/drivers/net/hyperv/rndis_filter.c
24037 +++ b/drivers/net/hyperv/rndis_filter.c
24038 @@ -101,7 +101,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev,
24039 @@ -53159,7 +60241,7 @@ index 5931a79..b0645bb 100644
24040
24041 /* Add to the request list */
24042 spin_lock_irqsave(&dev->request_lock, flags);
24043 -@@ -924,7 +924,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
24044 +@@ -922,7 +922,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
24045
24046 /* Setup the rndis set */
24047 halt = &request->request_msg.msg.halt_req;
24048 @@ -53168,7 +60250,7 @@ index 5931a79..b0645bb 100644
24049
24050 /* Ignore return since this msg is optional. */
24051 rndis_filter_send_request(dev, request);
24052 -@@ -1115,9 +1115,9 @@ int rndis_filter_device_add(struct hv_device *dev,
24053 +@@ -1113,9 +1113,9 @@ int rndis_filter_device_add(struct hv_device *dev,
24054 if (ret || rsscap.num_recv_que < 2)
24055 goto out;
24056
24057 @@ -53180,7 +60262,7 @@ index 5931a79..b0645bb 100644
24058
24059 /*
24060 * We will limit the VRSS channels to the number CPUs in the NUMA node
24061 -@@ -1138,8 +1138,7 @@ int rndis_filter_device_add(struct hv_device *dev,
24062 +@@ -1136,8 +1136,7 @@ int rndis_filter_device_add(struct hv_device *dev,
24063 if (net_device->num_chn == 1)
24064 goto out;
24065
24066 @@ -53217,7 +60299,7 @@ index 8c48bb2..0a03401 100644
24067 }
24068 }
24069 diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
24070 -index a9268db..19d067f 100644
24071 +index f94392d..2132934 100644
24072 --- a/drivers/net/ipvlan/ipvlan_main.c
24073 +++ b/drivers/net/ipvlan/ipvlan_main.c
24074 @@ -751,15 +751,15 @@ static int ipvlan_addr4_event(struct notifier_block *unused,
24075 @@ -53239,6 +60321,19 @@ index a9268db..19d067f 100644
24076 .notifier_call = ipvlan_addr6_event,
24077 };
24078
24079 +diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
24080 +index c96b46b..09f0e8c 100644
24081 +--- a/drivers/net/irda/sh_irda.c
24082 ++++ b/drivers/net/irda/sh_irda.c
24083 +@@ -620,7 +620,7 @@ static int sh_irda_init_iobuf(struct sh_irda_self *self, int rxsize, int txsize)
24084 +
24085 +
24086 + ************************************************************************/
24087 +-static int sh_irda_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
24088 ++static netdev_tx_t sh_irda_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
24089 + {
24090 + struct sh_irda_self *self = netdev_priv(ndev);
24091 + struct device *dev = &self->ndev->dev;
24092 diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
24093 index a0849f4..147a4a6 100644
24094 --- a/drivers/net/irda/vlsi_ir.c
24095 @@ -53337,7 +60432,7 @@ index f9db2ce..6cd460c 100644
24096 }
24097
24098 diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
24099 -index 06c8bfe..a081f70 100644
24100 +index 94e6888..1d08b6a 100644
24101 --- a/drivers/net/macvlan.c
24102 +++ b/drivers/net/macvlan.c
24103 @@ -335,7 +335,7 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,
24104 @@ -53349,7 +60444,7 @@ index 06c8bfe..a081f70 100644
24105 }
24106
24107 static void macvlan_flush_sources(struct macvlan_port *port,
24108 -@@ -1483,13 +1483,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
24109 +@@ -1484,13 +1484,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
24110 int macvlan_link_register(struct rtnl_link_ops *ops)
24111 {
24112 /* common fields */
24113 @@ -53372,7 +60467,7 @@ index 06c8bfe..a081f70 100644
24114
24115 return rtnl_link_register(ops);
24116 };
24117 -@@ -1575,7 +1577,7 @@ static int macvlan_device_event(struct notifier_block *unused,
24118 +@@ -1577,7 +1579,7 @@ static int macvlan_device_event(struct notifier_block *unused,
24119 return NOTIFY_DONE;
24120 }
24121
24122 @@ -53382,7 +60477,7 @@ index 06c8bfe..a081f70 100644
24123 };
24124
24125 diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
24126 -index 159a687..2f1fae5 100644
24127 +index 95394ed..a08b026 100644
24128 --- a/drivers/net/macvtap.c
24129 +++ b/drivers/net/macvtap.c
24130 @@ -485,7 +485,7 @@ static void macvtap_setup(struct net_device *dev)
24131 @@ -53437,10 +60532,10 @@ index 7b7c70e..a92dc83 100644
24132 .priv_size = sizeof(struct nlmon),
24133 .setup = nlmon_setup,
24134 diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
24135 -index 0bfbaba..c81a3588 100644
24136 +index e551f3a..e5fdf87 100644
24137 --- a/drivers/net/phy/phy_device.c
24138 +++ b/drivers/net/phy/phy_device.c
24139 -@@ -249,7 +249,7 @@ static int get_phy_c45_devs_in_pkg(struct mii_bus *bus, int addr, int dev_addr,
24140 +@@ -411,7 +411,7 @@ static int get_phy_c45_devs_in_pkg(struct mii_bus *bus, int addr, int dev_addr,
24141 * zero on success.
24142 *
24143 */
24144 @@ -53449,7 +60544,7 @@ index 0bfbaba..c81a3588 100644
24145 struct phy_c45_device_ids *c45_ids) {
24146 int phy_reg;
24147 int i, reg_addr;
24148 -@@ -320,7 +320,7 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id,
24149 +@@ -482,7 +482,7 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id,
24150 * its return value is in turn returned.
24151 *
24152 */
24153 @@ -53458,7 +60553,7 @@ index 0bfbaba..c81a3588 100644
24154 bool is_c45, struct phy_c45_device_ids *c45_ids)
24155 {
24156 int phy_reg;
24157 -@@ -358,7 +358,7 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id,
24158 +@@ -520,7 +520,7 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id,
24159 struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
24160 {
24161 struct phy_c45_device_ids c45_ids = {0};
24162 @@ -53467,11 +60562,24 @@ index 0bfbaba..c81a3588 100644
24163 int r;
24164
24165 r = get_phy_id(bus, addr, &phy_id, is_c45, &c45_ids);
24166 +diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
24167 +index 9c4b41a..03da80b 100644
24168 +--- a/drivers/net/plip/plip.c
24169 ++++ b/drivers/net/plip/plip.c
24170 +@@ -950,7 +950,7 @@ plip_interrupt(void *dev_id)
24171 + spin_unlock_irqrestore(&nl->lock, flags);
24172 + }
24173 +
24174 +-static int
24175 ++static netdev_tx_t
24176 + plip_tx_packet(struct sk_buff *skb, struct net_device *dev)
24177 + {
24178 + struct net_local *nl = netdev_priv(dev);
24179 diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
24180 -index 174e06e..51e015c 100644
24181 +index aafe237..5a65f90 100644
24182 --- a/drivers/net/ppp/ppp_generic.c
24183 +++ b/drivers/net/ppp/ppp_generic.c
24184 -@@ -1048,7 +1048,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
24185 +@@ -1056,7 +1056,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
24186 void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
24187 struct ppp_stats stats;
24188 struct ppp_comp_stats cstats;
24189 @@ -53479,7 +60587,7 @@ index 174e06e..51e015c 100644
24190
24191 switch (cmd) {
24192 case SIOCGPPPSTATS:
24193 -@@ -1070,8 +1069,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
24194 +@@ -1078,8 +1077,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
24195 break;
24196
24197 case SIOCGPPPVER:
24198 @@ -53490,7 +60598,7 @@ index 174e06e..51e015c 100644
24199 err = 0;
24200 break;
24201 diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
24202 -index f7e8c79..d5531cd 100644
24203 +index ae0905e..7a7d9b2 100644
24204 --- a/drivers/net/ppp/pptp.c
24205 +++ b/drivers/net/ppp/pptp.c
24206 @@ -369,6 +369,7 @@ allow_packet:
24207 @@ -53501,6 +60609,19 @@ index f7e8c79..d5531cd 100644
24208 ppp_input(&po->chan, skb);
24209
24210 return NET_RX_SUCCESS;
24211 +diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
24212 +index e7034c5..cf4cf05 100644
24213 +--- a/drivers/net/rionet.c
24214 ++++ b/drivers/net/rionet.c
24215 +@@ -165,7 +165,7 @@ static int rionet_queue_tx_msg(struct sk_buff *skb, struct net_device *ndev,
24216 + return 0;
24217 + }
24218 +
24219 +-static int rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
24220 ++static netdev_tx_t rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
24221 + {
24222 + int i;
24223 + struct rionet_private *rnet = netdev_priv(ndev);
24224 diff --git a/drivers/net/slip/slhc.c b/drivers/net/slip/slhc.c
24225 index 27ed252..80cffde 100644
24226 --- a/drivers/net/slip/slhc.c
24227 @@ -53515,10 +60636,10 @@ index 27ed252..80cffde 100644
24228
24229 /* We've got a compressed packet; read the change byte */
24230 diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
24231 -index 59fefca..b1422b1 100644
24232 +index 718ceea..7571cce 100644
24233 --- a/drivers/net/team/team.c
24234 +++ b/drivers/net/team/team.c
24235 -@@ -2107,7 +2107,7 @@ static unsigned int team_get_num_rx_queues(void)
24236 +@@ -2135,7 +2135,7 @@ static unsigned int team_get_num_rx_queues(void)
24237 return TEAM_DEFAULT_NUM_RX_QUEUES;
24238 }
24239
24240 @@ -53527,7 +60648,7 @@ index 59fefca..b1422b1 100644
24241 .kind = DRV_NAME,
24242 .priv_size = sizeof(struct team),
24243 .setup = team_setup,
24244 -@@ -2897,7 +2897,7 @@ static int team_device_event(struct notifier_block *unused,
24245 +@@ -2930,7 +2930,7 @@ static int team_device_event(struct notifier_block *unused,
24246 return NOTIFY_DONE;
24247 }
24248
24249 @@ -53537,10 +60658,10 @@ index 59fefca..b1422b1 100644
24250 };
24251
24252 diff --git a/drivers/net/tun.c b/drivers/net/tun.c
24253 -index 2d186bd..519779a 100644
24254 +index 81ecc2e..248806a 100644
24255 --- a/drivers/net/tun.c
24256 +++ b/drivers/net/tun.c
24257 -@@ -1474,7 +1474,7 @@ static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
24258 +@@ -1477,7 +1477,7 @@ static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
24259 return -EINVAL;
24260 }
24261
24262 @@ -53549,7 +60670,7 @@ index 2d186bd..519779a 100644
24263 .kind = DRV_NAME,
24264 .priv_size = sizeof(struct tun_struct),
24265 .setup = tun_setup,
24266 -@@ -1874,7 +1874,7 @@ unlock:
24267 +@@ -1877,7 +1877,7 @@ unlock:
24268 }
24269
24270 static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
24271 @@ -53558,7 +60679,7 @@ index 2d186bd..519779a 100644
24272 {
24273 struct tun_file *tfile = file->private_data;
24274 struct tun_struct *tun;
24275 -@@ -1888,6 +1888,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
24276 +@@ -1891,6 +1891,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
24277 int le;
24278 int ret;
24279
24280 @@ -53569,7 +60690,7 @@ index 2d186bd..519779a 100644
24281 if (copy_from_user(&ifr, argp, ifreq_len))
24282 return -EFAULT;
24283 diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
24284 -index 111d907..1ee643e 100644
24285 +index 111d907..1dbbd3f 100644
24286 --- a/drivers/net/usb/hso.c
24287 +++ b/drivers/net/usb/hso.c
24288 @@ -70,7 +70,7 @@
24289 @@ -53599,7 +60720,18 @@ index 111d907..1ee643e 100644
24290 return;
24291
24292 if (serial->parent->port_spec & HSO_INFO_CRC_BUG)
24293 -@@ -1282,8 +1282,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
24294 +@@ -1237,8 +1237,9 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
24295 + * This needs to be a tasklet otherwise we will
24296 + * end up recursively calling this function.
24297 + */
24298 +-static void hso_unthrottle_tasklet(struct hso_serial *serial)
24299 ++static void hso_unthrottle_tasklet(unsigned long _serial)
24300 + {
24301 ++ struct hso_serial *serial = (struct hso_serial *)_serial;
24302 + unsigned long flags;
24303 +
24304 + spin_lock_irqsave(&serial->serial_lock, flags);
24305 +@@ -1282,18 +1283,17 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
24306 tty_port_tty_set(&serial->port, tty);
24307
24308 /* check for port already opened, if not set the termios */
24309 @@ -53609,7 +60741,10 @@ index 111d907..1ee643e 100644
24310 serial->rx_state = RX_IDLE;
24311 /* Force default termio settings */
24312 _hso_serial_set_termios(tty, NULL);
24313 -@@ -1293,7 +1292,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
24314 + tasklet_init(&serial->unthrottle_tasklet,
24315 +- (void (*)(unsigned long))hso_unthrottle_tasklet,
24316 ++ hso_unthrottle_tasklet,
24317 + (unsigned long)serial);
24318 result = hso_start_serial_device(serial->parent, GFP_KERNEL);
24319 if (result) {
24320 hso_stop_serial_device(serial->parent);
24321 @@ -53618,7 +60753,7 @@ index 111d907..1ee643e 100644
24322 } else {
24323 kref_get(&serial->parent->ref);
24324 }
24325 -@@ -1331,10 +1330,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
24326 +@@ -1331,10 +1331,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
24327
24328 /* reset the rts and dtr */
24329 /* do the actual close */
24330 @@ -53632,7 +60767,7 @@ index 111d907..1ee643e 100644
24331 tty_port_tty_set(&serial->port, NULL);
24332 if (!usb_gone)
24333 hso_stop_serial_device(serial->parent);
24334 -@@ -1417,7 +1416,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
24335 +@@ -1417,7 +1417,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
24336
24337 /* the actual setup */
24338 spin_lock_irqsave(&serial->serial_lock, flags);
24339 @@ -53641,7 +60776,7 @@ index 111d907..1ee643e 100644
24340 _hso_serial_set_termios(tty, old);
24341 else
24342 tty->termios = *old;
24343 -@@ -1891,7 +1890,7 @@ static void intr_callback(struct urb *urb)
24344 +@@ -1891,7 +1891,7 @@ static void intr_callback(struct urb *urb)
24345 D1("Pending read interrupt on port %d\n", i);
24346 spin_lock(&serial->serial_lock);
24347 if (serial->rx_state == RX_IDLE &&
24348 @@ -53650,7 +60785,7 @@ index 111d907..1ee643e 100644
24349 /* Setup and send a ctrl req read on
24350 * port i */
24351 if (!serial->rx_urb_filled[0]) {
24352 -@@ -3058,7 +3057,7 @@ static int hso_resume(struct usb_interface *iface)
24353 +@@ -3058,7 +3058,7 @@ static int hso_resume(struct usb_interface *iface)
24354 /* Start all serial ports */
24355 for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
24356 if (serial_table[i] && (serial_table[i]->interface == iface)) {
24357 @@ -53659,11 +60794,24 @@ index 111d907..1ee643e 100644
24358 result =
24359 hso_start_serial_device(serial_table[i], GFP_NOIO);
24360 hso_kick_transmit(dev2ser(serial_table[i]));
24361 +diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
24362 +index 76465b1..2d72355 100644
24363 +--- a/drivers/net/usb/ipheth.c
24364 ++++ b/drivers/net/usb/ipheth.c
24365 +@@ -400,7 +400,7 @@ static int ipheth_close(struct net_device *net)
24366 + return 0;
24367 + }
24368 +
24369 +-static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
24370 ++static netdev_tx_t ipheth_tx(struct sk_buff *skb, struct net_device *net)
24371 + {
24372 + struct ipheth_device *dev = netdev_priv(net);
24373 + struct usb_device *udev = dev->udev;
24374 diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
24375 -index 2fb637a..1e442a2 100644
24376 +index d1f78c2..5596ab1 100644
24377 --- a/drivers/net/usb/r8152.c
24378 +++ b/drivers/net/usb/r8152.c
24379 -@@ -615,7 +615,7 @@ struct r8152 {
24380 +@@ -619,7 +619,7 @@ struct r8152 {
24381 int (*eee_get)(struct r8152 *, struct ethtool_eee *);
24382 int (*eee_set)(struct r8152 *, struct ethtool_eee *);
24383 bool (*in_nway)(struct r8152 *);
24384 @@ -53695,7 +60843,7 @@ index a2515887..6d13233 100644
24385
24386 /* we will have to manufacture ethernet headers, prepare template */
24387 diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
24388 -index f94ab78..675a3a4 100644
24389 +index 767ab11..d02d99c 100644
24390 --- a/drivers/net/virtio_net.c
24391 +++ b/drivers/net/virtio_net.c
24392 @@ -48,7 +48,7 @@ module_param(gso, bool, 0444);
24393 @@ -53708,10 +60856,10 @@ index f94ab78..675a3a4 100644
24394 #define VIRTNET_DRIVER_VERSION "1.0.0"
24395
24396 diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
24397 -index 903bda4..ee77e53 100644
24398 +index bdcf617..c7fedcd 100644
24399 --- a/drivers/net/vrf.c
24400 +++ b/drivers/net/vrf.c
24401 -@@ -942,7 +942,7 @@ static const struct nla_policy vrf_nl_policy[IFLA_VRF_MAX + 1] = {
24402 +@@ -884,7 +884,7 @@ static const struct nla_policy vrf_nl_policy[IFLA_VRF_MAX + 1] = {
24403 [IFLA_VRF_TABLE] = { .type = NLA_U32 },
24404 };
24405
24406 @@ -53720,7 +60868,7 @@ index 903bda4..ee77e53 100644
24407 .kind = DRV_NAME,
24408 .priv_size = sizeof(struct net_vrf),
24409
24410 -@@ -976,7 +976,7 @@ out:
24411 +@@ -918,7 +918,7 @@ out:
24412 return NOTIFY_DONE;
24413 }
24414
24415 @@ -53730,10 +60878,10 @@ index 903bda4..ee77e53 100644
24416 };
24417
24418 diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
24419 -index 3c0df70..a884dac 100644
24420 +index 1c32bd1..a6a9694 100644
24421 --- a/drivers/net/vxlan.c
24422 +++ b/drivers/net/vxlan.c
24423 -@@ -3146,7 +3146,7 @@ static struct net *vxlan_get_link_net(const struct net_device *dev)
24424 +@@ -3169,7 +3169,7 @@ static struct net *vxlan_get_link_net(const struct net_device *dev)
24425 return vxlan->net;
24426 }
24427
24428 @@ -53742,7 +60890,7 @@ index 3c0df70..a884dac 100644
24429 .kind = "vxlan",
24430 .maxtype = IFLA_VXLAN_MAX,
24431 .policy = vxlan_policy,
24432 -@@ -3194,7 +3194,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
24433 +@@ -3217,7 +3217,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
24434 return NOTIFY_DONE;
24435 }
24436
24437 @@ -53751,19 +60899,6 @@ index 3c0df70..a884dac 100644
24438 .notifier_call = vxlan_lowerdev_event,
24439 };
24440
24441 -diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
24442 -index 7a72407..6292259 100644
24443 ---- a/drivers/net/wan/dscc4.c
24444 -+++ b/drivers/net/wan/dscc4.c
24445 -@@ -1626,7 +1626,7 @@ try:
24446 - if (state & Xpr) {
24447 - void __iomem *scc_addr;
24448 - unsigned long ring;
24449 -- int i;
24450 -+ unsigned int i;
24451 -
24452 - /*
24453 - * - the busy condition happens (sometimes);
24454 diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c
24455 index 5920c99..ff2e4a5 100644
24456 --- a/drivers/net/wan/lmc/lmc_media.c
24457 @@ -53945,32 +61080,6 @@ index 0b60295..b8bfa5b 100644
24458 GFP_KERNEL);
24459 if (rd == NULL) {
24460 result = -ENOMEM;
24461 -diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
24462 -index 17c40f0..9646fee 100644
24463 ---- a/drivers/net/wireless/airo.c
24464 -+++ b/drivers/net/wireless/airo.c
24465 -@@ -7857,7 +7857,7 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) {
24466 - struct airo_info *ai = dev->ml_priv;
24467 - int ridcode;
24468 - int enabled;
24469 -- static int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
24470 -+ int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
24471 - unsigned char *iobuf;
24472 -
24473 - /* Only super-user can write RIDs */
24474 -diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
24475 -index dab2513..4c4b65d 100644
24476 ---- a/drivers/net/wireless/at76c50x-usb.c
24477 -+++ b/drivers/net/wireless/at76c50x-usb.c
24478 -@@ -353,7 +353,7 @@ static int at76_dfu_get_state(struct usb_device *udev, u8 *state)
24479 - }
24480 -
24481 - /* Convert timeout from the DFU status to jiffies */
24482 --static inline unsigned long at76_get_timeout(struct dfu_status *s)
24483 -+static inline unsigned long __intentional_overflow(-1) at76_get_timeout(struct dfu_status *s)
24484 - {
24485 - return msecs_to_jiffies((s->poll_timeout[2] << 16)
24486 - | (s->poll_timeout[1] << 8)
24487 diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
24488 index edf3629..9f20ef9 100644
24489 --- a/drivers/net/wireless/ath/ath10k/ce.c
24490 @@ -54019,8 +61128,34 @@ index e70aa38..2fcc407 100644
24491
24492 /* service connection information */
24493 struct ath10k_htc_svc_conn_req {
24494 +diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
24495 +index 5f3acfe..e0d6a6b 100644
24496 +--- a/drivers/net/wireless/ath/ath6kl/core.h
24497 ++++ b/drivers/net/wireless/ath/ath6kl/core.h
24498 +@@ -914,7 +914,7 @@ void ath6kl_tx_data_cleanup(struct ath6kl *ar);
24499 +
24500 + struct ath6kl_cookie *ath6kl_alloc_cookie(struct ath6kl *ar);
24501 + void ath6kl_free_cookie(struct ath6kl *ar, struct ath6kl_cookie *cookie);
24502 +-int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
24503 ++netdev_tx_t ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
24504 +
24505 + struct aggr_info *aggr_init(struct ath6kl_vif *vif);
24506 + void aggr_conn_init(struct ath6kl_vif *vif, struct aggr_info *aggr_info,
24507 +diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
24508 +index 40432fe..57d85b3 100644
24509 +--- a/drivers/net/wireless/ath/ath6kl/txrx.c
24510 ++++ b/drivers/net/wireless/ath/ath6kl/txrx.c
24511 +@@ -353,7 +353,7 @@ fail_ctrl_tx:
24512 + return status;
24513 + }
24514 +
24515 +-int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
24516 ++netdev_tx_t ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
24517 + {
24518 + struct ath6kl *ar = ath6kl_priv(dev);
24519 + struct ath6kl_cookie *cookie = NULL;
24520 diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
24521 -index fee0cad..a7a3b63 100644
24522 +index 40fa915..9e5e0c4 100644
24523 --- a/drivers/net/wireless/ath/ath9k/Kconfig
24524 +++ b/drivers/net/wireless/ath/ath9k/Kconfig
24525 @@ -3,7 +3,6 @@ config ATH9K_HW
24526 @@ -54277,10 +61412,10 @@ index 831a544..d846785 100644
24527 struct ath_nf_limits {
24528 s16 max;
24529 diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
24530 -index d184e68..1ba76e5 100644
24531 +index c1b33fd..9f904b1 100644
24532 --- a/drivers/net/wireless/ath/ath9k/main.c
24533 +++ b/drivers/net/wireless/ath/ath9k/main.c
24534 -@@ -2585,16 +2585,18 @@ void ath9k_fill_chanctx_ops(void)
24535 +@@ -2589,16 +2589,18 @@ void ath9k_fill_chanctx_ops(void)
24536 if (!ath9k_is_chanctx_enabled())
24537 return;
24538
24539 @@ -54442,23 +61577,463 @@ index ae86a600..28696b2 100644
24540 ar->tx_ampdu_schedule = false;
24541
24542 if (atomic_read(&ar->tx_ampdu_upload))
24543 +diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c
24544 +index e36f2a0..462af92 100644
24545 +--- a/drivers/net/wireless/ath/wil6210/pcie_bus.c
24546 ++++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c
24547 +@@ -152,7 +152,7 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
24548 + struct wil6210_priv *wil;
24549 + struct device *dev = &pdev->dev;
24550 + int rc;
24551 +- const struct wil_platform_rops rops = {
24552 ++ static const struct wil_platform_rops rops = {
24553 + .ramdump = wil_platform_rop_ramdump,
24554 + .fw_recovery = wil_platform_rop_fw_recovery,
24555 + };
24556 diff --git a/drivers/net/wireless/ath/wil6210/wil_platform.h b/drivers/net/wireless/ath/wil6210/wil_platform.h
24557 -index d7fa19b..6d84263 100644
24558 +index 9a949d9..1307d61 100644
24559 --- a/drivers/net/wireless/ath/wil6210/wil_platform.h
24560 +++ b/drivers/net/wireless/ath/wil6210/wil_platform.h
24561 -@@ -27,7 +27,7 @@ struct wil_platform_ops {
24562 - int (*suspend)(void *handle);
24563 +@@ -29,7 +29,7 @@ struct wil_platform_ops {
24564 int (*resume)(void *handle);
24565 void (*uninit)(void *handle);
24566 + int (*notify_crash)(void *handle);
24567 -};
24568 +} __no_const;
24569
24570 - void *wil_platform_init(struct device *dev, struct wil_platform_ops *ops);
24571 + /**
24572 + * struct wil_platform_rops - wil platform module callbacks from
24573 +diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
24574 +index dab2513..4c4b65d 100644
24575 +--- a/drivers/net/wireless/atmel/at76c50x-usb.c
24576 ++++ b/drivers/net/wireless/atmel/at76c50x-usb.c
24577 +@@ -353,7 +353,7 @@ static int at76_dfu_get_state(struct usb_device *udev, u8 *state)
24578 + }
24579 +
24580 + /* Convert timeout from the DFU status to jiffies */
24581 +-static inline unsigned long at76_get_timeout(struct dfu_status *s)
24582 ++static inline unsigned long __intentional_overflow(-1) at76_get_timeout(struct dfu_status *s)
24583 + {
24584 + return msecs_to_jiffies((s->poll_timeout[2] << 16)
24585 + | (s->poll_timeout[1] << 8)
24586 +diff --git a/drivers/net/wireless/atmel/atmel.c b/drivers/net/wireless/atmel/atmel.c
24587 +index 6a1f03c..8a14da4 100644
24588 +--- a/drivers/net/wireless/atmel/atmel.c
24589 ++++ b/drivers/net/wireless/atmel/atmel.c
24590 +@@ -1663,9 +1663,10 @@ EXPORT_SYMBOL(stop_atmel_card);
24591 +
24592 + static int atmel_set_essid(struct net_device *dev,
24593 + struct iw_request_info *info,
24594 +- struct iw_point *dwrq,
24595 ++ union iwreq_data *wrqu,
24596 + char *extra)
24597 + {
24598 ++ struct iw_point *dwrq = &wrqu->essid;
24599 + struct atmel_private *priv = netdev_priv(dev);
24600 +
24601 + /* Check if we asked for `any' */
24602 +@@ -1691,9 +1692,10 @@ static int atmel_set_essid(struct net_device *dev,
24603 +
24604 + static int atmel_get_essid(struct net_device *dev,
24605 + struct iw_request_info *info,
24606 +- struct iw_point *dwrq,
24607 ++ union iwreq_data *wrqu,
24608 + char *extra)
24609 + {
24610 ++ struct iw_point *dwrq = &wrqu->essid;
24611 + struct atmel_private *priv = netdev_priv(dev);
24612 +
24613 + /* Get the current SSID */
24614 +@@ -1712,9 +1714,10 @@ static int atmel_get_essid(struct net_device *dev,
24615 +
24616 + static int atmel_get_wap(struct net_device *dev,
24617 + struct iw_request_info *info,
24618 +- struct sockaddr *awrq,
24619 ++ union iwreq_data *wrqu,
24620 + char *extra)
24621 + {
24622 ++ struct sockaddr *awrq = &wrqu->ap_addr;
24623 + struct atmel_private *priv = netdev_priv(dev);
24624 + memcpy(awrq->sa_data, priv->CurrentBSSID, ETH_ALEN);
24625 + awrq->sa_family = ARPHRD_ETHER;
24626 +@@ -1724,9 +1727,10 @@ static int atmel_get_wap(struct net_device *dev,
24627 +
24628 + static int atmel_set_encode(struct net_device *dev,
24629 + struct iw_request_info *info,
24630 +- struct iw_point *dwrq,
24631 ++ union iwreq_data *wrqu,
24632 + char *extra)
24633 + {
24634 ++ struct iw_point *dwrq = &wrqu->encoding;
24635 + struct atmel_private *priv = netdev_priv(dev);
24636 +
24637 + /* Basic checking: do we have a key to set ?
24638 +@@ -1813,9 +1817,10 @@ static int atmel_set_encode(struct net_device *dev,
24639 +
24640 + static int atmel_get_encode(struct net_device *dev,
24641 + struct iw_request_info *info,
24642 +- struct iw_point *dwrq,
24643 ++ union iwreq_data *wrqu,
24644 + char *extra)
24645 + {
24646 ++ struct iw_point *dwrq = &wrqu->encoding;
24647 + struct atmel_private *priv = netdev_priv(dev);
24648 + int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
24649 +
24650 +@@ -2023,18 +2028,20 @@ static int atmel_get_auth(struct net_device *dev,
24651 +
24652 + static int atmel_get_name(struct net_device *dev,
24653 + struct iw_request_info *info,
24654 +- char *cwrq,
24655 ++ union iwreq_data *wrqu,
24656 + char *extra)
24657 + {
24658 ++ char *cwrq = wrqu->name;
24659 + strcpy(cwrq, "IEEE 802.11-DS");
24660 + return 0;
24661 + }
24662 +
24663 + static int atmel_set_rate(struct net_device *dev,
24664 + struct iw_request_info *info,
24665 +- struct iw_param *vwrq,
24666 ++ union iwreq_data *wrqu,
24667 + char *extra)
24668 + {
24669 ++ struct iw_param *vwrq = &wrqu->bitrate;
24670 + struct atmel_private *priv = netdev_priv(dev);
24671 +
24672 + if (vwrq->fixed == 0) {
24673 +@@ -2073,9 +2080,10 @@ static int atmel_set_rate(struct net_device *dev,
24674 +
24675 + static int atmel_set_mode(struct net_device *dev,
24676 + struct iw_request_info *info,
24677 +- __u32 *uwrq,
24678 ++ union iwreq_data *wrqu,
24679 + char *extra)
24680 + {
24681 ++ __u32 *uwrq = &wrqu->mode;
24682 + struct atmel_private *priv = netdev_priv(dev);
24683 +
24684 + if (*uwrq != IW_MODE_ADHOC && *uwrq != IW_MODE_INFRA)
24685 +@@ -2087,9 +2095,10 @@ static int atmel_set_mode(struct net_device *dev,
24686 +
24687 + static int atmel_get_mode(struct net_device *dev,
24688 + struct iw_request_info *info,
24689 +- __u32 *uwrq,
24690 ++ union iwreq_data *wrqu,
24691 + char *extra)
24692 + {
24693 ++ __u32 *uwrq = &wrqu->mode;
24694 + struct atmel_private *priv = netdev_priv(dev);
24695 +
24696 + *uwrq = priv->operating_mode;
24697 +@@ -2098,9 +2107,10 @@ static int atmel_get_mode(struct net_device *dev,
24698 +
24699 + static int atmel_get_rate(struct net_device *dev,
24700 + struct iw_request_info *info,
24701 +- struct iw_param *vwrq,
24702 ++ union iwreq_data *wrqu,
24703 + char *extra)
24704 + {
24705 ++ struct iw_param *vwrq = &wrqu->bitrate;
24706 + struct atmel_private *priv = netdev_priv(dev);
24707 +
24708 + if (priv->auto_tx_rate) {
24709 +@@ -2128,9 +2138,10 @@ static int atmel_get_rate(struct net_device *dev,
24710 +
24711 + static int atmel_set_power(struct net_device *dev,
24712 + struct iw_request_info *info,
24713 +- struct iw_param *vwrq,
24714 ++ union iwreq_data *wrqu,
24715 + char *extra)
24716 + {
24717 ++ struct iw_param *vwrq = &wrqu->power;
24718 + struct atmel_private *priv = netdev_priv(dev);
24719 + priv->power_mode = vwrq->disabled ? 0 : 1;
24720 + return -EINPROGRESS;
24721 +@@ -2138,9 +2149,10 @@ static int atmel_set_power(struct net_device *dev,
24722 +
24723 + static int atmel_get_power(struct net_device *dev,
24724 + struct iw_request_info *info,
24725 +- struct iw_param *vwrq,
24726 ++ union iwreq_data *wrqu,
24727 + char *extra)
24728 + {
24729 ++ struct iw_param *vwrq = &wrqu->power;
24730 + struct atmel_private *priv = netdev_priv(dev);
24731 + vwrq->disabled = priv->power_mode ? 0 : 1;
24732 + vwrq->flags = IW_POWER_ON;
24733 +@@ -2149,9 +2161,10 @@ static int atmel_get_power(struct net_device *dev,
24734 +
24735 + static int atmel_set_retry(struct net_device *dev,
24736 + struct iw_request_info *info,
24737 +- struct iw_param *vwrq,
24738 ++ union iwreq_data *wrqu,
24739 + char *extra)
24740 + {
24741 ++ struct iw_param *vwrq = &wrqu->retry;
24742 + struct atmel_private *priv = netdev_priv(dev);
24743 +
24744 + if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) {
24745 +@@ -2172,9 +2185,10 @@ static int atmel_set_retry(struct net_device *dev,
24746 +
24747 + static int atmel_get_retry(struct net_device *dev,
24748 + struct iw_request_info *info,
24749 +- struct iw_param *vwrq,
24750 ++ union iwreq_data *wrqu,
24751 + char *extra)
24752 + {
24753 ++ struct iw_param *vwrq = &wrqu->retry;
24754 + struct atmel_private *priv = netdev_priv(dev);
24755 +
24756 + vwrq->disabled = 0; /* Can't be disabled */
24757 +@@ -2195,9 +2209,10 @@ static int atmel_get_retry(struct net_device *dev,
24758 +
24759 + static int atmel_set_rts(struct net_device *dev,
24760 + struct iw_request_info *info,
24761 +- struct iw_param *vwrq,
24762 ++ union iwreq_data *wrqu,
24763 + char *extra)
24764 + {
24765 ++ struct iw_param *vwrq = &wrqu->rts;
24766 + struct atmel_private *priv = netdev_priv(dev);
24767 + int rthr = vwrq->value;
24768 +
24769 +@@ -2213,9 +2228,10 @@ static int atmel_set_rts(struct net_device *dev,
24770 +
24771 + static int atmel_get_rts(struct net_device *dev,
24772 + struct iw_request_info *info,
24773 +- struct iw_param *vwrq,
24774 ++ union iwreq_data *wrqu,
24775 + char *extra)
24776 + {
24777 ++ struct iw_param *vwrq = &wrqu->rts;
24778 + struct atmel_private *priv = netdev_priv(dev);
24779 +
24780 + vwrq->value = priv->rts_threshold;
24781 +@@ -2227,9 +2243,10 @@ static int atmel_get_rts(struct net_device *dev,
24782 +
24783 + static int atmel_set_frag(struct net_device *dev,
24784 + struct iw_request_info *info,
24785 +- struct iw_param *vwrq,
24786 ++ union iwreq_data *wrqu,
24787 + char *extra)
24788 + {
24789 ++ struct iw_param *vwrq = &wrqu->frag;
24790 + struct atmel_private *priv = netdev_priv(dev);
24791 + int fthr = vwrq->value;
24792 +
24793 +@@ -2246,9 +2263,10 @@ static int atmel_set_frag(struct net_device *dev,
24794 +
24795 + static int atmel_get_frag(struct net_device *dev,
24796 + struct iw_request_info *info,
24797 +- struct iw_param *vwrq,
24798 ++ union iwreq_data *wrqu,
24799 + char *extra)
24800 + {
24801 ++ struct iw_param *vwrq = &wrqu->frag;
24802 + struct atmel_private *priv = netdev_priv(dev);
24803 +
24804 + vwrq->value = priv->frag_threshold;
24805 +@@ -2260,9 +2278,10 @@ static int atmel_get_frag(struct net_device *dev,
24806 +
24807 + static int atmel_set_freq(struct net_device *dev,
24808 + struct iw_request_info *info,
24809 +- struct iw_freq *fwrq,
24810 ++ union iwreq_data *wrqu,
24811 + char *extra)
24812 + {
24813 ++ struct iw_freq *fwrq = &wrqu->freq;
24814 + struct atmel_private *priv = netdev_priv(dev);
24815 + int rc = -EINPROGRESS; /* Call commit handler */
24816 +
24817 +@@ -2290,9 +2309,10 @@ static int atmel_set_freq(struct net_device *dev,
24818 +
24819 + static int atmel_get_freq(struct net_device *dev,
24820 + struct iw_request_info *info,
24821 +- struct iw_freq *fwrq,
24822 ++ union iwreq_data *wrqu,
24823 + char *extra)
24824 + {
24825 ++ struct iw_freq *fwrq = &wrqu->freq;
24826 + struct atmel_private *priv = netdev_priv(dev);
24827 +
24828 + fwrq->m = priv->channel;
24829 +@@ -2302,7 +2322,7 @@ static int atmel_get_freq(struct net_device *dev,
24830 +
24831 + static int atmel_set_scan(struct net_device *dev,
24832 + struct iw_request_info *info,
24833 +- struct iw_point *dwrq,
24834 ++ union iwreq_data *dwrq,
24835 + char *extra)
24836 + {
24837 + struct atmel_private *priv = netdev_priv(dev);
24838 +@@ -2340,9 +2360,10 @@ static int atmel_set_scan(struct net_device *dev,
24839
24840 -diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
24841 + static int atmel_get_scan(struct net_device *dev,
24842 + struct iw_request_info *info,
24843 +- struct iw_point *dwrq,
24844 ++ union iwreq_data *wrqu,
24845 + char *extra)
24846 + {
24847 ++ struct iw_point *dwrq = &wrqu->data;
24848 + struct atmel_private *priv = netdev_priv(dev);
24849 + int i;
24850 + char *current_ev = extra;
24851 +@@ -2411,9 +2432,10 @@ static int atmel_get_scan(struct net_device *dev,
24852 +
24853 + static int atmel_get_range(struct net_device *dev,
24854 + struct iw_request_info *info,
24855 +- struct iw_point *dwrq,
24856 ++ union iwreq_data *wrqu,
24857 + char *extra)
24858 + {
24859 ++ struct iw_point *dwrq = &wrqu->data;
24860 + struct atmel_private *priv = netdev_priv(dev);
24861 + struct iw_range *range = (struct iw_range *) extra;
24862 + int k, i, j;
24863 +@@ -2485,9 +2507,10 @@ static int atmel_get_range(struct net_device *dev,
24864 +
24865 + static int atmel_set_wap(struct net_device *dev,
24866 + struct iw_request_info *info,
24867 +- struct sockaddr *awrq,
24868 ++ union iwreq_data *wrqu,
24869 + char *extra)
24870 + {
24871 ++ struct sockaddr *awrq = &wrqu->ap_addr;
24872 + struct atmel_private *priv = netdev_priv(dev);
24873 + int i;
24874 + static const u8 any[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
24875 +@@ -2527,7 +2550,7 @@ static int atmel_set_wap(struct net_device *dev,
24876 +
24877 + static int atmel_config_commit(struct net_device *dev,
24878 + struct iw_request_info *info, /* NULL */
24879 +- void *zwrq, /* NULL */
24880 ++ union iwreq_data *zwrq, /* NULL */
24881 + char *extra) /* NULL */
24882 + {
24883 + return atmel_open(dev);
24884 +@@ -2535,61 +2558,61 @@ static int atmel_config_commit(struct net_device *dev,
24885 +
24886 + static const iw_handler atmel_handler[] =
24887 + {
24888 +- (iw_handler) atmel_config_commit, /* SIOCSIWCOMMIT */
24889 +- (iw_handler) atmel_get_name, /* SIOCGIWNAME */
24890 +- (iw_handler) NULL, /* SIOCSIWNWID */
24891 +- (iw_handler) NULL, /* SIOCGIWNWID */
24892 +- (iw_handler) atmel_set_freq, /* SIOCSIWFREQ */
24893 +- (iw_handler) atmel_get_freq, /* SIOCGIWFREQ */
24894 +- (iw_handler) atmel_set_mode, /* SIOCSIWMODE */
24895 +- (iw_handler) atmel_get_mode, /* SIOCGIWMODE */
24896 +- (iw_handler) NULL, /* SIOCSIWSENS */
24897 +- (iw_handler) NULL, /* SIOCGIWSENS */
24898 +- (iw_handler) NULL, /* SIOCSIWRANGE */
24899 +- (iw_handler) atmel_get_range, /* SIOCGIWRANGE */
24900 +- (iw_handler) NULL, /* SIOCSIWPRIV */
24901 +- (iw_handler) NULL, /* SIOCGIWPRIV */
24902 +- (iw_handler) NULL, /* SIOCSIWSTATS */
24903 +- (iw_handler) NULL, /* SIOCGIWSTATS */
24904 +- (iw_handler) NULL, /* SIOCSIWSPY */
24905 +- (iw_handler) NULL, /* SIOCGIWSPY */
24906 +- (iw_handler) NULL, /* -- hole -- */
24907 +- (iw_handler) NULL, /* -- hole -- */
24908 +- (iw_handler) atmel_set_wap, /* SIOCSIWAP */
24909 +- (iw_handler) atmel_get_wap, /* SIOCGIWAP */
24910 +- (iw_handler) NULL, /* -- hole -- */
24911 +- (iw_handler) NULL, /* SIOCGIWAPLIST */
24912 +- (iw_handler) atmel_set_scan, /* SIOCSIWSCAN */
24913 +- (iw_handler) atmel_get_scan, /* SIOCGIWSCAN */
24914 +- (iw_handler) atmel_set_essid, /* SIOCSIWESSID */
24915 +- (iw_handler) atmel_get_essid, /* SIOCGIWESSID */
24916 +- (iw_handler) NULL, /* SIOCSIWNICKN */
24917 +- (iw_handler) NULL, /* SIOCGIWNICKN */
24918 +- (iw_handler) NULL, /* -- hole -- */
24919 +- (iw_handler) NULL, /* -- hole -- */
24920 +- (iw_handler) atmel_set_rate, /* SIOCSIWRATE */
24921 +- (iw_handler) atmel_get_rate, /* SIOCGIWRATE */
24922 +- (iw_handler) atmel_set_rts, /* SIOCSIWRTS */
24923 +- (iw_handler) atmel_get_rts, /* SIOCGIWRTS */
24924 +- (iw_handler) atmel_set_frag, /* SIOCSIWFRAG */
24925 +- (iw_handler) atmel_get_frag, /* SIOCGIWFRAG */
24926 +- (iw_handler) NULL, /* SIOCSIWTXPOW */
24927 +- (iw_handler) NULL, /* SIOCGIWTXPOW */
24928 +- (iw_handler) atmel_set_retry, /* SIOCSIWRETRY */
24929 +- (iw_handler) atmel_get_retry, /* SIOCGIWRETRY */
24930 +- (iw_handler) atmel_set_encode, /* SIOCSIWENCODE */
24931 +- (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */
24932 +- (iw_handler) atmel_set_power, /* SIOCSIWPOWER */
24933 +- (iw_handler) atmel_get_power, /* SIOCGIWPOWER */
24934 +- (iw_handler) NULL, /* -- hole -- */
24935 +- (iw_handler) NULL, /* -- hole -- */
24936 +- (iw_handler) NULL, /* SIOCSIWGENIE */
24937 +- (iw_handler) NULL, /* SIOCGIWGENIE */
24938 +- (iw_handler) atmel_set_auth, /* SIOCSIWAUTH */
24939 +- (iw_handler) atmel_get_auth, /* SIOCGIWAUTH */
24940 +- (iw_handler) atmel_set_encodeext, /* SIOCSIWENCODEEXT */
24941 +- (iw_handler) atmel_get_encodeext, /* SIOCGIWENCODEEXT */
24942 +- (iw_handler) NULL, /* SIOCSIWPMKSA */
24943 ++ atmel_config_commit, /* SIOCSIWCOMMIT */
24944 ++ atmel_get_name, /* SIOCGIWNAME */
24945 ++ NULL, /* SIOCSIWNWID */
24946 ++ NULL, /* SIOCGIWNWID */
24947 ++ atmel_set_freq, /* SIOCSIWFREQ */
24948 ++ atmel_get_freq, /* SIOCGIWFREQ */
24949 ++ atmel_set_mode, /* SIOCSIWMODE */
24950 ++ atmel_get_mode, /* SIOCGIWMODE */
24951 ++ NULL, /* SIOCSIWSENS */
24952 ++ NULL, /* SIOCGIWSENS */
24953 ++ NULL, /* SIOCSIWRANGE */
24954 ++ atmel_get_range, /* SIOCGIWRANGE */
24955 ++ NULL, /* SIOCSIWPRIV */
24956 ++ NULL, /* SIOCGIWPRIV */
24957 ++ NULL, /* SIOCSIWSTATS */
24958 ++ NULL, /* SIOCGIWSTATS */
24959 ++ NULL, /* SIOCSIWSPY */
24960 ++ NULL, /* SIOCGIWSPY */
24961 ++ NULL, /* -- hole -- */
24962 ++ NULL, /* -- hole -- */
24963 ++ atmel_set_wap, /* SIOCSIWAP */
24964 ++ atmel_get_wap, /* SIOCGIWAP */
24965 ++ NULL, /* -- hole -- */
24966 ++ NULL, /* SIOCGIWAPLIST */
24967 ++ atmel_set_scan, /* SIOCSIWSCAN */
24968 ++ atmel_get_scan, /* SIOCGIWSCAN */
24969 ++ atmel_set_essid, /* SIOCSIWESSID */
24970 ++ atmel_get_essid, /* SIOCGIWESSID */
24971 ++ NULL, /* SIOCSIWNICKN */
24972 ++ NULL, /* SIOCGIWNICKN */
24973 ++ NULL, /* -- hole -- */
24974 ++ NULL, /* -- hole -- */
24975 ++ atmel_set_rate, /* SIOCSIWRATE */
24976 ++ atmel_get_rate, /* SIOCGIWRATE */
24977 ++ atmel_set_rts, /* SIOCSIWRTS */
24978 ++ atmel_get_rts, /* SIOCGIWRTS */
24979 ++ atmel_set_frag, /* SIOCSIWFRAG */
24980 ++ atmel_get_frag, /* SIOCGIWFRAG */
24981 ++ NULL, /* SIOCSIWTXPOW */
24982 ++ NULL, /* SIOCGIWTXPOW */
24983 ++ atmel_set_retry, /* SIOCSIWRETRY */
24984 ++ atmel_get_retry, /* SIOCGIWRETRY */
24985 ++ atmel_set_encode, /* SIOCSIWENCODE */
24986 ++ atmel_get_encode, /* SIOCGIWENCODE */
24987 ++ atmel_set_power, /* SIOCSIWPOWER */
24988 ++ atmel_get_power, /* SIOCGIWPOWER */
24989 ++ NULL, /* -- hole -- */
24990 ++ NULL, /* -- hole -- */
24991 ++ NULL, /* SIOCSIWGENIE */
24992 ++ NULL, /* SIOCGIWGENIE */
24993 ++ atmel_set_auth, /* SIOCSIWAUTH */
24994 ++ atmel_get_auth, /* SIOCGIWAUTH */
24995 ++ atmel_set_encodeext, /* SIOCSIWENCODEEXT */
24996 ++ atmel_get_encodeext, /* SIOCGIWENCODEEXT */
24997 ++ NULL, /* SIOCSIWPMKSA */
24998 + };
24999 +
25000 + static const iw_handler atmel_private_handler[] =
25001 +diff --git a/drivers/net/wireless/broadcom/b43/phy_lp.c b/drivers/net/wireless/broadcom/b43/phy_lp.c
25002 index 058a9f2..d5cb1ba 100644
25003 ---- a/drivers/net/wireless/b43/phy_lp.c
25004 -+++ b/drivers/net/wireless/b43/phy_lp.c
25005 +--- a/drivers/net/wireless/broadcom/b43/phy_lp.c
25006 ++++ b/drivers/net/wireless/broadcom/b43/phy_lp.c
25007 @@ -2502,7 +2502,7 @@ static int lpphy_b2063_tune(struct b43_wldev *dev,
25008 {
25009 struct ssb_bus *bus = dev->dev->sdev->bus;
25010 @@ -54468,11 +62043,684 @@ index 058a9f2..d5cb1ba 100644
25011 u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000;
25012 u32 freqref, vco_freq, val1, val2, val3, timeout, timeoutref, count;
25013 u16 old_comm15, scale;
25014 -diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
25015 -index af1b3e6..d5d82713 100644
25016 ---- a/drivers/net/wireless/iwlegacy/3945-mac.c
25017 -+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
25018 -@@ -3633,7 +3633,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
25019 +diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
25020 +index afc1fb3..79698d1 100644
25021 +--- a/drivers/net/wireless/broadcom/b43legacy/main.c
25022 ++++ b/drivers/net/wireless/broadcom/b43legacy/main.c
25023 +@@ -1304,8 +1304,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev)
25024 + }
25025 +
25026 + /* Interrupt handler bottom-half */
25027 +-static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev)
25028 ++static void b43legacy_interrupt_tasklet(unsigned long _dev)
25029 + {
25030 ++ struct b43legacy_wldev *dev = (struct b43legacy_wldev *)_dev;
25031 + u32 reason;
25032 + u32 dma_reason[ARRAY_SIZE(dev->dma_reason)];
25033 + u32 merged_dma_reason = 0;
25034 +@@ -3775,7 +3776,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev,
25035 + b43legacy_set_status(wldev, B43legacy_STAT_UNINIT);
25036 + wldev->bad_frames_preempt = modparam_bad_frames_preempt;
25037 + tasklet_init(&wldev->isr_tasklet,
25038 +- (void (*)(unsigned long))b43legacy_interrupt_tasklet,
25039 ++ b43legacy_interrupt_tasklet,
25040 + (unsigned long)wldev);
25041 + if (modparam_pio)
25042 + wldev->__using_pio = true;
25043 +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
25044 +index 1c4e9dd..a6388e7 100644
25045 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
25046 ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
25047 +@@ -394,8 +394,9 @@ struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp)
25048 + return sh;
25049 + }
25050 +
25051 +-static void wlc_phy_timercb_phycal(struct brcms_phy *pi)
25052 ++static void wlc_phy_timercb_phycal(void *_pi)
25053 + {
25054 ++ struct brcms_phy *pi = _pi;
25055 + uint delay = 5;
25056 +
25057 + if (PHY_PERICAL_MPHASE_PENDING(pi)) {
25058 +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c
25059 +index a0de5db..b723817 100644
25060 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c
25061 ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c
25062 +@@ -57,12 +57,11 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim)
25063 + }
25064 +
25065 + struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
25066 +- void (*fn)(struct brcms_phy *pi),
25067 ++ void (*fn)(void *pi),
25068 + void *arg, const char *name)
25069 + {
25070 + return (struct wlapi_timer *)
25071 +- brcms_init_timer(physhim->wl, (void (*)(void *))fn,
25072 +- arg, name);
25073 ++ brcms_init_timer(physhim->wl, fn, arg, name);
25074 + }
25075 +
25076 + void wlapi_free_timer(struct wlapi_timer *t)
25077 +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h
25078 +index dd87747..27d0934 100644
25079 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h
25080 ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h
25081 +@@ -131,7 +131,7 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim);
25082 +
25083 + /* PHY to WL utility functions */
25084 + struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
25085 +- void (*fn)(struct brcms_phy *pi),
25086 ++ void (*fn)(void *pi),
25087 + void *arg, const char *name);
25088 + void wlapi_free_timer(struct wlapi_timer *t);
25089 + void wlapi_add_timer(struct wlapi_timer *t, uint ms, int periodic);
25090 +diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
25091 +index d2353f6..03379d9 100644
25092 +--- a/drivers/net/wireless/cisco/airo.c
25093 ++++ b/drivers/net/wireless/cisco/airo.c
25094 +@@ -4779,7 +4779,7 @@ static int get_dec_u16( char *buffer, int *start, int limit ) {
25095 + }
25096 +
25097 + static int airo_config_commit(struct net_device *dev,
25098 +- struct iw_request_info *info, void *zwrq,
25099 ++ struct iw_request_info *info, union iwreq_data *zwrq,
25100 + char *extra);
25101 +
25102 + static inline int sniffing_mode(struct airo_info *ai)
25103 +@@ -5766,9 +5766,11 @@ static int airo_get_quality (StatusRid *status_rid, CapabilityRid *cap_rid)
25104 + */
25105 + static int airo_get_name(struct net_device *dev,
25106 + struct iw_request_info *info,
25107 +- char *cwrq,
25108 ++ union iwreq_data *wrqu,
25109 + char *extra)
25110 + {
25111 ++ char *cwrq = wrqu->name;
25112 ++
25113 + strcpy(cwrq, "IEEE 802.11-DS");
25114 + return 0;
25115 + }
25116 +@@ -5779,9 +5781,10 @@ static int airo_get_name(struct net_device *dev,
25117 + */
25118 + static int airo_set_freq(struct net_device *dev,
25119 + struct iw_request_info *info,
25120 +- struct iw_freq *fwrq,
25121 ++ union iwreq_data *wrqu,
25122 + char *extra)
25123 + {
25124 ++ struct iw_freq *fwrq = &wrqu->freq;
25125 + struct airo_info *local = dev->ml_priv;
25126 + int rc = -EINPROGRESS; /* Call commit handler */
25127 +
25128 +@@ -5820,9 +5823,10 @@ static int airo_set_freq(struct net_device *dev,
25129 + */
25130 + static int airo_get_freq(struct net_device *dev,
25131 + struct iw_request_info *info,
25132 +- struct iw_freq *fwrq,
25133 ++ union iwreq_data *wrqu,
25134 + char *extra)
25135 + {
25136 ++ struct iw_freq *fwrq = &wrqu->freq;
25137 + struct airo_info *local = dev->ml_priv;
25138 + StatusRid status_rid; /* Card status info */
25139 + int ch;
25140 +@@ -5852,9 +5856,10 @@ static int airo_get_freq(struct net_device *dev,
25141 + */
25142 + static int airo_set_essid(struct net_device *dev,
25143 + struct iw_request_info *info,
25144 +- struct iw_point *dwrq,
25145 ++ union iwreq_data *wrqu,
25146 + char *extra)
25147 + {
25148 ++ struct iw_point *dwrq = &wrqu->essid;
25149 + struct airo_info *local = dev->ml_priv;
25150 + SsidRid SSID_rid; /* SSIDs */
25151 +
25152 +@@ -5897,9 +5902,10 @@ static int airo_set_essid(struct net_device *dev,
25153 + */
25154 + static int airo_get_essid(struct net_device *dev,
25155 + struct iw_request_info *info,
25156 +- struct iw_point *dwrq,
25157 ++ union iwreq_data *wrqu,
25158 + char *extra)
25159 + {
25160 ++ struct iw_point *dwrq = &wrqu->essid;
25161 + struct airo_info *local = dev->ml_priv;
25162 + StatusRid status_rid; /* Card status info */
25163 +
25164 +@@ -5925,9 +5931,10 @@ static int airo_get_essid(struct net_device *dev,
25165 + */
25166 + static int airo_set_wap(struct net_device *dev,
25167 + struct iw_request_info *info,
25168 +- struct sockaddr *awrq,
25169 ++ union iwreq_data *wrqu,
25170 + char *extra)
25171 + {
25172 ++ struct sockaddr *awrq = &wrqu->ap_addr;
25173 + struct airo_info *local = dev->ml_priv;
25174 + Cmd cmd;
25175 + Resp rsp;
25176 +@@ -5960,9 +5967,10 @@ static int airo_set_wap(struct net_device *dev,
25177 + */
25178 + static int airo_get_wap(struct net_device *dev,
25179 + struct iw_request_info *info,
25180 +- struct sockaddr *awrq,
25181 ++ union iwreq_data *wrqu,
25182 + char *extra)
25183 + {
25184 ++ struct sockaddr *awrq = &wrqu->ap_addr;
25185 + struct airo_info *local = dev->ml_priv;
25186 + StatusRid status_rid; /* Card status info */
25187 +
25188 +@@ -5981,9 +5989,10 @@ static int airo_get_wap(struct net_device *dev,
25189 + */
25190 + static int airo_set_nick(struct net_device *dev,
25191 + struct iw_request_info *info,
25192 +- struct iw_point *dwrq,
25193 ++ union iwreq_data *wrqu,
25194 + char *extra)
25195 + {
25196 ++ struct iw_point *dwrq = &wrqu->data;
25197 + struct airo_info *local = dev->ml_priv;
25198 +
25199 + /* Check the size of the string */
25200 +@@ -6004,9 +6013,10 @@ static int airo_set_nick(struct net_device *dev,
25201 + */
25202 + static int airo_get_nick(struct net_device *dev,
25203 + struct iw_request_info *info,
25204 +- struct iw_point *dwrq,
25205 ++ union iwreq_data *wrqu,
25206 + char *extra)
25207 + {
25208 ++ struct iw_point *dwrq = &wrqu->data;
25209 + struct airo_info *local = dev->ml_priv;
25210 +
25211 + readConfigRid(local, 1);
25212 +@@ -6023,9 +6033,10 @@ static int airo_get_nick(struct net_device *dev,
25213 + */
25214 + static int airo_set_rate(struct net_device *dev,
25215 + struct iw_request_info *info,
25216 +- struct iw_param *vwrq,
25217 ++ union iwreq_data *wrqu,
25218 + char *extra)
25219 + {
25220 ++ struct iw_param *vwrq = &wrqu->bitrate;
25221 + struct airo_info *local = dev->ml_priv;
25222 + CapabilityRid cap_rid; /* Card capability info */
25223 + u8 brate = 0;
25224 +@@ -6093,9 +6104,10 @@ static int airo_set_rate(struct net_device *dev,
25225 + */
25226 + static int airo_get_rate(struct net_device *dev,
25227 + struct iw_request_info *info,
25228 +- struct iw_param *vwrq,
25229 ++ union iwreq_data *wrqu,
25230 + char *extra)
25231 + {
25232 ++ struct iw_param *vwrq = &wrqu->bitrate;
25233 + struct airo_info *local = dev->ml_priv;
25234 + StatusRid status_rid; /* Card status info */
25235 +
25236 +@@ -6115,9 +6127,10 @@ static int airo_get_rate(struct net_device *dev,
25237 + */
25238 + static int airo_set_rts(struct net_device *dev,
25239 + struct iw_request_info *info,
25240 +- struct iw_param *vwrq,
25241 ++ union iwreq_data *wrqu,
25242 + char *extra)
25243 + {
25244 ++ struct iw_param *vwrq = &wrqu->rts;
25245 + struct airo_info *local = dev->ml_priv;
25246 + int rthr = vwrq->value;
25247 +
25248 +@@ -6139,9 +6152,10 @@ static int airo_set_rts(struct net_device *dev,
25249 + */
25250 + static int airo_get_rts(struct net_device *dev,
25251 + struct iw_request_info *info,
25252 +- struct iw_param *vwrq,
25253 ++ union iwreq_data *wrqu,
25254 + char *extra)
25255 + {
25256 ++ struct iw_param *vwrq = &wrqu->rts;
25257 + struct airo_info *local = dev->ml_priv;
25258 +
25259 + readConfigRid(local, 1);
25260 +@@ -6158,9 +6172,10 @@ static int airo_get_rts(struct net_device *dev,
25261 + */
25262 + static int airo_set_frag(struct net_device *dev,
25263 + struct iw_request_info *info,
25264 +- struct iw_param *vwrq,
25265 ++ union iwreq_data *wrqu,
25266 + char *extra)
25267 + {
25268 ++ struct iw_param *vwrq = &wrqu->frag;
25269 + struct airo_info *local = dev->ml_priv;
25270 + int fthr = vwrq->value;
25271 +
25272 +@@ -6183,9 +6198,10 @@ static int airo_set_frag(struct net_device *dev,
25273 + */
25274 + static int airo_get_frag(struct net_device *dev,
25275 + struct iw_request_info *info,
25276 +- struct iw_param *vwrq,
25277 ++ union iwreq_data *wrqu,
25278 + char *extra)
25279 + {
25280 ++ struct iw_param *vwrq = &wrqu->frag;
25281 + struct airo_info *local = dev->ml_priv;
25282 +
25283 + readConfigRid(local, 1);
25284 +@@ -6202,9 +6218,10 @@ static int airo_get_frag(struct net_device *dev,
25285 + */
25286 + static int airo_set_mode(struct net_device *dev,
25287 + struct iw_request_info *info,
25288 +- __u32 *uwrq,
25289 ++ union iwreq_data *wrqu,
25290 + char *extra)
25291 + {
25292 ++ __u32 *uwrq = &wrqu->mode;
25293 + struct airo_info *local = dev->ml_priv;
25294 + int reset = 0;
25295 +
25296 +@@ -6265,9 +6282,10 @@ static int airo_set_mode(struct net_device *dev,
25297 + */
25298 + static int airo_get_mode(struct net_device *dev,
25299 + struct iw_request_info *info,
25300 +- __u32 *uwrq,
25301 ++ union iwreq_data *wrqu,
25302 + char *extra)
25303 + {
25304 ++ __u32 *uwrq = &wrqu->mode;
25305 + struct airo_info *local = dev->ml_priv;
25306 +
25307 + readConfigRid(local, 1);
25308 +@@ -6300,9 +6318,10 @@ static inline int valid_index(struct airo_info *ai, int index)
25309 + */
25310 + static int airo_set_encode(struct net_device *dev,
25311 + struct iw_request_info *info,
25312 +- struct iw_point *dwrq,
25313 ++ union iwreq_data *wrqu,
25314 + char *extra)
25315 + {
25316 ++ struct iw_point *dwrq = &wrqu->encoding;
25317 + struct airo_info *local = dev->ml_priv;
25318 + int perm = (dwrq->flags & IW_ENCODE_TEMP ? 0 : 1);
25319 + __le16 currentAuthType = local->config.authType;
25320 +@@ -6399,9 +6418,10 @@ static int airo_set_encode(struct net_device *dev,
25321 + */
25322 + static int airo_get_encode(struct net_device *dev,
25323 + struct iw_request_info *info,
25324 +- struct iw_point *dwrq,
25325 ++ union iwreq_data *wrqu,
25326 + char *extra)
25327 + {
25328 ++ struct iw_point *dwrq = &wrqu->encoding;
25329 + struct airo_info *local = dev->ml_priv;
25330 + int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
25331 + int wep_key_len;
25332 +@@ -6746,9 +6766,10 @@ static int airo_get_auth(struct net_device *dev,
25333 + */
25334 + static int airo_set_txpow(struct net_device *dev,
25335 + struct iw_request_info *info,
25336 +- struct iw_param *vwrq,
25337 ++ union iwreq_data *wrqu,
25338 + char *extra)
25339 + {
25340 ++ struct iw_param *vwrq = &wrqu->txpower;
25341 + struct airo_info *local = dev->ml_priv;
25342 + CapabilityRid cap_rid; /* Card capability info */
25343 + int i;
25344 +@@ -6783,9 +6804,10 @@ static int airo_set_txpow(struct net_device *dev,
25345 + */
25346 + static int airo_get_txpow(struct net_device *dev,
25347 + struct iw_request_info *info,
25348 +- struct iw_param *vwrq,
25349 ++ union iwreq_data *wrqu,
25350 + char *extra)
25351 + {
25352 ++ struct iw_param *vwrq = &wrqu->txpower;
25353 + struct airo_info *local = dev->ml_priv;
25354 +
25355 + readConfigRid(local, 1);
25356 +@@ -6803,9 +6825,10 @@ static int airo_get_txpow(struct net_device *dev,
25357 + */
25358 + static int airo_set_retry(struct net_device *dev,
25359 + struct iw_request_info *info,
25360 +- struct iw_param *vwrq,
25361 ++ union iwreq_data *wrqu,
25362 + char *extra)
25363 + {
25364 ++ struct iw_param *vwrq = &wrqu->retry;
25365 + struct airo_info *local = dev->ml_priv;
25366 + int rc = -EINVAL;
25367 +
25368 +@@ -6841,9 +6864,10 @@ static int airo_set_retry(struct net_device *dev,
25369 + */
25370 + static int airo_get_retry(struct net_device *dev,
25371 + struct iw_request_info *info,
25372 +- struct iw_param *vwrq,
25373 ++ union iwreq_data *wrqu,
25374 + char *extra)
25375 + {
25376 ++ struct iw_param *vwrq = &wrqu->retry;
25377 + struct airo_info *local = dev->ml_priv;
25378 +
25379 + vwrq->disabled = 0; /* Can't be disabled */
25380 +@@ -6872,9 +6896,10 @@ static int airo_get_retry(struct net_device *dev,
25381 + */
25382 + static int airo_get_range(struct net_device *dev,
25383 + struct iw_request_info *info,
25384 +- struct iw_point *dwrq,
25385 ++ union iwreq_data *wrqu,
25386 + char *extra)
25387 + {
25388 ++ struct iw_point *dwrq = &wrqu->data;
25389 + struct airo_info *local = dev->ml_priv;
25390 + struct iw_range *range = (struct iw_range *) extra;
25391 + CapabilityRid cap_rid; /* Card capability info */
25392 +@@ -6998,9 +7023,10 @@ static int airo_get_range(struct net_device *dev,
25393 + */
25394 + static int airo_set_power(struct net_device *dev,
25395 + struct iw_request_info *info,
25396 +- struct iw_param *vwrq,
25397 ++ union iwreq_data *wrqu,
25398 + char *extra)
25399 + {
25400 ++ struct iw_param *vwrq = &wrqu->power;
25401 + struct airo_info *local = dev->ml_priv;
25402 +
25403 + readConfigRid(local, 1);
25404 +@@ -7055,9 +7081,10 @@ static int airo_set_power(struct net_device *dev,
25405 + */
25406 + static int airo_get_power(struct net_device *dev,
25407 + struct iw_request_info *info,
25408 +- struct iw_param *vwrq,
25409 ++ union iwreq_data *wrqu,
25410 + char *extra)
25411 + {
25412 ++ struct iw_param *vwrq = &wrqu->power;
25413 + struct airo_info *local = dev->ml_priv;
25414 + __le16 mode;
25415 +
25416 +@@ -7086,9 +7113,10 @@ static int airo_get_power(struct net_device *dev,
25417 + */
25418 + static int airo_set_sens(struct net_device *dev,
25419 + struct iw_request_info *info,
25420 +- struct iw_param *vwrq,
25421 ++ union iwreq_data *wrqu,
25422 + char *extra)
25423 + {
25424 ++ struct iw_param *vwrq = &wrqu->sens;
25425 + struct airo_info *local = dev->ml_priv;
25426 +
25427 + readConfigRid(local, 1);
25428 +@@ -7105,9 +7133,10 @@ static int airo_set_sens(struct net_device *dev,
25429 + */
25430 + static int airo_get_sens(struct net_device *dev,
25431 + struct iw_request_info *info,
25432 +- struct iw_param *vwrq,
25433 ++ union iwreq_data *wrqu,
25434 + char *extra)
25435 + {
25436 ++ struct iw_param *vwrq = &wrqu->sens;
25437 + struct airo_info *local = dev->ml_priv;
25438 +
25439 + readConfigRid(local, 1);
25440 +@@ -7125,9 +7154,10 @@ static int airo_get_sens(struct net_device *dev,
25441 + */
25442 + static int airo_get_aplist(struct net_device *dev,
25443 + struct iw_request_info *info,
25444 +- struct iw_point *dwrq,
25445 ++ union iwreq_data *wrqu,
25446 + char *extra)
25447 + {
25448 ++ struct iw_point *dwrq = &wrqu->data;
25449 + struct airo_info *local = dev->ml_priv;
25450 + struct sockaddr *address = (struct sockaddr *) extra;
25451 + struct iw_quality *qual;
25452 +@@ -7203,7 +7233,7 @@ static int airo_get_aplist(struct net_device *dev,
25453 + */
25454 + static int airo_set_scan(struct net_device *dev,
25455 + struct iw_request_info *info,
25456 +- struct iw_point *dwrq,
25457 ++ union iwreq_data *dwrq,
25458 + char *extra)
25459 + {
25460 + struct airo_info *ai = dev->ml_priv;
25461 +@@ -7434,9 +7464,10 @@ static inline char *airo_translate_scan(struct net_device *dev,
25462 + */
25463 + static int airo_get_scan(struct net_device *dev,
25464 + struct iw_request_info *info,
25465 +- struct iw_point *dwrq,
25466 ++ union iwreq_data *wrqu,
25467 + char *extra)
25468 + {
25469 ++ struct iw_point *dwrq = &wrqu->data;
25470 + struct airo_info *ai = dev->ml_priv;
25471 + BSSListElement *net;
25472 + int err = 0;
25473 +@@ -7478,7 +7509,7 @@ out:
25474 + */
25475 + static int airo_config_commit(struct net_device *dev,
25476 + struct iw_request_info *info, /* NULL */
25477 +- void *zwrq, /* NULL */
25478 ++ union iwreq_data *zwrq, /* NULL */
25479 + char *extra) /* NULL */
25480 + {
25481 + struct airo_info *local = dev->ml_priv;
25482 +@@ -7528,61 +7559,61 @@ static const struct iw_priv_args airo_private_args[] = {
25483 +
25484 + static const iw_handler airo_handler[] =
25485 + {
25486 +- (iw_handler) airo_config_commit, /* SIOCSIWCOMMIT */
25487 +- (iw_handler) airo_get_name, /* SIOCGIWNAME */
25488 +- (iw_handler) NULL, /* SIOCSIWNWID */
25489 +- (iw_handler) NULL, /* SIOCGIWNWID */
25490 +- (iw_handler) airo_set_freq, /* SIOCSIWFREQ */
25491 +- (iw_handler) airo_get_freq, /* SIOCGIWFREQ */
25492 +- (iw_handler) airo_set_mode, /* SIOCSIWMODE */
25493 +- (iw_handler) airo_get_mode, /* SIOCGIWMODE */
25494 +- (iw_handler) airo_set_sens, /* SIOCSIWSENS */
25495 +- (iw_handler) airo_get_sens, /* SIOCGIWSENS */
25496 +- (iw_handler) NULL, /* SIOCSIWRANGE */
25497 +- (iw_handler) airo_get_range, /* SIOCGIWRANGE */
25498 +- (iw_handler) NULL, /* SIOCSIWPRIV */
25499 +- (iw_handler) NULL, /* SIOCGIWPRIV */
25500 +- (iw_handler) NULL, /* SIOCSIWSTATS */
25501 +- (iw_handler) NULL, /* SIOCGIWSTATS */
25502 ++ airo_config_commit, /* SIOCSIWCOMMIT */
25503 ++ airo_get_name, /* SIOCGIWNAME */
25504 ++ NULL, /* SIOCSIWNWID */
25505 ++ NULL, /* SIOCGIWNWID */
25506 ++ airo_set_freq, /* SIOCSIWFREQ */
25507 ++ airo_get_freq, /* SIOCGIWFREQ */
25508 ++ airo_set_mode, /* SIOCSIWMODE */
25509 ++ airo_get_mode, /* SIOCGIWMODE */
25510 ++ airo_set_sens, /* SIOCSIWSENS */
25511 ++ airo_get_sens, /* SIOCGIWSENS */
25512 ++ NULL, /* SIOCSIWRANGE */
25513 ++ airo_get_range, /* SIOCGIWRANGE */
25514 ++ NULL, /* SIOCSIWPRIV */
25515 ++ NULL, /* SIOCGIWPRIV */
25516 ++ NULL, /* SIOCSIWSTATS */
25517 ++ NULL, /* SIOCGIWSTATS */
25518 + iw_handler_set_spy, /* SIOCSIWSPY */
25519 + iw_handler_get_spy, /* SIOCGIWSPY */
25520 + iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
25521 + iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
25522 +- (iw_handler) airo_set_wap, /* SIOCSIWAP */
25523 +- (iw_handler) airo_get_wap, /* SIOCGIWAP */
25524 +- (iw_handler) NULL, /* -- hole -- */
25525 +- (iw_handler) airo_get_aplist, /* SIOCGIWAPLIST */
25526 +- (iw_handler) airo_set_scan, /* SIOCSIWSCAN */
25527 +- (iw_handler) airo_get_scan, /* SIOCGIWSCAN */
25528 +- (iw_handler) airo_set_essid, /* SIOCSIWESSID */
25529 +- (iw_handler) airo_get_essid, /* SIOCGIWESSID */
25530 +- (iw_handler) airo_set_nick, /* SIOCSIWNICKN */
25531 +- (iw_handler) airo_get_nick, /* SIOCGIWNICKN */
25532 +- (iw_handler) NULL, /* -- hole -- */
25533 +- (iw_handler) NULL, /* -- hole -- */
25534 +- (iw_handler) airo_set_rate, /* SIOCSIWRATE */
25535 +- (iw_handler) airo_get_rate, /* SIOCGIWRATE */
25536 +- (iw_handler) airo_set_rts, /* SIOCSIWRTS */
25537 +- (iw_handler) airo_get_rts, /* SIOCGIWRTS */
25538 +- (iw_handler) airo_set_frag, /* SIOCSIWFRAG */
25539 +- (iw_handler) airo_get_frag, /* SIOCGIWFRAG */
25540 +- (iw_handler) airo_set_txpow, /* SIOCSIWTXPOW */
25541 +- (iw_handler) airo_get_txpow, /* SIOCGIWTXPOW */
25542 +- (iw_handler) airo_set_retry, /* SIOCSIWRETRY */
25543 +- (iw_handler) airo_get_retry, /* SIOCGIWRETRY */
25544 +- (iw_handler) airo_set_encode, /* SIOCSIWENCODE */
25545 +- (iw_handler) airo_get_encode, /* SIOCGIWENCODE */
25546 +- (iw_handler) airo_set_power, /* SIOCSIWPOWER */
25547 +- (iw_handler) airo_get_power, /* SIOCGIWPOWER */
25548 +- (iw_handler) NULL, /* -- hole -- */
25549 +- (iw_handler) NULL, /* -- hole -- */
25550 +- (iw_handler) NULL, /* SIOCSIWGENIE */
25551 +- (iw_handler) NULL, /* SIOCGIWGENIE */
25552 +- (iw_handler) airo_set_auth, /* SIOCSIWAUTH */
25553 +- (iw_handler) airo_get_auth, /* SIOCGIWAUTH */
25554 +- (iw_handler) airo_set_encodeext, /* SIOCSIWENCODEEXT */
25555 +- (iw_handler) airo_get_encodeext, /* SIOCGIWENCODEEXT */
25556 +- (iw_handler) NULL, /* SIOCSIWPMKSA */
25557 ++ airo_set_wap, /* SIOCSIWAP */
25558 ++ airo_get_wap, /* SIOCGIWAP */
25559 ++ NULL, /* -- hole -- */
25560 ++ airo_get_aplist, /* SIOCGIWAPLIST */
25561 ++ airo_set_scan, /* SIOCSIWSCAN */
25562 ++ airo_get_scan, /* SIOCGIWSCAN */
25563 ++ airo_set_essid, /* SIOCSIWESSID */
25564 ++ airo_get_essid, /* SIOCGIWESSID */
25565 ++ airo_set_nick, /* SIOCSIWNICKN */
25566 ++ airo_get_nick, /* SIOCGIWNICKN */
25567 ++ NULL, /* -- hole -- */
25568 ++ NULL, /* -- hole -- */
25569 ++ airo_set_rate, /* SIOCSIWRATE */
25570 ++ airo_get_rate, /* SIOCGIWRATE */
25571 ++ airo_set_rts, /* SIOCSIWRTS */
25572 ++ airo_get_rts, /* SIOCGIWRTS */
25573 ++ airo_set_frag, /* SIOCSIWFRAG */
25574 ++ airo_get_frag, /* SIOCGIWFRAG */
25575 ++ airo_set_txpow, /* SIOCSIWTXPOW */
25576 ++ airo_get_txpow, /* SIOCGIWTXPOW */
25577 ++ airo_set_retry, /* SIOCSIWRETRY */
25578 ++ airo_get_retry, /* SIOCGIWRETRY */
25579 ++ airo_set_encode, /* SIOCSIWENCODE */
25580 ++ airo_get_encode, /* SIOCGIWENCODE */
25581 ++ airo_set_power, /* SIOCSIWPOWER */
25582 ++ airo_get_power, /* SIOCGIWPOWER */
25583 ++ NULL, /* -- hole -- */
25584 ++ NULL, /* -- hole -- */
25585 ++ NULL, /* SIOCSIWGENIE */
25586 ++ NULL, /* SIOCGIWGENIE */
25587 ++ airo_set_auth, /* SIOCSIWAUTH */
25588 ++ airo_get_auth, /* SIOCGIWAUTH */
25589 ++ airo_set_encodeext, /* SIOCSIWENCODEEXT */
25590 ++ airo_get_encodeext, /* SIOCGIWENCODEEXT */
25591 ++ NULL, /* SIOCSIWPMKSA */
25592 + };
25593 +
25594 + /* Note : don't describe AIROIDIFC and AIROOLDIDIFC in here.
25595 +@@ -7845,7 +7876,7 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) {
25596 + struct airo_info *ai = dev->ml_priv;
25597 + int ridcode;
25598 + int enabled;
25599 +- static int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
25600 ++ int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
25601 + unsigned char *iobuf;
25602 +
25603 + /* Only super-user can write RIDs */
25604 +diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
25605 +index f93a7f7..eb25e2b 100644
25606 +--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
25607 ++++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
25608 +@@ -3220,8 +3220,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv)
25609 + }
25610 + }
25611 +
25612 +-static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
25613 ++static void ipw2100_irq_tasklet(unsigned long _priv)
25614 + {
25615 ++ struct ipw2100_priv *priv = (struct ipw2100_priv *)_priv;
25616 + struct net_device *dev = priv->net_dev;
25617 + unsigned long flags;
25618 + u32 inta, tmp;
25619 +@@ -6029,7 +6030,7 @@ static void ipw2100_rf_kill(struct work_struct *work)
25620 + spin_unlock_irqrestore(&priv->low_lock, flags);
25621 + }
25622 +
25623 +-static void ipw2100_irq_tasklet(struct ipw2100_priv *priv);
25624 ++static void ipw2100_irq_tasklet(unsigned long _priv);
25625 +
25626 + static const struct net_device_ops ipw2100_netdev_ops = {
25627 + .ndo_open = ipw2100_open,
25628 +@@ -6158,8 +6159,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
25629 + INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
25630 + INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event);
25631 +
25632 +- tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
25633 +- ipw2100_irq_tasklet, (unsigned long)priv);
25634 ++ tasklet_init(&priv->irq_tasklet, ipw2100_irq_tasklet, (unsigned long)priv);
25635 +
25636 + /* NOTE: We do not start the deferred work for status checks yet */
25637 + priv->stop_rf_kill = 1;
25638 +diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
25639 +index ed0adaf..4bb4f53 100644
25640 +--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
25641 ++++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
25642 +@@ -1968,8 +1968,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv)
25643 + wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL);
25644 + }
25645 +
25646 +-static void ipw_irq_tasklet(struct ipw_priv *priv)
25647 ++static void ipw_irq_tasklet(unsigned long _priv)
25648 + {
25649 ++ struct ipw_priv *priv = (struct ipw_priv *)_priv;
25650 + u32 inta, inta_mask, handled = 0;
25651 + unsigned long flags;
25652 + int rc = 0;
25653 +@@ -10705,8 +10706,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv)
25654 + INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate);
25655 + #endif /* CONFIG_IPW2200_QOS */
25656 +
25657 +- tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
25658 +- ipw_irq_tasklet, (unsigned long)priv);
25659 ++ tasklet_init(&priv->irq_tasklet, ipw_irq_tasklet, (unsigned long)priv);
25660 +
25661 + return ret;
25662 + }
25663 +diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
25664 +index af1b3e6..9bc08d3 100644
25665 +--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
25666 ++++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
25667 +@@ -1399,8 +1399,9 @@ il3945_dump_nic_error_log(struct il_priv *il)
25668 + }
25669 +
25670 + static void
25671 +-il3945_irq_tasklet(struct il_priv *il)
25672 ++il3945_irq_tasklet(unsigned long _il)
25673 + {
25674 ++ struct il_priv *il = (struct il_priv *)_il;
25675 + u32 inta, handled = 0;
25676 + u32 inta_fh;
25677 + unsigned long flags;
25678 +@@ -3432,7 +3433,7 @@ il3945_setup_deferred_work(struct il_priv *il)
25679 + setup_timer(&il->watchdog, il_bg_watchdog, (unsigned long)il);
25680 +
25681 + tasklet_init(&il->irq_tasklet,
25682 +- (void (*)(unsigned long))il3945_irq_tasklet,
25683 ++ il3945_irq_tasklet,
25684 + (unsigned long)il);
25685 + }
25686 +
25687 +@@ -3469,7 +3470,7 @@ static struct attribute_group il3945_attribute_group = {
25688 + .attrs = il3945_sysfs_entries,
25689 + };
25690 +
25691 +-static struct ieee80211_ops il3945_mac_ops __read_mostly = {
25692 ++static struct ieee80211_ops il3945_mac_ops = {
25693 + .tx = il3945_mac_tx,
25694 + .start = il3945_mac_start,
25695 + .stop = il3945_mac_stop,
25696 +@@ -3633,7 +3634,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
25697 */
25698 if (il3945_mod_params.disable_hw_scan) {
25699 D_INFO("Disabling hw_scan\n");
25700 @@ -54483,11 +62731,37 @@ index af1b3e6..d5d82713 100644
25701 }
25702
25703 D_INFO("*** LOAD DRIVER ***\n");
25704 -diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
25705 -index b15e44f..8658af2 100644
25706 ---- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c
25707 -+++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
25708 -@@ -188,7 +188,7 @@ static ssize_t iwl_dbgfs_sram_write(struct file *file,
25709 +diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
25710 +index fd38aa0..4db38f7 100644
25711 +--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
25712 ++++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
25713 +@@ -4361,8 +4361,9 @@ il4965_synchronize_irq(struct il_priv *il)
25714 + }
25715 +
25716 + static void
25717 +-il4965_irq_tasklet(struct il_priv *il)
25718 ++il4965_irq_tasklet(unsigned long _il)
25719 + {
25720 ++ struct il_priv *il = (struct il_priv *)_il;
25721 + u32 inta, handled = 0;
25722 + u32 inta_fh;
25723 + unsigned long flags;
25724 +@@ -6254,9 +6255,7 @@ il4965_setup_deferred_work(struct il_priv *il)
25725 +
25726 + setup_timer(&il->watchdog, il_bg_watchdog, (unsigned long)il);
25727 +
25728 +- tasklet_init(&il->irq_tasklet,
25729 +- (void (*)(unsigned long))il4965_irq_tasklet,
25730 +- (unsigned long)il);
25731 ++ tasklet_init(&il->irq_tasklet, il4965_irq_tasklet, (unsigned long)il);
25732 + }
25733 +
25734 + static void
25735 +diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
25736 +index 74c5161..f0a52a5 100644
25737 +--- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
25738 ++++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
25739 +@@ -190,7 +190,7 @@ static ssize_t iwl_dbgfs_sram_write(struct file *file,
25740 {
25741 struct iwl_priv *priv = file->private_data;
25742 char buf[64];
25743 @@ -54496,7 +62770,7 @@ index b15e44f..8658af2 100644
25744 u32 offset, len;
25745
25746 memset(buf, 0, sizeof(buf));
25747 -@@ -454,7 +454,7 @@ static ssize_t iwl_dbgfs_rx_handlers_write(struct file *file,
25748 +@@ -456,7 +456,7 @@ static ssize_t iwl_dbgfs_rx_handlers_write(struct file *file,
25749 struct iwl_priv *priv = file->private_data;
25750
25751 char buf[8];
25752 @@ -54505,7 +62779,7 @@ index b15e44f..8658af2 100644
25753 u32 reset_flag;
25754
25755 memset(buf, 0, sizeof(buf));
25756 -@@ -535,7 +535,7 @@ static ssize_t iwl_dbgfs_disable_ht40_write(struct file *file,
25757 +@@ -537,7 +537,7 @@ static ssize_t iwl_dbgfs_disable_ht40_write(struct file *file,
25758 {
25759 struct iwl_priv *priv = file->private_data;
25760 char buf[8];
25761 @@ -54514,7 +62788,7 @@ index b15e44f..8658af2 100644
25762 int ht40;
25763
25764 memset(buf, 0, sizeof(buf));
25765 -@@ -587,7 +587,7 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file,
25766 +@@ -589,7 +589,7 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file,
25767 {
25768 struct iwl_priv *priv = file->private_data;
25769 char buf[8];
25770 @@ -54523,7 +62797,7 @@ index b15e44f..8658af2 100644
25771 int value;
25772
25773 memset(buf, 0, sizeof(buf));
25774 -@@ -679,10 +679,10 @@ DEBUGFS_READ_FILE_OPS(temperature);
25775 +@@ -681,10 +681,10 @@ DEBUGFS_READ_FILE_OPS(temperature);
25776 DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override);
25777 DEBUGFS_READ_FILE_OPS(current_sleep_command);
25778
25779 @@ -54538,7 +62812,7 @@ index b15e44f..8658af2 100644
25780 "%-32s current cumulative delta max\n";
25781
25782 static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
25783 -@@ -1852,7 +1852,7 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file,
25784 +@@ -1854,7 +1854,7 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file,
25785 {
25786 struct iwl_priv *priv = file->private_data;
25787 char buf[8];
25788 @@ -54547,7 +62821,7 @@ index b15e44f..8658af2 100644
25789 int clear;
25790
25791 memset(buf, 0, sizeof(buf));
25792 -@@ -1897,7 +1897,7 @@ static ssize_t iwl_dbgfs_ucode_tracing_write(struct file *file,
25793 +@@ -1899,7 +1899,7 @@ static ssize_t iwl_dbgfs_ucode_tracing_write(struct file *file,
25794 {
25795 struct iwl_priv *priv = file->private_data;
25796 char buf[8];
25797 @@ -54556,7 +62830,7 @@ index b15e44f..8658af2 100644
25798 int trace;
25799
25800 memset(buf, 0, sizeof(buf));
25801 -@@ -1968,7 +1968,7 @@ static ssize_t iwl_dbgfs_missed_beacon_write(struct file *file,
25802 +@@ -1970,7 +1970,7 @@ static ssize_t iwl_dbgfs_missed_beacon_write(struct file *file,
25803 {
25804 struct iwl_priv *priv = file->private_data;
25805 char buf[8];
25806 @@ -54565,7 +62839,7 @@ index b15e44f..8658af2 100644
25807 int missed;
25808
25809 memset(buf, 0, sizeof(buf));
25810 -@@ -2009,7 +2009,7 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file,
25811 +@@ -2011,7 +2011,7 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file,
25812
25813 struct iwl_priv *priv = file->private_data;
25814 char buf[8];
25815 @@ -54574,7 +62848,7 @@ index b15e44f..8658af2 100644
25816 int plcp;
25817
25818 memset(buf, 0, sizeof(buf));
25819 -@@ -2069,7 +2069,7 @@ static ssize_t iwl_dbgfs_txfifo_flush_write(struct file *file,
25820 +@@ -2071,7 +2071,7 @@ static ssize_t iwl_dbgfs_txfifo_flush_write(struct file *file,
25821
25822 struct iwl_priv *priv = file->private_data;
25823 char buf[8];
25824 @@ -54583,7 +62857,7 @@ index b15e44f..8658af2 100644
25825 int flush;
25826
25827 memset(buf, 0, sizeof(buf));
25828 -@@ -2159,7 +2159,7 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
25829 +@@ -2161,7 +2161,7 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
25830
25831 struct iwl_priv *priv = file->private_data;
25832 char buf[8];
25833 @@ -54592,7 +62866,7 @@ index b15e44f..8658af2 100644
25834 int rts;
25835
25836 if (!priv->cfg->ht_params)
25837 -@@ -2200,7 +2200,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
25838 +@@ -2202,7 +2202,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
25839 {
25840 struct iwl_priv *priv = file->private_data;
25841 char buf[8];
25842 @@ -54601,7 +62875,7 @@ index b15e44f..8658af2 100644
25843
25844 memset(buf, 0, sizeof(buf));
25845 buf_size = min(count, sizeof(buf) - 1);
25846 -@@ -2234,7 +2234,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
25847 +@@ -2236,7 +2236,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
25848 struct iwl_priv *priv = file->private_data;
25849 u32 event_log_flag;
25850 char buf[8];
25851 @@ -54610,7 +62884,7 @@ index b15e44f..8658af2 100644
25852
25853 /* check that the interface is up */
25854 if (!iwl_is_ready(priv))
25855 -@@ -2288,7 +2288,7 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file,
25856 +@@ -2290,7 +2290,7 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file,
25857 struct iwl_priv *priv = file->private_data;
25858 char buf[8];
25859 u32 calib_disabled;
25860 @@ -54619,11 +62893,11 @@ index b15e44f..8658af2 100644
25861
25862 memset(buf, 0, sizeof(buf));
25863 buf_size = min(count, sizeof(buf) - 1);
25864 -diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
25865 -index 29ae58e..305baa0 100644
25866 ---- a/drivers/net/wireless/iwlwifi/mvm/d3.c
25867 -+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
25868 -@@ -279,7 +279,7 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
25869 +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
25870 +index d3e21d9..5f07571 100644
25871 +--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
25872 ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
25873 +@@ -308,7 +308,7 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
25874 aes_sc = data->rsc_tsc->all_tsc_rsc.aes.unicast_rsc;
25875 aes_tx_sc = &data->rsc_tsc->all_tsc_rsc.aes.tsc;
25876
25877 @@ -54632,20 +62906,20 @@ index 29ae58e..305baa0 100644
25878 aes_tx_sc->pn = cpu_to_le64(pn64);
25879 } else {
25880 aes_sc = data->rsc_tsc->all_tsc_rsc.aes.multicast_rsc;
25881 -@@ -1448,7 +1448,7 @@ static void iwl_mvm_d3_update_gtks(struct ieee80211_hw *hw,
25882 - switch (key->cipher) {
25883 +@@ -1596,7 +1596,7 @@ static void iwl_mvm_d3_update_keys(struct ieee80211_hw *hw,
25884 case WLAN_CIPHER_SUITE_CCMP:
25885 - iwl_mvm_set_aes_rx_seq(sc->aes.unicast_rsc, key);
25886 + iwl_mvm_set_aes_rx_seq(data->mvm, sc->aes.unicast_rsc,
25887 + sta, key);
25888 - atomic64_set(&key->tx_pn, le64_to_cpu(sc->aes.tsc.pn));
25889 + atomic64_set_unchecked(&key->tx_pn, le64_to_cpu(sc->aes.tsc.pn));
25890 break;
25891 case WLAN_CIPHER_SUITE_TKIP:
25892 iwl_mvm_tkip_sc_to_seq(&sc->tkip.tsc, &seq);
25893 -diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
25894 -index 6743edf..22a86c5 100644
25895 ---- a/drivers/net/wireless/iwlwifi/mvm/tx.c
25896 -+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
25897 -@@ -284,7 +284,7 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
25898 +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
25899 +index a040edc..4ea3fa7 100644
25900 +--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
25901 ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
25902 +@@ -286,7 +286,7 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
25903 case WLAN_CIPHER_SUITE_CCMP:
25904 case WLAN_CIPHER_SUITE_CCMP_256:
25905 iwl_mvm_set_tx_cmd_ccmp(info, tx_cmd);
25906 @@ -54654,11 +62928,11 @@ index 6743edf..22a86c5 100644
25907 crypto_hdr[0] = pn;
25908 crypto_hdr[2] = 0;
25909 crypto_hdr[3] = 0x20 | (keyconf->keyidx << 6);
25910 -diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
25911 -index 8c72047..e54deaa 100644
25912 ---- a/drivers/net/wireless/iwlwifi/pcie/trans.c
25913 -+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
25914 -@@ -2058,7 +2058,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
25915 +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
25916 +index 5a854c6..8871801 100644
25917 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
25918 ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
25919 +@@ -2123,7 +2123,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
25920 struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
25921
25922 char buf[8];
25923 @@ -54667,7 +62941,7 @@ index 8c72047..e54deaa 100644
25924 u32 reset_flag;
25925
25926 memset(buf, 0, sizeof(buf));
25927 -@@ -2079,7 +2079,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
25928 +@@ -2144,7 +2144,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
25929 {
25930 struct iwl_trans *trans = file->private_data;
25931 char buf[8];
25932 @@ -54676,11 +62950,1569 @@ index 8c72047..e54deaa 100644
25933 int csr;
25934
25935 memset(buf, 0, sizeof(buf));
25936 +diff --git a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
25937 +index 3e5fa78..ca2e051 100644
25938 +--- a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
25939 ++++ b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
25940 +@@ -101,8 +101,9 @@ static int prism2_get_datarates(struct net_device *dev, u8 *rates)
25941 +
25942 + static int prism2_get_name(struct net_device *dev,
25943 + struct iw_request_info *info,
25944 +- char *name, char *extra)
25945 ++ union iwreq_data *wrqu, char *extra)
25946 + {
25947 ++ char *name = wrqu->name;
25948 + u8 rates[10];
25949 + int len, i, over2 = 0;
25950 +
25951 +@@ -123,8 +124,9 @@ static int prism2_get_name(struct net_device *dev,
25952 +
25953 + static int prism2_ioctl_siwencode(struct net_device *dev,
25954 + struct iw_request_info *info,
25955 +- struct iw_point *erq, char *keybuf)
25956 ++ union iwreq_data *wrqu, char *keybuf)
25957 + {
25958 ++ struct iw_point *erq = &wrqu->encoding;
25959 + struct hostap_interface *iface;
25960 + local_info_t *local;
25961 + int i;
25962 +@@ -225,8 +227,9 @@ static int prism2_ioctl_siwencode(struct net_device *dev,
25963 +
25964 + static int prism2_ioctl_giwencode(struct net_device *dev,
25965 + struct iw_request_info *info,
25966 +- struct iw_point *erq, char *key)
25967 ++ union iwreq_data *wrqu, char *key)
25968 + {
25969 ++ struct iw_point *erq = &wrqu->encoding;
25970 + struct hostap_interface *iface;
25971 + local_info_t *local;
25972 + int i, len;
25973 +@@ -331,8 +334,9 @@ static int hostap_set_rate(struct net_device *dev)
25974 +
25975 + static int prism2_ioctl_siwrate(struct net_device *dev,
25976 + struct iw_request_info *info,
25977 +- struct iw_param *rrq, char *extra)
25978 ++ union iwreq_data *wrqu, char *extra)
25979 + {
25980 ++ struct iw_param *rrq = &wrqu->bitrate;
25981 + struct hostap_interface *iface;
25982 + local_info_t *local;
25983 +
25984 +@@ -391,8 +395,9 @@ static int prism2_ioctl_siwrate(struct net_device *dev,
25985 +
25986 + static int prism2_ioctl_giwrate(struct net_device *dev,
25987 + struct iw_request_info *info,
25988 +- struct iw_param *rrq, char *extra)
25989 ++ union iwreq_data *wrqu, char *extra)
25990 + {
25991 ++ struct iw_param *rrq = &wrqu->bitrate;
25992 + u16 val;
25993 + struct hostap_interface *iface;
25994 + local_info_t *local;
25995 +@@ -450,8 +455,9 @@ static int prism2_ioctl_giwrate(struct net_device *dev,
25996 +
25997 + static int prism2_ioctl_siwsens(struct net_device *dev,
25998 + struct iw_request_info *info,
25999 +- struct iw_param *sens, char *extra)
26000 ++ union iwreq_data *wrqu, char *extra)
26001 + {
26002 ++ struct iw_param *sens = &wrqu->sens;
26003 + struct hostap_interface *iface;
26004 + local_info_t *local;
26005 +
26006 +@@ -471,8 +477,9 @@ static int prism2_ioctl_siwsens(struct net_device *dev,
26007 +
26008 + static int prism2_ioctl_giwsens(struct net_device *dev,
26009 + struct iw_request_info *info,
26010 +- struct iw_param *sens, char *extra)
26011 ++ union iwreq_data *wrqu, char *extra)
26012 + {
26013 ++ struct iw_param *sens = &wrqu->sens;
26014 + struct hostap_interface *iface;
26015 + local_info_t *local;
26016 + __le16 val;
26017 +@@ -495,8 +502,9 @@ static int prism2_ioctl_giwsens(struct net_device *dev,
26018 + /* Deprecated in new wireless extension API */
26019 + static int prism2_ioctl_giwaplist(struct net_device *dev,
26020 + struct iw_request_info *info,
26021 +- struct iw_point *data, char *extra)
26022 ++ union iwreq_data *wrqu, char *extra)
26023 + {
26024 ++ struct iw_point *data = &wrqu->data;
26025 + struct hostap_interface *iface;
26026 + local_info_t *local;
26027 + struct sockaddr *addr;
26028 +@@ -536,8 +544,9 @@ static int prism2_ioctl_giwaplist(struct net_device *dev,
26029 +
26030 + static int prism2_ioctl_siwrts(struct net_device *dev,
26031 + struct iw_request_info *info,
26032 +- struct iw_param *rts, char *extra)
26033 ++ union iwreq_data *wrqu, char *extra)
26034 + {
26035 ++ struct iw_param *rts = &wrqu->rts;
26036 + struct hostap_interface *iface;
26037 + local_info_t *local;
26038 + __le16 val;
26039 +@@ -563,8 +572,9 @@ static int prism2_ioctl_siwrts(struct net_device *dev,
26040 +
26041 + static int prism2_ioctl_giwrts(struct net_device *dev,
26042 + struct iw_request_info *info,
26043 +- struct iw_param *rts, char *extra)
26044 ++ union iwreq_data *wrqu, char *extra)
26045 + {
26046 ++ struct iw_param *rts = &wrqu->rts;
26047 + struct hostap_interface *iface;
26048 + local_info_t *local;
26049 + __le16 val;
26050 +@@ -586,8 +596,9 @@ static int prism2_ioctl_giwrts(struct net_device *dev,
26051 +
26052 + static int prism2_ioctl_siwfrag(struct net_device *dev,
26053 + struct iw_request_info *info,
26054 +- struct iw_param *rts, char *extra)
26055 ++ union iwreq_data *wrqu, char *extra)
26056 + {
26057 ++ struct iw_param *rts = &wrqu->rts;
26058 + struct hostap_interface *iface;
26059 + local_info_t *local;
26060 + __le16 val;
26061 +@@ -613,8 +624,9 @@ static int prism2_ioctl_siwfrag(struct net_device *dev,
26062 +
26063 + static int prism2_ioctl_giwfrag(struct net_device *dev,
26064 + struct iw_request_info *info,
26065 +- struct iw_param *rts, char *extra)
26066 ++ union iwreq_data *wrqu, char *extra)
26067 + {
26068 ++ struct iw_param *rts = &wrqu->rts;
26069 + struct hostap_interface *iface;
26070 + local_info_t *local;
26071 + __le16 val;
26072 +@@ -679,11 +691,12 @@ static int hostap_join_ap(struct net_device *dev)
26073 +
26074 + static int prism2_ioctl_siwap(struct net_device *dev,
26075 + struct iw_request_info *info,
26076 +- struct sockaddr *ap_addr, char *extra)
26077 ++ union iwreq_data *wrqu, char *extra)
26078 + {
26079 + #ifdef PRISM2_NO_STATION_MODES
26080 + return -EOPNOTSUPP;
26081 + #else /* PRISM2_NO_STATION_MODES */
26082 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
26083 + struct hostap_interface *iface;
26084 + local_info_t *local;
26085 +
26086 +@@ -719,8 +732,9 @@ static int prism2_ioctl_siwap(struct net_device *dev,
26087 +
26088 + static int prism2_ioctl_giwap(struct net_device *dev,
26089 + struct iw_request_info *info,
26090 +- struct sockaddr *ap_addr, char *extra)
26091 ++ union iwreq_data *wrqu, char *extra)
26092 + {
26093 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
26094 + struct hostap_interface *iface;
26095 + local_info_t *local;
26096 +
26097 +@@ -755,8 +769,9 @@ static int prism2_ioctl_giwap(struct net_device *dev,
26098 +
26099 + static int prism2_ioctl_siwnickn(struct net_device *dev,
26100 + struct iw_request_info *info,
26101 +- struct iw_point *data, char *nickname)
26102 ++ union iwreq_data *wrqu, char *nickname)
26103 + {
26104 ++ struct iw_point *data = &wrqu->data;
26105 + struct hostap_interface *iface;
26106 + local_info_t *local;
26107 +
26108 +@@ -776,8 +791,9 @@ static int prism2_ioctl_siwnickn(struct net_device *dev,
26109 +
26110 + static int prism2_ioctl_giwnickn(struct net_device *dev,
26111 + struct iw_request_info *info,
26112 +- struct iw_point *data, char *nickname)
26113 ++ union iwreq_data *wrqu, char *nickname)
26114 + {
26115 ++ struct iw_point *data = &wrqu->data;
26116 + struct hostap_interface *iface;
26117 + local_info_t *local;
26118 + int len;
26119 +@@ -803,8 +819,9 @@ static int prism2_ioctl_giwnickn(struct net_device *dev,
26120 +
26121 + static int prism2_ioctl_siwfreq(struct net_device *dev,
26122 + struct iw_request_info *info,
26123 +- struct iw_freq *freq, char *extra)
26124 ++ union iwreq_data *wrqu, char *extra)
26125 + {
26126 ++ struct iw_freq *freq = &wrqu->freq;
26127 + struct hostap_interface *iface;
26128 + local_info_t *local;
26129 +
26130 +@@ -840,8 +857,9 @@ static int prism2_ioctl_siwfreq(struct net_device *dev,
26131 +
26132 + static int prism2_ioctl_giwfreq(struct net_device *dev,
26133 + struct iw_request_info *info,
26134 +- struct iw_freq *freq, char *extra)
26135 ++ union iwreq_data *wrqu, char *extra)
26136 + {
26137 ++ struct iw_freq *freq = &wrqu->freq;
26138 + struct hostap_interface *iface;
26139 + local_info_t *local;
26140 + u16 val;
26141 +@@ -884,8 +902,9 @@ static void hostap_monitor_set_type(local_info_t *local)
26142 +
26143 + static int prism2_ioctl_siwessid(struct net_device *dev,
26144 + struct iw_request_info *info,
26145 +- struct iw_point *data, char *ssid)
26146 ++ union iwreq_data *wrqu, char *ssid)
26147 + {
26148 ++ struct iw_point *data = &wrqu->data;
26149 + struct hostap_interface *iface;
26150 + local_info_t *local;
26151 +
26152 +@@ -920,8 +939,9 @@ static int prism2_ioctl_siwessid(struct net_device *dev,
26153 +
26154 + static int prism2_ioctl_giwessid(struct net_device *dev,
26155 + struct iw_request_info *info,
26156 +- struct iw_point *data, char *essid)
26157 ++ union iwreq_data *wrqu, char *essid)
26158 + {
26159 ++ struct iw_point *data = &wrqu->data;
26160 + struct hostap_interface *iface;
26161 + local_info_t *local;
26162 + u16 val;
26163 +@@ -956,8 +976,9 @@ static int prism2_ioctl_giwessid(struct net_device *dev,
26164 +
26165 + static int prism2_ioctl_giwrange(struct net_device *dev,
26166 + struct iw_request_info *info,
26167 +- struct iw_point *data, char *extra)
26168 ++ union iwreq_data *wrqu, char *extra)
26169 + {
26170 ++ struct iw_point *data = &wrqu->data;
26171 + struct hostap_interface *iface;
26172 + local_info_t *local;
26173 + struct iw_range *range = (struct iw_range *) extra;
26174 +@@ -1131,8 +1152,9 @@ static int hostap_monitor_mode_disable(local_info_t *local)
26175 +
26176 + static int prism2_ioctl_siwmode(struct net_device *dev,
26177 + struct iw_request_info *info,
26178 +- __u32 *mode, char *extra)
26179 ++ union iwreq_data *wrqu, char *extra)
26180 + {
26181 ++ __u32 *mode = &wrqu->mode;
26182 + struct hostap_interface *iface;
26183 + local_info_t *local;
26184 + int double_reset = 0;
26185 +@@ -1207,8 +1229,9 @@ static int prism2_ioctl_siwmode(struct net_device *dev,
26186 +
26187 + static int prism2_ioctl_giwmode(struct net_device *dev,
26188 + struct iw_request_info *info,
26189 +- __u32 *mode, char *extra)
26190 ++ union iwreq_data *wrqu, char *extra)
26191 + {
26192 ++ __u32 *mode = &wrqu->mode;
26193 + struct hostap_interface *iface;
26194 + local_info_t *local;
26195 +
26196 +@@ -1232,11 +1255,12 @@ static int prism2_ioctl_giwmode(struct net_device *dev,
26197 +
26198 + static int prism2_ioctl_siwpower(struct net_device *dev,
26199 + struct iw_request_info *info,
26200 +- struct iw_param *wrq, char *extra)
26201 ++ union iwreq_data *wrqu, char *extra)
26202 + {
26203 + #ifdef PRISM2_NO_STATION_MODES
26204 + return -EOPNOTSUPP;
26205 + #else /* PRISM2_NO_STATION_MODES */
26206 ++ struct iw_param *wrq = &wrqu->power;
26207 + int ret = 0;
26208 +
26209 + if (wrq->disabled)
26210 +@@ -1291,11 +1315,12 @@ static int prism2_ioctl_siwpower(struct net_device *dev,
26211 +
26212 + static int prism2_ioctl_giwpower(struct net_device *dev,
26213 + struct iw_request_info *info,
26214 +- struct iw_param *rrq, char *extra)
26215 ++ union iwreq_data *wrqu, char *extra)
26216 + {
26217 + #ifdef PRISM2_NO_STATION_MODES
26218 + return -EOPNOTSUPP;
26219 + #else /* PRISM2_NO_STATION_MODES */
26220 ++ struct iw_param *rrq = &wrqu->power;
26221 + struct hostap_interface *iface;
26222 + local_info_t *local;
26223 + __le16 enable, mcast;
26224 +@@ -1349,8 +1374,9 @@ static int prism2_ioctl_giwpower(struct net_device *dev,
26225 +
26226 + static int prism2_ioctl_siwretry(struct net_device *dev,
26227 + struct iw_request_info *info,
26228 +- struct iw_param *rrq, char *extra)
26229 ++ union iwreq_data *wrqu, char *extra)
26230 + {
26231 ++ struct iw_param *rrq = &wrqu->bitrate;
26232 + struct hostap_interface *iface;
26233 + local_info_t *local;
26234 +
26235 +@@ -1410,8 +1436,9 @@ static int prism2_ioctl_siwretry(struct net_device *dev,
26236 +
26237 + static int prism2_ioctl_giwretry(struct net_device *dev,
26238 + struct iw_request_info *info,
26239 +- struct iw_param *rrq, char *extra)
26240 ++ union iwreq_data *wrqu, char *extra)
26241 + {
26242 ++ struct iw_param *rrq = &wrqu->bitrate;
26243 + struct hostap_interface *iface;
26244 + local_info_t *local;
26245 + __le16 shortretry, longretry, lifetime, altretry;
26246 +@@ -1504,8 +1531,9 @@ static u16 prism2_txpower_dBm_to_hfa386x(int val)
26247 +
26248 + static int prism2_ioctl_siwtxpow(struct net_device *dev,
26249 + struct iw_request_info *info,
26250 +- struct iw_param *rrq, char *extra)
26251 ++ union iwreq_data *wrqu, char *extra)
26252 + {
26253 ++ struct iw_param *rrq = &wrqu->bitrate;
26254 + struct hostap_interface *iface;
26255 + local_info_t *local;
26256 + #ifdef RAW_TXPOWER_SETTING
26257 +@@ -1585,9 +1613,10 @@ static int prism2_ioctl_siwtxpow(struct net_device *dev,
26258 +
26259 + static int prism2_ioctl_giwtxpow(struct net_device *dev,
26260 + struct iw_request_info *info,
26261 +- struct iw_param *rrq, char *extra)
26262 ++ union iwreq_data *wrqu, char *extra)
26263 + {
26264 + #ifdef RAW_TXPOWER_SETTING
26265 ++ struct iw_param *rrq = &wrqu->bitrate;
26266 + struct hostap_interface *iface;
26267 + local_info_t *local;
26268 + u16 resp0;
26269 +@@ -1720,8 +1749,9 @@ static inline int prism2_request_scan(struct net_device *dev)
26270 +
26271 + static int prism2_ioctl_siwscan(struct net_device *dev,
26272 + struct iw_request_info *info,
26273 +- struct iw_point *data, char *extra)
26274 ++ union iwreq_data *wrqu, char *extra)
26275 + {
26276 ++ struct iw_point *data = &wrqu->data;
26277 + struct hostap_interface *iface;
26278 + local_info_t *local;
26279 + int ret;
26280 +@@ -2068,8 +2098,9 @@ static inline int prism2_ioctl_giwscan_sta(struct net_device *dev,
26281 +
26282 + static int prism2_ioctl_giwscan(struct net_device *dev,
26283 + struct iw_request_info *info,
26284 +- struct iw_point *data, char *extra)
26285 ++ union iwreq_data *wrqu, char *extra)
26286 + {
26287 ++ struct iw_point *data = &wrqu->data;
26288 + struct hostap_interface *iface;
26289 + local_info_t *local;
26290 + int res;
26291 +@@ -2314,7 +2345,7 @@ static int prism2_ioctl_priv_inquire(struct net_device *dev, int *i)
26292 +
26293 + static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
26294 + struct iw_request_info *info,
26295 +- void *wrqu, char *extra)
26296 ++ union iwreq_data *wrqu, char *extra)
26297 + {
26298 + struct hostap_interface *iface;
26299 + local_info_t *local;
26300 +@@ -2665,7 +2696,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
26301 +
26302 + static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
26303 + struct iw_request_info *info,
26304 +- void *wrqu, char *extra)
26305 ++ union iwreq_data *wrqu, char *extra)
26306 + {
26307 + struct hostap_interface *iface;
26308 + local_info_t *local;
26309 +@@ -2852,7 +2883,7 @@ static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
26310 +
26311 + static int prism2_ioctl_priv_readmif(struct net_device *dev,
26312 + struct iw_request_info *info,
26313 +- void *wrqu, char *extra)
26314 ++ union iwreq_data *wrqu, char *extra)
26315 + {
26316 + struct hostap_interface *iface;
26317 + local_info_t *local;
26318 +@@ -2873,7 +2904,7 @@ static int prism2_ioctl_priv_readmif(struct net_device *dev,
26319 +
26320 + static int prism2_ioctl_priv_writemif(struct net_device *dev,
26321 + struct iw_request_info *info,
26322 +- void *wrqu, char *extra)
26323 ++ union iwreq_data *wrqu, char *extra)
26324 + {
26325 + struct hostap_interface *iface;
26326 + local_info_t *local;
26327 +@@ -2911,7 +2942,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
26328 + /* Disable monitor mode - old mode was not saved, so go to
26329 + * Master mode */
26330 + mode = IW_MODE_MASTER;
26331 +- ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
26332 ++ ret = prism2_ioctl_siwmode(dev, NULL, (union iwreq_data *)&mode, NULL);
26333 + } else if (*i == 1) {
26334 + /* netlink socket mode is not supported anymore since it did
26335 + * not separate different devices from each other and was not
26336 +@@ -2928,7 +2959,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
26337 + break;
26338 + }
26339 + mode = IW_MODE_MONITOR;
26340 +- ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
26341 ++ ret = prism2_ioctl_siwmode(dev, NULL, (union iwreq_data *)&mode, NULL);
26342 + hostap_monitor_mode_enable(local);
26343 + } else
26344 + ret = -EINVAL;
26345 +@@ -3094,8 +3125,9 @@ static int prism2_set_genericelement(struct net_device *dev, u8 *elem,
26346 +
26347 + static int prism2_ioctl_siwauth(struct net_device *dev,
26348 + struct iw_request_info *info,
26349 +- struct iw_param *data, char *extra)
26350 ++ union iwreq_data *wrqu, char *extra)
26351 + {
26352 ++ struct iw_param *data = &wrqu->param;
26353 + struct hostap_interface *iface = netdev_priv(dev);
26354 + local_info_t *local = iface->local;
26355 +
26356 +@@ -3160,8 +3192,9 @@ static int prism2_ioctl_siwauth(struct net_device *dev,
26357 +
26358 + static int prism2_ioctl_giwauth(struct net_device *dev,
26359 + struct iw_request_info *info,
26360 +- struct iw_param *data, char *extra)
26361 ++ union iwreq_data *wrqu, char *extra)
26362 + {
26363 ++ struct iw_param *data = &wrqu->param;
26364 + struct hostap_interface *iface = netdev_priv(dev);
26365 + local_info_t *local = iface->local;
26366 +
26367 +@@ -3199,8 +3232,9 @@ static int prism2_ioctl_giwauth(struct net_device *dev,
26368 +
26369 + static int prism2_ioctl_siwencodeext(struct net_device *dev,
26370 + struct iw_request_info *info,
26371 +- struct iw_point *erq, char *extra)
26372 ++ union iwreq_data *wrqu, char *extra)
26373 + {
26374 ++ struct iw_point *erq = &wrqu->encoding;
26375 + struct hostap_interface *iface = netdev_priv(dev);
26376 + local_info_t *local = iface->local;
26377 + struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
26378 +@@ -3373,8 +3407,9 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
26379 +
26380 + static int prism2_ioctl_giwencodeext(struct net_device *dev,
26381 + struct iw_request_info *info,
26382 +- struct iw_point *erq, char *extra)
26383 ++ union iwreq_data *wrqu, char *extra)
26384 + {
26385 ++ struct iw_point *erq = &wrqu->encoding;
26386 + struct hostap_interface *iface = netdev_priv(dev);
26387 + local_info_t *local = iface->local;
26388 + struct lib80211_crypt_data **crypt;
26389 +@@ -3681,16 +3716,19 @@ static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local,
26390 +
26391 + static int prism2_ioctl_siwgenie(struct net_device *dev,
26392 + struct iw_request_info *info,
26393 +- struct iw_point *data, char *extra)
26394 ++ union iwreq_data *wrqu, char *extra)
26395 + {
26396 ++ struct iw_point *data = &wrqu->data;
26397 ++
26398 + return prism2_set_genericelement(dev, extra, data->length);
26399 + }
26400 +
26401 +
26402 + static int prism2_ioctl_giwgenie(struct net_device *dev,
26403 + struct iw_request_info *info,
26404 +- struct iw_point *data, char *extra)
26405 ++ union iwreq_data *wrqu, char *extra)
26406 + {
26407 ++ struct iw_point *data = &wrqu->data;
26408 + struct hostap_interface *iface = netdev_priv(dev);
26409 + local_info_t *local = iface->local;
26410 + int len = local->generic_elem_len - 2;
26411 +@@ -3728,7 +3766,7 @@ static int prism2_ioctl_set_generic_element(local_info_t *local,
26412 +
26413 + static int prism2_ioctl_siwmlme(struct net_device *dev,
26414 + struct iw_request_info *info,
26415 +- struct iw_point *data, char *extra)
26416 ++ union iwreq_data *data, char *extra)
26417 + {
26418 + struct hostap_interface *iface = netdev_priv(dev);
26419 + local_info_t *local = iface->local;
26420 +@@ -3943,10 +3981,10 @@ static const iw_handler prism2_handler[] =
26421 +
26422 + static const iw_handler prism2_private_handler[] =
26423 + { /* SIOCIWFIRSTPRIV + */
26424 +- (iw_handler) prism2_ioctl_priv_prism2_param, /* 0 */
26425 +- (iw_handler) prism2_ioctl_priv_get_prism2_param, /* 1 */
26426 +- (iw_handler) prism2_ioctl_priv_writemif, /* 2 */
26427 +- (iw_handler) prism2_ioctl_priv_readmif, /* 3 */
26428 ++ prism2_ioctl_priv_prism2_param, /* 0 */
26429 ++ prism2_ioctl_priv_get_prism2_param, /* 1 */
26430 ++ prism2_ioctl_priv_writemif, /* 2 */
26431 ++ prism2_ioctl_priv_readmif, /* 3 */
26432 + };
26433 +
26434 + const struct iw_handler_def hostap_iw_handler_def =
26435 +diff --git a/drivers/net/wireless/intersil/orinoco/wext.c b/drivers/net/wireless/intersil/orinoco/wext.c
26436 +index 1d4dae4..0508fc1 100644
26437 +--- a/drivers/net/wireless/intersil/orinoco/wext.c
26438 ++++ b/drivers/net/wireless/intersil/orinoco/wext.c
26439 +@@ -154,9 +154,10 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
26440 +
26441 + static int orinoco_ioctl_setwap(struct net_device *dev,
26442 + struct iw_request_info *info,
26443 +- struct sockaddr *ap_addr,
26444 ++ union iwreq_data *wrqu,
26445 + char *extra)
26446 + {
26447 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
26448 + struct orinoco_private *priv = ndev_priv(dev);
26449 + int err = -EINPROGRESS; /* Call commit handler */
26450 + unsigned long flags;
26451 +@@ -213,9 +214,10 @@ static int orinoco_ioctl_setwap(struct net_device *dev,
26452 +
26453 + static int orinoco_ioctl_getwap(struct net_device *dev,
26454 + struct iw_request_info *info,
26455 +- struct sockaddr *ap_addr,
26456 ++ union iwreq_data *wrqu,
26457 + char *extra)
26458 + {
26459 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
26460 + struct orinoco_private *priv = ndev_priv(dev);
26461 +
26462 + int err = 0;
26463 +@@ -234,9 +236,10 @@ static int orinoco_ioctl_getwap(struct net_device *dev,
26464 +
26465 + static int orinoco_ioctl_setiwencode(struct net_device *dev,
26466 + struct iw_request_info *info,
26467 +- struct iw_point *erq,
26468 ++ union iwreq_data *wrqu,
26469 + char *keybuf)
26470 + {
26471 ++ struct iw_point *erq = &wrqu->encoding;
26472 + struct orinoco_private *priv = ndev_priv(dev);
26473 + int index = (erq->flags & IW_ENCODE_INDEX) - 1;
26474 + int setindex = priv->tx_key;
26475 +@@ -325,9 +328,10 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
26476 +
26477 + static int orinoco_ioctl_getiwencode(struct net_device *dev,
26478 + struct iw_request_info *info,
26479 +- struct iw_point *erq,
26480 ++ union iwreq_data *wrqu,
26481 + char *keybuf)
26482 + {
26483 ++ struct iw_point *erq = &wrqu->encoding;
26484 + struct orinoco_private *priv = ndev_priv(dev);
26485 + int index = (erq->flags & IW_ENCODE_INDEX) - 1;
26486 + unsigned long flags;
26487 +@@ -361,9 +365,10 @@ static int orinoco_ioctl_getiwencode(struct net_device *dev,
26488 +
26489 + static int orinoco_ioctl_setessid(struct net_device *dev,
26490 + struct iw_request_info *info,
26491 +- struct iw_point *erq,
26492 ++ union iwreq_data *wrqu,
26493 + char *essidbuf)
26494 + {
26495 ++ struct iw_point *erq = &wrqu->essid;
26496 + struct orinoco_private *priv = ndev_priv(dev);
26497 + unsigned long flags;
26498 +
26499 +@@ -392,9 +397,10 @@ static int orinoco_ioctl_setessid(struct net_device *dev,
26500 +
26501 + static int orinoco_ioctl_getessid(struct net_device *dev,
26502 + struct iw_request_info *info,
26503 +- struct iw_point *erq,
26504 ++ union iwreq_data *wrqu,
26505 + char *essidbuf)
26506 + {
26507 ++ struct iw_point *erq = &wrqu->essid;
26508 + struct orinoco_private *priv = ndev_priv(dev);
26509 + int active;
26510 + int err = 0;
26511 +@@ -420,9 +426,10 @@ static int orinoco_ioctl_getessid(struct net_device *dev,
26512 +
26513 + static int orinoco_ioctl_setfreq(struct net_device *dev,
26514 + struct iw_request_info *info,
26515 +- struct iw_freq *frq,
26516 ++ union iwreq_data *wrqu,
26517 + char *extra)
26518 + {
26519 ++ struct iw_freq *frq = &wrqu->freq;
26520 + struct orinoco_private *priv = ndev_priv(dev);
26521 + int chan = -1;
26522 + unsigned long flags;
26523 +@@ -469,9 +476,10 @@ static int orinoco_ioctl_setfreq(struct net_device *dev,
26524 +
26525 + static int orinoco_ioctl_getfreq(struct net_device *dev,
26526 + struct iw_request_info *info,
26527 +- struct iw_freq *frq,
26528 ++ union iwreq_data *wrqu,
26529 + char *extra)
26530 + {
26531 ++ struct iw_freq *frq = &wrqu->freq;
26532 + struct orinoco_private *priv = ndev_priv(dev);
26533 + int tmp;
26534 +
26535 +@@ -488,9 +496,10 @@ static int orinoco_ioctl_getfreq(struct net_device *dev,
26536 +
26537 + static int orinoco_ioctl_getsens(struct net_device *dev,
26538 + struct iw_request_info *info,
26539 +- struct iw_param *srq,
26540 ++ union iwreq_data *wrqu,
26541 + char *extra)
26542 + {
26543 ++ struct iw_param *srq = &wrqu->sens;
26544 + struct orinoco_private *priv = ndev_priv(dev);
26545 + struct hermes *hw = &priv->hw;
26546 + u16 val;
26547 +@@ -517,9 +526,10 @@ static int orinoco_ioctl_getsens(struct net_device *dev,
26548 +
26549 + static int orinoco_ioctl_setsens(struct net_device *dev,
26550 + struct iw_request_info *info,
26551 +- struct iw_param *srq,
26552 ++ union iwreq_data *wrqu,
26553 + char *extra)
26554 + {
26555 ++ struct iw_param *srq = &wrqu->sens;
26556 + struct orinoco_private *priv = ndev_priv(dev);
26557 + int val = srq->value;
26558 + unsigned long flags;
26559 +@@ -540,9 +550,10 @@ static int orinoco_ioctl_setsens(struct net_device *dev,
26560 +
26561 + static int orinoco_ioctl_setrate(struct net_device *dev,
26562 + struct iw_request_info *info,
26563 +- struct iw_param *rrq,
26564 ++ union iwreq_data *wrqu,
26565 + char *extra)
26566 + {
26567 ++ struct iw_param *rrq = &wrqu->bitrate;
26568 + struct orinoco_private *priv = ndev_priv(dev);
26569 + int ratemode;
26570 + int bitrate; /* 100s of kilobits */
26571 +@@ -574,9 +585,10 @@ static int orinoco_ioctl_setrate(struct net_device *dev,
26572 +
26573 + static int orinoco_ioctl_getrate(struct net_device *dev,
26574 + struct iw_request_info *info,
26575 +- struct iw_param *rrq,
26576 ++ union iwreq_data *wrqu,
26577 + char *extra)
26578 + {
26579 ++ struct iw_param *rrq = &wrqu->bitrate;
26580 + struct orinoco_private *priv = ndev_priv(dev);
26581 + int err = 0;
26582 + int bitrate, automatic;
26583 +@@ -610,9 +622,10 @@ static int orinoco_ioctl_getrate(struct net_device *dev,
26584 +
26585 + static int orinoco_ioctl_setpower(struct net_device *dev,
26586 + struct iw_request_info *info,
26587 +- struct iw_param *prq,
26588 ++ union iwreq_data *wrqu,
26589 + char *extra)
26590 + {
26591 ++ struct iw_param *prq = &wrqu->power;
26592 + struct orinoco_private *priv = ndev_priv(dev);
26593 + int err = -EINPROGRESS; /* Call commit handler */
26594 + unsigned long flags;
26595 +@@ -664,9 +677,10 @@ static int orinoco_ioctl_setpower(struct net_device *dev,
26596 +
26597 + static int orinoco_ioctl_getpower(struct net_device *dev,
26598 + struct iw_request_info *info,
26599 +- struct iw_param *prq,
26600 ++ union iwreq_data *wrqu,
26601 + char *extra)
26602 + {
26603 ++ struct iw_param *prq = &wrqu->power;
26604 + struct orinoco_private *priv = ndev_priv(dev);
26605 + struct hermes *hw = &priv->hw;
26606 + int err = 0;
26607 +@@ -1097,7 +1111,7 @@ static int orinoco_ioctl_set_mlme(struct net_device *dev,
26608 +
26609 + static int orinoco_ioctl_reset(struct net_device *dev,
26610 + struct iw_request_info *info,
26611 +- void *wrqu,
26612 ++ union iwreq_data *wrqu,
26613 + char *extra)
26614 + {
26615 + struct orinoco_private *priv = ndev_priv(dev);
26616 +@@ -1121,7 +1135,7 @@ static int orinoco_ioctl_reset(struct net_device *dev,
26617 +
26618 + static int orinoco_ioctl_setibssport(struct net_device *dev,
26619 + struct iw_request_info *info,
26620 +- void *wrqu,
26621 ++ union iwreq_data *wrqu,
26622 + char *extra)
26623 +
26624 + {
26625 +@@ -1143,7 +1157,7 @@ static int orinoco_ioctl_setibssport(struct net_device *dev,
26626 +
26627 + static int orinoco_ioctl_getibssport(struct net_device *dev,
26628 + struct iw_request_info *info,
26629 +- void *wrqu,
26630 ++ union iwreq_data *wrqu,
26631 + char *extra)
26632 + {
26633 + struct orinoco_private *priv = ndev_priv(dev);
26634 +@@ -1155,7 +1169,7 @@ static int orinoco_ioctl_getibssport(struct net_device *dev,
26635 +
26636 + static int orinoco_ioctl_setport3(struct net_device *dev,
26637 + struct iw_request_info *info,
26638 +- void *wrqu,
26639 ++ union iwreq_data *wrqu,
26640 + char *extra)
26641 + {
26642 + struct orinoco_private *priv = ndev_priv(dev);
26643 +@@ -1201,7 +1215,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
26644 +
26645 + static int orinoco_ioctl_getport3(struct net_device *dev,
26646 + struct iw_request_info *info,
26647 +- void *wrqu,
26648 ++ union iwreq_data *wrqu,
26649 + char *extra)
26650 + {
26651 + struct orinoco_private *priv = ndev_priv(dev);
26652 +@@ -1213,7 +1227,7 @@ static int orinoco_ioctl_getport3(struct net_device *dev,
26653 +
26654 + static int orinoco_ioctl_setpreamble(struct net_device *dev,
26655 + struct iw_request_info *info,
26656 +- void *wrqu,
26657 ++ union iwreq_data *wrqu,
26658 + char *extra)
26659 + {
26660 + struct orinoco_private *priv = ndev_priv(dev);
26661 +@@ -1245,7 +1259,7 @@ static int orinoco_ioctl_setpreamble(struct net_device *dev,
26662 +
26663 + static int orinoco_ioctl_getpreamble(struct net_device *dev,
26664 + struct iw_request_info *info,
26665 +- void *wrqu,
26666 ++ union iwreq_data *wrqu,
26667 + char *extra)
26668 + {
26669 + struct orinoco_private *priv = ndev_priv(dev);
26670 +@@ -1265,9 +1279,10 @@ static int orinoco_ioctl_getpreamble(struct net_device *dev,
26671 + * For Wireless Tools 25 and 26 append "dummy" are the end. */
26672 + static int orinoco_ioctl_getrid(struct net_device *dev,
26673 + struct iw_request_info *info,
26674 +- struct iw_point *data,
26675 ++ union iwreq_data *wrqu,
26676 + char *extra)
26677 + {
26678 ++ struct iw_point *data = &wrqu->data;
26679 + struct orinoco_private *priv = ndev_priv(dev);
26680 + struct hermes *hw = &priv->hw;
26681 + int rid = data->flags;
26682 +@@ -1303,7 +1318,7 @@ static int orinoco_ioctl_getrid(struct net_device *dev,
26683 + /* Commit handler, called after set operations */
26684 + static int orinoco_ioctl_commit(struct net_device *dev,
26685 + struct iw_request_info *info,
26686 +- void *wrqu,
26687 ++ union iwreq_data *wrqu,
26688 + char *extra)
26689 + {
26690 + struct orinoco_private *priv = ndev_priv(dev);
26691 +@@ -1347,36 +1362,36 @@ static const struct iw_priv_args orinoco_privtab[] = {
26692 + */
26693 +
26694 + static const iw_handler orinoco_handler[] = {
26695 +- IW_HANDLER(SIOCSIWCOMMIT, (iw_handler)orinoco_ioctl_commit),
26696 +- IW_HANDLER(SIOCGIWNAME, (iw_handler)cfg80211_wext_giwname),
26697 +- IW_HANDLER(SIOCSIWFREQ, (iw_handler)orinoco_ioctl_setfreq),
26698 +- IW_HANDLER(SIOCGIWFREQ, (iw_handler)orinoco_ioctl_getfreq),
26699 +- IW_HANDLER(SIOCSIWMODE, (iw_handler)cfg80211_wext_siwmode),
26700 +- IW_HANDLER(SIOCGIWMODE, (iw_handler)cfg80211_wext_giwmode),
26701 +- IW_HANDLER(SIOCSIWSENS, (iw_handler)orinoco_ioctl_setsens),
26702 +- IW_HANDLER(SIOCGIWSENS, (iw_handler)orinoco_ioctl_getsens),
26703 +- IW_HANDLER(SIOCGIWRANGE, (iw_handler)cfg80211_wext_giwrange),
26704 ++ IW_HANDLER(SIOCSIWCOMMIT, orinoco_ioctl_commit),
26705 ++ IW_HANDLER(SIOCGIWNAME, cfg80211_wext_giwname),
26706 ++ IW_HANDLER(SIOCSIWFREQ, orinoco_ioctl_setfreq),
26707 ++ IW_HANDLER(SIOCGIWFREQ, orinoco_ioctl_getfreq),
26708 ++ IW_HANDLER(SIOCSIWMODE, cfg80211_wext_siwmode),
26709 ++ IW_HANDLER(SIOCGIWMODE, cfg80211_wext_giwmode),
26710 ++ IW_HANDLER(SIOCSIWSENS, orinoco_ioctl_setsens),
26711 ++ IW_HANDLER(SIOCGIWSENS, orinoco_ioctl_getsens),
26712 ++ IW_HANDLER(SIOCGIWRANGE, cfg80211_wext_giwrange),
26713 + IW_HANDLER(SIOCSIWSPY, iw_handler_set_spy),
26714 + IW_HANDLER(SIOCGIWSPY, iw_handler_get_spy),
26715 + IW_HANDLER(SIOCSIWTHRSPY, iw_handler_set_thrspy),
26716 + IW_HANDLER(SIOCGIWTHRSPY, iw_handler_get_thrspy),
26717 +- IW_HANDLER(SIOCSIWAP, (iw_handler)orinoco_ioctl_setwap),
26718 +- IW_HANDLER(SIOCGIWAP, (iw_handler)orinoco_ioctl_getwap),
26719 +- IW_HANDLER(SIOCSIWSCAN, (iw_handler)cfg80211_wext_siwscan),
26720 +- IW_HANDLER(SIOCGIWSCAN, (iw_handler)cfg80211_wext_giwscan),
26721 +- IW_HANDLER(SIOCSIWESSID, (iw_handler)orinoco_ioctl_setessid),
26722 +- IW_HANDLER(SIOCGIWESSID, (iw_handler)orinoco_ioctl_getessid),
26723 +- IW_HANDLER(SIOCSIWRATE, (iw_handler)orinoco_ioctl_setrate),
26724 +- IW_HANDLER(SIOCGIWRATE, (iw_handler)orinoco_ioctl_getrate),
26725 +- IW_HANDLER(SIOCSIWRTS, (iw_handler)cfg80211_wext_siwrts),
26726 +- IW_HANDLER(SIOCGIWRTS, (iw_handler)cfg80211_wext_giwrts),
26727 +- IW_HANDLER(SIOCSIWFRAG, (iw_handler)cfg80211_wext_siwfrag),
26728 +- IW_HANDLER(SIOCGIWFRAG, (iw_handler)cfg80211_wext_giwfrag),
26729 +- IW_HANDLER(SIOCGIWRETRY, (iw_handler)cfg80211_wext_giwretry),
26730 +- IW_HANDLER(SIOCSIWENCODE, (iw_handler)orinoco_ioctl_setiwencode),
26731 +- IW_HANDLER(SIOCGIWENCODE, (iw_handler)orinoco_ioctl_getiwencode),
26732 +- IW_HANDLER(SIOCSIWPOWER, (iw_handler)orinoco_ioctl_setpower),
26733 +- IW_HANDLER(SIOCGIWPOWER, (iw_handler)orinoco_ioctl_getpower),
26734 ++ IW_HANDLER(SIOCSIWAP, orinoco_ioctl_setwap),
26735 ++ IW_HANDLER(SIOCGIWAP, orinoco_ioctl_getwap),
26736 ++ IW_HANDLER(SIOCSIWSCAN, cfg80211_wext_siwscan),
26737 ++ IW_HANDLER(SIOCGIWSCAN, cfg80211_wext_giwscan),
26738 ++ IW_HANDLER(SIOCSIWESSID, orinoco_ioctl_setessid),
26739 ++ IW_HANDLER(SIOCGIWESSID, orinoco_ioctl_getessid),
26740 ++ IW_HANDLER(SIOCSIWRATE, orinoco_ioctl_setrate),
26741 ++ IW_HANDLER(SIOCGIWRATE, orinoco_ioctl_getrate),
26742 ++ IW_HANDLER(SIOCSIWRTS, cfg80211_wext_siwrts),
26743 ++ IW_HANDLER(SIOCGIWRTS, cfg80211_wext_giwrts),
26744 ++ IW_HANDLER(SIOCSIWFRAG, cfg80211_wext_siwfrag),
26745 ++ IW_HANDLER(SIOCGIWFRAG, cfg80211_wext_giwfrag),
26746 ++ IW_HANDLER(SIOCGIWRETRY, cfg80211_wext_giwretry),
26747 ++ IW_HANDLER(SIOCSIWENCODE, orinoco_ioctl_setiwencode),
26748 ++ IW_HANDLER(SIOCGIWENCODE, orinoco_ioctl_getiwencode),
26749 ++ IW_HANDLER(SIOCSIWPOWER, orinoco_ioctl_setpower),
26750 ++ IW_HANDLER(SIOCGIWPOWER, orinoco_ioctl_getpower),
26751 + IW_HANDLER(SIOCSIWGENIE, orinoco_ioctl_set_genie),
26752 + IW_HANDLER(SIOCGIWGENIE, orinoco_ioctl_get_genie),
26753 + IW_HANDLER(SIOCSIWMLME, orinoco_ioctl_set_mlme),
26754 +@@ -1391,15 +1406,15 @@ static const iw_handler orinoco_handler[] = {
26755 + Added typecasting since we no longer use iwreq_data -- Moustafa
26756 + */
26757 + static const iw_handler orinoco_private_handler[] = {
26758 +- [0] = (iw_handler)orinoco_ioctl_reset,
26759 +- [1] = (iw_handler)orinoco_ioctl_reset,
26760 +- [2] = (iw_handler)orinoco_ioctl_setport3,
26761 +- [3] = (iw_handler)orinoco_ioctl_getport3,
26762 +- [4] = (iw_handler)orinoco_ioctl_setpreamble,
26763 +- [5] = (iw_handler)orinoco_ioctl_getpreamble,
26764 +- [6] = (iw_handler)orinoco_ioctl_setibssport,
26765 +- [7] = (iw_handler)orinoco_ioctl_getibssport,
26766 +- [9] = (iw_handler)orinoco_ioctl_getrid,
26767 ++ [0] = orinoco_ioctl_reset,
26768 ++ [1] = orinoco_ioctl_reset,
26769 ++ [2] = orinoco_ioctl_setport3,
26770 ++ [3] = orinoco_ioctl_getport3,
26771 ++ [4] = orinoco_ioctl_setpreamble,
26772 ++ [5] = orinoco_ioctl_getpreamble,
26773 ++ [6] = orinoco_ioctl_setibssport,
26774 ++ [7] = orinoco_ioctl_getibssport,
26775 ++ [9] = orinoco_ioctl_getrid,
26776 + };
26777 +
26778 + const struct iw_handler_def orinoco_handler_def = {
26779 +diff --git a/drivers/net/wireless/intersil/prism54/isl_ioctl.c b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
26780 +index 48e8a97..3499ec8 100644
26781 +--- a/drivers/net/wireless/intersil/prism54/isl_ioctl.c
26782 ++++ b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
26783 +@@ -45,7 +45,7 @@ static void prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
26784 + u8 *wpa_ie, size_t wpa_ie_len);
26785 + static size_t prism54_wpa_bss_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie);
26786 + static int prism54_set_wpa(struct net_device *, struct iw_request_info *,
26787 +- __u32 *, char *);
26788 ++ union iwreq_data *, char *);
26789 +
26790 + /* In 500 kbps */
26791 + static const unsigned char scan_rate_list[] = { 2, 4, 11, 22,
26792 +@@ -240,7 +240,7 @@ prism54_get_wireless_stats(struct net_device *ndev)
26793 +
26794 + static int
26795 + prism54_commit(struct net_device *ndev, struct iw_request_info *info,
26796 +- char *cwrq, char *extra)
26797 ++ union iwreq_data *cwrq, char *extra)
26798 + {
26799 + islpci_private *priv = netdev_priv(ndev);
26800 +
26801 +@@ -256,8 +256,9 @@ prism54_commit(struct net_device *ndev, struct iw_request_info *info,
26802 +
26803 + static int
26804 + prism54_get_name(struct net_device *ndev, struct iw_request_info *info,
26805 +- char *cwrq, char *extra)
26806 ++ union iwreq_data *wrqu, char *extra)
26807 + {
26808 ++ char *cwrq = wrqu->name;
26809 + islpci_private *priv = netdev_priv(ndev);
26810 + char *capabilities;
26811 + union oid_res_t r;
26812 +@@ -287,8 +288,9 @@ prism54_get_name(struct net_device *ndev, struct iw_request_info *info,
26813 +
26814 + static int
26815 + prism54_set_freq(struct net_device *ndev, struct iw_request_info *info,
26816 +- struct iw_freq *fwrq, char *extra)
26817 ++ union iwreq_data *wrqu, char *extra)
26818 + {
26819 ++ struct iw_freq *fwrq = &wrqu->freq;
26820 + islpci_private *priv = netdev_priv(ndev);
26821 + int rvalue;
26822 + u32 c;
26823 +@@ -307,8 +309,9 @@ prism54_set_freq(struct net_device *ndev, struct iw_request_info *info,
26824 +
26825 + static int
26826 + prism54_get_freq(struct net_device *ndev, struct iw_request_info *info,
26827 +- struct iw_freq *fwrq, char *extra)
26828 ++ union iwreq_data *wrqu, char *extra)
26829 + {
26830 ++ struct iw_freq *fwrq = &wrqu->freq;
26831 + islpci_private *priv = netdev_priv(ndev);
26832 + union oid_res_t r;
26833 + int rvalue;
26834 +@@ -324,8 +327,9 @@ prism54_get_freq(struct net_device *ndev, struct iw_request_info *info,
26835 +
26836 + static int
26837 + prism54_set_mode(struct net_device *ndev, struct iw_request_info *info,
26838 +- __u32 * uwrq, char *extra)
26839 ++ union iwreq_data *wrqu, char *extra)
26840 + {
26841 ++ __u32 *uwrq = &wrqu->mode;
26842 + islpci_private *priv = netdev_priv(ndev);
26843 + u32 mlmeautolevel = CARD_DEFAULT_MLME_MODE;
26844 +
26845 +@@ -368,8 +372,9 @@ prism54_set_mode(struct net_device *ndev, struct iw_request_info *info,
26846 + /* Use mib cache */
26847 + static int
26848 + prism54_get_mode(struct net_device *ndev, struct iw_request_info *info,
26849 +- __u32 * uwrq, char *extra)
26850 ++ union iwreq_data *wrqu, char *extra)
26851 + {
26852 ++ __u32 *uwrq = &wrqu->mode;
26853 + islpci_private *priv = netdev_priv(ndev);
26854 +
26855 + BUG_ON((priv->iw_mode < IW_MODE_AUTO) || (priv->iw_mode >
26856 +@@ -386,8 +391,9 @@ prism54_get_mode(struct net_device *ndev, struct iw_request_info *info,
26857 +
26858 + static int
26859 + prism54_set_sens(struct net_device *ndev, struct iw_request_info *info,
26860 +- struct iw_param *vwrq, char *extra)
26861 ++ union iwreq_data *wrqu, char *extra)
26862 + {
26863 ++ struct iw_param *vwrq = &wrqu->sens;
26864 + islpci_private *priv = netdev_priv(ndev);
26865 + u32 sens;
26866 +
26867 +@@ -399,8 +405,9 @@ prism54_set_sens(struct net_device *ndev, struct iw_request_info *info,
26868 +
26869 + static int
26870 + prism54_get_sens(struct net_device *ndev, struct iw_request_info *info,
26871 +- struct iw_param *vwrq, char *extra)
26872 ++ union iwreq_data *wrqu, char *extra)
26873 + {
26874 ++ struct iw_param *vwrq = &wrqu->sens;
26875 + islpci_private *priv = netdev_priv(ndev);
26876 + union oid_res_t r;
26877 + int rvalue;
26878 +@@ -416,8 +423,9 @@ prism54_get_sens(struct net_device *ndev, struct iw_request_info *info,
26879 +
26880 + static int
26881 + prism54_get_range(struct net_device *ndev, struct iw_request_info *info,
26882 +- struct iw_point *dwrq, char *extra)
26883 ++ union iwreq_data *wrqu, char *extra)
26884 + {
26885 ++ struct iw_point *dwrq = &wrqu->data;
26886 + struct iw_range *range = (struct iw_range *) extra;
26887 + islpci_private *priv = netdev_priv(ndev);
26888 + u8 *data;
26889 +@@ -521,8 +529,9 @@ prism54_get_range(struct net_device *ndev, struct iw_request_info *info,
26890 +
26891 + static int
26892 + prism54_set_wap(struct net_device *ndev, struct iw_request_info *info,
26893 +- struct sockaddr *awrq, char *extra)
26894 ++ union iwreq_data *wrqu, char *extra)
26895 + {
26896 ++ struct sockaddr *awrq = &wrqu->ap_addr;
26897 + islpci_private *priv = netdev_priv(ndev);
26898 + char bssid[6];
26899 + int rvalue;
26900 +@@ -543,8 +552,9 @@ prism54_set_wap(struct net_device *ndev, struct iw_request_info *info,
26901 +
26902 + static int
26903 + prism54_get_wap(struct net_device *ndev, struct iw_request_info *info,
26904 +- struct sockaddr *awrq, char *extra)
26905 ++ union iwreq_data *wrqu, char *extra)
26906 + {
26907 ++ struct sockaddr *awrq = &wrqu->ap_addr;
26908 + islpci_private *priv = netdev_priv(ndev);
26909 + union oid_res_t r;
26910 + int rvalue;
26911 +@@ -559,7 +569,7 @@ prism54_get_wap(struct net_device *ndev, struct iw_request_info *info,
26912 +
26913 + static int
26914 + prism54_set_scan(struct net_device *dev, struct iw_request_info *info,
26915 +- struct iw_param *vwrq, char *extra)
26916 ++ union iwreq_data *vwrq, char *extra)
26917 + {
26918 + /* hehe the device does this automagicaly */
26919 + return 0;
26920 +@@ -679,8 +689,9 @@ prism54_translate_bss(struct net_device *ndev, struct iw_request_info *info,
26921 +
26922 + static int
26923 + prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
26924 +- struct iw_point *dwrq, char *extra)
26925 ++ union iwreq_data *wrqu, char *extra)
26926 + {
26927 ++ struct iw_point *dwrq = &wrqu->data;
26928 + islpci_private *priv = netdev_priv(ndev);
26929 + int i, rvalue;
26930 + struct obj_bsslist *bsslist;
26931 +@@ -733,8 +744,9 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
26932 +
26933 + static int
26934 + prism54_set_essid(struct net_device *ndev, struct iw_request_info *info,
26935 +- struct iw_point *dwrq, char *extra)
26936 ++ union iwreq_data *wrqu, char *extra)
26937 + {
26938 ++ struct iw_point *dwrq = &wrqu->data;
26939 + islpci_private *priv = netdev_priv(ndev);
26940 + struct obj_ssid essid;
26941 +
26942 +@@ -760,8 +772,9 @@ prism54_set_essid(struct net_device *ndev, struct iw_request_info *info,
26943 +
26944 + static int
26945 + prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
26946 +- struct iw_point *dwrq, char *extra)
26947 ++ union iwreq_data *wrqu, char *extra)
26948 + {
26949 ++ struct iw_point *dwrq = &wrqu->data;
26950 + islpci_private *priv = netdev_priv(ndev);
26951 + struct obj_ssid *essid;
26952 + union oid_res_t r;
26953 +@@ -790,8 +803,9 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
26954 + */
26955 + static int
26956 + prism54_set_nick(struct net_device *ndev, struct iw_request_info *info,
26957 +- struct iw_point *dwrq, char *extra)
26958 ++ union iwreq_data *wrqu, char *extra)
26959 + {
26960 ++ struct iw_point *dwrq = &wrqu->data;
26961 + islpci_private *priv = netdev_priv(ndev);
26962 +
26963 + if (dwrq->length > IW_ESSID_MAX_SIZE)
26964 +@@ -807,8 +821,9 @@ prism54_set_nick(struct net_device *ndev, struct iw_request_info *info,
26965 +
26966 + static int
26967 + prism54_get_nick(struct net_device *ndev, struct iw_request_info *info,
26968 +- struct iw_point *dwrq, char *extra)
26969 ++ union iwreq_data *wrqu, char *extra)
26970 + {
26971 ++ struct iw_point *dwrq = &wrqu->data;
26972 + islpci_private *priv = netdev_priv(ndev);
26973 +
26974 + dwrq->length = 0;
26975 +@@ -826,9 +841,9 @@ prism54_get_nick(struct net_device *ndev, struct iw_request_info *info,
26976 + static int
26977 + prism54_set_rate(struct net_device *ndev,
26978 + struct iw_request_info *info,
26979 +- struct iw_param *vwrq, char *extra)
26980 ++ union iwreq_data *wrqu, char *extra)
26981 + {
26982 +-
26983 ++ struct iw_param *vwrq = &wrqu->bitrate;
26984 + islpci_private *priv = netdev_priv(ndev);
26985 + u32 rate, profile;
26986 + char *data;
26987 +@@ -899,8 +914,9 @@ prism54_set_rate(struct net_device *ndev,
26988 + static int
26989 + prism54_get_rate(struct net_device *ndev,
26990 + struct iw_request_info *info,
26991 +- struct iw_param *vwrq, char *extra)
26992 ++ union iwreq_data *wrqu, char *extra)
26993 + {
26994 ++ struct iw_param *vwrq = &wrqu->bitrate;
26995 + islpci_private *priv = netdev_priv(ndev);
26996 + int rvalue;
26997 + char *data;
26998 +@@ -926,8 +942,9 @@ prism54_get_rate(struct net_device *ndev,
26999 +
27000 + static int
27001 + prism54_set_rts(struct net_device *ndev, struct iw_request_info *info,
27002 +- struct iw_param *vwrq, char *extra)
27003 ++ union iwreq_data *wrqu, char *extra)
27004 + {
27005 ++ struct iw_param *vwrq = &wrqu->rts;
27006 + islpci_private *priv = netdev_priv(ndev);
27007 +
27008 + return mgt_set_request(priv, DOT11_OID_RTSTHRESH, 0, &vwrq->value);
27009 +@@ -935,8 +952,9 @@ prism54_set_rts(struct net_device *ndev, struct iw_request_info *info,
27010 +
27011 + static int
27012 + prism54_get_rts(struct net_device *ndev, struct iw_request_info *info,
27013 +- struct iw_param *vwrq, char *extra)
27014 ++ union iwreq_data *wrqu, char *extra)
27015 + {
27016 ++ struct iw_param *vwrq = &wrqu->rts;
27017 + islpci_private *priv = netdev_priv(ndev);
27018 + union oid_res_t r;
27019 + int rvalue;
27020 +@@ -950,8 +968,9 @@ prism54_get_rts(struct net_device *ndev, struct iw_request_info *info,
27021 +
27022 + static int
27023 + prism54_set_frag(struct net_device *ndev, struct iw_request_info *info,
27024 +- struct iw_param *vwrq, char *extra)
27025 ++ union iwreq_data *wrqu, char *extra)
27026 + {
27027 ++ struct iw_param *vwrq = &wrqu->frag;
27028 + islpci_private *priv = netdev_priv(ndev);
27029 +
27030 + return mgt_set_request(priv, DOT11_OID_FRAGTHRESH, 0, &vwrq->value);
27031 +@@ -959,8 +978,9 @@ prism54_set_frag(struct net_device *ndev, struct iw_request_info *info,
27032 +
27033 + static int
27034 + prism54_get_frag(struct net_device *ndev, struct iw_request_info *info,
27035 +- struct iw_param *vwrq, char *extra)
27036 ++ union iwreq_data *wrqu, char *extra)
27037 + {
27038 ++ struct iw_param *vwrq = &wrqu->frag;
27039 + islpci_private *priv = netdev_priv(ndev);
27040 + union oid_res_t r;
27041 + int rvalue;
27042 +@@ -980,8 +1000,9 @@ prism54_get_frag(struct net_device *ndev, struct iw_request_info *info,
27043 +
27044 + static int
27045 + prism54_set_retry(struct net_device *ndev, struct iw_request_info *info,
27046 +- struct iw_param *vwrq, char *extra)
27047 ++ union iwreq_data *wrqu, char *extra)
27048 + {
27049 ++ struct iw_param *vwrq = &wrqu->retry;
27050 + islpci_private *priv = netdev_priv(ndev);
27051 + u32 slimit = 0, llimit = 0; /* short and long limit */
27052 + u32 lifetime = 0;
27053 +@@ -1022,8 +1043,9 @@ prism54_set_retry(struct net_device *ndev, struct iw_request_info *info,
27054 +
27055 + static int
27056 + prism54_get_retry(struct net_device *ndev, struct iw_request_info *info,
27057 +- struct iw_param *vwrq, char *extra)
27058 ++ union iwreq_data *wrqu, char *extra)
27059 + {
27060 ++ struct iw_param *vwrq = &wrqu->retry;
27061 + islpci_private *priv = netdev_priv(ndev);
27062 + union oid_res_t r;
27063 + int rvalue = 0;
27064 +@@ -1054,8 +1076,9 @@ prism54_get_retry(struct net_device *ndev, struct iw_request_info *info,
27065 +
27066 + static int
27067 + prism54_set_encode(struct net_device *ndev, struct iw_request_info *info,
27068 +- struct iw_point *dwrq, char *extra)
27069 ++ union iwreq_data *wrqu, char *extra)
27070 + {
27071 ++ struct iw_point *dwrq = &wrqu->data;
27072 + islpci_private *priv = netdev_priv(ndev);
27073 + int rvalue = 0, force = 0;
27074 + int authen = DOT11_AUTH_OS, invoke = 0, exunencrypt = 0;
27075 +@@ -1155,8 +1178,9 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info,
27076 +
27077 + static int
27078 + prism54_get_encode(struct net_device *ndev, struct iw_request_info *info,
27079 +- struct iw_point *dwrq, char *extra)
27080 ++ union iwreq_data *wrqu, char *extra)
27081 + {
27082 ++ struct iw_point *dwrq = &wrqu->data;
27083 + islpci_private *priv = netdev_priv(ndev);
27084 + struct obj_key *key;
27085 + u32 devindex, index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
27086 +@@ -1203,8 +1227,9 @@ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info,
27087 +
27088 + static int
27089 + prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info,
27090 +- struct iw_param *vwrq, char *extra)
27091 ++ union iwreq_data *wrqu, char *extra)
27092 + {
27093 ++ struct iw_param *vwrq = &wrqu->txpower;
27094 + islpci_private *priv = netdev_priv(ndev);
27095 + union oid_res_t r;
27096 + int rvalue;
27097 +@@ -1223,8 +1248,9 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info,
27098 +
27099 + static int
27100 + prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info,
27101 +- struct iw_param *vwrq, char *extra)
27102 ++ union iwreq_data *wrqu, char *extra)
27103 + {
27104 ++ struct iw_param *vwrq = &wrqu->txpower;
27105 + islpci_private *priv = netdev_priv(ndev);
27106 + s32 u = vwrq->value;
27107 +
27108 +@@ -1249,8 +1275,9 @@ prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info,
27109 +
27110 + static int prism54_set_genie(struct net_device *ndev,
27111 + struct iw_request_info *info,
27112 +- struct iw_point *data, char *extra)
27113 ++ union iwreq_data *wrqu, char *extra)
27114 + {
27115 ++ struct iw_point *data = &wrqu->data;
27116 + islpci_private *priv = netdev_priv(ndev);
27117 + int alen, ret = 0;
27118 + struct obj_attachment *attach;
27119 +@@ -1298,8 +1325,9 @@ static int prism54_set_genie(struct net_device *ndev,
27120 +
27121 + static int prism54_get_genie(struct net_device *ndev,
27122 + struct iw_request_info *info,
27123 +- struct iw_point *data, char *extra)
27124 ++ union iwreq_data *wrqu, char *extra)
27125 + {
27126 ++ struct iw_point *data = &wrqu->data;
27127 + islpci_private *priv = netdev_priv(ndev);
27128 + int len = priv->wpa_ie_len;
27129 +
27130 +@@ -1739,7 +1767,7 @@ out:
27131 +
27132 + static int
27133 + prism54_reset(struct net_device *ndev, struct iw_request_info *info,
27134 +- __u32 * uwrq, char *extra)
27135 ++ union iwreq_data * uwrq, char *extra)
27136 + {
27137 + islpci_reset(netdev_priv(ndev), 0);
27138 +
27139 +@@ -1748,8 +1776,9 @@ prism54_reset(struct net_device *ndev, struct iw_request_info *info,
27140 +
27141 + static int
27142 + prism54_get_oid(struct net_device *ndev, struct iw_request_info *info,
27143 +- struct iw_point *dwrq, char *extra)
27144 ++ union iwreq_data *wrqu, char *extra)
27145 + {
27146 ++ struct iw_point *dwrq = &wrqu->data;
27147 + union oid_res_t r;
27148 + int rvalue;
27149 + enum oid_num_t n = dwrq->flags;
27150 +@@ -1763,8 +1792,9 @@ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info,
27151 +
27152 + static int
27153 + prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
27154 +- __u32 * uwrq, char *extra)
27155 ++ union iwreq_data *wrqu, char *extra)
27156 + {
27157 ++ __u32 * uwrq = &wrqu->mode;
27158 + u32 oid = uwrq[0], u = uwrq[1];
27159 +
27160 + return mgt_set_request(netdev_priv(ndev), oid, 0, &u);
27161 +@@ -1772,8 +1802,9 @@ prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
27162 +
27163 + static int
27164 + prism54_set_raw(struct net_device *ndev, struct iw_request_info *info,
27165 +- struct iw_point *dwrq, char *extra)
27166 ++ union iwreq_data *wrqu, char *extra)
27167 + {
27168 ++ struct iw_point *dwrq = &wrqu->data;
27169 + u32 oid = dwrq->flags;
27170 +
27171 + return mgt_set_request(netdev_priv(ndev), oid, 0, extra);
27172 +@@ -1819,7 +1850,7 @@ prism54_acl_clean(struct islpci_acl *acl)
27173 +
27174 + static int
27175 + prism54_add_mac(struct net_device *ndev, struct iw_request_info *info,
27176 +- struct sockaddr *awrq, char *extra)
27177 ++ union iwreq_data *awrq, char *extra)
27178 + {
27179 + islpci_private *priv = netdev_priv(ndev);
27180 + struct islpci_acl *acl = &priv->acl;
27181 +@@ -1848,7 +1879,7 @@ prism54_add_mac(struct net_device *ndev, struct iw_request_info *info,
27182 +
27183 + static int
27184 + prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
27185 +- struct sockaddr *awrq, char *extra)
27186 ++ union iwreq_data *awrq, char *extra)
27187 + {
27188 + islpci_private *priv = netdev_priv(ndev);
27189 + struct islpci_acl *acl = &priv->acl;
27190 +@@ -1875,8 +1906,9 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
27191 +
27192 + static int
27193 + prism54_get_mac(struct net_device *ndev, struct iw_request_info *info,
27194 +- struct iw_point *dwrq, char *extra)
27195 ++ union iwreq_data *wrqu, char *extra)
27196 + {
27197 ++ struct iw_point *dwrq = &wrqu->data;
27198 + islpci_private *priv = netdev_priv(ndev);
27199 + struct islpci_acl *acl = &priv->acl;
27200 + struct mac_entry *entry;
27201 +@@ -1903,8 +1935,9 @@ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info,
27202 +
27203 + static int
27204 + prism54_set_policy(struct net_device *ndev, struct iw_request_info *info,
27205 +- __u32 * uwrq, char *extra)
27206 ++ union iwreq_data *wrqu, char *extra)
27207 + {
27208 ++ __u32 * uwrq = &wrqu->mode;
27209 + islpci_private *priv = netdev_priv(ndev);
27210 + struct islpci_acl *acl = &priv->acl;
27211 + u32 mlmeautolevel;
27212 +@@ -1939,8 +1972,9 @@ prism54_set_policy(struct net_device *ndev, struct iw_request_info *info,
27213 +
27214 + static int
27215 + prism54_get_policy(struct net_device *ndev, struct iw_request_info *info,
27216 +- __u32 * uwrq, char *extra)
27217 ++ union iwreq_data *wrqu, char *extra)
27218 + {
27219 ++ __u32 * uwrq = &wrqu->mode;
27220 + islpci_private *priv = netdev_priv(ndev);
27221 + struct islpci_acl *acl = &priv->acl;
27222 +
27223 +@@ -1979,7 +2013,7 @@ prism54_mac_accept(struct islpci_acl *acl, char *mac)
27224 +
27225 + static int
27226 + prism54_kick_all(struct net_device *ndev, struct iw_request_info *info,
27227 +- struct iw_point *dwrq, char *extra)
27228 ++ union iwreq_data *dwrq, char *extra)
27229 + {
27230 + struct obj_mlme *mlme;
27231 + int rvalue;
27232 +@@ -1999,7 +2033,7 @@ prism54_kick_all(struct net_device *ndev, struct iw_request_info *info,
27233 +
27234 + static int
27235 + prism54_kick_mac(struct net_device *ndev, struct iw_request_info *info,
27236 +- struct sockaddr *awrq, char *extra)
27237 ++ union iwreq_data *awrq, char *extra)
27238 + {
27239 + struct obj_mlme *mlme;
27240 + struct sockaddr *addr = (struct sockaddr *) extra;
27241 +@@ -2085,8 +2119,7 @@ link_changed(struct net_device *ndev, u32 bitrate)
27242 + netif_carrier_on(ndev);
27243 + if (priv->iw_mode == IW_MODE_INFRA) {
27244 + union iwreq_data uwrq;
27245 +- prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq,
27246 +- NULL);
27247 ++ prism54_get_wap(ndev, NULL, &uwrq, NULL);
27248 + wireless_send_event(ndev, SIOCGIWAP, &uwrq, NULL);
27249 + } else
27250 + send_simple_event(netdev_priv(ndev),
27251 +@@ -2498,8 +2531,9 @@ prism54_set_mac_address(struct net_device *ndev, void *addr)
27252 +
27253 + static int
27254 + prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
27255 +- __u32 * uwrq, char *extra)
27256 ++ union iwreq_data *wrqu, char *extra)
27257 + {
27258 ++ __u32 * uwrq = &wrqu->mode;
27259 + islpci_private *priv = netdev_priv(ndev);
27260 + u32 mlme, authen, dot1x, filter, wep;
27261 +
27262 +@@ -2542,8 +2576,9 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
27263 +
27264 + static int
27265 + prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info,
27266 +- __u32 * uwrq, char *extra)
27267 ++ union iwreq_data *wrqu, char *extra)
27268 + {
27269 ++ __u32 * uwrq = &wrqu->mode;
27270 + islpci_private *priv = netdev_priv(ndev);
27271 + *uwrq = priv->wpa;
27272 + return 0;
27273 +@@ -2551,8 +2586,9 @@ prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info,
27274 +
27275 + static int
27276 + prism54_set_prismhdr(struct net_device *ndev, struct iw_request_info *info,
27277 +- __u32 * uwrq, char *extra)
27278 ++ union iwreq_data *wrqu, char *extra)
27279 + {
27280 ++ __u32 * uwrq = &wrqu->mode;
27281 + islpci_private *priv = netdev_priv(ndev);
27282 + priv->monitor_type =
27283 + (*uwrq ? ARPHRD_IEEE80211_PRISM : ARPHRD_IEEE80211);
27284 +@@ -2564,8 +2600,9 @@ prism54_set_prismhdr(struct net_device *ndev, struct iw_request_info *info,
27285 +
27286 + static int
27287 + prism54_get_prismhdr(struct net_device *ndev, struct iw_request_info *info,
27288 +- __u32 * uwrq, char *extra)
27289 ++ union iwreq_data *wrqu, char *extra)
27290 + {
27291 ++ __u32 * uwrq = &wrqu->mode;
27292 + islpci_private *priv = netdev_priv(ndev);
27293 + *uwrq = (priv->monitor_type == ARPHRD_IEEE80211_PRISM);
27294 + return 0;
27295 +@@ -2573,8 +2610,9 @@ prism54_get_prismhdr(struct net_device *ndev, struct iw_request_info *info,
27296 +
27297 + static int
27298 + prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
27299 +- __u32 * uwrq, char *extra)
27300 ++ union iwreq_data *wrqu, char *extra)
27301 + {
27302 ++ __u32 * uwrq = &wrqu->mode;
27303 + islpci_private *priv = netdev_priv(ndev);
27304 +
27305 + priv->priv_oid = *uwrq;
27306 +@@ -2585,8 +2623,9 @@ prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
27307 +
27308 + static int
27309 + prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
27310 +- struct iw_point *data, char *extra)
27311 ++ union iwreq_data *wrqu, char *extra)
27312 + {
27313 ++ struct iw_point *data = &wrqu->data;
27314 + islpci_private *priv = netdev_priv(ndev);
27315 + struct islpci_mgmtframe *response;
27316 + int ret = -EIO;
27317 +@@ -2621,8 +2660,9 @@ prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
27318 +
27319 + static int
27320 + prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info,
27321 +- struct iw_point *data, char *extra)
27322 ++ union iwreq_data *wrqu, char *extra)
27323 + {
27324 ++ struct iw_point *data = &wrqu->data;
27325 + islpci_private *priv = netdev_priv(ndev);
27326 + struct islpci_mgmtframe *response;
27327 + int ret = 0, response_op = PIMFOR_OP_ERROR;
27328 +@@ -2682,60 +2722,60 @@ prism54_set_spy(struct net_device *ndev,
27329 + }
27330 +
27331 + static const iw_handler prism54_handler[] = {
27332 +- (iw_handler) prism54_commit, /* SIOCSIWCOMMIT */
27333 +- (iw_handler) prism54_get_name, /* SIOCGIWNAME */
27334 +- (iw_handler) NULL, /* SIOCSIWNWID */
27335 +- (iw_handler) NULL, /* SIOCGIWNWID */
27336 +- (iw_handler) prism54_set_freq, /* SIOCSIWFREQ */
27337 +- (iw_handler) prism54_get_freq, /* SIOCGIWFREQ */
27338 +- (iw_handler) prism54_set_mode, /* SIOCSIWMODE */
27339 +- (iw_handler) prism54_get_mode, /* SIOCGIWMODE */
27340 +- (iw_handler) prism54_set_sens, /* SIOCSIWSENS */
27341 +- (iw_handler) prism54_get_sens, /* SIOCGIWSENS */
27342 +- (iw_handler) NULL, /* SIOCSIWRANGE */
27343 +- (iw_handler) prism54_get_range, /* SIOCGIWRANGE */
27344 +- (iw_handler) NULL, /* SIOCSIWPRIV */
27345 +- (iw_handler) NULL, /* SIOCGIWPRIV */
27346 +- (iw_handler) NULL, /* SIOCSIWSTATS */
27347 +- (iw_handler) NULL, /* SIOCGIWSTATS */
27348 ++ prism54_commit, /* SIOCSIWCOMMIT */
27349 ++ prism54_get_name, /* SIOCGIWNAME */
27350 ++ NULL, /* SIOCSIWNWID */
27351 ++ NULL, /* SIOCGIWNWID */
27352 ++ prism54_set_freq, /* SIOCSIWFREQ */
27353 ++ prism54_get_freq, /* SIOCGIWFREQ */
27354 ++ prism54_set_mode, /* SIOCSIWMODE */
27355 ++ prism54_get_mode, /* SIOCGIWMODE */
27356 ++ prism54_set_sens, /* SIOCSIWSENS */
27357 ++ prism54_get_sens, /* SIOCGIWSENS */
27358 ++ NULL, /* SIOCSIWRANGE */
27359 ++ prism54_get_range, /* SIOCGIWRANGE */
27360 ++ NULL, /* SIOCSIWPRIV */
27361 ++ NULL, /* SIOCGIWPRIV */
27362 ++ NULL, /* SIOCSIWSTATS */
27363 ++ NULL, /* SIOCGIWSTATS */
27364 + prism54_set_spy, /* SIOCSIWSPY */
27365 + iw_handler_get_spy, /* SIOCGIWSPY */
27366 + iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
27367 + iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
27368 +- (iw_handler) prism54_set_wap, /* SIOCSIWAP */
27369 +- (iw_handler) prism54_get_wap, /* SIOCGIWAP */
27370 +- (iw_handler) NULL, /* -- hole -- */
27371 +- (iw_handler) NULL, /* SIOCGIWAPLIST deprecated */
27372 +- (iw_handler) prism54_set_scan, /* SIOCSIWSCAN */
27373 +- (iw_handler) prism54_get_scan, /* SIOCGIWSCAN */
27374 +- (iw_handler) prism54_set_essid, /* SIOCSIWESSID */
27375 +- (iw_handler) prism54_get_essid, /* SIOCGIWESSID */
27376 +- (iw_handler) prism54_set_nick, /* SIOCSIWNICKN */
27377 +- (iw_handler) prism54_get_nick, /* SIOCGIWNICKN */
27378 +- (iw_handler) NULL, /* -- hole -- */
27379 +- (iw_handler) NULL, /* -- hole -- */
27380 +- (iw_handler) prism54_set_rate, /* SIOCSIWRATE */
27381 +- (iw_handler) prism54_get_rate, /* SIOCGIWRATE */
27382 +- (iw_handler) prism54_set_rts, /* SIOCSIWRTS */
27383 +- (iw_handler) prism54_get_rts, /* SIOCGIWRTS */
27384 +- (iw_handler) prism54_set_frag, /* SIOCSIWFRAG */
27385 +- (iw_handler) prism54_get_frag, /* SIOCGIWFRAG */
27386 +- (iw_handler) prism54_set_txpower, /* SIOCSIWTXPOW */
27387 +- (iw_handler) prism54_get_txpower, /* SIOCGIWTXPOW */
27388 +- (iw_handler) prism54_set_retry, /* SIOCSIWRETRY */
27389 +- (iw_handler) prism54_get_retry, /* SIOCGIWRETRY */
27390 +- (iw_handler) prism54_set_encode, /* SIOCSIWENCODE */
27391 +- (iw_handler) prism54_get_encode, /* SIOCGIWENCODE */
27392 +- (iw_handler) NULL, /* SIOCSIWPOWER */
27393 +- (iw_handler) NULL, /* SIOCGIWPOWER */
27394 ++ prism54_set_wap, /* SIOCSIWAP */
27395 ++ prism54_get_wap, /* SIOCGIWAP */
27396 ++ NULL, /* -- hole -- */
27397 ++ NULL, /* SIOCGIWAPLIST deprecated */
27398 ++ prism54_set_scan, /* SIOCSIWSCAN */
27399 ++ prism54_get_scan, /* SIOCGIWSCAN */
27400 ++ prism54_set_essid, /* SIOCSIWESSID */
27401 ++ prism54_get_essid, /* SIOCGIWESSID */
27402 ++ prism54_set_nick, /* SIOCSIWNICKN */
27403 ++ prism54_get_nick, /* SIOCGIWNICKN */
27404 ++ NULL, /* -- hole -- */
27405 ++ NULL, /* -- hole -- */
27406 ++ prism54_set_rate, /* SIOCSIWRATE */
27407 ++ prism54_get_rate, /* SIOCGIWRATE */
27408 ++ prism54_set_rts, /* SIOCSIWRTS */
27409 ++ prism54_get_rts, /* SIOCGIWRTS */
27410 ++ prism54_set_frag, /* SIOCSIWFRAG */
27411 ++ prism54_get_frag, /* SIOCGIWFRAG */
27412 ++ prism54_set_txpower, /* SIOCSIWTXPOW */
27413 ++ prism54_get_txpower, /* SIOCGIWTXPOW */
27414 ++ prism54_set_retry, /* SIOCSIWRETRY */
27415 ++ prism54_get_retry, /* SIOCGIWRETRY */
27416 ++ prism54_set_encode, /* SIOCSIWENCODE */
27417 ++ prism54_get_encode, /* SIOCGIWENCODE */
27418 ++ NULL, /* SIOCSIWPOWER */
27419 ++ NULL, /* SIOCGIWPOWER */
27420 + NULL, /* -- hole -- */
27421 + NULL, /* -- hole -- */
27422 +- (iw_handler) prism54_set_genie, /* SIOCSIWGENIE */
27423 +- (iw_handler) prism54_get_genie, /* SIOCGIWGENIE */
27424 +- (iw_handler) prism54_set_auth, /* SIOCSIWAUTH */
27425 +- (iw_handler) prism54_get_auth, /* SIOCGIWAUTH */
27426 +- (iw_handler) prism54_set_encodeext, /* SIOCSIWENCODEEXT */
27427 +- (iw_handler) prism54_get_encodeext, /* SIOCGIWENCODEEXT */
27428 ++ prism54_set_genie, /* SIOCSIWGENIE */
27429 ++ prism54_get_genie, /* SIOCGIWGENIE */
27430 ++ prism54_set_auth, /* SIOCSIWAUTH */
27431 ++ prism54_get_auth, /* SIOCGIWAUTH */
27432 ++ prism54_set_encodeext, /* SIOCSIWENCODEEXT */
27433 ++ prism54_get_encodeext, /* SIOCGIWENCODEEXT */
27434 + NULL, /* SIOCSIWPMKSA */
27435 + };
27436 +
27437 +@@ -2872,31 +2912,31 @@ static const struct iw_priv_args prism54_private_args[] = {
27438 + };
27439 +
27440 + static const iw_handler prism54_private_handler[] = {
27441 +- (iw_handler) prism54_reset,
27442 +- (iw_handler) prism54_get_policy,
27443 +- (iw_handler) prism54_set_policy,
27444 +- (iw_handler) prism54_get_mac,
27445 +- (iw_handler) prism54_add_mac,
27446 +- (iw_handler) NULL,
27447 +- (iw_handler) prism54_del_mac,
27448 +- (iw_handler) NULL,
27449 +- (iw_handler) prism54_kick_mac,
27450 +- (iw_handler) NULL,
27451 +- (iw_handler) prism54_kick_all,
27452 +- (iw_handler) prism54_get_wpa,
27453 +- (iw_handler) prism54_set_wpa,
27454 +- (iw_handler) NULL,
27455 +- (iw_handler) prism54_debug_oid,
27456 +- (iw_handler) prism54_debug_get_oid,
27457 +- (iw_handler) prism54_debug_set_oid,
27458 +- (iw_handler) prism54_get_oid,
27459 +- (iw_handler) prism54_set_u32,
27460 +- (iw_handler) NULL,
27461 +- (iw_handler) prism54_set_raw,
27462 +- (iw_handler) NULL,
27463 +- (iw_handler) prism54_set_raw,
27464 +- (iw_handler) prism54_get_prismhdr,
27465 +- (iw_handler) prism54_set_prismhdr,
27466 ++ prism54_reset,
27467 ++ prism54_get_policy,
27468 ++ prism54_set_policy,
27469 ++ prism54_get_mac,
27470 ++ prism54_add_mac,
27471 ++ NULL,
27472 ++ prism54_del_mac,
27473 ++ NULL,
27474 ++ prism54_kick_mac,
27475 ++ NULL,
27476 ++ prism54_kick_all,
27477 ++ prism54_get_wpa,
27478 ++ prism54_set_wpa,
27479 ++ NULL,
27480 ++ prism54_debug_oid,
27481 ++ prism54_debug_get_oid,
27482 ++ prism54_debug_set_oid,
27483 ++ prism54_get_oid,
27484 ++ prism54_set_u32,
27485 ++ NULL,
27486 ++ prism54_set_raw,
27487 ++ NULL,
27488 ++ prism54_set_raw,
27489 ++ prism54_get_prismhdr,
27490 ++ prism54_set_prismhdr,
27491 + };
27492 +
27493 + const struct iw_handler_def prism54_handler_def = {
27494 diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
27495 -index c00a7daaa..4f9ed30 100644
27496 +index a28414c..26c8768 100644
27497 --- a/drivers/net/wireless/mac80211_hwsim.c
27498 +++ b/drivers/net/wireless/mac80211_hwsim.c
27499 -@@ -3150,20 +3150,20 @@ static int __init init_mac80211_hwsim(void)
27500 +@@ -3218,20 +3218,20 @@ static int __init init_mac80211_hwsim(void)
27501 if (channels < 1)
27502 return -EINVAL;
27503
27504 @@ -54715,10 +64547,120 @@ index c00a7daaa..4f9ed30 100644
27505
27506 spin_lock_init(&hwsim_radio_lock);
27507 INIT_LIST_HEAD(&hwsim_radios);
27508 -diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
27509 -index 3282ddb..26aabb5 100644
27510 ---- a/drivers/net/wireless/rt2x00/rt2x00.h
27511 -+++ b/drivers/net/wireless/rt2x00/rt2x00.h
27512 +diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
27513 +index 79c16de..efdebed 100644
27514 +--- a/drivers/net/wireless/marvell/mwifiex/main.c
27515 ++++ b/drivers/net/wireless/marvell/mwifiex/main.c
27516 +@@ -794,7 +794,7 @@ mwifiex_clone_skb_for_tx_status(struct mwifiex_private *priv,
27517 + /*
27518 + * CFG802.11 network device handler for data transmission.
27519 + */
27520 +-static int
27521 ++static netdev_tx_t
27522 + mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
27523 + {
27524 + struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
27525 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
27526 +index 155f343..5db43e7 100644
27527 +--- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
27528 ++++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
27529 +@@ -54,7 +54,7 @@
27530 + rt2x00mmio_regbusy_read((__dev), RFCSR, RFCSR_BUSY, (__reg))
27531 +
27532 + static void rt2400pci_bbp_write(struct rt2x00_dev *rt2x00dev,
27533 +- const unsigned int word, const u8 value)
27534 ++ const unsigned int word, u8 value)
27535 + {
27536 + u32 reg;
27537 +
27538 +@@ -109,7 +109,7 @@ static void rt2400pci_bbp_read(struct rt2x00_dev *rt2x00dev,
27539 + }
27540 +
27541 + static void rt2400pci_rf_write(struct rt2x00_dev *rt2x00dev,
27542 +- const unsigned int word, const u32 value)
27543 ++ const unsigned int word, u32 value)
27544 + {
27545 + u32 reg;
27546 +
27547 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
27548 +index 2553cdd..6a60ef9 100644
27549 +--- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
27550 ++++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
27551 +@@ -54,7 +54,7 @@
27552 + rt2x00mmio_regbusy_read((__dev), RFCSR, RFCSR_BUSY, (__reg))
27553 +
27554 + static void rt2500pci_bbp_write(struct rt2x00_dev *rt2x00dev,
27555 +- const unsigned int word, const u8 value)
27556 ++ const unsigned int word, u8 value)
27557 + {
27558 + u32 reg;
27559 +
27560 +@@ -109,7 +109,7 @@ static void rt2500pci_bbp_read(struct rt2x00_dev *rt2x00dev,
27561 + }
27562 +
27563 + static void rt2500pci_rf_write(struct rt2x00_dev *rt2x00dev,
27564 +- const unsigned int word, const u32 value)
27565 ++ const unsigned int word, u32 value)
27566 + {
27567 + u32 reg;
27568 +
27569 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
27570 +index 2d64611..66754f4 100644
27571 +--- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
27572 ++++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
27573 +@@ -142,7 +142,7 @@ static int rt2500usb_regbusy_read(struct rt2x00_dev *rt2x00dev,
27574 + rt2500usb_regbusy_read((__dev), PHY_CSR10, PHY_CSR10_RF_BUSY, (__reg))
27575 +
27576 + static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
27577 +- const unsigned int word, const u8 value)
27578 ++ const unsigned int word, u8 value)
27579 + {
27580 + u16 reg;
27581 +
27582 +@@ -196,7 +196,7 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
27583 + }
27584 +
27585 + static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
27586 +- const unsigned int word, const u32 value)
27587 ++ const unsigned int word, u32 value)
27588 + {
27589 + u16 reg;
27590 +
27591 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
27592 +index a26afca..156b152 100644
27593 +--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
27594 ++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
27595 +@@ -83,7 +83,7 @@ static inline bool rt2800_is_305x_soc(struct rt2x00_dev *rt2x00dev)
27596 + }
27597 +
27598 + static void rt2800_bbp_write(struct rt2x00_dev *rt2x00dev,
27599 +- const unsigned int word, const u8 value)
27600 ++ const unsigned int word, u8 value)
27601 + {
27602 + u32 reg;
27603 +
27604 +@@ -140,7 +140,7 @@ static void rt2800_bbp_read(struct rt2x00_dev *rt2x00dev,
27605 + }
27606 +
27607 + static void rt2800_rfcsr_write(struct rt2x00_dev *rt2x00dev,
27608 +- const unsigned int word, const u8 value)
27609 ++ const unsigned int word, u8 value)
27610 + {
27611 + u32 reg;
27612 +
27613 +@@ -195,7 +195,7 @@ static void rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev,
27614 + }
27615 +
27616 + static void rt2800_rf_write(struct rt2x00_dev *rt2x00dev,
27617 +- const unsigned int word, const u32 value)
27618 ++ const unsigned int word, u32 value)
27619 + {
27620 + u32 reg;
27621 +
27622 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
27623 +index 2642714..d79a7e9 100644
27624 +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
27625 ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
27626 @@ -377,7 +377,7 @@ struct rt2x00_intf {
27627 * for hardware which doesn't support hardware
27628 * sequence counting.
27629 @@ -54728,10 +64670,10 @@ index 3282ddb..26aabb5 100644
27630 };
27631
27632 static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif)
27633 -diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
27634 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
27635 index 68b620b..92ecd9e 100644
27636 ---- a/drivers/net/wireless/rt2x00/rt2x00queue.c
27637 -+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
27638 +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
27639 ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
27640 @@ -224,9 +224,9 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
27641 * sequence counter given by mac80211.
27642 */
27643 @@ -54744,6 +64686,200 @@ index 68b620b..92ecd9e 100644
27644
27645 hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
27646 hdr->seq_ctrl |= cpu_to_le16(seqno);
27647 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
27648 +index 24a3436..b74d6b7 100644
27649 +--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
27650 ++++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
27651 +@@ -63,7 +63,7 @@ MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
27652 + H2M_MAILBOX_CSR_OWNER, (__reg))
27653 +
27654 + static void rt61pci_bbp_write(struct rt2x00_dev *rt2x00dev,
27655 +- const unsigned int word, const u8 value)
27656 ++ const unsigned int word, u8 value)
27657 + {
27658 + u32 reg;
27659 +
27660 +@@ -118,7 +118,7 @@ static void rt61pci_bbp_read(struct rt2x00_dev *rt2x00dev,
27661 + }
27662 +
27663 + static void rt61pci_rf_write(struct rt2x00_dev *rt2x00dev,
27664 +- const unsigned int word, const u32 value)
27665 ++ const unsigned int word, u32 value)
27666 + {
27667 + u32 reg;
27668 +
27669 +diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
27670 +index 7bbc869..d69e243 100644
27671 +--- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c
27672 ++++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
27673 +@@ -61,7 +61,7 @@ MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
27674 + rt2x00usb_regbusy_read((__dev), PHY_CSR4, PHY_CSR4_BUSY, (__reg))
27675 +
27676 + static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
27677 +- const unsigned int word, const u8 value)
27678 ++ const unsigned int word, u8 value)
27679 + {
27680 + u32 reg;
27681 +
27682 +@@ -116,7 +116,7 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
27683 + }
27684 +
27685 + static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
27686 +- const unsigned int word, const u32 value)
27687 ++ const unsigned int word, u32 value)
27688 + {
27689 + u32 reg;
27690 +
27691 +diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
27692 +index 0517a4f..cac8e6b 100644
27693 +--- a/drivers/net/wireless/realtek/rtlwifi/base.c
27694 ++++ b/drivers/net/wireless/realtek/rtlwifi/base.c
27695 +@@ -467,15 +467,15 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
27696 + rtlpriv->works.hw = hw;
27697 + rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
27698 + INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
27699 +- (void *)rtl_watchdog_wq_callback);
27700 ++ rtl_watchdog_wq_callback);
27701 + INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq,
27702 +- (void *)rtl_ips_nic_off_wq_callback);
27703 ++ rtl_ips_nic_off_wq_callback);
27704 + INIT_DELAYED_WORK(&rtlpriv->works.ps_work,
27705 +- (void *)rtl_swlps_wq_callback);
27706 ++ rtl_swlps_wq_callback);
27707 + INIT_DELAYED_WORK(&rtlpriv->works.ps_rfon_wq,
27708 +- (void *)rtl_swlps_rfon_wq_callback);
27709 ++ rtl_swlps_rfon_wq_callback);
27710 + INIT_DELAYED_WORK(&rtlpriv->works.fwevt_wq,
27711 +- (void *)rtl_fwevt_wq_callback);
27712 ++ rtl_fwevt_wq_callback);
27713 +
27714 + }
27715 +
27716 +@@ -1559,7 +1559,7 @@ void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
27717 + }
27718 + EXPORT_SYMBOL_GPL(rtl_beacon_statistic);
27719 +
27720 +-void rtl_watchdog_wq_callback(void *data)
27721 ++void rtl_watchdog_wq_callback(struct work_struct *data)
27722 + {
27723 + struct rtl_works *rtlworks = container_of_dwork_rtl(data,
27724 + struct rtl_works,
27725 +@@ -1722,7 +1722,7 @@ void rtl_watch_dog_timer_callback(unsigned long data)
27726 + mod_timer(&rtlpriv->works.watchdog_timer,
27727 + jiffies + MSECS(RTL_WATCH_DOG_TIME));
27728 + }
27729 +-void rtl_fwevt_wq_callback(void *data)
27730 ++void rtl_fwevt_wq_callback(struct work_struct *data)
27731 + {
27732 + struct rtl_works *rtlworks =
27733 + container_of_dwork_rtl(data, struct rtl_works, fwevt_wq);
27734 +diff --git a/drivers/net/wireless/realtek/rtlwifi/base.h b/drivers/net/wireless/realtek/rtlwifi/base.h
27735 +index 74233d6..482e495 100644
27736 +--- a/drivers/net/wireless/realtek/rtlwifi/base.h
27737 ++++ b/drivers/net/wireless/realtek/rtlwifi/base.h
27738 +@@ -134,8 +134,8 @@ int rtl_rx_agg_start(struct ieee80211_hw *hw,
27739 + struct ieee80211_sta *sta, u16 tid);
27740 + int rtl_rx_agg_stop(struct ieee80211_hw *hw,
27741 + struct ieee80211_sta *sta, u16 tid);
27742 +-void rtl_watchdog_wq_callback(void *data);
27743 +-void rtl_fwevt_wq_callback(void *data);
27744 ++void rtl_watchdog_wq_callback(struct work_struct *data);
27745 ++void rtl_fwevt_wq_callback(struct work_struct *data);
27746 +
27747 + void rtl_get_tcb_desc(struct ieee80211_hw *hw,
27748 + struct ieee80211_tx_info *info,
27749 +diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
27750 +index 7f471bf..de826f0 100644
27751 +--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
27752 ++++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
27753 +@@ -1100,13 +1100,16 @@ done:
27754 + return ret;
27755 + }
27756 +
27757 +-static void _rtl_pci_irq_tasklet(struct ieee80211_hw *hw)
27758 ++static void _rtl_pci_irq_tasklet(unsigned long _hw)
27759 + {
27760 ++ struct ieee80211_hw *hw = (struct ieee80211_hw *)_hw;
27761 ++
27762 + _rtl_pci_tx_chk_waitq(hw);
27763 + }
27764 +
27765 +-static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
27766 ++static void _rtl_pci_prepare_bcn_tasklet(unsigned long _hw)
27767 + {
27768 ++ struct ieee80211_hw *hw = (struct ieee80211_hw *)_hw;
27769 + struct rtl_priv *rtlpriv = rtl_priv(hw);
27770 + struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
27771 + struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
27772 +@@ -1226,12 +1229,8 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw,
27773 + rtlpci->acm_method = EACMWAY2_SW;
27774 +
27775 + /*task */
27776 +- tasklet_init(&rtlpriv->works.irq_tasklet,
27777 +- (void (*)(unsigned long))_rtl_pci_irq_tasklet,
27778 +- (unsigned long)hw);
27779 +- tasklet_init(&rtlpriv->works.irq_prepare_bcn_tasklet,
27780 +- (void (*)(unsigned long))_rtl_pci_prepare_bcn_tasklet,
27781 +- (unsigned long)hw);
27782 ++ tasklet_init(&rtlpriv->works.irq_tasklet, _rtl_pci_irq_tasklet, (unsigned long)hw);
27783 ++ tasklet_init(&rtlpriv->works.irq_prepare_bcn_tasklet, _rtl_pci_prepare_bcn_tasklet, (unsigned long)hw);
27784 + INIT_WORK(&rtlpriv->works.lps_change_work,
27785 + rtl_lps_change_work_callback);
27786 + }
27787 +diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
27788 +index b69321d..ee3a01c 100644
27789 +--- a/drivers/net/wireless/realtek/rtlwifi/ps.c
27790 ++++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
27791 +@@ -205,7 +205,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw)
27792 + ppsc->swrf_processing = false;
27793 + }
27794 +
27795 +-void rtl_ips_nic_off_wq_callback(void *data)
27796 ++void rtl_ips_nic_off_wq_callback(struct work_struct *data)
27797 + {
27798 + struct rtl_works *rtlworks =
27799 + container_of_dwork_rtl(data, struct rtl_works, ips_nic_off_wq);
27800 +@@ -595,7 +595,7 @@ void rtl_swlps_rf_awake(struct ieee80211_hw *hw)
27801 + spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag);
27802 + }
27803 +
27804 +-void rtl_swlps_rfon_wq_callback(void *data)
27805 ++void rtl_swlps_rfon_wq_callback(struct work_struct *data)
27806 + {
27807 + struct rtl_works *rtlworks =
27808 + container_of_dwork_rtl(data, struct rtl_works, ps_rfon_wq);
27809 +@@ -687,7 +687,7 @@ void rtl_lps_change_work_callback(struct work_struct *work)
27810 + }
27811 + EXPORT_SYMBOL_GPL(rtl_lps_change_work_callback);
27812 +
27813 +-void rtl_swlps_wq_callback(void *data)
27814 ++void rtl_swlps_wq_callback(struct work_struct *data)
27815 + {
27816 + struct rtl_works *rtlworks = container_of_dwork_rtl(data,
27817 + struct rtl_works,
27818 +diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.h b/drivers/net/wireless/realtek/rtlwifi/ps.h
27819 +index 29dfc51..8297755 100644
27820 +--- a/drivers/net/wireless/realtek/rtlwifi/ps.h
27821 ++++ b/drivers/net/wireless/realtek/rtlwifi/ps.h
27822 +@@ -35,15 +35,15 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw);
27823 + bool rtl_ps_disable_nic(struct ieee80211_hw *hw);
27824 + void rtl_ips_nic_off(struct ieee80211_hw *hw);
27825 + void rtl_ips_nic_on(struct ieee80211_hw *hw);
27826 +-void rtl_ips_nic_off_wq_callback(void *data);
27827 ++void rtl_ips_nic_off_wq_callback(struct work_struct *data);
27828 + void rtl_lps_enter(struct ieee80211_hw *hw);
27829 + void rtl_lps_leave(struct ieee80211_hw *hw);
27830 +
27831 + void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode);
27832 +
27833 + void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len);
27834 +-void rtl_swlps_wq_callback(void *data);
27835 +-void rtl_swlps_rfon_wq_callback(void *data);
27836 ++void rtl_swlps_wq_callback(struct work_struct *data);
27837 ++void rtl_swlps_rfon_wq_callback(struct work_struct *data);
27838 + void rtl_swlps_rf_awake(struct ieee80211_hw *hw);
27839 + void rtl_swlps_rf_sleep(struct ieee80211_hw *hw);
27840 + void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state);
27841 diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
27842 index b661f896..ddf7d2b 100644
27843 --- a/drivers/net/wireless/ti/wl1251/sdio.c
27844 @@ -54771,10 +64907,10 @@ index b661f896..ddf7d2b 100644
27845 wl1251_info("using SDIO interrupt");
27846 }
27847 diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
27848 -index af0fe2e..d04986b 100644
27849 +index a0d6ccc..93d9ac5 100644
27850 --- a/drivers/net/wireless/ti/wl12xx/main.c
27851 +++ b/drivers/net/wireless/ti/wl12xx/main.c
27852 -@@ -655,7 +655,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
27853 +@@ -656,7 +656,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
27854 sizeof(wl->conf.mem));
27855
27856 /* read data preparation is only needed by wl127x */
27857 @@ -54785,7 +64921,7 @@ index af0fe2e..d04986b 100644
27858
27859 wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER,
27860 WL127X_IFTYPE_SR_VER, WL127X_MAJOR_SR_VER,
27861 -@@ -680,7 +682,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
27862 +@@ -681,7 +683,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
27863 sizeof(wl->conf.mem));
27864
27865 /* read data preparation is only needed by wl127x */
27866 @@ -54797,10 +64933,10 @@ index af0fe2e..d04986b 100644
27867 wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER,
27868 WL127X_IFTYPE_SR_VER, WL127X_MAJOR_SR_VER,
27869 diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
27870 -index 50cce42..f40cfd3 100644
27871 +index 1bf26cc..3b15c02 100644
27872 --- a/drivers/net/wireless/ti/wl18xx/main.c
27873 +++ b/drivers/net/wireless/ti/wl18xx/main.c
27874 -@@ -2005,8 +2005,10 @@ static int wl18xx_setup(struct wl1271 *wl)
27875 +@@ -2018,8 +2018,10 @@ static int wl18xx_setup(struct wl1271 *wl)
27876 }
27877
27878 if (!checksum_param) {
27879 @@ -54813,10 +64949,445 @@ index 50cce42..f40cfd3 100644
27880 }
27881
27882 /* Enable 11a Band only if we have 5G antennas */
27883 -diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
27884 +diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zydas/zd1201.c
27885 +index 6f5c793..42f0dde 100644
27886 +--- a/drivers/net/wireless/zydas/zd1201.c
27887 ++++ b/drivers/net/wireless/zydas/zd1201.c
27888 +@@ -891,7 +891,7 @@ static void zd1201_set_multicast(struct net_device *dev)
27889 + }
27890 +
27891 + static int zd1201_config_commit(struct net_device *dev,
27892 +- struct iw_request_info *info, struct iw_point *data, char *essid)
27893 ++ struct iw_request_info *info, union iwreq_data *data, char *essid)
27894 + {
27895 + struct zd1201 *zd = netdev_priv(dev);
27896 +
27897 +@@ -899,15 +899,18 @@ static int zd1201_config_commit(struct net_device *dev,
27898 + }
27899 +
27900 + static int zd1201_get_name(struct net_device *dev,
27901 +- struct iw_request_info *info, char *name, char *extra)
27902 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27903 + {
27904 ++ char *name = wrqu->name;
27905 ++
27906 + strcpy(name, "IEEE 802.11b");
27907 + return 0;
27908 + }
27909 +
27910 + static int zd1201_set_freq(struct net_device *dev,
27911 +- struct iw_request_info *info, struct iw_freq *freq, char *extra)
27912 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27913 + {
27914 ++ struct iw_freq *freq = &wrqu->freq;
27915 + struct zd1201 *zd = netdev_priv(dev);
27916 + short channel = 0;
27917 + int err;
27918 +@@ -927,8 +930,9 @@ static int zd1201_set_freq(struct net_device *dev,
27919 + }
27920 +
27921 + static int zd1201_get_freq(struct net_device *dev,
27922 +- struct iw_request_info *info, struct iw_freq *freq, char *extra)
27923 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27924 + {
27925 ++ struct iw_freq *freq = &wrqu->freq;
27926 + struct zd1201 *zd = netdev_priv(dev);
27927 + short channel;
27928 + int err;
27929 +@@ -943,8 +947,9 @@ static int zd1201_get_freq(struct net_device *dev,
27930 + }
27931 +
27932 + static int zd1201_set_mode(struct net_device *dev,
27933 +- struct iw_request_info *info, __u32 *mode, char *extra)
27934 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27935 + {
27936 ++ __u32 *mode = &wrqu->mode;
27937 + struct zd1201 *zd = netdev_priv(dev);
27938 + short porttype, monitor = 0;
27939 + unsigned char buffer[IW_ESSID_MAX_SIZE+2];
27940 +@@ -1005,8 +1010,9 @@ static int zd1201_set_mode(struct net_device *dev,
27941 + }
27942 +
27943 + static int zd1201_get_mode(struct net_device *dev,
27944 +- struct iw_request_info *info, __u32 *mode, char *extra)
27945 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27946 + {
27947 ++ __u32 *mode = &wrqu->mode;
27948 + struct zd1201 *zd = netdev_priv(dev);
27949 + short porttype;
27950 + int err;
27951 +@@ -1042,8 +1048,9 @@ static int zd1201_get_mode(struct net_device *dev,
27952 + }
27953 +
27954 + static int zd1201_get_range(struct net_device *dev,
27955 +- struct iw_request_info *info, struct iw_point *wrq, char *extra)
27956 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27957 + {
27958 ++ struct iw_point *wrq = &wrqu->data;
27959 + struct iw_range *range = (struct iw_range *)extra;
27960 +
27961 + wrq->length = sizeof(struct iw_range);
27962 +@@ -1081,8 +1088,9 @@ static int zd1201_get_range(struct net_device *dev,
27963 + * the stats after asking the bssid.
27964 + */
27965 + static int zd1201_get_wap(struct net_device *dev,
27966 +- struct iw_request_info *info, struct sockaddr *ap_addr, char *extra)
27967 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27968 + {
27969 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
27970 + struct zd1201 *zd = netdev_priv(dev);
27971 + unsigned char buffer[6];
27972 +
27973 +@@ -1102,15 +1110,16 @@ static int zd1201_get_wap(struct net_device *dev,
27974 + }
27975 +
27976 + static int zd1201_set_scan(struct net_device *dev,
27977 +- struct iw_request_info *info, struct iw_point *srq, char *extra)
27978 ++ struct iw_request_info *info, union iwreq_data *srq, char *extra)
27979 + {
27980 + /* We do everything in get_scan */
27981 + return 0;
27982 + }
27983 +
27984 + static int zd1201_get_scan(struct net_device *dev,
27985 +- struct iw_request_info *info, struct iw_point *srq, char *extra)
27986 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
27987 + {
27988 ++ struct iw_point *srq = &wrqu->data;
27989 + struct zd1201 *zd = netdev_priv(dev);
27990 + int err, i, j, enabled_save;
27991 + struct iw_event iwe;
27992 +@@ -1201,8 +1210,9 @@ static int zd1201_get_scan(struct net_device *dev,
27993 + }
27994 +
27995 + static int zd1201_set_essid(struct net_device *dev,
27996 +- struct iw_request_info *info, struct iw_point *data, char *essid)
27997 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *essid)
27998 + {
27999 ++ struct iw_point *data = &wrqu->essid;
28000 + struct zd1201 *zd = netdev_priv(dev);
28001 +
28002 + if (data->length > IW_ESSID_MAX_SIZE)
28003 +@@ -1216,8 +1226,9 @@ static int zd1201_set_essid(struct net_device *dev,
28004 + }
28005 +
28006 + static int zd1201_get_essid(struct net_device *dev,
28007 +- struct iw_request_info *info, struct iw_point *data, char *essid)
28008 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *essid)
28009 + {
28010 ++ struct iw_point *data = &wrqu->essid;
28011 + struct zd1201 *zd = netdev_priv(dev);
28012 +
28013 + memcpy(essid, zd->essid, zd->essidlen);
28014 +@@ -1228,8 +1239,10 @@ static int zd1201_get_essid(struct net_device *dev,
28015 + }
28016 +
28017 + static int zd1201_get_nick(struct net_device *dev, struct iw_request_info *info,
28018 +- struct iw_point *data, char *nick)
28019 ++ union iwreq_data *wrqu, char *nick)
28020 + {
28021 ++ struct iw_point *data = &wrqu->data;
28022 ++
28023 + strcpy(nick, "zd1201");
28024 + data->flags = 1;
28025 + data->length = strlen(nick);
28026 +@@ -1237,8 +1250,9 @@ static int zd1201_get_nick(struct net_device *dev, struct iw_request_info *info,
28027 + }
28028 +
28029 + static int zd1201_set_rate(struct net_device *dev,
28030 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28031 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28032 + {
28033 ++ struct iw_param *rrq = &wrqu->bitrate;
28034 + struct zd1201 *zd = netdev_priv(dev);
28035 + short rate;
28036 + int err;
28037 +@@ -1270,8 +1284,9 @@ static int zd1201_set_rate(struct net_device *dev,
28038 + }
28039 +
28040 + static int zd1201_get_rate(struct net_device *dev,
28041 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28042 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28043 + {
28044 ++ struct iw_param *rrq = &wrqu->bitrate;
28045 + struct zd1201 *zd = netdev_priv(dev);
28046 + short rate;
28047 + int err;
28048 +@@ -1303,8 +1318,9 @@ static int zd1201_get_rate(struct net_device *dev,
28049 + }
28050 +
28051 + static int zd1201_set_rts(struct net_device *dev, struct iw_request_info *info,
28052 +- struct iw_param *rts, char *extra)
28053 ++ union iwreq_data *wrqu, char *extra)
28054 + {
28055 ++ struct iw_param *rts = &wrqu->rts;
28056 + struct zd1201 *zd = netdev_priv(dev);
28057 + int err;
28058 + short val = rts->value;
28059 +@@ -1323,8 +1339,9 @@ static int zd1201_set_rts(struct net_device *dev, struct iw_request_info *info,
28060 + }
28061 +
28062 + static int zd1201_get_rts(struct net_device *dev, struct iw_request_info *info,
28063 +- struct iw_param *rts, char *extra)
28064 ++ union iwreq_data *wrqu, char *extra)
28065 + {
28066 ++ struct iw_param *rts = &wrqu->rts;
28067 + struct zd1201 *zd = netdev_priv(dev);
28068 + short rtst;
28069 + int err;
28070 +@@ -1340,8 +1357,9 @@ static int zd1201_get_rts(struct net_device *dev, struct iw_request_info *info,
28071 + }
28072 +
28073 + static int zd1201_set_frag(struct net_device *dev, struct iw_request_info *info,
28074 +- struct iw_param *frag, char *extra)
28075 ++ union iwreq_data *wrqu, char *extra)
28076 + {
28077 ++ struct iw_param *frag = &wrqu->frag;
28078 + struct zd1201 *zd = netdev_priv(dev);
28079 + int err;
28080 + short val = frag->value;
28081 +@@ -1361,8 +1379,9 @@ static int zd1201_set_frag(struct net_device *dev, struct iw_request_info *info,
28082 + }
28083 +
28084 + static int zd1201_get_frag(struct net_device *dev, struct iw_request_info *info,
28085 +- struct iw_param *frag, char *extra)
28086 ++ union iwreq_data *wrqu, char *extra)
28087 + {
28088 ++ struct iw_param *frag = &wrqu->frag;
28089 + struct zd1201 *zd = netdev_priv(dev);
28090 + short fragt;
28091 + int err;
28092 +@@ -1378,20 +1397,21 @@ static int zd1201_get_frag(struct net_device *dev, struct iw_request_info *info,
28093 + }
28094 +
28095 + static int zd1201_set_retry(struct net_device *dev,
28096 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28097 ++ struct iw_request_info *info, union iwreq_data *rrq, char *extra)
28098 + {
28099 + return 0;
28100 + }
28101 +
28102 + static int zd1201_get_retry(struct net_device *dev,
28103 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28104 ++ struct iw_request_info *info, union iwreq_data *rrq, char *extra)
28105 + {
28106 + return 0;
28107 + }
28108 +
28109 + static int zd1201_set_encode(struct net_device *dev,
28110 +- struct iw_request_info *info, struct iw_point *erq, char *key)
28111 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *key)
28112 + {
28113 ++ struct iw_point *erq = &wrqu->encoding;
28114 + struct zd1201 *zd = netdev_priv(dev);
28115 + short i;
28116 + int err, rid;
28117 +@@ -1447,8 +1467,9 @@ static int zd1201_set_encode(struct net_device *dev,
28118 + }
28119 +
28120 + static int zd1201_get_encode(struct net_device *dev,
28121 +- struct iw_request_info *info, struct iw_point *erq, char *key)
28122 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *key)
28123 + {
28124 ++ struct iw_point *erq = &wrqu->encoding;
28125 + struct zd1201 *zd = netdev_priv(dev);
28126 + short i;
28127 + int err;
28128 +@@ -1480,8 +1501,9 @@ static int zd1201_get_encode(struct net_device *dev,
28129 + }
28130 +
28131 + static int zd1201_set_power(struct net_device *dev,
28132 +- struct iw_request_info *info, struct iw_param *vwrq, char *extra)
28133 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28134 + {
28135 ++ struct iw_param *vwrq = &wrqu->power;
28136 + struct zd1201 *zd = netdev_priv(dev);
28137 + short enabled, duration, level;
28138 + int err;
28139 +@@ -1519,8 +1541,9 @@ out:
28140 + }
28141 +
28142 + static int zd1201_get_power(struct net_device *dev,
28143 +- struct iw_request_info *info, struct iw_param *vwrq, char *extra)
28144 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28145 + {
28146 ++ struct iw_param *vwrq = &wrqu->power;
28147 + struct zd1201 *zd = netdev_priv(dev);
28148 + short enabled, level, duration;
28149 + int err;
28150 +@@ -1557,57 +1580,58 @@ static int zd1201_get_power(struct net_device *dev,
28151 +
28152 + static const iw_handler zd1201_iw_handler[] =
28153 + {
28154 +- (iw_handler) zd1201_config_commit, /* SIOCSIWCOMMIT */
28155 +- (iw_handler) zd1201_get_name, /* SIOCGIWNAME */
28156 +- (iw_handler) NULL, /* SIOCSIWNWID */
28157 +- (iw_handler) NULL, /* SIOCGIWNWID */
28158 +- (iw_handler) zd1201_set_freq, /* SIOCSIWFREQ */
28159 +- (iw_handler) zd1201_get_freq, /* SIOCGIWFREQ */
28160 +- (iw_handler) zd1201_set_mode, /* SIOCSIWMODE */
28161 +- (iw_handler) zd1201_get_mode, /* SIOCGIWMODE */
28162 +- (iw_handler) NULL, /* SIOCSIWSENS */
28163 +- (iw_handler) NULL, /* SIOCGIWSENS */
28164 +- (iw_handler) NULL, /* SIOCSIWRANGE */
28165 +- (iw_handler) zd1201_get_range, /* SIOCGIWRANGE */
28166 +- (iw_handler) NULL, /* SIOCSIWPRIV */
28167 +- (iw_handler) NULL, /* SIOCGIWPRIV */
28168 +- (iw_handler) NULL, /* SIOCSIWSTATS */
28169 +- (iw_handler) NULL, /* SIOCGIWSTATS */
28170 +- (iw_handler) NULL, /* SIOCSIWSPY */
28171 +- (iw_handler) NULL, /* SIOCGIWSPY */
28172 +- (iw_handler) NULL, /* -- hole -- */
28173 +- (iw_handler) NULL, /* -- hole -- */
28174 +- (iw_handler) NULL/*zd1201_set_wap*/, /* SIOCSIWAP */
28175 +- (iw_handler) zd1201_get_wap, /* SIOCGIWAP */
28176 +- (iw_handler) NULL, /* -- hole -- */
28177 +- (iw_handler) NULL, /* SIOCGIWAPLIST */
28178 +- (iw_handler) zd1201_set_scan, /* SIOCSIWSCAN */
28179 +- (iw_handler) zd1201_get_scan, /* SIOCGIWSCAN */
28180 +- (iw_handler) zd1201_set_essid, /* SIOCSIWESSID */
28181 +- (iw_handler) zd1201_get_essid, /* SIOCGIWESSID */
28182 +- (iw_handler) NULL, /* SIOCSIWNICKN */
28183 +- (iw_handler) zd1201_get_nick, /* SIOCGIWNICKN */
28184 +- (iw_handler) NULL, /* -- hole -- */
28185 +- (iw_handler) NULL, /* -- hole -- */
28186 +- (iw_handler) zd1201_set_rate, /* SIOCSIWRATE */
28187 +- (iw_handler) zd1201_get_rate, /* SIOCGIWRATE */
28188 +- (iw_handler) zd1201_set_rts, /* SIOCSIWRTS */
28189 +- (iw_handler) zd1201_get_rts, /* SIOCGIWRTS */
28190 +- (iw_handler) zd1201_set_frag, /* SIOCSIWFRAG */
28191 +- (iw_handler) zd1201_get_frag, /* SIOCGIWFRAG */
28192 +- (iw_handler) NULL, /* SIOCSIWTXPOW */
28193 +- (iw_handler) NULL, /* SIOCGIWTXPOW */
28194 +- (iw_handler) zd1201_set_retry, /* SIOCSIWRETRY */
28195 +- (iw_handler) zd1201_get_retry, /* SIOCGIWRETRY */
28196 +- (iw_handler) zd1201_set_encode, /* SIOCSIWENCODE */
28197 +- (iw_handler) zd1201_get_encode, /* SIOCGIWENCODE */
28198 +- (iw_handler) zd1201_set_power, /* SIOCSIWPOWER */
28199 +- (iw_handler) zd1201_get_power, /* SIOCGIWPOWER */
28200 ++ zd1201_config_commit, /* SIOCSIWCOMMIT */
28201 ++ zd1201_get_name, /* SIOCGIWNAME */
28202 ++ NULL, /* SIOCSIWNWID */
28203 ++ NULL, /* SIOCGIWNWID */
28204 ++ zd1201_set_freq, /* SIOCSIWFREQ */
28205 ++ zd1201_get_freq, /* SIOCGIWFREQ */
28206 ++ zd1201_set_mode, /* SIOCSIWMODE */
28207 ++ zd1201_get_mode, /* SIOCGIWMODE */
28208 ++ NULL, /* SIOCSIWSENS */
28209 ++ NULL, /* SIOCGIWSENS */
28210 ++ NULL, /* SIOCSIWRANGE */
28211 ++ zd1201_get_range, /* SIOCGIWRANGE */
28212 ++ NULL, /* SIOCSIWPRIV */
28213 ++ NULL, /* SIOCGIWPRIV */
28214 ++ NULL, /* SIOCSIWSTATS */
28215 ++ NULL, /* SIOCGIWSTATS */
28216 ++ NULL, /* SIOCSIWSPY */
28217 ++ NULL, /* SIOCGIWSPY */
28218 ++ NULL, /* -- hole -- */
28219 ++ NULL, /* -- hole -- */
28220 ++ NULL/*zd1201_set_wap*/, /* SIOCSIWAP */
28221 ++ zd1201_get_wap, /* SIOCGIWAP */
28222 ++ NULL, /* -- hole -- */
28223 ++ NULL, /* SIOCGIWAPLIST */
28224 ++ zd1201_set_scan, /* SIOCSIWSCAN */
28225 ++ zd1201_get_scan, /* SIOCGIWSCAN */
28226 ++ zd1201_set_essid, /* SIOCSIWESSID */
28227 ++ zd1201_get_essid, /* SIOCGIWESSID */
28228 ++ NULL, /* SIOCSIWNICKN */
28229 ++ zd1201_get_nick, /* SIOCGIWNICKN */
28230 ++ NULL, /* -- hole -- */
28231 ++ NULL, /* -- hole -- */
28232 ++ zd1201_set_rate, /* SIOCSIWRATE */
28233 ++ zd1201_get_rate, /* SIOCGIWRATE */
28234 ++ zd1201_set_rts, /* SIOCSIWRTS */
28235 ++ zd1201_get_rts, /* SIOCGIWRTS */
28236 ++ zd1201_set_frag, /* SIOCSIWFRAG */
28237 ++ zd1201_get_frag, /* SIOCGIWFRAG */
28238 ++ NULL, /* SIOCSIWTXPOW */
28239 ++ NULL, /* SIOCGIWTXPOW */
28240 ++ zd1201_set_retry, /* SIOCSIWRETRY */
28241 ++ zd1201_get_retry, /* SIOCGIWRETRY */
28242 ++ zd1201_set_encode, /* SIOCSIWENCODE */
28243 ++ zd1201_get_encode, /* SIOCGIWENCODE */
28244 ++ zd1201_set_power, /* SIOCSIWPOWER */
28245 ++ zd1201_get_power, /* SIOCGIWPOWER */
28246 + };
28247 +
28248 + static int zd1201_set_hostauth(struct net_device *dev,
28249 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28250 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28251 + {
28252 ++ struct iw_param *rrq = &wrqu->param;
28253 + struct zd1201 *zd = netdev_priv(dev);
28254 +
28255 + if (!zd->ap)
28256 +@@ -1617,8 +1641,9 @@ static int zd1201_set_hostauth(struct net_device *dev,
28257 + }
28258 +
28259 + static int zd1201_get_hostauth(struct net_device *dev,
28260 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28261 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28262 + {
28263 ++ struct iw_param *rrq = &wrqu->param;
28264 + struct zd1201 *zd = netdev_priv(dev);
28265 + short hostauth;
28266 + int err;
28267 +@@ -1636,8 +1661,9 @@ static int zd1201_get_hostauth(struct net_device *dev,
28268 + }
28269 +
28270 + static int zd1201_auth_sta(struct net_device *dev,
28271 +- struct iw_request_info *info, struct sockaddr *sta, char *extra)
28272 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28273 + {
28274 ++ struct sockaddr *sta = &wrqu->addr;
28275 + struct zd1201 *zd = netdev_priv(dev);
28276 + unsigned char buffer[10];
28277 +
28278 +@@ -1652,8 +1678,9 @@ static int zd1201_auth_sta(struct net_device *dev,
28279 + }
28280 +
28281 + static int zd1201_set_maxassoc(struct net_device *dev,
28282 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28283 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28284 + {
28285 ++ struct iw_param *rrq = &wrqu->param;
28286 + struct zd1201 *zd = netdev_priv(dev);
28287 + int err;
28288 +
28289 +@@ -1667,8 +1694,9 @@ static int zd1201_set_maxassoc(struct net_device *dev,
28290 + }
28291 +
28292 + static int zd1201_get_maxassoc(struct net_device *dev,
28293 +- struct iw_request_info *info, struct iw_param *rrq, char *extra)
28294 ++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
28295 + {
28296 ++ struct iw_param *rrq = &wrqu->param;
28297 + struct zd1201 *zd = netdev_priv(dev);
28298 + short maxassoc;
28299 + int err;
28300 +@@ -1686,12 +1714,12 @@ static int zd1201_get_maxassoc(struct net_device *dev,
28301 + }
28302 +
28303 + static const iw_handler zd1201_private_handler[] = {
28304 +- (iw_handler) zd1201_set_hostauth, /* ZD1201SIWHOSTAUTH */
28305 +- (iw_handler) zd1201_get_hostauth, /* ZD1201GIWHOSTAUTH */
28306 +- (iw_handler) zd1201_auth_sta, /* ZD1201SIWAUTHSTA */
28307 +- (iw_handler) NULL, /* nothing to get */
28308 +- (iw_handler) zd1201_set_maxassoc, /* ZD1201SIMAXASSOC */
28309 +- (iw_handler) zd1201_get_maxassoc, /* ZD1201GIMAXASSOC */
28310 ++ zd1201_set_hostauth, /* ZD1201SIWHOSTAUTH */
28311 ++ zd1201_get_hostauth, /* ZD1201GIWHOSTAUTH */
28312 ++ zd1201_auth_sta, /* ZD1201SIWAUTHSTA */
28313 ++ NULL, /* nothing to get */
28314 ++ zd1201_set_maxassoc, /* ZD1201SIMAXASSOC */
28315 ++ zd1201_get_maxassoc, /* ZD1201GIMAXASSOC */
28316 + };
28317 +
28318 + static const struct iw_priv_args zd1201_private_args[] = {
28319 +diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
28320 index a912dc0..a8225ba 100644
28321 ---- a/drivers/net/wireless/zd1211rw/zd_usb.c
28322 -+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
28323 +--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
28324 ++++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
28325 @@ -385,7 +385,7 @@ static inline void handle_regs_int(struct urb *urb)
28326 {
28327 struct zd_usb *usb = urb->context;
28328 @@ -54826,6 +65397,19 @@ index a912dc0..a8225ba 100644
28329 u16 int_num;
28330
28331 ZD_ASSERT(in_interrupt());
28332 +diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
28333 +index 680f578..cf80097 100644
28334 +--- a/drivers/nvme/host/pci.c
28335 ++++ b/drivers/nvme/host/pci.c
28336 +@@ -2183,7 +2183,7 @@ static int nvme_resume(struct device *dev)
28337 + static SIMPLE_DEV_PM_OPS(nvme_dev_pm_ops, nvme_suspend, nvme_resume);
28338 +
28339 + static pci_ers_result_t nvme_error_detected(struct pci_dev *pdev,
28340 +- pci_channel_state_t state)
28341 ++ enum pci_channel_state state)
28342 + {
28343 + struct nvme_dev *dev = pci_get_drvdata(pdev);
28344 +
28345 diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
28346 index 655f79d..509e3cd 100644
28347 --- a/drivers/of/fdt.c
28348 @@ -54949,20 +65533,9 @@ index 1fc622b..8c48fc3 100644
28349
28350 extern struct oprofile_stat_struct oprofile_stats;
28351 diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
28352 -index dd92c5e..dfc04b5 100644
28353 +index b48ac630..df1b012 100644
28354 --- a/drivers/oprofile/oprofilefs.c
28355 +++ b/drivers/oprofile/oprofilefs.c
28356 -@@ -176,8 +176,8 @@ int oprofilefs_create_ro_ulong(struct dentry *root,
28357 -
28358 - static ssize_t atomic_read_file(struct file *file, char __user *buf, size_t count, loff_t *offset)
28359 - {
28360 -- atomic_t *val = file->private_data;
28361 -- return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset);
28362 -+ atomic_unchecked_t *val = file->private_data;
28363 -+ return oprofilefs_ulong_to_user(atomic_read_unchecked(val), buf, count, offset);
28364 - }
28365 -
28366 -
28367 @@ -189,7 +189,7 @@ static const struct file_operations atomic_ro_fops = {
28368
28369
28370 @@ -55008,7 +65581,7 @@ index c776333..aa6b325 100644
28371 #endif /* IEEE1284.3 support. */
28372
28373 diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
28374 -index 5434c90..c7f4ead 100644
28375 +index 1652bc7..4f999c4 100644
28376 --- a/drivers/pci/host/pci-host-generic.c
28377 +++ b/drivers/pci/host/pci-host-generic.c
28378 @@ -28,7 +28,7 @@
28379 @@ -55021,10 +65594,10 @@ index 5434c90..c7f4ead 100644
28380 struct gen_pci_cfg_windows {
28381 struct resource res;
28382 diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
28383 -index 6ca2399..68d866b 100644
28384 +index 2f6d3a1..5bc1bf1 100644
28385 --- a/drivers/pci/hotplug/acpiphp_ibm.c
28386 +++ b/drivers/pci/hotplug/acpiphp_ibm.c
28387 -@@ -452,7 +452,9 @@ static int __init ibm_acpiphp_init(void)
28388 +@@ -463,7 +463,9 @@ static int __init ibm_acpiphp_init(void)
28389 goto init_cleanup;
28390 }
28391
28392 @@ -55036,7 +65609,7 @@ index 6ca2399..68d866b 100644
28393
28394 return retval;
28395 diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
28396 -index 66b7bbe..26bee78 100644
28397 +index 88a44a7..de358ce 100644
28398 --- a/drivers/pci/hotplug/cpcihp_generic.c
28399 +++ b/drivers/pci/hotplug/cpcihp_generic.c
28400 @@ -73,7 +73,6 @@ static u16 port;
28401 @@ -55061,13 +65634,13 @@ index 66b7bbe..26bee78 100644
28402 @@ -165,7 +168,6 @@ static int __init cpcihp_generic_init(void)
28403 pci_dev_put(dev);
28404
28405 - memset(&generic_hpc, 0, sizeof (struct cpci_hp_controller));
28406 + memset(&generic_hpc, 0, sizeof(struct cpci_hp_controller));
28407 - generic_hpc_ops.query_enum = query_enum;
28408 generic_hpc.ops = &generic_hpc_ops;
28409
28410 status = cpci_hp_register_controller(&generic_hpc);
28411 diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
28412 -index 7ecf34e..effed62 100644
28413 +index 5f49c3f..989cd41 100644
28414 --- a/drivers/pci/hotplug/cpcihp_zt5550.c
28415 +++ b/drivers/pci/hotplug/cpcihp_zt5550.c
28416 @@ -59,7 +59,6 @@
28417 @@ -55086,13 +65659,13 @@ index 7ecf34e..effed62 100644
28418 + .query_enum = zt5550_hc_query_enum,
28419 +};
28420 +
28421 - static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
28422 + static int zt5550_hc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
28423 {
28424 int status;
28425 -@@ -215,16 +218,17 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
28426 +@@ -215,16 +218,17 @@ static int zt5550_hc_init_one(struct pci_dev *pdev, const struct pci_device_id *
28427 dbg("returned from zt5550_hc_config");
28428
28429 - memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller));
28430 + memset(&zt5550_hpc, 0, sizeof(struct cpci_hp_controller));
28431 - zt5550_hpc_ops.query_enum = zt5550_hc_query_enum;
28432 zt5550_hpc.ops = &zt5550_hpc_ops;
28433 if (!poll) {
28434 @@ -55112,12 +65685,12 @@ index 7ecf34e..effed62 100644
28435 info("using ENUM# polling mode");
28436 }
28437 diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
28438 -index 1e08ff8c..3cd145f 100644
28439 +index c25fc90..b054774 100644
28440 --- a/drivers/pci/hotplug/cpqphp_nvram.c
28441 +++ b/drivers/pci/hotplug/cpqphp_nvram.c
28442 -@@ -425,8 +425,10 @@ static u32 store_HRT (void __iomem *rom_start)
28443 +@@ -425,8 +425,10 @@ static u32 store_HRT(void __iomem *rom_start)
28444
28445 - void compaq_nvram_init (void __iomem *rom_start)
28446 + void compaq_nvram_init(void __iomem *rom_start)
28447 {
28448 +#ifndef CONFIG_PAX_KERNEXEC
28449 if (rom_start)
28450 @@ -55127,10 +65700,10 @@ index 1e08ff8c..3cd145f 100644
28451 dbg("int15 entry = %p\n", compaq_int15_entry_point);
28452
28453 diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
28454 -index d1fab97..71d04bf 100644
28455 +index 9acd199..0645a09 100644
28456 --- a/drivers/pci/hotplug/pci_hotplug_core.c
28457 +++ b/drivers/pci/hotplug/pci_hotplug_core.c
28458 -@@ -436,8 +436,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
28459 +@@ -434,8 +434,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
28460 return -EINVAL;
28461 }
28462
28463 @@ -55144,7 +65717,7 @@ index d1fab97..71d04bf 100644
28464 mutex_lock(&pci_hp_mutex);
28465 /*
28466 diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
28467 -index 612b21a..9494a5e 100644
28468 +index ac531e6..716d058 100644
28469 --- a/drivers/pci/hotplug/pciehp_core.c
28470 +++ b/drivers/pci/hotplug/pciehp_core.c
28471 @@ -87,7 +87,7 @@ static int init_slot(struct controller *ctrl)
28472 @@ -55157,10 +65730,10 @@ index 612b21a..9494a5e 100644
28473 int retval = -ENOMEM;
28474
28475 diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
28476 -index 7eaa4c8..b858f21 100644
28477 +index a080f44..9ff42d9 100644
28478 --- a/drivers/pci/msi.c
28479 +++ b/drivers/pci/msi.c
28480 -@@ -472,8 +472,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
28481 +@@ -474,8 +474,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
28482 {
28483 struct attribute **msi_attrs;
28484 struct attribute *msi_attr;
28485 @@ -55171,7 +65744,7 @@ index 7eaa4c8..b858f21 100644
28486 const struct attribute_group **msi_irq_groups;
28487 struct msi_desc *entry;
28488 int ret = -ENOMEM;
28489 -@@ -535,7 +535,7 @@ error_attrs:
28490 +@@ -537,7 +537,7 @@ error_attrs:
28491 count = 0;
28492 msi_attr = msi_attrs[count];
28493 while (msi_attr) {
28494 @@ -55180,7 +65753,7 @@ index 7eaa4c8..b858f21 100644
28495 kfree(msi_attr->name);
28496 kfree(msi_dev_attr);
28497 ++count;
28498 -@@ -1234,12 +1234,14 @@ static void pci_msi_domain_update_dom_ops(struct msi_domain_info *info)
28499 +@@ -1233,12 +1233,14 @@ static void pci_msi_domain_update_dom_ops(struct msi_domain_info *info)
28500 if (ops == NULL) {
28501 info->ops = &pci_msi_domain_ops_default;
28502 } else {
28503 @@ -55198,7 +65771,7 @@ index 7eaa4c8..b858f21 100644
28504 }
28505 }
28506
28507 -@@ -1248,12 +1250,14 @@ static void pci_msi_domain_update_chip_ops(struct msi_domain_info *info)
28508 +@@ -1247,12 +1249,14 @@ static void pci_msi_domain_update_chip_ops(struct msi_domain_info *info)
28509 struct irq_chip *chip = info->chip;
28510
28511 BUG_ON(!chip);
28512 @@ -55217,10 +65790,10 @@ index 7eaa4c8..b858f21 100644
28513
28514 /**
28515 diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
28516 -index eead54c..a611b6c 100644
28517 +index 95d9e7b..f0ad49e 100644
28518 --- a/drivers/pci/pci-sysfs.c
28519 +++ b/drivers/pci/pci-sysfs.c
28520 -@@ -1143,7 +1143,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
28521 +@@ -1133,7 +1133,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
28522 {
28523 /* allocate attribute structure, piggyback attribute name */
28524 int name_len = write_combine ? 13 : 10;
28525 @@ -55229,7 +65802,7 @@ index eead54c..a611b6c 100644
28526 int retval;
28527
28528 res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
28529 -@@ -1320,7 +1320,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor
28530 +@@ -1310,7 +1310,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor
28531 static int pci_create_capabilities_sysfs(struct pci_dev *dev)
28532 {
28533 int retval;
28534 @@ -55238,7 +65811,7 @@ index eead54c..a611b6c 100644
28535
28536 /* If the device has VPD, try to expose it in sysfs. */
28537 if (dev->vpd) {
28538 -@@ -1367,7 +1367,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
28539 +@@ -1357,7 +1357,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
28540 {
28541 int retval;
28542 int rom_size = 0;
28543 @@ -55248,7 +65821,7 @@ index eead54c..a611b6c 100644
28544 if (!sysfs_initialized)
28545 return -EACCES;
28546 diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
28547 -index d390fc1..d410fda 100644
28548 +index 9a1660f..278d340 100644
28549 --- a/drivers/pci/pci.h
28550 +++ b/drivers/pci/pci.h
28551 @@ -103,7 +103,7 @@ struct pci_vpd_ops {
28552 @@ -55260,8 +65833,17 @@ index d390fc1..d410fda 100644
28553 };
28554
28555 int pci_vpd_pci22_init(struct pci_dev *dev);
28556 +@@ -302,7 +302,7 @@ static inline int pci_iov_bus_range(struct pci_bus *bus)
28557 +
28558 + #endif /* CONFIG_PCI_IOV */
28559 +
28560 +-unsigned long pci_cardbus_resource_alignment(struct resource *);
28561 ++unsigned long pci_cardbus_resource_alignment(const struct resource *);
28562 +
28563 + static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,
28564 + struct resource *res)
28565 diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
28566 -index 317e355..21f7b91 100644
28567 +index 2dfe7fd..61f8677 100644
28568 --- a/drivers/pci/pcie/aspm.c
28569 +++ b/drivers/pci/pcie/aspm.c
28570 @@ -27,9 +27,9 @@
28571 @@ -55277,6 +65859,24 @@ index 317e355..21f7b91 100644
28572 #define ASPM_STATE_L0S (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)
28573 #define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1)
28574
28575 +@@ -775,7 +775,7 @@ void pci_disable_link_state(struct pci_dev *pdev, int state)
28576 + }
28577 + EXPORT_SYMBOL(pci_disable_link_state);
28578 +
28579 +-static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
28580 ++static int pcie_aspm_set_policy(const char *val, const struct kernel_param *kp)
28581 + {
28582 + int i;
28583 + struct pcie_link_state *link;
28584 +@@ -802,7 +802,7 @@ static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
28585 + return 0;
28586 + }
28587 +
28588 +-static int pcie_aspm_get_policy(char *buffer, struct kernel_param *kp)
28589 ++static int pcie_aspm_get_policy(char *buffer, const struct kernel_param *kp)
28590 + {
28591 + int i, cnt = 0;
28592 + for (i = 0; i < ARRAY_SIZE(policy_str); i++)
28593 diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
28594 index be35da2..ec16cdb 100644
28595 --- a/drivers/pci/pcie/portdrv_pci.c
28596 @@ -55291,7 +65891,7 @@ index be35da2..ec16cdb 100644
28597 * Boxes that should not use MSI for PCIe PME signaling.
28598 */
28599 diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
28600 -index 7aafb5f..8fbfd44 100644
28601 +index 6b0056e..c8105d5 100644
28602 --- a/drivers/pci/probe.c
28603 +++ b/drivers/pci/probe.c
28604 @@ -182,7 +182,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
28605 @@ -55324,11 +65924,24 @@ index 3f155e7..0f4b1f0 100644
28606 proc_create("devices", 0, proc_bus_pci_dir,
28607 &proc_bus_pci_dev_operations);
28608 proc_initialized = 1;
28609 +diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
28610 +index 7796d0a..c83b0ae 100644
28611 +--- a/drivers/pci/setup-bus.c
28612 ++++ b/drivers/pci/setup-bus.c
28613 +@@ -1115,7 +1115,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
28614 + return 0;
28615 + }
28616 +
28617 +-unsigned long pci_cardbus_resource_alignment(struct resource *res)
28618 ++unsigned long pci_cardbus_resource_alignment(const struct resource *res)
28619 + {
28620 + if (res->flags & IORESOURCE_IO)
28621 + return pci_cardbus_io_size;
28622 diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
28623 -index f844b4a..5e43134 100644
28624 +index c8969dd..4764267 100644
28625 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
28626 +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
28627 -@@ -1212,7 +1212,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
28628 +@@ -1207,7 +1207,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
28629 struct device_node *np = dev->dev.of_node;
28630 struct nmk_gpio_chip *nmk_chip;
28631 struct gpio_chip *chip;
28632 @@ -55338,7 +65951,7 @@ index f844b4a..5e43134 100644
28633 bool supports_sleepmode;
28634 int irq;
28635 diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
28636 -index 0d2fc0c..6f9ff62 100644
28637 +index 523b6b7..e9aa88d 100644
28638 --- a/drivers/pinctrl/pinctrl-at91.c
28639 +++ b/drivers/pinctrl/pinctrl-at91.c
28640 @@ -24,6 +24,7 @@
28641 @@ -55349,7 +65962,7 @@ index 0d2fc0c..6f9ff62 100644
28642
28643 #include "pinctrl-at91.h"
28644 #include "core.h"
28645 -@@ -1613,7 +1614,9 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
28646 +@@ -1609,7 +1610,9 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
28647 at91_gpio->pioc_hwirq = irqd_to_hwirq(d);
28648
28649 /* Setup proper .irq_set_type function */
28650 @@ -55395,11 +66008,24 @@ index 1e1e594..8fe59c5 100644
28651 .name = "rgb_zones",
28652 };
28653
28654 +diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
28655 +index f236250..6b4d0a9 100644
28656 +--- a/drivers/platform/x86/apple-gmux.c
28657 ++++ b/drivers/platform/x86/apple-gmux.c
28658 +@@ -425,7 +425,7 @@ static int gmux_set_power_state(enum vga_switcheroo_client_id id,
28659 + return gmux_set_discrete_state(apple_gmux_data, state);
28660 + }
28661 +
28662 +-static int gmux_get_client_id(struct pci_dev *pdev)
28663 ++static enum vga_switcheroo_client_id gmux_get_client_id(struct pci_dev *pdev)
28664 + {
28665 + /*
28666 + * Early Macbook Pros with switchable graphics use nvidia
28667 diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
28668 -index f96f7b8..2d17b99 100644
28669 +index a96630d..0fe8410 100644
28670 --- a/drivers/platform/x86/asus-wmi.c
28671 +++ b/drivers/platform/x86/asus-wmi.c
28672 -@@ -1870,6 +1870,10 @@ static int show_dsts(struct seq_file *m, void *data)
28673 +@@ -1867,6 +1867,10 @@ static int show_dsts(struct seq_file *m, void *data)
28674 int err;
28675 u32 retval = -1;
28676
28677 @@ -55410,7 +66036,7 @@ index f96f7b8..2d17b99 100644
28678 err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval);
28679
28680 if (err < 0)
28681 -@@ -1886,6 +1890,10 @@ static int show_devs(struct seq_file *m, void *data)
28682 +@@ -1883,6 +1887,10 @@ static int show_devs(struct seq_file *m, void *data)
28683 int err;
28684 u32 retval = -1;
28685
28686 @@ -55421,7 +66047,7 @@ index f96f7b8..2d17b99 100644
28687 err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param,
28688 &retval);
28689
28690 -@@ -1910,6 +1918,10 @@ static int show_call(struct seq_file *m, void *data)
28691 +@@ -1907,6 +1915,10 @@ static int show_call(struct seq_file *m, void *data)
28692 union acpi_object *obj;
28693 acpi_status status;
28694
28695 @@ -55558,10 +66184,10 @@ index e6aac72..e11ff24 100644
28696 .ident = "Samsung Q10",
28697 .matches = {
28698 diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
28699 -index f73c295..711e2f4 100644
28700 +index e9caa34..72ed655 100644
28701 --- a/drivers/platform/x86/sony-laptop.c
28702 +++ b/drivers/platform/x86/sony-laptop.c
28703 -@@ -2528,7 +2528,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd)
28704 +@@ -2553,7 +2553,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd)
28705 }
28706
28707 /* High speed charging function */
28708 @@ -55570,7 +66196,7 @@ index f73c295..711e2f4 100644
28709
28710 static ssize_t sony_nc_highspeed_charging_store(struct device *dev,
28711 struct device_attribute *attr,
28712 -@@ -2602,7 +2602,7 @@ static void sony_nc_highspeed_charging_cleanup(struct platform_device *pd)
28713 +@@ -2627,7 +2627,7 @@ static void sony_nc_highspeed_charging_cleanup(struct platform_device *pd)
28714 }
28715
28716 /* low battery function */
28717 @@ -55579,7 +66205,7 @@ index f73c295..711e2f4 100644
28718
28719 static ssize_t sony_nc_lowbatt_store(struct device *dev,
28720 struct device_attribute *attr,
28721 -@@ -2668,7 +2668,7 @@ static void sony_nc_lowbatt_cleanup(struct platform_device *pd)
28722 +@@ -2693,7 +2693,7 @@ static void sony_nc_lowbatt_cleanup(struct platform_device *pd)
28723 }
28724
28725 /* fan speed function */
28726 @@ -55588,7 +66214,7 @@ index f73c295..711e2f4 100644
28727
28728 static ssize_t sony_nc_hsfan_store(struct device *dev,
28729 struct device_attribute *attr,
28730 -@@ -2775,7 +2775,7 @@ static void sony_nc_fanspeed_cleanup(struct platform_device *pd)
28731 +@@ -2800,7 +2800,7 @@ static void sony_nc_fanspeed_cleanup(struct platform_device *pd)
28732 }
28733
28734 /* USB charge function */
28735 @@ -55597,7 +66223,7 @@ index f73c295..711e2f4 100644
28736
28737 static ssize_t sony_nc_usb_charge_store(struct device *dev,
28738 struct device_attribute *attr,
28739 -@@ -2849,7 +2849,7 @@ static void sony_nc_usb_charge_cleanup(struct platform_device *pd)
28740 +@@ -2874,7 +2874,7 @@ static void sony_nc_usb_charge_cleanup(struct platform_device *pd)
28741 }
28742
28743 /* Panel ID function */
28744 @@ -55606,7 +66232,7 @@ index f73c295..711e2f4 100644
28745
28746 static ssize_t sony_nc_panelid_show(struct device *dev,
28747 struct device_attribute *attr, char *buffer)
28748 -@@ -2896,7 +2896,7 @@ static void sony_nc_panelid_cleanup(struct platform_device *pd)
28749 +@@ -2921,7 +2921,7 @@ static void sony_nc_panelid_cleanup(struct platform_device *pd)
28750 }
28751
28752 /* smart connect function */
28753 @@ -55615,7 +66241,7 @@ index f73c295..711e2f4 100644
28754
28755 static ssize_t sony_nc_smart_conn_store(struct device *dev,
28756 struct device_attribute *attr,
28757 -@@ -4852,7 +4852,7 @@ static struct acpi_driver sony_pic_driver = {
28758 +@@ -4877,7 +4877,7 @@ static struct acpi_driver sony_pic_driver = {
28759 .drv.pm = &sony_pic_pm,
28760 };
28761
28762 @@ -55625,10 +66251,10 @@ index f73c295..711e2f4 100644
28763 .ident = "Sony Vaio",
28764 .matches = {
28765 diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
28766 -index 0bed473..c867ae2 100644
28767 +index a268a7a..67a0be4 100644
28768 --- a/drivers/platform/x86/thinkpad_acpi.c
28769 +++ b/drivers/platform/x86/thinkpad_acpi.c
28770 -@@ -2460,10 +2460,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
28771 +@@ -2461,10 +2461,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
28772 && !tp_features.bright_unkfw)
28773 TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_FNHOME);
28774 }
28775 @@ -55640,6 +66266,50 @@ index 0bed473..c867ae2 100644
28776
28777 /*
28778 * Polling driver
28779 +@@ -4164,7 +4164,7 @@ static int bluetooth_get_status(void)
28780 + TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
28781 + }
28782 +
28783 +-static int bluetooth_set_status(enum tpacpi_rfkill_state state)
28784 ++static int bluetooth_set_status(const enum tpacpi_rfkill_state state)
28785 + {
28786 + int status;
28787 +
28788 +@@ -4221,6 +4221,7 @@ static const struct attribute_group bluetooth_attr_group = {
28789 + .attrs = bluetooth_attributes,
28790 + };
28791 +
28792 ++const struct tpacpi_rfk_ops bluetooth_tprfk_ops_;
28793 + static const struct tpacpi_rfk_ops bluetooth_tprfk_ops = {
28794 + .get_status = bluetooth_get_status,
28795 + .set_status = bluetooth_set_status,
28796 +@@ -4352,7 +4353,7 @@ static int wan_get_status(void)
28797 + TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
28798 + }
28799 +
28800 +-static int wan_set_status(enum tpacpi_rfkill_state state)
28801 ++static int wan_set_status(const enum tpacpi_rfkill_state state)
28802 + {
28803 + int status;
28804 +
28805 +@@ -4538,7 +4539,7 @@ static int uwb_get_status(void)
28806 + TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
28807 + }
28808 +
28809 +-static int uwb_set_status(enum tpacpi_rfkill_state state)
28810 ++static int uwb_set_status(const enum tpacpi_rfkill_state state)
28811 + {
28812 + int status;
28813 +
28814 +@@ -9450,7 +9451,7 @@ static struct ibm_init_struct ibms_init[] __initdata = {
28815 + },
28816 + };
28817 +
28818 +-static int __init set_ibm_param(const char *val, struct kernel_param *kp)
28819 ++static int __init set_ibm_param(const char *val, const struct kernel_param *kp)
28820 + {
28821 + unsigned int i;
28822 + struct ibm_struct *ibm;
28823 diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
28824 index 438d4c7..ca8a2fb 100644
28825 --- a/drivers/pnp/pnpbios/bioscalls.c
28826 @@ -55807,7 +66477,7 @@ index ed2d7fd..266b28f 100644
28827 __power_supply_attrs[i] = &power_supply_attrs[i].attr;
28828 }
28829 diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
28830 -index 3f6b5dd..02c9986 100644
28831 +index 1b5d450..3257054 100644
28832 --- a/drivers/power/reset/at91-reset.c
28833 +++ b/drivers/power/reset/at91-reset.c
28834 @@ -17,6 +17,7 @@
28835 @@ -55818,7 +66488,7 @@ index 3f6b5dd..02c9986 100644
28836
28837 #include <soc/at91/at91sam9_ddrsdr.h>
28838 #include <soc/at91/at91sam9_sdramc.h>
28839 -@@ -205,7 +206,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
28840 +@@ -206,7 +207,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
28841 }
28842
28843 match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
28844 @@ -55830,7 +66500,7 @@ index 3f6b5dd..02c9986 100644
28845 sclk = devm_clk_get(&pdev->dev, NULL);
28846 if (IS_ERR(sclk))
28847 diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
28848 -index 84419af..268ede8 100644
28849 +index 14bde0d..89f2669 100644
28850 --- a/drivers/powercap/powercap_sys.c
28851 +++ b/drivers/powercap/powercap_sys.c
28852 @@ -154,8 +154,77 @@ struct powercap_constraint_attr {
28853 @@ -56045,10 +66715,10 @@ index 302e626..12579af 100644
28854 da->attr.name = info->pin_config[i].name;
28855 da->attr.mode = 0644;
28856 diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
28857 -index 7b94b8e..1b35017 100644
28858 +index 744c988..a269ffb 100644
28859 --- a/drivers/regulator/core.c
28860 +++ b/drivers/regulator/core.c
28861 -@@ -3842,7 +3842,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
28862 +@@ -3839,7 +3839,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
28863 const struct regulation_constraints *constraints = NULL;
28864 const struct regulator_init_data *init_data;
28865 struct regulator_config *config = NULL;
28866 @@ -56057,7 +66727,7 @@ index 7b94b8e..1b35017 100644
28867 struct regulator_dev *rdev;
28868 struct device *dev;
28869 int ret, i;
28870 -@@ -3925,7 +3925,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
28871 +@@ -3922,7 +3922,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
28872 rdev->dev.class = &regulator_class;
28873 rdev->dev.parent = dev;
28874 dev_set_name(&rdev->dev, "regulator.%lu",
28875 @@ -56137,6 +66807,96 @@ index 0d17c92..a29f627 100644
28876 mc13892_regulators[MC13892_VCAM].desc.ops = &mc13892_vcam_ops;
28877
28878 mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators,
28879 +diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
28880 +index 9e03d15..36e341c 100644
28881 +--- a/drivers/remoteproc/remoteproc_core.c
28882 ++++ b/drivers/remoteproc/remoteproc_core.c
28883 +@@ -327,9 +327,10 @@ void rproc_free_vring(struct rproc_vring *rvring)
28884 + *
28885 + * Returns 0 on success, or an appropriate error code otherwise
28886 + */
28887 +-static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
28888 ++static int rproc_handle_vdev(struct rproc *rproc, void *_rsc,
28889 + int offset, int avail)
28890 + {
28891 ++ struct fw_rsc_vdev *rsc = _rsc;
28892 + struct device *dev = &rproc->dev;
28893 + struct rproc_vdev *rvdev;
28894 + int i, ret;
28895 +@@ -404,9 +405,10 @@ free_rvdev:
28896 + *
28897 + * Returns 0 on success, or an appropriate error code otherwise
28898 + */
28899 +-static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
28900 ++static int rproc_handle_trace(struct rproc *rproc, void *_rsc,
28901 + int offset, int avail)
28902 + {
28903 ++ struct fw_rsc_trace *rsc = _rsc;
28904 + struct rproc_mem_entry *trace;
28905 + struct device *dev = &rproc->dev;
28906 + void *ptr;
28907 +@@ -484,9 +486,10 @@ static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
28908 + * and not allow firmwares to request access to physical addresses that
28909 + * are outside those ranges.
28910 + */
28911 +-static int rproc_handle_devmem(struct rproc *rproc, struct fw_rsc_devmem *rsc,
28912 ++static int rproc_handle_devmem(struct rproc *rproc, void *_rsc,
28913 + int offset, int avail)
28914 + {
28915 ++ struct fw_rsc_devmem *rsc = _rsc;
28916 + struct rproc_mem_entry *mapping;
28917 + struct device *dev = &rproc->dev;
28918 + int ret;
28919 +@@ -556,10 +559,11 @@ out:
28920 + * pressure is important; it may have a substantial impact on performance.
28921 + */
28922 + static int rproc_handle_carveout(struct rproc *rproc,
28923 +- struct fw_rsc_carveout *rsc,
28924 ++ void *_rsc,
28925 + int offset, int avail)
28926 +
28927 + {
28928 ++ struct fw_rsc_carveout *rsc = _rsc;
28929 + struct rproc_mem_entry *carveout, *mapping;
28930 + struct device *dev = &rproc->dev;
28931 + dma_addr_t dma;
28932 +@@ -678,9 +682,11 @@ free_carv:
28933 + return ret;
28934 + }
28935 +
28936 +-static int rproc_count_vrings(struct rproc *rproc, struct fw_rsc_vdev *rsc,
28937 ++static int rproc_count_vrings(struct rproc *rproc, void *_rsc,
28938 + int offset, int avail)
28939 + {
28940 ++ struct fw_rsc_vdev *rsc = _rsc;
28941 ++
28942 + /* Summarize the number of notification IDs */
28943 + rproc->max_notifyid += rsc->num_of_vrings;
28944 +
28945 +@@ -692,18 +698,18 @@ static int rproc_count_vrings(struct rproc *rproc, struct fw_rsc_vdev *rsc,
28946 + * enum fw_resource_type.
28947 + */
28948 + static rproc_handle_resource_t rproc_loading_handlers[RSC_LAST] = {
28949 +- [RSC_CARVEOUT] = (rproc_handle_resource_t)rproc_handle_carveout,
28950 +- [RSC_DEVMEM] = (rproc_handle_resource_t)rproc_handle_devmem,
28951 +- [RSC_TRACE] = (rproc_handle_resource_t)rproc_handle_trace,
28952 ++ [RSC_CARVEOUT] = rproc_handle_carveout,
28953 ++ [RSC_DEVMEM] = rproc_handle_devmem,
28954 ++ [RSC_TRACE] = rproc_handle_trace,
28955 + [RSC_VDEV] = NULL, /* VDEVs were handled upon registrarion */
28956 + };
28957 +
28958 + static rproc_handle_resource_t rproc_vdev_handler[RSC_LAST] = {
28959 +- [RSC_VDEV] = (rproc_handle_resource_t)rproc_handle_vdev,
28960 ++ [RSC_VDEV] = rproc_handle_vdev,
28961 + };
28962 +
28963 + static rproc_handle_resource_t rproc_count_vrings_handler[RSC_LAST] = {
28964 +- [RSC_VDEV] = (rproc_handle_resource_t)rproc_count_vrings,
28965 ++ [RSC_VDEV] = rproc_count_vrings,
28966 + };
28967 +
28968 + /* handle firmware resource entries before booting the remote processor */
28969 diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
28970 index 9a3f2a6..604f463 100644
28971 --- a/drivers/rtc/rtc-armada38x.c
28972 @@ -56163,7 +66923,7 @@ index 9a3f2a6..604f463 100644
28973 platform_set_drvdata(pdev, rtc);
28974 if (rtc->irq != -1)
28975 diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
28976 -index 8f7034b..2ddd4b3 100644
28977 +index 84fb541..fee0421a 100644
28978 --- a/drivers/rtc/rtc-cmos.c
28979 +++ b/drivers/rtc/rtc-cmos.c
28980 @@ -735,7 +735,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
28981 @@ -56199,7 +66959,7 @@ index a6d9434..dc26b71 100644
28982
28983 case RTC_PIE_ON:
28984 diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
28985 -index aa705bb..629dbb4 100644
28986 +index cf685f6..2311b8f 100644
28987 --- a/drivers/rtc/rtc-ds1307.c
28988 +++ b/drivers/rtc/rtc-ds1307.c
28989 @@ -107,7 +107,7 @@ struct ds1307 {
28990 @@ -56227,7 +66987,7 @@ index d99a705..f8ebd79 100644
28991 ret = sysfs_create_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr);
28992 if (ret)
28993 diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
28994 -index e7329e2..6160c59 100644
28995 +index 7155c08..10ba718 100644
28996 --- a/drivers/rtc/rtc-rv8803.c
28997 +++ b/drivers/rtc/rtc-rv8803.c
28998 @@ -423,6 +423,15 @@ static struct rtc_class_ops rv8803_rtc_ops = {
28999 @@ -56263,6 +67023,25 @@ index e7329e2..6160c59 100644
29000 if (IS_ERR(rv8803->rtc)) {
29001 dev_err(&client->dev, "unable to register the class device\n");
29002 return PTR_ERR(rv8803->rtc);
29003 +diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c
29004 +index 772d221..60e31aa 100644
29005 +--- a/drivers/rtc/rtc-rx8010.c
29006 ++++ b/drivers/rtc/rtc-rx8010.c
29007 +@@ -489,9 +489,11 @@ static int rx8010_probe(struct i2c_client *client,
29008 + dev_err(&client->dev, "unable to request IRQ\n");
29009 + client->irq = 0;
29010 + } else {
29011 +- rx8010_rtc_ops.read_alarm = rx8010_read_alarm;
29012 +- rx8010_rtc_ops.set_alarm = rx8010_set_alarm;
29013 +- rx8010_rtc_ops.alarm_irq_enable = rx8010_alarm_irq_enable;
29014 ++ pax_open_kernel();
29015 ++ *(void **)&rx8010_rtc_ops.read_alarm = rx8010_read_alarm;
29016 ++ *(void **)&rx8010_rtc_ops.set_alarm = rx8010_set_alarm;
29017 ++ *(void **)&rx8010_rtc_ops.alarm_irq_enable = rx8010_alarm_irq_enable;
29018 ++ pax_close_kernel();
29019 + }
29020 + }
29021 +
29022 diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
29023 index 3a2da4c..e88493c 100644
29024 --- a/drivers/rtc/rtc-test.c
29025 @@ -56280,11 +67059,328 @@ index 3a2da4c..e88493c 100644
29026 }
29027
29028 rtc = devm_rtc_device_register(&plat_dev->dev, "test",
29029 +diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
29030 +index e4c2437..2297164 100644
29031 +--- a/drivers/scsi/aacraid/aachba.c
29032 ++++ b/drivers/scsi/aacraid/aachba.c
29033 +@@ -647,7 +647,7 @@ static void _aac_probe_container2(void * context, struct fib * fibptr)
29034 + }
29035 + aac_fib_complete(fibptr);
29036 + aac_fib_free(fibptr);
29037 +- callback = (int (*)(struct scsi_cmnd *))(scsicmd->SCp.ptr);
29038 ++ callback = scsicmd->SCp.ptr;
29039 + scsicmd->SCp.ptr = NULL;
29040 + (*callback)(scsicmd);
29041 + return;
29042 +@@ -726,7 +726,7 @@ static int _aac_probe_container(struct scsi_cmnd * scsicmd, int (*callback)(stru
29043 +
29044 + dinfo->count = cpu_to_le32(scmd_id(scsicmd));
29045 + dinfo->type = cpu_to_le32(FT_FILESYS);
29046 +- scsicmd->SCp.ptr = (char *)callback;
29047 ++ scsicmd->SCp.ptr = callback;
29048 +
29049 + status = aac_fib_send(ContainerCommand,
29050 + fibptr,
29051 +@@ -775,6 +775,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd)
29052 + return 0;
29053 + }
29054 +
29055 ++static void aac_probe_container_scsi_done(struct scsi_cmnd * scsicmd)
29056 ++{
29057 ++ scsicmd->device = NULL;
29058 ++}
29059 ++
29060 + int aac_probe_container(struct aac_dev *dev, int cid)
29061 + {
29062 + struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL);
29063 +@@ -787,7 +792,7 @@ int aac_probe_container(struct aac_dev *dev, int cid)
29064 + return -ENOMEM;
29065 + }
29066 + scsicmd->list.next = NULL;
29067 +- scsicmd->scsi_done = (void (*)(struct scsi_cmnd*))aac_probe_container_callback1;
29068 ++ scsicmd->scsi_done = aac_probe_container_scsi_done;
29069 +
29070 + scsicmd->device = scsidev;
29071 + scsidev->sdev_state = 0;
29072 +diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h
29073 +index d47b527..f2c4a89 100644
29074 +--- a/drivers/scsi/aic7xxx/aic79xx.h
29075 ++++ b/drivers/scsi/aic7xxx/aic79xx.h
29076 +@@ -1046,7 +1046,7 @@ typedef enum {
29077 +
29078 + typedef uint8_t ahd_mode_state;
29079 +
29080 +-typedef void ahd_callback_t (void *);
29081 ++typedef void ahd_linux_callback_t (u_long);
29082 +
29083 + struct ahd_completion
29084 + {
29085 +diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
29086 +index 109e2c9..7d3c9b5 100644
29087 +--- a/drivers/scsi/aic7xxx/aic79xx_core.c
29088 ++++ b/drivers/scsi/aic7xxx/aic79xx_core.c
29089 +@@ -207,7 +207,7 @@ static void ahd_add_scb_to_free_list(struct ahd_softc *ahd,
29090 + static u_int ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid,
29091 + u_int prev, u_int next, u_int tid);
29092 + static void ahd_reset_current_bus(struct ahd_softc *ahd);
29093 +-static ahd_callback_t ahd_stat_timer;
29094 ++static ahd_linux_callback_t ahd_stat_timer;
29095 + #ifdef AHD_DUMP_SEQ
29096 + static void ahd_dumpseq(struct ahd_softc *ahd);
29097 + #endif
29098 +@@ -7041,10 +7041,9 @@ static const char *termstat_strings[] = {
29099 + /***************************** Timer Facilities *******************************/
29100 + #define ahd_timer_init init_timer
29101 + #define ahd_timer_stop del_timer_sync
29102 +-typedef void ahd_linux_callback_t (u_long);
29103 +
29104 + static void
29105 +-ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg)
29106 ++ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_linux_callback_t *func, void *arg)
29107 + {
29108 + struct ahd_softc *ahd;
29109 +
29110 +@@ -7052,7 +7051,7 @@ ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg)
29111 + del_timer(timer);
29112 + timer->data = (u_long)arg;
29113 + timer->expires = jiffies + (usec * HZ)/1000000;
29114 +- timer->function = (ahd_linux_callback_t*)func;
29115 ++ timer->function = func;
29116 + add_timer(timer);
29117 + }
29118 +
29119 +@@ -8878,9 +8877,9 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
29120 +
29121 + /**************************** Statistics Processing ***************************/
29122 + static void
29123 +-ahd_stat_timer(void *arg)
29124 ++ahd_stat_timer(unsigned long arg)
29125 + {
29126 +- struct ahd_softc *ahd = arg;
29127 ++ struct ahd_softc *ahd = (struct ahd_softc *)arg;
29128 + u_long s;
29129 + int enint_coal;
29130 +
29131 +diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
29132 +index 069e5c5..f67b786 100644
29133 +--- a/drivers/scsi/be2iscsi/be_main.c
29134 ++++ b/drivers/scsi/be2iscsi/be_main.c
29135 +@@ -5460,7 +5460,7 @@ beiscsi_hw_health_check(struct work_struct *work)
29136 +
29137 +
29138 + static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
29139 +- pci_channel_state_t state)
29140 ++ enum pci_channel_state state)
29141 + {
29142 + struct beiscsi_hba *phba = NULL;
29143 +
29144 +diff --git a/drivers/scsi/bfa/bfa.h b/drivers/scsi/bfa/bfa.h
29145 +index 0e119d8..1bf8a49 100644
29146 +--- a/drivers/scsi/bfa/bfa.h
29147 ++++ b/drivers/scsi/bfa/bfa.h
29148 +@@ -225,8 +225,10 @@ struct bfa_faa_args_s {
29149 + bfa_boolean_t busy;
29150 + };
29151 +
29152 ++enum iocfc_event;
29153 ++
29154 + struct bfa_iocfc_s {
29155 +- bfa_fsm_t fsm;
29156 ++ void (*fsm)(struct bfa_iocfc_s *, enum iocfc_event);
29157 + struct bfa_s *bfa;
29158 + struct bfa_iocfc_cfg_s cfg;
29159 + u32 req_cq_pi[BFI_IOC_MAX_CQS];
29160 +diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c
29161 +index 2ea0db4..82ea057 100644
29162 +--- a/drivers/scsi/bfa/bfa_core.c
29163 ++++ b/drivers/scsi/bfa/bfa_core.c
29164 +@@ -1900,15 +1900,13 @@ bfa_comp_process(struct bfa_s *bfa, struct list_head *comp_q)
29165 + struct list_head *qe;
29166 + struct list_head *qen;
29167 + struct bfa_cb_qe_s *hcb_qe;
29168 +- bfa_cb_cbfn_status_t cbfn;
29169 +
29170 + list_for_each_safe(qe, qen, comp_q) {
29171 + hcb_qe = (struct bfa_cb_qe_s *) qe;
29172 + if (hcb_qe->pre_rmv) {
29173 + /* qe is invalid after return, dequeue before cbfn() */
29174 + list_del(qe);
29175 +- cbfn = (bfa_cb_cbfn_status_t)(hcb_qe->cbfn);
29176 +- cbfn(hcb_qe->cbarg, hcb_qe->fw_status);
29177 ++ hcb_qe->cbfn(hcb_qe->cbarg, hcb_qe->fw_status);
29178 + } else
29179 + hcb_qe->cbfn(hcb_qe->cbarg, BFA_TRUE);
29180 + }
29181 +diff --git a/drivers/scsi/bfa/bfa_cs.h b/drivers/scsi/bfa/bfa_cs.h
29182 +index da9cf65..8cbfcff 100644
29183 +--- a/drivers/scsi/bfa/bfa_cs.h
29184 ++++ b/drivers/scsi/bfa/bfa_cs.h
29185 +@@ -217,8 +217,6 @@ bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe)
29186 + * @ BFA state machine interfaces
29187 + */
29188 +
29189 +-typedef void (*bfa_sm_t)(void *sm, int event);
29190 +-
29191 + /*
29192 + * oc - object class eg. bfa_ioc
29193 + * st - state, eg. reset
29194 +@@ -228,20 +226,75 @@ typedef void (*bfa_sm_t)(void *sm, int event);
29195 + #define bfa_sm_state_decl(oc, st, otype, etype) \
29196 + static void oc ## _sm_ ## st(otype * fsm, etype event)
29197 +
29198 +-#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (bfa_sm_t)(_state))
29199 ++#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (_state))
29200 + #define bfa_sm_send_event(_sm, _event) ((_sm)->sm((_sm), (_event)))
29201 + #define bfa_sm_get_state(_sm) ((_sm)->sm)
29202 +-#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state))
29203 ++#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (_state))
29204 +
29205 + /*
29206 + * For converting from state machine function to state encoding.
29207 + */
29208 +-struct bfa_sm_table_s {
29209 +- bfa_sm_t sm; /* state machine function */
29210 ++struct bfa_iocpf_s;
29211 ++enum iocpf_event;
29212 ++typedef void (*bfa_fsm_iocpf_t)(struct bfa_iocpf_s *, enum iocpf_event);
29213 ++
29214 ++struct iocpf_sm_table_s {
29215 ++ bfa_fsm_iocpf_t sm; /* state machine function */
29216 + int state; /* state machine encoding */
29217 + char *name; /* state name for display */
29218 + };
29219 +-#define BFA_SM(_sm) ((bfa_sm_t)(_sm))
29220 ++
29221 ++struct bfa_ioc_s;
29222 ++enum ioc_event;
29223 ++typedef void (*bfa_fsm_ioc_t)(struct bfa_ioc_s *, enum ioc_event);
29224 ++
29225 ++struct ioc_sm_table_s {
29226 ++ bfa_fsm_ioc_t sm; /* state machine function */
29227 ++ int state; /* state machine encoding */
29228 ++ char *name; /* state name for display */
29229 ++};
29230 ++
29231 ++struct bfa_fcs_rport_s;
29232 ++enum rport_event;
29233 ++typedef void(*bfa_fcs_rport_t)(struct bfa_fcs_rport_s *, enum rport_event);
29234 ++
29235 ++struct rport_sm_table_s {
29236 ++ bfa_fcs_rport_t sm; /* state machine function */
29237 ++ int state; /* state machine encoding */
29238 ++ char *name; /* state name for display */
29239 ++};
29240 ++
29241 ++struct bfa_fcs_vport_s;
29242 ++enum bfa_fcs_vport_event;
29243 ++typedef void(*bfa_fcs_vport_t)(struct bfa_fcs_vport_s *, enum bfa_fcs_vport_event);
29244 ++
29245 ++struct vport_sm_table_s {
29246 ++ bfa_fcs_vport_t sm; /* state machine function */
29247 ++ int state; /* state machine encoding */
29248 ++ char *name; /* state name for display */
29249 ++};
29250 ++
29251 ++struct bfa_fcs_itnim_s;
29252 ++enum bfa_fcs_itnim_event;
29253 ++typedef void(*bfa_fcs_itnim_t)(struct bfa_fcs_itnim_s *, enum bfa_fcs_itnim_event);
29254 ++
29255 ++struct itnim_sm_table_s {
29256 ++ bfa_fcs_itnim_t sm; /* state machine function */
29257 ++ int state; /* state machine encoding */
29258 ++ char *name; /* state name for display */
29259 ++};
29260 ++
29261 ++struct bfa_fcport_s;
29262 ++enum bfa_fcport_sm_event;
29263 ++typedef void(*bfa_fcport_t)(struct bfa_fcport_s *, enum bfa_fcport_sm_event);
29264 ++
29265 ++struct fcport_sm_table_s {
29266 ++ bfa_fcport_t sm; /* state machine function */
29267 ++ int state; /* state machine encoding */
29268 ++ char *name; /* state name for display */
29269 ++};
29270 ++
29271 ++#define BFA_SM(_sm) (_sm)
29272 +
29273 + /*
29274 + * State machine with entry actions.
29275 +@@ -259,17 +312,66 @@ typedef void (*bfa_fsm_t)(void *fsm, int event);
29276 + static void oc ## _sm_ ## st ## _entry(otype * fsm)
29277 +
29278 + #define bfa_fsm_set_state(_fsm, _state) do { \
29279 +- (_fsm)->fsm = (bfa_fsm_t)(_state); \
29280 ++ (_fsm)->fsm = (_state); \
29281 + _state ## _entry(_fsm); \
29282 + } while (0)
29283 +
29284 + #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
29285 + #define bfa_fsm_get_state(_fsm) ((_fsm)->fsm)
29286 +-#define bfa_fsm_cmp_state(_fsm, _state) \
29287 +- ((_fsm)->fsm == (bfa_fsm_t)(_state))
29288 ++#define bfa_fsm_cmp_state(_fsm, _state) ((_fsm)->fsm == (_state))
29289 +
29290 + static inline int
29291 +-bfa_sm_to_state(struct bfa_sm_table_s *smt, bfa_sm_t sm)
29292 ++iocpf_sm_to_state(struct iocpf_sm_table_s *smt, bfa_fsm_iocpf_t sm)
29293 ++{
29294 ++ int i = 0;
29295 ++
29296 ++ while (smt[i].sm && smt[i].sm != sm)
29297 ++ i++;
29298 ++ return smt[i].state;
29299 ++}
29300 ++
29301 ++static inline int
29302 ++ioc_sm_to_state(struct ioc_sm_table_s *smt, bfa_fsm_ioc_t sm)
29303 ++{
29304 ++ int i = 0;
29305 ++
29306 ++ while (smt[i].sm && smt[i].sm != sm)
29307 ++ i++;
29308 ++ return smt[i].state;
29309 ++}
29310 ++
29311 ++static inline int
29312 ++rport_sm_to_state(struct rport_sm_table_s *smt, bfa_fcs_rport_t sm)
29313 ++{
29314 ++ int i = 0;
29315 ++
29316 ++ while (smt[i].sm && smt[i].sm != sm)
29317 ++ i++;
29318 ++ return smt[i].state;
29319 ++}
29320 ++
29321 ++static inline int
29322 ++vport_sm_to_state(struct vport_sm_table_s *smt, bfa_fcs_vport_t sm)
29323 ++{
29324 ++ int i = 0;
29325 ++
29326 ++ while (smt[i].sm && smt[i].sm != sm)
29327 ++ i++;
29328 ++ return smt[i].state;
29329 ++}
29330 ++
29331 ++static inline int
29332 ++itnim_sm_to_state(struct itnim_sm_table_s *smt, bfa_fcs_itnim_t sm)
29333 ++{
29334 ++ int i = 0;
29335 ++
29336 ++ while (smt[i].sm && smt[i].sm != sm)
29337 ++ i++;
29338 ++ return smt[i].state;
29339 ++}
29340 ++
29341 ++static inline int
29342 ++fcport_sm_to_state(struct fcport_sm_table_s *smt, bfa_fcport_t sm)
29343 + {
29344 + int i = 0;
29345 +
29346 diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h
29347 -index e693af6..2e525b6 100644
29348 +index e93921d..ee6b4c0 100644
29349 --- a/drivers/scsi/bfa/bfa_fcpim.h
29350 +++ b/drivers/scsi/bfa/bfa_fcpim.h
29351 -@@ -36,7 +36,7 @@ struct bfa_iotag_s {
29352 +@@ -37,7 +37,7 @@ struct bfa_iotag_s {
29353
29354 struct bfa_itn_s {
29355 bfa_isr_func_t isr;
29356 @@ -56293,11 +67389,50 @@ index e693af6..2e525b6 100644
29357
29358 void bfa_itn_create(struct bfa_s *bfa, struct bfa_rport_s *rport,
29359 void (*isr)(struct bfa_s *bfa, struct bfi_msg_s *m));
29360 +@@ -165,9 +165,11 @@ struct bfa_fcp_mod_s {
29361 + /*
29362 + * BFA IO (initiator mode)
29363 + */
29364 ++enum bfa_ioim_event;
29365 ++
29366 + struct bfa_ioim_s {
29367 + struct list_head qe; /* queue elememt */
29368 +- bfa_sm_t sm; /* BFA ioim state machine */
29369 ++ void (*sm)(struct bfa_ioim_s *, enum bfa_ioim_event);/* BFA ioim state machine */
29370 + struct bfa_s *bfa; /* BFA module */
29371 + struct bfa_fcpim_s *fcpim; /* parent fcpim module */
29372 + struct bfa_itnim_s *itnim; /* i-t-n nexus for this IO */
29373 +@@ -197,9 +199,11 @@ struct bfa_ioim_sp_s {
29374 + /*
29375 + * BFA Task management command (initiator mode)
29376 + */
29377 ++enum bfa_tskim_event;
29378 ++
29379 + struct bfa_tskim_s {
29380 + struct list_head qe;
29381 +- bfa_sm_t sm;
29382 ++ void (*sm)(struct bfa_tskim_s *, enum bfa_tskim_event);
29383 + struct bfa_s *bfa; /* BFA module */
29384 + struct bfa_fcpim_s *fcpim; /* parent fcpim module */
29385 + struct bfa_itnim_s *itnim; /* i-t-n nexus for this IO */
29386 +@@ -219,9 +223,11 @@ struct bfa_tskim_s {
29387 + /*
29388 + * BFA i-t-n (initiator mode)
29389 + */
29390 ++enum bfa_itnim_event;
29391 ++
29392 + struct bfa_itnim_s {
29393 + struct list_head qe; /* queue element */
29394 +- bfa_sm_t sm; /* i-t-n im BFA state machine */
29395 ++ void (*sm)(struct bfa_itnim_s *, enum bfa_itnim_event);/* i-t-n im BFA state machine */
29396 + struct bfa_s *bfa; /* bfa instance */
29397 + struct bfa_rport_s *rport; /* bfa rport */
29398 + void *ditn; /* driver i-t-n structure */
29399 diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c
29400 -index 0f19455..ef7adb5 100644
29401 +index 1e7e139..c2031dd 100644
29402 --- a/drivers/scsi/bfa/bfa_fcs.c
29403 +++ b/drivers/scsi/bfa/bfa_fcs.c
29404 -@@ -38,10 +38,21 @@ struct bfa_fcs_mod_s {
29405 +@@ -39,10 +39,21 @@ struct bfa_fcs_mod_s {
29406 #define BFA_FCS_MODULE(_mod) { _mod ## _modinit, _mod ## _modexit }
29407
29408 static struct bfa_fcs_mod_s fcs_modules[] = {
29409 @@ -56323,11 +67458,174 @@ index 0f19455..ef7adb5 100644
29410 };
29411
29412 /*
29413 +diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h
29414 +index 06dc215..543c5aa 100644
29415 +--- a/drivers/scsi/bfa/bfa_fcs.h
29416 ++++ b/drivers/scsi/bfa/bfa_fcs.h
29417 +@@ -67,8 +67,10 @@ struct bfa_fcs_s;
29418 + #define BFA_FCS_PID_IS_WKA(pid) ((bfa_ntoh3b(pid) > 0xFFF000) ? 1 : 0)
29419 + #define BFA_FCS_MAX_RPORT_LOGINS 1024
29420 +
29421 ++enum vport_ns_event;
29422 ++
29423 + struct bfa_fcs_lport_ns_s {
29424 +- bfa_sm_t sm; /* state machine */
29425 ++ void (*sm)(struct bfa_fcs_lport_ns_s *, enum vport_ns_event);/* state machine */
29426 + struct bfa_timer_s timer;
29427 + struct bfa_fcs_lport_s *port; /* parent port */
29428 + struct bfa_fcxp_s *fcxp;
29429 +@@ -77,18 +79,20 @@ struct bfa_fcs_lport_ns_s {
29430 + u8 num_rsnn_nn_retries;
29431 + };
29432 +
29433 ++enum port_scn_event;
29434 +
29435 + struct bfa_fcs_lport_scn_s {
29436 +- bfa_sm_t sm; /* state machine */
29437 ++ void (*sm)(struct bfa_fcs_lport_scn_s *, enum port_scn_event);/* state machine */
29438 + struct bfa_timer_s timer;
29439 + struct bfa_fcs_lport_s *port; /* parent port */
29440 + struct bfa_fcxp_s *fcxp;
29441 + struct bfa_fcxp_wqe_s fcxp_wqe;
29442 + };
29443 +
29444 ++enum port_fdmi_event;
29445 +
29446 + struct bfa_fcs_lport_fdmi_s {
29447 +- bfa_sm_t sm; /* state machine */
29448 ++ void (*sm)(struct bfa_fcs_lport_fdmi_s *, enum port_fdmi_event);/* state machine */
29449 + struct bfa_timer_s timer;
29450 + struct bfa_fcs_lport_ms_s *ms; /* parent ms */
29451 + struct bfa_fcxp_s *fcxp;
29452 +@@ -97,9 +101,10 @@ struct bfa_fcs_lport_fdmi_s {
29453 + u8 rsvd[3];
29454 + };
29455 +
29456 ++enum port_ms_event;
29457 +
29458 + struct bfa_fcs_lport_ms_s {
29459 +- bfa_sm_t sm; /* state machine */
29460 ++ void (*sm)(struct bfa_fcs_lport_ms_s *, enum port_ms_event);/* state machine */
29461 + struct bfa_timer_s timer;
29462 + struct bfa_fcs_lport_s *port; /* parent port */
29463 + struct bfa_fcxp_s *fcxp;
29464 +@@ -139,10 +144,11 @@ union bfa_fcs_lport_topo_u {
29465 + struct bfa_fcs_lport_n2n_s pn2n;
29466 + };
29467 +
29468 ++enum bfa_fcs_lport_event;
29469 +
29470 + struct bfa_fcs_lport_s {
29471 + struct list_head qe; /* used by port/vport */
29472 +- bfa_sm_t sm; /* state machine */
29473 ++ void (*sm)(struct bfa_fcs_lport_s *, enum bfa_fcs_lport_event); /* state machine */
29474 + struct bfa_fcs_fabric_s *fabric; /* parent fabric */
29475 + struct bfa_lport_cfg_s port_cfg; /* port configuration */
29476 + struct bfa_timer_s link_timer; /* timer for link offline */
29477 +@@ -179,10 +185,11 @@ enum bfa_fcs_fabric_type {
29478 + BFA_FCS_FABRIC_LOOP = 3,
29479 + };
29480 +
29481 ++enum bfa_fcs_fabric_event;
29482 +
29483 + struct bfa_fcs_fabric_s {
29484 + struct list_head qe; /* queue element */
29485 +- bfa_sm_t sm; /* state machine */
29486 ++ void (*sm)(struct bfa_fcs_fabric_s *, enum bfa_fcs_fabric_event); /* state machine */
29487 + struct bfa_fcs_s *fcs; /* FCS instance */
29488 + struct bfa_fcs_lport_s bport; /* base logical port */
29489 + enum bfa_fcs_fabric_type fab_type; /* fabric type */
29490 +@@ -355,9 +362,11 @@ void bfa_fcs_lport_scn_process_rscn(struct bfa_fcs_lport_s *port,
29491 + struct fchs_s *rx_frame, u32 len);
29492 + void bfa_fcs_lport_lip_scn_online(bfa_fcs_lport_t *port);
29493 +
29494 ++enum bfa_fcs_vport_event;
29495 ++
29496 + struct bfa_fcs_vport_s {
29497 + struct list_head qe; /* queue elem */
29498 +- bfa_sm_t sm; /* state machine */
29499 ++ void (*sm)(struct bfa_fcs_vport_s *, enum bfa_fcs_vport_event);/* state machine */
29500 + bfa_fcs_lport_t lport; /* logical port */
29501 + struct bfa_timer_s timer;
29502 + struct bfad_vport_s *vport_drv; /* Driver private */
29503 +@@ -409,8 +418,10 @@ struct bfa_fcs_tin_s;
29504 + struct bfa_fcs_iprp_s;
29505 +
29506 + /* Rport Features (RPF) */
29507 ++enum rpf_event;
29508 ++
29509 + struct bfa_fcs_rpf_s {
29510 +- bfa_sm_t sm; /* state machine */
29511 ++ void (*sm)(struct bfa_fcs_rpf_s *, enum rpf_event); /* state machine */
29512 + struct bfa_fcs_rport_s *rport; /* parent rport */
29513 + struct bfa_timer_s timer; /* general purpose timer */
29514 + struct bfa_fcxp_s *fcxp; /* FCXP needed for discarding */
29515 +@@ -425,6 +436,8 @@ struct bfa_fcs_rpf_s {
29516 + */
29517 + };
29518 +
29519 ++enum rport_event;
29520 ++
29521 + struct bfa_fcs_rport_s {
29522 + struct list_head qe; /* used by port/vport */
29523 + struct bfa_fcs_lport_s *port; /* parent FCS port */
29524 +@@ -441,7 +454,7 @@ struct bfa_fcs_rport_s {
29525 + wwn_t pwwn; /* port wwn of rport */
29526 + wwn_t nwwn; /* node wwn of rport */
29527 + struct bfa_rport_symname_s psym_name; /* port symbolic name */
29528 +- bfa_sm_t sm; /* state machine */
29529 ++ void (*sm)(struct bfa_fcs_rport_s *, enum rport_event); /* state machine */
29530 + struct bfa_timer_s timer; /* general purpose timer */
29531 + struct bfa_fcs_itnim_s *itnim; /* ITN initiator mode role */
29532 + struct bfa_fcs_tin_s *tin; /* ITN initiator mode role */
29533 +@@ -502,9 +515,10 @@ void bfa_fcs_rpf_rport_offline(struct bfa_fcs_rport_s *rport);
29534 + * forward declarations
29535 + */
29536 + struct bfad_itnim_s;
29537 ++enum bfa_fcs_itnim_event;
29538 +
29539 + struct bfa_fcs_itnim_s {
29540 +- bfa_sm_t sm; /* state machine */
29541 ++ void (*sm)(struct bfa_fcs_itnim_s *, enum bfa_fcs_itnim_event);/* state machine */
29542 + struct bfa_fcs_rport_s *rport; /* parent remote rport */
29543 + struct bfad_itnim_s *itnim_drv; /* driver peer instance */
29544 + struct bfa_fcs_s *fcs; /* fcs instance */
29545 +diff --git a/drivers/scsi/bfa/bfa_fcs_fcpim.c b/drivers/scsi/bfa/bfa_fcs_fcpim.c
29546 +index 4f089d7..89b3d8e 100644
29547 +--- a/drivers/scsi/bfa/bfa_fcs_fcpim.c
29548 ++++ b/drivers/scsi/bfa/bfa_fcs_fcpim.c
29549 +@@ -60,7 +60,7 @@ static void bfa_fcs_itnim_sm_hcb_offline(struct bfa_fcs_itnim_s *itnim,
29550 + static void bfa_fcs_itnim_sm_initiator(struct bfa_fcs_itnim_s *itnim,
29551 + enum bfa_fcs_itnim_event event);
29552 +
29553 +-static struct bfa_sm_table_s itnim_sm_table[] = {
29554 ++static struct itnim_sm_table_s itnim_sm_table[] = {
29555 + {BFA_SM(bfa_fcs_itnim_sm_offline), BFA_ITNIM_OFFLINE},
29556 + {BFA_SM(bfa_fcs_itnim_sm_prli_send), BFA_ITNIM_PRLI_SEND},
29557 + {BFA_SM(bfa_fcs_itnim_sm_prli), BFA_ITNIM_PRLI_SENT},
29558 +@@ -672,7 +672,7 @@ bfa_status_t
29559 + bfa_fcs_itnim_get_online_state(struct bfa_fcs_itnim_s *itnim)
29560 + {
29561 + bfa_trc(itnim->fcs, itnim->rport->pid);
29562 +- switch (bfa_sm_to_state(itnim_sm_table, itnim->sm)) {
29563 ++ switch (itnim_sm_to_state(itnim_sm_table, itnim->sm)) {
29564 + case BFA_ITNIM_ONLINE:
29565 + case BFA_ITNIM_INITIATIOR:
29566 + return BFA_STATUS_OK;
29567 +@@ -772,7 +772,7 @@ bfa_fcs_itnim_attr_get(struct bfa_fcs_lport_s *port, wwn_t rpwwn,
29568 + if (itnim == NULL)
29569 + return BFA_STATUS_NO_FCPIM_NEXUS;
29570 +
29571 +- attr->state = bfa_sm_to_state(itnim_sm_table, itnim->sm);
29572 ++ attr->state = itnim_sm_to_state(itnim_sm_table, itnim->sm);
29573 + attr->retry = itnim->seq_rec;
29574 + attr->rec_support = itnim->rec_support;
29575 + attr->conf_comp = itnim->conf_comp;
29576 diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
29577 -index ff75ef8..2dfe00a 100644
29578 +index 7733ad5..11f32d1 100644
29579 --- a/drivers/scsi/bfa/bfa_fcs_lport.c
29580 +++ b/drivers/scsi/bfa/bfa_fcs_lport.c
29581 -@@ -89,15 +89,26 @@ static struct {
29582 +@@ -90,15 +90,26 @@ static struct {
29583 void (*offline) (struct bfa_fcs_lport_s *port);
29584 } __port_action[] = {
29585 {
29586 @@ -56363,11 +67661,88 @@ index ff75ef8..2dfe00a 100644
29587
29588 /*
29589 * fcs_port_sm FCS logical port state machine
29590 +@@ -6040,7 +6051,7 @@ static void bfa_fcs_vport_sm_stopping(struct bfa_fcs_vport_s *vport,
29591 + static void bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
29592 + enum bfa_fcs_vport_event event);
29593 +
29594 +-static struct bfa_sm_table_s vport_sm_table[] = {
29595 ++static struct vport_sm_table_s vport_sm_table[] = {
29596 + {BFA_SM(bfa_fcs_vport_sm_uninit), BFA_FCS_VPORT_UNINIT},
29597 + {BFA_SM(bfa_fcs_vport_sm_created), BFA_FCS_VPORT_CREATED},
29598 + {BFA_SM(bfa_fcs_vport_sm_offline), BFA_FCS_VPORT_OFFLINE},
29599 +@@ -6871,7 +6882,7 @@ bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport,
29600 + memset(attr, 0, sizeof(struct bfa_vport_attr_s));
29601 +
29602 + bfa_fcs_lport_get_attr(&vport->lport, &attr->port_attr);
29603 +- attr->vport_state = bfa_sm_to_state(vport_sm_table, vport->sm);
29604 ++ attr->vport_state = vport_sm_to_state(vport_sm_table, vport->sm);
29605 + }
29606 +
29607 +
29608 +diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
29609 +index de50349..6d676be 100644
29610 +--- a/drivers/scsi/bfa/bfa_fcs_rport.c
29611 ++++ b/drivers/scsi/bfa/bfa_fcs_rport.c
29612 +@@ -144,7 +144,7 @@ static void bfa_fcs_rport_sm_fc4_off_delete(struct bfa_fcs_rport_s *rport,
29613 + static void bfa_fcs_rport_sm_delete_pending(struct bfa_fcs_rport_s *rport,
29614 + enum rport_event event);
29615 +
29616 +-static struct bfa_sm_table_s rport_sm_table[] = {
29617 ++static struct rport_sm_table_s rport_sm_table[] = {
29618 + {BFA_SM(bfa_fcs_rport_sm_uninit), BFA_RPORT_UNINIT},
29619 + {BFA_SM(bfa_fcs_rport_sm_plogi_sending), BFA_RPORT_PLOGI},
29620 + {BFA_SM(bfa_fcs_rport_sm_plogiacc_sending), BFA_RPORT_ONLINE},
29621 +@@ -2980,7 +2980,7 @@ bfa_fcs_rport_send_ls_rjt(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs,
29622 + int
29623 + bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport)
29624 + {
29625 +- return bfa_sm_to_state(rport_sm_table, rport->sm);
29626 ++ return rport_sm_to_state(rport_sm_table, rport->sm);
29627 + }
29628 +
29629 +
29630 +diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
29631 +index 251e2ff..cef239a 100644
29632 +--- a/drivers/scsi/bfa/bfa_ioc.c
29633 ++++ b/drivers/scsi/bfa/bfa_ioc.c
29634 +@@ -148,7 +148,7 @@ bfa_fsm_state_decl(bfa_ioc, disabling, struct bfa_ioc_s, enum ioc_event);
29635 + bfa_fsm_state_decl(bfa_ioc, disabled, struct bfa_ioc_s, enum ioc_event);
29636 + bfa_fsm_state_decl(bfa_ioc, hwfail, struct bfa_ioc_s, enum ioc_event);
29637 +
29638 +-static struct bfa_sm_table_s ioc_sm_table[] = {
29639 ++static struct ioc_sm_table_s ioc_sm_table[] = {
29640 + {BFA_SM(bfa_ioc_sm_uninit), BFA_IOC_UNINIT},
29641 + {BFA_SM(bfa_ioc_sm_reset), BFA_IOC_RESET},
29642 + {BFA_SM(bfa_ioc_sm_enabling), BFA_IOC_ENABLING},
29643 +@@ -236,7 +236,7 @@ bfa_fsm_state_decl(bfa_iocpf, disabling_sync, struct bfa_iocpf_s,
29644 + enum iocpf_event);
29645 + bfa_fsm_state_decl(bfa_iocpf, disabled, struct bfa_iocpf_s, enum iocpf_event);
29646 +
29647 +-static struct bfa_sm_table_s iocpf_sm_table[] = {
29648 ++static struct iocpf_sm_table_s iocpf_sm_table[] = {
29649 + {BFA_SM(bfa_iocpf_sm_reset), BFA_IOCPF_RESET},
29650 + {BFA_SM(bfa_iocpf_sm_fwcheck), BFA_IOCPF_FWMISMATCH},
29651 + {BFA_SM(bfa_iocpf_sm_mismatch), BFA_IOCPF_FWMISMATCH},
29652 +@@ -2830,12 +2830,12 @@ enum bfa_ioc_state
29653 + bfa_ioc_get_state(struct bfa_ioc_s *ioc)
29654 + {
29655 + enum bfa_iocpf_state iocpf_st;
29656 +- enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm);
29657 ++ enum bfa_ioc_state ioc_st = ioc_sm_to_state(ioc_sm_table, ioc->fsm);
29658 +
29659 + if (ioc_st == BFA_IOC_ENABLING ||
29660 + ioc_st == BFA_IOC_FAIL || ioc_st == BFA_IOC_INITFAIL) {
29661 +
29662 +- iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
29663 ++ iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
29664 +
29665 + switch (iocpf_st) {
29666 + case BFA_IOCPF_SEMWAIT:
29667 diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h
29668 -index a38aafa0..fe8f03b 100644
29669 +index 713745d..78b9671 100644
29670 --- a/drivers/scsi/bfa/bfa_ioc.h
29671 +++ b/drivers/scsi/bfa/bfa_ioc.h
29672 -@@ -258,7 +258,7 @@ struct bfa_ioc_cbfn_s {
29673 +@@ -259,7 +259,7 @@ struct bfa_ioc_cbfn_s {
29674 bfa_ioc_disable_cbfn_t disable_cbfn;
29675 bfa_ioc_hbfail_cbfn_t hbfail_cbfn;
29676 bfa_ioc_reset_cbfn_t reset_cbfn;
29677 @@ -56376,7 +67751,30 @@ index a38aafa0..fe8f03b 100644
29678
29679 /*
29680 * IOC event notification mechanism.
29681 -@@ -352,7 +352,7 @@ struct bfa_ioc_hwif_s {
29682 +@@ -286,16 +286,20 @@ struct bfa_ioc_notify_s {
29683 + (__notify)->cbarg = (__cbarg); \
29684 + } while (0)
29685 +
29686 ++enum iocpf_event;
29687 ++
29688 + struct bfa_iocpf_s {
29689 +- bfa_fsm_t fsm;
29690 ++ void (*fsm)(struct bfa_iocpf_s *, enum iocpf_event);
29691 + struct bfa_ioc_s *ioc;
29692 + bfa_boolean_t fw_mismatch_notified;
29693 + bfa_boolean_t auto_recover;
29694 + u32 poll_time;
29695 + };
29696 +
29697 ++enum ioc_event;
29698 ++
29699 + struct bfa_ioc_s {
29700 +- bfa_fsm_t fsm;
29701 ++ void (*fsm)(struct bfa_ioc_s *, enum ioc_event);
29702 + struct bfa_s *bfa;
29703 + struct bfa_pcidev_s pcidev;
29704 + struct bfa_timer_mod_s *timer_mod;
29705 +@@ -353,7 +357,7 @@ struct bfa_ioc_hwif_s {
29706 void (*ioc_set_alt_fwstate) (struct bfa_ioc_s *ioc,
29707 enum bfi_ioc_state fwstate);
29708 enum bfi_ioc_state (*ioc_get_alt_fwstate) (struct bfa_ioc_s *ioc);
29709 @@ -56385,11 +67783,23 @@ index a38aafa0..fe8f03b 100644
29710
29711 /*
29712 * Queue element to wait for room in request queue. FIFO order is
29713 +@@ -779,8 +783,10 @@ struct bfa_dconf_s {
29714 + };
29715 + #pragma pack()
29716 +
29717 ++enum bfa_dconf_event;
29718 ++
29719 + struct bfa_dconf_mod_s {
29720 +- bfa_sm_t sm;
29721 ++ void (*sm)(struct bfa_dconf_mod_s *, enum bfa_dconf_event);
29722 + u8 instance;
29723 + bfa_boolean_t read_data_valid;
29724 + bfa_boolean_t min_cfg;
29725 diff --git a/drivers/scsi/bfa/bfa_modules.h b/drivers/scsi/bfa/bfa_modules.h
29726 -index a14c784..6de6790 100644
29727 +index 53135f2..640621b 100644
29728 --- a/drivers/scsi/bfa/bfa_modules.h
29729 +++ b/drivers/scsi/bfa/bfa_modules.h
29730 -@@ -78,12 +78,12 @@ enum {
29731 +@@ -79,12 +79,12 @@ enum {
29732 \
29733 extern struct bfa_module_s hal_mod_ ## __mod; \
29734 struct bfa_module_s hal_mod_ ## __mod = { \
29735 @@ -56408,6 +67818,735 @@ index a14c784..6de6790 100644
29736 }
29737
29738 #define BFA_CACHELINE_SZ (256)
29739 +diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
29740 +index 12de292..ec9f0ab 100644
29741 +--- a/drivers/scsi/bfa/bfa_svc.c
29742 ++++ b/drivers/scsi/bfa/bfa_svc.c
29743 +@@ -225,7 +225,7 @@ static void bfa_fcport_ln_sm_up_dn_nf(struct bfa_fcport_ln_s *ln,
29744 + static void bfa_fcport_ln_sm_up_dn_up_nf(struct bfa_fcport_ln_s *ln,
29745 + enum bfa_fcport_ln_sm_event event);
29746 +
29747 +-static struct bfa_sm_table_s hal_port_sm_table[] = {
29748 ++static struct fcport_sm_table_s hal_port_sm_table[] = {
29749 + {BFA_SM(bfa_fcport_sm_uninit), BFA_PORT_ST_UNINIT},
29750 + {BFA_SM(bfa_fcport_sm_enabling_qwait), BFA_PORT_ST_ENABLING_QWAIT},
29751 + {BFA_SM(bfa_fcport_sm_enabling), BFA_PORT_ST_ENABLING},
29752 +@@ -3642,7 +3642,7 @@ bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
29753 + fcport->event_arg.i2hmsg = i2hmsg;
29754 +
29755 + bfa_trc(bfa, msg->mhdr.msg_id);
29756 +- bfa_trc(bfa, bfa_sm_to_state(hal_port_sm_table, fcport->sm));
29757 ++ bfa_trc(bfa, fcport_sm_to_state(hal_port_sm_table, fcport->sm));
29758 +
29759 + switch (msg->mhdr.msg_id) {
29760 + case BFI_FCPORT_I2H_ENABLE_RSP:
29761 +@@ -4077,7 +4077,7 @@ bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr)
29762 +
29763 + attr->pport_cfg.path_tov = bfa_fcpim_path_tov_get(bfa);
29764 + attr->pport_cfg.q_depth = bfa_fcpim_qdepth_get(bfa);
29765 +- attr->port_state = bfa_sm_to_state(hal_port_sm_table, fcport->sm);
29766 ++ attr->port_state = fcport_sm_to_state(hal_port_sm_table, fcport->sm);
29767 +
29768 + attr->fec_state = fcport->fec_state;
29769 +
29770 +@@ -4159,7 +4159,7 @@ bfa_fcport_is_disabled(struct bfa_s *bfa)
29771 + {
29772 + struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
29773 +
29774 +- return bfa_sm_to_state(hal_port_sm_table, fcport->sm) ==
29775 ++ return fcport_sm_to_state(hal_port_sm_table, fcport->sm) ==
29776 + BFA_PORT_ST_DISABLED;
29777 +
29778 + }
29779 +@@ -4169,7 +4169,7 @@ bfa_fcport_is_dport(struct bfa_s *bfa)
29780 + {
29781 + struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
29782 +
29783 +- return (bfa_sm_to_state(hal_port_sm_table, fcport->sm) ==
29784 ++ return (fcport_sm_to_state(hal_port_sm_table, fcport->sm) ==
29785 + BFA_PORT_ST_DPORT);
29786 + }
29787 +
29788 +@@ -4178,7 +4178,7 @@ bfa_fcport_is_ddport(struct bfa_s *bfa)
29789 + {
29790 + struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
29791 +
29792 +- return (bfa_sm_to_state(hal_port_sm_table, fcport->sm) ==
29793 ++ return (fcport_sm_to_state(hal_port_sm_table, fcport->sm) ==
29794 + BFA_PORT_ST_DDPORT);
29795 + }
29796 +
29797 +diff --git a/drivers/scsi/bfa/bfa_svc.h b/drivers/scsi/bfa/bfa_svc.h
29798 +index ea2278b..6f51a73 100644
29799 +--- a/drivers/scsi/bfa/bfa_svc.h
29800 ++++ b/drivers/scsi/bfa/bfa_svc.h
29801 +@@ -160,6 +160,8 @@ struct bfa_fcxp_rsp_info_s {
29802 + u32 rsp_maxlen; /* max response length expected */
29803 + };
29804 +
29805 ++typedef void (*bfa_sm_t)(void *sm, int event);
29806 ++
29807 + struct bfa_fcxp_s {
29808 + struct list_head qe; /* fcxp queue element */
29809 + bfa_sm_t sm; /* state machine */
29810 +@@ -295,9 +297,11 @@ struct bfa_rport_info_s {
29811 + /*
29812 + * BFA rport data structure
29813 + */
29814 ++enum bfa_rport_event;
29815 ++
29816 + struct bfa_rport_s {
29817 + struct list_head qe; /* queue element */
29818 +- bfa_sm_t sm; /* state machine */
29819 ++ void (*sm)(struct bfa_rport_s *, enum bfa_rport_event);/* state machine */
29820 + struct bfa_s *bfa; /* backpointer to BFA */
29821 + void *rport_drv; /* fcs/driver rport object */
29822 + u16 fw_handle; /* firmware rport handle */
29823 +@@ -388,10 +392,12 @@ void bfa_uf_res_recfg(struct bfa_s *bfa, u16 num_uf_fw);
29824 + /*
29825 + * LPS - bfa lport login/logout service interface
29826 + */
29827 ++enum bfa_lps_event;
29828 ++
29829 + struct bfa_lps_s {
29830 + struct list_head qe; /* queue element */
29831 + struct bfa_s *bfa; /* parent bfa instance */
29832 +- bfa_sm_t sm; /* finite state machine */
29833 ++ void (*sm)(struct bfa_lps_s *, enum bfa_lps_event);/* finite state machine */
29834 + u8 bfa_tag; /* lport tag */
29835 + u8 fw_tag; /* lport fw tag */
29836 + u8 reqq; /* lport request queue */
29837 +@@ -450,9 +456,11 @@ void bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
29838 + /*
29839 + * Link notification data structure
29840 + */
29841 ++enum bfa_fcport_ln_sm_event;
29842 ++
29843 + struct bfa_fcport_ln_s {
29844 + struct bfa_fcport_s *fcport;
29845 +- bfa_sm_t sm;
29846 ++ void (*sm)(struct bfa_fcport_ln_s *, enum bfa_fcport_ln_sm_event);
29847 + struct bfa_cb_qe_s ln_qe; /* BFA callback queue elem for ln */
29848 + enum bfa_port_linkstate ln_event; /* ln event for callback */
29849 + };
29850 +@@ -466,7 +474,7 @@ struct bfa_fcport_trunk_s {
29851 + */
29852 + struct bfa_fcport_s {
29853 + struct bfa_s *bfa; /* parent BFA instance */
29854 +- bfa_sm_t sm; /* port state machine */
29855 ++ void (*sm)(struct bfa_fcport_s *, enum bfa_fcport_sm_event); /* port state machine */
29856 + wwn_t nwwn; /* node wwn of physical port */
29857 + wwn_t pwwn; /* port wwn of physical oprt */
29858 + enum bfa_port_speed speed_sup;
29859 +@@ -714,9 +722,11 @@ struct bfa_fcdiag_lb_s {
29860 + u32 status;
29861 + };
29862 +
29863 ++enum bfa_dport_sm_event;
29864 ++
29865 + struct bfa_dport_s {
29866 + struct bfa_s *bfa; /* Back pointer to BFA */
29867 +- bfa_sm_t sm; /* finite state machine */
29868 ++ void (*sm)(struct bfa_dport_s *, enum bfa_dport_sm_event);/* finite state machine */
29869 + struct bfa_reqq_wait_s reqq_wait;
29870 + bfa_cb_diag_t cbfn;
29871 + void *cbarg;
29872 +diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
29873 +index 9d253cb..bb533ea 100644
29874 +--- a/drivers/scsi/bfa/bfad.c
29875 ++++ b/drivers/scsi/bfa/bfad.c
29876 +@@ -408,6 +408,16 @@ bfad_hcb_comp(void *arg, bfa_status_t status)
29877 + complete(&fcomp->comp);
29878 + }
29879 +
29880 ++void
29881 ++bfad_stats_comp(void *arg, bfa_boolean_t _status)
29882 ++{
29883 ++ struct bfad_hal_comp *fcomp = (struct bfad_hal_comp *)arg;
29884 ++ bfa_status_t status = (bfa_status_t)_status;
29885 ++
29886 ++ fcomp->status = status;
29887 ++ complete(&fcomp->comp);
29888 ++}
29889 ++
29890 + /*
29891 + * bfa_init callback
29892 + */
29893 +@@ -1442,7 +1452,7 @@ bfad_pci_remove(struct pci_dev *pdev)
29894 + * PCI Error Recovery entry, error detected.
29895 + */
29896 + static pci_ers_result_t
29897 +-bfad_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
29898 ++bfad_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
29899 + {
29900 + struct bfad_s *bfad = pci_get_drvdata(pdev);
29901 + unsigned long flags;
29902 +diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
29903 +index d1ad020..661c0f9 100644
29904 +--- a/drivers/scsi/bfa/bfad_bsg.c
29905 ++++ b/drivers/scsi/bfa/bfad_bsg.c
29906 +@@ -2145,7 +2145,7 @@ bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd)
29907 + struct bfa_cb_pending_q_s cb_qe;
29908 +
29909 + init_completion(&fcomp.comp);
29910 +- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp,
29911 ++ bfa_pending_q_init(&cb_qe, bfad_stats_comp,
29912 + &fcomp, &iocmd->stats);
29913 + spin_lock_irqsave(&bfad->bfad_lock, flags);
29914 + iocmd->status = bfa_fcport_get_stats(&bfad->bfa, &cb_qe);
29915 +@@ -2169,7 +2169,7 @@ bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd)
29916 + struct bfa_cb_pending_q_s cb_qe;
29917 +
29918 + init_completion(&fcomp.comp);
29919 +- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp, &fcomp, NULL);
29920 ++ bfa_pending_q_init(&cb_qe, bfad_stats_comp, &fcomp, NULL);
29921 +
29922 + spin_lock_irqsave(&bfad->bfad_lock, flags);
29923 + iocmd->status = bfa_fcport_clear_stats(&bfad->bfa, &cb_qe);
29924 +@@ -2453,7 +2453,7 @@ bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd)
29925 + struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
29926 +
29927 + init_completion(&fcomp.comp);
29928 +- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp,
29929 ++ bfa_pending_q_init(&cb_qe, bfad_stats_comp,
29930 + &fcomp, &iocmd->stats);
29931 +
29932 + spin_lock_irqsave(&bfad->bfad_lock, flags);
29933 +@@ -2484,7 +2484,7 @@ bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd)
29934 + struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
29935 +
29936 + init_completion(&fcomp.comp);
29937 +- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp,
29938 ++ bfa_pending_q_init(&cb_qe, bfad_stats_comp,
29939 + &fcomp, NULL);
29940 +
29941 + spin_lock_irqsave(&bfad->bfad_lock, flags);
29942 +diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h
29943 +index f9e8620..807a983 100644
29944 +--- a/drivers/scsi/bfa/bfad_drv.h
29945 ++++ b/drivers/scsi/bfa/bfad_drv.h
29946 +@@ -187,8 +187,10 @@ union bfad_tmp_buf {
29947 + /*
29948 + * BFAD (PCI function) data structure
29949 + */
29950 ++enum bfad_sm_event;
29951 ++
29952 + struct bfad_s {
29953 +- bfa_sm_t sm; /* state machine */
29954 ++ void (*sm)(struct bfad_s *, enum bfad_sm_event); /* state machine */
29955 + struct list_head list_entry;
29956 + struct bfa_s bfa;
29957 + struct bfa_fcs_s bfa_fcs;
29958 +@@ -309,6 +311,7 @@ void bfad_fcs_stop(struct bfad_s *bfad);
29959 + void bfad_remove_intr(struct bfad_s *bfad);
29960 + void bfad_hal_mem_release(struct bfad_s *bfad);
29961 + void bfad_hcb_comp(void *arg, bfa_status_t status);
29962 ++void bfad_stats_comp(void *arg, bfa_boolean_t _status);
29963 +
29964 + int bfad_setup_intr(struct bfad_s *bfad);
29965 + void bfad_remove_intr(struct bfad_s *bfad);
29966 +diff --git a/drivers/scsi/csiostor/csio_defs.h b/drivers/scsi/csiostor/csio_defs.h
29967 +index c38017b..3268e62 100644
29968 +--- a/drivers/scsi/csiostor/csio_defs.h
29969 ++++ b/drivers/scsi/csiostor/csio_defs.h
29970 +@@ -73,7 +73,8 @@ csio_list_deleted(struct list_head *list)
29971 + #define csio_list_prev(elem) (((struct list_head *)(elem))->prev)
29972 +
29973 + /* State machine */
29974 +-typedef void (*csio_sm_state_t)(void *, uint32_t);
29975 ++struct csio_sm;
29976 ++typedef void (*csio_sm_state_t)(struct csio_sm *, uint32_t);
29977 +
29978 + struct csio_sm {
29979 + struct list_head sm_list;
29980 +@@ -81,9 +82,9 @@ struct csio_sm {
29981 + };
29982 +
29983 + static inline void
29984 +-csio_set_state(void *smp, void *state)
29985 ++csio_set_state(struct csio_sm *smp, csio_sm_state_t state)
29986 + {
29987 +- ((struct csio_sm *)smp)->sm_state = (csio_sm_state_t)state;
29988 ++ smp->sm_state = state;
29989 + }
29990 +
29991 + static inline void
29992 +@@ -93,21 +94,21 @@ csio_init_state(struct csio_sm *smp, void *state)
29993 + }
29994 +
29995 + static inline void
29996 +-csio_post_event(void *smp, uint32_t evt)
29997 ++csio_post_event(struct csio_sm *smp, uint32_t evt)
29998 + {
29999 +- ((struct csio_sm *)smp)->sm_state(smp, evt);
30000 ++ smp->sm_state(smp, evt);
30001 + }
30002 +
30003 + static inline csio_sm_state_t
30004 +-csio_get_state(void *smp)
30005 ++csio_get_state(struct csio_sm *smp)
30006 + {
30007 +- return ((struct csio_sm *)smp)->sm_state;
30008 ++ return smp->sm_state;
30009 + }
30010 +
30011 + static inline bool
30012 +-csio_match_state(void *smp, void *state)
30013 ++csio_match_state(struct csio_sm *smp, csio_sm_state_t state)
30014 + {
30015 +- return (csio_get_state(smp) == (csio_sm_state_t)state);
30016 ++ return (csio_get_state(smp) == state);
30017 + }
30018 +
30019 + #define CSIO_ASSERT(cond) BUG_ON(!(cond))
30020 +diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
30021 +index 622bdab..1a31d41 100644
30022 +--- a/drivers/scsi/csiostor/csio_hw.c
30023 ++++ b/drivers/scsi/csiostor/csio_hw.c
30024 +@@ -89,15 +89,15 @@ static void csio_mgmtm_cleanup(struct csio_mgmtm *);
30025 + static void csio_hw_mbm_cleanup(struct csio_hw *);
30026 +
30027 + /* State machine forward declarations */
30028 +-static void csio_hws_uninit(struct csio_hw *, enum csio_hw_ev);
30029 +-static void csio_hws_configuring(struct csio_hw *, enum csio_hw_ev);
30030 +-static void csio_hws_initializing(struct csio_hw *, enum csio_hw_ev);
30031 +-static void csio_hws_ready(struct csio_hw *, enum csio_hw_ev);
30032 +-static void csio_hws_quiescing(struct csio_hw *, enum csio_hw_ev);
30033 +-static void csio_hws_quiesced(struct csio_hw *, enum csio_hw_ev);
30034 +-static void csio_hws_resetting(struct csio_hw *, enum csio_hw_ev);
30035 +-static void csio_hws_removing(struct csio_hw *, enum csio_hw_ev);
30036 +-static void csio_hws_pcierr(struct csio_hw *, enum csio_hw_ev);
30037 ++static void csio_hws_uninit(struct csio_sm *, uint32_t);
30038 ++static void csio_hws_configuring(struct csio_sm *, uint32_t);
30039 ++static void csio_hws_initializing(struct csio_sm *, uint32_t);
30040 ++static void csio_hws_ready(struct csio_sm *, uint32_t);
30041 ++static void csio_hws_quiescing(struct csio_sm *, uint32_t);
30042 ++static void csio_hws_quiesced(struct csio_sm *, uint32_t);
30043 ++static void csio_hws_resetting(struct csio_sm *, uint32_t);
30044 ++static void csio_hws_removing(struct csio_sm *, uint32_t);
30045 ++static void csio_hws_pcierr(struct csio_sm *, uint32_t);
30046 +
30047 + static void csio_hw_initialize(struct csio_hw *hw);
30048 + static void csio_evtq_stop(struct csio_hw *hw);
30049 +@@ -105,12 +105,12 @@ static void csio_evtq_start(struct csio_hw *hw);
30050 +
30051 + int csio_is_hw_ready(struct csio_hw *hw)
30052 + {
30053 +- return csio_match_state(hw, csio_hws_ready);
30054 ++ return csio_match_state(&hw->sm, csio_hws_ready);
30055 + }
30056 +
30057 + int csio_is_hw_removing(struct csio_hw *hw)
30058 + {
30059 +- return csio_match_state(hw, csio_hws_removing);
30060 ++ return csio_match_state(&hw->sm, csio_hws_removing);
30061 + }
30062 +
30063 +
30064 +@@ -2326,8 +2326,11 @@ csio_hw_fatal_err(struct csio_hw *hw)
30065 + *
30066 + */
30067 + static void
30068 +-csio_hws_uninit(struct csio_hw *hw, enum csio_hw_ev evt)
30069 ++csio_hws_uninit(struct csio_sm *_hw, uint32_t _evt)
30070 + {
30071 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30072 ++ enum csio_hw_ev evt = _evt;
30073 ++
30074 + hw->prev_evt = hw->cur_evt;
30075 + hw->cur_evt = evt;
30076 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30077 +@@ -2351,8 +2354,11 @@ csio_hws_uninit(struct csio_hw *hw, enum csio_hw_ev evt)
30078 + *
30079 + */
30080 + static void
30081 +-csio_hws_configuring(struct csio_hw *hw, enum csio_hw_ev evt)
30082 ++csio_hws_configuring(struct csio_sm *_hw, uint32_t _evt)
30083 + {
30084 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30085 ++ enum csio_hw_ev evt = _evt;
30086 ++
30087 + hw->prev_evt = hw->cur_evt;
30088 + hw->cur_evt = evt;
30089 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30090 +@@ -2389,8 +2395,11 @@ csio_hws_configuring(struct csio_hw *hw, enum csio_hw_ev evt)
30091 + *
30092 + */
30093 + static void
30094 +-csio_hws_initializing(struct csio_hw *hw, enum csio_hw_ev evt)
30095 ++csio_hws_initializing(struct csio_sm *_hw, uint32_t _evt)
30096 + {
30097 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30098 ++ enum csio_hw_ev evt = _evt;
30099 ++
30100 + hw->prev_evt = hw->cur_evt;
30101 + hw->cur_evt = evt;
30102 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30103 +@@ -2427,8 +2436,11 @@ csio_hws_initializing(struct csio_hw *hw, enum csio_hw_ev evt)
30104 + *
30105 + */
30106 + static void
30107 +-csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
30108 ++csio_hws_ready(struct csio_sm *_hw, uint32_t _evt)
30109 + {
30110 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30111 ++ enum csio_hw_ev evt = _evt;
30112 ++
30113 + /* Remember the event */
30114 + hw->evtflag = evt;
30115 +
30116 +@@ -2476,8 +2488,11 @@ csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
30117 + *
30118 + */
30119 + static void
30120 +-csio_hws_quiescing(struct csio_hw *hw, enum csio_hw_ev evt)
30121 ++csio_hws_quiescing(struct csio_sm *_hw, uint32_t _evt)
30122 + {
30123 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30124 ++ enum csio_hw_ev evt = _evt;
30125 ++
30126 + hw->prev_evt = hw->cur_evt;
30127 + hw->cur_evt = evt;
30128 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30129 +@@ -2536,8 +2551,11 @@ csio_hws_quiescing(struct csio_hw *hw, enum csio_hw_ev evt)
30130 + *
30131 + */
30132 + static void
30133 +-csio_hws_quiesced(struct csio_hw *hw, enum csio_hw_ev evt)
30134 ++csio_hws_quiesced(struct csio_sm *_hw, uint32_t _evt)
30135 + {
30136 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30137 ++ enum csio_hw_ev evt = _evt;
30138 ++
30139 + hw->prev_evt = hw->cur_evt;
30140 + hw->cur_evt = evt;
30141 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30142 +@@ -2561,8 +2579,11 @@ csio_hws_quiesced(struct csio_hw *hw, enum csio_hw_ev evt)
30143 + *
30144 + */
30145 + static void
30146 +-csio_hws_resetting(struct csio_hw *hw, enum csio_hw_ev evt)
30147 ++csio_hws_resetting(struct csio_sm *_hw, uint32_t _evt)
30148 + {
30149 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30150 ++ enum csio_hw_ev evt = _evt;
30151 ++
30152 + hw->prev_evt = hw->cur_evt;
30153 + hw->cur_evt = evt;
30154 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30155 +@@ -2587,8 +2608,11 @@ csio_hws_resetting(struct csio_hw *hw, enum csio_hw_ev evt)
30156 + *
30157 + */
30158 + static void
30159 +-csio_hws_removing(struct csio_hw *hw, enum csio_hw_ev evt)
30160 ++csio_hws_removing(struct csio_sm *_hw, uint32_t _evt)
30161 + {
30162 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30163 ++ enum csio_hw_ev evt = _evt;
30164 ++
30165 + hw->prev_evt = hw->cur_evt;
30166 + hw->cur_evt = evt;
30167 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30168 +@@ -2622,8 +2646,11 @@ csio_hws_removing(struct csio_hw *hw, enum csio_hw_ev evt)
30169 + *
30170 + */
30171 + static void
30172 +-csio_hws_pcierr(struct csio_hw *hw, enum csio_hw_ev evt)
30173 ++csio_hws_pcierr(struct csio_sm *_hw, uint32_t _evt)
30174 + {
30175 ++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
30176 ++ enum csio_hw_ev evt = _evt;
30177 ++
30178 + hw->prev_evt = hw->cur_evt;
30179 + hw->cur_evt = evt;
30180 + CSIO_INC_STATS(hw, n_evt_sm[evt]);
30181 +diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
30182 +index dbe416f..25a9a5b 100644
30183 +--- a/drivers/scsi/csiostor/csio_init.c
30184 ++++ b/drivers/scsi/csiostor/csio_init.c
30185 +@@ -1053,7 +1053,7 @@ static void csio_remove_one(struct pci_dev *pdev)
30186 + *
30187 + */
30188 + static pci_ers_result_t
30189 +-csio_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
30190 ++csio_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
30191 + {
30192 + struct csio_hw *hw = pci_get_drvdata(pdev);
30193 +
30194 +diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
30195 +index c00b2ff..da72dbc 100644
30196 +--- a/drivers/scsi/csiostor/csio_lnode.c
30197 ++++ b/drivers/scsi/csiostor/csio_lnode.c
30198 +@@ -55,10 +55,10 @@ int csio_fdmi_enable = 1;
30199 + #define PORT_ID_PTR(_x) ((uint8_t *)(&_x) + 1)
30200 +
30201 + /* Lnode SM declarations */
30202 +-static void csio_lns_uninit(struct csio_lnode *, enum csio_ln_ev);
30203 +-static void csio_lns_online(struct csio_lnode *, enum csio_ln_ev);
30204 +-static void csio_lns_ready(struct csio_lnode *, enum csio_ln_ev);
30205 +-static void csio_lns_offline(struct csio_lnode *, enum csio_ln_ev);
30206 ++static void csio_lns_uninit(struct csio_sm *, uint32_t);
30207 ++static void csio_lns_online(struct csio_sm *, uint32_t);
30208 ++static void csio_lns_ready(struct csio_sm *, uint32_t);
30209 ++static void csio_lns_offline(struct csio_sm *, uint32_t);
30210 +
30211 + static int csio_ln_mgmt_submit_req(struct csio_ioreq *,
30212 + void (*io_cbfn) (struct csio_hw *, struct csio_ioreq *),
30213 +@@ -1077,7 +1077,7 @@ csio_handle_link_down(struct csio_hw *hw, uint8_t portid, uint32_t fcfi,
30214 + int
30215 + csio_is_lnode_ready(struct csio_lnode *ln)
30216 + {
30217 +- return (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_ready));
30218 ++ return (csio_get_state(&ln->sm) == csio_lns_ready);
30219 + }
30220 +
30221 + /*****************************************************************************/
30222 +@@ -1093,8 +1093,10 @@ csio_is_lnode_ready(struct csio_lnode *ln)
30223 + * Return - none.
30224 + */
30225 + static void
30226 +-csio_lns_uninit(struct csio_lnode *ln, enum csio_ln_ev evt)
30227 ++csio_lns_uninit(struct csio_sm *_ln, uint32_t _evt)
30228 + {
30229 ++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
30230 ++ enum csio_ln_ev evt = _evt;
30231 + struct csio_hw *hw = csio_lnode_to_hw(ln);
30232 + struct csio_lnode *rln = hw->rln;
30233 + int rv;
30234 +@@ -1146,8 +1148,10 @@ csio_lns_uninit(struct csio_lnode *ln, enum csio_ln_ev evt)
30235 + * Return - none.
30236 + */
30237 + static void
30238 +-csio_lns_online(struct csio_lnode *ln, enum csio_ln_ev evt)
30239 ++csio_lns_online(struct csio_sm *_ln, uint32_t _evt)
30240 + {
30241 ++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
30242 ++ enum csio_ln_ev evt = _evt;
30243 + struct csio_hw *hw = csio_lnode_to_hw(ln);
30244 +
30245 + CSIO_INC_STATS(ln, n_evt_sm[evt]);
30246 +@@ -1198,8 +1202,10 @@ csio_lns_online(struct csio_lnode *ln, enum csio_ln_ev evt)
30247 + * Return - none.
30248 + */
30249 + static void
30250 +-csio_lns_ready(struct csio_lnode *ln, enum csio_ln_ev evt)
30251 ++csio_lns_ready(struct csio_sm *_ln, uint32_t _evt)
30252 + {
30253 ++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
30254 ++ enum csio_ln_ev evt = _evt;
30255 + struct csio_hw *hw = csio_lnode_to_hw(ln);
30256 +
30257 + CSIO_INC_STATS(ln, n_evt_sm[evt]);
30258 +@@ -1272,8 +1278,10 @@ csio_lns_ready(struct csio_lnode *ln, enum csio_ln_ev evt)
30259 + * Return - none.
30260 + */
30261 + static void
30262 +-csio_lns_offline(struct csio_lnode *ln, enum csio_ln_ev evt)
30263 ++csio_lns_offline(struct csio_sm *_ln, uint32_t _evt)
30264 + {
30265 ++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
30266 ++ enum csio_ln_ev evt = _evt;
30267 + struct csio_hw *hw = csio_lnode_to_hw(ln);
30268 + struct csio_lnode *rln = hw->rln;
30269 + int rv;
30270 +@@ -1349,15 +1357,15 @@ csio_free_fcfinfo(struct kref *kref)
30271 + void
30272 + csio_lnode_state_to_str(struct csio_lnode *ln, int8_t *str)
30273 + {
30274 +- if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_uninit)) {
30275 ++ if (csio_get_state(&ln->sm) == csio_lns_uninit) {
30276 + strcpy(str, "UNINIT");
30277 + return;
30278 + }
30279 +- if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_ready)) {
30280 ++ if (csio_get_state(&ln->sm) == csio_lns_ready) {
30281 + strcpy(str, "READY");
30282 + return;
30283 + }
30284 +- if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_offline)) {
30285 ++ if (csio_get_state(&ln->sm) == csio_lns_offline) {
30286 + strcpy(str, "OFFLINE");
30287 + return;
30288 + }
30289 +diff --git a/drivers/scsi/csiostor/csio_rnode.c b/drivers/scsi/csiostor/csio_rnode.c
30290 +index e9c3b04..4ba3a59 100644
30291 +--- a/drivers/scsi/csiostor/csio_rnode.c
30292 ++++ b/drivers/scsi/csiostor/csio_rnode.c
30293 +@@ -46,10 +46,10 @@ static int csio_rnode_init(struct csio_rnode *, struct csio_lnode *);
30294 + static void csio_rnode_exit(struct csio_rnode *);
30295 +
30296 + /* Static machine forward declarations */
30297 +-static void csio_rns_uninit(struct csio_rnode *, enum csio_rn_ev);
30298 +-static void csio_rns_ready(struct csio_rnode *, enum csio_rn_ev);
30299 +-static void csio_rns_offline(struct csio_rnode *, enum csio_rn_ev);
30300 +-static void csio_rns_disappeared(struct csio_rnode *, enum csio_rn_ev);
30301 ++static void csio_rns_uninit(struct csio_sm *, uint32_t);
30302 ++static void csio_rns_ready(struct csio_sm *, uint32_t);
30303 ++static void csio_rns_offline(struct csio_sm *, uint32_t);
30304 ++static void csio_rns_disappeared(struct csio_sm *, uint32_t);
30305 +
30306 + /* RNF event mapping */
30307 + static enum csio_rn_ev fwevt_to_rnevt[] = {
30308 +@@ -88,13 +88,13 @@ static enum csio_rn_ev fwevt_to_rnevt[] = {
30309 + int
30310 + csio_is_rnode_ready(struct csio_rnode *rn)
30311 + {
30312 +- return csio_match_state(rn, csio_rns_ready);
30313 ++ return csio_match_state(&rn->sm, csio_rns_ready);
30314 + }
30315 +
30316 + static int
30317 + csio_is_rnode_uninit(struct csio_rnode *rn)
30318 + {
30319 +- return csio_match_state(rn, csio_rns_uninit);
30320 ++ return csio_match_state(&rn->sm, csio_rns_uninit);
30321 + }
30322 +
30323 + static int
30324 +@@ -601,8 +601,10 @@ __csio_unreg_rnode(struct csio_rnode *rn)
30325 + *
30326 + */
30327 + static void
30328 +-csio_rns_uninit(struct csio_rnode *rn, enum csio_rn_ev evt)
30329 ++csio_rns_uninit(struct csio_sm *_rn, uint32_t _evt)
30330 + {
30331 ++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
30332 ++ enum csio_rn_ev evt = _evt;
30333 + struct csio_lnode *ln = csio_rnode_to_lnode(rn);
30334 + int ret = 0;
30335 +
30336 +@@ -641,8 +643,10 @@ csio_rns_uninit(struct csio_rnode *rn, enum csio_rn_ev evt)
30337 + *
30338 + */
30339 + static void
30340 +-csio_rns_ready(struct csio_rnode *rn, enum csio_rn_ev evt)
30341 ++csio_rns_ready(struct csio_sm *_rn, uint32_t _evt)
30342 + {
30343 ++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
30344 ++ enum csio_rn_ev evt = _evt;
30345 + struct csio_lnode *ln = csio_rnode_to_lnode(rn);
30346 + int ret = 0;
30347 +
30348 +@@ -726,8 +730,10 @@ csio_rns_ready(struct csio_rnode *rn, enum csio_rn_ev evt)
30349 + *
30350 + */
30351 + static void
30352 +-csio_rns_offline(struct csio_rnode *rn, enum csio_rn_ev evt)
30353 ++csio_rns_offline(struct csio_sm *_rn, uint32_t _evt)
30354 + {
30355 ++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
30356 ++ enum csio_rn_ev evt = _evt;
30357 + struct csio_lnode *ln = csio_rnode_to_lnode(rn);
30358 + int ret = 0;
30359 +
30360 +@@ -785,8 +791,10 @@ csio_rns_offline(struct csio_rnode *rn, enum csio_rn_ev evt)
30361 + *
30362 + */
30363 + static void
30364 +-csio_rns_disappeared(struct csio_rnode *rn, enum csio_rn_ev evt)
30365 ++csio_rns_disappeared(struct csio_sm *_rn, uint32_t _evt)
30366 + {
30367 ++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
30368 ++ enum csio_rn_ev evt = _evt;
30369 + struct csio_lnode *ln = csio_rnode_to_lnode(rn);
30370 + int ret = 0;
30371 +
30372 +diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
30373 +index c2a6f9f..5a37cc4 100644
30374 +--- a/drivers/scsi/csiostor/csio_scsi.c
30375 ++++ b/drivers/scsi/csiostor/csio_scsi.c
30376 +@@ -65,12 +65,12 @@ static int csio_ddp_descs = 128;
30377 + static int csio_do_abrt_cls(struct csio_hw *,
30378 + struct csio_ioreq *, bool);
30379 +
30380 +-static void csio_scsis_uninit(struct csio_ioreq *, enum csio_scsi_ev);
30381 +-static void csio_scsis_io_active(struct csio_ioreq *, enum csio_scsi_ev);
30382 +-static void csio_scsis_tm_active(struct csio_ioreq *, enum csio_scsi_ev);
30383 +-static void csio_scsis_aborting(struct csio_ioreq *, enum csio_scsi_ev);
30384 +-static void csio_scsis_closing(struct csio_ioreq *, enum csio_scsi_ev);
30385 +-static void csio_scsis_shost_cmpl_await(struct csio_ioreq *, enum csio_scsi_ev);
30386 ++static void csio_scsis_uninit(struct csio_sm *, uint32_t);
30387 ++static void csio_scsis_io_active(struct csio_sm *, uint32_t);
30388 ++static void csio_scsis_tm_active(struct csio_sm *, uint32_t);
30389 ++static void csio_scsis_aborting(struct csio_sm *, uint32_t);
30390 ++static void csio_scsis_closing(struct csio_sm *, uint32_t);
30391 ++static void csio_scsis_shost_cmpl_await(struct csio_sm *, uint32_t);
30392 +
30393 + /*
30394 + * csio_scsi_match_io - Match an ioreq with the given SCSI level data.
30395 +@@ -700,8 +700,10 @@ csio_scsi_abrt_cls(struct csio_ioreq *req, bool abort)
30396 + /* START: SCSI SM */
30397 + /*****************************************************************************/
30398 + static void
30399 +-csio_scsis_uninit(struct csio_ioreq *req, enum csio_scsi_ev evt)
30400 ++csio_scsis_uninit(struct csio_sm *_req, uint32_t _evt)
30401 + {
30402 ++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
30403 ++ enum csio_scsi_ev evt = _evt;
30404 + struct csio_hw *hw = req->lnode->hwp;
30405 + struct csio_scsim *scsim = csio_hw_to_scsim(hw);
30406 +
30407 +@@ -770,8 +772,10 @@ csio_scsis_uninit(struct csio_ioreq *req, enum csio_scsi_ev evt)
30408 + }
30409 +
30410 + static void
30411 +-csio_scsis_io_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
30412 ++csio_scsis_io_active(struct csio_sm *_req, uint32_t _evt)
30413 + {
30414 ++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
30415 ++ enum csio_scsi_ev evt = _evt;
30416 + struct csio_hw *hw = req->lnode->hwp;
30417 + struct csio_scsim *scm = csio_hw_to_scsim(hw);
30418 + struct csio_rnode *rn;
30419 +@@ -842,8 +846,10 @@ csio_scsis_io_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
30420 + }
30421 +
30422 + static void
30423 +-csio_scsis_tm_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
30424 ++csio_scsis_tm_active(struct csio_sm *_req, uint32_t _evt)
30425 + {
30426 ++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
30427 ++ enum csio_scsi_ev evt = _evt;
30428 + struct csio_hw *hw = req->lnode->hwp;
30429 + struct csio_scsim *scm = csio_hw_to_scsim(hw);
30430 +
30431 +@@ -885,8 +891,10 @@ csio_scsis_tm_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
30432 + }
30433 +
30434 + static void
30435 +-csio_scsis_aborting(struct csio_ioreq *req, enum csio_scsi_ev evt)
30436 ++csio_scsis_aborting(struct csio_sm *_req, uint32_t _evt)
30437 + {
30438 ++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
30439 ++ enum csio_scsi_ev evt = _evt;
30440 + struct csio_hw *hw = req->lnode->hwp;
30441 + struct csio_scsim *scm = csio_hw_to_scsim(hw);
30442 +
30443 +@@ -982,8 +990,10 @@ csio_scsis_aborting(struct csio_ioreq *req, enum csio_scsi_ev evt)
30444 + }
30445 +
30446 + static void
30447 +-csio_scsis_closing(struct csio_ioreq *req, enum csio_scsi_ev evt)
30448 ++csio_scsis_closing(struct csio_sm *_req, uint32_t _evt)
30449 + {
30450 ++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
30451 ++ enum csio_scsi_ev evt = _evt;
30452 + struct csio_hw *hw = req->lnode->hwp;
30453 + struct csio_scsim *scm = csio_hw_to_scsim(hw);
30454 +
30455 +@@ -1046,8 +1056,11 @@ csio_scsis_closing(struct csio_ioreq *req, enum csio_scsi_ev evt)
30456 + }
30457 +
30458 + static void
30459 +-csio_scsis_shost_cmpl_await(struct csio_ioreq *req, enum csio_scsi_ev evt)
30460 ++csio_scsis_shost_cmpl_await(struct csio_sm *_req, uint32_t _evt)
30461 + {
30462 ++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
30463 ++ enum csio_scsi_ev evt = _evt;
30464 ++
30465 + switch (evt) {
30466 + case CSIO_SCSIE_ABORT:
30467 + case CSIO_SCSIE_CLOSE:
30468 diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
30469 index f3bb7af..ead83a2 100644
30470 --- a/drivers/scsi/cxgbi/libcxgbi.c
30471 @@ -56464,6 +68603,64 @@ index 045c4e1..13de803 100644
30472
30473 error = bus_register(&fcoe_bus_type);
30474 if (error)
30475 +diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
30476 +index d7597c0..fa26730 100644
30477 +--- a/drivers/scsi/fcoe/fcoe_transport.c
30478 ++++ b/drivers/scsi/fcoe/fcoe_transport.c
30479 +@@ -32,13 +32,13 @@ MODULE_AUTHOR("Open-FCoE.org");
30480 + MODULE_DESCRIPTION("FIP discovery protocol and FCoE transport for FCoE HBAs");
30481 + MODULE_LICENSE("GPL v2");
30482 +
30483 +-static int fcoe_transport_create(const char *, struct kernel_param *);
30484 +-static int fcoe_transport_destroy(const char *, struct kernel_param *);
30485 ++static int fcoe_transport_create(const char *, const struct kernel_param *);
30486 ++static int fcoe_transport_destroy(const char *, const struct kernel_param *);
30487 + static int fcoe_transport_show(char *buffer, const struct kernel_param *kp);
30488 + static struct fcoe_transport *fcoe_transport_lookup(struct net_device *device);
30489 + static struct fcoe_transport *fcoe_netdev_map_lookup(struct net_device *device);
30490 +-static int fcoe_transport_enable(const char *, struct kernel_param *);
30491 +-static int fcoe_transport_disable(const char *, struct kernel_param *);
30492 ++static int fcoe_transport_enable(const char *, const struct kernel_param *);
30493 ++static int fcoe_transport_disable(const char *, const struct kernel_param *);
30494 + static int libfcoe_device_notification(struct notifier_block *notifier,
30495 + ulong event, void *ptr);
30496 +
30497 +@@ -842,7 +842,7 @@ EXPORT_SYMBOL(fcoe_ctlr_destroy_store);
30498 + *
30499 + * Returns: 0 for success
30500 + */
30501 +-static int fcoe_transport_create(const char *buffer, struct kernel_param *kp)
30502 ++static int fcoe_transport_create(const char *buffer, const struct kernel_param *kp)
30503 + {
30504 + int rc = -ENODEV;
30505 + struct net_device *netdev = NULL;
30506 +@@ -907,7 +907,7 @@ out_nodev:
30507 + *
30508 + * Returns: 0 for success
30509 + */
30510 +-static int fcoe_transport_destroy(const char *buffer, struct kernel_param *kp)
30511 ++static int fcoe_transport_destroy(const char *buffer, const struct kernel_param *kp)
30512 + {
30513 + int rc = -ENODEV;
30514 + struct net_device *netdev = NULL;
30515 +@@ -951,7 +951,7 @@ out_nodev:
30516 + *
30517 + * Returns: 0 for success
30518 + */
30519 +-static int fcoe_transport_disable(const char *buffer, struct kernel_param *kp)
30520 ++static int fcoe_transport_disable(const char *buffer, const struct kernel_param *kp)
30521 + {
30522 + int rc = -ENODEV;
30523 + struct net_device *netdev = NULL;
30524 +@@ -985,7 +985,7 @@ out_nodev:
30525 + *
30526 + * Returns: 0 for success
30527 + */
30528 +-static int fcoe_transport_enable(const char *buffer, struct kernel_param *kp)
30529 ++static int fcoe_transport_enable(const char *buffer, const struct kernel_param *kp)
30530 + {
30531 + int rc = -ENODEV;
30532 + struct net_device *netdev = NULL;
30533 diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
30534 index 82ac1cd..aeee84c 100644
30535 --- a/drivers/scsi/hosts.c
30536 @@ -56487,10 +68684,10 @@ index 82ac1cd..aeee84c 100644
30537
30538 /* These three are default values which can be overridden */
30539 diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
30540 -index a386036..03dff12 100644
30541 +index 38ce0e3..f74fc2a 100644
30542 --- a/drivers/scsi/hpsa.c
30543 +++ b/drivers/scsi/hpsa.c
30544 -@@ -916,10 +916,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q)
30545 +@@ -912,10 +912,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q)
30546 struct reply_queue_buffer *rq = &h->reply_queue[q];
30547
30548 if (h->transMethod & CFGTBL_Trans_io_accel1)
30549 @@ -56503,7 +68700,7 @@ index a386036..03dff12 100644
30550
30551 if ((rq->head[rq->current_entry] & 1) == rq->wraparound) {
30552 a = rq->head[rq->current_entry];
30553 -@@ -1101,7 +1101,7 @@ static void __enqueue_cmd_and_start_io(struct ctlr_info *h,
30554 +@@ -1097,7 +1097,7 @@ static void __enqueue_cmd_and_start_io(struct ctlr_info *h,
30555 break;
30556 default:
30557 set_performant_mode(h, c, reply_queue);
30558 @@ -56512,7 +68709,7 @@ index a386036..03dff12 100644
30559 }
30560 }
30561
30562 -@@ -6746,17 +6746,17 @@ static void __iomem *remap_pci_mem(ulong base, ulong size)
30563 +@@ -6839,17 +6839,17 @@ static void __iomem *remap_pci_mem(ulong base, ulong size)
30564
30565 static inline unsigned long get_next_completion(struct ctlr_info *h, u8 q)
30566 {
30567 @@ -56533,7 +68730,7 @@ index a386036..03dff12 100644
30568 (h->interrupts_enabled == 0);
30569 }
30570
30571 -@@ -7684,7 +7684,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
30572 +@@ -7777,7 +7777,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
30573 if (prod_index < 0)
30574 return prod_index;
30575 h->product_name = products[prod_index].product_name;
30576 @@ -56542,7 +68739,7 @@ index a386036..03dff12 100644
30577
30578 h->needs_abort_tags_swizzled =
30579 ctlr_needs_abort_tags_swizzled(h->board_id);
30580 -@@ -8083,7 +8083,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
30581 +@@ -8176,7 +8176,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
30582 unsigned long flags;
30583 u32 lockup_detected;
30584
30585 @@ -56551,7 +68748,7 @@ index a386036..03dff12 100644
30586 spin_lock_irqsave(&h->lock, flags);
30587 lockup_detected = readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
30588 if (!lockup_detected) {
30589 -@@ -8419,7 +8419,7 @@ reinit_after_soft_reset:
30590 +@@ -8512,7 +8512,7 @@ reinit_after_soft_reset:
30591 }
30592
30593 /* make sure the board interrupts are off */
30594 @@ -56560,7 +68757,7 @@ index a386036..03dff12 100644
30595
30596 rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
30597 if (rc)
30598 -@@ -8477,7 +8477,7 @@ reinit_after_soft_reset:
30599 +@@ -8570,7 +8570,7 @@ reinit_after_soft_reset:
30600 * fake ones to scoop up any residual completions.
30601 */
30602 spin_lock_irqsave(&h->lock, flags);
30603 @@ -56569,7 +68766,7 @@ index a386036..03dff12 100644
30604 spin_unlock_irqrestore(&h->lock, flags);
30605 hpsa_free_irqs(h);
30606 rc = hpsa_request_irqs(h, hpsa_msix_discard_completions,
30607 -@@ -8507,9 +8507,9 @@ reinit_after_soft_reset:
30608 +@@ -8600,9 +8600,9 @@ reinit_after_soft_reset:
30609 dev_info(&h->pdev->dev, "Board READY.\n");
30610 dev_info(&h->pdev->dev,
30611 "Waiting for stale completions to drain.\n");
30612 @@ -56581,7 +68778,7 @@ index a386036..03dff12 100644
30613
30614 rc = controller_reset_failed(h->cfgtable);
30615 if (rc)
30616 -@@ -8536,7 +8536,7 @@ reinit_after_soft_reset:
30617 +@@ -8629,7 +8629,7 @@ reinit_after_soft_reset:
30618
30619
30620 /* Turn the interrupts on so we can service requests */
30621 @@ -56590,7 +68787,7 @@ index a386036..03dff12 100644
30622
30623 hpsa_hba_inquiry(h);
30624
30625 -@@ -8557,7 +8557,7 @@ reinit_after_soft_reset:
30626 +@@ -8650,7 +8650,7 @@ reinit_after_soft_reset:
30627
30628 clean7: /* perf, sg, cmd, irq, shost, pci, lu, aer/h */
30629 hpsa_free_performant_mode(h);
30630 @@ -56599,7 +68796,7 @@ index a386036..03dff12 100644
30631 clean6: /* sg, cmd, irq, pci, lockup, wq/aer/h */
30632 hpsa_free_sg_chain_blocks(h);
30633 clean5: /* cmd, irq, shost, pci, lu, aer/h */
30634 -@@ -8692,7 +8692,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
30635 +@@ -8785,7 +8785,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
30636 * To write all data in the battery backed cache to disks
30637 */
30638 hpsa_flush_cache(h);
30639 @@ -56608,7 +68805,7 @@ index a386036..03dff12 100644
30640 hpsa_free_irqs(h); /* init_one 4 */
30641 hpsa_disable_interrupt_mode(h); /* pci_init 2 */
30642 }
30643 -@@ -8834,7 +8834,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
30644 +@@ -8927,7 +8927,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
30645 CFGTBL_Trans_enable_directed_msix |
30646 (trans_support & (CFGTBL_Trans_io_accel1 |
30647 CFGTBL_Trans_io_accel2));
30648 @@ -56617,7 +68814,7 @@ index a386036..03dff12 100644
30649
30650 /* This is a bit complicated. There are 8 registers on
30651 * the controller which we write to to tell it 8 different
30652 -@@ -8876,7 +8876,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
30653 +@@ -8969,7 +8969,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
30654 * perform the superfluous readl() after each command submission.
30655 */
30656 if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2))
30657 @@ -56626,7 +68823,7 @@ index a386036..03dff12 100644
30658
30659 /* Controller spec: zero out this buffer. */
30660 for (i = 0; i < h->nreply_queues; i++)
30661 -@@ -8906,12 +8906,12 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
30662 +@@ -8999,12 +8999,12 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
30663 * enable outbound interrupt coalescing in accelerator mode;
30664 */
30665 if (trans_support & CFGTBL_Trans_io_accel1) {
30666 @@ -56642,7 +68839,7 @@ index a386036..03dff12 100644
30667 writel(4, &h->cfgtable->HostWrite.CoalIntCount);
30668 }
30669 diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
30670 -index ae5beda..59e7332 100644
30671 +index fdd39fc..a2176e0 100644
30672 --- a/drivers/scsi/hpsa.h
30673 +++ b/drivers/scsi/hpsa.h
30674 @@ -177,7 +177,7 @@ struct ctlr_info {
30675 @@ -56746,9 +68943,36 @@ index 4d1c511..d5744cb 100644
30676
30677 wait_queue_head_t reset_wq;
30678 diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
30679 -index 43ac626..1bf014e9 100644
30680 +index d6a691e..59e3128 100644
30681 --- a/drivers/scsi/ipr.c
30682 +++ b/drivers/scsi/ipr.c
30683 +@@ -947,7 +947,7 @@ static void ipr_send_command(struct ipr_cmnd *ipr_cmd)
30684 + **/
30685 + static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
30686 + void (*done) (struct ipr_cmnd *),
30687 +- void (*timeout_func) (struct ipr_cmnd *), u32 timeout)
30688 ++ void (*timeout_func) (unsigned long), u32 timeout)
30689 + {
30690 + list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
30691 +
30692 +@@ -955,7 +955,7 @@ static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
30693 +
30694 + ipr_cmd->timer.data = (unsigned long) ipr_cmd;
30695 + ipr_cmd->timer.expires = jiffies + timeout;
30696 +- ipr_cmd->timer.function = (void (*)(unsigned long))timeout_func;
30697 ++ ipr_cmd->timer.function = timeout_func;
30698 +
30699 + add_timer(&ipr_cmd->timer);
30700 +
30701 +@@ -1037,7 +1037,7 @@ static void ipr_init_ioadl(struct ipr_cmnd *ipr_cmd, dma_addr_t dma_addr,
30702 + * none
30703 + **/
30704 + static void ipr_send_blocking_cmd(struct ipr_cmnd *ipr_cmd,
30705 +- void (*timeout_func) (struct ipr_cmnd *ipr_cmd),
30706 ++ void (*timeout_func) (unsigned long ipr_cmd),
30707 + u32 timeout)
30708 + {
30709 + struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
30710 @@ -1057,7 +1057,7 @@ static int ipr_get_hrrq_index(struct ipr_ioa_cfg *ioa_cfg)
30711 if (ioa_cfg->hrrq_num == 1)
30712 hrrq = 0;
30713 @@ -56758,7 +68982,60 @@ index 43ac626..1bf014e9 100644
30714 hrrq = (hrrq % (ioa_cfg->hrrq_num - 1)) + 1;
30715 }
30716 return hrrq;
30717 -@@ -8107,9 +8107,9 @@ static void ipr_init_ioa_mem(struct ipr_ioa_cfg *ioa_cfg)
30718 +@@ -2600,8 +2600,9 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
30719 + * Return value:
30720 + * none
30721 + **/
30722 +-static void ipr_timeout(struct ipr_cmnd *ipr_cmd)
30723 ++static void ipr_timeout(unsigned long _ipr_cmd)
30724 + {
30725 ++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
30726 + unsigned long lock_flags = 0;
30727 + struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
30728 +
30729 +@@ -2632,8 +2633,9 @@ static void ipr_timeout(struct ipr_cmnd *ipr_cmd)
30730 + * Return value:
30731 + * none
30732 + **/
30733 +-static void ipr_oper_timeout(struct ipr_cmnd *ipr_cmd)
30734 ++static void ipr_oper_timeout(unsigned long _ipr_cmd)
30735 + {
30736 ++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
30737 + unsigned long lock_flags = 0;
30738 + struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
30739 +
30740 +@@ -5263,8 +5265,9 @@ static void ipr_bus_reset_done(struct ipr_cmnd *ipr_cmd)
30741 + * Return value:
30742 + * none
30743 + **/
30744 +-static void ipr_abort_timeout(struct ipr_cmnd *ipr_cmd)
30745 ++static void ipr_abort_timeout(unsigned long _ipr_cmd)
30746 + {
30747 ++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
30748 + struct ipr_cmnd *reset_cmd;
30749 + struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
30750 + struct ipr_cmd_pkt *cmd_pkt;
30751 +@@ -8036,8 +8039,9 @@ static int ipr_ioafp_identify_hrrq(struct ipr_cmnd *ipr_cmd)
30752 + * Return value:
30753 + * none
30754 + **/
30755 +-static void ipr_reset_timer_done(struct ipr_cmnd *ipr_cmd)
30756 ++static void ipr_reset_timer_done(unsigned long _ipr_cmd)
30757 + {
30758 ++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
30759 + struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
30760 + unsigned long lock_flags = 0;
30761 +
30762 +@@ -8075,7 +8079,7 @@ static void ipr_reset_start_timer(struct ipr_cmnd *ipr_cmd,
30763 +
30764 + ipr_cmd->timer.data = (unsigned long) ipr_cmd;
30765 + ipr_cmd->timer.expires = jiffies + timeout;
30766 +- ipr_cmd->timer.function = (void (*)(unsigned long))ipr_reset_timer_done;
30767 ++ ipr_cmd->timer.function = ipr_reset_timer_done;
30768 + add_timer(&ipr_cmd->timer);
30769 + }
30770 +
30771 +@@ -8105,9 +8109,9 @@ static void ipr_init_ioa_mem(struct ipr_ioa_cfg *ioa_cfg)
30772
30773 ioa_cfg->identify_hrrq_index = 0;
30774 if (ioa_cfg->hrrq_num == 1)
30775 @@ -56770,8 +69047,35 @@ index 43ac626..1bf014e9 100644
30776
30777 /* Zero out config table */
30778 memset(ioa_cfg->u.cfg_table, 0, ioa_cfg->cfg_table_size);
30779 +@@ -8161,7 +8165,7 @@ static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd)
30780 +
30781 + ipr_cmd->timer.data = (unsigned long) ipr_cmd;
30782 + ipr_cmd->timer.expires = jiffies + stage_time * HZ;
30783 +- ipr_cmd->timer.function = (void (*)(unsigned long))ipr_oper_timeout;
30784 ++ ipr_cmd->timer.function = ipr_oper_timeout;
30785 + ipr_cmd->done = ipr_reset_ioa_job;
30786 + add_timer(&ipr_cmd->timer);
30787 +
30788 +@@ -8233,7 +8237,7 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
30789 +
30790 + ipr_cmd->timer.data = (unsigned long) ipr_cmd;
30791 + ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ);
30792 +- ipr_cmd->timer.function = (void (*)(unsigned long))ipr_oper_timeout;
30793 ++ ipr_cmd->timer.function = ipr_oper_timeout;
30794 + ipr_cmd->done = ipr_reset_ioa_job;
30795 + add_timer(&ipr_cmd->timer);
30796 + list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
30797 +@@ -9221,7 +9225,7 @@ static void ipr_pci_perm_failure(struct pci_dev *pdev)
30798 + * PCI_ERS_RESULT_NEED_RESET or PCI_ERS_RESULT_DISCONNECT
30799 + */
30800 + static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev,
30801 +- pci_channel_state_t state)
30802 ++ enum pci_channel_state state)
30803 + {
30804 + switch (state) {
30805 + case pci_channel_io_frozen:
30806 diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
30807 -index a34c7a5..797901a 100644
30808 +index 56c5706..209ec50 100644
30809 --- a/drivers/scsi/ipr.h
30810 +++ b/drivers/scsi/ipr.h
30811 @@ -1535,7 +1535,7 @@ struct ipr_ioa_cfg {
30812 @@ -56942,10 +69246,10 @@ index 9c706d8..d3e3ed2 100644
30813 .qc_issue = sas_ata_qc_issue,
30814 .qc_fill_rtf = sas_ata_qc_fill_rtf,
30815 diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
30816 -index ceee9a3..59939c5 100644
30817 +index 90a3ca5..a68c8cd 100644
30818 --- a/drivers/scsi/lpfc/lpfc.h
30819 +++ b/drivers/scsi/lpfc/lpfc.h
30820 -@@ -435,7 +435,7 @@ struct lpfc_vport {
30821 +@@ -430,7 +430,7 @@ struct lpfc_vport {
30822 struct dentry *debug_nodelist;
30823 struct dentry *vport_debugfs_root;
30824 struct lpfc_debugfs_trc *disc_trc;
30825 @@ -56954,7 +69258,7 @@ index ceee9a3..59939c5 100644
30826 #endif
30827 uint8_t stat_data_enabled;
30828 uint8_t stat_data_blocked;
30829 -@@ -887,8 +887,8 @@ struct lpfc_hba {
30830 +@@ -891,8 +891,8 @@ struct lpfc_hba {
30831 struct timer_list fabric_block_timer;
30832 unsigned long bit_flags;
30833 #define FABRIC_COMANDS_BLOCKED 0
30834 @@ -56965,7 +69269,7 @@ index ceee9a3..59939c5 100644
30835 unsigned long last_rsrc_error_time;
30836 unsigned long last_ramp_down_time;
30837 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
30838 -@@ -923,7 +923,7 @@ struct lpfc_hba {
30839 +@@ -927,7 +927,7 @@ struct lpfc_hba {
30840
30841 struct dentry *debug_slow_ring_trc;
30842 struct lpfc_debugfs_trc *slow_ring_trc;
30843 @@ -57058,10 +69362,19 @@ index 25aa9b9..d700a65 100644
30844 snprintf(name, sizeof(name), "discovery_trace");
30845 vport->debug_disc_trc =
30846 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
30847 -index db9446c..627edd4 100644
30848 +index a544366..311a655 100644
30849 --- a/drivers/scsi/lpfc/lpfc_init.c
30850 +++ b/drivers/scsi/lpfc/lpfc_init.c
30851 -@@ -11425,8 +11425,10 @@ lpfc_init(void)
30852 +@@ -11027,7 +11027,7 @@ lpfc_pci_resume_one(struct pci_dev *pdev)
30853 + * PCI_ERS_RESULT_DISCONNECT - device could not be recovered
30854 + **/
30855 + static pci_ers_result_t
30856 +-lpfc_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
30857 ++lpfc_io_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
30858 + {
30859 + struct Scsi_Host *shost = pci_get_drvdata(pdev);
30860 + struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba;
30861 +@@ -11435,8 +11435,10 @@ lpfc_init(void)
30862 "misc_register returned with status %d", error);
30863
30864 if (lpfc_enable_npiv) {
30865 @@ -57075,7 +69388,7 @@ index db9446c..627edd4 100644
30866 lpfc_transport_template =
30867 fc_attach_transport(&lpfc_transport_functions);
30868 diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
30869 -index 4679ed4..4ddcfea 100644
30870 +index 152b3c8..cfb6a1d 100644
30871 --- a/drivers/scsi/lpfc/lpfc_scsi.c
30872 +++ b/drivers/scsi/lpfc/lpfc_scsi.c
30873 @@ -261,7 +261,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
30874 @@ -57122,8 +69435,43 @@ index c0f7c8c..2903f29 100644
30875 u16 max_mfi_cmds;
30876 u16 max_scsi_cmds;
30877 u32 max_sectors_per_req;
30878 +diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
30879 +index 83658ac..4269881 100644
30880 +--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
30881 ++++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
30882 +@@ -100,7 +100,7 @@ _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc, int sleep_flag);
30883 + *
30884 + */
30885 + static int
30886 +-_scsih_set_fwfault_debug(const char *val, struct kernel_param *kp)
30887 ++_scsih_set_fwfault_debug(const char *val, const struct kernel_param *kp)
30888 + {
30889 + int ret = param_set_int(val, kp);
30890 + struct MPT3SAS_ADAPTER *ioc;
30891 +diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
30892 +index 9ab77b0..3cc9611 100644
30893 +--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
30894 ++++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
30895 +@@ -282,7 +282,7 @@ struct _scsi_io_transfer {
30896 + * Note: The logging levels are defined in mpt3sas_debug.h.
30897 + */
30898 + static int
30899 +-_scsih_set_debug_level(const char *val, struct kernel_param *kp)
30900 ++_scsih_set_debug_level(const char *val, const struct kernel_param *kp)
30901 + {
30902 + int ret = param_set_int(val, kp);
30903 + struct MPT3SAS_ADAPTER *ioc;
30904 +@@ -8702,7 +8702,7 @@ scsih_resume(struct pci_dev *pdev)
30905 + * PCI_ERS_RESULT_NEED_RESET or PCI_ERS_RESULT_DISCONNECT
30906 + */
30907 + pci_ers_result_t
30908 +-scsih_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
30909 ++scsih_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
30910 + {
30911 + struct Scsi_Host *shost = pci_get_drvdata(pdev);
30912 + struct MPT3SAS_ADAPTER *ioc = shost_priv(shost);
30913 diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
30914 -index b2a88200..f469ddd 100644
30915 +index b2a88200..d66f0cc 100644
30916 --- a/drivers/scsi/pmcraid.c
30917 +++ b/drivers/scsi/pmcraid.c
30918 @@ -201,8 +201,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
30919 @@ -57137,6 +69485,105 @@ index b2a88200..f469ddd 100644
30920 rc = 0;
30921 }
30922 spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags);
30923 +@@ -557,8 +557,9 @@ static void pmcraid_reset_type(struct pmcraid_instance *pinstance)
30924 +
30925 + static void pmcraid_ioa_reset(struct pmcraid_cmd *);
30926 +
30927 +-static void pmcraid_bist_done(struct pmcraid_cmd *cmd)
30928 ++static void pmcraid_bist_done(unsigned long _cmd)
30929 + {
30930 ++ struct pmcraid_cmd *cmd = (struct pmcraid_cmd *)_cmd;
30931 + struct pmcraid_instance *pinstance = cmd->drv_inst;
30932 + unsigned long lock_flags;
30933 + int rc;
30934 +@@ -573,8 +574,7 @@ static void pmcraid_bist_done(struct pmcraid_cmd *cmd)
30935 + cmd->timer.expires = jiffies + cmd->time_left;
30936 + cmd->time_left = 0;
30937 + cmd->timer.data = (unsigned long)cmd;
30938 +- cmd->timer.function =
30939 +- (void (*)(unsigned long))pmcraid_bist_done;
30940 ++ cmd->timer.function = pmcraid_bist_done;
30941 + add_timer(&cmd->timer);
30942 + } else {
30943 + cmd->time_left = 0;
30944 +@@ -607,7 +607,7 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd)
30945 + cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT);
30946 + cmd->timer.data = (unsigned long)cmd;
30947 + cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT);
30948 +- cmd->timer.function = (void (*)(unsigned long))pmcraid_bist_done;
30949 ++ cmd->timer.function = pmcraid_bist_done;
30950 + add_timer(&cmd->timer);
30951 + }
30952 +
30953 +@@ -617,8 +617,9 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd)
30954 + * Return value
30955 + * None
30956 + */
30957 +-static void pmcraid_reset_alert_done(struct pmcraid_cmd *cmd)
30958 ++static void pmcraid_reset_alert_done(unsigned long _cmd)
30959 + {
30960 ++ struct pmcraid_cmd *cmd = (struct pmcraid_cmd *)_cmd;
30961 + struct pmcraid_instance *pinstance = cmd->drv_inst;
30962 + u32 status = ioread32(pinstance->ioa_status);
30963 + unsigned long lock_flags;
30964 +@@ -639,8 +640,7 @@ static void pmcraid_reset_alert_done(struct pmcraid_cmd *cmd)
30965 + cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT;
30966 + cmd->timer.data = (unsigned long)cmd;
30967 + cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT;
30968 +- cmd->timer.function =
30969 +- (void (*)(unsigned long))pmcraid_reset_alert_done;
30970 ++ cmd->timer.function = pmcraid_reset_alert_done;
30971 + add_timer(&cmd->timer);
30972 + }
30973 + }
30974 +@@ -678,8 +678,7 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
30975 + cmd->time_left = PMCRAID_RESET_TIMEOUT;
30976 + cmd->timer.data = (unsigned long)cmd;
30977 + cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT;
30978 +- cmd->timer.function =
30979 +- (void (*)(unsigned long))pmcraid_reset_alert_done;
30980 ++ cmd->timer.function = pmcraid_reset_alert_done;
30981 + add_timer(&cmd->timer);
30982 +
30983 + iowrite32(DOORBELL_IOA_RESET_ALERT,
30984 +@@ -704,8 +703,9 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
30985 + * Return value:
30986 + * None
30987 + */
30988 +-static void pmcraid_timeout_handler(struct pmcraid_cmd *cmd)
30989 ++static void pmcraid_timeout_handler(unsigned long _cmd)
30990 + {
30991 ++ struct pmcraid_cmd *cmd = (struct pmcraid_cmd *)_cmd;
30992 + struct pmcraid_instance *pinstance = cmd->drv_inst;
30993 + unsigned long lock_flags;
30994 +
30995 +@@ -920,7 +920,7 @@ static void pmcraid_send_cmd(
30996 + struct pmcraid_cmd *cmd,
30997 + void (*cmd_done) (struct pmcraid_cmd *),
30998 + unsigned long timeout,
30999 +- void (*timeout_func) (struct pmcraid_cmd *)
31000 ++ void (*timeout_func) (unsigned long)
31001 + )
31002 + {
31003 + /* initialize done function */
31004 +@@ -930,7 +930,7 @@ static void pmcraid_send_cmd(
31005 + /* setup timeout handler */
31006 + cmd->timer.data = (unsigned long)cmd;
31007 + cmd->timer.expires = jiffies + timeout;
31008 +- cmd->timer.function = (void (*)(unsigned long))timeout_func;
31009 ++ cmd->timer.function = timeout_func;
31010 + add_timer(&cmd->timer);
31011 + }
31012 +
31013 +@@ -1968,7 +1968,7 @@ static void pmcraid_soft_reset(struct pmcraid_cmd *cmd)
31014 + cmd->timer.data = (unsigned long)cmd;
31015 + cmd->timer.expires = jiffies +
31016 + msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT);
31017 +- cmd->timer.function = (void (*)(unsigned long))pmcraid_timeout_handler;
31018 ++ cmd->timer.function = pmcraid_timeout_handler;
31019 +
31020 + if (!timer_pending(&cmd->timer))
31021 + add_timer(&cmd->timer);
31022 @@ -2641,9 +2641,9 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd)
31023
31024 /* If this was a SCSI read/write command keep count of errors */
31025 @@ -57230,10 +69677,10 @@ index e1d150f..6c6df44 100644
31026 /* To indicate add/delete/modify during CCN */
31027 u8 change_detected;
31028 diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
31029 -index 6b942d9..cd44452 100644
31030 +index 6992ebc..30d7691 100644
31031 --- a/drivers/scsi/qla2xxx/qla_attr.c
31032 +++ b/drivers/scsi/qla2xxx/qla_attr.c
31033 -@@ -2206,7 +2206,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
31034 +@@ -2242,7 +2242,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
31035 return 0;
31036 }
31037
31038 @@ -57242,7 +69689,7 @@ index 6b942d9..cd44452 100644
31039
31040 .show_host_node_name = 1,
31041 .show_host_port_name = 1,
31042 -@@ -2254,7 +2254,7 @@ struct fc_function_template qla2xxx_transport_functions = {
31043 +@@ -2290,7 +2290,7 @@ struct fc_function_template qla2xxx_transport_functions = {
31044 .bsg_timeout = qla24xx_bsg_timeout,
31045 };
31046
31047 @@ -57252,10 +69699,21 @@ index 6b942d9..cd44452 100644
31048 .show_host_node_name = 1,
31049 .show_host_port_name = 1,
31050 diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
31051 -index 7686bfe..4710893 100644
31052 +index 0103e46..6220a84 100644
31053 --- a/drivers/scsi/qla2xxx/qla_gbl.h
31054 +++ b/drivers/scsi/qla2xxx/qla_gbl.h
31055 -@@ -571,8 +571,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
31056 +@@ -176,8 +176,8 @@ extern void qla2x00_disable_board_on_pci_error(struct work_struct *);
31057 + */
31058 + extern struct scsi_host_template qla2xxx_driver_template;
31059 + extern struct scsi_transport_template *qla2xxx_transport_vport_template;
31060 +-extern void qla2x00_timer(scsi_qla_host_t *);
31061 +-extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long);
31062 ++extern void qla2x00_timer(unsigned long);
31063 ++extern void qla2x00_start_timer(scsi_qla_host_t *, void (*)(unsigned long), unsigned long);
31064 + extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
31065 + extern int qla24xx_disable_vp (scsi_qla_host_t *);
31066 + extern int qla24xx_enable_vp (scsi_qla_host_t *);
31067 +@@ -578,8 +578,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
31068 struct device_attribute;
31069 extern struct device_attribute *qla2x00_host_attrs[];
31070 struct fc_function_template;
31071 @@ -57267,10 +69725,25 @@ index 7686bfe..4710893 100644
31072 extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *, bool);
31073 extern void qla2x00_init_host_attr(scsi_qla_host_t *);
31074 diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
31075 -index fc6674d..8f3aa03 100644
31076 +index f6c7ce3..2dd675b 100644
31077 --- a/drivers/scsi/qla2xxx/qla_os.c
31078 +++ b/drivers/scsi/qla2xxx/qla_os.c
31079 -@@ -1429,8 +1429,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
31080 +@@ -291,12 +291,12 @@ struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
31081 + */
31082 +
31083 + __inline__ void
31084 +-qla2x00_start_timer(scsi_qla_host_t *vha, void *func, unsigned long interval)
31085 ++qla2x00_start_timer(scsi_qla_host_t *vha, void (*func)(unsigned long), unsigned long interval)
31086 + {
31087 + init_timer(&vha->timer);
31088 + vha->timer.expires = jiffies + interval * HZ;
31089 + vha->timer.data = (unsigned long)vha;
31090 +- vha->timer.function = (void (*)(unsigned long))func;
31091 ++ vha->timer.function = func;
31092 + add_timer(&vha->timer);
31093 + vha->timer_active = 1;
31094 + }
31095 +@@ -1441,8 +1441,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
31096 !pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
31097 /* Ok, a 64bit DMA mask is applicable. */
31098 ha->flags.enable_64bit_addressing = 1;
31099 @@ -57283,20 +69756,51 @@ index fc6674d..8f3aa03 100644
31100 return;
31101 }
31102 }
31103 +@@ -5290,8 +5292,9 @@ qla2x00_rst_aen(scsi_qla_host_t *vha)
31104 + * Context: Interrupt
31105 + ***************************************************************************/
31106 + void
31107 +-qla2x00_timer(scsi_qla_host_t *vha)
31108 ++qla2x00_timer(unsigned long _vha)
31109 + {
31110 ++ scsi_qla_host_t *vha = (scsi_qla_host_t *)_vha;
31111 + unsigned long cpu_flags = 0;
31112 + int start_dpc = 0;
31113 + int index;
31114 +@@ -5553,7 +5556,7 @@ qla2x00_release_firmware(void)
31115 + }
31116 +
31117 + static pci_ers_result_t
31118 +-qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
31119 ++qla2xxx_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
31120 + {
31121 + scsi_qla_host_t *vha = pci_get_drvdata(pdev);
31122 + struct qla_hw_data *ha = vha->hw;
31123 diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
31124 -index 75514a1..8526741 100644
31125 +index ee967be..7fcb8c0 100644
31126 --- a/drivers/scsi/qla2xxx/qla_target.c
31127 +++ b/drivers/scsi/qla2xxx/qla_target.c
31128 -@@ -506,7 +506,7 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)
31129 +@@ -667,7 +667,7 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)
31130 loop_id = le16_to_cpu(n->u.isp24.nport_handle);
31131 if (loop_id == 0xFFFF) {
31132 /* Global event */
31133 - atomic_inc(&vha->vha_tgt.qla_tgt->tgt_global_resets_count);
31134 + atomic_inc_unchecked(&vha->vha_tgt.qla_tgt->tgt_global_resets_count);
31135 + spin_lock_irqsave(&ha->tgt.sess_lock, flags);
31136 qlt_clear_tgt_db(vha->vha_tgt.qla_tgt);
31137 - #if 0 /* FIXME: do we need to choose a session here? */
31138 - if (!list_empty(&ha->tgt.qla_tgt->sess_list)) {
31139 -@@ -5536,7 +5536,7 @@ static struct qla_tgt_sess *qlt_make_local_sess(struct scsi_qla_host *vha,
31140 + spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
31141 +@@ -834,8 +834,9 @@ static void qlt_undelete_sess(struct qla_tgt_sess *sess)
31142 + sess->deleted = 0;
31143 + }
31144 +
31145 +-static void qlt_del_sess_work_fn(struct delayed_work *work)
31146 ++static void qlt_del_sess_work_fn(struct work_struct *_work)
31147 + {
31148 ++ struct delayed_work *work = container_of(_work, struct delayed_work, work);
31149 + struct qla_tgt *tgt = container_of(work, struct qla_tgt,
31150 + sess_del_work);
31151 + struct scsi_qla_host *vha = tgt->vha;
31152 +@@ -5806,7 +5807,7 @@ static struct qla_tgt_sess *qlt_make_local_sess(struct scsi_qla_host *vha,
31153
31154 retry:
31155 global_resets =
31156 @@ -57305,8 +69809,8 @@ index 75514a1..8526741 100644
31157
31158 rc = qla24xx_get_loop_id(vha, s_id, &loop_id);
31159 if (rc != 0) {
31160 -@@ -5563,12 +5563,12 @@ retry:
31161 - return NULL;
31162 +@@ -5845,12 +5846,12 @@ retry:
31163 + }
31164
31165 if (global_resets !=
31166 - atomic_read(&vha->vha_tgt.qla_tgt->tgt_global_resets_count)) {
31167 @@ -57320,7 +69824,17 @@ index 75514a1..8526741 100644
31168 qla_tgt->tgt_global_resets_count));
31169 goto retry;
31170 }
31171 -@@ -5784,7 +5784,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
31172 +@@ -6063,8 +6064,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
31173 + init_waitqueue_head(&tgt->waitQ);
31174 + INIT_LIST_HEAD(&tgt->sess_list);
31175 + INIT_LIST_HEAD(&tgt->del_sess_list);
31176 +- INIT_DELAYED_WORK(&tgt->sess_del_work,
31177 +- (void (*)(struct work_struct *))qlt_del_sess_work_fn);
31178 ++ INIT_DELAYED_WORK(&tgt->sess_del_work, qlt_del_sess_work_fn);
31179 + spin_lock_init(&tgt->sess_work_lock);
31180 + INIT_WORK(&tgt->sess_work, qlt_sess_work_fn);
31181 + INIT_LIST_HEAD(&tgt->sess_works_list);
31182 +@@ -6072,7 +6072,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
31183 INIT_LIST_HEAD(&tgt->srr_ctio_list);
31184 INIT_LIST_HEAD(&tgt->srr_imm_list);
31185 INIT_WORK(&tgt->srr_work, qlt_handle_srr_work);
31186 @@ -57330,10 +69844,10 @@ index 75514a1..8526741 100644
31187 base_vha->vha_tgt.qla_tgt = tgt;
31188
31189 diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
31190 -index bca584a..9cb3ed9 100644
31191 +index 22a6a76..7f73de1 100644
31192 --- a/drivers/scsi/qla2xxx/qla_target.h
31193 +++ b/drivers/scsi/qla2xxx/qla_target.h
31194 -@@ -876,7 +876,7 @@ struct qla_tgt {
31195 +@@ -877,7 +877,7 @@ struct qla_tgt {
31196 struct list_head srr_imm_list;
31197 struct work_struct srr_work;
31198
31199 @@ -57356,9 +69870,27 @@ index a7cfc27..151f483 100644
31200 uint32_t default_time2wait; /* Default Min time between
31201 * relogins (+aens) */
31202 diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
31203 -index 01c3610..3e92008 100644
31204 +index 01c3610..f287da9 100644
31205 --- a/drivers/scsi/qla4xxx/ql4_os.c
31206 +++ b/drivers/scsi/qla4xxx/ql4_os.c
31207 +@@ -3956,7 +3956,7 @@ exit_session_conn_param:
31208 + * Timer routines
31209 + */
31210 +
31211 +-static void qla4xxx_start_timer(struct scsi_qla_host *ha, void *func,
31212 ++static void qla4xxx_start_timer(struct scsi_qla_host *ha, void (*func)(unsigned long),
31213 + unsigned long interval)
31214 + {
31215 + DEBUG(printk("scsi: %s: Starting timer thread for adapter %d\n",
31216 +@@ -3964,7 +3964,7 @@ static void qla4xxx_start_timer(struct scsi_qla_host *ha, void *func,
31217 + init_timer(&ha->timer);
31218 + ha->timer.expires = jiffies + interval * HZ;
31219 + ha->timer.data = (unsigned long)ha;
31220 +- ha->timer.function = (void (*)(unsigned long))func;
31221 ++ ha->timer.function = func;
31222 + add_timer(&ha->timer);
31223 + ha->timer_active = 1;
31224 + }
31225 @@ -4490,12 +4490,12 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess)
31226 */
31227 if (!iscsi_is_session_online(cls_sess)) {
31228 @@ -57374,7 +69906,18 @@ index 01c3610..3e92008 100644
31229 ddb_entry->default_time2wait + 4));
31230 set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags);
31231 atomic_set(&ddb_entry->retry_relogin_timer,
31232 -@@ -6603,7 +6603,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
31233 +@@ -4508,8 +4508,9 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess)
31234 + * qla4xxx_timer - checks every second for work to do.
31235 + * @ha: Pointer to host adapter structure.
31236 + **/
31237 +-static void qla4xxx_timer(struct scsi_qla_host *ha)
31238 ++static void qla4xxx_timer(unsigned long _ha)
31239 + {
31240 ++ struct scsi_qla_host *ha = (struct scsi_qla_host *)_ha;
31241 + int start_dpc = 0;
31242 + uint16_t w;
31243 +
31244 +@@ -6603,7 +6604,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
31245
31246 atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
31247 atomic_set(&ddb_entry->relogin_timer, 0);
31248 @@ -57383,8 +69926,17 @@ index 01c3610..3e92008 100644
31249 def_timeout = le16_to_cpu(ddb_entry->fw_ddb_entry.def_timeout);
31250 ddb_entry->default_relogin_timeout =
31251 (def_timeout > LOGIN_TOV) && (def_timeout < LOGIN_TOV * 10) ?
31252 +@@ -9557,7 +9558,7 @@ exit_host_reset:
31253 + * RECOVERED - driver's pci_resume()
31254 + */
31255 + static pci_ers_result_t
31256 +-qla4xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
31257 ++qla4xxx_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
31258 + {
31259 + struct scsi_qla_host *ha = pci_get_drvdata(pdev);
31260 +
31261 diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
31262 -index d07fb65..4a162c0 100644
31263 +index 1deb6ad..3057db5 100644
31264 --- a/drivers/scsi/scsi.c
31265 +++ b/drivers/scsi/scsi.c
31266 @@ -591,7 +591,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
31267 @@ -57397,10 +69949,10 @@ index d07fb65..4a162c0 100644
31268 if (drv->done)
31269 good_bytes = drv->done(cmd);
31270 diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
31271 -index dd8ad2a..5c5a30c 100644
31272 +index 8c6e318..1c58581 100644
31273 --- a/drivers/scsi/scsi_lib.c
31274 +++ b/drivers/scsi/scsi_lib.c
31275 -@@ -1597,7 +1597,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
31276 +@@ -1599,7 +1599,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
31277 shost = sdev->host;
31278 scsi_init_cmd_errh(cmd);
31279 cmd->result = DID_NO_CONNECT << 16;
31280 @@ -57409,7 +69961,7 @@ index dd8ad2a..5c5a30c 100644
31281
31282 /*
31283 * SCSI request completion path will do scsi_device_unbusy(),
31284 -@@ -1620,9 +1620,9 @@ static void scsi_softirq_done(struct request *rq)
31285 +@@ -1622,9 +1622,9 @@ static void scsi_softirq_done(struct request *rq)
31286
31287 INIT_LIST_HEAD(&cmd->eh_entry);
31288
31289 @@ -57421,7 +69973,7 @@ index dd8ad2a..5c5a30c 100644
31290
31291 disposition = scsi_decide_disposition(cmd);
31292 if (disposition != SUCCESS &&
31293 -@@ -1663,7 +1663,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
31294 +@@ -1665,7 +1665,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
31295 struct Scsi_Host *host = cmd->device->host;
31296 int rtn = 0;
31297
31298 @@ -57431,10 +69983,10 @@ index dd8ad2a..5c5a30c 100644
31299 /* check if the device is still usable */
31300 if (unlikely(cmd->device->sdev_state == SDEV_DEL)) {
31301 diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
31302 -index c8115b4..c31cd19 100644
31303 +index 00bc721..7a16d8a 100644
31304 --- a/drivers/scsi/scsi_sysfs.c
31305 +++ b/drivers/scsi/scsi_sysfs.c
31306 -@@ -813,7 +813,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
31307 +@@ -818,7 +818,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
31308 char *buf) \
31309 { \
31310 struct scsi_device *sdev = to_scsi_device(dev); \
31311 @@ -57444,7 +69996,7 @@ index c8115b4..c31cd19 100644
31312 } \
31313 static DEVICE_ATTR(field, S_IRUGO, show_iostat_##field, NULL)
31314 diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
31315 -index 24eaaf6..de30ec9 100644
31316 +index 8a88226..0d26fd1 100644
31317 --- a/drivers/scsi/scsi_transport_fc.c
31318 +++ b/drivers/scsi/scsi_transport_fc.c
31319 @@ -502,7 +502,7 @@ static DECLARE_TRANSPORT_CLASS(fc_vport_class,
31320 @@ -57514,8 +70066,21 @@ index e4b3d8f..3ab4dad 100644
31321
31322 err = class_register(&iscsi_transport_class);
31323 if (err)
31324 +diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
31325 +index 319868f..a00cda5 100644
31326 +--- a/drivers/scsi/scsi_transport_spi.c
31327 ++++ b/drivers/scsi/scsi_transport_spi.c
31328 +@@ -758,7 +758,7 @@ spi_dv_device_compare_inquiry(struct scsi_device *sdev, u8 *buffer,
31329 + static enum spi_compare_returns
31330 + spi_dv_retrain(struct scsi_device *sdev, u8 *buffer, u8 *ptr,
31331 + enum spi_compare_returns
31332 +- (*compare_fn)(struct scsi_device *, u8 *, u8 *, int))
31333 ++ (*compare_fn)(struct scsi_device *, u8 *, u8 *, const int))
31334 + {
31335 + struct spi_internal *i = to_spi_internal(sdev->host->transportt);
31336 + struct scsi_target *starget = sdev->sdev_target;
31337 diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
31338 -index e3cd3ec..00560ec 100644
31339 +index e3cd3ec..97ab643 100644
31340 --- a/drivers/scsi/scsi_transport_srp.c
31341 +++ b/drivers/scsi/scsi_transport_srp.c
31342 @@ -35,7 +35,7 @@
31343 @@ -57536,6 +70101,15 @@ index e3cd3ec..00560ec 100644
31344 return 0;
31345 }
31346
31347 +@@ -226,7 +226,7 @@ static ssize_t show_reconnect_delay(struct device *dev,
31348 +
31349 + static ssize_t store_reconnect_delay(struct device *dev,
31350 + struct device_attribute *attr,
31351 +- const char *buf, const size_t count)
31352 ++ const char *buf, size_t count)
31353 + {
31354 + struct srp_rport *rport = transport_class_to_srp_rport(dev);
31355 + int res, delay;
31356 @@ -752,7 +752,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost,
31357 rport_fast_io_fail_timedout);
31358 INIT_DELAYED_WORK(&rport->dev_loss_work, rport_dev_loss_timedout);
31359 @@ -57546,7 +70120,7 @@ index e3cd3ec..00560ec 100644
31360
31361 transport_setup_device(&rport->dev);
31362 diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
31363 -index 0d7c6e8..288e969 100644
31364 +index 974ca5b..f42903f 100644
31365 --- a/drivers/scsi/sd.c
31366 +++ b/drivers/scsi/sd.c
31367 @@ -112,7 +112,7 @@ static int sd_resume(struct device *);
31368 @@ -57567,7 +70141,7 @@ index 0d7c6e8..288e969 100644
31369 {
31370 int result = SCpnt->result;
31371 unsigned int good_bytes = result ? 0 : scsi_bufflen(SCpnt);
31372 -@@ -3088,7 +3088,7 @@ static int sd_probe(struct device *dev)
31373 +@@ -3071,7 +3071,7 @@ static int sd_probe(struct device *dev)
31374 sdkp->disk = gd;
31375 sdkp->index = index;
31376 atomic_set(&sdkp->openers, 0);
31377 @@ -57651,10 +70225,10 @@ index de2c1bf..60b8563 100644
31378 .read = fuse_read,
31379 };
31380 diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
31381 -index dee1cb8..3626295 100644
31382 +index 47eff80..415be5a 100644
31383 --- a/drivers/spi/spi.c
31384 +++ b/drivers/spi/spi.c
31385 -@@ -2506,7 +2506,7 @@ int spi_bus_unlock(struct spi_master *master)
31386 +@@ -2528,7 +2528,7 @@ int spi_bus_unlock(struct spi_master *master)
31387 EXPORT_SYMBOL_GPL(spi_bus_unlock);
31388
31389 /* portable code must never pass more than 32 bytes */
31390 @@ -57695,7 +70269,7 @@ index aff9cdb..a2f1a81 100644
31391 MKDEV(0, tdev->index), NULL, "%s", tdev->name);
31392 if (IS_ERR(tdev->dev))
31393 diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
31394 -index 7b4af51..63d4c51 100644
31395 +index d57fade..106a0f7 100644
31396 --- a/drivers/staging/comedi/comedi_fops.c
31397 +++ b/drivers/staging/comedi/comedi_fops.c
31398 @@ -311,8 +311,8 @@ static void comedi_file_reset(struct file *file)
31399 @@ -57753,8 +70327,21 @@ index 3ccdec9..fcd4277 100644
31400
31401 /**
31402 * struct fbtft_display - Describes the display properties
31403 +diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
31404 +index 17d148f..68f3b55 100644
31405 +--- a/drivers/staging/gdm724x/gdm_lte.c
31406 ++++ b/drivers/staging/gdm724x/gdm_lte.c
31407 +@@ -410,7 +410,7 @@ static s32 gdm_lte_tx_nic_type(struct net_device *dev, struct sk_buff *skb)
31408 + return nic_type;
31409 + }
31410 +
31411 +-static int gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)
31412 ++static netdev_tx_t gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)
31413 + {
31414 + struct nic *nic = netdev_priv(dev);
31415 + u32 nic_type;
31416 diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
31417 -index e2c0f22..72fe9cc 100644
31418 +index eb7e252..b7bd5e5 100644
31419 --- a/drivers/staging/gdm724x/gdm_tty.c
31420 +++ b/drivers/staging/gdm724x/gdm_tty.c
31421 @@ -44,7 +44,7 @@
31422 @@ -57766,6 +70353,19 @@ index e2c0f22..72fe9cc 100644
31423
31424 static struct tty_driver *gdm_driver[TTY_MAX_COUNT];
31425 static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
31426 +diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
31427 +index ba03f93..842d70c 100644
31428 +--- a/drivers/staging/gdm72xx/gdm_wimax.c
31429 ++++ b/drivers/staging/gdm72xx/gdm_wimax.c
31430 +@@ -250,7 +250,7 @@ int gdm_wimax_send_tx(struct sk_buff *skb, struct net_device *dev)
31431 + return ret;
31432 + }
31433 +
31434 +-static int gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev)
31435 ++static netdev_tx_t gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev)
31436 + {
31437 + int ret = 0;
31438 +
31439 diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
31440 index 50c162e..b5d8b7e 100644
31441 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c
31442 @@ -57780,7 +70380,7 @@ index 50c162e..b5d8b7e 100644
31443 return -ENOMEM;
31444 ret = lis3l02dq_read_all(indio_dev, rx_array);
31445 diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
31446 -index 35acb1a..055b04d 100644
31447 +index f45ebed..490e439 100644
31448 --- a/drivers/staging/iio/adc/ad7280a.c
31449 +++ b/drivers/staging/iio/adc/ad7280a.c
31450 @@ -547,8 +547,8 @@ static int ad7280_attr_init(struct ad7280_state *st)
31451 @@ -57794,8 +70394,25 @@ index 35acb1a..055b04d 100644
31452 GFP_KERNEL);
31453 if (!st->iio_attr)
31454 return -ENOMEM;
31455 +diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
31456 +index f4fa725..e68e0ac 100644
31457 +--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
31458 ++++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
31459 +@@ -307,10 +307,8 @@ typedef struct ksock_conn {
31460 + struct ksock_route *ksnc_route; /* owning route */
31461 + struct list_head ksnc_list; /* stash on peer's conn list */
31462 + struct socket *ksnc_sock; /* actual socket */
31463 +- void *ksnc_saved_data_ready; /* socket's original
31464 +- * data_ready() callback */
31465 +- void *ksnc_saved_write_space; /* socket's original
31466 +- * write_space() callback */
31467 ++ void (*ksnc_saved_data_ready)(struct sock *sk); /* socket's original data_ready() callback */
31468 ++ void (*ksnc_saved_write_space)(struct sock *sk); /* socket's original write_space() callback */
31469 + atomic_t ksnc_conn_refcount;/* conn refcount */
31470 + atomic_t ksnc_sock_refcount;/* sock refcount */
31471 + ksock_sched_t *ksnc_scheduler; /* who schedules this connection
31472 diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c
31473 -index 0605c65..d722199 100644
31474 +index 1f04cc1..038e003 100644
31475 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c
31476 +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
31477 @@ -487,13 +487,11 @@ brw_server_handle(struct srpc_server_rpc *rpc)
31478 @@ -57818,7 +70435,7 @@ index 0605c65..d722199 100644
31479
31480 srpc_service_t brw_test_service;
31481 diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
31482 -index f18e500..77fef26 100644
31483 +index 1a2da74..6cc62b9 100644
31484 --- a/drivers/staging/lustre/lnet/selftest/framework.c
31485 +++ b/drivers/staging/lustre/lnet/selftest/framework.c
31486 @@ -1624,12 +1624,10 @@ static srpc_service_t sfw_services[] = {
31487 @@ -57872,11 +70489,327 @@ index d426536..92f0086 100644
31488
31489 srpc_service_t ping_test_service;
31490 void ping_init_test_service(void)
31491 +diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
31492 +index b064b58..8af38df 100644
31493 +--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
31494 ++++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
31495 +@@ -751,7 +751,7 @@ static inline ino_t lu_igif_ino(const struct lu_fid *fid)
31496 + return fid_seq(fid);
31497 + }
31498 +
31499 +-void lustre_swab_ost_id(struct ost_id *oid);
31500 ++void lustre_swab_ost_id(void *oid);
31501 +
31502 + /**
31503 + * Get inode generation from a igif.
31504 +@@ -818,8 +818,8 @@ static inline int fid_is_zero(const struct lu_fid *fid)
31505 + return fid_seq(fid) == 0 && fid_oid(fid) == 0;
31506 + }
31507 +
31508 +-void lustre_swab_lu_fid(struct lu_fid *fid);
31509 +-void lustre_swab_lu_seq_range(struct lu_seq_range *range);
31510 ++void lustre_swab_lu_fid(void *fid);
31511 ++void lustre_swab_lu_seq_range(void *range);
31512 +
31513 + static inline int lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1)
31514 + {
31515 +@@ -1137,7 +1137,7 @@ struct ptlrpc_body_v2 {
31516 + __u64 pb_padding[4];
31517 + };
31518 +
31519 +-void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
31520 ++void lustre_swab_ptlrpc_body(void *pb);
31521 +
31522 + /* message body offset for lustre_msg_v2 */
31523 + /* ptlrpc body offset in all request/reply messages */
31524 +@@ -1400,7 +1400,7 @@ struct obd_connect_data {
31525 + * the matching OBD_CONNECT flag, so that can be approved and landed easily to
31526 + * reserve the flag for future use. */
31527 +
31528 +-void lustre_swab_connect(struct obd_connect_data *ocd);
31529 ++void lustre_swab_connect(void *ocd);
31530 +
31531 + /*
31532 + * Supported checksum algorithms. Up to 32 checksum types are supported.
31533 +@@ -1742,10 +1742,10 @@ struct hsm_state_set {
31534 + __u64 hss_clearmask;
31535 + };
31536 +
31537 +-void lustre_swab_hsm_user_state(struct hsm_user_state *hus);
31538 +-void lustre_swab_hsm_state_set(struct hsm_state_set *hss);
31539 ++void lustre_swab_hsm_user_state(void *hus);
31540 ++void lustre_swab_hsm_state_set(void *hss);
31541 +
31542 +-void lustre_swab_obd_statfs(struct obd_statfs *os);
31543 ++void lustre_swab_obd_statfs(void *os);
31544 +
31545 + /* ost_body.data values for OST_BRW */
31546 +
31547 +@@ -1785,7 +1785,7 @@ struct obd_ioobj {
31548 + #define ioobj_max_brw_set(ioo, num) \
31549 + do { (ioo)->ioo_max_brw = ((num) - 1) << IOOBJ_MAX_BRW_BITS; } while (0)
31550 +
31551 +-void lustre_swab_obd_ioobj(struct obd_ioobj *ioo);
31552 ++void lustre_swab_obd_ioobj(void *ioo);
31553 +
31554 + /* multiple of 8 bytes => can array */
31555 + struct niobuf_remote {
31556 +@@ -1794,7 +1794,7 @@ struct niobuf_remote {
31557 + __u32 flags;
31558 + };
31559 +
31560 +-void lustre_swab_niobuf_remote(struct niobuf_remote *nbr);
31561 ++void lustre_swab_niobuf_remote(void *nbr);
31562 +
31563 + /* lock value block communicated between the filter and llite */
31564 +
31565 +@@ -1869,7 +1869,7 @@ struct obd_quotactl {
31566 + struct obd_dqblk qc_dqblk;
31567 + };
31568 +
31569 +-void lustre_swab_obd_quotactl(struct obd_quotactl *q);
31570 ++void lustre_swab_obd_quotactl(void *q);
31571 +
31572 + #define Q_QUOTACHECK 0x800100 /* deprecated as of 2.4 */
31573 + #define Q_INITQUOTA 0x800101 /* deprecated as of 2.4 */
31574 +@@ -1918,7 +1918,7 @@ struct quota_body {
31575 + #define QUOTA_DQACQ_FL_REL 0x4 /* release quota */
31576 + #define QUOTA_DQACQ_FL_REPORT 0x8 /* report usage */
31577 +
31578 +-void lustre_swab_quota_body(struct quota_body *b);
31579 ++void lustre_swab_quota_body(void *b);
31580 +
31581 + /* Quota types currently supported */
31582 + enum {
31583 +@@ -2078,7 +2078,7 @@ typedef enum {
31584 + REINT_MAX
31585 + } mds_reint_t, mdt_reint_t;
31586 +
31587 +-void lustre_swab_generic_32s(__u32 *val);
31588 ++void lustre_swab_generic_32s(void *val);
31589 +
31590 + /* the disposition of the intent outlines what was executed */
31591 + #define DISP_IT_EXECD 0x00000001
31592 +@@ -2235,7 +2235,7 @@ struct mdt_body {
31593 + __u64 padding_10;
31594 + }; /* 216 */
31595 +
31596 +-void lustre_swab_mdt_body(struct mdt_body *b);
31597 ++void lustre_swab_mdt_body(void *b);
31598 +
31599 + struct mdt_ioepoch {
31600 + struct lustre_handle handle;
31601 +@@ -2244,7 +2244,7 @@ struct mdt_ioepoch {
31602 + __u32 padding;
31603 + };
31604 +
31605 +-void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b);
31606 ++void lustre_swab_mdt_ioepoch(void *b);
31607 +
31608 + /* permissions for md_perm.mp_perm */
31609 + enum {
31610 +@@ -2571,7 +2571,7 @@ struct mdt_rec_reint {
31611 + __u32 rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */
31612 + };
31613 +
31614 +-void lustre_swab_mdt_rec_reint(struct mdt_rec_reint *rr);
31615 ++void lustre_swab_mdt_rec_reint(void *rr);
31616 +
31617 + struct lmv_desc {
31618 + __u32 ld_tgt_count; /* how many MDS's */
31619 +@@ -2759,13 +2759,13 @@ union ldlm_gl_desc {
31620 + struct ldlm_gl_lquota_desc lquota_desc;
31621 + };
31622 +
31623 +-void lustre_swab_gl_desc(union ldlm_gl_desc *);
31624 ++void lustre_swab_gl_desc(void *);
31625 +
31626 + struct ldlm_intent {
31627 + __u64 opc;
31628 + };
31629 +
31630 +-void lustre_swab_ldlm_intent(struct ldlm_intent *i);
31631 ++void lustre_swab_ldlm_intent(void *i);
31632 +
31633 + struct ldlm_resource_desc {
31634 + ldlm_type_t lr_type;
31635 +@@ -2790,7 +2790,7 @@ struct ldlm_request {
31636 + struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES];
31637 + };
31638 +
31639 +-void lustre_swab_ldlm_request(struct ldlm_request *rq);
31640 ++void lustre_swab_ldlm_request(void *rq);
31641 +
31642 + /* If LDLM_ENQUEUE, 1 slot is already occupied, 1 is available.
31643 + * Otherwise, 2 are available. */
31644 +@@ -2812,7 +2812,7 @@ struct ldlm_reply {
31645 + __u64 lock_policy_res2;
31646 + };
31647 +
31648 +-void lustre_swab_ldlm_reply(struct ldlm_reply *r);
31649 ++void lustre_swab_ldlm_reply(void *r);
31650 +
31651 + #define ldlm_flags_to_wire(flags) ((__u32)(flags))
31652 + #define ldlm_flags_from_wire(flags) ((__u64)(flags))
31653 +@@ -2857,7 +2857,7 @@ struct mgs_target_info {
31654 + char mti_params[MTI_PARAM_MAXLEN];
31655 + };
31656 +
31657 +-void lustre_swab_mgs_target_info(struct mgs_target_info *oinfo);
31658 ++void lustre_swab_mgs_target_info(void *oinfo);
31659 +
31660 + struct mgs_nidtbl_entry {
31661 + __u64 mne_version; /* table version of this entry */
31662 +@@ -2884,14 +2884,14 @@ struct mgs_config_body {
31663 + __u32 mcb_units; /* # of units for bulk transfer */
31664 + };
31665 +
31666 +-void lustre_swab_mgs_config_body(struct mgs_config_body *body);
31667 ++void lustre_swab_mgs_config_body(void *body);
31668 +
31669 + struct mgs_config_res {
31670 + __u64 mcr_offset; /* index of last config log */
31671 + __u64 mcr_size; /* size of the log */
31672 + };
31673 +
31674 +-void lustre_swab_mgs_config_res(struct mgs_config_res *body);
31675 ++void lustre_swab_mgs_config_res(void *body);
31676 +
31677 + /* Config marker flags (in config log) */
31678 + #define CM_START 0x01
31679 +@@ -3324,9 +3324,9 @@ struct ll_fiemap_info_key {
31680 + struct ll_user_fiemap fiemap;
31681 + };
31682 +
31683 +-void lustre_swab_ost_body(struct ost_body *b);
31684 +-void lustre_swab_ost_last_id(__u64 *id);
31685 +-void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
31686 ++void lustre_swab_ost_body(void *b);
31687 ++void lustre_swab_ost_last_id(void *id);
31688 ++void lustre_swab_fiemap(void *fiemap);
31689 +
31690 + void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum);
31691 + void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum);
31692 +@@ -3335,19 +3335,19 @@ void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,
31693 + void lustre_swab_lov_mds_md(struct lov_mds_md *lmm);
31694 +
31695 + /* llog_swab.c */
31696 +-void lustre_swab_llogd_body(struct llogd_body *d);
31697 +-void lustre_swab_llog_hdr(struct llog_log_hdr *h);
31698 +-void lustre_swab_llogd_conn_body(struct llogd_conn_body *d);
31699 ++void lustre_swab_llogd_body(void *d);
31700 ++void lustre_swab_llog_hdr(void *h);
31701 ++void lustre_swab_llogd_conn_body(void *d);
31702 + void lustre_swab_llog_rec(struct llog_rec_hdr *rec);
31703 +
31704 + struct lustre_cfg;
31705 + void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg);
31706 +
31707 + /* Functions for dumping PTLRPC fields */
31708 +-void dump_rniobuf(struct niobuf_remote *rnb);
31709 +-void dump_ioo(struct obd_ioobj *nb);
31710 +-void dump_ost_body(struct ost_body *ob);
31711 +-void dump_rcs(__u32 *rc);
31712 ++void dump_rniobuf(void *rnb);
31713 ++void dump_ioo(void *nb);
31714 ++void dump_ost_body(void *ob);
31715 ++void dump_rcs(void *rc);
31716 +
31717 + #define IDX_INFO_MAGIC 0x3D37CC37
31718 +
31719 +@@ -3393,7 +3393,7 @@ struct idx_info {
31720 + __u64 ii_pad3;
31721 + };
31722 +
31723 +-void lustre_swab_idx_info(struct idx_info *ii);
31724 ++void lustre_swab_idx_info(void *ii);
31725 +
31726 + #define II_END_OFF MDS_DIR_END_OFF /* all entries have been read */
31727 +
31728 +@@ -3465,7 +3465,7 @@ struct lustre_capa {
31729 + __u8 lc_hmac[CAPA_HMAC_MAX_LEN]; /** HMAC */
31730 + } __attribute__((packed));
31731 +
31732 +-void lustre_swab_lustre_capa(struct lustre_capa *c);
31733 ++void lustre_swab_lustre_capa(void *c);
31734 +
31735 + /** lustre_capa::lc_opc */
31736 + enum {
31737 +@@ -3549,7 +3549,7 @@ struct layout_intent {
31738 + __u64 li_end;
31739 + };
31740 +
31741 +-void lustre_swab_layout_intent(struct layout_intent *li);
31742 ++void lustre_swab_layout_intent(void *li);
31743 +
31744 + /**
31745 + * On the wire version of hsm_progress structure.
31746 +@@ -3569,12 +3569,12 @@ struct hsm_progress_kernel {
31747 + __u64 hpk_padding2;
31748 + } __attribute__((packed));
31749 +
31750 +-void lustre_swab_hsm_user_state(struct hsm_user_state *hus);
31751 +-void lustre_swab_hsm_current_action(struct hsm_current_action *action);
31752 +-void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk);
31753 +-void lustre_swab_hsm_user_state(struct hsm_user_state *hus);
31754 +-void lustre_swab_hsm_user_item(struct hsm_user_item *hui);
31755 +-void lustre_swab_hsm_request(struct hsm_request *hr);
31756 ++void lustre_swab_hsm_user_state(void *hus);
31757 ++void lustre_swab_hsm_current_action(void *action);
31758 ++void lustre_swab_hsm_progress_kernel(void *hpk);
31759 ++void lustre_swab_hsm_user_state(void *hus);
31760 ++void lustre_swab_hsm_user_item(void *hui);
31761 ++void lustre_swab_hsm_request(void *hr);
31762 +
31763 + /**
31764 + * These are object update opcode under UPDATE_OBJ, which is currently
31765 +@@ -3659,8 +3659,8 @@ struct update_reply {
31766 + __u32 ur_lens[0];
31767 + };
31768 +
31769 +-void lustre_swab_update_buf(struct update_buf *ub);
31770 +-void lustre_swab_update_reply_buf(struct update_reply *ur);
31771 ++void lustre_swab_update_buf(void *ub);
31772 ++void lustre_swab_update_reply_buf(void *ur);
31773 +
31774 + /** layout swap request structure
31775 + * fid1 and fid2 are in mdt_body
31776 +@@ -3669,7 +3669,7 @@ struct mdc_swap_layouts {
31777 + __u64 msl_flags;
31778 + } __packed;
31779 +
31780 +-void lustre_swab_swap_layouts(struct mdc_swap_layouts *msl);
31781 ++void lustre_swab_swap_layouts(void *msl);
31782 +
31783 + struct close_data {
31784 + struct lustre_handle cd_handle;
31785 +@@ -3678,7 +3678,7 @@ struct close_data {
31786 + __u64 cd_reserved[8];
31787 + };
31788 +
31789 +-void lustre_swab_close_data(struct close_data *data);
31790 ++void lustre_swab_close_data(void *data);
31791 +
31792 + #endif
31793 + /** @} lustreidl */
31794 diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h
31795 -index 0e75a15..7290f30 100644
31796 +index 9b319f1..42e8150 100644
31797 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
31798 +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
31799 -@@ -1061,7 +1061,7 @@ struct ldlm_callback_suite {
31800 +@@ -964,9 +964,9 @@ struct ldlm_ast_work {
31801 + struct ldlm_enqueue_info {
31802 + __u32 ei_type; /** Type of the lock being enqueued. */
31803 + __u32 ei_mode; /** Mode of the lock being enqueued. */
31804 +- void *ei_cb_bl; /** blocking lock callback */
31805 +- void *ei_cb_cp; /** lock completion callback */
31806 +- void *ei_cb_gl; /** lock glimpse callback */
31807 ++ ldlm_blocking_callback ei_cb_bl; /** blocking lock callback */
31808 ++ ldlm_completion_callback ei_cb_cp; /** lock completion callback */
31809 ++ ldlm_glimpse_callback ei_cb_gl; /** lock glimpse callback */
31810 + void *ei_cbdata; /** Data to be passed into callbacks. */
31811 + };
31812 +
31813 +@@ -1059,7 +1059,7 @@ struct ldlm_callback_suite {
31814 ldlm_completion_callback lcs_completion;
31815 ldlm_blocking_callback lcs_blocking;
31816 ldlm_glimpse_callback lcs_glimpse;
31817 @@ -57885,8 +70818,21 @@ index 0e75a15..7290f30 100644
31818
31819 /* ldlm_lockd.c */
31820 int ldlm_get_ref(void);
31821 +diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
31822 +index d834ddd..a650f2a 100644
31823 +--- a/drivers/staging/lustre/lustre/include/lustre_net.h
31824 ++++ b/drivers/staging/lustre/lustre/include/lustre_net.h
31825 +@@ -2564,7 +2564,7 @@ void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, int n, int min_size);
31826 + void *lustre_msg_buf(struct lustre_msg *m, int n, int minlen);
31827 + int lustre_msg_buflen(struct lustre_msg *m, int n);
31828 + int lustre_msg_bufcount(struct lustre_msg *m);
31829 +-char *lustre_msg_string(struct lustre_msg *m, int n, int max_len);
31830 ++void *lustre_msg_string(struct lustre_msg *m, int n, int max_len);
31831 + __u32 lustre_msghdr_get_flags(struct lustre_msg *msg);
31832 + void lustre_msghdr_set_flags(struct lustre_msg *msg, __u32 flags);
31833 + __u32 lustre_msg_get_flags(struct lustre_msg *msg);
31834 diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
31835 -index 5e93afc..4fd41bf 100644
31836 +index bcbe613..fed09d3 100644
31837 --- a/drivers/staging/lustre/lustre/include/obd.h
31838 +++ b/drivers/staging/lustre/lustre/include/obd.h
31839 @@ -1213,7 +1213,7 @@ struct md_ops {
31840 @@ -57911,8 +70857,32 @@ index 4310154..605d035 100644
31841
31842 CDEBUG(D_DLMTRACE,
31843 "flags %#llx owner %llu pid %u mode %u start %llu end %llu\n",
31844 +diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
31845 +index b9eb377..eadc037 100644
31846 +--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
31847 ++++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
31848 +@@ -1785,8 +1785,9 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure)
31849 +
31850 + static int replay_lock_interpret(const struct lu_env *env,
31851 + struct ptlrpc_request *req,
31852 +- struct ldlm_async_args *aa, int rc)
31853 ++ void *_aa, int rc)
31854 + {
31855 ++ struct ldlm_async_args *aa = _aa;
31856 + struct ldlm_lock *lock;
31857 + struct ldlm_reply *reply;
31858 + struct obd_export *exp;
31859 +@@ -1910,7 +1911,7 @@ static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock)
31860 + CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
31861 + aa = ptlrpc_req_async_args(req);
31862 + aa->lock_handle = body->lock_handle[0];
31863 +- req->rq_interpret_reply = (ptlrpc_interpterer_t)replay_lock_interpret;
31864 ++ req->rq_interpret_reply = replay_lock_interpret;
31865 + ptlrpcd_add_req(req);
31866 +
31867 + return 0;
31868 diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
31869 -index e7c2b26..29a29f1 100644
31870 +index 329d78c..9756f9e 100644
31871 --- a/drivers/staging/lustre/lustre/libcfs/module.c
31872 +++ b/drivers/staging/lustre/lustre/libcfs/module.c
31873 @@ -322,11 +322,11 @@ out:
31874 @@ -57932,8 +70902,762 @@ index e7c2b26..29a29f1 100644
31875 };
31876
31877 static int proc_call_handler(void *data, int write, loff_t *ppos,
31878 +diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
31879 +index 8982f7d..c04fda5 100644
31880 +--- a/drivers/staging/lustre/lustre/llite/dir.c
31881 ++++ b/drivers/staging/lustre/lustre/llite/dir.c
31882 +@@ -140,7 +140,7 @@
31883 + */
31884 +
31885 + /* returns the page unlocked, but with a reference */
31886 +-static int ll_dir_filler(void *_hash, struct page *page0)
31887 ++static int ll_dir_filler(struct file *_hash, struct page *page0)
31888 + {
31889 + struct inode *inode = page0->mapping->host;
31890 + int hash64 = ll_i2sbi(inode)->ll_flags & LL_SBI_64BIT_HASH;
31891 +diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c
31892 +index 93fe69e..af92b7a 100644
31893 +--- a/drivers/staging/lustre/lustre/lov/lov_io.c
31894 ++++ b/drivers/staging/lustre/lustre/lov/lov_io.c
31895 +@@ -833,12 +833,32 @@ static void lov_empty_io_fini(const struct lu_env *env,
31896 + }
31897 +
31898 + static void lov_empty_impossible(const struct lu_env *env,
31899 +- struct cl_io_slice *ios)
31900 ++ const struct cl_io_slice *ios)
31901 + {
31902 + LBUG();
31903 + }
31904 +
31905 +-#define LOV_EMPTY_IMPOSSIBLE ((void *)lov_empty_impossible)
31906 ++static int lov_empty_impossible2(const struct lu_env *env,
31907 ++ const struct cl_io_slice *ios)
31908 ++{
31909 ++ LBUG();
31910 ++}
31911 ++
31912 ++static int lov_empty_impossible3(const struct lu_env *env,
31913 ++ const struct cl_io_slice *slice,
31914 ++ enum cl_req_type crt,
31915 ++ struct cl_2queue *queue)
31916 ++{
31917 ++ LBUG();
31918 ++}
31919 ++
31920 ++static int lov_empty_impossible4(const struct lu_env *env,
31921 ++ const struct cl_io_slice *slice,
31922 ++ const struct cl_page_slice *page,
31923 ++ unsigned from, unsigned to)
31924 ++{
31925 ++ LBUG();
31926 ++}
31927 +
31928 + /**
31929 + * An io operation vector for files without stripes.
31930 +@@ -848,32 +868,32 @@ static const struct cl_io_operations lov_empty_io_ops = {
31931 + [CIT_READ] = {
31932 + .cio_fini = lov_empty_io_fini,
31933 + #if 0
31934 +- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
31935 +- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
31936 +- .cio_start = LOV_EMPTY_IMPOSSIBLE,
31937 +- .cio_end = LOV_EMPTY_IMPOSSIBLE
31938 ++ .cio_iter_init = lov_empty_impossible2,
31939 ++ .cio_lock = lov_empty_impossible2,
31940 ++ .cio_start = lov_empty_impossible2,
31941 ++ .cio_end = lov_empty_impossible
31942 + #endif
31943 + },
31944 + [CIT_WRITE] = {
31945 + .cio_fini = lov_empty_io_fini,
31946 +- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
31947 +- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
31948 +- .cio_start = LOV_EMPTY_IMPOSSIBLE,
31949 +- .cio_end = LOV_EMPTY_IMPOSSIBLE
31950 ++ .cio_iter_init = lov_empty_impossible2,
31951 ++ .cio_lock = lov_empty_impossible2,
31952 ++ .cio_start = lov_empty_impossible2,
31953 ++ .cio_end = lov_empty_impossible
31954 + },
31955 + [CIT_SETATTR] = {
31956 + .cio_fini = lov_empty_io_fini,
31957 +- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
31958 +- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
31959 +- .cio_start = LOV_EMPTY_IMPOSSIBLE,
31960 +- .cio_end = LOV_EMPTY_IMPOSSIBLE
31961 ++ .cio_iter_init = lov_empty_impossible2,
31962 ++ .cio_lock = lov_empty_impossible2,
31963 ++ .cio_start = lov_empty_impossible2,
31964 ++ .cio_end = lov_empty_impossible
31965 + },
31966 + [CIT_FAULT] = {
31967 + .cio_fini = lov_empty_io_fini,
31968 +- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
31969 +- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
31970 +- .cio_start = LOV_EMPTY_IMPOSSIBLE,
31971 +- .cio_end = LOV_EMPTY_IMPOSSIBLE
31972 ++ .cio_iter_init = lov_empty_impossible2,
31973 ++ .cio_lock = lov_empty_impossible2,
31974 ++ .cio_start = lov_empty_impossible2,
31975 ++ .cio_end = lov_empty_impossible
31976 + },
31977 + [CIT_FSYNC] = {
31978 + .cio_fini = lov_empty_io_fini
31979 +@@ -884,13 +904,13 @@ static const struct cl_io_operations lov_empty_io_ops = {
31980 + },
31981 + .req_op = {
31982 + [CRT_READ] = {
31983 +- .cio_submit = LOV_EMPTY_IMPOSSIBLE
31984 ++ .cio_submit = lov_empty_impossible3
31985 + },
31986 + [CRT_WRITE] = {
31987 +- .cio_submit = LOV_EMPTY_IMPOSSIBLE
31988 ++ .cio_submit = lov_empty_impossible3
31989 + }
31990 + },
31991 +- .cio_commit_write = LOV_EMPTY_IMPOSSIBLE
31992 ++ .cio_commit_write = lov_empty_impossible4
31993 + };
31994 +
31995 + int lov_io_init_raid0(const struct lu_env *env, struct cl_object *obj,
31996 +diff --git a/drivers/staging/lustre/lustre/obdclass/llog_swab.c b/drivers/staging/lustre/lustre/obdclass/llog_swab.c
31997 +index 3aa7393..10619c9 100644
31998 +--- a/drivers/staging/lustre/lustre/obdclass/llog_swab.c
31999 ++++ b/drivers/staging/lustre/lustre/obdclass/llog_swab.c
32000 +@@ -58,16 +58,20 @@ static void print_llogd_body(struct llogd_body *d)
32001 + CDEBUG(D_OTHER, "\tlgd_cur_offset: %#llx\n", d->lgd_cur_offset);
32002 + }
32003 +
32004 +-void lustre_swab_lu_fid(struct lu_fid *fid)
32005 ++void lustre_swab_lu_fid(void *_fid)
32006 + {
32007 ++ struct lu_fid *fid = _fid;
32008 ++
32009 + __swab64s(&fid->f_seq);
32010 + __swab32s(&fid->f_oid);
32011 + __swab32s(&fid->f_ver);
32012 + }
32013 + EXPORT_SYMBOL(lustre_swab_lu_fid);
32014 +
32015 +-void lustre_swab_ost_id(struct ost_id *oid)
32016 ++void lustre_swab_ost_id(void *_oid)
32017 + {
32018 ++ struct ost_id *oid = _oid;
32019 ++
32020 + if (fid_seq_is_mdt0(oid->oi.oi_seq)) {
32021 + __swab64s(&oid->oi.oi_id);
32022 + __swab64s(&oid->oi.oi_seq);
32023 +@@ -84,8 +88,10 @@ static void lustre_swab_llog_id(struct llog_logid *log_id)
32024 + __swab32s(&log_id->lgl_ogen);
32025 + }
32026 +
32027 +-void lustre_swab_llogd_body(struct llogd_body *d)
32028 ++void lustre_swab_llogd_body(void *_d)
32029 + {
32030 ++ struct llogd_body *d = _d;
32031 ++
32032 + print_llogd_body(d);
32033 + lustre_swab_llog_id(&d->lgd_logid);
32034 + __swab32s(&d->lgd_ctxt_idx);
32035 +@@ -98,8 +104,10 @@ void lustre_swab_llogd_body(struct llogd_body *d)
32036 + }
32037 + EXPORT_SYMBOL(lustre_swab_llogd_body);
32038 +
32039 +-void lustre_swab_llogd_conn_body(struct llogd_conn_body *d)
32040 ++void lustre_swab_llogd_conn_body(void *_d)
32041 + {
32042 ++ struct llogd_conn_body *d = _d;
32043 ++
32044 + __swab64s(&d->lgdc_gen.mnt_cnt);
32045 + __swab64s(&d->lgdc_gen.conn_cnt);
32046 + lustre_swab_llog_id(&d->lgdc_logid);
32047 +@@ -114,8 +122,10 @@ static void lustre_swab_ll_fid(struct ll_fid *fid)
32048 + __swab32s(&fid->f_type);
32049 + }
32050 +
32051 +-void lustre_swab_lu_seq_range(struct lu_seq_range *range)
32052 ++void lustre_swab_lu_seq_range(void *_range)
32053 + {
32054 ++ struct lu_seq_range *range = _range;
32055 ++
32056 + __swab64s(&range->lsr_start);
32057 + __swab64s(&range->lsr_end);
32058 + __swab32s(&range->lsr_index);
32059 +@@ -294,8 +304,10 @@ static void print_llog_hdr(struct llog_log_hdr *h)
32060 + CDEBUG(D_OTHER, "\tllh_tail.lrt_len: %#x\n", h->llh_tail.lrt_len);
32061 + }
32062 +
32063 +-void lustre_swab_llog_hdr(struct llog_log_hdr *h)
32064 ++void lustre_swab_llog_hdr(void *_h)
32065 + {
32066 ++ struct llog_log_hdr *h = _h;
32067 ++
32068 + print_llog_hdr(h);
32069 +
32070 + lustre_swab_llog_rec(&h->llh_hdr);
32071 +diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
32072 +index 7034f0a..427966a 100644
32073 +--- a/drivers/staging/lustre/lustre/osc/osc_request.c
32074 ++++ b/drivers/staging/lustre/lustre/osc/osc_request.c
32075 +@@ -212,8 +212,9 @@ static inline void osc_pack_req_body(struct ptlrpc_request *req,
32076 +
32077 + static int osc_getattr_interpret(const struct lu_env *env,
32078 + struct ptlrpc_request *req,
32079 +- struct osc_async_args *aa, int rc)
32080 ++ void *_aa, int rc)
32081 + {
32082 ++ struct osc_async_args *aa = _aa;
32083 + struct ost_body *body;
32084 +
32085 + if (rc != 0)
32086 +@@ -258,7 +259,7 @@ static int osc_getattr_async(struct obd_export *exp, struct obd_info *oinfo,
32087 + osc_pack_req_body(req, oinfo);
32088 +
32089 + ptlrpc_request_set_replen(req);
32090 +- req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_getattr_interpret;
32091 ++ req->rq_interpret_reply = osc_getattr_interpret;
32092 +
32093 + CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
32094 + aa = ptlrpc_req_async_args(req);
32095 +@@ -354,8 +355,9 @@ out:
32096 +
32097 + static int osc_setattr_interpret(const struct lu_env *env,
32098 + struct ptlrpc_request *req,
32099 +- struct osc_setattr_args *sa, int rc)
32100 ++ void *_sa, int rc)
32101 + {
32102 ++ struct osc_setattr_args *sa = _sa;
32103 + struct ost_body *body;
32104 +
32105 + if (rc != 0)
32106 +@@ -405,8 +407,7 @@ int osc_setattr_async_base(struct obd_export *exp, struct obd_info *oinfo,
32107 + /* Do not wait for response. */
32108 + ptlrpcd_add_req(req);
32109 + } else {
32110 +- req->rq_interpret_reply =
32111 +- (ptlrpc_interpterer_t)osc_setattr_interpret;
32112 ++ req->rq_interpret_reply = osc_setattr_interpret;
32113 +
32114 + CLASSERT(sizeof(*sa) <= sizeof(req->rq_async_args));
32115 + sa = ptlrpc_req_async_args(req);
32116 +@@ -548,7 +549,7 @@ int osc_punch_base(struct obd_export *exp, struct obd_info *oinfo,
32117 +
32118 + ptlrpc_request_set_replen(req);
32119 +
32120 +- req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_setattr_interpret;
32121 ++ req->rq_interpret_reply = osc_setattr_interpret;
32122 + CLASSERT(sizeof(*sa) <= sizeof(req->rq_async_args));
32123 + sa = ptlrpc_req_async_args(req);
32124 + sa->sa_oa = oinfo->oi_oa;
32125 +@@ -2117,8 +2118,9 @@ static int osc_enqueue_fini(struct ptlrpc_request *req, struct ost_lvb *lvb,
32126 +
32127 + static int osc_enqueue_interpret(const struct lu_env *env,
32128 + struct ptlrpc_request *req,
32129 +- struct osc_enqueue_args *aa, int rc)
32130 ++ void *_aa, int rc)
32131 + {
32132 ++ struct osc_enqueue_args *aa = _aa;
32133 + struct ldlm_lock *lock;
32134 + struct lustre_handle handle;
32135 + __u32 mode;
32136 +@@ -2315,8 +2317,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
32137 + aa->oa_lockh = lockh;
32138 + aa->oa_agl = !!agl;
32139 +
32140 +- req->rq_interpret_reply =
32141 +- (ptlrpc_interpterer_t)osc_enqueue_interpret;
32142 ++ req->rq_interpret_reply = osc_enqueue_interpret;
32143 + if (rqset == PTLRPCD_SET)
32144 + ptlrpcd_add_req(req);
32145 + else
32146 +@@ -2389,8 +2390,9 @@ int osc_cancel_base(struct lustre_handle *lockh, __u32 mode)
32147 +
32148 + static int osc_statfs_interpret(const struct lu_env *env,
32149 + struct ptlrpc_request *req,
32150 +- struct osc_async_args *aa, int rc)
32151 ++ void *_aa, int rc)
32152 + {
32153 ++ struct osc_async_args *aa = _aa;
32154 + struct obd_statfs *msfs;
32155 +
32156 + if (rc == -EBADR)
32157 +@@ -2456,7 +2458,7 @@ static int osc_statfs_async(struct obd_export *exp,
32158 + req->rq_no_delay = 1;
32159 + }
32160 +
32161 +- req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_statfs_interpret;
32162 ++ req->rq_interpret_reply = osc_statfs_interpret;
32163 + CLASSERT (sizeof(*aa) <= sizeof(req->rq_async_args));
32164 + aa = ptlrpc_req_async_args(req);
32165 + aa->aa_oi = oinfo;
32166 +diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
32167 +index c0e613c..aff501f 100644
32168 +--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
32169 ++++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
32170 +@@ -811,8 +811,8 @@ struct req_capsule;
32171 + .rmf_name = (name), \
32172 + .rmf_flags = (flags), \
32173 + .rmf_size = (size), \
32174 +- .rmf_swabber = (void (*)(void *))(swabber), \
32175 +- .rmf_dumper = (void (*)(void *))(dumper) \
32176 ++ .rmf_swabber = (swabber), \
32177 ++ .rmf_dumper = (dumper) \
32178 + }
32179 +
32180 + struct req_msg_field RMF_GENERIC_DATA =
32181 +@@ -1959,8 +1959,7 @@ static void *__req_capsule_get(struct req_capsule *pill,
32182 + msg = __req_msg(pill, loc);
32183 + LASSERT(msg != NULL);
32184 +
32185 +- getter = (field->rmf_flags & RMF_F_STRING) ?
32186 +- (typeof(getter))lustre_msg_string : lustre_msg_buf;
32187 ++ getter = (field->rmf_flags & RMF_F_STRING) ? lustre_msg_string : lustre_msg_buf;
32188 +
32189 + if (field->rmf_flags & RMF_F_STRUCT_ARRAY) {
32190 + /*
32191 +diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
32192 +index f3cb518..ed6f36b 100644
32193 +--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
32194 ++++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
32195 +@@ -690,7 +690,7 @@ int lustre_msg_bufcount(struct lustre_msg *m)
32196 + }
32197 + EXPORT_SYMBOL(lustre_msg_bufcount);
32198 +
32199 +-char *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
32200 ++void *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
32201 + {
32202 + /* max_len == 0 means the string should fill the buffer */
32203 + char *str;
32204 +@@ -1462,8 +1462,10 @@ EXPORT_SYMBOL(do_set_info_async);
32205 + /* byte flipping routines for all wire types declared in
32206 + * lustre_idl.h implemented here.
32207 + */
32208 +-void lustre_swab_ptlrpc_body(struct ptlrpc_body *b)
32209 ++void lustre_swab_ptlrpc_body(void *_b)
32210 + {
32211 ++ struct ptlrpc_body *b = _b;
32212 ++
32213 + __swab32s(&b->pb_type);
32214 + __swab32s(&b->pb_version);
32215 + __swab32s(&b->pb_opc);
32216 +@@ -1493,8 +1495,10 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *b)
32217 + }
32218 + EXPORT_SYMBOL(lustre_swab_ptlrpc_body);
32219 +
32220 +-void lustre_swab_connect(struct obd_connect_data *ocd)
32221 ++void lustre_swab_connect(void *_ocd)
32222 + {
32223 ++ struct obd_connect_data *ocd = _ocd;
32224 ++
32225 + __swab64s(&ocd->ocd_connect_flags);
32226 + __swab32s(&ocd->ocd_version);
32227 + __swab32s(&ocd->ocd_grant);
32228 +@@ -1567,8 +1571,10 @@ static void lustre_swab_obdo(struct obdo *o)
32229 +
32230 + }
32231 +
32232 +-void lustre_swab_obd_statfs(struct obd_statfs *os)
32233 ++void lustre_swab_obd_statfs(void *_os)
32234 + {
32235 ++ struct obd_statfs *os = _os;
32236 ++
32237 + __swab64s(&os->os_type);
32238 + __swab64s(&os->os_blocks);
32239 + __swab64s(&os->os_bfree);
32240 +@@ -1592,42 +1598,54 @@ void lustre_swab_obd_statfs(struct obd_statfs *os)
32241 + }
32242 + EXPORT_SYMBOL(lustre_swab_obd_statfs);
32243 +
32244 +-void lustre_swab_obd_ioobj(struct obd_ioobj *ioo)
32245 ++void lustre_swab_obd_ioobj(void *_ioo)
32246 + {
32247 ++ struct obd_ioobj *ioo = _ioo;
32248 ++
32249 + lustre_swab_ost_id(&ioo->ioo_oid);
32250 + __swab32s(&ioo->ioo_max_brw);
32251 + __swab32s(&ioo->ioo_bufcnt);
32252 + }
32253 + EXPORT_SYMBOL(lustre_swab_obd_ioobj);
32254 +
32255 +-void lustre_swab_niobuf_remote(struct niobuf_remote *nbr)
32256 ++void lustre_swab_niobuf_remote(void *_nbr)
32257 + {
32258 ++ struct niobuf_remote *nbr = _nbr;
32259 ++
32260 + __swab64s(&nbr->offset);
32261 + __swab32s(&nbr->len);
32262 + __swab32s(&nbr->flags);
32263 + }
32264 + EXPORT_SYMBOL(lustre_swab_niobuf_remote);
32265 +
32266 +-void lustre_swab_ost_body(struct ost_body *b)
32267 ++void lustre_swab_ost_body(void *_b)
32268 + {
32269 ++ struct ost_body *b = _b;
32270 ++
32271 + lustre_swab_obdo(&b->oa);
32272 + }
32273 + EXPORT_SYMBOL(lustre_swab_ost_body);
32274 +
32275 +-void lustre_swab_ost_last_id(u64 *id)
32276 ++void lustre_swab_ost_last_id(void *_id)
32277 + {
32278 ++ u64 *id = _id;
32279 ++
32280 + __swab64s(id);
32281 + }
32282 + EXPORT_SYMBOL(lustre_swab_ost_last_id);
32283 +
32284 +-void lustre_swab_generic_32s(__u32 *val)
32285 ++void lustre_swab_generic_32s(void *_val)
32286 + {
32287 ++ __u32 *val = _val;
32288 ++
32289 + __swab32s(val);
32290 + }
32291 + EXPORT_SYMBOL(lustre_swab_generic_32s);
32292 +
32293 +-void lustre_swab_gl_desc(union ldlm_gl_desc *desc)
32294 ++void lustre_swab_gl_desc(void *_desc)
32295 + {
32296 ++ union ldlm_gl_desc *desc = _desc;
32297 ++
32298 + lustre_swab_lu_fid(&desc->lquota_desc.gl_id.qid_fid);
32299 + __swab64s(&desc->lquota_desc.gl_flags);
32300 + __swab64s(&desc->lquota_desc.gl_ver);
32301 +@@ -1671,8 +1689,10 @@ void lustre_swab_lquota_lvb(struct lquota_lvb *lvb)
32302 + }
32303 + EXPORT_SYMBOL(lustre_swab_lquota_lvb);
32304 +
32305 +-void lustre_swab_mdt_body(struct mdt_body *b)
32306 ++void lustre_swab_mdt_body(void *_b)
32307 + {
32308 ++ struct mdt_body *b = _b;
32309 ++
32310 + lustre_swab_lu_fid(&b->fid1);
32311 + lustre_swab_lu_fid(&b->fid2);
32312 + /* handle is opaque */
32313 +@@ -1705,8 +1725,10 @@ void lustre_swab_mdt_body(struct mdt_body *b)
32314 + }
32315 + EXPORT_SYMBOL(lustre_swab_mdt_body);
32316 +
32317 +-void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b)
32318 ++void lustre_swab_mdt_ioepoch(void *_b)
32319 + {
32320 ++ struct mdt_ioepoch *b = _b;
32321 ++
32322 + /* handle is opaque */
32323 + __swab64s(&b->ioepoch);
32324 + __swab32s(&b->flags);
32325 +@@ -1714,8 +1736,9 @@ void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b)
32326 + }
32327 + EXPORT_SYMBOL(lustre_swab_mdt_ioepoch);
32328 +
32329 +-void lustre_swab_mgs_target_info(struct mgs_target_info *mti)
32330 ++void lustre_swab_mgs_target_info(void *_mti)
32331 + {
32332 ++ struct mgs_target_info *mti = _mti;
32333 + int i;
32334 +
32335 + __swab32s(&mti->mti_lustre_ver);
32336 +@@ -1753,16 +1776,20 @@ void lustre_swab_mgs_nidtbl_entry(struct mgs_nidtbl_entry *entry)
32337 + }
32338 + EXPORT_SYMBOL(lustre_swab_mgs_nidtbl_entry);
32339 +
32340 +-void lustre_swab_mgs_config_body(struct mgs_config_body *body)
32341 ++void lustre_swab_mgs_config_body(void *_body)
32342 + {
32343 ++ struct mgs_config_body *body = _body;
32344 ++
32345 + __swab64s(&body->mcb_offset);
32346 + __swab32s(&body->mcb_units);
32347 + __swab16s(&body->mcb_type);
32348 + }
32349 + EXPORT_SYMBOL(lustre_swab_mgs_config_body);
32350 +
32351 +-void lustre_swab_mgs_config_res(struct mgs_config_res *body)
32352 ++void lustre_swab_mgs_config_res(void *_body)
32353 + {
32354 ++ struct mgs_config_res *body = _body;
32355 ++
32356 + __swab64s(&body->mcr_offset);
32357 + __swab64s(&body->mcr_size);
32358 + }
32359 +@@ -1790,8 +1817,10 @@ static void lustre_swab_obd_dqblk(struct obd_dqblk *b)
32360 + CLASSERT(offsetof(typeof(*b), dqb_padding) != 0);
32361 + }
32362 +
32363 +-void lustre_swab_obd_quotactl(struct obd_quotactl *q)
32364 ++void lustre_swab_obd_quotactl(void *_q)
32365 + {
32366 ++ struct obd_quotactl *q = _q;
32367 ++
32368 + __swab32s(&q->qc_cmd);
32369 + __swab32s(&q->qc_type);
32370 + __swab32s(&q->qc_id);
32371 +@@ -1832,8 +1861,9 @@ static void lustre_swab_fiemap_extent(struct ll_fiemap_extent *fm_extent)
32372 + __swab32s(&fm_extent->fe_device);
32373 + }
32374 +
32375 +-void lustre_swab_fiemap(struct ll_user_fiemap *fiemap)
32376 ++void lustre_swab_fiemap(void *_fiemap)
32377 + {
32378 ++ struct ll_user_fiemap *fiemap = _fiemap;
32379 + int i;
32380 +
32381 + __swab64s(&fiemap->fm_start);
32382 +@@ -1848,8 +1878,10 @@ void lustre_swab_fiemap(struct ll_user_fiemap *fiemap)
32383 + }
32384 + EXPORT_SYMBOL(lustre_swab_fiemap);
32385 +
32386 +-void lustre_swab_idx_info(struct idx_info *ii)
32387 ++void lustre_swab_idx_info(void *_ii)
32388 + {
32389 ++ struct idx_info *ii = _ii;
32390 ++
32391 + __swab32s(&ii->ii_magic);
32392 + __swab32s(&ii->ii_flags);
32393 + __swab16s(&ii->ii_count);
32394 +@@ -1862,8 +1894,10 @@ void lustre_swab_idx_info(struct idx_info *ii)
32395 + __swab16s(&ii->ii_recsize);
32396 + }
32397 +
32398 +-void lustre_swab_mdt_rec_reint (struct mdt_rec_reint *rr)
32399 ++void lustre_swab_mdt_rec_reint (void *_rr)
32400 + {
32401 ++ struct mdt_rec_reint *rr = _rr;
32402 ++
32403 + __swab32s(&rr->rr_opcode);
32404 + __swab32s(&rr->rr_cap);
32405 + __swab32s(&rr->rr_fsuid);
32406 +@@ -1994,8 +2028,10 @@ static void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d)
32407 + __swab32s(&d->l_flock.lfw_pid);
32408 + }
32409 +
32410 +-void lustre_swab_ldlm_intent(struct ldlm_intent *i)
32411 ++void lustre_swab_ldlm_intent(void *_i)
32412 + {
32413 ++ struct ldlm_intent *i = _i;
32414 ++
32415 + __swab64s(&i->opc);
32416 + }
32417 + EXPORT_SYMBOL(lustre_swab_ldlm_intent);
32418 +@@ -2015,8 +2051,10 @@ static void lustre_swab_ldlm_lock_desc(struct ldlm_lock_desc *l)
32419 + lustre_swab_ldlm_policy_data(&l->l_policy_data);
32420 + }
32421 +
32422 +-void lustre_swab_ldlm_request(struct ldlm_request *rq)
32423 ++void lustre_swab_ldlm_request(void *_rq)
32424 + {
32425 ++ struct ldlm_request *rq = _rq;
32426 ++
32427 + __swab32s(&rq->lock_flags);
32428 + lustre_swab_ldlm_lock_desc(&rq->lock_desc);
32429 + __swab32s(&rq->lock_count);
32430 +@@ -2024,8 +2062,10 @@ void lustre_swab_ldlm_request(struct ldlm_request *rq)
32431 + }
32432 + EXPORT_SYMBOL(lustre_swab_ldlm_request);
32433 +
32434 +-void lustre_swab_ldlm_reply(struct ldlm_reply *r)
32435 ++void lustre_swab_ldlm_reply(void *_r)
32436 + {
32437 ++ struct ldlm_reply *r = _r;
32438 ++
32439 + __swab32s(&r->lock_flags);
32440 + CLASSERT(offsetof(typeof(*r), lock_padding) != 0);
32441 + lustre_swab_ldlm_lock_desc(&r->lock_desc);
32442 +@@ -2035,8 +2075,10 @@ void lustre_swab_ldlm_reply(struct ldlm_reply *r)
32443 + }
32444 + EXPORT_SYMBOL(lustre_swab_ldlm_reply);
32445 +
32446 +-void lustre_swab_quota_body(struct quota_body *b)
32447 ++void lustre_swab_quota_body(void *_b)
32448 + {
32449 ++ struct quota_body *b = _b;
32450 ++
32451 + lustre_swab_lu_fid(&b->qb_fid);
32452 + lustre_swab_lu_fid((struct lu_fid *)&b->qb_id);
32453 + __swab32s(&b->qb_flags);
32454 +@@ -2046,8 +2088,10 @@ void lustre_swab_quota_body(struct quota_body *b)
32455 + }
32456 +
32457 + /* Dump functions */
32458 +-void dump_ioo(struct obd_ioobj *ioo)
32459 ++void dump_ioo(void *_ioo)
32460 + {
32461 ++ struct obd_ioobj *ioo = _ioo;
32462 ++
32463 + CDEBUG(D_RPCTRACE,
32464 + "obd_ioobj: ioo_oid=" DOSTID ", ioo_max_brw=%#x, ioo_bufct=%d\n",
32465 + POSTID(&ioo->ioo_oid), ioo->ioo_max_brw,
32466 +@@ -2055,8 +2099,10 @@ void dump_ioo(struct obd_ioobj *ioo)
32467 + }
32468 + EXPORT_SYMBOL(dump_ioo);
32469 +
32470 +-void dump_rniobuf(struct niobuf_remote *nb)
32471 ++void dump_rniobuf(void *_nb)
32472 + {
32473 ++ struct niobuf_remote *nb = _nb;
32474 ++
32475 + CDEBUG(D_RPCTRACE, "niobuf_remote: offset=%llu, len=%d, flags=%x\n",
32476 + nb->offset, nb->len, nb->flags);
32477 + }
32478 +@@ -2124,14 +2170,18 @@ static void dump_obdo(struct obdo *oa)
32479 + CDEBUG(D_RPCTRACE, "obdo: o_lcookie = (llog_cookie dumping not yet implemented)\n");
32480 + }
32481 +
32482 +-void dump_ost_body(struct ost_body *ob)
32483 ++void dump_ost_body(void *_ob)
32484 + {
32485 ++ struct ost_body *ob = _ob;
32486 ++
32487 + dump_obdo(&ob->oa);
32488 + }
32489 + EXPORT_SYMBOL(dump_ost_body);
32490 +
32491 +-void dump_rcs(__u32 *rc)
32492 ++void dump_rcs(void *_rc)
32493 + {
32494 ++ __u32 *rc = _rc;
32495 ++
32496 + CDEBUG(D_RPCTRACE, "rmf_rcs: %d\n", *rc);
32497 + }
32498 + EXPORT_SYMBOL(dump_rcs);
32499 +@@ -2208,8 +2258,10 @@ void _debug_req(struct ptlrpc_request *req,
32500 + }
32501 + EXPORT_SYMBOL(_debug_req);
32502 +
32503 +-void lustre_swab_lustre_capa(struct lustre_capa *c)
32504 ++void lustre_swab_lustre_capa(void *_c)
32505 + {
32506 ++ struct lustre_capa *c = _c;
32507 ++
32508 + lustre_swab_lu_fid(&c->lc_fid);
32509 + __swab64s(&c->lc_opc);
32510 + __swab64s(&c->lc_uid);
32511 +@@ -2221,15 +2273,19 @@ void lustre_swab_lustre_capa(struct lustre_capa *c)
32512 + }
32513 + EXPORT_SYMBOL(lustre_swab_lustre_capa);
32514 +
32515 +-void lustre_swab_hsm_user_state(struct hsm_user_state *state)
32516 ++void lustre_swab_hsm_user_state(void *_state)
32517 + {
32518 ++ struct hsm_user_state *state = _state;
32519 ++
32520 + __swab32s(&state->hus_states);
32521 + __swab32s(&state->hus_archive_id);
32522 + }
32523 + EXPORT_SYMBOL(lustre_swab_hsm_user_state);
32524 +
32525 +-void lustre_swab_hsm_state_set(struct hsm_state_set *hss)
32526 ++void lustre_swab_hsm_state_set(void *_hss)
32527 + {
32528 ++ struct hsm_state_set *hss = _hss;
32529 ++
32530 + __swab32s(&hss->hss_valid);
32531 + __swab64s(&hss->hss_setmask);
32532 + __swab64s(&hss->hss_clearmask);
32533 +@@ -2243,23 +2299,29 @@ static void lustre_swab_hsm_extent(struct hsm_extent *extent)
32534 + __swab64s(&extent->length);
32535 + }
32536 +
32537 +-void lustre_swab_hsm_current_action(struct hsm_current_action *action)
32538 ++void lustre_swab_hsm_current_action(void *_action)
32539 + {
32540 ++ struct hsm_current_action *action = _action;
32541 ++
32542 + __swab32s(&action->hca_state);
32543 + __swab32s(&action->hca_action);
32544 + lustre_swab_hsm_extent(&action->hca_location);
32545 + }
32546 + EXPORT_SYMBOL(lustre_swab_hsm_current_action);
32547 +
32548 +-void lustre_swab_hsm_user_item(struct hsm_user_item *hui)
32549 ++void lustre_swab_hsm_user_item(void *_hui)
32550 + {
32551 ++ struct hsm_user_item *hui = _hui;
32552 ++
32553 + lustre_swab_lu_fid(&hui->hui_fid);
32554 + lustre_swab_hsm_extent(&hui->hui_extent);
32555 + }
32556 + EXPORT_SYMBOL(lustre_swab_hsm_user_item);
32557 +
32558 +-void lustre_swab_layout_intent(struct layout_intent *li)
32559 ++void lustre_swab_layout_intent(void *_li)
32560 + {
32561 ++ struct layout_intent *li = _li;
32562 ++
32563 + __swab32s(&li->li_opc);
32564 + __swab32s(&li->li_flags);
32565 + __swab64s(&li->li_start);
32566 +@@ -2267,8 +2329,10 @@ void lustre_swab_layout_intent(struct layout_intent *li)
32567 + }
32568 + EXPORT_SYMBOL(lustre_swab_layout_intent);
32569 +
32570 +-void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk)
32571 ++void lustre_swab_hsm_progress_kernel(void *_hpk)
32572 + {
32573 ++ struct hsm_progress_kernel *hpk = _hpk;
32574 ++
32575 + lustre_swab_lu_fid(&hpk->hpk_fid);
32576 + __swab64s(&hpk->hpk_cookie);
32577 + __swab64s(&hpk->hpk_extent.offset);
32578 +@@ -2278,8 +2342,10 @@ void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk)
32579 + }
32580 + EXPORT_SYMBOL(lustre_swab_hsm_progress_kernel);
32581 +
32582 +-void lustre_swab_hsm_request(struct hsm_request *hr)
32583 ++void lustre_swab_hsm_request(void *_hr)
32584 + {
32585 ++ struct hsm_request *hr = _hr;
32586 ++
32587 + __swab32s(&hr->hr_action);
32588 + __swab32s(&hr->hr_archive_id);
32589 + __swab64s(&hr->hr_flags);
32590 +@@ -2288,15 +2354,18 @@ void lustre_swab_hsm_request(struct hsm_request *hr)
32591 + }
32592 + EXPORT_SYMBOL(lustre_swab_hsm_request);
32593 +
32594 +-void lustre_swab_update_buf(struct update_buf *ub)
32595 ++void lustre_swab_update_buf(void *_ub)
32596 + {
32597 ++ struct update_buf *ub = _ub;
32598 ++
32599 + __swab32s(&ub->ub_magic);
32600 + __swab32s(&ub->ub_count);
32601 + }
32602 + EXPORT_SYMBOL(lustre_swab_update_buf);
32603 +
32604 +-void lustre_swab_update_reply_buf(struct update_reply *ur)
32605 ++void lustre_swab_update_reply_buf(void *_ur)
32606 + {
32607 ++ struct update_reply *ur = _ur;
32608 + int i;
32609 +
32610 + __swab32s(&ur->ur_version);
32611 +@@ -2306,14 +2375,18 @@ void lustre_swab_update_reply_buf(struct update_reply *ur)
32612 + }
32613 + EXPORT_SYMBOL(lustre_swab_update_reply_buf);
32614 +
32615 +-void lustre_swab_swap_layouts(struct mdc_swap_layouts *msl)
32616 ++void lustre_swab_swap_layouts(void *_msl)
32617 + {
32618 ++ struct mdc_swap_layouts *msl = _msl;
32619 ++
32620 + __swab64s(&msl->msl_flags);
32621 + }
32622 + EXPORT_SYMBOL(lustre_swab_swap_layouts);
32623 +
32624 +-void lustre_swab_close_data(struct close_data *cd)
32625 ++void lustre_swab_close_data(void *_cd)
32626 + {
32627 ++ struct close_data *cd = _cd;
32628 ++
32629 + lustre_swab_lu_fid(&cd->cd_fid);
32630 + __swab64s(&cd->cd_data_version);
32631 + }
32632 diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
32633 -index 6aed3cf..3cdcb89 100644
32634 +index 6aed3cf..f4a36a8 100644
32635 --- a/drivers/staging/octeon/ethernet-rx.c
32636 +++ b/drivers/staging/octeon/ethernet-rx.c
32637 @@ -365,15 +365,15 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
32638 @@ -57960,19 +71684,22 @@ index 6aed3cf..3cdcb89 100644
32639 #endif
32640 }
32641 netif_receive_skb(skb);
32642 -@@ -384,10 +384,10 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
32643 +@@ -384,11 +384,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
32644 dev->name);
32645 */
32646 #ifdef CONFIG_64BIT
32647 - atomic64_add(1,
32648 +- (atomic64_t *)&priv->stats.rx_dropped);
32649 + atomic64_add_unchecked(1,
32650 - (atomic64_t *)&priv->stats.rx_dropped);
32651 ++ (atomic64_unchecked_t *)&priv->stats.rx_dropped);
32652 #else
32653 - atomic_add(1,
32654 +- (atomic_t *)&priv->stats.rx_dropped);
32655 + atomic_add_unchecked(1,
32656 - (atomic_t *)&priv->stats.rx_dropped);
32657 ++ (atomic_unchecked_t *)&priv->stats.rx_dropped);
32658 #endif
32659 dev_kfree_skb_irq(skb);
32660 + }
32661 diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
32662 index f69fb5c..be5da97 100644
32663 --- a/drivers/staging/octeon/ethernet.c
32664 @@ -57993,78 +71720,46 @@ index f69fb5c..be5da97 100644
32665 #endif
32666 }
32667
32668 -diff --git a/drivers/staging/rdma/ehca/ehca_irq.c b/drivers/staging/rdma/ehca/ehca_irq.c
32669 -index 8615d7c..1396623 100644
32670 ---- a/drivers/staging/rdma/ehca/ehca_irq.c
32671 -+++ b/drivers/staging/rdma/ehca/ehca_irq.c
32672 -@@ -802,7 +802,7 @@ static void comp_task(unsigned int cpu)
32673 - spin_unlock_irq(&cct->task_lock);
32674 - }
32675 -
32676 --static struct smp_hotplug_thread comp_pool_threads = {
32677 -+static struct smp_hotplug_thread comp_pool_threads __read_only = {
32678 - .thread_should_run = comp_task_should_run,
32679 - .thread_fn = comp_task,
32680 - .thread_comm = "ehca_comp/%u",
32681 -diff --git a/drivers/staging/rdma/ipath/ipath_rc.c b/drivers/staging/rdma/ipath/ipath_rc.c
32682 -index d4aa535..022fa57 100644
32683 ---- a/drivers/staging/rdma/ipath/ipath_rc.c
32684 -+++ b/drivers/staging/rdma/ipath/ipath_rc.c
32685 -@@ -1868,7 +1868,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
32686 - struct ib_atomic_eth *ateth;
32687 - struct ipath_ack_entry *e;
32688 - u64 vaddr;
32689 -- atomic64_t *maddr;
32690 -+ atomic64_unchecked_t *maddr;
32691 - u64 sdata;
32692 - u32 rkey;
32693 - u8 next;
32694 -@@ -1903,11 +1903,11 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
32695 - IB_ACCESS_REMOTE_ATOMIC)))
32696 - goto nack_acc_unlck;
32697 - /* Perform atomic OP and save result. */
32698 -- maddr = (atomic64_t *) qp->r_sge.sge.vaddr;
32699 -+ maddr = (atomic64_unchecked_t *) qp->r_sge.sge.vaddr;
32700 - sdata = be64_to_cpu(ateth->swap_data);
32701 - e = &qp->s_ack_queue[qp->r_head_ack_queue];
32702 - e->atomic_data = (opcode == OP(FETCH_ADD)) ?
32703 -- (u64) atomic64_add_return(sdata, maddr) - sdata :
32704 -+ (u64) atomic64_add_return_unchecked(sdata, maddr) - sdata :
32705 - (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr,
32706 - be64_to_cpu(ateth->compare_data),
32707 - sdata);
32708 -diff --git a/drivers/staging/rdma/ipath/ipath_ruc.c b/drivers/staging/rdma/ipath/ipath_ruc.c
32709 -index e541a01..a41777d 100644
32710 ---- a/drivers/staging/rdma/ipath/ipath_ruc.c
32711 -+++ b/drivers/staging/rdma/ipath/ipath_ruc.c
32712 -@@ -265,7 +265,7 @@ static void ipath_ruc_loopback(struct ipath_qp *sqp)
32713 - unsigned long flags;
32714 - struct ib_wc wc;
32715 - u64 sdata;
32716 -- atomic64_t *maddr;
32717 -+ atomic64_unchecked_t *maddr;
32718 - enum ib_wc_status send_status;
32719 +diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
32720 +index 70b8f4f..6b477e9 100644
32721 +--- a/drivers/staging/panel/panel.c
32722 ++++ b/drivers/staging/panel/panel.c
32723 +@@ -1991,7 +1991,7 @@ static void panel_process_inputs(void)
32724 + }
32725 + }
32726
32727 - /*
32728 -@@ -381,11 +381,11 @@ again:
32729 - IB_ACCESS_REMOTE_ATOMIC)))
32730 - goto acc_err;
32731 - /* Perform atomic OP and save result. */
32732 -- maddr = (atomic64_t *) qp->r_sge.sge.vaddr;
32733 -+ maddr = (atomic64_unchecked_t *) qp->r_sge.sge.vaddr;
32734 - sdata = wqe->atomic_wr.compare_add;
32735 - *(u64 *) sqp->s_sge.sge.vaddr =
32736 - (wqe->wr.opcode == IB_WR_ATOMIC_FETCH_AND_ADD) ?
32737 -- (u64) atomic64_add_return(sdata, maddr) - sdata :
32738 -+ (u64) atomic64_add_return_unchecked(sdata, maddr) - sdata :
32739 - (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr,
32740 - sdata, wqe->atomic_wr.swap);
32741 - goto send_comp;
32742 +-static void panel_scan_timer(void)
32743 ++static void panel_scan_timer(unsigned long data)
32744 + {
32745 + if (keypad.enabled && keypad_initialized) {
32746 + if (spin_trylock_irq(&pprt_lock)) {
32747 +@@ -2027,7 +2027,7 @@ static void init_scan_timer(void)
32748 + if (scan_timer.function)
32749 + return; /* already started */
32750 +
32751 +- setup_timer(&scan_timer, (void *)&panel_scan_timer, 0);
32752 ++ setup_timer(&scan_timer, &panel_scan_timer, 0);
32753 + scan_timer.expires = jiffies + INPUT_POLL_TIME;
32754 + add_timer(&scan_timer);
32755 + }
32756 +diff --git a/drivers/staging/rdma/hfi1/pcie.c b/drivers/staging/rdma/hfi1/pcie.c
32757 +index 8317b07..99824f2 100644
32758 +--- a/drivers/staging/rdma/hfi1/pcie.c
32759 ++++ b/drivers/staging/rdma/hfi1/pcie.c
32760 +@@ -541,7 +541,7 @@ static void tune_pcie_caps(struct hfi1_devdata *dd)
32761 + * PCI error infrastructure, registered via pci
32762 + */
32763 + static pci_ers_result_t
32764 +-pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
32765 ++pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
32766 + {
32767 + struct hfi1_devdata *dd = pci_get_drvdata(pdev);
32768 + pci_ers_result_t ret = PCI_ERS_RESULT_RECOVERED;
32769 diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
32770 -index d900546..266edcf 100644
32771 +index 3eca687..247c0b8 100644
32772 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
32773 +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
32774 -@@ -3983,7 +3983,7 @@ static void init_mlme_ext_priv_value(struct adapter *padapter)
32775 +@@ -3992,7 +3992,7 @@ static void init_mlme_ext_priv_value(struct adapter *padapter)
32776 _12M_RATE_, _24M_RATE_, 0xff,
32777 };
32778
32779 @@ -58073,7 +71768,34 @@ index d900546..266edcf 100644
32780 pmlmeext->mgnt_seq = 0;/* reset to zero when disconnect at client mode */
32781
32782 pmlmeext->cur_channel = padapter->registrypriv.channel;
32783 -@@ -4310,7 +4310,7 @@ void report_survey_event(struct adapter *padapter,
32784 +@@ -4185,7 +4185,7 @@ void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
32785 +
32786 + static void _mgt_dispatcher(struct adapter *padapter, struct mlme_handler *ptable, struct recv_frame *precv_frame)
32787 + {
32788 +- u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
32789 ++ static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
32790 + u8 *pframe = precv_frame->rx_data;
32791 +
32792 + if (ptable->func) {
32793 +@@ -4204,7 +4204,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
32794 + #ifdef CONFIG_88EU_AP_MODE
32795 + struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
32796 + #endif /* CONFIG_88EU_AP_MODE */
32797 +- u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
32798 ++ static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
32799 + u8 *pframe = precv_frame->rx_data;
32800 + struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
32801 +
32802 +@@ -4229,7 +4229,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
32803 +
32804 + index = GetFrameSubType(pframe) >> 4;
32805 +
32806 +- if (index > 13) {
32807 ++ if (index > ARRAY_SIZE(mlme_sta_tbl)) {
32808 + RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Currently we do not support reserved sub-fr-type=%d\n", index));
32809 + return;
32810 + }
32811 +@@ -4319,7 +4319,7 @@ void report_survey_event(struct adapter *padapter,
32812 pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
32813 pc2h_evt_hdr->len = sizeof(struct survey_event);
32814 pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey);
32815 @@ -58082,7 +71804,7 @@ index d900546..266edcf 100644
32816
32817 psurvey_evt = (struct survey_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
32818
32819 -@@ -4362,7 +4362,7 @@ void report_surveydone_event(struct adapter *padapter)
32820 +@@ -4371,7 +4371,7 @@ void report_surveydone_event(struct adapter *padapter)
32821 pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
32822 pc2h_evt_hdr->len = sizeof(struct surveydone_event);
32823 pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone);
32824 @@ -58091,7 +71813,7 @@ index d900546..266edcf 100644
32825
32826 psurveydone_evt = (struct surveydone_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
32827 psurveydone_evt->bss_cnt = pmlmeext->sitesurvey_res.bss_cnt;
32828 -@@ -4408,7 +4408,7 @@ void report_join_res(struct adapter *padapter, int res)
32829 +@@ -4417,7 +4417,7 @@ void report_join_res(struct adapter *padapter, int res)
32830 pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
32831 pc2h_evt_hdr->len = sizeof(struct joinbss_event);
32832 pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss);
32833 @@ -58100,7 +71822,7 @@ index d900546..266edcf 100644
32834
32835 pjoinbss_evt = (struct joinbss_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
32836 memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex));
32837 -@@ -4461,7 +4461,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
32838 +@@ -4470,7 +4470,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
32839 pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
32840 pc2h_evt_hdr->len = sizeof(struct stadel_event);
32841 pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA);
32842 @@ -58109,7 +71831,7 @@ index d900546..266edcf 100644
32843
32844 pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
32845 memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN);
32846 -@@ -4516,7 +4516,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
32847 +@@ -4525,7 +4525,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
32848 pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
32849 pc2h_evt_hdr->len = sizeof(struct stassoc_event);
32850 pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA);
32851 @@ -58118,8 +71840,56 @@ index d900546..266edcf 100644
32852
32853 padd_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
32854 memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN);
32855 +diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
32856 +index d6d009a..c21609e 100644
32857 +--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
32858 ++++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
32859 +@@ -35,7 +35,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
32860 + struct recv_buf *precvbuf;
32861 +
32862 + tasklet_init(&precvpriv->recv_tasklet,
32863 +- (void(*)(unsigned long))rtl8188eu_recv_tasklet,
32864 ++ rtl8188eu_recv_tasklet,
32865 + (unsigned long)padapter);
32866 +
32867 + /* init recv_buf */
32868 +diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
32869 +index e04303c..6861369 100644
32870 +--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
32871 ++++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
32872 +@@ -31,7 +31,7 @@ s32 rtl8188eu_init_xmit_priv(struct adapter *adapt)
32873 + struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
32874 +
32875 + tasklet_init(&pxmitpriv->xmit_tasklet,
32876 +- (void(*)(unsigned long))rtl8188eu_xmit_tasklet,
32877 ++ rtl8188eu_xmit_tasklet,
32878 + (unsigned long)adapt);
32879 + return _SUCCESS;
32880 + }
32881 +diff --git a/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
32882 +index e058162..28d8a63 100644
32883 +--- a/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
32884 ++++ b/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
32885 +@@ -207,17 +207,9 @@ void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
32886 +
32887 + void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
32888 +
32889 +-/* Call after initialization */
32890 +-void ChkFwCmdIoDone(struct adapter *adapter);
32891 +-
32892 + /* BB/MAC/RF other monitor API */
32893 + void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
32894 +
32895 +-void PHY_SwitchEphyParameter(struct adapter *adapter);
32896 +-
32897 +-void PHY_EnableHostClkReq(struct adapter *adapter);
32898 +-
32899 +-bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
32900 +
32901 + /*--------------------------Exported Function prototype---------------------*/
32902 +
32903 diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h
32904 -index 1b1c102..375e471 100644
32905 +index 1b1c102..4f76875 100644
32906 --- a/drivers/staging/rtl8188eu/include/hal_intf.h
32907 +++ b/drivers/staging/rtl8188eu/include/hal_intf.h
32908 @@ -217,7 +217,7 @@ struct hal_ops {
32909 @@ -58131,8 +71901,121 @@ index 1b1c102..375e471 100644
32910
32911 enum rt_eeprom_type {
32912 EEPROM_93C46,
32913 +@@ -251,7 +251,6 @@ void rtw_hal_sw_led_deinit(struct adapter *padapter);
32914 + u32 rtw_hal_power_on(struct adapter *padapter);
32915 + uint rtw_hal_init(struct adapter *padapter);
32916 + uint rtw_hal_deinit(struct adapter *padapter);
32917 +-void rtw_hal_stop(struct adapter *padapter);
32918 + void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
32919 + void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);
32920 +
32921 +@@ -280,8 +279,6 @@ void rtw_hal_free_recv_priv(struct adapter *padapter);
32922 +
32923 + void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
32924 + void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
32925 +-void rtw_hal_clone_data(struct adapter *dst_adapt,
32926 +- struct adapter *src_adapt);
32927 +
32928 + void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
32929 +
32930 +diff --git a/drivers/staging/rtl8188eu/include/odm_precomp.h b/drivers/staging/rtl8188eu/include/odm_precomp.h
32931 +index 0f236da..d2507aa 100644
32932 +--- a/drivers/staging/rtl8188eu/include/odm_precomp.h
32933 ++++ b/drivers/staging/rtl8188eu/include/odm_precomp.h
32934 +@@ -75,7 +75,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm);
32935 + void odm_TXPowerTrackingThermalMeterInit(struct odm_dm_struct *pDM_Odm);
32936 + void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm);
32937 + void odm_TXPowerTrackingCheckCE(struct odm_dm_struct *pDM_Odm);
32938 +-void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext);
32939 ++void odm_SwAntDivChkAntSwitchCallback(unsigned long FunctionContext);
32940 + void odm_InitHybridAntDiv(struct odm_dm_struct *pDM_Odm);
32941 + void odm_HwAntDiv(struct odm_dm_struct *pDM_Odm);
32942 +
32943 +diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h b/drivers/staging/rtl8188eu/include/recv_osdep.h
32944 +index fdeb603..3db91e6 100644
32945 +--- a/drivers/staging/rtl8188eu/include/recv_osdep.h
32946 ++++ b/drivers/staging/rtl8188eu/include/recv_osdep.h
32947 +@@ -35,7 +35,6 @@ void rtw_recv_returnpacket(struct net_device *cnxt, struct sk_buff *retpkt);
32948 +
32949 + void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup);
32950 +
32951 +-int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
32952 + void rtw_free_recv_priv(struct recv_priv *precvpriv);
32953 +
32954 + void rtw_os_recv_resource_alloc(struct recv_frame *recvfr);
32955 +diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
32956 +index 5fed30d..efd81d5 100644
32957 +--- a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
32958 ++++ b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
32959 +@@ -59,7 +59,7 @@ enum rx_packet_type {
32960 + s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
32961 + void rtl8188eu_free_recv_priv(struct adapter *padapter);
32962 + void rtl8188eu_recv_hdl(struct adapter *padapter, struct recv_buf *precvbuf);
32963 +-void rtl8188eu_recv_tasklet(void *priv);
32964 ++void rtl8188eu_recv_tasklet(unsigned long _priv);
32965 + void rtl8188e_query_rx_phy_status(struct recv_frame *fr, struct phy_stat *phy);
32966 + void rtl8188e_process_phy_info(struct adapter *padapter, void *prframe);
32967 + void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
32968 +diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
32969 +index 0b96d42..117d0b5 100644
32970 +--- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
32971 ++++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
32972 +@@ -163,7 +163,7 @@ s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame);
32973 + s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
32974 + s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
32975 + #define hal_xmit_handler rtl8188eu_xmit_buf_handler
32976 +-void rtl8188eu_xmit_tasklet(void *priv);
32977 ++void rtl8188eu_xmit_tasklet(unsigned long _priv);
32978 + s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
32979 + struct xmit_priv *pxmitpriv,
32980 + struct xmit_buf *pxmitbuf);
32981 +diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h
32982 +index 9e9f5f4..eff152f 100644
32983 +--- a/drivers/staging/rtl8188eu/include/rtw_cmd.h
32984 ++++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h
32985 +@@ -373,7 +373,6 @@ void rtw_readtssi_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
32986 +
32987 + void rtw_setstaKey_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
32988 + void rtw_setassocsta_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cm);
32989 +-void rtw_getrttbl_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
32990 +
32991 + struct _cmd_callback {
32992 + u32 cmd_code;
32993 +diff --git a/drivers/staging/rtl8188eu/include/rtw_eeprom.h b/drivers/staging/rtl8188eu/include/rtw_eeprom.h
32994 +index 904fea1..008aa74 100644
32995 +--- a/drivers/staging/rtl8188eu/include/rtw_eeprom.h
32996 ++++ b/drivers/staging/rtl8188eu/include/rtw_eeprom.h
32997 +@@ -121,10 +121,4 @@ struct eeprom_priv {
32998 + u8 efuse_eeprom_data[HWSET_MAX_SIZE_512];
32999 + };
33000 +
33001 +-void eeprom_write16(struct adapter *padapter, u16 reg, u16 data);
33002 +-u16 eeprom_read16(struct adapter *padapter, u16 reg);
33003 +-void read_eeprom_content(struct adapter *padapter);
33004 +-void eeprom_read_sz(struct adapter *adapt, u16 reg, u8 *data, u32 sz);
33005 +-void read_eeprom_content_by_attrib(struct adapter *padapter);
33006 +-
33007 + #endif /* __RTL871X_EEPROM_H__ */
33008 +diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
33009 +index ee2cb54..03dc80b 100644
33010 +--- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h
33011 ++++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
33012 +@@ -108,13 +108,4 @@ static int oid_null_function(struct oid_par_priv *poid_par_priv) {
33013 +
33014 + extern struct iw_handler_def rtw_handlers_def;
33015 +
33016 +-int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
33017 +- void *informationbuffer, u32 informationbufferlength,
33018 +- u32 *byteswritten, u32 *bytesneeded);
33019 +-
33020 +-int drv_set_info(struct net_device *MiniportAdapterContext,
33021 +- NDIS_OID oid, void *informationbuffer,
33022 +- u32 informationbufferlength, u32 *bytesread,
33023 +- u32 *bytesneeded);
33024 +-
33025 + #endif /* #ifndef __INC_CEINFO_ */
33026 diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
33027 -index 9093a5f..5863f9b 100644
33028 +index 9093a5f..eb007cd 100644
33029 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
33030 +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
33031 @@ -409,7 +409,7 @@ struct p2p_oper_class_map {
33032 @@ -58144,6 +72027,690 @@ index 9093a5f..5863f9b 100644
33033 u16 mgnt_seq;
33034
33035 unsigned char cur_channel;
33036 +@@ -555,8 +555,6 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *addr,
33037 +
33038 + void beacon_timing_control(struct adapter *padapter);
33039 + u8 set_tx_beacon_cmd(struct adapter *padapter);
33040 +-unsigned int setup_beacon_frame(struct adapter *padapter,
33041 +- unsigned char *beacon_frame);
33042 + void update_mgnt_tx_rate(struct adapter *padapter, u8 rate);
33043 + void update_mgntframe_attrib(struct adapter *padapter,
33044 + struct pkt_attrib *pattrib);
33045 +@@ -604,12 +602,6 @@ struct cmd_hdl {
33046 + u8 (*h2cfuns)(struct adapter *padapter, u8 *pbuf);
33047 + };
33048 +
33049 +-u8 read_macreg_hdl(struct adapter *padapter, u8 *pbuf);
33050 +-u8 write_macreg_hdl(struct adapter *padapter, u8 *pbuf);
33051 +-u8 read_bbreg_hdl(struct adapter *padapter, u8 *pbuf);
33052 +-u8 write_bbreg_hdl(struct adapter *padapter, u8 *pbuf);
33053 +-u8 read_rfreg_hdl(struct adapter *padapter, u8 *pbuf);
33054 +-u8 write_rfreg_hdl(struct adapter *padapter, u8 *pbuf);
33055 + u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf);
33056 + u8 disconnect_hdl(struct adapter *padapter, u8 *pbuf);
33057 + u8 createbss_hdl(struct adapter *padapter, u8 *pbuf);
33058 +@@ -618,8 +610,6 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf);
33059 + u8 setauth_hdl(struct adapter *padapter, u8 *pbuf);
33060 + u8 setkey_hdl(struct adapter *padapter, u8 *pbuf);
33061 + u8 set_stakey_hdl(struct adapter *padapter, u8 *pbuf);
33062 +-u8 set_assocsta_hdl(struct adapter *padapter, u8 *pbuf);
33063 +-u8 del_assocsta_hdl(struct adapter *padapter, u8 *pbuf);
33064 + u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf);
33065 +
33066 + u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf);
33067 +diff --git a/drivers/staging/rtl8188eu/include/xmit_osdep.h b/drivers/staging/rtl8188eu/include/xmit_osdep.h
33068 +index 13965f2..0ea64d0 100644
33069 +--- a/drivers/staging/rtl8188eu/include/xmit_osdep.h
33070 ++++ b/drivers/staging/rtl8188eu/include/xmit_osdep.h
33071 +@@ -40,7 +40,7 @@ struct sta_xmit_priv;
33072 + struct xmit_frame;
33073 + struct xmit_buf;
33074 +
33075 +-int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
33076 ++netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
33077 +
33078 + void rtw_os_xmit_schedule(struct adapter *padapter);
33079 +
33080 +diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
33081 +index 0fea338..e6f2263 100644
33082 +--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
33083 ++++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
33084 +@@ -814,7 +814,7 @@ void usb_write_port_cancel(struct adapter *padapter)
33085 + }
33086 + }
33087 +
33088 +-void rtl8188eu_recv_tasklet(void *priv)
33089 ++void rtl8188eu_recv_tasklet(unsigned long priv)
33090 + {
33091 + struct sk_buff *pskb;
33092 + struct adapter *adapt = priv;
33093 +@@ -833,7 +833,7 @@ void rtl8188eu_recv_tasklet(void *priv)
33094 + }
33095 + }
33096 +
33097 +-void rtl8188eu_xmit_tasklet(void *priv)
33098 ++void rtl8188eu_xmit_tasklet(unsigned long priv)
33099 + {
33100 + int ret = false;
33101 + struct adapter *adapt = priv;
33102 +diff --git a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c b/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
33103 +index 1593e28..a4345f9 100644
33104 +--- a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
33105 ++++ b/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
33106 +@@ -213,7 +213,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
33107 + }
33108 +
33109 +
33110 +-int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
33111 ++netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
33112 + {
33113 + struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
33114 + struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
33115 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
33116 +index 8f989a9..781fed8 100644
33117 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
33118 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
33119 +@@ -84,7 +84,7 @@ static struct pci_driver rtl8192_pci_driver = {
33120 + };
33121 +
33122 + static short _rtl92e_is_tx_queue_empty(struct net_device *dev);
33123 +-static void _rtl92e_watchdog_wq_cb(void *data);
33124 ++static void _rtl92e_watchdog_wq_cb(struct work_struct *data);
33125 + static void _rtl92e_watchdog_timer_cb(unsigned long data);
33126 + static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
33127 + int rate);
33128 +@@ -92,13 +92,13 @@ static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
33129 + static void _rtl92e_tx_cmd(struct net_device *dev, struct sk_buff *skb);
33130 + static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb);
33131 + static short _rtl92e_pci_initdescring(struct net_device *dev);
33132 +-static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv);
33133 +-static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv);
33134 ++static void _rtl92e_irq_tx_tasklet(unsigned long priv);
33135 ++static void _rtl92e_irq_rx_tasklet(unsigned long priv);
33136 + static void _rtl92e_cancel_deferred_work(struct r8192_priv *priv);
33137 + static int _rtl92e_up(struct net_device *dev, bool is_silent_reset);
33138 + static int _rtl92e_try_up(struct net_device *dev);
33139 + static int _rtl92e_down(struct net_device *dev, bool shutdownrf);
33140 +-static void _rtl92e_restart(void *data);
33141 ++static void _rtl92e_restart(struct work_struct *data);
33142 +
33143 + /****************************************************************************
33144 + -----------------------------IO STUFF-------------------------
33145 +@@ -375,7 +375,7 @@ static struct rtllib_qos_parameters def_qos_parameters = {
33146 + {0, 0, 0, 0}
33147 + };
33148 +
33149 +-static void _rtl92e_update_beacon(void *data)
33150 ++static void _rtl92e_update_beacon(struct work_struct *data)
33151 + {
33152 + struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
33153 + update_beacon_wq.work);
33154 +@@ -391,7 +391,7 @@ static void _rtl92e_update_beacon(void *data)
33155 + _rtl92e_update_cap(dev, net->capability);
33156 + }
33157 +
33158 +-static void _rtl92e_qos_activate(void *data)
33159 ++static void _rtl92e_qos_activate(struct work_struct *data)
33160 + {
33161 + struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
33162 + qos_activate);
33163 +@@ -527,8 +527,9 @@ static int _rtl92e_handle_assoc_response(struct net_device *dev,
33164 + return 0;
33165 + }
33166 +
33167 +-static void _rtl92e_prepare_beacon(struct r8192_priv *priv)
33168 ++static void _rtl92e_prepare_beacon(unsigned long _priv)
33169 + {
33170 ++ struct r8192_priv *priv = (struct r8192_priv *)_priv;
33171 + struct net_device *dev = priv->rtllib->dev;
33172 + struct sk_buff *pskb = NULL, *pnewskb = NULL;
33173 + struct cb_desc *tcb_desc = NULL;
33174 +@@ -1003,30 +1004,30 @@ static void _rtl92e_init_priv_task(struct net_device *dev)
33175 + struct r8192_priv *priv = rtllib_priv(dev);
33176 +
33177 + priv->priv_wq = create_workqueue(DRV_NAME);
33178 +- INIT_WORK_RSL(&priv->reset_wq, (void *)_rtl92e_restart, dev);
33179 +- INIT_WORK_RSL(&priv->rtllib->ips_leave_wq, (void *)rtl92e_ips_leave_wq,
33180 ++ INIT_WORK_RSL(&priv->reset_wq, _rtl92e_restart, dev);
33181 ++ INIT_WORK_RSL(&priv->rtllib->ips_leave_wq, rtl92e_ips_leave_wq,
33182 + dev);
33183 + INIT_DELAYED_WORK_RSL(&priv->watch_dog_wq,
33184 +- (void *)_rtl92e_watchdog_wq_cb, dev);
33185 ++ _rtl92e_watchdog_wq_cb, dev);
33186 + INIT_DELAYED_WORK_RSL(&priv->txpower_tracking_wq,
33187 +- (void *)rtl92e_dm_txpower_tracking_wq, dev);
33188 ++ rtl92e_dm_txpower_tracking_wq, dev);
33189 + INIT_DELAYED_WORK_RSL(&priv->rfpath_check_wq,
33190 +- (void *)rtl92e_dm_rf_pathcheck_wq, dev);
33191 ++ rtl92e_dm_rf_pathcheck_wq, dev);
33192 + INIT_DELAYED_WORK_RSL(&priv->update_beacon_wq,
33193 +- (void *)_rtl92e_update_beacon, dev);
33194 +- INIT_WORK_RSL(&priv->qos_activate, (void *)_rtl92e_qos_activate, dev);
33195 ++ _rtl92e_update_beacon, dev);
33196 ++ INIT_WORK_RSL(&priv->qos_activate, _rtl92e_qos_activate, dev);
33197 + INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_wakeup_wq,
33198 +- (void *) rtl92e_hw_wakeup_wq, dev);
33199 ++ rtl92e_hw_wakeup_wq, dev);
33200 + INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_sleep_wq,
33201 +- (void *) rtl92e_hw_sleep_wq, dev);
33202 ++ rtl92e_hw_sleep_wq, dev);
33203 + tasklet_init(&priv->irq_rx_tasklet,
33204 +- (void(*)(unsigned long))_rtl92e_irq_rx_tasklet,
33205 ++ _rtl92e_irq_rx_tasklet,
33206 + (unsigned long)priv);
33207 + tasklet_init(&priv->irq_tx_tasklet,
33208 +- (void(*)(unsigned long))_rtl92e_irq_tx_tasklet,
33209 ++ _rtl92e_irq_tx_tasklet,
33210 + (unsigned long)priv);
33211 + tasklet_init(&priv->irq_prepare_beacon_tasklet,
33212 +- (void(*)(unsigned long))_rtl92e_prepare_beacon,
33213 ++ _rtl92e_prepare_beacon,
33214 + (unsigned long)priv);
33215 + }
33216 +
33217 +@@ -1378,7 +1379,7 @@ static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum,
33218 + }
33219 + }
33220 +
33221 +-static void _rtl92e_watchdog_wq_cb(void *data)
33222 ++static void _rtl92e_watchdog_wq_cb(struct work_struct *data)
33223 + {
33224 + struct r8192_priv *priv = container_of_dwork_rsl(data,
33225 + struct r8192_priv, watch_dog_wq);
33226 +@@ -2143,13 +2144,15 @@ static void _rtl92e_tx_resume(struct net_device *dev)
33227 + }
33228 + }
33229 +
33230 +-static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv)
33231 ++static void _rtl92e_irq_tx_tasklet(unsigned long _priv)
33232 + {
33233 ++ struct r8192_priv *priv = (struct r8192_priv *)_priv;
33234 + _rtl92e_tx_resume(priv->rtllib->dev);
33235 + }
33236 +
33237 +-static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv)
33238 ++static void _rtl92e_irq_rx_tasklet(unsigned long _priv)
33239 + {
33240 ++ struct r8192_priv *priv= (struct r8192_priv *)_priv;
33241 + _rtl92e_rx_normal(priv->rtllib->dev);
33242 +
33243 + rtl92e_writel(priv->rtllib->dev, INTA_MASK,
33244 +@@ -2237,7 +2240,7 @@ void rtl92e_commit(struct net_device *dev)
33245 + _rtl92e_up(dev, false);
33246 + }
33247 +
33248 +-static void _rtl92e_restart(void *data)
33249 ++static void _rtl92e_restart(struct work_struct *data)
33250 + {
33251 + struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
33252 + reset_wq);
33253 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
33254 +index a7777a3..8e28a32 100644
33255 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
33256 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
33257 +@@ -588,12 +588,12 @@ void force_pci_posting(struct net_device *dev);
33258 + void rtl92e_rx_enable(struct net_device *);
33259 + void rtl92e_tx_enable(struct net_device *);
33260 +
33261 +-void rtl92e_hw_sleep_wq(void *data);
33262 ++void rtl92e_hw_sleep_wq(struct work_struct *data);
33263 + void rtl92e_commit(struct net_device *dev);
33264 +
33265 + void rtl92e_check_rfctrl_gpio_timer(unsigned long data);
33266 +
33267 +-void rtl92e_hw_wakeup_wq(void *data);
33268 ++void rtl92e_hw_wakeup_wq(struct work_struct *data);
33269 +
33270 + void rtl92e_reset_desc_ring(struct net_device *dev);
33271 + void rtl92e_set_wireless_mode(struct net_device *dev, u8 wireless_mode);
33272 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
33273 +index ef03242..eef2177 100644
33274 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
33275 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
33276 +@@ -195,7 +195,7 @@ static void _rtl92e_dm_deinit_fsync(struct net_device *dev);
33277 + static void _rtl92e_dm_check_txrateandretrycount(struct net_device *dev);
33278 + static void _rtl92e_dm_check_ac_dc_power(struct net_device *dev);
33279 + static void _rtl92e_dm_check_fsync(struct net_device *dev);
33280 +-static void _rtl92e_dm_check_rf_ctrl_gpio(void *data);
33281 ++static void _rtl92e_dm_check_rf_ctrl_gpio(struct work_struct *data);
33282 + static void _rtl92e_dm_fsync_timer_callback(unsigned long data);
33283 +
33284 + /*---------------------Define local function prototype-----------------------*/
33285 +@@ -229,7 +229,7 @@ void rtl92e_dm_init(struct net_device *dev)
33286 + _rtl92e_dm_init_wa_broadcom_iot(dev);
33287 +
33288 + INIT_DELAYED_WORK_RSL(&priv->gpio_change_rf_wq,
33289 +- (void *)_rtl92e_dm_check_rf_ctrl_gpio, dev);
33290 ++ _rtl92e_dm_check_rf_ctrl_gpio, dev);
33291 + }
33292 +
33293 + void rtl92e_dm_deinit(struct net_device *dev)
33294 +@@ -932,7 +932,7 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
33295 + priv->txpower_count = 0;
33296 + }
33297 +
33298 +-void rtl92e_dm_txpower_tracking_wq(void *data)
33299 ++void rtl92e_dm_txpower_tracking_wq(struct work_struct *data)
33300 + {
33301 + struct r8192_priv *priv = container_of_dwork_rsl(data,
33302 + struct r8192_priv, txpower_tracking_wq);
33303 +@@ -1815,7 +1815,7 @@ static void _rtl92e_dm_init_wa_broadcom_iot(struct net_device *dev)
33304 + pHTInfo->WAIotTH = WAIotTHVal;
33305 + }
33306 +
33307 +-static void _rtl92e_dm_check_rf_ctrl_gpio(void *data)
33308 ++static void _rtl92e_dm_check_rf_ctrl_gpio(struct work_struct *data)
33309 + {
33310 + struct r8192_priv *priv = container_of_dwork_rsl(data,
33311 + struct r8192_priv, gpio_change_rf_wq);
33312 +@@ -1869,7 +1869,7 @@ static void _rtl92e_dm_check_rf_ctrl_gpio(void *data)
33313 + }
33314 + }
33315 +
33316 +-void rtl92e_dm_rf_pathcheck_wq(void *data)
33317 ++void rtl92e_dm_rf_pathcheck_wq(struct work_struct *data)
33318 + {
33319 + struct r8192_priv *priv = container_of_dwork_rsl(data,
33320 + struct r8192_priv,
33321 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
33322 +index 756a0dd..d2de5e8 100644
33323 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
33324 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
33325 +@@ -191,13 +191,13 @@ void rtl92e_dm_watchdog(struct net_device *dev);
33326 +
33327 +
33328 + void rtl92e_init_adaptive_rate(struct net_device *dev);
33329 +-void rtl92e_dm_txpower_tracking_wq(void *data);
33330 ++void rtl92e_dm_txpower_tracking_wq(struct work_struct *data);
33331 +
33332 + void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14);
33333 +
33334 + void rtl92e_dm_restore_state(struct net_device *dev);
33335 + void rtl92e_dm_backup_state(struct net_device *dev);
33336 + void rtl92e_dm_init_edca_turbo(struct net_device *dev);
33337 +-void rtl92e_dm_rf_pathcheck_wq(void *data);
33338 ++void rtl92e_dm_rf_pathcheck_wq(struct work_struct *data);
33339 + void rtl92e_dm_init_txpower_tracking(struct net_device *dev);
33340 + #endif /*__R8192UDM_H__ */
33341 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
33342 +index 9a4d1bc..3add233 100644
33343 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
33344 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
33345 +@@ -44,7 +44,7 @@ static void _rtl92e_hw_sleep(struct net_device *dev)
33346 + rtl92e_set_rf_state(dev, eRfSleep, RF_CHANGE_BY_PS);
33347 + }
33348 +
33349 +-void rtl92e_hw_sleep_wq(void *data)
33350 ++void rtl92e_hw_sleep_wq(struct work_struct *data)
33351 + {
33352 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33353 + struct rtllib_device, hw_sleep_wq);
33354 +@@ -73,7 +73,7 @@ void rtl92e_hw_wakeup(struct net_device *dev)
33355 + rtl92e_set_rf_state(dev, eRfOn, RF_CHANGE_BY_PS);
33356 + }
33357 +
33358 +-void rtl92e_hw_wakeup_wq(void *data)
33359 ++void rtl92e_hw_wakeup_wq(struct work_struct *data)
33360 + {
33361 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33362 + struct rtllib_device, hw_wakeup_wq);
33363 +@@ -175,7 +175,7 @@ void rtl92e_ips_leave(struct net_device *dev)
33364 + }
33365 + }
33366 +
33367 +-void rtl92e_ips_leave_wq(void *data)
33368 ++void rtl92e_ips_leave_wq(struct work_struct *data)
33369 + {
33370 + struct rtllib_device *ieee = container_of_work_rsl(data,
33371 + struct rtllib_device, ips_leave_wq);
33372 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h
33373 +index a46f4cf..8f46fda 100644
33374 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h
33375 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h
33376 +@@ -24,6 +24,7 @@
33377 + #include <linux/types.h>
33378 +
33379 + struct net_device;
33380 ++struct work_struct;
33381 +
33382 + #define RT_CHECK_FOR_HANG_PERIOD 2
33383 +
33384 +@@ -31,7 +32,7 @@ void rtl92e_hw_wakeup(struct net_device *dev);
33385 + void rtl92e_enter_sleep(struct net_device *dev, u64 time);
33386 + void rtl92e_rtllib_ips_leave_wq(struct net_device *dev);
33387 + void rtl92e_rtllib_ips_leave(struct net_device *dev);
33388 +-void rtl92e_ips_leave_wq(void *data);
33389 ++void rtl92e_ips_leave_wq(struct work_struct *data);
33390 +
33391 + void rtl92e_ips_enter(struct net_device *dev);
33392 + void rtl92e_ips_leave(struct net_device *dev);
33393 +diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
33394 +index 70df6a1..21c9f2e 100644
33395 +--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
33396 ++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
33397 +@@ -1187,30 +1187,30 @@ static const struct iw_priv_args r8192_private_args[] = {
33398 + };
33399 +
33400 + static iw_handler r8192_private_handler[] = {
33401 +- (iw_handler)_rtl92e_wx_set_debug, /*SIOCIWSECONDPRIV*/
33402 +- (iw_handler)_rtl92e_wx_set_scan_type,
33403 +- (iw_handler)_rtl92e_wx_set_rawtx,
33404 +- (iw_handler)_rtl92e_wx_force_reset,
33405 +- (iw_handler)NULL,
33406 +- (iw_handler)NULL,
33407 +- (iw_handler)_rtl92e_wx_adapter_power_status,
33408 +- (iw_handler)NULL,
33409 +- (iw_handler)NULL,
33410 +- (iw_handler)NULL,
33411 +- (iw_handler)_rtl92e_wx_set_lps_awake_interval,
33412 +- (iw_handler)_rtl92e_wx_set_force_lps,
33413 +- (iw_handler)NULL,
33414 +- (iw_handler)NULL,
33415 +- (iw_handler)NULL,
33416 +- (iw_handler)NULL,
33417 +- (iw_handler)NULL,
33418 +- (iw_handler)NULL,
33419 +- (iw_handler)NULL,
33420 +- (iw_handler)NULL,
33421 +- (iw_handler)NULL,
33422 +- (iw_handler)NULL,
33423 +- (iw_handler)_rtl92e_wx_set_promisc_mode,
33424 +- (iw_handler)_rtl92e_wx_get_promisc_mode,
33425 ++ _rtl92e_wx_set_debug, /*SIOCIWSECONDPRIV*/
33426 ++ _rtl92e_wx_set_scan_type,
33427 ++ _rtl92e_wx_set_rawtx,
33428 ++ _rtl92e_wx_force_reset,
33429 ++ NULL,
33430 ++ NULL,
33431 ++ _rtl92e_wx_adapter_power_status,
33432 ++ NULL,
33433 ++ NULL,
33434 ++ NULL,
33435 ++ _rtl92e_wx_set_lps_awake_interval,
33436 ++ _rtl92e_wx_set_force_lps,
33437 ++ NULL,
33438 ++ NULL,
33439 ++ NULL,
33440 ++ NULL,
33441 ++ NULL,
33442 ++ NULL,
33443 ++ NULL,
33444 ++ NULL,
33445 ++ NULL,
33446 ++ NULL,
33447 ++ _rtl92e_wx_set_promisc_mode,
33448 ++ _rtl92e_wx_get_promisc_mode,
33449 + };
33450 +
33451 + static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
33452 +diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
33453 +index 563ac12..2ba2482 100644
33454 +--- a/drivers/staging/rtl8192e/rtllib.h
33455 ++++ b/drivers/staging/rtl8192e/rtllib.h
33456 +@@ -1994,7 +1994,7 @@ int rtllib_encrypt_fragment(
33457 + struct sk_buff *frag,
33458 + int hdr_len);
33459 +
33460 +-int rtllib_xmit(struct sk_buff *skb, struct net_device *dev);
33461 ++netdev_tx_t rtllib_xmit(struct sk_buff *skb, struct net_device *dev);
33462 + void rtllib_txb_free(struct rtllib_txb *);
33463 +
33464 + /* rtllib_rx.c */
33465 +@@ -2108,7 +2108,7 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
33466 +
33467 + int rtllib_wx_get_freq(struct rtllib_device *ieee, struct iw_request_info *a,
33468 + union iwreq_data *wrqu, char *b);
33469 +-void rtllib_wx_sync_scan_wq(void *data);
33470 ++void rtllib_wx_sync_scan_wq(struct work_struct *data);
33471 +
33472 + int rtllib_wx_set_rawtx(struct rtllib_device *ieee,
33473 + struct iw_request_info *info,
33474 +diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
33475 +index d0fedb0..59293cc 100644
33476 +--- a/drivers/staging/rtl8192e/rtllib_softmac.c
33477 ++++ b/drivers/staging/rtl8192e/rtllib_softmac.c
33478 +@@ -574,7 +574,7 @@ out:
33479 + wireless_send_event(ieee->dev, SIOCGIWSCAN, &wrqu, NULL);
33480 + }
33481 +
33482 +-static void rtllib_softmac_scan_wq(void *data)
33483 ++static void rtllib_softmac_scan_wq(struct work_struct *data)
33484 + {
33485 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33486 + struct rtllib_device, softmac_scan_wq);
33487 +@@ -1514,7 +1514,7 @@ static void rtllib_associate_step2(struct rtllib_device *ieee)
33488 + }
33489 + }
33490 +
33491 +-static void rtllib_associate_complete_wq(void *data)
33492 ++static void rtllib_associate_complete_wq(struct work_struct *data)
33493 + {
33494 + struct rtllib_device *ieee = (struct rtllib_device *)
33495 + container_of_work_rsl(data,
33496 +@@ -1583,7 +1583,7 @@ static void rtllib_associate_complete(struct rtllib_device *ieee)
33497 + queue_work_rsl(ieee->wq, &ieee->associate_complete_wq);
33498 + }
33499 +
33500 +-static void rtllib_associate_procedure_wq(void *data)
33501 ++static void rtllib_associate_procedure_wq(struct work_struct *data)
33502 + {
33503 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33504 + struct rtllib_device,
33505 +@@ -2055,8 +2055,9 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
33506 +
33507 + }
33508 +
33509 +-static inline void rtllib_sta_ps(struct rtllib_device *ieee)
33510 ++static inline void rtllib_sta_ps(unsigned long _ieee)
33511 + {
33512 ++ struct rtllib_device *ieee = (struct rtllib_device *)_ieee;
33513 + u64 time;
33514 + short sleep;
33515 + unsigned long flags, flags2;
33516 +@@ -2583,7 +2584,7 @@ static void rtllib_start_monitor_mode(struct rtllib_device *ieee)
33517 + }
33518 + }
33519 +
33520 +-static void rtllib_start_ibss_wq(void *data)
33521 ++static void rtllib_start_ibss_wq(struct work_struct *data)
33522 + {
33523 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33524 + struct rtllib_device, start_ibss_wq);
33525 +@@ -2749,7 +2750,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee)
33526 + spin_unlock_irqrestore(&ieee->lock, flags);
33527 + }
33528 +
33529 +-static void rtllib_link_change_wq(void *data)
33530 ++static void rtllib_link_change_wq(struct work_struct *data)
33531 + {
33532 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33533 + struct rtllib_device, link_change_wq);
33534 +@@ -2775,7 +2776,7 @@ void rtllib_disassociate(struct rtllib_device *ieee)
33535 + notify_wx_assoc_event(ieee);
33536 + }
33537 +
33538 +-static void rtllib_associate_retry_wq(void *data)
33539 ++static void rtllib_associate_retry_wq(struct work_struct *data)
33540 + {
33541 + struct rtllib_device *ieee = container_of_dwork_rsl(data,
33542 + struct rtllib_device, associate_retry_wq);
33543 +@@ -3031,19 +3032,18 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
33544 + ieee->wq = create_workqueue(DRV_NAME);
33545 +
33546 + INIT_DELAYED_WORK_RSL(&ieee->link_change_wq,
33547 +- (void *)rtllib_link_change_wq, ieee);
33548 ++ rtllib_link_change_wq, ieee);
33549 + INIT_DELAYED_WORK_RSL(&ieee->start_ibss_wq,
33550 +- (void *)rtllib_start_ibss_wq, ieee);
33551 ++ rtllib_start_ibss_wq, ieee);
33552 + INIT_WORK_RSL(&ieee->associate_complete_wq,
33553 +- (void *)rtllib_associate_complete_wq, ieee);
33554 ++ rtllib_associate_complete_wq, ieee);
33555 + INIT_DELAYED_WORK_RSL(&ieee->associate_procedure_wq,
33556 +- (void *)rtllib_associate_procedure_wq, ieee);
33557 ++ rtllib_associate_procedure_wq, ieee);
33558 + INIT_DELAYED_WORK_RSL(&ieee->softmac_scan_wq,
33559 +- (void *)rtllib_softmac_scan_wq, ieee);
33560 ++ rtllib_softmac_scan_wq, ieee);
33561 + INIT_DELAYED_WORK_RSL(&ieee->associate_retry_wq,
33562 +- (void *)rtllib_associate_retry_wq, ieee);
33563 +- INIT_WORK_RSL(&ieee->wx_sync_scan_wq, (void *)rtllib_wx_sync_scan_wq,
33564 +- ieee);
33565 ++ rtllib_associate_retry_wq, ieee);
33566 ++ INIT_WORK_RSL(&ieee->wx_sync_scan_wq, rtllib_wx_sync_scan_wq, ieee);
33567 +
33568 + sema_init(&ieee->wx_sem, 1);
33569 + sema_init(&ieee->scan_sem, 1);
33570 +@@ -3053,7 +3053,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
33571 + spin_lock_init(&ieee->beacon_lock);
33572 +
33573 + tasklet_init(&ieee->ps_task,
33574 +- (void(*)(unsigned long)) rtllib_sta_ps,
33575 ++ rtllib_sta_ps,
33576 + (unsigned long)ieee);
33577 +
33578 + }
33579 +diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
33580 +index 86f52ac7..0d95442 100644
33581 +--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
33582 ++++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
33583 +@@ -327,7 +327,7 @@ out:
33584 + }
33585 + EXPORT_SYMBOL(rtllib_wx_set_mode);
33586 +
33587 +-void rtllib_wx_sync_scan_wq(void *data)
33588 ++void rtllib_wx_sync_scan_wq(struct work_struct *data)
33589 + {
33590 + struct rtllib_device *ieee = container_of_work_rsl(data,
33591 + struct rtllib_device, wx_sync_scan_wq);
33592 +diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
33593 +index 58fc70e..3fe041e 100644
33594 +--- a/drivers/staging/rtl8192e/rtllib_tx.c
33595 ++++ b/drivers/staging/rtl8192e/rtllib_tx.c
33596 +@@ -981,7 +981,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
33597 + return 1;
33598 +
33599 + }
33600 +-int rtllib_xmit(struct sk_buff *skb, struct net_device *dev)
33601 ++netdev_tx_t rtllib_xmit(struct sk_buff *skb, struct net_device *dev)
33602 + {
33603 + memset(skb->cb, 0, sizeof(skb->cb));
33604 + return rtllib_xmit_inter(skb, dev);
33605 +diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
33606 +index 967ef9a..5038be8 100644
33607 +--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
33608 ++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
33609 +@@ -2179,7 +2179,7 @@ int ieee80211_set_encryption(struct ieee80211_device *ieee);
33610 + int ieee80211_encrypt_fragment(struct ieee80211_device *ieee,
33611 + struct sk_buff *frag, int hdr_len);
33612 +
33613 +-int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
33614 ++netdev_tx_t ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
33615 + void ieee80211_txb_free(struct ieee80211_txb *);
33616 +
33617 +
33618 +diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
33619 +index 38c3eb7..fa242a7 100644
33620 +--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
33621 ++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
33622 +@@ -1762,9 +1762,9 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
33623 +
33624 + }
33625 +
33626 +-static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
33627 ++static inline void ieee80211_sta_ps(unsigned long _ieee)
33628 + {
33629 +-
33630 ++ struct ieee80211_device *ieee = (struct ieee80211_device *)_ieee;
33631 + u32 th, tl;
33632 + short sleep;
33633 +
33634 +@@ -2739,7 +2739,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
33635 + spin_lock_init(&ieee->beacon_lock);
33636 +
33637 + tasklet_init(&ieee->ps_task,
33638 +- (void(*)(unsigned long)) ieee80211_sta_ps,
33639 ++ ieee80211_sta_ps,
33640 + (unsigned long)ieee);
33641 +
33642 + }
33643 +diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
33644 +index 1ab0aea..41de55c 100644
33645 +--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
33646 ++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
33647 +@@ -594,7 +594,7 @@ static void ieee80211_query_seqnum(struct ieee80211_device *ieee,
33648 + }
33649 + }
33650 +
33651 +-int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
33652 ++netdev_tx_t ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
33653 + {
33654 + struct ieee80211_device *ieee = netdev_priv(dev);
33655 + struct ieee80211_txb *txb = NULL;
33656 +diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
33657 +index f4a4eae..2f3eb39 100644
33658 +--- a/drivers/staging/rtl8192u/r8192U_core.c
33659 ++++ b/drivers/staging/rtl8192u/r8192U_core.c
33660 +@@ -2375,7 +2375,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv)
33661 +
33662 + static void rtl819x_watchdog_wqcallback(struct work_struct *work);
33663 +
33664 +-static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv);
33665 ++static void rtl8192_irq_rx_tasklet(unsigned long priv);
33666 + /* init tasklet and wait_queue here. only 2.6 above kernel is considered */
33667 + #define DRV_NAME "wlan0"
33668 + static void rtl8192_init_priv_task(struct net_device *dev)
33669 +@@ -2399,7 +2399,7 @@ static void rtl8192_init_priv_task(struct net_device *dev)
33670 + INIT_WORK(&priv->qos_activate, rtl8192_qos_activate);
33671 +
33672 + tasklet_init(&priv->irq_rx_tasklet,
33673 +- (void(*)(unsigned long))rtl8192_irq_rx_tasklet,
33674 ++ rtl8192_irq_rx_tasklet,
33675 + (unsigned long)priv);
33676 + }
33677 +
33678 +@@ -4907,8 +4907,9 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)
33679 + }
33680 + }
33681 +
33682 +-static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)
33683 ++static void rtl8192_irq_rx_tasklet(unsigned long _priv)
33684 + {
33685 ++ struct r8192_priv *priv = (struct r8192_priv *)_priv;
33686 + struct sk_buff *skb;
33687 + struct rtl8192_rx_info *info;
33688 +
33689 +diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
33690 +index d187508..a2e3800 100644
33691 +--- a/drivers/staging/rtl8712/rtl8712_recv.c
33692 ++++ b/drivers/staging/rtl8712/rtl8712_recv.c
33693 +@@ -45,7 +45,7 @@ static u8 bridge_tunnel_header[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8};
33694 + /* Ethernet-II snap header (RFC1042 for most EtherTypes) */
33695 + static u8 rfc1042_header[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
33696 +
33697 +-static void recv_tasklet(void *priv);
33698 ++static void recv_tasklet(unsigned long _priv);
33699 +
33700 + int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
33701 + {
33702 +@@ -79,7 +79,7 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
33703 + }
33704 + precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
33705 + tasklet_init(&precvpriv->recv_tasklet,
33706 +- (void(*)(unsigned long))recv_tasklet,
33707 ++ recv_tasklet,
33708 + (unsigned long)padapter);
33709 + skb_queue_head_init(&precvpriv->rx_skb_queue);
33710 +
33711 +@@ -1103,7 +1103,7 @@ _exit_recvbuf2recvframe:
33712 + return _SUCCESS;
33713 + }
33714 +
33715 +-static void recv_tasklet(void *priv)
33716 ++static void recv_tasklet(unsigned long priv)
33717 + {
33718 + struct sk_buff *pskb;
33719 + struct _adapter *padapter = (struct _adapter *)priv;
33720 diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
33721 index 26dd24c..2eb37c9 100644
33722 --- a/drivers/staging/rtl8712/rtl871x_io.h
33723 @@ -58157,6 +72724,94 @@ index 26dd24c..2eb37c9 100644
33724
33725 struct io_req {
33726 struct list_head list;
33727 +diff --git a/drivers/staging/rtl8712/rtl871x_ioctl.h b/drivers/staging/rtl8712/rtl871x_ioctl.h
33728 +index c9218be..ecda3f6 100644
33729 +--- a/drivers/staging/rtl8712/rtl871x_ioctl.h
33730 ++++ b/drivers/staging/rtl8712/rtl871x_ioctl.h
33731 +@@ -76,18 +76,4 @@ uint oid_null_function(struct oid_par_priv *poid_par_priv);
33732 +
33733 + extern struct iw_handler_def r871x_handlers_def;
33734 +
33735 +-uint drv_query_info(struct net_device *MiniportAdapterContext,
33736 +- uint Oid,
33737 +- void *InformationBuffer,
33738 +- u32 InformationBufferLength,
33739 +- u32 *BytesWritten,
33740 +- u32 *BytesNeeded);
33741 +-
33742 +-uint drv_set_info(struct net_device *MiniportAdapterContext,
33743 +- uint Oid,
33744 +- void *InformationBuffer,
33745 +- u32 InformationBufferLength,
33746 +- u32 *BytesRead,
33747 +- u32 *BytesNeeded);
33748 +-
33749 + #endif
33750 +diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
33751 +index 68d65d2..060b3a3 100644
33752 +--- a/drivers/staging/rtl8712/rtl871x_xmit.c
33753 ++++ b/drivers/staging/rtl8712/rtl871x_xmit.c
33754 +@@ -152,7 +152,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
33755 + alloc_hwxmits(padapter);
33756 + init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
33757 + tasklet_init(&pxmitpriv->xmit_tasklet,
33758 +- (void(*)(unsigned long))r8712_xmit_bh,
33759 ++ r8712_xmit_bh,
33760 + (unsigned long)padapter);
33761 + return _SUCCESS;
33762 + }
33763 +diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h
33764 +index a9633c3..77b0c85 100644
33765 +--- a/drivers/staging/rtl8712/rtl871x_xmit.h
33766 ++++ b/drivers/staging/rtl8712/rtl871x_xmit.h
33767 +@@ -291,7 +291,7 @@ int r8712_pre_xmit(struct _adapter *padapter, struct xmit_frame *pxmitframe);
33768 + int r8712_xmit_enqueue(struct _adapter *padapter,
33769 + struct xmit_frame *pxmitframe);
33770 + int r8712_xmit_direct(struct _adapter *padapter, struct xmit_frame *pxmitframe);
33771 +-void r8712_xmit_bh(void *priv);
33772 ++void r8712_xmit_bh(unsigned long priv);
33773 +
33774 + void xmitframe_xmitbuf_attach(struct xmit_frame *pxmitframe,
33775 + struct xmit_buf *pxmitbuf);
33776 +diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
33777 +index 489a9e6..6dd73de 100644
33778 +--- a/drivers/staging/rtl8712/usb_ops_linux.c
33779 ++++ b/drivers/staging/rtl8712/usb_ops_linux.c
33780 +@@ -326,7 +326,7 @@ void r8712_usb_read_port_cancel(struct _adapter *padapter)
33781 + }
33782 + }
33783 +
33784 +-void r8712_xmit_bh(void *priv)
33785 ++void r8712_xmit_bh(unsigned long priv)
33786 + {
33787 + int ret = false;
33788 + struct _adapter *padapter = (struct _adapter *)priv;
33789 +diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
33790 +index d398183..0ceb8ad 100644
33791 +--- a/drivers/staging/rtl8712/xmit_linux.c
33792 ++++ b/drivers/staging/rtl8712/xmit_linux.c
33793 +@@ -159,7 +159,7 @@ void r8712_xmit_complete(struct _adapter *padapter, struct xmit_frame *pxframe)
33794 + pxframe->pkt = NULL;
33795 + }
33796 +
33797 +-int r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev)
33798 ++netdev_tx_t r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev)
33799 + {
33800 + struct xmit_frame *pxmitframe = NULL;
33801 + struct _adapter *padapter = netdev_priv(pnetdev);
33802 +diff --git a/drivers/staging/rtl8712/xmit_osdep.h b/drivers/staging/rtl8712/xmit_osdep.h
33803 +index 8eba7ca..6c4ce81 100644
33804 +--- a/drivers/staging/rtl8712/xmit_osdep.h
33805 ++++ b/drivers/staging/rtl8712/xmit_osdep.h
33806 +@@ -46,7 +46,7 @@ struct sta_xmit_priv;
33807 + struct xmit_frame;
33808 + struct xmit_buf;
33809 +
33810 +-int r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev);
33811 ++netdev_tx_t r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev);
33812 + void r8712_SetFilter(struct work_struct *work);
33813 + int r8712_xmit_resource_alloc(struct _adapter *padapter,
33814 + struct xmit_buf *pxmitbuf);
33815 diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
33816 index d28f29a..e3d2f19 100644
33817 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
33818 @@ -58215,6 +72870,80 @@ index d28f29a..e3d2f19 100644
33819
33820 padd_sta_evt = (struct stassoc_event*)(pevtcmd + sizeof(struct C2HEvent_Header));
33821 ether_addr_copy((unsigned char *)&padd_sta_evt->macaddr, MacAddr);
33822 +diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c
33823 +index a4b6bb6..b22a6be 100644
33824 +--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
33825 ++++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
33826 +@@ -183,7 +183,7 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
33827 + mutex_init(&pxmitpriv->ack_tx_mutex);
33828 + rtw_sctx_init23a(&pxmitpriv->ack_tx_ops, 0);
33829 + tasklet_init(&padapter->xmitpriv.xmit_tasklet,
33830 +- (void(*)(unsigned long))rtl8723au_xmit_tasklet,
33831 ++ rtl8723au_xmit_tasklet,
33832 + (unsigned long)padapter);
33833 +
33834 + exit:
33835 +diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
33836 +index 0fec84b..298d283 100644
33837 +--- a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
33838 ++++ b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
33839 +@@ -33,7 +33,7 @@ int rtl8723au_init_recv_priv(struct rtw_adapter *padapter)
33840 + struct sk_buff *pskb;
33841 +
33842 + tasklet_init(&precvpriv->recv_tasklet,
33843 +- (void(*)(unsigned long))rtl8723au_recv_tasklet,
33844 ++ rtl8723au_recv_tasklet,
33845 + (unsigned long)padapter);
33846 +
33847 + precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
33848 +diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
33849 +index 371e6b3..ab5f50b 100644
33850 +--- a/drivers/staging/rtl8723au/hal/usb_ops_linux.c
33851 ++++ b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
33852 +@@ -487,7 +487,7 @@ _exit_recvbuf2recvframe:
33853 + return _SUCCESS;
33854 + }
33855 +
33856 +-void rtl8723au_recv_tasklet(void *priv)
33857 ++void rtl8723au_recv_tasklet(unsigned long priv)
33858 + {
33859 + struct sk_buff *pskb;
33860 + struct rtw_adapter *padapter = (struct rtw_adapter *)priv;
33861 +@@ -662,7 +662,7 @@ int rtl8723au_read_port(struct rtw_adapter *adapter, u32 cnt,
33862 + return ret;
33863 + }
33864 +
33865 +-void rtl8723au_xmit_tasklet(void *priv)
33866 ++void rtl8723au_xmit_tasklet(unsigned long priv)
33867 + {
33868 + int ret;
33869 + struct rtw_adapter *padapter = (struct rtw_adapter *)priv;
33870 +diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
33871 +index bcf3657..74d4742 100644
33872 +--- a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
33873 ++++ b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
33874 +@@ -135,7 +135,6 @@ void PHY_SetBWMode23a8723A(struct rtw_adapter *pAdapter,
33875 + /* */
33876 + void PHY_SwChnl8723A(struct rtw_adapter *pAdapter, u8 channel);
33877 + /* Call after initialization */
33878 +-void ChkFwCmdIoDone(struct rtw_adapter *Adapter);
33879 +
33880 + /* */
33881 + /* Modify the value of the hw register when beacon interval be changed. */
33882 +@@ -144,13 +143,6 @@ void
33883 + rtl8192c_PHY_SetBeaconHwReg(struct rtw_adapter *Adapter, u16 BeaconInterval);
33884 +
33885 +
33886 +-void PHY_SwitchEphyParameter(struct rtw_adapter *Adapter);
33887 +-
33888 +-void PHY_EnableHostClkReq(struct rtw_adapter *Adapter);
33889 +-
33890 +-bool
33891 +-SetAntennaConfig92C(struct rtw_adapter *Adapter, u8 DefaultAnt);
33892 +-
33893 + /*--------------------------Exported Function prototype---------------------*/
33894 +
33895 + #define PHY_SetMacReg PHY_SetBBReg
33896 diff --git a/drivers/staging/rtl8723au/include/drv_types.h b/drivers/staging/rtl8723au/include/drv_types.h
33897 index e83463a..84230f3 100644
33898 --- a/drivers/staging/rtl8723au/include/drv_types.h
33899 @@ -58228,8 +72957,76 @@ index e83463a..84230f3 100644
33900
33901 /*-------- below is for PCIE INTERFACE --------*/
33902
33903 +diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h
33904 +index b924d47..1e3e51c 100644
33905 +--- a/drivers/staging/rtl8723au/include/hal_intf.h
33906 ++++ b/drivers/staging/rtl8723au/include/hal_intf.h
33907 +@@ -97,10 +97,8 @@ int pm_netdev_open23a(struct net_device *pnetdev, u8 bnormal);
33908 +
33909 + int rtl8723au_hal_init(struct rtw_adapter *padapter);
33910 + int rtl8723au_hal_deinit(struct rtw_adapter *padapter);
33911 +-void rtw_hal_stop(struct rtw_adapter *padapter);
33912 +
33913 + void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level);
33914 +-void rtw_hal_clone_data(struct rtw_adapter *dst_padapter, struct rtw_adapter *src_padapter);
33915 +
33916 + void hw_var_set_correct_tsf(struct rtw_adapter *padapter);
33917 + void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter);
33918 +diff --git a/drivers/staging/rtl8723au/include/recv_osdep.h b/drivers/staging/rtl8723au/include/recv_osdep.h
33919 +index c2d3f1b..bb0dc02 100644
33920 +--- a/drivers/staging/rtl8723au/include/recv_osdep.h
33921 ++++ b/drivers/staging/rtl8723au/include/recv_osdep.h
33922 +@@ -26,7 +26,6 @@ int rtw_recv_indicatepkt23a(struct rtw_adapter *adapter, struct recv_frame *prec
33923 +
33924 + void rtw_handle_tkip_mic_err23a(struct rtw_adapter *padapter, u8 bgroup);
33925 +
33926 +-int rtw_init_recv_priv(struct recv_priv *precvpriv, struct rtw_adapter *padapter);
33927 + void rtw_free_recv_priv (struct recv_priv *precvpriv);
33928 +
33929 + int rtw_os_recv_resource_init(struct recv_priv *precvpriv, struct rtw_adapter *padapter);
33930 +diff --git a/drivers/staging/rtl8723au/include/rtw_ap.h b/drivers/staging/rtl8723au/include/rtw_ap.h
33931 +index 9f8d235..a642aac 100644
33932 +--- a/drivers/staging/rtl8723au/include/rtw_ap.h
33933 ++++ b/drivers/staging/rtl8723au/include/rtw_ap.h
33934 +@@ -26,8 +26,6 @@
33935 + void init_mlme_ap_info23a(struct rtw_adapter *padapter);
33936 + void free_mlme_ap_info23a(struct rtw_adapter *padapter);
33937 + /* void update_BCNTIM(struct rtw_adapter *padapter); */
33938 +-void rtw_add_bcn_ie(struct rtw_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len);
33939 +-void rtw_remove_bcn_ie(struct rtw_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index);
33940 + void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
33941 + void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_level);
33942 + void expire_timeout_chk23a(struct rtw_adapter *padapter);
33943 +diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h
33944 +index d1fa95d..338b933 100644
33945 +--- a/drivers/staging/rtl8723au/include/rtw_cmd.h
33946 ++++ b/drivers/staging/rtl8723au/include/rtw_cmd.h
33947 +@@ -712,7 +712,6 @@ int rtw_ps_cmd23a(struct rtw_adapter*padapter);
33948 + int rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter);
33949 + #endif
33950 +
33951 +-int rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue);
33952 + int rtw_led_blink_cmd(struct rtw_adapter*padapter, struct led_8723a *pLed);
33953 + int rtw_set_csa_cmd(struct rtw_adapter*padapter, u8 new_ch_no);
33954 +
33955 +diff --git a/drivers/staging/rtl8723au/include/rtw_eeprom.h b/drivers/staging/rtl8723au/include/rtw_eeprom.h
33956 +index a86f36e..8addfe7 100644
33957 +--- a/drivers/staging/rtl8723au/include/rtw_eeprom.h
33958 ++++ b/drivers/staging/rtl8723au/include/rtw_eeprom.h
33959 +@@ -125,11 +125,4 @@ struct eeprom_priv {
33960 + u8 efuse_eeprom_data[HWSET_MAX_SIZE_512]; /* 92C:256bytes, 88E:512bytes, we use union set (512bytes) */
33961 + };
33962 +
33963 +-void eeprom_write16(struct rtw_adapter *padapter, u16 reg, u16 data);
33964 +-u16 eeprom_read16(struct rtw_adapter *padapter, u16 reg);
33965 +-void read_eeprom_content(struct rtw_adapter *padapter);
33966 +-void eeprom_read_sz(struct rtw_adapter *padapter, u16 reg, u8 *data, u32 sz);
33967 +-
33968 +-void read_eeprom_content_by_attrib(struct rtw_adapter *padapter);
33969 +-
33970 + #endif /* __RTL871X_EEPROM_H__ */
33971 diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
33972 -index ea2a6c9..91d10ea 100644
33973 +index ea2a6c9..7348e18 100644
33974 --- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
33975 +++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
33976 @@ -406,7 +406,7 @@ struct p2p_oper_class_map {
33977 @@ -58241,10 +73038,55 @@ index ea2a6c9..91d10ea 100644
33978 u16 mgnt_seq;
33979
33980 /* struct fw_priv fwpriv; */
33981 +@@ -543,8 +543,6 @@ void report_add_sta_event23a(struct rtw_adapter *padapter,
33982 + unsigned char *MacAddr, int cam_idx);
33983 +
33984 + int set_tx_beacon_cmd23a(struct rtw_adapter*padapter);
33985 +-unsigned int setup_beacon_frame(struct rtw_adapter *padapter,
33986 +- unsigned char *beacon_frame);
33987 + void update_mgnt_tx_rate23a(struct rtw_adapter *padapter, u8 rate);
33988 + void update_mgntframe_attrib23a(struct rtw_adapter *padapter,
33989 + struct pkt_attrib *pattrib);
33990 +@@ -597,14 +595,6 @@ struct cmd_hdl {
33991 + };
33992 +
33993 +
33994 +-int read_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
33995 +-int write_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
33996 +-int read_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
33997 +-int write_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
33998 +-int read_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
33999 +-int write_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
34000 +-
34001 +-
34002 + int NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34003 + int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34004 + int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34005 +@@ -614,8 +604,6 @@ int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34006 + int setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34007 + int setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34008 + int set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34009 +-int set_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf);
34010 +-int del_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf);
34011 + int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34012 +
34013 + int mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
34014 diff --git a/drivers/staging/rtl8723au/include/usb_ops.h b/drivers/staging/rtl8723au/include/usb_ops.h
34015 -index ff11e13..69680d1 100644
34016 +index ff11e13..22a13ac 100644
34017 --- a/drivers/staging/rtl8723au/include/usb_ops.h
34018 +++ b/drivers/staging/rtl8723au/include/usb_ops.h
34019 +@@ -36,9 +36,9 @@ enum {
34020 +
34021 + void rtl8723au_set_hw_type(struct rtw_adapter *padapter);
34022 +
34023 +-void rtl8723au_recv_tasklet(void *priv);
34024 ++void rtl8723au_recv_tasklet(unsigned long priv);
34025 +
34026 +-void rtl8723au_xmit_tasklet(void *priv);
34027 ++void rtl8723au_xmit_tasklet(unsigned long priv);
34028 +
34029 + /* Increase and check if the continual_urb_error of this @param dvobjprive is
34030 + * larger than MAX_CONTINUAL_URB_ERR. Return result
34031 @@ -48,7 +48,7 @@ static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
34032 int ret = false;
34033 int value;
34034 @@ -58263,11 +73105,50 @@ index ff11e13..69680d1 100644
34035 }
34036
34037 bool rtl8723au_chip_configure(struct rtw_adapter *padapter);
34038 +diff --git a/drivers/staging/rtl8723au/include/xmit_osdep.h b/drivers/staging/rtl8723au/include/xmit_osdep.h
34039 +index 2be04c48..a494e09 100644
34040 +--- a/drivers/staging/rtl8723au/include/xmit_osdep.h
34041 ++++ b/drivers/staging/rtl8723au/include/xmit_osdep.h
34042 +@@ -21,7 +21,7 @@
34043 +
34044 + #define NR_XMITFRAME 256
34045 +
34046 +-int rtw_xmit23a_entry23a(struct sk_buff *pkt, struct net_device *pnetdev);
34047 ++netdev_tx_t rtw_xmit23a_entry23a(struct sk_buff *pkt, struct net_device *pnetdev);
34048 +
34049 + void rtw_os_xmit_schedule23a(struct rtw_adapter *padapter);
34050 +
34051 +diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
34052 +index 0ae2180..cb7945c 100644
34053 +--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
34054 ++++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
34055 +@@ -2435,7 +2435,7 @@ static int rtw_cfg80211_monitor_if_close(struct net_device *ndev)
34056 + return 0;
34057 + }
34058 +
34059 +-static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
34060 ++static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
34061 + struct net_device *ndev)
34062 + {
34063 + int ret = 0;
34064 +diff --git a/drivers/staging/rtl8723au/os_dep/xmit_linux.c b/drivers/staging/rtl8723au/os_dep/xmit_linux.c
34065 +index 9a14074..3d02410 100644
34066 +--- a/drivers/staging/rtl8723au/os_dep/xmit_linux.c
34067 ++++ b/drivers/staging/rtl8723au/os_dep/xmit_linux.c
34068 +@@ -117,7 +117,7 @@ static void rtw_check_xmit_resource(struct rtw_adapter *padapter,
34069 + }
34070 + }
34071 +
34072 +-int rtw_xmit23a_entry23a(struct sk_buff *skb, struct net_device *pnetdev)
34073 ++netdev_tx_t rtw_xmit23a_entry23a(struct sk_buff *skb, struct net_device *pnetdev)
34074 + {
34075 + struct rtw_adapter *padapter = netdev_priv(pnetdev);
34076 + struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
34077 diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
34078 -index 860e1c2..609ee2a 100644
34079 +index c78421b..f75c4c4 100644
34080 --- a/drivers/staging/sm750fb/sm750.c
34081 +++ b/drivers/staging/sm750fb/sm750.c
34082 -@@ -722,6 +722,7 @@ static struct fb_ops lynxfb_ops = {
34083 +@@ -720,6 +720,7 @@ static struct fb_ops lynxfb_ops = {
34084 .fb_set_par = lynxfb_ops_set_par,
34085 .fb_setcolreg = lynxfb_ops_setcolreg,
34086 .fb_blank = lynxfb_ops_blank,
34087 @@ -58275,7 +73156,7 @@ index 860e1c2..609ee2a 100644
34088 .fb_fillrect = cfb_fillrect,
34089 .fb_imageblit = cfb_imageblit,
34090 .fb_copyarea = cfb_copyarea,
34091 -@@ -767,7 +768,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
34092 +@@ -765,7 +766,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
34093 par->index = index;
34094 output->channel = &crtc->channel;
34095 sm750fb_set_drv(par);
34096 @@ -58283,7 +73164,7 @@ index 860e1c2..609ee2a 100644
34097
34098 /*
34099 * set current cursor variable and proc pointer,
34100 -@@ -784,16 +784,20 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
34101 +@@ -782,16 +782,20 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
34102
34103 memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
34104 if (!g_hwcursor) {
34105 @@ -58330,11 +73211,24 @@ index 39edd20..d860d0c 100644
34106
34107 /** Register functions (in the bus driver) to get called by visorchipset
34108 * whenever a bus or device appears for which this guest is to be the
34109 +diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
34110 +index 0519470..14d4074 100644
34111 +--- a/drivers/staging/unisys/visornic/visornic_main.c
34112 ++++ b/drivers/staging/unisys/visornic/visornic_main.c
34113 +@@ -809,7 +809,7 @@ static inline bool vnic_hit_low_watermark(struct visornic_devdata *devdata,
34114 + * can be called again.
34115 + * Returns NETDEV_TX_OK.
34116 + */
34117 +-static int
34118 ++static netdev_tx_t
34119 + visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
34120 + {
34121 + struct visornic_devdata *devdata;
34122 diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
34123 -index b854db5..4c721d5 100644
34124 +index 8faac27..ed87447 100644
34125 --- a/drivers/staging/wilc1000/host_interface.h
34126 +++ b/drivers/staging/wilc1000/host_interface.h
34127 -@@ -10,6 +10,7 @@
34128 +@@ -1,6 +1,7 @@
34129 #ifndef HOST_INT_H
34130 #define HOST_INT_H
34131
34132 @@ -58342,108 +73236,71 @@ index b854db5..4c721d5 100644
34133 #include "coreconfigurator.h"
34134
34135 #define IP_ALEN 4
34136 -diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c
34137 -index 300c571..a39d663 100644
34138 ---- a/drivers/staging/wilc1000/wilc_sdio.c
34139 -+++ b/drivers/staging/wilc1000/wilc_sdio.c
34140 -@@ -993,22 +993,22 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */)
34141 - ********************************************/
34142 -
34143 - wilc_hif_func_t hif_sdio = {
34144 -- sdio_init,
34145 -- sdio_deinit,
34146 -- sdio_read_reg,
34147 -- sdio_write_reg,
34148 -- sdio_read,
34149 -- sdio_write,
34150 -- sdio_sync,
34151 -- sdio_clear_int,
34152 -- sdio_read_int,
34153 -- sdio_clear_int_ext,
34154 -- sdio_read_size,
34155 -- sdio_write,
34156 -- sdio_read,
34157 -- sdio_sync_ext,
34158 -+ .hif_init = sdio_init,
34159 -+ .hif_deinit = sdio_deinit,
34160 -+ .hif_read_reg = sdio_read_reg,
34161 -+ .hif_write_reg = sdio_write_reg,
34162 -+ .hif_block_rx = sdio_read,
34163 -+ .hif_block_tx = sdio_write,
34164 -+ .hif_sync = sdio_sync,
34165 -+ .hif_clear_int = sdio_clear_int,
34166 -+ .hif_read_int = sdio_read_int,
34167 -+ .hif_clear_int_ext = sdio_clear_int_ext,
34168 -+ .hif_read_size = sdio_read_size,
34169 -+ .hif_block_tx_ext = sdio_write,
34170 -+ .hif_block_rx_ext = sdio_read,
34171 -+ .hif_sync_ext = sdio_sync_ext,
34172 -
34173 -- sdio_set_max_speed,
34174 -- sdio_set_default_speed,
34175 -+ .hif_set_max_bus_speed = sdio_set_max_speed,
34176 -+ .hif_set_default_bus_speed = sdio_set_default_speed,
34177 - };
34178 +diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
34179 +index 54fe9d7..47110ad 100644
34180 +--- a/drivers/staging/wilc1000/linux_wlan.c
34181 ++++ b/drivers/staging/wilc1000/linux_wlan.c
34182 +@@ -1135,7 +1135,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
34183 + kfree(pv_data);
34184 + }
34185
34186 +-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
34187 ++netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
34188 + {
34189 + struct wilc_vif *vif;
34190 + struct tx_complete_data *tx_data = NULL;
34191 diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
34192 -index 599508b..fc69923 100644
34193 +index 86de50c..812eb42 100644
34194 --- a/drivers/staging/wilc1000/wilc_spi.c
34195 +++ b/drivers/staging/wilc1000/wilc_spi.c
34196 -@@ -1257,20 +1257,20 @@ static int spi_sync_ext(int nint /* how mant interrupts to enable. */)
34197 - *
34198 - ********************************************/
34199 - wilc_hif_func_t hif_spi = {
34200 -- spi_init,
34201 -- spi_deinit,
34202 -- spi_read_reg,
34203 -- spi_write_reg,
34204 -- spi_read,
34205 -- spi_write,
34206 -- spi_sync,
34207 -- spi_clear_int,
34208 -- spi_read_int,
34209 -- spi_clear_int_ext,
34210 -- spi_read_size,
34211 -- spi_write,
34212 -- spi_read,
34213 -- spi_sync_ext,
34214 -- spi_max_bus_speed,
34215 -- spi_default_bus_speed,
34216 -+ .hif_init = spi_init,
34217 -+ .hif_deinit = spi_deinit,
34218 -+ .hif_read_reg = spi_read_reg,
34219 -+ .hif_write_reg = spi_write_reg,
34220 -+ .hif_block_rx = spi_read,
34221 -+ .hif_block_tx = spi_write,
34222 -+ .hif_sync = spi_sync,
34223 -+ .hif_clear_int = spi_clear_int,
34224 -+ .hif_read_int = spi_read_int,
34225 -+ .hif_clear_int_ext = spi_clear_int_ext,
34226 -+ .hif_read_size = spi_read_size,
34227 -+ .hif_block_tx_ext = spi_write,
34228 -+ .hif_block_rx_ext = spi_read,
34229 -+ .hif_sync_ext = spi_sync_ext,
34230 -+ .hif_set_max_bus_speed = spi_max_bus_speed,
34231 -+ .hif_set_default_bus_speed = spi_default_bus_speed,
34232 - };
34233 -diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
34234 -index 57e1d51..b922b75 100644
34235 ---- a/drivers/staging/wilc1000/wilc_wlan.h
34236 -+++ b/drivers/staging/wilc1000/wilc_wlan.h
34237 -@@ -1,7 +1,7 @@
34238 - #ifndef WILC_WLAN_H
34239 - #define WILC_WLAN_H
34240 +@@ -20,6 +20,7 @@
34241
34242 --
34243 + #include "linux_wlan_common.h"
34244 + #include <linux/string.h>
34245 +#include <linux/netdevice.h>
34246 + #include "wilc_wlan_if.h"
34247 + #include "wilc_wlan.h"
34248 + #include "wilc_wfi_netdevice.h"
34249 +@@ -120,8 +121,6 @@ static u8 crc7(u8 crc, const u8 *buffer, u32 len)
34250
34251 - #define ISWILC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
34252 + #define USE_SPI_DMA 0
34253
34254 +-static const struct wilc1000_ops wilc1000_spi_ops;
34255 +-
34256 + static int wilc_bus_probe(struct spi_device *spi)
34257 + {
34258 + int ret, gpio;
34259 +diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
34260 +index 2edd744..908a222 100644
34261 +--- a/drivers/staging/wilc1000/wilc_wlan.h
34262 ++++ b/drivers/staging/wilc1000/wilc_wlan.h
34263 +@@ -287,7 +287,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
34264 +
34265 + void wilc_enable_tcp_ack_filter(bool value);
34266 + int wilc_wlan_get_num_conn_ifcs(struct wilc *);
34267 +-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
34268 ++netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
34269 +
34270 + int wilc_mac_open(struct net_device *ndev);
34271 + int wilc_mac_close(struct net_device *ndev);
34272 +diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
34273 +index a9c1e0b..5e513c6 100644
34274 +--- a/drivers/staging/wlan-ng/p80211netdev.c
34275 ++++ b/drivers/staging/wlan-ng/p80211netdev.c
34276 +@@ -317,7 +317,7 @@ static void p80211netdev_rx_bh(unsigned long arg)
34277 + * Returns:
34278 + * zero on success, non-zero on failure.
34279 + ----------------------------------------------------------------*/
34280 +-static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
34281 ++static netdev_tx_t p80211knetdev_hard_start_xmit(struct sk_buff *skb,
34282 + netdevice_t *netdev)
34283 + {
34284 + int result = 0;
34285 diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
34286 -index 35f7d31..a9928a7 100644
34287 +index 3072f1a..1071742 100644
34288 --- a/drivers/target/sbp/sbp_target.c
34289 +++ b/drivers/target/sbp/sbp_target.c
34290 -@@ -58,7 +58,7 @@ static const u32 sbp_unit_directory_template[] = {
34291 +@@ -56,7 +56,7 @@ static const u32 sbp_unit_directory_template[] = {
34292
34293 #define SESSION_MAINTENANCE_INTERVAL HZ
34294
34295 @@ -58452,7 +73309,7 @@ index 35f7d31..a9928a7 100644
34296
34297 static void session_maintenance_work(struct work_struct *);
34298 static int sbp_run_transaction(struct fw_card *, int, int, int, int,
34299 -@@ -439,7 +439,7 @@ static void sbp_management_request_login(
34300 +@@ -437,7 +437,7 @@ static void sbp_management_request_login(
34301 login->login_lun = unpacked_lun;
34302 login->status_fifo_addr = sbp2_pointer_to_addr(&req->orb.status_fifo);
34303 login->exclusive = LOGIN_ORB_EXCLUSIVE(be32_to_cpu(req->orb.misc));
34304 @@ -58545,7 +73402,7 @@ index 5836e55..740ab89 100644
34305 priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
34306 priv, &int3400_thermal_ops,
34307 diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
34308 -index be4eedc..96aaf2f 100644
34309 +index 9043f8f..ab0f354 100644
34310 --- a/drivers/thermal/of-thermal.c
34311 +++ b/drivers/thermal/of-thermal.c
34312 @@ -31,6 +31,7 @@
34313 @@ -58571,7 +73428,7 @@ index be4eedc..96aaf2f 100644
34314 mutex_unlock(&tzd->lock);
34315
34316 return tzd;
34317 -@@ -549,9 +552,11 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
34318 +@@ -545,9 +548,11 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
34319 return;
34320
34321 mutex_lock(&tzd->lock);
34322 @@ -58600,7 +73457,7 @@ index 7fc919f..5521ec1 100644
34323 };
34324
34325 diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
34326 -index d4a1331..dc8fe71 100644
34327 +index abbed20..acf0737 100644
34328 --- a/drivers/tty/cyclades.c
34329 +++ b/drivers/tty/cyclades.c
34330 @@ -1570,10 +1570,10 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
34331 @@ -59017,10 +73874,10 @@ index 345cebb..d5a1e9e 100644
34332 ipwireless_disassociate_network_ttys(network,
34333 ttyj->channel_idx);
34334 diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
34335 -index 14c54e0..1efd4f2 100644
34336 +index 92982d7..758ecfe 100644
34337 --- a/drivers/tty/moxa.c
34338 +++ b/drivers/tty/moxa.c
34339 -@@ -1189,7 +1189,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
34340 +@@ -1188,7 +1188,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
34341 }
34342
34343 ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
34344 @@ -59030,7 +73887,7 @@ index 14c54e0..1efd4f2 100644
34345 tty_port_tty_set(&ch->port, tty);
34346 mutex_lock(&ch->port.mutex);
34347 diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
34348 -index c3fe026..9cfe421 100644
34349 +index c3fe026..66cd166 100644
34350 --- a/drivers/tty/n_gsm.c
34351 +++ b/drivers/tty/n_gsm.c
34352 @@ -1644,7 +1644,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
34353 @@ -59042,6 +73899,15 @@ index c3fe026..9cfe421 100644
34354 kfree(dlci);
34355 return NULL;
34356 }
34357 +@@ -2665,7 +2665,7 @@ static inline void muxnet_put(struct gsm_mux_net *mux_net)
34358 + kref_put(&mux_net->ref, net_free);
34359 + }
34360 +
34361 +-static int gsm_mux_net_start_xmit(struct sk_buff *skb,
34362 ++static netdev_tx_t gsm_mux_net_start_xmit(struct sk_buff *skb,
34363 + struct net_device *net)
34364 + {
34365 + struct gsm_mux_net *mux_net = netdev_priv(net);
34366 @@ -2957,7 +2957,7 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
34367 struct gsm_dlci *dlci = tty->driver_data;
34368 struct tty_port *port = &dlci->port;
34369 @@ -59052,10 +73918,10 @@ index c3fe026..9cfe421 100644
34370
34371 dlci->modem_rx = 0;
34372 diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
34373 -index cf000b3..a399250 100644
34374 +index b280abaa..3ccd7d1 100644
34375 --- a/drivers/tty/n_tty.c
34376 +++ b/drivers/tty/n_tty.c
34377 -@@ -1507,7 +1507,7 @@ n_tty_receive_char_lnext(struct tty_struct *tty, unsigned char c, char flag)
34378 +@@ -1515,7 +1515,7 @@ n_tty_receive_char_lnext(struct tty_struct *tty, unsigned char c, char flag)
34379
34380 static void
34381 n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
34382 @@ -59064,7 +73930,7 @@ index cf000b3..a399250 100644
34383 {
34384 struct n_tty_data *ldata = tty->disc_data;
34385 size_t n, head;
34386 -@@ -1527,7 +1527,7 @@ n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
34387 +@@ -1535,7 +1535,7 @@ n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
34388
34389 static void
34390 n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
34391 @@ -59073,7 +73939,7 @@ index cf000b3..a399250 100644
34392 {
34393 struct n_tty_data *ldata = tty->disc_data;
34394 char flag = TTY_NORMAL;
34395 -@@ -1544,7 +1544,7 @@ n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
34396 +@@ -1552,7 +1552,7 @@ n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
34397
34398 static void
34399 n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
34400 @@ -59082,7 +73948,7 @@ index cf000b3..a399250 100644
34401 {
34402 char flag = TTY_NORMAL;
34403
34404 -@@ -1560,7 +1560,7 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
34405 +@@ -1568,7 +1568,7 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
34406
34407 static void
34408 n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp,
34409 @@ -59091,7 +73957,7 @@ index cf000b3..a399250 100644
34410 {
34411 struct n_tty_data *ldata = tty->disc_data;
34412 char flag = TTY_NORMAL;
34413 -@@ -1594,7 +1594,7 @@ n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp,
34414 +@@ -1602,7 +1602,7 @@ n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp,
34415
34416 static void
34417 n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp,
34418 @@ -59100,7 +73966,7 @@ index cf000b3..a399250 100644
34419 {
34420 struct n_tty_data *ldata = tty->disc_data;
34421 char flag = TTY_NORMAL;
34422 -@@ -1619,7 +1619,7 @@ n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp,
34423 +@@ -1627,7 +1627,7 @@ n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp,
34424 }
34425
34426 static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
34427 @@ -59109,7 +73975,7 @@ index cf000b3..a399250 100644
34428 {
34429 struct n_tty_data *ldata = tty->disc_data;
34430 bool preops = I_ISTRIP(tty) || (I_IUCLC(tty) && L_IEXTEN(tty));
34431 -@@ -1697,10 +1697,10 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
34432 +@@ -1705,10 +1705,10 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
34433 */
34434 static int
34435 n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
34436 @@ -59122,7 +73988,7 @@ index cf000b3..a399250 100644
34437
34438 down_read(&tty->termios_rwsem);
34439
34440 -@@ -1723,15 +1723,16 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
34441 +@@ -1731,15 +1731,16 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
34442 room = N_TTY_BUF_SIZE - (ldata->read_head - tail);
34443 if (I_PARMRK(tty))
34444 room = (room + 2) / 3;
34445 @@ -59143,7 +74009,7 @@ index cf000b3..a399250 100644
34446
34447 n = min(count, room);
34448 if (!n)
34449 -@@ -2550,6 +2551,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
34450 +@@ -2549,6 +2550,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
34451 {
34452 *ops = tty_ldisc_N_TTY;
34453 ops->owner = NULL;
34454 @@ -59153,7 +74019,7 @@ index cf000b3..a399250 100644
34455 }
34456 EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
34457 diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
34458 -index 78e9836..021d40e 100644
34459 +index 2348fa6..14894f4 100644
34460 --- a/drivers/tty/pty.c
34461 +++ b/drivers/tty/pty.c
34462 @@ -879,8 +879,10 @@ static void __init unix98_pty_init(void)
34463 @@ -59200,7 +74066,7 @@ index 802eac7..f5dcf07 100644
34464 clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
34465 spin_unlock_irqrestore(&info->port.lock, flags);
34466 diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
34467 -index 3912646..9a324e9 100644
34468 +index c9720a9..f6c9276 100644
34469 --- a/drivers/tty/serial/8250/8250_core.c
34470 +++ b/drivers/tty/serial/8250/8250_core.c
34471 @@ -488,9 +488,9 @@ static void univ8250_release_port(struct uart_port *port)
34472 @@ -59228,6 +74094,19 @@ index 3912646..9a324e9 100644
34473
34474 if (share_irqs)
34475 irqflag = IRQF_SHARED;
34476 +diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
34477 +index 7cd6f9a..d13ac0a 100644
34478 +--- a/drivers/tty/serial/8250/8250_pci.c
34479 ++++ b/drivers/tty/serial/8250/8250_pci.c
34480 +@@ -5656,7 +5656,7 @@ static struct pci_device_id serial_pci_tbl[] = {
34481 + };
34482 +
34483 + static pci_ers_result_t serial8250_io_error_detected(struct pci_dev *dev,
34484 +- pci_channel_state_t state)
34485 ++ enum pci_channel_state state)
34486 + {
34487 + struct serial_private *priv = pci_get_drvdata(dev);
34488 +
34489 diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
34490 index 88246f7..9036604 100644
34491 --- a/drivers/tty/serial/ifx6x60.c
34492 @@ -59272,6 +74151,19 @@ index e5c42fe..f091b02 100644
34493 &soft->is_intr_type[intr_type].is_num_intrs);
34494
34495 this_mir = this_ir = pending_intrs(soft, intr_type);
34496 +diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c
34497 +index a119f11..120444e 100644
34498 +--- a/drivers/tty/serial/jsm/jsm_driver.c
34499 ++++ b/drivers/tty/serial/jsm/jsm_driver.c
34500 +@@ -336,7 +336,7 @@ static struct pci_driver jsm_driver = {
34501 + };
34502 +
34503 + static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev,
34504 +- pci_channel_state_t state)
34505 ++ enum pci_channel_state state)
34506 + {
34507 + struct jsm_board *brd = pci_get_drvdata(pdev);
34508 +
34509 diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
34510 index 117df15..2f7dfcf 100644
34511 --- a/drivers/tty/serial/kgdb_nmi.c
34512 @@ -59288,7 +74180,7 @@ index 117df15..2f7dfcf 100644
34513 return 0;
34514 }
34515 diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
34516 -index a260cde..6b2b5ce 100644
34517 +index a260cde..604fce9 100644
34518 --- a/drivers/tty/serial/kgdboc.c
34519 +++ b/drivers/tty/serial/kgdboc.c
34520 @@ -24,8 +24,9 @@
34521 @@ -59368,6 +74260,15 @@ index a260cde..6b2b5ce 100644
34522 return 0;
34523
34524 return configure_kgdboc();
34525 +@@ -245,7 +252,7 @@ static void kgdboc_put_char(u8 chr)
34526 + kgdb_tty_line, chr);
34527 + }
34528 +
34529 +-static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
34530 ++static int param_set_kgdboc_var(const char *kmessage, const struct kernel_param *kp)
34531 + {
34532 + int len = strlen(kmessage);
34533 +
34534 @@ -272,7 +279,7 @@ static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
34535 if (config[len - 1] == '\n')
34536 config[len - 1] = '\0';
34537 @@ -59448,7 +74349,7 @@ index d72cd73..aac0435 100644
34538
34539 if (cfg->uart_flags & UPF_CONS_FLOW) {
34540 diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
34541 -index def5199..34857ea 100644
34542 +index b1f54ab..de9edc3 100644
34543 --- a/drivers/tty/serial/serial_core.c
34544 +++ b/drivers/tty/serial/serial_core.c
34545 @@ -1384,7 +1384,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
34546 @@ -59638,7 +74539,7 @@ index 6188059..24bff50 100644
34547
34548 if (cmd != SIOCWANDEV)
34549 diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
34550 -index 6fc39fb..bb25ac4 100644
34551 +index 5505ea8..d92b90e 100644
34552 --- a/drivers/tty/synclink_gt.c
34553 +++ b/drivers/tty/synclink_gt.c
34554 @@ -670,7 +670,7 @@ static int open(struct tty_struct *tty, struct file *filp)
34555 @@ -59893,10 +74794,10 @@ index fb00a06..bb80abd 100644
34556 if (!retval)
34557 port->flags |= ASYNC_NORMAL_ACTIVE;
34558 diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
34559 -index 5381a72..ad8c38f 100644
34560 +index e513940..fb19436 100644
34561 --- a/drivers/tty/sysrq.c
34562 +++ b/drivers/tty/sysrq.c
34563 -@@ -1083,7 +1083,7 @@ EXPORT_SYMBOL(unregister_sysrq_key);
34564 +@@ -1089,7 +1089,7 @@ EXPORT_SYMBOL(unregister_sysrq_key);
34565 static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
34566 size_t count, loff_t *ppos)
34567 {
34568 @@ -59906,7 +74807,7 @@ index 5381a72..ad8c38f 100644
34569
34570 if (get_user(c, buf))
34571 diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
34572 -index 7cef543..d58dc7d 100644
34573 +index a7eacef..7aea89e 100644
34574 --- a/drivers/tty/tty_io.c
34575 +++ b/drivers/tty/tty_io.c
34576 @@ -105,6 +105,8 @@
34577 @@ -59918,7 +74819,7 @@ index 7cef543..d58dc7d 100644
34578 #undef TTY_DEBUG_HANGUP
34579 #ifdef TTY_DEBUG_HANGUP
34580 # define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args)
34581 -@@ -2281,6 +2283,8 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
34582 +@@ -2276,6 +2278,8 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
34583 char ch, mbz = 0;
34584 struct tty_ldisc *ld;
34585
34586 @@ -59927,7 +74828,7 @@ index 7cef543..d58dc7d 100644
34587 if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))
34588 return -EPERM;
34589 if (get_user(ch, p))
34590 -@@ -3564,7 +3568,7 @@ EXPORT_SYMBOL(tty_devnum);
34591 +@@ -3555,7 +3559,7 @@ EXPORT_SYMBOL(tty_devnum);
34592
34593 void tty_default_fops(struct file_operations *fops)
34594 {
34595 @@ -59937,7 +74838,7 @@ index 7cef543..d58dc7d 100644
34596
34597 /*
34598 diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
34599 -index 629e3c8..ff89802 100644
34600 +index a054d03..c007e888 100644
34601 --- a/drivers/tty/tty_ldisc.c
34602 +++ b/drivers/tty/tty_ldisc.c
34603 @@ -68,7 +68,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
34604 @@ -59977,7 +74878,7 @@ index 629e3c8..ff89802 100644
34605 raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
34606 }
34607 diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
34608 -index 482f33f..a90921e 100644
34609 +index 846ed48..ffb3cbc 100644
34610 --- a/drivers/tty/tty_port.c
34611 +++ b/drivers/tty/tty_port.c
34612 @@ -235,7 +235,7 @@ void tty_port_hangup(struct tty_port *port)
34613 @@ -60007,25 +74908,24 @@ index 482f33f..a90921e 100644
34614 port->blocked_open--;
34615 if (retval == 0)
34616 port->flags |= ASYNC_NORMAL_ACTIVE;
34617 -@@ -461,19 +461,19 @@ int tty_port_close_start(struct tty_port *port,
34618 +@@ -461,18 +461,18 @@ int tty_port_close_start(struct tty_port *port,
34619 return 0;
34620
34621 spin_lock_irqsave(&port->lock, flags);
34622 - if (tty->count == 1 && port->count != 1) {
34623 + if (tty->count == 1 && atomic_read(&port->count) != 1) {
34624 - printk(KERN_WARNING
34625 - "tty_port_close_start: tty->count = 1 port count = %d.\n",
34626 -- port->count);
34627 + tty_warn(tty, "%s: tty->count = 1 port count = %d\n", __func__,
34628 +- port->count);
34629 - port->count = 1;
34630 -+ atomic_read(&port->count));
34631 ++ atomic_read(&port->count));
34632 + atomic_set(&port->count, 1);
34633 }
34634 - if (--port->count < 0) {
34635 + if (atomic_dec_return(&port->count) < 0) {
34636 - printk(KERN_WARNING "tty_port_close_start: count = %d\n",
34637 -- port->count);
34638 + tty_warn(tty, "%s: bad port count (%d)\n", __func__,
34639 +- port->count);
34640 - port->count = 0;
34641 -+ atomic_read(&port->count));
34642 ++ atomic_read(&port->count));
34643 + atomic_set(&port->count, 0);
34644 }
34645
34646 @@ -60034,7 +74934,7 @@ index 482f33f..a90921e 100644
34647 spin_unlock_irqrestore(&port->lock, flags);
34648 return 0;
34649 }
34650 -@@ -570,7 +570,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty,
34651 +@@ -569,7 +569,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty,
34652 struct file *filp)
34653 {
34654 spin_lock_irq(&port->lock);
34655 @@ -60295,7 +75195,7 @@ index ccfaba9..523f476 100644
34656 int write_used; /* number of non-empty write buffers */
34657 int transmitting;
34658 diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
34659 -index 2a3bbdf..91d72cf 100644
34660 +index cffa0a0..1758349 100644
34661 --- a/drivers/usb/core/devices.c
34662 +++ b/drivers/usb/core/devices.c
34663 @@ -126,7 +126,7 @@ static const char format_endpt[] =
34664 @@ -60326,10 +75226,10 @@ index 2a3bbdf..91d72cf 100644
34665 file->f_version = event_count;
34666 return POLLIN | POLLRDNORM;
34667 diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
34668 -index 38ae877c..9bf9e7d 100644
34669 +index 59e7a33..86f0d9a 100644
34670 --- a/drivers/usb/core/devio.c
34671 +++ b/drivers/usb/core/devio.c
34672 -@@ -187,7 +187,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
34673 +@@ -168,7 +168,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
34674 struct usb_dev_state *ps = file->private_data;
34675 struct usb_device *dev = ps->dev;
34676 ssize_t ret = 0;
34677 @@ -60338,7 +75238,7 @@ index 38ae877c..9bf9e7d 100644
34678 loff_t pos;
34679 int i;
34680
34681 -@@ -229,22 +229,22 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
34682 +@@ -210,22 +210,22 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
34683 for (i = 0; nbytes && i < dev->descriptor.bNumConfigurations; i++) {
34684 struct usb_config_descriptor *config =
34685 (struct usb_config_descriptor *)dev->rawdescriptors[i];
34686 @@ -60365,7 +75265,7 @@ index 38ae877c..9bf9e7d 100644
34687 if (copy_to_user(buf,
34688 dev->rawdescriptors[i] + (*ppos - pos),
34689 min(len, alloclen))) {
34690 -@@ -1502,7 +1502,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
34691 +@@ -1485,7 +1485,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
34692 }
34693 }
34694 as->urb->dev = ps->dev;
34695 @@ -60375,7 +75275,7 @@ index 38ae877c..9bf9e7d 100644
34696 (uurb->endpoint & USB_DIR_IN);
34697
34698 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
34699 -index 1c102d6..d15688e 100644
34700 +index df0e3b9..5d9abce 100644
34701 --- a/drivers/usb/core/hcd.c
34702 +++ b/drivers/usb/core/hcd.c
34703 @@ -1605,7 +1605,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
34704 @@ -60397,7 +75297,7 @@ index 1c102d6..d15688e 100644
34705 wake_up(&usb_kill_urb_queue);
34706 usb_put_urb(urb);
34707 diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
34708 -index 84df093..f2238d4 100644
34709 +index 84f6574..036bf7c 100644
34710 --- a/drivers/usb/core/hub.c
34711 +++ b/drivers/usb/core/hub.c
34712 @@ -26,6 +26,7 @@
34713 @@ -60408,7 +75308,7 @@ index 84df093..f2238d4 100644
34714
34715 #include <asm/uaccess.h>
34716 #include <asm/byteorder.h>
34717 -@@ -4717,6 +4718,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
34718 +@@ -4732,6 +4733,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
34719 goto done;
34720 return;
34721 }
34722 @@ -60433,10 +75333,10 @@ index 65b6e6b..c0afa90 100644
34723 static DEVICE_ATTR_RO(urbnum);
34724
34725 diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
34726 -index f8bbd0b..85b2e6a 100644
34727 +index ebb29ca..8ef33ed 100644
34728 --- a/drivers/usb/core/usb.c
34729 +++ b/drivers/usb/core/usb.c
34730 -@@ -447,7 +447,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
34731 +@@ -448,7 +448,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
34732 set_dev_node(&dev->dev, dev_to_node(bus->controller));
34733 dev->state = USB_STATE_ATTACHED;
34734 dev->lpm_disable_count = 1;
34735 @@ -60486,6 +75386,19 @@ index 8cfc319..4868255 100644
34736
34737 return 0;
34738 }
34739 +diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c
34740 +index 157441d..c0825d6 100644
34741 +--- a/drivers/usb/gadget/function/f_phonet.c
34742 ++++ b/drivers/usb/gadget/function/f_phonet.c
34743 +@@ -223,7 +223,7 @@ static void pn_tx_complete(struct usb_ep *ep, struct usb_request *req)
34744 + netif_wake_queue(dev);
34745 + }
34746 +
34747 +-static int pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
34748 ++static netdev_tx_t pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
34749 + {
34750 + struct phonet_port *port = netdev_priv(dev);
34751 + struct f_phonet *fp;
34752 diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
34753 index 6a2346b..22dd790 100644
34754 --- a/drivers/usb/gadget/function/f_uac1.c
34755 @@ -60499,10 +75412,10 @@ index 6a2346b..22dd790 100644
34756 #include "u_uac1.h"
34757
34758 diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
34759 -index f7771d8..5942693 100644
34760 +index 6af145f..17d4bf2 100644
34761 --- a/drivers/usb/gadget/function/u_serial.c
34762 +++ b/drivers/usb/gadget/function/u_serial.c
34763 -@@ -733,9 +733,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
34764 +@@ -747,9 +747,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
34765 spin_lock_irq(&port->port_lock);
34766
34767 /* already open? Great. */
34768 @@ -60514,7 +75427,7 @@ index f7771d8..5942693 100644
34769
34770 /* currently opening/closing? wait ... */
34771 } else if (port->openclose) {
34772 -@@ -794,7 +794,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
34773 +@@ -808,7 +808,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
34774 tty->driver_data = port;
34775 port->port.tty = tty;
34776
34777 @@ -60523,7 +75436,7 @@ index f7771d8..5942693 100644
34778 port->openclose = false;
34779
34780 /* if connected, start the I/O stream */
34781 -@@ -836,11 +836,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
34782 +@@ -850,11 +850,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
34783
34784 spin_lock_irq(&port->port_lock);
34785
34786 @@ -60538,7 +75451,7 @@ index f7771d8..5942693 100644
34787 goto exit;
34788 }
34789
34790 -@@ -850,7 +850,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
34791 +@@ -864,7 +864,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
34792 * and sleep if necessary
34793 */
34794 port->openclose = true;
34795 @@ -60547,7 +75460,7 @@ index f7771d8..5942693 100644
34796
34797 gser = port->port_usb;
34798 if (gser && gser->disconnect)
34799 -@@ -1066,7 +1066,7 @@ static int gs_closed(struct gs_port *port)
34800 +@@ -1320,7 +1320,7 @@ static int gs_closed(struct gs_port *port)
34801 int cond;
34802
34803 spin_lock_irq(&port->port_lock);
34804 @@ -60556,7 +75469,7 @@ index f7771d8..5942693 100644
34805 spin_unlock_irq(&port->port_lock);
34806 return cond;
34807 }
34808 -@@ -1209,7 +1209,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
34809 +@@ -1465,7 +1465,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
34810 /* if it's already open, start I/O ... and notify the serial
34811 * protocol about open/close status (connect/disconnect).
34812 */
34813 @@ -60565,7 +75478,7 @@ index f7771d8..5942693 100644
34814 pr_debug("gserial_connect: start ttyGS%d\n", port->port_num);
34815 gs_start_io(port);
34816 if (gser->connect)
34817 -@@ -1255,7 +1255,7 @@ void gserial_disconnect(struct gserial *gser)
34818 +@@ -1512,7 +1512,7 @@ void gserial_disconnect(struct gserial *gser)
34819
34820 port->port_usb = NULL;
34821 gser->ioport = NULL;
34822 @@ -60574,7 +75487,7 @@ index f7771d8..5942693 100644
34823 wake_up_interruptible(&port->drain_wait);
34824 if (port->port.tty)
34825 tty_hangup(port->port.tty);
34826 -@@ -1268,7 +1268,7 @@ void gserial_disconnect(struct gserial *gser)
34827 +@@ -1525,7 +1525,7 @@ void gserial_disconnect(struct gserial *gser)
34828
34829 /* finally, free any unused/unusable I/O buffers */
34830 spin_lock_irqsave(&port->port_lock, flags);
34831 @@ -60595,6 +75508,28 @@ index c78c841..48fd281 100644
34832
34833 #include "u_uac1.h"
34834
34835 +diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
34836 +index 87fb0fd..d2be0ad 100644
34837 +--- a/drivers/usb/gadget/legacy/inode.c
34838 ++++ b/drivers/usb/gadget/legacy/inode.c
34839 +@@ -1702,6 +1702,8 @@ static struct usb_gadget_driver gadgetfs_driver = {
34840 +
34841 + static void gadgetfs_nop(struct usb_gadget *arg) { }
34842 +
34843 ++static int gadgetfs_nop2(struct usb_gadget *arg, const struct usb_ctrlrequest *req) { }
34844 ++
34845 + static int gadgetfs_probe(struct usb_gadget *gadget,
34846 + struct usb_gadget_driver *driver)
34847 + {
34848 +@@ -1713,7 +1715,7 @@ static struct usb_gadget_driver probe_driver = {
34849 + .max_speed = USB_SPEED_HIGH,
34850 + .bind = gadgetfs_probe,
34851 + .unbind = gadgetfs_nop,
34852 +- .setup = (void *)gadgetfs_nop,
34853 ++ .setup = gadgetfs_nop2,
34854 + .disconnect = gadgetfs_nop,
34855 + .driver = {
34856 + .name = "nop",
34857 diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
34858 index dde4445..f51cd5a 100644
34859 --- a/drivers/usb/gadget/udc/dummy_hcd.c
34860 @@ -60609,7 +75544,7 @@ index dde4445..f51cd5a 100644
34861 dum->hs_hcd = hcd_to_dummy_hcd(hcd);
34862 dum->hs_hcd->dum = dum;
34863 diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
34864 -index 48c92bf..3f30f77 100644
34865 +index 14178bb..34d20c3 100644
34866 --- a/drivers/usb/host/ehci-hcd.c
34867 +++ b/drivers/usb/host/ehci-hcd.c
34868 @@ -564,7 +564,7 @@ static int ehci_init(struct usb_hcd *hcd)
34869 @@ -60644,7 +75579,7 @@ index 086a711..1caf013 100644
34870 if (!retval && !wait_for_completion_timeout(&done,
34871 msecs_to_jiffies(2000))) {
34872 diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
34873 -index 54f5332..8b8335c 100644
34874 +index aad0777..19cc70f 100644
34875 --- a/drivers/usb/host/ehci-q.c
34876 +++ b/drivers/usb/host/ehci-q.c
34877 @@ -44,9 +44,9 @@
34878 @@ -60712,7 +75647,7 @@ index 1db0626..2e9f5ea 100644
34879 hwahc = container_of(wusbhc, struct hwahc, wusbhc);
34880 hwahc_init(hwahc);
34881 diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
34882 -index 760cb57..fc7f8ad 100644
34883 +index 04dcedf..de1615b 100644
34884 --- a/drivers/usb/host/ohci-hcd.c
34885 +++ b/drivers/usb/host/ohci-hcd.c
34886 @@ -444,7 +444,7 @@ static int ohci_init (struct ohci_hcd *ohci)
34887 @@ -60751,7 +75686,7 @@ index a7de8e8..e1ef134 100644
34888 spin_lock_init(&uhci->lock);
34889 setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout,
34890 diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
34891 -index c2d6520..04853a9 100644
34892 +index f0640b7..f87a6f9 100644
34893 --- a/drivers/usb/host/xhci-pci.c
34894 +++ b/drivers/usb/host/xhci-pci.c
34895 @@ -32,7 +32,7 @@
34896 @@ -60764,10 +75699,10 @@ index c2d6520..04853a9 100644
34897 /* Device for a quirk */
34898 #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
34899 diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
34900 -index 776d59c..ae87b88 100644
34901 +index 0c8087d..0f5a685 100644
34902 --- a/drivers/usb/host/xhci.c
34903 +++ b/drivers/usb/host/xhci.c
34904 -@@ -4853,7 +4853,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
34905 +@@ -4870,7 +4870,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
34906 int retval;
34907
34908 /* Accept arbitrarily long scatter-gather lists */
34909 @@ -60798,6 +75733,123 @@ index a0a3827..d7ec10b 100644
34910 memset(&props, 0, sizeof(struct backlight_properties));
34911 props.type = BACKLIGHT_RAW;
34912 props.max_brightness = 0xff;
34913 +diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c
34914 +index ace3430..7536bac 100644
34915 +--- a/drivers/usb/misc/sisusbvga/sisusb_con.c
34916 ++++ b/drivers/usb/misc/sisusbvga/sisusb_con.c
34917 +@@ -1416,32 +1416,94 @@ static void sisusbdummycon_init(struct vc_data *vc, int init)
34918 + vc_resize(vc, 80, 25);
34919 + }
34920 +
34921 +-static int sisusbdummycon_dummy(void)
34922 ++static void sisusb_con_deinit(struct vc_data *a)
34923 + {
34924 +- return 0;
34925 + }
34926 +
34927 +-#define SISUSBCONDUMMY (void *)sisusbdummycon_dummy
34928 ++static void sisusb_con_clear(struct vc_data *a, int b, int c, int d, int e)
34929 ++{
34930 ++}
34931 ++
34932 ++static void sisusb_con_putc(struct vc_data *a, int b, int c, int d)
34933 ++{
34934 ++}
34935 ++
34936 ++static void sisusb_con_putcs(struct vc_data *a, const unsigned short *b, int c, int d, int e)
34937 ++{
34938 ++}
34939 ++
34940 ++static void sisusb_con_cursor(struct vc_data *a, int b)
34941 ++{
34942 ++}
34943 ++
34944 ++static int sisusb_con_scroll(struct vc_data *a, int b, int c, int d, int e)
34945 ++{
34946 ++ return 0;
34947 ++}
34948 ++
34949 ++static void sisusb_con_bmove(struct vc_data *a, int b, int c, int d, int e, int f, int g)
34950 ++{
34951 ++}
34952 ++
34953 ++static int sisusb_con_switch(struct vc_data *a)
34954 ++{
34955 ++ return 0;
34956 ++}
34957 ++
34958 ++static int sisusb_con_blank(struct vc_data *a, int b, int c)
34959 ++{
34960 ++ return 0;
34961 ++}
34962 ++
34963 ++static int sisusb_con_font_set(struct vc_data *a, struct console_font *b, unsigned c)
34964 ++{
34965 ++ return 0;
34966 ++}
34967 ++
34968 ++static int sisusb_con_font_get(struct vc_data *a, struct console_font *b)
34969 ++{
34970 ++ return 0;
34971 ++}
34972 ++
34973 ++static int sisusb_con_font_default(struct vc_data *a, struct console_font *b, char *c)
34974 ++{
34975 ++ return 0;
34976 ++}
34977 ++
34978 ++static int sisusb_con_font_copy(struct vc_data *a, int b)
34979 ++{
34980 ++ return 0;
34981 ++}
34982 ++
34983 ++static int sisusb_con_set_palette(struct vc_data *a, unsigned char *b)
34984 ++{
34985 ++ return 0;
34986 ++}
34987 ++
34988 ++static int sisusb_con_scrolldelta(struct vc_data *a, int b)
34989 ++{
34990 ++ return 0;
34991 ++}
34992 +
34993 + static const struct consw sisusb_dummy_con = {
34994 + .owner = THIS_MODULE,
34995 + .con_startup = sisusbdummycon_startup,
34996 + .con_init = sisusbdummycon_init,
34997 +- .con_deinit = SISUSBCONDUMMY,
34998 +- .con_clear = SISUSBCONDUMMY,
34999 +- .con_putc = SISUSBCONDUMMY,
35000 +- .con_putcs = SISUSBCONDUMMY,
35001 +- .con_cursor = SISUSBCONDUMMY,
35002 +- .con_scroll = SISUSBCONDUMMY,
35003 +- .con_bmove = SISUSBCONDUMMY,
35004 +- .con_switch = SISUSBCONDUMMY,
35005 +- .con_blank = SISUSBCONDUMMY,
35006 +- .con_font_set = SISUSBCONDUMMY,
35007 +- .con_font_get = SISUSBCONDUMMY,
35008 +- .con_font_default = SISUSBCONDUMMY,
35009 +- .con_font_copy = SISUSBCONDUMMY,
35010 +- .con_set_palette = SISUSBCONDUMMY,
35011 +- .con_scrolldelta = SISUSBCONDUMMY,
35012 ++ .con_deinit = sisusb_con_deinit,
35013 ++ .con_clear = sisusb_con_clear,
35014 ++ .con_putc = sisusb_con_putc,
35015 ++ .con_putcs = sisusb_con_putcs,
35016 ++ .con_cursor = sisusb_con_cursor,
35017 ++ .con_scroll = sisusb_con_scroll,
35018 ++ .con_bmove = sisusb_con_bmove,
35019 ++ .con_switch = sisusb_con_switch,
35020 ++ .con_blank = sisusb_con_blank,
35021 ++ .con_font_set = sisusb_con_font_set,
35022 ++ .con_font_get = sisusb_con_font_get,
35023 ++ .con_font_default = sisusb_con_font_default,
35024 ++ .con_font_copy = sisusb_con_font_copy,
35025 ++ .con_set_palette = sisusb_con_set_palette,
35026 ++ .con_scrolldelta = sisusb_con_scrolldelta,
35027 + };
35028 +
35029 + int
35030 diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
35031 index 3806e70..55c508b 100644
35032 --- a/drivers/usb/serial/console.c
35033 @@ -61004,6 +76056,19 @@ index 69af4fd..da390d7 100644
35034 }
35035
35036 /* Return the xfer's ID. */
35037 +diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
35038 +index 8c80a48..8a205a9 100644
35039 +--- a/drivers/vfio/pci/vfio_pci.c
35040 ++++ b/drivers/vfio/pci/vfio_pci.c
35041 +@@ -1011,7 +1011,7 @@ static void vfio_pci_remove(struct pci_dev *pdev)
35042 + }
35043 +
35044 + static pci_ers_result_t vfio_pci_aer_err_detected(struct pci_dev *pdev,
35045 +- pci_channel_state_t state)
35046 ++ enum pci_channel_state state)
35047 + {
35048 + struct vfio_pci_device *vdev;
35049 + struct vfio_device *device;
35050 diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
35051 index 3bb02c6..a01ff38 100644
35052 --- a/drivers/vhost/vringh.c
35053 @@ -61090,6 +76155,123 @@ index 84a110a..96312c3 100644
35054 {
35055 .ident = "Sahara Touch-iT",
35056 .matches = {
35057 +diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
35058 +index 0efc52f..4e72706 100644
35059 +--- a/drivers/video/console/dummycon.c
35060 ++++ b/drivers/video/console/dummycon.c
35061 +@@ -41,12 +41,74 @@ static void dummycon_init(struct vc_data *vc, int init)
35062 + vc_resize(vc, DUMMY_COLUMNS, DUMMY_ROWS);
35063 + }
35064 +
35065 +-static int dummycon_dummy(void)
35066 ++static void dummycon_deinit(struct vc_data *a)
35067 ++{
35068 ++}
35069 ++
35070 ++static void dummycon_clear(struct vc_data *a, int b, int c, int d, int e)
35071 ++{
35072 ++}
35073 ++
35074 ++static void dummycon_putc(struct vc_data *a, int b, int c, int d)
35075 ++{
35076 ++}
35077 ++
35078 ++static void dummycon_putcs(struct vc_data *a, const unsigned short *b, int c, int d, int e)
35079 ++{
35080 ++}
35081 ++
35082 ++static void dummycon_cursor(struct vc_data *a, int b)
35083 ++{
35084 ++}
35085 ++
35086 ++static int dummycon_scroll(struct vc_data *a, int b, int c, int d, int e)
35087 ++{
35088 ++ return 0;
35089 ++}
35090 ++
35091 ++static void dummycon_bmove(struct vc_data *a, int b, int c, int d, int e, int f, int g)
35092 ++{
35093 ++}
35094 ++
35095 ++static int dummycon_switch(struct vc_data *a)
35096 + {
35097 + return 0;
35098 + }
35099 +
35100 +-#define DUMMY (void *)dummycon_dummy
35101 ++static int dummycon_blank(struct vc_data *a, int b, int c)
35102 ++{
35103 ++ return 0;
35104 ++}
35105 ++
35106 ++static int dummycon_font_set(struct vc_data *a, struct console_font *b, unsigned c)
35107 ++{
35108 ++ return 0;
35109 ++}
35110 ++
35111 ++static int dummycon_font_get(struct vc_data *a, struct console_font *b)
35112 ++{
35113 ++ return 0;
35114 ++}
35115 ++
35116 ++static int dummycon_font_default(struct vc_data *a, struct console_font *b , char *c)
35117 ++{
35118 ++ return 0;
35119 ++}
35120 ++
35121 ++static int dummycon_font_copy(struct vc_data *a, int b)
35122 ++{
35123 ++ return 0;
35124 ++}
35125 ++
35126 ++static int dummycon_set_palette(struct vc_data *a, unsigned char *b)
35127 ++{
35128 ++ return 0;
35129 ++}
35130 ++
35131 ++static int dummycon_scrolldelta(struct vc_data *a, int b)
35132 ++{
35133 ++ return 0;
35134 ++}
35135 +
35136 + /*
35137 + * The console `switch' structure for the dummy console
35138 +@@ -58,20 +120,20 @@ const struct consw dummy_con = {
35139 + .owner = THIS_MODULE,
35140 + .con_startup = dummycon_startup,
35141 + .con_init = dummycon_init,
35142 +- .con_deinit = DUMMY,
35143 +- .con_clear = DUMMY,
35144 +- .con_putc = DUMMY,
35145 +- .con_putcs = DUMMY,
35146 +- .con_cursor = DUMMY,
35147 +- .con_scroll = DUMMY,
35148 +- .con_bmove = DUMMY,
35149 +- .con_switch = DUMMY,
35150 +- .con_blank = DUMMY,
35151 +- .con_font_set = DUMMY,
35152 +- .con_font_get = DUMMY,
35153 +- .con_font_default = DUMMY,
35154 +- .con_font_copy = DUMMY,
35155 +- .con_set_palette = DUMMY,
35156 +- .con_scrolldelta = DUMMY,
35157 ++ .con_deinit = dummycon_deinit,
35158 ++ .con_clear = dummycon_clear,
35159 ++ .con_putc = dummycon_putc,
35160 ++ .con_putcs = dummycon_putcs,
35161 ++ .con_cursor = dummycon_cursor,
35162 ++ .con_scroll = dummycon_scroll,
35163 ++ .con_bmove = dummycon_bmove,
35164 ++ .con_switch = dummycon_switch,
35165 ++ .con_blank = dummycon_blank,
35166 ++ .con_font_set = dummycon_font_set,
35167 ++ .con_font_get = dummycon_font_get,
35168 ++ .con_font_default = dummycon_font_default,
35169 ++ .con_font_copy = dummycon_font_copy,
35170 ++ .con_set_palette = dummycon_set_palette,
35171 ++ .con_scrolldelta = dummycon_scrolldelta,
35172 + };
35173 + EXPORT_SYMBOL_GPL(dummy_con);
35174 diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
35175 index 6e92917..2f3dbad 100644
35176 --- a/drivers/video/console/fbcon.c
35177 @@ -61103,6 +76285,51 @@ index 6e92917..2f3dbad 100644
35178 /* console mappings */
35179 static int first_fb_vc;
35180 static int last_fb_vc = MAX_NR_CONSOLES - 1;
35181 +diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
35182 +index 517f565..a0a8f49 100644
35183 +--- a/drivers/video/console/vgacon.c
35184 ++++ b/drivers/video/console/vgacon.c
35185 +@@ -1411,24 +1411,33 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir,
35186 + * The console `switch' structure for the VGA based console
35187 + */
35188 +
35189 +-static int vgacon_dummy(struct vc_data *c)
35190 ++static void vgacon_clear(struct vc_data *vc, int a, int b, int c, int d)
35191 + {
35192 +- return 0;
35193 + }
35194 +
35195 +-#define DUMMY (void *) vgacon_dummy
35196 ++static void vgacon_putc(struct vc_data *vc, int a, int b, int c)
35197 ++{
35198 ++}
35199 ++
35200 ++static void vgacon_putcs(struct vc_data *vc, const unsigned short *a, int b, int c, int d)
35201 ++{
35202 ++}
35203 ++
35204 ++static void vgacon_bmove(struct vc_data *vc, int a, int b, int c, int d, int e, int f)
35205 ++{
35206 ++}
35207 +
35208 + const struct consw vga_con = {
35209 + .owner = THIS_MODULE,
35210 + .con_startup = vgacon_startup,
35211 + .con_init = vgacon_init,
35212 + .con_deinit = vgacon_deinit,
35213 +- .con_clear = DUMMY,
35214 +- .con_putc = DUMMY,
35215 +- .con_putcs = DUMMY,
35216 ++ .con_clear = vgacon_clear,
35217 ++ .con_putc = vgacon_putc,
35218 ++ .con_putcs = vgacon_putcs,
35219 + .con_cursor = vgacon_cursor,
35220 + .con_scroll = vgacon_scroll,
35221 +- .con_bmove = DUMMY,
35222 ++ .con_bmove = vgacon_bmove,
35223 + .con_switch = vgacon_switch,
35224 + .con_blank = vgacon_blank,
35225 + .con_font_set = vgacon_font_set,
35226 diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c
35227 index 1b0b233..6f34c2c 100644
35228 --- a/drivers/video/fbdev/arcfb.c
35229 @@ -61150,6 +76377,27 @@ index f34ed47f..026367f 100644
35230 info->flags |= FBINFO_HWACCEL_DISABLED;
35231 }
35232
35233 +diff --git a/drivers/video/fbdev/aty/mach64_ct.c b/drivers/video/fbdev/aty/mach64_ct.c
35234 +index 51f29d6..2c15339 100644
35235 +--- a/drivers/video/fbdev/aty/mach64_ct.c
35236 ++++ b/drivers/video/fbdev/aty/mach64_ct.c
35237 +@@ -630,13 +630,14 @@ static void aty_resume_pll_ct(const struct fb_info *info,
35238 + aty_st_pll_ct(EXT_VPLL_CNTL, pll->ct.ext_vpll_cntl, par);
35239 + }
35240 +
35241 +-static int dummy(void)
35242 ++static int aty_set_dac(const struct fb_info * info,
35243 ++ const union aty_pll * pll, u32 bpp, u32 accel)
35244 + {
35245 + return 0;
35246 + }
35247 +
35248 + const struct aty_dac_ops aty_dac_ct = {
35249 +- .set_dac = (void *) dummy,
35250 ++ .set_dac = aty_set_dac
35251 + };
35252 +
35253 + const struct aty_pll_ops aty_pll_ct = {
35254 diff --git a/drivers/video/fbdev/aty/mach64_cursor.c b/drivers/video/fbdev/aty/mach64_cursor.c
35255 index 2fa0317..4983f2a 100644
35256 --- a/drivers/video/fbdev/aty/mach64_cursor.c
35257 @@ -61173,8 +76421,43 @@ index 2fa0317..4983f2a 100644
35258
35259 return 0;
35260 }
35261 +diff --git a/drivers/video/fbdev/aty/mach64_gx.c b/drivers/video/fbdev/aty/mach64_gx.c
35262 +index 10c988a..f7d9299 100644
35263 +--- a/drivers/video/fbdev/aty/mach64_gx.c
35264 ++++ b/drivers/video/fbdev/aty/mach64_gx.c
35265 +@@ -894,17 +894,26 @@ static int aty_set_dac_unsupported(const struct fb_info *info,
35266 + return 0;
35267 + }
35268 +
35269 +-static int dummy(void)
35270 ++static int aty_var_to_pll(const struct fb_info * info, u32 vclk_per, u32 bpp, union aty_pll * pll)
35271 + {
35272 + return 0;
35273 + }
35274 +
35275 ++static u32 aty_pll_to_var(const struct fb_info * info, const union aty_pll * pll)
35276 ++{
35277 ++ return 0;
35278 ++}
35279 ++
35280 ++static void aty_set_pll(const struct fb_info * info, const union aty_pll * pll)
35281 ++{
35282 ++}
35283 ++
35284 + const struct aty_dac_ops aty_dac_unsupported = {
35285 + .set_dac = aty_set_dac_unsupported,
35286 + };
35287 +
35288 + const struct aty_pll_ops aty_pll_unsupported = {
35289 +- .var_to_pll = (void *) dummy,
35290 +- .pll_to_var = (void *) dummy,
35291 +- .set_pll = (void *) dummy,
35292 ++ .var_to_pll = aty_var_to_pll,
35293 ++ .pll_to_var = aty_pll_to_var,
35294 ++ .set_pll = aty_set_pll,
35295 + };
35296 diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c
35297 -index 3fc63c2..eec5e49 100644
35298 +index 57721c7..55142ed 100644
35299 --- a/drivers/video/fbdev/core/fb_defio.c
35300 +++ b/drivers/video/fbdev/core/fb_defio.c
35301 @@ -207,7 +207,9 @@ void fb_deferred_io_init(struct fb_info *info)
35302 @@ -61198,7 +76481,7 @@ index 3fc63c2..eec5e49 100644
35303 }
35304 EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup);
35305 diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
35306 -index 0705d88..0e17c07 100644
35307 +index 4e73b6f..69a6b87 100644
35308 --- a/drivers/video/fbdev/core/fbmem.c
35309 +++ b/drivers/video/fbdev/core/fbmem.c
35310 @@ -1301,7 +1301,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix,
35311 @@ -61403,10 +76686,10 @@ index ce7dab7..a87baf8 100644
35312
35313 info->var.accel_flags = (!noaccel);
35314
35315 -diff --git a/drivers/video/fbdev/omap2/dss/display.c b/drivers/video/fbdev/omap2/dss/display.c
35316 +diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display.c b/drivers/video/fbdev/omap2/omapfb/dss/display.c
35317 index ef5b902..47cf7f5 100644
35318 ---- a/drivers/video/fbdev/omap2/dss/display.c
35319 -+++ b/drivers/video/fbdev/omap2/dss/display.c
35320 +--- a/drivers/video/fbdev/omap2/omapfb/dss/display.c
35321 ++++ b/drivers/video/fbdev/omap2/omapfb/dss/display.c
35322 @@ -161,12 +161,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
35323 if (dssdev->name == NULL)
35324 dssdev->name = dssdev->alias;
35325 @@ -61459,6 +76742,19 @@ index 82c0a8c..42499a1 100644
35326 };
35327
35328 static int sh_mobile_lcdc_sginit(struct fb_info *info,
35329 +diff --git a/drivers/video/fbdev/sis/sis_main.h b/drivers/video/fbdev/sis/sis_main.h
35330 +index 32e23c2..7b73082 100644
35331 +--- a/drivers/video/fbdev/sis/sis_main.h
35332 ++++ b/drivers/video/fbdev/sis/sis_main.h
35333 +@@ -763,7 +763,7 @@ extern void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsig
35334 + extern unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg);
35335 + extern void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
35336 + extern void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
35337 +- unsigned char myor, unsigned char myand);
35338 ++ unsigned char myor, unsigned short myand);
35339 + extern void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
35340 + extern void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
35341 + extern unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine,
35342 diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c
35343 index 9279e5f..d5f5276 100644
35344 --- a/drivers/video/fbdev/smscufx.c
35345 @@ -64578,6 +79874,19 @@ index 4436778..bfcd027 100644
35346 .name = "xen-percpu",
35347
35348 .irq_disable = disable_dynirq,
35349 +diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
35350 +index 258b7c3..6aad74a 100644
35351 +--- a/drivers/xen/xen-pciback/pci_stub.c
35352 ++++ b/drivers/xen/xen-pciback/pci_stub.c
35353 +@@ -831,7 +831,7 @@ end:
35354 + */
35355 +
35356 + static pci_ers_result_t xen_pcibk_error_detected(struct pci_dev *dev,
35357 +- pci_channel_state_t error)
35358 ++ enum pci_channel_state error)
35359 + {
35360 + struct pcistub_device *psdev;
35361 + pci_ers_result_t result;
35362 diff --git a/drivers/xen/xenfs/xenstored.c b/drivers/xen/xenfs/xenstored.c
35363 index fef20db..d28b1ab 100644
35364 --- a/drivers/xen/xenfs/xenstored.c
35365 @@ -64612,7 +79921,7 @@ index e297e1b..aeb0982 100644
35366 fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
35367 fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
35368 diff --git a/firmware/WHENCE b/firmware/WHENCE
35369 -index 0c4d96d..b17700f 100644
35370 +index de6f22e..51fbae7 100644
35371 --- a/firmware/WHENCE
35372 +++ b/firmware/WHENCE
35373 @@ -653,21 +653,23 @@ Found in hex form in kernel source.
35374 @@ -76960,6 +92269,41 @@ index 0000000..43d7c4f
35375 +:1095C00080080000800E00008008008080080000F5
35376 +:1095D00080000A8080000A00800009808000090065
35377 +:00000001FF
35378 +diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
35379 +index e9e0437..a442193 100644
35380 +--- a/fs/9p/vfs_addr.c
35381 ++++ b/fs/9p/vfs_addr.c
35382 +@@ -121,7 +121,7 @@ static int v9fs_vfs_readpages(struct file *filp, struct address_space *mapping,
35383 + if (ret == 0)
35384 + return ret;
35385 +
35386 +- ret = read_cache_pages(mapping, pages, (void *)v9fs_vfs_readpage, filp);
35387 ++ ret = read_cache_pages(mapping, pages, v9fs_vfs_readpage, filp);
35388 + p9_debug(P9_DEBUG_VFS, " = %d\n", ret);
35389 + return ret;
35390 + }
35391 +diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
35392 +index a34702c..ff71f79 100644
35393 +--- a/fs/9p/vfs_inode_dotl.c
35394 ++++ b/fs/9p/vfs_inode_dotl.c
35395 +@@ -179,7 +179,7 @@ static int v9fs_mapped_dotl_flags(int flags)
35396 + {
35397 + int i;
35398 + int rflags = 0;
35399 +- struct dotl_openflag_map dotl_oflag_map[] = {
35400 ++ static const struct dotl_openflag_map dotl_oflag_map[] = {
35401 + { O_CREAT, P9_DOTL_CREATE },
35402 + { O_EXCL, P9_DOTL_EXCL },
35403 + { O_NOCTTY, P9_DOTL_NOCTTY },
35404 +@@ -526,7 +526,7 @@ static int v9fs_mapped_iattr_valid(int iattr_valid)
35405 + {
35406 + int i;
35407 + int p9_iattr_valid = 0;
35408 +- struct dotl_iattr_map dotl_iattr_map[] = {
35409 ++ static const struct dotl_iattr_map dotl_iattr_map[] = {
35410 + { ATTR_MODE, P9_ATTR_MODE },
35411 + { ATTR_UID, P9_ATTR_UID },
35412 + { ATTR_GID, P9_ATTR_GID },
35413 diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
35414 index 2d0cbbd..a6d61492 100644
35415 --- a/fs/Kconfig.binfmt
35416 @@ -76973,11 +92317,46 @@ index 2d0cbbd..a6d61492 100644
35417 ---help---
35418 A.out (Assembler.OUTput) is a set of formats for libraries and
35419 executables used in the earliest versions of UNIX. Linux used
35420 +diff --git a/fs/afs/file.c b/fs/afs/file.c
35421 +index 999bc3c..3926949 100644
35422 +--- a/fs/afs/file.c
35423 ++++ b/fs/afs/file.c
35424 +@@ -122,11 +122,11 @@ static void afs_file_readpage_read_complete(struct page *page,
35425 + /*
35426 + * read page from file, directory or symlink, given a key to use
35427 + */
35428 +-int afs_page_filler(void *data, struct page *page)
35429 ++int afs_page_filler(struct file *data, struct page *page)
35430 + {
35431 + struct inode *inode = page->mapping->host;
35432 + struct afs_vnode *vnode = AFS_FS_I(inode);
35433 +- struct key *key = data;
35434 ++ struct key *key = (struct key *)data;
35435 + size_t len;
35436 + off_t offset;
35437 + int ret;
35438 +@@ -220,14 +220,14 @@ static int afs_readpage(struct file *file, struct page *page)
35439 + if (file) {
35440 + key = file->private_data;
35441 + ASSERT(key != NULL);
35442 +- ret = afs_page_filler(key, page);
35443 ++ ret = afs_page_filler((struct file *)key, page);
35444 + } else {
35445 + struct inode *inode = page->mapping->host;
35446 + key = afs_request_key(AFS_FS_S(inode->i_sb)->volume->cell);
35447 + if (IS_ERR(key)) {
35448 + ret = PTR_ERR(key);
35449 + } else {
35450 +- ret = afs_page_filler(key, page);
35451 ++ ret = afs_page_filler((struct file *)key, page);
35452 + key_put(key);
35453 + }
35454 + }
35455 diff --git a/fs/afs/inode.c b/fs/afs/inode.c
35456 -index e06f5a2..81d07ac 100644
35457 +index 86cc726..b9b7f73 100644
35458 --- a/fs/afs/inode.c
35459 +++ b/fs/afs/inode.c
35460 -@@ -141,7 +141,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
35461 +@@ -142,7 +142,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
35462 struct afs_vnode *vnode;
35463 struct super_block *sb;
35464 struct inode *inode;
35465 @@ -76986,7 +92365,7 @@ index e06f5a2..81d07ac 100644
35466
35467 _enter("{%x:%u},%*.*s,",
35468 AFS_FS_I(dir)->fid.vid, AFS_FS_I(dir)->fid.vnode,
35469 -@@ -154,7 +154,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
35470 +@@ -155,7 +155,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
35471 data.fid.unique = 0;
35472 data.fid.vnode = 0;
35473
35474 @@ -76995,6 +92374,28 @@ index e06f5a2..81d07ac 100644
35475 afs_iget5_autocell_test, afs_iget5_set,
35476 &data);
35477 if (!inode) {
35478 +diff --git a/fs/afs/internal.h b/fs/afs/internal.h
35479 +index 71d5982..3112bf6 100644
35480 +--- a/fs/afs/internal.h
35481 ++++ b/fs/afs/internal.h
35482 +@@ -15,7 +15,7 @@
35483 + #include <linux/pagemap.h>
35484 + #include <linux/skbuff.h>
35485 + #include <linux/rxrpc.h>
35486 +-#include <linux/key.h>
35487 ++#include <linux/key-type.h>
35488 + #include <linux/workqueue.h>
35489 + #include <linux/sched.h>
35490 + #include <linux/fscache.h>
35491 +@@ -498,7 +498,7 @@ extern const struct file_operations afs_file_operations;
35492 +
35493 + extern int afs_open(struct inode *, struct file *);
35494 + extern int afs_release(struct inode *, struct file *);
35495 +-extern int afs_page_filler(void *, struct page *);
35496 ++extern int afs_page_filler(struct file *, struct page *);
35497 +
35498 + /*
35499 + * flock.c
35500 diff --git a/fs/aio.c b/fs/aio.c
35501 index 155f842..89922d8 100644
35502 --- a/fs/aio.c
35503 @@ -77009,7 +92410,7 @@ index 155f842..89922d8 100644
35504
35505 file = aio_private_file(ctx, nr_pages);
35506 diff --git a/fs/attr.c b/fs/attr.c
35507 -index 6530ced..559e5e6 100644
35508 +index 25b24d0..85550fc 100644
35509 --- a/fs/attr.c
35510 +++ b/fs/attr.c
35511 @@ -102,6 +102,10 @@ int inode_newsize_ok(const struct inode *inode, loff_t offset)
35512 @@ -77172,7 +92573,7 @@ index 4c55668..eeae150 100644
35513 fd_offset + ex.a_text);
35514 if (error != N_DATADDR(ex))
35515 diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
35516 -index 3a93755..daf2ccc 100644
35517 +index 7d914c6..a86ce2a 100644
35518 --- a/fs/binfmt_elf.c
35519 +++ b/fs/binfmt_elf.c
35520 @@ -36,6 +36,7 @@
35521 @@ -77275,7 +92676,7 @@ index 3a93755..daf2ccc 100644
35522 return -EFAULT;
35523 return 0;
35524 }
35525 -@@ -516,14 +543,14 @@ static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp,
35526 +@@ -518,14 +545,14 @@ static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp,
35527 an ELF header */
35528
35529 static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35530 @@ -77293,7 +92694,7 @@ index 3a93755..daf2ccc 100644
35531 unsigned long total_size;
35532 int i;
35533
35534 -@@ -543,6 +570,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35535 +@@ -545,6 +572,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35536 goto out;
35537 }
35538
35539 @@ -77305,7 +92706,7 @@ index 3a93755..daf2ccc 100644
35540 eppnt = interp_elf_phdata;
35541 for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
35542 if (eppnt->p_type == PT_LOAD) {
35543 -@@ -566,8 +598,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35544 +@@ -568,8 +600,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35545 map_addr = elf_map(interpreter, load_addr + vaddr,
35546 eppnt, elf_prot, elf_type, total_size);
35547 total_size = 0;
35548 @@ -77314,7 +92715,7 @@ index 3a93755..daf2ccc 100644
35549 error = map_addr;
35550 if (BAD_ADDR(map_addr))
35551 goto out;
35552 -@@ -586,8 +616,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35553 +@@ -588,8 +618,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35554 k = load_addr + eppnt->p_vaddr;
35555 if (BAD_ADDR(k) ||
35556 eppnt->p_filesz > eppnt->p_memsz ||
35557 @@ -77325,7 +92726,7 @@ index 3a93755..daf2ccc 100644
35558 error = -ENOMEM;
35559 goto out;
35560 }
35561 -@@ -626,9 +656,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35562 +@@ -628,9 +658,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
35563 elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1);
35564
35565 /* Map the last of the bss segment */
35566 @@ -77340,7 +92741,7 @@ index 3a93755..daf2ccc 100644
35567 }
35568
35569 error = load_addr;
35570 -@@ -636,6 +668,336 @@ out:
35571 +@@ -638,6 +670,336 @@ out:
35572 return error;
35573 }
35574
35575 @@ -77677,7 +93078,7 @@ index 3a93755..daf2ccc 100644
35576 /*
35577 * These are the functions used to load ELF style executables and shared
35578 * libraries. There is no binary dependent code anywhere else.
35579 -@@ -649,6 +1011,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
35580 +@@ -651,6 +1013,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
35581 {
35582 unsigned long random_variable = 0;
35583
35584 @@ -77688,8 +93089,8 @@ index 3a93755..daf2ccc 100644
35585 +
35586 if ((current->flags & PF_RANDOMIZE) &&
35587 !(current->personality & ADDR_NO_RANDOMIZE)) {
35588 - random_variable = (unsigned long) get_random_int();
35589 -@@ -668,7 +1035,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35590 + random_variable = get_random_long();
35591 +@@ -670,7 +1037,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35592 unsigned long load_addr = 0, load_bias = 0;
35593 int load_addr_set = 0;
35594 char * elf_interpreter = NULL;
35595 @@ -77698,7 +93099,7 @@ index 3a93755..daf2ccc 100644
35596 struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
35597 unsigned long elf_bss, elf_brk;
35598 int retval, i;
35599 -@@ -683,6 +1050,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35600 +@@ -685,6 +1052,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35601 struct elfhdr interp_elf_ex;
35602 } *loc;
35603 struct arch_elf_state arch_state = INIT_ARCH_ELF_STATE;
35604 @@ -77706,7 +93107,7 @@ index 3a93755..daf2ccc 100644
35605
35606 loc = kmalloc(sizeof(*loc), GFP_KERNEL);
35607 if (!loc) {
35608 -@@ -841,6 +1209,77 @@ static int load_elf_binary(struct linux_binprm *bprm)
35609 +@@ -845,6 +1213,77 @@ static int load_elf_binary(struct linux_binprm *bprm)
35610 /* Do this immediately, since STACK_TOP as used in setup_arg_pages
35611 may depend on the personality. */
35612 SET_PERSONALITY2(loc->elf_ex, &arch_state);
35613 @@ -77784,7 +93185,7 @@ index 3a93755..daf2ccc 100644
35614 if (elf_read_implies_exec(loc->elf_ex, executable_stack))
35615 current->personality |= READ_IMPLIES_EXEC;
35616
35617 -@@ -916,8 +1355,21 @@ static int load_elf_binary(struct linux_binprm *bprm)
35618 +@@ -920,8 +1359,21 @@ static int load_elf_binary(struct linux_binprm *bprm)
35619 if (current->flags & PF_RANDOMIZE)
35620 load_bias += arch_mmap_rnd();
35621 load_bias = ELF_PAGESTART(load_bias);
35622 @@ -77808,7 +93209,7 @@ index 3a93755..daf2ccc 100644
35623 if (!total_size) {
35624 retval = -EINVAL;
35625 goto out_free_dentry;
35626 -@@ -953,9 +1405,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
35627 +@@ -957,9 +1409,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
35628 * allowed task size. Note that p_filesz must always be
35629 * <= p_memsz so it is only necessary to check p_memsz.
35630 */
35631 @@ -77821,7 +93222,7 @@ index 3a93755..daf2ccc 100644
35632 /* set_brk can never work. Avoid overflows. */
35633 retval = -EINVAL;
35634 goto out_free_dentry;
35635 -@@ -991,16 +1443,43 @@ static int load_elf_binary(struct linux_binprm *bprm)
35636 +@@ -995,16 +1447,43 @@ static int load_elf_binary(struct linux_binprm *bprm)
35637 if (retval)
35638 goto out_free_dentry;
35639 if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
35640 @@ -77870,7 +93271,7 @@ index 3a93755..daf2ccc 100644
35641 load_bias, interp_elf_phdata);
35642 if (!IS_ERR((void *)elf_entry)) {
35643 /*
35644 -@@ -1051,6 +1530,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35645 +@@ -1055,6 +1534,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35646 current->mm->end_data = end_data;
35647 current->mm->start_stack = bprm->p;
35648
35649 @@ -77878,7 +93279,7 @@ index 3a93755..daf2ccc 100644
35650 if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
35651 current->mm->brk = current->mm->start_brk =
35652 arch_randomize_brk(current->mm);
35653 -@@ -1058,6 +1538,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35654 +@@ -1062,6 +1542,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
35655 current->brk_randomized = 1;
35656 #endif
35657 }
35658 @@ -77886,7 +93287,7 @@ index 3a93755..daf2ccc 100644
35659
35660 if (current->personality & MMAP_PAGE_ZERO) {
35661 /* Why this, you ask??? Well SVr4 maps page 0 as read-only,
35662 -@@ -1226,7 +1707,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
35663 +@@ -1230,7 +1711,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
35664 * Decide what to dump of a segment, part, all or none.
35665 */
35666 static unsigned long vma_dump_size(struct vm_area_struct *vma,
35667 @@ -77895,7 +93296,7 @@ index 3a93755..daf2ccc 100644
35668 {
35669 #define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
35670
35671 -@@ -1273,7 +1754,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
35672 +@@ -1277,7 +1758,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
35673 if (vma->vm_file == NULL)
35674 return 0;
35675
35676 @@ -77904,7 +93305,7 @@ index 3a93755..daf2ccc 100644
35677 goto whole;
35678
35679 /*
35680 -@@ -1373,7 +1854,7 @@ static void fill_elf_header(struct elfhdr *elf, int segs,
35681 +@@ -1377,7 +1858,7 @@ static void fill_elf_header(struct elfhdr *elf, int segs,
35682 return;
35683 }
35684
35685 @@ -77913,7 +93314,7 @@ index 3a93755..daf2ccc 100644
35686 {
35687 phdr->p_type = PT_NOTE;
35688 phdr->p_offset = offset;
35689 -@@ -1480,9 +1961,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
35690 +@@ -1484,9 +1965,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
35691 {
35692 elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
35693 int i = 0;
35694 @@ -77925,7 +93326,7 @@ index 3a93755..daf2ccc 100644
35695 fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
35696 }
35697
35698 -@@ -1491,7 +1972,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata,
35699 +@@ -1495,7 +1976,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata,
35700 {
35701 mm_segment_t old_fs = get_fs();
35702 set_fs(KERNEL_DS);
35703 @@ -77934,7 +93335,7 @@ index 3a93755..daf2ccc 100644
35704 set_fs(old_fs);
35705 fill_note(note, "CORE", NT_SIGINFO, sizeof(*csigdata), csigdata);
35706 }
35707 -@@ -2211,7 +2692,7 @@ static int elf_core_dump(struct coredump_params *cprm)
35708 +@@ -2215,7 +2696,7 @@ static int elf_core_dump(struct coredump_params *cprm)
35709 vma = next_vma(vma, gate_vma)) {
35710 unsigned long dump_size;
35711
35712 @@ -77943,7 +93344,7 @@ index 3a93755..daf2ccc 100644
35713 vma_filesz[i++] = dump_size;
35714 vma_data_size += dump_size;
35715 }
35716 -@@ -2319,6 +2800,167 @@ out:
35717 +@@ -2323,6 +2804,167 @@ out:
35718
35719 #endif /* CONFIG_ELF_CORE */
35720
35721 @@ -78134,10 +93535,10 @@ index b1adb92..81d396b 100644
35722 for (i = 0; i < numnote; i++)
35723 sz += notesize(notes + i);
35724 diff --git a/fs/block_dev.c b/fs/block_dev.c
35725 -index 44d4a1e..99df269 100644
35726 +index 826b164..690322d 100644
35727 --- a/fs/block_dev.c
35728 +++ b/fs/block_dev.c
35729 -@@ -762,7 +762,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
35730 +@@ -766,7 +766,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
35731 else if (bdev->bd_contains == bdev)
35732 return true; /* is a whole device which isn't held */
35733
35734 @@ -78147,7 +93548,7 @@ index 44d4a1e..99df269 100644
35735 else if (whole->bd_holder != NULL)
35736 return false; /* is a partition of a held device */
35737 diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
35738 -index 5b8e235..33d31fc 100644
35739 +index 769e0ff..0f57508 100644
35740 --- a/fs/btrfs/ctree.c
35741 +++ b/fs/btrfs/ctree.c
35742 @@ -357,7 +357,7 @@ static inline void tree_mod_log_write_unlock(struct btrfs_fs_info *fs_info)
35743 @@ -78176,10 +93577,10 @@ index 5b8e235..33d31fc 100644
35744
35745 WARN_ON(trans->transid != btrfs_header_generation(parent));
35746 diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
35747 -index 385b449..289f2c4 100644
35748 +index bfe4a33..1bd2b22 100644
35749 --- a/fs/btrfs/ctree.h
35750 +++ b/fs/btrfs/ctree.h
35751 -@@ -1576,7 +1576,7 @@ struct btrfs_fs_info {
35752 +@@ -1618,7 +1618,7 @@ struct btrfs_fs_info {
35753
35754 /* this protects tree_mod_seq_list */
35755 spinlock_t tree_mod_seq_lock;
35756 @@ -78188,7 +93589,7 @@ index 385b449..289f2c4 100644
35757 struct list_head tree_mod_seq_list;
35758
35759 /* this protects tree_mod_log */
35760 -@@ -1881,7 +1881,7 @@ struct btrfs_root {
35761 +@@ -1925,7 +1925,7 @@ struct btrfs_root {
35762 struct list_head log_ctxs[2];
35763 atomic_t log_writers;
35764 atomic_t log_commit[2];
35765 @@ -78198,10 +93599,10 @@ index 385b449..289f2c4 100644
35766 /* No matter the commit succeeds or not*/
35767 int log_transid_committed;
35768 diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
35769 -index 02b934d..a8126a4 100644
35770 +index b57daa8..45ab28e 100644
35771 --- a/fs/btrfs/delayed-inode.c
35772 +++ b/fs/btrfs/delayed-inode.c
35773 -@@ -462,7 +462,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node,
35774 +@@ -457,7 +457,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node,
35775
35776 static void finish_one_item(struct btrfs_delayed_root *delayed_root)
35777 {
35778 @@ -78210,7 +93611,7 @@ index 02b934d..a8126a4 100644
35779
35780 /*
35781 * atomic_dec_return implies a barrier for waitqueue_active
35782 -@@ -1416,7 +1416,7 @@ void btrfs_assert_delayed_root_empty(struct btrfs_root *root)
35783 +@@ -1411,7 +1411,7 @@ void btrfs_assert_delayed_root_empty(struct btrfs_root *root)
35784
35785 static int could_end_wait(struct btrfs_delayed_root *delayed_root, int seq)
35786 {
35787 @@ -78219,7 +93620,7 @@ index 02b934d..a8126a4 100644
35788
35789 if (val < seq || val >= seq + BTRFS_DELAYED_BATCH)
35790 return 1;
35791 -@@ -1441,7 +1441,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root)
35792 +@@ -1436,7 +1436,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root)
35793 int seq;
35794 int ret;
35795
35796 @@ -78251,7 +93652,7 @@ index 0167853c..b7d2bb4 100644
35797 spin_lock_init(&delayed_root->lock);
35798 init_waitqueue_head(&delayed_root->wait);
35799 diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
35800 -index e06dd75a..22221aa 100644
35801 +index 914ac13..6a872f7 100644
35802 --- a/fs/btrfs/delayed-ref.c
35803 +++ b/fs/btrfs/delayed-ref.c
35804 @@ -660,7 +660,7 @@ add_delayed_tree_ref(struct btrfs_fs_info *fs_info,
35805 @@ -78273,10 +93674,10 @@ index e06dd75a..22221aa 100644
35806 /* first set the basic ref node struct up */
35807 atomic_set(&ref->refs, 1);
35808 diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
35809 -index 41fb431..9b5ad63 100644
35810 +index 4545e2e..4a2c0a9 100644
35811 --- a/fs/btrfs/disk-io.c
35812 +++ b/fs/btrfs/disk-io.c
35813 -@@ -1263,7 +1263,7 @@ static void __setup_root(u32 nodesize, u32 sectorsize, u32 stripesize,
35814 +@@ -1271,7 +1271,7 @@ static void __setup_root(u32 nodesize, u32 sectorsize, u32 stripesize,
35815 atomic_set(&root->log_commit[0], 0);
35816 atomic_set(&root->log_commit[1], 0);
35817 atomic_set(&root->log_writers, 0);
35818 @@ -78285,7 +93686,7 @@ index 41fb431..9b5ad63 100644
35819 atomic_set(&root->orphan_inodes, 0);
35820 atomic_set(&root->refs, 1);
35821 atomic_set(&root->will_be_snapshoted, 0);
35822 -@@ -2582,7 +2582,7 @@ int open_ctree(struct super_block *sb,
35823 +@@ -2603,7 +2603,7 @@ int open_ctree(struct super_block *sb,
35824 atomic_set(&fs_info->nr_async_bios, 0);
35825 atomic_set(&fs_info->defrag_running, 0);
35826 atomic_set(&fs_info->qgroup_op_seq, 0);
35827 @@ -78295,7 +93696,7 @@ index 41fb431..9b5ad63 100644
35828 fs_info->max_inline = BTRFS_DEFAULT_MAX_INLINE;
35829 fs_info->metadata_ratio = 0;
35830 diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
35831 -index 6a98bdd..fed3da6 100644
35832 +index 84fb56d..ee0fe69 100644
35833 --- a/fs/btrfs/extent_map.c
35834 +++ b/fs/btrfs/extent_map.c
35835 @@ -235,7 +235,9 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em)
35836 @@ -78321,20 +93722,20 @@ index 6a98bdd..fed3da6 100644
35837 RB_CLEAR_NODE(&merge->rb_node);
35838 em->mod_len = (merge->mod_start + merge->mod_len) - em->mod_start;
35839 diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
35840 -index 5e5db36..b5ac5d4 100644
35841 +index 9a30ca6..830e945 100644
35842 --- a/fs/btrfs/file.c
35843 +++ b/fs/btrfs/file.c
35844 -@@ -1912,7 +1912,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
35845 +@@ -1910,7 +1910,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
35846 return ret;
35847
35848 - mutex_lock(&inode->i_mutex);
35849 + inode_lock(inode);
35850 - atomic_inc(&root->log_batch);
35851 + atomic_inc_unchecked(&root->log_batch);
35852 full_sync = test_bit(BTRFS_INODE_NEEDS_FULL_SYNC,
35853 &BTRFS_I(inode)->runtime_flags);
35854 /*
35855 -@@ -1966,7 +1966,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
35856 - mutex_unlock(&inode->i_mutex);
35857 +@@ -1964,7 +1964,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
35858 + inode_unlock(inode);
35859 goto out;
35860 }
35861 - atomic_inc(&root->log_batch);
35862 @@ -78342,8 +93743,20 @@ index 5e5db36..b5ac5d4 100644
35863
35864 /*
35865 * If the last transaction that changed this file was before the current
35866 +diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
35867 +index 33178c4..ff2e4ad 100644
35868 +--- a/fs/btrfs/free-space-cache.h
35869 ++++ b/fs/btrfs/free-space-cache.h
35870 +@@ -48,6 +48,7 @@ struct btrfs_free_space_op {
35871 + bool (*use_bitmap)(struct btrfs_free_space_ctl *ctl,
35872 + struct btrfs_free_space *info);
35873 + };
35874 ++typedef struct btrfs_free_space_op __no_const btrfs_free_space_op_no_const;
35875 +
35876 + struct btrfs_io_ctl;
35877 +
35878 diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
35879 -index 1a33d3e..4830234 100644
35880 +index 5516136..8480a2f 100644
35881 --- a/fs/btrfs/raid56.c
35882 +++ b/fs/btrfs/raid56.c
35883 @@ -153,7 +153,7 @@ struct btrfs_raid_bio {
35884 @@ -78355,16 +93768,16 @@ index 1a33d3e..4830234 100644
35885 /*
35886 * these are two arrays of pointers. We allocate the
35887 * rbio big enough to hold them both and setup their
35888 -@@ -902,7 +902,7 @@ static void raid_write_end_io(struct bio *bio)
35889 - err = 0;
35890 -
35891 +@@ -916,7 +916,7 @@ static void raid_write_end_io(struct bio *bio)
35892 /* OK, we have read all the stripes we need to. */
35893 -- if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
35894 -+ if (atomic_read_unchecked(&rbio->error) > rbio->bbio->max_errors)
35895 + max_errors = (rbio->operation == BTRFS_RBIO_PARITY_SCRUB) ?
35896 + 0 : rbio->bbio->max_errors;
35897 +- if (atomic_read(&rbio->error) > max_errors)
35898 ++ if (atomic_read_unchecked(&rbio->error) > max_errors)
35899 err = -EIO;
35900
35901 rbio_orig_end_io(rbio, err);
35902 -@@ -987,7 +987,7 @@ static struct btrfs_raid_bio *alloc_rbio(struct btrfs_root *root,
35903 +@@ -999,7 +999,7 @@ static struct btrfs_raid_bio *alloc_rbio(struct btrfs_root *root,
35904 rbio->faila = -1;
35905 rbio->failb = -1;
35906 atomic_set(&rbio->refs, 1);
35907 @@ -78373,7 +93786,7 @@ index 1a33d3e..4830234 100644
35908 atomic_set(&rbio->stripes_pending, 0);
35909
35910 /*
35911 -@@ -1211,7 +1211,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio)
35912 +@@ -1208,7 +1208,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio)
35913 set_bit(RBIO_RMW_LOCKED_BIT, &rbio->flags);
35914 spin_unlock_irq(&rbio->bio_list_lock);
35915
35916 @@ -78382,7 +93795,7 @@ index 1a33d3e..4830234 100644
35917
35918 /*
35919 * now that we've set rmw_locked, run through the
35920 -@@ -1399,11 +1399,11 @@ static int fail_rbio_index(struct btrfs_raid_bio *rbio, int failed)
35921 +@@ -1396,11 +1396,11 @@ static int fail_rbio_index(struct btrfs_raid_bio *rbio, int failed)
35922 if (rbio->faila == -1) {
35923 /* first failure on this rbio */
35924 rbio->faila = failed;
35925 @@ -78396,7 +93809,7 @@ index 1a33d3e..4830234 100644
35926 } else {
35927 ret = -EIO;
35928 }
35929 -@@ -1465,7 +1465,7 @@ static void raid_rmw_end_io(struct bio *bio)
35930 +@@ -1462,7 +1462,7 @@ static void raid_rmw_end_io(struct bio *bio)
35931 if (!atomic_dec_and_test(&rbio->stripes_pending))
35932 return;
35933
35934 @@ -78405,7 +93818,7 @@ index 1a33d3e..4830234 100644
35935 goto cleanup;
35936
35937 /*
35938 -@@ -1521,7 +1521,7 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
35939 +@@ -1517,7 +1517,7 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
35940
35941 index_rbio_pages(rbio);
35942
35943 @@ -78414,7 +93827,7 @@ index 1a33d3e..4830234 100644
35944 /*
35945 * build a list of bios to read all the missing parts of this
35946 * stripe
35947 -@@ -2014,7 +2014,7 @@ static void raid_recover_end_io(struct bio *bio)
35948 +@@ -2009,7 +2009,7 @@ static void raid_recover_end_io(struct bio *bio)
35949 if (!atomic_dec_and_test(&rbio->stripes_pending))
35950 return;
35951
35952 @@ -78423,7 +93836,7 @@ index 1a33d3e..4830234 100644
35953 rbio_orig_end_io(rbio, -EIO);
35954 else
35955 __raid_recover_end_io(rbio);
35956 -@@ -2044,7 +2044,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
35957 +@@ -2038,7 +2038,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
35958 if (ret)
35959 goto cleanup;
35960
35961 @@ -78432,7 +93845,7 @@ index 1a33d3e..4830234 100644
35962
35963 /*
35964 * read everything that hasn't failed. Thanks to the
35965 -@@ -2053,7 +2053,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
35966 +@@ -2047,7 +2047,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
35967 */
35968 for (stripe = 0; stripe < rbio->real_stripes; stripe++) {
35969 if (rbio->faila == stripe || rbio->failb == stripe) {
35970 @@ -78441,7 +93854,7 @@ index 1a33d3e..4830234 100644
35971 continue;
35972 }
35973
35974 -@@ -2083,7 +2083,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
35975 +@@ -2077,7 +2077,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
35976 * were up to date, or we might have no bios to read because
35977 * the devices were gone.
35978 */
35979 @@ -78450,16 +93863,7 @@ index 1a33d3e..4830234 100644
35980 __raid_recover_end_io(rbio);
35981 goto out;
35982 } else {
35983 -@@ -2306,7 +2306,7 @@ static void raid_write_parity_end_io(struct bio *bio)
35984 -
35985 - err = 0;
35986 -
35987 -- if (atomic_read(&rbio->error))
35988 -+ if (atomic_read_unchecked(&rbio->error))
35989 - err = -EIO;
35990 -
35991 - rbio_orig_end_io(rbio, err);
35992 -@@ -2370,7 +2370,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
35993 +@@ -2338,7 +2338,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
35994 SetPageUptodate(q_page);
35995 }
35996
35997 @@ -78468,7 +93872,7 @@ index 1a33d3e..4830234 100644
35998
35999 for_each_set_bit(pagenr, rbio->dbitmap, rbio->stripe_npages) {
36000 struct page *p;
36001 -@@ -2489,7 +2489,7 @@ static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe)
36002 +@@ -2457,7 +2457,7 @@ static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe)
36003 */
36004 static void validate_rbio_for_parity_scrub(struct btrfs_raid_bio *rbio)
36005 {
36006 @@ -78477,7 +93881,7 @@ index 1a33d3e..4830234 100644
36007 goto cleanup;
36008
36009 if (rbio->faila >= 0 || rbio->failb >= 0) {
36010 -@@ -2586,7 +2586,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
36011 +@@ -2554,7 +2554,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
36012
36013 bio_list_init(&bio_list);
36014
36015 @@ -78487,7 +93891,7 @@ index 1a33d3e..4830234 100644
36016 * build a list of bios to read all the missing parts of this
36017 * stripe
36018 diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
36019 -index fe609b8..6475fee 100644
36020 +index d41e09fe..0a20548 100644
36021 --- a/fs/btrfs/super.c
36022 +++ b/fs/btrfs/super.c
36023 @@ -248,7 +248,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
36024 @@ -78500,10 +93904,10 @@ index fe609b8..6475fee 100644
36025 wake_up(&root->fs_info->transaction_wait);
36026 wake_up(&root->fs_info->transaction_blocked_wait);
36027 diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
36028 -index e0ac859..dc1657f 100644
36029 +index 539e7b5..9de4167 100644
36030 --- a/fs/btrfs/sysfs.c
36031 +++ b/fs/btrfs/sysfs.c
36032 -@@ -481,7 +481,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
36033 +@@ -483,7 +483,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
36034 for (set = 0; set < FEAT_MAX; set++) {
36035 int i;
36036 struct attribute *attrs[2];
36037 @@ -78513,10 +93917,10 @@ index e0ac859..dc1657f 100644
36038 .attrs = attrs,
36039 };
36040 diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
36041 -index 9626252..e130203 100644
36042 +index 0e1e61a..227b156 100644
36043 --- a/fs/btrfs/tests/btrfs-tests.c
36044 +++ b/fs/btrfs/tests/btrfs-tests.c
36045 -@@ -116,7 +116,7 @@ struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(void)
36046 +@@ -119,7 +119,7 @@ struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(void)
36047 fs_info->running_transaction = NULL;
36048 fs_info->qgroup_tree = RB_ROOT;
36049 fs_info->qgroup_ulist = NULL;
36050 @@ -78526,36 +93930,23 @@ index 9626252..e130203 100644
36051 INIT_LIST_HEAD(&fs_info->dead_roots);
36052 INIT_LIST_HEAD(&fs_info->tree_mod_seq_list);
36053 diff --git a/fs/btrfs/tests/free-space-tests.c b/fs/btrfs/tests/free-space-tests.c
36054 -index 8b72b00..6c30bdc 100644
36055 +index c9ad97b..006bc77 100644
36056 --- a/fs/btrfs/tests/free-space-tests.c
36057 +++ b/fs/btrfs/tests/free-space-tests.c
36058 -@@ -470,7 +470,9 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
36059 - * extent entry.
36060 - */
36061 - use_bitmap_op = cache->free_space_ctl->op->use_bitmap;
36062 -- cache->free_space_ctl->op->use_bitmap = test_use_bitmap;
36063 -+ pax_open_kernel();
36064 -+ *(void **)&cache->free_space_ctl->op->use_bitmap = test_use_bitmap;
36065 -+ pax_close_kernel();
36066 -
36067 - /*
36068 - * Extent entry covering free space range [128Mb - 256Kb, 128Mb - 128Kb[
36069 -@@ -877,7 +879,9 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
36070 - if (ret)
36071 - return ret;
36072 -
36073 -- cache->free_space_ctl->op->use_bitmap = use_bitmap_op;
36074 -+ pax_open_kernel();
36075 -+ *(void **)&cache->free_space_ctl->op->use_bitmap = use_bitmap_op;
36076 -+ pax_close_kernel();
36077 - __btrfs_remove_free_space_cache(cache->free_space_ctl);
36078 -
36079 - return 0;
36080 +@@ -405,7 +405,7 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
36081 + int ret;
36082 + u64 offset;
36083 + u64 max_extent_size;
36084 +- const struct btrfs_free_space_op test_free_space_ops = {
36085 ++ const btrfs_free_space_op_no_const test_free_space_ops = {
36086 + .recalc_thresholds = cache->free_space_ctl->op->recalc_thresholds,
36087 + .use_bitmap = test_use_bitmap,
36088 + };
36089 diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
36090 -index be8eae8..f884717 100644
36091 +index b6031ce..5d53523 100644
36092 --- a/fs/btrfs/transaction.c
36093 +++ b/fs/btrfs/transaction.c
36094 -@@ -260,7 +260,7 @@ loop:
36095 +@@ -277,7 +277,7 @@ loop:
36096 if (!RB_EMPTY_ROOT(&fs_info->tree_mod_log))
36097 WARN(1, KERN_ERR "BTRFS: tree_mod_log rb tree not empty when "
36098 "creating a fresh transaction\n");
36099 @@ -78565,7 +93956,7 @@ index be8eae8..f884717 100644
36100 spin_lock_init(&cur_trans->delayed_refs.lock);
36101
36102 diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
36103 -index 0e044d7..21ad436 100644
36104 +index 849a30a..f7563af 100644
36105 --- a/fs/btrfs/tree-log.c
36106 +++ b/fs/btrfs/tree-log.c
36107 @@ -172,7 +172,7 @@ static int start_log_trans(struct btrfs_trans_handle *trans,
36108 @@ -78618,10 +94009,10 @@ index 6916a78..4598936 100644
36109
36110 static inline int btrfs_need_log_full_commit(struct btrfs_fs_info *fs_info,
36111 diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
36112 -index 9c62a6f..3c7df72 100644
36113 +index 366b335..54dba62 100644
36114 --- a/fs/btrfs/volumes.c
36115 +++ b/fs/btrfs/volumes.c
36116 -@@ -231,7 +231,7 @@ static struct btrfs_device *__alloc_device(void)
36117 +@@ -232,7 +232,7 @@ static struct btrfs_device *__alloc_device(void)
36118
36119 spin_lock_init(&dev->reada_lock);
36120 atomic_set(&dev->reada_in_flight, 0);
36121 @@ -78630,7 +94021,7 @@ index 9c62a6f..3c7df72 100644
36122 btrfs_device_data_ordered_init(dev);
36123 INIT_RADIX_TREE(&dev->reada_zones, GFP_NOFS & ~__GFP_DIRECT_RECLAIM);
36124 INIT_RADIX_TREE(&dev->reada_extents, GFP_NOFS & ~__GFP_DIRECT_RECLAIM);
36125 -@@ -5185,7 +5185,7 @@ static struct btrfs_bio *alloc_btrfs_bio(int total_stripes, int real_stripes)
36126 +@@ -5197,7 +5197,7 @@ static struct btrfs_bio *alloc_btrfs_bio(int total_stripes, int real_stripes)
36127 sizeof(u64) * (total_stripes),
36128 GFP_NOFS|__GFP_NOFAIL);
36129
36130 @@ -78639,7 +94030,7 @@ index 9c62a6f..3c7df72 100644
36131 atomic_set(&bbio->refs, 1);
36132
36133 return bbio;
36134 -@@ -5866,7 +5866,7 @@ static void btrfs_end_bio(struct bio *bio)
36135 +@@ -5876,7 +5876,7 @@ static void btrfs_end_bio(struct bio *bio)
36136 int is_orig_bio = 0;
36137
36138 if (bio->bi_error) {
36139 @@ -78648,7 +94039,7 @@ index 9c62a6f..3c7df72 100644
36140 if (bio->bi_error == -EIO || bio->bi_error == -EREMOTEIO) {
36141 unsigned int stripe_index =
36142 btrfs_io_bio(bio)->stripe_index;
36143 -@@ -5904,7 +5904,7 @@ static void btrfs_end_bio(struct bio *bio)
36144 +@@ -5914,7 +5914,7 @@ static void btrfs_end_bio(struct bio *bio)
36145 /* only send an error to the higher layers if it is
36146 * beyond the tolerance of the btrfs bio
36147 */
36148 @@ -78657,7 +94048,7 @@ index 9c62a6f..3c7df72 100644
36149 bio->bi_error = -EIO;
36150 } else {
36151 /*
36152 -@@ -6015,7 +6015,7 @@ static void submit_stripe_bio(struct btrfs_root *root, struct btrfs_bio *bbio,
36153 +@@ -6025,7 +6025,7 @@ static void submit_stripe_bio(struct btrfs_root *root, struct btrfs_bio *bbio,
36154
36155 static void bbio_error(struct btrfs_bio *bbio, struct bio *bio, u64 logical)
36156 {
36157 @@ -78666,7 +94057,7 @@ index 9c62a6f..3c7df72 100644
36158 if (atomic_dec_and_test(&bbio->stripes_pending)) {
36159 /* Shoud be the original bio. */
36160 WARN_ON(bio != bbio->orig_bio);
36161 -@@ -6777,10 +6777,10 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans,
36162 +@@ -6822,10 +6822,10 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans,
36163 if (!device->dev_stats_valid || !btrfs_dev_stats_dirty(device))
36164 continue;
36165
36166 @@ -78680,7 +94071,7 @@ index 9c62a6f..3c7df72 100644
36167 mutex_unlock(&fs_devices->device_list_mutex);
36168
36169 diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
36170 -index d5c84f6..0badba4 100644
36171 +index 1939ebd..2330751 100644
36172 --- a/fs/btrfs/volumes.h
36173 +++ b/fs/btrfs/volumes.h
36174 @@ -148,8 +148,8 @@ struct btrfs_device {
36175 @@ -78753,10 +94144,10 @@ index d5c84f6..0badba4 100644
36176
36177 static inline void btrfs_dev_stat_reset(struct btrfs_device *dev,
36178 diff --git a/fs/buffer.c b/fs/buffer.c
36179 -index 4f4cd95..f19e4ab 100644
36180 +index e1632ab..f6ffc2d 100644
36181 --- a/fs/buffer.c
36182 +++ b/fs/buffer.c
36183 -@@ -3417,7 +3417,7 @@ void __init buffer_init(void)
36184 +@@ -3408,7 +3408,7 @@ void __init buffer_init(void)
36185 bh_cachep = kmem_cache_create("buffer_head",
36186 sizeof(struct buffer_head), 0,
36187 (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
36188 @@ -78786,7 +94177,7 @@ index 6af790f..ec4c1e6 100644
36189 cache->brun_percent < 100);
36190
36191 diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
36192 -index f601def..b2cf704 100644
36193 +index 452e98d..8af9de3 100644
36194 --- a/fs/cachefiles/daemon.c
36195 +++ b/fs/cachefiles/daemon.c
36196 @@ -196,7 +196,7 @@ static ssize_t cachefiles_daemon_read(struct file *file, char __user *_buffer,
36197 @@ -78807,7 +94198,7 @@ index f601def..b2cf704 100644
36198 return -EOPNOTSUPP;
36199
36200 /* drag the command string into the kernel so we can parse it */
36201 -@@ -385,7 +385,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
36202 +@@ -379,7 +379,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
36203 if (args[0] != '%' || args[1] != '\0')
36204 return -EINVAL;
36205
36206 @@ -78816,7 +94207,7 @@ index f601def..b2cf704 100644
36207 return cachefiles_daemon_range_error(cache, args);
36208
36209 cache->fstop_percent = fstop;
36210 -@@ -457,7 +457,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
36211 +@@ -451,7 +451,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
36212 if (args[0] != '%' || args[1] != '\0')
36213 return -EINVAL;
36214
36215 @@ -78864,7 +94255,7 @@ index 9c4b737..0bc3fd18 100644
36216
36217 #else
36218 diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
36219 -index c4b8934..8c9b05c 100644
36220 +index 1c2334c..0595c5f 100644
36221 --- a/fs/cachefiles/namei.c
36222 +++ b/fs/cachefiles/namei.c
36223 @@ -312,7 +312,7 @@ try_again:
36224 @@ -78907,7 +94298,7 @@ index eccd339..4c1d995 100644
36225 return 0;
36226
36227 diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
36228 -index 9314b4e..4a1f602 100644
36229 +index fd11fb2..cdc7627 100644
36230 --- a/fs/ceph/dir.c
36231 +++ b/fs/ceph/dir.c
36232 @@ -214,10 +214,18 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx,
36233 @@ -78940,7 +94331,7 @@ index 9314b4e..4a1f602 100644
36234 u32 ftype;
36235 struct ceph_mds_reply_info_parsed *rinfo;
36236 diff --git a/fs/ceph/super.c b/fs/ceph/super.c
36237 -index f446afa..0ad3b8e 100644
36238 +index ca4d5e8..16ec9c0 100644
36239 --- a/fs/ceph/super.c
36240 +++ b/fs/ceph/super.c
36241 @@ -907,7 +907,7 @@ static int ceph_compare_super(struct super_block *sb, void *data)
36242 @@ -79006,10 +94397,10 @@ index 50b2684..aa33a91 100644
36243 server->ops->print_stats(m, tcon);
36244 }
36245 diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
36246 -index cbc0f4b..230e61a 100644
36247 +index 2eea403..61eb375 100644
36248 --- a/fs/cifs/cifsfs.c
36249 +++ b/fs/cifs/cifsfs.c
36250 -@@ -1077,7 +1077,7 @@ cifs_init_request_bufs(void)
36251 +@@ -1153,7 +1153,7 @@ cifs_init_request_bufs(void)
36252 */
36253 cifs_req_cachep = kmem_cache_create("cifs_request",
36254 CIFSMaxBufSize + max_hdr_size, 0,
36255 @@ -79018,7 +94409,7 @@ index cbc0f4b..230e61a 100644
36256 if (cifs_req_cachep == NULL)
36257 return -ENOMEM;
36258
36259 -@@ -1104,7 +1104,7 @@ cifs_init_request_bufs(void)
36260 +@@ -1180,7 +1180,7 @@ cifs_init_request_bufs(void)
36261 efficient to alloc 1 per page off the slab compared to 17K (5page)
36262 alloc of large cifs buffers even when page debugging is on */
36263 cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
36264 @@ -79027,7 +94418,7 @@ index cbc0f4b..230e61a 100644
36265 NULL);
36266 if (cifs_sm_req_cachep == NULL) {
36267 mempool_destroy(cifs_req_poolp);
36268 -@@ -1189,8 +1189,8 @@ init_cifs(void)
36269 +@@ -1265,8 +1265,8 @@ init_cifs(void)
36270 atomic_set(&bufAllocCount, 0);
36271 atomic_set(&smBufAllocCount, 0);
36272 #ifdef CONFIG_CIFS_STATS2
36273 @@ -79039,10 +94430,10 @@ index cbc0f4b..230e61a 100644
36274
36275 atomic_set(&midCount, 0);
36276 diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
36277 -index 2b510c5..8962775 100644
36278 +index a25b251..b56d8c7 100644
36279 --- a/fs/cifs/cifsglob.h
36280 +++ b/fs/cifs/cifsglob.h
36281 -@@ -835,35 +835,35 @@ struct cifs_tcon {
36282 +@@ -843,35 +843,35 @@ struct cifs_tcon {
36283 __u16 Flags; /* optional support bits */
36284 enum statusEnum tidStatus;
36285 #ifdef CONFIG_CIFS_STATS
36286 @@ -79102,7 +94493,7 @@ index 2b510c5..8962775 100644
36287 } smb2_stats;
36288 #endif /* CONFIG_CIFS_SMB2 */
36289 } stats;
36290 -@@ -1213,7 +1213,7 @@ convert_delimiter(char *path, char delim)
36291 +@@ -1221,7 +1221,7 @@ convert_delimiter(char *path, char delim)
36292 }
36293
36294 #ifdef CONFIG_CIFS_STATS
36295 @@ -79111,7 +94502,7 @@ index 2b510c5..8962775 100644
36296
36297 static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
36298 unsigned int bytes)
36299 -@@ -1580,8 +1580,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
36300 +@@ -1588,8 +1588,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
36301 /* Various Debug counters */
36302 GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */
36303 #ifdef CONFIG_CIFS_STATS2
36304 @@ -79123,9 +94514,18 @@ index 2b510c5..8962775 100644
36305 GLOBAL_EXTERN atomic_t smBufAllocCount;
36306 GLOBAL_EXTERN atomic_t midCount;
36307 diff --git a/fs/cifs/file.c b/fs/cifs/file.c
36308 -index 0068e82..5ee5c2c 100644
36309 +index ff882ae..6a5c8e5 100644
36310 --- a/fs/cifs/file.c
36311 +++ b/fs/cifs/file.c
36312 +@@ -1372,7 +1372,7 @@ cifs_free_llist(struct list_head *llist)
36313 +
36314 + int
36315 + cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
36316 +- unsigned int xid)
36317 ++ const unsigned int xid)
36318 + {
36319 + int rc = 0, stored_rc;
36320 + int types[] = {LOCKING_ANDX_LARGE_FILES,
36321 @@ -2054,10 +2054,14 @@ static int cifs_writepages(struct address_space *mapping,
36322 index = mapping->writeback_index; /* Start from prev offset */
36323 end = -1;
36324 @@ -79154,7 +94554,7 @@ index 0068e82..5ee5c2c 100644
36325
36326 if (!wdata->cfile->invalidHandle ||
36327 diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
36328 -index 8442b8b..ea6986f 100644
36329 +index 813fe13..eac10c6 100644
36330 --- a/fs/cifs/misc.c
36331 +++ b/fs/cifs/misc.c
36332 @@ -170,7 +170,7 @@ cifs_buf_get(void)
36333 @@ -79285,10 +94685,10 @@ index fc537c2..47d654c 100644
36334 }
36335
36336 diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
36337 -index 53ccdde..3debfe6 100644
36338 +index 3525ed7..ac8afb7 100644
36339 --- a/fs/cifs/smb2ops.c
36340 +++ b/fs/cifs/smb2ops.c
36341 -@@ -422,8 +422,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
36342 +@@ -427,8 +427,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
36343 #ifdef CONFIG_CIFS_STATS
36344 int i;
36345 for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
36346 @@ -79299,7 +94699,7 @@ index 53ccdde..3debfe6 100644
36347 }
36348 #endif
36349 }
36350 -@@ -463,65 +463,65 @@ static void
36351 +@@ -468,65 +468,65 @@ static void
36352 smb2_print_stats(struct seq_file *m, struct cifs_tcon *tcon)
36353 {
36354 #ifdef CONFIG_CIFS_STATS
36355 @@ -79406,10 +94806,10 @@ index 53ccdde..3debfe6 100644
36356 }
36357
36358 diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
36359 -index 373b5cd..b231fe6 100644
36360 +index 42e1f44..017e7f6 100644
36361 --- a/fs/cifs/smb2pdu.c
36362 +++ b/fs/cifs/smb2pdu.c
36363 -@@ -2390,8 +2390,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
36364 +@@ -2388,8 +2388,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
36365 default:
36366 cifs_dbg(VFS, "info level %u isn't supported\n",
36367 srch_inf->info_level);
36368 @@ -79467,8 +94867,34 @@ index 5bb630a..043dc70 100644
36369 spin_unlock(&cii->c_lock);
36370
36371 return hit;
36372 +diff --git a/fs/coda/dir.c b/fs/coda/dir.c
36373 +index 42e731b..2f87bc5 100644
36374 +--- a/fs/coda/dir.c
36375 ++++ b/fs/coda/dir.c
36376 +@@ -29,11 +29,10 @@
36377 + #include "coda_int.h"
36378 +
36379 + /* same as fs/bad_inode.c */
36380 +-static int coda_return_EIO(void)
36381 ++static int coda_mknod(struct inode *inode, struct dentry *dentry, umode_t mode, dev_t dev)
36382 + {
36383 + return -EIO;
36384 + }
36385 +-#define CODA_EIO_ERROR ((void *) (coda_return_EIO))
36386 +
36387 + /* inode operations for directories */
36388 + /* access routines: lookup, readlink, permission */
36389 +@@ -562,7 +561,7 @@ const struct inode_operations coda_dir_inode_operations = {
36390 + .symlink = coda_symlink,
36391 + .mkdir = coda_mkdir,
36392 + .rmdir = coda_rmdir,
36393 +- .mknod = CODA_EIO_ERROR,
36394 ++ .mknod = coda_mknod,
36395 + .rename = coda_rename,
36396 + .permission = coda_permission,
36397 + .getattr = coda_getattr,
36398 diff --git a/fs/compat.c b/fs/compat.c
36399 -index 6fd272d..39582b6 100644
36400 +index a71936a..1659c19 100644
36401 --- a/fs/compat.c
36402 +++ b/fs/compat.c
36403 @@ -54,7 +54,7 @@
36404 @@ -79498,7 +94924,7 @@ index 6fd272d..39582b6 100644
36405 goto out;
36406 if (nr_segs > fast_segs) {
36407 ret = -ENOMEM;
36408 -@@ -844,6 +844,7 @@ struct compat_old_linux_dirent {
36409 +@@ -843,6 +843,7 @@ struct compat_old_linux_dirent {
36410 struct compat_readdir_callback {
36411 struct dir_context ctx;
36412 struct compat_old_linux_dirent __user *dirent;
36413 @@ -79506,7 +94932,7 @@ index 6fd272d..39582b6 100644
36414 int result;
36415 };
36416
36417 -@@ -863,6 +864,10 @@ static int compat_fillonedir(struct dir_context *ctx, const char *name,
36418 +@@ -862,6 +863,10 @@ static int compat_fillonedir(struct dir_context *ctx, const char *name,
36419 buf->result = -EOVERFLOW;
36420 return -EOVERFLOW;
36421 }
36422 @@ -79517,7 +94943,7 @@ index 6fd272d..39582b6 100644
36423 buf->result++;
36424 dirent = buf->dirent;
36425 if (!access_ok(VERIFY_WRITE, dirent,
36426 -@@ -894,6 +899,7 @@ COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
36427 +@@ -893,6 +898,7 @@ COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
36428 if (!f.file)
36429 return -EBADF;
36430
36431 @@ -79525,7 +94951,7 @@ index 6fd272d..39582b6 100644
36432 error = iterate_dir(f.file, &buf.ctx);
36433 if (buf.result)
36434 error = buf.result;
36435 -@@ -913,6 +919,7 @@ struct compat_getdents_callback {
36436 +@@ -912,6 +918,7 @@ struct compat_getdents_callback {
36437 struct dir_context ctx;
36438 struct compat_linux_dirent __user *current_dir;
36439 struct compat_linux_dirent __user *previous;
36440 @@ -79533,7 +94959,7 @@ index 6fd272d..39582b6 100644
36441 int count;
36442 int error;
36443 };
36444 -@@ -935,6 +942,10 @@ static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
36445 +@@ -934,6 +941,10 @@ static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
36446 buf->error = -EOVERFLOW;
36447 return -EOVERFLOW;
36448 }
36449 @@ -79544,7 +94970,7 @@ index 6fd272d..39582b6 100644
36450 dirent = buf->previous;
36451 if (dirent) {
36452 if (__put_user(offset, &dirent->d_off))
36453 -@@ -980,6 +991,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
36454 +@@ -979,6 +990,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
36455 if (!f.file)
36456 return -EBADF;
36457
36458 @@ -79552,7 +94978,7 @@ index 6fd272d..39582b6 100644
36459 error = iterate_dir(f.file, &buf.ctx);
36460 if (error >= 0)
36461 error = buf.error;
36462 -@@ -1000,6 +1012,7 @@ struct compat_getdents_callback64 {
36463 +@@ -999,6 +1011,7 @@ struct compat_getdents_callback64 {
36464 struct dir_context ctx;
36465 struct linux_dirent64 __user *current_dir;
36466 struct linux_dirent64 __user *previous;
36467 @@ -79560,7 +94986,7 @@ index 6fd272d..39582b6 100644
36468 int count;
36469 int error;
36470 };
36471 -@@ -1018,6 +1031,10 @@ static int compat_filldir64(struct dir_context *ctx, const char *name,
36472 +@@ -1017,6 +1030,10 @@ static int compat_filldir64(struct dir_context *ctx, const char *name,
36473 buf->error = -EINVAL; /* only used if we fail.. */
36474 if (reclen > buf->count)
36475 return -EINVAL;
36476 @@ -79571,7 +94997,7 @@ index 6fd272d..39582b6 100644
36477 dirent = buf->previous;
36478
36479 if (dirent) {
36480 -@@ -1067,13 +1084,13 @@ COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
36481 +@@ -1066,13 +1083,13 @@ COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
36482 if (!f.file)
36483 return -EBADF;
36484
36485 @@ -79587,7 +95013,7 @@ index 6fd272d..39582b6 100644
36486 error = -EFAULT;
36487 else
36488 error = count - buf.count;
36489 -@@ -1328,7 +1345,7 @@ COMPAT_SYSCALL_DEFINE5(select, int, n, compat_ulong_t __user *, inp,
36490 +@@ -1327,7 +1344,7 @@ COMPAT_SYSCALL_DEFINE5(select, int, n, compat_ulong_t __user *, inp,
36491 }
36492
36493 struct compat_sel_arg_struct {
36494 @@ -79615,386 +95041,19 @@ index 4d24d17..4f8c09e 100644
36495
36496 /*
36497 diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
36498 -index dcf2653..3b9fb0c 100644
36499 +index 6402eaf..113b3f7 100644
36500 --- a/fs/compat_ioctl.c
36501 +++ b/fs/compat_ioctl.c
36502 -@@ -58,6 +58,8 @@
36503 - #include <linux/atalk.h>
36504 - #include <linux/gfp.h>
36505 -
36506 -+#include "internal.h"
36507 -+
36508 - #include <net/bluetooth/bluetooth.h>
36509 - #include <net/bluetooth/hci_sock.h>
36510 - #include <net/bluetooth/rfcomm.h>
36511 -@@ -115,19 +117,38 @@
36512 - #include <asm/fbio.h>
36513 - #endif
36514 -
36515 --static int w_long(unsigned int fd, unsigned int cmd,
36516 -- compat_ulong_t __user *argp)
36517 -+#define convert_in_user(srcptr, dstptr) \
36518 -+({ \
36519 -+ typeof(*srcptr) val; \
36520 -+ \
36521 -+ get_user(val, srcptr) || put_user(val, dstptr); \
36522 -+})
36523 -+
36524 -+static int do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
36525 - {
36526 -- mm_segment_t old_fs = get_fs();
36527 - int err;
36528 -- unsigned long val;
36529 -
36530 -- set_fs (KERNEL_DS);
36531 -- err = sys_ioctl(fd, cmd, (unsigned long)&val);
36532 -- set_fs (old_fs);
36533 -- if (!err && put_user(val, argp))
36534 -+ err = security_file_ioctl(file, cmd, arg);
36535 -+ if (err)
36536 -+ return err;
36537 -+
36538 -+ return vfs_ioctl(file, cmd, arg);
36539 -+}
36540 -+
36541 -+static int w_long(struct file *file,
36542 -+ unsigned int cmd, compat_ulong_t __user *argp)
36543 -+{
36544 -+ int err;
36545 -+ unsigned long __user *valp = compat_alloc_user_space(sizeof(*valp));
36546 -+
36547 -+ if (valp == NULL)
36548 -+ return -EFAULT;
36549 -+ err = do_ioctl(file, cmd, (unsigned long)valp);
36550 -+ if (err)
36551 -+ return err;
36552 -+ if (convert_in_user(valp, argp))
36553 - return -EFAULT;
36554 -- return err;
36555 -+ return 0;
36556 - }
36557 -
36558 - struct compat_video_event {
36559 -@@ -139,23 +160,23 @@ struct compat_video_event {
36560 - } u;
36561 - };
36562 -
36563 --static int do_video_get_event(unsigned int fd, unsigned int cmd,
36564 -- struct compat_video_event __user *up)
36565 -+static int do_video_get_event(struct file *file,
36566 -+ unsigned int cmd, struct compat_video_event __user *up)
36567 - {
36568 -- struct video_event kevent;
36569 -- mm_segment_t old_fs = get_fs();
36570 -+ struct video_event __user *kevent =
36571 -+ compat_alloc_user_space(sizeof(*kevent));
36572 - int err;
36573 -
36574 -- set_fs(KERNEL_DS);
36575 -- err = sys_ioctl(fd, cmd, (unsigned long) &kevent);
36576 -- set_fs(old_fs);
36577 -+ if (kevent == NULL)
36578 -+ return -EFAULT;
36579 -
36580 -+ err = do_ioctl(file, cmd, (unsigned long)kevent);
36581 - if (!err) {
36582 -- err = put_user(kevent.type, &up->type);
36583 -- err |= put_user(kevent.timestamp, &up->timestamp);
36584 -- err |= put_user(kevent.u.size.w, &up->u.size.w);
36585 -- err |= put_user(kevent.u.size.h, &up->u.size.h);
36586 -- err |= put_user(kevent.u.size.aspect_ratio,
36587 -+ err = convert_in_user(&kevent->type, &up->type);
36588 -+ err |= convert_in_user(&kevent->timestamp, &up->timestamp);
36589 -+ err |= convert_in_user(&kevent->u.size.w, &up->u.size.w);
36590 -+ err |= convert_in_user(&kevent->u.size.h, &up->u.size.h);
36591 -+ err |= convert_in_user(&kevent->u.size.aspect_ratio,
36592 - &up->u.size.aspect_ratio);
36593 - if (err)
36594 - err = -EFAULT;
36595 -@@ -169,8 +190,8 @@ struct compat_video_still_picture {
36596 - int32_t size;
36597 - };
36598 -
36599 --static int do_video_stillpicture(unsigned int fd, unsigned int cmd,
36600 -- struct compat_video_still_picture __user *up)
36601 -+static int do_video_stillpicture(struct file *file,
36602 -+ unsigned int cmd, struct compat_video_still_picture __user *up)
36603 - {
36604 - struct video_still_picture __user *up_native;
36605 - compat_uptr_t fp;
36606 -@@ -190,7 +211,7 @@ static int do_video_stillpicture(unsigned int fd, unsigned int cmd,
36607 - if (err)
36608 - return -EFAULT;
36609 -
36610 -- err = sys_ioctl(fd, cmd, (unsigned long) up_native);
36611 -+ err = do_ioctl(file, cmd, (unsigned long) up_native);
36612 -
36613 - return err;
36614 - }
36615 -@@ -200,8 +221,8 @@ struct compat_video_spu_palette {
36616 - compat_uptr_t palette;
36617 - };
36618 -
36619 --static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd,
36620 -- struct compat_video_spu_palette __user *up)
36621 -+static int do_video_set_spu_palette(struct file *file,
36622 -+ unsigned int cmd, struct compat_video_spu_palette __user *up)
36623 - {
36624 - struct video_spu_palette __user *up_native;
36625 - compat_uptr_t palp;
36626 -@@ -218,7 +239,7 @@ static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd,
36627 - if (err)
36628 - return -EFAULT;
36629 -
36630 -- err = sys_ioctl(fd, cmd, (unsigned long) up_native);
36631 -+ err = do_ioctl(file, cmd, (unsigned long) up_native);
36632 -
36633 - return err;
36634 - }
36635 -@@ -276,7 +297,7 @@ static int sg_build_iovec(sg_io_hdr_t __user *sgio, void __user *dxferp, u16 iov
36636 - return 0;
36637 - }
36638 -
36639 --static int sg_ioctl_trans(unsigned int fd, unsigned int cmd,
36640 -+static int sg_ioctl_trans(struct file *file, unsigned int cmd,
36641 - sg_io_hdr32_t __user *sgio32)
36642 - {
36643 - sg_io_hdr_t __user *sgio;
36644 -@@ -289,7 +310,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd,
36645 - if (get_user(interface_id, &sgio32->interface_id))
36646 - return -EFAULT;
36647 - if (interface_id != 'S')
36648 -- return sys_ioctl(fd, cmd, (unsigned long)sgio32);
36649 -+ return do_ioctl(file, cmd, (unsigned long)sgio32);
36650 -
36651 - if (get_user(iovec_count, &sgio32->iovec_count))
36652 - return -EFAULT;
36653 -@@ -349,7 +370,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd,
36654 - if (put_user(compat_ptr(data), &sgio->usr_ptr))
36655 - return -EFAULT;
36656 -
36657 -- err = sys_ioctl(fd, cmd, (unsigned long) sgio);
36658 -+ err = do_ioctl(file, cmd, (unsigned long) sgio);
36659 -
36660 - if (err >= 0) {
36661 - void __user *datap;
36662 -@@ -380,13 +401,13 @@ struct compat_sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
36663 - int unused;
36664 - };
36665 -
36666 --static int sg_grt_trans(unsigned int fd, unsigned int cmd, struct
36667 -- compat_sg_req_info __user *o)
36668 -+static int sg_grt_trans(struct file *file,
36669 -+ unsigned int cmd, struct compat_sg_req_info __user *o)
36670 - {
36671 - int err, i;
36672 - sg_req_info_t __user *r;
36673 - r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE);
36674 -- err = sys_ioctl(fd,cmd,(unsigned long)r);
36675 -+ err = do_ioctl(file, cmd, (unsigned long)r);
36676 - if (err < 0)
36677 - return err;
36678 - for (i = 0; i < SG_MAX_QUEUE; i++) {
36679 -@@ -412,8 +433,8 @@ struct sock_fprog32 {
36680 - #define PPPIOCSPASS32 _IOW('t', 71, struct sock_fprog32)
36681 - #define PPPIOCSACTIVE32 _IOW('t', 70, struct sock_fprog32)
36682 -
36683 --static int ppp_sock_fprog_ioctl_trans(unsigned int fd, unsigned int cmd,
36684 -- struct sock_fprog32 __user *u_fprog32)
36685 -+static int ppp_sock_fprog_ioctl_trans(struct file *file,
36686 -+ unsigned int cmd, struct sock_fprog32 __user *u_fprog32)
36687 - {
36688 - struct sock_fprog __user *u_fprog64 = compat_alloc_user_space(sizeof(struct sock_fprog));
36689 - void __user *fptr64;
36690 -@@ -435,7 +456,7 @@ static int ppp_sock_fprog_ioctl_trans(unsigned int fd, unsigned int cmd,
36691 - else
36692 - cmd = PPPIOCSACTIVE;
36693 -
36694 -- return sys_ioctl(fd, cmd, (unsigned long) u_fprog64);
36695 -+ return do_ioctl(file, cmd, (unsigned long) u_fprog64);
36696 - }
36697 -
36698 - struct ppp_option_data32 {
36699 -@@ -451,7 +472,7 @@ struct ppp_idle32 {
36700 - };
36701 - #define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32)
36702 -
36703 --static int ppp_gidle(unsigned int fd, unsigned int cmd,
36704 -+static int ppp_gidle(struct file *file, unsigned int cmd,
36705 - struct ppp_idle32 __user *idle32)
36706 - {
36707 - struct ppp_idle __user *idle;
36708 -@@ -460,7 +481,7 @@ static int ppp_gidle(unsigned int fd, unsigned int cmd,
36709 -
36710 - idle = compat_alloc_user_space(sizeof(*idle));
36711 -
36712 -- err = sys_ioctl(fd, PPPIOCGIDLE, (unsigned long) idle);
36713 -+ err = do_ioctl(file, PPPIOCGIDLE, (unsigned long) idle);
36714 -
36715 - if (!err) {
36716 - if (get_user(xmit, &idle->xmit_idle) ||
36717 -@@ -472,7 +493,7 @@ static int ppp_gidle(unsigned int fd, unsigned int cmd,
36718 - return err;
36719 - }
36720 -
36721 --static int ppp_scompress(unsigned int fd, unsigned int cmd,
36722 -+static int ppp_scompress(struct file *file, unsigned int cmd,
36723 - struct ppp_option_data32 __user *odata32)
36724 - {
36725 - struct ppp_option_data __user *odata;
36726 -@@ -492,7 +513,7 @@ static int ppp_scompress(unsigned int fd, unsigned int cmd,
36727 - sizeof(__u32) + sizeof(int)))
36728 - return -EFAULT;
36729 -
36730 -- return sys_ioctl(fd, PPPIOCSCOMPRESS, (unsigned long) odata);
36731 -+ return do_ioctl(file, PPPIOCSCOMPRESS, (unsigned long) odata);
36732 - }
36733 -
36734 - #ifdef CONFIG_BLOCK
36735 -@@ -512,12 +533,13 @@ struct mtpos32 {
36736 - };
36737 - #define MTIOCPOS32 _IOR('m', 3, struct mtpos32)
36738 -
36739 --static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, void __user *argp)
36740 -+static int mt_ioctl_trans(struct file *file,
36741 -+ unsigned int cmd, void __user *argp)
36742 - {
36743 -- mm_segment_t old_fs = get_fs();
36744 -- struct mtget get;
36745 -+ /* NULL initialization to make gcc shut up */
36746 -+ struct mtget __user *get = NULL;
36747 - struct mtget32 __user *umget32;
36748 -- struct mtpos pos;
36749 -+ struct mtpos __user *pos = NULL;
36750 - struct mtpos32 __user *upos32;
36751 - unsigned long kcmd;
36752 - void *karg;
36753 -@@ -526,32 +548,34 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, void __user *argp)
36754 - switch(cmd) {
36755 - case MTIOCPOS32:
36756 - kcmd = MTIOCPOS;
36757 -- karg = &pos;
36758 -+ pos = compat_alloc_user_space(sizeof(*pos));
36759 -+ karg = pos;
36760 - break;
36761 - default: /* MTIOCGET32 */
36762 - kcmd = MTIOCGET;
36763 -- karg = &get;
36764 -+ get = compat_alloc_user_space(sizeof(*get));
36765 -+ karg = get;
36766 - break;
36767 - }
36768 -- set_fs (KERNEL_DS);
36769 -- err = sys_ioctl (fd, kcmd, (unsigned long)karg);
36770 -- set_fs (old_fs);
36771 -+ if (karg == NULL)
36772 -+ return -EFAULT;
36773 -+ err = do_ioctl(file, kcmd, (unsigned long)karg);
36774 - if (err)
36775 - return err;
36776 - switch (cmd) {
36777 - case MTIOCPOS32:
36778 - upos32 = argp;
36779 -- err = __put_user(pos.mt_blkno, &upos32->mt_blkno);
36780 -+ err = convert_in_user(&pos->mt_blkno, &upos32->mt_blkno);
36781 - break;
36782 - case MTIOCGET32:
36783 - umget32 = argp;
36784 -- err = __put_user(get.mt_type, &umget32->mt_type);
36785 -- err |= __put_user(get.mt_resid, &umget32->mt_resid);
36786 -- err |= __put_user(get.mt_dsreg, &umget32->mt_dsreg);
36787 -- err |= __put_user(get.mt_gstat, &umget32->mt_gstat);
36788 -- err |= __put_user(get.mt_erreg, &umget32->mt_erreg);
36789 -- err |= __put_user(get.mt_fileno, &umget32->mt_fileno);
36790 -- err |= __put_user(get.mt_blkno, &umget32->mt_blkno);
36791 -+ err = convert_in_user(&get->mt_type, &umget32->mt_type);
36792 -+ err |= convert_in_user(&get->mt_resid, &umget32->mt_resid);
36793 -+ err |= convert_in_user(&get->mt_dsreg, &umget32->mt_dsreg);
36794 -+ err |= convert_in_user(&get->mt_gstat, &umget32->mt_gstat);
36795 -+ err |= convert_in_user(&get->mt_erreg, &umget32->mt_erreg);
36796 -+ err |= convert_in_user(&get->mt_fileno, &umget32->mt_fileno);
36797 -+ err |= convert_in_user(&get->mt_blkno, &umget32->mt_blkno);
36798 - break;
36799 - }
36800 - return err ? -EFAULT: 0;
36801 -@@ -605,42 +629,41 @@ struct serial_struct32 {
36802 - compat_int_t reserved[1];
36803 - };
36804 -
36805 --static int serial_struct_ioctl(unsigned fd, unsigned cmd,
36806 -- struct serial_struct32 __user *ss32)
36807 -+static int serial_struct_ioctl(struct file *file,
36808 -+ unsigned cmd, struct serial_struct32 __user *ss32)
36809 - {
36810 - typedef struct serial_struct32 SS32;
36811 - int err;
36812 -- struct serial_struct ss;
36813 -- mm_segment_t oldseg = get_fs();
36814 -+ struct serial_struct __user *ss = compat_alloc_user_space(sizeof(*ss));
36815 - __u32 udata;
36816 - unsigned int base;
36817 -+ unsigned char *iomem_base;
36818 -
36819 -+ if (ss == NULL)
36820 -+ return -EFAULT;
36821 - if (cmd == TIOCSSERIAL) {
36822 -- if (!access_ok(VERIFY_READ, ss32, sizeof(SS32)))
36823 -- return -EFAULT;
36824 -- if (__copy_from_user(&ss, ss32, offsetof(SS32, iomem_base)))
36825 -+ if (copy_in_user(ss, ss32, offsetof(SS32, iomem_base)) ||
36826 -+ get_user(udata, &ss32->iomem_base))
36827 - return -EFAULT;
36828 -- if (__get_user(udata, &ss32->iomem_base))
36829 -+ iomem_base = compat_ptr(udata);
36830 -+ if (put_user(iomem_base, &ss->iomem_base) ||
36831 -+ convert_in_user(&ss32->iomem_reg_shift,
36832 -+ &ss->iomem_reg_shift) ||
36833 -+ convert_in_user(&ss32->port_high, &ss->port_high) ||
36834 -+ put_user(0UL, &ss->iomap_base))
36835 +@@ -645,7 +645,7 @@ static int serial_struct_ioctl(struct file *file,
36836 + if (copy_in_user(ss, ss32, offsetof(SS32, iomem_base)) ||
36837 + get_user(udata, &ss32->iomem_base))
36838 return -EFAULT;
36839 -- ss.iomem_base = compat_ptr(udata);
36840 -- if (__get_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift) ||
36841 -- __get_user(ss.port_high, &ss32->port_high))
36842 -- return -EFAULT;
36843 -- ss.iomap_base = 0UL;
36844 - }
36845 -- set_fs(KERNEL_DS);
36846 -- err = sys_ioctl(fd,cmd,(unsigned long)(&ss));
36847 -- set_fs(oldseg);
36848 -+ err = do_ioctl(file, cmd, (unsigned long)ss);
36849 - if (cmd == TIOCGSERIAL && err >= 0) {
36850 -- if (!access_ok(VERIFY_WRITE, ss32, sizeof(SS32)))
36851 -- return -EFAULT;
36852 -- if (__copy_to_user(ss32,&ss,offsetof(SS32,iomem_base)))
36853 -+ if (copy_in_user(ss32, ss, offsetof(SS32, iomem_base)) ||
36854 -+ get_user(iomem_base, &ss->iomem_base))
36855 - return -EFAULT;
36856 -- base = (unsigned long)ss.iomem_base >> 32 ?
36857 -- 0xffffffff : (unsigned)(unsigned long)ss.iomem_base;
36858 -- if (__put_user(base, &ss32->iomem_base) ||
36859 -- __put_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift) ||
36860 -- __put_user(ss.port_high, &ss32->port_high))
36861 -+ base = (unsigned long)iomem_base >> 32 ?
36862 -+ 0xffffffff : (unsigned)(unsigned long)iomem_base;
36863 -+ if (put_user(base, &ss32->iomem_base) ||
36864 -+ convert_in_user(&ss->iomem_reg_shift,
36865 -+ &ss32->iomem_reg_shift) ||
36866 -+ convert_in_user(&ss->port_high, &ss32->port_high))
36867 - return -EFAULT;
36868 - }
36869 - return err;
36870 -@@ -674,8 +697,8 @@ struct i2c_rdwr_aligned {
36871 - struct i2c_msg msgs[0];
36872 - };
36873 -
36874 --static int do_i2c_rdwr_ioctl(unsigned int fd, unsigned int cmd,
36875 -- struct i2c_rdwr_ioctl_data32 __user *udata)
36876 -+static int do_i2c_rdwr_ioctl(struct file *file,
36877 -+ unsigned int cmd, struct i2c_rdwr_ioctl_data32 __user *udata)
36878 - {
36879 - struct i2c_rdwr_aligned __user *tdata;
36880 - struct i2c_msg __user *tmsgs;
36881 -@@ -704,15 +727,15 @@ static int do_i2c_rdwr_ioctl(unsigned int fd, unsigned int cmd,
36882 +- iomem_base = compat_ptr(udata);
36883 ++ iomem_base = (unsigned char __force_kernel *)compat_ptr(udata);
36884 + if (put_user(iomem_base, &ss->iomem_base) ||
36885 + convert_in_user(&ss32->iomem_reg_shift,
36886 + &ss->iomem_reg_shift) ||
36887 +@@ -727,8 +727,8 @@ static int do_i2c_rdwr_ioctl(struct file *file,
36888 for (i = 0; i < nmsgs; i++) {
36889 if (copy_in_user(&tmsgs[i].addr, &umsgs[i].addr, 3*sizeof(u16)))
36890 return -EFAULT;
36891 @@ -80004,67 +95063,8 @@ index dcf2653..3b9fb0c 100644
36892 + put_user(compat_ptr(datap), (u8 __user * __user *)&tmsgs[i].buf))
36893 return -EFAULT;
36894 }
36895 -- return sys_ioctl(fd, cmd, (unsigned long)tdata);
36896 -+ return do_ioctl(file, cmd, (unsigned long)tdata);
36897 - }
36898 -
36899 --static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd,
36900 -- struct i2c_smbus_ioctl_data32 __user *udata)
36901 -+static int do_i2c_smbus_ioctl(struct file *file,
36902 -+ unsigned int cmd, struct i2c_smbus_ioctl_data32 __user *udata)
36903 - {
36904 - struct i2c_smbus_ioctl_data __user *tdata;
36905 - compat_caddr_t datap;
36906 -@@ -734,7 +757,7 @@ static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd,
36907 - __put_user(compat_ptr(datap), &tdata->data))
36908 - return -EFAULT;
36909 -
36910 -- return sys_ioctl(fd, cmd, (unsigned long)tdata);
36911 -+ return do_ioctl(file, cmd, (unsigned long)tdata);
36912 - }
36913 -
36914 - #define RTC_IRQP_READ32 _IOR('p', 0x0b, compat_ulong_t)
36915 -@@ -742,29 +765,27 @@ static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd,
36916 - #define RTC_EPOCH_READ32 _IOR('p', 0x0d, compat_ulong_t)
36917 - #define RTC_EPOCH_SET32 _IOW('p', 0x0e, compat_ulong_t)
36918 -
36919 --static int rtc_ioctl(unsigned fd, unsigned cmd, void __user *argp)
36920 -+static int rtc_ioctl(struct file *file,
36921 -+ unsigned cmd, void __user *argp)
36922 - {
36923 -- mm_segment_t oldfs = get_fs();
36924 -- compat_ulong_t val32;
36925 -- unsigned long kval;
36926 -+ unsigned long __user *valp = compat_alloc_user_space(sizeof(*valp));
36927 - int ret;
36928 -
36929 -+ if (valp == NULL)
36930 -+ return -EFAULT;
36931 - switch (cmd) {
36932 - case RTC_IRQP_READ32:
36933 - case RTC_EPOCH_READ32:
36934 -- set_fs(KERNEL_DS);
36935 -- ret = sys_ioctl(fd, (cmd == RTC_IRQP_READ32) ?
36936 -+ ret = do_ioctl(file, (cmd == RTC_IRQP_READ32) ?
36937 - RTC_IRQP_READ : RTC_EPOCH_READ,
36938 -- (unsigned long)&kval);
36939 -- set_fs(oldfs);
36940 -+ (unsigned long)valp);
36941 - if (ret)
36942 - return ret;
36943 -- val32 = kval;
36944 -- return put_user(val32, (unsigned int __user *)argp);
36945 -+ return convert_in_user(valp, (unsigned int __user *)argp);
36946 - case RTC_IRQP_SET32:
36947 -- return sys_ioctl(fd, RTC_IRQP_SET, (unsigned long)argp);
36948 -+ return do_ioctl(file, RTC_IRQP_SET, (unsigned long)argp);
36949 - case RTC_EPOCH_SET32:
36950 -- return sys_ioctl(fd, RTC_EPOCH_SET, (unsigned long)argp);
36951 -+ return do_ioctl(file, RTC_EPOCH_SET, (unsigned long)argp);
36952 - }
36953 -
36954 - return -ENOIOCTLCMD;
36955 -@@ -798,7 +819,7 @@ static int compat_ioctl_preallocate(struct file *file,
36956 + return do_ioctl(file, cmd, (unsigned long)tdata);
36957 +@@ -819,7 +819,7 @@ static int compat_ioctl_preallocate(struct file *file,
36958 copy_in_user(&p->l_len, &p32->l_len, sizeof(s64)) ||
36959 copy_in_user(&p->l_sysid, &p32->l_sysid, sizeof(s32)) ||
36960 copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) ||
36961 @@ -80073,94 +95073,7 @@ index dcf2653..3b9fb0c 100644
36962 return -EFAULT;
36963
36964 return ioctl_preallocate(file, p);
36965 -@@ -1436,53 +1457,53 @@ IGNORE_IOCTL(FBIOGCURSOR32)
36966 - * a compat_ioctl operation in the place that handleѕ the
36967 - * ioctl for the native case.
36968 - */
36969 --static long do_ioctl_trans(int fd, unsigned int cmd,
36970 -+static long do_ioctl_trans(unsigned int cmd,
36971 - unsigned long arg, struct file *file)
36972 - {
36973 - void __user *argp = compat_ptr(arg);
36974 -
36975 - switch (cmd) {
36976 - case PPPIOCGIDLE32:
36977 -- return ppp_gidle(fd, cmd, argp);
36978 -+ return ppp_gidle(file, cmd, argp);
36979 - case PPPIOCSCOMPRESS32:
36980 -- return ppp_scompress(fd, cmd, argp);
36981 -+ return ppp_scompress(file, cmd, argp);
36982 - case PPPIOCSPASS32:
36983 - case PPPIOCSACTIVE32:
36984 -- return ppp_sock_fprog_ioctl_trans(fd, cmd, argp);
36985 -+ return ppp_sock_fprog_ioctl_trans(file, cmd, argp);
36986 - #ifdef CONFIG_BLOCK
36987 - case SG_IO:
36988 -- return sg_ioctl_trans(fd, cmd, argp);
36989 -+ return sg_ioctl_trans(file, cmd, argp);
36990 - case SG_GET_REQUEST_TABLE:
36991 -- return sg_grt_trans(fd, cmd, argp);
36992 -+ return sg_grt_trans(file, cmd, argp);
36993 - case MTIOCGET32:
36994 - case MTIOCPOS32:
36995 -- return mt_ioctl_trans(fd, cmd, argp);
36996 -+ return mt_ioctl_trans(file, cmd, argp);
36997 - #endif
36998 - /* Serial */
36999 - case TIOCGSERIAL:
37000 - case TIOCSSERIAL:
37001 -- return serial_struct_ioctl(fd, cmd, argp);
37002 -+ return serial_struct_ioctl(file, cmd, argp);
37003 - /* i2c */
37004 - case I2C_FUNCS:
37005 -- return w_long(fd, cmd, argp);
37006 -+ return w_long(file, cmd, argp);
37007 - case I2C_RDWR:
37008 -- return do_i2c_rdwr_ioctl(fd, cmd, argp);
37009 -+ return do_i2c_rdwr_ioctl(file, cmd, argp);
37010 - case I2C_SMBUS:
37011 -- return do_i2c_smbus_ioctl(fd, cmd, argp);
37012 -+ return do_i2c_smbus_ioctl(file, cmd, argp);
37013 - /* Not implemented in the native kernel */
37014 - case RTC_IRQP_READ32:
37015 - case RTC_IRQP_SET32:
37016 - case RTC_EPOCH_READ32:
37017 - case RTC_EPOCH_SET32:
37018 -- return rtc_ioctl(fd, cmd, argp);
37019 -+ return rtc_ioctl(file, cmd, argp);
37020 -
37021 - /* dvb */
37022 - case VIDEO_GET_EVENT:
37023 -- return do_video_get_event(fd, cmd, argp);
37024 -+ return do_video_get_event(file, cmd, argp);
37025 - case VIDEO_STILLPICTURE:
37026 -- return do_video_stillpicture(fd, cmd, argp);
37027 -+ return do_video_stillpicture(file, cmd, argp);
37028 - case VIDEO_SET_SPU_PALETTE:
37029 -- return do_video_set_spu_palette(fd, cmd, argp);
37030 -+ return do_video_set_spu_palette(file, cmd, argp);
37031 - }
37032 -
37033 - /*
37034 -@@ -1513,7 +1534,7 @@ static long do_ioctl_trans(int fd, unsigned int cmd,
37035 - case NBD_SET_BLKSIZE:
37036 - case NBD_SET_SIZE:
37037 - case NBD_SET_SIZE_BLOCKS:
37038 -- return do_vfs_ioctl(file, fd, cmd, arg);
37039 -+ return vfs_ioctl(file, cmd, arg);
37040 - }
37041 -
37042 - return -ENOIOCTLCMD;
37043 -@@ -1602,7 +1623,7 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
37044 - if (compat_ioctl_check_table(XFORM(cmd)))
37045 - goto found_handler;
37046 -
37047 -- error = do_ioctl_trans(fd, cmd, arg, f.file);
37048 -+ error = do_ioctl_trans(cmd, arg, f.file);
37049 - if (error == -ENOIOCTLCMD)
37050 - error = -ENOTTY;
37051 -
37052 -@@ -1621,8 +1642,8 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
37053 +@@ -1639,8 +1639,8 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
37054 static int __init init_sys32_ioctl_cmp(const void *p, const void *q)
37055 {
37056 unsigned int a, b;
37057 @@ -80172,10 +95085,10 @@ index dcf2653..3b9fb0c 100644
37058 return 1;
37059 if (a < b)
37060 diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
37061 -index a7a1b21..023d87a 100644
37062 +index f419519..c00b5b1 100644
37063 --- a/fs/configfs/dir.c
37064 +++ b/fs/configfs/dir.c
37065 -@@ -1540,7 +1540,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
37066 +@@ -1648,7 +1648,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
37067 }
37068 for (p = q->next; p != &parent_sd->s_children; p = p->next) {
37069 struct configfs_dirent *next;
37070 @@ -80185,7 +95098,7 @@ index a7a1b21..023d87a 100644
37071 int len;
37072 struct inode *inode = NULL;
37073
37074 -@@ -1549,7 +1550,12 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
37075 +@@ -1657,7 +1658,12 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
37076 continue;
37077
37078 name = configfs_get_name(next);
37079 @@ -80200,10 +95113,10 @@ index a7a1b21..023d87a 100644
37080 /*
37081 * We'll have a dentry and an inode for
37082 diff --git a/fs/coredump.c b/fs/coredump.c
37083 -index dfc87c5..9e773ba 100644
37084 +index 47c32c3..dc0e594 100644
37085 --- a/fs/coredump.c
37086 +++ b/fs/coredump.c
37087 -@@ -459,8 +459,8 @@ static void wait_for_dump_helpers(struct file *file)
37088 +@@ -481,8 +481,8 @@ static void wait_for_dump_helpers(struct file *file)
37089 struct pipe_inode_info *pipe = file->private_data;
37090
37091 pipe_lock(pipe);
37092 @@ -80214,7 +95127,7 @@ index dfc87c5..9e773ba 100644
37093 wake_up_interruptible_sync(&pipe->wait);
37094 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
37095 pipe_unlock(pipe);
37096 -@@ -469,11 +469,11 @@ static void wait_for_dump_helpers(struct file *file)
37097 +@@ -491,11 +491,11 @@ static void wait_for_dump_helpers(struct file *file)
37098 * We actually want wait_event_freezable() but then we need
37099 * to clear TIF_SIGPENDING and improve dump_interrupted().
37100 */
37101 @@ -80229,7 +95142,7 @@ index dfc87c5..9e773ba 100644
37102 pipe_unlock(pipe);
37103 }
37104
37105 -@@ -520,7 +520,9 @@ void do_coredump(const siginfo_t *siginfo)
37106 +@@ -542,7 +542,9 @@ void do_coredump(const siginfo_t *siginfo)
37107 /* require nonrelative corefile path and be extra careful */
37108 bool need_suid_safe = false;
37109 bool core_dumped = false;
37110 @@ -80240,7 +95153,7 @@ index dfc87c5..9e773ba 100644
37111 struct coredump_params cprm = {
37112 .siginfo = siginfo,
37113 .regs = signal_pt_regs(),
37114 -@@ -533,12 +535,17 @@ void do_coredump(const siginfo_t *siginfo)
37115 +@@ -555,12 +557,17 @@ void do_coredump(const siginfo_t *siginfo)
37116 .mm_flags = mm->flags,
37117 };
37118
37119 @@ -80260,7 +95173,7 @@ index dfc87c5..9e773ba 100644
37120 goto fail;
37121
37122 cred = prepare_creds();
37123 -@@ -556,7 +563,7 @@ void do_coredump(const siginfo_t *siginfo)
37124 +@@ -578,7 +585,7 @@ void do_coredump(const siginfo_t *siginfo)
37125 need_suid_safe = true;
37126 }
37127
37128 @@ -80269,7 +95182,7 @@ index dfc87c5..9e773ba 100644
37129 if (retval < 0)
37130 goto fail_creds;
37131
37132 -@@ -599,7 +606,7 @@ void do_coredump(const siginfo_t *siginfo)
37133 +@@ -621,7 +628,7 @@ void do_coredump(const siginfo_t *siginfo)
37134 }
37135 cprm.limit = RLIM_INFINITY;
37136
37137 @@ -80278,7 +95191,7 @@ index dfc87c5..9e773ba 100644
37138 if (core_pipe_limit && (core_pipe_limit < dump_count)) {
37139 printk(KERN_WARNING "Pid %d(%s) over core_pipe_limit\n",
37140 task_tgid_vnr(current), current->comm);
37141 -@@ -633,6 +640,8 @@ void do_coredump(const siginfo_t *siginfo)
37142 +@@ -655,6 +662,8 @@ void do_coredump(const siginfo_t *siginfo)
37143 int open_flags = O_CREAT | O_RDWR | O_NOFOLLOW |
37144 O_LARGEFILE | O_EXCL;
37145
37146 @@ -80287,7 +95200,7 @@ index dfc87c5..9e773ba 100644
37147 if (cprm.limit < binfmt->min_coredump)
37148 goto fail_unlock;
37149
37150 -@@ -658,7 +667,7 @@ void do_coredump(const siginfo_t *siginfo)
37151 +@@ -680,7 +689,7 @@ void do_coredump(const siginfo_t *siginfo)
37152 * If it doesn't exist, that's fine. If there's some
37153 * other problem, we'll catch it at the filp_open().
37154 */
37155 @@ -80296,7 +95209,7 @@ index dfc87c5..9e773ba 100644
37156 set_fs(old_fs);
37157 }
37158
37159 -@@ -739,7 +748,7 @@ close_fail:
37160 +@@ -761,7 +770,7 @@ close_fail:
37161 filp_close(cprm.file, NULL);
37162 fail_dropcount:
37163 if (ispipe)
37164 @@ -80305,7 +95218,7 @@ index dfc87c5..9e773ba 100644
37165 fail_unlock:
37166 kfree(cn.corename);
37167 coredump_finish(mm, core_dumped);
37168 -@@ -760,6 +769,8 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
37169 +@@ -782,6 +791,8 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
37170 struct file *file = cprm->file;
37171 loff_t pos = file->f_pos;
37172 ssize_t n;
37173 @@ -80315,7 +95228,7 @@ index dfc87c5..9e773ba 100644
37174 return 0;
37175 while (nr) {
37176 diff --git a/fs/dcache.c b/fs/dcache.c
37177 -index 18effa3..58ad60d 100644
37178 +index 7566b26..660a3cc 100644
37179 --- a/fs/dcache.c
37180 +++ b/fs/dcache.c
37181 @@ -328,8 +328,9 @@ static inline void dentry_rcuwalk_invalidate(struct dentry *dentry)
37182 @@ -80500,12 +95413,12 @@ index 18effa3..58ad60d 100644
37183 dentry->d_iname[DNAME_INLINE_LEN-1] = 0;
37184 if (name->len > DNAME_INLINE_LEN-1) {
37185 size_t size = offsetof(struct external_name, name[1]);
37186 -- struct external_name *p = kmalloc(size + name->len, GFP_KERNEL);
37187 -+ struct external_name *p = kmalloc(round_up(size + name->len, sizeof(unsigned long)), GFP_KERNEL);
37188 +- struct external_name *p = kmalloc(size + name->len,
37189 ++ struct external_name *p = kmalloc(round_up(size + name->len, sizeof(unsigned long)),
37190 + GFP_KERNEL_ACCOUNT);
37191 if (!p) {
37192 kmem_cache_free(dentry_cache, dentry);
37193 - return NULL;
37194 -@@ -1583,7 +1586,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
37195 +@@ -1584,7 +1587,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
37196 smp_wmb();
37197 dentry->d_name.name = dname;
37198
37199 @@ -80514,7 +95427,7 @@ index 18effa3..58ad60d 100644
37200 dentry->d_flags = 0;
37201 spin_lock_init(&dentry->d_lock);
37202 seqcount_init(&dentry->d_seq);
37203 -@@ -1592,6 +1595,9 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
37204 +@@ -1593,6 +1596,9 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
37205 dentry->d_sb = sb;
37206 dentry->d_op = NULL;
37207 dentry->d_fsdata = NULL;
37208 @@ -80524,7 +95437,7 @@ index 18effa3..58ad60d 100644
37209 INIT_HLIST_BL_NODE(&dentry->d_hash);
37210 INIT_LIST_HEAD(&dentry->d_lru);
37211 INIT_LIST_HEAD(&dentry->d_subdirs);
37212 -@@ -2320,7 +2326,7 @@ struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
37213 +@@ -2321,7 +2327,7 @@ struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
37214 goto next;
37215 }
37216
37217 @@ -80533,7 +95446,7 @@ index 18effa3..58ad60d 100644
37218 found = dentry;
37219 spin_unlock(&dentry->d_lock);
37220 break;
37221 -@@ -2388,7 +2394,7 @@ again:
37222 +@@ -2389,7 +2395,7 @@ again:
37223 spin_lock(&dentry->d_lock);
37224 inode = dentry->d_inode;
37225 isdir = S_ISDIR(inode->i_mode);
37226 @@ -80542,7 +95455,7 @@ index 18effa3..58ad60d 100644
37227 if (!spin_trylock(&inode->i_lock)) {
37228 spin_unlock(&dentry->d_lock);
37229 cpu_relax();
37230 -@@ -3336,7 +3342,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
37231 +@@ -3337,7 +3343,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
37232
37233 if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
37234 dentry->d_flags |= DCACHE_GENOCIDE;
37235 @@ -80551,7 +95464,7 @@ index 18effa3..58ad60d 100644
37236 }
37237 }
37238 return D_WALK_CONTINUE;
37239 -@@ -3444,7 +3450,8 @@ void __init vfs_caches_init_early(void)
37240 +@@ -3445,7 +3451,8 @@ void __init vfs_caches_init_early(void)
37241 void __init vfs_caches_init(void)
37242 {
37243 names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
37244 @@ -80562,10 +95475,21 @@ index 18effa3..58ad60d 100644
37245 dcache_init();
37246 inode_init();
37247 diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
37248 -index b7fcc0d..5da55c8 100644
37249 +index bece948..e657aeb 100644
37250 --- a/fs/debugfs/inode.c
37251 +++ b/fs/debugfs/inode.c
37252 -@@ -406,6 +406,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_file_size);
37253 +@@ -247,6 +247,10 @@ static struct dentry *start_creating(const char *name, struct dentry *parent)
37254 + struct dentry *dentry;
37255 + int error;
37256 +
37257 ++#ifdef CONFIG_GRKERNSEC_KMEM
37258 ++ return ERR_PTR(-ENODEV);
37259 ++#endif
37260 ++
37261 + pr_debug("debugfs: creating file '%s'\n",name);
37262 +
37263 + if (IS_ERR(parent))
37264 +@@ -406,6 +410,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_file_size);
37265 * If debugfs is not enabled in the kernel, the value -%ENODEV will be
37266 * returned.
37267 */
37268 @@ -80576,7 +95500,7 @@ index b7fcc0d..5da55c8 100644
37269 struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
37270 {
37271 struct dentry *dentry = start_creating(name, parent);
37272 -@@ -418,7 +422,12 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
37273 +@@ -418,7 +426,12 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
37274 if (unlikely(!inode))
37275 return failed_creating(dentry);
37276
37277 @@ -80590,11 +95514,22 @@ index b7fcc0d..5da55c8 100644
37278 inode->i_op = &simple_dir_inode_operations;
37279 inode->i_fop = &simple_dir_operations;
37280
37281 +@@ -721,6 +734,10 @@ static int __init debugfs_init(void)
37282 + {
37283 + int retval;
37284 +
37285 ++#ifdef CONFIG_GRKERNSEC_KMEM
37286 ++ return -ENOSYS;
37287 ++#endif
37288 ++
37289 + retval = sysfs_create_mount_point(kernel_kobj, "debug");
37290 + if (retval)
37291 + return retval;
37292 diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
37293 -index e2e47ba..221b0a3 100644
37294 +index 4e685ac..462fc20 100644
37295 --- a/fs/ecryptfs/inode.c
37296 +++ b/fs/ecryptfs/inode.c
37297 -@@ -662,7 +662,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
37298 +@@ -660,7 +660,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
37299 old_fs = get_fs();
37300 set_fs(get_ds());
37301 rc = d_inode(lower_dentry)->i_op->readlink(lower_dentry,
37302 @@ -80641,7 +95576,7 @@ index e4141f2..d8263e8 100644
37303 i += packet_length_size;
37304 if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
37305 diff --git a/fs/exec.c b/fs/exec.c
37306 -index b06623a..d1a8125 100644
37307 +index dcd4ac7..b1bb7fa 100644
37308 --- a/fs/exec.c
37309 +++ b/fs/exec.c
37310 @@ -56,8 +56,20 @@
37311 @@ -80939,7 +95874,7 @@ index b06623a..d1a8125 100644
37312 + int unsafe_flags = 0;
37313 struct open_flags open_exec_flags = {
37314 .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
37315 - .acc_mode = MAY_EXEC | MAY_OPEN,
37316 + .acc_mode = MAY_EXEC,
37317 @@ -786,12 +863,22 @@ static struct file *do_open_execat(int fd, struct filename *name, int flags)
37318 if (path_noexec(&file->f_path))
37319 goto exit;
37320 @@ -81471,6 +96406,31 @@ index b06623a..d1a8125 100644
37321 +}
37322 +EXPORT_SYMBOL(report_size_overflow);
37323 +#endif
37324 +diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
37325 +index 9eaf595..46a4777a 100644
37326 +--- a/fs/exofs/inode.c
37327 ++++ b/fs/exofs/inode.c
37328 +@@ -470,6 +470,11 @@ fail:
37329 + return ret;
37330 + }
37331 +
37332 ++static int readpage_filler(struct file *data, struct page *page)
37333 ++{
37334 ++ return readpage_strip(data, page);
37335 ++}
37336 ++
37337 + static int exofs_readpages(struct file *file, struct address_space *mapping,
37338 + struct list_head *pages, unsigned nr_pages)
37339 + {
37340 +@@ -478,7 +483,7 @@ static int exofs_readpages(struct file *file, struct address_space *mapping,
37341 +
37342 + _pcol_init(&pcol, nr_pages, mapping->host);
37343 +
37344 +- ret = read_cache_pages(mapping, pages, readpage_strip, &pcol);
37345 ++ ret = read_cache_pages(mapping, pages, readpage_filler, &pcol);
37346 + if (ret) {
37347 + EXOFS_ERR("read_cache_pages => %d\n", ret);
37348 + return ret;
37349 diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
37350 index 9f9992b..8b59411 100644
37351 --- a/fs/ext2/balloc.c
37352 @@ -81489,7 +96449,7 @@ index 9f9992b..8b59411 100644
37353 }
37354 return 1;
37355 diff --git a/fs/ext2/super.c b/fs/ext2/super.c
37356 -index 748d35a..87114f0 100644
37357 +index 2a18841..d2398be 100644
37358 --- a/fs/ext2/super.c
37359 +++ b/fs/ext2/super.c
37360 @@ -270,10 +270,8 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
37361 @@ -81516,10 +96476,10 @@ index 748d35a..87114f0 100644
37362 #ifdef CONFIG_EXT2_FS_POSIX_ACL
37363 if (def_mount_opts & EXT2_DEFM_ACL)
37364 diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
37365 -index fa70848..57b36d2 100644
37366 +index f57a7ab..b41d596 100644
37367 --- a/fs/ext2/xattr.c
37368 +++ b/fs/ext2/xattr.c
37369 -@@ -247,7 +247,7 @@ ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
37370 +@@ -245,7 +245,7 @@ ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
37371 struct buffer_head *bh = NULL;
37372 struct ext2_xattr_entry *entry;
37373 char *end;
37374 @@ -81528,8 +96488,8 @@ index fa70848..57b36d2 100644
37375 int error;
37376
37377 ea_idebug(inode, "buffer=%p, buffer_size=%ld",
37378 -@@ -304,9 +304,10 @@ bad_block: ext2_error(inode->i_sb, "ext2_xattr_list",
37379 - buffer += size;
37380 +@@ -307,9 +307,10 @@ bad_block: ext2_error(inode->i_sb, "ext2_xattr_list",
37381 + *buffer++ = 0;
37382 }
37383 rest -= size;
37384 + total_size += size;
37385 @@ -81556,26 +96516,10 @@ index fe1f50f..3f4c870 100644
37386 if (free_clusters >= (nclusters + dirty_clusters +
37387 resv_clusters))
37388 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
37389 -index d4156e1..968858a 100644
37390 +index b213449..39f6a05 100644
37391 --- a/fs/ext4/ext4.h
37392 +++ b/fs/ext4/ext4.h
37393 -@@ -933,6 +933,15 @@ struct ext4_inode_info {
37394 - * by other means, so we have i_data_sem.
37395 - */
37396 - struct rw_semaphore i_data_sem;
37397 -+ /*
37398 -+ * i_mmap_sem is for serializing page faults with truncate / punch hole
37399 -+ * operations. We have to make sure that new page cannot be faulted in
37400 -+ * a section of the inode that is being punched. We cannot easily use
37401 -+ * i_data_sem for this since we need protection for the whole punch
37402 -+ * operation and i_data_sem ranks below transaction start so we have
37403 -+ * to occasionally drop it.
37404 -+ */
37405 -+ struct rw_semaphore i_mmap_sem;
37406 - struct inode vfs_inode;
37407 - struct jbd2_inode *jinode;
37408 -
37409 -@@ -1374,19 +1383,19 @@ struct ext4_sb_info {
37410 +@@ -1434,19 +1434,19 @@ struct ext4_sb_info {
37411 unsigned long s_mb_last_start;
37412
37413 /* stats for buddy allocator */
37414 @@ -81605,26 +96549,8 @@ index d4156e1..968858a 100644
37415 atomic_t s_lock_busy;
37416
37417 /* locality groups */
37418 -@@ -2507,6 +2516,7 @@ extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
37419 - extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,
37420 - loff_t lstart, loff_t lend);
37421 - extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf);
37422 -+extern int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
37423 - extern qsize_t *ext4_get_reserved_space(struct inode *inode);
37424 - extern void ext4_da_update_reserve_space(struct inode *inode,
37425 - int used, int quota_claim);
37426 -@@ -2871,6 +2881,9 @@ static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize)
37427 - return changed;
37428 - }
37429 -
37430 -+int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
37431 -+ loff_t len);
37432 -+
37433 - struct ext4_group_info {
37434 - unsigned long bb_state;
37435 - struct rb_root bb_free_root;
37436 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
37437 -index 551353b..1c45aae 100644
37438 +index 3753ceb..bddcd49 100644
37439 --- a/fs/ext4/extents.c
37440 +++ b/fs/ext4/extents.c
37441 @@ -863,7 +863,7 @@ ext4_find_extent(struct inode *inode, ext4_lblk_t block,
37442 @@ -81636,527 +96562,8 @@ index 551353b..1c45aae 100644
37443 int ret;
37444
37445 eh = ext_inode_hdr(inode);
37446 -@@ -4685,10 +4685,6 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
37447 - if (len <= EXT_UNWRITTEN_MAX_LEN)
37448 - flags |= EXT4_GET_BLOCKS_NO_NORMALIZE;
37449 -
37450 -- /* Wait all existing dio workers, newcomers will block on i_mutex */
37451 -- ext4_inode_block_unlocked_dio(inode);
37452 -- inode_dio_wait(inode);
37453 --
37454 - /*
37455 - * credits to insert 1 extent into extent tree
37456 - */
37457 -@@ -4752,8 +4748,6 @@ retry:
37458 - goto retry;
37459 - }
37460 -
37461 -- ext4_inode_resume_unlocked_dio(inode);
37462 --
37463 - return ret > 0 ? ret2 : ret;
37464 - }
37465 -
37466 -@@ -4770,7 +4764,6 @@ static long ext4_zero_range(struct file *file, loff_t offset,
37467 - int partial_begin, partial_end;
37468 - loff_t start, end;
37469 - ext4_lblk_t lblk;
37470 -- struct address_space *mapping = inode->i_mapping;
37471 - unsigned int blkbits = inode->i_blkbits;
37472 -
37473 - trace_ext4_zero_range(inode, offset, len, mode);
37474 -@@ -4786,17 +4779,6 @@ static long ext4_zero_range(struct file *file, loff_t offset,
37475 - }
37476 -
37477 - /*
37478 -- * Write out all dirty pages to avoid race conditions
37479 -- * Then release them.
37480 -- */
37481 -- if (mapping->nrpages && mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
37482 -- ret = filemap_write_and_wait_range(mapping, offset,
37483 -- offset + len - 1);
37484 -- if (ret)
37485 -- return ret;
37486 -- }
37487 --
37488 -- /*
37489 - * Round up offset. This is not fallocate, we neet to zero out
37490 - * blocks, so convert interior block aligned part of the range to
37491 - * unwritten and possibly manually zero out unaligned parts of the
37492 -@@ -4839,6 +4821,10 @@ static long ext4_zero_range(struct file *file, loff_t offset,
37493 - if (mode & FALLOC_FL_KEEP_SIZE)
37494 - flags |= EXT4_GET_BLOCKS_KEEP_SIZE;
37495 -
37496 -+ /* Wait all existing dio workers, newcomers will block on i_mutex */
37497 -+ ext4_inode_block_unlocked_dio(inode);
37498 -+ inode_dio_wait(inode);
37499 -+
37500 - /* Preallocate the range including the unaligned edges */
37501 - if (partial_begin || partial_end) {
37502 - ret = ext4_alloc_file_blocks(file,
37503 -@@ -4847,7 +4833,7 @@ static long ext4_zero_range(struct file *file, loff_t offset,
37504 - round_down(offset, 1 << blkbits)) >> blkbits,
37505 - new_size, flags, mode);
37506 - if (ret)
37507 -- goto out_mutex;
37508 -+ goto out_dio;
37509 -
37510 - }
37511 -
37512 -@@ -4856,16 +4842,23 @@ static long ext4_zero_range(struct file *file, loff_t offset,
37513 - flags |= (EXT4_GET_BLOCKS_CONVERT_UNWRITTEN |
37514 - EXT4_EX_NOCACHE);
37515 -
37516 -- /* Now release the pages and zero block aligned part of pages*/
37517 -+ /*
37518 -+ * Prevent page faults from reinstantiating pages we have
37519 -+ * released from page cache.
37520 -+ */
37521 -+ down_write(&EXT4_I(inode)->i_mmap_sem);
37522 -+ ret = ext4_update_disksize_before_punch(inode, offset, len);
37523 -+ if (ret) {
37524 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
37525 -+ goto out_dio;
37526 -+ }
37527 -+ /* Now release the pages and zero block aligned part of pages */
37528 - truncate_pagecache_range(inode, start, end - 1);
37529 - inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
37530 -
37531 -- /* Wait all existing dio workers, newcomers will block on i_mutex */
37532 -- ext4_inode_block_unlocked_dio(inode);
37533 -- inode_dio_wait(inode);
37534 --
37535 - ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size,
37536 - flags, mode);
37537 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
37538 - if (ret)
37539 - goto out_dio;
37540 - }
37541 -@@ -4998,8 +4991,13 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
37542 - goto out;
37543 - }
37544 -
37545 -+ /* Wait all existing dio workers, newcomers will block on i_mutex */
37546 -+ ext4_inode_block_unlocked_dio(inode);
37547 -+ inode_dio_wait(inode);
37548 -+
37549 - ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size,
37550 - flags, mode);
37551 -+ ext4_inode_resume_unlocked_dio(inode);
37552 - if (ret)
37553 - goto out;
37554 -
37555 -@@ -5494,21 +5492,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
37556 - return ret;
37557 - }
37558 -
37559 -- /*
37560 -- * Need to round down offset to be aligned with page size boundary
37561 -- * for page size > block size.
37562 -- */
37563 -- ioffset = round_down(offset, PAGE_SIZE);
37564 --
37565 -- /* Write out all dirty pages */
37566 -- ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
37567 -- LLONG_MAX);
37568 -- if (ret)
37569 -- return ret;
37570 --
37571 -- /* Take mutex lock */
37572 - mutex_lock(&inode->i_mutex);
37573 --
37574 - /*
37575 - * There is no need to overlap collapse range with EOF, in which case
37576 - * it is effectively a truncate operation
37577 -@@ -5524,17 +5508,43 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
37578 - goto out_mutex;
37579 - }
37580 -
37581 -- truncate_pagecache(inode, ioffset);
37582 --
37583 - /* Wait for existing dio to complete */
37584 - ext4_inode_block_unlocked_dio(inode);
37585 - inode_dio_wait(inode);
37586 -
37587 -+ /*
37588 -+ * Prevent page faults from reinstantiating pages we have released from
37589 -+ * page cache.
37590 -+ */
37591 -+ down_write(&EXT4_I(inode)->i_mmap_sem);
37592 -+ /*
37593 -+ * Need to round down offset to be aligned with page size boundary
37594 -+ * for page size > block size.
37595 -+ */
37596 -+ ioffset = round_down(offset, PAGE_SIZE);
37597 -+ /*
37598 -+ * Write tail of the last page before removed range since it will get
37599 -+ * removed from the page cache below.
37600 -+ */
37601 -+ ret = filemap_write_and_wait_range(inode->i_mapping, ioffset, offset);
37602 -+ if (ret)
37603 -+ goto out_mmap;
37604 -+ /*
37605 -+ * Write data that will be shifted to preserve them when discarding
37606 -+ * page cache below. We are also protected from pages becoming dirty
37607 -+ * by i_mmap_sem.
37608 -+ */
37609 -+ ret = filemap_write_and_wait_range(inode->i_mapping, offset + len,
37610 -+ LLONG_MAX);
37611 -+ if (ret)
37612 -+ goto out_mmap;
37613 -+ truncate_pagecache(inode, ioffset);
37614 -+
37615 - credits = ext4_writepage_trans_blocks(inode);
37616 - handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, credits);
37617 - if (IS_ERR(handle)) {
37618 - ret = PTR_ERR(handle);
37619 -- goto out_dio;
37620 -+ goto out_mmap;
37621 - }
37622 -
37623 - down_write(&EXT4_I(inode)->i_data_sem);
37624 -@@ -5573,7 +5583,8 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
37625 -
37626 - out_stop:
37627 - ext4_journal_stop(handle);
37628 --out_dio:
37629 -+out_mmap:
37630 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
37631 - ext4_inode_resume_unlocked_dio(inode);
37632 - out_mutex:
37633 - mutex_unlock(&inode->i_mutex);
37634 -@@ -5627,21 +5638,7 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
37635 - return ret;
37636 - }
37637 -
37638 -- /*
37639 -- * Need to round down to align start offset to page size boundary
37640 -- * for page size > block size.
37641 -- */
37642 -- ioffset = round_down(offset, PAGE_SIZE);
37643 --
37644 -- /* Write out all dirty pages */
37645 -- ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
37646 -- LLONG_MAX);
37647 -- if (ret)
37648 -- return ret;
37649 --
37650 -- /* Take mutex lock */
37651 - mutex_lock(&inode->i_mutex);
37652 --
37653 - /* Currently just for extent based files */
37654 - if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) {
37655 - ret = -EOPNOTSUPP;
37656 -@@ -5660,17 +5657,32 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
37657 - goto out_mutex;
37658 - }
37659 -
37660 -- truncate_pagecache(inode, ioffset);
37661 --
37662 - /* Wait for existing dio to complete */
37663 - ext4_inode_block_unlocked_dio(inode);
37664 - inode_dio_wait(inode);
37665 -
37666 -+ /*
37667 -+ * Prevent page faults from reinstantiating pages we have released from
37668 -+ * page cache.
37669 -+ */
37670 -+ down_write(&EXT4_I(inode)->i_mmap_sem);
37671 -+ /*
37672 -+ * Need to round down to align start offset to page size boundary
37673 -+ * for page size > block size.
37674 -+ */
37675 -+ ioffset = round_down(offset, PAGE_SIZE);
37676 -+ /* Write out all dirty pages */
37677 -+ ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
37678 -+ LLONG_MAX);
37679 -+ if (ret)
37680 -+ goto out_mmap;
37681 -+ truncate_pagecache(inode, ioffset);
37682 -+
37683 - credits = ext4_writepage_trans_blocks(inode);
37684 - handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, credits);
37685 - if (IS_ERR(handle)) {
37686 - ret = PTR_ERR(handle);
37687 -- goto out_dio;
37688 -+ goto out_mmap;
37689 - }
37690 -
37691 - /* Expand file to avoid data loss if there is error while shifting */
37692 -@@ -5741,7 +5753,8 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
37693 -
37694 - out_stop:
37695 - ext4_journal_stop(handle);
37696 --out_dio:
37697 -+out_mmap:
37698 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
37699 - ext4_inode_resume_unlocked_dio(inode);
37700 - out_mutex:
37701 - mutex_unlock(&inode->i_mutex);
37702 -diff --git a/fs/ext4/file.c b/fs/ext4/file.c
37703 -index 113837e..0d24ebc 100644
37704 ---- a/fs/ext4/file.c
37705 -+++ b/fs/ext4/file.c
37706 -@@ -209,15 +209,18 @@ static int ext4_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
37707 - {
37708 - int result;
37709 - handle_t *handle = NULL;
37710 -- struct super_block *sb = file_inode(vma->vm_file)->i_sb;
37711 -+ struct inode *inode = file_inode(vma->vm_file);
37712 -+ struct super_block *sb = inode->i_sb;
37713 - bool write = vmf->flags & FAULT_FLAG_WRITE;
37714 -
37715 - if (write) {
37716 - sb_start_pagefault(sb);
37717 - file_update_time(vma->vm_file);
37718 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37719 - handle = ext4_journal_start_sb(sb, EXT4_HT_WRITE_PAGE,
37720 - EXT4_DATA_TRANS_BLOCKS(sb));
37721 -- }
37722 -+ } else
37723 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37724 -
37725 - if (IS_ERR(handle))
37726 - result = VM_FAULT_SIGBUS;
37727 -@@ -228,8 +231,10 @@ static int ext4_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
37728 - if (write) {
37729 - if (!IS_ERR(handle))
37730 - ext4_journal_stop(handle);
37731 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37732 - sb_end_pagefault(sb);
37733 -- }
37734 -+ } else
37735 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37736 -
37737 - return result;
37738 - }
37739 -@@ -246,10 +251,12 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,
37740 - if (write) {
37741 - sb_start_pagefault(sb);
37742 - file_update_time(vma->vm_file);
37743 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37744 - handle = ext4_journal_start_sb(sb, EXT4_HT_WRITE_PAGE,
37745 - ext4_chunk_trans_blocks(inode,
37746 - PMD_SIZE / PAGE_SIZE));
37747 -- }
37748 -+ } else
37749 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37750 -
37751 - if (IS_ERR(handle))
37752 - result = VM_FAULT_SIGBUS;
37753 -@@ -260,30 +267,71 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,
37754 - if (write) {
37755 - if (!IS_ERR(handle))
37756 - ext4_journal_stop(handle);
37757 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37758 - sb_end_pagefault(sb);
37759 -- }
37760 -+ } else
37761 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37762 -
37763 - return result;
37764 - }
37765 -
37766 - static int ext4_dax_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
37767 - {
37768 -- return dax_mkwrite(vma, vmf, ext4_get_block_dax,
37769 -- ext4_end_io_unwritten);
37770 -+ int err;
37771 -+ struct inode *inode = file_inode(vma->vm_file);
37772 -+
37773 -+ sb_start_pagefault(inode->i_sb);
37774 -+ file_update_time(vma->vm_file);
37775 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37776 -+ err = __dax_mkwrite(vma, vmf, ext4_get_block_dax,
37777 -+ ext4_end_io_unwritten);
37778 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37779 -+ sb_end_pagefault(inode->i_sb);
37780 -+
37781 -+ return err;
37782 -+}
37783 -+
37784 -+/*
37785 -+ * Handle write fault for VM_MIXEDMAP mappings. Similarly to ext4_dax_mkwrite()
37786 -+ * handler we check for races agaist truncate. Note that since we cycle through
37787 -+ * i_mmap_sem, we are sure that also any hole punching that began before we
37788 -+ * were called is finished by now and so if it included part of the file we
37789 -+ * are working on, our pte will get unmapped and the check for pte_same() in
37790 -+ * wp_pfn_shared() fails. Thus fault gets retried and things work out as
37791 -+ * desired.
37792 -+ */
37793 -+static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma,
37794 -+ struct vm_fault *vmf)
37795 -+{
37796 -+ struct inode *inode = file_inode(vma->vm_file);
37797 -+ struct super_block *sb = inode->i_sb;
37798 -+ int ret = VM_FAULT_NOPAGE;
37799 -+ loff_t size;
37800 -+
37801 -+ sb_start_pagefault(sb);
37802 -+ file_update_time(vma->vm_file);
37803 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37804 -+ size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
37805 -+ if (vmf->pgoff >= size)
37806 -+ ret = VM_FAULT_SIGBUS;
37807 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37808 -+ sb_end_pagefault(sb);
37809 -+
37810 -+ return ret;
37811 - }
37812 -
37813 - static const struct vm_operations_struct ext4_dax_vm_ops = {
37814 - .fault = ext4_dax_fault,
37815 - .pmd_fault = ext4_dax_pmd_fault,
37816 - .page_mkwrite = ext4_dax_mkwrite,
37817 -- .pfn_mkwrite = dax_pfn_mkwrite,
37818 -+ .pfn_mkwrite = ext4_dax_pfn_mkwrite,
37819 - };
37820 - #else
37821 - #define ext4_dax_vm_ops ext4_file_vm_ops
37822 - #endif
37823 -
37824 - static const struct vm_operations_struct ext4_file_vm_ops = {
37825 -- .fault = filemap_fault,
37826 -+ .fault = ext4_filemap_fault,
37827 - .map_pages = filemap_map_pages,
37828 - .page_mkwrite = ext4_page_mkwrite,
37829 - };
37830 -diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
37831 -index 06bda03..e573d11 100644
37832 ---- a/fs/ext4/inode.c
37833 -+++ b/fs/ext4/inode.c
37834 -@@ -3587,6 +3587,35 @@ int ext4_can_truncate(struct inode *inode)
37835 - }
37836 -
37837 - /*
37838 -+ * We have to make sure i_disksize gets properly updated before we truncate
37839 -+ * page cache due to hole punching or zero range. Otherwise i_disksize update
37840 -+ * can get lost as it may have been postponed to submission of writeback but
37841 -+ * that will never happen after we truncate page cache.
37842 -+ */
37843 -+int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
37844 -+ loff_t len)
37845 -+{
37846 -+ handle_t *handle;
37847 -+ loff_t size = i_size_read(inode);
37848 -+
37849 -+ WARN_ON(!mutex_is_locked(&inode->i_mutex));
37850 -+ if (offset > size || offset + len < size)
37851 -+ return 0;
37852 -+
37853 -+ if (EXT4_I(inode)->i_disksize >= size)
37854 -+ return 0;
37855 -+
37856 -+ handle = ext4_journal_start(inode, EXT4_HT_MISC, 1);
37857 -+ if (IS_ERR(handle))
37858 -+ return PTR_ERR(handle);
37859 -+ ext4_update_i_disksize(inode, size);
37860 -+ ext4_mark_inode_dirty(handle, inode);
37861 -+ ext4_journal_stop(handle);
37862 -+
37863 -+ return 0;
37864 -+}
37865 -+
37866 -+/*
37867 - * ext4_punch_hole: punches a hole in a file by releaseing the blocks
37868 - * associated with the given offset and length
37869 - *
37870 -@@ -3651,17 +3680,26 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
37871 -
37872 - }
37873 -
37874 -+ /* Wait all existing dio workers, newcomers will block on i_mutex */
37875 -+ ext4_inode_block_unlocked_dio(inode);
37876 -+ inode_dio_wait(inode);
37877 -+
37878 -+ /*
37879 -+ * Prevent page faults from reinstantiating pages we have released from
37880 -+ * page cache.
37881 -+ */
37882 -+ down_write(&EXT4_I(inode)->i_mmap_sem);
37883 - first_block_offset = round_up(offset, sb->s_blocksize);
37884 - last_block_offset = round_down((offset + length), sb->s_blocksize) - 1;
37885 -
37886 - /* Now release the pages and zero block aligned part of pages*/
37887 -- if (last_block_offset > first_block_offset)
37888 -+ if (last_block_offset > first_block_offset) {
37889 -+ ret = ext4_update_disksize_before_punch(inode, offset, length);
37890 -+ if (ret)
37891 -+ goto out_dio;
37892 - truncate_pagecache_range(inode, first_block_offset,
37893 - last_block_offset);
37894 --
37895 -- /* Wait all existing dio workers, newcomers will block on i_mutex */
37896 -- ext4_inode_block_unlocked_dio(inode);
37897 -- inode_dio_wait(inode);
37898 -+ }
37899 -
37900 - if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
37901 - credits = ext4_writepage_trans_blocks(inode);
37902 -@@ -3708,16 +3746,12 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
37903 - if (IS_SYNC(inode))
37904 - ext4_handle_sync(handle);
37905 -
37906 -- /* Now release the pages again to reduce race window */
37907 -- if (last_block_offset > first_block_offset)
37908 -- truncate_pagecache_range(inode, first_block_offset,
37909 -- last_block_offset);
37910 --
37911 - inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
37912 - ext4_mark_inode_dirty(handle, inode);
37913 - out_stop:
37914 - ext4_journal_stop(handle);
37915 - out_dio:
37916 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
37917 - ext4_inode_resume_unlocked_dio(inode);
37918 - out_mutex:
37919 - mutex_unlock(&inode->i_mutex);
37920 -@@ -4851,6 +4885,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
37921 - } else
37922 - ext4_wait_for_tail_page_commit(inode);
37923 - }
37924 -+ down_write(&EXT4_I(inode)->i_mmap_sem);
37925 - /*
37926 - * Truncate pagecache after we've waited for commit
37927 - * in data=journal mode to make pages freeable.
37928 -@@ -4858,6 +4893,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
37929 - truncate_pagecache(inode, inode->i_size);
37930 - if (shrink)
37931 - ext4_truncate(inode);
37932 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
37933 - }
37934 -
37935 - if (!rc) {
37936 -@@ -5306,6 +5342,8 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
37937 -
37938 - sb_start_pagefault(inode->i_sb);
37939 - file_update_time(vma->vm_file);
37940 -+
37941 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37942 - /* Delalloc case is easy... */
37943 - if (test_opt(inode->i_sb, DELALLOC) &&
37944 - !ext4_should_journal_data(inode) &&
37945 -@@ -5375,6 +5413,19 @@ retry_alloc:
37946 - out_ret:
37947 - ret = block_page_mkwrite_return(ret);
37948 - out:
37949 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37950 - sb_end_pagefault(inode->i_sb);
37951 - return ret;
37952 - }
37953 -+
37954 -+int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
37955 -+{
37956 -+ struct inode *inode = file_inode(vma->vm_file);
37957 -+ int err;
37958 -+
37959 -+ down_read(&EXT4_I(inode)->i_mmap_sem);
37960 -+ err = filemap_fault(vma, vmf);
37961 -+ up_read(&EXT4_I(inode)->i_mmap_sem);
37962 -+
37963 -+ return err;
37964 -+}
37965 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
37966 -index 61eaf74..01a829b 100644
37967 +index 4424b7b..c47c8ff 100644
37968 --- a/fs/ext4/mballoc.c
37969 +++ b/fs/ext4/mballoc.c
37970 @@ -1912,7 +1912,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
37971 @@ -82315,18 +96722,10 @@ index 34038e3..322fe62 100644
37972 err = ext4_handle_dirty_metadata(handle, NULL, bh);
37973 if (unlikely(err))
37974 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
37975 -index ba1cf0b..375d641 100644
37976 +index a76ca67..adbf949 100644
37977 --- a/fs/ext4/super.c
37978 +++ b/fs/ext4/super.c
37979 -@@ -958,6 +958,7 @@ static void init_once(void *foo)
37980 - INIT_LIST_HEAD(&ei->i_orphan);
37981 - init_rwsem(&ei->xattr_sem);
37982 - init_rwsem(&ei->i_data_sem);
37983 -+ init_rwsem(&ei->i_mmap_sem);
37984 - inode_init_once(&ei->vfs_inode);
37985 - }
37986 -
37987 -@@ -1274,7 +1275,7 @@ static ext4_fsblk_t get_sb_block(void **data)
37988 +@@ -1306,7 +1306,7 @@ static ext4_fsblk_t get_sb_block(void **data)
37989 }
37990
37991 #define DEFAULT_JOURNAL_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 3))
37992 @@ -82348,26 +96747,11 @@ index 1420a3c..e87523c 100644
37993
37994 static ssize_t session_write_kbytes_show(struct ext4_attr *a,
37995 struct ext4_sb_info *sbi, char *buf)
37996 -diff --git a/fs/ext4/truncate.h b/fs/ext4/truncate.h
37997 -index 011ba66..c70d06a 100644
37998 ---- a/fs/ext4/truncate.h
37999 -+++ b/fs/ext4/truncate.h
38000 -@@ -10,8 +10,10 @@
38001 - */
38002 - static inline void ext4_truncate_failed_write(struct inode *inode)
38003 - {
38004 -+ down_write(&EXT4_I(inode)->i_mmap_sem);
38005 - truncate_inode_pages(inode->i_mapping, inode->i_size);
38006 - ext4_truncate(inode);
38007 -+ up_write(&EXT4_I(inode)->i_mmap_sem);
38008 - }
38009 -
38010 - /*
38011 diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
38012 -index 6b6b3e7..0cbeeb9 100644
38013 +index a95151e..ba59ee9 100644
38014 --- a/fs/ext4/xattr.c
38015 +++ b/fs/ext4/xattr.c
38016 -@@ -398,7 +398,7 @@ static int
38017 +@@ -396,7 +396,7 @@ static int
38018 ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
38019 char *buffer, size_t buffer_size)
38020 {
38021 @@ -82376,23 +96760,23 @@ index 6b6b3e7..0cbeeb9 100644
38022
38023 for (; !IS_LAST_ENTRY(entry); entry = EXT4_XATTR_NEXT(entry)) {
38024 const struct xattr_handler *handler =
38025 -@@ -414,9 +414,10 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
38026 - buffer += size;
38027 +@@ -417,9 +417,10 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
38028 + *buffer++ = 0;
38029 }
38030 rest -= size;
38031 + total_size += size;
38032 }
38033 }
38034 -- return buffer_size - rest;
38035 +- return buffer_size - rest; /* total size */
38036 + return total_size;
38037 }
38038
38039 static int
38040 diff --git a/fs/fcntl.c b/fs/fcntl.c
38041 -index ee85cd4..9dd0d20 100644
38042 +index 350a2c8..9fb9bf7 100644
38043 --- a/fs/fcntl.c
38044 +++ b/fs/fcntl.c
38045 -@@ -102,6 +102,10 @@ void __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
38046 +@@ -103,6 +103,10 @@ void __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
38047 int force)
38048 {
38049 security_file_set_fowner(filp);
38050 @@ -82444,7 +96828,7 @@ index ca3c3dd..0c5456e 100644
38051 retval = -EFAULT;
38052 goto out_handle;
38053 diff --git a/fs/file.c b/fs/file.c
38054 -index 39f8f15..898d887 100644
38055 +index 1fbc5c0..7cfb36d 100644
38056 --- a/fs/file.c
38057 +++ b/fs/file.c
38058 @@ -16,6 +16,7 @@
38059 @@ -82455,7 +96839,7 @@ index 39f8f15..898d887 100644
38060 #include <linux/fdtable.h>
38061 #include <linux/bitops.h>
38062 #include <linux/interrupt.h>
38063 -@@ -162,9 +163,10 @@ out:
38064 +@@ -163,9 +164,10 @@ out:
38065 * Return <0 error code on error; 1 on successful completion.
38066 * The files->file_lock should be held on entry, and will be held on exit.
38067 */
38068 @@ -82469,7 +96853,7 @@ index 39f8f15..898d887 100644
38069 {
38070 struct fdtable *new_fdt, *cur_fdt;
38071
38072 -@@ -207,9 +209,10 @@ static int expand_fdtable(struct files_struct *files, int nr)
38073 +@@ -208,9 +210,10 @@ static int expand_fdtable(struct files_struct *files, int nr)
38074 * expanded and execution may have blocked.
38075 * The files->file_lock should be held on entry, and will be held on exit.
38076 */
38077 @@ -82483,7 +96867,7 @@ index 39f8f15..898d887 100644
38078 {
38079 struct fdtable *fdt;
38080 int expanded = 0;
38081 -@@ -816,7 +819,9 @@ bool get_close_on_exec(unsigned int fd)
38082 +@@ -817,7 +820,9 @@ bool get_close_on_exec(unsigned int fd)
38083
38084 static int do_dup2(struct files_struct *files,
38085 struct file *file, unsigned fd, unsigned flags)
38086 @@ -82494,7 +96878,7 @@ index 39f8f15..898d887 100644
38087 {
38088 struct file *tofree;
38089 struct fdtable *fdt;
38090 -@@ -866,6 +871,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
38091 +@@ -867,6 +872,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
38092 if (!file)
38093 return __close_fd(files, fd);
38094
38095 @@ -82502,7 +96886,7 @@ index 39f8f15..898d887 100644
38096 if (fd >= rlimit(RLIMIT_NOFILE))
38097 return -EBADF;
38098
38099 -@@ -892,6 +898,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
38100 +@@ -893,6 +899,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
38101 if (unlikely(oldfd == newfd))
38102 return -EINVAL;
38103
38104 @@ -82510,7 +96894,7 @@ index 39f8f15..898d887 100644
38105 if (newfd >= rlimit(RLIMIT_NOFILE))
38106 return -EBADF;
38107
38108 -@@ -947,6 +954,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
38109 +@@ -948,6 +955,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
38110 int f_dupfd(unsigned int from, struct file *file, unsigned flags)
38111 {
38112 int err;
38113 @@ -82519,7 +96903,7 @@ index 39f8f15..898d887 100644
38114 return -EINVAL;
38115 err = alloc_fd(from, flags);
38116 diff --git a/fs/filesystems.c b/fs/filesystems.c
38117 -index 5797d45..7d7d79a 100644
38118 +index c5618db..50c38f4 100644
38119 --- a/fs/filesystems.c
38120 +++ b/fs/filesystems.c
38121 @@ -275,7 +275,11 @@ struct file_system_type *get_fs_type(const char *name)
38122 @@ -82534,11 +96918,66 @@ index 5797d45..7d7d79a 100644
38123 fs = __get_fs_type(name, len);
38124
38125 if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {
38126 +diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c
38127 +index 3e2ccad..9d5d23e 100644
38128 +--- a/fs/freevxfs/vxfs_inode.c
38129 ++++ b/fs/freevxfs/vxfs_inode.c
38130 +@@ -97,11 +97,11 @@ vxfs_blkiget(struct super_block *sbp, u_long extent, ino_t ino)
38131 +
38132 + if (bp && buffer_mapped(bp)) {
38133 + struct vxfs_inode_info *vip;
38134 +- struct vxfs_dinode *dip;
38135 ++ struct vxfs_inode_info *dip;
38136 +
38137 + if (!(vip = kmem_cache_alloc(vxfs_inode_cachep, GFP_KERNEL)))
38138 + goto fail;
38139 +- dip = (struct vxfs_dinode *)(bp->b_data + offset);
38140 ++ dip = (struct vxfs_inode_info *)(bp->b_data + offset);
38141 + memcpy(vip, dip, sizeof(*vip));
38142 + #ifdef DIAGNOSTIC
38143 + vxfs_dumpi(vip, ino);
38144 +@@ -138,12 +138,12 @@ __vxfs_iget(ino_t ino, struct inode *ilistp)
38145 +
38146 + if (!IS_ERR(pp)) {
38147 + struct vxfs_inode_info *vip;
38148 +- struct vxfs_dinode *dip;
38149 ++ struct vxfs_inode_info *dip;
38150 + caddr_t kaddr = (char *)page_address(pp);
38151 +
38152 + if (!(vip = kmem_cache_alloc(vxfs_inode_cachep, GFP_KERNEL)))
38153 + goto fail;
38154 +- dip = (struct vxfs_dinode *)(kaddr + offset);
38155 ++ dip = (struct vxfs_inode_info *)(kaddr + offset);
38156 + memcpy(vip, dip, sizeof(*vip));
38157 + #ifdef DIAGNOSTIC
38158 + vxfs_dumpi(vip, ino);
38159 +diff --git a/fs/freevxfs/vxfs_inode.h b/fs/freevxfs/vxfs_inode.h
38160 +index 240aeb1..b7dad4f 100644
38161 +--- a/fs/freevxfs/vxfs_inode.h
38162 ++++ b/fs/freevxfs/vxfs_inode.h
38163 +@@ -96,7 +96,7 @@ struct vxfs_typed_dev4 {
38164 + /*
38165 + * The inode as contained on the physical device.
38166 + */
38167 +-struct vxfs_dinode {
38168 ++struct vxfs_inode_info {
38169 + int32_t vdi_mode;
38170 + u_int32_t vdi_nlink; /* Link count */
38171 + u_int32_t vdi_uid; /* UID */
38172 +@@ -152,7 +152,7 @@ struct vxfs_dinode {
38173 + *
38174 + * TBD: This should become a separate structure...
38175 + */
38176 +-#define vxfs_inode_info vxfs_dinode
38177 ++//#define vxfs_inode_info vxfs_dinode
38178 +
38179 + #define vii_mode vdi_mode
38180 + #define vii_uid vdi_uid
38181 diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
38182 -index 60d6fc2..dffa2ca 100644
38183 +index fee81e8..bfeb3ca 100644
38184 --- a/fs/fs-writeback.c
38185 +++ b/fs/fs-writeback.c
38186 -@@ -882,9 +882,9 @@ fs_initcall(cgroup_writeback_init);
38187 +@@ -880,9 +880,9 @@ fs_initcall(cgroup_writeback_init);
38188 #else /* CONFIG_CGROUP_WRITEBACK */
38189
38190 static struct bdi_writeback *
38191 @@ -82550,7 +96989,7 @@ index 60d6fc2..dffa2ca 100644
38192 {
38193 struct bdi_writeback *wb = inode_to_wb(inode);
38194
38195 -@@ -893,8 +893,8 @@ locked_inode_to_wb_and_lock_list(struct inode *inode)
38196 +@@ -891,8 +891,8 @@ locked_inode_to_wb_and_lock_list(struct inode *inode)
38197 return wb;
38198 }
38199
38200 @@ -82560,7 +96999,7 @@ index 60d6fc2..dffa2ca 100644
38201 {
38202 struct bdi_writeback *wb = inode_to_wb(inode);
38203
38204 -@@ -1138,9 +1138,8 @@ static int write_inode(struct inode *inode, struct writeback_control *wbc)
38205 +@@ -1136,9 +1136,8 @@ static int write_inode(struct inode *inode, struct writeback_control *wbc)
38206 * Wait for writeback on an inode to complete. Called with i_lock held.
38207 * Caller must make sure inode cannot go away when we drop i_lock.
38208 */
38209 @@ -82571,7 +97010,7 @@ index 60d6fc2..dffa2ca 100644
38210 {
38211 DEFINE_WAIT_BIT(wq, &inode->i_state, __I_SYNC);
38212 wait_queue_head_t *wqh;
38213 -@@ -1169,8 +1168,8 @@ void inode_wait_for_writeback(struct inode *inode)
38214 +@@ -1167,8 +1166,8 @@ void inode_wait_for_writeback(struct inode *inode)
38215 * held and drops it. It is aimed for callers not holding any inode reference
38216 * so once i_lock is dropped, inode can go away.
38217 */
38218 @@ -84165,11 +98604,62 @@ index ebb5e37..beae05b 100644
38219 do_wakeup = 1;
38220 }
38221
38222 +diff --git a/fs/fuse/file.c b/fs/fuse/file.c
38223 +index 416108b..c4b3802 100644
38224 +--- a/fs/fuse/file.c
38225 ++++ b/fs/fuse/file.c
38226 +@@ -825,9 +825,9 @@ struct fuse_fill_data {
38227 + unsigned nr_pages;
38228 + };
38229 +
38230 +-static int fuse_readpages_fill(void *_data, struct page *page)
38231 ++static int fuse_readpages_fill(struct file *_data, struct page *page)
38232 + {
38233 +- struct fuse_fill_data *data = _data;
38234 ++ struct fuse_fill_data *data = (struct fuse_fill_data *)_data;
38235 + struct fuse_req *req = data->req;
38236 + struct inode *inode = data->inode;
38237 + struct fuse_conn *fc = get_fuse_conn(inode);
38238 +diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
38239 +index 4d69d5c..3093c70 100644
38240 +--- a/fs/fuse/inode.c
38241 ++++ b/fs/fuse/inode.c
38242 +@@ -29,7 +29,7 @@ static struct kmem_cache *fuse_inode_cachep;
38243 + struct list_head fuse_conn_list;
38244 + DEFINE_MUTEX(fuse_mutex);
38245 +
38246 +-static int set_global_limit(const char *val, struct kernel_param *kp);
38247 ++static int set_global_limit(const char *val, const struct kernel_param *kp);
38248 +
38249 + unsigned max_user_bgreq;
38250 + module_param_call(max_user_bgreq, set_global_limit, param_get_uint,
38251 +@@ -814,7 +814,7 @@ static void sanitize_global_limit(unsigned *limit)
38252 + *limit = (1 << 16) - 1;
38253 + }
38254 +
38255 +-static int set_global_limit(const char *val, struct kernel_param *kp)
38256 ++static int set_global_limit(const char *val, const struct kernel_param *kp)
38257 + {
38258 + int rv;
38259 +
38260 +diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
38261 +index 93f0746..16e462a 100644
38262 +--- a/fs/gfs2/aops.c
38263 ++++ b/fs/gfs2/aops.c
38264 +@@ -492,7 +492,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
38265 + *
38266 + */
38267 +
38268 +-static int __gfs2_readpage(void *file, struct page *page)
38269 ++static int __gfs2_readpage(struct file *file, struct page *page)
38270 + {
38271 + struct gfs2_inode *ip = GFS2_I(page->mapping->host);
38272 + struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
38273 diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
38274 -index 5e42546..ea321c8 100644
38275 +index c9384f9..b89afe1 100644
38276 --- a/fs/gfs2/file.c
38277 +++ b/fs/gfs2/file.c
38278 -@@ -781,7 +781,7 @@ static void calc_max_reserv(struct gfs2_inode *ip, loff_t *len,
38279 +@@ -775,7 +775,7 @@ static void calc_max_reserv(struct gfs2_inode *ip, loff_t *len,
38280 {
38281 loff_t max = *len;
38282 const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
38283 @@ -84179,7 +98669,7 @@ index 5e42546..ea321c8 100644
38284 for (tmp = max_data; tmp > sdp->sd_diptrs;) {
38285 tmp = DIV_ROUND_UP(tmp, sdp->sd_inptrs);
38286 diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
38287 -index 32e7471..ffc6973 100644
38288 +index a4ff7b5..3bdde1a 100644
38289 --- a/fs/gfs2/glock.c
38290 +++ b/fs/gfs2/glock.c
38291 @@ -324,9 +324,9 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state)
38292 @@ -84251,7 +98741,7 @@ index 32e7471..ffc6973 100644
38293 spin_unlock(&gl->gl_lockref.lock);
38294 cond_resched_lock(&lru_lock);
38295 }
38296 -@@ -1667,7 +1667,7 @@ void gfs2_dump_glock(struct seq_file *seq, const struct gfs2_glock *gl)
38297 +@@ -1669,7 +1669,7 @@ void gfs2_dump_glock(struct seq_file *seq, const struct gfs2_glock *gl)
38298 state2str(gl->gl_demote_state), dtime,
38299 atomic_read(&gl->gl_ail_count),
38300 atomic_read(&gl->gl_revokes),
38301 @@ -84261,10 +98751,10 @@ index 32e7471..ffc6973 100644
38302 list_for_each_entry(gh, &gl->gl_holders, gh_list)
38303 dump_holder(seq, gh);
38304 diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
38305 -index f348cfb..e4274b2 100644
38306 +index 437fd73..4f85148 100644
38307 --- a/fs/gfs2/glops.c
38308 +++ b/fs/gfs2/glops.c
38309 -@@ -554,9 +554,9 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
38310 +@@ -556,9 +556,9 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
38311
38312 if (gl->gl_demote_state == LM_ST_UNLOCKED &&
38313 gl->gl_state == LM_ST_SHARED && ip) {
38314 @@ -84277,7 +98767,7 @@ index f348cfb..e4274b2 100644
38315 }
38316
38317 diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
38318 -index 3a31226..2fffbe9 100644
38319 +index a398913..9034327 100644
38320 --- a/fs/gfs2/quota.c
38321 +++ b/fs/gfs2/quota.c
38322 @@ -154,7 +154,7 @@ static enum lru_status gfs2_qd_isolate(struct list_head *item,
38323 @@ -84308,7 +98798,7 @@ index 3a31226..2fffbe9 100644
38324 spin_unlock(&qd->qd_lockref.lock);
38325
38326 diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
38327 -index 595ebdb..1264061 100644
38328 +index e1f465a..ba6b5b8 100644
38329 --- a/fs/hugetlbfs/inode.c
38330 +++ b/fs/hugetlbfs/inode.c
38331 @@ -174,6 +174,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
38332 @@ -84348,9 +98838,9 @@ index 595ebdb..1264061 100644
38333 info.high_limit = TASK_SIZE;
38334 info.align_mask = PAGE_MASK & ~huge_page_mask(h);
38335 info.align_offset = 0;
38336 -@@ -1206,7 +1216,7 @@ static struct file_system_type hugetlbfs_fs_type = {
38337 +@@ -1212,7 +1222,7 @@ static struct file_system_type hugetlbfs_fs_type = {
38338 + .kill_sb = kill_litter_super,
38339 };
38340 - MODULE_ALIAS_FS("hugetlbfs");
38341
38342 -static struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
38343 +struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
38344 @@ -84358,10 +98848,10 @@ index 595ebdb..1264061 100644
38345 static int can_do_hugetlb_shm(void)
38346 {
38347 diff --git a/fs/inode.c b/fs/inode.c
38348 -index 1be5f90..55702b0 100644
38349 +index 69b8b52..9b58c2d 100644
38350 --- a/fs/inode.c
38351 +++ b/fs/inode.c
38352 -@@ -844,19 +844,19 @@ unsigned int get_next_ino(void)
38353 +@@ -850,19 +850,19 @@ unsigned int get_next_ino(void)
38354 unsigned int *p = &get_cpu_var(last_ino);
38355 unsigned int res = *p;
38356
38357 @@ -84387,43 +98877,6 @@ index 1be5f90..55702b0 100644
38358 *p = res;
38359 put_cpu_var(last_ino);
38360 return res;
38361 -diff --git a/fs/internal.h b/fs/internal.h
38362 -index 71859c4d..e38c08c 100644
38363 ---- a/fs/internal.h
38364 -+++ b/fs/internal.h
38365 -@@ -151,3 +151,10 @@ extern void mnt_pin_kill(struct mount *m);
38366 - * fs/nsfs.c
38367 - */
38368 - extern struct dentry_operations ns_dentry_operations;
38369 -+
38370 -+/*
38371 -+ * fs/ioctl.c
38372 -+ */
38373 -+extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd,
38374 -+ unsigned long arg);
38375 -+extern long vfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
38376 -diff --git a/fs/ioctl.c b/fs/ioctl.c
38377 -index 5d01d26..41c352e 100644
38378 ---- a/fs/ioctl.c
38379 -+++ b/fs/ioctl.c
38380 -@@ -15,6 +15,7 @@
38381 - #include <linux/writeback.h>
38382 - #include <linux/buffer_head.h>
38383 - #include <linux/falloc.h>
38384 -+#include "internal.h"
38385 -
38386 - #include <asm/ioctls.h>
38387 -
38388 -@@ -32,8 +33,7 @@
38389 - *
38390 - * Returns 0 on success, -errno on error.
38391 - */
38392 --static long vfs_ioctl(struct file *filp, unsigned int cmd,
38393 -- unsigned long arg)
38394 -+long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
38395 - {
38396 - int error = -ENOTTY;
38397 -
38398 diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
38399 index 36345fe..f2d7dac 100644
38400 --- a/fs/jbd2/commit.c
38401 @@ -84438,7 +98891,7 @@ index 36345fe..f2d7dac 100644
38402 commit_transaction->t_tid, &stats.run);
38403 stats.ts_requested = (commit_transaction->t_requested) ? 1 : 0;
38404 diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
38405 -index ca181e8..8262e59 100644
38406 +index 081dff0..9f91ee0 100644
38407 --- a/fs/jbd2/transaction.c
38408 +++ b/fs/jbd2/transaction.c
38409 @@ -91,7 +91,7 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
38410 @@ -84473,8 +98926,49 @@ index 4a6cf28..d3a29d3 100644
38411 };
38412
38413 jffs2_prealloc_raw_node_refs(c, jeb, 1);
38414 +diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
38415 +index cad86ba..a0bfc33 100644
38416 +--- a/fs/jffs2/file.c
38417 ++++ b/fs/jffs2/file.c
38418 +@@ -111,8 +111,9 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)
38419 + return ret;
38420 + }
38421 +
38422 +-int jffs2_do_readpage_unlock(struct inode *inode, struct page *pg)
38423 ++int jffs2_do_readpage_unlock(struct file *_inode, struct page *pg)
38424 + {
38425 ++ struct inode *inode = (struct inode *)_inode;
38426 + int ret = jffs2_do_readpage_nolock(inode, pg);
38427 + unlock_page(pg);
38428 + return ret;
38429 +diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
38430 +index bead25a..5186b1c 100644
38431 +--- a/fs/jffs2/fs.c
38432 ++++ b/fs/jffs2/fs.c
38433 +@@ -686,7 +686,7 @@ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c,
38434 + struct page *pg;
38435 +
38436 + pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
38437 +- (void *)jffs2_do_readpage_unlock, inode);
38438 ++ jffs2_do_readpage_unlock, inode);
38439 + if (IS_ERR(pg))
38440 + return (void *)pg;
38441 +
38442 +diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
38443 +index 824e61e..2d686a6 100644
38444 +--- a/fs/jffs2/os-linux.h
38445 ++++ b/fs/jffs2/os-linux.h
38446 +@@ -154,7 +154,7 @@ extern const struct file_operations jffs2_file_operations;
38447 + extern const struct inode_operations jffs2_file_inode_operations;
38448 + extern const struct address_space_operations jffs2_file_address_operations;
38449 + int jffs2_fsync(struct file *, loff_t, loff_t, int);
38450 +-int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
38451 ++int jffs2_do_readpage_unlock (struct file *_inode, struct page *pg);
38452 +
38453 + /* ioctl.c */
38454 + long jffs2_ioctl(struct file *, unsigned int, unsigned long);
38455 diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
38456 -index f3a4857..2542b7a 100644
38457 +index 5a3da3f..de40276 100644
38458 --- a/fs/jffs2/wbuf.c
38459 +++ b/fs/jffs2/wbuf.c
38460 @@ -1023,7 +1023,8 @@ static const struct jffs2_unknown_node oob_cleanmarker =
38461 @@ -84488,20 +98982,20 @@ index f3a4857..2542b7a 100644
38462
38463 /*
38464 diff --git a/fs/jfs/super.c b/fs/jfs/super.c
38465 -index 8f9176c..6f2b910 100644
38466 +index 4f5d85b..de5d4d8 100644
38467 --- a/fs/jfs/super.c
38468 +++ b/fs/jfs/super.c
38469 @@ -898,7 +898,7 @@ static int __init init_jfs_fs(void)
38470
38471 jfs_inode_cachep =
38472 kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0,
38473 -- SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
38474 -+ SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_USERCOPY,
38475 +- SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_ACCOUNT,
38476 ++ SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_ACCOUNT|SLAB_USERCOPY,
38477 init_once);
38478 if (jfs_inode_cachep == NULL)
38479 return -ENOMEM;
38480 diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
38481 -index 91e0045..a654935 100644
38482 +index 996b774..8358861 100644
38483 --- a/fs/kernfs/dir.c
38484 +++ b/fs/kernfs/dir.c
38485 @@ -205,7 +205,7 @@ struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn)
38486 @@ -84513,7 +99007,7 @@ index 91e0045..a654935 100644
38487 {
38488 unsigned long hash = init_name_hash();
38489 unsigned int len = strlen(name);
38490 -@@ -896,6 +896,12 @@ static int kernfs_iop_mkdir(struct inode *dir, struct dentry *dentry,
38491 +@@ -935,6 +935,12 @@ static int kernfs_iop_mkdir(struct inode *dir, struct dentry *dentry,
38492 ret = scops->mkdir(parent, dentry->d_name.name, mode);
38493
38494 kernfs_put_active(parent);
38495 @@ -84610,7 +99104,7 @@ index 7247252..c73808e 100644
38496 }
38497
38498 diff --git a/fs/libfs.c b/fs/libfs.c
38499 -index c7cbfb0..fc3636d4 100644
38500 +index 0ca80b2..4001920 100644
38501 --- a/fs/libfs.c
38502 +++ b/fs/libfs.c
38503 @@ -155,6 +155,9 @@ int dcache_readdir(struct file *file, struct dir_context *ctx)
38504 @@ -84637,6 +99131,135 @@ index c7cbfb0..fc3636d4 100644
38505 d_inode(next)->i_ino, dt_type(d_inode(next))))
38506 return 0;
38507 spin_lock(&dentry->d_lock);
38508 +diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
38509 +index d3e40db..a300f9c 100644
38510 +--- a/fs/lockd/clnt4xdr.c
38511 ++++ b/fs/lockd/clnt4xdr.c
38512 +@@ -379,10 +379,11 @@ static void encode_nlm4_lock(struct xdr_stream *xdr,
38513 + * struct nlm4_lock alock;
38514 + * };
38515 + */
38516 +-static void nlm4_xdr_enc_testargs(struct rpc_rqst *req,
38517 ++static void nlm4_xdr_enc_testargs(void *req,
38518 + struct xdr_stream *xdr,
38519 +- const struct nlm_args *args)
38520 ++ void *_args)
38521 + {
38522 ++ const struct nlm_args *args = _args;
38523 + const struct nlm_lock *lock = &args->lock;
38524 +
38525 + encode_cookie(xdr, &args->cookie);
38526 +@@ -400,10 +401,11 @@ static void nlm4_xdr_enc_testargs(struct rpc_rqst *req,
38527 + * int state;
38528 + * };
38529 + */
38530 +-static void nlm4_xdr_enc_lockargs(struct rpc_rqst *req,
38531 ++static void nlm4_xdr_enc_lockargs(void *req,
38532 + struct xdr_stream *xdr,
38533 +- const struct nlm_args *args)
38534 ++ void *_args)
38535 + {
38536 ++ const struct nlm_args *args = _args;
38537 + const struct nlm_lock *lock = &args->lock;
38538 +
38539 + encode_cookie(xdr, &args->cookie);
38540 +@@ -422,10 +424,11 @@ static void nlm4_xdr_enc_lockargs(struct rpc_rqst *req,
38541 + * struct nlm4_lock alock;
38542 + * };
38543 + */
38544 +-static void nlm4_xdr_enc_cancargs(struct rpc_rqst *req,
38545 ++static void nlm4_xdr_enc_cancargs(void *req,
38546 + struct xdr_stream *xdr,
38547 +- const struct nlm_args *args)
38548 ++ void *_args)
38549 + {
38550 ++ const struct nlm_args *args = _args;
38551 + const struct nlm_lock *lock = &args->lock;
38552 +
38553 + encode_cookie(xdr, &args->cookie);
38554 +@@ -440,10 +443,11 @@ static void nlm4_xdr_enc_cancargs(struct rpc_rqst *req,
38555 + * struct nlm4_lock alock;
38556 + * };
38557 + */
38558 +-static void nlm4_xdr_enc_unlockargs(struct rpc_rqst *req,
38559 ++static void nlm4_xdr_enc_unlockargs(void *req,
38560 + struct xdr_stream *xdr,
38561 +- const struct nlm_args *args)
38562 ++ void *_args)
38563 + {
38564 ++ const struct nlm_args *args = _args;
38565 + const struct nlm_lock *lock = &args->lock;
38566 +
38567 + encode_cookie(xdr, &args->cookie);
38568 +@@ -456,10 +460,12 @@ static void nlm4_xdr_enc_unlockargs(struct rpc_rqst *req,
38569 + * nlm4_stat stat;
38570 + * };
38571 + */
38572 +-static void nlm4_xdr_enc_res(struct rpc_rqst *req,
38573 ++static void nlm4_xdr_enc_res(void *req,
38574 + struct xdr_stream *xdr,
38575 +- const struct nlm_res *result)
38576 ++ void *_result)
38577 + {
38578 ++ const struct nlm_res *result = _result;
38579 ++
38580 + encode_cookie(xdr, &result->cookie);
38581 + encode_nlm4_stat(xdr, result->status);
38582 + }
38583 +@@ -477,10 +483,12 @@ static void nlm4_xdr_enc_res(struct rpc_rqst *req,
38584 + * nlm4_testrply test_stat;
38585 + * };
38586 + */
38587 +-static void nlm4_xdr_enc_testres(struct rpc_rqst *req,
38588 ++static void nlm4_xdr_enc_testres(void *req,
38589 + struct xdr_stream *xdr,
38590 +- const struct nlm_res *result)
38591 ++ void *_result)
38592 + {
38593 ++ const struct nlm_res *result = _result;
38594 ++
38595 + encode_cookie(xdr, &result->cookie);
38596 + encode_nlm4_stat(xdr, result->status);
38597 + if (result->status == nlm_lck_denied)
38598 +@@ -523,10 +531,11 @@ out:
38599 + return error;
38600 + }
38601 +
38602 +-static int nlm4_xdr_dec_testres(struct rpc_rqst *req,
38603 ++static int nlm4_xdr_dec_testres(void *req,
38604 + struct xdr_stream *xdr,
38605 +- struct nlm_res *result)
38606 ++ void *_result)
38607 + {
38608 ++ struct nlm_res *result = _result;
38609 + int error;
38610 +
38611 + error = decode_cookie(xdr, &result->cookie);
38612 +@@ -543,10 +552,11 @@ out:
38613 + * nlm4_stat stat;
38614 + * };
38615 + */
38616 +-static int nlm4_xdr_dec_res(struct rpc_rqst *req,
38617 ++static int nlm4_xdr_dec_res(void *req,
38618 + struct xdr_stream *xdr,
38619 +- struct nlm_res *result)
38620 ++ void *_result)
38621 + {
38622 ++ struct nlm_res *result = _result;
38623 + int error;
38624 +
38625 + error = decode_cookie(xdr, &result->cookie);
38626 +@@ -566,8 +576,8 @@ out:
38627 + #define PROC(proc, argtype, restype) \
38628 + [NLMPROC_##proc] = { \
38629 + .p_proc = NLMPROC_##proc, \
38630 +- .p_encode = (kxdreproc_t)nlm4_xdr_enc_##argtype, \
38631 +- .p_decode = (kxdrdproc_t)nlm4_xdr_dec_##restype, \
38632 ++ .p_encode = nlm4_xdr_enc_##argtype, \
38633 ++ .p_decode = nlm4_xdr_dec_##restype, \
38634 + .p_arglen = NLM4_##argtype##_sz, \
38635 + .p_replen = NLM4_##restype##_sz, \
38636 + .p_statidx = NLMPROC_##proc, \
38637 diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
38638 index 1129520..356aeca 100644
38639 --- a/fs/lockd/clntproc.c
38640 @@ -84655,6 +99278,1165 @@ index 1129520..356aeca 100644
38641
38642 memcpy(c->data, &cookie, 4);
38643 c->len=4;
38644 +diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
38645 +index 3e9f787..c2177b8 100644
38646 +--- a/fs/lockd/clntxdr.c
38647 ++++ b/fs/lockd/clntxdr.c
38648 +@@ -372,10 +372,11 @@ static void encode_nlm_lock(struct xdr_stream *xdr,
38649 + * struct nlm_lock alock;
38650 + * };
38651 + */
38652 +-static void nlm_xdr_enc_testargs(struct rpc_rqst *req,
38653 ++static void nlm_xdr_enc_testargs(void *req,
38654 + struct xdr_stream *xdr,
38655 +- const struct nlm_args *args)
38656 ++ void *_args)
38657 + {
38658 ++ const struct nlm_args *args = _args;
38659 + const struct nlm_lock *lock = &args->lock;
38660 +
38661 + encode_cookie(xdr, &args->cookie);
38662 +@@ -393,10 +394,11 @@ static void nlm_xdr_enc_testargs(struct rpc_rqst *req,
38663 + * int state;
38664 + * };
38665 + */
38666 +-static void nlm_xdr_enc_lockargs(struct rpc_rqst *req,
38667 ++static void nlm_xdr_enc_lockargs(void *req,
38668 + struct xdr_stream *xdr,
38669 +- const struct nlm_args *args)
38670 ++ void *_args)
38671 + {
38672 ++ const struct nlm_args *args = _args;
38673 + const struct nlm_lock *lock = &args->lock;
38674 +
38675 + encode_cookie(xdr, &args->cookie);
38676 +@@ -415,10 +417,11 @@ static void nlm_xdr_enc_lockargs(struct rpc_rqst *req,
38677 + * struct nlm_lock alock;
38678 + * };
38679 + */
38680 +-static void nlm_xdr_enc_cancargs(struct rpc_rqst *req,
38681 ++static void nlm_xdr_enc_cancargs(void *req,
38682 + struct xdr_stream *xdr,
38683 +- const struct nlm_args *args)
38684 ++ void *_args)
38685 + {
38686 ++ const struct nlm_args *args = _args;
38687 + const struct nlm_lock *lock = &args->lock;
38688 +
38689 + encode_cookie(xdr, &args->cookie);
38690 +@@ -433,10 +436,11 @@ static void nlm_xdr_enc_cancargs(struct rpc_rqst *req,
38691 + * struct nlm_lock alock;
38692 + * };
38693 + */
38694 +-static void nlm_xdr_enc_unlockargs(struct rpc_rqst *req,
38695 ++static void nlm_xdr_enc_unlockargs(void *req,
38696 + struct xdr_stream *xdr,
38697 +- const struct nlm_args *args)
38698 ++ void *_args)
38699 + {
38700 ++ const struct nlm_args *args = _args;
38701 + const struct nlm_lock *lock = &args->lock;
38702 +
38703 + encode_cookie(xdr, &args->cookie);
38704 +@@ -449,10 +453,11 @@ static void nlm_xdr_enc_unlockargs(struct rpc_rqst *req,
38705 + * nlm_stat stat;
38706 + * };
38707 + */
38708 +-static void nlm_xdr_enc_res(struct rpc_rqst *req,
38709 ++static void nlm_xdr_enc_res(void *req,
38710 + struct xdr_stream *xdr,
38711 +- const struct nlm_res *result)
38712 ++ void *_result)
38713 + {
38714 ++ const struct nlm_res *result = _result;
38715 + encode_cookie(xdr, &result->cookie);
38716 + encode_nlm_stat(xdr, result->status);
38717 + }
38718 +@@ -477,10 +482,11 @@ static void encode_nlm_testrply(struct xdr_stream *xdr,
38719 + encode_nlm_holder(xdr, result);
38720 + }
38721 +
38722 +-static void nlm_xdr_enc_testres(struct rpc_rqst *req,
38723 ++static void nlm_xdr_enc_testres(void *req,
38724 + struct xdr_stream *xdr,
38725 +- const struct nlm_res *result)
38726 ++ void *_result)
38727 + {
38728 ++ const struct nlm_res *result = _result;
38729 + encode_cookie(xdr, &result->cookie);
38730 + encode_nlm_stat(xdr, result->status);
38731 + encode_nlm_testrply(xdr, result);
38732 +@@ -521,11 +527,12 @@ out:
38733 + return error;
38734 + }
38735 +
38736 +-static int nlm_xdr_dec_testres(struct rpc_rqst *req,
38737 ++static int nlm_xdr_dec_testres(void *req,
38738 + struct xdr_stream *xdr,
38739 +- struct nlm_res *result)
38740 ++ void *_result)
38741 + {
38742 + int error;
38743 ++ struct nlm_res *result = _result;
38744 +
38745 + error = decode_cookie(xdr, &result->cookie);
38746 + if (unlikely(error))
38747 +@@ -541,11 +548,12 @@ out:
38748 + * nlm_stat stat;
38749 + * };
38750 + */
38751 +-static int nlm_xdr_dec_res(struct rpc_rqst *req,
38752 ++static int nlm_xdr_dec_res(void *req,
38753 + struct xdr_stream *xdr,
38754 +- struct nlm_res *result)
38755 ++ void *_result)
38756 + {
38757 + int error;
38758 ++ struct nlm_res *result = _result;
38759 +
38760 + error = decode_cookie(xdr, &result->cookie);
38761 + if (unlikely(error))
38762 +@@ -564,8 +572,8 @@ out:
38763 + #define PROC(proc, argtype, restype) \
38764 + [NLMPROC_##proc] = { \
38765 + .p_proc = NLMPROC_##proc, \
38766 +- .p_encode = (kxdreproc_t)nlm_xdr_enc_##argtype, \
38767 +- .p_decode = (kxdrdproc_t)nlm_xdr_dec_##restype, \
38768 ++ .p_encode = nlm_xdr_enc_##argtype, \
38769 ++ .p_decode = nlm_xdr_dec_##restype, \
38770 + .p_arglen = NLM_##argtype##_sz, \
38771 + .p_replen = NLM_##restype##_sz, \
38772 + .p_statidx = NLMPROC_##proc, \
38773 +diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
38774 +index 19166d4..c841d52 100644
38775 +--- a/fs/lockd/mon.c
38776 ++++ b/fs/lockd/mon.c
38777 +@@ -475,23 +475,22 @@ static void encode_priv(struct xdr_stream *xdr, const struct nsm_args *argp)
38778 + xdr_encode_opaque_fixed(p, argp->priv->data, SM_PRIV_SIZE);
38779 + }
38780 +
38781 +-static void nsm_xdr_enc_mon(struct rpc_rqst *req, struct xdr_stream *xdr,
38782 +- const struct nsm_args *argp)
38783 ++static void nsm_xdr_enc_mon(void *req, struct xdr_stream *xdr, void *argp)
38784 + {
38785 + encode_mon_id(xdr, argp);
38786 + encode_priv(xdr, argp);
38787 + }
38788 +
38789 +-static void nsm_xdr_enc_unmon(struct rpc_rqst *req, struct xdr_stream *xdr,
38790 +- const struct nsm_args *argp)
38791 ++static void nsm_xdr_enc_unmon(void *req, struct xdr_stream *xdr, void *argp)
38792 + {
38793 + encode_mon_id(xdr, argp);
38794 + }
38795 +
38796 +-static int nsm_xdr_dec_stat_res(struct rpc_rqst *rqstp,
38797 ++static int nsm_xdr_dec_stat_res(void *rqstp,
38798 + struct xdr_stream *xdr,
38799 +- struct nsm_res *resp)
38800 ++ void *_resp)
38801 + {
38802 ++ struct nsm_res *resp = _resp;
38803 + __be32 *p;
38804 +
38805 + p = xdr_inline_decode(xdr, 4 + 4);
38806 +@@ -505,10 +504,11 @@ static int nsm_xdr_dec_stat_res(struct rpc_rqst *rqstp,
38807 + return 0;
38808 + }
38809 +
38810 +-static int nsm_xdr_dec_stat(struct rpc_rqst *rqstp,
38811 ++static int nsm_xdr_dec_stat(void *rqstp,
38812 + struct xdr_stream *xdr,
38813 +- struct nsm_res *resp)
38814 ++ void *_resp)
38815 + {
38816 ++ struct nsm_res *resp = _resp;
38817 + __be32 *p;
38818 +
38819 + p = xdr_inline_decode(xdr, 4);
38820 +@@ -532,8 +532,8 @@ static int nsm_xdr_dec_stat(struct rpc_rqst *rqstp,
38821 + static struct rpc_procinfo nsm_procedures[] = {
38822 + [NSMPROC_MON] = {
38823 + .p_proc = NSMPROC_MON,
38824 +- .p_encode = (kxdreproc_t)nsm_xdr_enc_mon,
38825 +- .p_decode = (kxdrdproc_t)nsm_xdr_dec_stat_res,
38826 ++ .p_encode = nsm_xdr_enc_mon,
38827 ++ .p_decode = nsm_xdr_dec_stat_res,
38828 + .p_arglen = SM_mon_sz,
38829 + .p_replen = SM_monres_sz,
38830 + .p_statidx = NSMPROC_MON,
38831 +@@ -541,8 +541,8 @@ static struct rpc_procinfo nsm_procedures[] = {
38832 + },
38833 + [NSMPROC_UNMON] = {
38834 + .p_proc = NSMPROC_UNMON,
38835 +- .p_encode = (kxdreproc_t)nsm_xdr_enc_unmon,
38836 +- .p_decode = (kxdrdproc_t)nsm_xdr_dec_stat,
38837 ++ .p_encode = nsm_xdr_enc_unmon,
38838 ++ .p_decode = nsm_xdr_dec_stat,
38839 + .p_arglen = SM_mon_id_sz,
38840 + .p_replen = SM_unmonres_sz,
38841 + .p_statidx = NSMPROC_UNMON,
38842 +diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
38843 +index 154a107..7b77da4 100644
38844 +--- a/fs/lockd/svc.c
38845 ++++ b/fs/lockd/svc.c
38846 +@@ -591,7 +591,7 @@ static struct ctl_table nlm_sysctl_root[] = {
38847 + */
38848 +
38849 + #define param_set_min_max(name, type, which_strtol, min, max) \
38850 +-static int param_set_##name(const char *val, struct kernel_param *kp) \
38851 ++static int param_set_##name(const char *val, const struct kernel_param *kp)\
38852 + { \
38853 + char *endp; \
38854 + __typeof__(type) num = which_strtol(val, &endp, 0); \
38855 +diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
38856 +index 09c576f..89b4d3d 100644
38857 +--- a/fs/lockd/svc4proc.c
38858 ++++ b/fs/lockd/svc4proc.c
38859 +@@ -72,9 +72,10 @@ nlm4svc_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
38860 + * TEST: Check for conflicting lock
38861 + */
38862 + static __be32
38863 +-nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
38864 +- struct nlm_res *resp)
38865 ++nlm4svc_proc_test(struct svc_rqst *rqstp, void *_argp, void *_resp)
38866 + {
38867 ++ struct nlm_args *argp = _argp;
38868 ++ struct nlm_res *resp = _resp;
38869 + struct nlm_host *host;
38870 + struct nlm_file *file;
38871 + __be32 rc = rpc_success;
38872 +@@ -99,9 +100,10 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
38873 + }
38874 +
38875 + static __be32
38876 +-nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
38877 +- struct nlm_res *resp)
38878 ++nlm4svc_proc_lock(struct svc_rqst *rqstp, void *_argp, void *_resp)
38879 + {
38880 ++ struct nlm_args *argp = _argp;
38881 ++ struct nlm_res *resp = _resp;
38882 + struct nlm_host *host;
38883 + struct nlm_file *file;
38884 + __be32 rc = rpc_success;
38885 +@@ -141,9 +143,10 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
38886 + }
38887 +
38888 + static __be32
38889 +-nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
38890 +- struct nlm_res *resp)
38891 ++nlm4svc_proc_cancel(struct svc_rqst *rqstp, void *_argp, void *_resp)
38892 + {
38893 ++ struct nlm_args *argp = _argp;
38894 ++ struct nlm_res *resp = _resp;
38895 + struct nlm_host *host;
38896 + struct nlm_file *file;
38897 +
38898 +@@ -174,9 +177,10 @@ nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
38899 + * UNLOCK: release a lock
38900 + */
38901 + static __be32
38902 +-nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
38903 +- struct nlm_res *resp)
38904 ++nlm4svc_proc_unlock(struct svc_rqst *rqstp, void *_argp, void *_resp)
38905 + {
38906 ++ struct nlm_args *argp = _argp;
38907 ++ struct nlm_res *resp = _resp;
38908 + struct nlm_host *host;
38909 + struct nlm_file *file;
38910 +
38911 +@@ -208,9 +212,11 @@ nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
38912 + * was granted
38913 + */
38914 + static __be32
38915 +-nlm4svc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
38916 +- struct nlm_res *resp)
38917 ++nlm4svc_proc_granted(struct svc_rqst *rqstp, void *_argp, void *_resp)
38918 + {
38919 ++ struct nlm_args *argp = _argp;
38920 ++ struct nlm_res *resp = _resp;
38921 ++
38922 + resp->cookie = argp->cookie;
38923 +
38924 + dprintk("lockd: GRANTED called\n");
38925 +@@ -244,7 +250,7 @@ static const struct rpc_call_ops nlm4svc_callback_ops = {
38926 + * doesn't break any clients.
38927 + */
38928 + static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *argp,
38929 +- __be32 (*func)(struct svc_rqst *, struct nlm_args *, struct nlm_res *))
38930 ++ __be32 (*func)(struct svc_rqst *, void *, void *))
38931 + {
38932 + struct nlm_host *host;
38933 + struct nlm_rqst *call;
38934 +@@ -273,35 +279,35 @@ static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args
38935 + return rpc_success;
38936 + }
38937 +
38938 +-static __be32 nlm4svc_proc_test_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
38939 ++static __be32 nlm4svc_proc_test_msg(struct svc_rqst *rqstp, void *argp,
38940 + void *resp)
38941 + {
38942 + dprintk("lockd: TEST_MSG called\n");
38943 + return nlm4svc_callback(rqstp, NLMPROC_TEST_RES, argp, nlm4svc_proc_test);
38944 + }
38945 +
38946 +-static __be32 nlm4svc_proc_lock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
38947 ++static __be32 nlm4svc_proc_lock_msg(struct svc_rqst *rqstp, void *argp,
38948 + void *resp)
38949 + {
38950 + dprintk("lockd: LOCK_MSG called\n");
38951 + return nlm4svc_callback(rqstp, NLMPROC_LOCK_RES, argp, nlm4svc_proc_lock);
38952 + }
38953 +
38954 +-static __be32 nlm4svc_proc_cancel_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
38955 ++static __be32 nlm4svc_proc_cancel_msg(struct svc_rqst *rqstp, void *argp,
38956 + void *resp)
38957 + {
38958 + dprintk("lockd: CANCEL_MSG called\n");
38959 + return nlm4svc_callback(rqstp, NLMPROC_CANCEL_RES, argp, nlm4svc_proc_cancel);
38960 + }
38961 +
38962 +-static __be32 nlm4svc_proc_unlock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
38963 ++static __be32 nlm4svc_proc_unlock_msg(struct svc_rqst *rqstp, void *argp,
38964 + void *resp)
38965 + {
38966 + dprintk("lockd: UNLOCK_MSG called\n");
38967 + return nlm4svc_callback(rqstp, NLMPROC_UNLOCK_RES, argp, nlm4svc_proc_unlock);
38968 + }
38969 +
38970 +-static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
38971 ++static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, void *argp,
38972 + void *resp)
38973 + {
38974 + dprintk("lockd: GRANTED_MSG called\n");
38975 +@@ -312,9 +318,10 @@ static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *
38976 + * SHARE: create a DOS share or alter existing share.
38977 + */
38978 + static __be32
38979 +-nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
38980 +- struct nlm_res *resp)
38981 ++nlm4svc_proc_share(struct svc_rqst *rqstp, void *_argp, void *_resp)
38982 + {
38983 ++ struct nlm_args *argp = _argp;
38984 ++ struct nlm_res *resp = _resp;
38985 + struct nlm_host *host;
38986 + struct nlm_file *file;
38987 +
38988 +@@ -345,9 +352,10 @@ nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
38989 + * UNSHARE: Release a DOS share.
38990 + */
38991 + static __be32
38992 +-nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
38993 +- struct nlm_res *resp)
38994 ++nlm4svc_proc_unshare(struct svc_rqst *rqstp, void *_argp, void *_resp)
38995 + {
38996 ++ struct nlm_args *argp = _argp;
38997 ++ struct nlm_res *resp = _resp;
38998 + struct nlm_host *host;
38999 + struct nlm_file *file;
39000 +
39001 +@@ -378,9 +386,10 @@ nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
39002 + * NM_LOCK: Create an unmonitored lock
39003 + */
39004 + static __be32
39005 +-nlm4svc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
39006 +- struct nlm_res *resp)
39007 ++nlm4svc_proc_nm_lock(struct svc_rqst *rqstp, void *_argp, void *resp)
39008 + {
39009 ++ struct nlm_args *argp = _argp;
39010 ++
39011 + dprintk("lockd: NM_LOCK called\n");
39012 +
39013 + argp->monitor = 0; /* just clean the monitor flag */
39014 +@@ -391,8 +400,7 @@ nlm4svc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
39015 + * FREE_ALL: Release all locks and shares held by client
39016 + */
39017 + static __be32
39018 +-nlm4svc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
39019 +- void *resp)
39020 ++nlm4svc_proc_free_all(struct svc_rqst *rqstp, void *argp, void *resp)
39021 + {
39022 + struct nlm_host *host;
39023 +
39024 +@@ -409,7 +417,7 @@ nlm4svc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
39025 + * SM_NOTIFY: private callback from statd (not part of official NLM proto)
39026 + */
39027 + static __be32
39028 +-nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
39029 ++nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, void *argp,
39030 + void *resp)
39031 + {
39032 + dprintk("lockd: SM_NOTIFY called\n");
39033 +@@ -429,9 +437,10 @@ nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
39034 + * client sent a GRANTED_RES, let's remove the associated block
39035 + */
39036 + static __be32
39037 +-nlm4svc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
39038 +- void *resp)
39039 ++nlm4svc_proc_granted_res(struct svc_rqst *rqstp, void *_argp, void *resp)
39040 + {
39041 ++ struct nlm_res *argp = _argp;
39042 ++
39043 + if (!nlmsvc_ops)
39044 + return rpc_success;
39045 +
39046 +@@ -463,9 +472,9 @@ nlm4svc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
39047 + struct nlm_void { int dummy; };
39048 +
39049 + #define PROC(name, xargt, xrest, argt, rest, respsize) \
39050 +- { .pc_func = (svc_procfunc) nlm4svc_proc_##name, \
39051 +- .pc_decode = (kxdrproc_t) nlm4svc_decode_##xargt, \
39052 +- .pc_encode = (kxdrproc_t) nlm4svc_encode_##xrest, \
39053 ++ { .pc_func = nlm4svc_proc_##name, \
39054 ++ .pc_decode = nlm4svc_decode_##xargt, \
39055 ++ .pc_encode = nlm4svc_encode_##xrest, \
39056 + .pc_release = NULL, \
39057 + .pc_argsize = sizeof(struct nlm_##argt), \
39058 + .pc_ressize = sizeof(struct nlm_##rest), \
39059 +diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
39060 +index fb26b9f..a6d5582 100644
39061 +--- a/fs/lockd/svcproc.c
39062 ++++ b/fs/lockd/svcproc.c
39063 +@@ -102,9 +102,10 @@ nlmsvc_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
39064 + * TEST: Check for conflicting lock
39065 + */
39066 + static __be32
39067 +-nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
39068 +- struct nlm_res *resp)
39069 ++nlmsvc_proc_test(struct svc_rqst *rqstp, void *_argp, void *_resp)
39070 + {
39071 ++ struct nlm_args *argp = _argp;
39072 ++ struct nlm_res *resp = _resp;
39073 + struct nlm_host *host;
39074 + struct nlm_file *file;
39075 + __be32 rc = rpc_success;
39076 +@@ -130,9 +131,10 @@ nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
39077 + }
39078 +
39079 + static __be32
39080 +-nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
39081 +- struct nlm_res *resp)
39082 ++nlmsvc_proc_lock(struct svc_rqst *rqstp, void *_argp, void *_resp)
39083 + {
39084 ++ struct nlm_args *argp = _argp;
39085 ++ struct nlm_res *resp = _resp;
39086 + struct nlm_host *host;
39087 + struct nlm_file *file;
39088 + __be32 rc = rpc_success;
39089 +@@ -172,9 +174,10 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
39090 + }
39091 +
39092 + static __be32
39093 +-nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
39094 +- struct nlm_res *resp)
39095 ++nlmsvc_proc_cancel(struct svc_rqst *rqstp, void *_argp, void *_resp)
39096 + {
39097 ++ struct nlm_args *argp = _argp;
39098 ++ struct nlm_res *resp = _resp;
39099 + struct nlm_host *host;
39100 + struct nlm_file *file;
39101 + struct net *net = SVC_NET(rqstp);
39102 +@@ -206,9 +209,10 @@ nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
39103 + * UNLOCK: release a lock
39104 + */
39105 + static __be32
39106 +-nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
39107 +- struct nlm_res *resp)
39108 ++nlmsvc_proc_unlock(struct svc_rqst *rqstp, void *_argp, void *_resp)
39109 + {
39110 ++ struct nlm_args *argp = _argp;
39111 ++ struct nlm_res *resp = _resp;
39112 + struct nlm_host *host;
39113 + struct nlm_file *file;
39114 + struct net *net = SVC_NET(rqstp);
39115 +@@ -241,9 +245,11 @@ nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
39116 + * was granted
39117 + */
39118 + static __be32
39119 +-nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
39120 +- struct nlm_res *resp)
39121 ++nlmsvc_proc_granted(struct svc_rqst *rqstp, void *_argp, void *_resp)
39122 + {
39123 ++ struct nlm_args *argp = _argp;
39124 ++ struct nlm_res *resp = _resp;
39125 ++
39126 + resp->cookie = argp->cookie;
39127 +
39128 + dprintk("lockd: GRANTED called\n");
39129 +@@ -285,7 +291,7 @@ static const struct rpc_call_ops nlmsvc_callback_ops = {
39130 + * doesn't break any clients.
39131 + */
39132 + static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *argp,
39133 +- __be32 (*func)(struct svc_rqst *, struct nlm_args *, struct nlm_res *))
39134 ++ __be32 (*func)(struct svc_rqst *, void *, void *))
39135 + {
39136 + struct nlm_host *host;
39137 + struct nlm_rqst *call;
39138 +@@ -314,38 +320,33 @@ static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args
39139 + return rpc_success;
39140 + }
39141 +
39142 +-static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
39143 +- void *resp)
39144 ++static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp,void *argp, void *resp)
39145 + {
39146 + dprintk("lockd: TEST_MSG called\n");
39147 + return nlmsvc_callback(rqstp, NLMPROC_TEST_RES, argp, nlmsvc_proc_test);
39148 + }
39149 +
39150 +-static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
39151 +- void *resp)
39152 ++static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp, void *argp, void *resp)
39153 + {
39154 + dprintk("lockd: LOCK_MSG called\n");
39155 + return nlmsvc_callback(rqstp, NLMPROC_LOCK_RES, argp, nlmsvc_proc_lock);
39156 + }
39157 +
39158 +-static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
39159 +- void *resp)
39160 ++static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp, void *argp, void *resp)
39161 + {
39162 + dprintk("lockd: CANCEL_MSG called\n");
39163 + return nlmsvc_callback(rqstp, NLMPROC_CANCEL_RES, argp, nlmsvc_proc_cancel);
39164 + }
39165 +
39166 + static __be32
39167 +-nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
39168 +- void *resp)
39169 ++nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp, void *argp, void *resp)
39170 + {
39171 + dprintk("lockd: UNLOCK_MSG called\n");
39172 + return nlmsvc_callback(rqstp, NLMPROC_UNLOCK_RES, argp, nlmsvc_proc_unlock);
39173 + }
39174 +
39175 + static __be32
39176 +-nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
39177 +- void *resp)
39178 ++nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, void *argp, void *resp)
39179 + {
39180 + dprintk("lockd: GRANTED_MSG called\n");
39181 + return nlmsvc_callback(rqstp, NLMPROC_GRANTED_RES, argp, nlmsvc_proc_granted);
39182 +@@ -355,9 +356,10 @@ nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
39183 + * SHARE: create a DOS share or alter existing share.
39184 + */
39185 + static __be32
39186 +-nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
39187 +- struct nlm_res *resp)
39188 ++nlmsvc_proc_share(struct svc_rqst *rqstp, void *_argp, void *_resp)
39189 + {
39190 ++ struct nlm_args *argp = _argp;
39191 ++ struct nlm_res *resp = _resp;
39192 + struct nlm_host *host;
39193 + struct nlm_file *file;
39194 +
39195 +@@ -388,9 +390,10 @@ nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
39196 + * UNSHARE: Release a DOS share.
39197 + */
39198 + static __be32
39199 +-nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
39200 +- struct nlm_res *resp)
39201 ++nlmsvc_proc_unshare(struct svc_rqst *rqstp, void *_argp, void *_resp)
39202 + {
39203 ++ struct nlm_args *argp = _argp;
39204 ++ struct nlm_res *resp = _resp;
39205 + struct nlm_host *host;
39206 + struct nlm_file *file;
39207 +
39208 +@@ -421,9 +424,10 @@ nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
39209 + * NM_LOCK: Create an unmonitored lock
39210 + */
39211 + static __be32
39212 +-nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
39213 +- struct nlm_res *resp)
39214 ++nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, void *_argp, void *resp)
39215 + {
39216 ++ struct nlm_args *argp = _argp;
39217 ++
39218 + dprintk("lockd: NM_LOCK called\n");
39219 +
39220 + argp->monitor = 0; /* just clean the monitor flag */
39221 +@@ -434,8 +438,7 @@ nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
39222 + * FREE_ALL: Release all locks and shares held by client
39223 + */
39224 + static __be32
39225 +-nlmsvc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
39226 +- void *resp)
39227 ++nlmsvc_proc_free_all(struct svc_rqst *rqstp, void *argp, void *resp)
39228 + {
39229 + struct nlm_host *host;
39230 +
39231 +@@ -452,8 +455,7 @@ nlmsvc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
39232 + * SM_NOTIFY: private callback from statd (not part of official NLM proto)
39233 + */
39234 + static __be32
39235 +-nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
39236 +- void *resp)
39237 ++nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, void *argp, void *resp)
39238 + {
39239 + dprintk("lockd: SM_NOTIFY called\n");
39240 +
39241 +@@ -472,9 +474,10 @@ nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
39242 + * client sent a GRANTED_RES, let's remove the associated block
39243 + */
39244 + static __be32
39245 +-nlmsvc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
39246 +- void *resp)
39247 ++nlmsvc_proc_granted_res(struct svc_rqst *rqstp, void *_argp, void *resp)
39248 + {
39249 ++ struct nlm_res *argp = _argp;
39250 ++
39251 + if (!nlmsvc_ops)
39252 + return rpc_success;
39253 +
39254 +@@ -505,9 +508,9 @@ nlmsvc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
39255 + struct nlm_void { int dummy; };
39256 +
39257 + #define PROC(name, xargt, xrest, argt, rest, respsize) \
39258 +- { .pc_func = (svc_procfunc) nlmsvc_proc_##name, \
39259 +- .pc_decode = (kxdrproc_t) nlmsvc_decode_##xargt, \
39260 +- .pc_encode = (kxdrproc_t) nlmsvc_encode_##xrest, \
39261 ++ { .pc_func = nlmsvc_proc_##name, \
39262 ++ .pc_decode = nlmsvc_decode_##xargt, \
39263 ++ .pc_encode = nlmsvc_encode_##xrest, \
39264 + .pc_release = NULL, \
39265 + .pc_argsize = sizeof(struct nlm_##argt), \
39266 + .pc_ressize = sizeof(struct nlm_##rest), \
39267 +diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c
39268 +index 5b651da..cfe0944 100644
39269 +--- a/fs/lockd/xdr.c
39270 ++++ b/fs/lockd/xdr.c
39271 +@@ -182,8 +182,9 @@ nlm_encode_testres(__be32 *p, struct nlm_res *resp)
39272 + * First, the server side XDR functions
39273 + */
39274 + int
39275 +-nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39276 ++nlmsvc_decode_testargs(void *rqstp, __be32 *p, void *_argp)
39277 + {
39278 ++ nlm_args *argp = _argp;
39279 + u32 exclusive;
39280 +
39281 + if (!(p = nlm_decode_cookie(p, &argp->cookie)))
39282 +@@ -199,16 +200,19 @@ nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39283 + }
39284 +
39285 + int
39286 +-nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39287 ++nlmsvc_encode_testres(void *rqstp, __be32 *p, void *_resp)
39288 + {
39289 ++ struct nlm_res *resp = _resp;
39290 ++
39291 + if (!(p = nlm_encode_testres(p, resp)))
39292 + return 0;
39293 + return xdr_ressize_check(rqstp, p);
39294 + }
39295 +
39296 + int
39297 +-nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39298 ++nlmsvc_decode_lockargs(void *rqstp, __be32 *p, void *_argp)
39299 + {
39300 ++ nlm_args *argp = _argp;
39301 + u32 exclusive;
39302 +
39303 + if (!(p = nlm_decode_cookie(p, &argp->cookie)))
39304 +@@ -227,8 +231,9 @@ nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39305 + }
39306 +
39307 + int
39308 +-nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39309 ++nlmsvc_decode_cancargs(void *rqstp, __be32 *p, void *_argp)
39310 + {
39311 ++ nlm_args *argp = _argp;
39312 + u32 exclusive;
39313 +
39314 + if (!(p = nlm_decode_cookie(p, &argp->cookie)))
39315 +@@ -243,8 +248,10 @@ nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39316 + }
39317 +
39318 + int
39319 +-nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39320 ++nlmsvc_decode_unlockargs(void *rqstp, __be32 *p, void *_argp)
39321 + {
39322 ++ nlm_args *argp = _argp;
39323 ++
39324 + if (!(p = nlm_decode_cookie(p, &argp->cookie))
39325 + || !(p = nlm_decode_lock(p, &argp->lock)))
39326 + return 0;
39327 +@@ -253,8 +260,10 @@ nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39328 + }
39329 +
39330 + int
39331 +-nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39332 ++nlmsvc_decode_shareargs(void *rqstp, __be32 *p, void *_argp)
39333 + {
39334 ++ nlm_args *argp = _argp;
39335 ++
39336 + struct nlm_lock *lock = &argp->lock;
39337 +
39338 + memset(lock, 0, sizeof(*lock));
39339 +@@ -274,8 +283,10 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39340 + }
39341 +
39342 + int
39343 +-nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39344 ++nlmsvc_encode_shareres(void *rqstp, __be32 *p, void *_resp)
39345 + {
39346 ++ struct nlm_res *resp = _resp;
39347 ++
39348 + if (!(p = nlm_encode_cookie(p, &resp->cookie)))
39349 + return 0;
39350 + *p++ = resp->status;
39351 +@@ -284,8 +295,10 @@ nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39352 + }
39353 +
39354 + int
39355 +-nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39356 ++nlmsvc_encode_res(void *rqstp, __be32 *p, void *_resp)
39357 + {
39358 ++ struct nlm_res *resp = _resp;
39359 ++
39360 + if (!(p = nlm_encode_cookie(p, &resp->cookie)))
39361 + return 0;
39362 + *p++ = resp->status;
39363 +@@ -293,8 +306,9 @@ nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39364 + }
39365 +
39366 + int
39367 +-nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
39368 ++nlmsvc_decode_notify(void *rqstp, __be32 *p, void *_argp)
39369 + {
39370 ++ struct nlm_args *argp = _argp;
39371 + struct nlm_lock *lock = &argp->lock;
39372 +
39373 + if (!(p = xdr_decode_string_inplace(p, &lock->caller,
39374 +@@ -305,8 +319,10 @@ nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
39375 + }
39376 +
39377 + int
39378 +-nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
39379 ++nlmsvc_decode_reboot(void *rqstp, __be32 *p, void *_argp)
39380 + {
39381 ++ struct nlm_reboot *argp = _argp;
39382 ++
39383 + if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
39384 + return 0;
39385 + argp->state = ntohl(*p++);
39386 +@@ -316,8 +332,10 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
39387 + }
39388 +
39389 + int
39390 +-nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39391 ++nlmsvc_decode_res(void *rqstp, __be32 *p, void *_resp)
39392 + {
39393 ++ struct nlm_res *resp = _resp;
39394 ++
39395 + if (!(p = nlm_decode_cookie(p, &resp->cookie)))
39396 + return 0;
39397 + resp->status = *p++;
39398 +@@ -325,13 +343,13 @@ nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39399 + }
39400 +
39401 + int
39402 +-nlmsvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
39403 ++nlmsvc_decode_void(void *rqstp, __be32 *p, void *dummy)
39404 + {
39405 + return xdr_argsize_check(rqstp, p);
39406 + }
39407 +
39408 + int
39409 +-nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
39410 ++nlmsvc_encode_void(void *rqstp, __be32 *p, void *dummy)
39411 + {
39412 + return xdr_ressize_check(rqstp, p);
39413 + }
39414 +diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c
39415 +index dfa4789..be443bd 100644
39416 +--- a/fs/lockd/xdr4.c
39417 ++++ b/fs/lockd/xdr4.c
39418 +@@ -179,8 +179,9 @@ nlm4_encode_testres(__be32 *p, struct nlm_res *resp)
39419 + * First, the server side XDR functions
39420 + */
39421 + int
39422 +-nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39423 ++nlm4svc_decode_testargs(void *rqstp, __be32 *p, void *_argp)
39424 + {
39425 ++ nlm_args *argp = _argp;
39426 + u32 exclusive;
39427 +
39428 + if (!(p = nlm4_decode_cookie(p, &argp->cookie)))
39429 +@@ -196,7 +197,7 @@ nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39430 + }
39431 +
39432 + int
39433 +-nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39434 ++nlm4svc_encode_testres(void *rqstp, __be32 *p, void *resp)
39435 + {
39436 + if (!(p = nlm4_encode_testres(p, resp)))
39437 + return 0;
39438 +@@ -204,8 +205,9 @@ nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39439 + }
39440 +
39441 + int
39442 +-nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39443 ++nlm4svc_decode_lockargs(void *rqstp, __be32 *p, void *_argp)
39444 + {
39445 ++ nlm_args *argp = _argp;
39446 + u32 exclusive;
39447 +
39448 + if (!(p = nlm4_decode_cookie(p, &argp->cookie)))
39449 +@@ -224,8 +226,9 @@ nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39450 + }
39451 +
39452 + int
39453 +-nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39454 ++nlm4svc_decode_cancargs(void *rqstp, __be32 *p, void *_argp)
39455 + {
39456 ++ nlm_args *argp = _argp;
39457 + u32 exclusive;
39458 +
39459 + if (!(p = nlm4_decode_cookie(p, &argp->cookie)))
39460 +@@ -240,8 +243,10 @@ nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39461 + }
39462 +
39463 + int
39464 +-nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39465 ++nlm4svc_decode_unlockargs(void *rqstp, __be32 *p, void *_argp)
39466 + {
39467 ++ nlm_args *argp = _argp;
39468 ++
39469 + if (!(p = nlm4_decode_cookie(p, &argp->cookie))
39470 + || !(p = nlm4_decode_lock(p, &argp->lock)))
39471 + return 0;
39472 +@@ -250,8 +255,9 @@ nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39473 + }
39474 +
39475 + int
39476 +-nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39477 ++nlm4svc_decode_shareargs(void *rqstp, __be32 *p, void *_argp)
39478 + {
39479 ++ nlm_args *argp = _argp;
39480 + struct nlm_lock *lock = &argp->lock;
39481 +
39482 + memset(lock, 0, sizeof(*lock));
39483 +@@ -271,8 +277,10 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
39484 + }
39485 +
39486 + int
39487 +-nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39488 ++nlm4svc_encode_shareres(void *rqstp, __be32 *p, void *_resp)
39489 + {
39490 ++ struct nlm_res *resp = _resp;
39491 ++
39492 + if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
39493 + return 0;
39494 + *p++ = resp->status;
39495 +@@ -281,8 +289,10 @@ nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39496 + }
39497 +
39498 + int
39499 +-nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39500 ++nlm4svc_encode_res(void *rqstp, __be32 *p, void *_resp)
39501 + {
39502 ++ struct nlm_res *resp = _resp;
39503 ++
39504 + if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
39505 + return 0;
39506 + *p++ = resp->status;
39507 +@@ -290,8 +300,9 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39508 + }
39509 +
39510 + int
39511 +-nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
39512 ++nlm4svc_decode_notify(void *rqstp, __be32 *p, void *_argp)
39513 + {
39514 ++ struct nlm_args *argp = _argp;
39515 + struct nlm_lock *lock = &argp->lock;
39516 +
39517 + if (!(p = xdr_decode_string_inplace(p, &lock->caller,
39518 +@@ -302,8 +313,10 @@ nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
39519 + }
39520 +
39521 + int
39522 +-nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
39523 ++nlm4svc_decode_reboot(void *rqstp, __be32 *p, void *_argp)
39524 + {
39525 ++ struct nlm_reboot *argp = _argp;
39526 ++
39527 + if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
39528 + return 0;
39529 + argp->state = ntohl(*p++);
39530 +@@ -313,8 +326,10 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp
39531 + }
39532 +
39533 + int
39534 +-nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39535 ++nlm4svc_decode_res(void *rqstp, __be32 *p, void *_resp)
39536 + {
39537 ++ struct nlm_res *resp = _resp;
39538 ++
39539 + if (!(p = nlm4_decode_cookie(p, &resp->cookie)))
39540 + return 0;
39541 + resp->status = *p++;
39542 +@@ -322,13 +337,13 @@ nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
39543 + }
39544 +
39545 + int
39546 +-nlm4svc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
39547 ++nlm4svc_decode_void(void *rqstp, __be32 *p, void *dummy)
39548 + {
39549 + return xdr_argsize_check(rqstp, p);
39550 + }
39551 +
39552 + int
39553 +-nlm4svc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
39554 ++nlm4svc_encode_void(void *rqstp, __be32 *p, void *dummy)
39555 + {
39556 + return xdr_ressize_check(rqstp, p);
39557 + }
39558 +diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
39559 +index a709d80..17ab4e7 100644
39560 +--- a/fs/logfs/dev_bdev.c
39561 ++++ b/fs/logfs/dev_bdev.c
39562 +@@ -33,9 +33,8 @@ static int sync_request(struct page *page, struct block_device *bdev, int rw)
39563 + return submit_bio_wait(rw, &bio);
39564 + }
39565 +
39566 +-static int bdev_readpage(void *_sb, struct page *page)
39567 ++static int bdev_readpage(struct super_block *sb, struct page *page)
39568 + {
39569 +- struct super_block *sb = _sb;
39570 + struct block_device *bdev = logfs_super(sb)->s_bdev;
39571 + int err;
39572 +
39573 +@@ -51,6 +50,11 @@ static int bdev_readpage(void *_sb, struct page *page)
39574 + return err;
39575 + }
39576 +
39577 ++static int bdev_filler(struct file *file, struct page *page)
39578 ++{
39579 ++ return bdev_readpage((struct super_block *)file, page);
39580 ++}
39581 ++
39582 + static DECLARE_WAIT_QUEUE_HEAD(wq);
39583 +
39584 + static void writeseg_end_io(struct bio *bio)
39585 +@@ -246,7 +250,7 @@ static struct page *bdev_find_first_sb(struct super_block *sb, u64 *ofs)
39586 + {
39587 + struct logfs_super *super = logfs_super(sb);
39588 + struct address_space *mapping = super->s_mapping_inode->i_mapping;
39589 +- filler_t *filler = bdev_readpage;
39590 ++ filler_t *filler = bdev_filler;
39591 +
39592 + *ofs = 0;
39593 + return read_cache_page(mapping, 0, filler, sb);
39594 +@@ -256,7 +260,7 @@ static struct page *bdev_find_last_sb(struct super_block *sb, u64 *ofs)
39595 + {
39596 + struct logfs_super *super = logfs_super(sb);
39597 + struct address_space *mapping = super->s_mapping_inode->i_mapping;
39598 +- filler_t *filler = bdev_readpage;
39599 ++ filler_t *filler = bdev_filler;
39600 + u64 pos = (super->s_bdev->bd_inode->i_size & ~0xfffULL) - 0x1000;
39601 + pgoff_t index = pos >> PAGE_SHIFT;
39602 +
39603 +@@ -287,6 +291,7 @@ static const struct logfs_device_ops bd_devops = {
39604 + .find_last_sb = bdev_find_last_sb,
39605 + .write_sb = bdev_write_sb,
39606 + .readpage = bdev_readpage,
39607 ++ .filler = bdev_filler,
39608 + .writeseg = bdev_writeseg,
39609 + .erase = bdev_erase,
39610 + .can_write_buf = bdev_can_write_buf,
39611 +diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c
39612 +index 9c50144..c3740b7 100644
39613 +--- a/fs/logfs/dev_mtd.c
39614 ++++ b/fs/logfs/dev_mtd.c
39615 +@@ -122,9 +122,8 @@ static void logfs_mtd_sync(struct super_block *sb)
39616 + mtd_sync(mtd);
39617 + }
39618 +
39619 +-static int logfs_mtd_readpage(void *_sb, struct page *page)
39620 ++static int logfs_mtd_readpage(struct super_block *sb, struct page *page)
39621 + {
39622 +- struct super_block *sb = _sb;
39623 + int err;
39624 +
39625 + err = logfs_mtd_read(sb, page->index << PAGE_SHIFT, PAGE_SIZE,
39626 +@@ -145,11 +144,16 @@ static int logfs_mtd_readpage(void *_sb, struct page *page)
39627 + return err;
39628 + }
39629 +
39630 ++static int logfs_mtd_filler(struct file *file, struct page *page)
39631 ++{
39632 ++ return logfs_mtd_readpage((struct super_block *)file, page);
39633 ++}
39634 ++
39635 + static struct page *logfs_mtd_find_first_sb(struct super_block *sb, u64 *ofs)
39636 + {
39637 + struct logfs_super *super = logfs_super(sb);
39638 + struct address_space *mapping = super->s_mapping_inode->i_mapping;
39639 +- filler_t *filler = logfs_mtd_readpage;
39640 ++ filler_t *filler = logfs_mtd_filler;
39641 + struct mtd_info *mtd = super->s_mtd;
39642 +
39643 + *ofs = 0;
39644 +@@ -166,7 +170,7 @@ static struct page *logfs_mtd_find_last_sb(struct super_block *sb, u64 *ofs)
39645 + {
39646 + struct logfs_super *super = logfs_super(sb);
39647 + struct address_space *mapping = super->s_mapping_inode->i_mapping;
39648 +- filler_t *filler = logfs_mtd_readpage;
39649 ++ filler_t *filler = logfs_mtd_filler;
39650 + struct mtd_info *mtd = super->s_mtd;
39651 +
39652 + *ofs = mtd->size - mtd->erasesize;
39653 +@@ -254,6 +258,7 @@ static const struct logfs_device_ops mtd_devops = {
39654 + .find_first_sb = logfs_mtd_find_first_sb,
39655 + .find_last_sb = logfs_mtd_find_last_sb,
39656 + .readpage = logfs_mtd_readpage,
39657 ++ .filler = logfs_mtd_filler,
39658 + .writeseg = logfs_mtd_writeseg,
39659 + .erase = logfs_mtd_erase,
39660 + .can_write_buf = logfs_mtd_can_write_buf,
39661 +diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c
39662 +index 542468e..8b1e52a 100644
39663 +--- a/fs/logfs/dir.c
39664 ++++ b/fs/logfs/dir.c
39665 +@@ -174,7 +174,7 @@ static struct page *logfs_get_dd_page(struct inode *dir, struct dentry *dentry)
39666 + if (!logfs_exist_block(dir, index))
39667 + continue;
39668 + page = read_cache_page(dir->i_mapping, index,
39669 +- (filler_t *)logfs_readpage, NULL);
39670 ++ logfs_readpage, NULL);
39671 + if (IS_ERR(page))
39672 + return page;
39673 + dd = kmap_atomic(page);
39674 +@@ -306,7 +306,7 @@ static int logfs_readdir(struct file *file, struct dir_context *ctx)
39675 + continue;
39676 + }
39677 + page = read_cache_page(dir->i_mapping, pos,
39678 +- (filler_t *)logfs_readpage, NULL);
39679 ++ logfs_readpage, NULL);
39680 + if (IS_ERR(page))
39681 + return PTR_ERR(page);
39682 + dd = kmap(page);
39683 +diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h
39684 +index 27d040e..8959149 100644
39685 +--- a/fs/logfs/logfs.h
39686 ++++ b/fs/logfs/logfs.h
39687 +@@ -151,7 +151,8 @@ struct logfs_device_ops {
39688 + struct page *(*find_first_sb)(struct super_block *sb, u64 *ofs);
39689 + struct page *(*find_last_sb)(struct super_block *sb, u64 *ofs);
39690 + int (*write_sb)(struct super_block *sb, struct page *page);
39691 +- int (*readpage)(void *_sb, struct page *page);
39692 ++ int (*readpage)(struct super_block *sb, struct page *page);
39693 ++ int (*filler)(struct file *file, struct page *page);
39694 + void (*writeseg)(struct super_block *sb, u64 ofs, size_t len);
39695 + int (*erase)(struct super_block *sb, loff_t ofs, size_t len,
39696 + int ensure_write);
39697 +@@ -617,8 +618,6 @@ static inline int logfs_buf_recover(struct logfs_area *area, u64 ofs,
39698 + }
39699 +
39700 + /* super.c */
39701 +-struct page *emergency_read_begin(struct address_space *mapping, pgoff_t index);
39702 +-void emergency_read_end(struct page *page);
39703 + void logfs_crash_dump(struct super_block *sb);
39704 + int logfs_statfs(struct dentry *dentry, struct kstatfs *stats);
39705 + int logfs_check_ds(struct logfs_disk_super *ds);
39706 +diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
39707 +index 20973c9..9ee7c57 100644
39708 +--- a/fs/logfs/readwrite.c
39709 ++++ b/fs/logfs/readwrite.c
39710 +@@ -1963,7 +1963,7 @@ int logfs_read_inode(struct inode *inode)
39711 + return -ENODATA;
39712 +
39713 + page = read_cache_page(master_inode->i_mapping, ino,
39714 +- (filler_t *)logfs_readpage, NULL);
39715 ++ logfs_readpage, NULL);
39716 + if (IS_ERR(page))
39717 + return PTR_ERR(page);
39718 +
39719 +diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
39720 +index d270e4b..aa1fb41 100644
39721 +--- a/fs/logfs/segment.c
39722 ++++ b/fs/logfs/segment.c
39723 +@@ -54,7 +54,7 @@ static struct page *get_mapping_page(struct super_block *sb, pgoff_t index,
39724 + {
39725 + struct logfs_super *super = logfs_super(sb);
39726 + struct address_space *mapping = super->s_mapping_inode->i_mapping;
39727 +- filler_t *filler = super->s_devops->readpage;
39728 ++ filler_t *filler = super->s_devops->filler;
39729 + struct page *page;
39730 +
39731 + BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS));
39732 +diff --git a/fs/logfs/super.c b/fs/logfs/super.c
39733 +index 5436029..4597ec8 100644
39734 +--- a/fs/logfs/super.c
39735 ++++ b/fs/logfs/super.c
39736 +@@ -18,39 +18,6 @@
39737 + #include <linux/statfs.h>
39738 + #include <linux/buffer_head.h>
39739 +
39740 +-static DEFINE_MUTEX(emergency_mutex);
39741 +-static struct page *emergency_page;
39742 +-
39743 +-struct page *emergency_read_begin(struct address_space *mapping, pgoff_t index)
39744 +-{
39745 +- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
39746 +- struct page *page;
39747 +- int err;
39748 +-
39749 +- page = read_cache_page(mapping, index, filler, NULL);
39750 +- if (page)
39751 +- return page;
39752 +-
39753 +- /* No more pages available, switch to emergency page */
39754 +- printk(KERN_INFO"Logfs: Using emergency page\n");
39755 +- mutex_lock(&emergency_mutex);
39756 +- err = filler(NULL, emergency_page);
39757 +- if (err) {
39758 +- mutex_unlock(&emergency_mutex);
39759 +- printk(KERN_EMERG"Logfs: Error reading emergency page\n");
39760 +- return ERR_PTR(err);
39761 +- }
39762 +- return emergency_page;
39763 +-}
39764 +-
39765 +-void emergency_read_end(struct page *page)
39766 +-{
39767 +- if (page == emergency_page)
39768 +- mutex_unlock(&emergency_mutex);
39769 +- else
39770 +- page_cache_release(page);
39771 +-}
39772 +-
39773 + static void dump_segfile(struct super_block *sb)
39774 + {
39775 + struct logfs_super *super = logfs_super(sb);
39776 +@@ -614,10 +581,6 @@ static int __init logfs_init(void)
39777 + {
39778 + int ret;
39779 +
39780 +- emergency_page = alloc_pages(GFP_KERNEL, 0);
39781 +- if (!emergency_page)
39782 +- return -ENOMEM;
39783 +-
39784 + ret = logfs_compr_init();
39785 + if (ret)
39786 + goto out1;
39787 +@@ -633,7 +596,6 @@ static int __init logfs_init(void)
39788 + out2:
39789 + logfs_compr_exit();
39790 + out1:
39791 +- __free_pages(emergency_page, 0);
39792 + return ret;
39793 + }
39794 +
39795 +@@ -642,7 +604,6 @@ static void __exit logfs_exit(void)
39796 + unregister_filesystem(&logfs_fs_type);
39797 + logfs_destroy_inode_cache();
39798 + logfs_compr_exit();
39799 +- __free_pages(emergency_page, 0);
39800 + }
39801 +
39802 + module_init(logfs_init);
39803 diff --git a/fs/mount.h b/fs/mount.h
39804 index 14db05d..687f6d8 100644
39805 --- a/fs/mount.h
39806 @@ -84678,7 +100460,7 @@ index 14db05d..687f6d8 100644
39807 #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
39808
39809 diff --git a/fs/namei.c b/fs/namei.c
39810 -index d8ee4da..d6bf55e 100644
39811 +index 9c590e0..654baa99 100644
39812 --- a/fs/namei.c
39813 +++ b/fs/namei.c
39814 @@ -336,17 +336,32 @@ int generic_permission(struct inode *inode, int mask)
39815 @@ -84734,7 +100516,7 @@ index d8ee4da..d6bf55e 100644
39816 }
39817 EXPORT_SYMBOL(generic_permission);
39818 @@ -514,12 +521,35 @@ struct nameidata {
39819 - struct nameidata *saved;
39820 + struct inode *link_inode;
39821 unsigned root_seq;
39822 int dfd;
39823 -};
39824 @@ -84770,20 +100552,18 @@ index d8ee4da..d6bf55e 100644
39825 p->dfd = dfd;
39826 p->name = name;
39827 p->total_link_count = old ? old->total_link_count : 0;
39828 -@@ -538,6 +568,12 @@ static void restore_nameidata(void)
39829 +@@ -536,6 +566,10 @@ static void restore_nameidata(void)
39830 + old->total_link_count = now->total_link_count;
39831 + if (now->stack != now->internal)
39832 kfree(now->stack);
39833 - now->stack = now->internal;
39834 - }
39835 +#ifdef CONFIG_GRKERNSEC_SYMLINKOWN
39836 -+ if (now->symlinkown_stack != now->symlinkown_internal) {
39837 ++ if (now->symlinkown_stack != now->symlinkown_internal)
39838 + kfree(now->symlinkown_stack);
39839 -+ now->symlinkown_stack = now->symlinkown_internal;
39840 -+ }
39841 +#endif
39842 }
39843
39844 static int __nd_alloc_stack(struct nameidata *nd)
39845 -@@ -557,6 +593,7 @@ static int __nd_alloc_stack(struct nameidata *nd)
39846 +@@ -555,6 +589,7 @@ static int __nd_alloc_stack(struct nameidata *nd)
39847 }
39848 memcpy(p, nd->internal, sizeof(nd->internal));
39849 nd->stack = p;
39850 @@ -84791,7 +100571,7 @@ index d8ee4da..d6bf55e 100644
39851 return 0;
39852 }
39853
39854 -@@ -578,8 +615,32 @@ static bool path_connected(const struct path *path)
39855 +@@ -576,8 +611,32 @@ static bool path_connected(const struct path *path)
39856 return is_subdir(path->dentry, mnt->mnt_root);
39857 }
39858
39859 @@ -84824,7 +100604,7 @@ index d8ee4da..d6bf55e 100644
39860 if (likely(nd->depth != EMBEDDED_LEVELS))
39861 return 0;
39862 if (likely(nd->stack != nd->internal))
39863 -@@ -608,6 +669,14 @@ static void terminate_walk(struct nameidata *nd)
39864 +@@ -603,6 +662,14 @@ static void terminate_walk(struct nameidata *nd)
39865 path_put(&nd->path);
39866 for (i = 0; i < nd->depth; i++)
39867 path_put(&nd->stack[i].link);
39868 @@ -84839,7 +100619,7 @@ index d8ee4da..d6bf55e 100644
39869 if (nd->root.mnt && !(nd->flags & LOOKUP_ROOT)) {
39870 path_put(&nd->root);
39871 nd->root.mnt = NULL;
39872 -@@ -1001,6 +1070,9 @@ const char *get_link(struct nameidata *nd)
39873 +@@ -1014,6 +1081,9 @@ const char *get_link(struct nameidata *nd)
39874 if (unlikely(error))
39875 return ERR_PTR(error);
39876
39877 @@ -84849,7 +100629,7 @@ index d8ee4da..d6bf55e 100644
39878 nd->last_type = LAST_BIND;
39879 res = inode->i_link;
39880 if (!res) {
39881 -@@ -1689,6 +1761,23 @@ static int pick_link(struct nameidata *nd, struct path *link,
39882 +@@ -1690,6 +1760,23 @@ static int pick_link(struct nameidata *nd, struct path *link,
39883 }
39884 }
39885
39886 @@ -84872,8 +100652,8 @@ index d8ee4da..d6bf55e 100644
39887 +
39888 last = nd->stack + nd->depth++;
39889 last->link = *link;
39890 - last->cookie = NULL;
39891 -@@ -1833,7 +1922,7 @@ EXPORT_SYMBOL(full_name_hash);
39892 + clear_delayed_call(&last->done);
39893 +@@ -1834,7 +1921,7 @@ EXPORT_SYMBOL(full_name_hash);
39894 static inline u64 hash_name(const char *name)
39895 {
39896 unsigned long a, b, adata, bdata, mask, hash, len;
39897 @@ -84882,7 +100662,7 @@ index d8ee4da..d6bf55e 100644
39898
39899 hash = a = 0;
39900 len = -sizeof(unsigned long);
39901 -@@ -2001,6 +2090,10 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
39902 +@@ -2002,6 +2089,10 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
39903 nd->last_type = LAST_ROOT; /* if there are only slashes... */
39904 nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
39905 nd->depth = 0;
39906 @@ -84893,7 +100673,7 @@ index d8ee4da..d6bf55e 100644
39907 if (flags & LOOKUP_ROOT) {
39908 struct dentry *root = nd->root.dentry;
39909 struct inode *inode = root->d_inode;
39910 -@@ -2138,6 +2231,14 @@ static int path_lookupat(struct nameidata *nd, unsigned flags, struct path *path
39911 +@@ -2133,6 +2224,14 @@ static int path_lookupat(struct nameidata *nd, unsigned flags, struct path *path
39912 if (!err)
39913 err = complete_walk(nd);
39914
39915 @@ -84908,7 +100688,7 @@ index d8ee4da..d6bf55e 100644
39916 if (!err && nd->flags & LOOKUP_DIRECTORY)
39917 if (!d_can_lookup(nd->path.dentry))
39918 err = -ENOTDIR;
39919 -@@ -2186,6 +2287,14 @@ static int path_parentat(struct nameidata *nd, unsigned flags,
39920 +@@ -2181,6 +2280,14 @@ static int path_parentat(struct nameidata *nd, unsigned flags,
39921 err = link_path_walk(s, nd);
39922 if (!err)
39923 err = complete_walk(nd);
39924 @@ -84923,7 +100703,7 @@ index d8ee4da..d6bf55e 100644
39925 if (!err) {
39926 *parent = nd->path;
39927 nd->path.mnt = NULL;
39928 -@@ -2717,6 +2826,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
39929 +@@ -2779,6 +2886,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
39930 if (flag & O_NOATIME && !inode_owner_or_capable(inode))
39931 return -EPERM;
39932
39933 @@ -84937,7 +100717,7 @@ index d8ee4da..d6bf55e 100644
39934 return 0;
39935 }
39936
39937 -@@ -2983,6 +3099,21 @@ static int lookup_open(struct nameidata *nd, struct path *path,
39938 +@@ -3045,6 +3159,21 @@ static int lookup_open(struct nameidata *nd, struct path *path,
39939 /* Negative dentry, just create the file */
39940 if (!dentry->d_inode && (op->open_flag & O_CREAT)) {
39941 umode_t mode = op->mode;
39942 @@ -84959,7 +100739,7 @@ index d8ee4da..d6bf55e 100644
39943 if (!IS_POSIXACL(dir->d_inode))
39944 mode &= ~current_umask();
39945 /*
39946 -@@ -3004,6 +3135,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
39947 +@@ -3066,6 +3195,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
39948 nd->flags & LOOKUP_EXCL);
39949 if (error)
39950 goto out_dput;
39951 @@ -84968,7 +100748,7 @@ index d8ee4da..d6bf55e 100644
39952 }
39953 out_no_open:
39954 path->dentry = dentry;
39955 -@@ -3109,11 +3242,24 @@ retry_lookup:
39956 +@@ -3171,11 +3302,24 @@ retry_lookup:
39957 goto finish_open_created;
39958 }
39959
39960 @@ -84994,7 +100774,7 @@ index d8ee4da..d6bf55e 100644
39961
39962 /*
39963 * If atomic_open() acquired write access it is dropped now due to
39964 -@@ -3166,6 +3312,21 @@ finish_open:
39965 +@@ -3228,6 +3372,21 @@ finish_open:
39966 path_put(&save_parent);
39967 return error;
39968 }
39969 @@ -85008,7 +100788,7 @@ index d8ee4da..d6bf55e 100644
39970 + if (error)
39971 + goto out;
39972 +
39973 -+ if (gr_handle_nameidata_symlinkowner(nd, inode)) {
39974 ++ if (gr_handle_nameidata_symlinkowner(nd, nd->inode)) {
39975 + error = -EACCES;
39976 + goto out;
39977 + }
39978 @@ -85016,7 +100796,7 @@ index d8ee4da..d6bf55e 100644
39979 audit_inode(nd->name, nd->path.dentry, 0);
39980 if (unlikely(d_is_symlink(nd->path.dentry)) && !(open_flag & O_PATH)) {
39981 error = -ELOOP;
39982 -@@ -3440,9 +3601,11 @@ static struct dentry *filename_create(int dfd, struct filename *name,
39983 +@@ -3503,9 +3662,11 @@ static struct dentry *filename_create(int dfd, struct filename *name,
39984 goto unlock;
39985
39986 error = -EEXIST;
39987 @@ -85030,7 +100810,7 @@ index d8ee4da..d6bf55e 100644
39988 /*
39989 * Special case - lookup gave negative, but... we had foo/bar/
39990 * From the vfs_mknod() POV we just have a negative dentry -
39991 -@@ -3496,6 +3659,20 @@ inline struct dentry *user_path_create(int dfd, const char __user *pathname,
39992 +@@ -3559,6 +3720,20 @@ inline struct dentry *user_path_create(int dfd, const char __user *pathname,
39993 }
39994 EXPORT_SYMBOL(user_path_create);
39995
39996 @@ -85051,7 +100831,7 @@ index d8ee4da..d6bf55e 100644
39997 int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
39998 {
39999 int error = may_create(dir, dentry);
40000 -@@ -3559,6 +3736,17 @@ retry:
40001 +@@ -3622,6 +3797,17 @@ retry:
40002
40003 if (!IS_POSIXACL(path.dentry->d_inode))
40004 mode &= ~current_umask();
40005 @@ -85069,7 +100849,7 @@ index d8ee4da..d6bf55e 100644
40006 error = security_path_mknod(&path, dentry, mode, dev);
40007 if (error)
40008 goto out;
40009 -@@ -3574,6 +3762,8 @@ retry:
40010 +@@ -3637,6 +3823,8 @@ retry:
40011 error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
40012 break;
40013 }
40014 @@ -85078,7 +100858,7 @@ index d8ee4da..d6bf55e 100644
40015 out:
40016 done_path_create(&path, dentry);
40017 if (retry_estale(error, lookup_flags)) {
40018 -@@ -3628,9 +3818,16 @@ retry:
40019 +@@ -3691,9 +3879,16 @@ retry:
40020
40021 if (!IS_POSIXACL(path.dentry->d_inode))
40022 mode &= ~current_umask();
40023 @@ -85095,7 +100875,7 @@ index d8ee4da..d6bf55e 100644
40024 done_path_create(&path, dentry);
40025 if (retry_estale(error, lookup_flags)) {
40026 lookup_flags |= LOOKUP_REVAL;
40027 -@@ -3663,7 +3860,7 @@ void dentry_unhash(struct dentry *dentry)
40028 +@@ -3726,7 +3921,7 @@ void dentry_unhash(struct dentry *dentry)
40029 {
40030 shrink_dcache_parent(dentry);
40031 spin_lock(&dentry->d_lock);
40032 @@ -85104,7 +100884,7 @@ index d8ee4da..d6bf55e 100644
40033 __d_drop(dentry);
40034 spin_unlock(&dentry->d_lock);
40035 }
40036 -@@ -3716,6 +3913,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
40037 +@@ -3779,6 +3974,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
40038 struct path path;
40039 struct qstr last;
40040 int type;
40041 @@ -85113,7 +100893,7 @@ index d8ee4da..d6bf55e 100644
40042 unsigned int lookup_flags = 0;
40043 retry:
40044 name = user_path_parent(dfd, pathname,
40045 -@@ -3748,10 +3947,20 @@ retry:
40046 +@@ -3811,10 +4008,20 @@ retry:
40047 error = -ENOENT;
40048 goto exit3;
40049 }
40050 @@ -85134,7 +100914,7 @@ index d8ee4da..d6bf55e 100644
40051 exit3:
40052 dput(dentry);
40053 exit2:
40054 -@@ -3846,6 +4055,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
40055 +@@ -3909,6 +4116,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
40056 int type;
40057 struct inode *inode = NULL;
40058 struct inode *delegated_inode = NULL;
40059 @@ -85143,7 +100923,7 @@ index d8ee4da..d6bf55e 100644
40060 unsigned int lookup_flags = 0;
40061 retry:
40062 name = user_path_parent(dfd, pathname,
40063 -@@ -3872,10 +4083,21 @@ retry_deleg:
40064 +@@ -3935,10 +4144,21 @@ retry_deleg:
40065 if (d_is_negative(dentry))
40066 goto slashes;
40067 ihold(inode);
40068 @@ -85165,7 +100945,7 @@ index d8ee4da..d6bf55e 100644
40069 exit2:
40070 dput(dentry);
40071 }
40072 -@@ -3964,9 +4186,17 @@ retry:
40073 +@@ -4027,9 +4247,17 @@ retry:
40074 if (IS_ERR(dentry))
40075 goto out_putname;
40076
40077 @@ -85183,7 +100963,7 @@ index d8ee4da..d6bf55e 100644
40078 done_path_create(&path, dentry);
40079 if (retry_estale(error, lookup_flags)) {
40080 lookup_flags |= LOOKUP_REVAL;
40081 -@@ -4070,6 +4300,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
40082 +@@ -4133,6 +4361,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
40083 struct dentry *new_dentry;
40084 struct path old_path, new_path;
40085 struct inode *delegated_inode = NULL;
40086 @@ -85191,7 +100971,7 @@ index d8ee4da..d6bf55e 100644
40087 int how = 0;
40088 int error;
40089
40090 -@@ -4093,7 +4324,7 @@ retry:
40091 +@@ -4156,7 +4385,7 @@ retry:
40092 if (error)
40093 return error;
40094
40095 @@ -85200,7 +100980,7 @@ index d8ee4da..d6bf55e 100644
40096 (how & LOOKUP_REVAL));
40097 error = PTR_ERR(new_dentry);
40098 if (IS_ERR(new_dentry))
40099 -@@ -4105,11 +4336,26 @@ retry:
40100 +@@ -4168,11 +4397,26 @@ retry:
40101 error = may_linkat(&old_path);
40102 if (unlikely(error))
40103 goto out_dput;
40104 @@ -85227,7 +101007,7 @@ index d8ee4da..d6bf55e 100644
40105 done_path_create(&new_path, new_dentry);
40106 if (delegated_inode) {
40107 error = break_deleg_wait(&delegated_inode);
40108 -@@ -4424,6 +4670,20 @@ retry_deleg:
40109 +@@ -4487,6 +4731,20 @@ retry_deleg:
40110 if (new_dentry == trap)
40111 goto exit5;
40112
40113 @@ -85248,7 +101028,7 @@ index d8ee4da..d6bf55e 100644
40114 error = security_path_rename(&old_path, old_dentry,
40115 &new_path, new_dentry, flags);
40116 if (error)
40117 -@@ -4431,6 +4691,9 @@ retry_deleg:
40118 +@@ -4494,6 +4752,9 @@ retry_deleg:
40119 error = vfs_rename(old_path.dentry->d_inode, old_dentry,
40120 new_path.dentry->d_inode, new_dentry,
40121 &delegated_inode, flags);
40122 @@ -85258,7 +101038,7 @@ index d8ee4da..d6bf55e 100644
40123 exit5:
40124 dput(new_dentry);
40125 exit4:
40126 -@@ -4487,14 +4750,24 @@ EXPORT_SYMBOL(vfs_whiteout);
40127 +@@ -4550,14 +4811,24 @@ EXPORT_SYMBOL(vfs_whiteout);
40128
40129 int readlink_copy(char __user *buffer, int buflen, const char *link)
40130 {
40131 @@ -85285,7 +101065,7 @@ index d8ee4da..d6bf55e 100644
40132 out:
40133 return len;
40134 diff --git a/fs/namespace.c b/fs/namespace.c
40135 -index 0570729..9de781d 100644
40136 +index 4fb1691..a518f2e0 100644
40137 --- a/fs/namespace.c
40138 +++ b/fs/namespace.c
40139 @@ -1516,6 +1516,9 @@ static int do_umount(struct mount *mnt, int flags)
40140 @@ -85308,7 +101088,7 @@ index 0570729..9de781d 100644
40141 return retval;
40142 }
40143
40144 -@@ -1592,7 +1598,7 @@ static inline bool may_mount(void)
40145 +@@ -1600,7 +1606,7 @@ static inline bool may_mandlock(void)
40146 * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
40147 */
40148
40149 @@ -85317,7 +101097,7 @@ index 0570729..9de781d 100644
40150 {
40151 struct path path;
40152 struct mount *mnt;
40153 -@@ -1637,7 +1643,7 @@ out:
40154 +@@ -1645,7 +1651,7 @@ out:
40155 /*
40156 * The 2.0 compatible umount. No flags.
40157 */
40158 @@ -85326,7 +101106,7 @@ index 0570729..9de781d 100644
40159 {
40160 return sys_umount(name, 0);
40161 }
40162 -@@ -2712,6 +2718,16 @@ long do_mount(const char *dev_name, const char __user *dir_name,
40163 +@@ -2721,6 +2727,16 @@ long do_mount(const char *dev_name, const char __user *dir_name,
40164 MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
40165 MS_STRICTATIME);
40166
40167 @@ -85343,7 +101123,7 @@ index 0570729..9de781d 100644
40168 if (flags & MS_REMOUNT)
40169 retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
40170 data_page);
40171 -@@ -2725,7 +2741,10 @@ long do_mount(const char *dev_name, const char __user *dir_name,
40172 +@@ -2734,7 +2750,10 @@ long do_mount(const char *dev_name, const char __user *dir_name,
40173 retval = do_new_mount(&path, type_page, flags, mnt_flags,
40174 dev_name, data_page);
40175 dput_out:
40176 @@ -85354,7 +101134,7 @@ index 0570729..9de781d 100644
40177 return retval;
40178 }
40179
40180 -@@ -2743,7 +2762,7 @@ static void free_mnt_ns(struct mnt_namespace *ns)
40181 +@@ -2752,7 +2771,7 @@ static void free_mnt_ns(struct mnt_namespace *ns)
40182 * number incrementing at 10Ghz will take 12,427 years to wrap which
40183 * is effectively never, so we can ignore the possibility.
40184 */
40185 @@ -85363,7 +101143,7 @@ index 0570729..9de781d 100644
40186
40187 static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
40188 {
40189 -@@ -2759,7 +2778,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
40190 +@@ -2768,7 +2787,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
40191 return ERR_PTR(ret);
40192 }
40193 new_ns->ns.ops = &mntns_operations;
40194 @@ -85372,7 +101152,7 @@ index 0570729..9de781d 100644
40195 atomic_set(&new_ns->count, 1);
40196 new_ns->root = NULL;
40197 INIT_LIST_HEAD(&new_ns->list);
40198 -@@ -2769,7 +2788,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
40199 +@@ -2778,7 +2797,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
40200 return new_ns;
40201 }
40202
40203 @@ -85381,7 +101161,7 @@ index 0570729..9de781d 100644
40204 struct user_namespace *user_ns, struct fs_struct *new_fs)
40205 {
40206 struct mnt_namespace *new_ns;
40207 -@@ -2890,8 +2909,8 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
40208 +@@ -2899,8 +2918,8 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
40209 }
40210 EXPORT_SYMBOL(mount_subtree);
40211
40212 @@ -85392,7 +101172,7 @@ index 0570729..9de781d 100644
40213 {
40214 int ret;
40215 char *kernel_type;
40216 -@@ -2997,6 +3016,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
40217 +@@ -3006,6 +3025,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
40218 if (error)
40219 goto out2;
40220
40221 @@ -85404,7 +101184,7 @@ index 0570729..9de781d 100644
40222 get_fs_root(current->fs, &root);
40223 old_mp = lock_mount(&old);
40224 error = PTR_ERR(old_mp);
40225 -@@ -3315,7 +3339,7 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
40226 +@@ -3324,7 +3348,7 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
40227 !ns_capable(current_user_ns(), CAP_SYS_ADMIN))
40228 return -EPERM;
40229
40230 @@ -85413,8 +101193,160 @@ index 0570729..9de781d 100644
40231 return -EINVAL;
40232
40233 get_mnt_ns(mnt_ns);
40234 +diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
40235 +index ff8195b..d82456d 100644
40236 +--- a/fs/nfs/callback.h
40237 ++++ b/fs/nfs/callback.h
40238 +@@ -113,8 +113,8 @@ struct cb_sequenceres {
40239 + uint32_t csr_target_highestslotid;
40240 + };
40241 +
40242 +-extern __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
40243 +- struct cb_sequenceres *res,
40244 ++extern __be32 nfs4_callback_sequence(void *_args,
40245 ++ void *_res,
40246 + struct cb_process_state *cps);
40247 +
40248 + #define RCA4_TYPE_MASK_RDATA_DLG 0
40249 +@@ -133,14 +133,14 @@ struct cb_recallanyargs {
40250 + uint32_t craa_type_mask;
40251 + };
40252 +
40253 +-extern __be32 nfs4_callback_recallany(struct cb_recallanyargs *args,
40254 ++extern __be32 nfs4_callback_recallany(void *_args,
40255 + void *dummy,
40256 + struct cb_process_state *cps);
40257 +
40258 + struct cb_recallslotargs {
40259 + uint32_t crsa_target_highest_slotid;
40260 + };
40261 +-extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args,
40262 ++extern __be32 nfs4_callback_recallslot(void *_args,
40263 + void *dummy,
40264 + struct cb_process_state *cps);
40265 +
40266 +@@ -159,7 +159,7 @@ struct cb_layoutrecallargs {
40267 + };
40268 +
40269 + extern __be32 nfs4_callback_layoutrecall(
40270 +- struct cb_layoutrecallargs *args,
40271 ++ void *_args,
40272 + void *dummy, struct cb_process_state *cps);
40273 +
40274 + struct cb_devicenotifyitem {
40275 +@@ -175,15 +175,15 @@ struct cb_devicenotifyargs {
40276 + };
40277 +
40278 + extern __be32 nfs4_callback_devicenotify(
40279 +- struct cb_devicenotifyargs *args,
40280 ++ void *_args,
40281 + void *dummy, struct cb_process_state *cps);
40282 +
40283 + #endif /* CONFIG_NFS_V4_1 */
40284 + extern int check_gss_callback_principal(struct nfs_client *, struct svc_rqst *);
40285 +-extern __be32 nfs4_callback_getattr(struct cb_getattrargs *args,
40286 +- struct cb_getattrres *res,
40287 ++extern __be32 nfs4_callback_getattr(void *args,
40288 ++ void *res,
40289 + struct cb_process_state *cps);
40290 +-extern __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy,
40291 ++extern __be32 nfs4_callback_recall(void *args, void *dummy,
40292 + struct cb_process_state *cps);
40293 + #if IS_ENABLED(CONFIG_NFS_V4)
40294 + extern int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt);
40295 +diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
40296 +index f0939d0..fc277c6 100644
40297 +--- a/fs/nfs/callback_proc.c
40298 ++++ b/fs/nfs/callback_proc.c
40299 +@@ -19,10 +19,12 @@
40300 +
40301 + #define NFSDBG_FACILITY NFSDBG_CALLBACK
40302 +
40303 +-__be32 nfs4_callback_getattr(struct cb_getattrargs *args,
40304 +- struct cb_getattrres *res,
40305 ++__be32 nfs4_callback_getattr(void *_args,
40306 ++ void *_res,
40307 + struct cb_process_state *cps)
40308 + {
40309 ++ struct cb_getattrargs *args = _args;
40310 ++ struct cb_getattrres *res = _res;
40311 + struct nfs_delegation *delegation;
40312 + struct nfs_inode *nfsi;
40313 + struct inode *inode;
40314 +@@ -68,9 +70,10 @@ out:
40315 + return res->status;
40316 + }
40317 +
40318 +-__be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy,
40319 ++__be32 nfs4_callback_recall(void *_args, void *dummy,
40320 + struct cb_process_state *cps)
40321 + {
40322 ++ struct cb_recallargs *args = _args;
40323 + struct inode *inode;
40324 + __be32 res;
40325 +
40326 +@@ -269,7 +272,7 @@ static u32 do_callback_layoutrecall(struct nfs_client *clp,
40327 +
40328 + }
40329 +
40330 +-__be32 nfs4_callback_layoutrecall(struct cb_layoutrecallargs *args,
40331 ++__be32 nfs4_callback_layoutrecall(void *args,
40332 + void *dummy, struct cb_process_state *cps)
40333 + {
40334 + u32 res;
40335 +@@ -296,9 +299,10 @@ static void pnfs_recall_all_layouts(struct nfs_client *clp)
40336 + do_callback_layoutrecall(clp, &args);
40337 + }
40338 +
40339 +-__be32 nfs4_callback_devicenotify(struct cb_devicenotifyargs *args,
40340 ++__be32 nfs4_callback_devicenotify(void *_args,
40341 + void *dummy, struct cb_process_state *cps)
40342 + {
40343 ++ struct cb_devicenotifyargs *args = _args;
40344 + int i;
40345 + __be32 res = 0;
40346 + struct nfs_client *clp = cps->clp;
40347 +@@ -452,10 +456,12 @@ out:
40348 + return status;
40349 + }
40350 +
40351 +-__be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
40352 +- struct cb_sequenceres *res,
40353 ++__be32 nfs4_callback_sequence(void *_args,
40354 ++ void *_res,
40355 + struct cb_process_state *cps)
40356 + {
40357 ++ struct cb_sequenceargs *args = _args;
40358 ++ struct cb_sequenceres *res = _res;
40359 + struct nfs4_slot_table *tbl;
40360 + struct nfs4_slot *slot;
40361 + struct nfs_client *clp;
40362 +@@ -541,9 +547,10 @@ validate_bitmap_values(unsigned long mask)
40363 + return (mask & ~RCA4_TYPE_MASK_ALL) == 0;
40364 + }
40365 +
40366 +-__be32 nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy,
40367 ++__be32 nfs4_callback_recallany(void *_args, void *dummy,
40368 + struct cb_process_state *cps)
40369 + {
40370 ++ struct cb_recallanyargs *args = _args;
40371 + __be32 status;
40372 + fmode_t flags = 0;
40373 +
40374 +@@ -576,9 +583,10 @@ out:
40375 + }
40376 +
40377 + /* Reduce the fore channel's max_slots to the target value */
40378 +-__be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
40379 ++__be32 nfs4_callback_recallslot(void *_args, void *dummy,
40380 + struct cb_process_state *cps)
40381 + {
40382 ++ struct cb_recallslotargs *args = _args;
40383 + struct nfs4_slot_table *fc_tbl;
40384 + __be32 status;
40385 +
40386 diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
40387 -index 646cdac..cdfa595 100644
40388 +index 646cdac..9cb55a2 100644
40389 --- a/fs/nfs/callback_xdr.c
40390 +++ b/fs/nfs/callback_xdr.c
40391 @@ -53,7 +53,7 @@ struct callback_op {
40392 @@ -85426,11 +101358,226 @@ index 646cdac..cdfa595 100644
40393
40394 static struct callback_op callback_ops[];
40395
40396 +@@ -62,12 +62,12 @@ static __be32 nfs4_callback_null(struct svc_rqst *rqstp, void *argp, void *resp)
40397 + return htonl(NFS4_OK);
40398 + }
40399 +
40400 +-static int nfs4_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
40401 ++static int nfs4_decode_void(void *rqstp, __be32 *p, void *dummy)
40402 + {
40403 + return xdr_argsize_check(rqstp, p);
40404 + }
40405 +
40406 +-static int nfs4_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
40407 ++static int nfs4_encode_void(void *rqstp, __be32 *p, void *dummy)
40408 + {
40409 + return xdr_ressize_check(rqstp, p);
40410 + }
40411 +@@ -193,8 +193,9 @@ static __be32 decode_op_hdr(struct xdr_stream *xdr, unsigned int *op)
40412 + return 0;
40413 + }
40414 +
40415 +-static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_getattrargs *args)
40416 ++static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, void *_args)
40417 + {
40418 ++ struct cb_getattrargs *args = _args;
40419 + __be32 status;
40420 +
40421 + status = decode_fh(xdr, &args->fh);
40422 +@@ -206,8 +207,9 @@ out:
40423 + return status;
40424 + }
40425 +
40426 +-static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_recallargs *args)
40427 ++static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, void *_args)
40428 + {
40429 ++ struct cb_recallargs *args = _args;
40430 + __be32 *p;
40431 + __be32 status;
40432 +
40433 +@@ -230,8 +232,9 @@ out:
40434 +
40435 + static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp,
40436 + struct xdr_stream *xdr,
40437 +- struct cb_layoutrecallargs *args)
40438 ++ void *_args)
40439 + {
40440 ++ struct cb_layoutrecallargs *args = _args;
40441 + __be32 *p;
40442 + __be32 status = 0;
40443 + uint32_t iomode;
40444 +@@ -290,8 +293,9 @@ out:
40445 + static
40446 + __be32 decode_devicenotify_args(struct svc_rqst *rqstp,
40447 + struct xdr_stream *xdr,
40448 +- struct cb_devicenotifyargs *args)
40449 ++ void *_args)
40450 + {
40451 ++ struct cb_devicenotifyargs *args = _args;
40452 + __be32 *p;
40453 + __be32 status = 0;
40454 + u32 tmp;
40455 +@@ -431,8 +435,9 @@ out:
40456 +
40457 + static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
40458 + struct xdr_stream *xdr,
40459 +- struct cb_sequenceargs *args)
40460 ++ void *_args)
40461 + {
40462 ++ struct cb_sequenceargs *args = _args;
40463 + __be32 *p;
40464 + int i;
40465 + __be32 status;
40466 +@@ -493,8 +498,9 @@ out_free:
40467 +
40468 + static __be32 decode_recallany_args(struct svc_rqst *rqstp,
40469 + struct xdr_stream *xdr,
40470 +- struct cb_recallanyargs *args)
40471 ++ void *_args)
40472 + {
40473 ++ struct cb_recallanyargs *args = _args;
40474 + uint32_t bitmap[2];
40475 + __be32 *p, status;
40476 +
40477 +@@ -512,8 +518,9 @@ static __be32 decode_recallany_args(struct svc_rqst *rqstp,
40478 +
40479 + static __be32 decode_recallslot_args(struct svc_rqst *rqstp,
40480 + struct xdr_stream *xdr,
40481 +- struct cb_recallslotargs *args)
40482 ++ void *_args)
40483 + {
40484 ++ struct cb_recallslotargs *args = _args;
40485 + __be32 *p;
40486 +
40487 + p = read_buf(xdr, 4);
40488 +@@ -648,8 +655,9 @@ static __be32 encode_op_hdr(struct xdr_stream *xdr, uint32_t op, __be32 res)
40489 + return 0;
40490 + }
40491 +
40492 +-static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, const struct cb_getattrres *res)
40493 ++static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, void *_res)
40494 + {
40495 ++ const struct cb_getattrres *res = _res;
40496 + __be32 *savep = NULL;
40497 + __be32 status = res->status;
40498 +
40499 +@@ -691,8 +699,9 @@ static __be32 encode_sessionid(struct xdr_stream *xdr,
40500 +
40501 + static __be32 encode_cb_sequence_res(struct svc_rqst *rqstp,
40502 + struct xdr_stream *xdr,
40503 +- const struct cb_sequenceres *res)
40504 ++ void *_res)
40505 + {
40506 ++ const struct cb_sequenceres *res = _res;
40507 + __be32 *p;
40508 + __be32 status = res->csr_status;
40509 +
40510 +@@ -950,43 +959,41 @@ static struct callback_op callback_ops[] = {
40511 + .res_maxsize = CB_OP_HDR_RES_MAXSZ,
40512 + },
40513 + [OP_CB_GETATTR] = {
40514 +- .process_op = (callback_process_op_t)nfs4_callback_getattr,
40515 +- .decode_args = (callback_decode_arg_t)decode_getattr_args,
40516 +- .encode_res = (callback_encode_res_t)encode_getattr_res,
40517 ++ .process_op = nfs4_callback_getattr,
40518 ++ .decode_args = decode_getattr_args,
40519 ++ .encode_res = encode_getattr_res,
40520 + .res_maxsize = CB_OP_GETATTR_RES_MAXSZ,
40521 + },
40522 + [OP_CB_RECALL] = {
40523 +- .process_op = (callback_process_op_t)nfs4_callback_recall,
40524 +- .decode_args = (callback_decode_arg_t)decode_recall_args,
40525 ++ .process_op = nfs4_callback_recall,
40526 ++ .decode_args = decode_recall_args,
40527 + .res_maxsize = CB_OP_RECALL_RES_MAXSZ,
40528 + },
40529 + #if defined(CONFIG_NFS_V4_1)
40530 + [OP_CB_LAYOUTRECALL] = {
40531 +- .process_op = (callback_process_op_t)nfs4_callback_layoutrecall,
40532 +- .decode_args =
40533 +- (callback_decode_arg_t)decode_layoutrecall_args,
40534 ++ .process_op = nfs4_callback_layoutrecall,
40535 ++ .decode_args = decode_layoutrecall_args,
40536 + .res_maxsize = CB_OP_LAYOUTRECALL_RES_MAXSZ,
40537 + },
40538 + [OP_CB_NOTIFY_DEVICEID] = {
40539 +- .process_op = (callback_process_op_t)nfs4_callback_devicenotify,
40540 +- .decode_args =
40541 +- (callback_decode_arg_t)decode_devicenotify_args,
40542 ++ .process_op = nfs4_callback_devicenotify,
40543 ++ .decode_args = decode_devicenotify_args,
40544 + .res_maxsize = CB_OP_DEVICENOTIFY_RES_MAXSZ,
40545 + },
40546 + [OP_CB_SEQUENCE] = {
40547 +- .process_op = (callback_process_op_t)nfs4_callback_sequence,
40548 +- .decode_args = (callback_decode_arg_t)decode_cb_sequence_args,
40549 +- .encode_res = (callback_encode_res_t)encode_cb_sequence_res,
40550 ++ .process_op = nfs4_callback_sequence,
40551 ++ .decode_args = decode_cb_sequence_args,
40552 ++ .encode_res = encode_cb_sequence_res,
40553 + .res_maxsize = CB_OP_SEQUENCE_RES_MAXSZ,
40554 + },
40555 + [OP_CB_RECALL_ANY] = {
40556 +- .process_op = (callback_process_op_t)nfs4_callback_recallany,
40557 +- .decode_args = (callback_decode_arg_t)decode_recallany_args,
40558 ++ .process_op = nfs4_callback_recallany,
40559 ++ .decode_args = decode_recallany_args,
40560 + .res_maxsize = CB_OP_RECALLANY_RES_MAXSZ,
40561 + },
40562 + [OP_CB_RECALL_SLOT] = {
40563 +- .process_op = (callback_process_op_t)nfs4_callback_recallslot,
40564 +- .decode_args = (callback_decode_arg_t)decode_recallslot_args,
40565 ++ .process_op = nfs4_callback_recallslot,
40566 ++ .decode_args = decode_recallslot_args,
40567 + .res_maxsize = CB_OP_RECALLSLOT_RES_MAXSZ,
40568 + },
40569 + #endif /* CONFIG_NFS_V4_1 */
40570 +@@ -998,13 +1005,13 @@ static struct callback_op callback_ops[] = {
40571 + static struct svc_procedure nfs4_callback_procedures1[] = {
40572 + [CB_NULL] = {
40573 + .pc_func = nfs4_callback_null,
40574 +- .pc_decode = (kxdrproc_t)nfs4_decode_void,
40575 +- .pc_encode = (kxdrproc_t)nfs4_encode_void,
40576 ++ .pc_decode = nfs4_decode_void,
40577 ++ .pc_encode = nfs4_encode_void,
40578 + .pc_xdrressize = 1,
40579 + },
40580 + [CB_COMPOUND] = {
40581 + .pc_func = nfs4_callback_compound,
40582 +- .pc_encode = (kxdrproc_t)nfs4_encode_void,
40583 ++ .pc_encode = nfs4_encode_void,
40584 + .pc_argsize = 256,
40585 + .pc_ressize = 256,
40586 + .pc_xdrressize = NFS4_CALLBACK_BUFSIZE,
40587 +diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
40588 +index 7ded177..593782f 100644
40589 +--- a/fs/nfs/dir.c
40590 ++++ b/fs/nfs/dir.c
40591 +@@ -681,8 +681,9 @@ out:
40592 + * We only need to convert from xdr once so future lookups are much simpler
40593 + */
40594 + static
40595 +-int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page* page)
40596 ++int nfs_readdir_filler(struct file *_desc, struct page* page)
40597 + {
40598 ++ nfs_readdir_descriptor_t *desc = (nfs_readdir_descriptor_t *)_desc;
40599 + struct inode *inode = file_inode(desc->file);
40600 + int ret;
40601 +
40602 +@@ -715,7 +716,7 @@ static
40603 + struct page *get_cache_page(nfs_readdir_descriptor_t *desc)
40604 + {
40605 + return read_cache_page(file_inode(desc->file)->i_mapping,
40606 +- desc->page_index, (filler_t *)nfs_readdir_filler, desc);
40607 ++ desc->page_index, nfs_readdir_filler, desc);
40608 + }
40609 +
40610 + /*
40611 diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
40612 -index f714b98..352e5f8 100644
40613 +index 847b678..bd0b3e7 100644
40614 --- a/fs/nfs/inode.c
40615 +++ b/fs/nfs/inode.c
40616 -@@ -1284,16 +1284,16 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
40617 +@@ -1318,16 +1318,16 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
40618 return 0;
40619 }
40620
40621 @@ -85451,7 +101598,7 @@ index f714b98..352e5f8 100644
40622 EXPORT_SYMBOL_GPL(nfs_inc_attr_generation_counter);
40623
40624 diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
40625 -index 9dea85f..ceb98c9 100644
40626 +index 9a547aa..898fa60 100644
40627 --- a/fs/nfs/internal.h
40628 +++ b/fs/nfs/internal.h
40629 @@ -612,9 +612,10 @@ unsigned long nfs_block_size(unsigned long bsize, unsigned char *nrbitsp)
40630 @@ -85467,11 +101614,4269 @@ index 9dea85f..ceb98c9 100644
40631 }
40632
40633 /*
40634 +diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
40635 +index 09b1900..344f4c2 100644
40636 +--- a/fs/nfs/mount_clnt.c
40637 ++++ b/fs/nfs/mount_clnt.c
40638 +@@ -303,8 +303,8 @@ static void encode_mntdirpath(struct xdr_stream *xdr, const char *pathname)
40639 + xdr_encode_opaque(p, pathname, pathname_len);
40640 + }
40641 +
40642 +-static void mnt_xdr_enc_dirpath(struct rpc_rqst *req, struct xdr_stream *xdr,
40643 +- const char *dirpath)
40644 ++static void mnt_xdr_enc_dirpath(void *req, struct xdr_stream *xdr,
40645 ++ void *dirpath)
40646 + {
40647 + encode_mntdirpath(xdr, dirpath);
40648 + }
40649 +@@ -355,10 +355,11 @@ static int decode_fhandle(struct xdr_stream *xdr, struct mountres *res)
40650 + return 0;
40651 + }
40652 +
40653 +-static int mnt_xdr_dec_mountres(struct rpc_rqst *req,
40654 ++static int mnt_xdr_dec_mountres(void *req,
40655 + struct xdr_stream *xdr,
40656 +- struct mountres *res)
40657 ++ void *_res)
40658 + {
40659 ++ struct mountres *res = _res;
40660 + int status;
40661 +
40662 + status = decode_status(xdr, res);
40663 +@@ -447,10 +448,11 @@ static int decode_auth_flavors(struct xdr_stream *xdr, struct mountres *res)
40664 + return 0;
40665 + }
40666 +
40667 +-static int mnt_xdr_dec_mountres3(struct rpc_rqst *req,
40668 ++static int mnt_xdr_dec_mountres3(void *req,
40669 + struct xdr_stream *xdr,
40670 +- struct mountres *res)
40671 ++ void *_res)
40672 + {
40673 ++ struct mountres *res = _res;
40674 + int status;
40675 +
40676 + status = decode_fhs_status(xdr, res);
40677 +@@ -467,8 +469,8 @@ static int mnt_xdr_dec_mountres3(struct rpc_rqst *req,
40678 + static struct rpc_procinfo mnt_procedures[] = {
40679 + [MOUNTPROC_MNT] = {
40680 + .p_proc = MOUNTPROC_MNT,
40681 +- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
40682 +- .p_decode = (kxdrdproc_t)mnt_xdr_dec_mountres,
40683 ++ .p_encode = mnt_xdr_enc_dirpath,
40684 ++ .p_decode = mnt_xdr_dec_mountres,
40685 + .p_arglen = MNT_enc_dirpath_sz,
40686 + .p_replen = MNT_dec_mountres_sz,
40687 + .p_statidx = MOUNTPROC_MNT,
40688 +@@ -476,7 +478,7 @@ static struct rpc_procinfo mnt_procedures[] = {
40689 + },
40690 + [MOUNTPROC_UMNT] = {
40691 + .p_proc = MOUNTPROC_UMNT,
40692 +- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
40693 ++ .p_encode = mnt_xdr_enc_dirpath,
40694 + .p_arglen = MNT_enc_dirpath_sz,
40695 + .p_statidx = MOUNTPROC_UMNT,
40696 + .p_name = "UMOUNT",
40697 +@@ -486,8 +488,8 @@ static struct rpc_procinfo mnt_procedures[] = {
40698 + static struct rpc_procinfo mnt3_procedures[] = {
40699 + [MOUNTPROC3_MNT] = {
40700 + .p_proc = MOUNTPROC3_MNT,
40701 +- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
40702 +- .p_decode = (kxdrdproc_t)mnt_xdr_dec_mountres3,
40703 ++ .p_encode = mnt_xdr_enc_dirpath,
40704 ++ .p_decode = mnt_xdr_dec_mountres3,
40705 + .p_arglen = MNT_enc_dirpath_sz,
40706 + .p_replen = MNT_dec_mountres3_sz,
40707 + .p_statidx = MOUNTPROC3_MNT,
40708 +@@ -495,7 +497,7 @@ static struct rpc_procinfo mnt3_procedures[] = {
40709 + },
40710 + [MOUNTPROC3_UMNT] = {
40711 + .p_proc = MOUNTPROC3_UMNT,
40712 +- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
40713 ++ .p_encode = mnt_xdr_enc_dirpath,
40714 + .p_arglen = MNT_enc_dirpath_sz,
40715 + .p_statidx = MOUNTPROC3_UMNT,
40716 + .p_name = "UMOUNT",
40717 +diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
40718 +index b4e03ed..6907eb4 100644
40719 +--- a/fs/nfs/nfs2xdr.c
40720 ++++ b/fs/nfs/nfs2xdr.c
40721 +@@ -566,9 +566,9 @@ out_default:
40722 + * "NFS: Network File System Protocol Specification".
40723 + */
40724 +
40725 +-static void nfs2_xdr_enc_fhandle(struct rpc_rqst *req,
40726 ++static void nfs2_xdr_enc_fhandle(void *req,
40727 + struct xdr_stream *xdr,
40728 +- const struct nfs_fh *fh)
40729 ++ void *fh)
40730 + {
40731 + encode_fhandle(xdr, fh);
40732 + }
40733 +@@ -581,25 +581,31 @@ static void nfs2_xdr_enc_fhandle(struct rpc_rqst *req,
40734 + * sattr attributes;
40735 + * };
40736 + */
40737 +-static void nfs2_xdr_enc_sattrargs(struct rpc_rqst *req,
40738 ++static void nfs2_xdr_enc_sattrargs(void *req,
40739 + struct xdr_stream *xdr,
40740 +- const struct nfs_sattrargs *args)
40741 ++ void *_args)
40742 + {
40743 ++ const struct nfs_sattrargs *args = _args;
40744 ++
40745 + encode_fhandle(xdr, args->fh);
40746 + encode_sattr(xdr, args->sattr);
40747 + }
40748 +
40749 +-static void nfs2_xdr_enc_diropargs(struct rpc_rqst *req,
40750 ++static void nfs2_xdr_enc_diropargs(void *req,
40751 + struct xdr_stream *xdr,
40752 +- const struct nfs_diropargs *args)
40753 ++ void *_args)
40754 + {
40755 ++ const struct nfs_diropargs *args = _args;
40756 ++
40757 + encode_diropargs(xdr, args->fh, args->name, args->len);
40758 + }
40759 +
40760 +-static void nfs2_xdr_enc_readlinkargs(struct rpc_rqst *req,
40761 ++static void nfs2_xdr_enc_readlinkargs(void *req,
40762 + struct xdr_stream *xdr,
40763 +- const struct nfs_readlinkargs *args)
40764 ++ void *_args)
40765 + {
40766 ++ const struct nfs_readlinkargs *args = _args;
40767 ++
40768 + encode_fhandle(xdr, args->fh);
40769 + prepare_reply_buffer(req, args->pages, args->pgbase,
40770 + args->pglen, NFS_readlinkres_sz);
40771 +@@ -630,10 +636,13 @@ static void encode_readargs(struct xdr_stream *xdr,
40772 + *p = cpu_to_be32(count);
40773 + }
40774 +
40775 +-static void nfs2_xdr_enc_readargs(struct rpc_rqst *req,
40776 ++static void nfs2_xdr_enc_readargs(void *_req,
40777 + struct xdr_stream *xdr,
40778 +- const struct nfs_pgio_args *args)
40779 ++ void *_args)
40780 + {
40781 ++ struct rpc_rqst *req = _req;
40782 ++ const struct nfs_pgio_args *args = _args;
40783 ++
40784 + encode_readargs(xdr, args);
40785 + prepare_reply_buffer(req, args->pages, args->pgbase,
40786 + args->count, NFS_readres_sz);
40787 +@@ -670,9 +679,9 @@ static void encode_writeargs(struct xdr_stream *xdr,
40788 + xdr_write_pages(xdr, args->pages, args->pgbase, count);
40789 + }
40790 +
40791 +-static void nfs2_xdr_enc_writeargs(struct rpc_rqst *req,
40792 ++static void nfs2_xdr_enc_writeargs(void *req,
40793 + struct xdr_stream *xdr,
40794 +- const struct nfs_pgio_args *args)
40795 ++ void *args)
40796 + {
40797 + encode_writeargs(xdr, args);
40798 + xdr->buf->flags |= XDRBUF_WRITE;
40799 +@@ -686,18 +695,22 @@ static void nfs2_xdr_enc_writeargs(struct rpc_rqst *req,
40800 + * sattr attributes;
40801 + * };
40802 + */
40803 +-static void nfs2_xdr_enc_createargs(struct rpc_rqst *req,
40804 ++static void nfs2_xdr_enc_createargs(void *req,
40805 + struct xdr_stream *xdr,
40806 +- const struct nfs_createargs *args)
40807 ++ void *_args)
40808 + {
40809 ++ const struct nfs_createargs *args = _args;
40810 ++
40811 + encode_diropargs(xdr, args->fh, args->name, args->len);
40812 + encode_sattr(xdr, args->sattr);
40813 + }
40814 +
40815 +-static void nfs2_xdr_enc_removeargs(struct rpc_rqst *req,
40816 ++static void nfs2_xdr_enc_removeargs(void *req,
40817 + struct xdr_stream *xdr,
40818 +- const struct nfs_removeargs *args)
40819 ++ void *_args)
40820 + {
40821 ++ const struct nfs_removeargs *args = _args;
40822 ++
40823 + encode_diropargs(xdr, args->fh, args->name.name, args->name.len);
40824 + }
40825 +
40826 +@@ -709,10 +722,11 @@ static void nfs2_xdr_enc_removeargs(struct rpc_rqst *req,
40827 + * diropargs to;
40828 + * };
40829 + */
40830 +-static void nfs2_xdr_enc_renameargs(struct rpc_rqst *req,
40831 ++static void nfs2_xdr_enc_renameargs(void *req,
40832 + struct xdr_stream *xdr,
40833 +- const struct nfs_renameargs *args)
40834 ++ void *_args)
40835 + {
40836 ++ const struct nfs_renameargs *args = _args;
40837 + const struct qstr *old = args->old_name;
40838 + const struct qstr *new = args->new_name;
40839 +
40840 +@@ -728,10 +742,12 @@ static void nfs2_xdr_enc_renameargs(struct rpc_rqst *req,
40841 + * diropargs to;
40842 + * };
40843 + */
40844 +-static void nfs2_xdr_enc_linkargs(struct rpc_rqst *req,
40845 ++static void nfs2_xdr_enc_linkargs(void *req,
40846 + struct xdr_stream *xdr,
40847 +- const struct nfs_linkargs *args)
40848 ++ void *_args)
40849 + {
40850 ++ const struct nfs_linkargs *args = _args;
40851 ++
40852 + encode_fhandle(xdr, args->fromfh);
40853 + encode_diropargs(xdr, args->tofh, args->toname, args->tolen);
40854 + }
40855 +@@ -745,10 +761,12 @@ static void nfs2_xdr_enc_linkargs(struct rpc_rqst *req,
40856 + * sattr attributes;
40857 + * };
40858 + */
40859 +-static void nfs2_xdr_enc_symlinkargs(struct rpc_rqst *req,
40860 ++static void nfs2_xdr_enc_symlinkargs(void *req,
40861 + struct xdr_stream *xdr,
40862 +- const struct nfs_symlinkargs *args)
40863 ++ void *_args)
40864 + {
40865 ++ const struct nfs_symlinkargs *args = _args;
40866 ++
40867 + encode_diropargs(xdr, args->fromfh, args->fromname, args->fromlen);
40868 + encode_path(xdr, args->pages, args->pathlen);
40869 + encode_sattr(xdr, args->sattr);
40870 +@@ -775,10 +793,12 @@ static void encode_readdirargs(struct xdr_stream *xdr,
40871 + *p = cpu_to_be32(args->count);
40872 + }
40873 +
40874 +-static void nfs2_xdr_enc_readdirargs(struct rpc_rqst *req,
40875 ++static void nfs2_xdr_enc_readdirargs(void *req,
40876 + struct xdr_stream *xdr,
40877 +- const struct nfs_readdirargs *args)
40878 ++ void *_args)
40879 + {
40880 ++ const struct nfs_readdirargs *args = _args;
40881 ++
40882 + encode_readdirargs(xdr, args);
40883 + prepare_reply_buffer(req, args->pages, 0,
40884 + args->count, NFS_readdirres_sz);
40885 +@@ -791,7 +811,7 @@ static void nfs2_xdr_enc_readdirargs(struct rpc_rqst *req,
40886 + * "NFS: Network File System Protocol Specification".
40887 + */
40888 +
40889 +-static int nfs2_xdr_dec_stat(struct rpc_rqst *req, struct xdr_stream *xdr,
40890 ++static int nfs2_xdr_dec_stat(void *req, struct xdr_stream *xdr,
40891 + void *__unused)
40892 + {
40893 + enum nfs_stat status;
40894 +@@ -808,14 +828,14 @@ out_default:
40895 + return nfs_stat_to_errno(status);
40896 + }
40897 +
40898 +-static int nfs2_xdr_dec_attrstat(struct rpc_rqst *req, struct xdr_stream *xdr,
40899 +- struct nfs_fattr *result)
40900 ++static int nfs2_xdr_dec_attrstat(void *req, struct xdr_stream *xdr,
40901 ++ void *result)
40902 + {
40903 + return decode_attrstat(xdr, result, NULL);
40904 + }
40905 +
40906 +-static int nfs2_xdr_dec_diropres(struct rpc_rqst *req, struct xdr_stream *xdr,
40907 +- struct nfs_diropok *result)
40908 ++static int nfs2_xdr_dec_diropres(void *req, struct xdr_stream *xdr,
40909 ++ void *result)
40910 + {
40911 + return decode_diropres(xdr, result);
40912 + }
40913 +@@ -830,7 +850,7 @@ static int nfs2_xdr_dec_diropres(struct rpc_rqst *req, struct xdr_stream *xdr,
40914 + * void;
40915 + * };
40916 + */
40917 +-static int nfs2_xdr_dec_readlinkres(struct rpc_rqst *req,
40918 ++static int nfs2_xdr_dec_readlinkres(void *req,
40919 + struct xdr_stream *xdr, void *__unused)
40920 + {
40921 + enum nfs_stat status;
40922 +@@ -859,9 +879,10 @@ out_default:
40923 + * void;
40924 + * };
40925 + */
40926 +-static int nfs2_xdr_dec_readres(struct rpc_rqst *req, struct xdr_stream *xdr,
40927 +- struct nfs_pgio_res *result)
40928 ++static int nfs2_xdr_dec_readres(void *req, struct xdr_stream *xdr,
40929 ++ void *_result)
40930 + {
40931 ++ struct nfs_pgio_res *result = _result;
40932 + enum nfs_stat status;
40933 + int error;
40934 +
40935 +@@ -881,9 +902,11 @@ out_default:
40936 + return nfs_stat_to_errno(status);
40937 + }
40938 +
40939 +-static int nfs2_xdr_dec_writeres(struct rpc_rqst *req, struct xdr_stream *xdr,
40940 +- struct nfs_pgio_res *result)
40941 ++static int nfs2_xdr_dec_writeres(void *req, struct xdr_stream *xdr,
40942 ++ void *_result)
40943 + {
40944 ++ struct nfs_pgio_res *result = _result;
40945 ++
40946 + /* All NFSv2 writes are "file sync" writes */
40947 + result->verf->committed = NFS_FILE_SYNC;
40948 + return decode_attrstat(xdr, result->fattr, &result->op_status);
40949 +@@ -981,7 +1004,7 @@ static int decode_readdirok(struct xdr_stream *xdr)
40950 + return xdr_read_pages(xdr, xdr->buf->page_len);
40951 + }
40952 +
40953 +-static int nfs2_xdr_dec_readdirres(struct rpc_rqst *req,
40954 ++static int nfs2_xdr_dec_readdirres(void *req,
40955 + struct xdr_stream *xdr, void *__unused)
40956 + {
40957 + enum nfs_stat status;
40958 +@@ -1033,8 +1056,8 @@ out_overflow:
40959 + return -EIO;
40960 + }
40961 +
40962 +-static int nfs2_xdr_dec_statfsres(struct rpc_rqst *req, struct xdr_stream *xdr,
40963 +- struct nfs2_fsstat *result)
40964 ++static int nfs2_xdr_dec_statfsres(void *req, struct xdr_stream *xdr,
40965 ++ void *result)
40966 + {
40967 + enum nfs_stat status;
40968 + int error;
40969 +@@ -1118,8 +1141,8 @@ static int nfs_stat_to_errno(enum nfs_stat status)
40970 + #define PROC(proc, argtype, restype, timer) \
40971 + [NFSPROC_##proc] = { \
40972 + .p_proc = NFSPROC_##proc, \
40973 +- .p_encode = (kxdreproc_t)nfs2_xdr_enc_##argtype, \
40974 +- .p_decode = (kxdrdproc_t)nfs2_xdr_dec_##restype, \
40975 ++ .p_encode = nfs2_xdr_enc_##argtype, \
40976 ++ .p_decode = nfs2_xdr_dec_##restype, \
40977 + .p_arglen = NFS_##argtype##_sz, \
40978 + .p_replen = NFS_##restype##_sz, \
40979 + .p_timer = timer, \
40980 +diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
40981 +index 267126d..19c97b8 100644
40982 +--- a/fs/nfs/nfs3xdr.c
40983 ++++ b/fs/nfs/nfs3xdr.c
40984 +@@ -844,9 +844,9 @@ static void encode_diropargs3(struct xdr_stream *xdr, const struct nfs_fh *fh,
40985 + * nfs_fh3 object;
40986 + * };
40987 + */
40988 +-static void nfs3_xdr_enc_getattr3args(struct rpc_rqst *req,
40989 ++static void nfs3_xdr_enc_getattr3args(void *req,
40990 + struct xdr_stream *xdr,
40991 +- const struct nfs_fh *fh)
40992 ++ void *fh)
40993 + {
40994 + encode_nfs_fh3(xdr, fh);
40995 + }
40996 +@@ -882,10 +882,12 @@ static void encode_sattrguard3(struct xdr_stream *xdr,
40997 + }
40998 + }
40999 +
41000 +-static void nfs3_xdr_enc_setattr3args(struct rpc_rqst *req,
41001 ++static void nfs3_xdr_enc_setattr3args(void *req,
41002 + struct xdr_stream *xdr,
41003 +- const struct nfs3_sattrargs *args)
41004 ++ void *_args)
41005 + {
41006 ++ const struct nfs3_sattrargs *args = _args;
41007 ++
41008 + encode_nfs_fh3(xdr, args->fh);
41009 + encode_sattr3(xdr, args->sattr);
41010 + encode_sattrguard3(xdr, args);
41011 +@@ -898,10 +900,12 @@ static void nfs3_xdr_enc_setattr3args(struct rpc_rqst *req,
41012 + * diropargs3 what;
41013 + * };
41014 + */
41015 +-static void nfs3_xdr_enc_lookup3args(struct rpc_rqst *req,
41016 ++static void nfs3_xdr_enc_lookup3args(void *req,
41017 + struct xdr_stream *xdr,
41018 +- const struct nfs3_diropargs *args)
41019 ++ void *_args)
41020 + {
41021 ++ const struct nfs3_diropargs *args = _args;
41022 ++
41023 + encode_diropargs3(xdr, args->fh, args->name, args->len);
41024 + }
41025 +
41026 +@@ -920,9 +924,9 @@ static void encode_access3args(struct xdr_stream *xdr,
41027 + encode_uint32(xdr, args->access);
41028 + }
41029 +
41030 +-static void nfs3_xdr_enc_access3args(struct rpc_rqst *req,
41031 ++static void nfs3_xdr_enc_access3args(void *req,
41032 + struct xdr_stream *xdr,
41033 +- const struct nfs3_accessargs *args)
41034 ++ void *args)
41035 + {
41036 + encode_access3args(xdr, args);
41037 + }
41038 +@@ -934,10 +938,11 @@ static void nfs3_xdr_enc_access3args(struct rpc_rqst *req,
41039 + * nfs_fh3 symlink;
41040 + * };
41041 + */
41042 +-static void nfs3_xdr_enc_readlink3args(struct rpc_rqst *req,
41043 ++static void nfs3_xdr_enc_readlink3args(void *req,
41044 + struct xdr_stream *xdr,
41045 +- const struct nfs3_readlinkargs *args)
41046 ++ void *_args)
41047 + {
41048 ++ const struct nfs3_readlinkargs *args = _args;
41049 + encode_nfs_fh3(xdr, args->fh);
41050 + prepare_reply_buffer(req, args->pages, args->pgbase,
41051 + args->pglen, NFS3_readlinkres_sz);
41052 +@@ -964,10 +969,12 @@ static void encode_read3args(struct xdr_stream *xdr,
41053 + *p = cpu_to_be32(args->count);
41054 + }
41055 +
41056 +-static void nfs3_xdr_enc_read3args(struct rpc_rqst *req,
41057 ++static void nfs3_xdr_enc_read3args(void *_req,
41058 + struct xdr_stream *xdr,
41059 +- const struct nfs_pgio_args *args)
41060 ++ void *_args)
41061 + {
41062 ++ struct rpc_rqst *req = _req;
41063 ++ const struct nfs_pgio_args *args = _args;
41064 + encode_read3args(xdr, args);
41065 + prepare_reply_buffer(req, args->pages, args->pgbase,
41066 + args->count, NFS3_readres_sz);
41067 +@@ -1006,9 +1013,9 @@ static void encode_write3args(struct xdr_stream *xdr,
41068 + xdr_write_pages(xdr, args->pages, args->pgbase, args->count);
41069 + }
41070 +
41071 +-static void nfs3_xdr_enc_write3args(struct rpc_rqst *req,
41072 ++static void nfs3_xdr_enc_write3args(void *req,
41073 + struct xdr_stream *xdr,
41074 +- const struct nfs_pgio_args *args)
41075 ++ void *args)
41076 + {
41077 + encode_write3args(xdr, args);
41078 + xdr->buf->flags |= XDRBUF_WRITE;
41079 +@@ -1053,10 +1060,12 @@ static void encode_createhow3(struct xdr_stream *xdr,
41080 + }
41081 + }
41082 +
41083 +-static void nfs3_xdr_enc_create3args(struct rpc_rqst *req,
41084 ++static void nfs3_xdr_enc_create3args(void *req,
41085 + struct xdr_stream *xdr,
41086 +- const struct nfs3_createargs *args)
41087 ++ void *_args)
41088 + {
41089 ++ const struct nfs3_createargs *args = _args;
41090 ++
41091 + encode_diropargs3(xdr, args->fh, args->name, args->len);
41092 + encode_createhow3(xdr, args);
41093 + }
41094 +@@ -1069,10 +1078,12 @@ static void nfs3_xdr_enc_create3args(struct rpc_rqst *req,
41095 + * sattr3 attributes;
41096 + * };
41097 + */
41098 +-static void nfs3_xdr_enc_mkdir3args(struct rpc_rqst *req,
41099 ++static void nfs3_xdr_enc_mkdir3args(void *req,
41100 + struct xdr_stream *xdr,
41101 +- const struct nfs3_mkdirargs *args)
41102 ++ void *_args)
41103 + {
41104 ++ const struct nfs3_mkdirargs *args = _args;
41105 ++
41106 + encode_diropargs3(xdr, args->fh, args->name, args->len);
41107 + encode_sattr3(xdr, args->sattr);
41108 + }
41109 +@@ -1097,10 +1108,12 @@ static void encode_symlinkdata3(struct xdr_stream *xdr,
41110 + encode_nfspath3(xdr, args->pages, args->pathlen);
41111 + }
41112 +
41113 +-static void nfs3_xdr_enc_symlink3args(struct rpc_rqst *req,
41114 ++static void nfs3_xdr_enc_symlink3args(void *req,
41115 + struct xdr_stream *xdr,
41116 +- const struct nfs3_symlinkargs *args)
41117 ++ void *_args)
41118 + {
41119 ++ const struct nfs3_symlinkargs *args = _args;
41120 ++
41121 + encode_diropargs3(xdr, args->fromfh, args->fromname, args->fromlen);
41122 + encode_symlinkdata3(xdr, args);
41123 + xdr->buf->flags |= XDRBUF_WRITE;
41124 +@@ -1158,10 +1171,12 @@ static void encode_mknoddata3(struct xdr_stream *xdr,
41125 + }
41126 + }
41127 +
41128 +-static void nfs3_xdr_enc_mknod3args(struct rpc_rqst *req,
41129 ++static void nfs3_xdr_enc_mknod3args(void *req,
41130 + struct xdr_stream *xdr,
41131 +- const struct nfs3_mknodargs *args)
41132 ++ void *_args)
41133 + {
41134 ++ const struct nfs3_mknodargs *args = _args;
41135 ++
41136 + encode_diropargs3(xdr, args->fh, args->name, args->len);
41137 + encode_mknoddata3(xdr, args);
41138 + }
41139 +@@ -1173,10 +1188,12 @@ static void nfs3_xdr_enc_mknod3args(struct rpc_rqst *req,
41140 + * diropargs3 object;
41141 + * };
41142 + */
41143 +-static void nfs3_xdr_enc_remove3args(struct rpc_rqst *req,
41144 ++static void nfs3_xdr_enc_remove3args(void *req,
41145 + struct xdr_stream *xdr,
41146 +- const struct nfs_removeargs *args)
41147 ++ void *_args)
41148 + {
41149 ++ const struct nfs_removeargs *args = _args;
41150 ++
41151 + encode_diropargs3(xdr, args->fh, args->name.name, args->name.len);
41152 + }
41153 +
41154 +@@ -1188,10 +1205,11 @@ static void nfs3_xdr_enc_remove3args(struct rpc_rqst *req,
41155 + * diropargs3 to;
41156 + * };
41157 + */
41158 +-static void nfs3_xdr_enc_rename3args(struct rpc_rqst *req,
41159 ++static void nfs3_xdr_enc_rename3args(void *req,
41160 + struct xdr_stream *xdr,
41161 +- const struct nfs_renameargs *args)
41162 ++ void *_args)
41163 + {
41164 ++ const struct nfs_renameargs *args = _args;
41165 + const struct qstr *old = args->old_name;
41166 + const struct qstr *new = args->new_name;
41167 +
41168 +@@ -1207,10 +1225,12 @@ static void nfs3_xdr_enc_rename3args(struct rpc_rqst *req,
41169 + * diropargs3 link;
41170 + * };
41171 + */
41172 +-static void nfs3_xdr_enc_link3args(struct rpc_rqst *req,
41173 ++static void nfs3_xdr_enc_link3args(void *req,
41174 + struct xdr_stream *xdr,
41175 +- const struct nfs3_linkargs *args)
41176 ++ void *_args)
41177 + {
41178 ++ const struct nfs3_linkargs *args = _args;
41179 ++
41180 + encode_nfs_fh3(xdr, args->fromfh);
41181 + encode_diropargs3(xdr, args->tofh, args->toname, args->tolen);
41182 + }
41183 +@@ -1238,10 +1258,12 @@ static void encode_readdir3args(struct xdr_stream *xdr,
41184 + *p = cpu_to_be32(args->count);
41185 + }
41186 +
41187 +-static void nfs3_xdr_enc_readdir3args(struct rpc_rqst *req,
41188 ++static void nfs3_xdr_enc_readdir3args(void *req,
41189 + struct xdr_stream *xdr,
41190 +- const struct nfs3_readdirargs *args)
41191 ++ void *_args)
41192 + {
41193 ++ const struct nfs3_readdirargs *args = _args;
41194 ++
41195 + encode_readdir3args(xdr, args);
41196 + prepare_reply_buffer(req, args->pages, 0,
41197 + args->count, NFS3_readdirres_sz);
41198 +@@ -1278,10 +1300,12 @@ static void encode_readdirplus3args(struct xdr_stream *xdr,
41199 + *p = cpu_to_be32(args->count);
41200 + }
41201 +
41202 +-static void nfs3_xdr_enc_readdirplus3args(struct rpc_rqst *req,
41203 ++static void nfs3_xdr_enc_readdirplus3args(void *req,
41204 + struct xdr_stream *xdr,
41205 +- const struct nfs3_readdirargs *args)
41206 ++ void *_args)
41207 + {
41208 ++ const struct nfs3_readdirargs *args = _args;
41209 ++
41210 + encode_readdirplus3args(xdr, args);
41211 + prepare_reply_buffer(req, args->pages, 0,
41212 + args->count, NFS3_readdirres_sz);
41213 +@@ -1308,19 +1332,21 @@ static void encode_commit3args(struct xdr_stream *xdr,
41214 + *p = cpu_to_be32(args->count);
41215 + }
41216 +
41217 +-static void nfs3_xdr_enc_commit3args(struct rpc_rqst *req,
41218 ++static void nfs3_xdr_enc_commit3args(void *req,
41219 + struct xdr_stream *xdr,
41220 +- const struct nfs_commitargs *args)
41221 ++ void *args)
41222 + {
41223 + encode_commit3args(xdr, args);
41224 + }
41225 +
41226 + #ifdef CONFIG_NFS_V3_ACL
41227 +
41228 +-static void nfs3_xdr_enc_getacl3args(struct rpc_rqst *req,
41229 ++static void nfs3_xdr_enc_getacl3args(void *req,
41230 + struct xdr_stream *xdr,
41231 +- const struct nfs3_getaclargs *args)
41232 ++ void *_args)
41233 + {
41234 ++ const struct nfs3_getaclargs *args = _args;
41235 ++
41236 + encode_nfs_fh3(xdr, args->fh);
41237 + encode_uint32(xdr, args->mask);
41238 + if (args->mask & (NFS_ACL | NFS_DFACL))
41239 +@@ -1329,10 +1355,12 @@ static void nfs3_xdr_enc_getacl3args(struct rpc_rqst *req,
41240 + ACL3_getaclres_sz);
41241 + }
41242 +
41243 +-static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req,
41244 ++static void nfs3_xdr_enc_setacl3args(void *_req,
41245 + struct xdr_stream *xdr,
41246 +- const struct nfs3_setaclargs *args)
41247 ++ void *_args)
41248 + {
41249 ++ struct rpc_rqst *req = _req;
41250 ++ const struct nfs3_setaclargs *args = _args;
41251 + unsigned int base;
41252 + int error;
41253 +
41254 +@@ -1380,9 +1408,9 @@ static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req,
41255 + * void;
41256 + * };
41257 + */
41258 +-static int nfs3_xdr_dec_getattr3res(struct rpc_rqst *req,
41259 ++static int nfs3_xdr_dec_getattr3res(void *req,
41260 + struct xdr_stream *xdr,
41261 +- struct nfs_fattr *result)
41262 ++ void *result)
41263 + {
41264 + enum nfs_stat status;
41265 + int error;
41266 +@@ -1417,9 +1445,9 @@ out_default:
41267 + * SETATTR3resfail resfail;
41268 + * };
41269 + */
41270 +-static int nfs3_xdr_dec_setattr3res(struct rpc_rqst *req,
41271 ++static int nfs3_xdr_dec_setattr3res(void *req,
41272 + struct xdr_stream *xdr,
41273 +- struct nfs_fattr *result)
41274 ++ void *result)
41275 + {
41276 + enum nfs_stat status;
41277 + int error;
41278 +@@ -1458,10 +1486,11 @@ out_status:
41279 + * LOOKUP3resfail resfail;
41280 + * };
41281 + */
41282 +-static int nfs3_xdr_dec_lookup3res(struct rpc_rqst *req,
41283 ++static int nfs3_xdr_dec_lookup3res(void *req,
41284 + struct xdr_stream *xdr,
41285 +- struct nfs3_diropres *result)
41286 ++ void *_result)
41287 + {
41288 ++ struct nfs3_diropres *result = _result;
41289 + enum nfs_stat status;
41290 + int error;
41291 +
41292 +@@ -1505,10 +1534,11 @@ out_default:
41293 + * ACCESS3resfail resfail;
41294 + * };
41295 + */
41296 +-static int nfs3_xdr_dec_access3res(struct rpc_rqst *req,
41297 ++static int nfs3_xdr_dec_access3res(void *req,
41298 + struct xdr_stream *xdr,
41299 +- struct nfs3_accessres *result)
41300 ++ void *_result)
41301 + {
41302 ++ struct nfs3_accessres *result = _result;
41303 + enum nfs_stat status;
41304 + int error;
41305 +
41306 +@@ -1546,9 +1576,9 @@ out_default:
41307 + * READLINK3resfail resfail;
41308 + * };
41309 + */
41310 +-static int nfs3_xdr_dec_readlink3res(struct rpc_rqst *req,
41311 ++static int nfs3_xdr_dec_readlink3res(void *req,
41312 + struct xdr_stream *xdr,
41313 +- struct nfs_fattr *result)
41314 ++ void *result)
41315 + {
41316 + enum nfs_stat status;
41317 + int error;
41318 +@@ -1625,9 +1655,10 @@ out_overflow:
41319 + return -EIO;
41320 + }
41321 +
41322 +-static int nfs3_xdr_dec_read3res(struct rpc_rqst *req, struct xdr_stream *xdr,
41323 +- struct nfs_pgio_res *result)
41324 ++static int nfs3_xdr_dec_read3res(void *req, struct xdr_stream *xdr,
41325 ++ void *_result)
41326 + {
41327 ++ struct nfs_pgio_res *result = _result;
41328 + enum nfs_stat status;
41329 + int error;
41330 +
41331 +@@ -1698,9 +1729,10 @@ out_eio:
41332 + return -EIO;
41333 + }
41334 +
41335 +-static int nfs3_xdr_dec_write3res(struct rpc_rqst *req, struct xdr_stream *xdr,
41336 +- struct nfs_pgio_res *result)
41337 ++static int nfs3_xdr_dec_write3res(void *req, struct xdr_stream *xdr,
41338 ++ void *_result)
41339 + {
41340 ++ struct nfs_pgio_res *result = _result;
41341 + enum nfs_stat status;
41342 + int error;
41343 +
41344 +@@ -1762,10 +1794,11 @@ out:
41345 + return error;
41346 + }
41347 +
41348 +-static int nfs3_xdr_dec_create3res(struct rpc_rqst *req,
41349 ++static int nfs3_xdr_dec_create3res(void *req,
41350 + struct xdr_stream *xdr,
41351 +- struct nfs3_diropres *result)
41352 ++ void *_result)
41353 + {
41354 ++ struct nfs3_diropres *result = _result;
41355 + enum nfs_stat status;
41356 + int error;
41357 +
41358 +@@ -1802,10 +1835,11 @@ out_default:
41359 + * REMOVE3resfail resfail;
41360 + * };
41361 + */
41362 +-static int nfs3_xdr_dec_remove3res(struct rpc_rqst *req,
41363 ++static int nfs3_xdr_dec_remove3res(void *req,
41364 + struct xdr_stream *xdr,
41365 +- struct nfs_removeres *result)
41366 ++ void *_result)
41367 + {
41368 ++ struct nfs_removeres *result = _result;
41369 + enum nfs_stat status;
41370 + int error;
41371 +
41372 +@@ -1843,10 +1877,11 @@ out_status:
41373 + * RENAME3resfail resfail;
41374 + * };
41375 + */
41376 +-static int nfs3_xdr_dec_rename3res(struct rpc_rqst *req,
41377 ++static int nfs3_xdr_dec_rename3res(void *req,
41378 + struct xdr_stream *xdr,
41379 +- struct nfs_renameres *result)
41380 ++ void *_result)
41381 + {
41382 ++ struct nfs_renameres *result = _result;
41383 + enum nfs_stat status;
41384 + int error;
41385 +
41386 +@@ -1887,9 +1922,10 @@ out_status:
41387 + * LINK3resfail resfail;
41388 + * };
41389 + */
41390 +-static int nfs3_xdr_dec_link3res(struct rpc_rqst *req, struct xdr_stream *xdr,
41391 +- struct nfs3_linkres *result)
41392 ++static int nfs3_xdr_dec_link3res(void *req, struct xdr_stream *xdr,
41393 ++ void *_result)
41394 + {
41395 ++ struct nfs3_linkres *result = _result;
41396 + enum nfs_stat status;
41397 + int error;
41398 +
41399 +@@ -2070,10 +2106,11 @@ out:
41400 + return error;
41401 + }
41402 +
41403 +-static int nfs3_xdr_dec_readdir3res(struct rpc_rqst *req,
41404 ++static int nfs3_xdr_dec_readdir3res(void *req,
41405 + struct xdr_stream *xdr,
41406 +- struct nfs3_readdirres *result)
41407 ++ void *_result)
41408 + {
41409 ++ struct nfs3_readdirres *result = _result;
41410 + enum nfs_stat status;
41411 + int error;
41412 +
41413 +@@ -2138,10 +2175,11 @@ out_overflow:
41414 + return -EIO;
41415 + }
41416 +
41417 +-static int nfs3_xdr_dec_fsstat3res(struct rpc_rqst *req,
41418 ++static int nfs3_xdr_dec_fsstat3res(void *req,
41419 + struct xdr_stream *xdr,
41420 +- struct nfs_fsstat *result)
41421 ++ void *_result)
41422 + {
41423 ++ struct nfs_fsstat *result = _result;
41424 + enum nfs_stat status;
41425 + int error;
41426 +
41427 +@@ -2214,10 +2252,11 @@ out_overflow:
41428 + return -EIO;
41429 + }
41430 +
41431 +-static int nfs3_xdr_dec_fsinfo3res(struct rpc_rqst *req,
41432 ++static int nfs3_xdr_dec_fsinfo3res(void *req,
41433 + struct xdr_stream *xdr,
41434 +- struct nfs_fsinfo *result)
41435 ++ void *_result)
41436 + {
41437 ++ struct nfs_fsinfo *result = _result;
41438 + enum nfs_stat status;
41439 + int error;
41440 +
41441 +@@ -2277,10 +2316,11 @@ out_overflow:
41442 + return -EIO;
41443 + }
41444 +
41445 +-static int nfs3_xdr_dec_pathconf3res(struct rpc_rqst *req,
41446 ++static int nfs3_xdr_dec_pathconf3res(void *req,
41447 + struct xdr_stream *xdr,
41448 +- struct nfs_pathconf *result)
41449 ++ void *_result)
41450 + {
41451 ++ struct nfs_pathconf *result = _result;
41452 + enum nfs_stat status;
41453 + int error;
41454 +
41455 +@@ -2318,10 +2358,11 @@ out_status:
41456 + * COMMIT3resfail resfail;
41457 + * };
41458 + */
41459 +-static int nfs3_xdr_dec_commit3res(struct rpc_rqst *req,
41460 ++static int nfs3_xdr_dec_commit3res(void *req,
41461 + struct xdr_stream *xdr,
41462 +- struct nfs_commitres *result)
41463 ++ void *_result)
41464 + {
41465 ++ struct nfs_commitres *result = _result;
41466 + enum nfs_stat status;
41467 + int error;
41468 +
41469 +@@ -2387,9 +2428,9 @@ out:
41470 + return error;
41471 + }
41472 +
41473 +-static int nfs3_xdr_dec_getacl3res(struct rpc_rqst *req,
41474 ++static int nfs3_xdr_dec_getacl3res(void *req,
41475 + struct xdr_stream *xdr,
41476 +- struct nfs3_getaclres *result)
41477 ++ void *result)
41478 + {
41479 + enum nfs_stat status;
41480 + int error;
41481 +@@ -2406,9 +2447,9 @@ out_default:
41482 + return nfs3_stat_to_errno(status);
41483 + }
41484 +
41485 +-static int nfs3_xdr_dec_setacl3res(struct rpc_rqst *req,
41486 ++static int nfs3_xdr_dec_setacl3res(void *req,
41487 + struct xdr_stream *xdr,
41488 +- struct nfs_fattr *result)
41489 ++ void *result)
41490 + {
41491 + enum nfs_stat status;
41492 + int error;
41493 +@@ -2495,8 +2536,8 @@ static int nfs3_stat_to_errno(enum nfs_stat status)
41494 + #define PROC(proc, argtype, restype, timer) \
41495 + [NFS3PROC_##proc] = { \
41496 + .p_proc = NFS3PROC_##proc, \
41497 +- .p_encode = (kxdreproc_t)nfs3_xdr_enc_##argtype##3args, \
41498 +- .p_decode = (kxdrdproc_t)nfs3_xdr_dec_##restype##3res, \
41499 ++ .p_encode = nfs3_xdr_enc_##argtype##3args, \
41500 ++ .p_decode = nfs3_xdr_dec_##restype##3res, \
41501 + .p_arglen = NFS3_##argtype##args_sz, \
41502 + .p_replen = NFS3_##restype##res_sz, \
41503 + .p_timer = timer, \
41504 +@@ -2538,8 +2579,8 @@ const struct rpc_version nfs_version3 = {
41505 + static struct rpc_procinfo nfs3_acl_procedures[] = {
41506 + [ACLPROC3_GETACL] = {
41507 + .p_proc = ACLPROC3_GETACL,
41508 +- .p_encode = (kxdreproc_t)nfs3_xdr_enc_getacl3args,
41509 +- .p_decode = (kxdrdproc_t)nfs3_xdr_dec_getacl3res,
41510 ++ .p_encode = nfs3_xdr_enc_getacl3args,
41511 ++ .p_decode = nfs3_xdr_dec_getacl3res,
41512 + .p_arglen = ACL3_getaclargs_sz,
41513 + .p_replen = ACL3_getaclres_sz,
41514 + .p_timer = 1,
41515 +@@ -2547,8 +2588,8 @@ static struct rpc_procinfo nfs3_acl_procedures[] = {
41516 + },
41517 + [ACLPROC3_SETACL] = {
41518 + .p_proc = ACLPROC3_SETACL,
41519 +- .p_encode = (kxdreproc_t)nfs3_xdr_enc_setacl3args,
41520 +- .p_decode = (kxdrdproc_t)nfs3_xdr_dec_setacl3res,
41521 ++ .p_encode = nfs3_xdr_enc_setacl3args,
41522 ++ .p_decode = nfs3_xdr_dec_setacl3res,
41523 + .p_arglen = ACL3_setaclargs_sz,
41524 + .p_replen = ACL3_setaclres_sz,
41525 + .p_timer = 0,
41526 +diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
41527 +index 0ca482a..5df90f3 100644
41528 +--- a/fs/nfs/nfs42xdr.c
41529 ++++ b/fs/nfs/nfs42xdr.c
41530 +@@ -165,10 +165,12 @@ static void encode_clone(struct xdr_stream *xdr,
41531 + /*
41532 + * Encode ALLOCATE request
41533 + */
41534 +-static void nfs4_xdr_enc_allocate(struct rpc_rqst *req,
41535 ++static void nfs4_xdr_enc_allocate(void *_req,
41536 + struct xdr_stream *xdr,
41537 +- struct nfs42_falloc_args *args)
41538 ++ void *_args)
41539 + {
41540 ++ struct rpc_rqst *req = _req;
41541 ++ struct nfs42_falloc_args *args = _args;
41542 + struct compound_hdr hdr = {
41543 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41544 + };
41545 +@@ -184,10 +186,12 @@ static void nfs4_xdr_enc_allocate(struct rpc_rqst *req,
41546 + /*
41547 + * Encode DEALLOCATE request
41548 + */
41549 +-static void nfs4_xdr_enc_deallocate(struct rpc_rqst *req,
41550 ++static void nfs4_xdr_enc_deallocate(void *_req,
41551 + struct xdr_stream *xdr,
41552 +- struct nfs42_falloc_args *args)
41553 ++ void *_args)
41554 + {
41555 ++ struct rpc_rqst *req = _req;
41556 ++ struct nfs42_falloc_args *args = _args;
41557 + struct compound_hdr hdr = {
41558 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41559 + };
41560 +@@ -203,10 +207,12 @@ static void nfs4_xdr_enc_deallocate(struct rpc_rqst *req,
41561 + /*
41562 + * Encode SEEK request
41563 + */
41564 +-static void nfs4_xdr_enc_seek(struct rpc_rqst *req,
41565 ++static void nfs4_xdr_enc_seek(void *_req,
41566 + struct xdr_stream *xdr,
41567 +- struct nfs42_seek_args *args)
41568 ++ void *_args)
41569 + {
41570 ++ struct rpc_rqst *req = _req;
41571 ++ struct nfs42_seek_args *args = _args;
41572 + struct compound_hdr hdr = {
41573 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41574 + };
41575 +@@ -221,10 +227,12 @@ static void nfs4_xdr_enc_seek(struct rpc_rqst *req,
41576 + /*
41577 + * Encode LAYOUTSTATS request
41578 + */
41579 +-static void nfs4_xdr_enc_layoutstats(struct rpc_rqst *req,
41580 ++static void nfs4_xdr_enc_layoutstats(void *_req,
41581 + struct xdr_stream *xdr,
41582 +- struct nfs42_layoutstat_args *args)
41583 ++ void *_args)
41584 + {
41585 ++ struct rpc_rqst *req = _req;
41586 ++ struct nfs42_layoutstat_args *args = _args;
41587 + int i;
41588 +
41589 + struct compound_hdr hdr = {
41590 +@@ -243,10 +251,12 @@ static void nfs4_xdr_enc_layoutstats(struct rpc_rqst *req,
41591 + /*
41592 + * Encode CLONE request
41593 + */
41594 +-static void nfs4_xdr_enc_clone(struct rpc_rqst *req,
41595 ++static void nfs4_xdr_enc_clone(void *_req,
41596 + struct xdr_stream *xdr,
41597 +- struct nfs42_clone_args *args)
41598 ++ void *_args)
41599 + {
41600 ++ struct rpc_rqst *req = _req;
41601 ++ struct nfs42_clone_args *args = _args;
41602 + struct compound_hdr hdr = {
41603 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41604 + };
41605 +@@ -306,10 +316,12 @@ static int decode_clone(struct xdr_stream *xdr)
41606 + /*
41607 + * Decode ALLOCATE request
41608 + */
41609 +-static int nfs4_xdr_dec_allocate(struct rpc_rqst *rqstp,
41610 ++static int nfs4_xdr_dec_allocate(void *_rqstp,
41611 + struct xdr_stream *xdr,
41612 +- struct nfs42_falloc_res *res)
41613 ++ void *_res)
41614 + {
41615 ++ struct rpc_rqst *rqstp = _rqstp;
41616 ++ struct nfs42_falloc_res *res = _res;
41617 + struct compound_hdr hdr;
41618 + int status;
41619 +
41620 +@@ -333,10 +345,12 @@ out:
41621 + /*
41622 + * Decode DEALLOCATE request
41623 + */
41624 +-static int nfs4_xdr_dec_deallocate(struct rpc_rqst *rqstp,
41625 ++static int nfs4_xdr_dec_deallocate(void *_rqstp,
41626 + struct xdr_stream *xdr,
41627 +- struct nfs42_falloc_res *res)
41628 ++ void *_res)
41629 + {
41630 ++ struct rpc_rqst *rqstp = _rqstp;
41631 ++ struct nfs42_falloc_res *res = _res;
41632 + struct compound_hdr hdr;
41633 + int status;
41634 +
41635 +@@ -360,10 +374,12 @@ out:
41636 + /*
41637 + * Decode SEEK request
41638 + */
41639 +-static int nfs4_xdr_dec_seek(struct rpc_rqst *rqstp,
41640 ++static int nfs4_xdr_dec_seek(void *_rqstp,
41641 + struct xdr_stream *xdr,
41642 +- struct nfs42_seek_res *res)
41643 ++ void *_res)
41644 + {
41645 ++ struct rpc_rqst *rqstp = _rqstp;
41646 ++ struct nfs42_seek_res *res = _res;
41647 + struct compound_hdr hdr;
41648 + int status;
41649 +
41650 +@@ -384,10 +400,12 @@ out:
41651 + /*
41652 + * Decode LAYOUTSTATS request
41653 + */
41654 +-static int nfs4_xdr_dec_layoutstats(struct rpc_rqst *rqstp,
41655 ++static int nfs4_xdr_dec_layoutstats(void *_rqstp,
41656 + struct xdr_stream *xdr,
41657 +- struct nfs42_layoutstat_res *res)
41658 ++ void *_res)
41659 + {
41660 ++ struct rpc_rqst *rqstp = _rqstp;
41661 ++ struct nfs42_layoutstat_res *res = _res;
41662 + struct compound_hdr hdr;
41663 + int status, i;
41664 +
41665 +@@ -414,10 +432,12 @@ out:
41666 + /*
41667 + * Decode CLONE request
41668 + */
41669 +-static int nfs4_xdr_dec_clone(struct rpc_rqst *rqstp,
41670 ++static int nfs4_xdr_dec_clone(void *_rqstp,
41671 + struct xdr_stream *xdr,
41672 +- struct nfs42_clone_res *res)
41673 ++ void *_res)
41674 + {
41675 ++ struct rpc_rqst *rqstp = _rqstp;
41676 ++ struct nfs42_clone_res *res = _res;
41677 + struct compound_hdr hdr;
41678 + int status;
41679 +
41680 +diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
41681 +index 4e44412..69ead07 100644
41682 +--- a/fs/nfs/nfs4xdr.c
41683 ++++ b/fs/nfs/nfs4xdr.c
41684 +@@ -2076,9 +2076,10 @@ static u32 nfs4_xdr_minorversion(const struct nfs4_sequence_args *args)
41685 + /*
41686 + * Encode an ACCESS request
41687 + */
41688 +-static void nfs4_xdr_enc_access(struct rpc_rqst *req, struct xdr_stream *xdr,
41689 +- const struct nfs4_accessargs *args)
41690 ++static void nfs4_xdr_enc_access(void *req, struct xdr_stream *xdr,
41691 ++ void *_args)
41692 + {
41693 ++ const struct nfs4_accessargs *args = _args;
41694 + struct compound_hdr hdr = {
41695 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41696 + };
41697 +@@ -2094,9 +2095,10 @@ static void nfs4_xdr_enc_access(struct rpc_rqst *req, struct xdr_stream *xdr,
41698 + /*
41699 + * Encode LOOKUP request
41700 + */
41701 +-static void nfs4_xdr_enc_lookup(struct rpc_rqst *req, struct xdr_stream *xdr,
41702 +- const struct nfs4_lookup_arg *args)
41703 ++static void nfs4_xdr_enc_lookup(void *req, struct xdr_stream *xdr,
41704 ++ void *_args)
41705 + {
41706 ++ const struct nfs4_lookup_arg *args = _args;
41707 + struct compound_hdr hdr = {
41708 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41709 + };
41710 +@@ -2113,10 +2115,11 @@ static void nfs4_xdr_enc_lookup(struct rpc_rqst *req, struct xdr_stream *xdr,
41711 + /*
41712 + * Encode LOOKUP_ROOT request
41713 + */
41714 +-static void nfs4_xdr_enc_lookup_root(struct rpc_rqst *req,
41715 ++static void nfs4_xdr_enc_lookup_root(void *req,
41716 + struct xdr_stream *xdr,
41717 +- const struct nfs4_lookup_root_arg *args)
41718 ++ void *_args)
41719 + {
41720 ++ const struct nfs4_lookup_root_arg *args = _args;
41721 + struct compound_hdr hdr = {
41722 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41723 + };
41724 +@@ -2132,9 +2135,10 @@ static void nfs4_xdr_enc_lookup_root(struct rpc_rqst *req,
41725 + /*
41726 + * Encode REMOVE request
41727 + */
41728 +-static void nfs4_xdr_enc_remove(struct rpc_rqst *req, struct xdr_stream *xdr,
41729 +- const struct nfs_removeargs *args)
41730 ++static void nfs4_xdr_enc_remove(void *req, struct xdr_stream *xdr,
41731 ++ void *_args)
41732 + {
41733 ++ const struct nfs_removeargs *args = _args;
41734 + struct compound_hdr hdr = {
41735 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41736 + };
41737 +@@ -2149,9 +2153,10 @@ static void nfs4_xdr_enc_remove(struct rpc_rqst *req, struct xdr_stream *xdr,
41738 + /*
41739 + * Encode RENAME request
41740 + */
41741 +-static void nfs4_xdr_enc_rename(struct rpc_rqst *req, struct xdr_stream *xdr,
41742 +- const struct nfs_renameargs *args)
41743 ++static void nfs4_xdr_enc_rename(void *req, struct xdr_stream *xdr,
41744 ++ void *_args)
41745 + {
41746 ++ const struct nfs_renameargs *args = _args;
41747 + struct compound_hdr hdr = {
41748 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41749 + };
41750 +@@ -2168,9 +2173,10 @@ static void nfs4_xdr_enc_rename(struct rpc_rqst *req, struct xdr_stream *xdr,
41751 + /*
41752 + * Encode LINK request
41753 + */
41754 +-static void nfs4_xdr_enc_link(struct rpc_rqst *req, struct xdr_stream *xdr,
41755 +- const struct nfs4_link_arg *args)
41756 ++static void nfs4_xdr_enc_link(void *req, struct xdr_stream *xdr,
41757 ++ void *_args)
41758 + {
41759 ++ const struct nfs4_link_arg *args = _args;
41760 + struct compound_hdr hdr = {
41761 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41762 + };
41763 +@@ -2189,9 +2195,10 @@ static void nfs4_xdr_enc_link(struct rpc_rqst *req, struct xdr_stream *xdr,
41764 + /*
41765 + * Encode CREATE request
41766 + */
41767 +-static void nfs4_xdr_enc_create(struct rpc_rqst *req, struct xdr_stream *xdr,
41768 +- const struct nfs4_create_arg *args)
41769 ++static void nfs4_xdr_enc_create(void *req, struct xdr_stream *xdr,
41770 ++ void *_args)
41771 + {
41772 ++ const struct nfs4_create_arg *args = _args;
41773 + struct compound_hdr hdr = {
41774 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41775 + };
41776 +@@ -2208,8 +2215,8 @@ static void nfs4_xdr_enc_create(struct rpc_rqst *req, struct xdr_stream *xdr,
41777 + /*
41778 + * Encode SYMLINK request
41779 + */
41780 +-static void nfs4_xdr_enc_symlink(struct rpc_rqst *req, struct xdr_stream *xdr,
41781 +- const struct nfs4_create_arg *args)
41782 ++static void nfs4_xdr_enc_symlink(void *req, struct xdr_stream *xdr,
41783 ++ void *args)
41784 + {
41785 + nfs4_xdr_enc_create(req, xdr, args);
41786 + }
41787 +@@ -2217,9 +2224,10 @@ static void nfs4_xdr_enc_symlink(struct rpc_rqst *req, struct xdr_stream *xdr,
41788 + /*
41789 + * Encode GETATTR request
41790 + */
41791 +-static void nfs4_xdr_enc_getattr(struct rpc_rqst *req, struct xdr_stream *xdr,
41792 +- const struct nfs4_getattr_arg *args)
41793 ++static void nfs4_xdr_enc_getattr(void *req, struct xdr_stream *xdr,
41794 ++ void *_args)
41795 + {
41796 ++ const struct nfs4_getattr_arg *args = _args;
41797 + struct compound_hdr hdr = {
41798 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41799 + };
41800 +@@ -2234,9 +2242,10 @@ static void nfs4_xdr_enc_getattr(struct rpc_rqst *req, struct xdr_stream *xdr,
41801 + /*
41802 + * Encode a CLOSE request
41803 + */
41804 +-static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
41805 +- struct nfs_closeargs *args)
41806 ++static void nfs4_xdr_enc_close(void *req, struct xdr_stream *xdr,
41807 ++ void *_args)
41808 + {
41809 ++ struct nfs_closeargs *args = _args;
41810 + struct compound_hdr hdr = {
41811 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41812 + };
41813 +@@ -2252,9 +2261,10 @@ static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
41814 + /*
41815 + * Encode an OPEN request
41816 + */
41817 +-static void nfs4_xdr_enc_open(struct rpc_rqst *req, struct xdr_stream *xdr,
41818 +- struct nfs_openargs *args)
41819 ++static void nfs4_xdr_enc_open(void *req, struct xdr_stream *xdr,
41820 ++ void *_args)
41821 + {
41822 ++ struct nfs_openargs *args = _args;
41823 + struct compound_hdr hdr = {
41824 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41825 + };
41826 +@@ -2273,10 +2283,11 @@ static void nfs4_xdr_enc_open(struct rpc_rqst *req, struct xdr_stream *xdr,
41827 + /*
41828 + * Encode an OPEN_CONFIRM request
41829 + */
41830 +-static void nfs4_xdr_enc_open_confirm(struct rpc_rqst *req,
41831 ++static void nfs4_xdr_enc_open_confirm(void *req,
41832 + struct xdr_stream *xdr,
41833 +- struct nfs_open_confirmargs *args)
41834 ++ void *_args)
41835 + {
41836 ++ struct nfs_open_confirmargs *args = _args;
41837 + struct compound_hdr hdr = {
41838 + .nops = 0,
41839 + };
41840 +@@ -2290,10 +2301,11 @@ static void nfs4_xdr_enc_open_confirm(struct rpc_rqst *req,
41841 + /*
41842 + * Encode an OPEN request with no attributes.
41843 + */
41844 +-static void nfs4_xdr_enc_open_noattr(struct rpc_rqst *req,
41845 ++static void nfs4_xdr_enc_open_noattr(void *req,
41846 + struct xdr_stream *xdr,
41847 +- struct nfs_openargs *args)
41848 ++ void *_args)
41849 + {
41850 ++ struct nfs_openargs *args = _args;
41851 + struct compound_hdr hdr = {
41852 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41853 + };
41854 +@@ -2311,10 +2323,11 @@ static void nfs4_xdr_enc_open_noattr(struct rpc_rqst *req,
41855 + /*
41856 + * Encode an OPEN_DOWNGRADE request
41857 + */
41858 +-static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
41859 ++static void nfs4_xdr_enc_open_downgrade(void *req,
41860 + struct xdr_stream *xdr,
41861 +- struct nfs_closeargs *args)
41862 ++ void *_args)
41863 + {
41864 ++ struct nfs_closeargs *args = _args;
41865 + struct compound_hdr hdr = {
41866 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41867 + };
41868 +@@ -2330,9 +2343,10 @@ static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
41869 + /*
41870 + * Encode a LOCK request
41871 + */
41872 +-static void nfs4_xdr_enc_lock(struct rpc_rqst *req, struct xdr_stream *xdr,
41873 +- struct nfs_lock_args *args)
41874 ++static void nfs4_xdr_enc_lock(void *req, struct xdr_stream *xdr,
41875 ++ void *_args)
41876 + {
41877 ++ struct nfs_lock_args *args = _args;
41878 + struct compound_hdr hdr = {
41879 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41880 + };
41881 +@@ -2347,9 +2361,10 @@ static void nfs4_xdr_enc_lock(struct rpc_rqst *req, struct xdr_stream *xdr,
41882 + /*
41883 + * Encode a LOCKT request
41884 + */
41885 +-static void nfs4_xdr_enc_lockt(struct rpc_rqst *req, struct xdr_stream *xdr,
41886 +- struct nfs_lockt_args *args)
41887 ++static void nfs4_xdr_enc_lockt(void *req, struct xdr_stream *xdr,
41888 ++ void *_args)
41889 + {
41890 ++ struct nfs_lockt_args *args = _args;
41891 + struct compound_hdr hdr = {
41892 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41893 + };
41894 +@@ -2364,9 +2379,10 @@ static void nfs4_xdr_enc_lockt(struct rpc_rqst *req, struct xdr_stream *xdr,
41895 + /*
41896 + * Encode a LOCKU request
41897 + */
41898 +-static void nfs4_xdr_enc_locku(struct rpc_rqst *req, struct xdr_stream *xdr,
41899 +- struct nfs_locku_args *args)
41900 ++static void nfs4_xdr_enc_locku(void *req, struct xdr_stream *xdr,
41901 ++ void *_args)
41902 + {
41903 ++ struct nfs_locku_args *args = _args;
41904 + struct compound_hdr hdr = {
41905 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41906 + };
41907 +@@ -2378,10 +2394,11 @@ static void nfs4_xdr_enc_locku(struct rpc_rqst *req, struct xdr_stream *xdr,
41908 + encode_nops(&hdr);
41909 + }
41910 +
41911 +-static void nfs4_xdr_enc_release_lockowner(struct rpc_rqst *req,
41912 ++static void nfs4_xdr_enc_release_lockowner(void *req,
41913 + struct xdr_stream *xdr,
41914 +- struct nfs_release_lockowner_args *args)
41915 ++ void *_args)
41916 + {
41917 ++ struct nfs_release_lockowner_args *args = _args;
41918 + struct compound_hdr hdr = {
41919 + .minorversion = 0,
41920 + };
41921 +@@ -2394,9 +2411,11 @@ static void nfs4_xdr_enc_release_lockowner(struct rpc_rqst *req,
41922 + /*
41923 + * Encode a READLINK request
41924 + */
41925 +-static void nfs4_xdr_enc_readlink(struct rpc_rqst *req, struct xdr_stream *xdr,
41926 +- const struct nfs4_readlink *args)
41927 ++static void nfs4_xdr_enc_readlink(void *_req, struct xdr_stream *xdr,
41928 ++ void *_args)
41929 + {
41930 ++ struct rpc_rqst *req = _req;
41931 ++ const struct nfs4_readlink *args = _args;
41932 + struct compound_hdr hdr = {
41933 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41934 + };
41935 +@@ -2414,9 +2433,11 @@ static void nfs4_xdr_enc_readlink(struct rpc_rqst *req, struct xdr_stream *xdr,
41936 + /*
41937 + * Encode a READDIR request
41938 + */
41939 +-static void nfs4_xdr_enc_readdir(struct rpc_rqst *req, struct xdr_stream *xdr,
41940 +- const struct nfs4_readdir_arg *args)
41941 ++static void nfs4_xdr_enc_readdir(void *_req, struct xdr_stream *xdr,
41942 ++ void *_args)
41943 + {
41944 ++ struct rpc_rqst *req = _req;
41945 ++ const struct nfs4_readdir_arg *args = _args;
41946 + struct compound_hdr hdr = {
41947 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41948 + };
41949 +@@ -2437,9 +2458,11 @@ static void nfs4_xdr_enc_readdir(struct rpc_rqst *req, struct xdr_stream *xdr,
41950 + /*
41951 + * Encode a READ request
41952 + */
41953 +-static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr,
41954 +- struct nfs_pgio_args *args)
41955 ++static void nfs4_xdr_enc_read(void *_req, struct xdr_stream *xdr,
41956 ++ void *_args)
41957 + {
41958 ++ struct rpc_rqst *req = _req;
41959 ++ struct nfs_pgio_args *args = _args;
41960 + struct compound_hdr hdr = {
41961 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41962 + };
41963 +@@ -2458,9 +2481,11 @@ static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr,
41964 + /*
41965 + * Encode an SETATTR request
41966 + */
41967 +-static void nfs4_xdr_enc_setattr(struct rpc_rqst *req, struct xdr_stream *xdr,
41968 +- struct nfs_setattrargs *args)
41969 ++static void nfs4_xdr_enc_setattr(void *_req, struct xdr_stream *xdr,
41970 ++ void *_args)
41971 + {
41972 ++ struct rpc_rqst *req = _req;
41973 ++ struct nfs_setattrargs *args = _args;
41974 + struct compound_hdr hdr = {
41975 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41976 + };
41977 +@@ -2476,9 +2501,11 @@ static void nfs4_xdr_enc_setattr(struct rpc_rqst *req, struct xdr_stream *xdr,
41978 + /*
41979 + * Encode a GETACL request
41980 + */
41981 +-static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
41982 +- struct nfs_getaclargs *args)
41983 ++static void nfs4_xdr_enc_getacl(void *_req, struct xdr_stream *xdr,
41984 ++ void *_args)
41985 + {
41986 ++ struct rpc_rqst *req = _req;
41987 ++ struct nfs_getaclargs *args = _args;
41988 + struct compound_hdr hdr = {
41989 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
41990 + };
41991 +@@ -2499,9 +2526,11 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
41992 + /*
41993 + * Encode a WRITE request
41994 + */
41995 +-static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
41996 +- struct nfs_pgio_args *args)
41997 ++static void nfs4_xdr_enc_write(void *_req, struct xdr_stream *xdr,
41998 ++ void *_args)
41999 + {
42000 ++ struct rpc_rqst *req = _req;
42001 ++ struct nfs_pgio_args *args = _args;
42002 + struct compound_hdr hdr = {
42003 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42004 + };
42005 +@@ -2519,9 +2548,10 @@ static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
42006 + /*
42007 + * a COMMIT request
42008 + */
42009 +-static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
42010 +- struct nfs_commitargs *args)
42011 ++static void nfs4_xdr_enc_commit(void *req, struct xdr_stream *xdr,
42012 ++ void *_args)
42013 + {
42014 ++ struct nfs_commitargs *args = _args;
42015 + struct compound_hdr hdr = {
42016 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42017 + };
42018 +@@ -2536,9 +2566,10 @@ static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
42019 + /*
42020 + * FSINFO request
42021 + */
42022 +-static void nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
42023 +- struct nfs4_fsinfo_arg *args)
42024 ++static void nfs4_xdr_enc_fsinfo(void *req, struct xdr_stream *xdr,
42025 ++ void *_args)
42026 + {
42027 ++ struct nfs4_fsinfo_arg *args = _args;
42028 + struct compound_hdr hdr = {
42029 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42030 + };
42031 +@@ -2553,9 +2584,10 @@ static void nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
42032 + /*
42033 + * a PATHCONF request
42034 + */
42035 +-static void nfs4_xdr_enc_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
42036 +- const struct nfs4_pathconf_arg *args)
42037 ++static void nfs4_xdr_enc_pathconf(void *req, struct xdr_stream *xdr,
42038 ++ void *_args)
42039 + {
42040 ++ const struct nfs4_pathconf_arg *args = _args;
42041 + struct compound_hdr hdr = {
42042 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42043 + };
42044 +@@ -2571,9 +2603,10 @@ static void nfs4_xdr_enc_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
42045 + /*
42046 + * a STATFS request
42047 + */
42048 +-static void nfs4_xdr_enc_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
42049 +- const struct nfs4_statfs_arg *args)
42050 ++static void nfs4_xdr_enc_statfs(void *req, struct xdr_stream *xdr,
42051 ++ void *_args)
42052 + {
42053 ++ const struct nfs4_statfs_arg *args = _args;
42054 + struct compound_hdr hdr = {
42055 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42056 + };
42057 +@@ -2589,10 +2622,11 @@ static void nfs4_xdr_enc_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
42058 + /*
42059 + * GETATTR_BITMAP request
42060 + */
42061 +-static void nfs4_xdr_enc_server_caps(struct rpc_rqst *req,
42062 ++static void nfs4_xdr_enc_server_caps(void *req,
42063 + struct xdr_stream *xdr,
42064 +- struct nfs4_server_caps_arg *args)
42065 ++ void *_args)
42066 + {
42067 ++ struct nfs4_server_caps_arg *args = _args;
42068 + const u32 *bitmask = args->bitmask;
42069 + struct compound_hdr hdr = {
42070 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42071 +@@ -2608,9 +2642,10 @@ static void nfs4_xdr_enc_server_caps(struct rpc_rqst *req,
42072 + /*
42073 + * a RENEW request
42074 + */
42075 +-static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
42076 +- struct nfs_client *clp)
42077 ++static void nfs4_xdr_enc_renew(void *req, struct xdr_stream *xdr,
42078 ++ void *_clp)
42079 + {
42080 ++ struct nfs_client *clp = _clp;
42081 + struct compound_hdr hdr = {
42082 + .nops = 0,
42083 + };
42084 +@@ -2623,9 +2658,9 @@ static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
42085 + /*
42086 + * a SETCLIENTID request
42087 + */
42088 +-static void nfs4_xdr_enc_setclientid(struct rpc_rqst *req,
42089 ++static void nfs4_xdr_enc_setclientid(void *req,
42090 + struct xdr_stream *xdr,
42091 +- struct nfs4_setclientid *sc)
42092 ++ void *sc)
42093 + {
42094 + struct compound_hdr hdr = {
42095 + .nops = 0,
42096 +@@ -2639,9 +2674,9 @@ static void nfs4_xdr_enc_setclientid(struct rpc_rqst *req,
42097 + /*
42098 + * a SETCLIENTID_CONFIRM request
42099 + */
42100 +-static void nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req,
42101 ++static void nfs4_xdr_enc_setclientid_confirm(void *req,
42102 + struct xdr_stream *xdr,
42103 +- struct nfs4_setclientid_res *arg)
42104 ++ void *arg)
42105 + {
42106 + struct compound_hdr hdr = {
42107 + .nops = 0,
42108 +@@ -2655,10 +2690,11 @@ static void nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req,
42109 + /*
42110 + * DELEGRETURN request
42111 + */
42112 +-static void nfs4_xdr_enc_delegreturn(struct rpc_rqst *req,
42113 ++static void nfs4_xdr_enc_delegreturn(void *req,
42114 + struct xdr_stream *xdr,
42115 +- const struct nfs4_delegreturnargs *args)
42116 ++ void *_args)
42117 + {
42118 ++ const struct nfs4_delegreturnargs *args = _args;
42119 + struct compound_hdr hdr = {
42120 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42121 + };
42122 +@@ -2674,10 +2710,12 @@ static void nfs4_xdr_enc_delegreturn(struct rpc_rqst *req,
42123 + /*
42124 + * Encode FS_LOCATIONS request
42125 + */
42126 +-static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
42127 ++static void nfs4_xdr_enc_fs_locations(void *_req,
42128 + struct xdr_stream *xdr,
42129 +- struct nfs4_fs_locations_arg *args)
42130 ++ void *_args)
42131 + {
42132 ++ struct rpc_rqst *req = _req;
42133 ++ struct nfs4_fs_locations_arg *args = _args;
42134 + struct compound_hdr hdr = {
42135 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42136 + };
42137 +@@ -2707,10 +2745,11 @@ static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
42138 + /*
42139 + * Encode SECINFO request
42140 + */
42141 +-static void nfs4_xdr_enc_secinfo(struct rpc_rqst *req,
42142 ++static void nfs4_xdr_enc_secinfo(void *req,
42143 + struct xdr_stream *xdr,
42144 +- struct nfs4_secinfo_arg *args)
42145 ++ void *_args)
42146 + {
42147 ++ struct nfs4_secinfo_arg *args = _args;
42148 + struct compound_hdr hdr = {
42149 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42150 + };
42151 +@@ -2725,10 +2764,11 @@ static void nfs4_xdr_enc_secinfo(struct rpc_rqst *req,
42152 + /*
42153 + * Encode FSID_PRESENT request
42154 + */
42155 +-static void nfs4_xdr_enc_fsid_present(struct rpc_rqst *req,
42156 ++static void nfs4_xdr_enc_fsid_present(void *req,
42157 + struct xdr_stream *xdr,
42158 +- struct nfs4_fsid_present_arg *args)
42159 ++ void *_args)
42160 + {
42161 ++ struct nfs4_fsid_present_arg *args = _args;
42162 + struct compound_hdr hdr = {
42163 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42164 + };
42165 +@@ -2746,10 +2786,11 @@ static void nfs4_xdr_enc_fsid_present(struct rpc_rqst *req,
42166 + /*
42167 + * BIND_CONN_TO_SESSION request
42168 + */
42169 +-static void nfs4_xdr_enc_bind_conn_to_session(struct rpc_rqst *req,
42170 ++static void nfs4_xdr_enc_bind_conn_to_session(void *req,
42171 + struct xdr_stream *xdr,
42172 +- struct nfs41_bind_conn_to_session_args *args)
42173 ++ void *_args)
42174 + {
42175 ++ struct nfs41_bind_conn_to_session_args *args = _args;
42176 + struct compound_hdr hdr = {
42177 + .minorversion = args->client->cl_mvops->minor_version,
42178 + };
42179 +@@ -2762,10 +2803,11 @@ static void nfs4_xdr_enc_bind_conn_to_session(struct rpc_rqst *req,
42180 + /*
42181 + * EXCHANGE_ID request
42182 + */
42183 +-static void nfs4_xdr_enc_exchange_id(struct rpc_rqst *req,
42184 ++static void nfs4_xdr_enc_exchange_id(void *req,
42185 + struct xdr_stream *xdr,
42186 +- struct nfs41_exchange_id_args *args)
42187 ++ void *_args)
42188 + {
42189 ++ struct nfs41_exchange_id_args *args = _args;
42190 + struct compound_hdr hdr = {
42191 + .minorversion = args->client->cl_mvops->minor_version,
42192 + };
42193 +@@ -2778,10 +2820,11 @@ static void nfs4_xdr_enc_exchange_id(struct rpc_rqst *req,
42194 + /*
42195 + * a CREATE_SESSION request
42196 + */
42197 +-static void nfs4_xdr_enc_create_session(struct rpc_rqst *req,
42198 ++static void nfs4_xdr_enc_create_session(void *req,
42199 + struct xdr_stream *xdr,
42200 +- struct nfs41_create_session_args *args)
42201 ++ void *_args)
42202 + {
42203 ++ struct nfs41_create_session_args *args = _args;
42204 + struct compound_hdr hdr = {
42205 + .minorversion = args->client->cl_mvops->minor_version,
42206 + };
42207 +@@ -2794,10 +2837,11 @@ static void nfs4_xdr_enc_create_session(struct rpc_rqst *req,
42208 + /*
42209 + * a DESTROY_SESSION request
42210 + */
42211 +-static void nfs4_xdr_enc_destroy_session(struct rpc_rqst *req,
42212 ++static void nfs4_xdr_enc_destroy_session(void *req,
42213 + struct xdr_stream *xdr,
42214 +- struct nfs4_session *session)
42215 ++ void *_session)
42216 + {
42217 ++ struct nfs4_session *session = _session;
42218 + struct compound_hdr hdr = {
42219 + .minorversion = session->clp->cl_mvops->minor_version,
42220 + };
42221 +@@ -2810,10 +2854,11 @@ static void nfs4_xdr_enc_destroy_session(struct rpc_rqst *req,
42222 + /*
42223 + * a DESTROY_CLIENTID request
42224 + */
42225 +-static void nfs4_xdr_enc_destroy_clientid(struct rpc_rqst *req,
42226 ++static void nfs4_xdr_enc_destroy_clientid(void *req,
42227 + struct xdr_stream *xdr,
42228 +- struct nfs_client *clp)
42229 ++ void *_clp)
42230 + {
42231 ++ struct nfs_client *clp = _clp;
42232 + struct compound_hdr hdr = {
42233 + .minorversion = clp->cl_mvops->minor_version,
42234 + };
42235 +@@ -2826,8 +2871,8 @@ static void nfs4_xdr_enc_destroy_clientid(struct rpc_rqst *req,
42236 + /*
42237 + * a SEQUENCE request
42238 + */
42239 +-static void nfs4_xdr_enc_sequence(struct rpc_rqst *req, struct xdr_stream *xdr,
42240 +- struct nfs4_sequence_args *args)
42241 ++static void nfs4_xdr_enc_sequence(void *req, struct xdr_stream *xdr,
42242 ++ void *args)
42243 + {
42244 + struct compound_hdr hdr = {
42245 + .minorversion = nfs4_xdr_minorversion(args),
42246 +@@ -2841,10 +2886,11 @@ static void nfs4_xdr_enc_sequence(struct rpc_rqst *req, struct xdr_stream *xdr,
42247 + /*
42248 + * a GET_LEASE_TIME request
42249 + */
42250 +-static void nfs4_xdr_enc_get_lease_time(struct rpc_rqst *req,
42251 ++static void nfs4_xdr_enc_get_lease_time(void *req,
42252 + struct xdr_stream *xdr,
42253 +- struct nfs4_get_lease_time_args *args)
42254 ++ void *_args)
42255 + {
42256 ++ struct nfs4_get_lease_time_args *args = _args;
42257 + struct compound_hdr hdr = {
42258 + .minorversion = nfs4_xdr_minorversion(&args->la_seq_args),
42259 + };
42260 +@@ -2860,10 +2906,11 @@ static void nfs4_xdr_enc_get_lease_time(struct rpc_rqst *req,
42261 + /*
42262 + * a RECLAIM_COMPLETE request
42263 + */
42264 +-static void nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req,
42265 ++static void nfs4_xdr_enc_reclaim_complete(void *req,
42266 + struct xdr_stream *xdr,
42267 +- struct nfs41_reclaim_complete_args *args)
42268 ++ void *_args)
42269 + {
42270 ++ struct nfs41_reclaim_complete_args *args = _args;
42271 + struct compound_hdr hdr = {
42272 + .minorversion = nfs4_xdr_minorversion(&args->seq_args)
42273 + };
42274 +@@ -2877,10 +2924,12 @@ static void nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req,
42275 + /*
42276 + * Encode GETDEVICEINFO request
42277 + */
42278 +-static void nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req,
42279 ++static void nfs4_xdr_enc_getdeviceinfo(void *_req,
42280 + struct xdr_stream *xdr,
42281 +- struct nfs4_getdeviceinfo_args *args)
42282 ++ void *_args)
42283 + {
42284 ++ struct rpc_rqst *req = _req;
42285 ++ struct nfs4_getdeviceinfo_args *args = _args;
42286 + struct compound_hdr hdr = {
42287 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42288 + };
42289 +@@ -2901,10 +2950,12 @@ static void nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req,
42290 + /*
42291 + * Encode LAYOUTGET request
42292 + */
42293 +-static void nfs4_xdr_enc_layoutget(struct rpc_rqst *req,
42294 ++static void nfs4_xdr_enc_layoutget(void *_req,
42295 + struct xdr_stream *xdr,
42296 +- struct nfs4_layoutget_args *args)
42297 ++ void *_args)
42298 + {
42299 ++ struct rpc_rqst *req = _req;
42300 ++ struct nfs4_layoutget_args *args = _args;
42301 + struct compound_hdr hdr = {
42302 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42303 + };
42304 +@@ -2923,10 +2974,11 @@ static void nfs4_xdr_enc_layoutget(struct rpc_rqst *req,
42305 + /*
42306 + * Encode LAYOUTCOMMIT request
42307 + */
42308 +-static void nfs4_xdr_enc_layoutcommit(struct rpc_rqst *req,
42309 ++static void nfs4_xdr_enc_layoutcommit(void *req,
42310 + struct xdr_stream *xdr,
42311 +- struct nfs4_layoutcommit_args *args)
42312 ++ void *_args)
42313 + {
42314 ++ struct nfs4_layoutcommit_args *args = _args;
42315 + struct nfs4_layoutcommit_data *data =
42316 + container_of(args, struct nfs4_layoutcommit_data, args);
42317 + struct compound_hdr hdr = {
42318 +@@ -2944,10 +2996,11 @@ static void nfs4_xdr_enc_layoutcommit(struct rpc_rqst *req,
42319 + /*
42320 + * Encode LAYOUTRETURN request
42321 + */
42322 +-static void nfs4_xdr_enc_layoutreturn(struct rpc_rqst *req,
42323 ++static void nfs4_xdr_enc_layoutreturn(void *req,
42324 + struct xdr_stream *xdr,
42325 +- struct nfs4_layoutreturn_args *args)
42326 ++ void *_args)
42327 + {
42328 ++ struct nfs4_layoutreturn_args *args = _args;
42329 + struct compound_hdr hdr = {
42330 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42331 + };
42332 +@@ -2962,10 +3015,11 @@ static void nfs4_xdr_enc_layoutreturn(struct rpc_rqst *req,
42333 + /*
42334 + * Encode SECINFO_NO_NAME request
42335 + */
42336 +-static int nfs4_xdr_enc_secinfo_no_name(struct rpc_rqst *req,
42337 ++static void nfs4_xdr_enc_secinfo_no_name(void *req,
42338 + struct xdr_stream *xdr,
42339 +- struct nfs41_secinfo_no_name_args *args)
42340 ++ void *_args)
42341 + {
42342 ++ struct nfs41_secinfo_no_name_args *args = _args;
42343 + struct compound_hdr hdr = {
42344 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42345 + };
42346 +@@ -2975,16 +3029,16 @@ static int nfs4_xdr_enc_secinfo_no_name(struct rpc_rqst *req,
42347 + encode_putrootfh(xdr, &hdr);
42348 + encode_secinfo_no_name(xdr, args, &hdr);
42349 + encode_nops(&hdr);
42350 +- return 0;
42351 + }
42352 +
42353 + /*
42354 + * Encode TEST_STATEID request
42355 + */
42356 +-static void nfs4_xdr_enc_test_stateid(struct rpc_rqst *req,
42357 ++static void nfs4_xdr_enc_test_stateid(void *req,
42358 + struct xdr_stream *xdr,
42359 +- struct nfs41_test_stateid_args *args)
42360 ++ void *_args)
42361 + {
42362 ++ struct nfs41_test_stateid_args *args = _args;
42363 + struct compound_hdr hdr = {
42364 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42365 + };
42366 +@@ -2998,10 +3052,11 @@ static void nfs4_xdr_enc_test_stateid(struct rpc_rqst *req,
42367 + /*
42368 + * Encode FREE_STATEID request
42369 + */
42370 +-static void nfs4_xdr_enc_free_stateid(struct rpc_rqst *req,
42371 ++static void nfs4_xdr_enc_free_stateid(void *req,
42372 + struct xdr_stream *xdr,
42373 +- struct nfs41_free_stateid_args *args)
42374 ++ void *_args)
42375 + {
42376 ++ struct nfs41_free_stateid_args *args = _args;
42377 + struct compound_hdr hdr = {
42378 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42379 + };
42380 +@@ -6067,10 +6122,11 @@ static int decode_free_stateid(struct xdr_stream *xdr,
42381 + /*
42382 + * Decode OPEN_DOWNGRADE response
42383 + */
42384 +-static int nfs4_xdr_dec_open_downgrade(struct rpc_rqst *rqstp,
42385 ++static int nfs4_xdr_dec_open_downgrade(void *rqstp,
42386 + struct xdr_stream *xdr,
42387 +- struct nfs_closeres *res)
42388 ++ void *_res)
42389 + {
42390 ++ struct nfs_closeres *res = _res;
42391 + struct compound_hdr hdr;
42392 + int status;
42393 +
42394 +@@ -6094,9 +6150,10 @@ out:
42395 + /*
42396 + * Decode ACCESS response
42397 + */
42398 +-static int nfs4_xdr_dec_access(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42399 +- struct nfs4_accessres *res)
42400 ++static int nfs4_xdr_dec_access(void *rqstp, struct xdr_stream *xdr,
42401 ++ void *_res)
42402 + {
42403 ++ struct nfs4_accessres *res = _res;
42404 + struct compound_hdr hdr;
42405 + int status;
42406 +
42407 +@@ -6120,9 +6177,10 @@ out:
42408 + /*
42409 + * Decode LOOKUP response
42410 + */
42411 +-static int nfs4_xdr_dec_lookup(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42412 +- struct nfs4_lookup_res *res)
42413 ++static int nfs4_xdr_dec_lookup(void *rqstp, struct xdr_stream *xdr,
42414 ++ void *_res)
42415 + {
42416 ++ struct nfs4_lookup_res *res = _res;
42417 + struct compound_hdr hdr;
42418 + int status;
42419 +
42420 +@@ -6149,10 +6207,11 @@ out:
42421 + /*
42422 + * Decode LOOKUP_ROOT response
42423 + */
42424 +-static int nfs4_xdr_dec_lookup_root(struct rpc_rqst *rqstp,
42425 ++static int nfs4_xdr_dec_lookup_root(void *rqstp,
42426 + struct xdr_stream *xdr,
42427 +- struct nfs4_lookup_res *res)
42428 ++ void *_res)
42429 + {
42430 ++ struct nfs4_lookup_res *res = _res;
42431 + struct compound_hdr hdr;
42432 + int status;
42433 +
42434 +@@ -6176,9 +6235,10 @@ out:
42435 + /*
42436 + * Decode REMOVE response
42437 + */
42438 +-static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42439 +- struct nfs_removeres *res)
42440 ++static int nfs4_xdr_dec_remove(void *rqstp, struct xdr_stream *xdr,
42441 ++ void *_res)
42442 + {
42443 ++ struct nfs_removeres *res = _res;
42444 + struct compound_hdr hdr;
42445 + int status;
42446 +
42447 +@@ -6199,9 +6259,10 @@ out:
42448 + /*
42449 + * Decode RENAME response
42450 + */
42451 +-static int nfs4_xdr_dec_rename(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42452 +- struct nfs_renameres *res)
42453 ++static int nfs4_xdr_dec_rename(void *rqstp, struct xdr_stream *xdr,
42454 ++ void *_res)
42455 + {
42456 ++ struct nfs_renameres *res = _res;
42457 + struct compound_hdr hdr;
42458 + int status;
42459 +
42460 +@@ -6228,9 +6289,10 @@ out:
42461 + /*
42462 + * Decode LINK response
42463 + */
42464 +-static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42465 +- struct nfs4_link_res *res)
42466 ++static int nfs4_xdr_dec_link(void *rqstp, struct xdr_stream *xdr,
42467 ++ void *_res)
42468 + {
42469 ++ struct nfs4_link_res *res = _res;
42470 + struct compound_hdr hdr;
42471 + int status;
42472 +
42473 +@@ -6267,9 +6329,10 @@ out:
42474 + /*
42475 + * Decode CREATE response
42476 + */
42477 +-static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42478 +- struct nfs4_create_res *res)
42479 ++static int nfs4_xdr_dec_create(void *rqstp, struct xdr_stream *xdr,
42480 ++ void *_res)
42481 + {
42482 ++ struct nfs4_create_res *res = _res;
42483 + struct compound_hdr hdr;
42484 + int status;
42485 +
42486 +@@ -6296,8 +6359,8 @@ out:
42487 + /*
42488 + * Decode SYMLINK response
42489 + */
42490 +-static int nfs4_xdr_dec_symlink(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42491 +- struct nfs4_create_res *res)
42492 ++static int nfs4_xdr_dec_symlink(void *rqstp, struct xdr_stream *xdr,
42493 ++ void *res)
42494 + {
42495 + return nfs4_xdr_dec_create(rqstp, xdr, res);
42496 + }
42497 +@@ -6305,9 +6368,10 @@ static int nfs4_xdr_dec_symlink(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42498 + /*
42499 + * Decode GETATTR response
42500 + */
42501 +-static int nfs4_xdr_dec_getattr(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42502 +- struct nfs4_getattr_res *res)
42503 ++static int nfs4_xdr_dec_getattr(void *rqstp, struct xdr_stream *xdr,
42504 ++ void *_res)
42505 + {
42506 ++ struct nfs4_getattr_res *res = _res;
42507 + struct compound_hdr hdr;
42508 + int status;
42509 +
42510 +@@ -6328,9 +6392,10 @@ out:
42511 + /*
42512 + * Encode an SETACL request
42513 + */
42514 +-static void nfs4_xdr_enc_setacl(struct rpc_rqst *req, struct xdr_stream *xdr,
42515 +- struct nfs_setaclargs *args)
42516 ++static void nfs4_xdr_enc_setacl(void *req, struct xdr_stream *xdr,
42517 ++ void *_args)
42518 + {
42519 ++ struct nfs_setaclargs *args = _args;
42520 + struct compound_hdr hdr = {
42521 + .minorversion = nfs4_xdr_minorversion(&args->seq_args),
42522 + };
42523 +@@ -6346,9 +6411,10 @@ static void nfs4_xdr_enc_setacl(struct rpc_rqst *req, struct xdr_stream *xdr,
42524 + * Decode SETACL response
42525 + */
42526 + static int
42527 +-nfs4_xdr_dec_setacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42528 +- struct nfs_setaclres *res)
42529 ++nfs4_xdr_dec_setacl(void *rqstp, struct xdr_stream *xdr,
42530 ++ void *_res)
42531 + {
42532 ++ struct nfs_setaclres *res = _res;
42533 + struct compound_hdr hdr;
42534 + int status;
42535 +
42536 +@@ -6370,9 +6436,10 @@ out:
42537 + * Decode GETACL response
42538 + */
42539 + static int
42540 +-nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42541 +- struct nfs_getaclres *res)
42542 ++nfs4_xdr_dec_getacl(void *rqstp, struct xdr_stream *xdr,
42543 ++ void *_res)
42544 + {
42545 ++ struct nfs_getaclres *res = _res;
42546 + struct compound_hdr hdr;
42547 + int status;
42548 +
42549 +@@ -6398,9 +6465,10 @@ out:
42550 + /*
42551 + * Decode CLOSE response
42552 + */
42553 +-static int nfs4_xdr_dec_close(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42554 +- struct nfs_closeres *res)
42555 ++static int nfs4_xdr_dec_close(void *rqstp, struct xdr_stream *xdr,
42556 ++ void *_res)
42557 + {
42558 ++ struct nfs_closeres *res = _res;
42559 + struct compound_hdr hdr;
42560 + int status;
42561 +
42562 +@@ -6430,9 +6498,10 @@ out:
42563 + /*
42564 + * Decode OPEN response
42565 + */
42566 +-static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42567 +- struct nfs_openres *res)
42568 ++static int nfs4_xdr_dec_open(void *rqstp, struct xdr_stream *xdr,
42569 ++ void *_res)
42570 + {
42571 ++ struct nfs_openres *res = _res;
42572 + struct compound_hdr hdr;
42573 + int status;
42574 +
42575 +@@ -6461,9 +6530,9 @@ out:
42576 + /*
42577 + * Decode OPEN_CONFIRM response
42578 + */
42579 +-static int nfs4_xdr_dec_open_confirm(struct rpc_rqst *rqstp,
42580 ++static int nfs4_xdr_dec_open_confirm(void *rqstp,
42581 + struct xdr_stream *xdr,
42582 +- struct nfs_open_confirmres *res)
42583 ++ void *res)
42584 + {
42585 + struct compound_hdr hdr;
42586 + int status;
42587 +@@ -6482,10 +6551,11 @@ out:
42588 + /*
42589 + * Decode OPEN response
42590 + */
42591 +-static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp,
42592 ++static int nfs4_xdr_dec_open_noattr(void *rqstp,
42593 + struct xdr_stream *xdr,
42594 +- struct nfs_openres *res)
42595 ++ void *_res)
42596 + {
42597 ++ struct nfs_openres *res = _res;
42598 + struct compound_hdr hdr;
42599 + int status;
42600 +
42601 +@@ -6511,10 +6581,11 @@ out:
42602 + /*
42603 + * Decode SETATTR response
42604 + */
42605 +-static int nfs4_xdr_dec_setattr(struct rpc_rqst *rqstp,
42606 ++static int nfs4_xdr_dec_setattr(void *rqstp,
42607 + struct xdr_stream *xdr,
42608 +- struct nfs_setattrres *res)
42609 ++ void *_res)
42610 + {
42611 ++ struct nfs_setattrres *res = _res;
42612 + struct compound_hdr hdr;
42613 + int status;
42614 +
42615 +@@ -6538,9 +6609,10 @@ out:
42616 + /*
42617 + * Decode LOCK response
42618 + */
42619 +-static int nfs4_xdr_dec_lock(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42620 +- struct nfs_lock_res *res)
42621 ++static int nfs4_xdr_dec_lock(void *rqstp, struct xdr_stream *xdr,
42622 ++ void *_res)
42623 + {
42624 ++ struct nfs_lock_res *res = _res;
42625 + struct compound_hdr hdr;
42626 + int status;
42627 +
42628 +@@ -6561,9 +6633,10 @@ out:
42629 + /*
42630 + * Decode LOCKT response
42631 + */
42632 +-static int nfs4_xdr_dec_lockt(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42633 +- struct nfs_lockt_res *res)
42634 ++static int nfs4_xdr_dec_lockt(void *rqstp, struct xdr_stream *xdr,
42635 ++ void *_res)
42636 + {
42637 ++ struct nfs_lockt_res *res = _res;
42638 + struct compound_hdr hdr;
42639 + int status;
42640 +
42641 +@@ -6584,9 +6657,10 @@ out:
42642 + /*
42643 + * Decode LOCKU response
42644 + */
42645 +-static int nfs4_xdr_dec_locku(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42646 +- struct nfs_locku_res *res)
42647 ++static int nfs4_xdr_dec_locku(void *rqstp, struct xdr_stream *xdr,
42648 ++ void *_res)
42649 + {
42650 ++ struct nfs_locku_res *res = _res;
42651 + struct compound_hdr hdr;
42652 + int status;
42653 +
42654 +@@ -6604,7 +6678,7 @@ out:
42655 + return status;
42656 + }
42657 +
42658 +-static int nfs4_xdr_dec_release_lockowner(struct rpc_rqst *rqstp,
42659 ++static int nfs4_xdr_dec_release_lockowner(void *rqstp,
42660 + struct xdr_stream *xdr, void *dummy)
42661 + {
42662 + struct compound_hdr hdr;
42663 +@@ -6619,10 +6693,11 @@ static int nfs4_xdr_dec_release_lockowner(struct rpc_rqst *rqstp,
42664 + /*
42665 + * Decode READLINK response
42666 + */
42667 +-static int nfs4_xdr_dec_readlink(struct rpc_rqst *rqstp,
42668 ++static int nfs4_xdr_dec_readlink(void *rqstp,
42669 + struct xdr_stream *xdr,
42670 +- struct nfs4_readlink_res *res)
42671 ++ void *_res)
42672 + {
42673 ++ struct nfs4_readlink_res *res = _res;
42674 + struct compound_hdr hdr;
42675 + int status;
42676 +
42677 +@@ -6643,9 +6718,10 @@ out:
42678 + /*
42679 + * Decode READDIR response
42680 + */
42681 +-static int nfs4_xdr_dec_readdir(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42682 +- struct nfs4_readdir_res *res)
42683 ++static int nfs4_xdr_dec_readdir(void *rqstp, struct xdr_stream *xdr,
42684 ++ void *_res)
42685 + {
42686 ++ struct nfs4_readdir_res *res = _res;
42687 + struct compound_hdr hdr;
42688 + int status;
42689 +
42690 +@@ -6666,9 +6742,10 @@ out:
42691 + /*
42692 + * Decode Read response
42693 + */
42694 +-static int nfs4_xdr_dec_read(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42695 +- struct nfs_pgio_res *res)
42696 ++static int nfs4_xdr_dec_read(void *rqstp, struct xdr_stream *xdr,
42697 ++ void *_res)
42698 + {
42699 ++ struct nfs_pgio_res *res = _res;
42700 + struct compound_hdr hdr;
42701 + int status;
42702 +
42703 +@@ -6692,9 +6769,10 @@ out:
42704 + /*
42705 + * Decode WRITE response
42706 + */
42707 +-static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42708 +- struct nfs_pgio_res *res)
42709 ++static int nfs4_xdr_dec_write(void *rqstp, struct xdr_stream *xdr,
42710 ++ void *_res)
42711 + {
42712 ++ struct nfs_pgio_res *res = _res;
42713 + struct compound_hdr hdr;
42714 + int status;
42715 +
42716 +@@ -6722,9 +6800,10 @@ out:
42717 + /*
42718 + * Decode COMMIT response
42719 + */
42720 +-static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42721 +- struct nfs_commitres *res)
42722 ++static int nfs4_xdr_dec_commit(void *rqstp, struct xdr_stream *xdr,
42723 ++ void *_res)
42724 + {
42725 ++ struct nfs_commitres *res = _res;
42726 + struct compound_hdr hdr;
42727 + int status;
42728 +
42729 +@@ -6746,9 +6825,10 @@ out:
42730 + /*
42731 + * Decode FSINFO response
42732 + */
42733 +-static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
42734 +- struct nfs4_fsinfo_res *res)
42735 ++static int nfs4_xdr_dec_fsinfo(void *req, struct xdr_stream *xdr,
42736 ++ void *_res)
42737 + {
42738 ++ struct nfs4_fsinfo_res *res = _res;
42739 + struct compound_hdr hdr;
42740 + int status;
42741 +
42742 +@@ -6765,9 +6845,10 @@ static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
42743 + /*
42744 + * Decode PATHCONF response
42745 + */
42746 +-static int nfs4_xdr_dec_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
42747 +- struct nfs4_pathconf_res *res)
42748 ++static int nfs4_xdr_dec_pathconf(void *req, struct xdr_stream *xdr,
42749 ++ void *_res)
42750 + {
42751 ++ struct nfs4_pathconf_res *res = _res;
42752 + struct compound_hdr hdr;
42753 + int status;
42754 +
42755 +@@ -6784,9 +6865,10 @@ static int nfs4_xdr_dec_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
42756 + /*
42757 + * Decode STATFS response
42758 + */
42759 +-static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
42760 +- struct nfs4_statfs_res *res)
42761 ++static int nfs4_xdr_dec_statfs(void *req, struct xdr_stream *xdr,
42762 ++ void *_res)
42763 + {
42764 ++ struct nfs4_statfs_res *res = _res;
42765 + struct compound_hdr hdr;
42766 + int status;
42767 +
42768 +@@ -6803,10 +6885,11 @@ static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
42769 + /*
42770 + * Decode GETATTR_BITMAP response
42771 + */
42772 +-static int nfs4_xdr_dec_server_caps(struct rpc_rqst *req,
42773 ++static int nfs4_xdr_dec_server_caps(void *req,
42774 + struct xdr_stream *xdr,
42775 +- struct nfs4_server_caps_res *res)
42776 ++ void *_res)
42777 + {
42778 ++ struct nfs4_server_caps_res *res = _res;
42779 + struct compound_hdr hdr;
42780 + int status;
42781 +
42782 +@@ -6827,7 +6910,7 @@ out:
42783 + /*
42784 + * Decode RENEW response
42785 + */
42786 +-static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42787 ++static int nfs4_xdr_dec_renew(void *rqstp, struct xdr_stream *xdr,
42788 + void *__unused)
42789 + {
42790 + struct compound_hdr hdr;
42791 +@@ -6842,9 +6925,9 @@ static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
42792 + /*
42793 + * Decode SETCLIENTID response
42794 + */
42795 +-static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req,
42796 ++static int nfs4_xdr_dec_setclientid(void *req,
42797 + struct xdr_stream *xdr,
42798 +- struct nfs4_setclientid_res *res)
42799 ++ void *res)
42800 + {
42801 + struct compound_hdr hdr;
42802 + int status;
42803 +@@ -6858,8 +6941,9 @@ static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req,
42804 + /*
42805 + * Decode SETCLIENTID_CONFIRM response
42806 + */
42807 +-static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req,
42808 +- struct xdr_stream *xdr)
42809 ++static int nfs4_xdr_dec_setclientid_confirm(void *req,
42810 ++ struct xdr_stream *xdr,
42811 ++ void *res)
42812 + {
42813 + struct compound_hdr hdr;
42814 + int status;
42815 +@@ -6873,10 +6957,11 @@ static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req,
42816 + /*
42817 + * Decode DELEGRETURN response
42818 + */
42819 +-static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp,
42820 ++static int nfs4_xdr_dec_delegreturn(void *rqstp,
42821 + struct xdr_stream *xdr,
42822 +- struct nfs4_delegreturnres *res)
42823 ++ void *_res)
42824 + {
42825 ++ struct nfs4_delegreturnres *res = _res;
42826 + struct compound_hdr hdr;
42827 + int status;
42828 +
42829 +@@ -6900,10 +6985,11 @@ out:
42830 + /*
42831 + * Decode FS_LOCATIONS response
42832 + */
42833 +-static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req,
42834 ++static int nfs4_xdr_dec_fs_locations(void *req,
42835 + struct xdr_stream *xdr,
42836 +- struct nfs4_fs_locations_res *res)
42837 ++ void *_res)
42838 + {
42839 ++ struct nfs4_fs_locations_res *res = _res;
42840 + struct compound_hdr hdr;
42841 + int status;
42842 +
42843 +@@ -6943,10 +7029,11 @@ out:
42844 + /*
42845 + * Decode SECINFO response
42846 + */
42847 +-static int nfs4_xdr_dec_secinfo(struct rpc_rqst *rqstp,
42848 ++static int nfs4_xdr_dec_secinfo(void *rqstp,
42849 + struct xdr_stream *xdr,
42850 +- struct nfs4_secinfo_res *res)
42851 ++ void *_res)
42852 + {
42853 ++ struct nfs4_secinfo_res *res = _res;
42854 + struct compound_hdr hdr;
42855 + int status;
42856 +
42857 +@@ -6967,10 +7054,11 @@ out:
42858 + /*
42859 + * Decode FSID_PRESENT response
42860 + */
42861 +-static int nfs4_xdr_dec_fsid_present(struct rpc_rqst *rqstp,
42862 ++static int nfs4_xdr_dec_fsid_present(void *rqstp,
42863 + struct xdr_stream *xdr,
42864 +- struct nfs4_fsid_present_res *res)
42865 ++ void *_res)
42866 + {
42867 ++ struct nfs4_fsid_present_res *res = _res;
42868 + struct compound_hdr hdr;
42869 + int status;
42870 +
42871 +@@ -6996,7 +7084,7 @@ out:
42872 + /*
42873 + * Decode BIND_CONN_TO_SESSION response
42874 + */
42875 +-static int nfs4_xdr_dec_bind_conn_to_session(struct rpc_rqst *rqstp,
42876 ++static int nfs4_xdr_dec_bind_conn_to_session(void *rqstp,
42877 + struct xdr_stream *xdr,
42878 + void *res)
42879 + {
42880 +@@ -7012,7 +7100,7 @@ static int nfs4_xdr_dec_bind_conn_to_session(struct rpc_rqst *rqstp,
42881 + /*
42882 + * Decode EXCHANGE_ID response
42883 + */
42884 +-static int nfs4_xdr_dec_exchange_id(struct rpc_rqst *rqstp,
42885 ++static int nfs4_xdr_dec_exchange_id(void *rqstp,
42886 + struct xdr_stream *xdr,
42887 + void *res)
42888 + {
42889 +@@ -7028,9 +7116,9 @@ static int nfs4_xdr_dec_exchange_id(struct rpc_rqst *rqstp,
42890 + /*
42891 + * Decode CREATE_SESSION response
42892 + */
42893 +-static int nfs4_xdr_dec_create_session(struct rpc_rqst *rqstp,
42894 ++static int nfs4_xdr_dec_create_session(void *rqstp,
42895 + struct xdr_stream *xdr,
42896 +- struct nfs41_create_session_res *res)
42897 ++ void *res)
42898 + {
42899 + struct compound_hdr hdr;
42900 + int status;
42901 +@@ -7044,7 +7132,7 @@ static int nfs4_xdr_dec_create_session(struct rpc_rqst *rqstp,
42902 + /*
42903 + * Decode DESTROY_SESSION response
42904 + */
42905 +-static int nfs4_xdr_dec_destroy_session(struct rpc_rqst *rqstp,
42906 ++static int nfs4_xdr_dec_destroy_session(void *rqstp,
42907 + struct xdr_stream *xdr,
42908 + void *res)
42909 + {
42910 +@@ -7060,7 +7148,7 @@ static int nfs4_xdr_dec_destroy_session(struct rpc_rqst *rqstp,
42911 + /*
42912 + * Decode DESTROY_CLIENTID response
42913 + */
42914 +-static int nfs4_xdr_dec_destroy_clientid(struct rpc_rqst *rqstp,
42915 ++static int nfs4_xdr_dec_destroy_clientid(void *rqstp,
42916 + struct xdr_stream *xdr,
42917 + void *res)
42918 + {
42919 +@@ -7076,9 +7164,9 @@ static int nfs4_xdr_dec_destroy_clientid(struct rpc_rqst *rqstp,
42920 + /*
42921 + * Decode SEQUENCE response
42922 + */
42923 +-static int nfs4_xdr_dec_sequence(struct rpc_rqst *rqstp,
42924 ++static int nfs4_xdr_dec_sequence(void *rqstp,
42925 + struct xdr_stream *xdr,
42926 +- struct nfs4_sequence_res *res)
42927 ++ void *res)
42928 + {
42929 + struct compound_hdr hdr;
42930 + int status;
42931 +@@ -7092,10 +7180,11 @@ static int nfs4_xdr_dec_sequence(struct rpc_rqst *rqstp,
42932 + /*
42933 + * Decode GET_LEASE_TIME response
42934 + */
42935 +-static int nfs4_xdr_dec_get_lease_time(struct rpc_rqst *rqstp,
42936 ++static int nfs4_xdr_dec_get_lease_time(void *rqstp,
42937 + struct xdr_stream *xdr,
42938 +- struct nfs4_get_lease_time_res *res)
42939 ++ void *_res)
42940 + {
42941 ++ struct nfs4_get_lease_time_res *res = _res;
42942 + struct compound_hdr hdr;
42943 + int status;
42944 +
42945 +@@ -7112,10 +7201,11 @@ static int nfs4_xdr_dec_get_lease_time(struct rpc_rqst *rqstp,
42946 + /*
42947 + * Decode RECLAIM_COMPLETE response
42948 + */
42949 +-static int nfs4_xdr_dec_reclaim_complete(struct rpc_rqst *rqstp,
42950 ++static int nfs4_xdr_dec_reclaim_complete(void *rqstp,
42951 + struct xdr_stream *xdr,
42952 +- struct nfs41_reclaim_complete_res *res)
42953 ++ void *_res)
42954 + {
42955 ++ struct nfs41_reclaim_complete_res *res = _res;
42956 + struct compound_hdr hdr;
42957 + int status;
42958 +
42959 +@@ -7130,10 +7220,11 @@ static int nfs4_xdr_dec_reclaim_complete(struct rpc_rqst *rqstp,
42960 + /*
42961 + * Decode GETDEVINFO response
42962 + */
42963 +-static int nfs4_xdr_dec_getdeviceinfo(struct rpc_rqst *rqstp,
42964 ++static int nfs4_xdr_dec_getdeviceinfo(void *rqstp,
42965 + struct xdr_stream *xdr,
42966 +- struct nfs4_getdeviceinfo_res *res)
42967 ++ void *_res)
42968 + {
42969 ++ struct nfs4_getdeviceinfo_res *res = _res;
42970 + struct compound_hdr hdr;
42971 + int status;
42972 +
42973 +@@ -7151,10 +7242,11 @@ out:
42974 + /*
42975 + * Decode LAYOUTGET response
42976 + */
42977 +-static int nfs4_xdr_dec_layoutget(struct rpc_rqst *rqstp,
42978 ++static int nfs4_xdr_dec_layoutget(void *rqstp,
42979 + struct xdr_stream *xdr,
42980 +- struct nfs4_layoutget_res *res)
42981 ++ void *_res)
42982 + {
42983 ++ struct nfs4_layoutget_res *res = _res;
42984 + struct compound_hdr hdr;
42985 + int status;
42986 +
42987 +@@ -7175,10 +7267,11 @@ out:
42988 + /*
42989 + * Decode LAYOUTRETURN response
42990 + */
42991 +-static int nfs4_xdr_dec_layoutreturn(struct rpc_rqst *rqstp,
42992 ++static int nfs4_xdr_dec_layoutreturn(void *rqstp,
42993 + struct xdr_stream *xdr,
42994 +- struct nfs4_layoutreturn_res *res)
42995 ++ void *_res)
42996 + {
42997 ++ struct nfs4_layoutreturn_res *res = _res;
42998 + struct compound_hdr hdr;
42999 + int status;
43000 +
43001 +@@ -7199,10 +7292,11 @@ out:
43002 + /*
43003 + * Decode LAYOUTCOMMIT response
43004 + */
43005 +-static int nfs4_xdr_dec_layoutcommit(struct rpc_rqst *rqstp,
43006 ++static int nfs4_xdr_dec_layoutcommit(void *rqstp,
43007 + struct xdr_stream *xdr,
43008 +- struct nfs4_layoutcommit_res *res)
43009 ++ void *_res)
43010 + {
43011 ++ struct nfs4_layoutcommit_res *res = _res;
43012 + struct compound_hdr hdr;
43013 + int status;
43014 +
43015 +@@ -7226,10 +7320,11 @@ out:
43016 + /*
43017 + * Decode SECINFO_NO_NAME response
43018 + */
43019 +-static int nfs4_xdr_dec_secinfo_no_name(struct rpc_rqst *rqstp,
43020 ++static int nfs4_xdr_dec_secinfo_no_name(void *rqstp,
43021 + struct xdr_stream *xdr,
43022 +- struct nfs4_secinfo_res *res)
43023 ++ void *_res)
43024 + {
43025 ++ struct nfs4_secinfo_res *res = _res;
43026 + struct compound_hdr hdr;
43027 + int status;
43028 +
43029 +@@ -7250,10 +7345,11 @@ out:
43030 + /*
43031 + * Decode TEST_STATEID response
43032 + */
43033 +-static int nfs4_xdr_dec_test_stateid(struct rpc_rqst *rqstp,
43034 ++static int nfs4_xdr_dec_test_stateid(void *rqstp,
43035 + struct xdr_stream *xdr,
43036 +- struct nfs41_test_stateid_res *res)
43037 ++ void *_res)
43038 + {
43039 ++ struct nfs41_test_stateid_res *res = _res;
43040 + struct compound_hdr hdr;
43041 + int status;
43042 +
43043 +@@ -7271,10 +7367,11 @@ out:
43044 + /*
43045 + * Decode FREE_STATEID response
43046 + */
43047 +-static int nfs4_xdr_dec_free_stateid(struct rpc_rqst *rqstp,
43048 ++static int nfs4_xdr_dec_free_stateid(void *rqstp,
43049 + struct xdr_stream *xdr,
43050 +- struct nfs41_free_stateid_res *res)
43051 ++ void *_res)
43052 + {
43053 ++ struct nfs41_free_stateid_res *res = _res;
43054 + struct compound_hdr hdr;
43055 + int status;
43056 +
43057 +@@ -7439,8 +7536,8 @@ nfs4_stat_to_errno(int stat)
43058 + #define PROC(proc, argtype, restype) \
43059 + [NFSPROC4_CLNT_##proc] = { \
43060 + .p_proc = NFSPROC4_COMPOUND, \
43061 +- .p_encode = (kxdreproc_t)nfs4_xdr_##argtype, \
43062 +- .p_decode = (kxdrdproc_t)nfs4_xdr_##restype, \
43063 ++ .p_encode = nfs4_xdr_##argtype, \
43064 ++ .p_decode = nfs4_xdr_##restype, \
43065 + .p_arglen = NFS4_##argtype##_sz, \
43066 + .p_replen = NFS4_##restype##_sz, \
43067 + .p_statidx = NFSPROC4_CLNT_##proc, \
43068 +diff --git a/fs/nfs/read.c b/fs/nfs/read.c
43069 +index eb31e23..e3d68b7 100644
43070 +--- a/fs/nfs/read.c
43071 ++++ b/fs/nfs/read.c
43072 +@@ -346,7 +346,7 @@ struct nfs_readdesc {
43073 + };
43074 +
43075 + static int
43076 +-readpage_async_filler(void *data, struct page *page)
43077 ++readpage_async_filler(struct file *data, struct page *page)
43078 + {
43079 + struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
43080 + struct nfs_page *new;
43081 +diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c
43082 +index 4fe3eea..8922b2b 100644
43083 +--- a/fs/nfs/symlink.c
43084 ++++ b/fs/nfs/symlink.c
43085 +@@ -25,9 +25,10 @@
43086 + * and straight-forward than readdir caching.
43087 + */
43088 +
43089 +-static int nfs_symlink_filler(struct inode *inode, struct page *page)
43090 ++static int nfs_symlink_filler(struct file *_inode, struct page *page)
43091 + {
43092 + int error;
43093 ++ struct inode *inode = (struct inode *)_inode;
43094 +
43095 + error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE);
43096 + if (error < 0)
43097 +@@ -64,8 +65,7 @@ static const char *nfs_get_link(struct dentry *dentry,
43098 + err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping));
43099 + if (err)
43100 + return err;
43101 +- page = read_cache_page(&inode->i_data, 0,
43102 +- (filler_t *)nfs_symlink_filler, inode);
43103 ++ page = read_cache_page(&inode->i_data, 0, nfs_symlink_filler, inode);
43104 + if (IS_ERR(page))
43105 + return ERR_CAST(page);
43106 + }
43107 +diff --git a/fs/nfsd/current_stateid.h b/fs/nfsd/current_stateid.h
43108 +index 4123551..813b403 100644
43109 +--- a/fs/nfsd/current_stateid.h
43110 ++++ b/fs/nfsd/current_stateid.h
43111 +@@ -8,21 +8,21 @@ extern void clear_current_stateid(struct nfsd4_compound_state *cstate);
43112 + /*
43113 + * functions to set current state id
43114 + */
43115 +-extern void nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *);
43116 +-extern void nfsd4_set_openstateid(struct nfsd4_compound_state *, struct nfsd4_open *);
43117 +-extern void nfsd4_set_lockstateid(struct nfsd4_compound_state *, struct nfsd4_lock *);
43118 +-extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *);
43119 ++extern void nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, void *);
43120 ++extern void nfsd4_set_openstateid(struct nfsd4_compound_state *, void *);
43121 ++extern void nfsd4_set_lockstateid(struct nfsd4_compound_state *, void *);
43122 ++extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, void *);
43123 +
43124 + /*
43125 + * functions to consume current state id
43126 + */
43127 +-extern void nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *);
43128 +-extern void nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *, struct nfsd4_delegreturn *);
43129 +-extern void nfsd4_get_freestateid(struct nfsd4_compound_state *, struct nfsd4_free_stateid *);
43130 +-extern void nfsd4_get_setattrstateid(struct nfsd4_compound_state *, struct nfsd4_setattr *);
43131 +-extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *);
43132 +-extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *);
43133 +-extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *);
43134 +-extern void nfsd4_get_writestateid(struct nfsd4_compound_state *, struct nfsd4_write *);
43135 ++extern void nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, void *);
43136 ++extern void nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *, void *);
43137 ++extern void nfsd4_get_freestateid(struct nfsd4_compound_state *, void *);
43138 ++extern void nfsd4_get_setattrstateid(struct nfsd4_compound_state *, void *);
43139 ++extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, void *);
43140 ++extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, void *);
43141 ++extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, void *);
43142 ++extern void nfsd4_get_writestateid(struct nfsd4_compound_state *, void *);
43143 +
43144 + #endif /* _NFSD4_CURRENT_STATE_H */
43145 +diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
43146 +index 1580ea6..9c7f44f 100644
43147 +--- a/fs/nfsd/nfs2acl.c
43148 ++++ b/fs/nfsd/nfs2acl.c
43149 +@@ -27,9 +27,10 @@ nfsacld_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
43150 + /*
43151 + * Get the Access and/or Default ACL of a file.
43152 + */
43153 +-static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp,
43154 +- struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp)
43155 ++static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
43156 + {
43157 ++ struct nfsd3_getaclargs *argp = _argp;
43158 ++ struct nfsd3_getaclres *resp = _resp;
43159 + struct posix_acl *acl;
43160 + struct inode *inode;
43161 + svc_fh *fh;
43162 +@@ -87,10 +88,10 @@ fail:
43163 + /*
43164 + * Set the Access and/or Default ACL of a file.
43165 + */
43166 +-static __be32 nfsacld_proc_setacl(struct svc_rqst * rqstp,
43167 +- struct nfsd3_setaclargs *argp,
43168 +- struct nfsd_attrstat *resp)
43169 ++static __be32 nfsacld_proc_setacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
43170 + {
43171 ++ struct nfsd3_setaclargs *argp = _argp;
43172 ++ struct nfsd_attrstat *resp = _resp;
43173 + struct inode *inode;
43174 + svc_fh *fh;
43175 + __be32 nfserr = 0;
43176 +@@ -141,9 +142,10 @@ out_errno:
43177 + /*
43178 + * Check file attributes
43179 + */
43180 +-static __be32 nfsacld_proc_getattr(struct svc_rqst * rqstp,
43181 +- struct nfsd_fhandle *argp, struct nfsd_attrstat *resp)
43182 ++static __be32 nfsacld_proc_getattr(struct svc_rqst * rqstp, void *_argp, void *_resp)
43183 + {
43184 ++ struct nfsd_fhandle *argp = _argp;
43185 ++ struct nfsd_attrstat *resp = _resp;
43186 + __be32 nfserr;
43187 + dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh));
43188 +
43189 +@@ -158,9 +160,10 @@ static __be32 nfsacld_proc_getattr(struct svc_rqst * rqstp,
43190 + /*
43191 + * Check file access
43192 + */
43193 +-static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
43194 +- struct nfsd3_accessres *resp)
43195 ++static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, void *_argp, void *_resp)
43196 + {
43197 ++ struct nfsd3_accessargs *argp = _argp;
43198 ++ struct nfsd3_accessres *resp = _resp;
43199 + __be32 nfserr;
43200 +
43201 + dprintk("nfsd: ACCESS(2acl) %s 0x%x\n",
43202 +@@ -179,9 +182,10 @@ static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessarg
43203 + /*
43204 + * XDR decode functions
43205 + */
43206 +-static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
43207 +- struct nfsd3_getaclargs *argp)
43208 ++static int nfsaclsvc_decode_getaclargs(void *rqstp, __be32 *p, void *_argp)
43209 + {
43210 ++ struct nfsd3_getaclargs *argp = _argp;
43211 ++
43212 + p = nfs2svc_decode_fh(p, &argp->fh);
43213 + if (!p)
43214 + return 0;
43215 +@@ -191,9 +195,10 @@ static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
43216 + }
43217 +
43218 +
43219 +-static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
43220 +- struct nfsd3_setaclargs *argp)
43221 ++static int nfsaclsvc_decode_setaclargs(void *_rqstp, __be32 *p, void *_argp)
43222 + {
43223 ++ struct svc_rqst *rqstp = _rqstp;
43224 ++ struct nfsd3_setaclargs *argp = _argp;
43225 + struct kvec *head = rqstp->rq_arg.head;
43226 + unsigned int base;
43227 + int n;
43228 +@@ -217,18 +222,20 @@ static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
43229 + return (n > 0);
43230 + }
43231 +
43232 +-static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, __be32 *p,
43233 +- struct nfsd_fhandle *argp)
43234 ++static int nfsaclsvc_decode_fhandleargs(void *rqstp, __be32 *p, void *_argp)
43235 + {
43236 ++ struct nfsd_fhandle *argp = _argp;
43237 ++
43238 + p = nfs2svc_decode_fh(p, &argp->fh);
43239 + if (!p)
43240 + return 0;
43241 + return xdr_argsize_check(rqstp, p);
43242 + }
43243 +
43244 +-static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
43245 +- struct nfsd3_accessargs *argp)
43246 ++static int nfsaclsvc_decode_accessargs(void *rqstp, __be32 *p, void *_argp)
43247 + {
43248 ++ struct nfsd3_accessargs *argp = _argp;
43249 ++
43250 + p = nfs2svc_decode_fh(p, &argp->fh);
43251 + if (!p)
43252 + return 0;
43253 +@@ -245,15 +252,16 @@ static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
43254 + * There must be an encoding function for void results so svc_process
43255 + * will work properly.
43256 + */
43257 +-static int nfsaclsvc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
43258 ++static int nfsaclsvc_encode_voidres(void *rqstp, __be32 *p, void *dummy)
43259 + {
43260 + return xdr_ressize_check(rqstp, p);
43261 + }
43262 +
43263 + /* GETACL */
43264 +-static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
43265 +- struct nfsd3_getaclres *resp)
43266 ++static int nfsaclsvc_encode_getaclres(void *_rqstp, __be32 *p, void *_resp)
43267 + {
43268 ++ struct svc_rqst *rqstp = _rqstp;
43269 ++ struct nfsd3_getaclres *resp = _resp;
43270 + struct dentry *dentry = resp->fh.fh_dentry;
43271 + struct inode *inode;
43272 + struct kvec *head = rqstp->rq_res.head;
43273 +@@ -296,17 +304,19 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
43274 + return (n > 0);
43275 + }
43276 +
43277 +-static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, __be32 *p,
43278 +- struct nfsd_attrstat *resp)
43279 ++static int nfsaclsvc_encode_attrstatres(void *rqstp, __be32 *p, void *_resp)
43280 + {
43281 ++ struct nfsd_attrstat *resp = _resp;
43282 ++
43283 + p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
43284 + return xdr_ressize_check(rqstp, p);
43285 + }
43286 +
43287 + /* ACCESS */
43288 +-static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
43289 +- struct nfsd3_accessres *resp)
43290 ++static int nfsaclsvc_encode_accessres(void *rqstp, __be32 *p, void *_resp)
43291 + {
43292 ++ struct nfsd3_accessres *resp = _resp;
43293 ++
43294 + p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
43295 + *p++ = htonl(resp->access);
43296 + return xdr_ressize_check(rqstp, p);
43297 +@@ -315,27 +325,30 @@ static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
43298 + /*
43299 + * XDR release functions
43300 + */
43301 +-static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
43302 +- struct nfsd3_getaclres *resp)
43303 ++static int nfsaclsvc_release_getacl(void *rqstp, __be32 *p, void *_resp)
43304 + {
43305 ++ struct nfsd3_getaclres *resp = _resp;
43306 ++
43307 + fh_put(&resp->fh);
43308 + posix_acl_release(resp->acl_access);
43309 + posix_acl_release(resp->acl_default);
43310 + return 1;
43311 + }
43312 +
43313 +-static int nfsaclsvc_release_attrstat(struct svc_rqst *rqstp, __be32 *p,
43314 +- struct nfsd_attrstat *resp)
43315 ++static int nfsaclsvc_release_attrstat(void *rqstp, __be32 *p, void *_resp)
43316 + {
43317 ++ struct nfsd_attrstat *resp = _resp;
43318 ++
43319 + fh_put(&resp->fh);
43320 + return 1;
43321 + }
43322 +
43323 +-static int nfsaclsvc_release_access(struct svc_rqst *rqstp, __be32 *p,
43324 +- struct nfsd3_accessres *resp)
43325 ++static int nfsaclsvc_release_access(void *rqstp, __be32 *p, void *_resp)
43326 + {
43327 +- fh_put(&resp->fh);
43328 +- return 1;
43329 ++ struct nfsd3_accessres *resp = _resp;
43330 ++
43331 ++ fh_put(&resp->fh);
43332 ++ return 1;
43333 + }
43334 +
43335 + #define nfsaclsvc_decode_voidargs NULL
43336 +@@ -346,10 +359,10 @@ static int nfsaclsvc_release_access(struct svc_rqst *rqstp, __be32 *p,
43337 + struct nfsd3_voidargs { int dummy; };
43338 +
43339 + #define PROC(name, argt, rest, relt, cache, respsize) \
43340 +- { (svc_procfunc) nfsacld_proc_##name, \
43341 +- (kxdrproc_t) nfsaclsvc_decode_##argt##args, \
43342 +- (kxdrproc_t) nfsaclsvc_encode_##rest##res, \
43343 +- (kxdrproc_t) nfsaclsvc_release_##relt, \
43344 ++ { nfsacld_proc_##name, \
43345 ++ nfsaclsvc_decode_##argt##args, \
43346 ++ nfsaclsvc_encode_##rest##res, \
43347 ++ nfsaclsvc_release_##relt, \
43348 + sizeof(struct nfsd3_##argt##args), \
43349 + sizeof(struct nfsd3_##rest##res), \
43350 + 0, \
43351 +diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
43352 +index 01df4cd..f11e111 100644
43353 +--- a/fs/nfsd/nfs3acl.c
43354 ++++ b/fs/nfsd/nfs3acl.c
43355 +@@ -26,9 +26,10 @@ nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
43356 + /*
43357 + * Get the Access and/or Default ACL of a file.
43358 + */
43359 +-static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp,
43360 +- struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp)
43361 ++static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
43362 + {
43363 ++ struct nfsd3_getaclargs *argp = _argp;
43364 ++ struct nfsd3_getaclres *resp = _resp;
43365 + struct posix_acl *acl;
43366 + struct inode *inode;
43367 + svc_fh *fh;
43368 +@@ -80,10 +81,10 @@ fail:
43369 + /*
43370 + * Set the Access and/or Default ACL of a file.
43371 + */
43372 +-static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp,
43373 +- struct nfsd3_setaclargs *argp,
43374 +- struct nfsd3_attrstat *resp)
43375 ++static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
43376 + {
43377 ++ struct nfsd3_setaclargs *argp = _argp;
43378 ++ struct nfsd3_attrstat *resp = _resp;
43379 + struct inode *inode;
43380 + svc_fh *fh;
43381 + __be32 nfserr = 0;
43382 +@@ -125,9 +126,10 @@ out:
43383 + /*
43384 + * XDR decode functions
43385 + */
43386 +-static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
43387 +- struct nfsd3_getaclargs *args)
43388 ++static int nfs3svc_decode_getaclargs(void *rqstp, __be32 *p, void *_args)
43389 + {
43390 ++ struct nfsd3_getaclargs *args = _args;
43391 ++
43392 + p = nfs3svc_decode_fh(p, &args->fh);
43393 + if (!p)
43394 + return 0;
43395 +@@ -137,9 +139,10 @@ static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
43396 + }
43397 +
43398 +
43399 +-static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
43400 +- struct nfsd3_setaclargs *args)
43401 ++static int nfs3svc_decode_setaclargs(void *_rqstp, __be32 *p, void *_args)
43402 + {
43403 ++ struct svc_rqst *rqstp = _rqstp;
43404 ++ struct nfsd3_setaclargs *args = _args;
43405 + struct kvec *head = rqstp->rq_arg.head;
43406 + unsigned int base;
43407 + int n;
43408 +@@ -168,9 +171,10 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
43409 + */
43410 +
43411 + /* GETACL */
43412 +-static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
43413 +- struct nfsd3_getaclres *resp)
43414 ++static int nfs3svc_encode_getaclres(void *_rqstp, __be32 *p, void *_resp)
43415 + {
43416 ++ struct svc_rqst *rqstp = _rqstp;
43417 ++ struct nfsd3_getaclres *resp = _resp;
43418 + struct dentry *dentry = resp->fh.fh_dentry;
43419 +
43420 + p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
43421 +@@ -213,9 +217,10 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
43422 + }
43423 +
43424 + /* SETACL */
43425 +-static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p,
43426 +- struct nfsd3_attrstat *resp)
43427 ++static int nfs3svc_encode_setaclres(void *rqstp, __be32 *p, void *_resp)
43428 + {
43429 ++ struct nfsd3_attrstat *resp = _resp;
43430 ++
43431 + p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
43432 +
43433 + return xdr_ressize_check(rqstp, p);
43434 +@@ -224,9 +229,10 @@ static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p,
43435 + /*
43436 + * XDR release functions
43437 + */
43438 +-static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
43439 +- struct nfsd3_getaclres *resp)
43440 ++static int nfs3svc_release_getacl(void *rqstp, __be32 *p, void *_resp)
43441 + {
43442 ++ struct nfsd3_getaclres *resp = _resp;
43443 ++
43444 + fh_put(&resp->fh);
43445 + posix_acl_release(resp->acl_access);
43446 + posix_acl_release(resp->acl_default);
43447 +@@ -240,10 +246,10 @@ static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
43448 + struct nfsd3_voidargs { int dummy; };
43449 +
43450 + #define PROC(name, argt, rest, relt, cache, respsize) \
43451 +- { (svc_procfunc) nfsd3_proc_##name, \
43452 +- (kxdrproc_t) nfs3svc_decode_##argt##args, \
43453 +- (kxdrproc_t) nfs3svc_encode_##rest##res, \
43454 +- (kxdrproc_t) nfs3svc_release_##relt, \
43455 ++ { nfsd3_proc_##name, \
43456 ++ nfs3svc_decode_##argt##args, \
43457 ++ nfs3svc_encode_##rest##res, \
43458 ++ nfs3svc_release_##relt, \
43459 + sizeof(struct nfsd3_##argt##args), \
43460 + sizeof(struct nfsd3_##rest##res), \
43461 + 0, \
43462 +diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
43463 +index 7b755b7..910495b 100644
43464 +--- a/fs/nfsd/nfs3proc.c
43465 ++++ b/fs/nfsd/nfs3proc.c
43466 +@@ -40,9 +40,10 @@ nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
43467 + * Get a file's attributes
43468 + */
43469 + static __be32
43470 +-nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
43471 +- struct nfsd3_attrstat *resp)
43472 ++nfsd3_proc_getattr(struct svc_rqst *rqstp, void *_argp, void *_resp)
43473 + {
43474 ++ struct nfsd_fhandle *argp = _argp;
43475 ++ struct nfsd3_attrstat *resp = _resp;
43476 + __be32 nfserr;
43477 +
43478 + dprintk("nfsd: GETATTR(3) %s\n",
43479 +@@ -63,9 +64,10 @@ nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
43480 + * Set a file's attributes
43481 + */
43482 + static __be32
43483 +-nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp,
43484 +- struct nfsd3_attrstat *resp)
43485 ++nfsd3_proc_setattr(struct svc_rqst *rqstp, void *_argp, void *_resp)
43486 + {
43487 ++ struct nfsd3_sattrargs *argp = _argp;
43488 ++ struct nfsd3_attrstat *resp = _resp;
43489 + __be32 nfserr;
43490 +
43491 + dprintk("nfsd: SETATTR(3) %s\n",
43492 +@@ -81,9 +83,10 @@ nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp,
43493 + * Look up a path name component
43494 + */
43495 + static __be32
43496 +-nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
43497 +- struct nfsd3_diropres *resp)
43498 ++nfsd3_proc_lookup(struct svc_rqst *rqstp, void *_argp, void *_resp)
43499 + {
43500 ++ struct nfsd3_diropargs *argp = _argp;
43501 ++ struct nfsd3_diropres *resp = _resp;
43502 + __be32 nfserr;
43503 +
43504 + dprintk("nfsd: LOOKUP(3) %s %.*s\n",
43505 +@@ -105,9 +108,10 @@ nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
43506 + * Check file access
43507 + */
43508 + static __be32
43509 +-nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
43510 +- struct nfsd3_accessres *resp)
43511 ++nfsd3_proc_access(struct svc_rqst *rqstp, void *_argp, void *_resp)
43512 + {
43513 ++ struct nfsd3_accessargs *argp = _argp;
43514 ++ struct nfsd3_accessres *resp = _resp;
43515 + __be32 nfserr;
43516 +
43517 + dprintk("nfsd: ACCESS(3) %s 0x%x\n",
43518 +@@ -124,9 +128,10 @@ nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
43519 + * Read a symlink.
43520 + */
43521 + static __be32
43522 +-nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp,
43523 +- struct nfsd3_readlinkres *resp)
43524 ++nfsd3_proc_readlink(struct svc_rqst *rqstp, void *_argp, void *_resp)
43525 + {
43526 ++ struct nfsd3_readlinkargs *argp = _argp;
43527 ++ struct nfsd3_readlinkres *resp = _resp;
43528 + __be32 nfserr;
43529 +
43530 + dprintk("nfsd: READLINK(3) %s\n", SVCFH_fmt(&argp->fh));
43531 +@@ -142,9 +147,10 @@ nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp,
43532 + * Read a portion of a file.
43533 + */
43534 + static __be32
43535 +-nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
43536 +- struct nfsd3_readres *resp)
43537 ++nfsd3_proc_read(struct svc_rqst *rqstp, void *_argp, void *_resp)
43538 + {
43539 ++ struct nfsd3_readargs *argp = _argp;
43540 ++ struct nfsd3_readres *resp = _resp;
43541 + __be32 nfserr;
43542 + u32 max_blocksize = svc_max_payload(rqstp);
43543 +
43544 +@@ -178,9 +184,10 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
43545 + * Write data to a file
43546 + */
43547 + static __be32
43548 +-nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
43549 +- struct nfsd3_writeres *resp)
43550 ++nfsd3_proc_write(struct svc_rqst *rqstp, void *_argp, void *_resp)
43551 + {
43552 ++ struct nfsd3_writeargs *argp = _argp;
43553 ++ struct nfsd3_writeres *resp = _resp;
43554 + __be32 nfserr;
43555 + unsigned long cnt = argp->len;
43556 +
43557 +@@ -207,9 +214,10 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
43558 + * first reports about SunOS compatibility problems start to pour in...
43559 + */
43560 + static __be32
43561 +-nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
43562 +- struct nfsd3_diropres *resp)
43563 ++nfsd3_proc_create(struct svc_rqst *rqstp, void *_argp, void *_resp)
43564 + {
43565 ++ struct nfsd3_createargs *argp = _argp;
43566 ++ struct nfsd3_diropres *resp = _resp;
43567 + svc_fh *dirfhp, *newfhp = NULL;
43568 + struct iattr *attr;
43569 + __be32 nfserr;
43570 +@@ -244,9 +252,10 @@ nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
43571 + * Make directory. This operation is not idempotent.
43572 + */
43573 + static __be32
43574 +-nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
43575 +- struct nfsd3_diropres *resp)
43576 ++nfsd3_proc_mkdir(struct svc_rqst *rqstp, void *_argp, void *_resp)
43577 + {
43578 ++ struct nfsd3_createargs *argp = _argp;
43579 ++ struct nfsd3_diropres *resp = _resp;
43580 + __be32 nfserr;
43581 +
43582 + dprintk("nfsd: MKDIR(3) %s %.*s\n",
43583 +@@ -264,9 +273,10 @@ nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
43584 + }
43585 +
43586 + static __be32
43587 +-nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp,
43588 +- struct nfsd3_diropres *resp)
43589 ++nfsd3_proc_symlink(struct svc_rqst *rqstp, void *_argp, void *_resp)
43590 + {
43591 ++ struct nfsd3_symlinkargs *argp = _argp;
43592 ++ struct nfsd3_diropres *resp = _resp;
43593 + __be32 nfserr;
43594 +
43595 + dprintk("nfsd: SYMLINK(3) %s %.*s -> %.*s\n",
43596 +@@ -285,9 +295,10 @@ nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp,
43597 + * Make socket/fifo/device.
43598 + */
43599 + static __be32
43600 +-nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
43601 +- struct nfsd3_diropres *resp)
43602 ++nfsd3_proc_mknod(struct svc_rqst *rqstp, void *_argp, void *_resp)
43603 + {
43604 ++ struct nfsd3_mknodargs *argp = _argp;
43605 ++ struct nfsd3_diropres *resp = _resp;
43606 + __be32 nfserr;
43607 + int type;
43608 + dev_t rdev = 0;
43609 +@@ -322,9 +333,10 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
43610 + * Remove file/fifo/socket etc.
43611 + */
43612 + static __be32
43613 +-nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
43614 +- struct nfsd3_attrstat *resp)
43615 ++nfsd3_proc_remove(struct svc_rqst *rqstp, void *_argp, void *_resp)
43616 + {
43617 ++ struct nfsd3_diropargs *argp = _argp;
43618 ++ struct nfsd3_attrstat *resp = _resp;
43619 + __be32 nfserr;
43620 +
43621 + dprintk("nfsd: REMOVE(3) %s %.*s\n",
43622 +@@ -343,9 +355,10 @@ nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
43623 + * Remove a directory
43624 + */
43625 + static __be32
43626 +-nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
43627 +- struct nfsd3_attrstat *resp)
43628 ++nfsd3_proc_rmdir(struct svc_rqst *rqstp, void *_argp, void *_resp)
43629 + {
43630 ++ struct nfsd3_diropargs *argp = _argp;
43631 ++ struct nfsd3_attrstat *resp = _resp;
43632 + __be32 nfserr;
43633 +
43634 + dprintk("nfsd: RMDIR(3) %s %.*s\n",
43635 +@@ -360,9 +373,10 @@ nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
43636 + }
43637 +
43638 + static __be32
43639 +-nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp,
43640 +- struct nfsd3_renameres *resp)
43641 ++nfsd3_proc_rename(struct svc_rqst *rqstp, void *_argp, void *_resp)
43642 + {
43643 ++ struct nfsd3_renameargs *argp = _argp;
43644 ++ struct nfsd3_renameres *resp = _resp;
43645 + __be32 nfserr;
43646 +
43647 + dprintk("nfsd: RENAME(3) %s %.*s ->\n",
43648 +@@ -382,9 +396,10 @@ nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp,
43649 + }
43650 +
43651 + static __be32
43652 +-nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp,
43653 +- struct nfsd3_linkres *resp)
43654 ++nfsd3_proc_link(struct svc_rqst *rqstp, void *_argp, void *_resp)
43655 + {
43656 ++ struct nfsd3_linkargs *argp = _argp;
43657 ++ struct nfsd3_linkres *resp = _resp;
43658 + __be32 nfserr;
43659 +
43660 + dprintk("nfsd: LINK(3) %s ->\n",
43661 +@@ -405,9 +420,10 @@ nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp,
43662 + * Read a portion of a directory.
43663 + */
43664 + static __be32
43665 +-nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
43666 +- struct nfsd3_readdirres *resp)
43667 ++nfsd3_proc_readdir(struct svc_rqst *rqstp, void *_argp, void *_resp)
43668 + {
43669 ++ struct nfsd3_readdirargs *argp = _argp;
43670 ++ struct nfsd3_readdirres *resp = _resp;
43671 + __be32 nfserr;
43672 + int count;
43673 +
43674 +@@ -441,9 +457,10 @@ nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
43675 + * For now, we choose to ignore the dircount parameter.
43676 + */
43677 + static __be32
43678 +-nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
43679 +- struct nfsd3_readdirres *resp)
43680 ++nfsd3_proc_readdirplus(struct svc_rqst *rqstp, void *_argp, void *_resp)
43681 + {
43682 ++ struct nfsd3_readdirargs *argp = _argp;
43683 ++ struct nfsd3_readdirres *resp = _resp;
43684 + __be32 nfserr;
43685 + int count = 0;
43686 + loff_t offset;
43687 +@@ -508,9 +525,10 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
43688 + * Get file system stats
43689 + */
43690 + static __be32
43691 +-nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
43692 +- struct nfsd3_fsstatres *resp)
43693 ++nfsd3_proc_fsstat(struct svc_rqst * rqstp, void *_argp, void *_resp)
43694 + {
43695 ++ struct nfsd_fhandle *argp = _argp;
43696 ++ struct nfsd3_fsstatres *resp = _resp;
43697 + __be32 nfserr;
43698 +
43699 + dprintk("nfsd: FSSTAT(3) %s\n",
43700 +@@ -525,9 +543,10 @@ nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
43701 + * Get file system info
43702 + */
43703 + static __be32
43704 +-nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
43705 +- struct nfsd3_fsinfores *resp)
43706 ++nfsd3_proc_fsinfo(struct svc_rqst * rqstp, void *_argp, void *_resp)
43707 + {
43708 ++ struct nfsd_fhandle *argp = _argp;
43709 ++ struct nfsd3_fsinfores *resp = _resp;
43710 + __be32 nfserr;
43711 + u32 max_blocksize = svc_max_payload(rqstp);
43712 +
43713 +@@ -568,9 +587,10 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
43714 + * Get pathconf info for the specified file
43715 + */
43716 + static __be32
43717 +-nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
43718 +- struct nfsd3_pathconfres *resp)
43719 ++nfsd3_proc_pathconf(struct svc_rqst * rqstp, void *_argp, void *_resp)
43720 + {
43721 ++ struct nfsd_fhandle *argp = _argp;
43722 ++ struct nfsd3_pathconfres *resp = _resp;
43723 + __be32 nfserr;
43724 +
43725 + dprintk("nfsd: PATHCONF(3) %s\n",
43726 +@@ -611,9 +631,10 @@ nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
43727 + * Commit a file (range) to stable storage.
43728 + */
43729 + static __be32
43730 +-nfsd3_proc_commit(struct svc_rqst * rqstp, struct nfsd3_commitargs *argp,
43731 +- struct nfsd3_commitres *resp)
43732 ++nfsd3_proc_commit(struct svc_rqst * rqstp, void *_argp, void *_resp)
43733 + {
43734 ++ struct nfsd3_commitargs *argp = _argp;
43735 ++ struct nfsd3_commitres *resp = _resp;
43736 + __be32 nfserr;
43737 +
43738 + dprintk("nfsd: COMMIT(3) %s %u@%Lu\n",
43739 +@@ -668,213 +689,213 @@ struct nfsd3_voidargs { int dummy; };
43740 +
43741 + static struct svc_procedure nfsd_procedures3[22] = {
43742 + [NFS3PROC_NULL] = {
43743 +- .pc_func = (svc_procfunc) nfsd3_proc_null,
43744 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_voidres,
43745 ++ .pc_func = nfsd3_proc_null,
43746 ++ .pc_encode = nfs3svc_encode_voidres,
43747 + .pc_argsize = sizeof(struct nfsd3_voidargs),
43748 + .pc_ressize = sizeof(struct nfsd3_voidres),
43749 + .pc_cachetype = RC_NOCACHE,
43750 + .pc_xdrressize = ST,
43751 + },
43752 + [NFS3PROC_GETATTR] = {
43753 +- .pc_func = (svc_procfunc) nfsd3_proc_getattr,
43754 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
43755 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_attrstatres,
43756 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43757 ++ .pc_func = nfsd3_proc_getattr,
43758 ++ .pc_decode = nfs3svc_decode_fhandleargs,
43759 ++ .pc_encode = nfs3svc_encode_attrstatres,
43760 ++ .pc_release = nfs3svc_release_fhandle,
43761 + .pc_argsize = sizeof(struct nfsd3_fhandleargs),
43762 + .pc_ressize = sizeof(struct nfsd3_attrstatres),
43763 + .pc_cachetype = RC_NOCACHE,
43764 + .pc_xdrressize = ST+AT,
43765 + },
43766 + [NFS3PROC_SETATTR] = {
43767 +- .pc_func = (svc_procfunc) nfsd3_proc_setattr,
43768 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_sattrargs,
43769 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_wccstatres,
43770 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43771 ++ .pc_func = nfsd3_proc_setattr,
43772 ++ .pc_decode = nfs3svc_decode_sattrargs,
43773 ++ .pc_encode = nfs3svc_encode_wccstatres,
43774 ++ .pc_release = nfs3svc_release_fhandle,
43775 + .pc_argsize = sizeof(struct nfsd3_sattrargs),
43776 + .pc_ressize = sizeof(struct nfsd3_wccstatres),
43777 + .pc_cachetype = RC_REPLBUFF,
43778 + .pc_xdrressize = ST+WC,
43779 + },
43780 + [NFS3PROC_LOOKUP] = {
43781 +- .pc_func = (svc_procfunc) nfsd3_proc_lookup,
43782 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_diropargs,
43783 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_diropres,
43784 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43785 ++ .pc_func = nfsd3_proc_lookup,
43786 ++ .pc_decode = nfs3svc_decode_diropargs,
43787 ++ .pc_encode = nfs3svc_encode_diropres,
43788 ++ .pc_release = nfs3svc_release_fhandle2,
43789 + .pc_argsize = sizeof(struct nfsd3_diropargs),
43790 + .pc_ressize = sizeof(struct nfsd3_diropres),
43791 + .pc_cachetype = RC_NOCACHE,
43792 + .pc_xdrressize = ST+FH+pAT+pAT,
43793 + },
43794 + [NFS3PROC_ACCESS] = {
43795 +- .pc_func = (svc_procfunc) nfsd3_proc_access,
43796 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_accessargs,
43797 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_accessres,
43798 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43799 ++ .pc_func = nfsd3_proc_access,
43800 ++ .pc_decode = nfs3svc_decode_accessargs,
43801 ++ .pc_encode = nfs3svc_encode_accessres,
43802 ++ .pc_release = nfs3svc_release_fhandle,
43803 + .pc_argsize = sizeof(struct nfsd3_accessargs),
43804 + .pc_ressize = sizeof(struct nfsd3_accessres),
43805 + .pc_cachetype = RC_NOCACHE,
43806 + .pc_xdrressize = ST+pAT+1,
43807 + },
43808 + [NFS3PROC_READLINK] = {
43809 +- .pc_func = (svc_procfunc) nfsd3_proc_readlink,
43810 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_readlinkargs,
43811 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_readlinkres,
43812 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43813 ++ .pc_func = nfsd3_proc_readlink,
43814 ++ .pc_decode = nfs3svc_decode_readlinkargs,
43815 ++ .pc_encode = nfs3svc_encode_readlinkres,
43816 ++ .pc_release = nfs3svc_release_fhandle,
43817 + .pc_argsize = sizeof(struct nfsd3_readlinkargs),
43818 + .pc_ressize = sizeof(struct nfsd3_readlinkres),
43819 + .pc_cachetype = RC_NOCACHE,
43820 + .pc_xdrressize = ST+pAT+1+NFS3_MAXPATHLEN/4,
43821 + },
43822 + [NFS3PROC_READ] = {
43823 +- .pc_func = (svc_procfunc) nfsd3_proc_read,
43824 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_readargs,
43825 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_readres,
43826 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43827 ++ .pc_func = nfsd3_proc_read,
43828 ++ .pc_decode = nfs3svc_decode_readargs,
43829 ++ .pc_encode = nfs3svc_encode_readres,
43830 ++ .pc_release = nfs3svc_release_fhandle,
43831 + .pc_argsize = sizeof(struct nfsd3_readargs),
43832 + .pc_ressize = sizeof(struct nfsd3_readres),
43833 + .pc_cachetype = RC_NOCACHE,
43834 + .pc_xdrressize = ST+pAT+4+NFSSVC_MAXBLKSIZE/4,
43835 + },
43836 + [NFS3PROC_WRITE] = {
43837 +- .pc_func = (svc_procfunc) nfsd3_proc_write,
43838 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_writeargs,
43839 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_writeres,
43840 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43841 ++ .pc_func = nfsd3_proc_write,
43842 ++ .pc_decode = nfs3svc_decode_writeargs,
43843 ++ .pc_encode = nfs3svc_encode_writeres,
43844 ++ .pc_release = nfs3svc_release_fhandle,
43845 + .pc_argsize = sizeof(struct nfsd3_writeargs),
43846 + .pc_ressize = sizeof(struct nfsd3_writeres),
43847 + .pc_cachetype = RC_REPLBUFF,
43848 + .pc_xdrressize = ST+WC+4,
43849 + },
43850 + [NFS3PROC_CREATE] = {
43851 +- .pc_func = (svc_procfunc) nfsd3_proc_create,
43852 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_createargs,
43853 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
43854 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43855 ++ .pc_func = nfsd3_proc_create,
43856 ++ .pc_decode = nfs3svc_decode_createargs,
43857 ++ .pc_encode = nfs3svc_encode_createres,
43858 ++ .pc_release = nfs3svc_release_fhandle2,
43859 + .pc_argsize = sizeof(struct nfsd3_createargs),
43860 + .pc_ressize = sizeof(struct nfsd3_createres),
43861 + .pc_cachetype = RC_REPLBUFF,
43862 + .pc_xdrressize = ST+(1+FH+pAT)+WC,
43863 + },
43864 + [NFS3PROC_MKDIR] = {
43865 +- .pc_func = (svc_procfunc) nfsd3_proc_mkdir,
43866 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_mkdirargs,
43867 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
43868 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43869 ++ .pc_func = nfsd3_proc_mkdir,
43870 ++ .pc_decode = nfs3svc_decode_mkdirargs,
43871 ++ .pc_encode = nfs3svc_encode_createres,
43872 ++ .pc_release = nfs3svc_release_fhandle2,
43873 + .pc_argsize = sizeof(struct nfsd3_mkdirargs),
43874 + .pc_ressize = sizeof(struct nfsd3_createres),
43875 + .pc_cachetype = RC_REPLBUFF,
43876 + .pc_xdrressize = ST+(1+FH+pAT)+WC,
43877 + },
43878 + [NFS3PROC_SYMLINK] = {
43879 +- .pc_func = (svc_procfunc) nfsd3_proc_symlink,
43880 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_symlinkargs,
43881 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
43882 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43883 ++ .pc_func = nfsd3_proc_symlink,
43884 ++ .pc_decode = nfs3svc_decode_symlinkargs,
43885 ++ .pc_encode = nfs3svc_encode_createres,
43886 ++ .pc_release = nfs3svc_release_fhandle2,
43887 + .pc_argsize = sizeof(struct nfsd3_symlinkargs),
43888 + .pc_ressize = sizeof(struct nfsd3_createres),
43889 + .pc_cachetype = RC_REPLBUFF,
43890 + .pc_xdrressize = ST+(1+FH+pAT)+WC,
43891 + },
43892 + [NFS3PROC_MKNOD] = {
43893 +- .pc_func = (svc_procfunc) nfsd3_proc_mknod,
43894 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_mknodargs,
43895 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
43896 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43897 ++ .pc_func = nfsd3_proc_mknod,
43898 ++ .pc_decode = nfs3svc_decode_mknodargs,
43899 ++ .pc_encode = nfs3svc_encode_createres,
43900 ++ .pc_release = nfs3svc_release_fhandle2,
43901 + .pc_argsize = sizeof(struct nfsd3_mknodargs),
43902 + .pc_ressize = sizeof(struct nfsd3_createres),
43903 + .pc_cachetype = RC_REPLBUFF,
43904 + .pc_xdrressize = ST+(1+FH+pAT)+WC,
43905 + },
43906 + [NFS3PROC_REMOVE] = {
43907 +- .pc_func = (svc_procfunc) nfsd3_proc_remove,
43908 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_diropargs,
43909 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_wccstatres,
43910 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43911 ++ .pc_func = nfsd3_proc_remove,
43912 ++ .pc_decode = nfs3svc_decode_diropargs,
43913 ++ .pc_encode = nfs3svc_encode_wccstatres,
43914 ++ .pc_release = nfs3svc_release_fhandle,
43915 + .pc_argsize = sizeof(struct nfsd3_diropargs),
43916 + .pc_ressize = sizeof(struct nfsd3_wccstatres),
43917 + .pc_cachetype = RC_REPLBUFF,
43918 + .pc_xdrressize = ST+WC,
43919 + },
43920 + [NFS3PROC_RMDIR] = {
43921 +- .pc_func = (svc_procfunc) nfsd3_proc_rmdir,
43922 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_diropargs,
43923 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_wccstatres,
43924 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43925 ++ .pc_func = nfsd3_proc_rmdir,
43926 ++ .pc_decode = nfs3svc_decode_diropargs,
43927 ++ .pc_encode = nfs3svc_encode_wccstatres,
43928 ++ .pc_release = nfs3svc_release_fhandle,
43929 + .pc_argsize = sizeof(struct nfsd3_diropargs),
43930 + .pc_ressize = sizeof(struct nfsd3_wccstatres),
43931 + .pc_cachetype = RC_REPLBUFF,
43932 + .pc_xdrressize = ST+WC,
43933 + },
43934 + [NFS3PROC_RENAME] = {
43935 +- .pc_func = (svc_procfunc) nfsd3_proc_rename,
43936 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_renameargs,
43937 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_renameres,
43938 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43939 ++ .pc_func = nfsd3_proc_rename,
43940 ++ .pc_decode = nfs3svc_decode_renameargs,
43941 ++ .pc_encode = nfs3svc_encode_renameres,
43942 ++ .pc_release = nfs3svc_release_fhandle2,
43943 + .pc_argsize = sizeof(struct nfsd3_renameargs),
43944 + .pc_ressize = sizeof(struct nfsd3_renameres),
43945 + .pc_cachetype = RC_REPLBUFF,
43946 + .pc_xdrressize = ST+WC+WC,
43947 + },
43948 + [NFS3PROC_LINK] = {
43949 +- .pc_func = (svc_procfunc) nfsd3_proc_link,
43950 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_linkargs,
43951 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_linkres,
43952 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
43953 ++ .pc_func = nfsd3_proc_link,
43954 ++ .pc_decode = nfs3svc_decode_linkargs,
43955 ++ .pc_encode = nfs3svc_encode_linkres,
43956 ++ .pc_release = nfs3svc_release_fhandle2,
43957 + .pc_argsize = sizeof(struct nfsd3_linkargs),
43958 + .pc_ressize = sizeof(struct nfsd3_linkres),
43959 + .pc_cachetype = RC_REPLBUFF,
43960 + .pc_xdrressize = ST+pAT+WC,
43961 + },
43962 + [NFS3PROC_READDIR] = {
43963 +- .pc_func = (svc_procfunc) nfsd3_proc_readdir,
43964 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_readdirargs,
43965 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_readdirres,
43966 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43967 ++ .pc_func = nfsd3_proc_readdir,
43968 ++ .pc_decode = nfs3svc_decode_readdirargs,
43969 ++ .pc_encode = nfs3svc_encode_readdirres,
43970 ++ .pc_release = nfs3svc_release_fhandle,
43971 + .pc_argsize = sizeof(struct nfsd3_readdirargs),
43972 + .pc_ressize = sizeof(struct nfsd3_readdirres),
43973 + .pc_cachetype = RC_NOCACHE,
43974 + },
43975 + [NFS3PROC_READDIRPLUS] = {
43976 +- .pc_func = (svc_procfunc) nfsd3_proc_readdirplus,
43977 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_readdirplusargs,
43978 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_readdirres,
43979 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
43980 ++ .pc_func = nfsd3_proc_readdirplus,
43981 ++ .pc_decode = nfs3svc_decode_readdirplusargs,
43982 ++ .pc_encode = nfs3svc_encode_readdirres,
43983 ++ .pc_release = nfs3svc_release_fhandle,
43984 + .pc_argsize = sizeof(struct nfsd3_readdirplusargs),
43985 + .pc_ressize = sizeof(struct nfsd3_readdirres),
43986 + .pc_cachetype = RC_NOCACHE,
43987 + },
43988 + [NFS3PROC_FSSTAT] = {
43989 +- .pc_func = (svc_procfunc) nfsd3_proc_fsstat,
43990 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
43991 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_fsstatres,
43992 ++ .pc_func = nfsd3_proc_fsstat,
43993 ++ .pc_decode = nfs3svc_decode_fhandleargs,
43994 ++ .pc_encode = nfs3svc_encode_fsstatres,
43995 + .pc_argsize = sizeof(struct nfsd3_fhandleargs),
43996 + .pc_ressize = sizeof(struct nfsd3_fsstatres),
43997 + .pc_cachetype = RC_NOCACHE,
43998 + .pc_xdrressize = ST+pAT+2*6+1,
43999 + },
44000 + [NFS3PROC_FSINFO] = {
44001 +- .pc_func = (svc_procfunc) nfsd3_proc_fsinfo,
44002 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
44003 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_fsinfores,
44004 ++ .pc_func = nfsd3_proc_fsinfo,
44005 ++ .pc_decode = nfs3svc_decode_fhandleargs,
44006 ++ .pc_encode = nfs3svc_encode_fsinfores,
44007 + .pc_argsize = sizeof(struct nfsd3_fhandleargs),
44008 + .pc_ressize = sizeof(struct nfsd3_fsinfores),
44009 + .pc_cachetype = RC_NOCACHE,
44010 + .pc_xdrressize = ST+pAT+12,
44011 + },
44012 + [NFS3PROC_PATHCONF] = {
44013 +- .pc_func = (svc_procfunc) nfsd3_proc_pathconf,
44014 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
44015 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_pathconfres,
44016 ++ .pc_func = nfsd3_proc_pathconf,
44017 ++ .pc_decode = nfs3svc_decode_fhandleargs,
44018 ++ .pc_encode = nfs3svc_encode_pathconfres,
44019 + .pc_argsize = sizeof(struct nfsd3_fhandleargs),
44020 + .pc_ressize = sizeof(struct nfsd3_pathconfres),
44021 + .pc_cachetype = RC_NOCACHE,
44022 + .pc_xdrressize = ST+pAT+6,
44023 + },
44024 + [NFS3PROC_COMMIT] = {
44025 +- .pc_func = (svc_procfunc) nfsd3_proc_commit,
44026 +- .pc_decode = (kxdrproc_t) nfs3svc_decode_commitargs,
44027 +- .pc_encode = (kxdrproc_t) nfs3svc_encode_commitres,
44028 +- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
44029 ++ .pc_func = nfsd3_proc_commit,
44030 ++ .pc_decode = nfs3svc_decode_commitargs,
44031 ++ .pc_encode = nfs3svc_encode_commitres,
44032 ++ .pc_release = nfs3svc_release_fhandle,
44033 + .pc_argsize = sizeof(struct nfsd3_commitargs),
44034 + .pc_ressize = sizeof(struct nfsd3_commitres),
44035 + .pc_cachetype = RC_NOCACHE,
44036 +diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
44037 +index 2246454..b866de8 100644
44038 +--- a/fs/nfsd/nfs3xdr.c
44039 ++++ b/fs/nfsd/nfs3xdr.c
44040 +@@ -273,8 +273,10 @@ void fill_post_wcc(struct svc_fh *fhp)
44041 + * XDR decode functions
44042 + */
44043 + int
44044 +-nfs3svc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *args)
44045 ++nfs3svc_decode_fhandle(void *rqstp, __be32 *p, void *_args)
44046 + {
44047 ++ struct nfsd_fhandle *args = _args;
44048 ++
44049 + p = decode_fh(p, &args->fh);
44050 + if (!p)
44051 + return 0;
44052 +@@ -282,9 +284,10 @@ nfs3svc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *a
44053 + }
44054 +
44055 + int
44056 +-nfs3svc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
44057 +- struct nfsd3_sattrargs *args)
44058 ++nfs3svc_decode_sattrargs(void *rqstp, __be32 *p, void *_args)
44059 + {
44060 ++ struct nfsd3_sattrargs *args = _args;
44061 ++
44062 + p = decode_fh(p, &args->fh);
44063 + if (!p)
44064 + return 0;
44065 +@@ -300,9 +303,10 @@ nfs3svc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
44066 + }
44067 +
44068 + int
44069 +-nfs3svc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
44070 +- struct nfsd3_diropargs *args)
44071 ++nfs3svc_decode_diropargs(void *rqstp, __be32 *p, void *_args)
44072 + {
44073 ++ struct nfsd3_diropargs *args = _args;
44074 ++
44075 + if (!(p = decode_fh(p, &args->fh))
44076 + || !(p = decode_filename(p, &args->name, &args->len)))
44077 + return 0;
44078 +@@ -311,9 +315,10 @@ nfs3svc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
44079 + }
44080 +
44081 + int
44082 +-nfs3svc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
44083 +- struct nfsd3_accessargs *args)
44084 ++nfs3svc_decode_accessargs(void *rqstp, __be32 *p, void *_args)
44085 + {
44086 ++ struct nfsd3_accessargs *args = _args;
44087 ++
44088 + p = decode_fh(p, &args->fh);
44089 + if (!p)
44090 + return 0;
44091 +@@ -323,9 +328,10 @@ nfs3svc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
44092 + }
44093 +
44094 + int
44095 +-nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
44096 +- struct nfsd3_readargs *args)
44097 ++nfs3svc_decode_readargs(void *_rqstp, __be32 *p, void *_args)
44098 + {
44099 ++ struct svc_rqst *rqstp = _rqstp;
44100 ++ struct nfsd3_readargs *args = _args;
44101 + unsigned int len;
44102 + int v;
44103 + u32 max_blocksize = svc_max_payload(rqstp);
44104 +@@ -353,9 +359,10 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
44105 + }
44106 +
44107 + int
44108 +-nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
44109 +- struct nfsd3_writeargs *args)
44110 ++nfs3svc_decode_writeargs(void *_rqstp, __be32 *p, void *_args)
44111 + {
44112 ++ struct svc_rqst *rqstp = _rqstp;
44113 ++ struct nfsd3_writeargs *args = _args;
44114 + unsigned int len, v, hdr, dlen;
44115 + u32 max_blocksize = svc_max_payload(rqstp);
44116 +
44117 +@@ -410,9 +417,11 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
44118 + }
44119 +
44120 + int
44121 +-nfs3svc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
44122 +- struct nfsd3_createargs *args)
44123 ++nfs3svc_decode_createargs(void *_rqstp, __be32 *p, void *_args)
44124 + {
44125 ++ struct svc_rqst *rqstp = _rqstp;
44126 ++ struct nfsd3_createargs *args = _args;
44127 ++
44128 + if (!(p = decode_fh(p, &args->fh))
44129 + || !(p = decode_filename(p, &args->name, &args->len)))
44130 + return 0;
44131 +@@ -433,9 +442,10 @@ nfs3svc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
44132 + return xdr_argsize_check(rqstp, p);
44133 + }
44134 + int
44135 +-nfs3svc_decode_mkdirargs(struct svc_rqst *rqstp, __be32 *p,
44136 +- struct nfsd3_createargs *args)
44137 ++nfs3svc_decode_mkdirargs(void *rqstp, __be32 *p, void *_args)
44138 + {
44139 ++ struct nfsd3_createargs *args = _args;
44140 ++
44141 + if (!(p = decode_fh(p, &args->fh)) ||
44142 + !(p = decode_filename(p, &args->name, &args->len)))
44143 + return 0;
44144 +@@ -445,9 +455,10 @@ nfs3svc_decode_mkdirargs(struct svc_rqst *rqstp, __be32 *p,
44145 + }
44146 +
44147 + int
44148 +-nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
44149 +- struct nfsd3_symlinkargs *args)
44150 ++nfs3svc_decode_symlinkargs(void *_rqstp, __be32 *p, void *_args)
44151 + {
44152 ++ struct svc_rqst *rqstp = _rqstp;
44153 ++ struct nfsd3_symlinkargs *args = _args;
44154 + unsigned int len, avail;
44155 + char *old, *new;
44156 + struct kvec *vec;
44157 +@@ -495,9 +506,10 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
44158 + }
44159 +
44160 + int
44161 +-nfs3svc_decode_mknodargs(struct svc_rqst *rqstp, __be32 *p,
44162 +- struct nfsd3_mknodargs *args)
44163 ++nfs3svc_decode_mknodargs(void *rqstp, __be32 *p, void *_args)
44164 + {
44165 ++ struct nfsd3_mknodargs *args = _args;
44166 ++
44167 + if (!(p = decode_fh(p, &args->fh))
44168 + || !(p = decode_filename(p, &args->name, &args->len)))
44169 + return 0;
44170 +@@ -517,9 +529,10 @@ nfs3svc_decode_mknodargs(struct svc_rqst *rqstp, __be32 *p,
44171 + }
44172 +
44173 + int
44174 +-nfs3svc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
44175 +- struct nfsd3_renameargs *args)
44176 ++nfs3svc_decode_renameargs(void *rqstp, __be32 *p, void *_args)
44177 + {
44178 ++ struct nfsd3_renameargs *args = _args;
44179 ++
44180 + if (!(p = decode_fh(p, &args->ffh))
44181 + || !(p = decode_filename(p, &args->fname, &args->flen))
44182 + || !(p = decode_fh(p, &args->tfh))
44183 +@@ -530,9 +543,11 @@ nfs3svc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
44184 + }
44185 +
44186 + int
44187 +-nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
44188 +- struct nfsd3_readlinkargs *args)
44189 ++nfs3svc_decode_readlinkargs(void *_rqstp, __be32 *p, void *_args)
44190 + {
44191 ++ struct svc_rqst *rqstp = _rqstp;
44192 ++ struct nfsd3_readlinkargs *args = _args;
44193 ++
44194 + p = decode_fh(p, &args->fh);
44195 + if (!p)
44196 + return 0;
44197 +@@ -542,9 +557,10 @@ nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
44198 + }
44199 +
44200 + int
44201 +-nfs3svc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
44202 +- struct nfsd3_linkargs *args)
44203 ++nfs3svc_decode_linkargs(void *rqstp, __be32 *p, void *_args)
44204 + {
44205 ++ struct nfsd3_linkargs *args = _args;
44206 ++
44207 + if (!(p = decode_fh(p, &args->ffh))
44208 + || !(p = decode_fh(p, &args->tfh))
44209 + || !(p = decode_filename(p, &args->tname, &args->tlen)))
44210 +@@ -554,9 +570,11 @@ nfs3svc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
44211 + }
44212 +
44213 + int
44214 +-nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
44215 +- struct nfsd3_readdirargs *args)
44216 ++nfs3svc_decode_readdirargs(void *_rqstp, __be32 *p, void *_args)
44217 + {
44218 ++ struct svc_rqst *rqstp = _rqstp;
44219 ++ struct nfsd3_readdirargs *args = _args;
44220 ++
44221 + p = decode_fh(p, &args->fh);
44222 + if (!p)
44223 + return 0;
44224 +@@ -571,9 +589,10 @@ nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
44225 + }
44226 +
44227 + int
44228 +-nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
44229 +- struct nfsd3_readdirargs *args)
44230 ++nfs3svc_decode_readdirplusargs(void *_rqstp, __be32 *p, void *_args)
44231 + {
44232 ++ struct svc_rqst *rqstp = _rqstp;
44233 ++ struct nfsd3_readdirargs *args = _args;
44234 + int len;
44235 + u32 max_blocksize = svc_max_payload(rqstp);
44236 +
44237 +@@ -597,9 +616,10 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
44238 + }
44239 +
44240 + int
44241 +-nfs3svc_decode_commitargs(struct svc_rqst *rqstp, __be32 *p,
44242 +- struct nfsd3_commitargs *args)
44243 ++nfs3svc_decode_commitargs(void *rqstp, __be32 *p, void *_args)
44244 + {
44245 ++ struct nfsd3_commitargs *args = _args;
44246 ++
44247 + p = decode_fh(p, &args->fh);
44248 + if (!p)
44249 + return 0;
44250 +@@ -617,16 +637,17 @@ nfs3svc_decode_commitargs(struct svc_rqst *rqstp, __be32 *p,
44251 + * will work properly.
44252 + */
44253 + int
44254 +-nfs3svc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
44255 ++nfs3svc_encode_voidres(void *rqstp, __be32 *p, void *dummy)
44256 + {
44257 + return xdr_ressize_check(rqstp, p);
44258 + }
44259 +
44260 + /* GETATTR */
44261 + int
44262 +-nfs3svc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
44263 +- struct nfsd3_attrstat *resp)
44264 ++nfs3svc_encode_attrstat(void *rqstp, __be32 *p, void *_resp)
44265 + {
44266 ++ struct nfsd3_attrstat *resp = _resp;
44267 ++
44268 + if (resp->status == 0) {
44269 + lease_get_mtime(d_inode(resp->fh.fh_dentry),
44270 + &resp->stat.mtime);
44271 +@@ -637,18 +658,20 @@ nfs3svc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
44272 +
44273 + /* SETATTR, REMOVE, RMDIR */
44274 + int
44275 +-nfs3svc_encode_wccstat(struct svc_rqst *rqstp, __be32 *p,
44276 +- struct nfsd3_attrstat *resp)
44277 ++nfs3svc_encode_wccstat(void *rqstp, __be32 *p, void *_resp)
44278 + {
44279 ++ struct nfsd3_attrstat *resp = _resp;
44280 ++
44281 + p = encode_wcc_data(rqstp, p, &resp->fh);
44282 + return xdr_ressize_check(rqstp, p);
44283 + }
44284 +
44285 + /* LOOKUP */
44286 + int
44287 +-nfs3svc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
44288 +- struct nfsd3_diropres *resp)
44289 ++nfs3svc_encode_diropres(void *rqstp, __be32 *p, void *_resp)
44290 + {
44291 ++ struct nfsd3_diropres *resp = _resp;
44292 ++
44293 + if (resp->status == 0) {
44294 + p = encode_fh(p, &resp->fh);
44295 + p = encode_post_op_attr(rqstp, p, &resp->fh);
44296 +@@ -659,9 +682,10 @@ nfs3svc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
44297 +
44298 + /* ACCESS */
44299 + int
44300 +-nfs3svc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
44301 +- struct nfsd3_accessres *resp)
44302 ++nfs3svc_encode_accessres(void *rqstp, __be32 *p, void *_resp)
44303 + {
44304 ++ struct nfsd3_accessres *resp = _resp;
44305 ++
44306 + p = encode_post_op_attr(rqstp, p, &resp->fh);
44307 + if (resp->status == 0)
44308 + *p++ = htonl(resp->access);
44309 +@@ -670,9 +694,11 @@ nfs3svc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
44310 +
44311 + /* READLINK */
44312 + int
44313 +-nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
44314 +- struct nfsd3_readlinkres *resp)
44315 ++nfs3svc_encode_readlinkres(void *_rqstp, __be32 *p, void *_resp)
44316 + {
44317 ++ struct svc_rqst *rqstp = _rqstp;
44318 ++ struct nfsd3_readlinkres *resp = _resp;
44319 ++
44320 + p = encode_post_op_attr(rqstp, p, &resp->fh);
44321 + if (resp->status == 0) {
44322 + *p++ = htonl(resp->len);
44323 +@@ -691,9 +717,11 @@ nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
44324 +
44325 + /* READ */
44326 + int
44327 +-nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
44328 +- struct nfsd3_readres *resp)
44329 ++nfs3svc_encode_readres(void *_rqstp, __be32 *p, void *_resp)
44330 + {
44331 ++ struct svc_rqst *rqstp = _rqstp;
44332 ++ struct nfsd3_readres *resp = _resp;
44333 ++
44334 + p = encode_post_op_attr(rqstp, p, &resp->fh);
44335 + if (resp->status == 0) {
44336 + *p++ = htonl(resp->count);
44337 +@@ -715,9 +743,10 @@ nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
44338 +
44339 + /* WRITE */
44340 + int
44341 +-nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p,
44342 +- struct nfsd3_writeres *resp)
44343 ++nfs3svc_encode_writeres(void *_rqstp, __be32 *p, void *_resp)
44344 + {
44345 ++ struct svc_rqst *rqstp = _rqstp;
44346 ++ struct nfsd3_writeres *resp = _resp;
44347 + struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
44348 +
44349 + p = encode_wcc_data(rqstp, p, &resp->fh);
44350 +@@ -732,9 +761,10 @@ nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p,
44351 +
44352 + /* CREATE, MKDIR, SYMLINK, MKNOD */
44353 + int
44354 +-nfs3svc_encode_createres(struct svc_rqst *rqstp, __be32 *p,
44355 +- struct nfsd3_diropres *resp)
44356 ++nfs3svc_encode_createres(void *rqstp, __be32 *p, void *_resp)
44357 + {
44358 ++ struct nfsd3_diropres *resp = _resp;
44359 ++
44360 + if (resp->status == 0) {
44361 + *p++ = xdr_one;
44362 + p = encode_fh(p, &resp->fh);
44363 +@@ -746,9 +776,10 @@ nfs3svc_encode_createres(struct svc_rqst *rqstp, __be32 *p,
44364 +
44365 + /* RENAME */
44366 + int
44367 +-nfs3svc_encode_renameres(struct svc_rqst *rqstp, __be32 *p,
44368 +- struct nfsd3_renameres *resp)
44369 ++nfs3svc_encode_renameres(void *rqstp, __be32 *p, void *_resp)
44370 + {
44371 ++ struct nfsd3_renameres *resp = _resp;
44372 ++
44373 + p = encode_wcc_data(rqstp, p, &resp->ffh);
44374 + p = encode_wcc_data(rqstp, p, &resp->tfh);
44375 + return xdr_ressize_check(rqstp, p);
44376 +@@ -756,9 +787,10 @@ nfs3svc_encode_renameres(struct svc_rqst *rqstp, __be32 *p,
44377 +
44378 + /* LINK */
44379 + int
44380 +-nfs3svc_encode_linkres(struct svc_rqst *rqstp, __be32 *p,
44381 +- struct nfsd3_linkres *resp)
44382 ++nfs3svc_encode_linkres(void *rqstp, __be32 *p, void *_resp)
44383 + {
44384 ++ struct nfsd3_linkres *resp = _resp;
44385 ++
44386 + p = encode_post_op_attr(rqstp, p, &resp->fh);
44387 + p = encode_wcc_data(rqstp, p, &resp->tfh);
44388 + return xdr_ressize_check(rqstp, p);
44389 +@@ -766,9 +798,11 @@ nfs3svc_encode_linkres(struct svc_rqst *rqstp, __be32 *p,
44390 +
44391 + /* READDIR */
44392 + int
44393 +-nfs3svc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
44394 +- struct nfsd3_readdirres *resp)
44395 ++nfs3svc_encode_readdirres(void *_rqstp, __be32 *p, void *_resp)
44396 + {
44397 ++ struct svc_rqst *rqstp = _rqstp;
44398 ++ struct nfsd3_readdirres *resp = _resp;
44399 ++
44400 + p = encode_post_op_attr(rqstp, p, &resp->fh);
44401 +
44402 + if (resp->status == 0) {
44403 +@@ -1016,9 +1050,9 @@ nfs3svc_encode_entry_plus(void *cd, const char *name,
44404 +
44405 + /* FSSTAT */
44406 + int
44407 +-nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, __be32 *p,
44408 +- struct nfsd3_fsstatres *resp)
44409 ++nfs3svc_encode_fsstatres(void *rqstp, __be32 *p, void *_resp)
44410 + {
44411 ++ struct nfsd3_fsstatres *resp = _resp;
44412 + struct kstatfs *s = &resp->stats;
44413 + u64 bs = s->f_bsize;
44414 +
44415 +@@ -1038,9 +1072,10 @@ nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, __be32 *p,
44416 +
44417 + /* FSINFO */
44418 + int
44419 +-nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, __be32 *p,
44420 +- struct nfsd3_fsinfores *resp)
44421 ++nfs3svc_encode_fsinfores(void *rqstp, __be32 *p, void *_resp)
44422 + {
44423 ++ struct nfsd3_fsinfores *resp = _resp;
44424 ++
44425 + *p++ = xdr_zero; /* no post_op_attr */
44426 +
44427 + if (resp->status == 0) {
44428 +@@ -1062,9 +1097,10 @@ nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, __be32 *p,
44429 +
44430 + /* PATHCONF */
44431 + int
44432 +-nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, __be32 *p,
44433 +- struct nfsd3_pathconfres *resp)
44434 ++nfs3svc_encode_pathconfres(void *rqstp, __be32 *p, void *_resp)
44435 + {
44436 ++ struct nfsd3_pathconfres *resp = _resp;
44437 ++
44438 + *p++ = xdr_zero; /* no post_op_attr */
44439 +
44440 + if (resp->status == 0) {
44441 +@@ -1081,9 +1117,10 @@ nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, __be32 *p,
44442 +
44443 + /* COMMIT */
44444 + int
44445 +-nfs3svc_encode_commitres(struct svc_rqst *rqstp, __be32 *p,
44446 +- struct nfsd3_commitres *resp)
44447 ++nfs3svc_encode_commitres(void *_rqstp, __be32 *p, void *_resp)
44448 + {
44449 ++ struct svc_rqst *rqstp = _rqstp;
44450 ++ struct nfsd3_commitres *resp = _resp;
44451 + struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
44452 +
44453 + p = encode_wcc_data(rqstp, p, &resp->fh);
44454 +@@ -1099,17 +1136,19 @@ nfs3svc_encode_commitres(struct svc_rqst *rqstp, __be32 *p,
44455 + * XDR release functions
44456 + */
44457 + int
44458 +-nfs3svc_release_fhandle(struct svc_rqst *rqstp, __be32 *p,
44459 +- struct nfsd3_attrstat *resp)
44460 ++nfs3svc_release_fhandle(void *rqstp, __be32 *p, void *_resp)
44461 + {
44462 ++ struct nfsd3_attrstat *resp = _resp;
44463 ++
44464 + fh_put(&resp->fh);
44465 + return 1;
44466 + }
44467 +
44468 + int
44469 +-nfs3svc_release_fhandle2(struct svc_rqst *rqstp, __be32 *p,
44470 +- struct nfsd3_fhandle_pair *resp)
44471 ++nfs3svc_release_fhandle2(void *rqstp, __be32 *p, void *_resp)
44472 + {
44473 ++ struct nfsd3_fhandle_pair *resp = _resp;
44474 ++
44475 + fh_put(&resp->fh1);
44476 + fh_put(&resp->fh2);
44477 + return 1;
44478 +diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
44479 +index 7389cb1..e031e30d 100644
44480 +--- a/fs/nfsd/nfs4callback.c
44481 ++++ b/fs/nfsd/nfs4callback.c
44482 +@@ -470,8 +470,7 @@ static int decode_cb_sequence4res(struct xdr_stream *xdr,
44483 + /*
44484 + * NB: Without this zero space reservation, callbacks over krb5p fail
44485 + */
44486 +-static void nfs4_xdr_enc_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
44487 +- void *__unused)
44488 ++static void nfs4_xdr_enc_cb_null(void *req, struct xdr_stream *xdr, void *__unused)
44489 + {
44490 + xdr_reserve_space(xdr, 0);
44491 + }
44492 +@@ -479,9 +478,9 @@ static void nfs4_xdr_enc_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
44493 + /*
44494 + * 20.2. Operation 4: CB_RECALL - Recall a Delegation
44495 + */
44496 +-static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
44497 +- const struct nfsd4_callback *cb)
44498 ++static void nfs4_xdr_enc_cb_recall(void *req, struct xdr_stream *xdr, void *_cb)
44499 + {
44500 ++ const struct nfsd4_callback *cb = _cb;
44501 + const struct nfs4_delegation *dp = cb_to_delegation(cb);
44502 + struct nfs4_cb_compound_hdr hdr = {
44503 + .ident = cb->cb_clp->cl_cb_ident,
44504 +@@ -504,8 +503,7 @@ static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
44505 + * Protocol".
44506 + */
44507 +
44508 +-static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
44509 +- void *__unused)
44510 ++static int nfs4_xdr_dec_cb_null(void *req, struct xdr_stream *xdr, void *__unused)
44511 + {
44512 + return 0;
44513 + }
44514 +@@ -513,10 +511,11 @@ static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
44515 + /*
44516 + * 20.2. Operation 4: CB_RECALL - Recall a Delegation
44517 + */
44518 +-static int nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp,
44519 ++static int nfs4_xdr_dec_cb_recall(void *rqstp,
44520 + struct xdr_stream *xdr,
44521 +- struct nfsd4_callback *cb)
44522 ++ void *_cb)
44523 + {
44524 ++ struct nfsd4_callback *cb = _cb;
44525 + struct nfs4_cb_compound_hdr hdr;
44526 + int status;
44527 +
44528 +@@ -586,10 +585,12 @@ static void encode_cb_layout4args(struct xdr_stream *xdr,
44529 + hdr->nops++;
44530 + }
44531 +
44532 +-static void nfs4_xdr_enc_cb_layout(struct rpc_rqst *req,
44533 ++static void nfs4_xdr_enc_cb_layout(void *_req,
44534 + struct xdr_stream *xdr,
44535 +- const struct nfsd4_callback *cb)
44536 ++ void *_cb)
44537 + {
44538 ++ struct rpc_rqst *req = _req;
44539 ++ const struct nfsd4_callback *cb = _cb;
44540 + const struct nfs4_layout_stateid *ls =
44541 + container_of(cb, struct nfs4_layout_stateid, ls_recall);
44542 + struct nfs4_cb_compound_hdr hdr = {
44543 +@@ -603,10 +604,12 @@ static void nfs4_xdr_enc_cb_layout(struct rpc_rqst *req,
44544 + encode_cb_nops(&hdr);
44545 + }
44546 +
44547 +-static int nfs4_xdr_dec_cb_layout(struct rpc_rqst *rqstp,
44548 ++static int nfs4_xdr_dec_cb_layout(void *_rqstp,
44549 + struct xdr_stream *xdr,
44550 +- struct nfsd4_callback *cb)
44551 ++ void *_cb)
44552 + {
44553 ++ struct rpc_rqst *rqstp = _rqstp;
44554 ++ struct nfsd4_callback *cb = _cb;
44555 + struct nfs4_cb_compound_hdr hdr;
44556 + int status;
44557 +
44558 +@@ -629,8 +632,8 @@ static int nfs4_xdr_dec_cb_layout(struct rpc_rqst *rqstp,
44559 + #define PROC(proc, call, argtype, restype) \
44560 + [NFSPROC4_CLNT_##proc] = { \
44561 + .p_proc = NFSPROC4_CB_##call, \
44562 +- .p_encode = (kxdreproc_t)nfs4_xdr_enc_##argtype, \
44563 +- .p_decode = (kxdrdproc_t)nfs4_xdr_dec_##restype, \
44564 ++ .p_encode = nfs4_xdr_enc_##argtype, \
44565 ++ .p_decode = nfs4_xdr_dec_##restype, \
44566 + .p_arglen = NFS4_enc_##argtype##_sz, \
44567 + .p_replen = NFS4_dec_##restype##_sz, \
44568 + .p_statidx = NFSPROC4_CB_##call, \
44569 diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
44570 -index 7d5351c..144fc32 100644
44571 +index f8082c7..ded62562 100644
44572 --- a/fs/nfsd/nfs4proc.c
44573 +++ b/fs/nfsd/nfs4proc.c
44574 -@@ -1486,7 +1486,7 @@ struct nfsd4_operation {
44575 +@@ -358,8 +358,9 @@ copy_clientid(clientid_t *clid, struct nfsd4_session *session)
44576 +
44577 + static __be32
44578 + nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44579 +- struct nfsd4_open *open)
44580 ++ void *_open)
44581 + {
44582 ++ struct nfsd4_open *open = _open;
44583 + __be32 status;
44584 + struct svc_fh *resfh = NULL;
44585 + struct net *net = SVC_NET(rqstp);
44586 +@@ -496,8 +497,10 @@ static __be32 nfsd4_open_omfg(struct svc_rqst *rqstp, struct nfsd4_compound_stat
44587 + */
44588 + static __be32
44589 + nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44590 +- struct svc_fh **getfh)
44591 ++ void *_getfh)
44592 + {
44593 ++ struct svc_fh **getfh = (struct svc_fh **)_getfh;
44594 ++
44595 + if (!cstate->current_fh.fh_dentry)
44596 + return nfserr_nofilehandle;
44597 +
44598 +@@ -507,8 +510,10 @@ nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44599 +
44600 + static __be32
44601 + nfsd4_putfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44602 +- struct nfsd4_putfh *putfh)
44603 ++ void *_putfh)
44604 + {
44605 ++ struct nfsd4_putfh *putfh = _putfh;
44606 ++
44607 + fh_put(&cstate->current_fh);
44608 + cstate->current_fh.fh_handle.fh_size = putfh->pf_fhlen;
44609 + memcpy(&cstate->current_fh.fh_handle.fh_base, putfh->pf_fhval,
44610 +@@ -562,8 +567,10 @@ nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44611 + */
44612 + static __be32
44613 + nfsd4_access(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44614 +- struct nfsd4_access *access)
44615 ++ void *_access)
44616 + {
44617 ++ struct nfsd4_access *access = _access;
44618 ++
44619 + if (access->ac_req_access & ~NFS3_ACCESS_FULL)
44620 + return nfserr_inval;
44621 +
44622 +@@ -588,8 +595,10 @@ static void gen_boot_verifier(nfs4_verifier *verifier, struct net *net)
44623 +
44624 + static __be32
44625 + nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44626 +- struct nfsd4_commit *commit)
44627 ++ void *_commit)
44628 + {
44629 ++ struct nfsd4_commit *commit = _commit;
44630 ++
44631 + gen_boot_verifier(&commit->co_verf, SVC_NET(rqstp));
44632 + return nfsd_commit(rqstp, &cstate->current_fh, commit->co_offset,
44633 + commit->co_count);
44634 +@@ -597,8 +606,9 @@ nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44635 +
44636 + static __be32
44637 + nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44638 +- struct nfsd4_create *create)
44639 ++ void *_create)
44640 + {
44641 ++ struct nfsd4_create *create = _create;
44642 + struct svc_fh resfh;
44643 + __be32 status;
44644 + dev_t rdev;
44645 +@@ -685,8 +695,9 @@ out:
44646 +
44647 + static __be32
44648 + nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44649 +- struct nfsd4_getattr *getattr)
44650 ++ void *_getattr)
44651 + {
44652 ++ struct nfsd4_getattr *getattr = _getattr;
44653 + __be32 status;
44654 +
44655 + status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
44656 +@@ -706,8 +717,9 @@ nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44657 +
44658 + static __be32
44659 + nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44660 +- struct nfsd4_link *link)
44661 ++ void *_link)
44662 + {
44663 ++ struct nfsd4_link *link = _link;
44664 + __be32 status = nfserr_nofilehandle;
44665 +
44666 + if (!cstate->save_fh.fh_dentry)
44667 +@@ -745,8 +757,9 @@ nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44668 +
44669 + static __be32
44670 + nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44671 +- struct nfsd4_lookup *lookup)
44672 ++ void *_lookup)
44673 + {
44674 ++ struct nfsd4_lookup *lookup = _lookup;
44675 + return nfsd_lookup(rqstp, &cstate->current_fh,
44676 + lookup->lo_name, lookup->lo_len,
44677 + &cstate->current_fh);
44678 +@@ -754,8 +767,9 @@ nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44679 +
44680 + static __be32
44681 + nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44682 +- struct nfsd4_read *read)
44683 ++ void *_read)
44684 + {
44685 ++ struct nfsd4_read *read = _read;
44686 + __be32 status;
44687 +
44688 + read->rd_filp = NULL;
44689 +@@ -790,8 +804,9 @@ out:
44690 +
44691 + static __be32
44692 + nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44693 +- struct nfsd4_readdir *readdir)
44694 ++ void *_readdir)
44695 + {
44696 ++ struct nfsd4_readdir *readdir = _readdir;
44697 + u64 cookie = readdir->rd_cookie;
44698 + static const nfs4_verifier zeroverf;
44699 +
44700 +@@ -815,8 +830,10 @@ nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44701 +
44702 + static __be32
44703 + nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44704 +- struct nfsd4_readlink *readlink)
44705 ++ void *_readlink)
44706 + {
44707 ++ struct nfsd4_readlink *readlink = _readlink;
44708 ++
44709 + readlink->rl_rqstp = rqstp;
44710 + readlink->rl_fhp = &cstate->current_fh;
44711 + return nfs_ok;
44712 +@@ -824,8 +841,9 @@ nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44713 +
44714 + static __be32
44715 + nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44716 +- struct nfsd4_remove *remove)
44717 ++ void *_remove)
44718 + {
44719 ++ struct nfsd4_remove *remove = _remove;
44720 + __be32 status;
44721 +
44722 + if (opens_in_grace(SVC_NET(rqstp)))
44723 +@@ -841,8 +859,9 @@ nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44724 +
44725 + static __be32
44726 + nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44727 +- struct nfsd4_rename *rename)
44728 ++ void *_rename)
44729 + {
44730 ++ struct nfsd4_rename *rename = _rename;
44731 + __be32 status = nfserr_nofilehandle;
44732 +
44733 + if (!cstate->save_fh.fh_dentry)
44734 +@@ -862,8 +881,9 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44735 +
44736 + static __be32
44737 + nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44738 +- struct nfsd4_secinfo *secinfo)
44739 ++ void *_secinfo)
44740 + {
44741 ++ struct nfsd4_secinfo *secinfo = _secinfo;
44742 + struct svc_fh resfh;
44743 + struct svc_export *exp;
44744 + struct dentry *dentry;
44745 +@@ -893,8 +913,9 @@ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44746 +
44747 + static __be32
44748 + nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44749 +- struct nfsd4_secinfo_no_name *sin)
44750 ++ void *_sin)
44751 + {
44752 ++ struct nfsd4_secinfo_no_name *sin = _sin;
44753 + __be32 err;
44754 +
44755 + switch (sin->sin_style) {
44756 +@@ -916,8 +937,9 @@ nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstat
44757 +
44758 + static __be32
44759 + nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44760 +- struct nfsd4_setattr *setattr)
44761 ++ void *_setattr)
44762 + {
44763 ++ struct nfsd4_setattr *setattr = _setattr;
44764 + __be32 status = nfs_ok;
44765 + int err;
44766 +
44767 +@@ -977,8 +999,9 @@ static int fill_in_write_vector(struct kvec *vec, struct nfsd4_write *write)
44768 +
44769 + static __be32
44770 + nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44771 +- struct nfsd4_write *write)
44772 ++ void *_write)
44773 + {
44774 ++ struct nfsd4_write *write = _write;
44775 + stateid_t *stateid = &write->wr_stateid;
44776 + struct file *filp = NULL;
44777 + __be32 status = nfs_ok;
44778 +@@ -1014,8 +1037,9 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44779 +
44780 + static __be32
44781 + nfsd4_clone(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44782 +- struct nfsd4_clone *clone)
44783 ++ void *_clone)
44784 + {
44785 ++ struct nfsd4_clone *clone = _clone;
44786 + struct file *src, *dst;
44787 + __be32 status;
44788 +
44789 +@@ -1078,23 +1102,28 @@ nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44790 +
44791 + static __be32
44792 + nfsd4_allocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44793 +- struct nfsd4_fallocate *fallocate)
44794 ++ void *_fallocate)
44795 + {
44796 ++ struct nfsd4_fallocate *fallocate = _fallocate;
44797 ++
44798 + return nfsd4_fallocate(rqstp, cstate, fallocate, 0);
44799 + }
44800 +
44801 + static __be32
44802 + nfsd4_deallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44803 +- struct nfsd4_fallocate *fallocate)
44804 ++ void *_fallocate)
44805 + {
44806 ++ struct nfsd4_fallocate *fallocate = _fallocate;
44807 ++
44808 + return nfsd4_fallocate(rqstp, cstate, fallocate,
44809 + FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE);
44810 + }
44811 +
44812 + static __be32
44813 + nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44814 +- struct nfsd4_seek *seek)
44815 ++ void *_seek)
44816 + {
44817 ++ struct nfsd4_seek *seek = (struct nfsd4_seek *)_seek;
44818 + int whence;
44819 + __be32 status;
44820 + struct file *file;
44821 +@@ -1141,8 +1170,9 @@ out:
44822 + */
44823 + static __be32
44824 + _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44825 +- struct nfsd4_verify *verify)
44826 ++ void *_verify)
44827 + {
44828 ++ struct nfsd4_verify *verify = _verify;
44829 + __be32 *buf, *p;
44830 + int count;
44831 + __be32 status;
44832 +@@ -1199,8 +1229,9 @@ out_kfree:
44833 +
44834 + static __be32
44835 + nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44836 +- struct nfsd4_verify *verify)
44837 ++ void *_verify)
44838 + {
44839 ++ struct nfsd4_verify *verify = _verify;
44840 + __be32 status;
44841 +
44842 + status = _nfsd4_verify(rqstp, cstate, verify);
44843 +@@ -1209,8 +1240,9 @@ nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44844 +
44845 + static __be32
44846 + nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
44847 +- struct nfsd4_verify *verify)
44848 ++ void *_verify)
44849 + {
44850 ++ struct nfsd4_verify *verify = _verify;
44851 + __be32 status;
44852 +
44853 + status = _nfsd4_verify(rqstp, cstate, verify);
44854 +@@ -1238,8 +1270,9 @@ nfsd4_layout_verify(struct svc_export *exp, unsigned int layout_type)
44855 + static __be32
44856 + nfsd4_getdeviceinfo(struct svc_rqst *rqstp,
44857 + struct nfsd4_compound_state *cstate,
44858 +- struct nfsd4_getdeviceinfo *gdp)
44859 ++ void *_gdp)
44860 + {
44861 ++ struct nfsd4_getdeviceinfo *gdp = _gdp;
44862 + const struct nfsd4_layout_ops *ops;
44863 + struct nfsd4_deviceid_map *map;
44864 + struct svc_export *exp;
44865 +@@ -1282,8 +1315,9 @@ out:
44866 + static __be32
44867 + nfsd4_layoutget(struct svc_rqst *rqstp,
44868 + struct nfsd4_compound_state *cstate,
44869 +- struct nfsd4_layoutget *lgp)
44870 ++ void *_lgp)
44871 + {
44872 ++ struct nfsd4_layoutget *lgp = _lgp;
44873 + struct svc_fh *current_fh = &cstate->current_fh;
44874 + const struct nfsd4_layout_ops *ops;
44875 + struct nfs4_layout_stateid *ls;
44876 +@@ -1362,8 +1396,9 @@ out:
44877 + static __be32
44878 + nfsd4_layoutcommit(struct svc_rqst *rqstp,
44879 + struct nfsd4_compound_state *cstate,
44880 +- struct nfsd4_layoutcommit *lcp)
44881 ++ void *_lcp)
44882 + {
44883 ++ struct nfsd4_layoutcommit *lcp = _lcp;
44884 + const struct nfsd4_layout_seg *seg = &lcp->lc_seg;
44885 + struct svc_fh *current_fh = &cstate->current_fh;
44886 + const struct nfsd4_layout_ops *ops;
44887 +@@ -1426,8 +1461,9 @@ out:
44888 + static __be32
44889 + nfsd4_layoutreturn(struct svc_rqst *rqstp,
44890 + struct nfsd4_compound_state *cstate,
44891 +- struct nfsd4_layoutreturn *lrp)
44892 ++ void *_lrp)
44893 + {
44894 ++ struct nfsd4_layoutreturn *lrp = _lrp;
44895 + struct svc_fh *current_fh = &cstate->current_fh;
44896 + __be32 nfserr;
44897 +
44898 +@@ -1529,7 +1565,7 @@ struct nfsd4_operation {
44899 nfsd4op_rsize op_rsize_bop;
44900 stateid_getter op_get_currentstateid;
44901 stateid_setter op_set_currentstateid;
44902 @@ -85480,19 +105885,2098 @@ index 7d5351c..144fc32 100644
44903
44904 static struct nfsd4_operation nfsd4_ops[];
44905
44906 +@@ -1637,10 +1673,10 @@ static void svcxdr_init_encode(struct svc_rqst *rqstp,
44907 + * COMPOUND call.
44908 + */
44909 + static __be32
44910 +-nfsd4_proc_compound(struct svc_rqst *rqstp,
44911 +- struct nfsd4_compoundargs *args,
44912 +- struct nfsd4_compoundres *resp)
44913 ++nfsd4_proc_compound(struct svc_rqst *rqstp, void *_args, void *_resp)
44914 + {
44915 ++ struct nfsd4_compoundargs *args = _args;
44916 ++ struct nfsd4_compoundres *resp = _resp;
44917 + struct nfsd4_op *op;
44918 + struct nfsd4_operation *opdesc;
44919 + struct nfsd4_compound_state *cstate = &resp->cstate;
44920 +@@ -1999,338 +2035,338 @@ static inline u32 nfsd4_layoutreturn_rsize(struct svc_rqst *rqstp, struct nfsd4_
44921 +
44922 + static struct nfsd4_operation nfsd4_ops[] = {
44923 + [OP_ACCESS] = {
44924 +- .op_func = (nfsd4op_func)nfsd4_access,
44925 ++ .op_func = nfsd4_access,
44926 + .op_name = "OP_ACCESS",
44927 + },
44928 + [OP_CLOSE] = {
44929 +- .op_func = (nfsd4op_func)nfsd4_close,
44930 ++ .op_func = nfsd4_close,
44931 + .op_flags = OP_MODIFIES_SOMETHING,
44932 + .op_name = "OP_CLOSE",
44933 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
44934 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_closestateid,
44935 +- .op_set_currentstateid = (stateid_setter)nfsd4_set_closestateid,
44936 ++ .op_rsize_bop = nfsd4_status_stateid_rsize,
44937 ++ .op_get_currentstateid = nfsd4_get_closestateid,
44938 ++ .op_set_currentstateid = nfsd4_set_closestateid,
44939 + },
44940 + [OP_COMMIT] = {
44941 +- .op_func = (nfsd4op_func)nfsd4_commit,
44942 ++ .op_func = nfsd4_commit,
44943 + .op_flags = OP_MODIFIES_SOMETHING,
44944 + .op_name = "OP_COMMIT",
44945 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_commit_rsize,
44946 ++ .op_rsize_bop = nfsd4_commit_rsize,
44947 + },
44948 + [OP_CREATE] = {
44949 +- .op_func = (nfsd4op_func)nfsd4_create,
44950 ++ .op_func = nfsd4_create,
44951 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME | OP_CLEAR_STATEID,
44952 + .op_name = "OP_CREATE",
44953 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_create_rsize,
44954 ++ .op_rsize_bop = nfsd4_create_rsize,
44955 + },
44956 + [OP_DELEGRETURN] = {
44957 +- .op_func = (nfsd4op_func)nfsd4_delegreturn,
44958 ++ .op_func = nfsd4_delegreturn,
44959 + .op_flags = OP_MODIFIES_SOMETHING,
44960 + .op_name = "OP_DELEGRETURN",
44961 + .op_rsize_bop = nfsd4_only_status_rsize,
44962 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_delegreturnstateid,
44963 ++ .op_get_currentstateid = nfsd4_get_delegreturnstateid,
44964 + },
44965 + [OP_GETATTR] = {
44966 +- .op_func = (nfsd4op_func)nfsd4_getattr,
44967 ++ .op_func = nfsd4_getattr,
44968 + .op_flags = ALLOWED_ON_ABSENT_FS,
44969 + .op_rsize_bop = nfsd4_getattr_rsize,
44970 + .op_name = "OP_GETATTR",
44971 + },
44972 + [OP_GETFH] = {
44973 +- .op_func = (nfsd4op_func)nfsd4_getfh,
44974 ++ .op_func = nfsd4_getfh,
44975 + .op_name = "OP_GETFH",
44976 + },
44977 + [OP_LINK] = {
44978 +- .op_func = (nfsd4op_func)nfsd4_link,
44979 ++ .op_func = nfsd4_link,
44980 + .op_flags = ALLOWED_ON_ABSENT_FS | OP_MODIFIES_SOMETHING
44981 + | OP_CACHEME,
44982 + .op_name = "OP_LINK",
44983 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_link_rsize,
44984 ++ .op_rsize_bop = nfsd4_link_rsize,
44985 + },
44986 + [OP_LOCK] = {
44987 +- .op_func = (nfsd4op_func)nfsd4_lock,
44988 ++ .op_func = nfsd4_lock,
44989 + .op_flags = OP_MODIFIES_SOMETHING,
44990 + .op_name = "OP_LOCK",
44991 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_lock_rsize,
44992 +- .op_set_currentstateid = (stateid_setter)nfsd4_set_lockstateid,
44993 ++ .op_rsize_bop = nfsd4_lock_rsize,
44994 ++ .op_set_currentstateid = nfsd4_set_lockstateid,
44995 + },
44996 + [OP_LOCKT] = {
44997 +- .op_func = (nfsd4op_func)nfsd4_lockt,
44998 ++ .op_func = nfsd4_lockt,
44999 + .op_name = "OP_LOCKT",
45000 + },
45001 + [OP_LOCKU] = {
45002 +- .op_func = (nfsd4op_func)nfsd4_locku,
45003 ++ .op_func = nfsd4_locku,
45004 + .op_flags = OP_MODIFIES_SOMETHING,
45005 + .op_name = "OP_LOCKU",
45006 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
45007 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_lockustateid,
45008 ++ .op_rsize_bop = nfsd4_status_stateid_rsize,
45009 ++ .op_get_currentstateid = nfsd4_get_lockustateid,
45010 + },
45011 + [OP_LOOKUP] = {
45012 +- .op_func = (nfsd4op_func)nfsd4_lookup,
45013 ++ .op_func = nfsd4_lookup,
45014 + .op_flags = OP_HANDLES_WRONGSEC | OP_CLEAR_STATEID,
45015 + .op_name = "OP_LOOKUP",
45016 + },
45017 + [OP_LOOKUPP] = {
45018 +- .op_func = (nfsd4op_func)nfsd4_lookupp,
45019 ++ .op_func = nfsd4_lookupp,
45020 + .op_flags = OP_HANDLES_WRONGSEC | OP_CLEAR_STATEID,
45021 + .op_name = "OP_LOOKUPP",
45022 + },
45023 + [OP_NVERIFY] = {
45024 +- .op_func = (nfsd4op_func)nfsd4_nverify,
45025 ++ .op_func = nfsd4_nverify,
45026 + .op_name = "OP_NVERIFY",
45027 + },
45028 + [OP_OPEN] = {
45029 +- .op_func = (nfsd4op_func)nfsd4_open,
45030 ++ .op_func = nfsd4_open,
45031 + .op_flags = OP_HANDLES_WRONGSEC | OP_MODIFIES_SOMETHING,
45032 + .op_name = "OP_OPEN",
45033 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_open_rsize,
45034 +- .op_set_currentstateid = (stateid_setter)nfsd4_set_openstateid,
45035 ++ .op_rsize_bop = nfsd4_open_rsize,
45036 ++ .op_set_currentstateid = nfsd4_set_openstateid,
45037 + },
45038 + [OP_OPEN_CONFIRM] = {
45039 +- .op_func = (nfsd4op_func)nfsd4_open_confirm,
45040 ++ .op_func = nfsd4_open_confirm,
45041 + .op_flags = OP_MODIFIES_SOMETHING,
45042 + .op_name = "OP_OPEN_CONFIRM",
45043 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
45044 ++ .op_rsize_bop = nfsd4_status_stateid_rsize,
45045 + },
45046 + [OP_OPEN_DOWNGRADE] = {
45047 +- .op_func = (nfsd4op_func)nfsd4_open_downgrade,
45048 ++ .op_func = nfsd4_open_downgrade,
45049 + .op_flags = OP_MODIFIES_SOMETHING,
45050 + .op_name = "OP_OPEN_DOWNGRADE",
45051 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
45052 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_opendowngradestateid,
45053 +- .op_set_currentstateid = (stateid_setter)nfsd4_set_opendowngradestateid,
45054 ++ .op_rsize_bop = nfsd4_status_stateid_rsize,
45055 ++ .op_get_currentstateid = nfsd4_get_opendowngradestateid,
45056 ++ .op_set_currentstateid = nfsd4_set_opendowngradestateid,
45057 + },
45058 + [OP_PUTFH] = {
45059 +- .op_func = (nfsd4op_func)nfsd4_putfh,
45060 ++ .op_func = nfsd4_putfh,
45061 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45062 + | OP_IS_PUTFH_LIKE | OP_CLEAR_STATEID,
45063 + .op_name = "OP_PUTFH",
45064 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45065 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45066 + },
45067 + [OP_PUTPUBFH] = {
45068 +- .op_func = (nfsd4op_func)nfsd4_putrootfh,
45069 ++ .op_func = nfsd4_putrootfh,
45070 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45071 + | OP_IS_PUTFH_LIKE | OP_CLEAR_STATEID,
45072 + .op_name = "OP_PUTPUBFH",
45073 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45074 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45075 + },
45076 + [OP_PUTROOTFH] = {
45077 +- .op_func = (nfsd4op_func)nfsd4_putrootfh,
45078 ++ .op_func = nfsd4_putrootfh,
45079 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45080 + | OP_IS_PUTFH_LIKE | OP_CLEAR_STATEID,
45081 + .op_name = "OP_PUTROOTFH",
45082 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45083 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45084 + },
45085 + [OP_READ] = {
45086 +- .op_func = (nfsd4op_func)nfsd4_read,
45087 ++ .op_func = nfsd4_read,
45088 + .op_name = "OP_READ",
45089 + .op_rsize_bop = (nfsd4op_rsize)nfsd4_read_rsize,
45090 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_readstateid,
45091 ++ .op_get_currentstateid = nfsd4_get_readstateid,
45092 + },
45093 + [OP_READDIR] = {
45094 +- .op_func = (nfsd4op_func)nfsd4_readdir,
45095 ++ .op_func = nfsd4_readdir,
45096 + .op_name = "OP_READDIR",
45097 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_readdir_rsize,
45098 ++ .op_rsize_bop = nfsd4_readdir_rsize,
45099 + },
45100 + [OP_READLINK] = {
45101 +- .op_func = (nfsd4op_func)nfsd4_readlink,
45102 ++ .op_func = nfsd4_readlink,
45103 + .op_name = "OP_READLINK",
45104 + },
45105 + [OP_REMOVE] = {
45106 +- .op_func = (nfsd4op_func)nfsd4_remove,
45107 ++ .op_func = nfsd4_remove,
45108 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45109 + .op_name = "OP_REMOVE",
45110 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_remove_rsize,
45111 ++ .op_rsize_bop = nfsd4_remove_rsize,
45112 + },
45113 + [OP_RENAME] = {
45114 +- .op_func = (nfsd4op_func)nfsd4_rename,
45115 ++ .op_func = nfsd4_rename,
45116 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45117 + .op_name = "OP_RENAME",
45118 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_rename_rsize,
45119 ++ .op_rsize_bop = nfsd4_rename_rsize,
45120 + },
45121 + [OP_RENEW] = {
45122 +- .op_func = (nfsd4op_func)nfsd4_renew,
45123 ++ .op_func = nfsd4_renew,
45124 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45125 + | OP_MODIFIES_SOMETHING,
45126 + .op_name = "OP_RENEW",
45127 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45128 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45129 +
45130 + },
45131 + [OP_RESTOREFH] = {
45132 +- .op_func = (nfsd4op_func)nfsd4_restorefh,
45133 ++ .op_func = nfsd4_restorefh,
45134 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45135 + | OP_IS_PUTFH_LIKE | OP_MODIFIES_SOMETHING,
45136 + .op_name = "OP_RESTOREFH",
45137 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45138 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45139 + },
45140 + [OP_SAVEFH] = {
45141 +- .op_func = (nfsd4op_func)nfsd4_savefh,
45142 ++ .op_func = nfsd4_savefh,
45143 + .op_flags = OP_HANDLES_WRONGSEC | OP_MODIFIES_SOMETHING,
45144 + .op_name = "OP_SAVEFH",
45145 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45146 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45147 + },
45148 + [OP_SECINFO] = {
45149 +- .op_func = (nfsd4op_func)nfsd4_secinfo,
45150 ++ .op_func = nfsd4_secinfo,
45151 + .op_flags = OP_HANDLES_WRONGSEC,
45152 + .op_name = "OP_SECINFO",
45153 + },
45154 + [OP_SETATTR] = {
45155 +- .op_func = (nfsd4op_func)nfsd4_setattr,
45156 ++ .op_func = nfsd4_setattr,
45157 + .op_name = "OP_SETATTR",
45158 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45159 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize,
45160 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_setattrstateid,
45161 ++ .op_rsize_bop = nfsd4_setattr_rsize,
45162 ++ .op_get_currentstateid = nfsd4_get_setattrstateid,
45163 + },
45164 + [OP_SETCLIENTID] = {
45165 +- .op_func = (nfsd4op_func)nfsd4_setclientid,
45166 ++ .op_func = nfsd4_setclientid,
45167 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45168 + | OP_MODIFIES_SOMETHING | OP_CACHEME,
45169 + .op_name = "OP_SETCLIENTID",
45170 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_setclientid_rsize,
45171 ++ .op_rsize_bop = nfsd4_setclientid_rsize,
45172 + },
45173 + [OP_SETCLIENTID_CONFIRM] = {
45174 +- .op_func = (nfsd4op_func)nfsd4_setclientid_confirm,
45175 ++ .op_func = nfsd4_setclientid_confirm,
45176 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45177 + | OP_MODIFIES_SOMETHING | OP_CACHEME,
45178 + .op_name = "OP_SETCLIENTID_CONFIRM",
45179 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45180 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45181 + },
45182 + [OP_VERIFY] = {
45183 +- .op_func = (nfsd4op_func)nfsd4_verify,
45184 ++ .op_func = nfsd4_verify,
45185 + .op_name = "OP_VERIFY",
45186 + },
45187 + [OP_WRITE] = {
45188 +- .op_func = (nfsd4op_func)nfsd4_write,
45189 ++ .op_func = nfsd4_write,
45190 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45191 + .op_name = "OP_WRITE",
45192 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
45193 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_writestateid,
45194 ++ .op_rsize_bop = nfsd4_write_rsize,
45195 ++ .op_get_currentstateid = nfsd4_get_writestateid,
45196 + },
45197 + [OP_RELEASE_LOCKOWNER] = {
45198 +- .op_func = (nfsd4op_func)nfsd4_release_lockowner,
45199 ++ .op_func = nfsd4_release_lockowner,
45200 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
45201 + | OP_MODIFIES_SOMETHING,
45202 + .op_name = "OP_RELEASE_LOCKOWNER",
45203 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45204 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45205 + },
45206 +
45207 + /* NFSv4.1 operations */
45208 + [OP_EXCHANGE_ID] = {
45209 +- .op_func = (nfsd4op_func)nfsd4_exchange_id,
45210 ++ .op_func = nfsd4_exchange_id,
45211 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
45212 + | OP_MODIFIES_SOMETHING,
45213 + .op_name = "OP_EXCHANGE_ID",
45214 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_exchange_id_rsize,
45215 ++ .op_rsize_bop = nfsd4_exchange_id_rsize,
45216 + },
45217 + [OP_BACKCHANNEL_CTL] = {
45218 +- .op_func = (nfsd4op_func)nfsd4_backchannel_ctl,
45219 ++ .op_func = nfsd4_backchannel_ctl,
45220 + .op_flags = ALLOWED_WITHOUT_FH | OP_MODIFIES_SOMETHING,
45221 + .op_name = "OP_BACKCHANNEL_CTL",
45222 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45223 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45224 + },
45225 + [OP_BIND_CONN_TO_SESSION] = {
45226 +- .op_func = (nfsd4op_func)nfsd4_bind_conn_to_session,
45227 ++ .op_func = nfsd4_bind_conn_to_session,
45228 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
45229 + | OP_MODIFIES_SOMETHING,
45230 + .op_name = "OP_BIND_CONN_TO_SESSION",
45231 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_bind_conn_to_session_rsize,
45232 ++ .op_rsize_bop = nfsd4_bind_conn_to_session_rsize,
45233 + },
45234 + [OP_CREATE_SESSION] = {
45235 +- .op_func = (nfsd4op_func)nfsd4_create_session,
45236 ++ .op_func = nfsd4_create_session,
45237 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
45238 + | OP_MODIFIES_SOMETHING,
45239 + .op_name = "OP_CREATE_SESSION",
45240 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_create_session_rsize,
45241 ++ .op_rsize_bop = nfsd4_create_session_rsize,
45242 + },
45243 + [OP_DESTROY_SESSION] = {
45244 +- .op_func = (nfsd4op_func)nfsd4_destroy_session,
45245 ++ .op_func = nfsd4_destroy_session,
45246 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
45247 + | OP_MODIFIES_SOMETHING,
45248 + .op_name = "OP_DESTROY_SESSION",
45249 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45250 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45251 + },
45252 + [OP_SEQUENCE] = {
45253 +- .op_func = (nfsd4op_func)nfsd4_sequence,
45254 ++ .op_func = nfsd4_sequence,
45255 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP,
45256 + .op_name = "OP_SEQUENCE",
45257 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_sequence_rsize,
45258 ++ .op_rsize_bop = nfsd4_sequence_rsize,
45259 + },
45260 + [OP_DESTROY_CLIENTID] = {
45261 +- .op_func = (nfsd4op_func)nfsd4_destroy_clientid,
45262 ++ .op_func = nfsd4_destroy_clientid,
45263 + .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
45264 + | OP_MODIFIES_SOMETHING,
45265 + .op_name = "OP_DESTROY_CLIENTID",
45266 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45267 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45268 + },
45269 + [OP_RECLAIM_COMPLETE] = {
45270 +- .op_func = (nfsd4op_func)nfsd4_reclaim_complete,
45271 ++ .op_func = nfsd4_reclaim_complete,
45272 + .op_flags = ALLOWED_WITHOUT_FH | OP_MODIFIES_SOMETHING,
45273 + .op_name = "OP_RECLAIM_COMPLETE",
45274 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45275 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45276 + },
45277 + [OP_SECINFO_NO_NAME] = {
45278 +- .op_func = (nfsd4op_func)nfsd4_secinfo_no_name,
45279 ++ .op_func = nfsd4_secinfo_no_name,
45280 + .op_flags = OP_HANDLES_WRONGSEC,
45281 + .op_name = "OP_SECINFO_NO_NAME",
45282 + },
45283 + [OP_TEST_STATEID] = {
45284 +- .op_func = (nfsd4op_func)nfsd4_test_stateid,
45285 ++ .op_func = nfsd4_test_stateid,
45286 + .op_flags = ALLOWED_WITHOUT_FH,
45287 + .op_name = "OP_TEST_STATEID",
45288 + },
45289 + [OP_FREE_STATEID] = {
45290 +- .op_func = (nfsd4op_func)nfsd4_free_stateid,
45291 ++ .op_func = nfsd4_free_stateid,
45292 + .op_flags = ALLOWED_WITHOUT_FH | OP_MODIFIES_SOMETHING,
45293 + .op_name = "OP_FREE_STATEID",
45294 +- .op_get_currentstateid = (stateid_getter)nfsd4_get_freestateid,
45295 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45296 ++ .op_get_currentstateid = nfsd4_get_freestateid,
45297 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45298 + },
45299 + #ifdef CONFIG_NFSD_PNFS
45300 + [OP_GETDEVICEINFO] = {
45301 +- .op_func = (nfsd4op_func)nfsd4_getdeviceinfo,
45302 ++ .op_func = nfsd4_getdeviceinfo,
45303 + .op_flags = ALLOWED_WITHOUT_FH,
45304 + .op_name = "OP_GETDEVICEINFO",
45305 + },
45306 + [OP_LAYOUTGET] = {
45307 +- .op_func = (nfsd4op_func)nfsd4_layoutget,
45308 ++ .op_func = nfsd4_layoutget,
45309 + .op_flags = OP_MODIFIES_SOMETHING,
45310 + .op_name = "OP_LAYOUTGET",
45311 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_layoutget_rsize,
45312 ++ .op_rsize_bop = nfsd4_layoutget_rsize,
45313 + },
45314 + [OP_LAYOUTCOMMIT] = {
45315 +- .op_func = (nfsd4op_func)nfsd4_layoutcommit,
45316 ++ .op_func = nfsd4_layoutcommit,
45317 + .op_flags = OP_MODIFIES_SOMETHING,
45318 + .op_name = "OP_LAYOUTCOMMIT",
45319 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_layoutcommit_rsize,
45320 ++ .op_rsize_bop = nfsd4_layoutcommit_rsize,
45321 + },
45322 + [OP_LAYOUTRETURN] = {
45323 +- .op_func = (nfsd4op_func)nfsd4_layoutreturn,
45324 ++ .op_func = nfsd4_layoutreturn,
45325 + .op_flags = OP_MODIFIES_SOMETHING,
45326 + .op_name = "OP_LAYOUTRETURN",
45327 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_layoutreturn_rsize,
45328 ++ .op_rsize_bop = nfsd4_layoutreturn_rsize,
45329 + },
45330 + #endif /* CONFIG_NFSD_PNFS */
45331 +
45332 + /* NFSv4.2 operations */
45333 + [OP_ALLOCATE] = {
45334 +- .op_func = (nfsd4op_func)nfsd4_allocate,
45335 ++ .op_func = nfsd4_allocate,
45336 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45337 + .op_name = "OP_ALLOCATE",
45338 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45339 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45340 + },
45341 + [OP_DEALLOCATE] = {
45342 +- .op_func = (nfsd4op_func)nfsd4_deallocate,
45343 ++ .op_func = nfsd4_deallocate,
45344 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45345 + .op_name = "OP_DEALLOCATE",
45346 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45347 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45348 + },
45349 + [OP_CLONE] = {
45350 +- .op_func = (nfsd4op_func)nfsd4_clone,
45351 ++ .op_func = nfsd4_clone,
45352 + .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
45353 + .op_name = "OP_CLONE",
45354 +- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
45355 ++ .op_rsize_bop = nfsd4_only_status_rsize,
45356 + },
45357 + [OP_SEEK] = {
45358 +- .op_func = (nfsd4op_func)nfsd4_seek,
45359 ++ .op_func = nfsd4_seek,
45360 + .op_name = "OP_SEEK",
45361 + },
45362 + };
45363 +@@ -2368,17 +2404,17 @@ struct nfsd4_voidargs { int dummy; };
45364 +
45365 + static struct svc_procedure nfsd_procedures4[2] = {
45366 + [NFSPROC4_NULL] = {
45367 +- .pc_func = (svc_procfunc) nfsd4_proc_null,
45368 +- .pc_encode = (kxdrproc_t) nfs4svc_encode_voidres,
45369 ++ .pc_func = nfsd4_proc_null,
45370 ++ .pc_encode = nfs4svc_encode_voidres,
45371 + .pc_argsize = sizeof(struct nfsd4_voidargs),
45372 + .pc_ressize = sizeof(struct nfsd4_voidres),
45373 + .pc_cachetype = RC_NOCACHE,
45374 + .pc_xdrressize = 1,
45375 + },
45376 + [NFSPROC4_COMPOUND] = {
45377 +- .pc_func = (svc_procfunc) nfsd4_proc_compound,
45378 +- .pc_decode = (kxdrproc_t) nfs4svc_decode_compoundargs,
45379 +- .pc_encode = (kxdrproc_t) nfs4svc_encode_compoundres,
45380 ++ .pc_func = nfsd4_proc_compound,
45381 ++ .pc_decode = nfs4svc_decode_compoundargs,
45382 ++ .pc_encode = nfs4svc_encode_compoundres,
45383 + .pc_argsize = sizeof(struct nfsd4_compoundargs),
45384 + .pc_ressize = sizeof(struct nfsd4_compoundres),
45385 + .pc_release = nfsd4_release_compoundargs,
45386 +diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
45387 +index c484a2b6..a1e3dd7 100644
45388 +--- a/fs/nfsd/nfs4state.c
45389 ++++ b/fs/nfsd/nfs4state.c
45390 +@@ -2362,8 +2362,9 @@ static bool client_has_state(struct nfs4_client *clp)
45391 + __be32
45392 + nfsd4_exchange_id(struct svc_rqst *rqstp,
45393 + struct nfsd4_compound_state *cstate,
45394 +- struct nfsd4_exchange_id *exid)
45395 ++ void *_exid)
45396 + {
45397 ++ struct nfsd4_exchange_id *exid = _exid;
45398 + struct nfs4_client *conf, *new;
45399 + struct nfs4_client *unconf = NULL;
45400 + __be32 status;
45401 +@@ -2633,8 +2634,9 @@ static __be32 nfsd4_check_cb_sec(struct nfsd4_cb_sec *cbs)
45402 + __be32
45403 + nfsd4_create_session(struct svc_rqst *rqstp,
45404 + struct nfsd4_compound_state *cstate,
45405 +- struct nfsd4_create_session *cr_ses)
45406 ++ void *_cr_ses)
45407 + {
45408 ++ struct nfsd4_create_session *cr_ses = _cr_ses;
45409 + struct sockaddr *sa = svc_addr(rqstp);
45410 + struct nfs4_client *conf, *unconf;
45411 + struct nfs4_client *old = NULL;
45412 +@@ -2759,8 +2761,9 @@ static __be32 nfsd4_map_bcts_dir(u32 *dir)
45413 + return nfserr_inval;
45414 + }
45415 +
45416 +-__be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_backchannel_ctl *bc)
45417 ++__be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *_bc)
45418 + {
45419 ++ struct nfsd4_backchannel_ctl *bc = _bc;
45420 + struct nfsd4_session *session = cstate->session;
45421 + struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
45422 + __be32 status;
45423 +@@ -2780,8 +2783,9 @@ __be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state
45424 +
45425 + __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
45426 + struct nfsd4_compound_state *cstate,
45427 +- struct nfsd4_bind_conn_to_session *bcts)
45428 ++ void *_bcts)
45429 + {
45430 ++ struct nfsd4_bind_conn_to_session *bcts = _bcts;
45431 + __be32 status;
45432 + struct nfsd4_conn *conn;
45433 + struct nfsd4_session *session;
45434 +@@ -2823,8 +2827,9 @@ static bool nfsd4_compound_in_session(struct nfsd4_session *session, struct nfs4
45435 + __be32
45436 + nfsd4_destroy_session(struct svc_rqst *r,
45437 + struct nfsd4_compound_state *cstate,
45438 +- struct nfsd4_destroy_session *sessionid)
45439 ++ void *_sessionid)
45440 + {
45441 ++ struct nfsd4_destroy_session *sessionid = _sessionid;
45442 + struct nfsd4_session *ses;
45443 + __be32 status;
45444 + int ref_held_by_me = 0;
45445 +@@ -2920,8 +2925,9 @@ static bool nfsd4_request_too_big(struct svc_rqst *rqstp,
45446 + __be32
45447 + nfsd4_sequence(struct svc_rqst *rqstp,
45448 + struct nfsd4_compound_state *cstate,
45449 +- struct nfsd4_sequence *seq)
45450 ++ void *_seq)
45451 + {
45452 ++ struct nfsd4_sequence *seq = _seq;
45453 + struct nfsd4_compoundres *resp = rqstp->rq_resp;
45454 + struct xdr_stream *xdr = &resp->xdr;
45455 + struct nfsd4_session *session;
45456 +@@ -3055,8 +3061,9 @@ nfsd4_sequence_done(struct nfsd4_compoundres *resp)
45457 + }
45458 +
45459 + __be32
45460 +-nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_destroy_clientid *dc)
45461 ++nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *_dc)
45462 + {
45463 ++ struct nfsd4_destroy_clientid *dc = _dc;
45464 + struct nfs4_client *conf, *unconf;
45465 + struct nfs4_client *clp = NULL;
45466 + __be32 status = 0;
45467 +@@ -3096,8 +3103,9 @@ out:
45468 + }
45469 +
45470 + __be32
45471 +-nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_reclaim_complete *rc)
45472 ++nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *_rc)
45473 + {
45474 ++ struct nfsd4_reclaim_complete *rc = _rc;
45475 + __be32 status = 0;
45476 +
45477 + if (rc->rca_one_fs) {
45478 +@@ -3134,8 +3142,9 @@ out:
45479 +
45480 + __be32
45481 + nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45482 +- struct nfsd4_setclientid *setclid)
45483 ++ void *_setclid)
45484 + {
45485 ++ struct nfsd4_setclientid *setclid = _setclid;
45486 + struct xdr_netobj clname = setclid->se_name;
45487 + nfs4_verifier clverifier = setclid->se_verf;
45488 + struct nfs4_client *conf, *new;
45489 +@@ -3193,8 +3202,9 @@ out:
45490 + __be32
45491 + nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
45492 + struct nfsd4_compound_state *cstate,
45493 +- struct nfsd4_setclientid_confirm *setclientid_confirm)
45494 ++ void *_setclientid_confirm)
45495 + {
45496 ++ struct nfsd4_setclientid_confirm *setclientid_confirm = _setclientid_confirm;
45497 + struct nfs4_client *conf, *unconf;
45498 + struct nfs4_client *old = NULL;
45499 + nfs4_verifier confirm = setclientid_confirm->sc_confirm;
45500 +@@ -4431,8 +4441,9 @@ void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate,
45501 +
45502 + __be32
45503 + nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45504 +- clientid_t *clid)
45505 ++ void *_clid)
45506 + {
45507 ++ clientid_t *clid = _clid;
45508 + struct nfs4_client *clp;
45509 + __be32 status;
45510 + struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
45511 +@@ -4888,8 +4899,9 @@ out:
45512 + */
45513 + __be32
45514 + nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45515 +- struct nfsd4_test_stateid *test_stateid)
45516 ++ void *_test_stateid)
45517 + {
45518 ++ struct nfsd4_test_stateid *test_stateid = _test_stateid;
45519 + struct nfsd4_test_stateid_id *stateid;
45520 + struct nfs4_client *cl = cstate->session->se_client;
45521 +
45522 +@@ -4902,8 +4914,9 @@ nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45523 +
45524 + __be32
45525 + nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45526 +- struct nfsd4_free_stateid *free_stateid)
45527 ++ void *_free_stateid)
45528 + {
45529 ++ struct nfsd4_free_stateid *free_stateid = _free_stateid;
45530 + stateid_t *stateid = &free_stateid->fr_stateid;
45531 + struct nfs4_stid *s;
45532 + struct nfs4_delegation *dp;
45533 +@@ -5041,8 +5054,9 @@ static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cs
45534 +
45535 + __be32
45536 + nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45537 +- struct nfsd4_open_confirm *oc)
45538 ++ void *_oc)
45539 + {
45540 ++ struct nfsd4_open_confirm *oc = _oc;
45541 + __be32 status;
45542 + struct nfs4_openowner *oo;
45543 + struct nfs4_ol_stateid *stp;
45544 +@@ -5110,8 +5124,9 @@ static inline void nfs4_stateid_downgrade(struct nfs4_ol_stateid *stp, u32 to_ac
45545 + __be32
45546 + nfsd4_open_downgrade(struct svc_rqst *rqstp,
45547 + struct nfsd4_compound_state *cstate,
45548 +- struct nfsd4_open_downgrade *od)
45549 ++ void *_od)
45550 + {
45551 ++ struct nfsd4_open_downgrade *od = _od;
45552 + __be32 status;
45553 + struct nfs4_ol_stateid *stp;
45554 + struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
45555 +@@ -5179,8 +5194,9 @@ static void nfsd4_close_open_stateid(struct nfs4_ol_stateid *s)
45556 + */
45557 + __be32
45558 + nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45559 +- struct nfsd4_close *close)
45560 ++ void *_close)
45561 + {
45562 ++ struct nfsd4_close *close = _close;
45563 + __be32 status;
45564 + struct nfs4_ol_stateid *stp;
45565 + struct net *net = SVC_NET(rqstp);
45566 +@@ -5209,8 +5225,9 @@ out:
45567 +
45568 + __be32
45569 + nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45570 +- struct nfsd4_delegreturn *dr)
45571 ++ void *_dr)
45572 + {
45573 ++ struct nfsd4_delegreturn *dr = _dr;
45574 + struct nfs4_delegation *dp;
45575 + stateid_t *stateid = &dr->dr_stateid;
45576 + struct nfs4_stid *s;
45577 +@@ -5544,8 +5561,9 @@ out:
45578 + */
45579 + __be32
45580 + nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45581 +- struct nfsd4_lock *lock)
45582 ++ void *_lock)
45583 + {
45584 ++ struct nfsd4_lock *lock = _lock;
45585 + struct nfs4_openowner *open_sop = NULL;
45586 + struct nfs4_lockowner *lock_sop = NULL;
45587 + struct nfs4_ol_stateid *lock_stp = NULL;
45588 +@@ -5748,8 +5766,9 @@ static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct
45589 + */
45590 + __be32
45591 + nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45592 +- struct nfsd4_lockt *lockt)
45593 ++ void *_lockt)
45594 + {
45595 ++ struct nfsd4_lockt *lockt = _lockt;
45596 + struct file_lock *file_lock = NULL;
45597 + struct nfs4_lockowner *lo = NULL;
45598 + __be32 status;
45599 +@@ -5821,8 +5840,9 @@ out:
45600 +
45601 + __be32
45602 + nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
45603 +- struct nfsd4_locku *locku)
45604 ++ void *_locku)
45605 + {
45606 ++ struct nfsd4_locku *locku = _locku;
45607 + struct nfs4_ol_stateid *stp;
45608 + struct file *filp = NULL;
45609 + struct file_lock *file_lock = NULL;
45610 +@@ -5928,8 +5948,9 @@ check_for_locks(struct nfs4_file *fp, struct nfs4_lockowner *lowner)
45611 + __be32
45612 + nfsd4_release_lockowner(struct svc_rqst *rqstp,
45613 + struct nfsd4_compound_state *cstate,
45614 +- struct nfsd4_release_lockowner *rlockowner)
45615 ++ void *_rlockowner)
45616 + {
45617 ++ struct nfsd4_release_lockowner *rlockowner = _rlockowner;
45618 + clientid_t *clid = &rlockowner->rl_clientid;
45619 + struct nfs4_stateowner *sop;
45620 + struct nfs4_lockowner *lo = NULL;
45621 +@@ -6873,26 +6894,34 @@ clear_current_stateid(struct nfsd4_compound_state *cstate)
45622 + * functions to set current state id
45623 + */
45624 + void
45625 +-nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *odp)
45626 ++nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, void *_odp)
45627 + {
45628 ++ struct nfsd4_open_downgrade *odp = _odp;
45629 ++
45630 + put_stateid(cstate, &odp->od_stateid);
45631 + }
45632 +
45633 + void
45634 +-nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open)
45635 ++nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, void *_open)
45636 + {
45637 ++ struct nfsd4_open *open = _open;
45638 ++
45639 + put_stateid(cstate, &open->op_stateid);
45640 + }
45641 +
45642 + void
45643 +-nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
45644 ++nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, void *_close)
45645 + {
45646 ++ struct nfsd4_close *close = _close;
45647 ++
45648 + put_stateid(cstate, &close->cl_stateid);
45649 + }
45650 +
45651 + void
45652 +-nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lock)
45653 ++nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, void *_lock)
45654 + {
45655 ++ struct nfsd4_lock *lock = _lock;
45656 ++
45657 + put_stateid(cstate, &lock->lk_resp_stateid);
45658 + }
45659 +
45660 +@@ -6901,49 +6930,65 @@ nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lo
45661 + */
45662 +
45663 + void
45664 +-nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *odp)
45665 ++nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, void *_odp)
45666 + {
45667 ++ struct nfsd4_open_downgrade *odp = _odp;
45668 ++
45669 + get_stateid(cstate, &odp->od_stateid);
45670 + }
45671 +
45672 + void
45673 +-nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, struct nfsd4_delegreturn *drp)
45674 ++nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, void *_drp)
45675 + {
45676 ++ struct nfsd4_delegreturn *drp = _drp;
45677 ++
45678 + get_stateid(cstate, &drp->dr_stateid);
45679 + }
45680 +
45681 + void
45682 +-nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, struct nfsd4_free_stateid *fsp)
45683 ++nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, void *_fsp)
45684 + {
45685 ++ struct nfsd4_free_stateid *fsp = _fsp;
45686 ++
45687 + get_stateid(cstate, &fsp->fr_stateid);
45688 + }
45689 +
45690 + void
45691 +-nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr)
45692 ++nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, void *_setattr)
45693 + {
45694 ++ struct nfsd4_setattr *setattr = _setattr;
45695 ++
45696 + get_stateid(cstate, &setattr->sa_stateid);
45697 + }
45698 +
45699 + void
45700 +-nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
45701 ++nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, void *_close)
45702 + {
45703 ++ struct nfsd4_close *close = _close;
45704 ++
45705 + get_stateid(cstate, &close->cl_stateid);
45706 + }
45707 +
45708 + void
45709 +-nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, struct nfsd4_locku *locku)
45710 ++nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, void *_locku)
45711 + {
45712 ++ struct nfsd4_locku *locku = _locku;
45713 ++
45714 + get_stateid(cstate, &locku->lu_stateid);
45715 + }
45716 +
45717 + void
45718 +-nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, struct nfsd4_read *read)
45719 ++nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, void *_read)
45720 + {
45721 ++ struct nfsd4_read *read = _read;
45722 ++
45723 + get_stateid(cstate, &read->rd_stateid);
45724 + }
45725 +
45726 + void
45727 +-nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, struct nfsd4_write *write)
45728 ++nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, void *_write)
45729 + {
45730 ++ struct nfsd4_write *write = _write;
45731 ++
45732 + get_stateid(cstate, &write->wr_stateid);
45733 + }
45734 diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
45735 -index 1293520..4cc2062 100644
45736 +index 1600ec4..2c62d8d 100644
45737 --- a/fs/nfsd/nfs4xdr.c
45738 +++ b/fs/nfsd/nfs4xdr.c
45739 -@@ -1706,7 +1706,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
45740 +@@ -447,8 +447,9 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
45741 + }
45742 +
45743 + static __be32
45744 +-nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, stateid_t *sid)
45745 ++nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, void *_sid)
45746 + {
45747 ++ stateid_t *sid = _sid;
45748 + DECODE_HEAD;
45749 +
45750 + READ_BUF(sizeof(stateid_t));
45751 +@@ -459,8 +460,9 @@ nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, stateid_t *sid)
45752 + }
45753 +
45754 + static __be32
45755 +-nfsd4_decode_access(struct nfsd4_compoundargs *argp, struct nfsd4_access *access)
45756 ++nfsd4_decode_access(struct nfsd4_compoundargs *argp, void *_access)
45757 + {
45758 ++ struct nfsd4_access *access = _access;
45759 + DECODE_HEAD;
45760 +
45761 + READ_BUF(4);
45762 +@@ -469,8 +471,9 @@ nfsd4_decode_access(struct nfsd4_compoundargs *argp, struct nfsd4_access *access
45763 + DECODE_TAIL;
45764 + }
45765 +
45766 +-static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_cb_sec *cbs)
45767 ++static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, void *_cbs)
45768 + {
45769 ++ struct nfsd4_cb_sec *cbs = _cbs;
45770 + DECODE_HEAD;
45771 + u32 dummy, uid, gid;
45772 + char *machine_name;
45773 +@@ -549,8 +552,9 @@ static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_
45774 + DECODE_TAIL;
45775 + }
45776 +
45777 +-static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, struct nfsd4_backchannel_ctl *bc)
45778 ++static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, void *_bc)
45779 + {
45780 ++ struct nfsd4_backchannel_ctl *bc = _bc;
45781 + DECODE_HEAD;
45782 +
45783 + READ_BUF(4);
45784 +@@ -560,8 +564,9 @@ static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, stru
45785 + DECODE_TAIL;
45786 + }
45787 +
45788 +-static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, struct nfsd4_bind_conn_to_session *bcts)
45789 ++static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, void *_bcts)
45790 + {
45791 ++ struct nfsd4_bind_conn_to_session *bcts = _bcts;
45792 + DECODE_HEAD;
45793 +
45794 + READ_BUF(NFS4_MAX_SESSIONID_LEN + 8);
45795 +@@ -573,8 +578,9 @@ static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp,
45796 + }
45797 +
45798 + static __be32
45799 +-nfsd4_decode_close(struct nfsd4_compoundargs *argp, struct nfsd4_close *close)
45800 ++nfsd4_decode_close(struct nfsd4_compoundargs *argp, void *_close)
45801 + {
45802 ++ struct nfsd4_close *close = _close;
45803 + DECODE_HEAD;
45804 +
45805 + READ_BUF(4);
45806 +@@ -586,8 +592,9 @@ nfsd4_decode_close(struct nfsd4_compoundargs *argp, struct nfsd4_close *close)
45807 +
45808 +
45809 + static __be32
45810 +-nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit)
45811 ++nfsd4_decode_commit(struct nfsd4_compoundargs *argp, void *_commit)
45812 + {
45813 ++ struct nfsd4_commit *commit = _commit;
45814 + DECODE_HEAD;
45815 +
45816 + READ_BUF(12);
45817 +@@ -598,8 +605,9 @@ nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit
45818 + }
45819 +
45820 + static __be32
45821 +-nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create)
45822 ++nfsd4_decode_create(struct nfsd4_compoundargs *argp, void *_create)
45823 + {
45824 ++ struct nfsd4_create *create = _create;
45825 + DECODE_HEAD;
45826 +
45827 + READ_BUF(4);
45828 +@@ -642,20 +650,25 @@ nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create
45829 + }
45830 +
45831 + static inline __be32
45832 +-nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, struct nfsd4_delegreturn *dr)
45833 ++nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, void *_dr)
45834 + {
45835 ++ struct nfsd4_delegreturn *dr = _dr;
45836 ++
45837 + return nfsd4_decode_stateid(argp, &dr->dr_stateid);
45838 + }
45839 +
45840 + static inline __be32
45841 +-nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *getattr)
45842 ++nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, void *_getattr)
45843 + {
45844 ++ struct nfsd4_getattr *getattr = _getattr;
45845 ++
45846 + return nfsd4_decode_bitmap(argp, getattr->ga_bmval);
45847 + }
45848 +
45849 + static __be32
45850 +-nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link)
45851 ++nfsd4_decode_link(struct nfsd4_compoundargs *argp, void *_link)
45852 + {
45853 ++ struct nfsd4_link *link = _link;
45854 + DECODE_HEAD;
45855 +
45856 + READ_BUF(4);
45857 +@@ -669,8 +682,9 @@ nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link)
45858 + }
45859 +
45860 + static __be32
45861 +-nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
45862 ++nfsd4_decode_lock(struct nfsd4_compoundargs *argp, void *_lock)
45863 + {
45864 ++ struct nfsd4_lock *lock = _lock;
45865 + DECODE_HEAD;
45866 +
45867 + /*
45868 +@@ -709,8 +723,9 @@ nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
45869 + }
45870 +
45871 + static __be32
45872 +-nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt)
45873 ++nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, void *_lockt)
45874 + {
45875 ++ struct nfsd4_lockt *lockt = _lockt;
45876 + DECODE_HEAD;
45877 +
45878 + READ_BUF(32);
45879 +@@ -728,8 +743,9 @@ nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt)
45880 + }
45881 +
45882 + static __be32
45883 +-nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
45884 ++nfsd4_decode_locku(struct nfsd4_compoundargs *argp, void *_locku)
45885 + {
45886 ++ struct nfsd4_locku *locku = _locku;
45887 + DECODE_HEAD;
45888 +
45889 + READ_BUF(8);
45890 +@@ -748,8 +764,9 @@ nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
45891 + }
45892 +
45893 + static __be32
45894 +-nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, struct nfsd4_lookup *lookup)
45895 ++nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, void *_lookup)
45896 + {
45897 ++ struct nfsd4_lookup *lookup = _lookup;
45898 + DECODE_HEAD;
45899 +
45900 + READ_BUF(4);
45901 +@@ -847,8 +864,9 @@ xdr_error:
45902 + }
45903 +
45904 + static __be32
45905 +-nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
45906 ++nfsd4_decode_open(struct nfsd4_compoundargs *argp, void *_open)
45907 + {
45908 ++ struct nfsd4_open *open = _open;
45909 + DECODE_HEAD;
45910 + u32 dummy;
45911 +
45912 +@@ -960,8 +978,9 @@ nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
45913 + }
45914 +
45915 + static __be32
45916 +-nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_open_confirm *open_conf)
45917 ++nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, void *_open_conf)
45918 + {
45919 ++ struct nfsd4_open_confirm *open_conf = _open_conf;
45920 + DECODE_HEAD;
45921 +
45922 + if (argp->minorversion >= 1)
45923 +@@ -977,8 +996,9 @@ nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_open_con
45924 + }
45925 +
45926 + static __be32
45927 +-nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, struct nfsd4_open_downgrade *open_down)
45928 ++nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, void *_open_down)
45929 + {
45930 ++ struct nfsd4_open_downgrade *open_down = _open_down;
45931 + DECODE_HEAD;
45932 +
45933 + status = nfsd4_decode_stateid(argp, &open_down->od_stateid);
45934 +@@ -997,8 +1017,9 @@ nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, struct nfsd4_open_d
45935 + }
45936 +
45937 + static __be32
45938 +-nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, struct nfsd4_putfh *putfh)
45939 ++nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, void *_putfh)
45940 + {
45941 ++ struct nfsd4_putfh *putfh = _putfh;
45942 + DECODE_HEAD;
45943 +
45944 + READ_BUF(4);
45945 +@@ -1020,8 +1041,9 @@ nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, void *p)
45946 + }
45947 +
45948 + static __be32
45949 +-nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
45950 ++nfsd4_decode_read(struct nfsd4_compoundargs *argp, void *_read)
45951 + {
45952 ++ struct nfsd4_read *read = _read;
45953 + DECODE_HEAD;
45954 +
45955 + status = nfsd4_decode_stateid(argp, &read->rd_stateid);
45956 +@@ -1035,8 +1057,9 @@ nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
45957 + }
45958 +
45959 + static __be32
45960 +-nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir)
45961 ++nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, void *_readdir)
45962 + {
45963 ++ struct nfsd4_readdir *readdir = _readdir;
45964 + DECODE_HEAD;
45965 +
45966 + READ_BUF(24);
45967 +@@ -1051,8 +1074,9 @@ nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *read
45968 + }
45969 +
45970 + static __be32
45971 +-nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove)
45972 ++nfsd4_decode_remove(struct nfsd4_compoundargs *argp, void *_remove)
45973 + {
45974 ++ struct nfsd4_remove *remove = _remove;
45975 + DECODE_HEAD;
45976 +
45977 + READ_BUF(4);
45978 +@@ -1066,8 +1090,9 @@ nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove
45979 + }
45980 +
45981 + static __be32
45982 +-nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename)
45983 ++nfsd4_decode_rename(struct nfsd4_compoundargs *argp, void *_rename)
45984 + {
45985 ++ struct nfsd4_rename *rename = _rename;
45986 + DECODE_HEAD;
45987 +
45988 + READ_BUF(4);
45989 +@@ -1087,7 +1112,7 @@ nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename
45990 + }
45991 +
45992 + static __be32
45993 +-nfsd4_decode_renew(struct nfsd4_compoundargs *argp, clientid_t *clientid)
45994 ++nfsd4_decode_renew(struct nfsd4_compoundargs *argp, void *clientid)
45995 + {
45996 + DECODE_HEAD;
45997 +
45998 +@@ -1102,8 +1127,9 @@ nfsd4_decode_renew(struct nfsd4_compoundargs *argp, clientid_t *clientid)
45999 +
46000 + static __be32
46001 + nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp,
46002 +- struct nfsd4_secinfo *secinfo)
46003 ++ void *_secinfo)
46004 + {
46005 ++ struct nfsd4_secinfo *secinfo = _secinfo;
46006 + DECODE_HEAD;
46007 +
46008 + READ_BUF(4);
46009 +@@ -1118,8 +1144,9 @@ nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp,
46010 +
46011 + static __be32
46012 + nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
46013 +- struct nfsd4_secinfo_no_name *sin)
46014 ++ void *_sin)
46015 + {
46016 ++ struct nfsd4_secinfo_no_name *sin = _sin;
46017 + DECODE_HEAD;
46018 +
46019 + READ_BUF(4);
46020 +@@ -1128,8 +1155,9 @@ nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
46021 + }
46022 +
46023 + static __be32
46024 +-nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *setattr)
46025 ++nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, void *_setattr)
46026 + {
46027 ++ struct nfsd4_setattr *setattr = _setattr;
46028 + __be32 status;
46029 +
46030 + status = nfsd4_decode_stateid(argp, &setattr->sa_stateid);
46031 +@@ -1140,8 +1168,9 @@ nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *seta
46032 + }
46033 +
46034 + static __be32
46035 +-nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid *setclientid)
46036 ++nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, void *_setclientid)
46037 + {
46038 ++ struct nfsd4_setclientid *setclientid = _setclientid;
46039 + DECODE_HEAD;
46040 +
46041 + if (argp->minorversion >= 1)
46042 +@@ -1170,8 +1199,9 @@ nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclient
46043 + }
46044 +
46045 + static __be32
46046 +-nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid_confirm *scd_c)
46047 ++nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, void *_scd_c)
46048 + {
46049 ++ struct nfsd4_setclientid_confirm *scd_c = _scd_c;
46050 + DECODE_HEAD;
46051 +
46052 + if (argp->minorversion >= 1)
46053 +@@ -1186,8 +1216,9 @@ nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_s
46054 +
46055 + /* Also used for NVERIFY */
46056 + static __be32
46057 +-nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify)
46058 ++nfsd4_decode_verify(struct nfsd4_compoundargs *argp, void *_verify)
46059 + {
46060 ++ struct nfsd4_verify *verify = _verify;
46061 + DECODE_HEAD;
46062 +
46063 + if ((status = nfsd4_decode_bitmap(argp, verify->ve_bmval)))
46064 +@@ -1205,8 +1236,9 @@ nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify
46065 + }
46066 +
46067 + static __be32
46068 +-nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
46069 ++nfsd4_decode_write(struct nfsd4_compoundargs *argp, void *_write)
46070 + {
46071 ++ struct nfsd4_write *write = _write;
46072 + int avail;
46073 + int len;
46074 + DECODE_HEAD;
46075 +@@ -1256,8 +1288,9 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
46076 + }
46077 +
46078 + static __be32
46079 +-nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_release_lockowner *rlockowner)
46080 ++nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, void *_rlockowner)
46081 + {
46082 ++ struct nfsd4_release_lockowner *rlockowner = _rlockowner;
46083 + DECODE_HEAD;
46084 +
46085 + if (argp->minorversion >= 1)
46086 +@@ -1276,8 +1309,9 @@ nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_rel
46087 +
46088 + static __be32
46089 + nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp,
46090 +- struct nfsd4_exchange_id *exid)
46091 ++ void *_exid)
46092 + {
46093 ++ struct nfsd4_exchange_id *exid = _exid;
46094 + int dummy, tmp;
46095 + DECODE_HEAD;
46096 +
46097 +@@ -1380,8 +1414,9 @@ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp,
46098 +
46099 + static __be32
46100 + nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
46101 +- struct nfsd4_create_session *sess)
46102 ++ void *_sess)
46103 + {
46104 ++ struct nfsd4_create_session *sess = _sess;
46105 + DECODE_HEAD;
46106 + u32 dummy;
46107 +
46108 +@@ -1432,8 +1467,9 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
46109 +
46110 + static __be32
46111 + nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
46112 +- struct nfsd4_destroy_session *destroy_session)
46113 ++ void *_destroy_session)
46114 + {
46115 ++ struct nfsd4_destroy_session *destroy_session = _destroy_session;
46116 + DECODE_HEAD;
46117 + READ_BUF(NFS4_MAX_SESSIONID_LEN);
46118 + COPYMEM(destroy_session->sessionid.data, NFS4_MAX_SESSIONID_LEN);
46119 +@@ -1443,8 +1479,9 @@ nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
46120 +
46121 + static __be32
46122 + nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
46123 +- struct nfsd4_free_stateid *free_stateid)
46124 ++ void *_free_stateid)
46125 + {
46126 ++ struct nfsd4_free_stateid *free_stateid = _free_stateid;
46127 + DECODE_HEAD;
46128 +
46129 + READ_BUF(sizeof(stateid_t));
46130 +@@ -1456,8 +1493,9 @@ nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
46131 +
46132 + static __be32
46133 + nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
46134 +- struct nfsd4_sequence *seq)
46135 ++ void *_seq)
46136 + {
46137 ++ struct nfsd4_sequence *seq = _seq;
46138 + DECODE_HEAD;
46139 +
46140 + READ_BUF(NFS4_MAX_SESSIONID_LEN + 16);
46141 +@@ -1471,8 +1509,9 @@ nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
46142 + }
46143 +
46144 + static __be32
46145 +-nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid)
46146 ++nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, void *_test_stateid)
46147 + {
46148 ++ struct nfsd4_test_stateid *test_stateid = _test_stateid;
46149 + int i;
46150 + __be32 *p, status;
46151 + struct nfsd4_test_stateid_id *stateid;
46152 +@@ -1506,8 +1545,9 @@ xdr_error:
46153 + goto out;
46154 + }
46155 +
46156 +-static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, struct nfsd4_destroy_clientid *dc)
46157 ++static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, void *_dc)
46158 + {
46159 ++ struct nfsd4_destroy_clientid *dc = _dc;
46160 + DECODE_HEAD;
46161 +
46162 + READ_BUF(8);
46163 +@@ -1516,8 +1556,9 @@ static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, str
46164 + DECODE_TAIL;
46165 + }
46166 +
46167 +-static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, struct nfsd4_reclaim_complete *rc)
46168 ++static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, void *_rc)
46169 + {
46170 ++ struct nfsd4_reclaim_complete *rc = _rc;
46171 + DECODE_HEAD;
46172 +
46173 + READ_BUF(4);
46174 +@@ -1529,8 +1570,9 @@ static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, str
46175 + #ifdef CONFIG_NFSD_PNFS
46176 + static __be32
46177 + nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp,
46178 +- struct nfsd4_getdeviceinfo *gdev)
46179 ++ void *_gdev)
46180 + {
46181 ++ struct nfsd4_getdeviceinfo *gdev = _gdev;
46182 + DECODE_HEAD;
46183 + u32 num, i;
46184 +
46185 +@@ -1554,8 +1596,9 @@ nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp,
46186 +
46187 + static __be32
46188 + nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
46189 +- struct nfsd4_layoutget *lgp)
46190 ++ void *_lgp)
46191 + {
46192 ++ struct nfsd4_layoutget *lgp = _lgp;
46193 + DECODE_HEAD;
46194 +
46195 + READ_BUF(36);
46196 +@@ -1578,8 +1621,9 @@ nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
46197 +
46198 + static __be32
46199 + nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
46200 +- struct nfsd4_layoutcommit *lcp)
46201 ++ void *_lcp)
46202 + {
46203 ++ struct nfsd4_layoutcommit *lcp = _lcp;
46204 + DECODE_HEAD;
46205 + u32 timechange;
46206 +
46207 +@@ -1626,8 +1670,9 @@ nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
46208 +
46209 + static __be32
46210 + nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp,
46211 +- struct nfsd4_layoutreturn *lrp)
46212 ++ void *_lrp)
46213 + {
46214 ++ struct nfsd4_layoutreturn *lrp = _lrp;
46215 + DECODE_HEAD;
46216 +
46217 + READ_BUF(16);
46218 +@@ -1661,8 +1706,9 @@ nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp,
46219 +
46220 + static __be32
46221 + nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
46222 +- struct nfsd4_fallocate *fallocate)
46223 ++ void *_fallocate)
46224 + {
46225 ++ struct nfsd4_fallocate *fallocate = _fallocate;
46226 + DECODE_HEAD;
46227 +
46228 + status = nfsd4_decode_stateid(argp, &fallocate->falloc_stateid);
46229 +@@ -1677,8 +1723,9 @@ nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
46230 + }
46231 +
46232 + static __be32
46233 +-nfsd4_decode_clone(struct nfsd4_compoundargs *argp, struct nfsd4_clone *clone)
46234 ++nfsd4_decode_clone(struct nfsd4_compoundargs *argp, void *_clone)
46235 + {
46236 ++ struct nfsd4_clone *clone = _clone;
46237 + DECODE_HEAD;
46238 +
46239 + status = nfsd4_decode_stateid(argp, &clone->cl_src_stateid);
46240 +@@ -1696,8 +1743,9 @@ nfsd4_decode_clone(struct nfsd4_compoundargs *argp, struct nfsd4_clone *clone)
46241 + }
46242 +
46243 + static __be32
46244 +-nfsd4_decode_seek(struct nfsd4_compoundargs *argp, struct nfsd4_seek *seek)
46245 ++nfsd4_decode_seek(struct nfsd4_compoundargs *argp, void *_seek)
46246 + {
46247 ++ struct nfsd4_seek *seek = _seek;
46248 + DECODE_HEAD;
46249 +
46250 + status = nfsd4_decode_stateid(argp, &seek->seek_stateid);
46251 +@@ -1725,88 +1773,88 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
46252
46253 typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
46254
46255 -static nfsd4_dec nfsd4_dec_ops[] = {
46256 +- [OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access,
46257 +- [OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close,
46258 +- [OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit,
46259 +- [OP_CREATE] = (nfsd4_dec)nfsd4_decode_create,
46260 +- [OP_DELEGPURGE] = (nfsd4_dec)nfsd4_decode_notsupp,
46261 +- [OP_DELEGRETURN] = (nfsd4_dec)nfsd4_decode_delegreturn,
46262 +- [OP_GETATTR] = (nfsd4_dec)nfsd4_decode_getattr,
46263 +- [OP_GETFH] = (nfsd4_dec)nfsd4_decode_noop,
46264 +- [OP_LINK] = (nfsd4_dec)nfsd4_decode_link,
46265 +- [OP_LOCK] = (nfsd4_dec)nfsd4_decode_lock,
46266 +- [OP_LOCKT] = (nfsd4_dec)nfsd4_decode_lockt,
46267 +- [OP_LOCKU] = (nfsd4_dec)nfsd4_decode_locku,
46268 +- [OP_LOOKUP] = (nfsd4_dec)nfsd4_decode_lookup,
46269 +- [OP_LOOKUPP] = (nfsd4_dec)nfsd4_decode_noop,
46270 +- [OP_NVERIFY] = (nfsd4_dec)nfsd4_decode_verify,
46271 +- [OP_OPEN] = (nfsd4_dec)nfsd4_decode_open,
46272 +- [OP_OPENATTR] = (nfsd4_dec)nfsd4_decode_notsupp,
46273 +- [OP_OPEN_CONFIRM] = (nfsd4_dec)nfsd4_decode_open_confirm,
46274 +- [OP_OPEN_DOWNGRADE] = (nfsd4_dec)nfsd4_decode_open_downgrade,
46275 +- [OP_PUTFH] = (nfsd4_dec)nfsd4_decode_putfh,
46276 +- [OP_PUTPUBFH] = (nfsd4_dec)nfsd4_decode_putpubfh,
46277 +- [OP_PUTROOTFH] = (nfsd4_dec)nfsd4_decode_noop,
46278 +- [OP_READ] = (nfsd4_dec)nfsd4_decode_read,
46279 +- [OP_READDIR] = (nfsd4_dec)nfsd4_decode_readdir,
46280 +- [OP_READLINK] = (nfsd4_dec)nfsd4_decode_noop,
46281 +- [OP_REMOVE] = (nfsd4_dec)nfsd4_decode_remove,
46282 +- [OP_RENAME] = (nfsd4_dec)nfsd4_decode_rename,
46283 +- [OP_RENEW] = (nfsd4_dec)nfsd4_decode_renew,
46284 +- [OP_RESTOREFH] = (nfsd4_dec)nfsd4_decode_noop,
46285 +- [OP_SAVEFH] = (nfsd4_dec)nfsd4_decode_noop,
46286 +- [OP_SECINFO] = (nfsd4_dec)nfsd4_decode_secinfo,
46287 +- [OP_SETATTR] = (nfsd4_dec)nfsd4_decode_setattr,
46288 +- [OP_SETCLIENTID] = (nfsd4_dec)nfsd4_decode_setclientid,
46289 +- [OP_SETCLIENTID_CONFIRM] = (nfsd4_dec)nfsd4_decode_setclientid_confirm,
46290 +- [OP_VERIFY] = (nfsd4_dec)nfsd4_decode_verify,
46291 +- [OP_WRITE] = (nfsd4_dec)nfsd4_decode_write,
46292 +- [OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_release_lockowner,
46293 +static const nfsd4_dec nfsd4_dec_ops[] = {
46294 - [OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access,
46295 - [OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close,
46296 - [OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit,
46297 ++ [OP_ACCESS] = nfsd4_decode_access,
46298 ++ [OP_CLOSE] = nfsd4_decode_close,
46299 ++ [OP_COMMIT] = nfsd4_decode_commit,
46300 ++ [OP_CREATE] = nfsd4_decode_create,
46301 ++ [OP_DELEGPURGE] = nfsd4_decode_notsupp,
46302 ++ [OP_DELEGRETURN] = nfsd4_decode_delegreturn,
46303 ++ [OP_GETATTR] = nfsd4_decode_getattr,
46304 ++ [OP_GETFH] = nfsd4_decode_noop,
46305 ++ [OP_LINK] = nfsd4_decode_link,
46306 ++ [OP_LOCK] = nfsd4_decode_lock,
46307 ++ [OP_LOCKT] = nfsd4_decode_lockt,
46308 ++ [OP_LOCKU] = nfsd4_decode_locku,
46309 ++ [OP_LOOKUP] = nfsd4_decode_lookup,
46310 ++ [OP_LOOKUPP] = nfsd4_decode_noop,
46311 ++ [OP_NVERIFY] = nfsd4_decode_verify,
46312 ++ [OP_OPEN] = nfsd4_decode_open,
46313 ++ [OP_OPENATTR] = nfsd4_decode_notsupp,
46314 ++ [OP_OPEN_CONFIRM] = nfsd4_decode_open_confirm,
46315 ++ [OP_OPEN_DOWNGRADE] = nfsd4_decode_open_downgrade,
46316 ++ [OP_PUTFH] = nfsd4_decode_putfh,
46317 ++ [OP_PUTPUBFH] = nfsd4_decode_putpubfh,
46318 ++ [OP_PUTROOTFH] = nfsd4_decode_noop,
46319 ++ [OP_READ] = nfsd4_decode_read,
46320 ++ [OP_READDIR] = nfsd4_decode_readdir,
46321 ++ [OP_READLINK] = nfsd4_decode_noop,
46322 ++ [OP_REMOVE] = nfsd4_decode_remove,
46323 ++ [OP_RENAME] = nfsd4_decode_rename,
46324 ++ [OP_RENEW] = nfsd4_decode_renew,
46325 ++ [OP_RESTOREFH] = nfsd4_decode_noop,
46326 ++ [OP_SAVEFH] = nfsd4_decode_noop,
46327 ++ [OP_SECINFO] = nfsd4_decode_secinfo,
46328 ++ [OP_SETATTR] = nfsd4_decode_setattr,
46329 ++ [OP_SETCLIENTID] = nfsd4_decode_setclientid,
46330 ++ [OP_SETCLIENTID_CONFIRM] = nfsd4_decode_setclientid_confirm,
46331 ++ [OP_VERIFY] = nfsd4_decode_verify,
46332 ++ [OP_WRITE] = nfsd4_decode_write,
46333 ++ [OP_RELEASE_LOCKOWNER] = nfsd4_decode_release_lockowner,
46334 +
46335 + /* new operations for NFSv4.1 */
46336 +- [OP_BACKCHANNEL_CTL] = (nfsd4_dec)nfsd4_decode_backchannel_ctl,
46337 +- [OP_BIND_CONN_TO_SESSION]= (nfsd4_dec)nfsd4_decode_bind_conn_to_session,
46338 +- [OP_EXCHANGE_ID] = (nfsd4_dec)nfsd4_decode_exchange_id,
46339 +- [OP_CREATE_SESSION] = (nfsd4_dec)nfsd4_decode_create_session,
46340 +- [OP_DESTROY_SESSION] = (nfsd4_dec)nfsd4_decode_destroy_session,
46341 +- [OP_FREE_STATEID] = (nfsd4_dec)nfsd4_decode_free_stateid,
46342 +- [OP_GET_DIR_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
46343 ++ [OP_BACKCHANNEL_CTL] = nfsd4_decode_backchannel_ctl,
46344 ++ [OP_BIND_CONN_TO_SESSION]= nfsd4_decode_bind_conn_to_session,
46345 ++ [OP_EXCHANGE_ID] = nfsd4_decode_exchange_id,
46346 ++ [OP_CREATE_SESSION] = nfsd4_decode_create_session,
46347 ++ [OP_DESTROY_SESSION] = nfsd4_decode_destroy_session,
46348 ++ [OP_FREE_STATEID] = nfsd4_decode_free_stateid,
46349 ++ [OP_GET_DIR_DELEGATION] = nfsd4_decode_notsupp,
46350 + #ifdef CONFIG_NFSD_PNFS
46351 +- [OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_getdeviceinfo,
46352 +- [OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
46353 +- [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_layoutcommit,
46354 +- [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_layoutget,
46355 +- [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_layoutreturn,
46356 ++ [OP_GETDEVICEINFO] = nfsd4_decode_getdeviceinfo,
46357 ++ [OP_GETDEVICELIST] = nfsd4_decode_notsupp,
46358 ++ [OP_LAYOUTCOMMIT] = nfsd4_decode_layoutcommit,
46359 ++ [OP_LAYOUTGET] = nfsd4_decode_layoutget,
46360 ++ [OP_LAYOUTRETURN] = nfsd4_decode_layoutreturn,
46361 + #else
46362 +- [OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_notsupp,
46363 +- [OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
46364 +- [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_notsupp,
46365 +- [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_notsupp,
46366 +- [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_notsupp,
46367 ++ [OP_GETDEVICEINFO] = nfsd4_decode_notsupp,
46368 ++ [OP_GETDEVICELIST] = nfsd4_decode_notsupp,
46369 ++ [OP_LAYOUTCOMMIT] = nfsd4_decode_notsupp,
46370 ++ [OP_LAYOUTGET] = nfsd4_decode_notsupp,
46371 ++ [OP_LAYOUTRETURN] = nfsd4_decode_notsupp,
46372 + #endif
46373 +- [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_secinfo_no_name,
46374 +- [OP_SEQUENCE] = (nfsd4_dec)nfsd4_decode_sequence,
46375 +- [OP_SET_SSV] = (nfsd4_dec)nfsd4_decode_notsupp,
46376 +- [OP_TEST_STATEID] = (nfsd4_dec)nfsd4_decode_test_stateid,
46377 +- [OP_WANT_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
46378 +- [OP_DESTROY_CLIENTID] = (nfsd4_dec)nfsd4_decode_destroy_clientid,
46379 +- [OP_RECLAIM_COMPLETE] = (nfsd4_dec)nfsd4_decode_reclaim_complete,
46380 ++ [OP_SECINFO_NO_NAME] = nfsd4_decode_secinfo_no_name,
46381 ++ [OP_SEQUENCE] = nfsd4_decode_sequence,
46382 ++ [OP_SET_SSV] = nfsd4_decode_notsupp,
46383 ++ [OP_TEST_STATEID] = nfsd4_decode_test_stateid,
46384 ++ [OP_WANT_DELEGATION] = nfsd4_decode_notsupp,
46385 ++ [OP_DESTROY_CLIENTID] = nfsd4_decode_destroy_clientid,
46386 ++ [OP_RECLAIM_COMPLETE] = nfsd4_decode_reclaim_complete,
46387 +
46388 + /* new operations for NFSv4.2 */
46389 +- [OP_ALLOCATE] = (nfsd4_dec)nfsd4_decode_fallocate,
46390 +- [OP_COPY] = (nfsd4_dec)nfsd4_decode_notsupp,
46391 +- [OP_COPY_NOTIFY] = (nfsd4_dec)nfsd4_decode_notsupp,
46392 +- [OP_DEALLOCATE] = (nfsd4_dec)nfsd4_decode_fallocate,
46393 +- [OP_IO_ADVISE] = (nfsd4_dec)nfsd4_decode_notsupp,
46394 +- [OP_LAYOUTERROR] = (nfsd4_dec)nfsd4_decode_notsupp,
46395 +- [OP_LAYOUTSTATS] = (nfsd4_dec)nfsd4_decode_notsupp,
46396 +- [OP_OFFLOAD_CANCEL] = (nfsd4_dec)nfsd4_decode_notsupp,
46397 +- [OP_OFFLOAD_STATUS] = (nfsd4_dec)nfsd4_decode_notsupp,
46398 +- [OP_READ_PLUS] = (nfsd4_dec)nfsd4_decode_notsupp,
46399 +- [OP_SEEK] = (nfsd4_dec)nfsd4_decode_seek,
46400 +- [OP_WRITE_SAME] = (nfsd4_dec)nfsd4_decode_notsupp,
46401 +- [OP_CLONE] = (nfsd4_dec)nfsd4_decode_clone,
46402 ++ [OP_ALLOCATE] = nfsd4_decode_fallocate,
46403 ++ [OP_COPY] = nfsd4_decode_notsupp,
46404 ++ [OP_COPY_NOTIFY] = nfsd4_decode_notsupp,
46405 ++ [OP_DEALLOCATE] = nfsd4_decode_fallocate,
46406 ++ [OP_IO_ADVISE] = nfsd4_decode_notsupp,
46407 ++ [OP_LAYOUTERROR] = nfsd4_decode_notsupp,
46408 ++ [OP_LAYOUTSTATS] = nfsd4_decode_notsupp,
46409 ++ [OP_OFFLOAD_CANCEL] = nfsd4_decode_notsupp,
46410 ++ [OP_OFFLOAD_STATUS] = nfsd4_decode_notsupp,
46411 ++ [OP_READ_PLUS] = nfsd4_decode_notsupp,
46412 ++ [OP_SEEK] = nfsd4_decode_seek,
46413 ++ [OP_WRITE_SAME] = nfsd4_decode_notsupp,
46414 ++ [OP_CLONE] = nfsd4_decode_clone,
46415 + };
46416 +
46417 + static inline bool
46418 +@@ -3036,8 +3084,9 @@ nfsd4_encode_stateid(struct xdr_stream *xdr, stateid_t *sid)
46419 + }
46420 +
46421 + static __be32
46422 +-nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_access *access)
46423 ++nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, void *_access)
46424 + {
46425 ++ struct nfsd4_access *access = _access;
46426 + struct xdr_stream *xdr = &resp->xdr;
46427 + __be32 *p;
46428 +
46429 +@@ -3051,8 +3100,9 @@ nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
46430 + return nfserr;
46431 + }
46432 +
46433 +-static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_bind_conn_to_session *bcts)
46434 ++static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, __be32 nfserr, void *_bcts)
46435 + {
46436 ++ struct nfsd4_bind_conn_to_session *bcts = _bcts;
46437 + struct xdr_stream *xdr = &resp->xdr;
46438 + __be32 *p;
46439 +
46440 +@@ -3070,8 +3120,10 @@ static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp,
46441 + }
46442 +
46443 + static __be32
46444 +-nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_close *close)
46445 ++nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr, void *_close)
46446 + {
46447 ++ struct nfsd4_close *close = _close;
46448 ++
46449 + struct xdr_stream *xdr = &resp->xdr;
46450 +
46451 + if (!nfserr)
46452 +@@ -3082,8 +3134,9 @@ nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_c
46453 +
46454 +
46455 + static __be32
46456 +-nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_commit *commit)
46457 ++nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, void *_commit)
46458 + {
46459 ++ struct nfsd4_commit *commit = _commit;
46460 + struct xdr_stream *xdr = &resp->xdr;
46461 + __be32 *p;
46462 +
46463 +@@ -3098,8 +3151,9 @@ nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
46464 + }
46465 +
46466 + static __be32
46467 +-nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_create *create)
46468 ++nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr, void *_create)
46469 + {
46470 ++ struct nfsd4_create *create = _create;
46471 + struct xdr_stream *xdr = &resp->xdr;
46472 + __be32 *p;
46473 +
46474 +@@ -3115,8 +3169,9 @@ nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
46475 + }
46476 +
46477 + static __be32
46478 +-nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_getattr *getattr)
46479 ++nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, void *_getattr)
46480 + {
46481 ++ struct nfsd4_getattr *getattr = _getattr;
46482 + struct svc_fh *fhp = getattr->ga_fhp;
46483 + struct xdr_stream *xdr = &resp->xdr;
46484 +
46485 +@@ -3130,8 +3185,9 @@ nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4
46486 + }
46487 +
46488 + static __be32
46489 +-nfsd4_encode_getfh(struct nfsd4_compoundres *resp, __be32 nfserr, struct svc_fh **fhpp)
46490 ++nfsd4_encode_getfh(struct nfsd4_compoundres *resp, __be32 nfserr, void *_fhpp)
46491 + {
46492 ++ struct svc_fh **fhpp = (struct svc_fh **)_fhpp;
46493 + struct xdr_stream *xdr = &resp->xdr;
46494 + struct svc_fh *fhp = *fhpp;
46495 + unsigned int len;
46496 +@@ -3187,8 +3243,10 @@ again:
46497 + }
46498 +
46499 + static __be32
46500 +-nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lock *lock)
46501 ++nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lock)
46502 + {
46503 ++ struct nfsd4_lock *lock = _lock;
46504 ++
46505 + struct xdr_stream *xdr = &resp->xdr;
46506 +
46507 + if (!nfserr)
46508 +@@ -3200,8 +3258,9 @@ nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lo
46509 + }
46510 +
46511 + static __be32
46512 +-nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lockt *lockt)
46513 ++nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lockt)
46514 + {
46515 ++ struct nfsd4_lockt *lockt = _lockt;
46516 + struct xdr_stream *xdr = &resp->xdr;
46517 +
46518 + if (nfserr == nfserr_denied)
46519 +@@ -3210,8 +3269,9 @@ nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_l
46520 + }
46521 +
46522 + static __be32
46523 +-nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_locku *locku)
46524 ++nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr, void *_locku)
46525 + {
46526 ++ struct nfsd4_locku *locku = _locku;
46527 + struct xdr_stream *xdr = &resp->xdr;
46528 +
46529 + if (!nfserr)
46530 +@@ -3222,8 +3282,9 @@ nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_l
46531 +
46532 +
46533 + static __be32
46534 +-nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_link *link)
46535 ++nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr, void *_link)
46536 + {
46537 ++ struct nfsd4_link *link = _link;
46538 + struct xdr_stream *xdr = &resp->xdr;
46539 + __be32 *p;
46540 +
46541 +@@ -3238,8 +3299,9 @@ nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_li
46542 +
46543 +
46544 + static __be32
46545 +-nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open *open)
46546 ++nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, void *_open)
46547 + {
46548 ++ struct nfsd4_open *open = _open;
46549 + struct xdr_stream *xdr = &resp->xdr;
46550 + __be32 *p;
46551 +
46552 +@@ -3336,8 +3398,10 @@ out:
46553 + }
46554 +
46555 + static __be32
46556 +-nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open_confirm *oc)
46557 ++nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr, void *_oc)
46558 + {
46559 ++ struct nfsd4_open_confirm *oc = _oc;
46560 ++
46561 + struct xdr_stream *xdr = &resp->xdr;
46562 +
46563 + if (!nfserr)
46564 +@@ -3347,8 +3411,10 @@ nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr, struct
46565 + }
46566 +
46567 + static __be32
46568 +-nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open_downgrade *od)
46569 ++nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, __be32 nfserr, void *_od)
46570 + {
46571 ++ struct nfsd4_open_downgrade *od = _od;
46572 ++
46573 + struct xdr_stream *xdr = &resp->xdr;
46574 +
46575 + if (!nfserr)
46576 +@@ -3478,9 +3544,9 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp,
46577 + }
46578 +
46579 + static __be32
46580 +-nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
46581 +- struct nfsd4_read *read)
46582 ++nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, void *_read)
46583 + {
46584 ++ struct nfsd4_read *read = _read;
46585 + unsigned long maxcount;
46586 + struct xdr_stream *xdr = &resp->xdr;
46587 + struct file *file = read->rd_filp;
46588 +@@ -3532,8 +3598,9 @@ out:
46589 + }
46590 +
46591 + static __be32
46592 +-nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_readlink *readlink)
46593 ++nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, void *_readlink)
46594 + {
46595 ++ struct nfsd4_readlink *readlink = _readlink;
46596 + int maxcount;
46597 + __be32 wire_count;
46598 + int zero = 0;
46599 +@@ -3577,8 +3644,9 @@ nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd
46600 + }
46601 +
46602 + static __be32
46603 +-nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_readdir *readdir)
46604 ++nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, void *_readdir)
46605 + {
46606 ++ struct nfsd4_readdir *readdir = _readdir;
46607 + int maxcount;
46608 + int bytes_left;
46609 + loff_t offset;
46610 +@@ -3670,8 +3738,9 @@ err_no_verf:
46611 + }
46612 +
46613 + static __be32
46614 +-nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_remove *remove)
46615 ++nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr, void *_remove)
46616 + {
46617 ++ struct nfsd4_remove *remove = _remove;
46618 + struct xdr_stream *xdr = &resp->xdr;
46619 + __be32 *p;
46620 +
46621 +@@ -3685,8 +3754,9 @@ nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
46622 + }
46623 +
46624 + static __be32
46625 +-nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_rename *rename)
46626 ++nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, void *_rename)
46627 + {
46628 ++ struct nfsd4_rename *rename = _rename;
46629 + struct xdr_stream *xdr = &resp->xdr;
46630 + __be32 *p;
46631 +
46632 +@@ -3702,8 +3772,9 @@ nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
46633 +
46634 + static __be32
46635 + nfsd4_do_encode_secinfo(struct xdr_stream *xdr,
46636 +- __be32 nfserr, struct svc_export *exp)
46637 ++ __be32 nfserr, void *_exp)
46638 + {
46639 ++ struct svc_export *exp = _exp;
46640 + u32 i, nflavs, supported;
46641 + struct exp_flavor_info *flavs;
46642 + struct exp_flavor_info def_flavs[2];
46643 +@@ -3778,8 +3849,9 @@ out:
46644 +
46645 + static __be32
46646 + nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
46647 +- struct nfsd4_secinfo *secinfo)
46648 ++ void *_secinfo)
46649 + {
46650 ++ struct nfsd4_secinfo *secinfo = _secinfo;
46651 + struct xdr_stream *xdr = &resp->xdr;
46652 +
46653 + return nfsd4_do_encode_secinfo(xdr, nfserr, secinfo->si_exp);
46654 +@@ -3787,8 +3859,9 @@ nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
46655 +
46656 + static __be32
46657 + nfsd4_encode_secinfo_no_name(struct nfsd4_compoundres *resp, __be32 nfserr,
46658 +- struct nfsd4_secinfo_no_name *secinfo)
46659 ++ void *_secinfo)
46660 + {
46661 ++ struct nfsd4_secinfo_no_name *secinfo = _secinfo;
46662 + struct xdr_stream *xdr = &resp->xdr;
46663 +
46664 + return nfsd4_do_encode_secinfo(xdr, nfserr, secinfo->sin_exp);
46665 +@@ -3799,8 +3872,9 @@ nfsd4_encode_secinfo_no_name(struct nfsd4_compoundres *resp, __be32 nfserr,
46666 + * regardless of the error status.
46667 + */
46668 + static __be32
46669 +-nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_setattr *setattr)
46670 ++nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr, void *_setattr)
46671 + {
46672 ++ struct nfsd4_setattr *setattr = _setattr;
46673 + struct xdr_stream *xdr = &resp->xdr;
46674 + __be32 *p;
46675 +
46676 +@@ -3823,8 +3897,9 @@ nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4
46677 + }
46678 +
46679 + static __be32
46680 +-nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_setclientid *scd)
46681 ++nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr, void *_scd)
46682 + {
46683 ++ struct nfsd4_setclientid *scd = _scd;
46684 + struct xdr_stream *xdr = &resp->xdr;
46685 + __be32 *p;
46686 +
46687 +@@ -3847,8 +3922,9 @@ nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr, struct n
46688 + }
46689 +
46690 + static __be32
46691 +-nfsd4_encode_write(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_write *write)
46692 ++nfsd4_encode_write(struct nfsd4_compoundres *resp, __be32 nfserr, void *_write)
46693 + {
46694 ++ struct nfsd4_write *write = _write;
46695 + struct xdr_stream *xdr = &resp->xdr;
46696 + __be32 *p;
46697 +
46698 +@@ -3874,8 +3950,9 @@ static const u32 nfs4_minimal_spo_must_enforce[2] = {
46699 +
46700 + static __be32
46701 + nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
46702 +- struct nfsd4_exchange_id *exid)
46703 ++ void *_exid)
46704 + {
46705 ++ struct nfsd4_exchange_id *exid = _exid;
46706 + struct xdr_stream *xdr = &resp->xdr;
46707 + __be32 *p;
46708 + char *major_id;
46709 +@@ -3952,8 +4029,9 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
46710 +
46711 + static __be32
46712 + nfsd4_encode_create_session(struct nfsd4_compoundres *resp, __be32 nfserr,
46713 +- struct nfsd4_create_session *sess)
46714 ++ void *_sess)
46715 + {
46716 ++ struct nfsd4_create_session *sess = _sess;
46717 + struct xdr_stream *xdr = &resp->xdr;
46718 + __be32 *p;
46719 +
46720 +@@ -4008,8 +4086,9 @@ nfsd4_encode_create_session(struct nfsd4_compoundres *resp, __be32 nfserr,
46721 +
46722 + static __be32
46723 + nfsd4_encode_sequence(struct nfsd4_compoundres *resp, __be32 nfserr,
46724 +- struct nfsd4_sequence *seq)
46725 ++ void *_seq)
46726 + {
46727 ++ struct nfsd4_sequence *seq = _seq;
46728 + struct xdr_stream *xdr = &resp->xdr;
46729 + __be32 *p;
46730 +
46731 +@@ -4034,8 +4113,9 @@ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, __be32 nfserr,
46732 +
46733 + static __be32
46734 + nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,
46735 +- struct nfsd4_test_stateid *test_stateid)
46736 ++ void *_test_stateid)
46737 + {
46738 ++ struct nfsd4_test_stateid *test_stateid = _test_stateid;
46739 + struct xdr_stream *xdr = &resp->xdr;
46740 + struct nfsd4_test_stateid_id *stateid, *next;
46741 + __be32 *p;
46742 +@@ -4057,9 +4137,9 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,
46743 +
46744 + #ifdef CONFIG_NFSD_PNFS
46745 + static __be32
46746 +-nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
46747 +- struct nfsd4_getdeviceinfo *gdev)
46748 ++nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr, void *_gdev)
46749 + {
46750 ++ struct nfsd4_getdeviceinfo *gdev = _gdev;
46751 + struct xdr_stream *xdr = &resp->xdr;
46752 + const struct nfsd4_layout_ops *ops =
46753 + nfsd4_layout_ops[gdev->gd_layout_type];
46754 +@@ -4127,9 +4207,9 @@ toosmall:
46755 + }
46756 +
46757 + static __be32
46758 +-nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr,
46759 +- struct nfsd4_layoutget *lgp)
46760 ++nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lgp)
46761 + {
46762 ++ struct nfsd4_layoutget *lgp = _lgp;
46763 + struct xdr_stream *xdr = &resp->xdr;
46764 + const struct nfsd4_layout_ops *ops =
46765 + nfsd4_layout_ops[lgp->lg_layout_type];
46766 +@@ -4162,9 +4242,9 @@ out:
46767 + }
46768 +
46769 + static __be32
46770 +-nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr,
46771 +- struct nfsd4_layoutcommit *lcp)
46772 ++nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lcp)
46773 + {
46774 ++ struct nfsd4_layoutcommit *lcp = _lcp;
46775 + struct xdr_stream *xdr = &resp->xdr;
46776 + __be32 *p;
46777 +
46778 +@@ -4186,9 +4266,9 @@ nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr,
46779 + }
46780 +
46781 + static __be32
46782 +-nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr,
46783 +- struct nfsd4_layoutreturn *lrp)
46784 ++nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lrp)
46785 + {
46786 ++ struct nfsd4_layoutreturn *lrp = _lrp;
46787 + struct xdr_stream *xdr = &resp->xdr;
46788 + __be32 *p;
46789 +
46790 +@@ -4207,8 +4287,9 @@ nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr,
46791 +
46792 + static __be32
46793 + nfsd4_encode_seek(struct nfsd4_compoundres *resp, __be32 nfserr,
46794 +- struct nfsd4_seek *seek)
46795 ++ void *_seek)
46796 + {
46797 ++ struct nfsd4_seek *seek= (struct nfsd4_seek *)_seek;
46798 + __be32 *p;
46799 +
46800 + if (nfserr)
46801 +@@ -4235,87 +4316,87 @@ typedef __be32(* nfsd4_enc)(struct nfsd4_compoundres *, __be32, void *);
46802 + * done in the decoding phase.
46803 + */
46804 + static nfsd4_enc nfsd4_enc_ops[] = {
46805 +- [OP_ACCESS] = (nfsd4_enc)nfsd4_encode_access,
46806 +- [OP_CLOSE] = (nfsd4_enc)nfsd4_encode_close,
46807 +- [OP_COMMIT] = (nfsd4_enc)nfsd4_encode_commit,
46808 +- [OP_CREATE] = (nfsd4_enc)nfsd4_encode_create,
46809 +- [OP_DELEGPURGE] = (nfsd4_enc)nfsd4_encode_noop,
46810 +- [OP_DELEGRETURN] = (nfsd4_enc)nfsd4_encode_noop,
46811 +- [OP_GETATTR] = (nfsd4_enc)nfsd4_encode_getattr,
46812 +- [OP_GETFH] = (nfsd4_enc)nfsd4_encode_getfh,
46813 +- [OP_LINK] = (nfsd4_enc)nfsd4_encode_link,
46814 +- [OP_LOCK] = (nfsd4_enc)nfsd4_encode_lock,
46815 +- [OP_LOCKT] = (nfsd4_enc)nfsd4_encode_lockt,
46816 +- [OP_LOCKU] = (nfsd4_enc)nfsd4_encode_locku,
46817 +- [OP_LOOKUP] = (nfsd4_enc)nfsd4_encode_noop,
46818 +- [OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop,
46819 +- [OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop,
46820 +- [OP_OPEN] = (nfsd4_enc)nfsd4_encode_open,
46821 +- [OP_OPENATTR] = (nfsd4_enc)nfsd4_encode_noop,
46822 +- [OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm,
46823 +- [OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade,
46824 +- [OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop,
46825 +- [OP_PUTPUBFH] = (nfsd4_enc)nfsd4_encode_noop,
46826 +- [OP_PUTROOTFH] = (nfsd4_enc)nfsd4_encode_noop,
46827 +- [OP_READ] = (nfsd4_enc)nfsd4_encode_read,
46828 +- [OP_READDIR] = (nfsd4_enc)nfsd4_encode_readdir,
46829 +- [OP_READLINK] = (nfsd4_enc)nfsd4_encode_readlink,
46830 +- [OP_REMOVE] = (nfsd4_enc)nfsd4_encode_remove,
46831 +- [OP_RENAME] = (nfsd4_enc)nfsd4_encode_rename,
46832 +- [OP_RENEW] = (nfsd4_enc)nfsd4_encode_noop,
46833 +- [OP_RESTOREFH] = (nfsd4_enc)nfsd4_encode_noop,
46834 +- [OP_SAVEFH] = (nfsd4_enc)nfsd4_encode_noop,
46835 +- [OP_SECINFO] = (nfsd4_enc)nfsd4_encode_secinfo,
46836 +- [OP_SETATTR] = (nfsd4_enc)nfsd4_encode_setattr,
46837 +- [OP_SETCLIENTID] = (nfsd4_enc)nfsd4_encode_setclientid,
46838 +- [OP_SETCLIENTID_CONFIRM] = (nfsd4_enc)nfsd4_encode_noop,
46839 +- [OP_VERIFY] = (nfsd4_enc)nfsd4_encode_noop,
46840 +- [OP_WRITE] = (nfsd4_enc)nfsd4_encode_write,
46841 +- [OP_RELEASE_LOCKOWNER] = (nfsd4_enc)nfsd4_encode_noop,
46842 ++ [OP_ACCESS] = nfsd4_encode_access,
46843 ++ [OP_CLOSE] = nfsd4_encode_close,
46844 ++ [OP_COMMIT] = nfsd4_encode_commit,
46845 ++ [OP_CREATE] = nfsd4_encode_create,
46846 ++ [OP_DELEGPURGE] = nfsd4_encode_noop,
46847 ++ [OP_DELEGRETURN] = nfsd4_encode_noop,
46848 ++ [OP_GETATTR] = nfsd4_encode_getattr,
46849 ++ [OP_GETFH] = nfsd4_encode_getfh,
46850 ++ [OP_LINK] = nfsd4_encode_link,
46851 ++ [OP_LOCK] = nfsd4_encode_lock,
46852 ++ [OP_LOCKT] = nfsd4_encode_lockt,
46853 ++ [OP_LOCKU] = nfsd4_encode_locku,
46854 ++ [OP_LOOKUP] = nfsd4_encode_noop,
46855 ++ [OP_LOOKUPP] = nfsd4_encode_noop,
46856 ++ [OP_NVERIFY] = nfsd4_encode_noop,
46857 ++ [OP_OPEN] = nfsd4_encode_open,
46858 ++ [OP_OPENATTR] = nfsd4_encode_noop,
46859 ++ [OP_OPEN_CONFIRM] = nfsd4_encode_open_confirm,
46860 ++ [OP_OPEN_DOWNGRADE] = nfsd4_encode_open_downgrade,
46861 ++ [OP_PUTFH] = nfsd4_encode_noop,
46862 ++ [OP_PUTPUBFH] = nfsd4_encode_noop,
46863 ++ [OP_PUTROOTFH] = nfsd4_encode_noop,
46864 ++ [OP_READ] = nfsd4_encode_read,
46865 ++ [OP_READDIR] = nfsd4_encode_readdir,
46866 ++ [OP_READLINK] = nfsd4_encode_readlink,
46867 ++ [OP_REMOVE] = nfsd4_encode_remove,
46868 ++ [OP_RENAME] = nfsd4_encode_rename,
46869 ++ [OP_RENEW] = nfsd4_encode_noop,
46870 ++ [OP_RESTOREFH] = nfsd4_encode_noop,
46871 ++ [OP_SAVEFH] = nfsd4_encode_noop,
46872 ++ [OP_SECINFO] = nfsd4_encode_secinfo,
46873 ++ [OP_SETATTR] = nfsd4_encode_setattr,
46874 ++ [OP_SETCLIENTID] = nfsd4_encode_setclientid,
46875 ++ [OP_SETCLIENTID_CONFIRM] = nfsd4_encode_noop,
46876 ++ [OP_VERIFY] = nfsd4_encode_noop,
46877 ++ [OP_WRITE] = nfsd4_encode_write,
46878 ++ [OP_RELEASE_LOCKOWNER] = nfsd4_encode_noop,
46879 +
46880 + /* NFSv4.1 operations */
46881 +- [OP_BACKCHANNEL_CTL] = (nfsd4_enc)nfsd4_encode_noop,
46882 +- [OP_BIND_CONN_TO_SESSION] = (nfsd4_enc)nfsd4_encode_bind_conn_to_session,
46883 +- [OP_EXCHANGE_ID] = (nfsd4_enc)nfsd4_encode_exchange_id,
46884 +- [OP_CREATE_SESSION] = (nfsd4_enc)nfsd4_encode_create_session,
46885 +- [OP_DESTROY_SESSION] = (nfsd4_enc)nfsd4_encode_noop,
46886 +- [OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
46887 +- [OP_GET_DIR_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
46888 ++ [OP_BACKCHANNEL_CTL] = nfsd4_encode_noop,
46889 ++ [OP_BIND_CONN_TO_SESSION] = nfsd4_encode_bind_conn_to_session,
46890 ++ [OP_EXCHANGE_ID] = nfsd4_encode_exchange_id,
46891 ++ [OP_CREATE_SESSION] = nfsd4_encode_create_session,
46892 ++ [OP_DESTROY_SESSION] = nfsd4_encode_noop,
46893 ++ [OP_FREE_STATEID] = nfsd4_encode_noop,
46894 ++ [OP_GET_DIR_DELEGATION] = nfsd4_encode_noop,
46895 + #ifdef CONFIG_NFSD_PNFS
46896 +- [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_getdeviceinfo,
46897 +- [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
46898 +- [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_layoutcommit,
46899 +- [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_layoutget,
46900 +- [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_layoutreturn,
46901 ++ [OP_GETDEVICEINFO] = nfsd4_encode_getdeviceinfo,
46902 ++ [OP_GETDEVICELIST] = nfsd4_encode_noop,
46903 ++ [OP_LAYOUTCOMMIT] = nfsd4_encode_layoutcommit,
46904 ++ [OP_LAYOUTGET] = nfsd4_encode_layoutget,
46905 ++ [OP_LAYOUTRETURN] = nfsd4_encode_layoutreturn,
46906 + #else
46907 +- [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_noop,
46908 +- [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
46909 +- [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop,
46910 +- [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop,
46911 +- [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop,
46912 ++ [OP_GETDEVICEINFO] = nfsd4_encode_noop,
46913 ++ [OP_GETDEVICELIST] = nfsd4_encode_noop,
46914 ++ [OP_LAYOUTCOMMIT] = nfsd4_encode_noop,
46915 ++ [OP_LAYOUTGET] = nfsd4_encode_noop,
46916 ++ [OP_LAYOUTRETURN] = nfsd4_encode_noop,
46917 + #endif
46918 +- [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo_no_name,
46919 +- [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence,
46920 +- [OP_SET_SSV] = (nfsd4_enc)nfsd4_encode_noop,
46921 +- [OP_TEST_STATEID] = (nfsd4_enc)nfsd4_encode_test_stateid,
46922 +- [OP_WANT_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
46923 +- [OP_DESTROY_CLIENTID] = (nfsd4_enc)nfsd4_encode_noop,
46924 +- [OP_RECLAIM_COMPLETE] = (nfsd4_enc)nfsd4_encode_noop,
46925 ++ [OP_SECINFO_NO_NAME] = nfsd4_encode_secinfo_no_name,
46926 ++ [OP_SEQUENCE] = nfsd4_encode_sequence,
46927 ++ [OP_SET_SSV] = nfsd4_encode_noop,
46928 ++ [OP_TEST_STATEID] = nfsd4_encode_test_stateid,
46929 ++ [OP_WANT_DELEGATION] = nfsd4_encode_noop,
46930 ++ [OP_DESTROY_CLIENTID] = nfsd4_encode_noop,
46931 ++ [OP_RECLAIM_COMPLETE] = nfsd4_encode_noop,
46932 +
46933 + /* NFSv4.2 operations */
46934 +- [OP_ALLOCATE] = (nfsd4_enc)nfsd4_encode_noop,
46935 +- [OP_COPY] = (nfsd4_enc)nfsd4_encode_noop,
46936 +- [OP_COPY_NOTIFY] = (nfsd4_enc)nfsd4_encode_noop,
46937 +- [OP_DEALLOCATE] = (nfsd4_enc)nfsd4_encode_noop,
46938 +- [OP_IO_ADVISE] = (nfsd4_enc)nfsd4_encode_noop,
46939 +- [OP_LAYOUTERROR] = (nfsd4_enc)nfsd4_encode_noop,
46940 +- [OP_LAYOUTSTATS] = (nfsd4_enc)nfsd4_encode_noop,
46941 +- [OP_OFFLOAD_CANCEL] = (nfsd4_enc)nfsd4_encode_noop,
46942 +- [OP_OFFLOAD_STATUS] = (nfsd4_enc)nfsd4_encode_noop,
46943 +- [OP_READ_PLUS] = (nfsd4_enc)nfsd4_encode_noop,
46944 +- [OP_SEEK] = (nfsd4_enc)nfsd4_encode_seek,
46945 +- [OP_WRITE_SAME] = (nfsd4_enc)nfsd4_encode_noop,
46946 +- [OP_CLONE] = (nfsd4_enc)nfsd4_encode_noop,
46947 ++ [OP_ALLOCATE] = nfsd4_encode_noop,
46948 ++ [OP_COPY] = nfsd4_encode_noop,
46949 ++ [OP_COPY_NOTIFY] = nfsd4_encode_noop,
46950 ++ [OP_DEALLOCATE] = nfsd4_encode_noop,
46951 ++ [OP_IO_ADVISE] = nfsd4_encode_noop,
46952 ++ [OP_LAYOUTERROR] = nfsd4_encode_noop,
46953 ++ [OP_LAYOUTSTATS] = nfsd4_encode_noop,
46954 ++ [OP_OFFLOAD_CANCEL] = nfsd4_encode_noop,
46955 ++ [OP_OFFLOAD_STATUS] = nfsd4_encode_noop,
46956 ++ [OP_READ_PLUS] = nfsd4_encode_noop,
46957 ++ [OP_SEEK] = nfsd4_encode_seek,
46958 ++ [OP_WRITE_SAME] = nfsd4_encode_noop,
46959 ++ [OP_CLONE] = nfsd4_encode_noop,
46960 + };
46961 +
46962 + /*
46963 +@@ -4440,9 +4521,9 @@ nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
46964 + }
46965 +
46966 + int
46967 +-nfs4svc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
46968 ++nfs4svc_encode_voidres(void *rqstp, __be32 *p, void *dummy)
46969 + {
46970 +- return xdr_ressize_check(rqstp, p);
46971 ++ return xdr_ressize_check(rqstp, p);
46972 + }
46973 +
46974 + int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp)
46975 +@@ -4465,8 +4546,11 @@ int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp)
46976 + }
46977 +
46978 + int
46979 +-nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args)
46980 ++nfs4svc_decode_compoundargs(void *_rqstp, __be32 *p, void *_args)
46981 + {
46982 ++ struct svc_rqst *rqstp = _rqstp;
46983 ++ struct nfsd4_compoundargs *args = _args;
46984 ++
46985 + if (rqstp->rq_arg.head[0].iov_len % 4) {
46986 + /* client is nuts */
46987 + dprintk("%s: compound not properly padded! (peeraddr=%pISc xid=0x%x)",
46988 +@@ -4486,11 +4570,13 @@ nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_comp
46989 + }
46990 +
46991 + int
46992 +-nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundres *resp)
46993 ++nfs4svc_encode_compoundres(void *_rqstp, __be32 *p, void *_resp)
46994 + {
46995 + /*
46996 + * All that remains is to write the tag and operation count...
46997 + */
46998 ++ struct svc_rqst *rqstp = _rqstp;
46999 ++ struct nfsd4_compoundres *resp = _resp;
47000 + struct xdr_buf *buf = resp->xdr.buf;
47001 +
47002 + WARN_ON_ONCE(buf->len != buf->head[0].iov_len + buf->page_len +
47003 diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
47004 index 54cde9a..ff5756c 100644
47005 --- a/fs/nfsd/nfscache.c
47006 @@ -85533,11 +108017,692 @@ index 54cde9a..ff5756c 100644
47007 rp->c_replstat = *statp;
47008 break;
47009 case RC_REPLBUFF:
47010 +diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
47011 +index 4cd78ef..eefe944 100644
47012 +--- a/fs/nfsd/nfsproc.c
47013 ++++ b/fs/nfsd/nfsproc.c
47014 +@@ -39,9 +39,11 @@ nfsd_return_dirop(__be32 err, struct nfsd_diropres *resp)
47015 + * N.B. After this call resp->fh needs an fh_put
47016 + */
47017 + static __be32
47018 +-nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
47019 +- struct nfsd_attrstat *resp)
47020 ++nfsd_proc_getattr(struct svc_rqst *rqstp, void *_argp,
47021 ++ void *_resp)
47022 + {
47023 ++ struct nfsd_fhandle *argp = _argp;
47024 ++ struct nfsd_attrstat *resp = _resp;
47025 + __be32 nfserr;
47026 + dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh));
47027 +
47028 +@@ -56,9 +58,11 @@ nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
47029 + * N.B. After this call resp->fh needs an fh_put
47030 + */
47031 + static __be32
47032 +-nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp,
47033 +- struct nfsd_attrstat *resp)
47034 ++nfsd_proc_setattr(struct svc_rqst *rqstp, void *_argp,
47035 ++ void *_resp)
47036 + {
47037 ++ struct nfsd_sattrargs *argp = _argp;
47038 ++ struct nfsd_attrstat *resp = _resp;
47039 + struct iattr *iap = &argp->attrs;
47040 + struct svc_fh *fhp;
47041 + __be32 nfserr;
47042 +@@ -124,9 +128,11 @@ done:
47043 + * N.B. After this call resp->fh needs an fh_put
47044 + */
47045 + static __be32
47046 +-nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
47047 +- struct nfsd_diropres *resp)
47048 ++nfsd_proc_lookup(struct svc_rqst *rqstp, void *_argp,
47049 ++ void *_resp)
47050 + {
47051 ++ struct nfsd_diropargs *argp = _argp;
47052 ++ struct nfsd_diropres *resp = _resp;
47053 + __be32 nfserr;
47054 +
47055 + dprintk("nfsd: LOOKUP %s %.*s\n",
47056 +@@ -144,9 +150,11 @@ nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
47057 + * Read a symlink.
47058 + */
47059 + static __be32
47060 +-nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp,
47061 +- struct nfsd_readlinkres *resp)
47062 ++nfsd_proc_readlink(struct svc_rqst *rqstp, void *_argp,
47063 ++ void *_resp)
47064 + {
47065 ++ struct nfsd_readlinkargs *argp = _argp;
47066 ++ struct nfsd_readlinkres *resp = _resp;
47067 + __be32 nfserr;
47068 +
47069 + dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh));
47070 +@@ -164,9 +172,11 @@ nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp,
47071 + * N.B. After this call resp->fh needs an fh_put
47072 + */
47073 + static __be32
47074 +-nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
47075 +- struct nfsd_readres *resp)
47076 ++nfsd_proc_read(struct svc_rqst *rqstp, void *_argp,
47077 ++ void *_resp)
47078 + {
47079 ++ struct nfsd_readargs *argp = argp;
47080 ++ struct nfsd_readres *resp = _resp;
47081 + __be32 nfserr;
47082 +
47083 + dprintk("nfsd: READ %s %d bytes at %d\n",
47084 +@@ -202,9 +212,11 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
47085 + * N.B. After this call resp->fh needs an fh_put
47086 + */
47087 + static __be32
47088 +-nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
47089 +- struct nfsd_attrstat *resp)
47090 ++nfsd_proc_write(struct svc_rqst *rqstp, void *_argp,
47091 ++ void *_resp)
47092 + {
47093 ++ struct nfsd_writeargs *argp = _argp;
47094 ++ struct nfsd_attrstat *resp = _resp;
47095 + __be32 nfserr;
47096 + int stable = 1;
47097 + unsigned long cnt = argp->len;
47098 +@@ -228,9 +240,11 @@ nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
47099 + * N.B. After this call _both_ argp->fh and resp->fh need an fh_put
47100 + */
47101 + static __be32
47102 +-nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
47103 +- struct nfsd_diropres *resp)
47104 ++nfsd_proc_create(struct svc_rqst *rqstp, void *_argp,
47105 ++ void *_resp)
47106 + {
47107 ++ struct nfsd_createargs *argp = _argp;
47108 ++ struct nfsd_diropres *resp = _resp;
47109 + svc_fh *dirfhp = &argp->fh;
47110 + svc_fh *newfhp = &resp->fh;
47111 + struct iattr *attr = &argp->attrs;
47112 +@@ -386,9 +400,10 @@ done:
47113 + }
47114 +
47115 + static __be32
47116 +-nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
47117 ++nfsd_proc_remove(struct svc_rqst *rqstp, void *_argp,
47118 + void *resp)
47119 + {
47120 ++ struct nfsd_diropargs *argp = _argp;
47121 + __be32 nfserr;
47122 +
47123 + dprintk("nfsd: REMOVE %s %.*s\n", SVCFH_fmt(&argp->fh),
47124 +@@ -401,9 +416,10 @@ nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
47125 + }
47126 +
47127 + static __be32
47128 +-nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp,
47129 ++nfsd_proc_rename(struct svc_rqst *rqstp, void *_argp,
47130 + void *resp)
47131 + {
47132 ++ struct nfsd_renameargs *argp = _argp;
47133 + __be32 nfserr;
47134 +
47135 + dprintk("nfsd: RENAME %s %.*s -> \n",
47136 +@@ -419,9 +435,10 @@ nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp,
47137 + }
47138 +
47139 + static __be32
47140 +-nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp,
47141 ++nfsd_proc_link(struct svc_rqst *rqstp, void *_argp,
47142 + void *resp)
47143 + {
47144 ++ struct nfsd_linkargs *argp = _argp;
47145 + __be32 nfserr;
47146 +
47147 + dprintk("nfsd: LINK %s ->\n",
47148 +@@ -439,9 +456,10 @@ nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp,
47149 + }
47150 +
47151 + static __be32
47152 +-nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
47153 ++nfsd_proc_symlink(struct svc_rqst *rqstp, void *_argp,
47154 + void *resp)
47155 + {
47156 ++ struct nfsd_symlinkargs *argp = _argp;
47157 + struct svc_fh newfh;
47158 + __be32 nfserr;
47159 +
47160 +@@ -469,9 +487,11 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
47161 + * N.B. After this call resp->fh needs an fh_put
47162 + */
47163 + static __be32
47164 +-nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
47165 +- struct nfsd_diropres *resp)
47166 ++nfsd_proc_mkdir(struct svc_rqst *rqstp, void *_argp,
47167 ++ void *_resp)
47168 + {
47169 ++ struct nfsd_createargs *argp = _argp;
47170 ++ struct nfsd_diropres *resp = _resp;
47171 + __be32 nfserr;
47172 +
47173 + dprintk("nfsd: MKDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name);
47174 +@@ -493,9 +513,10 @@ nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
47175 + * Remove a directory
47176 + */
47177 + static __be32
47178 +-nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
47179 ++nfsd_proc_rmdir(struct svc_rqst *rqstp, void *_argp,
47180 + void *resp)
47181 + {
47182 ++ struct nfsd_diropargs *argp = _argp;
47183 + __be32 nfserr;
47184 +
47185 + dprintk("nfsd: RMDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name);
47186 +@@ -509,9 +530,11 @@ nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
47187 + * Read a portion of a directory.
47188 + */
47189 + static __be32
47190 +-nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
47191 +- struct nfsd_readdirres *resp)
47192 ++nfsd_proc_readdir(struct svc_rqst *rqstp, void *_argp,
47193 ++ void *_resp)
47194 + {
47195 ++ struct nfsd_readdirargs *argp = _argp;
47196 ++ struct nfsd_readdirres *resp = _resp;
47197 + int count;
47198 + __be32 nfserr;
47199 + loff_t offset;
47200 +@@ -549,9 +572,11 @@ nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
47201 + * Get file system info
47202 + */
47203 + static __be32
47204 +-nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
47205 +- struct nfsd_statfsres *resp)
47206 ++nfsd_proc_statfs(struct svc_rqst * rqstp, void *_argp,
47207 ++ void *_resp)
47208 + {
47209 ++ struct nfsd_fhandle *argp = _argp;
47210 ++ struct nfsd_statfsres *resp = _resp;
47211 + __be32 nfserr;
47212 +
47213 + dprintk("nfsd: STATFS %s\n", SVCFH_fmt(&argp->fh));
47214 +@@ -574,166 +599,166 @@ struct nfsd_void { int dummy; };
47215 +
47216 + static struct svc_procedure nfsd_procedures2[18] = {
47217 + [NFSPROC_NULL] = {
47218 +- .pc_func = (svc_procfunc) nfsd_proc_null,
47219 +- .pc_decode = (kxdrproc_t) nfssvc_decode_void,
47220 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47221 ++ .pc_func = nfsd_proc_null,
47222 ++ .pc_decode = nfssvc_decode_void,
47223 ++ .pc_encode = nfssvc_encode_void,
47224 + .pc_argsize = sizeof(struct nfsd_void),
47225 + .pc_ressize = sizeof(struct nfsd_void),
47226 + .pc_cachetype = RC_NOCACHE,
47227 + .pc_xdrressize = ST,
47228 + },
47229 + [NFSPROC_GETATTR] = {
47230 +- .pc_func = (svc_procfunc) nfsd_proc_getattr,
47231 +- .pc_decode = (kxdrproc_t) nfssvc_decode_fhandle,
47232 +- .pc_encode = (kxdrproc_t) nfssvc_encode_attrstat,
47233 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47234 ++ .pc_func = nfsd_proc_getattr,
47235 ++ .pc_decode = nfssvc_decode_fhandle,
47236 ++ .pc_encode = nfssvc_encode_attrstat,
47237 ++ .pc_release = nfssvc_release_fhandle,
47238 + .pc_argsize = sizeof(struct nfsd_fhandle),
47239 + .pc_ressize = sizeof(struct nfsd_attrstat),
47240 + .pc_cachetype = RC_NOCACHE,
47241 + .pc_xdrressize = ST+AT,
47242 + },
47243 + [NFSPROC_SETATTR] = {
47244 +- .pc_func = (svc_procfunc) nfsd_proc_setattr,
47245 +- .pc_decode = (kxdrproc_t) nfssvc_decode_sattrargs,
47246 +- .pc_encode = (kxdrproc_t) nfssvc_encode_attrstat,
47247 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47248 ++ .pc_func = nfsd_proc_setattr,
47249 ++ .pc_decode = nfssvc_decode_sattrargs,
47250 ++ .pc_encode = nfssvc_encode_attrstat,
47251 ++ .pc_release = nfssvc_release_fhandle,
47252 + .pc_argsize = sizeof(struct nfsd_sattrargs),
47253 + .pc_ressize = sizeof(struct nfsd_attrstat),
47254 + .pc_cachetype = RC_REPLBUFF,
47255 + .pc_xdrressize = ST+AT,
47256 + },
47257 + [NFSPROC_ROOT] = {
47258 +- .pc_decode = (kxdrproc_t) nfssvc_decode_void,
47259 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47260 ++ .pc_decode = nfssvc_decode_void,
47261 ++ .pc_encode = nfssvc_encode_void,
47262 + .pc_argsize = sizeof(struct nfsd_void),
47263 + .pc_ressize = sizeof(struct nfsd_void),
47264 + .pc_cachetype = RC_NOCACHE,
47265 + .pc_xdrressize = ST,
47266 + },
47267 + [NFSPROC_LOOKUP] = {
47268 +- .pc_func = (svc_procfunc) nfsd_proc_lookup,
47269 +- .pc_decode = (kxdrproc_t) nfssvc_decode_diropargs,
47270 +- .pc_encode = (kxdrproc_t) nfssvc_encode_diropres,
47271 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47272 ++ .pc_func = nfsd_proc_lookup,
47273 ++ .pc_decode = nfssvc_decode_diropargs,
47274 ++ .pc_encode = nfssvc_encode_diropres,
47275 ++ .pc_release = nfssvc_release_fhandle,
47276 + .pc_argsize = sizeof(struct nfsd_diropargs),
47277 + .pc_ressize = sizeof(struct nfsd_diropres),
47278 + .pc_cachetype = RC_NOCACHE,
47279 + .pc_xdrressize = ST+FH+AT,
47280 + },
47281 + [NFSPROC_READLINK] = {
47282 +- .pc_func = (svc_procfunc) nfsd_proc_readlink,
47283 +- .pc_decode = (kxdrproc_t) nfssvc_decode_readlinkargs,
47284 +- .pc_encode = (kxdrproc_t) nfssvc_encode_readlinkres,
47285 ++ .pc_func = nfsd_proc_readlink,
47286 ++ .pc_decode = nfssvc_decode_readlinkargs,
47287 ++ .pc_encode = nfssvc_encode_readlinkres,
47288 + .pc_argsize = sizeof(struct nfsd_readlinkargs),
47289 + .pc_ressize = sizeof(struct nfsd_readlinkres),
47290 + .pc_cachetype = RC_NOCACHE,
47291 + .pc_xdrressize = ST+1+NFS_MAXPATHLEN/4,
47292 + },
47293 + [NFSPROC_READ] = {
47294 +- .pc_func = (svc_procfunc) nfsd_proc_read,
47295 +- .pc_decode = (kxdrproc_t) nfssvc_decode_readargs,
47296 +- .pc_encode = (kxdrproc_t) nfssvc_encode_readres,
47297 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47298 ++ .pc_func = nfsd_proc_read,
47299 ++ .pc_decode = nfssvc_decode_readargs,
47300 ++ .pc_encode = nfssvc_encode_readres,
47301 ++ .pc_release = nfssvc_release_fhandle,
47302 + .pc_argsize = sizeof(struct nfsd_readargs),
47303 + .pc_ressize = sizeof(struct nfsd_readres),
47304 + .pc_cachetype = RC_NOCACHE,
47305 + .pc_xdrressize = ST+AT+1+NFSSVC_MAXBLKSIZE_V2/4,
47306 + },
47307 + [NFSPROC_WRITECACHE] = {
47308 +- .pc_decode = (kxdrproc_t) nfssvc_decode_void,
47309 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47310 ++ .pc_decode = nfssvc_decode_void,
47311 ++ .pc_encode = nfssvc_encode_void,
47312 + .pc_argsize = sizeof(struct nfsd_void),
47313 + .pc_ressize = sizeof(struct nfsd_void),
47314 + .pc_cachetype = RC_NOCACHE,
47315 + .pc_xdrressize = ST,
47316 + },
47317 + [NFSPROC_WRITE] = {
47318 +- .pc_func = (svc_procfunc) nfsd_proc_write,
47319 +- .pc_decode = (kxdrproc_t) nfssvc_decode_writeargs,
47320 +- .pc_encode = (kxdrproc_t) nfssvc_encode_attrstat,
47321 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47322 ++ .pc_func = nfsd_proc_write,
47323 ++ .pc_decode = nfssvc_decode_writeargs,
47324 ++ .pc_encode = nfssvc_encode_attrstat,
47325 ++ .pc_release = nfssvc_release_fhandle,
47326 + .pc_argsize = sizeof(struct nfsd_writeargs),
47327 + .pc_ressize = sizeof(struct nfsd_attrstat),
47328 + .pc_cachetype = RC_REPLBUFF,
47329 + .pc_xdrressize = ST+AT,
47330 + },
47331 + [NFSPROC_CREATE] = {
47332 +- .pc_func = (svc_procfunc) nfsd_proc_create,
47333 +- .pc_decode = (kxdrproc_t) nfssvc_decode_createargs,
47334 +- .pc_encode = (kxdrproc_t) nfssvc_encode_diropres,
47335 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47336 ++ .pc_func = nfsd_proc_create,
47337 ++ .pc_decode = nfssvc_decode_createargs,
47338 ++ .pc_encode = nfssvc_encode_diropres,
47339 ++ .pc_release = nfssvc_release_fhandle,
47340 + .pc_argsize = sizeof(struct nfsd_createargs),
47341 + .pc_ressize = sizeof(struct nfsd_diropres),
47342 + .pc_cachetype = RC_REPLBUFF,
47343 + .pc_xdrressize = ST+FH+AT,
47344 + },
47345 + [NFSPROC_REMOVE] = {
47346 +- .pc_func = (svc_procfunc) nfsd_proc_remove,
47347 +- .pc_decode = (kxdrproc_t) nfssvc_decode_diropargs,
47348 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47349 ++ .pc_func = nfsd_proc_remove,
47350 ++ .pc_decode = nfssvc_decode_diropargs,
47351 ++ .pc_encode = nfssvc_encode_void,
47352 + .pc_argsize = sizeof(struct nfsd_diropargs),
47353 + .pc_ressize = sizeof(struct nfsd_void),
47354 + .pc_cachetype = RC_REPLSTAT,
47355 + .pc_xdrressize = ST,
47356 + },
47357 + [NFSPROC_RENAME] = {
47358 +- .pc_func = (svc_procfunc) nfsd_proc_rename,
47359 +- .pc_decode = (kxdrproc_t) nfssvc_decode_renameargs,
47360 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47361 ++ .pc_func = nfsd_proc_rename,
47362 ++ .pc_decode = nfssvc_decode_renameargs,
47363 ++ .pc_encode = nfssvc_encode_void,
47364 + .pc_argsize = sizeof(struct nfsd_renameargs),
47365 + .pc_ressize = sizeof(struct nfsd_void),
47366 + .pc_cachetype = RC_REPLSTAT,
47367 + .pc_xdrressize = ST,
47368 + },
47369 + [NFSPROC_LINK] = {
47370 +- .pc_func = (svc_procfunc) nfsd_proc_link,
47371 +- .pc_decode = (kxdrproc_t) nfssvc_decode_linkargs,
47372 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47373 ++ .pc_func = nfsd_proc_link,
47374 ++ .pc_decode = nfssvc_decode_linkargs,
47375 ++ .pc_encode = nfssvc_encode_void,
47376 + .pc_argsize = sizeof(struct nfsd_linkargs),
47377 + .pc_ressize = sizeof(struct nfsd_void),
47378 + .pc_cachetype = RC_REPLSTAT,
47379 + .pc_xdrressize = ST,
47380 + },
47381 + [NFSPROC_SYMLINK] = {
47382 +- .pc_func = (svc_procfunc) nfsd_proc_symlink,
47383 +- .pc_decode = (kxdrproc_t) nfssvc_decode_symlinkargs,
47384 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47385 ++ .pc_func = nfsd_proc_symlink,
47386 ++ .pc_decode = nfssvc_decode_symlinkargs,
47387 ++ .pc_encode = nfssvc_encode_void,
47388 + .pc_argsize = sizeof(struct nfsd_symlinkargs),
47389 + .pc_ressize = sizeof(struct nfsd_void),
47390 + .pc_cachetype = RC_REPLSTAT,
47391 + .pc_xdrressize = ST,
47392 + },
47393 + [NFSPROC_MKDIR] = {
47394 +- .pc_func = (svc_procfunc) nfsd_proc_mkdir,
47395 +- .pc_decode = (kxdrproc_t) nfssvc_decode_createargs,
47396 +- .pc_encode = (kxdrproc_t) nfssvc_encode_diropres,
47397 +- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
47398 ++ .pc_func = nfsd_proc_mkdir,
47399 ++ .pc_decode = nfssvc_decode_createargs,
47400 ++ .pc_encode = nfssvc_encode_diropres,
47401 ++ .pc_release = nfssvc_release_fhandle,
47402 + .pc_argsize = sizeof(struct nfsd_createargs),
47403 + .pc_ressize = sizeof(struct nfsd_diropres),
47404 + .pc_cachetype = RC_REPLBUFF,
47405 + .pc_xdrressize = ST+FH+AT,
47406 + },
47407 + [NFSPROC_RMDIR] = {
47408 +- .pc_func = (svc_procfunc) nfsd_proc_rmdir,
47409 +- .pc_decode = (kxdrproc_t) nfssvc_decode_diropargs,
47410 +- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
47411 ++ .pc_func = nfsd_proc_rmdir,
47412 ++ .pc_decode = nfssvc_decode_diropargs,
47413 ++ .pc_encode = nfssvc_encode_void,
47414 + .pc_argsize = sizeof(struct nfsd_diropargs),
47415 + .pc_ressize = sizeof(struct nfsd_void),
47416 + .pc_cachetype = RC_REPLSTAT,
47417 + .pc_xdrressize = ST,
47418 + },
47419 + [NFSPROC_READDIR] = {
47420 +- .pc_func = (svc_procfunc) nfsd_proc_readdir,
47421 +- .pc_decode = (kxdrproc_t) nfssvc_decode_readdirargs,
47422 +- .pc_encode = (kxdrproc_t) nfssvc_encode_readdirres,
47423 ++ .pc_func = nfsd_proc_readdir,
47424 ++ .pc_decode = nfssvc_decode_readdirargs,
47425 ++ .pc_encode = nfssvc_encode_readdirres,
47426 + .pc_argsize = sizeof(struct nfsd_readdirargs),
47427 + .pc_ressize = sizeof(struct nfsd_readdirres),
47428 + .pc_cachetype = RC_NOCACHE,
47429 + },
47430 + [NFSPROC_STATFS] = {
47431 +- .pc_func = (svc_procfunc) nfsd_proc_statfs,
47432 +- .pc_decode = (kxdrproc_t) nfssvc_decode_fhandle,
47433 +- .pc_encode = (kxdrproc_t) nfssvc_encode_statfsres,
47434 ++ .pc_func = nfsd_proc_statfs,
47435 ++ .pc_decode = nfssvc_decode_fhandle,
47436 ++ .pc_encode = nfssvc_encode_statfsres,
47437 + .pc_argsize = sizeof(struct nfsd_fhandle),
47438 + .pc_ressize = sizeof(struct nfsd_statfsres),
47439 + .pc_cachetype = RC_NOCACHE,
47440 +diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
47441 +index 79d964a..bbf050b 100644
47442 +--- a/fs/nfsd/nfsxdr.c
47443 ++++ b/fs/nfsd/nfsxdr.c
47444 +@@ -206,14 +206,16 @@ __be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *f
47445 + * XDR decode functions
47446 + */
47447 + int
47448 +-nfssvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
47449 ++nfssvc_decode_void(void *rqstp, __be32 *p, void *dummy)
47450 + {
47451 + return xdr_argsize_check(rqstp, p);
47452 + }
47453 +
47454 + int
47455 +-nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *args)
47456 ++nfssvc_decode_fhandle(void *rqstp, __be32 *p, void *_args)
47457 + {
47458 ++ struct nfsd_fhandle *args = _args;
47459 ++
47460 + p = decode_fh(p, &args->fh);
47461 + if (!p)
47462 + return 0;
47463 +@@ -221,9 +223,10 @@ nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *ar
47464 + }
47465 +
47466 + int
47467 +-nfssvc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
47468 +- struct nfsd_sattrargs *args)
47469 ++nfssvc_decode_sattrargs(void *rqstp, __be32 *p, void *_args)
47470 + {
47471 ++ struct nfsd_sattrargs *args = _args;
47472 ++
47473 + p = decode_fh(p, &args->fh);
47474 + if (!p)
47475 + return 0;
47476 +@@ -233,9 +236,10 @@ nfssvc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
47477 + }
47478 +
47479 + int
47480 +-nfssvc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
47481 +- struct nfsd_diropargs *args)
47482 ++nfssvc_decode_diropargs(void *rqstp, __be32 *p, void *_args)
47483 + {
47484 ++ struct nfsd_diropargs *args = _args;
47485 ++
47486 + if (!(p = decode_fh(p, &args->fh))
47487 + || !(p = decode_filename(p, &args->name, &args->len)))
47488 + return 0;
47489 +@@ -244,9 +248,10 @@ nfssvc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
47490 + }
47491 +
47492 + int
47493 +-nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
47494 +- struct nfsd_readargs *args)
47495 ++nfssvc_decode_readargs(void *_rqstp, __be32 *p, void *_args)
47496 + {
47497 ++ struct svc_rqst *rqstp = _rqstp;
47498 ++ struct nfsd_readargs *args = _args;
47499 + unsigned int len;
47500 + int v;
47501 + p = decode_fh(p, &args->fh);
47502 +@@ -276,9 +281,10 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
47503 + }
47504 +
47505 + int
47506 +-nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
47507 +- struct nfsd_writeargs *args)
47508 ++nfssvc_decode_writeargs(void *_rqstp, __be32 *p, void *_args)
47509 + {
47510 ++ struct svc_rqst *rqstp = _rqstp;
47511 ++ struct nfsd_writeargs *args = _args;
47512 + unsigned int len, hdr, dlen;
47513 + int v;
47514 +
47515 +@@ -330,9 +336,10 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
47516 + }
47517 +
47518 + int
47519 +-nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
47520 +- struct nfsd_createargs *args)
47521 ++nfssvc_decode_createargs(void *rqstp, __be32 *p, void *_args)
47522 + {
47523 ++ struct nfsd_createargs *args = _args;
47524 ++
47525 + if ( !(p = decode_fh(p, &args->fh))
47526 + || !(p = decode_filename(p, &args->name, &args->len)))
47527 + return 0;
47528 +@@ -342,9 +349,10 @@ nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
47529 + }
47530 +
47531 + int
47532 +-nfssvc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
47533 +- struct nfsd_renameargs *args)
47534 ++nfssvc_decode_renameargs(void *rqstp, __be32 *p, void *_args)
47535 + {
47536 ++ struct nfsd_renameargs *args = _args;
47537 ++
47538 + if (!(p = decode_fh(p, &args->ffh))
47539 + || !(p = decode_filename(p, &args->fname, &args->flen))
47540 + || !(p = decode_fh(p, &args->tfh))
47541 +@@ -355,8 +363,11 @@ nfssvc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
47542 + }
47543 +
47544 + int
47545 +-nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readlinkargs *args)
47546 ++nfssvc_decode_readlinkargs(void *_rqstp, __be32 *p, void *_args)
47547 + {
47548 ++ struct svc_rqst *rqstp = _rqstp;
47549 ++ struct nfsd_readlinkargs *args = _args;
47550 ++
47551 + p = decode_fh(p, &args->fh);
47552 + if (!p)
47553 + return 0;
47554 +@@ -366,9 +377,10 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readli
47555 + }
47556 +
47557 + int
47558 +-nfssvc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
47559 +- struct nfsd_linkargs *args)
47560 ++nfssvc_decode_linkargs(void *rqstp, __be32 *p, void *_args)
47561 + {
47562 ++ struct nfsd_linkargs *args = _args;
47563 ++
47564 + if (!(p = decode_fh(p, &args->ffh))
47565 + || !(p = decode_fh(p, &args->tfh))
47566 + || !(p = decode_filename(p, &args->tname, &args->tlen)))
47567 +@@ -378,9 +390,10 @@ nfssvc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
47568 + }
47569 +
47570 + int
47571 +-nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
47572 +- struct nfsd_symlinkargs *args)
47573 ++nfssvc_decode_symlinkargs(void *rqstp, __be32 *p, void *_args)
47574 + {
47575 ++ struct nfsd_symlinkargs *args = _args;
47576 ++
47577 + if ( !(p = decode_fh(p, &args->ffh))
47578 + || !(p = decode_filename(p, &args->fname, &args->flen))
47579 + || !(p = decode_pathname(p, &args->tname, &args->tlen)))
47580 +@@ -391,9 +404,11 @@ nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
47581 + }
47582 +
47583 + int
47584 +-nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
47585 +- struct nfsd_readdirargs *args)
47586 ++nfssvc_decode_readdirargs(void *_rqstp, __be32 *p, void *_args)
47587 + {
47588 ++ struct svc_rqst *rqstp = _rqstp;
47589 ++ struct nfsd_readdirargs *args = _args;
47590 ++
47591 + p = decode_fh(p, &args->fh);
47592 + if (!p)
47593 + return 0;
47594 +@@ -409,32 +424,36 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
47595 + * XDR encode functions
47596 + */
47597 + int
47598 +-nfssvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
47599 ++nfssvc_encode_void(void *rqstp, __be32 *p, void *dummy)
47600 + {
47601 + return xdr_ressize_check(rqstp, p);
47602 + }
47603 +
47604 + int
47605 +-nfssvc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
47606 +- struct nfsd_attrstat *resp)
47607 ++nfssvc_encode_attrstat(void *rqstp, __be32 *p, void *_resp)
47608 + {
47609 ++ struct nfsd_diropres *resp = _resp;
47610 ++
47611 + p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
47612 + return xdr_ressize_check(rqstp, p);
47613 + }
47614 +
47615 + int
47616 +-nfssvc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
47617 +- struct nfsd_diropres *resp)
47618 ++nfssvc_encode_diropres(void *rqstp, __be32 *p, void *_resp)
47619 + {
47620 ++ struct nfsd_diropres *resp = _resp;
47621 ++
47622 + p = encode_fh(p, &resp->fh);
47623 + p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
47624 + return xdr_ressize_check(rqstp, p);
47625 + }
47626 +
47627 + int
47628 +-nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
47629 +- struct nfsd_readlinkres *resp)
47630 ++nfssvc_encode_readlinkres(void *_rqstp, __be32 *p, void *_resp)
47631 + {
47632 ++ struct svc_rqst *rqstp= _rqstp;
47633 ++ struct nfsd_readlinkres *resp = _resp;
47634 ++
47635 + *p++ = htonl(resp->len);
47636 + xdr_ressize_check(rqstp, p);
47637 + rqstp->rq_res.page_len = resp->len;
47638 +@@ -448,9 +467,11 @@ nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
47639 + }
47640 +
47641 + int
47642 +-nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
47643 +- struct nfsd_readres *resp)
47644 ++nfssvc_encode_readres(void *_rqstp, __be32 *p, void *_resp)
47645 + {
47646 ++ struct svc_rqst *rqstp = _rqstp;
47647 ++ struct nfsd_readres *resp = _resp;
47648 ++
47649 + p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
47650 + *p++ = htonl(resp->count);
47651 + xdr_ressize_check(rqstp, p);
47652 +@@ -467,9 +488,11 @@ nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
47653 + }
47654 +
47655 + int
47656 +-nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
47657 +- struct nfsd_readdirres *resp)
47658 ++nfssvc_encode_readdirres(void *_rqstp, __be32 *p, void *_resp)
47659 + {
47660 ++ struct svc_rqst *rqstp = _rqstp;
47661 ++ struct nfsd_readdirres *resp = _resp;
47662 ++
47663 + xdr_ressize_check(rqstp, p);
47664 + p = resp->buffer;
47665 + *p++ = 0; /* no more entries */
47666 +@@ -480,9 +503,9 @@ nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
47667 + }
47668 +
47669 + int
47670 +-nfssvc_encode_statfsres(struct svc_rqst *rqstp, __be32 *p,
47671 +- struct nfsd_statfsres *resp)
47672 ++nfssvc_encode_statfsres(void *rqstp, __be32 *p, void *_resp)
47673 + {
47674 ++ struct nfsd_statfsres *resp = _resp;
47675 + struct kstatfs *stat = &resp->stats;
47676 +
47677 + *p++ = htonl(NFSSVC_MAXBLKSIZE_V2); /* max transfer size */
47678 +@@ -542,9 +565,10 @@ nfssvc_encode_entry(void *ccdv, const char *name,
47679 + * XDR release functions
47680 + */
47681 + int
47682 +-nfssvc_release_fhandle(struct svc_rqst *rqstp, __be32 *p,
47683 +- struct nfsd_fhandle *resp)
47684 ++nfssvc_release_fhandle(void *rqstp, __be32 *p, void *_resp)
47685 + {
47686 ++ struct nfsd_fhandle *resp = _resp;
47687 ++
47688 + fh_put(&resp->fh);
47689 + return 1;
47690 + }
47691 diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
47692 -index 994d66f..a963779 100644
47693 +index 5d2a57e..86c17842 100644
47694 --- a/fs/nfsd/vfs.c
47695 +++ b/fs/nfsd/vfs.c
47696 -@@ -855,7 +855,7 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
47697 +@@ -870,7 +870,7 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
47698
47699 oldfs = get_fs();
47700 set_fs(KERNEL_DS);
47701 @@ -85546,7 +108711,7 @@ index 994d66f..a963779 100644
47702 set_fs(oldfs);
47703 return nfsd_finish_read(file, count, host_err);
47704 }
47705 -@@ -942,7 +942,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
47706 +@@ -957,7 +957,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
47707
47708 /* Write the data. */
47709 oldfs = get_fs(); set_fs(KERNEL_DS);
47710 @@ -85555,7 +108720,7 @@ index 994d66f..a963779 100644
47711 set_fs(oldfs);
47712 if (host_err < 0)
47713 goto out_nfserr;
47714 -@@ -1449,7 +1449,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
47715 +@@ -1478,7 +1478,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
47716 */
47717
47718 oldfs = get_fs(); set_fs(KERNEL_DS);
47719 @@ -85564,6 +108729,283 @@ index 994d66f..a963779 100644
47720 set_fs(oldfs);
47721
47722 if (host_err < 0)
47723 +diff --git a/fs/nfsd/xdr.h b/fs/nfsd/xdr.h
47724 +index 4f0481d..193c8e7 100644
47725 +--- a/fs/nfsd/xdr.h
47726 ++++ b/fs/nfsd/xdr.h
47727 +@@ -131,40 +131,30 @@ union nfsd_xdrstore {
47728 + #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
47729 +
47730 +
47731 +-int nfssvc_decode_void(struct svc_rqst *, __be32 *, void *);
47732 +-int nfssvc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
47733 +-int nfssvc_decode_sattrargs(struct svc_rqst *, __be32 *,
47734 +- struct nfsd_sattrargs *);
47735 +-int nfssvc_decode_diropargs(struct svc_rqst *, __be32 *,
47736 +- struct nfsd_diropargs *);
47737 +-int nfssvc_decode_readargs(struct svc_rqst *, __be32 *,
47738 +- struct nfsd_readargs *);
47739 +-int nfssvc_decode_writeargs(struct svc_rqst *, __be32 *,
47740 +- struct nfsd_writeargs *);
47741 +-int nfssvc_decode_createargs(struct svc_rqst *, __be32 *,
47742 +- struct nfsd_createargs *);
47743 +-int nfssvc_decode_renameargs(struct svc_rqst *, __be32 *,
47744 +- struct nfsd_renameargs *);
47745 +-int nfssvc_decode_readlinkargs(struct svc_rqst *, __be32 *,
47746 +- struct nfsd_readlinkargs *);
47747 +-int nfssvc_decode_linkargs(struct svc_rqst *, __be32 *,
47748 +- struct nfsd_linkargs *);
47749 +-int nfssvc_decode_symlinkargs(struct svc_rqst *, __be32 *,
47750 +- struct nfsd_symlinkargs *);
47751 +-int nfssvc_decode_readdirargs(struct svc_rqst *, __be32 *,
47752 +- struct nfsd_readdirargs *);
47753 +-int nfssvc_encode_void(struct svc_rqst *, __be32 *, void *);
47754 +-int nfssvc_encode_attrstat(struct svc_rqst *, __be32 *, struct nfsd_attrstat *);
47755 +-int nfssvc_encode_diropres(struct svc_rqst *, __be32 *, struct nfsd_diropres *);
47756 +-int nfssvc_encode_readlinkres(struct svc_rqst *, __be32 *, struct nfsd_readlinkres *);
47757 +-int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *);
47758 +-int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *);
47759 +-int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *);
47760 ++int nfssvc_decode_void(void *, __be32 *, void *);
47761 ++int nfssvc_decode_fhandle(void *, __be32 *, void *);
47762 ++int nfssvc_decode_sattrargs(void *, __be32 *, void *);
47763 ++int nfssvc_decode_diropargs(void *, __be32 *, void *);
47764 ++int nfssvc_decode_readargs(void *, __be32 *, void *);
47765 ++int nfssvc_decode_writeargs(void *, __be32 *, void *);
47766 ++int nfssvc_decode_createargs(void *, __be32 *, void *);
47767 ++int nfssvc_decode_renameargs(void *, __be32 *, void *);
47768 ++int nfssvc_decode_readlinkargs(void *, __be32 *, void *);
47769 ++int nfssvc_decode_linkargs(void *, __be32 *, void *);
47770 ++int nfssvc_decode_symlinkargs(void *, __be32 *, void *);
47771 ++int nfssvc_decode_readdirargs(void *, __be32 *, void *);
47772 ++int nfssvc_encode_void(void *, __be32 *, void *);
47773 ++int nfssvc_encode_attrstat(void *, __be32 *, void *);
47774 ++int nfssvc_encode_diropres(void *, __be32 *, void *);
47775 ++int nfssvc_encode_readlinkres(void *, __be32 *, void *);
47776 ++int nfssvc_encode_readres(void *, __be32 *, void *);
47777 ++int nfssvc_encode_statfsres(void *, __be32 *, void *);
47778 ++int nfssvc_encode_readdirres(void *, __be32 *, void *);
47779 +
47780 + int nfssvc_encode_entry(void *, const char *name,
47781 + int namlen, loff_t offset, u64 ino, unsigned int);
47782 +
47783 +-int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
47784 ++int nfssvc_release_fhandle(void *, __be32 *, void *);
47785 +
47786 + /* Helper functions for NFSv2 ACL code */
47787 + __be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *stat);
47788 +diff --git a/fs/nfsd/xdr3.h b/fs/nfsd/xdr3.h
47789 +index 335e04a..d77a9c9 100644
47790 +--- a/fs/nfsd/xdr3.h
47791 ++++ b/fs/nfsd/xdr3.h
47792 +@@ -269,71 +269,41 @@ union nfsd3_xdrstore {
47793 +
47794 + #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
47795 +
47796 +-int nfs3svc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
47797 +-int nfs3svc_decode_sattrargs(struct svc_rqst *, __be32 *,
47798 +- struct nfsd3_sattrargs *);
47799 +-int nfs3svc_decode_diropargs(struct svc_rqst *, __be32 *,
47800 +- struct nfsd3_diropargs *);
47801 +-int nfs3svc_decode_accessargs(struct svc_rqst *, __be32 *,
47802 +- struct nfsd3_accessargs *);
47803 +-int nfs3svc_decode_readargs(struct svc_rqst *, __be32 *,
47804 +- struct nfsd3_readargs *);
47805 +-int nfs3svc_decode_writeargs(struct svc_rqst *, __be32 *,
47806 +- struct nfsd3_writeargs *);
47807 +-int nfs3svc_decode_createargs(struct svc_rqst *, __be32 *,
47808 +- struct nfsd3_createargs *);
47809 +-int nfs3svc_decode_mkdirargs(struct svc_rqst *, __be32 *,
47810 +- struct nfsd3_createargs *);
47811 +-int nfs3svc_decode_mknodargs(struct svc_rqst *, __be32 *,
47812 +- struct nfsd3_mknodargs *);
47813 +-int nfs3svc_decode_renameargs(struct svc_rqst *, __be32 *,
47814 +- struct nfsd3_renameargs *);
47815 +-int nfs3svc_decode_readlinkargs(struct svc_rqst *, __be32 *,
47816 +- struct nfsd3_readlinkargs *);
47817 +-int nfs3svc_decode_linkargs(struct svc_rqst *, __be32 *,
47818 +- struct nfsd3_linkargs *);
47819 +-int nfs3svc_decode_symlinkargs(struct svc_rqst *, __be32 *,
47820 +- struct nfsd3_symlinkargs *);
47821 +-int nfs3svc_decode_readdirargs(struct svc_rqst *, __be32 *,
47822 +- struct nfsd3_readdirargs *);
47823 +-int nfs3svc_decode_readdirplusargs(struct svc_rqst *, __be32 *,
47824 +- struct nfsd3_readdirargs *);
47825 +-int nfs3svc_decode_commitargs(struct svc_rqst *, __be32 *,
47826 +- struct nfsd3_commitargs *);
47827 +-int nfs3svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
47828 +-int nfs3svc_encode_attrstat(struct svc_rqst *, __be32 *,
47829 +- struct nfsd3_attrstat *);
47830 +-int nfs3svc_encode_wccstat(struct svc_rqst *, __be32 *,
47831 +- struct nfsd3_attrstat *);
47832 +-int nfs3svc_encode_diropres(struct svc_rqst *, __be32 *,
47833 +- struct nfsd3_diropres *);
47834 +-int nfs3svc_encode_accessres(struct svc_rqst *, __be32 *,
47835 +- struct nfsd3_accessres *);
47836 +-int nfs3svc_encode_readlinkres(struct svc_rqst *, __be32 *,
47837 +- struct nfsd3_readlinkres *);
47838 +-int nfs3svc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd3_readres *);
47839 +-int nfs3svc_encode_writeres(struct svc_rqst *, __be32 *, struct nfsd3_writeres *);
47840 +-int nfs3svc_encode_createres(struct svc_rqst *, __be32 *,
47841 +- struct nfsd3_diropres *);
47842 +-int nfs3svc_encode_renameres(struct svc_rqst *, __be32 *,
47843 +- struct nfsd3_renameres *);
47844 +-int nfs3svc_encode_linkres(struct svc_rqst *, __be32 *,
47845 +- struct nfsd3_linkres *);
47846 +-int nfs3svc_encode_readdirres(struct svc_rqst *, __be32 *,
47847 +- struct nfsd3_readdirres *);
47848 +-int nfs3svc_encode_fsstatres(struct svc_rqst *, __be32 *,
47849 +- struct nfsd3_fsstatres *);
47850 +-int nfs3svc_encode_fsinfores(struct svc_rqst *, __be32 *,
47851 +- struct nfsd3_fsinfores *);
47852 +-int nfs3svc_encode_pathconfres(struct svc_rqst *, __be32 *,
47853 +- struct nfsd3_pathconfres *);
47854 +-int nfs3svc_encode_commitres(struct svc_rqst *, __be32 *,
47855 +- struct nfsd3_commitres *);
47856 ++int nfs3svc_decode_fhandle(void *, __be32 *, void *);
47857 ++int nfs3svc_decode_sattrargs(void *, __be32 *, void *);
47858 ++int nfs3svc_decode_diropargs(void *, __be32 *, void *);
47859 ++int nfs3svc_decode_accessargs(void *, __be32 *, void *);
47860 ++int nfs3svc_decode_readargs(void *, __be32 *, void *);
47861 ++int nfs3svc_decode_writeargs(void *, __be32 *, void *);
47862 ++int nfs3svc_decode_createargs(void *, __be32 *, void *);
47863 ++int nfs3svc_decode_mkdirargs(void *, __be32 *, void *);
47864 ++int nfs3svc_decode_mknodargs(void *, __be32 *, void *);
47865 ++int nfs3svc_decode_renameargs(void *, __be32 *, void *);
47866 ++int nfs3svc_decode_readlinkargs(void *, __be32 *, void *);
47867 ++int nfs3svc_decode_linkargs(void *, __be32 *, void *);
47868 ++int nfs3svc_decode_symlinkargs(void *, __be32 *, void *);
47869 ++int nfs3svc_decode_readdirargs(void *, __be32 *, void *);
47870 ++int nfs3svc_decode_readdirplusargs(void *, __be32 *, void *);
47871 ++int nfs3svc_decode_commitargs(void *, __be32 *, void *);
47872 ++int nfs3svc_encode_voidres(void *, __be32 *, void *);
47873 ++int nfs3svc_encode_attrstat(void *, __be32 *, void *);
47874 ++int nfs3svc_encode_wccstat(void *, __be32 *, void *);
47875 ++int nfs3svc_encode_diropres(void *, __be32 *, void *);
47876 ++int nfs3svc_encode_accessres(void *, __be32 *, void *);
47877 ++int nfs3svc_encode_readlinkres(void *, __be32 *, void *);
47878 ++int nfs3svc_encode_readres(void *, __be32 *, void *);
47879 ++int nfs3svc_encode_writeres(void *, __be32 *, void *);
47880 ++int nfs3svc_encode_createres(void *, __be32 *, void *);
47881 ++int nfs3svc_encode_renameres(void *, __be32 *, void *);
47882 ++int nfs3svc_encode_linkres(void *, __be32 *, void *);
47883 ++int nfs3svc_encode_readdirres(void *, __be32 *, void *);
47884 ++int nfs3svc_encode_fsstatres(void *, __be32 *, void *);
47885 ++int nfs3svc_encode_fsinfores(void *, __be32 *, void *);
47886 ++int nfs3svc_encode_pathconfres(void *, __be32 *, void *);
47887 ++int nfs3svc_encode_commitres(void *, __be32 *, void *);
47888 +
47889 +-int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *,
47890 +- struct nfsd3_attrstat *);
47891 +-int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *,
47892 +- struct nfsd3_fhandle_pair *);
47893 ++int nfs3svc_release_fhandle(void *, __be32 *, void *);
47894 ++int nfs3svc_release_fhandle2(void *, __be32 *, void *);
47895 + int nfs3svc_encode_entry(void *, const char *name,
47896 + int namlen, loff_t offset, u64 ino,
47897 + unsigned int);
47898 +diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
47899 +index d955481..a985dc41 100644
47900 +--- a/fs/nfsd/xdr4.h
47901 ++++ b/fs/nfsd/xdr4.h
47902 +@@ -654,11 +654,9 @@ set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
47903 +
47904 + }
47905 +
47906 +-int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
47907 +-int nfs4svc_decode_compoundargs(struct svc_rqst *, __be32 *,
47908 +- struct nfsd4_compoundargs *);
47909 +-int nfs4svc_encode_compoundres(struct svc_rqst *, __be32 *,
47910 +- struct nfsd4_compoundres *);
47911 ++int nfs4svc_encode_voidres(void *, __be32 *, void *);
47912 ++int nfs4svc_decode_compoundargs(void *, __be32 *, void *);
47913 ++int nfs4svc_encode_compoundres(void *, __be32 *, void *);
47914 + __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *, u32);
47915 + void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *);
47916 + void nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op);
47917 +@@ -668,26 +666,26 @@ __be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
47918 + u32 *bmval, struct svc_rqst *, int ignore_crossmnt);
47919 + extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp,
47920 + struct nfsd4_compound_state *,
47921 +- struct nfsd4_setclientid *setclid);
47922 ++ void *setclid);
47923 + extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
47924 + struct nfsd4_compound_state *,
47925 +- struct nfsd4_setclientid_confirm *setclientid_confirm);
47926 ++ void *setclientid_confirm);
47927 + extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
47928 +- struct nfsd4_compound_state *, struct nfsd4_exchange_id *);
47929 +-extern __be32 nfsd4_backchannel_ctl(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_backchannel_ctl *);
47930 +-extern __be32 nfsd4_bind_conn_to_session(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_bind_conn_to_session *);
47931 ++ struct nfsd4_compound_state *, void *);
47932 ++extern __be32 nfsd4_backchannel_ctl(struct svc_rqst *, struct nfsd4_compound_state *, void *);
47933 ++extern __be32 nfsd4_bind_conn_to_session(struct svc_rqst *, struct nfsd4_compound_state *, void *);
47934 + extern __be32 nfsd4_create_session(struct svc_rqst *,
47935 + struct nfsd4_compound_state *,
47936 +- struct nfsd4_create_session *);
47937 ++ void *);
47938 + extern __be32 nfsd4_sequence(struct svc_rqst *,
47939 + struct nfsd4_compound_state *,
47940 +- struct nfsd4_sequence *);
47941 ++ void *);
47942 + extern void nfsd4_sequence_done(struct nfsd4_compoundres *resp);
47943 + extern __be32 nfsd4_destroy_session(struct svc_rqst *,
47944 + struct nfsd4_compound_state *,
47945 +- struct nfsd4_destroy_session *);
47946 +-extern __be32 nfsd4_destroy_clientid(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_destroy_clientid *);
47947 +-__be32 nfsd4_reclaim_complete(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_reclaim_complete *);
47948 ++ void *);
47949 ++extern __be32 nfsd4_destroy_clientid(struct svc_rqst *, struct nfsd4_compound_state *, void *);
47950 ++__be32 nfsd4_reclaim_complete(struct svc_rqst *, struct nfsd4_compound_state *, void *);
47951 + extern __be32 nfsd4_process_open1(struct nfsd4_compound_state *,
47952 + struct nfsd4_open *open, struct nfsd_net *nn);
47953 + extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp,
47954 +@@ -696,34 +694,34 @@ extern void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate);
47955 + extern void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate,
47956 + struct nfsd4_open *open);
47957 + extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp,
47958 +- struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc);
47959 ++ struct nfsd4_compound_state *, void *oc);
47960 + extern __be32 nfsd4_close(struct svc_rqst *rqstp,
47961 + struct nfsd4_compound_state *,
47962 +- struct nfsd4_close *close);
47963 ++ void *close);
47964 + extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp,
47965 + struct nfsd4_compound_state *,
47966 +- struct nfsd4_open_downgrade *od);
47967 ++ void *od);
47968 + extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *,
47969 +- struct nfsd4_lock *lock);
47970 ++ void *lock);
47971 + extern __be32 nfsd4_lockt(struct svc_rqst *rqstp,
47972 + struct nfsd4_compound_state *,
47973 +- struct nfsd4_lockt *lockt);
47974 ++ void *lockt);
47975 + extern __be32 nfsd4_locku(struct svc_rqst *rqstp,
47976 + struct nfsd4_compound_state *,
47977 +- struct nfsd4_locku *locku);
47978 ++ void *locku);
47979 + extern __be32
47980 + nfsd4_release_lockowner(struct svc_rqst *rqstp,
47981 + struct nfsd4_compound_state *,
47982 +- struct nfsd4_release_lockowner *rlockowner);
47983 ++ void *rlockowner);
47984 + extern int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp);
47985 + extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp,
47986 +- struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr);
47987 ++ struct nfsd4_compound_state *, void *dr);
47988 + extern __be32 nfsd4_renew(struct svc_rqst *rqstp,
47989 +- struct nfsd4_compound_state *, clientid_t *clid);
47990 ++ struct nfsd4_compound_state *, void *clid);
47991 + extern __be32 nfsd4_test_stateid(struct svc_rqst *rqstp,
47992 +- struct nfsd4_compound_state *, struct nfsd4_test_stateid *test_stateid);
47993 ++ struct nfsd4_compound_state *, void *test_stateid);
47994 + extern __be32 nfsd4_free_stateid(struct svc_rqst *rqstp,
47995 +- struct nfsd4_compound_state *, struct nfsd4_free_stateid *free_stateid);
47996 ++ struct nfsd4_compound_state *, void *free_stateid);
47997 + extern void nfsd4_bump_seqid(struct nfsd4_compound_state *, __be32 nfserr);
47998 +
47999 + #endif
48000 diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
48001 index 52ccd34..7a6b202 100644
48002 --- a/fs/nls/nls_base.c
48003 @@ -85635,10 +109077,71 @@ index 52ccd34..7a6b202 100644
48004 {
48005 return try_then_request_module(find_nls(charset), "nls_%s", charset);
48006 }
48007 +diff --git a/fs/nls/nls_cp932.c b/fs/nls/nls_cp932.c
48008 +index 67b7398..38622e8 100644
48009 +--- a/fs/nls/nls_cp932.c
48010 ++++ b/fs/nls/nls_cp932.c
48011 +@@ -7834,7 +7834,7 @@ static const unsigned char charset2upper[256] = {
48012 + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
48013 + };
48014 +
48015 +-static int uni2char(const wchar_t uni,
48016 ++static int uni2char(wchar_t uni,
48017 + unsigned char *out, int boundlen)
48018 + {
48019 + const unsigned char *uni2charset;
48020 +diff --git a/fs/nls/nls_cp936.c b/fs/nls/nls_cp936.c
48021 +index c96546c..d5dfe94 100644
48022 +--- a/fs/nls/nls_cp936.c
48023 ++++ b/fs/nls/nls_cp936.c
48024 +@@ -10997,7 +10997,7 @@ static const unsigned char charset2upper[256] = {
48025 + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
48026 + };
48027 +
48028 +-static int uni2char(const wchar_t uni,
48029 ++static int uni2char(wchar_t uni,
48030 + unsigned char *out, int boundlen)
48031 + {
48032 + const unsigned char *uni2charset;
48033 +diff --git a/fs/nls/nls_cp949.c b/fs/nls/nls_cp949.c
48034 +index 199171e..709af9a 100644
48035 +--- a/fs/nls/nls_cp949.c
48036 ++++ b/fs/nls/nls_cp949.c
48037 +@@ -13858,7 +13858,7 @@ static const unsigned char charset2upper[256] = {
48038 + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
48039 + };
48040 +
48041 +-static int uni2char(const wchar_t uni,
48042 ++static int uni2char(wchar_t uni,
48043 + unsigned char *out, int boundlen)
48044 + {
48045 + const unsigned char *uni2charset;
48046 +diff --git a/fs/nls/nls_cp950.c b/fs/nls/nls_cp950.c
48047 +index 8e14187..d9cec2f 100644
48048 +--- a/fs/nls/nls_cp950.c
48049 ++++ b/fs/nls/nls_cp950.c
48050 +@@ -9394,7 +9394,7 @@ static const unsigned char charset2upper[256] = {
48051 + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
48052 + };
48053 +
48054 +-static int uni2char(const wchar_t uni,
48055 ++static int uni2char(wchar_t uni,
48056 + unsigned char *out, int boundlen)
48057 + {
48058 + const unsigned char *uni2charset;
48059 diff --git a/fs/nls/nls_euc-jp.c b/fs/nls/nls_euc-jp.c
48060 -index 162b3f1..6076a7c 100644
48061 +index 162b3f1..2cb932a 100644
48062 --- a/fs/nls/nls_euc-jp.c
48063 +++ b/fs/nls/nls_euc-jp.c
48064 +@@ -406,7 +406,7 @@ static inline int sjisnec2sjisibm(unsigned char *sjisibm,
48065 + return 2;
48066 + }
48067 +
48068 +-static int uni2char(const wchar_t uni,
48069 ++static int uni2char(wchar_t uni,
48070 + unsigned char *out, int boundlen)
48071 + {
48072 + int n;
48073 @@ -560,8 +560,10 @@ static int __init init_nls_euc_jp(void)
48074 p_nls = load_nls("cp932");
48075
48076 @@ -85653,9 +109156,18 @@ index 162b3f1..6076a7c 100644
48077 }
48078
48079 diff --git a/fs/nls/nls_koi8-ru.c b/fs/nls/nls_koi8-ru.c
48080 -index a80a741..7b96e1b 100644
48081 +index a80a741..13030f7 100644
48082 --- a/fs/nls/nls_koi8-ru.c
48083 +++ b/fs/nls/nls_koi8-ru.c
48084 +@@ -13,7 +13,7 @@
48085 +
48086 + static struct nls_table *p_nls;
48087 +
48088 +-static int uni2char(const wchar_t uni,
48089 ++static int uni2char(wchar_t uni,
48090 + unsigned char *out, int boundlen)
48091 + {
48092 + if (boundlen <= 0)
48093 @@ -62,8 +62,10 @@ static int __init init_nls_koi8_ru(void)
48094 p_nls = load_nls("koi8-u");
48095
48096 @@ -85707,7 +109219,7 @@ index a95d8e0..a91a5fd 100644
48097 EXPORT_SYMBOL_GPL(fsnotify_get_cookie);
48098
48099 diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c
48100 -index 9e38daf..5727cae 100644
48101 +index b2eff58..a779b81 100644
48102 --- a/fs/ntfs/dir.c
48103 +++ b/fs/ntfs/dir.c
48104 @@ -1310,7 +1310,7 @@ find_next_index_buffer:
48105 @@ -85719,8 +109231,121 @@ index 9e38daf..5727cae 100644
48106 ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
48107 "inode 0x%lx or driver bug.", vdir->i_ino);
48108 goto err_out;
48109 +@@ -1517,7 +1517,7 @@ static int ntfs_dir_fsync(struct file *filp, loff_t start, loff_t end,
48110 + na.type = AT_BITMAP;
48111 + na.name = I30;
48112 + na.name_len = 4;
48113 +- bmp_vi = ilookup5(vi->i_sb, vi->i_ino, (test_t)ntfs_test_inode, &na);
48114 ++ bmp_vi = ilookup5(vi->i_sb, vi->i_ino, ntfs_test_inode, &na);
48115 + if (bmp_vi) {
48116 + write_inode_now(bmp_vi, !datasync);
48117 + iput(bmp_vi);
48118 +diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
48119 +index d284f07..06984d4 100644
48120 +--- a/fs/ntfs/inode.c
48121 ++++ b/fs/ntfs/inode.c
48122 +@@ -57,8 +57,9 @@
48123 + * NOTE: This function runs with the inode_hash_lock spin lock held so it is not
48124 + * allowed to sleep.
48125 + */
48126 +-int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
48127 ++int ntfs_test_inode(struct inode *vi, void *_na)
48128 + {
48129 ++ ntfs_attr *na = _na;
48130 + ntfs_inode *ni;
48131 +
48132 + if (vi->i_ino != na->mft_no)
48133 +@@ -101,8 +102,9 @@ int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
48134 + * NOTE: This function runs with the inode->i_lock spin lock held so it is not
48135 + * allowed to sleep. (Hence the GFP_ATOMIC allocation.)
48136 + */
48137 +-static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
48138 ++static int ntfs_init_locked_inode(struct inode *vi, void *_na)
48139 + {
48140 ++ ntfs_attr *na = _na;
48141 + ntfs_inode *ni = NTFS_I(vi);
48142 +
48143 + vi->i_ino = na->mft_no;
48144 +@@ -145,7 +147,6 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
48145 + return 0;
48146 + }
48147 +
48148 +-typedef int (*set_t)(struct inode *, void *);
48149 + static int ntfs_read_locked_inode(struct inode *vi);
48150 + static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi);
48151 + static int ntfs_read_locked_index_inode(struct inode *base_vi,
48152 +@@ -178,8 +179,8 @@ struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no)
48153 + na.name = NULL;
48154 + na.name_len = 0;
48155 +
48156 +- vi = iget5_locked(sb, mft_no, (test_t)ntfs_test_inode,
48157 +- (set_t)ntfs_init_locked_inode, &na);
48158 ++ vi = iget5_locked(sb, mft_no, ntfs_test_inode,
48159 ++ ntfs_init_locked_inode, &na);
48160 + if (unlikely(!vi))
48161 + return ERR_PTR(-ENOMEM);
48162 +
48163 +@@ -239,8 +240,8 @@ struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPE type,
48164 + na.name = name;
48165 + na.name_len = name_len;
48166 +
48167 +- vi = iget5_locked(base_vi->i_sb, na.mft_no, (test_t)ntfs_test_inode,
48168 +- (set_t)ntfs_init_locked_inode, &na);
48169 ++ vi = iget5_locked(base_vi->i_sb, na.mft_no, ntfs_test_inode,
48170 ++ ntfs_init_locked_inode, &na);
48171 + if (unlikely(!vi))
48172 + return ERR_PTR(-ENOMEM);
48173 +
48174 +@@ -294,8 +295,8 @@ struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
48175 + na.name = name;
48176 + na.name_len = name_len;
48177 +
48178 +- vi = iget5_locked(base_vi->i_sb, na.mft_no, (test_t)ntfs_test_inode,
48179 +- (set_t)ntfs_init_locked_inode, &na);
48180 ++ vi = iget5_locked(base_vi->i_sb, na.mft_no, ntfs_test_inode,
48181 ++ ntfs_init_locked_inode, &na);
48182 + if (unlikely(!vi))
48183 + return ERR_PTR(-ENOMEM);
48184 +
48185 +diff --git a/fs/ntfs/inode.h b/fs/ntfs/inode.h
48186 +index b3c3469..17208ad 100644
48187 +--- a/fs/ntfs/inode.h
48188 ++++ b/fs/ntfs/inode.h
48189 +@@ -267,9 +267,7 @@ typedef struct {
48190 + ATTR_TYPE type;
48191 + } ntfs_attr;
48192 +
48193 +-typedef int (*test_t)(struct inode *, void *);
48194 +-
48195 +-extern int ntfs_test_inode(struct inode *vi, ntfs_attr *na);
48196 ++extern int ntfs_test_inode(struct inode *vi, void *_na);
48197 +
48198 + extern struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no);
48199 + extern struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPE type,
48200 +diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
48201 +index 3014a36..9fa26af 100644
48202 +--- a/fs/ntfs/mft.c
48203 ++++ b/fs/ntfs/mft.c
48204 +@@ -963,7 +963,7 @@ bool ntfs_may_write_mft_record(ntfs_volume *vol, const unsigned long mft_no,
48205 + * dirty code path of the inode dirty code path when writing
48206 + * $MFT occurs.
48207 + */
48208 +- vi = ilookup5_nowait(sb, mft_no, (test_t)ntfs_test_inode, &na);
48209 ++ vi = ilookup5_nowait(sb, mft_no, ntfs_test_inode, &na);
48210 + }
48211 + if (vi) {
48212 + ntfs_debug("Base inode 0x%lx is in icache.", mft_no);
48213 +@@ -1024,7 +1024,7 @@ bool ntfs_may_write_mft_record(ntfs_volume *vol, const unsigned long mft_no,
48214 + vi = igrab(mft_vi);
48215 + BUG_ON(vi != mft_vi);
48216 + } else
48217 +- vi = ilookup5_nowait(sb, na.mft_no, (test_t)ntfs_test_inode,
48218 ++ vi = ilookup5_nowait(sb, na.mft_no, ntfs_test_inode,
48219 + &na);
48220 + if (!vi) {
48221 + /*
48222 diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
48223 -index d1a8535..1cfa4a9 100644
48224 +index 1b38abd..33913db 100644
48225 --- a/fs/ntfs/super.c
48226 +++ b/fs/ntfs/super.c
48227 @@ -688,7 +688,7 @@ static struct buffer_head *read_ntfs_boot_sector(struct super_block *sb,
48228 @@ -85750,8 +109375,17 @@ index d1a8535..1cfa4a9 100644
48229 /* We failed. Cleanup and return. */
48230 if (bh_primary)
48231 brelse(bh_primary);
48232 +@@ -2711,7 +2711,7 @@ static const struct super_operations ntfs_sops = {
48233 + *
48234 + * NOTE: @sb->s_flags contains the mount options flags.
48235 + */
48236 +-static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
48237 ++static int ntfs_fill_super(struct super_block *sb, void *opt, int silent)
48238 + {
48239 + ntfs_volume *vol;
48240 + struct buffer_head *bh;
48241 diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
48242 -index e88ccf8..716dfce 100644
48243 +index 68c607e..095cc08 100644
48244 --- a/fs/ocfs2/dlm/dlmcommon.h
48245 +++ b/fs/ocfs2/dlm/dlmcommon.h
48246 @@ -151,9 +151,9 @@ struct dlm_ctxt
48247 @@ -85824,7 +109458,7 @@ index 2ee7fe7..9cff42d 100644
48248 }
48249
48250 diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
48251 -index 4e2162b..06d7446 100644
48252 +index 9477d6e..69ffbb2 100644
48253 --- a/fs/ocfs2/dlm/dlmmaster.c
48254 +++ b/fs/ocfs2/dlm/dlmmaster.c
48255 @@ -303,7 +303,7 @@ static void dlm_init_mle(struct dlm_master_list_entry *mle,
48256 @@ -85845,11 +109479,31 @@ index 4e2162b..06d7446 100644
48257 atomic_inc(&dlm->res_cur_count);
48258
48259 /* just for consistency */
48260 +diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
48261 +index 03768bb..e92ce05 100644
48262 +--- a/fs/ocfs2/dlmfs/dlmfs.c
48263 ++++ b/fs/ocfs2/dlmfs/dlmfs.c
48264 +@@ -88,13 +88,13 @@ struct workqueue_struct *user_dlm_worker;
48265 + */
48266 + #define DLMFS_CAPABILITIES "bast stackglue"
48267 + static int param_set_dlmfs_capabilities(const char *val,
48268 +- struct kernel_param *kp)
48269 ++ const struct kernel_param *kp)
48270 + {
48271 + printk(KERN_ERR "%s: readonly parameter\n", kp->name);
48272 + return -EINVAL;
48273 + }
48274 + static int param_get_dlmfs_capabilities(char *buffer,
48275 +- struct kernel_param *kp)
48276 ++ const struct kernel_param *kp)
48277 + {
48278 + return strlcpy(buffer, DLMFS_CAPABILITIES,
48279 + strlen(DLMFS_CAPABILITIES) + 1);
48280 diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
48281 -index 0a4457f..67ddb4f 100644
48282 +index 7d62c43..e325680 100644
48283 --- a/fs/ocfs2/localalloc.c
48284 +++ b/fs/ocfs2/localalloc.c
48285 -@@ -1319,7 +1319,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
48286 +@@ -1317,7 +1317,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
48287 goto bail;
48288 }
48289
48290 @@ -85880,7 +109534,7 @@ index 7a01262..23667d1 100644
48291
48292 enum ocfs2_local_alloc_state
48293 diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
48294 -index fc6d25f..7b72242 100644
48295 +index 2f19aee..26ac57f 100644
48296 --- a/fs/ocfs2/suballoc.c
48297 +++ b/fs/ocfs2/suballoc.c
48298 @@ -851,7 +851,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
48299 @@ -85938,7 +109592,7 @@ index fc6d25f..7b72242 100644
48300 }
48301 }
48302 diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
48303 -index 2de4c8a..a106a0d 100644
48304 +index faa1365..ded3cff 100644
48305 --- a/fs/ocfs2/super.c
48306 +++ b/fs/ocfs2/super.c
48307 @@ -310,11 +310,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
48308 @@ -85958,7 +109612,7 @@ index 2de4c8a..a106a0d 100644
48309
48310 out += snprintf(buf + out, len - out,
48311 "%10s => State: %u Descriptor: %llu Size: %u bits "
48312 -@@ -2106,11 +2106,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
48313 +@@ -2101,11 +2101,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
48314
48315 mutex_init(&osb->system_file_mutex);
48316
48317 @@ -85976,7 +109630,7 @@ index 2de4c8a..a106a0d 100644
48318 /* Copy the blockcheck stats from the superblock probe */
48319 osb->osb_ecc_stats = *stats;
48320 diff --git a/fs/open.c b/fs/open.c
48321 -index 6a24f98..c16baf7 100644
48322 +index 17cb6b1..d64c63e 100644
48323 --- a/fs/open.c
48324 +++ b/fs/open.c
48325 @@ -32,6 +32,8 @@
48326 @@ -86056,7 +109710,7 @@ index 6a24f98..c16baf7 100644
48327 @@ -511,6 +535,16 @@ static int chmod_common(struct path *path, umode_t mode)
48328 return error;
48329 retry_deleg:
48330 - mutex_lock(&inode->i_mutex);
48331 + inode_lock(inode);
48332 +
48333 + if (!gr_acl_handle_chmod(path->dentry, path->mnt, &mode)) {
48334 + error = -EACCES;
48335 @@ -86080,7 +109734,7 @@ index 6a24f98..c16baf7 100644
48336 retry_deleg:
48337 newattrs.ia_valid = ATTR_CTIME;
48338 if (user != (uid_t) -1) {
48339 -@@ -1027,6 +1064,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
48340 +@@ -1024,6 +1061,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
48341 } else {
48342 fsnotify_open(f);
48343 fd_install(fd, f);
48344 @@ -86089,7 +109743,7 @@ index 6a24f98..c16baf7 100644
48345 }
48346 putname(tmp);
48347 diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
48348 -index eff6319..d8a12987 100644
48349 +index d894e7c..8fa99559 100644
48350 --- a/fs/overlayfs/copy_up.c
48351 +++ b/fs/overlayfs/copy_up.c
48352 @@ -153,7 +153,7 @@ static char *ovl_read_symlink(struct dentry *realdentry)
48353 @@ -86102,10 +109756,10 @@ index eff6319..d8a12987 100644
48354 if (res < 0) {
48355 free_page((unsigned long) buf);
48356 diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
48357 -index 05ac9a9..c60faca 100644
48358 +index a4ff5d0..6034cb5 100644
48359 --- a/fs/overlayfs/inode.c
48360 +++ b/fs/overlayfs/inode.c
48361 -@@ -358,6 +358,9 @@ struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)
48362 +@@ -347,6 +347,9 @@ struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)
48363 if (d_is_dir(dentry))
48364 return d_backing_inode(dentry);
48365
48366 @@ -86116,10 +109770,10 @@ index 05ac9a9..c60faca 100644
48367 if (ovl_open_need_copy_up(file_flags, type, realpath.dentry)) {
48368 err = ovl_want_write(dentry);
48369 diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
48370 -index a1acc60..52c2657 100644
48371 +index 4399ea8..4915433 100644
48372 --- a/fs/overlayfs/super.c
48373 +++ b/fs/overlayfs/super.c
48374 -@@ -175,7 +175,7 @@ void ovl_path_lower(struct dentry *dentry, struct path *path)
48375 +@@ -194,7 +194,7 @@ void ovl_path_lower(struct dentry *dentry, struct path *path)
48376 {
48377 struct ovl_entry *oe = dentry->d_fsdata;
48378
48379 @@ -86128,7 +109782,7 @@ index a1acc60..52c2657 100644
48380 }
48381
48382 int ovl_want_write(struct dentry *dentry)
48383 -@@ -917,8 +917,8 @@ static unsigned int ovl_split_lowerdirs(char *str)
48384 +@@ -944,8 +944,8 @@ static unsigned int ovl_split_lowerdirs(char *str)
48385
48386 static int ovl_fill_super(struct super_block *sb, void *data, int silent)
48387 {
48388 @@ -86140,25 +109794,19 @@ index a1acc60..52c2657 100644
48389 struct ovl_entry *oe;
48390 struct ovl_fs *ufs;
48391 diff --git a/fs/pipe.c b/fs/pipe.c
48392 -index 42cf8dd..932cb27 100644
48393 +index ab8dad3..932cb27 100644
48394 --- a/fs/pipe.c
48395 +++ b/fs/pipe.c
48396 -@@ -36,7 +36,13 @@ unsigned int pipe_max_size = 1048576;
48397 +@@ -36,7 +36,7 @@ unsigned int pipe_max_size = 1048576;
48398 /*
48399 * Minimum pipe size, as required by POSIX
48400 */
48401 -unsigned int pipe_min_size = PAGE_SIZE;
48402 +unsigned int pipe_min_size __read_only = PAGE_SIZE;
48403 -+
48404 -+/* Maximum allocatable pages per user. Hard limit is unset by default, soft
48405 -+ * matches default values.
48406 -+ */
48407 -+unsigned long pipe_user_pages_hard;
48408 -+unsigned long pipe_user_pages_soft = PIPE_DEF_BUFFERS * INR_OPEN_CUR;
48409
48410 - /*
48411 - * We use a start+len construction, which provides full use of the
48412 -@@ -55,7 +61,7 @@ unsigned int pipe_min_size = PAGE_SIZE;
48413 + /* Maximum allocatable pages per user. Hard limit is unset by default, soft
48414 + * matches default values.
48415 +@@ -61,7 +61,7 @@ unsigned long pipe_user_pages_soft = PIPE_DEF_BUFFERS * INR_OPEN_CUR;
48416
48417 static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass)
48418 {
48419 @@ -86167,7 +109815,7 @@ index 42cf8dd..932cb27 100644
48420 mutex_lock_nested(&pipe->mutex, subclass);
48421 }
48422
48423 -@@ -70,7 +76,7 @@ EXPORT_SYMBOL(pipe_lock);
48424 +@@ -76,7 +76,7 @@ EXPORT_SYMBOL(pipe_lock);
48425
48426 void pipe_unlock(struct pipe_inode_info *pipe)
48427 {
48428 @@ -86176,7 +109824,7 @@ index 42cf8dd..932cb27 100644
48429 mutex_unlock(&pipe->mutex);
48430 }
48431 EXPORT_SYMBOL(pipe_unlock);
48432 -@@ -291,9 +297,9 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
48433 +@@ -297,9 +297,9 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
48434 }
48435 if (bufs) /* More to do? */
48436 continue;
48437 @@ -86188,7 +109836,7 @@ index 42cf8dd..932cb27 100644
48438 /* syscall merging: Usually we must not sleep
48439 * if O_NONBLOCK is set, or if we got some data.
48440 * But if a writer sleeps in kernel space, then
48441 -@@ -350,7 +356,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
48442 +@@ -356,7 +356,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
48443
48444 __pipe_lock(pipe);
48445
48446 @@ -86197,7 +109845,7 @@ index 42cf8dd..932cb27 100644
48447 send_sig(SIGPIPE, current, 0);
48448 ret = -EPIPE;
48449 goto out;
48450 -@@ -385,7 +391,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
48451 +@@ -391,7 +391,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
48452 for (;;) {
48453 int bufs;
48454
48455 @@ -86206,7 +109854,7 @@ index 42cf8dd..932cb27 100644
48456 send_sig(SIGPIPE, current, 0);
48457 if (!ret)
48458 ret = -EPIPE;
48459 -@@ -453,9 +459,9 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
48460 +@@ -459,9 +459,9 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
48461 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
48462 do_wakeup = 0;
48463 }
48464 @@ -86218,7 +109866,7 @@ index 42cf8dd..932cb27 100644
48465 }
48466 out:
48467 __pipe_unlock(pipe);
48468 -@@ -510,7 +516,7 @@ pipe_poll(struct file *filp, poll_table *wait)
48469 +@@ -516,7 +516,7 @@ pipe_poll(struct file *filp, poll_table *wait)
48470 mask = 0;
48471 if (filp->f_mode & FMODE_READ) {
48472 mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
48473 @@ -86227,7 +109875,7 @@ index 42cf8dd..932cb27 100644
48474 mask |= POLLHUP;
48475 }
48476
48477 -@@ -520,7 +526,7 @@ pipe_poll(struct file *filp, poll_table *wait)
48478 +@@ -526,7 +526,7 @@ pipe_poll(struct file *filp, poll_table *wait)
48479 * Most Unices do not set POLLERR for FIFOs but on Linux they
48480 * behave exactly like pipes for poll().
48481 */
48482 @@ -86236,7 +109884,7 @@ index 42cf8dd..932cb27 100644
48483 mask |= POLLERR;
48484 }
48485
48486 -@@ -532,7 +538,7 @@ static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe)
48487 +@@ -538,7 +538,7 @@ static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe)
48488 int kill = 0;
48489
48490 spin_lock(&inode->i_lock);
48491 @@ -86245,7 +109893,7 @@ index 42cf8dd..932cb27 100644
48492 inode->i_pipe = NULL;
48493 kill = 1;
48494 }
48495 -@@ -549,11 +555,11 @@ pipe_release(struct inode *inode, struct file *file)
48496 +@@ -555,11 +555,11 @@ pipe_release(struct inode *inode, struct file *file)
48497
48498 __pipe_lock(pipe);
48499 if (file->f_mode & FMODE_READ)
48500 @@ -86260,68 +109908,7 @@ index 42cf8dd..932cb27 100644
48501 wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP);
48502 kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
48503 kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
48504 -@@ -583,20 +589,49 @@ pipe_fasync(int fd, struct file *filp, int on)
48505 - return retval;
48506 - }
48507 -
48508 -+static void account_pipe_buffers(struct pipe_inode_info *pipe,
48509 -+ unsigned long old, unsigned long new)
48510 -+{
48511 -+ atomic_long_add(new - old, &pipe->user->pipe_bufs);
48512 -+}
48513 -+
48514 -+static bool too_many_pipe_buffers_soft(struct user_struct *user)
48515 -+{
48516 -+ return pipe_user_pages_soft &&
48517 -+ atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_soft;
48518 -+}
48519 -+
48520 -+static bool too_many_pipe_buffers_hard(struct user_struct *user)
48521 -+{
48522 -+ return pipe_user_pages_hard &&
48523 -+ atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_hard;
48524 -+}
48525 -+
48526 - struct pipe_inode_info *alloc_pipe_info(void)
48527 - {
48528 - struct pipe_inode_info *pipe;
48529 -
48530 - pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
48531 - if (pipe) {
48532 -- pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
48533 -+ unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
48534 -+ struct user_struct *user = get_current_user();
48535 -+
48536 -+ if (!too_many_pipe_buffers_hard(user)) {
48537 -+ if (too_many_pipe_buffers_soft(user))
48538 -+ pipe_bufs = 1;
48539 -+ pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * pipe_bufs, GFP_KERNEL);
48540 -+ }
48541 -+
48542 - if (pipe->bufs) {
48543 - init_waitqueue_head(&pipe->wait);
48544 - pipe->r_counter = pipe->w_counter = 1;
48545 -- pipe->buffers = PIPE_DEF_BUFFERS;
48546 -+ pipe->buffers = pipe_bufs;
48547 -+ pipe->user = user;
48548 -+ account_pipe_buffers(pipe, 0, pipe_bufs);
48549 - mutex_init(&pipe->mutex);
48550 - return pipe;
48551 - }
48552 -+ free_uid(user);
48553 - kfree(pipe);
48554 - }
48555 -
48556 -@@ -607,6 +642,8 @@ void free_pipe_info(struct pipe_inode_info *pipe)
48557 - {
48558 - int i;
48559 -
48560 -+ account_pipe_buffers(pipe, pipe->buffers, 0);
48561 -+ free_uid(pipe->user);
48562 - for (i = 0; i < pipe->buffers; i++) {
48563 - struct pipe_buffer *buf = pipe->bufs + i;
48564 - if (buf->ops)
48565 -@@ -618,7 +655,7 @@ void free_pipe_info(struct pipe_inode_info *pipe)
48566 +@@ -655,7 +655,7 @@ void free_pipe_info(struct pipe_inode_info *pipe)
48567 kfree(pipe);
48568 }
48569
48570 @@ -86330,7 +109917,7 @@ index 42cf8dd..932cb27 100644
48571
48572 /*
48573 * pipefs_dname() is called from d_path().
48574 -@@ -648,8 +685,9 @@ static struct inode * get_pipe_inode(void)
48575 +@@ -685,8 +685,9 @@ static struct inode * get_pipe_inode(void)
48576 goto fail_iput;
48577
48578 inode->i_pipe = pipe;
48579 @@ -86342,7 +109929,7 @@ index 42cf8dd..932cb27 100644
48580 inode->i_fop = &pipefifo_fops;
48581
48582 /*
48583 -@@ -831,17 +869,17 @@ static int fifo_open(struct inode *inode, struct file *filp)
48584 +@@ -868,17 +869,17 @@ static int fifo_open(struct inode *inode, struct file *filp)
48585 spin_lock(&inode->i_lock);
48586 if (inode->i_pipe) {
48587 pipe = inode->i_pipe;
48588 @@ -86363,7 +109950,7 @@ index 42cf8dd..932cb27 100644
48589 spin_unlock(&inode->i_lock);
48590 free_pipe_info(pipe);
48591 pipe = inode->i_pipe;
48592 -@@ -866,10 +904,10 @@ static int fifo_open(struct inode *inode, struct file *filp)
48593 +@@ -903,10 +904,10 @@ static int fifo_open(struct inode *inode, struct file *filp)
48594 * opened, even when there is no process writing the FIFO.
48595 */
48596 pipe->r_counter++;
48597 @@ -86376,7 +109963,7 @@ index 42cf8dd..932cb27 100644
48598 if ((filp->f_flags & O_NONBLOCK)) {
48599 /* suppress POLLHUP until we have
48600 * seen a writer */
48601 -@@ -888,14 +926,14 @@ static int fifo_open(struct inode *inode, struct file *filp)
48602 +@@ -925,14 +926,14 @@ static int fifo_open(struct inode *inode, struct file *filp)
48603 * errno=ENXIO when there is no process reading the FIFO.
48604 */
48605 ret = -ENXIO;
48606 @@ -86394,7 +109981,7 @@ index 42cf8dd..932cb27 100644
48607 if (wait_for_partner(pipe, &pipe->r_counter))
48608 goto err_wr;
48609 }
48610 -@@ -909,11 +947,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
48611 +@@ -946,11 +947,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
48612 * the process can at least talk to itself.
48613 */
48614
48615 @@ -86409,7 +109996,7 @@ index 42cf8dd..932cb27 100644
48616 wake_up_partner(pipe);
48617 break;
48618
48619 -@@ -927,13 +965,13 @@ static int fifo_open(struct inode *inode, struct file *filp)
48620 +@@ -964,13 +965,13 @@ static int fifo_open(struct inode *inode, struct file *filp)
48621 return 0;
48622
48623 err_rd:
48624 @@ -86425,15 +110012,7 @@ index 42cf8dd..932cb27 100644
48625 wake_up_interruptible(&pipe->wait);
48626 ret = -ERESTARTSYS;
48627 goto err;
48628 -@@ -998,6 +1036,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
48629 - memcpy(bufs + head, pipe->bufs, tail * sizeof(struct pipe_buffer));
48630 - }
48631 -
48632 -+ account_pipe_buffers(pipe, pipe->buffers, nr_pages);
48633 - pipe->curbuf = 0;
48634 - kfree(pipe->bufs);
48635 - pipe->bufs = bufs;
48636 -@@ -1009,7 +1048,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
48637 +@@ -1047,7 +1048,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
48638 * Currently we rely on the pipe array holding a power-of-2 number
48639 * of pages.
48640 */
48641 @@ -86442,7 +110021,7 @@ index 42cf8dd..932cb27 100644
48642 {
48643 unsigned long nr_pages;
48644
48645 -@@ -1057,18 +1096,26 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
48646 +@@ -1095,13 +1096,16 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
48647
48648 switch (cmd) {
48649 case F_SETPIPE_SZ: {
48650 @@ -86462,18 +110041,8 @@ index 42cf8dd..932cb27 100644
48651 goto out;
48652
48653 if (!capable(CAP_SYS_RESOURCE) && size > pipe_max_size) {
48654 - ret = -EPERM;
48655 - goto out;
48656 -+ } else if ((too_many_pipe_buffers_hard(pipe->user) ||
48657 -+ too_many_pipe_buffers_soft(pipe->user)) &&
48658 -+ !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN)) {
48659 -+ ret = -EPERM;
48660 -+ goto out;
48661 - }
48662 - ret = pipe_set_size(pipe, nr_pages);
48663 - break;
48664 diff --git a/fs/posix_acl.c b/fs/posix_acl.c
48665 -index 4adde1e..9311892 100644
48666 +index 711dd51..e55fd79 100644
48667 --- a/fs/posix_acl.c
48668 +++ b/fs/posix_acl.c
48669 @@ -20,6 +20,7 @@
48670 @@ -86750,7 +110319,7 @@ index b6c00ce..ab37ad1 100644
48671 static struct pid *
48672 get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
48673 diff --git a/fs/proc/base.c b/fs/proc/base.c
48674 -index b7de324..c1235e2 100644
48675 +index 4f764c2..d16e8b1 100644
48676 --- a/fs/proc/base.c
48677 +++ b/fs/proc/base.c
48678 @@ -113,6 +113,14 @@ struct pid_entry {
48679 @@ -86961,9 +110530,9 @@ index b7de324..c1235e2 100644
48680
48681 if (write && copy_from_user(page, buf, this_len)) {
48682 copied = -EFAULT;
48683 -@@ -954,9 +1034,16 @@ static ssize_t environ_read(struct file *file, char __user *buf,
48684 - int ret = 0;
48685 +@@ -955,9 +1035,16 @@ static ssize_t environ_read(struct file *file, char __user *buf,
48686 struct mm_struct *mm = file->private_data;
48687 + unsigned long env_start, env_end;
48688
48689 - if (!mm)
48690 + if (!mm || !mm->env_end)
48691 @@ -86979,17 +110548,22 @@ index b7de324..c1235e2 100644
48692 page = (char *)__get_free_page(GFP_TEMPORARY);
48693 if (!page)
48694 return -ENOMEM;
48695 -@@ -966,7 +1053,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
48696 - goto free;
48697 +@@ -971,9 +1058,12 @@ static ssize_t environ_read(struct file *file, char __user *buf,
48698 + env_end = mm->env_end;
48699 + up_read(&mm->mmap_sem);
48700 +
48701 ++ if (!env_end)
48702 ++ goto free;
48703 ++
48704 while (count > 0) {
48705 size_t this_len, max_len;
48706 - int retval;
48707 + ssize_t retval;
48708
48709 - if (src >= (mm->env_end - mm->env_start))
48710 + if (src >= (env_end - env_start))
48711 break;
48712 -@@ -1572,7 +1659,7 @@ static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie)
48713 - int error = -EACCES;
48714 +@@ -1583,7 +1673,7 @@ static const char *proc_pid_get_link(struct dentry *dentry,
48715 + return ERR_PTR(-ECHILD);
48716
48717 /* Are we allowed to snoop on the tasks file descriptors? */
48718 - if (!proc_fd_access_allowed(inode))
48719 @@ -86997,7 +110571,7 @@ index b7de324..c1235e2 100644
48720 goto out;
48721
48722 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
48723 -@@ -1616,8 +1703,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
48724 +@@ -1627,8 +1717,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
48725 struct path path;
48726
48727 /* Are we allowed to snoop on the tasks file descriptors? */
48728 @@ -87018,7 +110592,7 @@ index b7de324..c1235e2 100644
48729
48730 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
48731 if (error)
48732 -@@ -1667,7 +1764,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
48733 +@@ -1678,7 +1778,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
48734 rcu_read_lock();
48735 cred = __task_cred(task);
48736 inode->i_uid = cred->euid;
48737 @@ -87030,7 +110604,7 @@ index b7de324..c1235e2 100644
48738 rcu_read_unlock();
48739 }
48740 security_task_to_inode(task, inode);
48741 -@@ -1703,10 +1804,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
48742 +@@ -1714,10 +1818,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
48743 return -ENOENT;
48744 }
48745 if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
48746 @@ -87050,7 +110624,7 @@ index b7de324..c1235e2 100644
48747 }
48748 }
48749 rcu_read_unlock();
48750 -@@ -1744,11 +1854,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
48751 +@@ -1755,11 +1868,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
48752
48753 if (task) {
48754 if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
48755 @@ -87071,7 +110645,7 @@ index b7de324..c1235e2 100644
48756 rcu_read_unlock();
48757 } else {
48758 inode->i_uid = GLOBAL_ROOT_UID;
48759 -@@ -2287,6 +2406,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
48760 +@@ -2300,6 +2422,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
48761 if (!task)
48762 goto out_no_task;
48763
48764 @@ -87081,7 +110655,7 @@ index b7de324..c1235e2 100644
48765 /*
48766 * Yes, it does not scale. And it should not. Don't add
48767 * new entries into /proc/<tgid>/ without very good reasons.
48768 -@@ -2317,6 +2439,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
48769 +@@ -2330,6 +2455,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
48770 if (!task)
48771 return -ENOENT;
48772
48773 @@ -87091,7 +110665,7 @@ index b7de324..c1235e2 100644
48774 if (!dir_emit_dots(file, ctx))
48775 goto out;
48776
48777 -@@ -2732,7 +2857,9 @@ static const struct inode_operations proc_task_inode_operations;
48778 +@@ -2742,7 +2870,9 @@ static const struct inode_operations proc_task_inode_operations;
48779 static const struct pid_entry tgid_base_stuff[] = {
48780 DIR("task", S_IRUGO|S_IXUGO, proc_task_inode_operations, proc_task_operations),
48781 DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations),
48782 @@ -87101,7 +110675,7 @@ index b7de324..c1235e2 100644
48783 DIR("fdinfo", S_IRUSR|S_IXUSR, proc_fdinfo_inode_operations, proc_fdinfo_operations),
48784 DIR("ns", S_IRUSR|S_IXUGO, proc_ns_dir_inode_operations, proc_ns_dir_operations),
48785 #ifdef CONFIG_NET
48786 -@@ -2750,7 +2877,7 @@ static const struct pid_entry tgid_base_stuff[] = {
48787 +@@ -2760,7 +2890,7 @@ static const struct pid_entry tgid_base_stuff[] = {
48788 REG("autogroup", S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations),
48789 #endif
48790 REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
48791 @@ -87110,7 +110684,7 @@ index b7de324..c1235e2 100644
48792 ONE("syscall", S_IRUSR, proc_pid_syscall),
48793 #endif
48794 REG("cmdline", S_IRUGO, proc_pid_cmdline_ops),
48795 -@@ -2775,10 +2902,10 @@ static const struct pid_entry tgid_base_stuff[] = {
48796 +@@ -2785,10 +2915,10 @@ static const struct pid_entry tgid_base_stuff[] = {
48797 #ifdef CONFIG_SECURITY
48798 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
48799 #endif
48800 @@ -87123,7 +110697,7 @@ index b7de324..c1235e2 100644
48801 ONE("stack", S_IRUSR, proc_pid_stack),
48802 #endif
48803 #ifdef CONFIG_SCHED_INFO
48804 -@@ -2812,6 +2939,9 @@ static const struct pid_entry tgid_base_stuff[] = {
48805 +@@ -2822,6 +2952,9 @@ static const struct pid_entry tgid_base_stuff[] = {
48806 #ifdef CONFIG_HARDWALL
48807 ONE("hardwall", S_IRUGO, proc_pid_hardwall),
48808 #endif
48809 @@ -87133,7 +110707,7 @@ index b7de324..c1235e2 100644
48810 #ifdef CONFIG_USER_NS
48811 REG("uid_map", S_IRUGO|S_IWUSR, proc_uid_map_operations),
48812 REG("gid_map", S_IRUGO|S_IWUSR, proc_gid_map_operations),
48813 -@@ -2944,7 +3074,14 @@ static int proc_pid_instantiate(struct inode *dir,
48814 +@@ -2954,7 +3087,14 @@ static int proc_pid_instantiate(struct inode *dir,
48815 if (!inode)
48816 goto out;
48817
48818 @@ -87148,7 +110722,7 @@ index b7de324..c1235e2 100644
48819 inode->i_op = &proc_tgid_base_inode_operations;
48820 inode->i_fop = &proc_tgid_base_operations;
48821 inode->i_flags|=S_IMMUTABLE;
48822 -@@ -2982,7 +3119,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
48823 +@@ -2992,7 +3132,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
48824 if (!task)
48825 goto out;
48826
48827 @@ -87160,7 +110734,7 @@ index b7de324..c1235e2 100644
48828 put_task_struct(task);
48829 out:
48830 return ERR_PTR(result);
48831 -@@ -3096,7 +3237,7 @@ static const struct pid_entry tid_base_stuff[] = {
48832 +@@ -3106,7 +3250,7 @@ static const struct pid_entry tid_base_stuff[] = {
48833 REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
48834 #endif
48835 REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
48836 @@ -87169,7 +110743,7 @@ index b7de324..c1235e2 100644
48837 ONE("syscall", S_IRUSR, proc_pid_syscall),
48838 #endif
48839 REG("cmdline", S_IRUGO, proc_pid_cmdline_ops),
48840 -@@ -3123,10 +3264,10 @@ static const struct pid_entry tid_base_stuff[] = {
48841 +@@ -3133,10 +3277,10 @@ static const struct pid_entry tid_base_stuff[] = {
48842 #ifdef CONFIG_SECURITY
48843 DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
48844 #endif
48845 @@ -87215,7 +110789,7 @@ index 50493ed..248166b 100644
48846 }
48847 fs_initcall(proc_devices_init);
48848 diff --git a/fs/proc/fd.c b/fs/proc/fd.c
48849 -index 3c2a915..cb7934e 100644
48850 +index 56afa5e..cb7934e 100644
48851 --- a/fs/proc/fd.c
48852 +++ b/fs/proc/fd.c
48853 @@ -27,7 +27,8 @@ static int seq_show(struct seq_file *m, void *v)
48854 @@ -87228,15 +110802,7 @@ index 3c2a915..cb7934e 100644
48855 put_task_struct(task);
48856
48857 if (files) {
48858 -@@ -258,6 +259,7 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,
48859 - name, len, instantiate, p,
48860 - (void *)(unsigned long)fd))
48861 - goto out_fd_loop;
48862 -+ cond_resched();
48863 - rcu_read_lock();
48864 - }
48865 - rcu_read_unlock();
48866 -@@ -295,13 +297,15 @@ int proc_fd_permission(struct inode *inode, int mask)
48867 +@@ -296,13 +297,15 @@ int proc_fd_permission(struct inode *inode, int mask)
48868 int rv;
48869
48870 rv = generic_permission(inode, mask);
48871 @@ -87374,7 +110940,7 @@ index ff3ffc7..1aec0a3 100644
48872 {
48873 umode_t mode = S_IFDIR | S_IRUGO | S_IXUGO;
48874 diff --git a/fs/proc/inode.c b/fs/proc/inode.c
48875 -index bd95b9f..a64a773 100644
48876 +index 42305dd..968caba 100644
48877 --- a/fs/proc/inode.c
48878 +++ b/fs/proc/inode.c
48879 @@ -23,11 +23,17 @@
48880 @@ -87409,7 +110975,7 @@ index bd95b9f..a64a773 100644
48881 }
48882
48883 static struct kmem_cache * proc_inode_cachep;
48884 -@@ -429,7 +442,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
48885 +@@ -431,7 +444,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
48886 if (de->mode) {
48887 inode->i_mode = de->mode;
48888 inode->i_uid = de->uid;
48889 @@ -87486,7 +111052,7 @@ index a352d57..cb94a5c 100644
48890 }
48891 fs_initcall(proc_interrupts_init);
48892 diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
48893 -index 92e6726..47a8d4c 100644
48894 +index a939f5e..0de6e70 100644
48895 --- a/fs/proc/kcore.c
48896 +++ b/fs/proc/kcore.c
48897 @@ -316,7 +316,7 @@ static char *storenote(struct memelfnote *men, char *bufp)
48898 @@ -87564,10 +111130,10 @@ index 92e6726..47a8d4c 100644
48899 .priority = 0,
48900 };
48901 diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
48902 -index 9155a5a..abe1823 100644
48903 +index df4661a..03c3e5e 100644
48904 --- a/fs/proc/meminfo.c
48905 +++ b/fs/proc/meminfo.c
48906 -@@ -191,7 +191,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
48907 +@@ -188,7 +188,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
48908 0ul, // used to be vmalloc 'used'
48909 0ul // used to be vmalloc 'largest_chunk'
48910 #ifdef CONFIG_MEMORY_FAILURE
48911 @@ -88011,13 +111577,13 @@ index 510413eb..34d9a8c 100644
48912 seq_printf(p, "softirq %llu", (unsigned long long)sum_softirq);
48913
48914 diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
48915 -index 09cd3ed..862cbb3 100644
48916 +index fa95ab2..7ab502b 100644
48917 --- a/fs/proc/task_mmu.c
48918 +++ b/fs/proc/task_mmu.c
48919 -@@ -14,12 +14,19 @@
48920 - #include <linux/swapops.h>
48921 +@@ -15,12 +15,19 @@
48922 #include <linux/mmu_notifier.h>
48923 #include <linux/page_idle.h>
48924 + #include <linux/shmem_fs.h>
48925 +#include <linux/grsecurity.h>
48926
48927 #include <asm/elf.h>
48928 @@ -88033,8 +111599,8 @@ index 09cd3ed..862cbb3 100644
48929 +
48930 void task_mem(struct seq_file *m, struct mm_struct *mm)
48931 {
48932 - unsigned long data, text, lib, swap, ptes, pmds;
48933 -@@ -58,8 +65,13 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
48934 + unsigned long text, lib, swap, ptes, pmds, anon, file, shmem;
48935 +@@ -65,8 +72,13 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
48936 "VmLib:\t%8lu kB\n"
48937 "VmPTE:\t%8lu kB\n"
48938 "VmPMD:\t%8lu kB\n"
48939 @@ -88050,7 +111616,7 @@ index 09cd3ed..862cbb3 100644
48940 total_vm << (PAGE_SHIFT-10),
48941 mm->locked_vm << (PAGE_SHIFT-10),
48942 mm->pinned_vm << (PAGE_SHIFT-10),
48943 -@@ -69,7 +81,19 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
48944 +@@ -79,7 +91,19 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
48945 mm->stack_vm << (PAGE_SHIFT-10), text, lib,
48946 ptes >> 10,
48947 pmds >> 10,
48948 @@ -88071,7 +111637,16 @@ index 09cd3ed..862cbb3 100644
48949 hugetlb_report_usage(m, mm);
48950 }
48951
48952 -@@ -287,13 +311,13 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48953 +@@ -281,7 +305,7 @@ static int is_stack(struct proc_maps_private *priv,
48954 + stack = vma_is_stack_for_task(vma, task);
48955 + rcu_read_unlock();
48956 + }
48957 +- return stack;
48958 ++ return stack || (vma->vm_flags & (VM_GROWSDOWN | VM_GROWSUP));
48959 + }
48960 +
48961 + static void
48962 +@@ -304,13 +328,13 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48963 pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
48964 }
48965
48966 @@ -88090,7 +111665,7 @@ index 09cd3ed..862cbb3 100644
48967
48968 seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
48969 seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
48970 -@@ -303,7 +327,11 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48971 +@@ -320,7 +344,11 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48972 flags & VM_WRITE ? 'w' : '-',
48973 flags & VM_EXEC ? 'x' : '-',
48974 flags & VM_MAYSHARE ? 's' : 'p',
48975 @@ -88102,7 +111677,7 @@ index 09cd3ed..862cbb3 100644
48976 MAJOR(dev), MINOR(dev), ino);
48977
48978 /*
48979 -@@ -312,7 +340,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48980 +@@ -329,7 +357,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48981 */
48982 if (file) {
48983 seq_pad(m, ' ');
48984 @@ -88111,19 +111686,7 @@ index 09cd3ed..862cbb3 100644
48985 goto done;
48986 }
48987
48988 -@@ -343,8 +371,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
48989 - * Thread stack in /proc/PID/task/TID/maps or
48990 - * the main process stack.
48991 - */
48992 -- if (!is_pid || (vma->vm_start <= mm->start_stack &&
48993 -- vma->vm_end >= mm->start_stack)) {
48994 -+ if (!is_pid || (vma->vm_flags & (VM_GROWSDOWN | VM_GROWSUP)) ||
48995 -+ (vma->vm_start <= mm->start_stack &&
48996 -+ vma->vm_end >= mm->start_stack)) {
48997 - name = "[stack]";
48998 - } else {
48999 - /* Thread stack in /proc/PID/maps */
49000 -@@ -364,6 +393,12 @@ done:
49001 +@@ -366,6 +394,12 @@ done:
49002
49003 static int show_map(struct seq_file *m, void *v, int is_pid)
49004 {
49005 @@ -88136,7 +111699,7 @@ index 09cd3ed..862cbb3 100644
49006 show_map_vma(m, v, is_pid);
49007 m_cache_vma(m, v);
49008 return 0;
49009 -@@ -601,6 +636,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
49010 +@@ -646,6 +680,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
49011 [ilog2(VM_RAND_READ)] = "rr",
49012 [ilog2(VM_DONTCOPY)] = "dc",
49013 [ilog2(VM_DONTEXPAND)] = "de",
49014 @@ -88146,7 +111709,7 @@ index 09cd3ed..862cbb3 100644
49015 [ilog2(VM_ACCOUNT)] = "ac",
49016 [ilog2(VM_NORESERVE)] = "nr",
49017 [ilog2(VM_HUGETLB)] = "ht",
49018 -@@ -670,9 +708,18 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
49019 +@@ -715,6 +752,12 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
49020 .private = &mss,
49021 };
49022
49023 @@ -88157,6 +111720,12 @@ index 09cd3ed..862cbb3 100644
49024 + }
49025 +#endif
49026 memset(&mss, 0, sizeof mss);
49027 +
49028 + #ifdef CONFIG_SHMEM
49029 +@@ -741,8 +784,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
49030 + }
49031 + #endif
49032 +
49033 - /* mmap_sem is held in m_start */
49034 - walk_page_vma(vma, &smaps_walk);
49035 +#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
49036 @@ -88167,7 +111736,7 @@ index 09cd3ed..862cbb3 100644
49037
49038 show_map_vma(m, vma, is_pid);
49039
49040 -@@ -694,7 +741,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
49041 +@@ -764,7 +810,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
49042 "KernelPageSize: %8lu kB\n"
49043 "MMUPageSize: %8lu kB\n"
49044 "Locked: %8lu kB\n",
49045 @@ -88179,7 +111748,7 @@ index 09cd3ed..862cbb3 100644
49046 mss.resident >> 10,
49047 (unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
49048 mss.shared_clean >> 10,
49049 -@@ -1518,6 +1569,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
49050 +@@ -1588,6 +1638,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
49051 char buffer[64];
49052 int nid;
49053
49054 @@ -88193,7 +111762,7 @@ index 09cd3ed..862cbb3 100644
49055 if (!mm)
49056 return 0;
49057
49058 -@@ -1532,11 +1590,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
49059 +@@ -1602,11 +1659,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
49060 mpol_to_str(buffer, sizeof(buffer), proc_priv->task_mempolicy);
49061 }
49062
49063 @@ -88209,9 +111778,9 @@ index 09cd3ed..862cbb3 100644
49064 + seq_file_path(m, file, "\n\t\\= ");
49065 } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
49066 seq_puts(m, " heap");
49067 - } else {
49068 + } else if (is_stack(proc_priv, vma, is_pid)) {
49069 diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
49070 -index e0d64c9..c44c96e 100644
49071 +index faacb0c..ce736cd 100644
49072 --- a/fs/proc/task_nommu.c
49073 +++ b/fs/proc/task_nommu.c
49074 @@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
49075 @@ -88223,15 +111792,24 @@ index e0d64c9..c44c96e 100644
49076 sbytes += kobjsize(current->fs);
49077 else
49078 bytes += kobjsize(current->fs);
49079 -@@ -180,7 +180,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
49080 +@@ -142,7 +142,7 @@ static int is_stack(struct proc_maps_private *priv,
49081 + stack = vma_is_stack_for_task(vma, task);
49082 + rcu_read_unlock();
49083 + }
49084 +- return stack;
49085 ++ return stack || (vma->vm_flags & (VM_GROWSDOWN | VM_GROWSUP));
49086 + }
49087 +
49088 + /*
49089 +@@ -183,7 +183,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
49090
49091 if (file) {
49092 seq_pad(m, ' ');
49093 - seq_file_path(m, file, "");
49094 + seq_file_path(m, file, "\n\\");
49095 - } else if (mm) {
49096 - pid_t tid = pid_of_stack(priv, vma, is_pid);
49097 -
49098 + } else if (mm && is_stack(priv, vma, is_pid)) {
49099 + seq_pad(m, ' ');
49100 + seq_printf(m, "[stack]");
49101 diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
49102 index 4e61388..1a2523d 100644
49103 --- a/fs/proc/vmcore.c
49104 @@ -88303,10 +111881,10 @@ index d3fb2b6..43a8140 100644
49105 if (sbi->s_bytesex == BYTESEX_LE)
49106 return le32_to_cpu((__force __le32)n);
49107 diff --git a/fs/quota/netlink.c b/fs/quota/netlink.c
49108 -index bb2869f..d34ada8 100644
49109 +index d07a2f9..380906a 100644
49110 --- a/fs/quota/netlink.c
49111 +++ b/fs/quota/netlink.c
49112 -@@ -44,7 +44,7 @@ static struct genl_family quota_genl_family = {
49113 +@@ -42,7 +42,7 @@ static struct genl_family quota_genl_family = {
49114 void quota_send_warning(struct kqid qid, dev_t dev,
49115 const char warntype)
49116 {
49117 @@ -88315,7 +111893,7 @@ index bb2869f..d34ada8 100644
49118 struct sk_buff *skb;
49119 void *msg_head;
49120 int ret;
49121 -@@ -60,7 +60,7 @@ void quota_send_warning(struct kqid qid, dev_t dev,
49122 +@@ -58,7 +58,7 @@ void quota_send_warning(struct kqid qid, dev_t dev,
49123 "VFS: Not enough memory to send quota warning.\n");
49124 return;
49125 }
49126 @@ -88325,10 +111903,20 @@ index bb2869f..d34ada8 100644
49127 if (!msg_head) {
49128 printk(KERN_ERR
49129 diff --git a/fs/read_write.c b/fs/read_write.c
49130 -index 819ef3f..f07222d 100644
49131 +index dadf24e..f8ca660 100644
49132 --- a/fs/read_write.c
49133 +++ b/fs/read_write.c
49134 -@@ -505,7 +505,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t
49135 +@@ -23,7 +23,8 @@
49136 + #include <asm/uaccess.h>
49137 + #include <asm/unistd.h>
49138 +
49139 +-typedef ssize_t (*io_fn_t)(struct file *, char __user *, size_t, loff_t *);
49140 ++typedef ssize_t (*io_fnr_t)(struct file *, char __user *, size_t, loff_t *);
49141 ++typedef ssize_t (*io_fnw_t)(struct file *, const char __user *, size_t, loff_t *);
49142 + typedef ssize_t (*iter_fn_t)(struct kiocb *, struct iov_iter *);
49143 +
49144 + const struct file_operations generic_ro_fops = {
49145 +@@ -545,7 +546,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t
49146
49147 old_fs = get_fs();
49148 set_fs(get_ds());
49149 @@ -88337,8 +111925,97 @@ index 819ef3f..f07222d 100644
49150 if (count > MAX_RW_COUNT)
49151 count = MAX_RW_COUNT;
49152 ret = __vfs_write(file, p, count, pos);
49153 +@@ -709,7 +710,7 @@ static ssize_t do_iter_readv_writev(struct file *filp, struct iov_iter *iter,
49154 +
49155 + /* Do it by hand, with file-ops */
49156 + static ssize_t do_loop_readv_writev(struct file *filp, struct iov_iter *iter,
49157 +- loff_t *ppos, io_fn_t fn)
49158 ++ loff_t *ppos, io_fnr_t fnr, io_fnw_t fnw)
49159 + {
49160 + ssize_t ret = 0;
49161 +
49162 +@@ -717,7 +718,10 @@ static ssize_t do_loop_readv_writev(struct file *filp, struct iov_iter *iter,
49163 + struct iovec iovec = iov_iter_iovec(iter);
49164 + ssize_t nr;
49165 +
49166 +- nr = fn(filp, iovec.iov_base, iovec.iov_len, ppos);
49167 ++ if (fnr)
49168 ++ nr = fnr(filp, iovec.iov_base, iovec.iov_len, ppos);
49169 ++ else
49170 ++ nr = fnw(filp, iovec.iov_base, iovec.iov_len, ppos);
49171 +
49172 + if (nr < 0) {
49173 + if (!ret)
49174 +@@ -820,7 +824,8 @@ static ssize_t do_readv_writev(int type, struct file *file,
49175 + struct iovec *iov = iovstack;
49176 + struct iov_iter iter;
49177 + ssize_t ret;
49178 +- io_fn_t fn;
49179 ++ io_fnr_t fnr;
49180 ++ io_fnw_t fnw;
49181 + iter_fn_t iter_fn;
49182 +
49183 + ret = import_iovec(type, uvector, nr_segs,
49184 +@@ -836,10 +841,12 @@ static ssize_t do_readv_writev(int type, struct file *file,
49185 + goto out;
49186 +
49187 + if (type == READ) {
49188 +- fn = file->f_op->read;
49189 ++ fnr = file->f_op->read;
49190 ++ fnw = NULL;
49191 + iter_fn = file->f_op->read_iter;
49192 + } else {
49193 +- fn = (io_fn_t)file->f_op->write;
49194 ++ fnr = NULL;
49195 ++ fnw = file->f_op->write;
49196 + iter_fn = file->f_op->write_iter;
49197 + file_start_write(file);
49198 + }
49199 +@@ -847,7 +854,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
49200 + if (iter_fn)
49201 + ret = do_iter_readv_writev(file, &iter, pos, iter_fn);
49202 + else
49203 +- ret = do_loop_readv_writev(file, &iter, pos, fn);
49204 ++ ret = do_loop_readv_writev(file, &iter, pos, fnr, fnw);
49205 +
49206 + if (type != READ)
49207 + file_end_write(file);
49208 +@@ -994,7 +1001,8 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
49209 + struct iovec *iov = iovstack;
49210 + struct iov_iter iter;
49211 + ssize_t ret;
49212 +- io_fn_t fn;
49213 ++ io_fnr_t fnr;
49214 ++ io_fnw_t fnw;
49215 + iter_fn_t iter_fn;
49216 +
49217 + ret = compat_import_iovec(type, uvector, nr_segs,
49218 +@@ -1010,10 +1018,12 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
49219 + goto out;
49220 +
49221 + if (type == READ) {
49222 +- fn = file->f_op->read;
49223 ++ fnr = file->f_op->read;
49224 ++ fnw = NULL;
49225 + iter_fn = file->f_op->read_iter;
49226 + } else {
49227 +- fn = (io_fn_t)file->f_op->write;
49228 ++ fnr = NULL;
49229 ++ fnw = file->f_op->write;
49230 + iter_fn = file->f_op->write_iter;
49231 + file_start_write(file);
49232 + }
49233 +@@ -1021,7 +1031,7 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
49234 + if (iter_fn)
49235 + ret = do_iter_readv_writev(file, &iter, pos, iter_fn);
49236 + else
49237 +- ret = do_loop_readv_writev(file, &iter, pos, fn);
49238 ++ ret = do_loop_readv_writev(file, &iter, pos, fnr, fnw);
49239 +
49240 + if (type != READ)
49241 + file_end_write(file);
49242 diff --git a/fs/readdir.c b/fs/readdir.c
49243 -index ced6791..e0500c1 100644
49244 +index e69ef3b..ffb5456 100644
49245 --- a/fs/readdir.c
49246 +++ b/fs/readdir.c
49247 @@ -18,6 +18,7 @@
49248 @@ -88486,7 +112163,7 @@ index aca73dd..e3c558d 100644
49249
49250 #if ! (TYPE_STAT_DATA == 0 && TYPE_INDIRECT == 1 && TYPE_DIRECT == 2 && TYPE_DIRENTRY == 3)
49251 diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
49252 -index 621b9f3..af527fd 100644
49253 +index fe99915..24fd9bd 100644
49254 --- a/fs/reiserfs/procfs.c
49255 +++ b/fs/reiserfs/procfs.c
49256 @@ -114,7 +114,7 @@ static int show_super(struct seq_file *m, void *unused)
49257 @@ -88521,10 +112198,10 @@ index 2adcde1..7d27bc8 100644
49258 #define __fs_changed(gen,s) (gen != get_generation (s))
49259 #define fs_changed(gen,s) \
49260 diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
49261 -index 4a62fe8..5dc2f5f 100644
49262 +index c0306ec..4083bee 100644
49263 --- a/fs/reiserfs/super.c
49264 +++ b/fs/reiserfs/super.c
49265 -@@ -1870,6 +1870,10 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
49266 +@@ -1871,6 +1871,10 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
49267 sbi->s_mount_opt |= (1 << REISERFS_SMALLTAIL);
49268 sbi->s_mount_opt |= (1 << REISERFS_ERROR_RO);
49269 sbi->s_mount_opt |= (1 << REISERFS_BARRIER_FLUSH);
49270 @@ -88536,7 +112213,7 @@ index 4a62fe8..5dc2f5f 100644
49271 sbi->s_alloc_options.preallocmin = 0;
49272 /* Preallocate by 16 blocks (17-1) at once */
49273 diff --git a/fs/select.c b/fs/select.c
49274 -index 0155473..da772c4 100644
49275 +index 79d0d49..9203954 100644
49276 --- a/fs/select.c
49277 +++ b/fs/select.c
49278 @@ -20,6 +20,7 @@
49279 @@ -88659,7 +112336,7 @@ index e85664b..ad62e5f 100644
49280 {
49281 const struct seq_operations *op = ((struct seq_file *)file->private_data)->op;
49282 diff --git a/fs/splice.c b/fs/splice.c
49283 -index 0f77e96..9dce13e 100644
49284 +index 19e0b10..288f7e0 100644
49285 --- a/fs/splice.c
49286 +++ b/fs/splice.c
49287 @@ -195,7 +195,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
49288 @@ -88692,7 +112369,7 @@ index 0f77e96..9dce13e 100644
49289 }
49290
49291 pipe_unlock(pipe);
49292 -@@ -582,7 +582,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
49293 +@@ -580,7 +580,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
49294 old_fs = get_fs();
49295 set_fs(get_ds());
49296 /* The cast to a user pointer is valid due to the set_fs() */
49297 @@ -88701,7 +112378,7 @@ index 0f77e96..9dce13e 100644
49298 set_fs(old_fs);
49299
49300 return res;
49301 -@@ -597,7 +597,7 @@ ssize_t kernel_write(struct file *file, const char *buf, size_t count,
49302 +@@ -595,7 +595,7 @@ ssize_t kernel_write(struct file *file, const char *buf, size_t count,
49303 old_fs = get_fs();
49304 set_fs(get_ds());
49305 /* The cast to a user pointer is valid due to the set_fs() */
49306 @@ -88710,7 +112387,7 @@ index 0f77e96..9dce13e 100644
49307 set_fs(old_fs);
49308
49309 return res;
49310 -@@ -650,7 +650,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
49311 +@@ -648,7 +648,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
49312 goto err;
49313
49314 this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
49315 @@ -88719,7 +112396,7 @@ index 0f77e96..9dce13e 100644
49316 vec[i].iov_len = this_len;
49317 spd.pages[i] = page;
49318 spd.nr_pages++;
49319 -@@ -789,7 +789,7 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des
49320 +@@ -787,7 +787,7 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des
49321 ops->release(pipe, buf);
49322 pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1);
49323 pipe->nrbufs--;
49324 @@ -88728,7 +112405,7 @@ index 0f77e96..9dce13e 100644
49325 sd->need_wakeup = true;
49326 }
49327
49328 -@@ -820,10 +820,10 @@ static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_des
49329 +@@ -818,10 +818,10 @@ static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_des
49330 return -ERESTARTSYS;
49331
49332 while (!pipe->nrbufs) {
49333 @@ -88741,7 +112418,7 @@ index 0f77e96..9dce13e 100644
49334 return 0;
49335
49336 if (sd->flags & SPLICE_F_NONBLOCK)
49337 -@@ -1039,7 +1039,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
49338 +@@ -1037,7 +1037,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
49339 ops->release(pipe, buf);
49340 pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1);
49341 pipe->nrbufs--;
49342 @@ -88750,7 +112427,7 @@ index 0f77e96..9dce13e 100644
49343 sd.need_wakeup = true;
49344 } else {
49345 buf->offset += ret;
49346 -@@ -1199,7 +1199,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
49347 +@@ -1197,7 +1197,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
49348 * out of the pipe right after the splice_to_pipe(). So set
49349 * PIPE_READERS appropriately.
49350 */
49351 @@ -88759,7 +112436,7 @@ index 0f77e96..9dce13e 100644
49352
49353 current->splice_pipe = pipe;
49354 }
49355 -@@ -1506,6 +1506,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
49356 +@@ -1504,6 +1504,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
49357
49358 partial[buffers].offset = off;
49359 partial[buffers].len = plen;
49360 @@ -88767,7 +112444,7 @@ index 0f77e96..9dce13e 100644
49361
49362 off = 0;
49363 len -= plen;
49364 -@@ -1737,9 +1738,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
49365 +@@ -1735,9 +1736,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
49366 ret = -ERESTARTSYS;
49367 break;
49368 }
49369 @@ -88779,7 +112456,7 @@ index 0f77e96..9dce13e 100644
49370 if (flags & SPLICE_F_NONBLOCK) {
49371 ret = -EAGAIN;
49372 break;
49373 -@@ -1771,7 +1772,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
49374 +@@ -1769,7 +1770,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
49375 pipe_lock(pipe);
49376
49377 while (pipe->nrbufs >= pipe->buffers) {
49378 @@ -88788,7 +112465,7 @@ index 0f77e96..9dce13e 100644
49379 send_sig(SIGPIPE, current, 0);
49380 ret = -EPIPE;
49381 break;
49382 -@@ -1784,9 +1785,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
49383 +@@ -1782,9 +1783,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
49384 ret = -ERESTARTSYS;
49385 break;
49386 }
49387 @@ -88800,7 +112477,7 @@ index 0f77e96..9dce13e 100644
49388 }
49389
49390 pipe_unlock(pipe);
49391 -@@ -1822,14 +1823,14 @@ retry:
49392 +@@ -1820,14 +1821,14 @@ retry:
49393 pipe_double_lock(ipipe, opipe);
49394
49395 do {
49396 @@ -88817,7 +112494,7 @@ index 0f77e96..9dce13e 100644
49397 break;
49398
49399 /*
49400 -@@ -1926,7 +1927,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
49401 +@@ -1924,7 +1925,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
49402 pipe_double_lock(ipipe, opipe);
49403
49404 do {
49405 @@ -88826,7 +112503,7 @@ index 0f77e96..9dce13e 100644
49406 send_sig(SIGPIPE, current, 0);
49407 if (!ret)
49408 ret = -EPIPE;
49409 -@@ -1971,7 +1972,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
49410 +@@ -1969,7 +1970,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
49411 * return EAGAIN if we have the potential of some data in the
49412 * future, otherwise just return 0
49413 */
49414 @@ -88836,7 +112513,7 @@ index 0f77e96..9dce13e 100644
49415
49416 pipe_unlock(ipipe);
49417 diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c
49418 -index 6a4cc34..acc9eef 100644
49419 +index 1e9de96..a77cc8c 100644
49420 --- a/fs/squashfs/xattr.c
49421 +++ b/fs/squashfs/xattr.c
49422 @@ -46,8 +46,8 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49423 @@ -88850,21 +112527,16 @@ index 6a4cc34..acc9eef 100644
49424
49425 /* check that the file system has xattrs */
49426 if (msblk->xattr_id_table == NULL)
49427 -@@ -68,11 +68,11 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49428 - name_size = le16_to_cpu(entry.size);
49429 - handler = squashfs_xattr_handler(le16_to_cpu(entry.type));
49430 - if (handler)
49431 -- prefix_size = handler->list(handler, d, buffer, rest,
49432 -+ prefix_size = handler->list(handler, d, buffer, buffer ? buffer_size - used : 0,
49433 - NULL, name_size);
49434 - if (prefix_size) {
49435 +@@ -72,7 +72,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49436 + size_t prefix_size = strlen(prefix);
49437 +
49438 if (buffer) {
49439 - if (prefix_size + name_size + 1 > rest) {
49440 + if (prefix_size + name_size + 1 > buffer_size - used) {
49441 err = -ERANGE;
49442 goto failed;
49443 }
49444 -@@ -86,7 +86,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49445 +@@ -87,7 +87,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49446 buffer[name_size] = '\0';
49447 buffer += name_size + 1;
49448 }
49449 @@ -88873,7 +112545,7 @@ index 6a4cc34..acc9eef 100644
49450 } else {
49451 /* no handler or insuffficient privileges, so skip */
49452 err = squashfs_read_metadata(sb, NULL, &start,
49453 -@@ -107,7 +107,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49454 +@@ -108,7 +108,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
49455 if (err < 0)
49456 goto failed;
49457 }
49458 @@ -88883,7 +112555,7 @@ index 6a4cc34..acc9eef 100644
49459 failed:
49460 return err;
49461 diff --git a/fs/stat.c b/fs/stat.c
49462 -index d4a61d8..87dbeb3 100644
49463 +index bc045c7..68725c1 100644
49464 --- a/fs/stat.c
49465 +++ b/fs/stat.c
49466 @@ -28,8 +28,13 @@ void generic_fillattr(struct inode *inode, struct kstat *stat)
49467 @@ -88922,7 +112594,7 @@ index d4a61d8..87dbeb3 100644
49468 generic_fillattr(inode, stat);
49469 return 0;
49470 diff --git a/fs/super.c b/fs/super.c
49471 -index f5f4b32..f6bedd2 100644
49472 +index 74914b1..c570339 100644
49473 --- a/fs/super.c
49474 +++ b/fs/super.c
49475 @@ -348,7 +348,8 @@ EXPORT_SYMBOL(deactivate_super);
49476 @@ -89009,7 +112681,7 @@ index 6c21228..9afd5fe 100644
49477 if (sbi->s_bytesex == BYTESEX_PDP)
49478 return PDP_swab((__force __u32)n);
49479 diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
49480 -index c66f242..2e8701a 100644
49481 +index 4a0e48f..ca5b016 100644
49482 --- a/fs/tracefs/inode.c
49483 +++ b/fs/tracefs/inode.c
49484 @@ -53,7 +53,7 @@ static const struct file_operations tracefs_file_operations = {
49485 @@ -89034,6 +112706,150 @@ index c66f242..2e8701a 100644
49486
49487 return dentry;
49488 }
49489 +diff --git a/fs/ubifs/find.c b/fs/ubifs/find.c
49490 +index 2dcf3d4..fa1e496 100644
49491 +--- a/fs/ubifs/find.c
49492 ++++ b/fs/ubifs/find.c
49493 +@@ -94,8 +94,9 @@ static int valuable(struct ubifs_info *c, const struct ubifs_lprops *lprops)
49494 + */
49495 + static int scan_for_dirty_cb(struct ubifs_info *c,
49496 + const struct ubifs_lprops *lprops, int in_tree,
49497 +- struct scan_data *data)
49498 ++ void *_data)
49499 + {
49500 ++ struct scan_data *data = _data;
49501 + int ret = LPT_SCAN_CONTINUE;
49502 +
49503 + /* Exclude LEBs that are currently in use */
49504 +@@ -179,7 +180,7 @@ static const struct ubifs_lprops *scan_for_dirty(struct ubifs_info *c,
49505 + data.lnum = -1;
49506 + data.exclude_index = exclude_index;
49507 + err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
49508 +- (ubifs_lpt_scan_callback)scan_for_dirty_cb,
49509 ++ scan_for_dirty_cb,
49510 + &data);
49511 + if (err)
49512 + return ERR_PTR(err);
49513 +@@ -361,8 +362,9 @@ out:
49514 + */
49515 + static int scan_for_free_cb(struct ubifs_info *c,
49516 + const struct ubifs_lprops *lprops, int in_tree,
49517 +- struct scan_data *data)
49518 ++ void *_data)
49519 + {
49520 ++ struct scan_data *data = _data;
49521 + int ret = LPT_SCAN_CONTINUE;
49522 +
49523 + /* Exclude LEBs that are currently in use */
49524 +@@ -458,7 +460,7 @@ const struct ubifs_lprops *do_find_free_space(struct ubifs_info *c,
49525 + data.pick_free = pick_free;
49526 + data.lnum = -1;
49527 + err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
49528 +- (ubifs_lpt_scan_callback)scan_for_free_cb,
49529 ++ scan_for_free_cb,
49530 + &data);
49531 + if (err)
49532 + return ERR_PTR(err);
49533 +@@ -601,8 +603,9 @@ out:
49534 + */
49535 + static int scan_for_idx_cb(struct ubifs_info *c,
49536 + const struct ubifs_lprops *lprops, int in_tree,
49537 +- struct scan_data *data)
49538 ++ void *_data)
49539 + {
49540 ++ struct scan_data *data = _data;
49541 + int ret = LPT_SCAN_CONTINUE;
49542 +
49543 + /* Exclude LEBs that are currently in use */
49544 +@@ -638,7 +641,7 @@ static const struct ubifs_lprops *scan_for_leb_for_idx(struct ubifs_info *c)
49545 +
49546 + data.lnum = -1;
49547 + err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
49548 +- (ubifs_lpt_scan_callback)scan_for_idx_cb,
49549 ++ scan_for_idx_cb,
49550 + &data);
49551 + if (err)
49552 + return ERR_PTR(err);
49553 +@@ -738,18 +741,21 @@ out:
49554 + return err;
49555 + }
49556 +
49557 +-static int cmp_dirty_idx(const struct ubifs_lprops **a,
49558 +- const struct ubifs_lprops **b)
49559 ++static int cmp_dirty_idx(const void *_a,
49560 ++ const void *_b)
49561 + {
49562 ++ const struct ubifs_lprops **a = (const struct ubifs_lprops **)_a;
49563 ++ const struct ubifs_lprops **b = (const struct ubifs_lprops **)_b;
49564 + const struct ubifs_lprops *lpa = *a;
49565 + const struct ubifs_lprops *lpb = *b;
49566 +
49567 + return lpa->dirty + lpa->free - lpb->dirty - lpb->free;
49568 + }
49569 +
49570 +-static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b,
49571 +- int size)
49572 ++static void swap_dirty_idx(void *_a, void *_b, int size)
49573 + {
49574 ++ struct ubifs_lprops **a = (struct ubifs_lprops **)_a;
49575 ++ struct ubifs_lprops **b = (struct ubifs_lprops **)_b;
49576 + struct ubifs_lprops *t = *a;
49577 +
49578 + *a = *b;
49579 +@@ -775,8 +781,7 @@ int ubifs_save_dirty_idx_lnums(struct ubifs_info *c)
49580 + sizeof(void *) * c->dirty_idx.cnt);
49581 + /* Sort it so that the dirtiest is now at the end */
49582 + sort(c->dirty_idx.arr, c->dirty_idx.cnt, sizeof(void *),
49583 +- (int (*)(const void *, const void *))cmp_dirty_idx,
49584 +- (void (*)(void *, void *, int))swap_dirty_idx);
49585 ++ cmp_dirty_idx, swap_dirty_idx);
49586 + dbg_find("found %d dirty index LEBs", c->dirty_idx.cnt);
49587 + if (c->dirty_idx.cnt)
49588 + dbg_find("dirtiest index LEB is %d with dirty %d and free %d",
49589 +@@ -804,8 +809,9 @@ int ubifs_save_dirty_idx_lnums(struct ubifs_info *c)
49590 + */
49591 + static int scan_dirty_idx_cb(struct ubifs_info *c,
49592 + const struct ubifs_lprops *lprops, int in_tree,
49593 +- struct scan_data *data)
49594 ++ void *_data)
49595 + {
49596 ++ struct scan_data *data = _data;
49597 + int ret = LPT_SCAN_CONTINUE;
49598 +
49599 + /* Exclude LEBs that are currently in use */
49600 +@@ -865,7 +871,7 @@ static int find_dirty_idx_leb(struct ubifs_info *c)
49601 + /* All pnodes are in memory, so skip scan */
49602 + return -ENOSPC;
49603 + err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
49604 +- (ubifs_lpt_scan_callback)scan_dirty_idx_cb,
49605 ++ scan_dirty_idx_cb,
49606 + &data);
49607 + if (err)
49608 + return err;
49609 +diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
49610 +index a0011aa..c8cf709 100644
49611 +--- a/fs/ubifs/lprops.c
49612 ++++ b/fs/ubifs/lprops.c
49613 +@@ -1028,8 +1028,9 @@ out:
49614 + */
49615 + static int scan_check_cb(struct ubifs_info *c,
49616 + const struct ubifs_lprops *lp, int in_tree,
49617 +- struct ubifs_lp_stats *lst)
49618 ++ void *_lst)
49619 + {
49620 ++ struct ubifs_lp_stats *lst = _lst;
49621 + struct ubifs_scan_leb *sleb;
49622 + struct ubifs_scan_node *snod;
49623 + int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret;
49624 +@@ -1283,7 +1284,7 @@ int dbg_check_lprops(struct ubifs_info *c)
49625 +
49626 + memset(&lst, 0, sizeof(struct ubifs_lp_stats));
49627 + err = ubifs_lpt_scan_nolock(c, c->main_first, c->leb_cnt - 1,
49628 +- (ubifs_lpt_scan_callback)scan_check_cb,
49629 ++ scan_check_cb,
49630 + &lst);
49631 + if (err && err != -ENOSPC)
49632 + goto out;
49633 diff --git a/fs/udf/misc.c b/fs/udf/misc.c
49634 index 71d1c25..084e2ad 100644
49635 --- a/fs/udf/misc.c
49636 @@ -89083,7 +112899,7 @@ index 66cdb44..2eb05e1 100644
49637 /*
49638 * Flush page faults out of all CPUs. NOTE: all page faults
49639 diff --git a/fs/utimes.c b/fs/utimes.c
49640 -index aa138d6..5f3a811 100644
49641 +index 85c40f4..52fcd23 100644
49642 --- a/fs/utimes.c
49643 +++ b/fs/utimes.c
49644 @@ -1,6 +1,7 @@
49645 @@ -89104,15 +112920,15 @@ index aa138d6..5f3a811 100644
49646 + goto mnt_drop_write_and_out;
49647 + }
49648 +
49649 - mutex_lock(&inode->i_mutex);
49650 + inode_lock(inode);
49651 error = notify_change(path->dentry, &newattrs, &delegated_inode);
49652 - mutex_unlock(&inode->i_mutex);
49653 + inode_unlock(inode);
49654 diff --git a/fs/xattr.c b/fs/xattr.c
49655 -index 9b932b9..31cdeb7 100644
49656 +index 4861322..205ea1d 100644
49657 --- a/fs/xattr.c
49658 +++ b/fs/xattr.c
49659 -@@ -227,6 +227,27 @@ int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
49660 - return rc;
49661 +@@ -208,6 +208,27 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
49662 + return error;
49663 }
49664
49665 +#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
49666 @@ -89139,7 +112955,7 @@ index 9b932b9..31cdeb7 100644
49667 ssize_t
49668 vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
49669 {
49670 -@@ -319,7 +340,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
49671 +@@ -300,7 +321,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
49672 * Extended attribute SET operations
49673 */
49674 static long
49675 @@ -89148,7 +112964,7 @@ index 9b932b9..31cdeb7 100644
49676 size_t size, int flags)
49677 {
49678 int error;
49679 -@@ -355,7 +376,12 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
49680 +@@ -334,7 +355,12 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
49681 posix_acl_fix_xattr_from_user(kvalue, size);
49682 }
49683
49684 @@ -89160,9 +112976,9 @@ index 9b932b9..31cdeb7 100644
49685 +
49686 + error = vfs_setxattr(path->dentry, kname, kvalue, size, flags);
49687 out:
49688 - if (vvalue)
49689 - vfree(vvalue);
49690 -@@ -376,7 +402,7 @@ retry:
49691 + kvfree(kvalue);
49692 +
49693 +@@ -353,7 +379,7 @@ retry:
49694 return error;
49695 error = mnt_want_write(path.mnt);
49696 if (!error) {
49697 @@ -89171,7 +112987,7 @@ index 9b932b9..31cdeb7 100644
49698 mnt_drop_write(path.mnt);
49699 }
49700 path_put(&path);
49701 -@@ -412,7 +438,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
49702 +@@ -389,7 +415,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
49703 audit_file(f.file);
49704 error = mnt_want_write_file(f.file);
49705 if (!error) {
49706 @@ -89180,7 +112996,7 @@ index 9b932b9..31cdeb7 100644
49707 mnt_drop_write_file(f.file);
49708 }
49709 fdput(f);
49710 -@@ -598,7 +624,7 @@ SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
49711 +@@ -569,7 +595,7 @@ SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
49712 * Extended attribute REMOVE operations
49713 */
49714 static long
49715 @@ -89189,7 +113005,7 @@ index 9b932b9..31cdeb7 100644
49716 {
49717 int error;
49718 char kname[XATTR_NAME_MAX + 1];
49719 -@@ -609,7 +635,10 @@ removexattr(struct dentry *d, const char __user *name)
49720 +@@ -580,7 +606,10 @@ removexattr(struct dentry *d, const char __user *name)
49721 if (error < 0)
49722 return error;
49723
49724 @@ -89201,7 +113017,7 @@ index 9b932b9..31cdeb7 100644
49725 }
49726
49727 static int path_removexattr(const char __user *pathname,
49728 -@@ -623,7 +652,7 @@ retry:
49729 +@@ -594,7 +623,7 @@ retry:
49730 return error;
49731 error = mnt_want_write(path.mnt);
49732 if (!error) {
49733 @@ -89210,7 +113026,7 @@ index 9b932b9..31cdeb7 100644
49734 mnt_drop_write(path.mnt);
49735 }
49736 path_put(&path);
49737 -@@ -649,14 +678,16 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
49738 +@@ -620,14 +649,16 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
49739 SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)
49740 {
49741 struct fd f = fdget(fd);
49742 @@ -89229,10 +113045,10 @@ index 9b932b9..31cdeb7 100644
49743 }
49744 fdput(f);
49745 diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
49746 -index 119c242..a02e8da 100644
49747 +index ef00156..931d812 100644
49748 --- a/fs/xfs/libxfs/xfs_bmap.c
49749 +++ b/fs/xfs/libxfs/xfs_bmap.c
49750 -@@ -554,7 +554,7 @@ xfs_bmap_validate_ret(
49751 +@@ -560,7 +560,7 @@ xfs_bmap_validate_ret(
49752
49753 #else
49754 #define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0)
49755 @@ -89242,10 +113058,10 @@ index 119c242..a02e8da 100644
49756
49757 /*
49758 diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
49759 -index e89a0f8f..3165b4a 100644
49760 +index 097bf77..ffe3cb3 100644
49761 --- a/fs/xfs/libxfs/xfs_da_btree.c
49762 +++ b/fs/xfs/libxfs/xfs_da_btree.c
49763 -@@ -2011,6 +2011,7 @@ xfs_da_grow_inode_int(
49764 +@@ -2012,6 +2012,7 @@ xfs_da_grow_inode_int(
49765 struct xfs_inode *dp = args->dp;
49766 int w = args->whichfork;
49767 xfs_rfsblock_t nblks = dp->i_d.di_nblocks;
49768 @@ -89253,7 +113069,7 @@ index e89a0f8f..3165b4a 100644
49769 struct xfs_bmbt_irec map, *mapp;
49770 int nmap, error, got, i, mapi;
49771
49772 -@@ -2079,7 +2080,8 @@ xfs_da_grow_inode_int(
49773 +@@ -2080,7 +2081,8 @@ xfs_da_grow_inode_int(
49774 }
49775
49776 /* account for newly allocated blocks in reserved blocks total */
49777 @@ -89282,7 +113098,7 @@ index 642d55d..d8ccf82 100644
49778 return 0;
49779 sfep = dp->d_ops->sf_nextentry(sfp, sfep);
49780 diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
49781 -index d42738d..7175979 100644
49782 +index 478d04e..3d6a86b 100644
49783 --- a/fs/xfs/xfs_ioctl.c
49784 +++ b/fs/xfs/xfs_ioctl.c
49785 @@ -121,7 +121,7 @@ xfs_find_handle(
49786 @@ -94930,10 +118746,10 @@ index 0000000..25f54ef
49787 +};
49788 diff --git a/grsecurity/gracl_policy.c b/grsecurity/gracl_policy.c
49789 new file mode 100644
49790 -index 0000000..0773423
49791 +index 0000000..302bda8
49792 --- /dev/null
49793 +++ b/grsecurity/gracl_policy.c
49794 -@@ -0,0 +1,1786 @@
49795 +@@ -0,0 +1,1784 @@
49796 +#include <linux/kernel.h>
49797 +#include <linux/module.h>
49798 +#include <linux/sched.h>
49799 @@ -95001,11 +118817,10 @@ index 0000000..0773423
49800 +
49801 +extern int gr_init_uidset(void);
49802 +extern void gr_free_uidset(void);
49803 -+extern void gr_remove_uid(uid_t uid);
49804 -+extern int gr_find_uid(uid_t uid);
49805 ++extern int gr_find_and_remove_uid(uid_t uid);
49806 +
49807 +extern struct acl_subject_label *__gr_get_subject_for_task(const struct gr_policy_state *state, struct task_struct *task, const char *filename, int fallback);
49808 -+extern void __gr_apply_subject_to_task(struct gr_policy_state *state, struct task_struct *task, struct acl_subject_label *subj);
49809 ++extern void __gr_apply_subject_to_task(const struct gr_policy_state *state, struct task_struct *task, struct acl_subject_label *subj);
49810 +extern int gr_streq(const char *a, const char *b, const unsigned int lena, const unsigned int lenb);
49811 +extern void __insert_inodev_entry(const struct gr_policy_state *state, struct inodev_entry *entry);
49812 +extern struct acl_role_label *__lookup_acl_role_label(const struct gr_policy_state *state, const struct task_struct *task, const uid_t uid, const gid_t gid);
49813 @@ -96572,9 +120387,8 @@ index 0000000..0773423
49814 + segvacl->crashes = 0;
49815 + segvacl->expires = 0;
49816 + }
49817 -+ } else if (gr_find_uid(gr_usermode->segv_uid) >= 0) {
49818 -+ gr_remove_uid(gr_usermode->segv_uid);
49819 -+ }
49820 ++ } else
49821 ++ gr_find_and_remove_uid(gr_usermode->segv_uid);
49822 + } else {
49823 + gr_log_noargs(GR_DONT_AUDIT, GR_SEGVMODF_ACL_MSG);
49824 + error = -EPERM;
49825 @@ -96796,10 +120610,10 @@ index 0000000..39645c9
49826 +}
49827 diff --git a/grsecurity/gracl_segv.c b/grsecurity/gracl_segv.c
49828 new file mode 100644
49829 -index 0000000..9c6684d
49830 +index 0000000..10f1617
49831 --- /dev/null
49832 +++ b/grsecurity/gracl_segv.c
49833 -@@ -0,0 +1,291 @@
49834 +@@ -0,0 +1,304 @@
49835 +#include <linux/kernel.h>
49836 +#include <linux/mm.h>
49837 +#include <asm/uaccess.h>
49838 @@ -96831,7 +120645,7 @@ index 0000000..9c6684d
49839 +extern rwlock_t gr_inode_lock;
49840 +extern struct acl_subject_label *
49841 + lookup_acl_subj_label(const u64 inode, const dev_t dev,
49842 -+ struct acl_role_label *role);
49843 ++ const struct acl_role_label *role);
49844 +
49845 +int
49846 +gr_init_uidset(void)
49847 @@ -96938,6 +120752,19 @@ index 0000000..9c6684d
49848 + return;
49849 +}
49850 +
49851 ++int gr_find_and_remove_uid(uid_t uid)
49852 ++{
49853 ++ int loc;
49854 ++
49855 ++ spin_lock(&gr_uid_lock);
49856 ++ loc = gr_find_uid(uid);
49857 ++ if (loc >= 0)
49858 ++ gr_remove_uid(loc);
49859 ++ spin_unlock(&gr_uid_lock);
49860 ++
49861 ++ return loc >= 0 ? 1 : 0;
49862 ++}
49863 ++
49864 +int
49865 +gr_check_crash_uid(const kuid_t kuid)
49866 +{
49867 @@ -97676,7 +121503,7 @@ index 0000000..1964ab1c
49868 +}
49869 diff --git a/grsecurity/grsec_disabled.c b/grsecurity/grsec_disabled.c
49870 new file mode 100644
49871 -index 0000000..e723c08
49872 +index 0000000..0589fe2
49873 --- /dev/null
49874 +++ b/grsecurity/grsec_disabled.c
49875 @@ -0,0 +1,445 @@
49876 @@ -98078,13 +121905,13 @@ index 0000000..e723c08
49877 +}
49878 +
49879 +int
49880 -+gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb)
49881 ++gr_search_udp_recvmsg(struct sock *sk, const struct sk_buff *skb)
49882 +{
49883 + return 0;
49884 +}
49885 +
49886 +int
49887 -+gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr)
49888 ++gr_search_udp_sendmsg(struct sock *sk, struct sockaddr_in *addr)
49889 +{
49890 + return 0;
49891 +}
49892 @@ -99645,7 +123472,7 @@ index 0000000..a2b8b8f
49893 +}
49894 diff --git a/grsecurity/grsec_sock.c b/grsecurity/grsec_sock.c
49895 new file mode 100644
49896 -index 0000000..a523bd2
49897 +index 0000000..3cdd946
49898 --- /dev/null
49899 +++ b/grsecurity/grsec_sock.c
49900 @@ -0,0 +1,244 @@
49901 @@ -99662,8 +123489,8 @@ index 0000000..a523bd2
49902 +#include <linux/grinternal.h>
49903 +#include <linux/gracl.h>
49904 +
49905 -+extern int gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb);
49906 -+extern int gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr);
49907 ++extern int gr_search_udp_recvmsg(struct sock *sk, const struct sk_buff *skb);
49908 ++extern int gr_search_udp_sendmsg(struct sock *sk, struct sockaddr_in *addr);
49909 +
49910 +EXPORT_SYMBOL_GPL(gr_search_udp_recvmsg);
49911 +EXPORT_SYMBOL_GPL(gr_search_udp_sendmsg);
49912 @@ -101150,10 +124977,10 @@ index 810431d..0ec4804f 100644
49913 * (puds are folded into pgds so this doesn't get actually called,
49914 * but the define is needed for a generic inline function.)
49915 diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
49916 -index 14b0ff32..f3993a4 100644
49917 +index c370b26..24a0dae 100644
49918 --- a/include/asm-generic/pgtable.h
49919 +++ b/include/asm-generic/pgtable.h
49920 -@@ -748,6 +748,22 @@ static inline int pmd_protnone(pmd_t pmd)
49921 +@@ -757,6 +757,22 @@ static inline int pmd_protnone(pmd_t pmd)
49922 }
49923 #endif /* CONFIG_NUMA_BALANCING */
49924
49925 @@ -101177,10 +125004,10 @@ index 14b0ff32..f3993a4 100644
49926
49927 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
49928 diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
49929 -index b58fd66..6cfae67 100644
49930 +index af0254c..a4e4da3 100644
49931 --- a/include/asm-generic/sections.h
49932 +++ b/include/asm-generic/sections.h
49933 -@@ -30,6 +30,7 @@ extern char _data[], _sdata[], _edata[];
49934 +@@ -31,6 +31,7 @@ extern char _data[], _sdata[], _edata[];
49935 extern char __bss_start[], __bss_stop[];
49936 extern char __init_begin[], __init_end[];
49937 extern char _sinittext[], _einittext[];
49938 @@ -101293,8 +125120,49 @@ index c9fe145..9fb2337 100644
49939
49940 struct crypto_instance {
49941 struct crypto_alg alg;
49942 +diff --git a/include/crypto/cast6.h b/include/crypto/cast6.h
49943 +index 32b60eb..1a592df 100644
49944 +--- a/include/crypto/cast6.h
49945 ++++ b/include/crypto/cast6.h
49946 +@@ -18,7 +18,7 @@ int __cast6_setkey(struct cast6_ctx *ctx, const u8 *key,
49947 + unsigned int keylen, u32 *flags);
49948 + int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
49949 +
49950 +-void __cast6_encrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
49951 +-void __cast6_decrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
49952 ++void __cast6_encrypt(void *ctx, u8 *dst, const u8 *src);
49953 ++void __cast6_decrypt(void *ctx, u8 *dst, const u8 *src);
49954 +
49955 + #endif
49956 +diff --git a/include/crypto/serpent.h b/include/crypto/serpent.h
49957 +index b7e0941..1a1f67f 100644
49958 +--- a/include/crypto/serpent.h
49959 ++++ b/include/crypto/serpent.h
49960 +@@ -21,7 +21,7 @@ int __serpent_setkey(struct serpent_ctx *ctx, const u8 *key,
49961 + unsigned int keylen);
49962 + int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
49963 +
49964 +-void __serpent_encrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src);
49965 +-void __serpent_decrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src);
49966 ++void __serpent_encrypt(void *ctx, u8 *dst, const u8 *src);
49967 ++void __serpent_decrypt(void *ctx, u8 *dst, const u8 *src);
49968 +
49969 + #endif
49970 +diff --git a/include/crypto/xts.h b/include/crypto/xts.h
49971 +index 72c09eb..c5c3a06 100644
49972 +--- a/include/crypto/xts.h
49973 ++++ b/include/crypto/xts.h
49974 +@@ -18,7 +18,7 @@ struct xts_crypt_req {
49975 + void (*crypt_fn)(void *ctx, u8 *blks, unsigned int nbytes);
49976 + };
49977 +
49978 +-#define XTS_TWEAK_CAST(x) ((void (*)(void *, u8*, const u8*))(x))
49979 ++#define XTS_TWEAK_CAST(x) (x)
49980 +
49981 + int xts_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
49982 + struct scatterlist *src, unsigned int nbytes,
49983 diff --git a/include/drm/drmP.h b/include/drm/drmP.h
49984 -index 0a271ca..0e14d3d 100644
49985 +index d7162cf..709bbda 100644
49986 --- a/include/drm/drmP.h
49987 +++ b/include/drm/drmP.h
49988 @@ -59,6 +59,7 @@
49989 @@ -101332,7 +125200,7 @@ index 0a271ca..0e14d3d 100644
49990
49991 /**
49992 * Creates a driver or general drm_ioctl_desc array entry for the given
49993 -@@ -645,7 +648,8 @@ struct drm_driver {
49994 +@@ -654,7 +657,8 @@ struct drm_driver {
49995
49996 /* List of devices hanging off this driver with stealth attach. */
49997 struct list_head legacy_dev_list;
49998 @@ -101342,7 +125210,7 @@ index 0a271ca..0e14d3d 100644
49999
50000 enum drm_minor_type {
50001 DRM_MINOR_LEGACY,
50002 -@@ -663,7 +667,8 @@ struct drm_info_list {
50003 +@@ -672,7 +676,8 @@ struct drm_info_list {
50004 int (*show)(struct seq_file*, void*); /** show callback */
50005 u32 driver_features; /**< Required driver features for this entry */
50006 void *data;
50007 @@ -101352,7 +125220,7 @@ index 0a271ca..0e14d3d 100644
50008
50009 /**
50010 * debugfs node structure. This structure represents a debugfs file.
50011 -@@ -752,7 +757,7 @@ struct drm_device {
50012 +@@ -761,7 +766,7 @@ struct drm_device {
50013
50014 /** \name Usage Counters */
50015 /*@{ */
50016 @@ -101361,24 +125229,11 @@ index 0a271ca..0e14d3d 100644
50017 spinlock_t buf_lock; /**< For drm_device::buf_use and a few other things. */
50018 int buf_use; /**< Buffers in use -- cannot alloc */
50019 atomic_t buf_alloc; /**< Buffer allocation in progress */
50020 -diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
50021 -index 3febb4b..afc5199 100644
50022 ---- a/include/drm/drm_crtc_helper.h
50023 -+++ b/include/drm/drm_crtc_helper.h
50024 -@@ -163,7 +163,7 @@ struct drm_encoder_helper_funcs {
50025 - int (*atomic_check)(struct drm_encoder *encoder,
50026 - struct drm_crtc_state *crtc_state,
50027 - struct drm_connector_state *conn_state);
50028 --};
50029 -+} __no_const;
50030 -
50031 - /**
50032 - * struct drm_connector_helper_funcs - helper operations for connectors
50033 diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
50034 -index 0de6290..2a2c125 100644
50035 +index fc65118..7d80068 100644
50036 --- a/include/drm/drm_mm.h
50037 +++ b/include/drm/drm_mm.h
50038 -@@ -297,7 +297,7 @@ void drm_mm_remove_node(struct drm_mm_node *node);
50039 +@@ -291,7 +291,7 @@ void drm_mm_remove_node(struct drm_mm_node *node);
50040 void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new);
50041 void drm_mm_init(struct drm_mm *mm,
50042 u64 start,
50043 @@ -101387,8 +125242,21 @@ index 0de6290..2a2c125 100644
50044 void drm_mm_takedown(struct drm_mm *mm);
50045 bool drm_mm_clean(struct drm_mm *mm);
50046
50047 +diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
50048 +index a126a0d..8ad2332 100644
50049 +--- a/include/drm/drm_modeset_helper_vtables.h
50050 ++++ b/include/drm/drm_modeset_helper_vtables.h
50051 +@@ -638,7 +638,7 @@ struct drm_encoder_helper_funcs {
50052 + int (*atomic_check)(struct drm_encoder *encoder,
50053 + struct drm_crtc_state *crtc_state,
50054 + struct drm_connector_state *conn_state);
50055 +-};
50056 ++} __no_const;
50057 +
50058 + /**
50059 + * drm_encoder_helper_add - sets the helper vtable for an encoder
50060 diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
50061 -index 17c4456..da0c5eb 100644
50062 +index f970209..77a4901 100644
50063 --- a/include/drm/i915_pciids.h
50064 +++ b/include/drm/i915_pciids.h
50065 @@ -37,7 +37,7 @@
50066 @@ -101453,6 +125321,45 @@ index 4915d40..8b913c0 100644
50067
50068 /**
50069 * asymmetric_key_subtype - Get the subtype from an asymmetric key
50070 +diff --git a/include/keys/encrypted-type.h b/include/keys/encrypted-type.h
50071 +index 1d45413..377bc27 100644
50072 +--- a/include/keys/encrypted-type.h
50073 ++++ b/include/keys/encrypted-type.h
50074 +@@ -15,7 +15,7 @@
50075 + #ifndef _KEYS_ENCRYPTED_TYPE_H
50076 + #define _KEYS_ENCRYPTED_TYPE_H
50077 +
50078 +-#include <linux/key.h>
50079 ++#include <linux/key-type.h>
50080 + #include <linux/rcupdate.h>
50081 +
50082 + struct encrypted_key_payload {
50083 +diff --git a/include/keys/rxrpc-type.h b/include/keys/rxrpc-type.h
50084 +index fc48754..ea15d5c 100644
50085 +--- a/include/keys/rxrpc-type.h
50086 ++++ b/include/keys/rxrpc-type.h
50087 +@@ -12,7 +12,7 @@
50088 + #ifndef _KEYS_RXRPC_TYPE_H
50089 + #define _KEYS_RXRPC_TYPE_H
50090 +
50091 +-#include <linux/key.h>
50092 ++#include <linux/key-type.h>
50093 +
50094 + /*
50095 + * key type for AF_RXRPC keys
50096 +diff --git a/include/keys/user-type.h b/include/keys/user-type.h
50097 +index c56fef4..c9ebdc7 100644
50098 +--- a/include/keys/user-type.h
50099 ++++ b/include/keys/user-type.h
50100 +@@ -12,7 +12,7 @@
50101 + #ifndef _KEYS_USER_TYPE_H
50102 + #define _KEYS_USER_TYPE_H
50103 +
50104 +-#include <linux/key.h>
50105 ++#include <linux/key-type.h>
50106 + #include <linux/rcupdate.h>
50107 +
50108 + #ifdef CONFIG_KEYS
50109 diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
50110 index c1da539..1dcec55 100644
50111 --- a/include/linux/atmdev.h
50112 @@ -101513,10 +125420,10 @@ index 301de78..f5f8e42 100644
50113 return __atomic_add_unless(v, a, u) != u;
50114 }
50115 diff --git a/include/linux/audit.h b/include/linux/audit.h
50116 -index 20eba1e..40b479d 100644
50117 +index b40ed5d..16411f5 100644
50118 --- a/include/linux/audit.h
50119 +++ b/include/linux/audit.h
50120 -@@ -227,7 +227,7 @@ static inline void audit_ptrace(struct task_struct *t)
50121 +@@ -331,7 +331,7 @@ static inline void audit_ptrace(struct task_struct *t)
50122 extern unsigned int audit_serial(void);
50123 extern int auditsc_get_stamp(struct audit_context *ctx,
50124 struct timespec *t, unsigned int *serial);
50125 @@ -101712,10 +125619,10 @@ index c02e669..439bd4b 100644
50126 }
50127
50128 diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
50129 -index 1687557..3a013dd 100644
50130 +index 413c84f..f526678 100644
50131 --- a/include/linux/blkdev.h
50132 +++ b/include/linux/blkdev.h
50133 -@@ -1647,7 +1647,7 @@ struct block_device_operations {
50134 +@@ -1666,7 +1666,7 @@ struct block_device_operations {
50135 void (*swap_slot_free_notify) (struct block_device *, unsigned long);
50136 struct module *owner;
50137 const struct pr_ops *pr_ops;
50138 @@ -101757,10 +125664,10 @@ index 17e7e82..1d7da26 100644
50139 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
50140 #endif
50141 diff --git a/include/linux/capability.h b/include/linux/capability.h
50142 -index af9f0b9..71a5e5c 100644
50143 +index f314275..96c8185 100644
50144 --- a/include/linux/capability.h
50145 +++ b/include/linux/capability.h
50146 -@@ -237,15 +237,28 @@ static inline bool capable(int cap)
50147 +@@ -231,15 +231,28 @@ static inline bool capable(int cap)
50148 {
50149 return true;
50150 }
50151 @@ -101802,10 +125709,10 @@ index 8609d57..86e4d79 100644
50152 int (*generic_packet) (struct cdrom_device_info *,
50153 struct packet_command *);
50154 diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
50155 -index a7c7f74..0f1870f 100644
50156 +index 89d944b..1d98ada 100644
50157 --- a/include/linux/cgroup-defs.h
50158 +++ b/include/linux/cgroup-defs.h
50159 -@@ -416,7 +416,7 @@ struct cftype {
50160 +@@ -424,7 +424,7 @@ struct cftype {
50161 #ifdef CONFIG_DEBUG_LOCK_ALLOC
50162 struct lock_class_key lockdep_key;
50163 #endif
50164 @@ -101815,7 +125722,7 @@ index a7c7f74..0f1870f 100644
50165 /*
50166 * Control Group subsystem type.
50167 diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h
50168 -index bda5ec0b4..51d8ea1 100644
50169 +index fccf7f4..1d5925e 100644
50170 --- a/include/linux/cleancache.h
50171 +++ b/include/linux/cleancache.h
50172 @@ -35,7 +35,7 @@ struct cleancache_ops {
50173 @@ -101825,13 +125732,13 @@ index bda5ec0b4..51d8ea1 100644
50174 -};
50175 +} __no_const;
50176
50177 - extern int cleancache_register_ops(struct cleancache_ops *ops);
50178 + extern int cleancache_register_ops(const struct cleancache_ops *ops);
50179 extern void __cleancache_init_fs(struct super_block *);
50180 diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
50181 -index c56988a..ea6c518 100644
50182 +index 1143e38..3a0056a 100644
50183 --- a/include/linux/clk-provider.h
50184 +++ b/include/linux/clk-provider.h
50185 -@@ -214,6 +214,7 @@ struct clk_ops {
50186 +@@ -215,6 +215,7 @@ struct clk_ops {
50187 void (*init)(struct clk_hw *hw);
50188 int (*debug_init)(struct clk_hw *hw, struct dentry *dentry);
50189 };
50190 @@ -101840,10 +125747,30 @@ index c56988a..ea6c518 100644
50191 /**
50192 * struct clk_init_data - holds init data that's common to all clocks and is
50193 diff --git a/include/linux/compat.h b/include/linux/compat.h
50194 -index a76c917..63b52db 100644
50195 +index a76c917..75d6aeb 100644
50196 --- a/include/linux/compat.h
50197 +++ b/include/linux/compat.h
50198 -@@ -316,7 +316,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
50199 +@@ -45,14 +45,15 @@
50200 + COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
50201 +
50202 + #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
50203 +- asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
50204 +- __attribute__((alias(__stringify(compat_SyS##name)))); \
50205 + static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
50206 +- asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\
50207 +- asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
50208 ++ static inline asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
50209 + { \
50210 + return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \
50211 + } \
50212 ++ asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
50213 ++ { \
50214 ++ return compat_SyS##name(__MAP(x,__SC_ARGS,__VA_ARGS__));\
50215 ++ } \
50216 + static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
50217 +
50218 + #ifndef compat_user_stack_pointer
50219 +@@ -316,7 +317,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
50220 compat_size_t __user *len_ptr);
50221
50222 asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32);
50223 @@ -101852,7 +125779,7 @@ index a76c917..63b52db 100644
50224 asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg);
50225 asmlinkage long compat_sys_msgsnd(int msqid, compat_uptr_t msgp,
50226 compat_ssize_t msgsz, int msgflg);
50227 -@@ -325,7 +325,7 @@ asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp,
50228 +@@ -325,7 +326,7 @@ asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp,
50229 long compat_sys_msgctl(int first, int second, void __user *uptr);
50230 long compat_sys_shmctl(int first, int second, void __user *uptr);
50231 long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
50232 @@ -101861,7 +125788,7 @@ index a76c917..63b52db 100644
50233 asmlinkage long compat_sys_keyctl(u32 option,
50234 u32 arg2, u32 arg3, u32 arg4, u32 arg5);
50235 asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
50236 -@@ -439,7 +439,7 @@ extern int compat_ptrace_request(struct task_struct *child,
50237 +@@ -439,7 +440,7 @@ extern int compat_ptrace_request(struct task_struct *child,
50238 extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
50239 compat_ulong_t addr, compat_ulong_t data);
50240 asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
50241 @@ -101871,20 +125798,22 @@ index a76c917..63b52db 100644
50242 asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
50243 /*
50244 diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
50245 -index eeae401..4bf36c1 100644
50246 +index eeae401..a2a9f48 100644
50247 --- a/include/linux/compiler-gcc.h
50248 +++ b/include/linux/compiler-gcc.h
50249 -@@ -116,8 +116,8 @@
50250 +@@ -116,9 +116,9 @@
50251 */
50252 #define __pure __attribute__((pure))
50253 #define __aligned(x) __attribute__((aligned(x)))
50254 -#define __printf(a, b) __attribute__((format(printf, a, b)))
50255 -#define __scanf(a, b) __attribute__((format(scanf, a, b)))
50256 +-#define __attribute_const__ __attribute__((__const__))
50257 +#define __printf(a, b) __attribute__((format(printf, a, b))) __nocapture(a, b)
50258 +#define __scanf(a, b) __attribute__((format(scanf, a, b))) __nocapture(a, b)
50259 - #define __attribute_const__ __attribute__((__const__))
50260 ++#define __attribute_const__ __attribute__((const))
50261 #define __maybe_unused __attribute__((unused))
50262 #define __always_unused __attribute__((unused))
50263 +
50264 @@ -184,9 +184,38 @@
50265 # define __compiletime_warning(message) __attribute__((warning(message)))
50266 # define __compiletime_error(message) __attribute__((error(message)))
50267 @@ -101925,7 +125854,7 @@ index eeae401..4bf36c1 100644
50268 * Mark a position in code as unreachable. This can be used to
50269 * suppress control flow warnings after asm blocks that transfer
50270 diff --git a/include/linux/compiler.h b/include/linux/compiler.h
50271 -index 6fc9a6d..8ad4c2b 100644
50272 +index 48f5aab..2d1c52f 100644
50273 --- a/include/linux/compiler.h
50274 +++ b/include/linux/compiler.h
50275 @@ -5,11 +5,14 @@
50276 @@ -102146,8 +126075,8 @@ index 6fc9a6d..8ad4c2b 100644
50277 + __val; \
50278 })
50279
50280 - #endif /* __KERNEL__ */
50281 -@@ -399,6 +415,38 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50282 + /**
50283 +@@ -416,6 +432,38 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50284 # define __attribute_const__ /* unimplemented */
50285 #endif
50286
50287 @@ -102186,7 +126115,7 @@ index 6fc9a6d..8ad4c2b 100644
50288 /*
50289 * Tell gcc if a function is cold. The compiler will assume any path
50290 * directly leading to the call is unlikely.
50291 -@@ -408,6 +456,22 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50292 +@@ -425,6 +473,22 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50293 #define __cold
50294 #endif
50295
50296 @@ -102209,7 +126138,7 @@ index 6fc9a6d..8ad4c2b 100644
50297 /* Simple shorthand for a section definition */
50298 #ifndef __section
50299 # define __section(S) __attribute__ ((__section__(#S)))
50300 -@@ -430,6 +494,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50301 +@@ -447,6 +511,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50302 # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
50303 #endif
50304
50305 @@ -102218,7 +126147,7 @@ index 6fc9a6d..8ad4c2b 100644
50306 /* Is this type a native word size -- useful for atomic operations */
50307 #ifndef __native_word
50308 # define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
50309 -@@ -509,8 +575,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50310 +@@ -526,8 +592,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
50311 */
50312 #define __ACCESS_ONCE(x) ({ \
50313 __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \
50314 @@ -102230,10 +126159,10 @@ index 6fc9a6d..8ad4c2b 100644
50315 /**
50316 * lockless_dereference() - safely load a pointer for later dereference
50317 diff --git a/include/linux/configfs.h b/include/linux/configfs.h
50318 -index 758a029..77c9e59 100644
50319 +index f8165c1..4a757b2 100644
50320 --- a/include/linux/configfs.h
50321 +++ b/include/linux/configfs.h
50322 -@@ -127,7 +127,7 @@ struct configfs_attribute {
50323 +@@ -129,7 +129,7 @@ struct configfs_attribute {
50324 umode_t ca_mode;
50325 ssize_t (*show)(struct config_item *, char *);
50326 ssize_t (*store)(struct config_item *, const char *, size_t);
50327 @@ -102243,19 +126172,25 @@ index 758a029..77c9e59 100644
50328 #define CONFIGFS_ATTR(_pfx, _name) \
50329 static struct configfs_attribute _pfx##attr_##_name = { \
50330 diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
50331 -index 177c768..663bdfb 100644
50332 +index 88a4215..3ef686f 100644
50333 --- a/include/linux/cpufreq.h
50334 +++ b/include/linux/cpufreq.h
50335 -@@ -210,6 +210,7 @@ struct global_attr {
50336 - ssize_t (*store)(struct kobject *a, struct attribute *b,
50337 +@@ -206,10 +206,11 @@ __ATTR(_name, 0644, show_##_name, store_##_name)
50338 + struct global_attr {
50339 + struct attribute attr;
50340 + ssize_t (*show)(struct kobject *kobj,
50341 +- struct attribute *attr, char *buf);
50342 +- ssize_t (*store)(struct kobject *a, struct attribute *b,
50343 ++ struct kobj_attribute *attr, char *buf);
50344 ++ ssize_t (*store)(struct kobject *a, struct kobj_attribute *b,
50345 const char *c, size_t count);
50346 };
50347 +typedef struct global_attr __no_const global_attr_no_const;
50348
50349 #define define_one_global_ro(_name) \
50350 static struct global_attr _name = \
50351 -@@ -281,7 +282,7 @@ struct cpufreq_driver {
50352 - bool boost_supported;
50353 +@@ -280,7 +281,7 @@ struct cpufreq_driver {
50354 + /* platform specific boost support code */
50355 bool boost_enabled;
50356 int (*set_boost)(int state);
50357 -};
50358 @@ -102287,10 +126222,10 @@ index 786ad32..09d1fb1 100644
50359 #ifdef CONFIG_CPU_IDLE
50360 extern int cpuidle_register_governor(struct cpuidle_governor *gov);
50361 diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
50362 -index 59915ea..81ebec0 100644
50363 +index fc14275..8e1074d 100644
50364 --- a/include/linux/cpumask.h
50365 +++ b/include/linux/cpumask.h
50366 -@@ -127,17 +127,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
50367 +@@ -131,17 +131,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
50368 }
50369
50370 /* Valid inputs for n are -1 and 0. */
50371 @@ -102311,7 +126246,7 @@ index 59915ea..81ebec0 100644
50372 const struct cpumask *srcp,
50373 const struct cpumask *andp)
50374 {
50375 -@@ -181,7 +181,7 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
50376 +@@ -185,7 +185,7 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
50377 *
50378 * Returns >= nr_cpu_ids if no further cpus set.
50379 */
50380 @@ -102320,7 +126255,7 @@ index 59915ea..81ebec0 100644
50381 {
50382 /* -1 is a legal arg here. */
50383 if (n != -1)
50384 -@@ -196,7 +196,7 @@ static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
50385 +@@ -200,7 +200,7 @@ static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
50386 *
50387 * Returns >= nr_cpu_ids if no further cpus unset.
50388 */
50389 @@ -102329,7 +126264,7 @@ index 59915ea..81ebec0 100644
50390 {
50391 /* -1 is a legal arg here. */
50392 if (n != -1)
50393 -@@ -204,7 +204,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
50394 +@@ -208,7 +208,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
50395 return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1);
50396 }
50397
50398 @@ -102338,7 +126273,7 @@ index 59915ea..81ebec0 100644
50399 int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
50400 unsigned int cpumask_local_spread(unsigned int i, int node);
50401
50402 -@@ -471,7 +471,7 @@ static inline bool cpumask_full(const struct cpumask *srcp)
50403 +@@ -475,7 +475,7 @@ static inline bool cpumask_full(const struct cpumask *srcp)
50404 * cpumask_weight - Count of bits in *srcp
50405 * @srcp: the cpumask to count bits (< nr_cpu_ids) in.
50406 */
50407 @@ -102423,7 +126358,7 @@ index 653589e..4ef254a 100644
50408 return c | 0x20;
50409 }
50410 diff --git a/include/linux/dcache.h b/include/linux/dcache.h
50411 -index f513dd8..b264e06 100644
50412 +index 03dda7b..430d42c 100644
50413 --- a/include/linux/dcache.h
50414 +++ b/include/linux/dcache.h
50415 @@ -123,6 +123,9 @@ struct dentry {
50416 @@ -102477,7 +126412,7 @@ index 7925bf0..d5143d2 100644
50417
50418 #define large_malloc(a) vmalloc(a)
50419 diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
50420 -index 68030e2..c55bb73 100644
50421 +index 6fa02a2..aac3093 100644
50422 --- a/include/linux/devfreq.h
50423 +++ b/include/linux/devfreq.h
50424 @@ -117,7 +117,7 @@ struct devfreq_governor {
50425 @@ -102490,10 +126425,10 @@ index 68030e2..c55bb73 100644
50426 /**
50427 * struct devfreq - Device devfreq structure
50428 diff --git a/include/linux/device.h b/include/linux/device.h
50429 -index b8f411b..49052b0 100644
50430 +index 6d6f1fe..148f294 100644
50431 --- a/include/linux/device.h
50432 +++ b/include/linux/device.h
50433 -@@ -342,7 +342,7 @@ struct subsys_interface {
50434 +@@ -343,7 +343,7 @@ struct subsys_interface {
50435 struct list_head node;
50436 int (*add_dev)(struct device *dev, struct subsys_interface *sif);
50437 void (*remove_dev)(struct device *dev, struct subsys_interface *sif);
50438 @@ -102502,7 +126437,7 @@ index b8f411b..49052b0 100644
50439
50440 int subsys_interface_register(struct subsys_interface *sif);
50441 void subsys_interface_unregister(struct subsys_interface *sif);
50442 -@@ -538,7 +538,7 @@ struct device_type {
50443 +@@ -539,7 +539,7 @@ struct device_type {
50444 void (*release)(struct device *dev);
50445
50446 const struct dev_pm_ops *pm;
50447 @@ -102511,7 +126446,7 @@ index b8f411b..49052b0 100644
50448
50449 /* interface for exporting device attributes */
50450 struct device_attribute {
50451 -@@ -548,11 +548,12 @@ struct device_attribute {
50452 +@@ -549,11 +549,12 @@ struct device_attribute {
50453 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
50454 const char *buf, size_t count);
50455 };
50456 @@ -102526,10 +126461,10 @@ index b8f411b..49052b0 100644
50457 ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
50458 char *buf);
50459 diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
50460 -index 2e551e2..8ea30b5 100644
50461 +index 728ef07..8a9e7f5 100644
50462 --- a/include/linux/dma-mapping.h
50463 +++ b/include/linux/dma-mapping.h
50464 -@@ -65,7 +65,7 @@ struct dma_map_ops {
50465 +@@ -68,7 +68,7 @@ struct dma_map_ops {
50466 u64 (*get_required_mask)(struct device *dev);
50467 #endif
50468 int is_phys;
50469 @@ -102571,7 +126506,7 @@ index 20fa8d8..3d0dd18 100644
50470 #endif
50471
50472 diff --git a/include/linux/err.h b/include/linux/err.h
50473 -index a729120..6ede2c9 100644
50474 +index 56762ab..bc4a3e3 100644
50475 --- a/include/linux/err.h
50476 +++ b/include/linux/err.h
50477 @@ -20,12 +20,12 @@
50478 @@ -102603,10 +126538,10 @@ index 7abf674..c0a73a0 100644
50479
50480 /**
50481 diff --git a/include/linux/fb.h b/include/linux/fb.h
50482 -index 3d00380..ce2dbdf9 100644
50483 +index 55433f8..37437b8 100644
50484 --- a/include/linux/fb.h
50485 +++ b/include/linux/fb.h
50486 -@@ -305,7 +305,8 @@ struct fb_ops {
50487 +@@ -323,7 +323,8 @@ struct fb_ops {
50488 /* called at KDB enter and leave time to prepare the console */
50489 int (*fb_debug_enter)(struct fb_info *info);
50490 int (*fb_debug_leave)(struct fb_info *info);
50491 @@ -102629,11 +126564,24 @@ index 5295535..9852c7e 100644
50492 void do_close_on_exec(struct files_struct *);
50493 int iterate_fd(struct files_struct *, unsigned,
50494 int (*)(const void *, struct file *, unsigned),
50495 +diff --git a/include/linux/firewire.h b/include/linux/firewire.h
50496 +index d4b7683..9feb066 100644
50497 +--- a/include/linux/firewire.h
50498 ++++ b/include/linux/firewire.h
50499 +@@ -451,7 +451,7 @@ struct fw_iso_context {
50500 +
50501 + struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
50502 + int type, int channel, int speed, size_t header_size,
50503 +- fw_iso_callback_t callback, void *callback_data);
50504 ++ void *callback, void *callback_data);
50505 + int fw_iso_context_set_channels(struct fw_iso_context *ctx, u64 *channels);
50506 + int fw_iso_context_queue(struct fw_iso_context *ctx,
50507 + struct fw_iso_packet *packet,
50508 diff --git a/include/linux/fs.h b/include/linux/fs.h
50509 -index ab3d8d9..7e062a6 100644
50510 +index 83c77b0..b0421bd 100644
50511 --- a/include/linux/fs.h
50512 +++ b/include/linux/fs.h
50513 -@@ -439,7 +439,7 @@ struct address_space {
50514 +@@ -441,7 +441,7 @@ struct address_space {
50515 spinlock_t private_lock; /* for use by the address_space */
50516 struct list_head private_list; /* ditto */
50517 void *private_data; /* ditto */
50518 @@ -102642,7 +126590,7 @@ index ab3d8d9..7e062a6 100644
50519 /*
50520 * On most architectures that alignment is already the case; but
50521 * must be enforced here for CRIS, to let the least significant bit
50522 -@@ -482,7 +482,7 @@ struct block_device {
50523 +@@ -484,7 +484,7 @@ struct block_device {
50524 int bd_fsfreeze_count;
50525 /* Mutex for freeze */
50526 struct mutex bd_fsfreeze_mutex;
50527 @@ -102651,7 +126599,7 @@ index ab3d8d9..7e062a6 100644
50528
50529 /*
50530 * Radix-tree tags, for tagging dirty and writeback pages within the pagecache
50531 -@@ -677,7 +677,7 @@ struct inode {
50532 +@@ -679,7 +679,7 @@ struct inode {
50533 #endif
50534
50535 void *i_private; /* fs or device private pointer */
50536 @@ -102660,7 +126608,7 @@ index ab3d8d9..7e062a6 100644
50537
50538 static inline int inode_unhashed(struct inode *inode)
50539 {
50540 -@@ -872,7 +872,7 @@ struct file {
50541 +@@ -899,7 +899,7 @@ struct file {
50542 struct list_head f_tfile_llink;
50543 #endif /* #ifdef CONFIG_EPOLL */
50544 struct address_space *f_mapping;
50545 @@ -102669,7 +126617,7 @@ index ab3d8d9..7e062a6 100644
50546
50547 struct file_handle {
50548 __u32 handle_bytes;
50549 -@@ -1007,7 +1007,7 @@ struct file_lock {
50550 +@@ -1034,7 +1034,7 @@ struct file_lock {
50551 int state; /* state of grant or error if -ve */
50552 } afs;
50553 } fl_u;
50554 @@ -102678,7 +126626,7 @@ index ab3d8d9..7e062a6 100644
50555
50556 struct file_lock_context {
50557 spinlock_t flc_lock;
50558 -@@ -1383,7 +1383,7 @@ struct super_block {
50559 +@@ -1410,7 +1410,7 @@ struct super_block {
50560 /* s_inode_list_lock protects s_inodes */
50561 spinlock_t s_inode_list_lock ____cacheline_aligned_in_smp;
50562 struct list_head s_inodes; /* all inodes */
50563 @@ -102687,17 +126635,17 @@ index ab3d8d9..7e062a6 100644
50564
50565 extern struct timespec current_fs_time(struct super_block *sb);
50566
50567 -@@ -1639,7 +1639,8 @@ struct file_operations {
50568 - #ifndef CONFIG_MMU
50569 - unsigned (*mmap_capabilities)(struct file *);
50570 - #endif
50571 +@@ -1672,7 +1672,8 @@ struct file_operations {
50572 + u64);
50573 + ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *,
50574 + u64);
50575 -};
50576 +} __do_const __randomize_layout;
50577 +typedef struct file_operations __no_const file_operations_no_const;
50578
50579 struct inode_operations {
50580 struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
50581 -@@ -2346,7 +2347,7 @@ extern int register_chrdev_region(dev_t, unsigned, const char *);
50582 +@@ -2396,7 +2397,7 @@ extern int register_chrdev_region(dev_t, unsigned, const char *);
50583 extern int __register_chrdev(unsigned int major, unsigned int baseminor,
50584 unsigned int count, const char *name,
50585 const struct file_operations *fops);
50586 @@ -102706,18 +126654,9 @@ index ab3d8d9..7e062a6 100644
50587 unsigned int count, const char *name);
50588 extern void unregister_chrdev_region(dev_t, unsigned);
50589 extern void chrdev_show(struct seq_file *,off_t);
50590 -@@ -2774,8 +2775,6 @@ extern int vfs_lstat(const char __user *, struct kstat *);
50591 - extern int vfs_fstat(unsigned int, struct kstat *);
50592 - extern int vfs_fstatat(int , const char __user *, struct kstat *, int);
50593 -
50594 --extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
50595 -- unsigned long arg);
50596 - extern int __generic_block_fiemap(struct inode *inode,
50597 - struct fiemap_extent_info *fieinfo,
50598 - loff_t start, loff_t len,
50599 -@@ -3036,4 +3035,14 @@ static inline bool dir_relax(struct inode *inode)
50600 -
50601 +@@ -3088,4 +3089,14 @@ static inline bool dir_relax(struct inode *inode)
50602 extern bool path_noexec(const struct path *path);
50603 + extern void inode_nohighmem(struct inode *inode);
50604
50605 +static inline bool is_sidechannel_device(const struct inode *inode)
50606 +{
50607 @@ -102810,10 +126749,10 @@ index 7ee1774..72505b8 100644
50608
50609 /*
50610 diff --git a/include/linux/genhd.h b/include/linux/genhd.h
50611 -index 847cc1d..2d2699a 100644
50612 +index 5c70676..0109dd5 100644
50613 --- a/include/linux/genhd.h
50614 +++ b/include/linux/genhd.h
50615 -@@ -207,7 +207,7 @@ struct gendisk {
50616 +@@ -208,7 +208,7 @@ struct gendisk {
50617 struct kobject *slave_dir;
50618
50619 struct timer_rand_state *random;
50620 @@ -102822,7 +126761,7 @@ index 847cc1d..2d2699a 100644
50621 struct disk_events *ev;
50622 #ifdef CONFIG_BLK_DEV_INTEGRITY
50623 struct kobject integrity_kobj;
50624 -@@ -448,7 +448,7 @@ extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
50625 +@@ -450,7 +450,7 @@ extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
50626 extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);
50627
50628 /* drivers/char/random.c */
50629 @@ -102860,7 +126799,7 @@ index eecd19b..391d1957 100644
50630 __field(attr_nr, attr_flag, name, NLA_U64, __u64, \
50631 nla_get_u64, nla_put_u64, false)
50632 diff --git a/include/linux/gfp.h b/include/linux/gfp.h
50633 -index 8942af0..2c247c14 100644
50634 +index af1f2b2..8fe7455 100644
50635 --- a/include/linux/gfp.h
50636 +++ b/include/linux/gfp.h
50637 @@ -36,6 +36,13 @@ struct vm_area_struct;
50638 @@ -102877,15 +126816,15 @@ index 8942af0..2c247c14 100644
50639 /* If the above are modified, __GFP_BITS_SHIFT may need updating */
50640
50641 /*
50642 -@@ -78,6 +85,7 @@ struct vm_area_struct;
50643 - #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE)
50644 +@@ -82,6 +89,7 @@ struct vm_area_struct;
50645 #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL)
50646 #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)
50647 + #define __GFP_ACCOUNT ((__force gfp_t)___GFP_ACCOUNT)
50648 +#define __GFP_USERCOPY ((__force gfp_t)___GFP_USERCOPY)/* Allocator intends to copy page to/from userland */
50649
50650 /*
50651 * Watermark modifiers -- controls access to emergency reserves
50652 -@@ -183,7 +191,7 @@ struct vm_area_struct;
50653 +@@ -186,7 +194,7 @@ struct vm_area_struct;
50654 #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE)
50655
50656 /* Room for N __GFP_FOO bits */
50657 @@ -102894,7 +126833,7 @@ index 8942af0..2c247c14 100644
50658 #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
50659
50660 /*
50661 -@@ -250,6 +258,8 @@ struct vm_area_struct;
50662 +@@ -257,6 +265,8 @@ struct vm_area_struct;
50663 __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN) & \
50664 ~__GFP_KSWAPD_RECLAIM)
50665
50666 @@ -102903,6 +126842,15 @@ index 8942af0..2c247c14 100644
50667 /* Convert GFP flags to their corresponding migrate type */
50668 #define GFP_MOVABLE_MASK (__GFP_RECLAIMABLE|__GFP_MOVABLE)
50669 #define GFP_MOVABLE_SHIFT 3
50670 +@@ -513,7 +523,7 @@ extern void free_kmem_pages(unsigned long addr, unsigned int order);
50671 + void page_alloc_init(void);
50672 + void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
50673 + void drain_all_pages(struct zone *zone);
50674 +-void drain_local_pages(struct zone *zone);
50675 ++void drain_local_pages(void *zone);
50676 +
50677 + #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
50678 + void page_alloc_init_late(void);
50679 diff --git a/include/linux/gracl.h b/include/linux/gracl.h
50680 new file mode 100644
50681 index 0000000..91858e4
50682 @@ -104251,10 +128199,10 @@ index bb3f329..9daed55 100644
50683 unsigned start1, unsigned end1,
50684 unsigned start2, unsigned end2)
50685 diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
50686 -index 685c262..5d42d36 100644
50687 +index 7d953c2..f511887 100644
50688 --- a/include/linux/hugetlb.h
50689 +++ b/include/linux/hugetlb.h
50690 -@@ -317,7 +317,7 @@ struct hstate {
50691 +@@ -314,7 +314,7 @@ struct hstate {
50692 unsigned int surplus_huge_pages_node[MAX_NUMNODES];
50693 #ifdef CONFIG_CGROUP_HUGETLB
50694 /* cgroup control files */
50695 @@ -104317,7 +128265,7 @@ index 1c7b89a..7dda400 100644
50696 container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr)
50697
50698 diff --git a/include/linux/i2c.h b/include/linux/i2c.h
50699 -index 768063b..62ef5be 100644
50700 +index 200cf13b..2a82cb4 100644
50701 --- a/include/linux/i2c.h
50702 +++ b/include/linux/i2c.h
50703 @@ -412,6 +412,7 @@ struct i2c_algorithm {
50704 @@ -104327,9 +128275,9 @@ index 768063b..62ef5be 100644
50705 +typedef struct i2c_algorithm __no_const i2c_algorithm_no_const;
50706
50707 /**
50708 - * struct i2c_bus_recovery_info - I2C bus recovery information
50709 + * struct i2c_timings - I2C timing information
50710 diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
50711 -index b49cf92..0c29072 100644
50712 +index ba7a9b0..33a0237 100644
50713 --- a/include/linux/if_pppox.h
50714 +++ b/include/linux/if_pppox.h
50715 @@ -78,7 +78,7 @@ struct pppox_proto {
50716 @@ -104374,7 +128322,7 @@ index b449f37..61005b3 100644
50717 #define __meminitconst __constsection(.meminit.rodata)
50718 #define __memexit __section(.memexit.text) __exitused __cold notrace
50719 diff --git a/include/linux/init_task.h b/include/linux/init_task.h
50720 -index 1c1ff7e..97a439f 100644
50721 +index f2cb8d4..2f0363e 100644
50722 --- a/include/linux/init_task.h
50723 +++ b/include/linux/init_task.h
50724 @@ -159,6 +159,12 @@ extern struct task_group root_task_group;
50725 @@ -104399,10 +128347,10 @@ index 1c1ff7e..97a439f 100644
50726 .files = &init_files, \
50727 .signal = &init_signals, \
50728 diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
50729 -index ad16809..516b54d 100644
50730 +index 0e95fcc..0694bbf 100644
50731 --- a/include/linux/interrupt.h
50732 +++ b/include/linux/interrupt.h
50733 -@@ -435,8 +435,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS];
50734 +@@ -436,8 +436,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS];
50735
50736 struct softirq_action
50737 {
50738 @@ -104413,7 +128361,7 @@ index ad16809..516b54d 100644
50739
50740 asmlinkage void do_softirq(void);
50741 asmlinkage void __do_softirq(void);
50742 -@@ -450,7 +450,7 @@ static inline void do_softirq_own_stack(void)
50743 +@@ -451,7 +451,7 @@ static inline void do_softirq_own_stack(void)
50744 }
50745 #endif
50746
50747 @@ -104423,10 +128371,10 @@ index ad16809..516b54d 100644
50748 extern void __raise_softirq_irqoff(unsigned int nr);
50749
50750 diff --git a/include/linux/iommu.h b/include/linux/iommu.h
50751 -index f28dff3..2f6c413 100644
50752 +index a5c539f..07d576c 100644
50753 --- a/include/linux/iommu.h
50754 +++ b/include/linux/iommu.h
50755 -@@ -193,7 +193,7 @@ struct iommu_ops {
50756 +@@ -201,7 +201,7 @@ struct iommu_ops {
50757
50758 unsigned long pgsize_bitmap;
50759 void *priv;
50760 @@ -104493,10 +128441,10 @@ index 3c1c967..ca8abc6 100644
50761 /*
50762 * irq_chip specific flags
50763 diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
50764 -index a587a33..0ff712d 100644
50765 +index dcca77c..8503b4f 100644
50766 --- a/include/linux/irqdesc.h
50767 +++ b/include/linux/irqdesc.h
50768 -@@ -59,7 +59,7 @@ struct irq_desc {
50769 +@@ -62,7 +62,7 @@ struct irq_desc {
50770 unsigned int irq_count; /* For detecting broken IRQs */
50771 unsigned long last_unhandled; /* Aging timer for unhandled count */
50772 unsigned int irqs_unhandled;
50773 @@ -104506,7 +128454,7 @@ index a587a33..0ff712d 100644
50774 raw_spinlock_t lock;
50775 struct cpumask *percpu_enabled;
50776 diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
50777 -index d5e5c5b..0e779bd 100644
50778 +index 04579d9..b1278d4 100644
50779 --- a/include/linux/irqdomain.h
50780 +++ b/include/linux/irqdomain.h
50781 @@ -38,6 +38,9 @@ struct device_node;
50782 @@ -104596,7 +128544,7 @@ index 5fdc553..766e169 100644
50783 return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32)
50784 >> USEC_TO_HZ_SHR32;
50785 diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
50786 -index 6883e19..e854fcb 100644
50787 +index 6883e19..d2c7746 100644
50788 --- a/include/linux/kallsyms.h
50789 +++ b/include/linux/kallsyms.h
50790 @@ -15,7 +15,8 @@
50791 @@ -104609,14 +128557,26 @@ index 6883e19..e854fcb 100644
50792 /* Lookup the address for a symbol. Returns 0 if not found. */
50793 unsigned long kallsyms_lookup_name(const char *name);
50794
50795 -@@ -106,6 +107,21 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
50796 +@@ -40,7 +41,7 @@ extern int sprint_symbol_no_offset(char *buffer, unsigned long address);
50797 + extern int sprint_backtrace(char *buffer, unsigned long address);
50798 +
50799 + /* Look up a kernel symbol and print it to the kernel messages. */
50800 +-extern void __print_symbol(const char *fmt, unsigned long address);
50801 ++extern __printf(1, 3) void __print_symbol(const char *fmt, unsigned long address, ...);
50802 +
50803 + int lookup_symbol_name(unsigned long addr, char *symname);
50804 + int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
50805 +@@ -104,21 +105,26 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
50806 + }
50807 +
50808 /* Stupid that this does nothing, but I didn't create this mess. */
50809 - #define __print_symbol(fmt, addr)
50810 +-#define __print_symbol(fmt, addr)
50811 ++#define __print_symbol(fmt, addr, args...)
50812 #endif /*CONFIG_KALLSYMS*/
50813 +#else /* when included by kallsyms.c, vsnprintf.c, kprobes.c, or
50814 + arch/x86/kernel/dumpstack.c, with HIDESYM enabled */
50815 +extern unsigned long kallsyms_lookup_name(const char *name);
50816 -+extern void __print_symbol(const char *fmt, unsigned long address);
50817 ++extern __printf(1, 3) void __print_symbol(const char *fmt, unsigned long address, ...);
50818 +extern int sprint_backtrace(char *buffer, unsigned long address);
50819 +extern int sprint_symbol(char *buffer, unsigned long address);
50820 +extern int sprint_symbol_no_offset(char *buffer, unsigned long address);
50821 @@ -104629,8 +128589,23 @@ index 6883e19..e854fcb 100644
50822 + unsigned long *offset);
50823 +#endif
50824
50825 - /* This macro allows us to keep printk typechecking */
50826 - static __printf(1, 2)
50827 +-/* This macro allows us to keep printk typechecking */
50828 +-static __printf(1, 2)
50829 +-void __check_printsym_format(const char *fmt, ...)
50830 +-{
50831 +-}
50832 +-
50833 +-static inline void print_symbol(const char *fmt, unsigned long addr)
50834 +-{
50835 +- __check_printsym_format(fmt, "");
50836 +- __print_symbol(fmt, (unsigned long)
50837 +- __builtin_extract_return_addr((void *)addr));
50838 +-}
50839 ++#define print_symbol(fmt, addr) \
50840 ++ __print_symbol(fmt, addr, "")
50841 +
50842 + static inline void print_ip_sym(unsigned long ip)
50843 + {
50844 diff --git a/include/linux/key-type.h b/include/linux/key-type.h
50845 index 7463355..30de32e 100644
50846 --- a/include/linux/key-type.h
50847 @@ -104786,10 +128761,10 @@ index e15828f..531fd0a 100644
50848 if (atomic_sub_and_test((int) count, &kref->refcount)) {
50849 release(kref);
50850 diff --git a/include/linux/libata.h b/include/linux/libata.h
50851 -index b20a275..4aff061 100644
50852 +index 2c4ebef..f452c4d 100644
50853 --- a/include/linux/libata.h
50854 +++ b/include/linux/libata.h
50855 -@@ -992,7 +992,7 @@ struct ata_port_operations {
50856 +@@ -994,7 +994,7 @@ struct ata_port_operations {
50857 * fields must be pointers.
50858 */
50859 const struct ata_port_operations *inherits;
50860 @@ -104799,7 +128774,7 @@ index b20a275..4aff061 100644
50861 struct ata_port_info {
50862 unsigned long flags;
50863 diff --git a/include/linux/linkage.h b/include/linux/linkage.h
50864 -index a6a42dd..6c5ebce 100644
50865 +index a6a42dd..6408042 100644
50866 --- a/include/linux/linkage.h
50867 +++ b/include/linux/linkage.h
50868 @@ -36,6 +36,7 @@
50869 @@ -104810,8 +128785,26 @@ index a6a42dd..6c5ebce 100644
50870 #define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE)
50871
50872 /*
50873 +@@ -84,6 +85,17 @@
50874 + ALIGN ASM_NL \
50875 + name:
50876 + #endif
50877 ++
50878 ++#ifdef CONFIG_PAX_RAP
50879 ++#define RAP_ENTRY(name) \
50880 ++ .globl name; \
50881 ++ ALIGN; \
50882 ++ .quad __rap_hash_##name; \
50883 ++ name:
50884 ++#else
50885 ++#define RAP_ENTRY(name) ENTRY(name)
50886 ++#endif
50887 ++
50888 + #endif /* LINKER_SCRIPT */
50889 +
50890 + #ifndef WEAK
50891 diff --git a/include/linux/list.h b/include/linux/list.h
50892 -index 993395a..b481018 100644
50893 +index 5356f4d..c99970b 100644
50894 --- a/include/linux/list.h
50895 +++ b/include/linux/list.h
50896 @@ -113,6 +113,19 @@ extern void __list_del_entry(struct list_head *entry);
50897 @@ -104843,6 +128836,98 @@ index 993395a..b481018 100644
50898 /**
50899 * list_move - delete from one list and add as another's head
50900 * @list: the entry to move
50901 +diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h
50902 +index d39ed1c..8b5d98f 100644
50903 +--- a/include/linux/lockd/xdr.h
50904 ++++ b/include/linux/lockd/xdr.h
50905 +@@ -95,24 +95,24 @@ struct nlm_reboot {
50906 + */
50907 + #define NLMSVC_XDRSIZE sizeof(struct nlm_args)
50908 +
50909 +-int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50910 +-int nlmsvc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
50911 +-int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50912 +-int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50913 +-int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50914 +-int nlmsvc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
50915 +-int nlmsvc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
50916 +-int nlmsvc_encode_void(struct svc_rqst *, __be32 *, void *);
50917 +-int nlmsvc_decode_void(struct svc_rqst *, __be32 *, void *);
50918 +-int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50919 +-int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
50920 +-int nlmsvc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
50921 +-int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
50922 ++int nlmsvc_decode_testargs(void *, __be32 *, void *);
50923 ++int nlmsvc_encode_testres(void *, __be32 *, void *);
50924 ++int nlmsvc_decode_lockargs(void *, __be32 *, void *);
50925 ++int nlmsvc_decode_cancargs(void *, __be32 *, void *);
50926 ++int nlmsvc_decode_unlockargs(void *, __be32 *, void *);
50927 ++int nlmsvc_encode_res(void *, __be32 *, void *);
50928 ++int nlmsvc_decode_res(void *, __be32 *, void *);
50929 ++int nlmsvc_encode_void(void *, __be32 *p, void *);
50930 ++int nlmsvc_decode_void(void *, __be32 *, void *);
50931 ++int nlmsvc_decode_shareargs(void *, __be32 *, void *);
50932 ++int nlmsvc_encode_shareres(void *, __be32 *, void *);
50933 ++int nlmsvc_decode_notify(void *, __be32 *, void *);
50934 ++int nlmsvc_decode_reboot(void *, __be32 *, void *);
50935 + /*
50936 +-int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50937 +-int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50938 +-int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50939 +-int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50940 ++int nlmclt_encode_testargs(void *, u32 *, void *);
50941 ++int nlmclt_encode_lockargs(void *, u32 *, void *);
50942 ++int nlmclt_encode_cancargs(void *, u32 *, void *);
50943 ++int nlmclt_encode_unlockargs(void *, u32 *, void *);
50944 + */
50945 +
50946 + #endif /* LOCKD_XDR_H */
50947 +diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h
50948 +index e58c88b..759ca71 100644
50949 +--- a/include/linux/lockd/xdr4.h
50950 ++++ b/include/linux/lockd/xdr4.h
50951 +@@ -23,24 +23,24 @@
50952 +
50953 +
50954 +
50955 +-int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50956 +-int nlm4svc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
50957 +-int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50958 +-int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50959 +-int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50960 +-int nlm4svc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
50961 +-int nlm4svc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
50962 +-int nlm4svc_encode_void(struct svc_rqst *, __be32 *, void *);
50963 +-int nlm4svc_decode_void(struct svc_rqst *, __be32 *, void *);
50964 +-int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
50965 +-int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
50966 +-int nlm4svc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
50967 +-int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
50968 ++int nlm4svc_decode_testargs(void *, __be32 *, void *);
50969 ++int nlm4svc_encode_testres(void *, __be32 *, void *);
50970 ++int nlm4svc_decode_lockargs(void *, __be32 *, void *);
50971 ++int nlm4svc_decode_cancargs(void *, __be32 *, void *);
50972 ++int nlm4svc_decode_unlockargs(void *, __be32 *, void *);
50973 ++int nlm4svc_encode_res(void *, __be32 *, void *);
50974 ++int nlm4svc_decode_res(void *, __be32 *, void *);
50975 ++int nlm4svc_encode_void(void *, __be32 *, void *);
50976 ++int nlm4svc_decode_void(void *, __be32 *, void *);
50977 ++int nlm4svc_decode_shareargs(void *, __be32 *, void *);
50978 ++int nlm4svc_encode_shareres(void *, __be32 *, void *);
50979 ++int nlm4svc_decode_notify(void *, __be32 *, void *);
50980 ++int nlm4svc_decode_reboot(void *, __be32 *, void *);
50981 + /*
50982 +-int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50983 +-int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50984 +-int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50985 +-int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
50986 ++int nlmclt_encode_testargs(void *, u32 *, void *);
50987 ++int nlmclt_encode_lockargs(void *, u32 *, void *);
50988 ++int nlmclt_encode_cancargs(void *, u32 *, void *);
50989 ++int nlmclt_encode_unlockargs(void *, u32 *, void *);
50990 + */
50991 + extern const struct rpc_version nlm_version4;
50992 +
50993 diff --git a/include/linux/lockref.h b/include/linux/lockref.h
50994 index b10b122..d37b3de 100644
50995 --- a/include/linux/lockref.h
50996 @@ -104889,10 +128974,10 @@ index b10b122..d37b3de 100644
50997
50998 #endif /* __LINUX_LOCKREF_H */
50999 diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
51000 -index ec3a6ba..72c79d4 100644
51001 +index 71969de..6257abb 100644
51002 --- a/include/linux/lsm_hooks.h
51003 +++ b/include/linux/lsm_hooks.h
51004 -@@ -1824,7 +1824,7 @@ struct security_hook_heads {
51005 +@@ -1830,7 +1830,7 @@ struct security_hook_heads {
51006 struct list_head audit_rule_match;
51007 struct list_head audit_rule_free;
51008 #endif /* CONFIG_AUDIT */
51009 @@ -104901,7 +128986,7 @@ index ec3a6ba..72c79d4 100644
51010
51011 /*
51012 * Security module hook list structure.
51013 -@@ -1834,7 +1834,7 @@ struct security_hook_list {
51014 +@@ -1840,7 +1840,7 @@ struct security_hook_list {
51015 struct list_head list;
51016 struct list_head *head;
51017 union security_list_options hook;
51018 @@ -104960,10 +129045,10 @@ index 6e8b5b2..8e8a37d 100644
51019 u32 remainder;
51020 return div_u64_rem(dividend, divisor, &remainder);
51021 diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
51022 -index cd0e241..ea80891 100644
51023 +index 792c898..3f045d6 100644
51024 --- a/include/linux/memcontrol.h
51025 +++ b/include/linux/memcontrol.h
51026 -@@ -259,7 +259,7 @@ struct mem_cgroup {
51027 +@@ -246,7 +246,7 @@ struct mem_cgroup {
51028 int last_scanned_node;
51029 #if MAX_NUMNODES > 1
51030 nodemask_t scan_nodes;
51031 @@ -104973,7 +129058,7 @@ index cd0e241..ea80891 100644
51032 #endif
51033
51034 diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
51035 -index 3d385c8..deacb6a 100644
51036 +index 2696c1f..9320d41 100644
51037 --- a/include/linux/mempolicy.h
51038 +++ b/include/linux/mempolicy.h
51039 @@ -91,6 +91,10 @@ static inline struct mempolicy *mpol_dup(struct mempolicy *pol)
51040 @@ -104998,10 +129083,10 @@ index 3d385c8..deacb6a 100644
51041 static inline int
51042 vma_dup_policy(struct vm_area_struct *src, struct vm_area_struct *dst)
51043 diff --git a/include/linux/mm.h b/include/linux/mm.h
51044 -index 00bad77..356be09 100644
51045 +index 516e149..93b0b57 100644
51046 --- a/include/linux/mm.h
51047 +++ b/include/linux/mm.h
51048 -@@ -143,6 +143,11 @@ extern unsigned int kobjsize(const void *objp);
51049 +@@ -155,6 +155,11 @@ extern unsigned int kobjsize(const void *objp);
51050 #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
51051 #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */
51052 #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
51053 @@ -105013,7 +129098,7 @@ index 00bad77..356be09 100644
51054 #define VM_ARCH_1 0x01000000 /* Architecture-specific flag */
51055 #define VM_ARCH_2 0x02000000
51056 #define VM_DONTDUMP 0x04000000 /* Do not include in the core dump */
51057 -@@ -268,8 +273,8 @@ struct vm_operations_struct {
51058 +@@ -286,8 +291,8 @@ struct vm_operations_struct {
51059 /* called by access_process_vm when get_user_pages() fails, typically
51060 * for use by special VMAs that can switch between memory and hardware
51061 */
51062 @@ -105024,7 +129109,7 @@ index 00bad77..356be09 100644
51063
51064 /* Called by the /proc/PID/maps code to ask the vma whether it
51065 * has a special name. Returning non-NULL will also cause this
51066 -@@ -307,6 +312,7 @@ struct vm_operations_struct {
51067 +@@ -325,6 +330,7 @@ struct vm_operations_struct {
51068 struct page *(*find_special_page)(struct vm_area_struct *vma,
51069 unsigned long addr);
51070 };
51071 @@ -105032,7 +129117,7 @@ index 00bad77..356be09 100644
51072
51073 struct mmu_gather;
51074 struct inode;
51075 -@@ -1142,8 +1148,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
51076 +@@ -1175,8 +1181,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
51077 unsigned long *pfn);
51078 int follow_phys(struct vm_area_struct *vma, unsigned long address,
51079 unsigned int flags, unsigned long *prot, resource_size_t *phys);
51080 @@ -105043,7 +129128,7 @@ index 00bad77..356be09 100644
51081
51082 static inline void unmap_shared_mapping_range(struct address_space *mapping,
51083 loff_t const holebegin, loff_t const holelen)
51084 -@@ -1183,9 +1189,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
51085 +@@ -1217,9 +1223,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
51086 }
51087 #endif
51088
51089 @@ -105056,7 +129141,7 @@ index 00bad77..356be09 100644
51090
51091 long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
51092 unsigned long start, unsigned long nr_pages,
51093 -@@ -1276,39 +1282,11 @@ int clear_page_dirty_for_io(struct page *page);
51094 +@@ -1310,39 +1316,11 @@ int clear_page_dirty_for_io(struct page *page);
51095
51096 int get_cmdline(struct task_struct *task, char *buffer, int buflen);
51097
51098 @@ -105093,10 +129178,10 @@ index 00bad77..356be09 100644
51099 - !vma_growsup(vma->vm_next, addr);
51100 -}
51101 -
51102 - extern struct task_struct *task_of_stack(struct task_struct *task,
51103 - struct vm_area_struct *vma, bool in_group);
51104 + int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t);
51105
51106 -@@ -1431,8 +1409,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
51107 + extern unsigned long move_page_tables(struct vm_area_struct *vma,
51108 +@@ -1487,8 +1465,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
51109 {
51110 return 0;
51111 }
51112 @@ -105112,7 +129197,7 @@ index 00bad77..356be09 100644
51113 #endif
51114
51115 #if defined(__PAGETABLE_PMD_FOLDED) || !defined(CONFIG_MMU)
51116 -@@ -1442,6 +1427,12 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
51117 +@@ -1498,6 +1483,12 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
51118 return 0;
51119 }
51120
51121 @@ -105125,7 +129210,7 @@ index 00bad77..356be09 100644
51122 static inline void mm_nr_pmds_init(struct mm_struct *mm) {}
51123
51124 static inline unsigned long mm_nr_pmds(struct mm_struct *mm)
51125 -@@ -1454,6 +1445,7 @@ static inline void mm_dec_nr_pmds(struct mm_struct *mm) {}
51126 +@@ -1510,6 +1501,7 @@ static inline void mm_dec_nr_pmds(struct mm_struct *mm) {}
51127
51128 #else
51129 int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
51130 @@ -105133,7 +129218,7 @@ index 00bad77..356be09 100644
51131
51132 static inline void mm_nr_pmds_init(struct mm_struct *mm)
51133 {
51134 -@@ -1491,11 +1483,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
51135 +@@ -1547,11 +1539,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
51136 NULL: pud_offset(pgd, address);
51137 }
51138
51139 @@ -105157,7 +129242,7 @@ index 00bad77..356be09 100644
51140 #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
51141
51142 #if USE_SPLIT_PTE_PTLOCKS
51143 -@@ -1878,12 +1882,23 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
51144 +@@ -1934,12 +1938,23 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
51145 bool *need_rmap_locks);
51146 extern void exit_mmap(struct mm_struct *);
51147
51148 @@ -105181,7 +129266,7 @@ index 00bad77..356be09 100644
51149 if (rlim < RLIM_INFINITY) {
51150 if (((new - start) + (end_data - start_data)) > rlim)
51151 return -ENOSPC;
51152 -@@ -1916,6 +1931,7 @@ extern unsigned long do_mmap(struct file *file, unsigned long addr,
51153 +@@ -1974,6 +1989,7 @@ extern unsigned long do_mmap(struct file *file, unsigned long addr,
51154 unsigned long len, unsigned long prot, unsigned long flags,
51155 vm_flags_t vm_flags, unsigned long pgoff, unsigned long *populate);
51156 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
51157 @@ -105189,7 +129274,7 @@ index 00bad77..356be09 100644
51158
51159 static inline unsigned long
51160 do_mmap_pgoff(struct file *file, unsigned long addr,
51161 -@@ -1952,10 +1968,11 @@ struct vm_unmapped_area_info {
51162 +@@ -2010,10 +2026,11 @@ struct vm_unmapped_area_info {
51163 unsigned long high_limit;
51164 unsigned long align_mask;
51165 unsigned long align_offset;
51166 @@ -105203,7 +129288,7 @@ index 00bad77..356be09 100644
51167
51168 /*
51169 * Search for an unmapped address range.
51170 -@@ -1967,7 +1984,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
51171 +@@ -2025,7 +2042,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
51172 * - satisfies (begin_addr & align_mask) == (align_offset & align_mask)
51173 */
51174 static inline unsigned long
51175 @@ -105212,7 +129297,7 @@ index 00bad77..356be09 100644
51176 {
51177 if (info->flags & VM_UNMAPPED_AREA_TOPDOWN)
51178 return unmapped_area_topdown(info);
51179 -@@ -2027,6 +2044,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
51180 +@@ -2085,6 +2102,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
51181 extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
51182 struct vm_area_struct **pprev);
51183
51184 @@ -105223,7 +129308,7 @@ index 00bad77..356be09 100644
51185 /* Look up the first VMA which intersects the interval start_addr..end_addr-1,
51186 NULL if none. Assume start_addr < end_addr. */
51187 static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
51188 -@@ -2056,10 +2077,10 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
51189 +@@ -2114,10 +2135,10 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
51190 }
51191
51192 #ifdef CONFIG_MMU
51193 @@ -105236,19 +129321,7 @@ index 00bad77..356be09 100644
51194 {
51195 return __pgprot(0);
51196 }
51197 -@@ -2122,6 +2143,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
51198 - static inline void vm_stat_account(struct mm_struct *mm,
51199 - unsigned long flags, struct file *file, long pages)
51200 - {
51201 -+
51202 -+#ifdef CONFIG_PAX_RANDMMAP
51203 -+ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
51204 -+#endif
51205 -+
51206 - mm->total_vm += pages;
51207 - }
51208 - #endif /* CONFIG_PROC_FS */
51209 -@@ -2226,7 +2252,7 @@ extern void put_hwpoison_page(struct page *page);
51210 +@@ -2282,7 +2303,7 @@ extern int get_hwpoison_page(struct page *page);
51211 extern int sysctl_memory_failure_early_kill;
51212 extern int sysctl_memory_failure_recovery;
51213 extern void shake_page(struct page *p, int access);
51214 @@ -105257,7 +129330,7 @@ index 00bad77..356be09 100644
51215 extern int soft_offline_page(struct page *page, int flags);
51216
51217
51218 -@@ -2311,5 +2337,11 @@ void __init setup_nr_node_ids(void);
51219 +@@ -2367,5 +2388,11 @@ void __init setup_nr_node_ids(void);
51220 static inline void setup_nr_node_ids(void) {}
51221 #endif
51222
51223 @@ -105270,10 +129343,10 @@ index 00bad77..356be09 100644
51224 #endif /* __KERNEL__ */
51225 #endif /* _LINUX_MM_H */
51226 diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
51227 -index f8d1492..a6dfed0 100644
51228 +index 624b78b..47715c9 100644
51229 --- a/include/linux/mm_types.h
51230 +++ b/include/linux/mm_types.h
51231 -@@ -355,7 +355,9 @@ struct vm_area_struct {
51232 +@@ -352,7 +352,9 @@ struct vm_area_struct {
51233 struct mempolicy *vm_policy; /* NUMA policy for the VMA */
51234 #endif
51235 struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
51236 @@ -105284,7 +129357,7 @@ index f8d1492..a6dfed0 100644
51237
51238 struct core_thread {
51239 struct task_struct *task;
51240 -@@ -511,7 +513,25 @@ struct mm_struct {
51241 +@@ -509,7 +511,25 @@ struct mm_struct {
51242 #ifdef CONFIG_HUGETLB_PAGE
51243 atomic_long_t hugetlb_usage;
51244 #endif
51245 @@ -105334,10 +129407,10 @@ index 3ba327a..85cd5ce 100644
51246 }
51247
51248 diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
51249 -index e23a9e7..75994f3 100644
51250 +index 7b6c2cf..7bce238 100644
51251 --- a/include/linux/mmzone.h
51252 +++ b/include/linux/mmzone.h
51253 -@@ -527,7 +527,7 @@ struct zone {
51254 +@@ -522,7 +522,7 @@ struct zone {
51255
51256 ZONE_PADDING(_pad3_)
51257 /* Zone statistics */
51258 @@ -105347,7 +129420,7 @@ index e23a9e7..75994f3 100644
51259
51260 enum zone_flags {
51261 diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
51262 -index 64f36e0..fa7f0d8 100644
51263 +index 6e4c645..3633f7b 100644
51264 --- a/include/linux/mod_devicetable.h
51265 +++ b/include/linux/mod_devicetable.h
51266 @@ -139,7 +139,7 @@ struct usb_device_id {
51267 @@ -105369,7 +129442,7 @@ index 64f36e0..fa7f0d8 100644
51268 * struct dmi_device_id appears during expansion of
51269 * "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
51270 diff --git a/include/linux/module.h b/include/linux/module.h
51271 -index b229a99..37a70e1 100644
51272 +index 2bb0c30..dc42cbc 100644
51273 --- a/include/linux/module.h
51274 +++ b/include/linux/module.h
51275 @@ -19,9 +19,11 @@
51276 @@ -105408,7 +129481,35 @@ index b229a99..37a70e1 100644
51277
51278 extern ssize_t __modver_version_show(struct module_attribute *,
51279 struct module_kobject *, char *);
51280 -@@ -319,7 +322,7 @@ struct module {
51281 +@@ -303,17 +306,18 @@ struct mod_tree_node {
51282 + };
51283 +
51284 + struct module_layout {
51285 +- /* The actual code + data. */
51286 +- void *base;
51287 +- /* Total size. */
51288 +- unsigned int size;
51289 +- /* The size of the executable code. */
51290 +- unsigned int text_size;
51291 +- /* Size of RO section of the module (text+rodata) */
51292 +- unsigned int ro_size;
51293 ++ /* The actual code. */
51294 ++ void *base_rx;
51295 ++ /* The actual data. */
51296 ++ void *base_rw;
51297 ++ /* Code size. */
51298 ++ unsigned int size_rx;
51299 ++ /* Data size. */
51300 ++ unsigned int size_rw;
51301 +
51302 + #ifdef CONFIG_MODULES_TREE_LOOKUP
51303 +- struct mod_tree_node mtn;
51304 ++ struct mod_tree_node mtn_rx;
51305 ++ struct mod_tree_node mtn_rw;
51306 + #endif
51307 + };
51308 +
51309 +@@ -341,7 +345,7 @@ struct module {
51310
51311 /* Sysfs stuff. */
51312 struct module_kobject mkobj;
51313 @@ -105417,52 +129518,7 @@ index b229a99..37a70e1 100644
51314 const char *version;
51315 const char *srcversion;
51316 struct kobject *holders_dir;
51317 -@@ -376,20 +379,21 @@ struct module {
51318 - * If this is non-NULL, vfree() after init() returns.
51319 - *
51320 - * Cacheline align here, such that:
51321 -- * module_init, module_core, init_size, core_size,
51322 -+ * module_init_*, module_core_*, init_size_*, core_size_*,
51323 - * init_text_size, core_text_size and mtn_core::{mod,node[0]}
51324 - * are on the same cacheline.
51325 - */
51326 -- void *module_init ____cacheline_aligned;
51327 -+ void *module_init_rw ____cacheline_aligned;
51328 -+ void *module_init_rx;
51329 -
51330 - /* Here is the actual code + data, vfree'd on unload. */
51331 -- void *module_core;
51332 -+ void *module_core_rx, *module_core_rw;
51333 -
51334 - /* Here are the sizes of the init and core sections */
51335 -- unsigned int init_size, core_size;
51336 -+ unsigned int init_size_rw, core_size_rw;
51337 -
51338 - /* The size of the executable code in each section. */
51339 -- unsigned int init_text_size, core_text_size;
51340 -+ unsigned int init_size_rx, core_size_rx;
51341 -
51342 - #ifdef CONFIG_MODULES_TREE_LOOKUP
51343 - /*
51344 -@@ -397,13 +401,12 @@ struct module {
51345 - * above entries such that a regular lookup will only touch one
51346 - * cacheline.
51347 - */
51348 -- struct mod_tree_node mtn_core;
51349 -- struct mod_tree_node mtn_init;
51350 -+ struct mod_tree_node mtn_core_rw;
51351 -+ struct mod_tree_node mtn_core_rx;
51352 -+ struct mod_tree_node mtn_init_rw;
51353 -+ struct mod_tree_node mtn_init_rx;
51354 - #endif
51355 -
51356 -- /* Size of RO sections of the module (text+rodata) */
51357 -- unsigned int init_ro_size, core_ro_size;
51358 --
51359 - /* Arch-specific module values */
51360 - struct mod_arch_specific arch;
51361 -
51362 -@@ -455,6 +458,10 @@ struct module {
51363 +@@ -449,6 +453,10 @@ struct module {
51364 unsigned int num_trace_events;
51365 struct trace_enum_map **trace_enums;
51366 unsigned int num_trace_enums;
51367 @@ -105473,7 +129529,7 @@ index b229a99..37a70e1 100644
51368 #endif
51369 #ifdef CONFIG_FTRACE_MCOUNT_RECORD
51370 unsigned int num_ftrace_callsites;
51371 -@@ -482,7 +489,8 @@ struct module {
51372 +@@ -476,7 +484,8 @@ struct module {
51373 ctor_fn_t *ctors;
51374 unsigned int num_ctors;
51375 #endif
51376 @@ -105483,7 +129539,7 @@ index b229a99..37a70e1 100644
51377 #ifndef MODULE_ARCH_INIT
51378 #define MODULE_ARCH_INIT {}
51379 #endif
51380 -@@ -503,18 +511,48 @@ bool is_module_address(unsigned long addr);
51381 +@@ -497,18 +506,38 @@ bool is_module_address(unsigned long addr);
51382 bool is_module_percpu_address(unsigned long addr);
51383 bool is_module_text_address(unsigned long addr);
51384
51385 @@ -105499,40 +129555,30 @@ index b229a99..37a70e1 100644
51386 + return ((void *)addr >= start && (void *)addr < start + size);
51387 +}
51388 +
51389 -+static inline int within_module_core_rx(unsigned long addr, const struct module *mod)
51390 -+{
51391 -+ return within_module_range(addr, mod->module_core_rx, mod->core_size_rx);
51392 -+}
51393 -+
51394 -+static inline int within_module_core_rw(unsigned long addr, const struct module *mod)
51395 -+{
51396 -+ return within_module_range(addr, mod->module_core_rw, mod->core_size_rw);
51397 -+}
51398 -+
51399 -+static inline int within_module_init_rx(unsigned long addr, const struct module *mod)
51400 ++static inline int within_module_rx(unsigned long addr, const struct module_layout *layout)
51401 +{
51402 -+ return within_module_range(addr, mod->module_init_rx, mod->init_size_rx);
51403 ++ return within_module_range(addr, layout->base_rx, layout->size_rx);
51404 +}
51405 +
51406 -+static inline int within_module_init_rw(unsigned long addr, const struct module *mod)
51407 ++static inline int within_module_rw(unsigned long addr, const struct module_layout *layout)
51408 +{
51409 -+ return within_module_range(addr, mod->module_init_rw, mod->init_size_rw);
51410 ++ return within_module_range(addr, layout->base_rw, layout->size_rw);
51411 +}
51412 +
51413 static inline bool within_module_core(unsigned long addr,
51414 const struct module *mod)
51415 {
51416 -- return (unsigned long)mod->module_core <= addr &&
51417 -- addr < (unsigned long)mod->module_core + mod->core_size;
51418 -+ return within_module_core_rx(addr, mod) || within_module_core_rw(addr, mod);
51419 +- return (unsigned long)mod->core_layout.base <= addr &&
51420 +- addr < (unsigned long)mod->core_layout.base + mod->core_layout.size;
51421 ++ return within_module_rx(addr, &mod->core_layout) || within_module_rw(addr, &mod->core_layout);
51422 }
51423
51424 static inline bool within_module_init(unsigned long addr,
51425 const struct module *mod)
51426 {
51427 -- return (unsigned long)mod->module_init <= addr &&
51428 -- addr < (unsigned long)mod->module_init + mod->init_size;
51429 -+ return within_module_init_rx(addr, mod) || within_module_init_rw(addr, mod);
51430 +- return (unsigned long)mod->init_layout.base <= addr &&
51431 +- addr < (unsigned long)mod->init_layout.base + mod->init_layout.size;
51432 ++ return within_module_rx(addr, &mod->init_layout) || within_module_rw(addr, &mod->init_layout);
51433 }
51434
51435 static inline bool within_module(unsigned long addr, const struct module *mod)
51436 @@ -105585,9 +129631,37 @@ index 4d0cb9b..3169ac7 100644
51437 }
51438 #endif
51439 diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
51440 -index 52666d9..9701f5e 100644
51441 +index 52666d9..f10563b 100644
51442 --- a/include/linux/moduleparam.h
51443 +++ b/include/linux/moduleparam.h
51444 +@@ -54,7 +54,7 @@ struct kernel_param_ops {
51445 + int (*get)(char *buffer, const struct kernel_param *kp);
51446 + /* Optional function to free kp->arg when module unloaded. */
51447 + void (*free)(void *arg);
51448 +-};
51449 ++} __do_const;
51450 +
51451 + /*
51452 + * Flags available for kernel_param
51453 +@@ -226,15 +226,15 @@ struct kparam_array
51454 +
51455 + /* Obsolete - use module_param_cb() */
51456 + #define module_param_call(name, set, get, arg, perm) \
51457 +- static const struct kernel_param_ops __param_ops_##name = \
51458 +- { .flags = 0, (void *)set, (void *)get }; \
51459 ++ static const struct kernel_param_ops __param_ops_##name = \
51460 ++ { .flags = 0, set, get }; \
51461 + __module_param_call(MODULE_PARAM_PREFIX, \
51462 + name, &__param_ops_##name, arg, \
51463 + (perm) + sizeof(__check_old_set_param(set))*0, -1, 0)
51464 +
51465 + /* We don't get oldget: it's often a new-style param_get_uint, etc. */
51466 + static inline int
51467 +-__check_old_set_param(int (*oldset)(const char *, struct kernel_param *))
51468 ++__check_old_set_param(int (*oldset)(const char *, const struct kernel_param *))
51469 + {
51470 + return 0;
51471 + }
51472 @@ -289,7 +289,7 @@ static inline void kernel_param_unlock(struct module *mod)
51473 * @len is usually just sizeof(string).
51474 */
51475 @@ -105646,10 +129720,10 @@ index 0b4ac7d..d4dc945 100644
51476 struct iovec;
51477 struct kvec;
51478 diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
51479 -index 04c068e..828eebe 100644
51480 +index 6d1d8f4..f1ed976 100644
51481 --- a/include/linux/netdevice.h
51482 +++ b/include/linux/netdevice.h
51483 -@@ -1238,6 +1238,7 @@ struct net_device_ops {
51484 +@@ -1257,6 +1257,7 @@ struct net_device_ops {
51485 int (*ndo_fill_metadata_dst)(struct net_device *dev,
51486 struct sk_buff *skb);
51487 };
51488 @@ -105657,7 +129731,7 @@ index 04c068e..828eebe 100644
51489
51490 /**
51491 * enum net_device_priv_flags - &struct net_device priv_flags
51492 -@@ -1548,7 +1549,7 @@ struct net_device {
51493 +@@ -1570,7 +1571,7 @@ struct net_device {
51494 unsigned long base_addr;
51495 int irq;
51496
51497 @@ -105666,7 +129740,7 @@ index 04c068e..828eebe 100644
51498
51499 /*
51500 * Some hardware also needs these fields (state,dev_list,
51501 -@@ -1587,8 +1588,8 @@ struct net_device {
51502 +@@ -1609,8 +1610,8 @@ struct net_device {
51503
51504 struct net_device_stats stats;
51505
51506 @@ -105690,8 +129764,23 @@ index 0ad5567..79b35f5a 100644
51507
51508 /* Function to register/unregister hook points. */
51509 int nf_register_net_hook(struct net *net, const struct nf_hook_ops *ops);
51510 +diff --git a/include/linux/netfilter/ipset/ip_set_comment.h b/include/linux/netfilter/ipset/ip_set_comment.h
51511 +index 8d02485..a1e1aa5 100644
51512 +--- a/include/linux/netfilter/ipset/ip_set_comment.h
51513 ++++ b/include/linux/netfilter/ipset/ip_set_comment.h
51514 +@@ -58,8 +58,9 @@ ip_set_put_comment(struct sk_buff *skb, struct ip_set_comment *comment)
51515 + * of the set data anymore.
51516 + */
51517 + static inline void
51518 +-ip_set_comment_free(struct ip_set_comment *comment)
51519 ++ip_set_comment_free(void *_comment)
51520 + {
51521 ++ struct ip_set_comment *comment = _comment;
51522 + struct ip_set_comment_rcu *c;
51523 +
51524 + c = rcu_dereference_protected(comment->c, 1);
51525 diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
51526 -index 5646b24..707819e 100644
51527 +index ba0d978..5a9c6f1 100644
51528 --- a/include/linux/netfilter/nfnetlink.h
51529 +++ b/include/linux/netfilter/nfnetlink.h
51530 @@ -19,7 +19,7 @@ struct nfnl_callback {
51531 @@ -105719,10 +129808,10 @@ index 0000000..33f4af8
51532 +
51533 +#endif
51534 diff --git a/include/linux/netlink.h b/include/linux/netlink.h
51535 -index 639e9b8..b37c9be 100644
51536 +index 0b41959..71c4eea 100644
51537 --- a/include/linux/netlink.h
51538 +++ b/include/linux/netlink.h
51539 -@@ -158,19 +158,19 @@ struct netlink_dump_control {
51540 +@@ -160,19 +160,19 @@ struct netlink_dump_control {
51541 void *data;
51542 struct module *module;
51543 u16 min_dump_alloc;
51544 @@ -105813,6 +129902,28 @@ index 4386946..f50c615 100644
51545 struct padata_cpumask cpumask;
51546 spinlock_t lock ____cacheline_aligned;
51547 unsigned int processed;
51548 +diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
51549 +index 92395a0..5ca2827 100644
51550 +--- a/include/linux/pagemap.h
51551 ++++ b/include/linux/pagemap.h
51552 +@@ -243,7 +243,7 @@ static inline struct page *page_cache_alloc_readahead(struct address_space *x)
51553 + __GFP_COLD | __GFP_NORETRY | __GFP_NOWARN);
51554 + }
51555 +
51556 +-typedef int filler_t(void *, struct page *);
51557 ++typedef int filler_t(struct file *, struct page *);
51558 +
51559 + pgoff_t page_cache_next_hole(struct address_space *mapping,
51560 + pgoff_t index, unsigned long max_scan);
51561 +@@ -387,7 +387,7 @@ extern int read_cache_pages(struct address_space *mapping,
51562 + static inline struct page *read_mapping_page(struct address_space *mapping,
51563 + pgoff_t index, void *data)
51564 + {
51565 +- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
51566 ++ filler_t *filler = mapping->a_ops->readpage;
51567 + return read_cache_page(mapping, index, filler, data);
51568 + }
51569 +
51570 diff --git a/include/linux/path.h b/include/linux/path.h
51571 index d137218..be0c176 100644
51572 --- a/include/linux/path.h
51573 @@ -105849,10 +129960,10 @@ index 8c78950..0d74ed9 100644
51574 /**
51575 * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot
51576 diff --git a/include/linux/percpu.h b/include/linux/percpu.h
51577 -index caebf2a..4c3ae9d 100644
51578 +index 4bc6daf..6edaab0 100644
51579 --- a/include/linux/percpu.h
51580 +++ b/include/linux/percpu.h
51581 -@@ -34,7 +34,7 @@
51582 +@@ -28,7 +28,7 @@
51583 * preallocate for this. Keep PERCPU_DYNAMIC_RESERVE equal to or
51584 * larger than PERCPU_DYNAMIC_EARLY_SIZE.
51585 */
51586 @@ -105862,10 +129973,10 @@ index caebf2a..4c3ae9d 100644
51587
51588 /*
51589 diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
51590 -index f9828a4..d5a70ba 100644
51591 +index f5c5a3f..1330851 100644
51592 --- a/include/linux/perf_event.h
51593 +++ b/include/linux/perf_event.h
51594 -@@ -470,8 +470,8 @@ struct perf_event {
51595 +@@ -471,8 +471,8 @@ struct perf_event {
51596
51597 enum perf_event_active_state state;
51598 unsigned int attach_state;
51599 @@ -105876,7 +129987,7 @@ index f9828a4..d5a70ba 100644
51600
51601 /*
51602 * These are the total time in nanoseconds that the event
51603 -@@ -522,8 +522,8 @@ struct perf_event {
51604 +@@ -523,8 +523,8 @@ struct perf_event {
51605 * These accumulate total time (in nanoseconds) that children
51606 * events have been enabled and running, respectively.
51607 */
51608 @@ -105887,7 +129998,7 @@ index f9828a4..d5a70ba 100644
51609
51610 /*
51611 * Protect attach/detach and child_list:
51612 -@@ -950,7 +950,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
51613 +@@ -948,7 +948,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
51614
51615 static inline u64 __perf_event_count(struct perf_event *event)
51616 {
51617 @@ -105896,7 +130007,7 @@ index f9828a4..d5a70ba 100644
51618 }
51619
51620 extern void perf_event_mmap(struct vm_area_struct *vma);
51621 -@@ -974,7 +974,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
51622 +@@ -972,7 +972,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
51623 entry->ip[entry->nr++] = ip;
51624 }
51625
51626 @@ -105905,7 +130016,7 @@ index f9828a4..d5a70ba 100644
51627 extern int sysctl_perf_event_mlock;
51628 extern int sysctl_perf_event_sample_rate;
51629 extern int sysctl_perf_cpu_time_max_percent;
51630 -@@ -989,19 +989,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
51631 +@@ -987,19 +987,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
51632 loff_t *ppos);
51633
51634
51635 @@ -105933,7 +130044,7 @@ index f9828a4..d5a70ba 100644
51636 }
51637
51638 extern void perf_event_init(void);
51639 -@@ -1164,7 +1169,7 @@ struct perf_pmu_events_attr {
51640 +@@ -1162,7 +1167,7 @@ struct perf_pmu_events_attr {
51641 struct device_attribute attr;
51642 u64 id;
51643 const char *event_str;
51644 @@ -105942,6 +130053,21 @@ index f9828a4..d5a70ba 100644
51645
51646 ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr,
51647 char *page);
51648 +diff --git a/include/linux/pid.h b/include/linux/pid.h
51649 +index 23705a5..af2bfb4 100644
51650 +--- a/include/linux/pid.h
51651 ++++ b/include/linux/pid.h
51652 +@@ -169,8 +169,8 @@ static inline pid_t pid_nr(struct pid *pid)
51653 + return nr;
51654 + }
51655 +
51656 +-pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns);
51657 +-pid_t pid_vnr(struct pid *pid);
51658 ++pid_t pid_nr_ns(const struct pid *pid, const struct pid_namespace *ns);
51659 ++pid_t pid_vnr(const struct pid *pid);
51660 +
51661 + #define do_each_pid_task(pid, type, task) \
51662 + do { \
51663 diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
51664 index 918b117..7af374b7 100644
51665 --- a/include/linux/pid_namespace.h
51666 @@ -105956,16 +130082,10 @@ index 918b117..7af374b7 100644
51667 extern struct pid_namespace init_pid_ns;
51668
51669 diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
51670 -index eb8b8ac..deb6089 100644
51671 +index 24f5470..deb6089 100644
51672 --- a/include/linux/pipe_fs_i.h
51673 +++ b/include/linux/pipe_fs_i.h
51674 -@@ -42,21 +42,23 @@ struct pipe_buffer {
51675 - * @fasync_readers: reader side fasync
51676 - * @fasync_writers: writer side fasync
51677 - * @bufs: the circular array of pipe buffers
51678 -+ * @user: the user who created this pipe
51679 - **/
51680 - struct pipe_inode_info {
51681 +@@ -48,10 +48,10 @@ struct pipe_inode_info {
51682 struct mutex mutex;
51683 wait_queue_head_t wait;
51684 unsigned int nrbufs, curbuf, buffers;
51685 @@ -105980,27 +130100,11 @@ index eb8b8ac..deb6089 100644
51686 unsigned int r_counter;
51687 unsigned int w_counter;
51688 struct page *tmp_page;
51689 - struct fasync_struct *fasync_readers;
51690 - struct fasync_struct *fasync_writers;
51691 - struct pipe_buffer *bufs;
51692 -+ struct user_struct *user;
51693 - };
51694 -
51695 - /*
51696 -@@ -123,6 +125,8 @@ void pipe_unlock(struct pipe_inode_info *);
51697 - void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *);
51698 -
51699 - extern unsigned int pipe_max_size, pipe_min_size;
51700 -+extern unsigned long pipe_user_pages_hard;
51701 -+extern unsigned long pipe_user_pages_soft;
51702 - int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *);
51703 -
51704 -
51705 diff --git a/include/linux/pm.h b/include/linux/pm.h
51706 -index 528be67..4643a08 100644
51707 +index 6a5d654..1051ebc 100644
51708 --- a/include/linux/pm.h
51709 +++ b/include/linux/pm.h
51710 -@@ -630,6 +630,7 @@ struct dev_pm_domain {
51711 +@@ -631,6 +631,7 @@ struct dev_pm_domain {
51712 void (*sync)(struct device *dev);
51713 void (*dismiss)(struct device *dev);
51714 };
51715 @@ -106009,7 +130113,7 @@ index 528be67..4643a08 100644
51716 /*
51717 * The PM_EVENT_ messages are also used by drivers implementing the legacy
51718 diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
51719 -index ba4ced3..7ce2a56 100644
51720 +index db21d39..39a6aaa 100644
51721 --- a/include/linux/pm_domain.h
51722 +++ b/include/linux/pm_domain.h
51723 @@ -35,7 +35,7 @@ struct gpd_dev_ops {
51724 @@ -106022,10 +130126,10 @@ index ba4ced3..7ce2a56 100644
51725 struct generic_pm_domain {
51726 struct dev_pm_domain domain; /* PM domain operations */
51727 diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
51728 -index 3bdbb41..2a6f56c 100644
51729 +index 7af093d..122df16 100644
51730 --- a/include/linux/pm_runtime.h
51731 +++ b/include/linux/pm_runtime.h
51732 -@@ -110,7 +110,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
51733 +@@ -111,7 +111,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
51734
51735 static inline void pm_runtime_mark_last_busy(struct device *dev)
51736 {
51737 @@ -106048,10 +130152,10 @@ index 5df733b..d55f252 100644
51738 /* config parameters */
51739 #define PNP_CONFIG_NORMAL 0x0001
51740 diff --git a/include/linux/poison.h b/include/linux/poison.h
51741 -index 317e16d..ec214cb 100644
51742 +index 4a27153..8106d5c 100644
51743 --- a/include/linux/poison.h
51744 +++ b/include/linux/poison.h
51745 -@@ -19,15 +19,15 @@
51746 +@@ -19,8 +19,8 @@
51747 * under normal circumstances, used to verify that nobody uses
51748 * non-initialized list entries.
51749 */
51750 @@ -106062,14 +130166,6 @@ index 317e16d..ec214cb 100644
51751
51752 /********** include/linux/timer.h **********/
51753 /*
51754 - * Magic number "tsta" to indicate a static timer initializer
51755 - * for the object debugging code.
51756 - */
51757 --#define TIMER_ENTRY_STATIC ((void *) 0x74737461)
51758 -+#define TIMER_ENTRY_STATIC ((void *) 0x300 + POISON_POINTER_DELTA)
51759 -
51760 - /********** mm/debug-pagealloc.c **********/
51761 - #define PAGE_POISON 0xaa
51762 diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h
51763 index d8b187c3..9a9257a 100644
51764 --- a/include/linux/power/smartreflex.h
51765 @@ -106169,9 +130265,18 @@ index 75e4e30..fcfde15 100644
51766 #define preempt_set_need_resched() \
51767 do { \
51768 diff --git a/include/linux/printk.h b/include/linux/printk.h
51769 -index 9729565..e5e5255 100644
51770 +index 9ccbdf2..9987ac2 100644
51771 --- a/include/linux/printk.h
51772 +++ b/include/linux/printk.h
51773 +@@ -43,7 +43,7 @@ static inline const char *printk_skip_level(const char *buffer)
51774 + #define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
51775 + #define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
51776 +
51777 +-extern int console_printk[];
51778 ++extern int console_printk[4];
51779 +
51780 + #define console_loglevel (console_printk[0])
51781 + #define default_message_loglevel (console_printk[1])
51782 @@ -123,6 +123,7 @@ void early_printk(const char *s, ...) { }
51783 #endif
51784
51785 @@ -106286,7 +130391,7 @@ index b2505ac..5f7ab55 100644
51786 extern bool qid_valid(struct kqid qid);
51787
51788 diff --git a/include/linux/random.h b/include/linux/random.h
51789 -index a75840c..e7c4305 100644
51790 +index 9c29122..9112a5b9 100644
51791 --- a/include/linux/random.h
51792 +++ b/include/linux/random.h
51793 @@ -18,9 +18,19 @@ struct random_ready_callback {
51794 @@ -106311,7 +130416,7 @@ index a75840c..e7c4305 100644
51795
51796 extern void get_random_bytes(void *buf, int nbytes);
51797 extern int add_random_ready_callback(struct random_ready_callback *rdy);
51798 -@@ -52,6 +62,11 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
51799 +@@ -53,6 +63,11 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
51800 #define prandom_init_once(pcpu_state) \
51801 DO_ONCE(prandom_seed_full_state, (pcpu_state))
51802
51803 @@ -106323,7 +130428,7 @@ index a75840c..e7c4305 100644
51804 /**
51805 * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro)
51806 * @ep_ro: right open interval endpoint
51807 -@@ -64,7 +79,7 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
51808 +@@ -65,7 +80,7 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
51809 *
51810 * Returns: pseudo-random number in interval [0, ep_ro)
51811 */
51812 @@ -106348,7 +130453,7 @@ index 14d7b83..a1edf56 100644
51813
51814
51815 diff --git a/include/linux/rculist.h b/include/linux/rculist.h
51816 -index 5ed5409..92c9f6a 100644
51817 +index 14ec165..45c00c5 100644
51818 --- a/include/linux/rculist.h
51819 +++ b/include/linux/rculist.h
51820 @@ -59,6 +59,9 @@ void __list_add_rcu(struct list_head *new,
51821 @@ -106396,10 +130501,10 @@ index 5ed5409..92c9f6a 100644
51822 * hlist_del_init_rcu - deletes entry from hash list with re-initialization
51823 * @n: the element to delete from the hash list.
51824 diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
51825 -index a0189ba..7e34269 100644
51826 +index 14e6f47..0e6846b 100644
51827 --- a/include/linux/rcupdate.h
51828 +++ b/include/linux/rcupdate.h
51829 -@@ -854,6 +854,7 @@ static inline void rcu_preempt_sleep_check(void)
51830 +@@ -867,6 +867,7 @@ static inline void rcu_preempt_sleep_check(void)
51831 * read-side critical sections may be preempted and they may also block, but
51832 * only when acquiring spinlocks that are subject to priority inheritance.
51833 */
51834 @@ -106407,7 +130512,7 @@ index a0189ba..7e34269 100644
51835 static inline void rcu_read_lock(void)
51836 {
51837 __rcu_read_lock();
51838 -@@ -908,6 +909,7 @@ static inline void rcu_read_lock(void)
51839 +@@ -921,6 +922,7 @@ static inline void rcu_read_lock(void)
51840 *
51841 * See rcu_read_lock() for more information.
51842 */
51843 @@ -106415,7 +130520,7 @@ index a0189ba..7e34269 100644
51844 static inline void rcu_read_unlock(void)
51845 {
51846 RCU_LOCKDEP_WARN(!rcu_is_watching(),
51847 -@@ -934,6 +936,7 @@ static inline void rcu_read_unlock(void)
51848 +@@ -947,6 +949,7 @@ static inline void rcu_read_unlock(void)
51849 * rcu_read_unlock_bh() from one task if the matching rcu_read_lock_bh()
51850 * was invoked from some other task.
51851 */
51852 @@ -106423,7 +130528,7 @@ index a0189ba..7e34269 100644
51853 static inline void rcu_read_lock_bh(void)
51854 {
51855 local_bh_disable();
51856 -@@ -948,6 +951,7 @@ static inline void rcu_read_lock_bh(void)
51857 +@@ -961,6 +964,7 @@ static inline void rcu_read_lock_bh(void)
51858 *
51859 * See rcu_read_lock_bh() for more information.
51860 */
51861 @@ -106431,7 +130536,7 @@ index a0189ba..7e34269 100644
51862 static inline void rcu_read_unlock_bh(void)
51863 {
51864 RCU_LOCKDEP_WARN(!rcu_is_watching(),
51865 -@@ -970,6 +974,7 @@ static inline void rcu_read_unlock_bh(void)
51866 +@@ -983,6 +987,7 @@ static inline void rcu_read_unlock_bh(void)
51867 * rcu_read_unlock_sched() from process context if the matching
51868 * rcu_read_lock_sched() was invoked from an NMI handler.
51869 */
51870 @@ -106439,7 +130544,7 @@ index a0189ba..7e34269 100644
51871 static inline void rcu_read_lock_sched(void)
51872 {
51873 preempt_disable();
51874 -@@ -980,6 +985,7 @@ static inline void rcu_read_lock_sched(void)
51875 +@@ -993,6 +998,7 @@ static inline void rcu_read_lock_sched(void)
51876 }
51877
51878 /* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
51879 @@ -106447,7 +130552,7 @@ index a0189ba..7e34269 100644
51880 static inline notrace void rcu_read_lock_sched_notrace(void)
51881 {
51882 preempt_disable_notrace();
51883 -@@ -991,6 +997,7 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
51884 +@@ -1004,6 +1010,7 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
51885 *
51886 * See rcu_read_lock_sched for more information.
51887 */
51888 @@ -106455,7 +130560,7 @@ index a0189ba..7e34269 100644
51889 static inline void rcu_read_unlock_sched(void)
51890 {
51891 RCU_LOCKDEP_WARN(!rcu_is_watching(),
51892 -@@ -1001,6 +1008,7 @@ static inline void rcu_read_unlock_sched(void)
51893 +@@ -1014,6 +1021,7 @@ static inline void rcu_read_unlock_sched(void)
51894 }
51895
51896 /* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
51897 @@ -106543,10 +130648,10 @@ index cde976e..ebd6033 100644
51898 #define RIO_RESOURCE_MEM 0x00000100
51899 #define RIO_RESOURCE_DOORBELL 0x00000200
51900 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
51901 -index ddda2ac..4c6b6e1 100644
51902 +index a07f42b..6b04a8d 100644
51903 --- a/include/linux/rmap.h
51904 +++ b/include/linux/rmap.h
51905 -@@ -135,8 +135,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma)
51906 +@@ -136,8 +136,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma)
51907 void anon_vma_init(void); /* create anon_vma_cachep */
51908 int anon_vma_prepare(struct vm_area_struct *);
51909 void unlink_anon_vmas(struct vm_area_struct *);
51910 @@ -106590,7 +130695,7 @@ index 556ec1e..38c19c9 100644
51911
51912 /*
51913 diff --git a/include/linux/sched.h b/include/linux/sched.h
51914 -index 21a6e96..25820d8 100644
51915 +index a10494a..2facd6d 100644
51916 --- a/include/linux/sched.h
51917 +++ b/include/linux/sched.h
51918 @@ -7,7 +7,7 @@
51919 @@ -106610,7 +130715,7 @@ index 21a6e96..25820d8 100644
51920
51921 #define VMACACHE_BITS 2
51922 #define VMACACHE_SIZE (1U << VMACACHE_BITS)
51923 -@@ -437,6 +438,19 @@ struct nsproxy;
51924 +@@ -441,6 +442,19 @@ struct nsproxy;
51925 struct user_namespace;
51926
51927 #ifdef CONFIG_MMU
51928 @@ -106630,7 +130735,7 @@ index 21a6e96..25820d8 100644
51929 extern void arch_pick_mmap_layout(struct mm_struct *mm);
51930 extern unsigned long
51931 arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
51932 -@@ -769,6 +783,17 @@ struct signal_struct {
51933 +@@ -773,6 +787,17 @@ struct signal_struct {
51934 #ifdef CONFIG_TASKSTATS
51935 struct taskstats *stats;
51936 #endif
51937 @@ -106648,7 +130753,7 @@ index 21a6e96..25820d8 100644
51938 #ifdef CONFIG_AUDIT
51939 unsigned audit_tty;
51940 unsigned audit_tty_log_passwd;
51941 -@@ -783,7 +808,7 @@ struct signal_struct {
51942 +@@ -787,7 +812,7 @@ struct signal_struct {
51943 struct mutex cred_guard_mutex; /* guard against foreign influences on
51944 * credential calculations
51945 * (notably. ptrace) */
51946 @@ -106657,14 +130762,7 @@ index 21a6e96..25820d8 100644
51947
51948 /*
51949 * Bits in flags field of signal_struct.
51950 -@@ -831,12 +856,21 @@ struct user_struct {
51951 - #endif
51952 - unsigned long locked_shm; /* How many pages of mlocked shm ? */
51953 - unsigned long unix_inflight; /* How many files in flight in unix sockets */
51954 -+ atomic_long_t pipe_bufs; /* how many pages are allocated in pipe buffers */
51955 -
51956 - #ifdef CONFIG_KEYS
51957 - struct key *uid_keyring; /* UID specific keyring */
51958 +@@ -842,6 +867,14 @@ struct user_struct {
51959 struct key *session_keyring; /* UID's default session keyring */
51960 #endif
51961
51962 @@ -106679,7 +130777,7 @@ index 21a6e96..25820d8 100644
51963 /* Hash table maintenance information */
51964 struct hlist_node uidhash_node;
51965 kuid_t uid;
51966 -@@ -844,7 +878,7 @@ struct user_struct {
51967 +@@ -849,7 +882,7 @@ struct user_struct {
51968 #if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL)
51969 atomic_long_t locked_vm;
51970 #endif
51971 @@ -106688,7 +130786,7 @@ index 21a6e96..25820d8 100644
51972
51973 extern int uids_sysfs_init(void);
51974
51975 -@@ -1379,6 +1413,9 @@ struct tlbflush_unmap_batch {
51976 +@@ -1389,6 +1422,9 @@ struct tlbflush_unmap_batch {
51977 struct task_struct {
51978 volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
51979 void *stack;
51980 @@ -106698,7 +130796,7 @@ index 21a6e96..25820d8 100644
51981 atomic_t usage;
51982 unsigned int flags; /* per process flags, defined below */
51983 unsigned int ptrace;
51984 -@@ -1514,8 +1551,8 @@ struct task_struct {
51985 +@@ -1524,8 +1560,8 @@ struct task_struct {
51986 struct list_head thread_node;
51987
51988 struct completion *vfork_done; /* for vfork() */
51989 @@ -106709,7 +130807,7 @@ index 21a6e96..25820d8 100644
51990
51991 cputime_t utime, stime, utimescaled, stimescaled;
51992 cputime_t gtime;
51993 -@@ -1538,11 +1575,6 @@ struct task_struct {
51994 +@@ -1551,11 +1587,6 @@ struct task_struct {
51995 struct task_cputime cputime_expires;
51996 struct list_head cpu_timers[3];
51997
51998 @@ -106721,7 +130819,7 @@ index 21a6e96..25820d8 100644
51999 char comm[TASK_COMM_LEN]; /* executable name excluding path
52000 - access with [gs]et_task_comm (which lock
52001 it with task_lock())
52002 -@@ -1558,6 +1590,8 @@ struct task_struct {
52003 +@@ -1571,6 +1602,8 @@ struct task_struct {
52004 /* hung task detection */
52005 unsigned long last_switch_count;
52006 #endif
52007 @@ -106730,8 +130828,8 @@ index 21a6e96..25820d8 100644
52008 /* filesystem information */
52009 struct fs_struct *fs;
52010 /* open file information */
52011 -@@ -1632,6 +1666,10 @@ struct task_struct {
52012 - gfp_t lockdep_reclaim_gfp;
52013 +@@ -1648,6 +1681,10 @@ struct task_struct {
52014 + unsigned int in_ubsan;
52015 #endif
52016
52017 +/* process credentials */
52018 @@ -106741,7 +130839,7 @@ index 21a6e96..25820d8 100644
52019 /* journalling filesystem info */
52020 void *journal_info;
52021
52022 -@@ -1670,6 +1708,10 @@ struct task_struct {
52023 +@@ -1686,6 +1723,10 @@ struct task_struct {
52024 /* cg_list protected by css_set_lock and tsk->alloc_lock */
52025 struct list_head cg_list;
52026 #endif
52027 @@ -106752,7 +130850,7 @@ index 21a6e96..25820d8 100644
52028 #ifdef CONFIG_FUTEX
52029 struct robust_list_head __user *robust_list;
52030 #ifdef CONFIG_COMPAT
52031 -@@ -1785,7 +1827,7 @@ struct task_struct {
52032 +@@ -1801,7 +1842,7 @@ struct task_struct {
52033 * Number of functions that haven't been traced
52034 * because of depth overrun.
52035 */
52036 @@ -106761,7 +130859,7 @@ index 21a6e96..25820d8 100644
52037 /* Pause for the tracing */
52038 atomic_t tracing_graph_pause;
52039 #endif
52040 -@@ -1814,22 +1856,89 @@ struct task_struct {
52041 +@@ -1830,22 +1871,89 @@ struct task_struct {
52042 unsigned long task_state_change;
52043 #endif
52044 int pagefault_disabled;
52045 @@ -106861,7 +130959,7 @@ index 21a6e96..25820d8 100644
52046 /* Future-safe accessor for struct task_struct's cpus_allowed. */
52047 #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
52048
52049 -@@ -1911,7 +2020,7 @@ struct pid_namespace;
52050 +@@ -1927,7 +2035,7 @@ struct pid_namespace;
52051 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
52052 struct pid_namespace *ns);
52053
52054 @@ -106870,7 +130968,7 @@ index 21a6e96..25820d8 100644
52055 {
52056 return tsk->pid;
52057 }
52058 -@@ -2273,6 +2382,25 @@ extern u64 sched_clock_cpu(int cpu);
52059 +@@ -2289,6 +2397,25 @@ extern u64 sched_clock_cpu(int cpu);
52060
52061 extern void sched_clock_init(void);
52062
52063 @@ -106896,7 +130994,7 @@ index 21a6e96..25820d8 100644
52064 #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
52065 static inline void sched_clock_tick(void)
52066 {
52067 -@@ -2401,7 +2529,9 @@ extern void set_curr_task(int cpu, struct task_struct *p);
52068 +@@ -2417,7 +2544,9 @@ extern void set_curr_task(int cpu, struct task_struct *p);
52069 void yield(void);
52070
52071 union thread_union {
52072 @@ -106906,7 +131004,7 @@ index 21a6e96..25820d8 100644
52073 unsigned long stack[THREAD_SIZE/sizeof(long)];
52074 };
52075
52076 -@@ -2434,6 +2564,7 @@ extern struct pid_namespace init_pid_ns;
52077 +@@ -2450,6 +2579,7 @@ extern struct pid_namespace init_pid_ns;
52078 */
52079
52080 extern struct task_struct *find_task_by_vpid(pid_t nr);
52081 @@ -106914,7 +131012,7 @@ index 21a6e96..25820d8 100644
52082 extern struct task_struct *find_task_by_pid_ns(pid_t nr,
52083 struct pid_namespace *ns);
52084
52085 -@@ -2465,7 +2596,7 @@ extern void proc_caches_init(void);
52086 +@@ -2481,7 +2611,7 @@ extern void proc_caches_init(void);
52087 extern void flush_signals(struct task_struct *);
52088 extern void ignore_signals(struct task_struct *);
52089 extern void flush_signal_handlers(struct task_struct *, int force_default);
52090 @@ -106923,7 +131021,7 @@ index 21a6e96..25820d8 100644
52091
52092 static inline int kernel_dequeue_signal(siginfo_t *info)
52093 {
52094 -@@ -2619,7 +2750,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
52095 +@@ -2635,7 +2765,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
52096 extern void exit_itimers(struct signal_struct *);
52097 extern void flush_itimer_signals(void);
52098
52099 @@ -106932,7 +131030,7 @@ index 21a6e96..25820d8 100644
52100
52101 extern int do_execve(struct filename *,
52102 const char __user * const __user *,
52103 -@@ -2734,11 +2865,13 @@ static inline int thread_group_empty(struct task_struct *p)
52104 +@@ -2750,11 +2880,13 @@ static inline int thread_group_empty(struct task_struct *p)
52105 * It must not be nested with write_lock_irq(&tasklist_lock),
52106 * neither inside nor outside.
52107 */
52108 @@ -106946,7 +131044,7 @@ index 21a6e96..25820d8 100644
52109 static inline void task_unlock(struct task_struct *p)
52110 {
52111 spin_unlock(&p->alloc_lock);
52112 -@@ -2824,9 +2957,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
52113 +@@ -2840,9 +2972,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
52114 #define task_stack_end_corrupted(task) \
52115 (*(end_of_stack(task)) != STACK_END_MAGIC)
52116
52117 @@ -106984,7 +131082,7 @@ index 49a35d6..c6209dd 100644
52118 #define SCIF_OPEN_FAILED ((scif_epd_t)-1)
52119 #define SCIF_REGISTER_FAILED ((off_t)-1)
52120 diff --git a/include/linux/security.h b/include/linux/security.h
52121 -index 2f4c1f7..5bc05d7 100644
52122 +index 4824a4c..1fe498a 100644
52123 --- a/include/linux/security.h
52124 +++ b/include/linux/security.h
52125 @@ -28,6 +28,7 @@
52126 @@ -107136,7 +131234,7 @@ index e058210..386666a 100644
52127 {
52128 spin_unlock(&sl->lock);
52129 diff --git a/include/linux/shm.h b/include/linux/shm.h
52130 -index 6fb8016..2cf60e7 100644
52131 +index 04e8818..af85805 100644
52132 --- a/include/linux/shm.h
52133 +++ b/include/linux/shm.h
52134 @@ -22,7 +22,11 @@ struct shmid_kernel /* private to the kernel */
52135 @@ -107166,10 +131264,10 @@ index 92557bb..53fa513 100644
52136
52137 static inline void disallow_signal(int sig)
52138 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
52139 -index 4fde618..6d6edb3 100644
52140 +index d3fcd45..67f86da 100644
52141 --- a/include/linux/skbuff.h
52142 +++ b/include/linux/skbuff.h
52143 -@@ -809,7 +809,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
52144 +@@ -889,7 +889,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
52145 int node);
52146 struct sk_buff *__build_skb(void *data, unsigned int frag_size);
52147 struct sk_buff *build_skb(void *data, unsigned int frag_size);
52148 @@ -107178,7 +131276,7 @@ index 4fde618..6d6edb3 100644
52149 gfp_t priority)
52150 {
52151 return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
52152 -@@ -2104,7 +2104,7 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb)
52153 +@@ -2186,7 +2186,7 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb)
52154 return skb->csum_start - skb_headroom(skb);
52155 }
52156
52157 @@ -107187,7 +131285,7 @@ index 4fde618..6d6edb3 100644
52158 {
52159 return skb_transport_header(skb) - skb->data;
52160 }
52161 -@@ -2119,7 +2119,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
52162 +@@ -2201,7 +2201,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
52163 return skb->inner_transport_header - skb->inner_network_header;
52164 }
52165
52166 @@ -107196,7 +131294,7 @@ index 4fde618..6d6edb3 100644
52167 {
52168 return skb_network_header(skb) - skb->data;
52169 }
52170 -@@ -2179,7 +2179,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
52171 +@@ -2261,7 +2261,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
52172 * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
52173 */
52174 #ifndef NET_SKB_PAD
52175 @@ -107205,7 +131303,7 @@ index 4fde618..6d6edb3 100644
52176 #endif
52177
52178 int ___pskb_trim(struct sk_buff *skb, unsigned int len);
52179 -@@ -2836,9 +2836,9 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
52180 +@@ -2924,9 +2924,9 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
52181 int *err);
52182 unsigned int datagram_poll(struct file *file, struct socket *sock,
52183 struct poll_table_struct *wait);
52184 @@ -107217,7 +131315,7 @@ index 4fde618..6d6edb3 100644
52185 struct msghdr *msg, int size)
52186 {
52187 return skb_copy_datagram_iter(from, offset, &msg->msg_iter, size);
52188 -@@ -3367,6 +3367,9 @@ static inline void nf_reset(struct sk_buff *skb)
52189 +@@ -3455,6 +3455,9 @@ static inline void nf_reset(struct sk_buff *skb)
52190 nf_bridge_put(skb->nf_bridge);
52191 skb->nf_bridge = NULL;
52192 #endif
52193 @@ -107228,7 +131326,7 @@ index 4fde618..6d6edb3 100644
52194
52195 static inline void nf_reset_trace(struct sk_buff *skb)
52196 diff --git a/include/linux/slab.h b/include/linux/slab.h
52197 -index 2037a86..58fd323 100644
52198 +index 3627d5c..f3bd455 100644
52199 --- a/include/linux/slab.h
52200 +++ b/include/linux/slab.h
52201 @@ -15,14 +15,29 @@
52202 @@ -107261,7 +131359,7 @@ index 2037a86..58fd323 100644
52203 #define SLAB_HWCACHE_ALIGN 0x00002000UL /* Align objs on cache lines */
52204 #define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */
52205 #define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */
52206 -@@ -98,10 +113,13 @@
52207 +@@ -103,10 +118,13 @@
52208 * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.
52209 * Both make kfree a no-op.
52210 */
52211 @@ -107278,7 +131376,7 @@ index 2037a86..58fd323 100644
52212
52213 #include <linux/kmemleak.h>
52214 #include <linux/kasan.h>
52215 -@@ -143,6 +161,8 @@ void * __must_check krealloc(const void *, size_t, gfp_t);
52216 +@@ -148,6 +166,8 @@ void * __must_check krealloc(const void *, size_t, gfp_t);
52217 void kfree(const void *);
52218 void kzfree(const void *);
52219 size_t ksize(const void *);
52220 @@ -107287,7 +131385,7 @@ index 2037a86..58fd323 100644
52221
52222 /*
52223 * Some archs want to perform DMA into kmalloc caches and need a guaranteed
52224 -@@ -253,6 +273,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
52225 +@@ -258,6 +278,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
52226 extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
52227 #endif
52228
52229 @@ -107298,7 +131396,7 @@ index 2037a86..58fd323 100644
52230 /*
52231 * Figure out which kmalloc slab an allocation of a certain size
52232 * belongs to.
52233 -@@ -261,7 +285,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
52234 +@@ -266,7 +290,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
52235 * 2 = 129 .. 192 bytes
52236 * n = 2^(n-1)+1 .. 2^n
52237 */
52238 @@ -107307,7 +131405,7 @@ index 2037a86..58fd323 100644
52239 {
52240 if (!size)
52241 return 0;
52242 -@@ -304,7 +328,7 @@ static __always_inline int kmalloc_index(size_t size)
52243 +@@ -309,7 +333,7 @@ static __always_inline int kmalloc_index(size_t size)
52244 }
52245 #endif /* !CONFIG_SLOB */
52246
52247 @@ -107316,7 +131414,7 @@ index 2037a86..58fd323 100644
52248 void *kmem_cache_alloc(struct kmem_cache *, gfp_t flags) __assume_slab_alignment;
52249 void kmem_cache_free(struct kmem_cache *, void *);
52250
52251 -@@ -319,10 +343,10 @@ void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **);
52252 +@@ -324,10 +348,10 @@ void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **);
52253 int kmem_cache_alloc_bulk(struct kmem_cache *, gfp_t, size_t, void **);
52254
52255 #ifdef CONFIG_NUMA
52256 @@ -107330,7 +131428,7 @@ index 2037a86..58fd323 100644
52257 return __kmalloc(size, flags);
52258 }
52259 diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
52260 -index 33d0490..70a6313 100644
52261 +index cf139d3fa..b3b3358 100644
52262 --- a/include/linux/slab_def.h
52263 +++ b/include/linux/slab_def.h
52264 @@ -40,7 +40,7 @@ struct kmem_cache {
52265 @@ -107362,7 +131460,7 @@ index 33d0490..70a6313 100644
52266 /*
52267 * If debugging is enabled, then the allocator can add additional
52268 diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
52269 -index 3388511..6252f90 100644
52270 +index b7e57927..a8087e0 100644
52271 --- a/include/linux/slub_def.h
52272 +++ b/include/linux/slub_def.h
52273 @@ -74,7 +74,7 @@ struct kmem_cache {
52274 @@ -107389,13 +131487,13 @@ index c441407..f487b83 100644
52275 /*
52276 * Callback to arch code if there's nosmp or maxcpus=0 on the
52277 diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
52278 -index fddebc6..6f0ae39 100644
52279 +index 4018b48..68baf26 100644
52280 --- a/include/linux/sock_diag.h
52281 +++ b/include/linux/sock_diag.h
52282 -@@ -15,7 +15,7 @@ struct sock_diag_handler {
52283 - __u8 family;
52284 +@@ -16,7 +16,7 @@ struct sock_diag_handler {
52285 int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
52286 int (*get_info)(struct sk_buff *skb, struct sock *sk);
52287 + int (*destroy)(struct sk_buff *skb, struct nlmsghdr *nlh);
52288 -};
52289 +} __do_const;
52290
52291 @@ -107581,11 +131679,11 @@ index cc0fc71..b70c6b1 100644
52292 /*
52293 * Mode for mapping cpus to pools.
52294 diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
52295 -index f869807..6ab4834 100644
52296 +index 5322fea..b8ca311 100644
52297 --- a/include/linux/sunrpc/svc_rdma.h
52298 +++ b/include/linux/sunrpc/svc_rdma.h
52299 -@@ -53,15 +53,15 @@ extern unsigned int svcrdma_ord;
52300 - extern unsigned int svcrdma_max_requests;
52301 +@@ -54,15 +54,15 @@ extern unsigned int svcrdma_max_requests;
52302 + extern unsigned int svcrdma_max_bc_requests;
52303 extern unsigned int svcrdma_max_req_size;
52304
52305 -extern atomic_t rdma_stat_recv;
52306 @@ -107610,10 +131708,10 @@ index f869807..6ab4834 100644
52307 /*
52308 * Contexts are built when an RDMA request is created and are a
52309 diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
52310 -index 8d71d65..f79586e 100644
52311 +index c00f53a..8802c3b 100644
52312 --- a/include/linux/sunrpc/svcauth.h
52313 +++ b/include/linux/sunrpc/svcauth.h
52314 -@@ -120,7 +120,7 @@ struct auth_ops {
52315 +@@ -127,7 +127,7 @@ struct auth_ops {
52316 int (*release)(struct svc_rqst *rq);
52317 void (*domain_release)(struct auth_domain *);
52318 int (*set_client)(struct svc_rqst *rq);
52319 @@ -107663,10 +131761,10 @@ index 5c3a5f3..84a8bef 100644
52320 #else
52321
52322 diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
52323 -index e7a018e..49f8b17 100644
52324 +index 017fced..d4a9fc9 100644
52325 --- a/include/linux/swiotlb.h
52326 +++ b/include/linux/swiotlb.h
52327 -@@ -60,7 +60,8 @@ extern void
52328 +@@ -63,7 +63,8 @@ extern void
52329
52330 extern void
52331 swiotlb_free_coherent(struct device *hwdev, size_t size,
52332 @@ -107677,7 +131775,7 @@ index e7a018e..49f8b17 100644
52333 extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
52334 unsigned long offset, size_t size,
52335 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
52336 -index c2b66a2..888e225 100644
52337 +index 185815c..9901529 100644
52338 --- a/include/linux/syscalls.h
52339 +++ b/include/linux/syscalls.h
52340 @@ -102,7 +102,12 @@ union bpf_attr;
52341 @@ -107694,7 +131792,30 @@ index c2b66a2..888e225 100644
52342 #define __SC_CAST(t, a) (t) a
52343 #define __SC_ARGS(t, a) a
52344 #define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long))
52345 -@@ -384,11 +389,11 @@ asmlinkage long sys_sync(void);
52346 +@@ -192,17 +197,18 @@ extern struct trace_event_functions exit_syscall_print_funcs;
52347 +
52348 + #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__)
52349 + #define __SYSCALL_DEFINEx(x, name, ...) \
52350 +- asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
52351 +- __attribute__((alias(__stringify(SyS##name)))); \
52352 + static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
52353 +- asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
52354 +- asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
52355 ++ static inline asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
52356 + { \
52357 + long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \
52358 + __MAP(x,__SC_TEST,__VA_ARGS__); \
52359 + __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
52360 + return ret; \
52361 + } \
52362 ++ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
52363 ++ { \
52364 ++ return SyS##name(__MAP(x,__SC_ARGS,__VA_ARGS__)); \
52365 ++ } \
52366 + static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
52367 +
52368 + asmlinkage long sys32_quotactl(unsigned int cmd, const char __user *special,
52369 +@@ -384,11 +390,11 @@ asmlinkage long sys_sync(void);
52370 asmlinkage long sys_fsync(unsigned int fd);
52371 asmlinkage long sys_fdatasync(unsigned int fd);
52372 asmlinkage long sys_bdflush(int func, long data);
52373 @@ -107710,7 +131831,7 @@ index c2b66a2..888e225 100644
52374 asmlinkage long sys_truncate(const char __user *path, long length);
52375 asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
52376 asmlinkage long sys_stat(const char __user *filename,
52377 -@@ -604,7 +609,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
52378 +@@ -604,7 +610,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
52379 asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
52380 asmlinkage long sys_send(int, void __user *, size_t, unsigned);
52381 asmlinkage long sys_sendto(int, void __user *, size_t, unsigned,
52382 @@ -107719,7 +131840,7 @@ index c2b66a2..888e225 100644
52383 asmlinkage long sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned flags);
52384 asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg,
52385 unsigned int vlen, unsigned flags);
52386 -@@ -663,10 +668,10 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf);
52387 +@@ -663,10 +669,10 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf);
52388
52389 asmlinkage long sys_semget(key_t key, int nsems, int semflg);
52390 asmlinkage long sys_semop(int semid, struct sembuf __user *sops,
52391 @@ -107732,7 +131853,16 @@ index c2b66a2..888e225 100644
52392 const struct timespec __user *timeout);
52393 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
52394 asmlinkage long sys_shmget(key_t key, size_t size, int flag);
52395 -@@ -879,7 +884,7 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
52396 +@@ -700,7 +706,7 @@ asmlinkage long sys_sysfs(int option,
52397 + unsigned long arg1, unsigned long arg2);
52398 + asmlinkage long sys_syslog(int type, char __user *buf, int len);
52399 + asmlinkage long sys_uselib(const char __user *library);
52400 +-asmlinkage long sys_ni_syscall(void);
52401 ++asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
52402 + asmlinkage long sys_ptrace(long request, long pid, unsigned long addr,
52403 + unsigned long data);
52404 +
52405 +@@ -879,7 +885,7 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
52406 const char __user *uargs);
52407 asmlinkage long sys_getrandom(char __user *buf, size_t count,
52408 unsigned int flags);
52409 @@ -107890,10 +132020,10 @@ index b386361..cc87028 100644
52410 unsigned int keepalive_intvl; /* time interval between keep alive probes */
52411
52412 diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
52413 -index ff307b5..f1a4468 100644
52414 +index b4c2a48..0a13f65 100644
52415 --- a/include/linux/thread_info.h
52416 +++ b/include/linux/thread_info.h
52417 -@@ -145,6 +145,13 @@ static inline bool test_and_clear_restore_sigmask(void)
52418 +@@ -146,6 +146,13 @@ static inline bool test_and_clear_restore_sigmask(void)
52419 #error "no set_restore_sigmask() provided and default one won't work"
52420 #endif
52421
52422 @@ -107908,7 +132038,7 @@ index ff307b5..f1a4468 100644
52423
52424 #endif /* _LINUX_THREAD_INFO_H */
52425 diff --git a/include/linux/tty.h b/include/linux/tty.h
52426 -index 3bf03b6..340cab9 100644
52427 +index 19199c2..e16a361 100644
52428 --- a/include/linux/tty.h
52429 +++ b/include/linux/tty.h
52430 @@ -225,7 +225,7 @@ struct tty_port {
52431 @@ -107929,7 +132059,7 @@ index 3bf03b6..340cab9 100644
52432
52433 /* Each of a tty's open files has private_data pointing to tty_file_private */
52434 struct tty_file_private {
52435 -@@ -575,7 +575,7 @@ extern int tty_port_open(struct tty_port *port,
52436 +@@ -570,7 +570,7 @@ extern int tty_port_open(struct tty_port *port,
52437 struct tty_struct *tty, struct file *filp);
52438 static inline int tty_port_users(struct tty_port *port)
52439 {
52440 @@ -108005,17 +132135,18 @@ index 70dd3df..c61727f 100644
52441
52442 struct list_head {
52443 diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
52444 -index 558129a..0c26e08 100644
52445 +index 3495578..f479218 100644
52446 --- a/include/linux/uaccess.h
52447 +++ b/include/linux/uaccess.h
52448 -@@ -109,6 +109,6 @@ extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count);
52449 +@@ -109,7 +109,7 @@ extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count);
52450 * Returns 0 on success, or -EFAULT.
52451 */
52452 #define probe_kernel_address(addr, retval) \
52453 - probe_kernel_read(&retval, addr, sizeof(retval))
52454 + probe_kernel_read(&(retval), addr, sizeof(retval))
52455
52456 - #endif /* __LINUX_UACCESS_H__ */
52457 + #ifndef user_access_begin
52458 + #define user_access_begin() do { } while (0)
52459 diff --git a/include/linux/uidgid.h b/include/linux/uidgid.h
52460 index 0383552..a0125dd 100644
52461 --- a/include/linux/uidgid.h
52462 @@ -108095,7 +132226,7 @@ index 99c1b4d..562e6f3 100644
52463
52464 static inline void put_unaligned_le16(u16 val, void *p)
52465 diff --git a/include/linux/usb.h b/include/linux/usb.h
52466 -index b79925d..67cf5d4 100644
52467 +index 89533ba..78c419a 100644
52468 --- a/include/linux/usb.h
52469 +++ b/include/linux/usb.h
52470 @@ -367,7 +367,7 @@ struct usb_bus {
52471 @@ -108107,7 +132238,7 @@ index b79925d..67cf5d4 100644
52472
52473 int devnum_next; /* Next open device number in
52474 * round-robin allocation */
52475 -@@ -600,7 +600,7 @@ struct usb_device {
52476 +@@ -598,7 +598,7 @@ struct usb_device {
52477 int maxchild;
52478
52479 u32 quirks;
52480 @@ -108116,7 +132247,7 @@ index b79925d..67cf5d4 100644
52481
52482 unsigned long active_duration;
52483
52484 -@@ -1793,10 +1793,10 @@ void usb_sg_wait(struct usb_sg_request *io);
52485 +@@ -1791,10 +1791,10 @@ void usb_sg_wait(struct usb_sg_request *io);
52486
52487 /* NOTE: these are not the standard USB_ENDPOINT_XFER_* values!! */
52488 /* (yet ... they're the values used by usbfs) */
52489 @@ -108132,7 +132263,7 @@ index b79925d..67cf5d4 100644
52490 #define usb_pipein(pipe) ((pipe) & USB_DIR_IN)
52491 #define usb_pipeout(pipe) (!usb_pipein(pipe))
52492 diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
52493 -index f89c24b..843dfb8 100644
52494 +index 4dcf844..03630b4 100644
52495 --- a/include/linux/usb/hcd.h
52496 +++ b/include/linux/usb/hcd.h
52497 @@ -23,6 +23,7 @@
52498 @@ -108144,7 +132275,7 @@ index f89c24b..843dfb8 100644
52499 #define MAX_TOPO_LEVEL 6
52500
52501 diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
52502 -index bfb7472..b308c8d 100644
52503 +index 4db191f..188ca98 100644
52504 --- a/include/linux/usb/renesas_usbhs.h
52505 +++ b/include/linux/usb/renesas_usbhs.h
52506 @@ -39,7 +39,7 @@ enum {
52507 @@ -108259,10 +132390,10 @@ index 69e1d4a1..566fa52 100644
52508 #endif
52509 #endif /* _LINUX_VGA_SWITCHEROO_H_ */
52510 diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
52511 -index 3bff87a..66d8171 100644
52512 +index d1f1d33..10415f2 100644
52513 --- a/include/linux/vmalloc.h
52514 +++ b/include/linux/vmalloc.h
52515 -@@ -18,6 +18,14 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
52516 +@@ -17,6 +17,14 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
52517 #define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */
52518 #define VM_NO_GUARD 0x00000040 /* don't add guard page */
52519 #define VM_KASAN 0x00000080 /* has allocated kasan shadow memory */
52520 @@ -108277,7 +132408,7 @@ index 3bff87a..66d8171 100644
52521 /* bits [20..32] reserved for arch specific ioremap internals */
52522
52523 /*
52524 -@@ -67,6 +75,7 @@ static inline void vmalloc_init(void)
52525 +@@ -66,6 +74,7 @@ static inline void vmalloc_init(void)
52526 #endif
52527
52528 extern void *vmalloc(unsigned long size);
52529 @@ -108285,7 +132416,7 @@ index 3bff87a..66d8171 100644
52530 extern void *vzalloc(unsigned long size);
52531 extern void *vmalloc_user(unsigned long size);
52532 extern void *vmalloc_node(unsigned long size, int node);
52533 -@@ -86,6 +95,10 @@ extern void *vmap(struct page **pages, unsigned int count,
52534 +@@ -85,6 +94,10 @@ extern void *vmap(struct page **pages, unsigned int count,
52535 unsigned long flags, pgprot_t prot);
52536 extern void vunmap(const void *addr);
52537
52538 @@ -108296,7 +132427,7 @@ index 3bff87a..66d8171 100644
52539 extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,
52540 unsigned long uaddr, void *kaddr,
52541 unsigned long size);
52542 -@@ -150,7 +163,7 @@ extern void free_vm_area(struct vm_struct *area);
52543 +@@ -149,7 +162,7 @@ extern void free_vm_area(struct vm_struct *area);
52544
52545 /* for /dev/kmem */
52546 extern long vread(char *buf, char *addr, unsigned long count);
52547 @@ -108306,7 +132437,7 @@ index 3bff87a..66d8171 100644
52548 /*
52549 * Internals. Dont't use..
52550 diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
52551 -index 3e5d907..037e86c 100644
52552 +index 73fae8c..61f415d 100644
52553 --- a/include/linux/vmstat.h
52554 +++ b/include/linux/vmstat.h
52555 @@ -108,18 +108,18 @@ static inline void vm_events_fold_cpu(int cpu)
52556 @@ -108355,7 +132486,7 @@ index 3e5d907..037e86c 100644
52557
52558 #ifdef CONFIG_SMP
52559 int cpu;
52560 -@@ -212,14 +212,14 @@ static inline void __mod_zone_page_state(struct zone *zone,
52561 +@@ -213,14 +213,14 @@ static inline void __mod_zone_page_state(struct zone *zone,
52562
52563 static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
52564 {
52565 @@ -108390,10 +132521,10 @@ index d0b5ca5..c13529b 100644
52566 spin_unlock(&inode->i_lock);
52567 }
52568 diff --git a/include/linux/xattr.h b/include/linux/xattr.h
52569 -index 89474b9..31b5dcb 100644
52570 +index 4457541..cb0d355 100644
52571 --- a/include/linux/xattr.h
52572 +++ b/include/linux/xattr.h
52573 -@@ -30,7 +30,7 @@ struct xattr_handler {
52574 +@@ -34,7 +34,7 @@ struct xattr_handler {
52575 int (*set)(const struct xattr_handler *, struct dentry *dentry,
52576 const char *name, const void *buffer, size_t size,
52577 int flags);
52578 @@ -108402,7 +132533,7 @@ index 89474b9..31b5dcb 100644
52579
52580 const char *xattr_full_name(const struct xattr_handler *, const char *);
52581
52582 -@@ -41,6 +41,9 @@ struct xattr {
52583 +@@ -45,6 +45,9 @@ struct xattr {
52584 };
52585
52586 ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);
52587 @@ -108434,7 +132565,7 @@ index 92dbbd3..13ab0b3 100644
52588 Returns the number of bytes that needs to be allocated for a per-
52589 stream workspace with the specified parameters. A pointer to this
52590 diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
52591 -index acbcd2f..c3abe84 100644
52592 +index eeabf20..817154b 100644
52593 --- a/include/media/v4l2-dev.h
52594 +++ b/include/media/v4l2-dev.h
52595 @@ -74,7 +74,7 @@ struct v4l2_file_operations {
52596 @@ -108486,10 +132617,10 @@ index 9b4c418..f3ff431 100644
52597 #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
52598
52599 diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
52600 -index 5289929..b4c41b3 100644
52601 +index 5ee3c68..54f883a 100644
52602 --- a/include/net/bluetooth/l2cap.h
52603 +++ b/include/net/bluetooth/l2cap.h
52604 -@@ -613,7 +613,7 @@ struct l2cap_ops {
52605 +@@ -619,7 +619,7 @@ struct l2cap_ops {
52606 struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
52607 unsigned long hdr_len,
52608 unsigned long len, int nb);
52609 @@ -108499,10 +132630,10 @@ index 5289929..b4c41b3 100644
52610 struct l2cap_conn {
52611 struct hci_conn *hcon;
52612 diff --git a/include/net/bonding.h b/include/net/bonding.h
52613 -index 93abe5f..65b0405 100644
52614 +index 791800d..db75e5f 100644
52615 --- a/include/net/bonding.h
52616 +++ b/include/net/bonding.h
52617 -@@ -669,7 +669,7 @@ extern struct rtnl_link_ops bond_link_ops;
52618 +@@ -702,7 +702,7 @@ extern struct rtnl_link_ops bond_link_ops;
52619
52620 static inline void bond_tx_drop(struct net_device *dev, struct sk_buff *skb)
52621 {
52622 @@ -108535,6 +132666,55 @@ index f2ae33d..c457cf0 100644
52623 struct list_head list;
52624 /* Protects from simultaneous access to first_req list */
52625 spinlock_t info_list_lock;
52626 +diff --git a/include/net/cfg80211-wext.h b/include/net/cfg80211-wext.h
52627 +index 25baddc..f9a1374 100644
52628 +--- a/include/net/cfg80211-wext.h
52629 ++++ b/include/net/cfg80211-wext.h
52630 +@@ -22,34 +22,34 @@
52631 + */
52632 + int cfg80211_wext_giwname(struct net_device *dev,
52633 + struct iw_request_info *info,
52634 +- char *name, char *extra);
52635 ++ union iwreq_data *wrqu, char *extra);
52636 + int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
52637 +- u32 *mode, char *extra);
52638 ++ union iwreq_data *wrqu, char *extra);
52639 + int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
52640 +- u32 *mode, char *extra);
52641 ++ union iwreq_data *wrqu, char *extra);
52642 + int cfg80211_wext_siwscan(struct net_device *dev,
52643 + struct iw_request_info *info,
52644 + union iwreq_data *wrqu, char *extra);
52645 + int cfg80211_wext_giwscan(struct net_device *dev,
52646 + struct iw_request_info *info,
52647 +- struct iw_point *data, char *extra);
52648 ++ union iwreq_data *wrqu, char *extra);
52649 + int cfg80211_wext_giwrange(struct net_device *dev,
52650 + struct iw_request_info *info,
52651 +- struct iw_point *data, char *extra);
52652 ++ union iwreq_data *wrqu, char *extra);
52653 + int cfg80211_wext_siwrts(struct net_device *dev,
52654 + struct iw_request_info *info,
52655 +- struct iw_param *rts, char *extra);
52656 ++ union iwreq_data *wrqu, char *extra);
52657 + int cfg80211_wext_giwrts(struct net_device *dev,
52658 + struct iw_request_info *info,
52659 +- struct iw_param *rts, char *extra);
52660 ++ union iwreq_data *wrqu, char *extra);
52661 + int cfg80211_wext_siwfrag(struct net_device *dev,
52662 + struct iw_request_info *info,
52663 +- struct iw_param *frag, char *extra);
52664 ++ union iwreq_data *wrqu, char *extra);
52665 + int cfg80211_wext_giwfrag(struct net_device *dev,
52666 + struct iw_request_info *info,
52667 +- struct iw_param *frag, char *extra);
52668 ++ union iwreq_data *wrqu, char *extra);
52669 + int cfg80211_wext_giwretry(struct net_device *dev,
52670 + struct iw_request_info *info,
52671 +- struct iw_param *retry, char *extra);
52672 ++ union iwreq_data *wrqu, char *extra);
52673 +
52674 + #endif /* __NET_CFG80211_WEXT_H */
52675 diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
52676 index 171cd76..15666d6 100644
52677 --- a/include/net/cfg802154.h
52678 @@ -108548,6 +132728,27 @@ index 171cd76..15666d6 100644
52679
52680 u8 min_be;
52681 u8 max_be;
52682 +diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
52683 +index 59160de..f4dbdab 100644
52684 +--- a/include/net/fib_rules.h
52685 ++++ b/include/net/fib_rules.h
52686 +@@ -7,6 +7,7 @@
52687 + #include <linux/fib_rules.h>
52688 + #include <net/flow.h>
52689 + #include <net/rtnetlink.h>
52690 ++#include <net/ip6_fib.h>
52691 +
52692 + struct fib_rule {
52693 + struct list_head list;
52694 +@@ -33,7 +34,7 @@ struct fib_rule {
52695 + };
52696 +
52697 + struct fib_lookup_arg {
52698 +- void *lookup_ptr;
52699 ++ pol_lookup_t lookup_ptr;
52700 + void *result;
52701 + struct fib_rule *rule;
52702 + int flags;
52703 diff --git a/include/net/flow.h b/include/net/flow.h
52704 index 83969ee..ee0611d 100644
52705 --- a/include/net/flow.h
52706 @@ -108562,10 +132763,10 @@ index 83969ee..ee0611d 100644
52707 __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys);
52708
52709 diff --git a/include/net/genetlink.h b/include/net/genetlink.h
52710 -index 1b6b6dc..f6e691b 100644
52711 +index 43c0e77..9f17774 100644
52712 --- a/include/net/genetlink.h
52713 +++ b/include/net/genetlink.h
52714 -@@ -128,7 +128,7 @@ struct genl_ops {
52715 +@@ -130,7 +130,7 @@ struct genl_ops {
52716 u8 cmd;
52717 u8 internal_flags;
52718 u8 flags;
52719 @@ -108601,10 +132802,10 @@ index 49dcad4..6d2c708 100644
52720 /** inet_connection_sock - INET connection oriented sock
52721 *
52722 diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
52723 -index 625bdf9..5fd982c 100644
52724 +index 012b1f9..6467f81 100644
52725 --- a/include/net/inet_sock.h
52726 +++ b/include/net/inet_sock.h
52727 -@@ -43,7 +43,7 @@
52728 +@@ -44,7 +44,7 @@
52729 struct ip_options {
52730 __be32 faddr;
52731 __be32 nexthop;
52732 @@ -108640,7 +132841,7 @@ index 1a98f1c..2a44de6 100644
52733
52734 static inline void ip_select_ident_segs(struct net *net, struct sk_buff *skb,
52735 diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
52736 -index 3f98233..3d46645 100644
52737 +index 4079fc1..cb82cad 100644
52738 --- a/include/net/ip_fib.h
52739 +++ b/include/net/ip_fib.h
52740 @@ -174,7 +174,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
52741 @@ -108689,10 +132890,10 @@ index 0816c87..b86fca5 100644
52742 struct list_head est_list; /* estimator list */
52743 spinlock_t est_lock;
52744 diff --git a/include/net/ipv6.h b/include/net/ipv6.h
52745 -index 9a5c9f0..929c0e3 100644
52746 +index 6570f379..91cd2cb 100644
52747 --- a/include/net/ipv6.h
52748 +++ b/include/net/ipv6.h
52749 -@@ -756,7 +756,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
52750 +@@ -771,7 +771,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
52751 * to minimize possbility that any useful information to an
52752 * attacker is leaked. Only lower 20 bits are relevant.
52753 */
52754 @@ -108713,6 +132914,67 @@ index 8d4f588..2e37ad2 100644
52755
52756 #include <net/irda/irias_object.h>
52757 #include <net/irda/ircomm_core.h>
52758 +diff --git a/include/net/irda/irias_object.h b/include/net/irda/irias_object.h
52759 +index 83f7808..a925cf8 100644
52760 +--- a/include/net/irda/irias_object.h
52761 ++++ b/include/net/irda/irias_object.h
52762 +@@ -83,7 +83,7 @@ void irias_insert_object(struct ias_object *obj);
52763 + int irias_delete_object(struct ias_object *obj);
52764 + int irias_delete_attrib(struct ias_object *obj, struct ias_attrib *attrib,
52765 + int cleanobject);
52766 +-void __irias_delete_object(struct ias_object *obj);
52767 ++void __irias_delete_object(void *_obj);
52768 +
52769 + void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
52770 + int user);
52771 +diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
52772 +index f132924..f80b01d 100644
52773 +--- a/include/net/irda/irlmp.h
52774 ++++ b/include/net/irda/irlmp.h
52775 +@@ -194,6 +194,7 @@ struct irlmp_cb {
52776 + /* Prototype declarations */
52777 + int irlmp_init(void);
52778 + void irlmp_cleanup(void);
52779 ++void irlmp_kfree(void *arg);
52780 + struct lsap_cb *irlmp_open_lsap(__u8 slsap, notify_t *notify, __u8 pid);
52781 + void irlmp_close_lsap( struct lsap_cb *self);
52782 +
52783 +diff --git a/include/net/irda/irlmp_event.h b/include/net/irda/irlmp_event.h
52784 +index 9e4ec17..c3247bb 100644
52785 +--- a/include/net/irda/irlmp_event.h
52786 ++++ b/include/net/irda/irlmp_event.h
52787 +@@ -82,9 +82,9 @@ typedef enum {
52788 + extern const char *const irlmp_state[];
52789 + extern const char *const irlsap_state[];
52790 +
52791 +-void irlmp_watchdog_timer_expired(void *data);
52792 +-void irlmp_discovery_timer_expired(void *data);
52793 +-void irlmp_idle_timer_expired(void *data);
52794 ++void irlmp_watchdog_timer_expired(unsigned long data);
52795 ++void irlmp_discovery_timer_expired(unsigned long data);
52796 ++void irlmp_idle_timer_expired(unsigned long data);
52797 +
52798 + void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
52799 + struct sk_buff *skb);
52800 +diff --git a/include/net/irda/timer.h b/include/net/irda/timer.h
52801 +index cb2615c..8223ae7 100644
52802 +--- a/include/net/irda/timer.h
52803 ++++ b/include/net/irda/timer.h
52804 +@@ -72,12 +72,10 @@ struct lap_cb;
52805 +
52806 + #define WATCHDOG_TIMEOUT (20*HZ) /* 20 sec */
52807 +
52808 +-typedef void (*TIMER_CALLBACK)(void *);
52809 +-
52810 + static inline void irda_start_timer(struct timer_list *ptimer, int timeout,
52811 +- void* data, TIMER_CALLBACK callback)
52812 ++ void* data, void (*callback)(unsigned long))
52813 + {
52814 +- ptimer->function = (void (*)(unsigned long)) callback;
52815 ++ ptimer->function = callback;
52816 + ptimer->data = (unsigned long) data;
52817 +
52818 + /* Set new value for timer (update or add timer).
52819 diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
52820 index 714cc9a..ea05f3e 100644
52821 --- a/include/net/iucv/af_iucv.h
52822 @@ -108794,10 +133056,10 @@ index c4359e2..76dbc4a 100644
52823 struct llc_sap_state {
52824 u8 curr_state;
52825 diff --git a/include/net/mac80211.h b/include/net/mac80211.h
52826 -index 760bc4d..84e4550 100644
52827 +index 7c30faf..4c2d2d9 100644
52828 --- a/include/net/mac80211.h
52829 +++ b/include/net/mac80211.h
52830 -@@ -1497,7 +1497,7 @@ enum ieee80211_key_flags {
52831 +@@ -1501,7 +1501,7 @@ enum ieee80211_key_flags {
52832 * @iv_len: The IV length for this key type
52833 */
52834 struct ieee80211_key_conf {
52835 @@ -108806,7 +133068,7 @@ index 760bc4d..84e4550 100644
52836 u32 cipher;
52837 u8 icv_len;
52838 u8 iv_len;
52839 -@@ -5142,7 +5142,7 @@ struct ieee80211_tx_rate_control {
52840 +@@ -5198,7 +5198,7 @@ struct ieee80211_tx_rate_control {
52841 struct sk_buff *skb;
52842 struct ieee80211_tx_rate reported_rate;
52843 bool rts, short_preamble;
52844 @@ -108815,7 +133077,7 @@ index 760bc4d..84e4550 100644
52845 u32 rate_idx_mask;
52846 u8 *rate_idx_mcs_mask;
52847 bool bss;
52848 -@@ -5179,7 +5179,7 @@ struct rate_control_ops {
52849 +@@ -5235,7 +5235,7 @@ struct rate_control_ops {
52850 void (*remove_sta_debugfs)(void *priv, void *priv_sta);
52851
52852 u32 (*get_expected_throughput)(void *priv_sta);
52853 @@ -108856,7 +133118,7 @@ index 8b68384..48fe40e 100644
52854 enum {
52855 NEIGH_ARP_TABLE = 0,
52856 diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
52857 -index 2dcea63..31d53ba 100644
52858 +index 4089abc..bf8084a 100644
52859 --- a/include/net/net_namespace.h
52860 +++ b/include/net/net_namespace.h
52861 @@ -53,7 +53,7 @@ struct net {
52862 @@ -108868,7 +133130,7 @@ index 2dcea63..31d53ba 100644
52863
52864 struct list_head list; /* list of network namespaces */
52865 struct list_head cleanup_list; /* namespaces on death row */
52866 -@@ -138,8 +138,8 @@ struct net {
52867 +@@ -141,8 +141,8 @@ struct net {
52868 struct netns_mpls mpls;
52869 #endif
52870 struct sock *diag_nlsk;
52871 @@ -108879,7 +133141,7 @@ index 2dcea63..31d53ba 100644
52872
52873 #include <linux/seq_file_net.h>
52874
52875 -@@ -274,7 +274,11 @@ static inline struct net *read_pnet(const possible_net_t *pnet)
52876 +@@ -277,7 +277,11 @@ static inline struct net *read_pnet(const possible_net_t *pnet)
52877 #define __net_init __init
52878 #define __net_exit __exit_refok
52879 #define __net_initdata __initdata
52880 @@ -108891,7 +133153,7 @@ index 2dcea63..31d53ba 100644
52881 #endif
52882
52883 int peernet2id_alloc(struct net *net, struct net *peer);
52884 -@@ -289,7 +293,7 @@ struct pernet_operations {
52885 +@@ -292,7 +296,7 @@ struct pernet_operations {
52886 void (*exit_batch)(struct list_head *net_exit_list);
52887 int *id;
52888 size_t size;
52889 @@ -108900,7 +133162,7 @@ index 2dcea63..31d53ba 100644
52890
52891 /*
52892 * Use these carefully. If you implement a network device and it
52893 -@@ -337,12 +341,12 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
52894 +@@ -340,12 +344,12 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
52895
52896 static inline int rt_genid_ipv4(struct net *net)
52897 {
52898 @@ -108915,7 +133177,7 @@ index 2dcea63..31d53ba 100644
52899 }
52900
52901 extern void (*__fib6_flush_trees)(struct net *net);
52902 -@@ -369,12 +373,12 @@ static inline void rt_genid_bump_all(struct net *net)
52903 +@@ -372,12 +376,12 @@ static inline void rt_genid_bump_all(struct net *net)
52904
52905 static inline int fnhe_genid(struct net *net)
52906 {
52907 @@ -108930,26 +133192,19 @@ index 2dcea63..31d53ba 100644
52908 }
52909
52910 #endif /* __NET_NET_NAMESPACE_H */
52911 -diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
52912 -index 788ef58..62e17d1 100644
52913 ---- a/include/net/netfilter/nf_conntrack_core.h
52914 -+++ b/include/net/netfilter/nf_conntrack_core.h
52915 -@@ -79,12 +79,10 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
52916 - const struct nf_conntrack_l3proto *l3proto,
52917 - const struct nf_conntrack_l4proto *proto);
52918 -
52919 --#ifdef CONFIG_LOCKDEP
52920 --# define CONNTRACK_LOCKS 8
52921 --#else
52922 --# define CONNTRACK_LOCKS 1024
52923 --#endif
52924 -+#define CONNTRACK_LOCKS 1024
52925 -+
52926 - extern spinlock_t nf_conntrack_locks[CONNTRACK_LOCKS];
52927 -+void nf_conntrack_lock(spinlock_t *lock);
52928 -
52929 - extern spinlock_t nf_conntrack_expect_lock;
52930 -
52931 +diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
52932 +index fde4068..d11e09b 100644
52933 +--- a/include/net/netfilter/nf_conntrack.h
52934 ++++ b/include/net/netfilter/nf_conntrack.h
52935 +@@ -286,7 +286,7 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb)
52936 +
52937 + struct kernel_param;
52938 +
52939 +-int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
52940 ++int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp);
52941 + extern unsigned int nf_conntrack_htable_size;
52942 + extern unsigned int nf_conntrack_max;
52943 + extern unsigned int nf_conntrack_hash_rnd;
52944 diff --git a/include/net/netlink.h b/include/net/netlink.h
52945 index 0e31727..2f2b511 100644
52946 --- a/include/net/netlink.h
52947 @@ -108990,10 +133245,10 @@ index 723b61c..4386367 100644
52948 };
52949
52950 diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
52951 -index c68926b..106c147 100644
52952 +index 2b7907a..3de08ec 100644
52953 --- a/include/net/netns/ipv4.h
52954 +++ b/include/net/netns/ipv4.h
52955 -@@ -93,7 +93,7 @@ struct netns_ipv4 {
52956 +@@ -100,7 +100,7 @@ struct netns_ipv4 {
52957
52958 struct ping_group_range ping_group_range;
52959
52960 @@ -109002,7 +133257,7 @@ index c68926b..106c147 100644
52961
52962 #ifdef CONFIG_SYSCTL
52963 unsigned long *sysctl_local_reserved_ports;
52964 -@@ -107,6 +107,6 @@ struct netns_ipv4 {
52965 +@@ -114,6 +114,6 @@ struct netns_ipv4 {
52966 struct fib_rules_ops *mr_rules_ops;
52967 #endif
52968 #endif
52969 @@ -109052,7 +133307,7 @@ index ac80cb4..ec1ed09 100644
52970
52971 struct pingfakehdr {
52972 diff --git a/include/net/protocol.h b/include/net/protocol.h
52973 -index d6fcc1f..ca277058 100644
52974 +index da689f5..3b3d55b 100644
52975 --- a/include/net/protocol.h
52976 +++ b/include/net/protocol.h
52977 @@ -49,7 +49,7 @@ struct net_protocol {
52978 @@ -109124,10 +133379,10 @@ index 487ef34..d457f98 100644
52979
52980 /* Get the size of a DATA chunk payload. */
52981 diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
52982 -index eea9bde..1d4ec5d 100644
52983 +index 205630b..23a35dc 100644
52984 --- a/include/net/sctp/structs.h
52985 +++ b/include/net/sctp/structs.h
52986 -@@ -513,7 +513,7 @@ struct sctp_pf {
52987 +@@ -512,7 +512,7 @@ struct sctp_pf {
52988 void (*to_sk_saddr)(union sctp_addr *, struct sock *sk);
52989 void (*to_sk_daddr)(union sctp_addr *, struct sock *sk);
52990 struct sctp_af *af;
52991 @@ -109136,7 +133391,7 @@ index eea9bde..1d4ec5d 100644
52992
52993
52994 /* Structure to track chunk fragments that have been acked, but peer
52995 -@@ -1099,7 +1099,7 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
52996 +@@ -1098,7 +1098,7 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
52997 const struct sctp_bind_addr *src,
52998 gfp_t gfp);
52999 int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
53000 @@ -109189,10 +133444,10 @@ index 35512ac..edbd85b 100644
53001 #define SNMP_INC_STATS(mib, field) \
53002 this_cpu_inc(mib->mibs[field])
53003 diff --git a/include/net/sock.h b/include/net/sock.h
53004 -index 14d3c07..c273ad8 100644
53005 +index f5ea148..196f663 100644
53006 --- a/include/net/sock.h
53007 +++ b/include/net/sock.h
53008 -@@ -202,7 +202,7 @@ struct sock_common {
53009 +@@ -188,7 +188,7 @@ struct sock_common {
53010 struct in6_addr skc_v6_rcv_saddr;
53011 #endif
53012
53013 @@ -109201,7 +133456,7 @@ index 14d3c07..c273ad8 100644
53014
53015 /* following fields are padding to force
53016 * offset(struct sock, sk_refcnt) == 128 on 64bit arches
53017 -@@ -379,7 +379,7 @@ struct sock {
53018 +@@ -364,7 +364,7 @@ struct sock {
53019 unsigned int sk_napi_id;
53020 unsigned int sk_ll_usec;
53021 #endif
53022 @@ -109210,25 +133465,25 @@ index 14d3c07..c273ad8 100644
53023 int sk_rcvbuf;
53024
53025 struct sk_filter __rcu *sk_filter;
53026 -@@ -1067,7 +1067,7 @@ struct proto {
53027 - void (*destroy_cgroup)(struct mem_cgroup *memcg);
53028 - struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg);
53029 +@@ -1037,7 +1037,7 @@ struct proto {
53030 + atomic_t socks;
53031 #endif
53032 + int (*diag_destroy)(struct sock *sk, int err);
53033 -};
53034 +} __randomize_layout;
53035
53036 int proto_register(struct proto *prot, int alloc_slab);
53037 void proto_unregister(struct proto *prot);
53038 -@@ -1207,7 +1207,7 @@ static inline void memcg_memory_allocated_sub(struct cg_proto *prot,
53039 - page_counter_uncharge(&prot->memory_allocated, amt);
53040 +@@ -1124,7 +1124,7 @@ static inline long sk_prot_mem_limits(const struct sock *sk, int index)
53041 + return sk->sk_prot->sysctl_mem[index];
53042 }
53043
53044 -static inline long
53045 +static inline long __intentional_overflow(-1)
53046 sk_memory_allocated(const struct sock *sk)
53047 {
53048 - struct proto *prot = sk->sk_prot;
53049 -@@ -1799,7 +1799,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags)
53050 + return atomic_long_read(sk->sk_prot->memory_allocated);
53051 +@@ -1683,7 +1683,7 @@ static inline bool sk_check_csum_caps(struct sock *sk)
53052 }
53053
53054 static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
53055 @@ -109237,7 +133492,7 @@ index 14d3c07..c273ad8 100644
53056 int copy, int offset)
53057 {
53058 if (skb->ip_summed == CHECKSUM_NONE) {
53059 -@@ -2050,7 +2050,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
53060 +@@ -1928,7 +1928,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
53061 }
53062 }
53063
53064 @@ -109246,7 +133501,7 @@ index 14d3c07..c273ad8 100644
53065 bool force_schedule);
53066
53067 /**
53068 -@@ -2126,7 +2126,7 @@ struct sock_skb_cb {
53069 +@@ -2004,7 +2004,7 @@ struct sock_skb_cb {
53070 static inline void
53071 sock_skb_set_dropcount(const struct sock *sk, struct sk_buff *skb)
53072 {
53073 @@ -109256,10 +133511,10 @@ index 14d3c07..c273ad8 100644
53074
53075 void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
53076 diff --git a/include/net/tcp.h b/include/net/tcp.h
53077 -index 414d822..f99ea64 100644
53078 +index ae6468f..eaf0ae6 100644
53079 --- a/include/net/tcp.h
53080 +++ b/include/net/tcp.h
53081 -@@ -550,7 +550,7 @@ void tcp_retransmit_timer(struct sock *sk);
53082 +@@ -548,7 +548,7 @@ void tcp_retransmit_timer(struct sock *sk);
53083 void tcp_xmit_retransmit_queue(struct sock *);
53084 void tcp_simple_retransmit(struct sock *);
53085 int tcp_trim_head(struct sock *, struct sk_buff *, u32);
53086 @@ -109268,7 +133523,7 @@ index 414d822..f99ea64 100644
53087
53088 void tcp_send_probe0(struct sock *);
53089 void tcp_send_partial(struct sock *);
53090 -@@ -736,8 +736,8 @@ static inline u32 tcp_skb_timestamp(const struct sk_buff *skb)
53091 +@@ -734,8 +734,8 @@ static inline u32 tcp_skb_timestamp(const struct sk_buff *skb)
53092 * If this grows please adjust skbuff.h:skbuff->cb[xxx] size appropriately.
53093 */
53094 struct tcp_skb_cb {
53095 @@ -109279,7 +133534,7 @@ index 414d822..f99ea64 100644
53096 union {
53097 /* Note : tcp_tw_isn is used in input path only
53098 * (isn chosen by tcp_timewait_state_process())
53099 -@@ -765,7 +765,7 @@ struct tcp_skb_cb {
53100 +@@ -763,7 +763,7 @@ struct tcp_skb_cb {
53101
53102 __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */
53103 /* 1 byte hole */
53104 @@ -109363,6 +133618,32 @@ index d6f6e50..6fea29e 100644
53105 #endif
53106
53107 static __inline__
53108 +diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
53109 +index 92a7d85..1779570 100644
53110 +--- a/include/rdma/ib_cm.h
53111 ++++ b/include/rdma/ib_cm.h
53112 +@@ -486,8 +486,8 @@ int ib_cm_notify(struct ib_cm_id *cm_id, enum ib_event_type event);
53113 + * @private_data_len: Size of the private data buffer, in bytes.
53114 + */
53115 + int ib_send_cm_rej(struct ib_cm_id *cm_id,
53116 +- enum ib_cm_rej_reason reason,
53117 +- void *ari,
53118 ++ int reason,
53119 ++ const void *ari,
53120 + u8 ari_length,
53121 + const void *private_data,
53122 + u8 private_data_len);
53123 +@@ -558,8 +558,8 @@ int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
53124 + * @private_data_len: Size of the private data buffer, in bytes.
53125 + */
53126 + int ib_send_cm_apr(struct ib_cm_id *cm_id,
53127 +- enum ib_cm_apr_status status,
53128 +- void *info,
53129 ++ int status,
53130 ++ const void *info,
53131 + u8 info_length,
53132 + const void *private_data,
53133 + u8 private_data_len);
53134 diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h
53135 index 036bd27..c0d7f17 100644
53136 --- a/include/rdma/iw_cm.h
53137 @@ -109398,10 +133679,10 @@ index 93d14da..734b3d8 100644
53138 u8 qfull;
53139 enum fc_lport_state state;
53140 diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
53141 -index fe89d7c..cf05af3 100644
53142 +index ba93c0f..90acd4d 100644
53143 --- a/include/scsi/scsi_device.h
53144 +++ b/include/scsi/scsi_device.h
53145 -@@ -186,9 +186,9 @@ struct scsi_device {
53146 +@@ -187,9 +187,9 @@ struct scsi_device {
53147 unsigned int max_device_blocked; /* what device_blocked counts down from */
53148 #define SCSI_DEFAULT_DEVICE_BLOCKED 3
53149
53150 @@ -109455,7 +133736,7 @@ index 3afec70..b196b43 100644
53151 int pack_id; /* [i->o] unused internally (normally) */
53152 void __user * usr_ptr; /* [i->o] unused internally */
53153 diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
53154 -index fa1d055..3647940 100644
53155 +index c0abcdc..1b07286 100644
53156 --- a/include/sound/compress_driver.h
53157 +++ b/include/sound/compress_driver.h
53158 @@ -130,7 +130,7 @@ struct snd_compr_ops {
53159 @@ -109467,11 +133748,67 @@ index fa1d055..3647940 100644
53160
53161 /**
53162 * struct snd_compr: Compressed device
53163 +diff --git a/include/sound/control.h b/include/sound/control.h
53164 +index 21d047f..9573462 100644
53165 +--- a/include/sound/control.h
53166 ++++ b/include/sound/control.h
53167 +@@ -214,8 +214,10 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
53168 + * Return: Zero if successful or a negative error code.
53169 + */
53170 + static inline int
53171 +-snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
53172 ++snd_ctl_add_slave(void *_master, struct snd_kcontrol *slave)
53173 + {
53174 ++ struct snd_kcontrol *master = _master;
53175 ++
53176 + return _snd_ctl_add_slave(master, slave, 0);
53177 + }
53178 +
53179 +diff --git a/include/sound/pcm.h b/include/sound/pcm.h
53180 +index b0be092..0e82b4f 100644
53181 +--- a/include/sound/pcm.h
53182 ++++ b/include/sound/pcm.h
53183 +@@ -1075,7 +1075,7 @@ int snd_pcm_update_state(struct snd_pcm_substream *substream,
53184 + struct snd_pcm_runtime *runtime);
53185 + int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream);
53186 + void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr);
53187 +-void snd_pcm_period_elapsed(struct snd_pcm_substream *substream);
53188 ++void snd_pcm_period_elapsed(void *_substream);
53189 + snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream,
53190 + const void __user *buf,
53191 + snd_pcm_uframes_t frames);
53192 +diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
53193 +index f730b91..0079544 100644
53194 +--- a/include/sound/rawmidi.h
53195 ++++ b/include/sound/rawmidi.h
53196 +@@ -159,8 +159,7 @@ void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream,
53197 +
53198 + /* callbacks */
53199 +
53200 +-int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
53201 +- const unsigned char *buffer, int count);
53202 ++int snd_rawmidi_receive(void *_substream, const void *_buffer, int count);
53203 + int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream);
53204 + int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
53205 + unsigned char *buffer, int count);
53206 +diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
53207 +index feb58d4..9ce81c1 100644
53208 +--- a/include/sound/seq_kernel.h
53209 ++++ b/include/sound/seq_kernel.h
53210 +@@ -80,7 +80,7 @@ int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
53211 + #define SNDRV_SEQ_EXT_USRPTR 0x80000000
53212 + #define SNDRV_SEQ_EXT_CHAINED 0x40000000
53213 +
53214 +-typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
53215 ++typedef int (*snd_seq_dump_func_t)(void *ptr, const void *buf, int count);
53216 + int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
53217 + int in_kernel, int size_aligned);
53218 + int snd_seq_dump_var_event(const struct snd_seq_event *event,
53219 diff --git a/include/sound/soc.h b/include/sound/soc.h
53220 -index fb955e6..6ff0ea9 100644
53221 +index 7afb72c..1e67bd7 100644
53222 --- a/include/sound/soc.h
53223 +++ b/include/sound/soc.h
53224 -@@ -905,7 +905,7 @@ struct snd_soc_codec_driver {
53225 +@@ -920,7 +920,7 @@ struct snd_soc_codec_driver {
53226 enum snd_soc_dapm_type, int);
53227
53228 bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */
53229 @@ -109480,7 +133817,7 @@ index fb955e6..6ff0ea9 100644
53230
53231 /* SoC platform interface */
53232 struct snd_soc_platform_driver {
53233 -@@ -932,7 +932,7 @@ struct snd_soc_platform_driver {
53234 +@@ -947,7 +947,7 @@ struct snd_soc_platform_driver {
53235 const struct snd_compr_ops *compr_ops;
53236
53237 int (*bespoke_trigger)(struct snd_pcm_substream *, int);
53238 @@ -109549,7 +133886,7 @@ index 0000000..fb634b7
53239 +/* This part must be outside protection */
53240 +#include <trace/define_trace.h>
53241 diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
53242 -index ff8f6c0..6b6bae3 100644
53243 +index f95f25e..87ed448 100644
53244 --- a/include/trace/events/irq.h
53245 +++ b/include/trace/events/irq.h
53246 @@ -51,7 +51,7 @@ SOFTIRQ_NAME_LIST
53247 @@ -109857,20 +134194,19 @@ index 30f5362..8ed8ac9 100644
53248 void *pmi_pal;
53249 u8 *vbe_state_orig; /*
53250 diff --git a/init/Kconfig b/init/Kconfig
53251 -index 235c7a2..8dbf372 100644
53252 +index 2232080..c5df76e 100644
53253 --- a/init/Kconfig
53254 +++ b/init/Kconfig
53255 -@@ -285,7 +285,8 @@ config FHANDLE
53256 -
53257 +@@ -286,6 +286,8 @@ config FHANDLE
53258 config USELIB
53259 bool "uselib syscall"
53260 -- default y
53261 + def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION
53262 + default n
53263 + depends on !GRKERNSEC
53264 help
53265 This option enables the uselib syscall, a system call used in the
53266 dynamic linker from libc5 and earlier. glibc does not use this
53267 -@@ -633,6 +634,7 @@ config RCU_FAST_NO_HZ
53268 +@@ -628,6 +630,7 @@ config RCU_FAST_NO_HZ
53269 config TREE_RCU_TRACE
53270 def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU )
53271 select DEBUG_FS
53272 @@ -109878,7 +134214,7 @@ index 235c7a2..8dbf372 100644
53273 help
53274 This option provides tracing for the TREE_RCU and
53275 PREEMPT_RCU implementations, permitting Makefile to
53276 -@@ -1156,6 +1158,7 @@ endif # CGROUPS
53277 +@@ -1132,6 +1135,7 @@ endif # CGROUPS
53278 config CHECKPOINT_RESTORE
53279 bool "Checkpoint/restore support" if EXPERT
53280 select PROC_CHILDREN
53281 @@ -109886,7 +134222,7 @@ index 235c7a2..8dbf372 100644
53282 default n
53283 help
53284 Enables additional kernel features in a sake of checkpoint/restore.
53285 -@@ -1701,7 +1704,7 @@ config SLUB_DEBUG
53286 +@@ -1676,7 +1680,7 @@ config SLUB_DEBUG
53287
53288 config COMPAT_BRK
53289 bool "Disable heap randomization"
53290 @@ -109910,7 +134246,7 @@ index 7bc47ee..6da2dc7 100644
53291 ifneq ($(CONFIG_BLK_DEV_INITRD),y)
53292 obj-y += noinitramfs.o
53293 diff --git a/init/do_mounts.c b/init/do_mounts.c
53294 -index dea5de9..bbdbb5f 100644
53295 +index dea5de9..497f996 100644
53296 --- a/init/do_mounts.c
53297 +++ b/init/do_mounts.c
53298 @@ -363,11 +363,11 @@ static void __init get_fs_names(char *page)
53299 @@ -109960,8 +134296,17 @@ index dea5de9..bbdbb5f 100644
53300 }
53301
53302 static bool is_tmpfs;
53303 +@@ -609,7 +609,7 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type,
53304 + int flags, const char *dev_name, void *data)
53305 + {
53306 + static unsigned long once;
53307 +- void *fill = ramfs_fill_super;
53308 ++ int (*fill)(struct super_block *, void *, int) = ramfs_fill_super;
53309 +
53310 + if (test_and_set_bit(0, &once))
53311 + return ERR_PTR(-ENODEV);
53312 diff --git a/init/do_mounts.h b/init/do_mounts.h
53313 -index f5b978a..69dbfe8 100644
53314 +index 067af1d..b535547 100644
53315 --- a/init/do_mounts.h
53316 +++ b/init/do_mounts.h
53317 @@ -15,15 +15,15 @@ extern int root_mountflags;
53318 @@ -109993,7 +134338,7 @@ index f5b978a..69dbfe8 100644
53319 if (!S_ISBLK(stat.st_mode))
53320 return 0;
53321 diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
53322 -index 3e0878e..8a9d7a0 100644
53323 +index a1000ca..3137150 100644
53324 --- a/init/do_mounts_initrd.c
53325 +++ b/init/do_mounts_initrd.c
53326 @@ -37,13 +37,13 @@ static int init_linuxrc(struct subprocess_info *info, struct cred *new)
53327 @@ -110064,19 +134409,19 @@ index 3e0878e..8a9d7a0 100644
53328 printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
53329 if (fd < 0) {
53330 error = fd;
53331 -@@ -127,11 +127,11 @@ int __init initrd_load(void)
53332 +@@ -127,11 +127,11 @@ bool __init initrd_load(void)
53333 * mounted in the normal path.
53334 */
53335 if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
53336 - sys_unlink("/initrd.image");
53337 + sys_unlink((const char __force_user *)"/initrd.image");
53338 handle_initrd();
53339 - return 1;
53340 + return true;
53341 }
53342 }
53343 - sys_unlink("/initrd.image");
53344 + sys_unlink((const char __force_user *)"/initrd.image");
53345 - return 0;
53346 + return false;
53347 }
53348 diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
53349 index 8cb6db5..d729f50 100644
53350 @@ -110110,17 +134455,16 @@ index 8cb6db5..d729f50 100644
53351 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
53352 sys_close(fd);
53353 diff --git a/init/init_task.c b/init/init_task.c
53354 -index ba0a7f36..2bcf1d5 100644
53355 +index ba0a7f36..a7b3aaa 100644
53356 --- a/init/init_task.c
53357 +++ b/init/init_task.c
53358 -@@ -22,5 +22,9 @@ EXPORT_SYMBOL(init_task);
53359 - * Initial thread structure. Alignment of this is handled by a special
53360 +@@ -23,4 +23,8 @@ EXPORT_SYMBOL(init_task);
53361 * linker map entry.
53362 */
53363 + union thread_union init_thread_union __init_task_data =
53364 +#ifdef CONFIG_X86
53365 -+union thread_union init_thread_union __init_task_data;
53366 ++ { .stack[0] = ~0xabcd1234, };
53367 +#else
53368 - union thread_union init_thread_union __init_task_data =
53369 { INIT_THREAD_INFO(init_task) };
53370 +#endif
53371 diff --git a/init/initramfs.c b/init/initramfs.c
53372 @@ -110235,7 +134579,7 @@ index b32ad7d..05f6420 100644
53373 next_state = Reset;
53374 return 0;
53375 diff --git a/init/main.c b/init/main.c
53376 -index 9e64d70..2f40cd9 100644
53377 +index 58c9e37..6de8339 100644
53378 --- a/init/main.c
53379 +++ b/init/main.c
53380 @@ -97,6 +97,8 @@ extern void radix_tree_init(void);
53381 @@ -110359,7 +134703,7 @@ index 9e64d70..2f40cd9 100644
53382 static noinline void __init kernel_init_freeable(void);
53383
53384 static int __ref kernel_init(void *unused)
53385 -@@ -951,6 +998,11 @@ static int __ref kernel_init(void *unused)
53386 +@@ -953,6 +1000,11 @@ static int __ref kernel_init(void *unused)
53387 ramdisk_execute_command, ret);
53388 }
53389
53390 @@ -110371,7 +134715,7 @@ index 9e64d70..2f40cd9 100644
53391 /*
53392 * We try each of these until one succeeds.
53393 *
53394 -@@ -1008,7 +1060,7 @@ static noinline void __init kernel_init_freeable(void)
53395 +@@ -1010,7 +1062,7 @@ static noinline void __init kernel_init_freeable(void)
53396 do_basic_setup();
53397
53398 /* Open the /dev/console on the rootfs, this should never fail */
53399 @@ -110380,7 +134724,7 @@ index 9e64d70..2f40cd9 100644
53400 pr_err("Warning: unable to open an initial console.\n");
53401
53402 (void) sys_dup(0);
53403 -@@ -1021,11 +1073,13 @@ static noinline void __init kernel_init_freeable(void)
53404 +@@ -1023,11 +1075,13 @@ static noinline void __init kernel_init_freeable(void)
53405 if (!ramdisk_execute_command)
53406 ramdisk_execute_command = "/init";
53407
53408 @@ -110507,7 +134851,7 @@ index 68d4e95..1477ded 100644
53409 mq_table.data = get_mq(table);
53410
53411 diff --git a/ipc/mqueue.c b/ipc/mqueue.c
53412 -index 161a180..be31d93 100644
53413 +index 781c139..d5f1246 100644
53414 --- a/ipc/mqueue.c
53415 +++ b/ipc/mqueue.c
53416 @@ -274,6 +274,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
53417 @@ -110555,7 +134899,7 @@ index ed81aaf..4bb6792 100644
53418 goto out_err;
53419 *pseg = seg;
53420 diff --git a/ipc/sem.c b/ipc/sem.c
53421 -index b471e5a..cb0c603 100644
53422 +index cddd5b5..f328fa7 100644
53423 --- a/ipc/sem.c
53424 +++ b/ipc/sem.c
53425 @@ -1790,7 +1790,7 @@ static int get_queue_result(struct sem_queue *q)
53426 @@ -110587,7 +134931,7 @@ index b471e5a..cb0c603 100644
53427
53428 /*
53429 diff --git a/ipc/shm.c b/ipc/shm.c
53430 -index 3174634..215d679 100644
53431 +index 331fc1b..ee0e110 100644
53432 --- a/ipc/shm.c
53433 +++ b/ipc/shm.c
53434 @@ -72,9 +72,17 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp);
53435 @@ -110669,7 +135013,7 @@ index 3174634..215d679 100644
53436
53437 shm_add_rss_swap(shp, &rss, &swp);
53438 diff --git a/ipc/util.c b/ipc/util.c
53439 -index 0f401d9..049b0ff 100644
53440 +index 798cad1..d6ffc17 100644
53441 --- a/ipc/util.c
53442 +++ b/ipc/util.c
53443 @@ -71,6 +71,8 @@ struct ipc_proc_iface {
53444 @@ -110681,7 +135025,7 @@ index 0f401d9..049b0ff 100644
53445 /**
53446 * ipc_init - initialise ipc subsystem
53447 *
53448 -@@ -494,6 +496,10 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
53449 +@@ -489,6 +491,10 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
53450 granted_mode >>= 6;
53451 else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid))
53452 granted_mode >>= 3;
53453 @@ -110693,10 +135037,10 @@ index 0f401d9..049b0ff 100644
53454 if ((requested_mode & ~granted_mode & 0007) &&
53455 !ns_capable(ns->user_ns, CAP_IPC_OWNER))
53456 diff --git a/kernel/audit.c b/kernel/audit.c
53457 -index 5ffcbd3..166fa77 100644
53458 +index 3a3e5de..3a2baad 100644
53459 --- a/kernel/audit.c
53460 +++ b/kernel/audit.c
53461 -@@ -124,7 +124,7 @@ u32 audit_sig_sid = 0;
53462 +@@ -123,7 +123,7 @@ u32 audit_sig_sid = 0;
53463 3) suppressed due to audit_rate_limit
53464 4) suppressed due to audit_backlog_limit
53465 */
53466 @@ -110705,7 +135049,7 @@ index 5ffcbd3..166fa77 100644
53467
53468 /* The netlink socket. */
53469 static struct sock *audit_sock;
53470 -@@ -258,7 +258,7 @@ void audit_log_lost(const char *message)
53471 +@@ -257,7 +257,7 @@ void audit_log_lost(const char *message)
53472 unsigned long now;
53473 int print;
53474
53475 @@ -110714,7 +135058,7 @@ index 5ffcbd3..166fa77 100644
53476
53477 print = (audit_failure == AUDIT_FAIL_PANIC || !audit_rate_limit);
53478
53479 -@@ -275,7 +275,7 @@ void audit_log_lost(const char *message)
53480 +@@ -274,7 +274,7 @@ void audit_log_lost(const char *message)
53481 if (print) {
53482 if (printk_ratelimit())
53483 pr_warn("audit_lost=%u audit_rate_limit=%u audit_backlog_limit=%u\n",
53484 @@ -110723,7 +135067,7 @@ index 5ffcbd3..166fa77 100644
53485 audit_rate_limit,
53486 audit_backlog_limit);
53487 audit_panic(message);
53488 -@@ -847,7 +847,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
53489 +@@ -846,7 +846,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
53490 s.pid = audit_pid;
53491 s.rate_limit = audit_rate_limit;
53492 s.backlog_limit = audit_backlog_limit;
53493 @@ -110733,7 +135077,7 @@ index 5ffcbd3..166fa77 100644
53494 s.feature_bitmap = AUDIT_FEATURE_BITMAP_ALL;
53495 s.backlog_wait_time = audit_backlog_wait_time_master;
53496 diff --git a/kernel/auditsc.c b/kernel/auditsc.c
53497 -index b86cc04..dfbfd4e 100644
53498 +index 195ffae..fb880f9 100644
53499 --- a/kernel/auditsc.c
53500 +++ b/kernel/auditsc.c
53501 @@ -1024,7 +1024,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
53502 @@ -110764,10 +135108,19 @@ index b86cc04..dfbfd4e 100644
53503 task->sessionid = sessionid;
53504 task->loginuid = loginuid;
53505 diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
53506 -index 334b1bd..67c97a2 100644
53507 +index 972d9a8..367b6a1 100644
53508 --- a/kernel/bpf/core.c
53509 +++ b/kernel/bpf/core.c
53510 -@@ -151,14 +151,17 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
53511 +@@ -138,6 +138,8 @@ void __bpf_prog_free(struct bpf_prog *fp)
53512 + EXPORT_SYMBOL_GPL(__bpf_prog_free);
53513 +
53514 + #ifdef CONFIG_BPF_JIT
53515 ++extern long __rap_hash___bpf_prog_run;
53516 ++
53517 + struct bpf_binary_header *
53518 + bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
53519 + unsigned int alignment,
53520 +@@ -151,27 +153,45 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
53521 * random section of illegal instructions.
53522 */
53523 size = round_up(proglen + sizeof(*hdr) + 128, PAGE_SIZE);
53524 @@ -110785,8 +135138,28 @@ index 334b1bd..67c97a2 100644
53525 +
53526 hole = min_t(unsigned int, size - (proglen + sizeof(*hdr)),
53527 PAGE_SIZE - sizeof(*hdr));
53528 ++
53529 ++#ifdef CONFIG_PAX_RAP
53530 ++ hole -= 8;
53531 ++#endif
53532 ++
53533 start = (prandom_u32() % hole) & ~(alignment - 1);
53534 -@@ -171,7 +174,7 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
53535 +
53536 ++#ifdef CONFIG_PAX_RAP
53537 ++ start += 8;
53538 ++#endif
53539 ++
53540 + /* Leave a random number of instructions before BPF code. */
53541 + *image_ptr = &hdr->image[start];
53542 +
53543 ++#ifdef CONFIG_PAX_RAP
53544 ++ pax_open_kernel();
53545 ++ *(long *)(*image_ptr - 8) = (long)&__rap_hash___bpf_prog_run;
53546 ++ pax_close_kernel();
53547 ++#endif
53548 ++
53549 + return hdr;
53550 + }
53551
53552 void bpf_jit_binary_free(struct bpf_binary_header *hdr)
53553 {
53554 @@ -110795,11 +135168,29 @@ index 334b1bd..67c97a2 100644
53555 }
53556 #endif /* CONFIG_BPF_JIT */
53557
53558 +@@ -192,7 +212,7 @@ EXPORT_SYMBOL_GPL(__bpf_call_base);
53559 + *
53560 + * Decode and execute eBPF instructions.
53561 + */
53562 +-static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
53563 ++unsigned int __bpf_prog_run(const struct sk_buff *ctx, const struct bpf_insn *insn)
53564 + {
53565 + u64 stack[MAX_BPF_STACK / sizeof(u64)];
53566 + u64 regs[MAX_BPF_REG], tmp;
53567 +@@ -696,7 +716,7 @@ static int bpf_check_tail_call(const struct bpf_prog *fp)
53568 + */
53569 + int bpf_prog_select_runtime(struct bpf_prog *fp)
53570 + {
53571 +- fp->bpf_func = (void *) __bpf_prog_run;
53572 ++ fp->bpf_func = __bpf_prog_run;
53573 +
53574 + bpf_int_jit_compile(fp);
53575 + bpf_prog_lock_ro(fp);
53576 diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
53577 -index 3b39550..e470527 100644
53578 +index 6373970..a4e1c851 100644
53579 --- a/kernel/bpf/syscall.c
53580 +++ b/kernel/bpf/syscall.c
53581 -@@ -711,8 +711,16 @@ SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, siz
53582 +@@ -731,8 +731,16 @@ SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, siz
53583 union bpf_attr attr = {};
53584 int err;
53585
53586 @@ -110817,6 +135208,18 @@ index 3b39550..e470527 100644
53587
53588 if (!access_ok(VERIFY_READ, uattr, 1))
53589 return -EFAULT;
53590 +diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
53591 +index 2e7f7ab..7520d73 100644
53592 +--- a/kernel/bpf/verifier.c
53593 ++++ b/kernel/bpf/verifier.c
53594 +@@ -2003,7 +2003,6 @@ static int replace_map_fd_with_map_ptr(struct verifier_env *env)
53595 + if (IS_ERR(map)) {
53596 + verbose("fd %d is not pointing to valid bpf_map\n",
53597 + insn->imm);
53598 +- fdput(f);
53599 + return PTR_ERR(map);
53600 + }
53601 +
53602 diff --git a/kernel/capability.c b/kernel/capability.c
53603 index 45432b5..988f1e4 100644
53604 --- a/kernel/capability.c
53605 @@ -110916,10 +135319,10 @@ index 45432b5..988f1e4 100644
53606 +}
53607 +EXPORT_SYMBOL(capable_wrt_inode_uidgid_nolog);
53608 diff --git a/kernel/cgroup.c b/kernel/cgroup.c
53609 -index dc94f8b..ccd3aea 100644
53610 +index 6a498da..19ed7eb 100644
53611 --- a/kernel/cgroup.c
53612 +++ b/kernel/cgroup.c
53613 -@@ -3354,7 +3354,7 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
53614 +@@ -3330,7 +3330,7 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
53615 key = &cft->lockdep_key;
53616 #endif
53617 kn = __kernfs_create_file(cgrp->kn, cgroup_file_name(cgrp, cft, name),
53618 @@ -110928,7 +135331,7 @@ index dc94f8b..ccd3aea 100644
53619 NULL, key);
53620 if (IS_ERR(kn))
53621 return PTR_ERR(kn);
53622 -@@ -3458,11 +3458,14 @@ static void cgroup_exit_cftypes(struct cftype *cfts)
53623 +@@ -3434,11 +3434,14 @@ static void cgroup_exit_cftypes(struct cftype *cfts)
53624 /* free copy for custom atomic_write_len, see init_cftypes() */
53625 if (cft->max_write_len && cft->max_write_len != PAGE_SIZE)
53626 kfree(cft->kf_ops);
53627 @@ -110946,7 +135349,7 @@ index dc94f8b..ccd3aea 100644
53628 }
53629 }
53630
53631 -@@ -3493,8 +3496,10 @@ static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53632 +@@ -3469,8 +3472,10 @@ static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53633 kf_ops->atomic_write_len = cft->max_write_len;
53634 }
53635
53636 @@ -110959,7 +135362,7 @@ index dc94f8b..ccd3aea 100644
53637 }
53638
53639 return 0;
53640 -@@ -3507,7 +3512,7 @@ static int cgroup_rm_cftypes_locked(struct cftype *cfts)
53641 +@@ -3483,7 +3488,7 @@ static int cgroup_rm_cftypes_locked(struct cftype *cfts)
53642 if (!cfts || !cfts[0].ss)
53643 return -ENOENT;
53644
53645 @@ -110968,7 +135371,7 @@ index dc94f8b..ccd3aea 100644
53646 cgroup_apply_cftypes(cfts, false);
53647 cgroup_exit_cftypes(cfts);
53648 return 0;
53649 -@@ -3564,7 +3569,7 @@ static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53650 +@@ -3540,7 +3545,7 @@ static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53651
53652 mutex_lock(&cgroup_mutex);
53653
53654 @@ -110977,7 +135380,7 @@ index dc94f8b..ccd3aea 100644
53655 ret = cgroup_apply_cftypes(cfts, true);
53656 if (ret)
53657 cgroup_rm_cftypes_locked(cfts);
53658 -@@ -3585,8 +3590,10 @@ int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53659 +@@ -3561,8 +3566,10 @@ int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53660 {
53661 struct cftype *cft;
53662
53663 @@ -110989,7 +135392,7 @@ index dc94f8b..ccd3aea 100644
53664 return cgroup_add_cftypes(ss, cfts);
53665 }
53666
53667 -@@ -3602,8 +3609,10 @@ int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53668 +@@ -3578,8 +3585,10 @@ int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
53669 {
53670 struct cftype *cft;
53671
53672 @@ -111001,7 +135404,7 @@ index dc94f8b..ccd3aea 100644
53673 return cgroup_add_cftypes(ss, cfts);
53674 }
53675
53676 -@@ -5754,6 +5763,9 @@ static void cgroup_release_agent(struct work_struct *work)
53677 +@@ -5722,6 +5731,9 @@ static void cgroup_release_agent(struct work_struct *work)
53678 if (!pathbuf || !agentbuf)
53679 goto out;
53680
53681 @@ -111011,7 +135414,7 @@ index dc94f8b..ccd3aea 100644
53682 path = cgroup_path(cgrp, pathbuf, PATH_MAX);
53683 if (!path)
53684 goto out;
53685 -@@ -5929,7 +5941,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
53686 +@@ -5984,7 +5996,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
53687 struct task_struct *task;
53688 int count = 0;
53689
53690 @@ -111200,7 +135603,7 @@ index c18b1f1..b9a0132 100644
53691 return -ENOMEM;
53692
53693 diff --git a/kernel/cred.c b/kernel/cred.c
53694 -index 71179a0..a72ab47 100644
53695 +index 0c0cd8a..faf7245 100644
53696 --- a/kernel/cred.c
53697 +++ b/kernel/cred.c
53698 @@ -172,6 +172,15 @@ void exit_creds(struct task_struct *tsk)
53699 @@ -111408,15 +135811,15 @@ index 0874e2e..5b32cc9 100644
53700 }
53701 EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint);
53702 diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
53703 -index 41213454..861e178 100644
53704 +index 2a20c0d..3eb7d03 100644
53705 --- a/kernel/debug/kdb/kdb_main.c
53706 +++ b/kernel/debug/kdb/kdb_main.c
53707 @@ -2021,7 +2021,7 @@ static int kdb_lsmod(int argc, const char **argv)
53708 continue;
53709
53710 kdb_printf("%-20s%8u 0x%p ", mod->name,
53711 -- mod->core_size, (void *)mod);
53712 -+ mod->core_size_rx + mod->core_size_rw, (void *)mod);
53713 +- mod->core_layout.size, (void *)mod);
53714 ++ mod->core_layout.size_rx + mod->core_layout.size_rw, (void *)mod);
53715 #ifdef CONFIG_MODULE_UNLOAD
53716 kdb_printf("%4d ", module_refcount(mod));
53717 #endif
53718 @@ -111424,16 +135827,16 @@ index 41213454..861e178 100644
53719 kdb_printf(" (Loading)");
53720 else
53721 kdb_printf(" (Live)");
53722 -- kdb_printf(" 0x%p", mod->module_core);
53723 -+ kdb_printf(" 0x%p 0x%p", mod->module_core_rx, mod->module_core_rw);
53724 +- kdb_printf(" 0x%p", mod->core_layout.base);
53725 ++ kdb_printf(" 0x%p 0x%p", mod->core_layout.base_rx, mod->core_layout.base_rw);
53726
53727 #ifdef CONFIG_MODULE_UNLOAD
53728 {
53729 diff --git a/kernel/events/core.c b/kernel/events/core.c
53730 -index 1e889a0..78b25c2 100644
53731 +index f0b4b32..390e9b9 100644
53732 --- a/kernel/events/core.c
53733 +++ b/kernel/events/core.c
53734 -@@ -175,8 +175,15 @@ static struct srcu_struct pmus_srcu;
53735 +@@ -350,8 +350,15 @@ static struct srcu_struct pmus_srcu;
53736 * 0 - disallow raw tracepoint access for unpriv
53737 * 1 - disallow cpu events for unpriv
53738 * 2 - disallow kernel profiling for unpriv
53739 @@ -111450,7 +135853,7 @@ index 1e889a0..78b25c2 100644
53740
53741 /* Minimum for 512 kiB + 1 user control page */
53742 int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
53743 -@@ -202,7 +209,7 @@ static void update_perf_cpu_limits(void)
53744 +@@ -377,7 +384,7 @@ static void update_perf_cpu_limits(void)
53745
53746 tmp *= sysctl_perf_cpu_time_max_percent;
53747 do_div(tmp, 100);
53748 @@ -111459,7 +135862,7 @@ index 1e889a0..78b25c2 100644
53749 }
53750
53751 static int perf_rotate_context(struct perf_cpu_context *cpuctx);
53752 -@@ -308,7 +315,7 @@ void perf_sample_event_took(u64 sample_len_ns)
53753 +@@ -483,7 +490,7 @@ void perf_sample_event_took(u64 sample_len_ns)
53754 }
53755 }
53756
53757 @@ -111468,7 +135871,27 @@ index 1e889a0..78b25c2 100644
53758
53759 static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
53760 enum event_type_t event_type);
53761 -@@ -3898,9 +3905,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
53762 +@@ -949,8 +956,9 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
53763 + timer->function = perf_mux_hrtimer_handler;
53764 + }
53765 +
53766 +-static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)
53767 ++static int perf_mux_hrtimer_restart(void *_cpuctx)
53768 + {
53769 ++ struct perf_cpu_context *cpuctx = _cpuctx;
53770 + struct hrtimer *timer = &cpuctx->hrtimer;
53771 + struct pmu *pmu = cpuctx->ctx.pmu;
53772 + unsigned long flags;
53773 +@@ -2883,7 +2891,7 @@ void __perf_event_task_sched_in(struct task_struct *prev,
53774 + perf_pmu_sched_task(prev, task, true);
53775 + }
53776 +
53777 +-static u64 perf_calculate_period(struct perf_event *event, u64 nsec, u64 count)
53778 ++static u64 perf_calculate_period(const struct perf_event *event, u64 nsec, u64 count)
53779 + {
53780 + u64 frequency = event->attr.sample_freq;
53781 + u64 sec = NSEC_PER_SEC;
53782 +@@ -3934,9 +3942,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
53783 total += perf_event_count(event);
53784
53785 *enabled += event->total_time_enabled +
53786 @@ -111480,7 +135903,7 @@ index 1e889a0..78b25c2 100644
53787
53788 list_for_each_entry(child, &event->child_list, child_list) {
53789 (void)perf_event_read(child, false);
53790 -@@ -3932,12 +3939,12 @@ static int __perf_read_group_add(struct perf_event *leader,
53791 +@@ -3968,12 +3976,12 @@ static int __perf_read_group_add(struct perf_event *leader,
53792 */
53793 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
53794 values[n++] += leader->total_time_enabled +
53795 @@ -111495,7 +135918,7 @@ index 1e889a0..78b25c2 100644
53796 }
53797
53798 /*
53799 -@@ -4478,10 +4485,10 @@ void perf_event_update_userpage(struct perf_event *event)
53800 +@@ -4475,10 +4483,10 @@ void perf_event_update_userpage(struct perf_event *event)
53801 userpg->offset -= local64_read(&event->hw.prev_count);
53802
53803 userpg->time_enabled = enabled +
53804 @@ -111508,7 +135931,7 @@ index 1e889a0..78b25c2 100644
53805
53806 arch_perf_update_userpage(event, userpg, now);
53807
53808 -@@ -5156,7 +5163,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
53809 +@@ -5153,7 +5161,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
53810
53811 /* Data. */
53812 sp = perf_user_stack_pointer(regs);
53813 @@ -111517,7 +135940,7 @@ index 1e889a0..78b25c2 100644
53814 dyn_size = dump_size - rem;
53815
53816 perf_output_skip(handle, rem);
53817 -@@ -5247,11 +5254,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
53818 +@@ -5244,11 +5252,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
53819 values[n++] = perf_event_count(event);
53820 if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
53821 values[n++] = enabled +
53822 @@ -111531,7 +135954,17 @@ index 1e889a0..78b25c2 100644
53823 }
53824 if (read_format & PERF_FORMAT_ID)
53825 values[n++] = primary_event_id(event);
53826 -@@ -7906,7 +7913,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
53827 +@@ -7558,8 +7566,7 @@ perf_event_mux_interval_ms_store(struct device *dev,
53828 + cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu);
53829 + cpuctx->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * timer);
53830 +
53831 +- cpu_function_call(cpu,
53832 +- (remote_function_f)perf_mux_hrtimer_restart, cpuctx);
53833 ++ cpu_function_call(cpu, perf_mux_hrtimer_restart, cpuctx);
53834 + }
53835 + put_online_cpus();
53836 + mutex_unlock(&mux_interval_mutex);
53837 +@@ -7928,7 +7935,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
53838 event->parent = parent_event;
53839
53840 event->ns = get_pid_ns(task_active_pid_ns(current));
53841 @@ -111540,7 +135973,7 @@ index 1e889a0..78b25c2 100644
53842
53843 event->state = PERF_EVENT_STATE_INACTIVE;
53844
53845 -@@ -8268,6 +8275,11 @@ SYSCALL_DEFINE5(perf_event_open,
53846 +@@ -8290,6 +8297,11 @@ SYSCALL_DEFINE5(perf_event_open,
53847 if (flags & ~PERF_FLAG_ALL)
53848 return -EINVAL;
53849
53850 @@ -111552,7 +135985,7 @@ index 1e889a0..78b25c2 100644
53851 err = perf_copy_attr(attr_uptr, &attr);
53852 if (err)
53853 return err;
53854 -@@ -8740,10 +8752,10 @@ static void sync_child_event(struct perf_event *child_event,
53855 +@@ -8777,10 +8789,10 @@ static void sync_child_event(struct perf_event *child_event,
53856 /*
53857 * Add back the child's count to the parent's count:
53858 */
53859 @@ -111564,8 +135997,8 @@ index 1e889a0..78b25c2 100644
53860 - atomic64_add(child_event->total_time_running,
53861 + atomic64_add_unchecked(child_event->total_time_running,
53862 &parent_event->child_total_time_running);
53863 + }
53864
53865 - /*
53866 diff --git a/kernel/events/internal.h b/kernel/events/internal.h
53867 index 2bbad9c..056f20c 100644
53868 --- a/kernel/events/internal.h
53869 @@ -111611,10 +136044,10 @@ index 2bbad9c..056f20c 100644
53870 /* Callchain handling */
53871 extern struct perf_callchain_entry *
53872 diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
53873 -index 7dad849..d4eb8a5 100644
53874 +index 0167679..f0336a8 100644
53875 --- a/kernel/events/uprobes.c
53876 +++ b/kernel/events/uprobes.c
53877 -@@ -1689,7 +1689,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
53878 +@@ -1690,7 +1690,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
53879 {
53880 struct page *page;
53881 uprobe_opcode_t opcode;
53882 @@ -111624,10 +136057,10 @@ index 7dad849..d4eb8a5 100644
53883 pagefault_disable();
53884 result = __copy_from_user_inatomic(&opcode, (void __user*)vaddr,
53885 diff --git a/kernel/exit.c b/kernel/exit.c
53886 -index 07110c6..1125445 100644
53887 +index 10e0882..afcc374 100644
53888 --- a/kernel/exit.c
53889 +++ b/kernel/exit.c
53890 -@@ -171,6 +171,10 @@ void release_task(struct task_struct *p)
53891 +@@ -169,6 +169,10 @@ void release_task(struct task_struct *p)
53892 struct task_struct *leader;
53893 int zap_leader;
53894 repeat:
53895 @@ -111638,7 +136071,7 @@ index 07110c6..1125445 100644
53896 /* don't need to get the RCU readlock here - the process is dead and
53897 * can't be modifying its own credentials. But shut RCU-lockdep up */
53898 rcu_read_lock();
53899 -@@ -450,9 +454,8 @@ static struct task_struct *find_alive_thread(struct task_struct *p)
53900 +@@ -448,9 +452,8 @@ static struct task_struct *find_alive_thread(struct task_struct *p)
53901 return NULL;
53902 }
53903
53904 @@ -111649,7 +136082,7 @@ index 07110c6..1125445 100644
53905 {
53906 struct pid_namespace *pid_ns = task_active_pid_ns(father);
53907 struct task_struct *reaper = pid_ns->child_reaper;
53908 -@@ -549,6 +552,8 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
53909 +@@ -547,6 +550,8 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
53910 * jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
53911 */
53912 static void forget_original_parent(struct task_struct *father,
53913 @@ -111658,7 +136091,7 @@ index 07110c6..1125445 100644
53914 struct list_head *dead)
53915 {
53916 struct task_struct *p, *t, *reaper;
53917 -@@ -656,6 +661,8 @@ void do_exit(long code)
53918 +@@ -654,6 +659,8 @@ void do_exit(long code)
53919 int group_dead;
53920 TASKS_RCU(int tasks_rcu_i);
53921
53922 @@ -111667,7 +136100,7 @@ index 07110c6..1125445 100644
53923 profile_task_exit(tsk);
53924
53925 WARN_ON(blk_needs_flush_plug(tsk));
53926 -@@ -672,7 +679,6 @@ void do_exit(long code)
53927 +@@ -670,7 +677,6 @@ void do_exit(long code)
53928 * mm_release()->clear_child_tid() from writing to a user-controlled
53929 * kernel address.
53930 */
53931 @@ -111675,7 +136108,7 @@ index 07110c6..1125445 100644
53932
53933 ptrace_event(PTRACE_EVENT_EXIT, code);
53934
53935 -@@ -732,6 +738,9 @@ void do_exit(long code)
53936 +@@ -730,6 +736,9 @@ void do_exit(long code)
53937 tsk->exit_code = code;
53938 taskstats_exit(tsk, group_dead);
53939
53940 @@ -111685,7 +136118,7 @@ index 07110c6..1125445 100644
53941 exit_mm(tsk);
53942
53943 if (group_dead)
53944 -@@ -851,7 +860,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
53945 +@@ -849,7 +858,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
53946 * Take down every thread in the group. This is called by fatal signals
53947 * as well as by sys_exit_group (below).
53948 */
53949 @@ -111694,7 +136127,7 @@ index 07110c6..1125445 100644
53950 do_group_exit(int exit_code)
53951 {
53952 struct signal_struct *sig = current->signal;
53953 -@@ -968,6 +977,7 @@ static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
53954 +@@ -966,6 +975,7 @@ static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
53955 * the lock and this task is uninteresting. If we return nonzero, we have
53956 * released the lock and the system call should return.
53957 */
53958 @@ -111702,7 +136135,7 @@ index 07110c6..1125445 100644
53959 static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
53960 {
53961 int state, retval, status;
53962 -@@ -984,6 +994,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
53963 +@@ -982,6 +992,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
53964
53965 get_task_struct(p);
53966 read_unlock(&tasklist_lock);
53967 @@ -111710,7 +136143,7 @@ index 07110c6..1125445 100644
53968 sched_annotate_sleep();
53969
53970 if ((exit_code & 0x7f) == 0) {
53971 -@@ -1006,6 +1017,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
53972 +@@ -1004,6 +1015,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
53973 * We own this thread, nobody else can reap it.
53974 */
53975 read_unlock(&tasklist_lock);
53976 @@ -111718,7 +136151,7 @@ index 07110c6..1125445 100644
53977 sched_annotate_sleep();
53978
53979 /*
53980 -@@ -1149,6 +1161,8 @@ static int *task_stopped_code(struct task_struct *p, bool ptrace)
53981 +@@ -1146,6 +1158,8 @@ static int *task_stopped_code(struct task_struct *p, bool ptrace)
53982 * search should terminate.
53983 */
53984 static int wait_task_stopped(struct wait_opts *wo,
53985 @@ -111727,7 +136160,7 @@ index 07110c6..1125445 100644
53986 int ptrace, struct task_struct *p)
53987 {
53988 struct siginfo __user *infop;
53989 -@@ -1196,6 +1210,7 @@ unlock_sig:
53990 +@@ -1193,6 +1207,7 @@ unlock_sig:
53991 pid = task_pid_vnr(p);
53992 why = ptrace ? CLD_TRAPPED : CLD_STOPPED;
53993 read_unlock(&tasklist_lock);
53994 @@ -111735,7 +136168,7 @@ index 07110c6..1125445 100644
53995 sched_annotate_sleep();
53996
53997 if (unlikely(wo->wo_flags & WNOWAIT))
53998 -@@ -1233,6 +1248,7 @@ unlock_sig:
53999 +@@ -1230,6 +1245,7 @@ unlock_sig:
54000 * the lock and this task is uninteresting. If we return nonzero, we have
54001 * released the lock and the system call should return.
54002 */
54003 @@ -111743,7 +136176,7 @@ index 07110c6..1125445 100644
54004 static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
54005 {
54006 int retval;
54007 -@@ -1259,6 +1275,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
54008 +@@ -1256,6 +1272,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
54009 pid = task_pid_vnr(p);
54010 get_task_struct(p);
54011 read_unlock(&tasklist_lock);
54012 @@ -111751,7 +136184,7 @@ index 07110c6..1125445 100644
54013 sched_annotate_sleep();
54014
54015 if (!wo->wo_info) {
54016 -@@ -1288,6 +1305,8 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
54017 +@@ -1285,6 +1302,8 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
54018 * or another error from security_task_wait(), or still -ECHILD.
54019 */
54020 static int wait_consider_task(struct wait_opts *wo, int ptrace,
54021 @@ -111760,7 +136193,7 @@ index 07110c6..1125445 100644
54022 struct task_struct *p)
54023 {
54024 /*
54025 -@@ -1413,6 +1432,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
54026 +@@ -1410,6 +1429,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
54027 * ->notask_error is 0 if there were any eligible children,
54028 * or another error from security_task_wait(), or still -ECHILD.
54029 */
54030 @@ -111768,7 +136201,7 @@ index 07110c6..1125445 100644
54031 static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
54032 {
54033 struct task_struct *p;
54034 -@@ -1427,6 +1447,7 @@ static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
54035 +@@ -1424,6 +1444,7 @@ static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
54036 return 0;
54037 }
54038
54039 @@ -111776,7 +136209,7 @@ index 07110c6..1125445 100644
54040 static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
54041 {
54042 struct task_struct *p;
54043 -@@ -1490,12 +1511,16 @@ repeat:
54044 +@@ -1487,12 +1508,16 @@ repeat:
54045 tsk = current;
54046 do {
54047 retval = do_wait_thread(wo, tsk);
54048 @@ -111796,7 +136229,7 @@ index 07110c6..1125445 100644
54049 if (wo->wo_flags & __WNOTHREAD)
54050 break;
54051 diff --git a/kernel/fork.c b/kernel/fork.c
54052 -index 1155eac..0c9bd1f 100644
54053 +index 2e391c7..555531a 100644
54054 --- a/kernel/fork.c
54055 +++ b/kernel/fork.c
54056 @@ -188,12 +188,54 @@ static void free_thread_info(struct thread_info *ti)
54057 @@ -112021,15 +136454,14 @@ index 1155eac..0c9bd1f 100644
54058
54059 uprobe_start_dup_mmap();
54060 down_write(&oldmm->mmap_sem);
54061 -@@ -430,53 +546,15 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
54062 +@@ -430,52 +546,14 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
54063
54064 prev = NULL;
54065 for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
54066 - struct file *file;
54067 -
54068 if (mpnt->vm_flags & VM_DONTCOPY) {
54069 - vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file,
54070 - -vma_pages(mpnt));
54071 + vm_stat_account(mm, mpnt->vm_flags, -vma_pages(mpnt));
54072 continue;
54073 }
54074 - charge = 0;
54075 @@ -112079,7 +136511,7 @@ index 1155eac..0c9bd1f 100644
54076 }
54077
54078 /*
54079 -@@ -508,6 +586,38 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
54080 +@@ -507,6 +585,38 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
54081 if (retval)
54082 goto out;
54083 }
54084 @@ -112118,7 +136550,7 @@ index 1155eac..0c9bd1f 100644
54085 /* a new mm has just been created */
54086 arch_dup_mmap(oldmm, mm);
54087 retval = 0;
54088 -@@ -517,14 +627,6 @@ out:
54089 +@@ -516,14 +626,6 @@ out:
54090 up_write(&oldmm->mmap_sem);
54091 uprobe_end_dup_mmap();
54092 return retval;
54093 @@ -112133,7 +136565,7 @@ index 1155eac..0c9bd1f 100644
54094 }
54095
54096 static inline int mm_alloc_pgd(struct mm_struct *mm)
54097 -@@ -799,8 +901,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
54098 +@@ -798,8 +900,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
54099 return ERR_PTR(err);
54100
54101 mm = get_task_mm(task);
54102 @@ -112144,7 +136576,7 @@ index 1155eac..0c9bd1f 100644
54103 mmput(mm);
54104 mm = ERR_PTR(-EACCES);
54105 }
54106 -@@ -1001,13 +1103,20 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
54107 +@@ -1000,13 +1102,20 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
54108 spin_unlock(&fs->lock);
54109 return -EAGAIN;
54110 }
54111 @@ -112166,7 +136598,7 @@ index 1155eac..0c9bd1f 100644
54112 return 0;
54113 }
54114
54115 -@@ -1240,7 +1349,7 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
54116 +@@ -1239,7 +1348,7 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
54117 * parts of the process environment (as per the clone
54118 * flags). The actual kick-off is left to the caller.
54119 */
54120 @@ -112175,7 +136607,7 @@ index 1155eac..0c9bd1f 100644
54121 unsigned long stack_start,
54122 unsigned long stack_size,
54123 int __user *child_tidptr,
54124 -@@ -1312,6 +1421,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
54125 +@@ -1310,6 +1419,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
54126 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
54127 #endif
54128 retval = -EAGAIN;
54129 @@ -112185,7 +136617,7 @@ index 1155eac..0c9bd1f 100644
54130 if (atomic_read(&p->real_cred->user->processes) >=
54131 task_rlimit(p, RLIMIT_NPROC)) {
54132 if (p->real_cred->user != INIT_USER &&
54133 -@@ -1570,6 +1682,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
54134 +@@ -1568,6 +1680,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
54135 goto bad_fork_cancel_cgroup;
54136 }
54137
54138 @@ -112197,7 +136629,7 @@ index 1155eac..0c9bd1f 100644
54139 if (likely(p->pid)) {
54140 ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace);
54141
54142 -@@ -1659,6 +1776,8 @@ bad_fork_cleanup_count:
54143 +@@ -1657,6 +1774,8 @@ bad_fork_cleanup_count:
54144 bad_fork_free:
54145 free_task(p);
54146 fork_out:
54147 @@ -112206,7 +136638,7 @@ index 1155eac..0c9bd1f 100644
54148 return ERR_PTR(retval);
54149 }
54150
54151 -@@ -1721,6 +1840,7 @@ long _do_fork(unsigned long clone_flags,
54152 +@@ -1719,6 +1838,7 @@ long _do_fork(unsigned long clone_flags,
54153
54154 p = copy_process(clone_flags, stack_start, stack_size,
54155 child_tidptr, NULL, trace, tls);
54156 @@ -112214,7 +136646,7 @@ index 1155eac..0c9bd1f 100644
54157 /*
54158 * Do this prior waking up the new thread - the thread pointer
54159 * might get invalid after that point, if the thread exits quickly.
54160 -@@ -1737,6 +1857,8 @@ long _do_fork(unsigned long clone_flags,
54161 +@@ -1735,6 +1855,8 @@ long _do_fork(unsigned long clone_flags,
54162 if (clone_flags & CLONE_PARENT_SETTID)
54163 put_user(nr, parent_tidptr);
54164
54165 @@ -112223,16 +136655,16 @@ index 1155eac..0c9bd1f 100644
54166 if (clone_flags & CLONE_VFORK) {
54167 p->vfork_done = &vfork;
54168 init_completion(&vfork);
54169 -@@ -1869,7 +1991,7 @@ void __init proc_caches_init(void)
54170 - mm_cachep = kmem_cache_create("mm_struct",
54171 +@@ -1871,7 +1993,7 @@ void __init proc_caches_init(void)
54172 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
54173 - SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL);
54174 -- vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC);
54175 -+ vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC | SLAB_NO_SANITIZE);
54176 + SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT,
54177 + NULL);
54178 +- vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT);
54179 ++ vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE);
54180 mmap_init();
54181 nsproxy_cache_init();
54182 }
54183 -@@ -1917,7 +2039,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
54184 +@@ -1919,7 +2041,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
54185 return 0;
54186
54187 /* don't need lock here; in the worst case we'll do useless copy */
54188 @@ -112241,7 +136673,7 @@ index 1155eac..0c9bd1f 100644
54189 return 0;
54190
54191 *new_fsp = copy_fs_struct(fs);
54192 -@@ -2030,7 +2152,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
54193 +@@ -2032,7 +2154,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
54194 fs = current->fs;
54195 spin_lock(&fs->lock);
54196 current->fs = new_fs;
54197 @@ -112251,7 +136683,7 @@ index 1155eac..0c9bd1f 100644
54198 new_fs = NULL;
54199 else
54200 new_fs = fs;
54201 -@@ -2094,7 +2217,7 @@ int unshare_files(struct files_struct **displaced)
54202 +@@ -2096,7 +2219,7 @@ int unshare_files(struct files_struct **displaced)
54203 int sysctl_max_threads(struct ctl_table *table, int write,
54204 void __user *buffer, size_t *lenp, loff_t *ppos)
54205 {
54206 @@ -112261,7 +136693,7 @@ index 1155eac..0c9bd1f 100644
54207 int threads = max_threads;
54208 int min = MIN_THREADS;
54209 diff --git a/kernel/futex.c b/kernel/futex.c
54210 -index 461c72b..b4f4bd8 100644
54211 +index 5d6ce64..3124491 100644
54212 --- a/kernel/futex.c
54213 +++ b/kernel/futex.c
54214 @@ -202,7 +202,7 @@ struct futex_pi_state {
54215 @@ -112282,8 +136714,8 @@ index 461c72b..b4f4bd8 100644
54216
54217 static const struct futex_q futex_q_init = {
54218 /* list gets initialized in queue_me()*/
54219 -@@ -472,6 +472,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
54220 - struct page *page, *page_head;
54221 +@@ -473,6 +473,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
54222 + struct address_space *mapping;
54223 int err, ro = 0;
54224
54225 +#ifdef CONFIG_PAX_SEGMEXEC
54226 @@ -112294,7 +136726,7 @@ index 461c72b..b4f4bd8 100644
54227 /*
54228 * The futex address must be "naturally" aligned.
54229 */
54230 -@@ -678,7 +683,7 @@ static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr,
54231 +@@ -643,7 +648,7 @@ static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr,
54232
54233 static int get_futex_value_locked(u32 *dest, u32 __user *from)
54234 {
54235 @@ -112303,7 +136735,7 @@ index 461c72b..b4f4bd8 100644
54236
54237 pagefault_disable();
54238 ret = __copy_from_user_inatomic(dest, from, sizeof(u32));
54239 -@@ -3136,6 +3141,7 @@ static void __init futex_detect_cmpxchg(void)
54240 +@@ -3135,6 +3140,7 @@ static void __init futex_detect_cmpxchg(void)
54241 {
54242 #ifndef CONFIG_HAVE_FUTEX_CMPXCHG
54243 u32 curval;
54244 @@ -112311,7 +136743,7 @@ index 461c72b..b4f4bd8 100644
54245
54246 /*
54247 * This will fail and we want it. Some arch implementations do
54248 -@@ -3147,8 +3153,11 @@ static void __init futex_detect_cmpxchg(void)
54249 +@@ -3146,8 +3152,11 @@ static void __init futex_detect_cmpxchg(void)
54250 * implementation, the non-functional ones will return
54251 * -ENOSYS.
54252 */
54253 @@ -112336,33 +136768,8 @@ index 4ae3232..5adee02 100644
54254 compat_long_t futex_offset)
54255 {
54256 compat_uptr_t base = ptr_to_compat(entry);
54257 -diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
54258 -index 7080ae1..c9b3761 100644
54259 ---- a/kernel/gcov/base.c
54260 -+++ b/kernel/gcov/base.c
54261 -@@ -123,11 +123,6 @@ void gcov_enable_events(void)
54262 - }
54263 -
54264 - #ifdef CONFIG_MODULES
54265 --static inline int within(void *addr, void *start, unsigned long size)
54266 --{
54267 -- return ((addr >= start) && (addr < start + size));
54268 --}
54269 --
54270 - /* Update list and generate events when modules are unloaded. */
54271 - static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
54272 - void *data)
54273 -@@ -142,7 +137,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
54274 -
54275 - /* Remove entries located in module from linked list. */
54276 - while ((info = gcov_info_next(info))) {
54277 -- if (within(info, mod->module_core, mod->core_size)) {
54278 -+ if (within_module_core_rw((unsigned long)info, mod)) {
54279 - gcov_info_unlink(prev, info);
54280 - if (gcov_events_enabled)
54281 - gcov_event(GCOV_REMOVE, info);
54282 diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
54283 -index 6ead200..0cdeef1 100644
54284 +index 84118723..317f7a5 100644
54285 --- a/kernel/irq/manage.c
54286 +++ b/kernel/irq/manage.c
54287 @@ -958,7 +958,7 @@ static int irq_thread(void *data)
54288 @@ -112375,10 +136782,10 @@ index 6ead200..0cdeef1 100644
54289 irq_wake_secondary(desc, action);
54290
54291 diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
54292 -index 6b0c0b7..9314a9c 100644
54293 +index 38e89ce..58960ac 100644
54294 --- a/kernel/irq/msi.c
54295 +++ b/kernel/irq/msi.c
54296 -@@ -212,16 +212,18 @@ static void msi_domain_update_dom_ops(struct msi_domain_info *info)
54297 +@@ -214,16 +214,18 @@ static void msi_domain_update_dom_ops(struct msi_domain_info *info)
54298 return;
54299 }
54300
54301 @@ -112402,7 +136809,7 @@ index 6b0c0b7..9314a9c 100644
54302 }
54303
54304 static void msi_domain_update_chip_ops(struct msi_domain_info *info)
54305 -@@ -229,8 +231,11 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info)
54306 +@@ -231,8 +233,11 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info)
54307 struct irq_chip *chip = info->chip;
54308
54309 BUG_ON(!chip || !chip->irq_mask || !chip->irq_unmask);
54310 @@ -112465,7 +136872,7 @@ index 05254ee..a2e0725 100644
54311
54312 static int
54313 diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
54314 -index 5c5987f..bc502b0 100644
54315 +index 5c5987f..d59272e 100644
54316 --- a/kernel/kallsyms.c
54317 +++ b/kernel/kallsyms.c
54318 @@ -11,6 +11,9 @@
54319 @@ -112541,7 +136948,20 @@ index 5c5987f..bc502b0 100644
54320 if (all_var)
54321 return is_kernel(addr);
54322
54323 -@@ -481,7 +520,6 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter)
54324 +@@ -434,10 +473,11 @@ int sprint_backtrace(char *buffer, unsigned long address)
54325 + }
54326 +
54327 + /* Look up a kernel symbol and print it to the kernel messages. */
54328 +-void __print_symbol(const char *fmt, unsigned long address)
54329 ++void __print_symbol(const char *fmt, unsigned long address, ...)
54330 + {
54331 + char buffer[KSYM_SYMBOL_LEN];
54332 +
54333 ++ address = (unsigned long)__builtin_extract_return_addr((void *)address);
54334 + sprint_symbol(buffer, address);
54335 +
54336 + printk(fmt, buffer);
54337 +@@ -481,7 +521,6 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter)
54338
54339 static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
54340 {
54341 @@ -112549,7 +136969,7 @@ index 5c5987f..bc502b0 100644
54342 iter->nameoff = get_symbol_offset(new_pos);
54343 iter->pos = new_pos;
54344 }
54345 -@@ -529,6 +567,11 @@ static int s_show(struct seq_file *m, void *p)
54346 +@@ -529,6 +568,11 @@ static int s_show(struct seq_file *m, void *p)
54347 {
54348 struct kallsym_iter *iter = m->private;
54349
54350 @@ -112561,7 +136981,7 @@ index 5c5987f..bc502b0 100644
54351 /* Some debugging symbols have no name. Ignore them. */
54352 if (!iter->name[0])
54353 return 0;
54354 -@@ -542,6 +585,7 @@ static int s_show(struct seq_file *m, void *p)
54355 +@@ -542,6 +586,7 @@ static int s_show(struct seq_file *m, void *p)
54356 */
54357 type = iter->exported ? toupper(iter->type) :
54358 tolower(iter->type);
54359 @@ -112585,7 +137005,7 @@ index 3a47fa9..bcb17e3 100644
54360
54361 /*
54362 diff --git a/kernel/kexec.c b/kernel/kexec.c
54363 -index d873b64..61f7c59 100644
54364 +index ee70aef..55095dd 100644
54365 --- a/kernel/kexec.c
54366 +++ b/kernel/kexec.c
54367 @@ -224,7 +224,8 @@ COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry,
54368 @@ -112599,18 +137019,18 @@ index d873b64..61f7c59 100644
54369
54370 /* Don't allow clients that don't understand the native
54371 diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
54372 -index 11b64a6..d011095 100644
54373 +index 8dc6591..508a794 100644
54374 --- a/kernel/kexec_core.c
54375 +++ b/kernel/kexec_core.c
54376 -@@ -851,7 +851,7 @@ int kimage_load_segment(struct kimage *image,
54377 +@@ -848,7 +848,7 @@ int kimage_load_segment(struct kimage *image,
54378
54379 struct kimage *kexec_image;
54380 struct kimage *kexec_crash_image;
54381 -int kexec_load_disabled;
54382 +int kexec_load_disabled __read_only;
54383
54384 - void crash_kexec(struct pt_regs *regs)
54385 - {
54386 + /*
54387 + * No panic_cpu check version of crash_kexec(). This function is called
54388 diff --git a/kernel/kmod.c b/kernel/kmod.c
54389 index 0277d12..2d2899c 100644
54390 --- a/kernel/kmod.c
54391 @@ -112867,7 +137287,7 @@ index d10ab6b..1725fbd 100644
54392 return 0;
54393 }
54394 diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
54395 -index e83b264..d09fae1 100644
54396 +index 152da4a..4ab2150 100644
54397 --- a/kernel/ksysfs.c
54398 +++ b/kernel/ksysfs.c
54399 @@ -50,6 +50,8 @@ static ssize_t uevent_helper_store(struct kobject *kobj,
54400 @@ -112879,7 +137299,7 @@ index e83b264..d09fae1 100644
54401 memcpy(uevent_helper, buf, count);
54402 uevent_helper[count] = '\0';
54403 if (count && uevent_helper[count-1] == '\n')
54404 -@@ -176,7 +178,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj,
54405 +@@ -195,7 +197,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj,
54406 return count;
54407 }
54408
54409 @@ -112889,7 +137309,7 @@ index e83b264..d09fae1 100644
54410 .name = "notes",
54411 .mode = S_IRUGO,
54412 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
54413 -index 60ace56..8392836 100644
54414 +index 716547f..91e3067 100644
54415 --- a/kernel/locking/lockdep.c
54416 +++ b/kernel/locking/lockdep.c
54417 @@ -613,6 +613,10 @@ static int static_obj(void *obj)
54418 @@ -112911,7 +137331,7 @@ index 60ace56..8392836 100644
54419 printk("the code is fine but needs lockdep annotation.\n");
54420 printk("turning off the locking correctness validator.\n");
54421 dump_stack();
54422 -@@ -3102,7 +3107,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
54423 +@@ -3106,7 +3111,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
54424 if (!class)
54425 return 0;
54426 }
54427 @@ -113049,7 +137469,7 @@ index 0551c21..f753f95 100644
54428 debug_mutex_free_waiter(&waiter);
54429 mutex_release(&lock->dep_map, 1, ip);
54430 diff --git a/kernel/module.c b/kernel/module.c
54431 -index 0e5c711..940c5c0 100644
54432 +index 794ebe8..70e7897 100644
54433 --- a/kernel/module.c
54434 +++ b/kernel/module.c
54435 @@ -59,6 +59,7 @@
54436 @@ -113060,52 +137480,44 @@ index 0e5c711..940c5c0 100644
54437 #include <uapi/linux/module.h>
54438 #include "module-internal.h"
54439
54440 -@@ -108,7 +109,7 @@ static LIST_HEAD(modules);
54441 - * Use a latched RB-tree for __module_address(); this allows us to use
54442 - * RCU-sched lookups of the address from any context.
54443 - *
54444 -- * Because modules have two address ranges: init and core, we need two
54445 -+ * Because modules have four address ranges: init_{rw,rx} and core_{rw,rx}, we need four
54446 - * latch_tree_nodes entries. Therefore we need the back-pointer from
54447 - * mod_tree_node.
54448 - *
54449 -@@ -125,10 +126,14 @@ static __always_inline unsigned long __mod_tree_val(struct latch_tree_node *n)
54450 - struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
54451 - struct module *mod = mtn->mod;
54452 +@@ -106,16 +107,32 @@ static LIST_HEAD(modules);
54453
54454 -- if (unlikely(mtn == &mod->mtn_init))
54455 -- return (unsigned long)mod->module_init;
54456 -+ if (unlikely(mtn == &mod->mtn_init_rw))
54457 -+ return (unsigned long)mod->module_init_rw;
54458 -+ if (unlikely(mtn == &mod->mtn_init_rx))
54459 -+ return (unsigned long)mod->module_init_rx;
54460 + static __always_inline unsigned long __mod_tree_val(struct latch_tree_node *n)
54461 + {
54462 +- struct module_layout *layout = container_of(n, struct module_layout, mtn.node);
54463 ++ struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
54464 ++ struct module *mod = mtn->mod;
54465
54466 -- return (unsigned long)mod->module_core;
54467 -+ if (unlikely(mtn == &mod->mtn_core_rw))
54468 -+ return (unsigned long)mod->module_core_rw;
54469 -+ return (unsigned long)mod->module_core_rx;
54470 +- return (unsigned long)layout->base;
54471 ++ if (unlikely(mtn == &mod->init_layout.mtn_rw))
54472 ++ return (unsigned long)mod->init_layout.base_rw;
54473 ++ if (unlikely(mtn == &mod->init_layout.mtn_rx))
54474 ++ return (unsigned long)mod->init_layout.base_rx;
54475 ++
54476 ++ if (unlikely(mtn == &mod->core_layout.mtn_rw))
54477 ++ return (unsigned long)mod->core_layout.base_rw;
54478 ++ return (unsigned long)mod->core_layout.base_rx;
54479 }
54480
54481 static __always_inline unsigned long __mod_tree_size(struct latch_tree_node *n)
54482 -@@ -136,10 +141,14 @@ static __always_inline unsigned long __mod_tree_size(struct latch_tree_node *n)
54483 - struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
54484 - struct module *mod = mtn->mod;
54485 -
54486 -- if (unlikely(mtn == &mod->mtn_init))
54487 -- return (unsigned long)mod->init_size;
54488 -+ if (unlikely(mtn == &mod->mtn_init_rw))
54489 -+ return (unsigned long)mod->init_size_rw;
54490 -+ if (unlikely(mtn == &mod->mtn_init_rx))
54491 -+ return (unsigned long)mod->init_size_rx;
54492 + {
54493 +- struct module_layout *layout = container_of(n, struct module_layout, mtn.node);
54494 ++ struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
54495 ++ struct module *mod = mtn->mod;
54496
54497 -- return (unsigned long)mod->core_size;
54498 -+ if (unlikely(mtn == &mod->mtn_core_rw))
54499 -+ return (unsigned long)mod->core_size_rw;
54500 -+ return (unsigned long)mod->core_size_rx;
54501 +- return (unsigned long)layout->size;
54502 ++ if (unlikely(mtn == &mod->init_layout.mtn_rw))
54503 ++ return (unsigned long)mod->init_layout.size_rw;
54504 ++ if (unlikely(mtn == &mod->init_layout.mtn_rx))
54505 ++ return (unsigned long)mod->init_layout.size_rx;
54506 ++
54507 ++ if (unlikely(mtn == &mod->core_layout.mtn_rw))
54508 ++ return (unsigned long)mod->core_layout.size_rw;
54509 ++ return (unsigned long)mod->core_layout.size_rx;
54510 }
54511
54512 static __always_inline bool
54513 -@@ -172,14 +181,19 @@ static const struct latch_tree_ops mod_tree_ops = {
54514 +@@ -148,14 +165,19 @@ static const struct latch_tree_ops mod_tree_ops = {
54515
54516 static struct mod_tree_root {
54517 struct latch_tree_root root;
54518 @@ -113130,47 +137542,47 @@ index 0e5c711..940c5c0 100644
54519
54520 static noinline void __mod_tree_insert(struct mod_tree_node *node)
54521 {
54522 -@@ -197,23 +211,31 @@ static void __mod_tree_remove(struct mod_tree_node *node)
54523 +@@ -173,23 +195,31 @@ static void __mod_tree_remove(struct mod_tree_node *node)
54524 */
54525 static void mod_tree_insert(struct module *mod)
54526 {
54527 -- mod->mtn_core.mod = mod;
54528 -- mod->mtn_init.mod = mod;
54529 -+ mod->mtn_core_rw.mod = mod;
54530 -+ mod->mtn_core_rx.mod = mod;
54531 -+ mod->mtn_init_rw.mod = mod;
54532 -+ mod->mtn_init_rx.mod = mod;
54533 +- mod->core_layout.mtn.mod = mod;
54534 +- mod->init_layout.mtn.mod = mod;
54535 ++ mod->core_layout.mtn_rx.mod = mod;
54536 ++ mod->core_layout.mtn_rw.mod = mod;
54537 ++ mod->init_layout.mtn_rx.mod = mod;
54538 ++ mod->init_layout.mtn_rw.mod = mod;
54539
54540 -- __mod_tree_insert(&mod->mtn_core);
54541 -- if (mod->init_size)
54542 -- __mod_tree_insert(&mod->mtn_init);
54543 -+ __mod_tree_insert(&mod->mtn_core_rw);
54544 -+ __mod_tree_insert(&mod->mtn_core_rx);
54545 -+ if (mod->init_size_rw)
54546 -+ __mod_tree_insert(&mod->mtn_init_rw);
54547 -+ if (mod->init_size_rx)
54548 -+ __mod_tree_insert(&mod->mtn_init_rx);
54549 +- __mod_tree_insert(&mod->core_layout.mtn);
54550 +- if (mod->init_layout.size)
54551 +- __mod_tree_insert(&mod->init_layout.mtn);
54552 ++ __mod_tree_insert(&mod->core_layout.mtn_rx);
54553 ++ __mod_tree_insert(&mod->core_layout.mtn_rw);
54554 ++ if (mod->init_layout.size_rx)
54555 ++ __mod_tree_insert(&mod->init_layout.mtn_rx);
54556 ++ if (mod->init_layout.size_rw)
54557 ++ __mod_tree_insert(&mod->init_layout.mtn_rw);
54558 }
54559
54560 static void mod_tree_remove_init(struct module *mod)
54561 {
54562 -- if (mod->init_size)
54563 -- __mod_tree_remove(&mod->mtn_init);
54564 -+ if (mod->init_size_rw)
54565 -+ __mod_tree_remove(&mod->mtn_init_rw);
54566 -+ if (mod->init_size_rx)
54567 -+ __mod_tree_remove(&mod->mtn_init_rx);
54568 +- if (mod->init_layout.size)
54569 +- __mod_tree_remove(&mod->init_layout.mtn);
54570 ++ if (mod->init_layout.size_rx)
54571 ++ __mod_tree_remove(&mod->init_layout.mtn_rx);
54572 ++ if (mod->init_layout.size_rw)
54573 ++ __mod_tree_remove(&mod->init_layout.mtn_rw);
54574 }
54575
54576 static void mod_tree_remove(struct module *mod)
54577 {
54578 -- __mod_tree_remove(&mod->mtn_core);
54579 -+ __mod_tree_remove(&mod->mtn_core_rw);
54580 -+ __mod_tree_remove(&mod->mtn_core_rx);
54581 +- __mod_tree_remove(&mod->core_layout.mtn);
54582 ++ __mod_tree_remove(&mod->core_layout.mtn_rx);
54583 ++ __mod_tree_remove(&mod->core_layout.mtn_rw);
54584 mod_tree_remove_init(mod);
54585 }
54586
54587 -@@ -230,7 +252,8 @@ static struct module *mod_find(unsigned long addr)
54588 +@@ -206,7 +236,8 @@ static struct module *mod_find(unsigned long addr)
54589
54590 #else /* MODULES_TREE_LOOKUP */
54591
54592 @@ -113180,12 +137592,12 @@ index 0e5c711..940c5c0 100644
54593
54594 static void mod_tree_insert(struct module *mod) { }
54595 static void mod_tree_remove_init(struct module *mod) { }
54596 -@@ -254,22 +277,36 @@ static struct module *mod_find(unsigned long addr)
54597 +@@ -230,22 +261,36 @@ static struct module *mod_find(unsigned long addr)
54598 * Bounds of module text, for speeding up __module_address.
54599 * Protected by module_mutex.
54600 */
54601 -static void __mod_update_bounds(void *base, unsigned int size)
54602 -+static void __mod_update_bounds_rw(void *base, unsigned int size)
54603 ++static void __mod_update_bounds_rx(void *base, unsigned int size)
54604 {
54605 unsigned long min = (unsigned long)base;
54606 unsigned long max = min + size;
54607 @@ -113194,38 +137606,38 @@ index 0e5c711..940c5c0 100644
54608 - module_addr_min = min;
54609 - if (max > module_addr_max)
54610 - module_addr_max = max;
54611 -+ if (min < module_addr_min_rw)
54612 -+ module_addr_min_rw = min;
54613 -+ if (max > module_addr_max_rw)
54614 -+ module_addr_max_rw = max;
54615 ++ if (min < module_addr_min_rx)
54616 ++ module_addr_min_rx = min;
54617 ++ if (max > module_addr_max_rx)
54618 ++ module_addr_max_rx = max;
54619 +}
54620 +
54621 -+static void __mod_update_bounds_rx(void *base, unsigned int size)
54622 ++static void __mod_update_bounds_rw(void *base, unsigned int size)
54623 +{
54624 + unsigned long min = (unsigned long)base;
54625 + unsigned long max = min + size;
54626 +
54627 -+ if (min < module_addr_min_rx)
54628 -+ module_addr_min_rx = min;
54629 -+ if (max > module_addr_max_rx)
54630 -+ module_addr_max_rx = max;
54631 ++ if (min < module_addr_min_rw)
54632 ++ module_addr_min_rw = min;
54633 ++ if (max > module_addr_max_rw)
54634 ++ module_addr_max_rw = max;
54635 }
54636
54637 static void mod_update_bounds(struct module *mod)
54638 {
54639 -- __mod_update_bounds(mod->module_core, mod->core_size);
54640 -- if (mod->init_size)
54641 -- __mod_update_bounds(mod->module_init, mod->init_size);
54642 -+ __mod_update_bounds_rw(mod->module_core_rw, mod->core_size_rw);
54643 -+ __mod_update_bounds_rx(mod->module_core_rx, mod->core_size_rx);
54644 -+ if (mod->init_size_rw)
54645 -+ __mod_update_bounds_rw(mod->module_init_rw, mod->init_size_rw);
54646 -+ if (mod->init_size_rx)
54647 -+ __mod_update_bounds_rx(mod->module_init_rx, mod->init_size_rx);
54648 +- __mod_update_bounds(mod->core_layout.base, mod->core_layout.size);
54649 +- if (mod->init_layout.size)
54650 +- __mod_update_bounds(mod->init_layout.base, mod->init_layout.size);
54651 ++ __mod_update_bounds_rx(mod->core_layout.base_rx, mod->core_layout.size_rx);
54652 ++ __mod_update_bounds_rw(mod->core_layout.base_rw, mod->core_layout.size_rw);
54653 ++ if (mod->init_layout.size_rx)
54654 ++ __mod_update_bounds_rw(mod->init_layout.base_rx, mod->init_layout.size_rx);
54655 ++ if (mod->init_layout.size_rw)
54656 ++ __mod_update_bounds_rw(mod->init_layout.base_rw, mod->init_layout.size_rw);
54657 }
54658
54659 #ifdef CONFIG_KGDB_KDB
54660 -@@ -298,7 +335,7 @@ module_param(sig_enforce, bool_enable_only, 0644);
54661 +@@ -274,7 +319,7 @@ module_param(sig_enforce, bool_enable_only, 0644);
54662 #endif /* !CONFIG_MODULE_SIG_FORCE */
54663
54664 /* Block module loading/unloading? */
54665 @@ -113234,7 +137646,7 @@ index 0e5c711..940c5c0 100644
54666 core_param(nomodule, modules_disabled, bint, 0);
54667
54668 /* Waiting for a module to finish initializing? */
54669 -@@ -476,7 +513,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
54670 +@@ -452,7 +497,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
54671 return true;
54672
54673 list_for_each_entry_rcu(mod, &modules, list) {
54674 @@ -113243,7 +137655,7 @@ index 0e5c711..940c5c0 100644
54675 { mod->syms, mod->syms + mod->num_syms, mod->crcs,
54676 NOT_GPL_ONLY, false },
54677 { mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
54678 -@@ -501,7 +538,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
54679 +@@ -477,7 +522,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
54680 if (mod->state == MODULE_STATE_UNFORMED)
54681 continue;
54682
54683 @@ -113252,7 +137664,7 @@ index 0e5c711..940c5c0 100644
54684 return true;
54685 }
54686 return false;
54687 -@@ -647,7 +684,7 @@ static int percpu_modalloc(struct module *mod, struct load_info *info)
54688 +@@ -623,7 +668,7 @@ static int percpu_modalloc(struct module *mod, struct load_info *info)
54689 if (!pcpusec->sh_size)
54690 return 0;
54691
54692 @@ -113261,25 +137673,25 @@ index 0e5c711..940c5c0 100644
54693 pr_warn("%s: per-cpu alignment %li > %li\n",
54694 mod->name, align, PAGE_SIZE);
54695 align = PAGE_SIZE;
54696 -@@ -1217,7 +1254,7 @@ struct module_attribute module_uevent =
54697 +@@ -1195,7 +1240,7 @@ struct module_attribute module_uevent =
54698 static ssize_t show_coresize(struct module_attribute *mattr,
54699 struct module_kobject *mk, char *buffer)
54700 {
54701 -- return sprintf(buffer, "%u\n", mk->mod->core_size);
54702 -+ return sprintf(buffer, "%u\n", mk->mod->core_size_rx + mk->mod->core_size_rw);
54703 +- return sprintf(buffer, "%u\n", mk->mod->core_layout.size);
54704 ++ return sprintf(buffer, "%u\n", mk->mod->core_layout.size_rx + mk->mod->core_layout.size_rw);
54705 }
54706
54707 static struct module_attribute modinfo_coresize =
54708 -@@ -1226,7 +1263,7 @@ static struct module_attribute modinfo_coresize =
54709 +@@ -1204,7 +1249,7 @@ static struct module_attribute modinfo_coresize =
54710 static ssize_t show_initsize(struct module_attribute *mattr,
54711 struct module_kobject *mk, char *buffer)
54712 {
54713 -- return sprintf(buffer, "%u\n", mk->mod->init_size);
54714 -+ return sprintf(buffer, "%u\n", mk->mod->init_size_rx + mk->mod->init_size_rw);
54715 +- return sprintf(buffer, "%u\n", mk->mod->init_layout.size);
54716 ++ return sprintf(buffer, "%u\n", mk->mod->init_layout.size_rx + mk->mod->init_layout.size_rw);
54717 }
54718
54719 static struct module_attribute modinfo_initsize =
54720 -@@ -1318,12 +1355,29 @@ static int check_version(Elf_Shdr *sechdrs,
54721 +@@ -1296,12 +1341,29 @@ static int check_version(Elf_Shdr *sechdrs,
54722 goto bad_version;
54723 }
54724
54725 @@ -113309,7 +137721,7 @@ index 0e5c711..940c5c0 100644
54726 return 0;
54727 }
54728
54729 -@@ -1451,7 +1505,7 @@ resolve_symbol_wait(struct module *mod,
54730 +@@ -1429,7 +1491,7 @@ resolve_symbol_wait(struct module *mod,
54731 */
54732 #ifdef CONFIG_SYSFS
54733
54734 @@ -113318,7 +137730,7 @@ index 0e5c711..940c5c0 100644
54735 static inline bool sect_empty(const Elf_Shdr *sect)
54736 {
54737 return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
54738 -@@ -1589,7 +1643,7 @@ static void add_notes_attrs(struct module *mod, const struct load_info *info)
54739 +@@ -1567,7 +1629,7 @@ static void add_notes_attrs(struct module *mod, const struct load_info *info)
54740 {
54741 unsigned int notes, loaded, i;
54742 struct module_notes_attrs *notes_attrs;
54743 @@ -113327,7 +137739,7 @@ index 0e5c711..940c5c0 100644
54744
54745 /* failed to create section attributes, so can't create notes */
54746 if (!mod->sect_attrs)
54747 -@@ -1701,7 +1755,7 @@ static void del_usage_links(struct module *mod)
54748 +@@ -1679,7 +1741,7 @@ static void del_usage_links(struct module *mod)
54749 static int module_add_modinfo_attrs(struct module *mod)
54750 {
54751 struct module_attribute *attr;
54752 @@ -113336,119 +137748,90 @@ index 0e5c711..940c5c0 100644
54753 int error = 0;
54754 int i;
54755
54756 -@@ -1918,21 +1972,21 @@ static void set_section_ro_nx(void *base,
54757 +@@ -1866,30 +1928,28 @@ static void mod_sysfs_teardown(struct module *mod)
54758 + static void frob_text(const struct module_layout *layout,
54759 + int (*set_memory)(unsigned long start, int num_pages))
54760 + {
54761 +- BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
54762 +- BUG_ON((unsigned long)layout->text_size & (PAGE_SIZE-1));
54763 +- set_memory((unsigned long)layout->base,
54764 +- layout->text_size >> PAGE_SHIFT);
54765 ++ BUG_ON((unsigned long)layout->base_rx & (PAGE_SIZE-1));
54766 ++ BUG_ON((unsigned long)layout->size_rx & (PAGE_SIZE-1));
54767 ++ set_memory((unsigned long)layout->base_rx,
54768 ++ layout->size_rx >> PAGE_SHIFT);
54769 + }
54770
54771 - static void unset_module_core_ro_nx(struct module *mod)
54772 + static void frob_rodata(const struct module_layout *layout,
54773 + int (*set_memory)(unsigned long start, int num_pages))
54774 {
54775 -- set_page_attributes(mod->module_core + mod->core_text_size,
54776 -- mod->module_core + mod->core_size,
54777 -+ set_page_attributes(mod->module_core_rw,
54778 -+ mod->module_core_rw + mod->core_size_rw,
54779 - set_memory_x);
54780 -- set_page_attributes(mod->module_core,
54781 -- mod->module_core + mod->core_ro_size,
54782 -+ set_page_attributes(mod->module_core_rx,
54783 -+ mod->module_core_rx + mod->core_size_rx,
54784 - set_memory_rw);
54785 +- BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
54786 +- BUG_ON((unsigned long)layout->text_size & (PAGE_SIZE-1));
54787 +- BUG_ON((unsigned long)layout->ro_size & (PAGE_SIZE-1));
54788 +- set_memory((unsigned long)layout->base + layout->text_size,
54789 +- (layout->ro_size - layout->text_size) >> PAGE_SHIFT);
54790 ++ BUG_ON((unsigned long)layout->base_rx & (PAGE_SIZE-1));
54791 ++ BUG_ON((unsigned long)layout->size_rx & (PAGE_SIZE-1));
54792 ++// BUG_ON((unsigned long)layout->size_ro & (PAGE_SIZE-1));
54793 ++// set_memory((unsigned long)layout->base_rx + layout->size_rx,
54794 ++// (layout->size_ro - layout->size_rx) >> PAGE_SHIFT);
54795 }
54796
54797 - static void unset_module_init_ro_nx(struct module *mod)
54798 + static void frob_writable_data(const struct module_layout *layout,
54799 + int (*set_memory)(unsigned long start, int num_pages))
54800 {
54801 -- set_page_attributes(mod->module_init + mod->init_text_size,
54802 -- mod->module_init + mod->init_size,
54803 -+ set_page_attributes(mod->module_init_rw,
54804 -+ mod->module_init_rw + mod->init_size_rw,
54805 - set_memory_x);
54806 -- set_page_attributes(mod->module_init,
54807 -- mod->module_init + mod->init_ro_size,
54808 -+ set_page_attributes(mod->module_init_rx,
54809 -+ mod->module_init_rx + mod->init_size_rx,
54810 - set_memory_rw);
54811 +- BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
54812 +- BUG_ON((unsigned long)layout->ro_size & (PAGE_SIZE-1));
54813 +- BUG_ON((unsigned long)layout->size & (PAGE_SIZE-1));
54814 +- set_memory((unsigned long)layout->base + layout->ro_size,
54815 +- (layout->size - layout->ro_size) >> PAGE_SHIFT);
54816 ++ BUG_ON((unsigned long)layout->base_rw & (PAGE_SIZE-1));
54817 ++ BUG_ON((unsigned long)layout->size_rw & (PAGE_SIZE-1));
54818 ++ set_memory((unsigned long)layout->base_rw, layout->size_rw >> PAGE_SHIFT);
54819 + }
54820 +
54821 + /* livepatching wants to disable read-only so it can frob module. */
54822 +@@ -1966,7 +2026,15 @@ static void disable_ro_nx(const struct module_layout *layout)
54823 }
54824
54825 -@@ -1945,14 +1999,14 @@ void set_all_modules_text_rw(void)
54826 - list_for_each_entry_rcu(mod, &modules, list) {
54827 - if (mod->state == MODULE_STATE_UNFORMED)
54828 - continue;
54829 -- if ((mod->module_core) && (mod->core_text_size)) {
54830 -- set_page_attributes(mod->module_core,
54831 -- mod->module_core + mod->core_text_size,
54832 -+ if ((mod->module_core_rx) && (mod->core_size_rx)) {
54833 -+ set_page_attributes(mod->module_core_rx,
54834 -+ mod->module_core_rx + mod->core_size_rx,
54835 - set_memory_rw);
54836 - }
54837 -- if ((mod->module_init) && (mod->init_text_size)) {
54838 -- set_page_attributes(mod->module_init,
54839 -- mod->module_init + mod->init_text_size,
54840 -+ if ((mod->module_init_rx) && (mod->init_size_rx)) {
54841 -+ set_page_attributes(mod->module_init_rx,
54842 -+ mod->module_init_rx + mod->init_size_rx,
54843 - set_memory_rw);
54844 - }
54845 - }
54846 -@@ -1968,14 +2022,14 @@ void set_all_modules_text_ro(void)
54847 - list_for_each_entry_rcu(mod, &modules, list) {
54848 - if (mod->state == MODULE_STATE_UNFORMED)
54849 - continue;
54850 -- if ((mod->module_core) && (mod->core_text_size)) {
54851 -- set_page_attributes(mod->module_core,
54852 -- mod->module_core + mod->core_text_size,
54853 -+ if ((mod->module_core_rx) && (mod->core_size_rx)) {
54854 -+ set_page_attributes(mod->module_core_rx,
54855 -+ mod->module_core_rx + mod->core_size_rx,
54856 - set_memory_ro);
54857 - }
54858 -- if ((mod->module_init) && (mod->init_text_size)) {
54859 -- set_page_attributes(mod->module_init,
54860 -- mod->module_init + mod->init_text_size,
54861 -+ if ((mod->module_init_rx) && (mod->init_size_rx)) {
54862 -+ set_page_attributes(mod->module_init_rx,
54863 -+ mod->module_init_rx + mod->init_size_rx,
54864 - set_memory_ro);
54865 - }
54866 - }
54867 -@@ -1984,7 +2038,15 @@ void set_all_modules_text_ro(void)
54868 #else
54869 - static inline void set_section_ro_nx(void *base, unsigned long text_size, unsigned long ro_size, unsigned long total_size) { }
54870 - static void unset_module_core_ro_nx(struct module *mod) { }
54871 --static void unset_module_init_ro_nx(struct module *mod) { }
54872 -+static void unset_module_init_ro_nx(struct module *mod)
54873 +-static void disable_ro_nx(const struct module_layout *layout) { }
54874 ++static void disable_ro_nx(const struct module_layout *layout)
54875 +{
54876 +
54877 +#ifdef CONFIG_PAX_KERNEXEC
54878 -+ set_memory_nx((unsigned long)mod->module_init_rx, PFN_UP(mod->init_size_rx));
54879 -+ set_memory_rw((unsigned long)mod->module_init_rx, PFN_UP(mod->init_size_rx));
54880 ++ set_memory_nx((unsigned long)layout->base_rx, PFN_UP(layout->size_rx));
54881 ++ set_memory_rw((unsigned long)layout->base_rx, PFN_UP(layout->size_rx));
54882 +#endif
54883 +
54884 +}
54885 + static void module_enable_nx(const struct module *mod) { }
54886 + static void module_disable_nx(const struct module *mod) { }
54887 #endif
54888 -
54889 - void __weak module_memfree(void *module_region)
54890 -@@ -2039,16 +2101,19 @@ static void free_module(struct module *mod)
54891 - /* This may be NULL, but that's OK */
54892 - unset_module_init_ro_nx(mod);
54893 +@@ -2023,16 +2091,19 @@ static void free_module(struct module *mod)
54894 + /* This may be empty, but that's OK */
54895 + disable_ro_nx(&mod->init_layout);
54896 module_arch_freeing_init(mod);
54897 -- module_memfree(mod->module_init);
54898 -+ module_memfree(mod->module_init_rw);
54899 -+ module_memfree_exec(mod->module_init_rx);
54900 +- module_memfree(mod->init_layout.base);
54901 ++ module_memfree(mod->init_layout.base_rw);
54902 ++ module_memfree_exec(mod->init_layout.base_rx);
54903 kfree(mod->args);
54904 percpu_modfree(mod);
54905
54906 /* Free lock-classes; relies on the preceding sync_rcu(). */
54907 -- lockdep_free_key_range(mod->module_core, mod->core_size);
54908 -+ lockdep_free_key_range(mod->module_core_rx, mod->core_size_rx);
54909 -+ lockdep_free_key_range(mod->module_core_rw, mod->core_size_rw);
54910 +- lockdep_free_key_range(mod->core_layout.base, mod->core_layout.size);
54911 ++ lockdep_free_key_range(mod->core_layout.base_rw, mod->core_layout.size_rw);
54912 ++ lockdep_free_key_range(mod->core_layout.base_rx, mod->core_layout.size_rx);
54913
54914 /* Finally, free the core (containing the module structure) */
54915 - unset_module_core_ro_nx(mod);
54916 -- module_memfree(mod->module_core);
54917 -+ module_memfree_exec(mod->module_core_rx);
54918 -+ module_memfree(mod->module_core_rw);
54919 + disable_ro_nx(&mod->core_layout);
54920 +- module_memfree(mod->core_layout.base);
54921 ++ module_memfree_exec(mod->core_layout.base_rx);
54922 ++ module_memfree(mod->core_layout.base_rw);
54923
54924 #ifdef CONFIG_MPU
54925 update_protections(current->mm);
54926 -@@ -2117,9 +2182,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
54927 +@@ -2101,9 +2172,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
54928 int ret = 0;
54929 const struct kernel_symbol *ksym;
54930
54931 @@ -113480,7 +137863,7 @@ index 0e5c711..940c5c0 100644
54932 switch (sym[i].st_shndx) {
54933 case SHN_COMMON:
54934 /* Ignore common symbols */
54935 -@@ -2144,7 +2231,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
54936 +@@ -2128,7 +2221,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
54937 ksym = resolve_symbol_wait(mod, info, name);
54938 /* Ok if resolved. */
54939 if (ksym && !IS_ERR(ksym)) {
54940 @@ -113490,7 +137873,7 @@ index 0e5c711..940c5c0 100644
54941 break;
54942 }
54943
54944 -@@ -2163,11 +2252,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
54945 +@@ -2147,11 +2242,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
54946 secbase = (unsigned long)mod_percpu(mod);
54947 else
54948 secbase = info->sechdrs[sym[i].st_shndx].sh_addr;
54949 @@ -113511,127 +137894,129 @@ index 0e5c711..940c5c0 100644
54950 return ret;
54951 }
54952
54953 -@@ -2251,22 +2349,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
54954 +@@ -2235,22 +2339,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
54955 || s->sh_entsize != ~0UL
54956 || strstarts(sname, ".init"))
54957 continue;
54958 -- s->sh_entsize = get_offset(mod, &mod->core_size, s, i);
54959 +- s->sh_entsize = get_offset(mod, &mod->core_layout.size, s, i);
54960 + if ((s->sh_flags & SHF_WRITE) || !(s->sh_flags & SHF_ALLOC))
54961 -+ s->sh_entsize = get_offset(mod, &mod->core_size_rw, s, i);
54962 ++ s->sh_entsize = get_offset(mod, &mod->core_layout.size_rw, s, i);
54963 + else
54964 -+ s->sh_entsize = get_offset(mod, &mod->core_size_rx, s, i);
54965 ++ s->sh_entsize = get_offset(mod, &mod->core_layout.size_rx, s, i);
54966 pr_debug("\t%s\n", sname);
54967 }
54968 - switch (m) {
54969 - case 0: /* executable */
54970 -- mod->core_size = debug_align(mod->core_size);
54971 -- mod->core_text_size = mod->core_size;
54972 +- mod->core_layout.size = debug_align(mod->core_layout.size);
54973 +- mod->core_layout.text_size = mod->core_layout.size;
54974 - break;
54975 - case 1: /* RO: text and ro-data */
54976 -- mod->core_size = debug_align(mod->core_size);
54977 -- mod->core_ro_size = mod->core_size;
54978 +- mod->core_layout.size = debug_align(mod->core_layout.size);
54979 +- mod->core_layout.ro_size = mod->core_layout.size;
54980 - break;
54981 - case 3: /* whole core */
54982 -- mod->core_size = debug_align(mod->core_size);
54983 +- mod->core_layout.size = debug_align(mod->core_layout.size);
54984 - break;
54985 - }
54986 }
54987
54988 pr_debug("Init section allocation order:\n");
54989 -@@ -2280,23 +2368,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
54990 +@@ -2264,23 +2358,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
54991 || s->sh_entsize != ~0UL
54992 || !strstarts(sname, ".init"))
54993 continue;
54994 -- s->sh_entsize = (get_offset(mod, &mod->init_size, s, i)
54995 +- s->sh_entsize = (get_offset(mod, &mod->init_layout.size, s, i)
54996 - | INIT_OFFSET_MASK);
54997 + if ((s->sh_flags & SHF_WRITE) || !(s->sh_flags & SHF_ALLOC))
54998 -+ s->sh_entsize = get_offset(mod, &mod->init_size_rw, s, i);
54999 ++ s->sh_entsize = get_offset(mod, &mod->init_layout.size_rw, s, i);
55000 + else
55001 -+ s->sh_entsize = get_offset(mod, &mod->init_size_rx, s, i);
55002 ++ s->sh_entsize = get_offset(mod, &mod->init_layout.size_rx, s, i);
55003 + s->sh_entsize |= INIT_OFFSET_MASK;
55004 pr_debug("\t%s\n", sname);
55005 }
55006 - switch (m) {
55007 - case 0: /* executable */
55008 -- mod->init_size = debug_align(mod->init_size);
55009 -- mod->init_text_size = mod->init_size;
55010 +- mod->init_layout.size = debug_align(mod->init_layout.size);
55011 +- mod->init_layout.text_size = mod->init_layout.size;
55012 - break;
55013 - case 1: /* RO: text and ro-data */
55014 -- mod->init_size = debug_align(mod->init_size);
55015 -- mod->init_ro_size = mod->init_size;
55016 +- mod->init_layout.size = debug_align(mod->init_layout.size);
55017 +- mod->init_layout.ro_size = mod->init_layout.size;
55018 - break;
55019 - case 3: /* whole init */
55020 -- mod->init_size = debug_align(mod->init_size);
55021 +- mod->init_layout.size = debug_align(mod->init_layout.size);
55022 - break;
55023 - }
55024 }
55025 }
55026
55027 -@@ -2469,7 +2547,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
55028 +@@ -2458,7 +2542,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
55029
55030 /* Put symbol section at end of init part of module. */
55031 symsect->sh_flags |= SHF_ALLOC;
55032 -- symsect->sh_entsize = get_offset(mod, &mod->init_size, symsect,
55033 -+ symsect->sh_entsize = get_offset(mod, &mod->init_size_rx, symsect,
55034 +- symsect->sh_entsize = get_offset(mod, &mod->init_layout.size, symsect,
55035 ++ symsect->sh_entsize = get_offset(mod, &mod->init_layout.size_rx, symsect,
55036 info->index.sym) | INIT_OFFSET_MASK;
55037 pr_debug("\t%s\n", info->secstrings + symsect->sh_name);
55038
55039 -@@ -2486,23 +2564,23 @@ static void layout_symtab(struct module *mod, struct load_info *info)
55040 +@@ -2476,23 +2560,23 @@ static void layout_symtab(struct module *mod, struct load_info *info)
55041 }
55042
55043 /* Append room for core symbols at end of core part. */
55044 -- info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1);
55045 -- info->stroffs = mod->core_size = info->symoffs + ndst * sizeof(Elf_Sym);
55046 -- mod->core_size += strtab_size;
55047 -- mod->core_size = debug_align(mod->core_size);
55048 -+ info->symoffs = ALIGN(mod->core_size_rx, symsect->sh_addralign ?: 1);
55049 -+ info->stroffs = mod->core_size_rx = info->symoffs + ndst * sizeof(Elf_Sym);
55050 -+ mod->core_size_rx += strtab_size;
55051 -+ mod->core_size_rx = debug_align(mod->core_size_rx);
55052 +- info->symoffs = ALIGN(mod->core_layout.size, symsect->sh_addralign ?: 1);
55053 +- info->stroffs = mod->core_layout.size = info->symoffs + ndst * sizeof(Elf_Sym);
55054 +- mod->core_layout.size += strtab_size;
55055 +- mod->core_layout.size = debug_align(mod->core_layout.size);
55056 ++ info->symoffs = ALIGN(mod->core_layout.size_rx, symsect->sh_addralign ?: 1);
55057 ++ info->stroffs = mod->core_layout.size_rx = info->symoffs + ndst * sizeof(Elf_Sym);
55058 ++ mod->core_layout.size_rx += strtab_size;
55059 ++ mod->core_layout.size_rx = debug_align(mod->core_layout.size_rx);
55060
55061 /* Put string table section at end of init part of module. */
55062 strsect->sh_flags |= SHF_ALLOC;
55063 -- strsect->sh_entsize = get_offset(mod, &mod->init_size, strsect,
55064 -+ strsect->sh_entsize = get_offset(mod, &mod->init_size_rx, strsect,
55065 +- strsect->sh_entsize = get_offset(mod, &mod->init_layout.size, strsect,
55066 ++ strsect->sh_entsize = get_offset(mod, &mod->init_layout.size_rx, strsect,
55067 info->index.str) | INIT_OFFSET_MASK;
55068 pr_debug("\t%s\n", info->secstrings + strsect->sh_name);
55069
55070 /* We'll tack temporary mod_kallsyms on the end. */
55071 -- mod->init_size = ALIGN(mod->init_size,
55072 -+ mod->init_size_rx = ALIGN(mod->init_size_rx,
55073 - __alignof__(struct mod_kallsyms));
55074 -- info->mod_kallsyms_init_off = mod->init_size;
55075 -- mod->init_size += sizeof(struct mod_kallsyms);
55076 -- mod->init_size = debug_align(mod->init_size);
55077 -+ info->mod_kallsyms_init_off = mod->init_size_rx;
55078 -+ mod->init_size_rx += sizeof(struct mod_kallsyms);
55079 -+ mod->init_size_rx = debug_align(mod->init_size_rx);
55080 +- mod->init_layout.size = ALIGN(mod->init_layout.size,
55081 ++ mod->init_layout.size_rx = ALIGN(mod->init_layout.size_rx,
55082 + __alignof__(struct mod_kallsyms));
55083 +- info->mod_kallsyms_init_off = mod->init_layout.size;
55084 +- mod->init_layout.size += sizeof(struct mod_kallsyms);
55085 +- mod->init_layout.size = debug_align(mod->init_layout.size);
55086 ++ info->mod_kallsyms_init_off = mod->init_layout.size_rx;
55087 ++ mod->init_layout.size_rx += sizeof(struct mod_kallsyms);
55088 ++ mod->init_layout.size_rx = debug_align(mod->init_layout.size_rx);
55089 }
55090
55091 /*
55092 -@@ -2519,7 +2597,9 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
55093 +@@ -2509,7 +2593,11 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
55094 Elf_Shdr *symsec = &info->sechdrs[info->index.sym];
55095
55096 /* Set up to point into init section. */
55097 -- mod->kallsyms = mod->module_init + info->mod_kallsyms_init_off;
55098 -+ mod->kallsyms = mod->module_init_rx + info->mod_kallsyms_init_off;
55099 +- mod->kallsyms = mod->init_layout.base + info->mod_kallsyms_init_off;
55100 ++ mod->kallsyms = mod->init_layout.base_rx + info->mod_kallsyms_init_off;
55101 ++
55102 ++ pax_open_kernel();
55103 +
55104 + pax_open_kernel();
55105
55106 mod->kallsyms->symtab = (void *)symsec->sh_addr;
55107 mod->kallsyms->num_symtab = symsec->sh_size / sizeof(Elf_Sym);
55108 -@@ -2532,8 +2612,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
55109 +@@ -2522,8 +2610,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
55110 = elf_type(&mod->kallsyms->symtab[i], info);
55111
55112 /* Now populate the cut down core kallsyms for after init. */
55113 -- mod->core_kallsyms.symtab = dst = mod->module_core + info->symoffs;
55114 -- mod->core_kallsyms.strtab = s = mod->module_core + info->stroffs;
55115 -+ mod->core_kallsyms.symtab = dst = mod->module_core_rx + info->symoffs;
55116 -+ mod->core_kallsyms.strtab = s = mod->module_core_rx + info->stroffs;
55117 +- mod->core_kallsyms.symtab = dst = mod->core_layout.base + info->symoffs;
55118 +- mod->core_kallsyms.strtab = s = mod->core_layout.base + info->stroffs;
55119 ++ mod->core_kallsyms.symtab = dst = mod->core_layout.base_rx + info->symoffs;
55120 ++ mod->core_kallsyms.strtab = s = mod->core_layout.base_rx + info->stroffs;
55121 src = mod->kallsyms->symtab;
55122 for (ndst = i = 0; i < mod->kallsyms->num_symtab; i++) {
55123 if (i == 0 ||
55124 -@@ -2545,6 +2625,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
55125 +@@ -2536,6 +2624,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
55126 }
55127 }
55128 mod->core_kallsyms.num_symtab = ndst;
55129 @@ -113640,7 +138025,7 @@ index 0e5c711..940c5c0 100644
55130 }
55131 #else
55132 static inline void layout_symtab(struct module *mod, struct load_info *info)
55133 -@@ -2844,7 +2926,15 @@ static struct module *setup_load_info(struct load_info *info, int flags)
55134 +@@ -2835,7 +2925,15 @@ static struct module *setup_load_info(struct load_info *info, int flags)
55135 mod = (void *)info->sechdrs[info->index.mod].sh_addr;
55136
55137 if (info->index.sym == 0) {
55138 @@ -113656,14 +138041,14 @@ index 0e5c711..940c5c0 100644
55139 return ERR_PTR(-ENOEXEC);
55140 }
55141
55142 -@@ -2860,8 +2950,14 @@ static struct module *setup_load_info(struct load_info *info, int flags)
55143 +@@ -2851,8 +2949,14 @@ static struct module *setup_load_info(struct load_info *info, int flags)
55144 static int check_modinfo(struct module *mod, struct load_info *info, int flags)
55145 {
55146 const char *modmagic = get_modinfo(info, "vermagic");
55147 + const char *license = get_modinfo(info, "license");
55148 int err;
55149
55150 -+#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR
55151 ++#if defined(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR) || defined(CONFIG_PAX_RAP)
55152 + if (!license || !license_is_gpl_compatible(license))
55153 + return -ENOEXEC;
55154 +#endif
55155 @@ -113671,7 +138056,7 @@ index 0e5c711..940c5c0 100644
55156 if (flags & MODULE_INIT_IGNORE_VERMAGIC)
55157 modmagic = NULL;
55158
55159 -@@ -2886,7 +2982,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
55160 +@@ -2877,7 +2981,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
55161 }
55162
55163 /* Set up license info based on the info section */
55164 @@ -113680,102 +138065,102 @@ index 0e5c711..940c5c0 100644
55165
55166 return 0;
55167 }
55168 -@@ -2983,7 +3079,7 @@ static int move_module(struct module *mod, struct load_info *info)
55169 +@@ -2974,7 +3078,7 @@ static int move_module(struct module *mod, struct load_info *info)
55170 void *ptr;
55171
55172 /* Do the allocs. */
55173 -- ptr = module_alloc(mod->core_size);
55174 -+ ptr = module_alloc(mod->core_size_rw);
55175 +- ptr = module_alloc(mod->core_layout.size);
55176 ++ ptr = module_alloc(mod->core_layout.size_rw);
55177 /*
55178 * The pointer to this block is stored in the module structure
55179 * which is inside the block. Just mark it as not being a
55180 -@@ -2993,11 +3089,11 @@ static int move_module(struct module *mod, struct load_info *info)
55181 +@@ -2984,11 +3088,11 @@ static int move_module(struct module *mod, struct load_info *info)
55182 if (!ptr)
55183 return -ENOMEM;
55184
55185 -- memset(ptr, 0, mod->core_size);
55186 -- mod->module_core = ptr;
55187 -+ memset(ptr, 0, mod->core_size_rw);
55188 -+ mod->module_core_rw = ptr;
55189 +- memset(ptr, 0, mod->core_layout.size);
55190 +- mod->core_layout.base = ptr;
55191 ++ memset(ptr, 0, mod->core_layout.size_rw);
55192 ++ mod->core_layout.base_rw = ptr;
55193
55194 -- if (mod->init_size) {
55195 -- ptr = module_alloc(mod->init_size);
55196 -+ if (mod->init_size_rw) {
55197 -+ ptr = module_alloc(mod->init_size_rw);
55198 +- if (mod->init_layout.size) {
55199 +- ptr = module_alloc(mod->init_layout.size);
55200 ++ if (mod->init_layout.size_rw) {
55201 ++ ptr = module_alloc(mod->init_layout.size_rw);
55202 /*
55203 * The pointer to this block is stored in the module structure
55204 * which is inside the block. This block doesn't need to be
55205 -@@ -3006,13 +3102,45 @@ static int move_module(struct module *mod, struct load_info *info)
55206 +@@ -2997,13 +3101,45 @@ static int move_module(struct module *mod, struct load_info *info)
55207 */
55208 kmemleak_ignore(ptr);
55209 if (!ptr) {
55210 -- module_memfree(mod->module_core);
55211 -+ module_memfree(mod->module_core_rw);
55212 +- module_memfree(mod->core_layout.base);
55213 ++ module_memfree(mod->core_layout.base_rw);
55214 return -ENOMEM;
55215 }
55216 -- memset(ptr, 0, mod->init_size);
55217 -- mod->module_init = ptr;
55218 -+ memset(ptr, 0, mod->init_size_rw);
55219 -+ mod->module_init_rw = ptr;
55220 +- memset(ptr, 0, mod->init_layout.size);
55221 +- mod->init_layout.base = ptr;
55222 ++ memset(ptr, 0, mod->init_layout.size_rw);
55223 ++ mod->init_layout.base_rw = ptr;
55224 } else
55225 -- mod->module_init = NULL;
55226 -+ mod->module_init_rw = NULL;
55227 +- mod->init_layout.base = NULL;
55228 ++ mod->init_layout.base_rw = NULL;
55229 +
55230 -+ ptr = module_alloc_exec(mod->core_size_rx);
55231 ++ ptr = module_alloc_exec(mod->core_layout.size_rx);
55232 + kmemleak_not_leak(ptr);
55233 + if (!ptr) {
55234 -+ if (mod->module_init_rw)
55235 -+ module_memfree(mod->module_init_rw);
55236 -+ module_memfree(mod->module_core_rw);
55237 ++ if (mod->init_layout.base_rw)
55238 ++ module_memfree(mod->init_layout.base_rw);
55239 ++ module_memfree(mod->core_layout.base_rw);
55240 + return -ENOMEM;
55241 + }
55242 +
55243 + pax_open_kernel();
55244 -+ memset(ptr, 0, mod->core_size_rx);
55245 ++ memset(ptr, 0, mod->core_layout.size_rx);
55246 + pax_close_kernel();
55247 -+ mod->module_core_rx = ptr;
55248 ++ mod->core_layout.base_rx = ptr;
55249 +
55250 -+ if (mod->init_size_rx) {
55251 -+ ptr = module_alloc_exec(mod->init_size_rx);
55252 ++ if (mod->init_layout.size_rx) {
55253 ++ ptr = module_alloc_exec(mod->init_layout.size_rx);
55254 + kmemleak_ignore(ptr);
55255 + if (!ptr) {
55256 -+ module_memfree_exec(mod->module_core_rx);
55257 -+ if (mod->module_init_rw)
55258 -+ module_memfree(mod->module_init_rw);
55259 -+ module_memfree(mod->module_core_rw);
55260 ++ module_memfree(mod->core_layout.base_rx);
55261 ++ if (mod->init_layout.base_rw)
55262 ++ module_memfree(mod->init_layout.base_rw);
55263 ++ module_memfree(mod->core_layout.base_rw);
55264 + return -ENOMEM;
55265 + }
55266 +
55267 + pax_open_kernel();
55268 -+ memset(ptr, 0, mod->init_size_rx);
55269 ++ memset(ptr, 0, mod->init_layout.size_rx);
55270 + pax_close_kernel();
55271 -+ mod->module_init_rx = ptr;
55272 ++ mod->init_layout.base_rx = ptr;
55273 + } else
55274 -+ mod->module_init_rx = NULL;
55275 ++ mod->init_layout.base_rx = NULL;
55276
55277 /* Transfer each section which specifies SHF_ALLOC */
55278 pr_debug("final section addresses:\n");
55279 -@@ -3023,16 +3151,45 @@ static int move_module(struct module *mod, struct load_info *info)
55280 +@@ -3014,16 +3150,45 @@ static int move_module(struct module *mod, struct load_info *info)
55281 if (!(shdr->sh_flags & SHF_ALLOC))
55282 continue;
55283
55284 - if (shdr->sh_entsize & INIT_OFFSET_MASK)
55285 -- dest = mod->module_init
55286 +- dest = mod->init_layout.base
55287 - + (shdr->sh_entsize & ~INIT_OFFSET_MASK);
55288 - else
55289 -- dest = mod->module_core + shdr->sh_entsize;
55290 +- dest = mod->core_layout.base + shdr->sh_entsize;
55291 + if (shdr->sh_entsize & INIT_OFFSET_MASK) {
55292 + if ((shdr->sh_flags & SHF_WRITE) || !(shdr->sh_flags & SHF_ALLOC))
55293 -+ dest = mod->module_init_rw
55294 ++ dest = mod->init_layout.base_rw
55295 + + (shdr->sh_entsize & ~INIT_OFFSET_MASK);
55296 + else
55297 -+ dest = mod->module_init_rx
55298 ++ dest = mod->init_layout.base_rx
55299 + + (shdr->sh_entsize & ~INIT_OFFSET_MASK);
55300 + } else {
55301 + if ((shdr->sh_flags & SHF_WRITE) || !(shdr->sh_flags & SHF_ALLOC))
55302 -+ dest = mod->module_core_rw + shdr->sh_entsize;
55303 ++ dest = mod->core_layout.base_rw + shdr->sh_entsize;
55304 + else
55305 -+ dest = mod->module_core_rx + shdr->sh_entsize;
55306 ++ dest = mod->core_layout.base_rx + shdr->sh_entsize;
55307 + }
55308 +
55309 + if (shdr->sh_type != SHT_NOBITS) {
55310 @@ -113808,39 +138193,39 @@ index 0e5c711..940c5c0 100644
55311 pr_debug("\t0x%lx %s\n",
55312 (long)shdr->sh_addr, info->secstrings + shdr->sh_name);
55313 }
55314 -@@ -3089,12 +3246,12 @@ static void flush_module_icache(const struct module *mod)
55315 +@@ -3080,12 +3245,12 @@ static void flush_module_icache(const struct module *mod)
55316 * Do it before processing of module parameters, so the module
55317 * can provide parameter accessor functions of its own.
55318 */
55319 -- if (mod->module_init)
55320 -- flush_icache_range((unsigned long)mod->module_init,
55321 -- (unsigned long)mod->module_init
55322 -- + mod->init_size);
55323 -- flush_icache_range((unsigned long)mod->module_core,
55324 -- (unsigned long)mod->module_core + mod->core_size);
55325 -+ if (mod->module_init_rx)
55326 -+ flush_icache_range((unsigned long)mod->module_init_rx,
55327 -+ (unsigned long)mod->module_init_rx
55328 -+ + mod->init_size_rx);
55329 -+ flush_icache_range((unsigned long)mod->module_core_rx,
55330 -+ (unsigned long)mod->module_core_rx + mod->core_size_rx);
55331 +- if (mod->init_layout.base)
55332 +- flush_icache_range((unsigned long)mod->init_layout.base,
55333 +- (unsigned long)mod->init_layout.base
55334 +- + mod->init_layout.size);
55335 +- flush_icache_range((unsigned long)mod->core_layout.base,
55336 +- (unsigned long)mod->core_layout.base + mod->core_layout.size);
55337 ++ if (mod->init_layout.base_rx)
55338 ++ flush_icache_range((unsigned long)mod->init_layout.base_rx,
55339 ++ (unsigned long)mod->init_layout.base_rx
55340 ++ + mod->init_layout.size_rx);
55341 ++ flush_icache_range((unsigned long)mod->core_layout.base_rx,
55342 ++ (unsigned long)mod->core_layout.base_rx + mod->core_layout.size_rx);
55343
55344 set_fs(old_fs);
55345 }
55346 -@@ -3152,8 +3309,10 @@ static void module_deallocate(struct module *mod, struct load_info *info)
55347 +@@ -3143,8 +3308,10 @@ static void module_deallocate(struct module *mod, struct load_info *info)
55348 {
55349 percpu_modfree(mod);
55350 module_arch_freeing_init(mod);
55351 -- module_memfree(mod->module_init);
55352 -- module_memfree(mod->module_core);
55353 -+ module_memfree_exec(mod->module_init_rx);
55354 -+ module_memfree_exec(mod->module_core_rx);
55355 -+ module_memfree(mod->module_init_rw);
55356 -+ module_memfree(mod->module_core_rw);
55357 +- module_memfree(mod->init_layout.base);
55358 +- module_memfree(mod->core_layout.base);
55359 ++ module_memfree_exec(mod->init_layout.base_rx);
55360 ++ module_memfree_exec(mod->core_layout.base_rx);
55361 ++ module_memfree(mod->init_layout.base_rw);
55362 ++ module_memfree(mod->core_layout.base_rw);
55363 }
55364
55365 int __weak module_finalize(const Elf_Ehdr *hdr,
55366 -@@ -3166,7 +3325,9 @@ int __weak module_finalize(const Elf_Ehdr *hdr,
55367 +@@ -3157,7 +3324,9 @@ int __weak module_finalize(const Elf_Ehdr *hdr,
55368 static int post_relocation(struct module *mod, const struct load_info *info)
55369 {
55370 /* Sort exception table now relocations are done. */
55371 @@ -113850,7 +138235,7 @@ index 0e5c711..940c5c0 100644
55372
55373 /* Copy relocated percpu area over. */
55374 percpu_modcopy(mod, (void *)info->sechdrs[info->index.pcpu].sh_addr,
55375 -@@ -3214,13 +3375,15 @@ static void do_mod_ctors(struct module *mod)
55376 +@@ -3205,13 +3374,15 @@ static void do_mod_ctors(struct module *mod)
55377 /* For freeing module_init on success, in case kallsyms traversing */
55378 struct mod_initfree {
55379 struct rcu_head rcu;
55380 @@ -113868,57 +138253,32 @@ index 0e5c711..940c5c0 100644
55381 kfree(m);
55382 }
55383
55384 -@@ -3240,7 +3403,8 @@ static noinline int do_init_module(struct module *mod)
55385 +@@ -3231,7 +3402,8 @@ static noinline int do_init_module(struct module *mod)
55386 ret = -ENOMEM;
55387 goto fail;
55388 }
55389 -- freeinit->module_init = mod->module_init;
55390 -+ freeinit->module_init_rw = mod->module_init_rw;
55391 -+ freeinit->module_init_rx = mod->module_init_rx;
55392 +- freeinit->module_init = mod->init_layout.base;
55393 ++ freeinit->module_init_rx = mod->init_layout.base_rx;
55394 ++ freeinit->module_init_rw = mod->init_layout.base_rw;
55395
55396 /*
55397 * We want to find out whether @mod uses async during init. Clear
55398 -@@ -3299,10 +3463,10 @@ static noinline int do_init_module(struct module *mod)
55399 +@@ -3290,10 +3462,10 @@ static noinline int do_init_module(struct module *mod)
55400 mod_tree_remove_init(mod);
55401 - unset_module_init_ro_nx(mod);
55402 + disable_ro_nx(&mod->init_layout);
55403 module_arch_freeing_init(mod);
55404 -- mod->module_init = NULL;
55405 -- mod->init_size = 0;
55406 -- mod->init_ro_size = 0;
55407 -- mod->init_text_size = 0;
55408 -+ mod->module_init_rw = NULL;
55409 -+ mod->module_init_rx = NULL;
55410 -+ mod->init_size_rw = 0;
55411 -+ mod->init_size_rx = 0;
55412 +- mod->init_layout.base = NULL;
55413 +- mod->init_layout.size = 0;
55414 +- mod->init_layout.ro_size = 0;
55415 +- mod->init_layout.text_size = 0;
55416 ++ mod->init_layout.base_rx = NULL;
55417 ++ mod->init_layout.base_rw = NULL;
55418 ++ mod->init_layout.size_rx = 0;
55419 ++ mod->init_layout.size_rw = 0;
55420 /*
55421 * We want to free module_init, but be aware that kallsyms may be
55422 * walking this with preempt disabled. In all the failure paths, we
55423 -@@ -3392,16 +3556,16 @@ static int complete_formation(struct module *mod, struct load_info *info)
55424 - module_bug_finalize(info->hdr, info->sechdrs, mod);
55425 -
55426 - /* Set RO and NX regions for core */
55427 -- set_section_ro_nx(mod->module_core,
55428 -- mod->core_text_size,
55429 -- mod->core_ro_size,
55430 -- mod->core_size);
55431 -+ set_section_ro_nx(mod->module_core_rx,
55432 -+ mod->core_size_rx,
55433 -+ mod->core_size_rx,
55434 -+ mod->core_size_rx);
55435 -
55436 - /* Set RO and NX regions for init */
55437 -- set_section_ro_nx(mod->module_init,
55438 -- mod->init_text_size,
55439 -- mod->init_ro_size,
55440 -- mod->init_size);
55441 -+ set_section_ro_nx(mod->module_init_rx,
55442 -+ mod->init_size_rx,
55443 -+ mod->init_size_rx,
55444 -+ mod->init_size_rx);
55445 -
55446 - /* Mark state as coming so strong_try_module_get() ignores us,
55447 - * but kallsyms etc. can see us. */
55448 -@@ -3496,9 +3660,38 @@ static int load_module(struct load_info *info, const char __user *uargs,
55449 +@@ -3481,9 +3653,38 @@ static int load_module(struct load_info *info, const char __user *uargs,
55450 if (err)
55451 goto free_unload;
55452
55453 @@ -113957,7 +138317,7 @@ index 0e5c711..940c5c0 100644
55454 /* Fix up syms, so that st_value is a pointer to location. */
55455 err = simplify_symbols(mod, info);
55456 if (err < 0)
55457 -@@ -3514,13 +3707,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
55458 +@@ -3499,13 +3700,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
55459
55460 flush_module_icache(mod);
55461
55462 @@ -113971,7 +138331,7 @@ index 0e5c711..940c5c0 100644
55463 dynamic_debug_setup(info->debug, info->num_debug);
55464
55465 /* Ftrace init must be called in the MODULE_STATE_UNFORMED state */
55466 -@@ -3572,11 +3758,10 @@ static int load_module(struct load_info *info, const char __user *uargs,
55467 +@@ -3557,11 +3751,10 @@ static int load_module(struct load_info *info, const char __user *uargs,
55468 ddebug_cleanup:
55469 dynamic_debug_remove(info->debug);
55470 synchronize_sched();
55471 @@ -113984,55 +138344,55 @@ index 0e5c711..940c5c0 100644
55472 free_unload:
55473 module_unload_free(mod);
55474 unlink_mod:
55475 -@@ -3596,7 +3781,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
55476 +@@ -3581,7 +3774,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
55477 */
55478 ftrace_release_mod(mod);
55479 /* Free lock-classes; relies on the preceding sync_rcu() */
55480 -- lockdep_free_key_range(mod->module_core, mod->core_size);
55481 -+ lockdep_free_key_range(mod->module_core_rx, mod->core_size_rx);
55482 -+ lockdep_free_key_range(mod->module_core_rw, mod->core_size_rw);
55483 +- lockdep_free_key_range(mod->core_layout.base, mod->core_layout.size);
55484 ++ lockdep_free_key_range(mod->core_layout.base_rw, mod->core_layout.size_rw);
55485 ++ lockdep_free_key_range(mod->core_layout.base_rx, mod->core_layout.size_rx);
55486
55487 module_deallocate(mod, info);
55488 free_copy:
55489 -@@ -3679,10 +3865,16 @@ static const char *get_ksymbol(struct module *mod,
55490 +@@ -3664,10 +3858,16 @@ static const char *get_ksymbol(struct module *mod,
55491 struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms);
55492
55493 /* At worse, next value is at end of module */
55494 - if (within_module_init(addr, mod))
55495 -- nextval = (unsigned long)mod->module_init+mod->init_text_size;
55496 -+ if (within_module_init_rx(addr, mod))
55497 -+ nextval = (unsigned long)mod->module_init_rx+mod->init_size_rx;
55498 -+ else if (within_module_init_rw(addr, mod))
55499 -+ nextval = (unsigned long)mod->module_init_rw+mod->init_size_rw;
55500 -+ else if (within_module_core_rx(addr, mod))
55501 -+ nextval = (unsigned long)mod->module_core_rx+mod->core_size_rx;
55502 -+ else if (within_module_core_rw(addr, mod))
55503 -+ nextval = (unsigned long)mod->module_core_rw+mod->core_size_rw;
55504 +- nextval = (unsigned long)mod->init_layout.base+mod->init_layout.text_size;
55505 ++ if (within_module_rx(addr, &mod->init_layout))
55506 ++ nextval = (unsigned long)mod->init_layout.base_rx+mod->init_layout.size_rx;
55507 ++ else if (within_module_rw(addr, &mod->init_layout))
55508 ++ nextval = (unsigned long)mod->init_layout.base_rw+mod->init_layout.size_rw;
55509 ++ else if (within_module_rx(addr, &mod->core_layout))
55510 ++ nextval = (unsigned long)mod->core_layout.base_rx+mod->core_layout.size_rx;
55511 ++ else if (within_module_rw(addr, &mod->core_layout))
55512 ++ nextval = (unsigned long)mod->core_layout.base_rw+mod->core_layout.size_rw;
55513 else
55514 -- nextval = (unsigned long)mod->module_core+mod->core_text_size;
55515 +- nextval = (unsigned long)mod->core_layout.base+mod->core_layout.text_size;
55516 + return NULL;
55517
55518 /* Scan for closest preceding symbol, and next symbol. (ELF
55519 starts real symbols at 1). */
55520 -@@ -3935,7 +4127,7 @@ static int m_show(struct seq_file *m, void *p)
55521 +@@ -3920,7 +4120,7 @@ static int m_show(struct seq_file *m, void *p)
55522 return 0;
55523
55524 seq_printf(m, "%s %u",
55525 -- mod->name, mod->init_size + mod->core_size);
55526 -+ mod->name, mod->init_size_rx + mod->init_size_rw + mod->core_size_rx + mod->core_size_rw);
55527 +- mod->name, mod->init_layout.size + mod->core_layout.size);
55528 ++ mod->name, mod->init_layout.size_rx + mod->init_layout.size_rw + mod->core_layout.size_rx + mod->core_layout.size_rw);
55529 print_unload_info(m, mod);
55530
55531 /* Informative for users. */
55532 -@@ -3944,7 +4136,7 @@ static int m_show(struct seq_file *m, void *p)
55533 +@@ -3929,7 +4129,7 @@ static int m_show(struct seq_file *m, void *p)
55534 mod->state == MODULE_STATE_COMING ? "Loading" :
55535 "Live");
55536 /* Used by oprofile and other similar tools. */
55537 -- seq_printf(m, " 0x%pK", mod->module_core);
55538 -+ seq_printf(m, " 0x%pK 0x%pK", mod->module_core_rx, mod->module_core_rw);
55539 +- seq_printf(m, " 0x%pK", mod->core_layout.base);
55540 ++ seq_printf(m, " 0x%pK 0x%pK", mod->core_layout.base_rx, mod->core_layout.base_rw);
55541
55542 /* Taints info */
55543 if (mod->taints)
55544 -@@ -3980,7 +4172,17 @@ static const struct file_operations proc_modules_operations = {
55545 +@@ -3965,7 +4165,17 @@ static const struct file_operations proc_modules_operations = {
55546
55547 static int __init proc_modules_init(void)
55548 {
55549 @@ -114050,7 +138410,7 @@ index 0e5c711..940c5c0 100644
55550 return 0;
55551 }
55552 module_init(proc_modules_init);
55553 -@@ -4041,7 +4243,8 @@ struct module *__module_address(unsigned long addr)
55554 +@@ -4026,7 +4236,8 @@ struct module *__module_address(unsigned long addr)
55555 {
55556 struct module *mod;
55557
55558 @@ -114060,7 +138420,7 @@ index 0e5c711..940c5c0 100644
55559 return NULL;
55560
55561 module_assert_mutex_or_preempt();
55562 -@@ -4084,11 +4287,20 @@ bool is_module_text_address(unsigned long addr)
55563 +@@ -4069,11 +4280,21 @@ bool is_module_text_address(unsigned long addr)
55564 */
55565 struct module *__module_text_address(unsigned long addr)
55566 {
55567 @@ -114078,9 +138438,10 @@ index 0e5c711..940c5c0 100644
55568 +
55569 if (mod) {
55570 /* Make sure it's within the text section. */
55571 -- if (!within(addr, mod->module_init, mod->init_text_size)
55572 -- && !within(addr, mod->module_core, mod->core_text_size))
55573 -+ if (!within_module_init_rx(addr, mod) && !within_module_core_rx(addr, mod))
55574 +- if (!within(addr, mod->init_layout.base, mod->init_layout.text_size)
55575 +- && !within(addr, mod->core_layout.base, mod->core_layout.text_size))
55576 ++ if (!within_module_rx(addr, &mod->init_layout)
55577 ++ && !within_module_rx(addr, &mod->core_layout))
55578 mod = NULL;
55579 }
55580 return mod;
55581 @@ -114163,7 +138524,7 @@ index b38bea9..91acfbe 100644
55582 atomic_set(&pd->refcnt, 0);
55583 pd->pinst = pinst;
55584 diff --git a/kernel/panic.c b/kernel/panic.c
55585 -index 41e2b54..5292098 100644
55586 +index d96469d..81d6d28 100644
55587 --- a/kernel/panic.c
55588 +++ b/kernel/panic.c
55589 @@ -55,7 +55,7 @@ EXPORT_SYMBOL(panic_blink);
55590 @@ -114175,7 +138536,7 @@ index 41e2b54..5292098 100644
55591 {
55592 while (1)
55593 cpu_relax();
55594 -@@ -438,7 +438,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
55595 +@@ -461,7 +461,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
55596 disable_trace_on_warning();
55597
55598 pr_warn("------------[ cut here ]------------\n");
55599 @@ -114184,7 +138545,34 @@ index 41e2b54..5292098 100644
55600 raw_smp_processor_id(), current->pid, file, line, caller);
55601
55602 if (args)
55603 -@@ -503,7 +503,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
55604 +@@ -485,7 +485,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
55605 + add_taint(taint, LOCKDEP_STILL_OK);
55606 + }
55607 +
55608 +-void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)
55609 ++void warn_slowpath_fmt(const char *file, const int line, const char *fmt, ...)
55610 + {
55611 + struct slowpath_args args;
55612 +
55613 +@@ -497,7 +497,7 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)
55614 + }
55615 + EXPORT_SYMBOL(warn_slowpath_fmt);
55616 +
55617 +-void warn_slowpath_fmt_taint(const char *file, int line,
55618 ++void warn_slowpath_fmt_taint(const char *file, const int line,
55619 + unsigned taint, const char *fmt, ...)
55620 + {
55621 + struct slowpath_args args;
55622 +@@ -510,7 +510,7 @@ void warn_slowpath_fmt_taint(const char *file, int line,
55623 + }
55624 + EXPORT_SYMBOL(warn_slowpath_fmt_taint);
55625 +
55626 +-void warn_slowpath_null(const char *file, int line)
55627 ++void warn_slowpath_null(const char *file, const int line)
55628 + {
55629 + warn_slowpath_common(file, line, __builtin_return_address(0),
55630 + TAINT_WARN, NULL);
55631 +@@ -526,7 +526,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
55632 */
55633 __visible void __stack_chk_fail(void)
55634 {
55635 @@ -114195,7 +138583,7 @@ index 41e2b54..5292098 100644
55636 }
55637 EXPORT_SYMBOL(__stack_chk_fail);
55638 diff --git a/kernel/pid.c b/kernel/pid.c
55639 -index 78b3d9f..1f368d5 100644
55640 +index 4d73a83..4712357 100644
55641 --- a/kernel/pid.c
55642 +++ b/kernel/pid.c
55643 @@ -33,6 +33,7 @@
55644 @@ -114248,6 +138636,24 @@ index 78b3d9f..1f368d5 100644
55645 struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
55646 {
55647 struct pid *pid;
55648 +@@ -497,7 +513,7 @@ struct pid *find_get_pid(pid_t nr)
55649 + }
55650 + EXPORT_SYMBOL_GPL(find_get_pid);
55651 +
55652 +-pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns)
55653 ++pid_t pid_nr_ns(const struct pid *pid, const struct pid_namespace *ns)
55654 + {
55655 + struct upid *upid;
55656 + pid_t nr = 0;
55657 +@@ -511,7 +527,7 @@ pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns)
55658 + }
55659 + EXPORT_SYMBOL_GPL(pid_nr_ns);
55660 +
55661 +-pid_t pid_vnr(struct pid *pid)
55662 ++pid_t pid_vnr(const struct pid *pid)
55663 + {
55664 + return pid_nr_ns(pid, task_active_pid_ns(current));
55665 + }
55666 diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
55667 index a65ba13..f600dbb 100644
55668 --- a/kernel/pid_namespace.c
55669 @@ -114262,7 +138668,7 @@ index a65ba13..f600dbb 100644
55670 if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN))
55671 return -EPERM;
55672 diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
55673 -index 02e8dfa..8b4a8d3 100644
55674 +index 68d3ebc..82bb833 100644
55675 --- a/kernel/power/Kconfig
55676 +++ b/kernel/power/Kconfig
55677 @@ -34,6 +34,8 @@ config HIBERNATE_CALLBACKS
55678 @@ -114318,10 +138724,10 @@ index 564f786..361a18e 100644
55679
55680 if (pm_wakeup_pending()) {
55681 diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
55682 -index c048e34..8ef7f71 100644
55683 +index c963ba5..8d51e8b 100644
55684 --- a/kernel/printk/printk.c
55685 +++ b/kernel/printk/printk.c
55686 -@@ -478,7 +478,7 @@ static int log_store(int facility, int level,
55687 +@@ -479,7 +479,7 @@ static int log_store(int facility, int level,
55688 return msg->text_len;
55689 }
55690
55691 @@ -114330,7 +138736,7 @@ index c048e34..8ef7f71 100644
55692
55693 static int syslog_action_restricted(int type)
55694 {
55695 -@@ -501,6 +501,11 @@ int check_syslog_permissions(int type, int source)
55696 +@@ -502,6 +502,11 @@ int check_syslog_permissions(int type, int source)
55697 if (source == SYSLOG_FROM_PROC && type != SYSLOG_ACTION_OPEN)
55698 goto ok;
55699
55700 @@ -114404,7 +138810,7 @@ index 99513e1..0caa643 100644
55701 }
55702
55703 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
55704 -index 3189e51..fcc8509 100644
55705 +index 2341efe..97ff52b 100644
55706 --- a/kernel/ptrace.c
55707 +++ b/kernel/ptrace.c
55708 @@ -207,12 +207,32 @@ static int ptrace_check_attach(struct task_struct *child, bool ignore_state)
55709 @@ -114470,7 +138876,7 @@ index 3189e51..fcc8509 100644
55710 flags |= PT_PTRACE_CAP;
55711 rcu_read_unlock();
55712 task->ptrace = flags;
55713 -@@ -537,7 +557,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
55714 +@@ -543,7 +563,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
55715 break;
55716 return -EIO;
55717 }
55718 @@ -114479,7 +138885,7 @@ index 3189e51..fcc8509 100644
55719 return -EFAULT;
55720 copied += retval;
55721 src += retval;
55722 -@@ -838,7 +858,7 @@ int ptrace_request(struct task_struct *child, long request,
55723 +@@ -844,7 +864,7 @@ int ptrace_request(struct task_struct *child, long request,
55724 bool seized = child->ptrace & PT_SEIZED;
55725 int ret = -EIO;
55726 siginfo_t siginfo, *si;
55727 @@ -114488,7 +138894,7 @@ index 3189e51..fcc8509 100644
55728 unsigned long __user *datalp = datavp;
55729 unsigned long flags;
55730
55731 -@@ -1089,14 +1109,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
55732 +@@ -1095,14 +1115,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
55733 goto out;
55734 }
55735
55736 @@ -114511,7 +138917,7 @@ index 3189e51..fcc8509 100644
55737 goto out_put_task_struct;
55738 }
55739
55740 -@@ -1124,7 +1151,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
55741 +@@ -1130,7 +1157,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
55742 copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
55743 if (copied != sizeof(tmp))
55744 return -EIO;
55745 @@ -114520,7 +138926,7 @@ index 3189e51..fcc8509 100644
55746 }
55747
55748 int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
55749 -@@ -1217,7 +1244,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
55750 +@@ -1223,7 +1250,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
55751 }
55752
55753 COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid,
55754 @@ -114529,7 +138935,7 @@ index 3189e51..fcc8509 100644
55755 {
55756 struct task_struct *child;
55757 long ret;
55758 -@@ -1233,14 +1260,21 @@ COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid,
55759 +@@ -1239,14 +1266,21 @@ COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid,
55760 goto out;
55761 }
55762
55763 @@ -114553,7 +138959,7 @@ index 3189e51..fcc8509 100644
55764 }
55765
55766 diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
55767 -index d89328e..a2c42e2 100644
55768 +index d2988d0..36d0b79 100644
55769 --- a/kernel/rcu/rcutorture.c
55770 +++ b/kernel/rcu/rcutorture.c
55771 @@ -134,12 +134,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
55772 @@ -114584,7 +138990,7 @@ index d89328e..a2c42e2 100644
55773 static struct list_head rcu_torture_removed;
55774
55775 static int rcu_torture_writer_state;
55776 -@@ -211,11 +211,11 @@ rcu_torture_alloc(void)
55777 +@@ -232,11 +232,11 @@ rcu_torture_alloc(void)
55778
55779 spin_lock_bh(&rcu_torture_lock);
55780 if (list_empty(&rcu_torture_freelist)) {
55781 @@ -114598,7 +139004,7 @@ index d89328e..a2c42e2 100644
55782 p = rcu_torture_freelist.next;
55783 list_del_init(p);
55784 spin_unlock_bh(&rcu_torture_lock);
55785 -@@ -228,7 +228,7 @@ rcu_torture_alloc(void)
55786 +@@ -249,7 +249,7 @@ rcu_torture_alloc(void)
55787 static void
55788 rcu_torture_free(struct rcu_torture *p)
55789 {
55790 @@ -114607,7 +139013,7 @@ index d89328e..a2c42e2 100644
55791 spin_lock_bh(&rcu_torture_lock);
55792 list_add_tail(&p->rtort_free, &rcu_torture_freelist);
55793 spin_unlock_bh(&rcu_torture_lock);
55794 -@@ -309,7 +309,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
55795 +@@ -330,7 +330,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
55796 i = rp->rtort_pipe_count;
55797 if (i > RCU_TORTURE_PIPE_LEN)
55798 i = RCU_TORTURE_PIPE_LEN;
55799 @@ -114616,7 +139022,7 @@ index d89328e..a2c42e2 100644
55800 if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
55801 rp->rtort_mbtest = 0;
55802 return true;
55803 -@@ -839,7 +839,7 @@ rcu_torture_cbflood(void *arg)
55804 +@@ -860,7 +860,7 @@ rcu_torture_cbflood(void *arg)
55805 VERBOSE_TOROUT_STRING("rcu_torture_cbflood task started");
55806 do {
55807 schedule_timeout_interruptible(cbflood_inter_holdoff);
55808 @@ -114625,7 +139031,7 @@ index d89328e..a2c42e2 100644
55809 WARN_ON(signal_pending(current));
55810 for (i = 0; i < cbflood_n_burst; i++) {
55811 for (j = 0; j < cbflood_n_per_burst; j++) {
55812 -@@ -967,7 +967,7 @@ rcu_torture_writer(void *arg)
55813 +@@ -988,7 +988,7 @@ rcu_torture_writer(void *arg)
55814 i = old_rp->rtort_pipe_count;
55815 if (i > RCU_TORTURE_PIPE_LEN)
55816 i = RCU_TORTURE_PIPE_LEN;
55817 @@ -114634,7 +139040,7 @@ index d89328e..a2c42e2 100644
55818 old_rp->rtort_pipe_count++;
55819 switch (synctype[torture_random(&rand) % nsynctypes]) {
55820 case RTWS_DEF_FREE:
55821 -@@ -1106,7 +1106,7 @@ static void rcu_torture_timer(unsigned long unused)
55822 +@@ -1127,7 +1127,7 @@ static void rcu_torture_timer(unsigned long unused)
55823 return;
55824 }
55825 if (p->rtort_mbtest == 0)
55826 @@ -114643,7 +139049,7 @@ index d89328e..a2c42e2 100644
55827 spin_lock(&rand_lock);
55828 cur_ops->read_delay(&rand);
55829 n_rcu_torture_timers++;
55830 -@@ -1182,7 +1182,7 @@ rcu_torture_reader(void *arg)
55831 +@@ -1203,7 +1203,7 @@ rcu_torture_reader(void *arg)
55832 continue;
55833 }
55834 if (p->rtort_mbtest == 0)
55835 @@ -114652,7 +139058,7 @@ index d89328e..a2c42e2 100644
55836 cur_ops->read_delay(&rand);
55837 preempt_disable();
55838 pipe_count = p->rtort_pipe_count;
55839 -@@ -1250,11 +1250,11 @@ rcu_torture_stats_print(void)
55840 +@@ -1271,11 +1271,11 @@ rcu_torture_stats_print(void)
55841 rcu_torture_current,
55842 rcu_torture_current_version,
55843 list_empty(&rcu_torture_freelist),
55844 @@ -114668,7 +139074,7 @@ index d89328e..a2c42e2 100644
55845 n_rcu_torture_boost_ktrerror,
55846 n_rcu_torture_boost_rterror);
55847 pr_cont("rtbf: %ld rtb: %ld nt: %ld ",
55848 -@@ -1266,17 +1266,17 @@ rcu_torture_stats_print(void)
55849 +@@ -1287,17 +1287,17 @@ rcu_torture_stats_print(void)
55850 n_barrier_successes,
55851 n_barrier_attempts,
55852 n_rcu_torture_barrier_error);
55853 @@ -114689,7 +139095,7 @@ index d89328e..a2c42e2 100644
55854 WARN_ON_ONCE(1);
55855 }
55856 pr_cont("Reader Pipe: ");
55857 -@@ -1293,7 +1293,7 @@ rcu_torture_stats_print(void)
55858 +@@ -1314,7 +1314,7 @@ rcu_torture_stats_print(void)
55859 pr_alert("%s%s ", torture_type, TORTURE_FLAG);
55860 pr_cont("Free-Block Circulation: ");
55861 for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
55862 @@ -114698,7 +139104,7 @@ index d89328e..a2c42e2 100644
55863 }
55864 pr_cont("\n");
55865
55866 -@@ -1647,7 +1647,7 @@ rcu_torture_cleanup(void)
55867 +@@ -1669,7 +1669,7 @@ rcu_torture_cleanup(void)
55868
55869 rcu_torture_stats_print(); /* -After- the stats thread is stopped! */
55870
55871 @@ -114707,7 +139113,7 @@ index d89328e..a2c42e2 100644
55872 rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE");
55873 else if (torture_onoff_failures())
55874 rcu_torture_print_module_parms(cur_ops,
55875 -@@ -1772,18 +1772,18 @@ rcu_torture_init(void)
55876 +@@ -1794,18 +1794,18 @@ rcu_torture_init(void)
55877
55878 rcu_torture_current = NULL;
55879 rcu_torture_current_version = 0;
55880 @@ -114755,10 +139161,10 @@ index 944b1b4..45d1d75 100644
55881 __rcu_process_callbacks(&rcu_sched_ctrlblk);
55882 __rcu_process_callbacks(&rcu_bh_ctrlblk);
55883 diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
55884 -index f07343b..5a4e86f5 100644
55885 +index e41dd41..529179d 100644
55886 --- a/kernel/rcu/tree.c
55887 +++ b/kernel/rcu/tree.c
55888 -@@ -336,7 +336,7 @@ static void rcu_momentary_dyntick_idle(void)
55889 +@@ -324,7 +324,7 @@ static void rcu_momentary_dyntick_idle(void)
55890 */
55891 rdtp = this_cpu_ptr(&rcu_dynticks);
55892 smp_mb__before_atomic(); /* Earlier stuff before QS. */
55893 @@ -114767,7 +139173,7 @@ index f07343b..5a4e86f5 100644
55894 smp_mb__after_atomic(); /* Later stuff after QS. */
55895 break;
55896 }
55897 -@@ -658,10 +658,10 @@ static void rcu_eqs_enter_common(long long oldval, bool user)
55898 +@@ -650,10 +650,10 @@ static void rcu_eqs_enter_common(long long oldval, bool user)
55899 rcu_prepare_for_idle();
55900 /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
55901 smp_mb__before_atomic(); /* See above. */
55902 @@ -114780,7 +139186,7 @@ index f07343b..5a4e86f5 100644
55903 rcu_dynticks_task_enter();
55904
55905 /*
55906 -@@ -784,11 +784,11 @@ static void rcu_eqs_exit_common(long long oldval, int user)
55907 +@@ -786,11 +786,11 @@ static void rcu_eqs_exit_common(long long oldval, int user)
55908
55909 rcu_dynticks_task_exit();
55910 smp_mb__before_atomic(); /* Force ordering w/previous sojourn. */
55911 @@ -114794,7 +139200,7 @@ index f07343b..5a4e86f5 100644
55912 rcu_cleanup_after_idle();
55913 trace_rcu_dyntick(TPS("End"), oldval, rdtp->dynticks_nesting);
55914 if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
55915 -@@ -924,12 +924,12 @@ void rcu_nmi_enter(void)
55916 +@@ -936,12 +936,12 @@ void rcu_nmi_enter(void)
55917 * to be in the outermost NMI handler that interrupted an RCU-idle
55918 * period (observation due to Andy Lutomirski).
55919 */
55920 @@ -114810,7 +139216,7 @@ index f07343b..5a4e86f5 100644
55921 incby = 1;
55922 }
55923 rdtp->dynticks_nmi_nesting += incby;
55924 -@@ -954,7 +954,7 @@ void rcu_nmi_exit(void)
55925 +@@ -966,7 +966,7 @@ void rcu_nmi_exit(void)
55926 * to us!)
55927 */
55928 WARN_ON_ONCE(rdtp->dynticks_nmi_nesting <= 0);
55929 @@ -114819,7 +139225,7 @@ index f07343b..5a4e86f5 100644
55930
55931 /*
55932 * If the nesting level is not 1, the CPU wasn't RCU-idle, so
55933 -@@ -969,9 +969,9 @@ void rcu_nmi_exit(void)
55934 +@@ -981,9 +981,9 @@ void rcu_nmi_exit(void)
55935 rdtp->dynticks_nmi_nesting = 0;
55936 /* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
55937 smp_mb__before_atomic(); /* See above. */
55938 @@ -114831,7 +139237,7 @@ index f07343b..5a4e86f5 100644
55939 }
55940
55941 /**
55942 -@@ -984,7 +984,7 @@ void rcu_nmi_exit(void)
55943 +@@ -996,7 +996,7 @@ void rcu_nmi_exit(void)
55944 */
55945 bool notrace __rcu_is_watching(void)
55946 {
55947 @@ -114840,7 +139246,7 @@ index f07343b..5a4e86f5 100644
55948 }
55949
55950 /**
55951 -@@ -1067,7 +1067,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
55952 +@@ -1079,7 +1079,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
55953 static int dyntick_save_progress_counter(struct rcu_data *rdp,
55954 bool *isidle, unsigned long *maxj)
55955 {
55956 @@ -114849,7 +139255,7 @@ index f07343b..5a4e86f5 100644
55957 rcu_sysidle_check_cpu(rdp, isidle, maxj);
55958 if ((rdp->dynticks_snap & 0x1) == 0) {
55959 trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("dti"));
55960 -@@ -1093,7 +1093,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
55961 +@@ -1105,7 +1105,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
55962 int *rcrmp;
55963 unsigned int snap;
55964
55965 @@ -114858,7 +139264,7 @@ index f07343b..5a4e86f5 100644
55966 snap = (unsigned int)rdp->dynticks_snap;
55967
55968 /*
55969 -@@ -2934,7 +2934,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
55970 +@@ -2943,7 +2943,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
55971 /*
55972 * Do RCU core processing for the current CPU.
55973 */
55974 @@ -114867,7 +139273,7 @@ index f07343b..5a4e86f5 100644
55975 {
55976 struct rcu_state *rsp;
55977
55978 -@@ -3587,7 +3587,7 @@ static void rcu_report_exp_rdp(struct rcu_state *rsp, struct rcu_data *rdp,
55979 +@@ -3589,7 +3589,7 @@ static void rcu_report_exp_rdp(struct rcu_state *rsp, struct rcu_data *rdp,
55980 /* Common code for synchronize_{rcu,sched}_expedited() work-done checking. */
55981 static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
55982 struct rcu_data *rdp,
55983 @@ -114876,7 +139282,7 @@ index f07343b..5a4e86f5 100644
55984 {
55985 if (rcu_exp_gp_seq_done(rsp, s)) {
55986 if (rnp)
55987 -@@ -3596,7 +3596,7 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
55988 +@@ -3598,7 +3598,7 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
55989 mutex_unlock(&rdp->exp_funnel_mutex);
55990 /* Ensure test happens before caller kfree(). */
55991 smp_mb__before_atomic(); /* ^^^ */
55992 @@ -114894,7 +139300,7 @@ index f07343b..5a4e86f5 100644
55993 mask_ofl_test |= rdp->grpmask;
55994 }
55995 mask_ofl_ipi = rnp->expmask & ~mask_ofl_test;
55996 -@@ -4156,7 +4156,7 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
55997 +@@ -4182,7 +4182,7 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
55998 rdp->grpmask = 1UL << (cpu - rdp->mynode->grplo);
55999 rdp->dynticks = &per_cpu(rcu_dynticks, cpu);
56000 WARN_ON_ONCE(rdp->dynticks->dynticks_nesting != DYNTICK_TASK_EXIT_IDLE);
56001 @@ -114903,7 +139309,7 @@ index f07343b..5a4e86f5 100644
56002 rdp->cpu = cpu;
56003 rdp->rsp = rsp;
56004 mutex_init(&rdp->exp_funnel_mutex);
56005 -@@ -4187,8 +4187,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
56006 +@@ -4213,8 +4213,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
56007 init_callback_list(rdp); /* Re-enable callbacks on this CPU. */
56008 rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
56009 rcu_sysidle_init_percpu_data(rdp->dynticks);
56010 @@ -114915,7 +139321,7 @@ index f07343b..5a4e86f5 100644
56011
56012 /*
56013 diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
56014 -index 9fb4e23..e47417d 100644
56015 +index 83360b4..84f45b0 100644
56016 --- a/kernel/rcu/tree.h
56017 +++ b/kernel/rcu/tree.h
56018 @@ -114,11 +114,11 @@ struct rcu_dynticks {
56019 @@ -114932,30 +139338,37 @@ index 9fb4e23..e47417d 100644
56020 /* "Idle" excludes userspace execution. */
56021 unsigned long dynticks_idle_jiffies;
56022 /* End of last non-NMI non-idle period. */
56023 -@@ -498,12 +498,12 @@ struct rcu_state {
56024 - /* End of fields guarded by barrier_mutex. */
56025 -
56026 - unsigned long expedited_sequence; /* Take a ticket. */
56027 +@@ -386,10 +386,10 @@ struct rcu_data {
56028 + struct rcu_head oom_head;
56029 + #endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
56030 + struct mutex exp_funnel_mutex;
56031 - atomic_long_t expedited_workdone0; /* # done by others #0. */
56032 - atomic_long_t expedited_workdone1; /* # done by others #1. */
56033 - atomic_long_t expedited_workdone2; /* # done by others #2. */
56034 - atomic_long_t expedited_workdone3; /* # done by others #3. */
56035 -- atomic_long_t expedited_normal; /* # fallbacks to normal. */
56036 -- atomic_t expedited_need_qs; /* # CPUs left to check in. */
56037 + atomic_long_unchecked_t expedited_workdone0; /* # done by others #0. */
56038 + atomic_long_unchecked_t expedited_workdone1; /* # done by others #1. */
56039 + atomic_long_unchecked_t expedited_workdone2; /* # done by others #2. */
56040 + atomic_long_unchecked_t expedited_workdone3; /* # done by others #3. */
56041 -+ atomic_long_unchecked_t expedited_normal; /* # fallbacks to normal. */
56042 -+ atomic_unchecked_t expedited_need_qs; /* # CPUs left to check in. */
56043 +
56044 + /* 7) Callback offloading. */
56045 + #ifdef CONFIG_RCU_NOCB_CPU
56046 +@@ -504,8 +504,8 @@ struct rcu_state {
56047 + /* End of fields guarded by barrier_mutex. */
56048 +
56049 + unsigned long expedited_sequence; /* Take a ticket. */
56050 +- atomic_long_t expedited_normal; /* # fallbacks to normal. */
56051 +- atomic_t expedited_need_qs; /* # CPUs left to check in. */
56052 ++ atomic_long_unchecked_t expedited_normal;/* # fallbacks to normal. */
56053 ++ atomic_unchecked_t expedited_need_qs; /* # CPUs left to check in. */
56054 wait_queue_head_t expedited_wq; /* Wait for check-ins. */
56055 int ncpus_snap; /* # CPUs seen last time. */
56056
56057 diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
56058 -index 630c197..1db30ad 100644
56059 +index 9467a8b..6b9809d 100644
56060 --- a/kernel/rcu/tree_plugin.h
56061 +++ b/kernel/rcu/tree_plugin.h
56062 -@@ -1276,7 +1276,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
56063 +@@ -1269,7 +1269,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
56064 free_cpumask_var(cm);
56065 }
56066
56067 @@ -114964,7 +139377,7 @@ index 630c197..1db30ad 100644
56068 .store = &rcu_cpu_kthread_task,
56069 .thread_should_run = rcu_cpu_kthread_should_run,
56070 .thread_fn = rcu_cpu_kthread,
56071 -@@ -1749,7 +1749,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
56072 +@@ -1738,7 +1738,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
56073 "o."[!!(rdp->grpmask & rdp->mynode->qsmaskinit)],
56074 "N."[!!(rdp->grpmask & rdp->mynode->qsmaskinitnext)],
56075 ticks_value, ticks_title,
56076 @@ -114973,7 +139386,7 @@ index 630c197..1db30ad 100644
56077 rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting,
56078 rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu),
56079 READ_ONCE(rsp->n_force_qs) - rsp->n_force_qs_gpstart,
56080 -@@ -2279,8 +2279,8 @@ static int rcu_nocb_kthread(void *arg)
56081 +@@ -2267,8 +2267,8 @@ static int rcu_nocb_kthread(void *arg)
56082 }
56083 trace_rcu_batch_end(rdp->rsp->name, c, !!list, 0, 0, 1);
56084 smp_mb__before_atomic(); /* _add after CB invocation. */
56085 @@ -114984,7 +139397,7 @@ index 630c197..1db30ad 100644
56086 rdp->n_nocbs_invoked += c;
56087 }
56088 return 0;
56089 -@@ -2630,9 +2630,9 @@ static void rcu_sysidle_enter(int irq)
56090 +@@ -2618,9 +2618,9 @@ static void rcu_sysidle_enter(int irq)
56091 j = jiffies;
56092 WRITE_ONCE(rdtp->dynticks_idle_jiffies, j);
56093 smp_mb__before_atomic();
56094 @@ -114996,7 +139409,7 @@ index 630c197..1db30ad 100644
56095 }
56096
56097 /*
56098 -@@ -2703,9 +2703,9 @@ static void rcu_sysidle_exit(int irq)
56099 +@@ -2691,9 +2691,9 @@ static void rcu_sysidle_exit(int irq)
56100
56101 /* Record end of idle period. */
56102 smp_mb__before_atomic();
56103 @@ -115008,7 +139421,7 @@ index 630c197..1db30ad 100644
56104
56105 /*
56106 * If we are the timekeeping CPU, we are permitted to be non-idle
56107 -@@ -2751,7 +2751,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle,
56108 +@@ -2739,7 +2739,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle,
56109 WARN_ON_ONCE(smp_processor_id() != tick_do_timer_cpu);
56110
56111 /* Pick up current idle and NMI-nesting counter and check. */
56112 @@ -115018,10 +139431,10 @@ index 630c197..1db30ad 100644
56113 *isidle = false; /* We are not idle! */
56114 return;
56115 diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c
56116 -index ef7093c..1cc3d0f 100644
56117 +index 1088e64..d3b77f7 100644
56118 --- a/kernel/rcu/tree_trace.c
56119 +++ b/kernel/rcu/tree_trace.c
56120 -@@ -125,7 +125,7 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
56121 +@@ -124,7 +124,7 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
56122 rdp->rcu_qs_ctr_snap == per_cpu(rcu_qs_ctr, rdp->cpu),
56123 rdp->core_needs_qs);
56124 seq_printf(m, " dt=%d/%llx/%d df=%lu",
56125 @@ -115030,27 +139443,30 @@ index ef7093c..1cc3d0f 100644
56126 rdp->dynticks->dynticks_nesting,
56127 rdp->dynticks->dynticks_nmi_nesting,
56128 rdp->dynticks_fqs);
56129 -@@ -187,12 +187,12 @@ static int show_rcuexp(struct seq_file *m, void *v)
56130 +@@ -189,15 +189,15 @@ static int show_rcuexp(struct seq_file *m, void *v)
56131
56132 + for_each_possible_cpu(cpu) {
56133 + rdp = per_cpu_ptr(rsp->rda, cpu);
56134 +- s0 += atomic_long_read(&rdp->expedited_workdone0);
56135 +- s1 += atomic_long_read(&rdp->expedited_workdone1);
56136 +- s2 += atomic_long_read(&rdp->expedited_workdone2);
56137 +- s3 += atomic_long_read(&rdp->expedited_workdone3);
56138 ++ s0 += atomic_long_read_unchecked(&rdp->expedited_workdone0);
56139 ++ s1 += atomic_long_read_unchecked(&rdp->expedited_workdone1);
56140 ++ s2 += atomic_long_read_unchecked(&rdp->expedited_workdone2);
56141 ++ s3 += atomic_long_read_unchecked(&rdp->expedited_workdone3);
56142 + }
56143 seq_printf(m, "s=%lu wd0=%lu wd1=%lu wd2=%lu wd3=%lu n=%lu enq=%d sc=%lu\n",
56144 - rsp->expedited_sequence,
56145 -- atomic_long_read(&rsp->expedited_workdone0),
56146 -- atomic_long_read(&rsp->expedited_workdone1),
56147 -- atomic_long_read(&rsp->expedited_workdone2),
56148 -- atomic_long_read(&rsp->expedited_workdone3),
56149 + rsp->expedited_sequence, s0, s1, s2, s3,
56150 - atomic_long_read(&rsp->expedited_normal),
56151 - atomic_read(&rsp->expedited_need_qs),
56152 -+ atomic_long_read_unchecked(&rsp->expedited_workdone0),
56153 -+ atomic_long_read_unchecked(&rsp->expedited_workdone1),
56154 -+ atomic_long_read_unchecked(&rsp->expedited_workdone2),
56155 -+ atomic_long_read_unchecked(&rsp->expedited_workdone3),
56156 + atomic_long_read_unchecked(&rsp->expedited_normal),
56157 + atomic_read_unchecked(&rsp->expedited_need_qs),
56158 rsp->expedited_sequence / 2);
56159 return 0;
56160 }
56161 diff --git a/kernel/resource.c b/kernel/resource.c
56162 -index 249b1eb..b3451db 100644
56163 +index 3669d1b..7edf101 100644
56164 --- a/kernel/resource.c
56165 +++ b/kernel/resource.c
56166 @@ -84,8 +84,8 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
56167 @@ -115093,7 +139509,7 @@ index 249b1eb..b3451db 100644
56168 }
56169 __initcall(ioresources_init);
56170 diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c
56171 -index 750ed60..eb01466 100644
56172 +index a5d966c..9c2d28b 100644
56173 --- a/kernel/sched/auto_group.c
56174 +++ b/kernel/sched/auto_group.c
56175 @@ -9,7 +9,7 @@
56176 @@ -115115,10 +139531,10 @@ index 750ed60..eb01466 100644
56177 #ifdef CONFIG_RT_GROUP_SCHED
56178 /*
56179 diff --git a/kernel/sched/core.c b/kernel/sched/core.c
56180 -index 70e5e09..87f2797 100644
56181 +index a74073f8..757e116 100644
56182 --- a/kernel/sched/core.c
56183 +++ b/kernel/sched/core.c
56184 -@@ -2162,7 +2162,7 @@ void set_numabalancing_state(bool enabled)
56185 +@@ -2263,7 +2263,7 @@ void set_numabalancing_state(bool enabled)
56186 int sysctl_numa_balancing(struct ctl_table *table, int write,
56187 void __user *buffer, size_t *lenp, loff_t *ppos)
56188 {
56189 @@ -115127,7 +139543,25 @@ index 70e5e09..87f2797 100644
56190 int err;
56191 int state = static_branch_likely(&sched_numa_balancing);
56192
56193 -@@ -2683,8 +2683,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
56194 +@@ -2702,7 +2702,7 @@ static struct rq *finish_task_switch(struct task_struct *prev)
56195 + /* rq->lock is NOT held, but preemption is disabled */
56196 + static void __balance_callback(struct rq *rq)
56197 + {
56198 +- struct callback_head *head, *next;
56199 ++ struct balance_callback *head, *next;
56200 + void (*func)(struct rq *rq);
56201 + unsigned long flags;
56202 +
56203 +@@ -2710,7 +2710,7 @@ static void __balance_callback(struct rq *rq)
56204 + head = rq->balance_callback;
56205 + rq->balance_callback = NULL;
56206 + while (head) {
56207 +- func = (void (*)(struct rq *))head->func;
56208 ++ func = head->func;
56209 + next = head->next;
56210 + head->next = NULL;
56211 + head = next;
56212 +@@ -2784,8 +2784,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
56213 next->active_mm = oldmm;
56214 atomic_inc(&oldmm->mm_count);
56215 enter_lazy_tlb(oldmm, next);
56216 @@ -115139,7 +139573,7 @@ index 70e5e09..87f2797 100644
56217
56218 if (!prev->mm) {
56219 prev->active_mm = NULL;
56220 -@@ -3506,6 +3508,8 @@ int can_nice(const struct task_struct *p, const int nice)
56221 +@@ -3609,6 +3611,8 @@ int can_nice(const struct task_struct *p, const int nice)
56222 /* convert nice value [19,-20] to rlimit style value [1,40] */
56223 int nice_rlim = nice_to_rlimit(nice);
56224
56225 @@ -115148,7 +139582,7 @@ index 70e5e09..87f2797 100644
56226 return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
56227 capable(CAP_SYS_NICE));
56228 }
56229 -@@ -3532,7 +3536,8 @@ SYSCALL_DEFINE1(nice, int, increment)
56230 +@@ -3635,7 +3639,8 @@ SYSCALL_DEFINE1(nice, int, increment)
56231 nice = task_nice(current) + increment;
56232
56233 nice = clamp_val(nice, MIN_NICE, MAX_NICE);
56234 @@ -115158,7 +139592,7 @@ index 70e5e09..87f2797 100644
56235 return -EPERM;
56236
56237 retval = security_task_setnice(current, nice);
56238 -@@ -3841,6 +3846,7 @@ recheck:
56239 +@@ -3944,6 +3949,7 @@ recheck:
56240 if (policy != p->policy && !rlim_rtprio)
56241 return -EPERM;
56242
56243 @@ -115166,7 +139600,7 @@ index 70e5e09..87f2797 100644
56244 /* can't increase priority */
56245 if (attr->sched_priority > p->rt_priority &&
56246 attr->sched_priority > rlim_rtprio)
56247 -@@ -5180,6 +5186,7 @@ void idle_task_exit(void)
56248 +@@ -5285,6 +5291,7 @@ void idle_task_exit(void)
56249
56250 if (mm != &init_mm) {
56251 switch_mm(mm, &init_mm, current);
56252 @@ -115174,7 +139608,7 @@ index 70e5e09..87f2797 100644
56253 finish_arch_post_lock_switch();
56254 }
56255 mmdrop(mm);
56256 -@@ -5305,7 +5312,7 @@ static void migrate_tasks(struct rq *dead_rq)
56257 +@@ -5410,7 +5417,7 @@ static void migrate_tasks(struct rq *dead_rq)
56258
56259 #if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
56260
56261 @@ -115183,7 +139617,7 @@ index 70e5e09..87f2797 100644
56262 {
56263 .procname = "sched_domain",
56264 .mode = 0555,
56265 -@@ -5322,17 +5329,17 @@ static struct ctl_table sd_ctl_root[] = {
56266 +@@ -5427,17 +5434,17 @@ static struct ctl_table sd_ctl_root[] = {
56267 {}
56268 };
56269
56270 @@ -115205,7 +139639,7 @@ index 70e5e09..87f2797 100644
56271
56272 /*
56273 * In the intermediate directories, both the child directory and
56274 -@@ -5340,22 +5347,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
56275 +@@ -5445,22 +5452,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
56276 * will always be set. In the lowest directory the names are
56277 * static strings and all have proc handlers.
56278 */
56279 @@ -115237,7 +139671,7 @@ index 70e5e09..87f2797 100644
56280 const char *procname, void *data, int maxlen,
56281 umode_t mode, proc_handler *proc_handler,
56282 bool load_idx)
56283 -@@ -5375,7 +5385,7 @@ set_table_entry(struct ctl_table *entry,
56284 +@@ -5480,7 +5490,7 @@ set_table_entry(struct ctl_table *entry,
56285 static struct ctl_table *
56286 sd_alloc_ctl_domain_table(struct sched_domain *sd)
56287 {
56288 @@ -115246,7 +139680,7 @@ index 70e5e09..87f2797 100644
56289
56290 if (table == NULL)
56291 return NULL;
56292 -@@ -5413,9 +5423,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
56293 +@@ -5518,9 +5528,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
56294 return table;
56295 }
56296
56297 @@ -115258,7 +139692,7 @@ index 70e5e09..87f2797 100644
56298 struct sched_domain *sd;
56299 int domain_num = 0, i;
56300 char buf[32];
56301 -@@ -5442,11 +5452,13 @@ static struct ctl_table_header *sd_sysctl_header;
56302 +@@ -5547,11 +5557,13 @@ static struct ctl_table_header *sd_sysctl_header;
56303 static void register_sched_domain_sysctl(void)
56304 {
56305 int i, cpu_num = num_possible_cpus();
56306 @@ -115273,7 +139707,7 @@ index 70e5e09..87f2797 100644
56307
56308 if (entry == NULL)
56309 return;
56310 -@@ -5468,8 +5480,12 @@ static void unregister_sched_domain_sysctl(void)
56311 +@@ -5573,8 +5585,12 @@ static void unregister_sched_domain_sysctl(void)
56312 {
56313 unregister_sysctl_table(sd_sysctl_header);
56314 sd_sysctl_header = NULL;
56315 @@ -115288,6 +139722,21 @@ index 70e5e09..87f2797 100644
56316 }
56317 #else
56318 static void register_sched_domain_sysctl(void)
56319 +diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
56320 +index 57b939c..cbedaf1 100644
56321 +--- a/kernel/sched/deadline.c
56322 ++++ b/kernel/sched/deadline.c
56323 +@@ -219,8 +219,8 @@ static inline bool need_pull_dl_task(struct rq *rq, struct task_struct *prev)
56324 + return dl_task(prev);
56325 + }
56326 +
56327 +-static DEFINE_PER_CPU(struct callback_head, dl_push_head);
56328 +-static DEFINE_PER_CPU(struct callback_head, dl_pull_head);
56329 ++static DEFINE_PER_CPU(struct balance_callback, dl_push_head);
56330 ++static DEFINE_PER_CPU(struct balance_callback, dl_pull_head);
56331 +
56332 + static void push_dl_tasks(struct rq *);
56333 + static void pull_dl_task(struct rq *);
56334 diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
56335 index 6415117..7dc45dc 100644
56336 --- a/kernel/sched/debug.c
56337 @@ -115305,10 +139754,10 @@ index 6415117..7dc45dc 100644
56338 return -ENOMEM;
56339 return 0;
56340 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
56341 -index cfdc0e6..71f2abd 100644
56342 +index adff850..4f219e5 100644
56343 --- a/kernel/sched/fair.c
56344 +++ b/kernel/sched/fair.c
56345 -@@ -7817,7 +7817,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { }
56346 +@@ -7961,7 +7961,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { }
56347 * run_rebalance_domains is triggered when needed from the scheduler tick.
56348 * Also triggered for nohz idle balancing (with nohz_balancing_kick set).
56349 */
56350 @@ -115317,11 +139766,56 @@ index cfdc0e6..71f2abd 100644
56351 {
56352 struct rq *this_rq = this_rq();
56353 enum cpu_idle_type idle = this_rq->idle_balance ?
56354 +diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
56355 +index 8ec86ab..2d88518 100644
56356 +--- a/kernel/sched/rt.c
56357 ++++ b/kernel/sched/rt.c
56358 +@@ -354,8 +354,8 @@ static inline int has_pushable_tasks(struct rq *rq)
56359 + return !plist_head_empty(&rq->rt.pushable_tasks);
56360 + }
56361 +
56362 +-static DEFINE_PER_CPU(struct callback_head, rt_push_head);
56363 +-static DEFINE_PER_CPU(struct callback_head, rt_pull_head);
56364 ++static DEFINE_PER_CPU(struct balance_callback, rt_push_head);
56365 ++static DEFINE_PER_CPU(struct balance_callback, rt_pull_head);
56366 +
56367 + static void push_rt_tasks(struct rq *);
56368 + static void pull_rt_task(struct rq *);
56369 diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
56370 -index 0517abd..b185177 100644
56371 +index ff87d88..818b3f5 100644
56372 --- a/kernel/sched/sched.h
56373 +++ b/kernel/sched/sched.h
56374 -@@ -1228,7 +1228,7 @@ struct sched_class {
56375 +@@ -631,7 +631,10 @@ struct rq {
56376 + unsigned long cpu_capacity;
56377 + unsigned long cpu_capacity_orig;
56378 +
56379 +- struct callback_head *balance_callback;
56380 ++ struct balance_callback {
56381 ++ struct balance_callback *next;
56382 ++ void (*func)(struct rq *rq);
56383 ++ } *balance_callback;
56384 +
56385 + unsigned char idle_balance;
56386 + /* For active balancing */
56387 +@@ -777,7 +780,7 @@ extern int migrate_swap(struct task_struct *, struct task_struct *);
56388 +
56389 + static inline void
56390 + queue_balance_callback(struct rq *rq,
56391 +- struct callback_head *head,
56392 ++ struct balance_callback *head,
56393 + void (*func)(struct rq *rq))
56394 + {
56395 + lockdep_assert_held(&rq->lock);
56396 +@@ -785,7 +788,7 @@ queue_balance_callback(struct rq *rq,
56397 + if (unlikely(head->next))
56398 + return;
56399 +
56400 +- head->func = (void (*)(struct callback_head *))func;
56401 ++ head->func = func;
56402 + head->next = rq->balance_callback;
56403 + rq->balance_callback = head;
56404 + }
56405 +@@ -1204,7 +1207,7 @@ struct sched_class {
56406 #ifdef CONFIG_FAIR_GROUP_SCHED
56407 void (*task_move_group) (struct task_struct *p);
56408 #endif
56409 @@ -115330,8 +139824,17 @@ index 0517abd..b185177 100644
56410
56411 static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
56412 {
56413 +@@ -1274,7 +1277,7 @@ extern struct dl_bandwidth def_dl_bandwidth;
56414 + extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime);
56415 + extern void init_dl_task_timer(struct sched_dl_entity *dl_se);
56416 +
56417 +-unsigned long to_ratio(u64 period, u64 runtime);
56418 ++unsigned long __attribute_const__ to_ratio(u64 period, u64 runtime);
56419 +
56420 + extern void init_entity_runnable_average(struct sched_entity *se);
56421 +
56422 diff --git a/kernel/signal.c b/kernel/signal.c
56423 -index f3f1f7a..d2e7863 100644
56424 +index 0508544..a1106d5 100644
56425 --- a/kernel/signal.c
56426 +++ b/kernel/signal.c
56427 @@ -53,12 +53,12 @@ static struct kmem_cache *sigqueue_cachep;
56428 @@ -115525,6 +140028,37 @@ index f3f1f7a..d2e7863 100644
56429 compat_user_stack_pointer());
56430 set_fs(seg);
56431 if (ret >= 0 && uoss_ptr) {
56432 +@@ -3478,7 +3513,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask)
56433 + SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
56434 + {
56435 + struct k_sigaction new_sa, old_sa;
56436 +- int ret;
56437 ++ long ret;
56438 +
56439 + new_sa.sa.sa_handler = handler;
56440 + new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK;
56441 +@@ -3486,7 +3521,7 @@ SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
56442 +
56443 + ret = do_sigaction(sig, &new_sa, &old_sa);
56444 +
56445 +- return ret ? ret : (unsigned long)old_sa.sa.sa_handler;
56446 ++ return ret ? ret : (long)old_sa.sa.sa_handler;
56447 + }
56448 + #endif /* __ARCH_WANT_SYS_SIGNAL */
56449 +
56450 +diff --git a/kernel/smp.c b/kernel/smp.c
56451 +index d903c02..c3efd35 100644
56452 +--- a/kernel/smp.c
56453 ++++ b/kernel/smp.c
56454 +@@ -588,7 +588,7 @@ void __init smp_init(void)
56455 + * early_boot_irqs_disabled is set. Use local_irq_save/restore() instead
56456 + * of local_irq_disable/enable().
56457 + */
56458 +-int on_each_cpu(void (*func) (void *info), void *info, int wait)
56459 ++int on_each_cpu(smp_call_func_t func, void *info, int wait)
56460 + {
56461 + unsigned long flags;
56462 + int ret = 0;
56463 diff --git a/kernel/smpboot.c b/kernel/smpboot.c
56464 index d264f59..48b8da3 100644
56465 --- a/kernel/smpboot.c
56466 @@ -115606,10 +140140,10 @@ index 479e443..4072c49 100644
56467 .thread_should_run = ksoftirqd_should_run,
56468 .thread_fn = run_ksoftirqd,
56469 diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
56470 -index a3bbaee..e8cd0bf 100644
56471 +index a467e6c..7743481 100644
56472 --- a/kernel/stop_machine.c
56473 +++ b/kernel/stop_machine.c
56474 -@@ -503,7 +503,7 @@ void stop_machine_unpark(int cpu)
56475 +@@ -501,7 +501,7 @@ void stop_machine_unpark(int cpu)
56476 kthread_unpark(stopper->thread);
56477 }
56478
56479 @@ -115801,8 +140335,27 @@ index 78947de..cb182d1 100644
56480 }
56481 if (!retval) {
56482 if (old_rlim)
56483 +diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
56484 +index 2c5e3a8..301fb1a 100644
56485 +--- a/kernel/sys_ni.c
56486 ++++ b/kernel/sys_ni.c
56487 +@@ -6,12 +6,12 @@
56488 +
56489 + /* we can't #include <linux/syscalls.h> here,
56490 + but tell gcc to not warn with -Wmissing-prototypes */
56491 +-asmlinkage long sys_ni_syscall(void);
56492 ++asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
56493 +
56494 + /*
56495 + * Non-implemented system calls get redirected here.
56496 + */
56497 +-asmlinkage long sys_ni_syscall(void)
56498 ++asmlinkage long sys_ni_syscall(unsigned long a, unsigned long b, unsigned long c, unsigned long d, unsigned long e, unsigned long f)
56499 + {
56500 + return -ENOSYS;
56501 + }
56502 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
56503 -index dc6858d..93aa01c 100644
56504 +index 97715fd..bf1e10a 100644
56505 --- a/kernel/sysctl.c
56506 +++ b/kernel/sysctl.c
56507 @@ -95,7 +95,6 @@
56508 @@ -116020,28 +140573,7 @@ index dc6858d..93aa01c 100644
56509 #else
56510 {
56511 .procname = "nr_trim_pages",
56512 -@@ -1735,6 +1795,20 @@ static struct ctl_table fs_table[] = {
56513 - .proc_handler = &pipe_proc_fn,
56514 - .extra1 = &pipe_min_size,
56515 - },
56516 -+ {
56517 -+ .procname = "pipe-user-pages-hard",
56518 -+ .data = &pipe_user_pages_hard,
56519 -+ .maxlen = sizeof(pipe_user_pages_hard),
56520 -+ .mode = 0644,
56521 -+ .proc_handler = proc_doulongvec_minmax,
56522 -+ },
56523 -+ {
56524 -+ .procname = "pipe-user-pages-soft",
56525 -+ .data = &pipe_user_pages_soft,
56526 -+ .maxlen = sizeof(pipe_user_pages_soft),
56527 -+ .mode = 0644,
56528 -+ .proc_handler = proc_doulongvec_minmax,
56529 -+ },
56530 - { }
56531 - };
56532 -
56533 -@@ -1885,6 +1959,16 @@ int proc_dostring(struct ctl_table *table, int write,
56534 +@@ -1921,6 +1981,16 @@ int proc_dostring(struct ctl_table *table, int write,
56535 (char __user *)buffer, lenp, ppos);
56536 }
56537
56538 @@ -116058,7 +140590,7 @@ index dc6858d..93aa01c 100644
56539 static size_t proc_skip_spaces(char **buf)
56540 {
56541 size_t ret;
56542 -@@ -1990,6 +2074,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
56543 +@@ -2026,6 +2096,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
56544 len = strlen(tmp);
56545 if (len > *size)
56546 len = *size;
56547 @@ -116067,7 +140599,7 @@ index dc6858d..93aa01c 100644
56548 if (copy_to_user(*buf, tmp, len))
56549 return -EFAULT;
56550 *size -= len;
56551 -@@ -2168,6 +2254,44 @@ int proc_dointvec(struct ctl_table *table, int write,
56552 +@@ -2196,6 +2268,44 @@ int proc_dointvec(struct ctl_table *table, int write,
56553 NULL,NULL);
56554 }
56555
56556 @@ -116112,7 +140644,7 @@ index dc6858d..93aa01c 100644
56557 /*
56558 * Taint values can only be increased
56559 * This means we can safely use a temporary.
56560 -@@ -2175,7 +2299,7 @@ int proc_dointvec(struct ctl_table *table, int write,
56561 +@@ -2203,7 +2313,7 @@ int proc_dointvec(struct ctl_table *table, int write,
56562 static int proc_taint(struct ctl_table *table, int write,
56563 void __user *buffer, size_t *lenp, loff_t *ppos)
56564 {
56565 @@ -116121,7 +140653,7 @@ index dc6858d..93aa01c 100644
56566 unsigned long tmptaint = get_taint();
56567 int err;
56568
56569 -@@ -2203,16 +2327,14 @@ static int proc_taint(struct ctl_table *table, int write,
56570 +@@ -2231,16 +2341,14 @@ static int proc_taint(struct ctl_table *table, int write,
56571 return err;
56572 }
56573
56574 @@ -116140,7 +140672,7 @@ index dc6858d..93aa01c 100644
56575
56576 struct do_proc_dointvec_minmax_conv_param {
56577 int *min;
56578 -@@ -2243,6 +2365,32 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp,
56579 +@@ -2271,6 +2379,32 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp,
56580 return 0;
56581 }
56582
56583 @@ -116173,7 +140705,7 @@ index dc6858d..93aa01c 100644
56584 /**
56585 * proc_dointvec_minmax - read a vector of integers with min/max values
56586 * @table: the sysctl table
56587 -@@ -2270,6 +2418,17 @@ int proc_dointvec_minmax(struct ctl_table *table, int write,
56588 +@@ -2298,6 +2432,17 @@ int proc_dointvec_minmax(struct ctl_table *table, int write,
56589 do_proc_dointvec_minmax_conv, &param);
56590 }
56591
56592 @@ -116191,7 +140723,7 @@ index dc6858d..93aa01c 100644
56593 static void validate_coredump_safety(void)
56594 {
56595 #ifdef CONFIG_COREDUMP
56596 -@@ -2772,6 +2931,12 @@ int proc_dostring(struct ctl_table *table, int write,
56597 +@@ -2785,6 +2930,12 @@ int proc_dostring(struct ctl_table *table, int write,
56598 return -ENOSYS;
56599 }
56600
56601 @@ -116204,7 +140736,7 @@ index dc6858d..93aa01c 100644
56602 int proc_dointvec(struct ctl_table *table, int write,
56603 void __user *buffer, size_t *lenp, loff_t *ppos)
56604 {
56605 -@@ -2828,5 +2993,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
56606 +@@ -2841,5 +2992,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
56607 EXPORT_SYMBOL(proc_dointvec_userhz_jiffies);
56608 EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
56609 EXPORT_SYMBOL(proc_dostring);
56610 @@ -116239,10 +140771,19 @@ index 21f82c2..c1984e5 100644
56611 return cmd_attr_register_cpumask(info);
56612 else if (info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK])
56613 diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
56614 -index 7fbba635..7cc64ae 100644
56615 +index e840ed86..4a303b7 100644
56616 --- a/kernel/time/alarmtimer.c
56617 +++ b/kernel/time/alarmtimer.c
56618 -@@ -820,7 +820,7 @@ static int __init alarmtimer_init(void)
56619 +@@ -523,7 +523,7 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp)
56620 + *
56621 + * Provides the underlying alarm base time.
56622 + */
56623 +-static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
56624 ++static int alarm_clock_get(const clockid_t which_clock, struct timespec *tp)
56625 + {
56626 + struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)];
56627 +
56628 +@@ -837,7 +837,7 @@ static int __init alarmtimer_init(void)
56629 struct platform_device *pdev;
56630 int error = 0;
56631 int i;
56632 @@ -116251,6 +140792,46 @@ index 7fbba635..7cc64ae 100644
56633 .clock_getres = alarm_clock_getres,
56634 .clock_get = alarm_clock_get,
56635 .timer_create = alarm_timer_create,
56636 +diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
56637 +index 9cff0ab..0e69c94 100644
56638 +--- a/kernel/time/posix-clock.c
56639 ++++ b/kernel/time/posix-clock.c
56640 +@@ -273,7 +273,7 @@ static void put_clock_desc(struct posix_clock_desc *cd)
56641 + fput(cd->fp);
56642 + }
56643 +
56644 +-static int pc_clock_adjtime(clockid_t id, struct timex *tx)
56645 ++static int pc_clock_adjtime(const clockid_t id, struct timex *tx)
56646 + {
56647 + struct posix_clock_desc cd;
56648 + int err;
56649 +@@ -297,7 +297,7 @@ out:
56650 + return err;
56651 + }
56652 +
56653 +-static int pc_clock_gettime(clockid_t id, struct timespec *ts)
56654 ++static int pc_clock_gettime(const clockid_t id, struct timespec *ts)
56655 + {
56656 + struct posix_clock_desc cd;
56657 + int err;
56658 +@@ -316,7 +316,7 @@ static int pc_clock_gettime(clockid_t id, struct timespec *ts)
56659 + return err;
56660 + }
56661 +
56662 +-static int pc_clock_getres(clockid_t id, struct timespec *ts)
56663 ++static int pc_clock_getres(const clockid_t id, struct timespec *ts)
56664 + {
56665 + struct posix_clock_desc cd;
56666 + int err;
56667 +@@ -335,7 +335,7 @@ static int pc_clock_getres(clockid_t id, struct timespec *ts)
56668 + return err;
56669 + }
56670 +
56671 +-static int pc_clock_settime(clockid_t id, const struct timespec *ts)
56672 ++static int pc_clock_settime(const clockid_t id, const struct timespec *ts)
56673 + {
56674 + struct posix_clock_desc cd;
56675 + int err;
56676 diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
56677 index f5e86d2..33a4099 100644
56678 --- a/kernel/time/posix-cpu-timers.c
56679 @@ -116273,7 +140854,7 @@ index f5e86d2..33a4099 100644
56680 .clock_get = thread_cpu_clock_get,
56681 .timer_create = thread_cpu_timer_create,
56682 diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
56683 -index f2826c3..c8d9d80 100644
56684 +index f2826c3..7e6663a 100644
56685 --- a/kernel/time/posix-timers.c
56686 +++ b/kernel/time/posix-timers.c
56687 @@ -43,6 +43,7 @@
56688 @@ -116293,6 +140874,57 @@ index f2826c3..c8d9d80 100644
56689
56690 /*
56691 * These ones are defined below.
56692 +@@ -203,7 +204,7 @@ static inline void unlock_timer(struct k_itimer *timr, unsigned long flags)
56693 + }
56694 +
56695 + /* Get clock_realtime */
56696 +-static int posix_clock_realtime_get(clockid_t which_clock, struct timespec *tp)
56697 ++static int posix_clock_realtime_get(const clockid_t which_clock, struct timespec *tp)
56698 + {
56699 + ktime_get_real_ts(tp);
56700 + return 0;
56701 +@@ -225,7 +226,7 @@ static int posix_clock_realtime_adj(const clockid_t which_clock,
56702 + /*
56703 + * Get monotonic time for posix timers
56704 + */
56705 +-static int posix_ktime_get_ts(clockid_t which_clock, struct timespec *tp)
56706 ++static int posix_ktime_get_ts(const clockid_t which_clock, struct timespec *tp)
56707 + {
56708 + ktime_get_ts(tp);
56709 + return 0;
56710 +@@ -234,20 +235,20 @@ static int posix_ktime_get_ts(clockid_t which_clock, struct timespec *tp)
56711 + /*
56712 + * Get monotonic-raw time for posix timers
56713 + */
56714 +-static int posix_get_monotonic_raw(clockid_t which_clock, struct timespec *tp)
56715 ++static int posix_get_monotonic_raw(const clockid_t which_clock, struct timespec *tp)
56716 + {
56717 + getrawmonotonic(tp);
56718 + return 0;
56719 + }
56720 +
56721 +
56722 +-static int posix_get_realtime_coarse(clockid_t which_clock, struct timespec *tp)
56723 ++static int posix_get_realtime_coarse(const clockid_t which_clock, struct timespec *tp)
56724 + {
56725 + *tp = current_kernel_time();
56726 + return 0;
56727 + }
56728 +
56729 +-static int posix_get_monotonic_coarse(clockid_t which_clock,
56730 ++static int posix_get_monotonic_coarse(const clockid_t which_clock,
56731 + struct timespec *tp)
56732 + {
56733 + *tp = get_monotonic_coarse();
56734 +@@ -266,7 +267,7 @@ static int posix_get_boottime(const clockid_t which_clock, struct timespec *tp)
56735 + return 0;
56736 + }
56737 +
56738 +-static int posix_get_tai(clockid_t which_clock, struct timespec *tp)
56739 ++static int posix_get_tai(const clockid_t which_clock, struct timespec *tp)
56740 + {
56741 + timekeeping_clocktai(tp);
56742 + return 0;
56743 @@ -284,7 +285,7 @@ static int posix_get_hrtimer_res(clockid_t which_clock, struct timespec *tp)
56744 */
56745 static __init int init_posix_timers(void)
56746 @@ -116405,7 +141037,7 @@ index 86751c6..7875536 100644
56747 update_vsyscall_tz();
56748 if (firsttime) {
56749 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
56750 -index 99188ee..29f96f9 100644
56751 +index 34b4ced..08d344f 100644
56752 --- a/kernel/time/timekeeping.c
56753 +++ b/kernel/time/timekeeping.c
56754 @@ -15,6 +15,7 @@
56755 @@ -116416,7 +141048,7 @@ index 99188ee..29f96f9 100644
56756 #include <linux/syscore_ops.h>
56757 #include <linux/clocksource.h>
56758 #include <linux/jiffies.h>
56759 -@@ -915,6 +916,8 @@ int do_settimeofday64(const struct timespec64 *ts)
56760 +@@ -928,6 +929,8 @@ int do_settimeofday64(const struct timespec64 *ts)
56761 if (!timespec64_valid_strict(ts))
56762 return -EINVAL;
56763
56764 @@ -116580,7 +141212,7 @@ index e45db6b..1fb429b 100644
56765 select GENERIC_TRACER
56766 select STACKTRACE
56767 diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
56768 -index a990824..9c8e7ad 100644
56769 +index 2aeb6ff..640418a 100644
56770 --- a/kernel/trace/blktrace.c
56771 +++ b/kernel/trace/blktrace.c
56772 @@ -328,7 +328,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer,
56773 @@ -116592,7 +141224,7 @@ index a990824..9c8e7ad 100644
56774
56775 return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
56776 }
56777 -@@ -386,7 +386,7 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
56778 +@@ -380,7 +380,7 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
56779 return 1;
56780
56781 bt = buf->chan->private_data;
56782 @@ -116601,7 +141233,7 @@ index a990824..9c8e7ad 100644
56783 return 0;
56784 }
56785
56786 -@@ -485,7 +485,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
56787 +@@ -479,7 +479,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
56788
56789 bt->dir = dir;
56790 bt->dev = dev;
56791 @@ -116611,10 +141243,22 @@ index a990824..9c8e7ad 100644
56792
56793 ret = -EIO;
56794 diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
56795 -index 3f743b1..a3e3588 100644
56796 +index 57a6eea..168c21f 100644
56797 --- a/kernel/trace/ftrace.c
56798 +++ b/kernel/trace/ftrace.c
56799 -@@ -2423,12 +2423,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
56800 +@@ -120,8 +120,9 @@ static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
56801 + struct ftrace_ops *op, struct pt_regs *regs);
56802 + #else
56803 + /* See comment below, where ftrace_ops_list_func is defined */
56804 +-static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip);
56805 +-#define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
56806 ++static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip,
56807 ++ struct ftrace_ops *op, struct pt_regs *regs);
56808 ++#define ftrace_ops_list_func (ftrace_ops_no_ops)
56809 + #endif
56810 +
56811 + /*
56812 +@@ -2463,13 +2464,18 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
56813 if (unlikely(ftrace_disabled))
56814 return 0;
56815
56816 @@ -116626,6 +141270,7 @@ index 3f743b1..a3e3588 100644
56817 ret = ftrace_make_nop(mod, rec, MCOUNT_ADDR);
56818 + FTRACE_WARN_ON(ftrace_arch_code_modify_post_process());
56819 if (ret) {
56820 + ftrace_bug_type = FTRACE_BUG_INIT;
56821 ftrace_bug(ret, rec);
56822 - return 0;
56823 }
56824 @@ -116634,7 +141279,7 @@ index 3f743b1..a3e3588 100644
56825 }
56826
56827 /*
56828 -@@ -4813,8 +4818,10 @@ static int ftrace_process_locs(struct module *mod,
56829 +@@ -4821,8 +4827,10 @@ static int ftrace_process_locs(struct module *mod,
56830 if (!count)
56831 return 0;
56832
56833 @@ -116645,7 +141290,32 @@ index 3f743b1..a3e3588 100644
56834
56835 start_pg = ftrace_allocate_pages(count);
56836 if (!start_pg)
56837 -@@ -5691,7 +5698,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
56838 +@@ -5238,7 +5246,8 @@ static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
56839 + __ftrace_ops_list_func(ip, parent_ip, NULL, regs);
56840 + }
56841 + #else
56842 +-static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip)
56843 ++static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip,
56844 ++ struct ftrace_ops *op, struct pt_regs *regs)
56845 + {
56846 + __ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
56847 + }
56848 +@@ -5699,8 +5708,12 @@ int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace)
56849 + }
56850 +
56851 + /* The callbacks that hook a function */
56852 +-trace_func_graph_ret_t ftrace_graph_return =
56853 +- (trace_func_graph_ret_t)ftrace_stub;
56854 ++static void ftrace_graph_return_stub(struct ftrace_graph_ret *trace)
56855 ++{
56856 ++ ftrace_stub(0, 0, NULL, NULL);
56857 ++}
56858 ++
56859 ++trace_func_graph_ret_t ftrace_graph_return = ftrace_graph_return_stub;
56860 + trace_func_graph_ent_t ftrace_graph_entry = ftrace_graph_entry_stub;
56861 + static trace_func_graph_ent_t __ftrace_graph_entry = ftrace_graph_entry_stub;
56862 +
56863 +@@ -5734,7 +5747,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
56864
56865 if (t->ret_stack == NULL) {
56866 atomic_set(&t->tracing_graph_pause, 0);
56867 @@ -116654,7 +141324,16 @@ index 3f743b1..a3e3588 100644
56868 t->curr_ret_stack = -1;
56869 /* Make sure the tasks see the -1 first: */
56870 smp_wmb();
56871 -@@ -5914,7 +5921,7 @@ static void
56872 +@@ -5929,7 +5942,7 @@ void unregister_ftrace_graph(void)
56873 + goto out;
56874 +
56875 + ftrace_graph_active--;
56876 +- ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub;
56877 ++ ftrace_graph_return = ftrace_graph_return_stub;
56878 + ftrace_graph_entry = ftrace_graph_entry_stub;
56879 + __ftrace_graph_entry = ftrace_graph_entry_stub;
56880 + ftrace_shutdown(&graph_ops, FTRACE_STOP_FUNC_RET);
56881 +@@ -5957,7 +5970,7 @@ static void
56882 graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
56883 {
56884 atomic_set(&t->tracing_graph_pause, 0);
56885 @@ -116664,7 +141343,7 @@ index 3f743b1..a3e3588 100644
56886 /* make curr_ret_stack visible before we add the ret_stack */
56887 smp_wmb();
56888 diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
56889 -index 9c6045a..927be25 100644
56890 +index 95181e3..3b49321 100644
56891 --- a/kernel/trace/ring_buffer.c
56892 +++ b/kernel/trace/ring_buffer.c
56893 @@ -296,9 +296,9 @@ struct buffer_data_page {
56894 @@ -116695,7 +141374,7 @@ index 9c6045a..927be25 100644
56895 unsigned long read;
56896 unsigned long read_bytes;
56897 u64 write_stamp;
56898 -@@ -1022,8 +1022,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
56899 +@@ -1018,8 +1018,8 @@ static void rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
56900 *
56901 * We add a counter to the write field to denote this.
56902 */
56903 @@ -116706,7 +141385,7 @@ index 9c6045a..927be25 100644
56904
56905 /*
56906 * Just make sure we have seen our old_write and synchronize
56907 -@@ -1051,8 +1051,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
56908 +@@ -1047,8 +1047,8 @@ static void rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
56909 * cmpxchg to only update if an interrupt did not already
56910 * do it for us. If the cmpxchg fails, we don't care.
56911 */
56912 @@ -116717,7 +141396,7 @@ index 9c6045a..927be25 100644
56913
56914 /*
56915 * No need to worry about races with clearing out the commit.
56916 -@@ -1420,12 +1420,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer);
56917 +@@ -1411,12 +1411,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer);
56918
56919 static inline unsigned long rb_page_entries(struct buffer_page *bpage)
56920 {
56921 @@ -116732,7 +141411,7 @@ index 9c6045a..927be25 100644
56922 }
56923
56924 static int
56925 -@@ -1520,7 +1520,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages)
56926 +@@ -1511,7 +1511,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages)
56927 * bytes consumed in ring buffer from here.
56928 * Increment overrun to account for the lost events.
56929 */
56930 @@ -116741,7 +141420,7 @@ index 9c6045a..927be25 100644
56931 local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
56932 }
56933
56934 -@@ -1951,7 +1951,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,
56935 +@@ -1942,7 +1942,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,
56936 * it is our responsibility to update
56937 * the counters.
56938 */
56939 @@ -116750,7 +141429,7 @@ index 9c6045a..927be25 100644
56940 local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
56941
56942 /*
56943 -@@ -2085,7 +2085,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
56944 +@@ -2079,7 +2079,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
56945 if (tail == BUF_PAGE_SIZE)
56946 tail_page->real_end = 0;
56947
56948 @@ -116759,7 +141438,7 @@ index 9c6045a..927be25 100644
56949 return;
56950 }
56951
56952 -@@ -2120,7 +2120,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
56953 +@@ -2114,7 +2114,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
56954 rb_event_set_padding(event);
56955
56956 /* Set the write back to the previous setting */
56957 @@ -116768,7 +141447,7 @@ index 9c6045a..927be25 100644
56958 return;
56959 }
56960
56961 -@@ -2132,7 +2132,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
56962 +@@ -2126,7 +2126,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
56963
56964 /* Set write to end of buffer */
56965 length = (tail + length) - BUF_PAGE_SIZE;
56966 @@ -116776,8 +141455,8 @@ index 9c6045a..927be25 100644
56967 + local_sub_unchecked(length, &tail_page->write);
56968 }
56969
56970 - /*
56971 -@@ -2159,7 +2159,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
56972 + static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer);
56973 +@@ -2154,7 +2154,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
56974 * about it.
56975 */
56976 if (unlikely(next_page == commit_page)) {
56977 @@ -116786,7 +141465,7 @@ index 9c6045a..927be25 100644
56978 goto out_reset;
56979 }
56980
56981 -@@ -2189,7 +2189,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
56982 +@@ -2184,7 +2184,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
56983 * this is easy, just stop here.
56984 */
56985 if (!(buffer->flags & RB_FL_OVERWRITE)) {
56986 @@ -116795,7 +141474,7 @@ index 9c6045a..927be25 100644
56987 goto out_reset;
56988 }
56989
56990 -@@ -2215,7 +2215,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
56991 +@@ -2210,7 +2210,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
56992 cpu_buffer->tail_page) &&
56993 (cpu_buffer->commit_page ==
56994 cpu_buffer->reader_page))) {
56995 @@ -116804,7 +141483,7 @@ index 9c6045a..927be25 100644
56996 goto out_reset;
56997 }
56998 }
56999 -@@ -2366,7 +2366,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
57000 +@@ -2358,7 +2358,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
57001
57002 if (bpage->page == (void *)addr && rb_page_write(bpage) == old_index) {
57003 unsigned long write_mask =
57004 @@ -116813,7 +141492,7 @@ index 9c6045a..927be25 100644
57005 unsigned long event_length = rb_event_length(event);
57006 /*
57007 * This is on the tail page. It is possible that
57008 -@@ -2376,7 +2376,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
57009 +@@ -2368,7 +2368,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
57010 */
57011 old_index += write_mask;
57012 new_index += write_mask;
57013 @@ -116822,7 +141501,7 @@ index 9c6045a..927be25 100644
57014 if (index == old_index) {
57015 /* update counters */
57016 local_sub(event_length, &cpu_buffer->entries_bytes);
57017 -@@ -2391,7 +2391,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
57018 +@@ -2383,7 +2383,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
57019 static void rb_start_commit(struct ring_buffer_per_cpu *cpu_buffer)
57020 {
57021 local_inc(&cpu_buffer->committing);
57022 @@ -116831,7 +141510,7 @@ index 9c6045a..927be25 100644
57023 }
57024
57025 static void
57026 -@@ -2456,7 +2456,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
57027 +@@ -2450,7 +2450,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
57028 return;
57029
57030 again:
57031 @@ -116840,7 +141519,7 @@ index 9c6045a..927be25 100644
57032 /* synchronize with interrupts */
57033 barrier();
57034 if (local_read(&cpu_buffer->committing) == 1)
57035 -@@ -2472,7 +2472,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
57036 +@@ -2466,7 +2466,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
57037 * updating of the commit page and the clearing of the
57038 * committing counter.
57039 */
57040 @@ -116849,16 +141528,16 @@ index 9c6045a..927be25 100644
57041 !local_read(&cpu_buffer->committing)) {
57042 local_inc(&cpu_buffer->committing);
57043 goto again;
57044 -@@ -2700,7 +2700,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
57045 - info->length += RB_LEN_TIME_EXTEND;
57046 +@@ -2695,7 +2695,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
57047
57048 - tail_page = info->tail_page = cpu_buffer->tail_page;
57049 + /* Don't let the compiler play games with cpu_buffer->tail_page */
57050 + tail_page = info->tail_page = READ_ONCE(cpu_buffer->tail_page);
57051 - write = local_add_return(info->length, &tail_page->write);
57052 + write = local_add_return_unchecked(info->length, &tail_page->write);
57053
57054 /* set write to only the index of the write */
57055 write &= RB_WRITE_MASK;
57056 -@@ -2723,7 +2723,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
57057 +@@ -2718,7 +2718,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
57058 kmemcheck_annotate_bitfield(event, bitfield);
57059 rb_update_event(cpu_buffer, event, info);
57060
57061 @@ -116867,7 +141546,7 @@ index 9c6045a..927be25 100644
57062
57063 /*
57064 * If this is the first commit on the page, then update
57065 -@@ -2760,7 +2760,7 @@ rb_reserve_next_event(struct ring_buffer *buffer,
57066 +@@ -2755,7 +2755,7 @@ rb_reserve_next_event(struct ring_buffer *buffer,
57067 barrier();
57068 if (unlikely(ACCESS_ONCE(cpu_buffer->buffer) != buffer)) {
57069 local_dec(&cpu_buffer->committing);
57070 @@ -116876,7 +141555,7 @@ index 9c6045a..927be25 100644
57071 return NULL;
57072 }
57073 #endif
57074 -@@ -2889,7 +2889,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
57075 +@@ -2884,7 +2884,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
57076
57077 /* Do the likely case first */
57078 if (likely(bpage->page == (void *)addr)) {
57079 @@ -116885,7 +141564,7 @@ index 9c6045a..927be25 100644
57080 return;
57081 }
57082
57083 -@@ -2901,7 +2901,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
57084 +@@ -2896,7 +2896,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
57085 start = bpage;
57086 do {
57087 if (bpage->page == (void *)addr) {
57088 @@ -116894,7 +141573,7 @@ index 9c6045a..927be25 100644
57089 return;
57090 }
57091 rb_inc_page(cpu_buffer, &bpage);
57092 -@@ -3189,7 +3189,7 @@ static inline unsigned long
57093 +@@ -3184,7 +3184,7 @@ static inline unsigned long
57094 rb_num_of_entries(struct ring_buffer_per_cpu *cpu_buffer)
57095 {
57096 return local_read(&cpu_buffer->entries) -
57097 @@ -116903,7 +141582,7 @@ index 9c6045a..927be25 100644
57098 }
57099
57100 /**
57101 -@@ -3278,7 +3278,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
57102 +@@ -3273,7 +3273,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
57103 return 0;
57104
57105 cpu_buffer = buffer->buffers[cpu];
57106 @@ -116912,7 +141591,7 @@ index 9c6045a..927be25 100644
57107
57108 return ret;
57109 }
57110 -@@ -3301,7 +3301,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
57111 +@@ -3296,7 +3296,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
57112 return 0;
57113
57114 cpu_buffer = buffer->buffers[cpu];
57115 @@ -116921,7 +141600,7 @@ index 9c6045a..927be25 100644
57116
57117 return ret;
57118 }
57119 -@@ -3323,7 +3323,7 @@ ring_buffer_dropped_events_cpu(struct ring_buffer *buffer, int cpu)
57120 +@@ -3318,7 +3318,7 @@ ring_buffer_dropped_events_cpu(struct ring_buffer *buffer, int cpu)
57121 return 0;
57122
57123 cpu_buffer = buffer->buffers[cpu];
57124 @@ -116930,7 +141609,7 @@ index 9c6045a..927be25 100644
57125
57126 return ret;
57127 }
57128 -@@ -3386,7 +3386,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer)
57129 +@@ -3381,7 +3381,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer)
57130 /* if you care about this being correct, lock the buffer */
57131 for_each_buffer_cpu(buffer, cpu) {
57132 cpu_buffer = buffer->buffers[cpu];
57133 @@ -116939,7 +141618,7 @@ index 9c6045a..927be25 100644
57134 }
57135
57136 return overruns;
57137 -@@ -3557,8 +3557,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
57138 +@@ -3552,8 +3552,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
57139 /*
57140 * Reset the reader page to size zero.
57141 */
57142 @@ -116950,7 +141629,7 @@ index 9c6045a..927be25 100644
57143 local_set(&cpu_buffer->reader_page->page->commit, 0);
57144 cpu_buffer->reader_page->real_end = 0;
57145
57146 -@@ -3592,7 +3592,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
57147 +@@ -3587,7 +3587,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
57148 * want to compare with the last_overrun.
57149 */
57150 smp_mb();
57151 @@ -116959,7 +141638,7 @@ index 9c6045a..927be25 100644
57152
57153 /*
57154 * Here's the tricky part.
57155 -@@ -4178,8 +4178,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
57156 +@@ -4173,8 +4173,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
57157
57158 cpu_buffer->head_page
57159 = list_entry(cpu_buffer->pages, struct buffer_page, list);
57160 @@ -116970,7 +141649,7 @@ index 9c6045a..927be25 100644
57161 local_set(&cpu_buffer->head_page->page->commit, 0);
57162
57163 cpu_buffer->head_page->read = 0;
57164 -@@ -4189,18 +4189,18 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
57165 +@@ -4184,18 +4184,18 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
57166
57167 INIT_LIST_HEAD(&cpu_buffer->reader_page->list);
57168 INIT_LIST_HEAD(&cpu_buffer->new_pages);
57169 @@ -116995,7 +141674,7 @@ index 9c6045a..927be25 100644
57170 cpu_buffer->read = 0;
57171 cpu_buffer->read_bytes = 0;
57172
57173 -@@ -4590,8 +4590,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
57174 +@@ -4585,8 +4585,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
57175 rb_init_page(bpage);
57176 bpage = reader->page;
57177 reader->page = *data_page;
57178 @@ -117020,10 +141699,10 @@ index 8305cbb..c0d281a 100644
57179 /* do nothing if flag is already set */
57180 if (!!(tr->trace_flags & mask) == !!enabled)
57181 diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
57182 -index 919d9d0..8db0243 100644
57183 +index 8414fa4..27c2db4 100644
57184 --- a/kernel/trace/trace.h
57185 +++ b/kernel/trace/trace.h
57186 -@@ -1335,7 +1335,7 @@ void trace_printk_control(bool enabled);
57187 +@@ -1333,7 +1333,7 @@ void trace_printk_control(bool enabled);
57188 void trace_printk_init_buffers(void);
57189 void trace_printk_start_comm(void);
57190 int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set);
57191 @@ -117053,10 +141732,10 @@ index 0f06532..247c8e7 100644
57192 + return atomic64_inc_return_unchecked(&trace_counter);
57193 }
57194 diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
57195 -index d202d99..1bf816c 100644
57196 +index 05ddc08..5df5f88 100644
57197 --- a/kernel/trace/trace_events.c
57198 +++ b/kernel/trace/trace_events.c
57199 -@@ -2369,7 +2369,6 @@ __trace_early_add_new_event(struct trace_event_call *call,
57200 +@@ -2357,7 +2357,6 @@ __trace_early_add_new_event(struct trace_event_call *call,
57201 return 0;
57202 }
57203
57204 @@ -117127,7 +141806,7 @@ index 2be8c4f..444ecfb 100644
57205 }
57206 entry = ring_buffer_event_data(event);
57207 diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
57208 -index 2829821..a290dc8 100644
57209 +index 2829821..a290dc89 100644
57210 --- a/kernel/trace/trace_output.c
57211 +++ b/kernel/trace/trace_output.c
57212 @@ -713,14 +713,16 @@ int register_trace_event(struct trace_event *event)
57213 @@ -117165,7 +141844,7 @@ index e694c9f..6775a38 100644
57214 if (unlikely(seq_buf_has_overflowed(&s->seq))) {
57215 s->seq.len = save_len;
57216 diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
57217 -index 202df6c..58bab5d 100644
57218 +index 2a1abba..2a81a78 100644
57219 --- a/kernel/trace/trace_stack.c
57220 +++ b/kernel/trace/trace_stack.c
57221 @@ -88,7 +88,7 @@ check_stack(unsigned long ip, unsigned long *stack)
57222 @@ -117232,7 +141911,7 @@ index b069ccb..c59fe26 100644
57223 uid_hash_remove(up);
57224 spin_unlock_irqrestore(&uidhash_lock, flags);
57225 diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
57226 -index 88fefa6..d1e2bd7 100644
57227 +index 9bafc21..cafd6e0 100644
57228 --- a/kernel/user_namespace.c
57229 +++ b/kernel/user_namespace.c
57230 @@ -84,6 +84,21 @@ int create_user_ns(struct cred *new)
57231 @@ -117257,7 +141936,7 @@ index 88fefa6..d1e2bd7 100644
57232 ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL);
57233 if (!ns)
57234 return -ENOMEM;
57235 -@@ -981,7 +996,7 @@ static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)
57236 +@@ -974,7 +989,7 @@ static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)
57237 if (!thread_group_empty(current))
57238 return -EINVAL;
57239
57240 @@ -117280,10 +141959,10 @@ index c8eac43..4b5f08f 100644
57241 memcpy(&uts_table, table, sizeof(uts_table));
57242 uts_table.data = get_uts(table, write);
57243 diff --git a/kernel/watchdog.c b/kernel/watchdog.c
57244 -index 198137b..cde169b 100644
57245 +index 9acb29f..6fe517c 100644
57246 --- a/kernel/watchdog.c
57247 +++ b/kernel/watchdog.c
57248 -@@ -664,7 +664,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
57249 +@@ -680,7 +680,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
57250 static void watchdog_nmi_disable(unsigned int cpu) { return; }
57251 #endif /* CONFIG_HARDLOCKUP_DETECTOR */
57252
57253 @@ -117293,10 +141972,46 @@ index 198137b..cde169b 100644
57254 .thread_should_run = watchdog_should_run,
57255 .thread_fn = watchdog,
57256 diff --git a/kernel/workqueue.c b/kernel/workqueue.c
57257 -index 450c21f..16482d9 100644
57258 +index 7ff5dc7..72c5756 100644
57259 --- a/kernel/workqueue.c
57260 +++ b/kernel/workqueue.c
57261 -@@ -1866,9 +1866,8 @@ static void pool_mayday_timeout(unsigned long __pool)
57262 +@@ -667,6 +667,35 @@ static void set_work_pool_and_clear_pending(struct work_struct *work,
57263 + */
57264 + smp_wmb();
57265 + set_work_data(work, (unsigned long)pool_id << WORK_OFFQ_POOL_SHIFT, 0);
57266 ++ /*
57267 ++ * The following mb guarantees that previous clear of a PENDING bit
57268 ++ * will not be reordered with any speculative LOADS or STORES from
57269 ++ * work->current_func, which is executed afterwards. This possible
57270 ++ * reordering can lead to a missed execution on attempt to qeueue
57271 ++ * the same @work. E.g. consider this case:
57272 ++ *
57273 ++ * CPU#0 CPU#1
57274 ++ * ---------------------------- --------------------------------
57275 ++ *
57276 ++ * 1 STORE event_indicated
57277 ++ * 2 queue_work_on() {
57278 ++ * 3 test_and_set_bit(PENDING)
57279 ++ * 4 } set_..._and_clear_pending() {
57280 ++ * 5 set_work_data() # clear bit
57281 ++ * 6 smp_mb()
57282 ++ * 7 work->current_func() {
57283 ++ * 8 LOAD event_indicated
57284 ++ * }
57285 ++ *
57286 ++ * Without an explicit full barrier speculative LOAD on line 8 can
57287 ++ * be executed before CPU#0 does STORE on line 1. If that happens,
57288 ++ * CPU#0 observes the PENDING bit is still set and new execution of
57289 ++ * a @work is not queued in a hope, that CPU#1 will eventually
57290 ++ * finish the queued @work. Meanwhile CPU#1 does not see
57291 ++ * event_indicated is set, because speculative LOAD was executed
57292 ++ * before actual STORE.
57293 ++ */
57294 ++ smp_mb();
57295 + }
57296 +
57297 + static void clear_work_data(struct work_struct *work)
57298 +@@ -1921,9 +1950,8 @@ static void pool_mayday_timeout(unsigned long __pool)
57299 * multiple times. Does GFP_KERNEL allocations. Called only from
57300 * manager.
57301 */
57302 @@ -117307,7 +142022,7 @@ index 450c21f..16482d9 100644
57303 {
57304 restart:
57305 spin_unlock_irq(&pool->lock);
57306 -@@ -1958,9 +1957,8 @@ static bool manage_workers(struct worker *worker)
57307 +@@ -2013,9 +2041,8 @@ static bool manage_workers(struct worker *worker)
57308 * CONTEXT:
57309 * spin_lock_irq(pool->lock) which is released and regrabbed.
57310 */
57311 @@ -117318,7 +142033,7 @@ index 450c21f..16482d9 100644
57312 {
57313 struct pool_workqueue *pwq = get_work_pwq(work);
57314 struct worker_pool *pool = worker->pool;
57315 -@@ -4462,7 +4460,7 @@ static void rebind_workers(struct worker_pool *pool)
57316 +@@ -4561,7 +4588,7 @@ static void rebind_workers(struct worker_pool *pool)
57317 WARN_ON_ONCE(!(worker_flags & WORKER_UNBOUND));
57318 worker_flags |= WORKER_REBOUND;
57319 worker_flags &= ~WORKER_UNBOUND;
57320 @@ -117328,7 +142043,7 @@ index 450c21f..16482d9 100644
57321
57322 spin_unlock_irq(&pool->lock);
57323 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
57324 -index 8c15b29..fc52e8e 100644
57325 +index 8bfd1ac..18fd274 100644
57326 --- a/lib/Kconfig.debug
57327 +++ b/lib/Kconfig.debug
57328 @@ -243,6 +243,7 @@ config PAGE_OWNER
57329 @@ -117355,7 +142070,7 @@ index 8c15b29..fc52e8e 100644
57330 select STACKTRACE if STACKTRACE_SUPPORT
57331 select KALLSYMS
57332 select CRC32
57333 -@@ -945,7 +948,7 @@ config DEBUG_MUTEXES
57334 +@@ -964,7 +967,7 @@ config DEBUG_MUTEXES
57335
57336 config DEBUG_WW_MUTEX_SLOWPATH
57337 bool "Wait/wound mutex debugging: Slowpath testing"
57338 @@ -117364,7 +142079,7 @@ index 8c15b29..fc52e8e 100644
57339 select DEBUG_LOCK_ALLOC
57340 select DEBUG_SPINLOCK
57341 select DEBUG_MUTEXES
57342 -@@ -962,7 +965,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
57343 +@@ -981,7 +984,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
57344
57345 config DEBUG_LOCK_ALLOC
57346 bool "Lock debugging: detect incorrect freeing of live locks"
57347 @@ -117373,7 +142088,7 @@ index 8c15b29..fc52e8e 100644
57348 select DEBUG_SPINLOCK
57349 select DEBUG_MUTEXES
57350 select LOCKDEP
57351 -@@ -976,7 +979,7 @@ config DEBUG_LOCK_ALLOC
57352 +@@ -995,7 +998,7 @@ config DEBUG_LOCK_ALLOC
57353
57354 config PROVE_LOCKING
57355 bool "Lock debugging: prove locking correctness"
57356 @@ -117382,7 +142097,7 @@ index 8c15b29..fc52e8e 100644
57357 select LOCKDEP
57358 select DEBUG_SPINLOCK
57359 select DEBUG_MUTEXES
57360 -@@ -1027,7 +1030,7 @@ config LOCKDEP
57361 +@@ -1046,7 +1049,7 @@ config LOCKDEP
57362
57363 config LOCK_STAT
57364 bool "Lock usage statistics"
57365 @@ -117391,7 +142106,7 @@ index 8c15b29..fc52e8e 100644
57366 select LOCKDEP
57367 select DEBUG_SPINLOCK
57368 select DEBUG_MUTEXES
57369 -@@ -1412,6 +1415,7 @@ config NOTIFIER_ERROR_INJECTION
57370 +@@ -1446,6 +1449,7 @@ config NOTIFIER_ERROR_INJECTION
57371 tristate "Notifier error injection"
57372 depends on DEBUG_KERNEL
57373 select DEBUG_FS
57374 @@ -117399,15 +142114,7 @@ index 8c15b29..fc52e8e 100644
57375 help
57376 This option provides the ability to inject artificial errors to
57377 specified notifier chain callbacks. It is useful to test the error
57378 -@@ -1524,6 +1528,7 @@ config FAIL_IO_TIMEOUT
57379 - config FAIL_MMC_REQUEST
57380 - bool "Fault-injection capability for MMC IO"
57381 - select DEBUG_FS
57382 -+ depends on !GRKERNSEC_KMEM
57383 - depends on FAULT_INJECTION && MMC
57384 - help
57385 - Provide fault-injection capability for MMC IO.
57386 -@@ -1535,6 +1540,7 @@ config FAIL_MMC_REQUEST
57387 +@@ -1591,6 +1595,7 @@ config FAIL_MMC_REQUEST
57388 config FAIL_FUTEX
57389 bool "Fault-injection capability for futexes"
57390 select DEBUG_FS
57391 @@ -117415,7 +142122,7 @@ index 8c15b29..fc52e8e 100644
57392 depends on FAULT_INJECTION && FUTEX
57393 help
57394 Provide fault-injection capability for futexes.
57395 -@@ -1560,6 +1566,7 @@ config LATENCYTOP
57396 +@@ -1615,6 +1620,7 @@ config LATENCYTOP
57397 depends on DEBUG_KERNEL
57398 depends on STACKTRACE_SUPPORT
57399 depends on PROC_FS
57400 @@ -117423,7 +142130,7 @@ index 8c15b29..fc52e8e 100644
57401 select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC
57402 select KALLSYMS
57403 select KALLSYMS_ALL
57404 -@@ -1576,7 +1583,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
57405 +@@ -1631,7 +1637,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
57406 config DEBUG_STRICT_USER_COPY_CHECKS
57407 bool "Strict user copy size checks"
57408 depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
57409 @@ -117432,7 +142139,7 @@ index 8c15b29..fc52e8e 100644
57410 help
57411 Enabling this option turns a certain set of sanity checks for user
57412 copy operations into compile time failures.
57413 -@@ -1710,7 +1717,7 @@ endmenu # runtime tests
57414 +@@ -1765,7 +1771,7 @@ endmenu # runtime tests
57415
57416 config PROVIDE_OHCI1394_DMA_INIT
57417 bool "Remote debugging over FireWire early on boot"
57418 @@ -117455,7 +142162,7 @@ index 0fee5ac..b2b159d 100644
57419 help
57420 Enables kernel address sanitizer - runtime memory debugger,
57421 diff --git a/lib/Makefile b/lib/Makefile
57422 -index 7f1de26..ab68f1a 100644
57423 +index a7c26a4..6747b22 100644
57424 --- a/lib/Makefile
57425 +++ b/lib/Makefile
57426 @@ -66,7 +66,7 @@ obj-$(CONFIG_BTREE) += btree.o
57427 @@ -117521,7 +142228,7 @@ index cff145f..724a0b8 100644
57428 file = NULL;
57429 line = 0;
57430 diff --git a/lib/debugobjects.c b/lib/debugobjects.c
57431 -index 547f7f9..a6d4ba0 100644
57432 +index 519b5a1..4e58003 100644
57433 --- a/lib/debugobjects.c
57434 +++ b/lib/debugobjects.c
57435 @@ -289,7 +289,7 @@ static void debug_object_is_on_stack(void *addr, int onstack)
57436 @@ -117565,11 +142272,11 @@ index ed7a1fd..44a1a62 100644
57437 for (i = 0; i < size; i++)
57438 ret = (ret << 8) | ptr[size-i-1];
57439 diff --git a/lib/div64.c b/lib/div64.c
57440 -index 62a698a..32327d08 100644
57441 +index 7f34525..c53be4b 100644
57442 --- a/lib/div64.c
57443 +++ b/lib/div64.c
57444 -@@ -59,7 +59,7 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
57445 - EXPORT_SYMBOL(__div64_32);
57446 +@@ -61,7 +61,7 @@ EXPORT_SYMBOL(__div64_32);
57447 + #endif
57448
57449 #ifndef div_s64_rem
57450 -s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
57451 @@ -117577,7 +142284,7 @@ index 62a698a..32327d08 100644
57452 {
57453 u64 quotient;
57454
57455 -@@ -130,7 +130,7 @@ EXPORT_SYMBOL(div64_u64_rem);
57456 +@@ -132,7 +132,7 @@ EXPORT_SYMBOL(div64_u64_rem);
57457 * 'http://www.hackersdelight.org/hdcodetxt/divDouble.c.txt'
57458 */
57459 #ifndef div64_u64
57460 @@ -117643,6 +142350,19 @@ index 86c8911..f5bfc34 100644
57461 if (!pud)
57462 return -ENOMEM;
57463 do {
57464 +diff --git a/lib/irq_poll.c b/lib/irq_poll.c
57465 +index 836f7db..44d9849 100644
57466 +--- a/lib/irq_poll.c
57467 ++++ b/lib/irq_poll.c
57468 +@@ -74,7 +74,7 @@ void irq_poll_complete(struct irq_poll *iop)
57469 + }
57470 + EXPORT_SYMBOL(irq_poll_complete);
57471 +
57472 +-static void irq_poll_softirq(struct softirq_action *h)
57473 ++static __latent_entropy void irq_poll_softirq(void)
57474 + {
57475 + struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll);
57476 + int rearm = 0, budget = irq_poll_budget;
57477 diff --git a/lib/is_single_threaded.c b/lib/is_single_threaded.c
57478 index 391fd23..96e17b6 100644
57479 --- a/lib/is_single_threaded.c
57480 @@ -117674,7 +142394,7 @@ index 7cbccd2..37f089d 100644
57481 enum kobj_ns_type type = ops->type;
57482 int error;
57483 diff --git a/lib/list_debug.c b/lib/list_debug.c
57484 -index c24c2f7..f0296f4 100644
57485 +index 3859bf6..818741d6 100644
57486 --- a/lib/list_debug.c
57487 +++ b/lib/list_debug.c
57488 @@ -11,7 +11,9 @@
57489 @@ -118094,10 +142814,10 @@ index 1356454..70ce6c6 100644
57490
57491 void rb_insert_color(struct rb_node *node, struct rb_root *root)
57492 diff --git a/lib/rhashtable.c b/lib/rhashtable.c
57493 -index 51282f5..471b337 100644
57494 +index cc80870..6378152 100644
57495 --- a/lib/rhashtable.c
57496 +++ b/lib/rhashtable.c
57497 -@@ -558,8 +558,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
57498 +@@ -555,8 +555,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
57499 * will rewind back to the beginning and you may use it immediately
57500 * by calling rhashtable_walk_next.
57501 */
57502 @@ -118107,7 +142827,7 @@ index 51282f5..471b337 100644
57503 {
57504 struct rhashtable *ht = iter->ht;
57505
57506 -@@ -643,8 +643,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
57507 +@@ -640,8 +640,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
57508 *
57509 * Finish a hash table walk.
57510 */
57511 @@ -118130,7 +142850,7 @@ index 1feed6a..4ede1e9 100644
57512 #endif
57513 }
57514 diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
57515 -index e0af6ff..fcc9f15 100644
57516 +index 3384032..e4389a1 100644
57517 --- a/lib/strncpy_from_user.c
57518 +++ b/lib/strncpy_from_user.c
57519 @@ -22,7 +22,7 @@
57520 @@ -118143,7 +142863,7 @@ index e0af6ff..fcc9f15 100644
57521
57522 /*
57523 diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
57524 -index 3a5f2b3..102f1ff 100644
57525 +index 2625943..1541382 100644
57526 --- a/lib/strnlen_user.c
57527 +++ b/lib/strnlen_user.c
57528 @@ -26,7 +26,7 @@
57529 @@ -118183,7 +142903,7 @@ index 4f5b1dd..7cab418 100644
57530 +}
57531 +EXPORT_SYMBOL(copy_to_user_overflow);
57532 diff --git a/lib/vsprintf.c b/lib/vsprintf.c
57533 -index f9cee8e..f0ed0f1 100644
57534 +index f44e178..e5856a5 100644
57535 --- a/lib/vsprintf.c
57536 +++ b/lib/vsprintf.c
57537 @@ -16,6 +16,9 @@
57538 @@ -118196,7 +142916,7 @@ index f9cee8e..f0ed0f1 100644
57539 #include <stdarg.h>
57540 #include <linux/clk.h>
57541 #include <linux/clk-provider.h>
57542 -@@ -629,7 +632,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
57543 +@@ -677,7 +680,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
57544 #ifdef CONFIG_KALLSYMS
57545 if (*fmt == 'B')
57546 sprint_backtrace(sym, value);
57547 @@ -118205,7 +142925,7 @@ index f9cee8e..f0ed0f1 100644
57548 sprint_symbol(sym, value);
57549 else
57550 sprint_symbol_no_offset(sym, value);
57551 -@@ -1361,7 +1364,11 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
57552 +@@ -1407,7 +1410,11 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
57553 }
57554 }
57555
57556 @@ -118218,7 +142938,7 @@ index f9cee8e..f0ed0f1 100644
57557
57558 /*
57559 * Show a '%p' thing. A kernel extension is that the '%p' is followed
57560 -@@ -1372,8 +1379,10 @@ int kptr_restrict __read_mostly;
57561 +@@ -1418,8 +1425,10 @@ int kptr_restrict __read_mostly;
57562 *
57563 * - 'F' For symbolic function descriptor pointers with offset
57564 * - 'f' For simple symbolic function names without offset
57565 @@ -118229,7 +142949,7 @@ index f9cee8e..f0ed0f1 100644
57566 * - '[FfSs]R' as above with __builtin_extract_return_addr() translation
57567 * - 'B' For backtraced symbolic direct pointers with offset
57568 * - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref]
57569 -@@ -1463,12 +1472,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57570 +@@ -1510,12 +1519,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57571
57572 if (!ptr && *fmt != 'K') {
57573 /*
57574 @@ -118244,7 +142964,7 @@ index f9cee8e..f0ed0f1 100644
57575 }
57576
57577 switch (*fmt) {
57578 -@@ -1478,6 +1487,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57579 +@@ -1525,6 +1534,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57580 /* Fallthrough */
57581 case 'S':
57582 case 's':
57583 @@ -118259,18 +142979,18 @@ index f9cee8e..f0ed0f1 100644
57584 case 'B':
57585 return symbol_string(buf, end, ptr, spec, fmt);
57586 case 'R':
57587 -@@ -1542,6 +1559,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57588 +@@ -1589,6 +1606,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57589 va_end(va);
57590 return buf;
57591 }
57592 + case 'P':
57593 + break;
57594 case 'K':
57595 - /*
57596 - * %pK cannot be used in IRQ context because its test
57597 -@@ -1601,6 +1620,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57598 - ((const struct file *)ptr)->f_path.dentry,
57599 - spec, fmt);
57600 + switch (kptr_restrict) {
57601 + case 0:
57602 +@@ -1649,6 +1668,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
57603 + #endif
57604 +
57605 }
57606 +
57607 +#ifdef CONFIG_GRKERNSEC_HIDESYM
57608 @@ -118291,7 +143011,7 @@ index f9cee8e..f0ed0f1 100644
57609 spec.flags |= SMALL;
57610 if (spec.field_width == -1) {
57611 spec.field_width = default_width;
57612 -@@ -2282,11 +2317,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
57613 +@@ -2349,11 +2384,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
57614 typeof(type) value; \
57615 if (sizeof(type) == 8) { \
57616 args = PTR_ALIGN(args, sizeof(u32)); \
57617 @@ -118306,7 +143026,7 @@ index f9cee8e..f0ed0f1 100644
57618 } \
57619 args += sizeof(type); \
57620 value; \
57621 -@@ -2349,7 +2384,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
57622 +@@ -2416,7 +2451,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
57623 case FORMAT_TYPE_STR: {
57624 const char *str_arg = args;
57625 args += strlen(str_arg) + 1;
57626 @@ -118323,7 +143043,7 @@ index 0000000..7cd6065
57627 @@ -0,0 +1 @@
57628 +-grsec
57629 diff --git a/mm/Kconfig b/mm/Kconfig
57630 -index 97a4e06..b20ba55 100644
57631 +index 03cbfa0..5a6d8e6 100644
57632 --- a/mm/Kconfig
57633 +++ b/mm/Kconfig
57634 @@ -324,10 +324,11 @@ config KSM
57635 @@ -118381,7 +143101,7 @@ index 957d3da..1d34e20 100644
57636 depends on !KMEMCHECK
57637 select PAGE_EXTENSION
57638 diff --git a/mm/backing-dev.c b/mm/backing-dev.c
57639 -index cbe6f0b..200caf3 100644
57640 +index c554d17..9ddceb5 100644
57641 --- a/mm/backing-dev.c
57642 +++ b/mm/backing-dev.c
57643 @@ -12,7 +12,7 @@
57644 @@ -118403,7 +143123,7 @@ index cbe6f0b..200caf3 100644
57645 bdi_destroy(bdi);
57646 return err;
57647 diff --git a/mm/debug.c b/mm/debug.c
57648 -index 668aa35..1b35d47 100644
57649 +index f05b2d5..0d6e01f 100644
57650 --- a/mm/debug.c
57651 +++ b/mm/debug.c
57652 @@ -127,6 +127,9 @@ static const struct trace_print_flags vmaflags_names[] = {
57653 @@ -118417,10 +143137,10 @@ index 668aa35..1b35d47 100644
57654 {VM_NORESERVE, "noreserve" },
57655 {VM_HUGETLB, "hugetlb" },
57656 diff --git a/mm/filemap.c b/mm/filemap.c
57657 -index 1bb0076..b1f8586 100644
57658 +index da7a35d..d10518d 100644
57659 --- a/mm/filemap.c
57660 +++ b/mm/filemap.c
57661 -@@ -1759,15 +1759,16 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
57662 +@@ -1860,15 +1860,16 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
57663 ssize_t retval = 0;
57664 loff_t *ppos = &iocb->ki_pos;
57665 loff_t pos = *ppos;
57666 @@ -118440,7 +143160,7 @@ index 1bb0076..b1f8586 100644
57667 size = i_size_read(inode);
57668 retval = filemap_write_and_wait_range(mapping, pos,
57669 pos + count - 1);
57670 -@@ -2161,7 +2162,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
57671 +@@ -2262,7 +2263,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
57672 struct address_space *mapping = file->f_mapping;
57673
57674 if (!mapping->a_ops->readpage)
57675 @@ -118449,7 +143169,43 @@ index 1bb0076..b1f8586 100644
57676 file_accessed(file);
57677 vma->vm_ops = &generic_file_vm_ops;
57678 return 0;
57679 -@@ -2342,6 +2343,7 @@ inline ssize_t generic_write_checks(struct kiocb *iocb, struct iov_iter *from)
57680 +@@ -2305,7 +2306,7 @@ static struct page *wait_on_page_read(struct page *page)
57681 +
57682 + static struct page *__read_cache_page(struct address_space *mapping,
57683 + pgoff_t index,
57684 +- int (*filler)(void *, struct page *),
57685 ++ filler_t *filler,
57686 + void *data,
57687 + gfp_t gfp)
57688 + {
57689 +@@ -2338,7 +2339,7 @@ repeat:
57690 +
57691 + static struct page *do_read_cache_page(struct address_space *mapping,
57692 + pgoff_t index,
57693 +- int (*filler)(void *, struct page *),
57694 ++ filler_t *filler,
57695 + void *data,
57696 + gfp_t gfp)
57697 +
57698 +@@ -2391,7 +2392,7 @@ out:
57699 + */
57700 + struct page *read_cache_page(struct address_space *mapping,
57701 + pgoff_t index,
57702 +- int (*filler)(void *, struct page *),
57703 ++ filler_t *filler,
57704 + void *data)
57705 + {
57706 + return do_read_cache_page(mapping, index, filler, data, mapping_gfp_mask(mapping));
57707 +@@ -2413,7 +2414,7 @@ struct page *read_cache_page_gfp(struct address_space *mapping,
57708 + pgoff_t index,
57709 + gfp_t gfp)
57710 + {
57711 +- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
57712 ++ filler_t *filler = mapping->a_ops->readpage;
57713 +
57714 + return do_read_cache_page(mapping, index, filler, NULL, gfp);
57715 + }
57716 +@@ -2443,6 +2444,7 @@ inline ssize_t generic_write_checks(struct kiocb *iocb, struct iov_iter *from)
57717 pos = iocb->ki_pos;
57718
57719 if (limit != RLIM_INFINITY) {
57720 @@ -118458,10 +143214,10 @@ index 1bb0076..b1f8586 100644
57721 send_sig(SIGXFSZ, current, 0);
57722 return -EFBIG;
57723 diff --git a/mm/gup.c b/mm/gup.c
57724 -index deafa2c..1a4e46a 100644
57725 +index 7bf19ff..c059128 100644
57726 --- a/mm/gup.c
57727 +++ b/mm/gup.c
57728 -@@ -302,11 +302,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
57729 +@@ -356,11 +356,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
57730 /* mlock all present pages, but do not fault in new pages */
57731 if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK)
57732 return -ENOENT;
57733 @@ -118473,7 +143229,7 @@ index deafa2c..1a4e46a 100644
57734 if (*flags & FOLL_WRITE)
57735 fault_flags |= FAULT_FLAG_WRITE;
57736 if (nonblocking)
57737 -@@ -472,14 +467,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
57738 +@@ -524,14 +519,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
57739 if (!(gup_flags & FOLL_FORCE))
57740 gup_flags |= FOLL_NUMA;
57741
57742 @@ -118490,7 +143246,7 @@ index deafa2c..1a4e46a 100644
57743 if (!vma && in_gate_area(mm, start)) {
57744 int ret;
57745 ret = get_gate_page(mm, start & PAGE_MASK,
57746 -@@ -491,7 +486,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
57747 +@@ -543,7 +538,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
57748 goto next_page;
57749 }
57750
57751 @@ -118499,7 +143255,7 @@ index deafa2c..1a4e46a 100644
57752 return i ? : -EFAULT;
57753 if (is_vm_hugetlb_page(vma)) {
57754 i = follow_hugetlb_page(mm, vma, pages, vmas,
57755 -@@ -552,7 +547,7 @@ next_page:
57756 +@@ -604,7 +599,7 @@ next_page:
57757 i += page_increm;
57758 start += page_increm * PAGE_SIZE;
57759 nr_pages -= page_increm;
57760 @@ -118536,10 +143292,10 @@ index 123bcd3..c2c85db 100644
57761 pkmap_count[last_pkmap_nr] = 1;
57762 set_page_address(page, (void *)vaddr);
57763 diff --git a/mm/hugetlb.c b/mm/hugetlb.c
57764 -index ef6963b..09c45dc 100644
57765 +index aefba5a..07b8545 100644
57766 --- a/mm/hugetlb.c
57767 +++ b/mm/hugetlb.c
57768 -@@ -39,7 +39,60 @@ int hugepages_treat_as_movable;
57769 +@@ -38,7 +38,60 @@ int hugepages_treat_as_movable;
57770
57771 int hugetlb_max_hstate __read_mostly;
57772 unsigned int default_hstate_idx;
57773 @@ -118601,7 +143357,7 @@ index ef6963b..09c45dc 100644
57774 /*
57775 * Minimum page order among possible hugepage sizes, set to a proper value
57776 * at boot time.
57777 -@@ -2780,6 +2833,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
57778 +@@ -2746,6 +2799,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
57779 struct ctl_table *table, int write,
57780 void __user *buffer, size_t *length, loff_t *ppos)
57781 {
57782 @@ -118609,9 +143365,9 @@ index ef6963b..09c45dc 100644
57783 struct hstate *h = &default_hstate;
57784 unsigned long tmp = h->max_huge_pages;
57785 int ret;
57786 -@@ -2787,9 +2841,10 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
57787 +@@ -2753,9 +2807,10 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
57788 if (!hugepages_supported())
57789 - return -ENOTSUPP;
57790 + return -EOPNOTSUPP;
57791
57792 - table->data = &tmp;
57793 - table->maxlen = sizeof(unsigned long);
57794 @@ -118623,15 +143379,15 @@ index ef6963b..09c45dc 100644
57795 if (ret)
57796 goto out;
57797
57798 -@@ -2824,6 +2879,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
57799 +@@ -2790,6 +2845,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
57800 struct hstate *h = &default_hstate;
57801 unsigned long tmp;
57802 int ret;
57803 + ctl_table_no_const hugetlb_table;
57804
57805 if (!hugepages_supported())
57806 - return -ENOTSUPP;
57807 -@@ -2833,9 +2889,10 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
57808 + return -EOPNOTSUPP;
57809 +@@ -2799,9 +2855,10 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
57810 if (write && hstate_is_gigantic(h))
57811 return -EINVAL;
57812
57813 @@ -118645,7 +143401,7 @@ index ef6963b..09c45dc 100644
57814 if (ret)
57815 goto out;
57816
57817 -@@ -3341,6 +3398,27 @@ static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
57818 +@@ -3307,6 +3364,27 @@ static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
57819 i_mmap_unlock_write(mapping);
57820 }
57821
57822 @@ -118673,9 +143429,9 @@ index ef6963b..09c45dc 100644
57823 /*
57824 * Hugetlb_cow() should be called with page lock of the original hugepage held.
57825 * Called with hugetlb_instantiation_mutex held and pte_page locked so we
57826 -@@ -3454,6 +3532,11 @@ retry_avoidcopy:
57827 +@@ -3420,6 +3498,11 @@ retry_avoidcopy:
57828 make_huge_pte(vma, new_page, 1));
57829 - page_remove_rmap(old_page);
57830 + page_remove_rmap(old_page, true);
57831 hugepage_add_new_anon_rmap(new_page, vma, address);
57832 +
57833 +#ifdef CONFIG_PAX_SEGMEXEC
57834 @@ -118685,7 +143441,7 @@ index ef6963b..09c45dc 100644
57835 /* Make the old page be freed below */
57836 new_page = old_page;
57837 }
57838 -@@ -3627,6 +3710,10 @@ retry:
57839 +@@ -3593,6 +3676,10 @@ retry:
57840 && (vma->vm_flags & VM_SHARED)));
57841 set_huge_pte_at(mm, address, ptep, new_pte);
57842
57843 @@ -118696,7 +143452,7 @@ index ef6963b..09c45dc 100644
57844 hugetlb_count_add(pages_per_huge_page(h), mm);
57845 if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
57846 /* Optimization, do the COW without a second fault */
57847 -@@ -3695,6 +3782,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
57848 +@@ -3661,6 +3748,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
57849 struct address_space *mapping;
57850 int need_wait_lock = 0;
57851
57852 @@ -118707,7 +143463,7 @@ index ef6963b..09c45dc 100644
57853 address &= huge_page_mask(h);
57854
57855 ptep = huge_pte_offset(mm, address);
57856 -@@ -3712,6 +3803,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
57857 +@@ -3678,6 +3769,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
57858 return VM_FAULT_OOM;
57859 }
57860
57861 @@ -118841,10 +143597,10 @@ index d8fb10d..1c74822 100644
57862
57863 void __init hugetlb_cgroup_file_init(void)
57864 diff --git a/mm/internal.h b/mm/internal.h
57865 -index 38e24b8..73ff43d 100644
57866 +index a38a21e..8398316 100644
57867 --- a/mm/internal.h
57868 +++ b/mm/internal.h
57869 -@@ -177,6 +177,7 @@ __find_buddy_index(unsigned long page_idx, unsigned int order)
57870 +@@ -134,6 +134,7 @@ __find_buddy_index(unsigned long page_idx, unsigned int order)
57871 extern int __isolate_free_page(struct page *page, unsigned int order);
57872 extern void __free_pages_bootmem(struct page *page, unsigned long pfn,
57873 unsigned int order);
57874 @@ -118852,11 +143608,20 @@ index 38e24b8..73ff43d 100644
57875 extern void prep_compound_page(struct page *page, unsigned int order);
57876 #ifdef CONFIG_MEMORY_FAILURE
57877 extern bool is_free_buddy_page(struct page *page);
57878 +@@ -236,7 +237,7 @@ static inline bool is_exec_mapping(vm_flags_t flags)
57879 + */
57880 + static inline bool is_stack_mapping(vm_flags_t flags)
57881 + {
57882 +- return (flags & VM_STACK) == VM_STACK;
57883 ++ return flags & (VM_GROWSUP | VM_GROWSDOWN);
57884 + }
57885 +
57886 + /*
57887 diff --git a/mm/kmemleak.c b/mm/kmemleak.c
57888 -index 19423a4..f591ad4 100644
57889 +index 25c0ad3..1b474de 100644
57890 --- a/mm/kmemleak.c
57891 +++ b/mm/kmemleak.c
57892 -@@ -366,7 +366,7 @@ static void print_unreferenced(struct seq_file *seq,
57893 +@@ -365,7 +365,7 @@ static void print_unreferenced(struct seq_file *seq,
57894
57895 for (i = 0; i < object->trace_len; i++) {
57896 void *ptr = (void *)object->trace[i];
57897 @@ -118865,7 +143630,7 @@ index 19423a4..f591ad4 100644
57898 }
57899 }
57900
57901 -@@ -1958,7 +1958,7 @@ static int __init kmemleak_late_init(void)
57902 +@@ -1957,7 +1957,7 @@ static int __init kmemleak_late_init(void)
57903 return -ENOMEM;
57904 }
57905
57906 @@ -118910,10 +143675,10 @@ index d159b1c..7655796 100644
57907 return ret ? -EFAULT : 0;
57908 }
57909 diff --git a/mm/madvise.c b/mm/madvise.c
57910 -index c889fcb..f181221 100644
57911 +index f56825b..f86f118 100644
57912 --- a/mm/madvise.c
57913 +++ b/mm/madvise.c
57914 -@@ -52,6 +52,10 @@ static long madvise_behavior(struct vm_area_struct *vma,
57915 +@@ -56,6 +56,10 @@ static long madvise_behavior(struct vm_area_struct *vma,
57916 pgoff_t pgoff;
57917 unsigned long new_flags = vma->vm_flags;
57918
57919 @@ -118924,7 +143689,7 @@ index c889fcb..f181221 100644
57920 switch (behavior) {
57921 case MADV_NORMAL:
57922 new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ;
57923 -@@ -128,6 +132,13 @@ success:
57924 +@@ -132,6 +136,13 @@ success:
57925 /*
57926 * vm_flags is protected by the mmap_sem held in write mode.
57927 */
57928 @@ -118938,7 +143703,7 @@ index c889fcb..f181221 100644
57929 vma->vm_flags = new_flags;
57930
57931 out:
57932 -@@ -279,11 +290,27 @@ static long madvise_dontneed(struct vm_area_struct *vma,
57933 +@@ -471,11 +482,27 @@ static long madvise_dontneed(struct vm_area_struct *vma,
57934 struct vm_area_struct **prev,
57935 unsigned long start, unsigned long end)
57936 {
57937 @@ -118966,7 +143731,7 @@ index c889fcb..f181221 100644
57938 return 0;
57939 }
57940
57941 -@@ -486,6 +513,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
57942 +@@ -687,6 +714,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
57943 if (end < start)
57944 return error;
57945
57946 @@ -118984,10 +143749,10 @@ index c889fcb..f181221 100644
57947 if (end == start)
57948 return error;
57949 diff --git a/mm/memcontrol.c b/mm/memcontrol.c
57950 -index fc0bcc4..2e9eabc 100644
57951 +index caf3bf7..162b323 100644
57952 --- a/mm/memcontrol.c
57953 +++ b/mm/memcontrol.c
57954 -@@ -809,7 +809,7 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
57955 +@@ -748,7 +748,7 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
57956 mem_cgroup_update_tree(memcg, page);
57957 #if MAX_NUMNODES > 1
57958 if (unlikely(do_numainfo))
57959 @@ -118996,7 +143761,7 @@ index fc0bcc4..2e9eabc 100644
57960 #endif
57961 }
57962 }
57963 -@@ -1451,7 +1451,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
57964 +@@ -1381,7 +1381,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
57965 * numainfo_events > 0 means there was at least NUMAINFO_EVENTS_TARGET
57966 * pagein/pageout changes since the last update.
57967 */
57968 @@ -119005,7 +143770,7 @@ index fc0bcc4..2e9eabc 100644
57969 return;
57970 if (atomic_inc_return(&memcg->numainfo_updating) > 1)
57971 return;
57972 -@@ -1465,7 +1465,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
57973 +@@ -1395,7 +1395,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
57974 node_clear(nid, memcg->scan_nodes);
57975 }
57976
57977 @@ -119015,7 +143780,7 @@ index fc0bcc4..2e9eabc 100644
57978 }
57979
57980 diff --git a/mm/memory-failure.c b/mm/memory-failure.c
57981 -index 750b789..b1b1b59 100644
57982 +index ac595e7..78fa945 100644
57983 --- a/mm/memory-failure.c
57984 +++ b/mm/memory-failure.c
57985 @@ -64,7 +64,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0;
57986 @@ -119046,10 +143811,10 @@ index 750b789..b1b1b59 100644
57987 /*
57988 * free pages are specially detected outside this table:
57989 diff --git a/mm/memory.c b/mm/memory.c
57990 -index b80bf47..d3fd553 100644
57991 +index 8132787..64b99d0 100644
57992 --- a/mm/memory.c
57993 +++ b/mm/memory.c
57994 -@@ -415,6 +415,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
57995 +@@ -416,6 +416,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
57996 free_pte_range(tlb, pmd, addr);
57997 } while (pmd++, addr = next, addr != end);
57998
57999 @@ -119057,7 +143822,7 @@ index b80bf47..d3fd553 100644
58000 start &= PUD_MASK;
58001 if (start < floor)
58002 return;
58003 -@@ -430,6 +431,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
58004 +@@ -431,6 +432,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
58005 pud_clear(pud);
58006 pmd_free_tlb(tlb, pmd, start);
58007 mm_dec_nr_pmds(tlb->mm);
58008 @@ -119065,7 +143830,7 @@ index b80bf47..d3fd553 100644
58009 }
58010
58011 static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
58012 -@@ -449,6 +451,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
58013 +@@ -450,6 +452,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
58014 free_pmd_range(tlb, pud, addr, next, floor, ceiling);
58015 } while (pud++, addr = next, addr != end);
58016
58017 @@ -119073,7 +143838,7 @@ index b80bf47..d3fd553 100644
58018 start &= PGDIR_MASK;
58019 if (start < floor)
58020 return;
58021 -@@ -463,6 +466,8 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
58022 +@@ -464,6 +467,8 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
58023 pud = pud_offset(pgd, start);
58024 pgd_clear(pgd);
58025 pud_free_tlb(tlb, pud, start);
58026 @@ -119082,7 +143847,7 @@ index b80bf47..d3fd553 100644
58027 }
58028
58029 /*
58030 -@@ -691,7 +696,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
58031 +@@ -686,7 +691,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
58032 /*
58033 * Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y
58034 */
58035 @@ -119091,7 +143856,7 @@ index b80bf47..d3fd553 100644
58036 vma->vm_file,
58037 vma->vm_ops ? vma->vm_ops->fault : NULL,
58038 vma->vm_file ? vma->vm_file->f_op->mmap : NULL,
58039 -@@ -1464,6 +1469,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
58040 +@@ -1448,6 +1453,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
58041 page_add_file_rmap(page);
58042 set_pte_at(mm, addr, pte, mk_pte(page, prot));
58043
58044 @@ -119102,7 +143867,7 @@ index b80bf47..d3fd553 100644
58045 retval = 0;
58046 pte_unmap_unlock(pte, ptl);
58047 return retval;
58048 -@@ -1508,9 +1517,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
58049 +@@ -1492,9 +1501,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
58050 if (!page_count(page))
58051 return -EINVAL;
58052 if (!(vma->vm_flags & VM_MIXEDMAP)) {
58053 @@ -119124,15 +143889,15 @@ index b80bf47..d3fd553 100644
58054 }
58055 return insert_page(vma, addr, page, vma->vm_page_prot);
58056 }
58057 -@@ -1593,6 +1614,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
58058 - unsigned long pfn)
58059 +@@ -1580,6 +1601,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
58060 + pfn_t pfn)
58061 {
58062 BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
58063 + BUG_ON(vma->vm_mirror);
58064
58065 if (addr < vma->vm_start || addr >= vma->vm_end)
58066 return -EFAULT;
58067 -@@ -1840,7 +1862,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
58068 +@@ -1832,7 +1854,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
58069
58070 BUG_ON(pud_huge(*pud));
58071
58072 @@ -119143,7 +143908,7 @@ index b80bf47..d3fd553 100644
58073 if (!pmd)
58074 return -ENOMEM;
58075 do {
58076 -@@ -1860,7 +1884,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
58077 +@@ -1852,7 +1876,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
58078 unsigned long next;
58079 int err;
58080
58081 @@ -119154,7 +143919,7 @@ index b80bf47..d3fd553 100644
58082 if (!pud)
58083 return -ENOMEM;
58084 do {
58085 -@@ -2041,6 +2067,196 @@ static inline int wp_page_reuse(struct mm_struct *mm,
58086 +@@ -2048,6 +2074,196 @@ static inline int wp_page_reuse(struct mm_struct *mm,
58087 return VM_FAULT_WRITE;
58088 }
58089
58090 @@ -119196,7 +143961,7 @@ index b80bf47..d3fd553 100644
58091 + dec_mm_counter_fast(mm, MM_ANONPAGES);
58092 + else
58093 + dec_mm_counter_fast(mm, MM_FILEPAGES);
58094 -+ page_remove_rmap(page);
58095 ++ page_remove_rmap(page, false);
58096 + page_cache_release(page);
58097 + }
58098 + }
58099 @@ -119237,7 +144002,7 @@ index b80bf47..d3fd553 100644
58100 +
58101 + entry_m = pfn_pte(page_to_pfn(page_m), vma_m->vm_page_prot);
58102 + page_cache_get(page_m);
58103 -+ page_add_anon_rmap(page_m, vma_m, address_m);
58104 ++ page_add_anon_rmap(page_m, vma_m, address_m, false);
58105 + inc_mm_counter_fast(mm, MM_ANONPAGES);
58106 + set_pte_at(mm, address_m, pte_m, entry_m);
58107 + update_mmu_cache(vma_m, address_m, pte_m);
58108 @@ -119351,7 +144116,7 @@ index b80bf47..d3fd553 100644
58109 /*
58110 * Handle the case of a page which we actually need to copy to a new page.
58111 *
58112 -@@ -2095,6 +2311,12 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
58113 +@@ -2102,6 +2318,12 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
58114 */
58115 page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
58116 if (likely(pte_same(*page_table, orig_pte))) {
58117 @@ -119363,9 +144128,9 @@ index b80bf47..d3fd553 100644
58118 +
58119 if (old_page) {
58120 if (!PageAnon(old_page)) {
58121 - dec_mm_counter_fast(mm, MM_FILEPAGES);
58122 -@@ -2149,6 +2371,10 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
58123 - page_remove_rmap(old_page);
58124 + dec_mm_counter_fast(mm,
58125 +@@ -2157,6 +2379,10 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
58126 + page_remove_rmap(old_page, false);
58127 }
58128
58129 +#ifdef CONFIG_PAX_SEGMEXEC
58130 @@ -119375,9 +144140,9 @@ index b80bf47..d3fd553 100644
58131 /* Free the old page.. */
58132 new_page = old_page;
58133 page_copied = 1;
58134 -@@ -2580,6 +2806,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
58135 - swap_free(entry);
58136 - if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
58137 +@@ -2585,6 +2811,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
58138 + if (mem_cgroup_swap_full(page) ||
58139 + (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
58140 try_to_free_swap(page);
58141 +
58142 +#ifdef CONFIG_PAX_SEGMEXEC
58143 @@ -119387,7 +144152,7 @@ index b80bf47..d3fd553 100644
58144 unlock_page(page);
58145 if (page != swapcache) {
58146 /*
58147 -@@ -2603,6 +2834,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
58148 +@@ -2608,6 +2839,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
58149
58150 /* No need to invalidate - it was non-present before */
58151 update_mmu_cache(vma, address, page_table);
58152 @@ -119399,7 +144164,7 @@ index b80bf47..d3fd553 100644
58153 unlock:
58154 pte_unmap_unlock(page_table, ptl);
58155 out:
58156 -@@ -2622,40 +2858,6 @@ out_release:
58157 +@@ -2627,40 +2863,6 @@ out_release:
58158 }
58159
58160 /*
58161 @@ -119440,7 +144205,7 @@ index b80bf47..d3fd553 100644
58162 * We enter with non-exclusive mmap_sem (to exclude vma changes,
58163 * but allow concurrent faults), and pte mapped but not yet locked.
58164 * We return with mmap_sem still held, but pte unmapped and unlocked.
58165 -@@ -2665,25 +2867,22 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
58166 +@@ -2670,25 +2872,22 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
58167 unsigned int flags)
58168 {
58169 struct mem_cgroup *memcg;
58170 @@ -119472,7 +144237,7 @@ index b80bf47..d3fd553 100644
58171 if (!pte_none(*page_table))
58172 goto unlock;
58173 /* Deliver the page fault to userland, check inside PT lock */
58174 -@@ -2696,6 +2895,8 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
58175 +@@ -2701,6 +2900,8 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
58176 }
58177
58178 /* Allocate our own private page. */
58179 @@ -119481,7 +144246,7 @@ index b80bf47..d3fd553 100644
58180 if (unlikely(anon_vma_prepare(vma)))
58181 goto oom;
58182 page = alloc_zeroed_user_highpage_movable(vma, address);
58183 -@@ -2729,6 +2930,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
58184 +@@ -2734,6 +2935,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
58185 VM_UFFD_MISSING);
58186 }
58187
58188 @@ -119491,9 +144256,9 @@ index b80bf47..d3fd553 100644
58189 +#endif
58190 +
58191 inc_mm_counter_fast(mm, MM_ANONPAGES);
58192 - page_add_new_anon_rmap(page, vma, address);
58193 - mem_cgroup_commit_charge(page, memcg, false);
58194 -@@ -2738,6 +2944,12 @@ setpte:
58195 + page_add_new_anon_rmap(page, vma, address, false);
58196 + mem_cgroup_commit_charge(page, memcg, false, false);
58197 +@@ -2743,6 +2949,12 @@ setpte:
58198
58199 /* No need to invalidate - it was non-present before */
58200 update_mmu_cache(vma, address, page_table);
58201 @@ -119506,7 +144271,7 @@ index b80bf47..d3fd553 100644
58202 unlock:
58203 pte_unmap_unlock(page_table, ptl);
58204 return 0;
58205 -@@ -2970,6 +3182,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58206 +@@ -2977,6 +3189,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58207 return ret;
58208 }
58209 do_set_pte(vma, address, fault_page, pte, false, false);
58210 @@ -119518,7 +144283,7 @@ index b80bf47..d3fd553 100644
58211 unlock_page(fault_page);
58212 unlock_out:
58213 pte_unmap_unlock(pte, ptl);
58214 -@@ -3021,7 +3238,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58215 +@@ -3028,7 +3245,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58216 }
58217 goto uncharge_out;
58218 }
58219 @@ -119534,10 +144299,10 @@ index b80bf47..d3fd553 100644
58220 + pax_mirror_anon_pte(vma, address, new_page, ptl);
58221 +#endif
58222 +
58223 - mem_cgroup_commit_charge(new_page, memcg, false);
58224 + mem_cgroup_commit_charge(new_page, memcg, false, false);
58225 lru_cache_add_active_or_unevictable(new_page, vma);
58226 pte_unmap_unlock(pte, ptl);
58227 -@@ -3079,6 +3307,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58228 +@@ -3086,6 +3314,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58229 return ret;
58230 }
58231 do_set_pte(vma, address, fault_page, pte, true, false);
58232 @@ -119549,7 +144314,7 @@ index b80bf47..d3fd553 100644
58233 pte_unmap_unlock(pte, ptl);
58234
58235 if (set_page_dirty(fault_page))
58236 -@@ -3325,6 +3558,12 @@ static int handle_pte_fault(struct mm_struct *mm,
58237 +@@ -3338,6 +3571,12 @@ static int handle_pte_fault(struct mm_struct *mm,
58238 if (flags & FAULT_FLAG_WRITE)
58239 flush_tlb_fix_spurious_fault(vma, address);
58240 }
58241 @@ -119562,7 +144327,7 @@ index b80bf47..d3fd553 100644
58242 unlock:
58243 pte_unmap_unlock(pte, ptl);
58244 return 0;
58245 -@@ -3344,9 +3583,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58246 +@@ -3357,9 +3596,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
58247 pmd_t *pmd;
58248 pte_t *pte;
58249
58250 @@ -119604,7 +144369,7 @@ index b80bf47..d3fd553 100644
58251 pgd = pgd_offset(mm, address);
58252 pud = pud_alloc(mm, pgd, address);
58253 if (!pud)
58254 -@@ -3488,6 +3759,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
58255 +@@ -3493,6 +3764,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
58256 spin_unlock(&mm->page_table_lock);
58257 return 0;
58258 }
58259 @@ -119628,7 +144393,7 @@ index b80bf47..d3fd553 100644
58260 #endif /* __PAGETABLE_PUD_FOLDED */
58261
58262 #ifndef __PAGETABLE_PMD_FOLDED
58263 -@@ -3520,6 +3808,32 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
58264 +@@ -3525,6 +3813,32 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
58265 spin_unlock(&mm->page_table_lock);
58266 return 0;
58267 }
58268 @@ -119661,7 +144426,7 @@ index b80bf47..d3fd553 100644
58269 #endif /* __PAGETABLE_PMD_FOLDED */
58270
58271 static int __follow_pte(struct mm_struct *mm, unsigned long address,
58272 -@@ -3629,8 +3943,8 @@ out:
58273 +@@ -3634,8 +3948,8 @@ out:
58274 return ret;
58275 }
58276
58277 @@ -119672,7 +144437,7 @@ index b80bf47..d3fd553 100644
58278 {
58279 resource_size_t phys_addr;
58280 unsigned long prot = 0;
58281 -@@ -3656,8 +3970,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
58282 +@@ -3661,8 +3975,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
58283 * Access another process' address space as given in mm. If non-NULL, use the
58284 * given task for page fault accounting.
58285 */
58286 @@ -119683,7 +144448,7 @@ index b80bf47..d3fd553 100644
58287 {
58288 struct vm_area_struct *vma;
58289 void *old_buf = buf;
58290 -@@ -3665,7 +3979,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
58291 +@@ -3670,7 +3984,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
58292 down_read(&mm->mmap_sem);
58293 /* ignore errors, just check how much was successfully transferred */
58294 while (len) {
58295 @@ -119692,7 +144457,7 @@ index b80bf47..d3fd553 100644
58296 void *maddr;
58297 struct page *page = NULL;
58298
58299 -@@ -3726,8 +4040,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
58300 +@@ -3731,8 +4045,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
58301 *
58302 * The caller must hold a reference on @mm.
58303 */
58304 @@ -119703,7 +144468,7 @@ index b80bf47..d3fd553 100644
58305 {
58306 return __access_remote_vm(NULL, mm, addr, buf, len, write);
58307 }
58308 -@@ -3737,11 +4051,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
58309 +@@ -3742,11 +4056,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
58310 * Source/target buffer must be kernel space,
58311 * Do not walk the page table directly, use get_user_pages
58312 */
58313 @@ -119719,10 +144484,10 @@ index b80bf47..d3fd553 100644
58314 mm = get_task_mm(tsk);
58315 if (!mm)
58316 diff --git a/mm/mempolicy.c b/mm/mempolicy.c
58317 -index 87a1779..ebf95d4 100644
58318 +index 9a3f6b9..b9af66c 100644
58319 --- a/mm/mempolicy.c
58320 +++ b/mm/mempolicy.c
58321 -@@ -700,6 +700,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
58322 +@@ -731,6 +731,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
58323 unsigned long vmstart;
58324 unsigned long vmend;
58325
58326 @@ -119733,7 +144498,7 @@ index 87a1779..ebf95d4 100644
58327 vma = find_vma(mm, start);
58328 if (!vma || vma->vm_start > start)
58329 return -EFAULT;
58330 -@@ -743,6 +747,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
58331 +@@ -774,6 +778,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
58332 err = vma_replace_policy(vma, new_pol);
58333 if (err)
58334 goto out;
58335 @@ -119750,7 +144515,7 @@ index 87a1779..ebf95d4 100644
58336 }
58337
58338 out:
58339 -@@ -1158,6 +1172,17 @@ static long do_mbind(unsigned long start, unsigned long len,
58340 +@@ -1189,6 +1203,17 @@ static long do_mbind(unsigned long start, unsigned long len,
58341
58342 if (end < start)
58343 return -EINVAL;
58344 @@ -119768,7 +144533,7 @@ index 87a1779..ebf95d4 100644
58345 if (end == start)
58346 return 0;
58347
58348 -@@ -1383,8 +1408,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
58349 +@@ -1414,8 +1439,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
58350 */
58351 tcred = __task_cred(task);
58352 if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
58353 @@ -119778,7 +144543,7 @@ index 87a1779..ebf95d4 100644
58354 rcu_read_unlock();
58355 err = -EPERM;
58356 goto out_put;
58357 -@@ -1415,6 +1439,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
58358 +@@ -1446,6 +1470,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
58359 goto out;
58360 }
58361
58362 @@ -119795,10 +144560,10 @@ index 87a1779..ebf95d4 100644
58363 capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
58364
58365 diff --git a/mm/migrate.c b/mm/migrate.c
58366 -index 6d17e0a..64ef47b 100644
58367 +index 3ad0fea..2b361a1 100644
58368 --- a/mm/migrate.c
58369 +++ b/mm/migrate.c
58370 -@@ -1505,8 +1505,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
58371 +@@ -1509,8 +1509,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
58372 */
58373 tcred = __task_cred(task);
58374 if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
58375 @@ -119809,7 +144574,7 @@ index 6d17e0a..64ef47b 100644
58376 err = -EPERM;
58377 goto out;
58378 diff --git a/mm/mlock.c b/mm/mlock.c
58379 -index d6006b1..a72cbda 100644
58380 +index 96f0010..21004da 100644
58381 --- a/mm/mlock.c
58382 +++ b/mm/mlock.c
58383 @@ -14,6 +14,7 @@
58384 @@ -119820,7 +144585,7 @@ index d6006b1..a72cbda 100644
58385 #include <linux/sched.h>
58386 #include <linux/export.h>
58387 #include <linux/rmap.h>
58388 -@@ -560,7 +561,7 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
58389 +@@ -573,7 +574,7 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
58390 {
58391 unsigned long nstart, end, tmp;
58392 struct vm_area_struct * vma, * prev;
58393 @@ -119829,7 +144594,7 @@ index d6006b1..a72cbda 100644
58394
58395 VM_BUG_ON(offset_in_page(start));
58396 VM_BUG_ON(len != PAGE_ALIGN(len));
58397 -@@ -569,6 +570,9 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
58398 +@@ -582,6 +583,9 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
58399 return -EINVAL;
58400 if (end == start)
58401 return 0;
58402 @@ -119839,7 +144604,7 @@ index d6006b1..a72cbda 100644
58403 vma = find_vma(current->mm, start);
58404 if (!vma || vma->vm_start > start)
58405 return -ENOMEM;
58406 -@@ -578,8 +582,14 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
58407 +@@ -591,8 +595,14 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
58408 prev = vma;
58409
58410 for (nstart = start ; ; ) {
58411 @@ -119855,7 +144620,7 @@ index d6006b1..a72cbda 100644
58412 newflags |= flags;
58413
58414 /* Here we know that vma->vm_start <= nstart < vma->vm_end. */
58415 -@@ -627,6 +637,10 @@ static int do_mlock(unsigned long start, size_t len, vm_flags_t flags)
58416 +@@ -640,6 +650,10 @@ static int do_mlock(unsigned long start, size_t len, vm_flags_t flags)
58417 locked += current->mm->locked_vm;
58418
58419 /* check against resource limits */
58420 @@ -119866,7 +144631,7 @@ index d6006b1..a72cbda 100644
58421 if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
58422 error = apply_vma_lock_flags(start, len, flags);
58423
58424 -@@ -707,6 +721,11 @@ static int apply_mlockall_flags(int flags)
58425 +@@ -720,6 +734,11 @@ static int apply_mlockall_flags(int flags)
58426 for (vma = current->mm->mmap; vma ; vma = prev->vm_next) {
58427 vm_flags_t newflags;
58428
58429 @@ -119878,7 +144643,7 @@ index d6006b1..a72cbda 100644
58430 newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK;
58431 newflags |= to_add;
58432
58433 -@@ -736,8 +755,12 @@ SYSCALL_DEFINE1(mlockall, int, flags)
58434 +@@ -749,8 +768,12 @@ SYSCALL_DEFINE1(mlockall, int, flags)
58435 lock_limit >>= PAGE_SHIFT;
58436
58437 ret = -ENOMEM;
58438 @@ -119906,20 +144671,20 @@ index fdadf91..90c6bcc 100644
58439 .priority = IPC_CALLBACK_PRI, /* use lowest priority */
58440 };
58441 diff --git a/mm/mmap.c b/mm/mmap.c
58442 -index 455772a..5ce0964 100644
58443 +index 76d1ec2..85ad30a 100644
58444 --- a/mm/mmap.c
58445 +++ b/mm/mmap.c
58446 -@@ -42,6 +42,7 @@
58447 - #include <linux/memory.h>
58448 +@@ -43,6 +43,7 @@
58449 #include <linux/printk.h>
58450 #include <linux/userfaultfd_k.h>
58451 + #include <linux/moduleparam.h>
58452 +#include <linux/random.h>
58453
58454 #include <asm/uaccess.h>
58455 #include <asm/cacheflush.h>
58456 -@@ -58,6 +59,16 @@
58457 - #define arch_rebalance_pgtables(addr, len) (addr)
58458 - #endif
58459 +@@ -73,6 +74,16 @@ int mmap_rnd_compat_bits __read_mostly = CONFIG_ARCH_MMAP_RND_COMPAT_BITS;
58460 + static bool ignore_rlimit_data = true;
58461 + core_param(ignore_rlimit_data, ignore_rlimit_data, bool, 0644);
58462
58463 +static inline void verify_mm_writelocked(struct mm_struct *mm)
58464 +{
58465 @@ -119934,7 +144699,7 @@ index 455772a..5ce0964 100644
58466 static void unmap_region(struct mm_struct *mm,
58467 struct vm_area_struct *vma, struct vm_area_struct *prev,
58468 unsigned long start, unsigned long end);
58469 -@@ -77,16 +88,25 @@ static void unmap_region(struct mm_struct *mm,
58470 +@@ -92,16 +103,25 @@ static void unmap_region(struct mm_struct *mm,
58471 * x: (no) no x: (no) yes x: (no) yes x: (yes) yes
58472 *
58473 */
58474 @@ -119963,7 +144728,7 @@ index 455772a..5ce0964 100644
58475 }
58476 EXPORT_SYMBOL(vm_get_page_prot);
58477
58478 -@@ -115,6 +135,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly;
58479 +@@ -130,6 +150,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly;
58480 int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
58481 unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */
58482 unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */
58483 @@ -119971,7 +144736,7 @@ index 455772a..5ce0964 100644
58484 /*
58485 * Make sure vm_committed_as in one cacheline and not cacheline shared with
58486 * other variables. It can be updated by several CPUs frequently.
58487 -@@ -272,6 +293,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
58488 +@@ -287,6 +308,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
58489 struct vm_area_struct *next = vma->vm_next;
58490
58491 might_sleep();
58492 @@ -119979,7 +144744,7 @@ index 455772a..5ce0964 100644
58493 if (vma->vm_ops && vma->vm_ops->close)
58494 vma->vm_ops->close(vma);
58495 if (vma->vm_file)
58496 -@@ -285,6 +307,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len);
58497 +@@ -300,6 +322,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len);
58498
58499 SYSCALL_DEFINE1(brk, unsigned long, brk)
58500 {
58501 @@ -119987,7 +144752,7 @@ index 455772a..5ce0964 100644
58502 unsigned long retval;
58503 unsigned long newbrk, oldbrk;
58504 struct mm_struct *mm = current->mm;
58505 -@@ -315,7 +338,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
58506 +@@ -330,7 +353,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
58507 * segment grow beyond its set limit the in case where the limit is
58508 * not page aligned -Ram Gupta
58509 */
58510 @@ -120002,7 +144767,7 @@ index 455772a..5ce0964 100644
58511 mm->end_data, mm->start_data))
58512 goto out;
58513
58514 -@@ -977,6 +1006,12 @@ can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
58515 +@@ -995,6 +1024,12 @@ can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
58516 pgoff_t vm_pgoff,
58517 struct vm_userfaultfd_ctx vm_userfaultfd_ctx)
58518 {
58519 @@ -120015,7 +144780,7 @@ index 455772a..5ce0964 100644
58520 if (is_mergeable_vma(vma, file, vm_flags, vm_userfaultfd_ctx) &&
58521 is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
58522 if (vma->vm_pgoff == vm_pgoff)
58523 -@@ -998,6 +1033,12 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
58524 +@@ -1016,6 +1051,12 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
58525 pgoff_t vm_pgoff,
58526 struct vm_userfaultfd_ctx vm_userfaultfd_ctx)
58527 {
58528 @@ -120028,7 +144793,7 @@ index 455772a..5ce0964 100644
58529 if (is_mergeable_vma(vma, file, vm_flags, vm_userfaultfd_ctx) &&
58530 is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
58531 pgoff_t vm_pglen;
58532 -@@ -1048,6 +1089,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58533 +@@ -1066,6 +1107,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58534 struct vm_area_struct *area, *next;
58535 int err;
58536
58537 @@ -120042,7 +144807,7 @@ index 455772a..5ce0964 100644
58538 /*
58539 * We later require that vma->vm_flags == vm_flags,
58540 * so this tests vma->vm_flags & VM_SPECIAL, too.
58541 -@@ -1063,6 +1111,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58542 +@@ -1081,6 +1129,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58543 if (next && next->vm_end == end) /* cases 6, 7, 8 */
58544 next = next->vm_next;
58545
58546 @@ -120058,7 +144823,7 @@ index 455772a..5ce0964 100644
58547 /*
58548 * Can it merge with the predecessor?
58549 */
58550 -@@ -1085,9 +1142,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58551 +@@ -1103,9 +1160,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58552 /* cases 1, 6 */
58553 err = vma_adjust(prev, prev->vm_start,
58554 next->vm_end, prev->vm_pgoff, NULL);
58555 @@ -120084,7 +144849,7 @@ index 455772a..5ce0964 100644
58556 if (err)
58557 return NULL;
58558 khugepaged_enter_vma_merge(prev, vm_flags);
58559 -@@ -1102,12 +1174,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58560 +@@ -1120,12 +1192,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
58561 can_vma_merge_before(next, vm_flags,
58562 anon_vma, file, pgoff+pglen,
58563 vm_userfaultfd_ctx)) {
58564 @@ -120114,29 +144879,7 @@ index 455772a..5ce0964 100644
58565 if (err)
58566 return NULL;
58567 khugepaged_enter_vma_merge(area, vm_flags);
58568 -@@ -1216,8 +1303,10 @@ none:
58569 - void vm_stat_account(struct mm_struct *mm, unsigned long flags,
58570 - struct file *file, long pages)
58571 - {
58572 -- const unsigned long stack_flags
58573 -- = VM_STACK_FLAGS & (VM_GROWSUP|VM_GROWSDOWN);
58574 -+
58575 -+#ifdef CONFIG_PAX_RANDMMAP
58576 -+ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
58577 -+#endif
58578 -
58579 - mm->total_vm += pages;
58580 -
58581 -@@ -1225,7 +1314,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
58582 - mm->shared_vm += pages;
58583 - if ((flags & (VM_EXEC|VM_WRITE)) == VM_EXEC)
58584 - mm->exec_vm += pages;
58585 -- } else if (flags & stack_flags)
58586 -+ } else if (flags & (VM_GROWSUP|VM_GROWSDOWN))
58587 - mm->stack_vm += pages;
58588 - }
58589 - #endif /* CONFIG_PROC_FS */
58590 -@@ -1255,6 +1344,10 @@ static inline int mlock_future_check(struct mm_struct *mm,
58591 +@@ -1255,6 +1342,10 @@ static inline int mlock_future_check(struct mm_struct *mm,
58592 locked += mm->locked_vm;
58593 lock_limit = rlimit(RLIMIT_MEMLOCK);
58594 lock_limit >>= PAGE_SHIFT;
58595 @@ -120147,7 +144890,7 @@ index 455772a..5ce0964 100644
58596 if (locked > lock_limit && !capable(CAP_IPC_LOCK))
58597 return -EAGAIN;
58598 }
58599 -@@ -1282,7 +1375,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58600 +@@ -1282,7 +1373,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58601 * (the exception is when the underlying filesystem is noexec
58602 * mounted, in which case we dont add PROT_EXEC.)
58603 */
58604 @@ -120156,7 +144899,7 @@ index 455772a..5ce0964 100644
58605 if (!(file && path_noexec(&file->f_path)))
58606 prot |= PROT_EXEC;
58607
58608 -@@ -1305,7 +1398,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58609 +@@ -1305,7 +1396,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58610 /* Obtain the address to map to. we verify (or select) it and ensure
58611 * that it represents a valid section of the address space.
58612 */
58613 @@ -120165,7 +144908,7 @@ index 455772a..5ce0964 100644
58614 if (offset_in_page(addr))
58615 return addr;
58616
58617 -@@ -1316,6 +1409,43 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58618 +@@ -1316,6 +1407,43 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58619 vm_flags |= calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
58620 mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
58621
58622 @@ -120209,7 +144952,7 @@ index 455772a..5ce0964 100644
58623 if (flags & MAP_LOCKED)
58624 if (!can_do_mlock())
58625 return -EPERM;
58626 -@@ -1403,6 +1533,9 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58627 +@@ -1403,6 +1531,9 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
58628 vm_flags |= VM_NORESERVE;
58629 }
58630
58631 @@ -120219,7 +144962,7 @@ index 455772a..5ce0964 100644
58632 addr = mmap_region(file, addr, len, vm_flags, pgoff);
58633 if (!IS_ERR_VALUE(addr) &&
58634 ((vm_flags & VM_LOCKED) ||
58635 -@@ -1496,7 +1629,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
58636 +@@ -1496,7 +1627,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
58637 const struct vm_operations_struct *vm_ops = vma->vm_ops;
58638
58639 /* If it was private or non-writable, the write bit is already clear */
58640 @@ -120228,7 +144971,7 @@ index 455772a..5ce0964 100644
58641 return 0;
58642
58643 /* The backer wishes to know when pages are first written to? */
58644 -@@ -1547,7 +1680,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58645 +@@ -1547,7 +1678,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58646 struct rb_node **rb_link, *rb_parent;
58647 unsigned long charged = 0;
58648
58649 @@ -120248,10 +144991,10 @@ index 455772a..5ce0964 100644
58650 + if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (vm_flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
58651 +#endif
58652 +
58653 - if (!may_expand_vm(mm, len >> PAGE_SHIFT)) {
58654 + if (!may_expand_vm(mm, vm_flags, len >> PAGE_SHIFT)) {
58655 unsigned long nr_pages;
58656
58657 -@@ -1569,6 +1717,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58658 +@@ -1567,6 +1713,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58659 &rb_parent)) {
58660 if (do_munmap(mm, addr, len))
58661 return -ENOMEM;
58662 @@ -120259,7 +145002,7 @@ index 455772a..5ce0964 100644
58663 }
58664
58665 /*
58666 -@@ -1600,6 +1749,16 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58667 +@@ -1598,6 +1745,16 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58668 goto unacct_error;
58669 }
58670
58671 @@ -120276,7 +145019,7 @@ index 455772a..5ce0964 100644
58672 vma->vm_mm = mm;
58673 vma->vm_start = addr;
58674 vma->vm_end = addr + len;
58675 -@@ -1630,6 +1789,13 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58676 +@@ -1628,6 +1785,13 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58677 if (error)
58678 goto unmap_and_free_vma;
58679
58680 @@ -120290,7 +145033,7 @@ index 455772a..5ce0964 100644
58681 /* Can addr have changed??
58682 *
58683 * Answer: Yes, several device drivers can do it in their
58684 -@@ -1648,6 +1814,12 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58685 +@@ -1646,6 +1810,12 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
58686 }
58687
58688 vma_link(mm, vma, prev, rb_link, rb_parent);
58689 @@ -120303,15 +145046,15 @@ index 455772a..5ce0964 100644
58690 /* Once vma denies write, undo our temporary denial count */
58691 if (file) {
58692 if (vm_flags & VM_SHARED)
58693 -@@ -1660,6 +1832,7 @@ out:
58694 +@@ -1658,6 +1828,7 @@ out:
58695 perf_event_mmap(vma);
58696
58697 - vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
58698 + vm_stat_account(mm, vm_flags, len >> PAGE_SHIFT);
58699 + track_exec_limit(mm, addr, addr + len, vm_flags);
58700 if (vm_flags & VM_LOCKED) {
58701 if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) ||
58702 vma == get_gate_vma(current->mm)))
58703 -@@ -1697,6 +1870,12 @@ allow_write_and_free_vma:
58704 +@@ -1695,6 +1866,12 @@ allow_write_and_free_vma:
58705 if (vm_flags & VM_DENYWRITE)
58706 allow_write_access(file);
58707 free_vma:
58708 @@ -120324,7 +145067,7 @@ index 455772a..5ce0964 100644
58709 kmem_cache_free(vm_area_cachep, vma);
58710 unacct_error:
58711 if (charged)
58712 -@@ -1704,7 +1883,63 @@ unacct_error:
58713 +@@ -1702,7 +1879,63 @@ unacct_error:
58714 return error;
58715 }
58716
58717 @@ -120389,7 +145132,7 @@ index 455772a..5ce0964 100644
58718 {
58719 /*
58720 * We implement the search by looking for an rbtree node that
58721 -@@ -1752,11 +1987,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
58722 +@@ -1750,11 +1983,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
58723 }
58724 }
58725
58726 @@ -120420,7 +145163,7 @@ index 455772a..5ce0964 100644
58727 if (gap_end >= low_limit && gap_end - gap_start >= length)
58728 goto found;
58729
58730 -@@ -1806,7 +2059,7 @@ found:
58731 +@@ -1804,7 +2055,7 @@ found:
58732 return gap_start;
58733 }
58734
58735 @@ -120429,7 +145172,7 @@ index 455772a..5ce0964 100644
58736 {
58737 struct mm_struct *mm = current->mm;
58738 struct vm_area_struct *vma;
58739 -@@ -1860,6 +2113,24 @@ check_current:
58740 +@@ -1858,6 +2109,24 @@ check_current:
58741 gap_end = vma->vm_start;
58742 if (gap_end < low_limit)
58743 return -ENOMEM;
58744 @@ -120454,7 +145197,7 @@ index 455772a..5ce0964 100644
58745 if (gap_start <= high_limit && gap_end - gap_start >= length)
58746 goto found;
58747
58748 -@@ -1923,6 +2194,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
58749 +@@ -1921,6 +2190,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
58750 struct mm_struct *mm = current->mm;
58751 struct vm_area_struct *vma;
58752 struct vm_unmapped_area_info info;
58753 @@ -120462,7 +145205,7 @@ index 455772a..5ce0964 100644
58754
58755 if (len > TASK_SIZE - mmap_min_addr)
58756 return -ENOMEM;
58757 -@@ -1930,11 +2202,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
58758 +@@ -1928,11 +2198,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
58759 if (flags & MAP_FIXED)
58760 return addr;
58761
58762 @@ -120479,7 +145222,7 @@ index 455772a..5ce0964 100644
58763 return addr;
58764 }
58765
58766 -@@ -1943,6 +2219,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
58767 +@@ -1941,6 +2215,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
58768 info.low_limit = mm->mmap_base;
58769 info.high_limit = TASK_SIZE;
58770 info.align_mask = 0;
58771 @@ -120487,7 +145230,7 @@ index 455772a..5ce0964 100644
58772 return vm_unmapped_area(&info);
58773 }
58774 #endif
58775 -@@ -1961,6 +2238,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58776 +@@ -1959,6 +2234,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58777 struct mm_struct *mm = current->mm;
58778 unsigned long addr = addr0;
58779 struct vm_unmapped_area_info info;
58780 @@ -120495,7 +145238,7 @@ index 455772a..5ce0964 100644
58781
58782 /* requested length too big for entire address space */
58783 if (len > TASK_SIZE - mmap_min_addr)
58784 -@@ -1969,12 +2247,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58785 +@@ -1967,12 +2243,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58786 if (flags & MAP_FIXED)
58787 return addr;
58788
58789 @@ -120513,7 +145256,7 @@ index 455772a..5ce0964 100644
58790 return addr;
58791 }
58792
58793 -@@ -1983,6 +2265,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58794 +@@ -1981,6 +2261,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58795 info.low_limit = max(PAGE_SIZE, mmap_min_addr);
58796 info.high_limit = mm->mmap_base;
58797 info.align_mask = 0;
58798 @@ -120521,7 +145264,7 @@ index 455772a..5ce0964 100644
58799 addr = vm_unmapped_area(&info);
58800
58801 /*
58802 -@@ -1995,6 +2278,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58803 +@@ -1993,6 +2274,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
58804 VM_BUG_ON(addr != -ENOMEM);
58805 info.flags = 0;
58806 info.low_limit = TASK_UNMAPPED_BASE;
58807 @@ -120534,7 +145277,7 @@ index 455772a..5ce0964 100644
58808 info.high_limit = TASK_SIZE;
58809 addr = vm_unmapped_area(&info);
58810 }
58811 -@@ -2094,6 +2383,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
58812 +@@ -2092,6 +2379,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
58813 return vma;
58814 }
58815
58816 @@ -120563,7 +145306,7 @@ index 455772a..5ce0964 100644
58817 /*
58818 * Verify that the stack growth is acceptable and
58819 * update accounting. This is shared with both the
58820 -@@ -2111,8 +2422,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
58821 +@@ -2109,8 +2418,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
58822
58823 /* Stack limit test */
58824 actual_size = size;
58825 @@ -120573,7 +145316,7 @@ index 455772a..5ce0964 100644
58826 if (actual_size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur))
58827 return -ENOMEM;
58828
58829 -@@ -2123,6 +2433,10 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
58830 +@@ -2121,6 +2429,10 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
58831 locked = mm->locked_vm + grow;
58832 limit = READ_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
58833 limit >>= PAGE_SHIFT;
58834 @@ -120584,7 +145327,7 @@ index 455772a..5ce0964 100644
58835 if (locked > limit && !capable(CAP_IPC_LOCK))
58836 return -ENOMEM;
58837 }
58838 -@@ -2148,17 +2462,21 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
58839 +@@ -2146,17 +2458,21 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
58840 * PA-RISC uses this for its stack; IA64 for its Register Backing Store.
58841 * vma is the last one with address > vma->vm_end. Have to extend vma.
58842 */
58843 @@ -120608,7 +145351,7 @@ index 455772a..5ce0964 100644
58844 else
58845 return -ENOMEM;
58846
58847 -@@ -2166,15 +2484,24 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
58848 +@@ -2164,15 +2480,24 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
58849 if (unlikely(anon_vma_prepare(vma)))
58850 return -ENOMEM;
58851
58852 @@ -120635,7 +145378,7 @@ index 455772a..5ce0964 100644
58853 unsigned long size, grow;
58854
58855 size = address - vma->vm_start;
58856 -@@ -2213,6 +2540,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
58857 +@@ -2210,6 +2535,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
58858 }
58859 }
58860 }
58861 @@ -120644,7 +145387,7 @@ index 455772a..5ce0964 100644
58862 anon_vma_unlock_write(vma->anon_vma);
58863 khugepaged_enter_vma_merge(vma, vma->vm_flags);
58864 validate_mm(mm);
58865 -@@ -2228,6 +2557,8 @@ int expand_downwards(struct vm_area_struct *vma,
58866 +@@ -2225,6 +2552,8 @@ int expand_downwards(struct vm_area_struct *vma,
58867 {
58868 struct mm_struct *mm = vma->vm_mm;
58869 int error;
58870 @@ -120653,7 +145396,7 @@ index 455772a..5ce0964 100644
58871
58872 address &= PAGE_MASK;
58873 error = security_mmap_addr(address);
58874 -@@ -2238,6 +2569,15 @@ int expand_downwards(struct vm_area_struct *vma,
58875 +@@ -2235,6 +2564,15 @@ int expand_downwards(struct vm_area_struct *vma,
58876 if (unlikely(anon_vma_prepare(vma)))
58877 return -ENOMEM;
58878
58879 @@ -120669,7 +145412,7 @@ index 455772a..5ce0964 100644
58880 /*
58881 * vma->vm_start/vm_end cannot change under us because the caller
58882 * is required to hold the mmap_sem in read mode. We need the
58883 -@@ -2246,9 +2586,17 @@ int expand_downwards(struct vm_area_struct *vma,
58884 +@@ -2243,9 +2581,17 @@ int expand_downwards(struct vm_area_struct *vma,
58885 anon_vma_lock_write(vma->anon_vma);
58886
58887 /* Somebody else might have raced and expanded it already */
58888 @@ -120688,7 +145431,7 @@ index 455772a..5ce0964 100644
58889 size = vma->vm_end - address;
58890 grow = (vma->vm_start - address) >> PAGE_SHIFT;
58891
58892 -@@ -2277,13 +2625,27 @@ int expand_downwards(struct vm_area_struct *vma,
58893 +@@ -2273,13 +2619,27 @@ int expand_downwards(struct vm_area_struct *vma,
58894 vma->vm_pgoff -= grow;
58895 anon_vma_interval_tree_post_update_vma(vma);
58896 vma_gap_update(vma);
58897 @@ -120716,7 +145459,7 @@ index 455772a..5ce0964 100644
58898 khugepaged_enter_vma_merge(vma, vma->vm_flags);
58899 validate_mm(mm);
58900 return error;
58901 -@@ -2383,6 +2745,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
58902 +@@ -2379,6 +2739,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
58903 do {
58904 long nrpages = vma_pages(vma);
58905
58906 @@ -120729,8 +145472,8 @@ index 455772a..5ce0964 100644
58907 +
58908 if (vma->vm_flags & VM_ACCOUNT)
58909 nr_accounted += nrpages;
58910 - vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
58911 -@@ -2427,6 +2796,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
58912 + vm_stat_account(mm, vma->vm_flags, -nrpages);
58913 +@@ -2423,6 +2790,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
58914 insertion_point = (prev ? &prev->vm_next : &mm->mmap);
58915 vma->vm_prev = NULL;
58916 do {
58917 @@ -120747,7 +145490,7 @@ index 455772a..5ce0964 100644
58918 vma_rb_erase(vma, &mm->mm_rb);
58919 mm->map_count--;
58920 tail_vma = vma;
58921 -@@ -2454,14 +2833,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58922 +@@ -2450,14 +2827,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58923 struct vm_area_struct *new;
58924 int err;
58925
58926 @@ -120781,7 +145524,7 @@ index 455772a..5ce0964 100644
58927 /* most fields are the same, copy all, and then fixup */
58928 *new = *vma;
58929
58930 -@@ -2474,6 +2872,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58931 +@@ -2470,6 +2866,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58932 new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
58933 }
58934
58935 @@ -120804,7 +145547,7 @@ index 455772a..5ce0964 100644
58936 err = vma_dup_policy(vma, new);
58937 if (err)
58938 goto out_free_vma;
58939 -@@ -2494,6 +2908,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58940 +@@ -2490,6 +2902,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58941 else
58942 err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
58943
58944 @@ -120843,7 +145586,7 @@ index 455772a..5ce0964 100644
58945 /* Success. */
58946 if (!err)
58947 return 0;
58948 -@@ -2503,10 +2949,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58949 +@@ -2499,10 +2943,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58950 new->vm_ops->close(new);
58951 if (new->vm_file)
58952 fput(new->vm_file);
58953 @@ -120863,7 +145606,7 @@ index 455772a..5ce0964 100644
58954 kmem_cache_free(vm_area_cachep, new);
58955 return err;
58956 }
58957 -@@ -2518,6 +2972,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58958 +@@ -2514,6 +2966,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58959 int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58960 unsigned long addr, int new_below)
58961 {
58962 @@ -120879,7 +145622,7 @@ index 455772a..5ce0964 100644
58963 if (mm->map_count >= sysctl_max_map_count)
58964 return -ENOMEM;
58965
58966 -@@ -2529,11 +2992,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58967 +@@ -2525,11 +2986,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
58968 * work. This now handles partial unmappings.
58969 * Jeremy Fitzhardinge <jeremy@××××.org>
58970 */
58971 @@ -120910,7 +145653,7 @@ index 455772a..5ce0964 100644
58972 if ((offset_in_page(start)) || start > TASK_SIZE || len > TASK_SIZE-start)
58973 return -EINVAL;
58974
58975 -@@ -2611,6 +3093,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
58976 +@@ -2607,6 +3087,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
58977 /* Fix up all other VM information */
58978 remove_vma_list(mm, vma);
58979
58980 @@ -120919,7 +145662,7 @@ index 455772a..5ce0964 100644
58981 return 0;
58982 }
58983
58984 -@@ -2619,6 +3103,13 @@ int vm_munmap(unsigned long start, size_t len)
58985 +@@ -2615,6 +3097,13 @@ int vm_munmap(unsigned long start, size_t len)
58986 int ret;
58987 struct mm_struct *mm = current->mm;
58988
58989 @@ -120933,7 +145676,7 @@ index 455772a..5ce0964 100644
58990 down_write(&mm->mmap_sem);
58991 ret = do_munmap(mm, start, len);
58992 up_write(&mm->mmap_sem);
58993 -@@ -2665,6 +3156,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
58994 +@@ -2661,6 +3150,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
58995 down_write(&mm->mmap_sem);
58996 vma = find_vma(mm, start);
58997
58998 @@ -120945,7 +145688,7 @@ index 455772a..5ce0964 100644
58999 if (!vma || !(vma->vm_flags & VM_SHARED))
59000 goto out;
59001
59002 -@@ -2725,16 +3221,6 @@ out:
59003 +@@ -2721,16 +3215,6 @@ out:
59004 return ret;
59005 }
59006
59007 @@ -120962,7 +145705,7 @@ index 455772a..5ce0964 100644
59008 /*
59009 * this is really a simplified "do_mmap". it only handles
59010 * anonymous maps. eventually we may be able to do some
59011 -@@ -2748,6 +3234,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59012 +@@ -2744,6 +3228,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59013 struct rb_node **rb_link, *rb_parent;
59014 pgoff_t pgoff = addr >> PAGE_SHIFT;
59015 int error;
59016 @@ -120970,7 +145713,7 @@ index 455772a..5ce0964 100644
59017
59018 len = PAGE_ALIGN(len);
59019 if (!len)
59020 -@@ -2755,10 +3242,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59021 +@@ -2751,10 +3236,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59022
59023 flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
59024
59025 @@ -120995,7 +145738,7 @@ index 455772a..5ce0964 100644
59026 error = mlock_future_check(mm, mm->def_flags, len);
59027 if (error)
59028 return error;
59029 -@@ -2776,16 +3277,17 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59030 +@@ -2772,16 +3271,17 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59031 &rb_parent)) {
59032 if (do_munmap(mm, addr, len))
59033 return -ENOMEM;
59034 @@ -121003,8 +145746,8 @@ index 455772a..5ce0964 100644
59035 }
59036
59037 /* Check against address space limits *after* clearing old maps... */
59038 -- if (!may_expand_vm(mm, len >> PAGE_SHIFT))
59039 -+ if (!may_expand_vm(mm, charged))
59040 +- if (!may_expand_vm(mm, flags, len >> PAGE_SHIFT))
59041 ++ if (!may_expand_vm(mm, flags, charged))
59042 return -ENOMEM;
59043
59044 if (mm->map_count > sysctl_max_map_count)
59045 @@ -121015,7 +145758,7 @@ index 455772a..5ce0964 100644
59046 return -ENOMEM;
59047
59048 /* Can we just expand an old private anonymous mapping? */
59049 -@@ -2799,7 +3301,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59050 +@@ -2795,7 +3295,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59051 */
59052 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
59053 if (!vma) {
59054 @@ -121024,12 +145767,14 @@ index 455772a..5ce0964 100644
59055 return -ENOMEM;
59056 }
59057
59058 -@@ -2813,10 +3315,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59059 +@@ -2809,11 +3309,12 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
59060 vma_link(mm, vma, prev, rb_link, rb_parent);
59061 out:
59062 perf_event_mmap(vma);
59063 - mm->total_vm += len >> PAGE_SHIFT;
59064 +- mm->data_vm += len >> PAGE_SHIFT;
59065 + mm->total_vm += charged;
59066 ++ mm->data_vm += charged;
59067 if (flags & VM_LOCKED)
59068 - mm->locked_vm += (len >> PAGE_SHIFT);
59069 + mm->locked_vm += charged;
59070 @@ -121038,7 +145783,7 @@ index 455772a..5ce0964 100644
59071 return addr;
59072 }
59073
59074 -@@ -2878,6 +3381,7 @@ void exit_mmap(struct mm_struct *mm)
59075 +@@ -2875,6 +3376,7 @@ void exit_mmap(struct mm_struct *mm)
59076 while (vma) {
59077 if (vma->vm_flags & VM_ACCOUNT)
59078 nr_accounted += vma_pages(vma);
59079 @@ -121046,7 +145791,7 @@ index 455772a..5ce0964 100644
59080 vma = remove_vma(vma);
59081 }
59082 vm_unacct_memory(nr_accounted);
59083 -@@ -2892,6 +3396,10 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
59084 +@@ -2889,6 +3391,10 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
59085 struct vm_area_struct *prev;
59086 struct rb_node **rb_link, *rb_parent;
59087
59088 @@ -121057,7 +145802,7 @@ index 455772a..5ce0964 100644
59089 if (find_vma_links(mm, vma->vm_start, vma->vm_end,
59090 &prev, &rb_link, &rb_parent))
59091 return -ENOMEM;
59092 -@@ -2899,6 +3407,9 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
59093 +@@ -2896,6 +3402,9 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
59094 security_vm_enough_memory_mm(mm, vma_pages(vma)))
59095 return -ENOMEM;
59096
59097 @@ -121067,7 +145812,7 @@ index 455772a..5ce0964 100644
59098 /*
59099 * The vm_pgoff of a purely anonymous vma should be irrelevant
59100 * until its first write fault, when page's anon_vma and index
59101 -@@ -2916,7 +3427,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
59102 +@@ -2913,7 +3422,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
59103 vma->vm_pgoff = vma->vm_start >> PAGE_SHIFT;
59104 }
59105
59106 @@ -121089,7 +145834,7 @@ index 455772a..5ce0964 100644
59107 return 0;
59108 }
59109
59110 -@@ -2935,6 +3460,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
59111 +@@ -2932,6 +3455,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
59112 struct rb_node **rb_link, *rb_parent;
59113 bool faulted_in_anon_vma = true;
59114
59115 @@ -121098,7 +145843,7 @@ index 455772a..5ce0964 100644
59116 /*
59117 * If anonymous vma has not yet been faulted, update new pgoff
59118 * to match new location, to increase its chance of merging.
59119 -@@ -3001,6 +3528,39 @@ out:
59120 +@@ -2998,25 +3523,69 @@ out:
59121 return NULL;
59122 }
59123
59124 @@ -121138,19 +145883,58 @@ index 455772a..5ce0964 100644
59125 /*
59126 * Return true if the calling process may expand its vm space by the passed
59127 * number of pages
59128 -@@ -3012,6 +3572,11 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
59129 -
59130 - lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
59131 -
59132 -+ if ((cur + npages) > (ULONG_MAX >> PAGE_SHIFT))
59133 + */
59134 + bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
59135 + {
59136 ++ if ((mm->total_vm + npages) > (ULONG_MAX >> PAGE_SHIFT))
59137 + gr_learn_resource(current, RLIMIT_AS, ULONG_MAX, 1);
59138 + else
59139 -+ gr_learn_resource(current, RLIMIT_AS, (cur + npages) << PAGE_SHIFT, 1);
59140 ++ gr_learn_resource(current, RLIMIT_AS, (mm->total_vm + npages) << PAGE_SHIFT, 1);
59141 +
59142 - if (cur + npages > lim)
59143 - return 0;
59144 - return 1;
59145 -@@ -3086,6 +3651,22 @@ static struct vm_area_struct *__install_special_mapping(
59146 + if (mm->total_vm + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT)
59147 + return false;
59148 +
59149 +- if (is_data_mapping(flags) &&
59150 +- mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT) {
59151 +- if (ignore_rlimit_data)
59152 +- pr_warn_once("%s (%d): VmData %lu exceed data ulimit "
59153 +- "%lu. Will be forbidden soon.\n",
59154 +- current->comm, current->pid,
59155 +- (mm->data_vm + npages) << PAGE_SHIFT,
59156 +- rlimit(RLIMIT_DATA));
59157 ++ if (is_data_mapping(flags)) {
59158 ++ if ((mm->data_vm + npages) > (ULONG_MAX >> PAGE_SHIFT))
59159 ++ gr_learn_resource(current, RLIMIT_DATA, ULONG_MAX, 1);
59160 + else
59161 +- return false;
59162 ++ gr_learn_resource(current, RLIMIT_DATA, (mm->data_vm + npages) << PAGE_SHIFT, 1);
59163 ++
59164 ++ if (mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT) {
59165 ++ if (ignore_rlimit_data)
59166 ++ pr_warn_once("%s (%d): VmData %lu exceed data ulimit "
59167 ++ "%lu. Will be forbidden soon.\n",
59168 ++ current->comm, current->pid,
59169 ++ (mm->data_vm + npages) << PAGE_SHIFT,
59170 ++ rlimit(RLIMIT_DATA));
59171 ++ else
59172 ++ return false;
59173 ++ }
59174 + }
59175 +
59176 + return true;
59177 +@@ -3024,6 +3593,11 @@ bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
59178 +
59179 + void vm_stat_account(struct mm_struct *mm, vm_flags_t flags, long npages)
59180 + {
59181 ++
59182 ++#ifdef CONFIG_PAX_RANDMMAP
59183 ++ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
59184 ++#endif
59185 ++
59186 + mm->total_vm += npages;
59187 +
59188 + if (is_exec_mapping(flags))
59189 +@@ -3103,6 +3677,22 @@ static struct vm_area_struct *__install_special_mapping(
59190 vma->vm_start = addr;
59191 vma->vm_end = addr + len;
59192
59193 @@ -121174,7 +145958,7 @@ index 455772a..5ce0964 100644
59194 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
59195
59196 diff --git a/mm/mprotect.c b/mm/mprotect.c
59197 -index ef5be8e..811ccb0 100644
59198 +index f7cb3d4..7db167a 100644
59199 --- a/mm/mprotect.c
59200 +++ b/mm/mprotect.c
59201 @@ -24,10 +24,18 @@
59202 @@ -121196,7 +145980,7 @@ index ef5be8e..811ccb0 100644
59203
59204 #include "internal.h"
59205
59206 -@@ -254,6 +262,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
59207 +@@ -257,6 +265,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
59208 return pages;
59209 }
59210
59211 @@ -121245,7 +146029,7 @@ index ef5be8e..811ccb0 100644
59212 int
59213 mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
59214 unsigned long start, unsigned long end, unsigned long newflags)
59215 -@@ -266,11 +316,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
59216 +@@ -269,11 +319,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
59217 int error;
59218 int dirty_accountable = 0;
59219
59220 @@ -121275,7 +146059,7 @@ index ef5be8e..811ccb0 100644
59221 /*
59222 * If we make a private mapping writable we increase our commit;
59223 * but (without finer accounting) cannot reduce our commit if we
59224 -@@ -287,6 +355,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
59225 +@@ -294,6 +362,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
59226 }
59227 }
59228
59229 @@ -121318,7 +146102,7 @@ index ef5be8e..811ccb0 100644
59230 /*
59231 * First try to merge with previous and/or next vma.
59232 */
59233 -@@ -318,7 +422,19 @@ success:
59234 +@@ -325,7 +429,19 @@ success:
59235 * vm_flags and vm_page_prot are protected by the mmap_sem
59236 * held in write mode.
59237 */
59238 @@ -121338,7 +146122,7 @@ index ef5be8e..811ccb0 100644
59239 dirty_accountable = vma_wants_writenotify(vma);
59240 vma_set_page_prot(vma);
59241
59242 -@@ -363,6 +479,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59243 +@@ -370,6 +486,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59244 end = start + len;
59245 if (end <= start)
59246 return -ENOMEM;
59247 @@ -121356,7 +146140,7 @@ index ef5be8e..811ccb0 100644
59248 if (!arch_validate_prot(prot))
59249 return -EINVAL;
59250
59251 -@@ -370,7 +497,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59252 +@@ -377,7 +504,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59253 /*
59254 * Does the application expect PROT_READ to imply PROT_EXEC:
59255 */
59256 @@ -121365,7 +146149,7 @@ index ef5be8e..811ccb0 100644
59257 prot |= PROT_EXEC;
59258
59259 vm_flags = calc_vm_prot_bits(prot);
59260 -@@ -402,6 +529,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59261 +@@ -409,6 +536,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59262 if (start > vma->vm_start)
59263 prev = vma;
59264
59265 @@ -121377,7 +146161,7 @@ index ef5be8e..811ccb0 100644
59266 for (nstart = start ; ; ) {
59267 unsigned long newflags;
59268
59269 -@@ -412,6 +544,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59270 +@@ -419,6 +551,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59271
59272 /* newflags >> 4 shift VM_MAY% in place of VM_% */
59273 if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
59274 @@ -121392,7 +146176,7 @@ index ef5be8e..811ccb0 100644
59275 error = -EACCES;
59276 goto out;
59277 }
59278 -@@ -426,6 +566,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59279 +@@ -433,6 +573,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
59280 error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
59281 if (error)
59282 goto out;
59283 @@ -121403,7 +146187,7 @@ index ef5be8e..811ccb0 100644
59284
59285 if (nstart < prev->vm_end)
59286 diff --git a/mm/mremap.c b/mm/mremap.c
59287 -index c25bc62..900ca7f 100644
59288 +index 8eeba02..311391a 100644
59289 --- a/mm/mremap.c
59290 +++ b/mm/mremap.c
59291 @@ -143,6 +143,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
59292 @@ -121419,7 +146203,7 @@ index c25bc62..900ca7f 100644
59293 pte = move_soft_dirty_pte(pte);
59294 set_pte_at(mm, new_addr, new_pte, pte);
59295 }
59296 -@@ -354,6 +360,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
59297 +@@ -359,6 +365,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
59298 if (is_vm_hugetlb_page(vma))
59299 return ERR_PTR(-EINVAL);
59300
59301 @@ -121431,7 +146215,7 @@ index c25bc62..900ca7f 100644
59302 /* We can't remap across vm area boundaries */
59303 if (old_len > vma->vm_end - addr)
59304 return ERR_PTR(-EFAULT);
59305 -@@ -400,11 +411,19 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
59306 +@@ -406,11 +417,19 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
59307 unsigned long ret = -EINVAL;
59308 unsigned long charged = 0;
59309 unsigned long map_flags;
59310 @@ -121452,7 +146236,7 @@ index c25bc62..900ca7f 100644
59311 goto out;
59312
59313 /* Ensure the old/new locations do not overlap */
59314 -@@ -477,6 +496,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59315 +@@ -483,6 +502,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59316 unsigned long ret = -EINVAL;
59317 unsigned long charged = 0;
59318 bool locked = false;
59319 @@ -121460,7 +146244,7 @@ index c25bc62..900ca7f 100644
59320
59321 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
59322 return ret;
59323 -@@ -498,6 +518,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59324 +@@ -504,6 +524,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59325 if (!new_len)
59326 return ret;
59327
59328 @@ -121478,7 +146262,7 @@ index c25bc62..900ca7f 100644
59329 down_write(&current->mm->mmap_sem);
59330
59331 if (flags & MREMAP_FIXED) {
59332 -@@ -548,6 +579,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59333 +@@ -554,6 +585,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59334 new_addr = addr;
59335 }
59336 ret = addr;
59337 @@ -121486,7 +146270,7 @@ index c25bc62..900ca7f 100644
59338 goto out;
59339 }
59340 }
59341 -@@ -571,7 +603,12 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59342 +@@ -577,7 +609,12 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
59343 goto out;
59344 }
59345
59346 @@ -121500,7 +146284,7 @@ index c25bc62..900ca7f 100644
59347 out:
59348 if (offset_in_page(ret)) {
59349 diff --git a/mm/nommu.c b/mm/nommu.c
59350 -index 92be862..30dc573 100644
59351 +index fbf6f0f1..1c2b246 100644
59352 --- a/mm/nommu.c
59353 +++ b/mm/nommu.c
59354 @@ -56,7 +56,6 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
59355 @@ -121567,10 +146351,10 @@ index 92be862..30dc573 100644
59356 struct mm_struct *mm;
59357
59358 diff --git a/mm/oom_kill.c b/mm/oom_kill.c
59359 -index c126809..02f1d52 100644
59360 +index dc490c0..5087a19 100644
59361 --- a/mm/oom_kill.c
59362 +++ b/mm/oom_kill.c
59363 -@@ -613,6 +613,10 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
59364 +@@ -614,6 +614,10 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
59365 if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
59366 continue;
59367
59368 @@ -121582,10 +146366,10 @@ index c126809..02f1d52 100644
59369 }
59370 rcu_read_unlock();
59371 diff --git a/mm/page-writeback.c b/mm/page-writeback.c
59372 -index d15d88c..4316955 100644
59373 +index 6fe7d15..60d7249 100644
59374 --- a/mm/page-writeback.c
59375 +++ b/mm/page-writeback.c
59376 -@@ -860,7 +860,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
59377 +@@ -870,7 +870,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
59378 * card's wb_dirty may rush to many times higher than wb_setpoint.
59379 * - the wb dirty thresh drops quickly due to change of JBOD workload
59380 */
59381 @@ -121595,10 +146379,10 @@ index d15d88c..4316955 100644
59382 struct bdi_writeback *wb = dtc->wb;
59383 unsigned long write_bw = wb->avg_write_bandwidth;
59384 diff --git a/mm/page_alloc.c b/mm/page_alloc.c
59385 -index c69531a..36ab4e3 100644
59386 +index 9d9044e..3d5a891 100644
59387 --- a/mm/page_alloc.c
59388 +++ b/mm/page_alloc.c
59389 -@@ -62,6 +62,7 @@
59390 +@@ -63,6 +63,7 @@
59391 #include <linux/sched/rt.h>
59392 #include <linux/page_owner.h>
59393 #include <linux/kthread.h>
59394 @@ -121606,24 +146390,7 @@ index c69531a..36ab4e3 100644
59395
59396 #include <asm/sections.h>
59397 #include <asm/tlbflush.h>
59398 -@@ -229,7 +230,6 @@ static char * const zone_names[MAX_NR_ZONES] = {
59399 - #endif
59400 - };
59401 -
59402 --static void free_compound_page(struct page *page);
59403 - compound_page_dtor * const compound_page_dtors[] = {
59404 - NULL,
59405 - free_compound_page,
59406 -@@ -457,7 +457,7 @@ out:
59407 - * This usage means that zero-order pages may not be compound.
59408 - */
59409 -
59410 --static void free_compound_page(struct page *page)
59411 -+void free_compound_page(struct page *page)
59412 - {
59413 - __free_pages_ok(page, compound_order(page));
59414 - }
59415 -@@ -563,7 +563,7 @@ static inline void clear_page_guard(struct zone *zone, struct page *page,
59416 +@@ -561,7 +562,7 @@ static inline void clear_page_guard(struct zone *zone, struct page *page,
59417 __mod_zone_freepage_state(zone, (1 << order), migratetype);
59418 }
59419 #else
59420 @@ -121632,7 +146399,7 @@ index c69531a..36ab4e3 100644
59421 static inline void set_page_guard(struct zone *zone, struct page *page,
59422 unsigned int order, int migratetype) {}
59423 static inline void clear_page_guard(struct zone *zone, struct page *page,
59424 -@@ -975,6 +975,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
59425 +@@ -995,6 +996,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
59426 bool compound = PageCompound(page);
59427 int i, bad = 0;
59428
59429 @@ -121643,7 +146410,7 @@ index c69531a..36ab4e3 100644
59430 VM_BUG_ON_PAGE(PageTail(page), page);
59431 VM_BUG_ON_PAGE(compound && compound_order(page) != order, page);
59432
59433 -@@ -1001,6 +1005,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
59434 +@@ -1021,6 +1026,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
59435 debug_check_no_obj_freed(page_address(page),
59436 PAGE_SIZE << order);
59437 }
59438 @@ -121656,7 +146423,7 @@ index c69531a..36ab4e3 100644
59439 arch_free_page(page, order);
59440 kernel_map_pages(page, 1 << order, 0);
59441
59442 -@@ -1023,6 +1033,20 @@ static void __free_pages_ok(struct page *page, unsigned int order)
59443 +@@ -1043,6 +1054,20 @@ static void __free_pages_ok(struct page *page, unsigned int order)
59444 local_irq_restore(flags);
59445 }
59446
59447 @@ -121677,7 +146444,7 @@ index c69531a..36ab4e3 100644
59448 static void __init __free_pages_boot_core(struct page *page,
59449 unsigned long pfn, unsigned int order)
59450 {
59451 -@@ -1039,6 +1063,19 @@ static void __init __free_pages_boot_core(struct page *page,
59452 +@@ -1059,6 +1084,19 @@ static void __init __free_pages_boot_core(struct page *page,
59453 __ClearPageReserved(p);
59454 set_page_count(p, 0);
59455
59456 @@ -121697,7 +146464,7 @@ index c69531a..36ab4e3 100644
59457 page_zone(page)->managed_pages += nr_pages;
59458 set_page_refcounted(page);
59459 __free_pages(page, order);
59460 -@@ -1095,7 +1132,6 @@ static inline bool __meminit meminit_pfn_in_nid(unsigned long pfn, int node,
59461 +@@ -1115,7 +1153,6 @@ static inline bool __meminit meminit_pfn_in_nid(unsigned long pfn, int node,
59462 }
59463 #endif
59464
59465 @@ -121705,7 +146472,7 @@ index c69531a..36ab4e3 100644
59466 void __init __free_pages_bootmem(struct page *page, unsigned long pfn,
59467 unsigned int order)
59468 {
59469 -@@ -1399,9 +1435,11 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags,
59470 +@@ -1419,9 +1456,11 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags,
59471 kernel_map_pages(page, 1 << order, 1);
59472 kasan_alloc_pages(page, order);
59473
59474 @@ -121717,7 +146484,28 @@ index c69531a..36ab4e3 100644
59475
59476 if (order && (gfp_flags & __GFP_COMP))
59477 prep_compound_page(page, order);
59478 -@@ -2270,7 +2308,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
59479 +@@ -1955,8 +1994,9 @@ static void drain_pages(unsigned int cpu)
59480 + * The CPU has to be pinned. When zone parameter is non-NULL, spill just
59481 + * the single zone's pages.
59482 + */
59483 +-void drain_local_pages(struct zone *zone)
59484 ++void drain_local_pages(void *_zone)
59485 + {
59486 ++ struct zone *zone = _zone;
59487 + int cpu = smp_processor_id();
59488 +
59489 + if (zone)
59490 +@@ -2016,8 +2056,7 @@ void drain_all_pages(struct zone *zone)
59491 + else
59492 + cpumask_clear_cpu(cpu, &cpus_with_pcps);
59493 + }
59494 +- on_each_cpu_mask(&cpus_with_pcps, (smp_call_func_t) drain_local_pages,
59495 +- zone, 1);
59496 ++ on_each_cpu_mask(&cpus_with_pcps, drain_local_pages, zone, 1);
59497 + }
59498 +
59499 + #ifdef CONFIG_HIBERNATION
59500 +@@ -2289,7 +2328,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
59501 }
59502
59503 __mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order));
59504 @@ -121726,7 +146514,7 @@ index c69531a..36ab4e3 100644
59505 !test_bit(ZONE_FAIR_DEPLETED, &zone->flags))
59506 set_bit(ZONE_FAIR_DEPLETED, &zone->flags);
59507
59508 -@@ -2487,7 +2525,7 @@ static void reset_alloc_batches(struct zone *preferred_zone)
59509 +@@ -2506,7 +2545,7 @@ static void reset_alloc_batches(struct zone *preferred_zone)
59510 do {
59511 mod_zone_page_state(zone, NR_ALLOC_BATCH,
59512 high_wmark_pages(zone) - low_wmark_pages(zone) -
59513 @@ -121735,7 +146523,7 @@ index c69531a..36ab4e3 100644
59514 clear_bit(ZONE_FAIR_DEPLETED, &zone->flags);
59515 } while (zone++ != preferred_zone);
59516 }
59517 -@@ -6079,7 +6117,7 @@ static void __setup_per_zone_wmarks(void)
59518 +@@ -6100,7 +6139,7 @@ static void __setup_per_zone_wmarks(void)
59519
59520 __mod_zone_page_state(zone, NR_ALLOC_BATCH,
59521 high_wmark_pages(zone) - low_wmark_pages(zone) -
59522 @@ -121745,7 +146533,7 @@ index c69531a..36ab4e3 100644
59523 spin_unlock_irqrestore(&zone->lock, flags);
59524 }
59525 diff --git a/mm/percpu.c b/mm/percpu.c
59526 -index 8a943b9..29d8b8d 100644
59527 +index 998607a..4854f93 100644
59528 --- a/mm/percpu.c
59529 +++ b/mm/percpu.c
59530 @@ -131,7 +131,7 @@ static unsigned int pcpu_low_unit_cpu __read_mostly;
59531 @@ -121808,11 +146596,24 @@ index 5d453e5..4043093 100644
59532 mm = mm_access(task, PTRACE_MODE_ATTACH_REALCREDS);
59533 if (!mm || IS_ERR(mm)) {
59534 rc = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH;
59535 +diff --git a/mm/readahead.c b/mm/readahead.c
59536 +index 20e58e8..9045cb5 100644
59537 +--- a/mm/readahead.c
59538 ++++ b/mm/readahead.c
59539 +@@ -80,7 +80,7 @@ static void read_cache_pages_invalidate_pages(struct address_space *mapping,
59540 + * Hides the details of the LRU cache etc from the filesystems.
59541 + */
59542 + int read_cache_pages(struct address_space *mapping, struct list_head *pages,
59543 +- int (*filler)(void *, struct page *), void *data)
59544 ++ filler_t *filler, void *data)
59545 + {
59546 + struct page *page;
59547 + int ret = 0;
59548 diff --git a/mm/rmap.c b/mm/rmap.c
59549 -index b577fbb..ccd4d4e 100644
59550 +index 79f3bf0..92c8a7e 100644
59551 --- a/mm/rmap.c
59552 +++ b/mm/rmap.c
59553 -@@ -171,6 +171,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59554 +@@ -172,6 +172,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59555 struct anon_vma *anon_vma = vma->anon_vma;
59556 struct anon_vma_chain *avc;
59557
59558 @@ -121823,7 +146624,7 @@ index b577fbb..ccd4d4e 100644
59559 might_sleep();
59560 if (unlikely(!anon_vma)) {
59561 struct mm_struct *mm = vma->vm_mm;
59562 -@@ -180,6 +184,12 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59563 +@@ -181,6 +185,12 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59564 if (!avc)
59565 goto out_enomem;
59566
59567 @@ -121836,7 +146637,7 @@ index b577fbb..ccd4d4e 100644
59568 anon_vma = find_mergeable_anon_vma(vma);
59569 allocated = NULL;
59570 if (!anon_vma) {
59571 -@@ -193,6 +203,19 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59572 +@@ -194,6 +204,19 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59573 /* page_table_lock to protect against threads */
59574 spin_lock(&mm->page_table_lock);
59575 if (likely(!vma->anon_vma)) {
59576 @@ -121856,7 +146657,7 @@ index b577fbb..ccd4d4e 100644
59577 vma->anon_vma = anon_vma;
59578 anon_vma_chain_link(vma, avc, anon_vma);
59579 /* vma reference or self-parent link for new root */
59580 -@@ -205,12 +228,24 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59581 +@@ -206,12 +229,24 @@ int anon_vma_prepare(struct vm_area_struct *vma)
59582
59583 if (unlikely(allocated))
59584 put_anon_vma(allocated);
59585 @@ -121881,7 +146682,7 @@ index b577fbb..ccd4d4e 100644
59586 anon_vma_chain_free(avc);
59587 out_enomem:
59588 return -ENOMEM;
59589 -@@ -254,7 +289,7 @@ static inline void unlock_anon_vma_root(struct anon_vma *root)
59590 +@@ -255,7 +290,7 @@ static inline void unlock_anon_vma_root(struct anon_vma *root)
59591 * good chance of avoiding scanning the whole hierarchy when it searches where
59592 * page is mapped.
59593 */
59594 @@ -121890,7 +146691,7 @@ index b577fbb..ccd4d4e 100644
59595 {
59596 struct anon_vma_chain *avc, *pavc;
59597 struct anon_vma *root = NULL;
59598 -@@ -308,7 +343,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
59599 +@@ -309,7 +344,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
59600 * the corresponding VMA in the parent process is attached to.
59601 * Returns 0 on success, non-zero on failure.
59602 */
59603 @@ -121899,21 +146700,21 @@ index b577fbb..ccd4d4e 100644
59604 {
59605 struct anon_vma_chain *avc;
59606 struct anon_vma *anon_vma;
59607 -@@ -428,8 +463,10 @@ static void anon_vma_ctor(void *data)
59608 +@@ -429,10 +464,10 @@ static void anon_vma_ctor(void *data)
59609 void __init anon_vma_init(void)
59610 {
59611 anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma),
59612 -- 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC, anon_vma_ctor);
59613 -- anon_vma_chain_cachep = KMEM_CACHE(anon_vma_chain, SLAB_PANIC);
59614 -+ 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC|SLAB_NO_SANITIZE,
59615 -+ anon_vma_ctor);
59616 -+ anon_vma_chain_cachep = KMEM_CACHE(anon_vma_chain,
59617 -+ SLAB_PANIC|SLAB_NO_SANITIZE);
59618 +- 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC|SLAB_ACCOUNT,
59619 ++ 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE,
59620 + anon_vma_ctor);
59621 + anon_vma_chain_cachep = KMEM_CACHE(anon_vma_chain,
59622 +- SLAB_PANIC|SLAB_ACCOUNT);
59623 ++ SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE);
59624 }
59625
59626 /*
59627 diff --git a/mm/shmem.c b/mm/shmem.c
59628 -index ea5a70c..4b38523 100644
59629 +index 440e2a7..8aeebaa 100644
59630 --- a/mm/shmem.c
59631 +++ b/mm/shmem.c
59632 @@ -33,7 +33,7 @@
59633 @@ -121934,35 +146735,60 @@ index ea5a70c..4b38523 100644
59634
59635 /*
59636 * shmem_fallocate communicates with shmem_fault or shmem_writepage via
59637 -@@ -2564,6 +2564,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
59638 - static int shmem_xattr_validate(const char *name)
59639 - {
59640 - struct { const char *prefix; size_t len; } arr[] = {
59641 +@@ -2670,6 +2670,25 @@ static int shmem_xattr_handler_set(const struct xattr_handler *handler,
59642 + return simple_xattr_set(&info->xattrs, name, value, size, flags);
59643 + }
59644 +
59645 ++#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
59646 ++static int shmem_user_xattr_handler_set(const struct xattr_handler *handler,
59647 ++ struct dentry *dentry, const char *name,
59648 ++ const void *value, size_t size, int flags)
59649 ++{
59650 ++ struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
59651 +
59652 +#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
59653 -+ { XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN},
59654 ++ if (strcmp(name, XATTR_NAME_PAX_FLAGS))
59655 ++ return -EOPNOTSUPP;
59656 ++ if (size > 8)
59657 ++ return -EINVAL;
59658 +#endif
59659 +
59660 - { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
59661 - { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
59662 - };
59663 -@@ -2619,6 +2624,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
59664 - if (err)
59665 - return err;
59666 ++ name = xattr_full_name(handler, name);
59667 ++ return simple_xattr_set(&info->xattrs, name, value, size, flags);
59668 ++}
59669 ++#endif
59670 ++
59671 + static const struct xattr_handler shmem_security_xattr_handler = {
59672 + .prefix = XATTR_SECURITY_PREFIX,
59673 + .get = shmem_xattr_handler_get,
59674 +@@ -2682,6 +2701,14 @@ static const struct xattr_handler shmem_trusted_xattr_handler = {
59675 + .set = shmem_xattr_handler_set,
59676 + };
59677
59678 +#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
59679 -+ if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) {
59680 -+ if (strcmp(name, XATTR_NAME_PAX_FLAGS))
59681 -+ return -EOPNOTSUPP;
59682 -+ if (size > 8)
59683 -+ return -EINVAL;
59684 -+ }
59685 ++static const struct xattr_handler shmem_user_xattr_handler = {
59686 ++ .prefix = XATTR_USER_PREFIX,
59687 ++ .get = shmem_xattr_handler_get,
59688 ++ .set = shmem_user_xattr_handler_set,
59689 ++};
59690 +#endif
59691 +
59692 - return simple_xattr_set(&info->xattrs, name, value, size, flags);
59693 - }
59694 + static const struct xattr_handler *shmem_xattr_handlers[] = {
59695 + #ifdef CONFIG_TMPFS_POSIX_ACL
59696 + &posix_acl_access_xattr_handler,
59697 +@@ -2689,6 +2716,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
59698 + #endif
59699 + &shmem_security_xattr_handler,
59700 + &shmem_trusted_xattr_handler,
59701 ++
59702 ++#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
59703 ++ &shmem_user_xattr_handler,
59704 ++#endif
59705 ++
59706 + NULL
59707 + };
59708
59709 -@@ -3002,8 +3016,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
59710 +@@ -3051,8 +3083,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
59711 int err = -ENOMEM;
59712
59713 /* Round up to L1_CACHE_BYTES to resist false sharing */
59714 @@ -121973,7 +146799,7 @@ index ea5a70c..4b38523 100644
59715 return -ENOMEM;
59716
59717 diff --git a/mm/slab.c b/mm/slab.c
59718 -index 4765c97..26f5c11 100644
59719 +index 621fbcb..272a1f3 100644
59720 --- a/mm/slab.c
59721 +++ b/mm/slab.c
59722 @@ -116,6 +116,7 @@
59723 @@ -122046,7 +146872,7 @@ index 4765c97..26f5c11 100644
59724
59725 /*
59726 * Adjust the object sizes so that we clear
59727 -@@ -3369,6 +3374,20 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
59728 +@@ -3367,6 +3372,20 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
59729 struct array_cache *ac = cpu_cache_get(cachep);
59730
59731 check_irq_off();
59732 @@ -122067,7 +146893,7 @@ index 4765c97..26f5c11 100644
59733 kmemleak_free_recursive(objp, cachep->flags);
59734 objp = cache_free_debugcheck(cachep, objp, caller);
59735
59736 -@@ -3494,7 +3513,7 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)
59737 +@@ -3492,7 +3511,7 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)
59738 return kmem_cache_alloc_node_trace(cachep, flags, node, size);
59739 }
59740
59741 @@ -122076,7 +146902,7 @@ index 4765c97..26f5c11 100644
59742 {
59743 return __do_kmalloc_node(size, flags, node, _RET_IP_);
59744 }
59745 -@@ -3514,7 +3533,7 @@ EXPORT_SYMBOL(__kmalloc_node_track_caller);
59746 +@@ -3512,7 +3531,7 @@ EXPORT_SYMBOL(__kmalloc_node_track_caller);
59747 * @flags: the type of memory to allocate (see kmalloc).
59748 * @caller: function caller for debug tracking of the caller
59749 */
59750 @@ -122085,7 +146911,7 @@ index 4765c97..26f5c11 100644
59751 unsigned long caller)
59752 {
59753 struct kmem_cache *cachep;
59754 -@@ -3587,6 +3606,7 @@ void kfree(const void *objp)
59755 +@@ -3585,6 +3604,7 @@ void kfree(const void *objp)
59756
59757 if (unlikely(ZERO_OR_NULL_PTR(objp)))
59758 return;
59759 @@ -122093,7 +146919,7 @@ index 4765c97..26f5c11 100644
59760 local_irq_save(flags);
59761 kfree_debugcheck(objp);
59762 c = virt_to_cache(objp);
59763 -@@ -4006,14 +4026,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
59764 +@@ -4004,14 +4024,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
59765 }
59766 /* cpu stats */
59767 {
59768 @@ -122120,7 +146946,7 @@ index 4765c97..26f5c11 100644
59769 #endif
59770 }
59771
59772 -@@ -4221,13 +4249,80 @@ static const struct file_operations proc_slabstats_operations = {
59773 +@@ -4219,13 +4247,80 @@ static const struct file_operations proc_slabstats_operations = {
59774 static int __init slab_proc_init(void)
59775 {
59776 #ifdef CONFIG_DEBUG_SLAB_LEAK
59777 @@ -122203,7 +147029,7 @@ index 4765c97..26f5c11 100644
59778 * ksize - get the actual amount of memory allocated for a given object
59779 * @objp: Pointer to the object
59780 diff --git a/mm/slab.h b/mm/slab.h
59781 -index 7b60871..dd645ce1 100644
59782 +index 2eedace..cd94091 100644
59783 --- a/mm/slab.h
59784 +++ b/mm/slab.h
59785 @@ -22,7 +22,7 @@ struct kmem_cache {
59786 @@ -122246,7 +147072,7 @@ index 7b60871..dd645ce1 100644
59787
59788 #if defined(CONFIG_DEBUG_SLAB)
59789 #define SLAB_DEBUG_FLAGS (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER)
59790 -@@ -309,6 +324,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
59791 +@@ -311,6 +326,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
59792 return s;
59793
59794 page = virt_to_head_page(x);
59795 @@ -122257,7 +147083,7 @@ index 7b60871..dd645ce1 100644
59796 if (slab_equal_or_root(cachep, s))
59797 return cachep;
59798 diff --git a/mm/slab_common.c b/mm/slab_common.c
59799 -index 3c6a86b..f143a66 100644
59800 +index 065b7bd..3c2c410 100644
59801 --- a/mm/slab_common.c
59802 +++ b/mm/slab_common.c
59803 @@ -25,11 +25,35 @@
59804 @@ -122297,7 +147123,7 @@ index 3c6a86b..f143a66 100644
59805 /*
59806 * Set of flags that will prevent slab merging
59807 */
59808 -@@ -43,7 +67,7 @@ struct kmem_cache *kmem_cache;
59809 +@@ -44,7 +68,7 @@ struct kmem_cache *kmem_cache;
59810 * Merge control. If this is set then no merging of slab caches will occur.
59811 * (Could be removed. This was introduced to pacify the merge skeptics.)
59812 */
59813 @@ -122306,7 +147132,7 @@ index 3c6a86b..f143a66 100644
59814
59815 static int __init setup_slab_nomerge(char *str)
59816 {
59817 -@@ -239,7 +263,7 @@ int slab_unmergeable(struct kmem_cache *s)
59818 +@@ -240,7 +264,7 @@ int slab_unmergeable(struct kmem_cache *s)
59819 /*
59820 * We may have set a slab to be unmergeable during bootstrap.
59821 */
59822 @@ -122315,7 +147141,7 @@ index 3c6a86b..f143a66 100644
59823 return 1;
59824
59825 return 0;
59826 -@@ -343,7 +367,7 @@ static struct kmem_cache *create_cache(const char *name,
59827 +@@ -344,7 +368,7 @@ static struct kmem_cache *create_cache(const char *name,
59828 if (err)
59829 goto out_free_cache;
59830
59831 @@ -122324,7 +147150,7 @@ index 3c6a86b..f143a66 100644
59832 list_add(&s->list, &slab_caches);
59833 out:
59834 if (err)
59835 -@@ -407,6 +431,13 @@ kmem_cache_create(const char *name, size_t size, size_t align,
59836 +@@ -408,6 +432,13 @@ kmem_cache_create(const char *name, size_t size, size_t align,
59837 */
59838 flags &= CACHE_CREATE_MASK;
59839
59840 @@ -122338,7 +147164,7 @@ index 3c6a86b..f143a66 100644
59841 s = __kmem_cache_alias(name, size, align, flags, ctor);
59842 if (s)
59843 goto out_unlock;
59844 -@@ -468,7 +499,7 @@ static void release_caches(struct list_head *release, bool need_rcu_barrier)
59845 +@@ -469,7 +500,7 @@ static void release_caches(struct list_head *release, bool need_rcu_barrier)
59846 rcu_barrier();
59847
59848 list_for_each_entry_safe(s, s2, release, list) {
59849 @@ -122347,7 +147173,7 @@ index 3c6a86b..f143a66 100644
59850 sysfs_slab_remove(s);
59851 #else
59852 slab_kmem_cache_release(s);
59853 -@@ -711,8 +742,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
59854 +@@ -713,8 +744,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
59855
59856 mutex_lock(&slab_mutex);
59857
59858 @@ -122357,7 +147183,7 @@ index 3c6a86b..f143a66 100644
59859 goto out_unlock;
59860
59861 err = shutdown_memcg_caches(s, &release, &need_rcu_barrier);
59862 -@@ -778,7 +808,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz
59863 +@@ -780,7 +810,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz
59864 panic("Creation of kmalloc slab %s size=%zu failed. Reason %d\n",
59865 name, size, err);
59866
59867 @@ -122366,7 +147192,7 @@ index 3c6a86b..f143a66 100644
59868 }
59869
59870 struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
59871 -@@ -791,7 +821,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
59872 +@@ -793,7 +823,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
59873
59874 create_boot_cache(s, name, size, flags);
59875 list_add(&s->list, &slab_caches);
59876 @@ -122375,7 +147201,7 @@ index 3c6a86b..f143a66 100644
59877 return s;
59878 }
59879
59880 -@@ -803,6 +833,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
59881 +@@ -805,6 +835,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
59882 EXPORT_SYMBOL(kmalloc_dma_caches);
59883 #endif
59884
59885 @@ -122387,7 +147213,7 @@ index 3c6a86b..f143a66 100644
59886 /*
59887 * Conversion table for small slabs sizes / 8 to the index in the
59888 * kmalloc array. This is necessary for slabs < 192 since we have non power
59889 -@@ -867,6 +902,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
59890 +@@ -869,6 +904,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
59891 return kmalloc_dma_caches[index];
59892
59893 #endif
59894 @@ -122401,7 +147227,7 @@ index 3c6a86b..f143a66 100644
59895 return kmalloc_caches[index];
59896 }
59897
59898 -@@ -959,7 +1001,7 @@ void __init create_kmalloc_caches(unsigned long flags)
59899 +@@ -961,7 +1003,7 @@ void __init create_kmalloc_caches(unsigned long flags)
59900
59901 for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
59902 if (!kmalloc_caches[i])
59903 @@ -122410,7 +147236,7 @@ index 3c6a86b..f143a66 100644
59904
59905 /*
59906 * Caches that are not of the two-to-the-power-of size.
59907 -@@ -967,9 +1009,9 @@ void __init create_kmalloc_caches(unsigned long flags)
59908 +@@ -969,9 +1011,9 @@ void __init create_kmalloc_caches(unsigned long flags)
59909 * earlier power of two caches
59910 */
59911 if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[1] && i == 6)
59912 @@ -122422,7 +147248,7 @@ index 3c6a86b..f143a66 100644
59913 }
59914
59915 /* Kmalloc array is now usable */
59916 -@@ -990,6 +1032,23 @@ void __init create_kmalloc_caches(unsigned long flags)
59917 +@@ -992,6 +1034,23 @@ void __init create_kmalloc_caches(unsigned long flags)
59918 }
59919 }
59920 #endif
59921 @@ -122446,7 +147272,7 @@ index 3c6a86b..f143a66 100644
59922 }
59923 #endif /* !CONFIG_SLOB */
59924
59925 -@@ -1049,6 +1108,9 @@ static void print_slabinfo_header(struct seq_file *m)
59926 +@@ -1051,6 +1110,9 @@ static void print_slabinfo_header(struct seq_file *m)
59927 seq_puts(m, " : globalstat <listallocs> <maxobjs> <grown> <reaped> "
59928 "<error> <maxfreeable> <nodeallocs> <remotefrees> <alienoverflow>");
59929 seq_puts(m, " : cpustat <allochit> <allocmiss> <freehit> <freemiss>");
59930 @@ -122456,7 +147282,7 @@ index 3c6a86b..f143a66 100644
59931 #endif
59932 seq_putc(m, '\n');
59933 }
59934 -@@ -1178,7 +1240,7 @@ static int __init slab_proc_init(void)
59935 +@@ -1180,7 +1242,7 @@ static int __init slab_proc_init(void)
59936 module_init(slab_proc_init);
59937 #endif /* CONFIG_SLABINFO */
59938
59939 @@ -122466,7 +147292,7 @@ index 3c6a86b..f143a66 100644
59940 {
59941 void *ret;
59942 diff --git a/mm/slob.c b/mm/slob.c
59943 -index 17e8f8c..56d3370 100644
59944 +index 5ec1580..017a002 100644
59945 --- a/mm/slob.c
59946 +++ b/mm/slob.c
59947 @@ -67,6 +67,7 @@
59948 @@ -122889,7 +147715,7 @@ index 17e8f8c..56d3370 100644
59949 EXPORT_SYMBOL(kmem_cache_free);
59950
59951 diff --git a/mm/slub.c b/mm/slub.c
59952 -index 4699751..bb1f0cf 100644
59953 +index d8fbd4a..f864712 100644
59954 --- a/mm/slub.c
59955 +++ b/mm/slub.c
59956 @@ -34,6 +34,7 @@
59957 @@ -122909,7 +147735,7 @@ index 4699751..bb1f0cf 100644
59958 static int sysfs_slab_add(struct kmem_cache *);
59959 static int sysfs_slab_alias(struct kmem_cache *, const char *);
59960 static void memcg_propagate_slab_attrs(struct kmem_cache *s);
59961 -@@ -558,7 +559,7 @@ static void print_track(const char *s, struct track *t)
59962 +@@ -560,7 +561,7 @@ static void print_track(const char *s, struct track *t)
59963 if (!t->addr)
59964 return;
59965
59966 @@ -122918,7 +147744,7 @@ index 4699751..bb1f0cf 100644
59967 s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid);
59968 #ifdef CONFIG_STACKTRACE
59969 {
59970 -@@ -2771,6 +2772,21 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page,
59971 +@@ -2767,6 +2768,21 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page,
59972
59973 slab_free_freelist_hook(s, head, tail);
59974
59975 @@ -122940,7 +147766,7 @@ index 4699751..bb1f0cf 100644
59976 redo:
59977 /*
59978 * Determine the currently cpus per cpu slab.
59979 -@@ -3262,6 +3278,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
59980 +@@ -3264,6 +3280,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
59981 s->inuse = size;
59982
59983 if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) ||
59984 @@ -122950,7 +147776,7 @@ index 4699751..bb1f0cf 100644
59985 s->ctor)) {
59986 /*
59987 * Relocate free pointer after the object if it is not
59988 -@@ -3516,7 +3535,7 @@ static int __init setup_slub_min_objects(char *str)
59989 +@@ -3514,7 +3533,7 @@ static int __init setup_slub_min_objects(char *str)
59990
59991 __setup("slub_min_objects=", setup_slub_min_objects);
59992
59993 @@ -122959,7 +147785,7 @@ index 4699751..bb1f0cf 100644
59994 {
59995 struct kmem_cache *s;
59996 void *ret;
59997 -@@ -3554,7 +3573,7 @@ static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
59998 +@@ -3552,7 +3571,7 @@ static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
59999 return ptr;
60000 }
60001
60002 @@ -122968,7 +147794,7 @@ index 4699751..bb1f0cf 100644
60003 {
60004 struct kmem_cache *s;
60005 void *ret;
60006 -@@ -3602,6 +3621,70 @@ static size_t __ksize(const void *object)
60007 +@@ -3600,6 +3619,70 @@ static size_t __ksize(const void *object)
60008 return slab_ksize(page->slab_cache);
60009 }
60010
60011 @@ -123039,7 +147865,7 @@ index 4699751..bb1f0cf 100644
60012 size_t ksize(const void *object)
60013 {
60014 size_t size = __ksize(object);
60015 -@@ -3622,6 +3705,7 @@ void kfree(const void *x)
60016 +@@ -3620,6 +3703,7 @@ void kfree(const void *x)
60017 if (unlikely(ZERO_OR_NULL_PTR(x)))
60018 return;
60019
60020 @@ -123047,7 +147873,7 @@ index 4699751..bb1f0cf 100644
60021 page = virt_to_head_page(x);
60022 if (unlikely(!PageSlab(page))) {
60023 BUG_ON(!PageCompound(page));
60024 -@@ -3939,7 +4023,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
60025 +@@ -3937,7 +4021,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
60026
60027 s = find_mergeable(size, align, flags, name, ctor);
60028 if (s) {
60029 @@ -123056,7 +147882,7 @@ index 4699751..bb1f0cf 100644
60030
60031 /*
60032 * Adjust the object sizes so that we clear
60033 -@@ -3955,7 +4039,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
60034 +@@ -3953,7 +4037,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
60035 }
60036
60037 if (sysfs_slab_alias(s, name)) {
60038 @@ -123065,7 +147891,7 @@ index 4699751..bb1f0cf 100644
60039 s = NULL;
60040 }
60041 }
60042 -@@ -4072,7 +4156,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
60043 +@@ -4070,7 +4154,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
60044 }
60045 #endif
60046
60047 @@ -123074,7 +147900,7 @@ index 4699751..bb1f0cf 100644
60048 static int count_inuse(struct page *page)
60049 {
60050 return page->inuse;
60051 -@@ -4353,7 +4437,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
60052 +@@ -4351,7 +4435,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
60053 len += sprintf(buf + len, "%7ld ", l->count);
60054
60055 if (l->addr)
60056 @@ -123086,7 +147912,7 @@ index 4699751..bb1f0cf 100644
60057 else
60058 len += sprintf(buf + len, "<not-available>");
60059
60060 -@@ -4451,12 +4539,12 @@ static void __init resiliency_test(void)
60061 +@@ -4449,12 +4537,12 @@ static void __init resiliency_test(void)
60062 validate_slab_cache(kmalloc_caches[9]);
60063 }
60064 #else
60065 @@ -123101,7 +147927,7 @@ index 4699751..bb1f0cf 100644
60066 enum slab_stat_type {
60067 SL_ALL, /* All slabs */
60068 SL_PARTIAL, /* Only partially allocated slabs */
60069 -@@ -4693,13 +4781,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
60070 +@@ -4691,13 +4779,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
60071 {
60072 if (!s->ctor)
60073 return 0;
60074 @@ -123120,7 +147946,7 @@ index 4699751..bb1f0cf 100644
60075 }
60076 SLAB_ATTR_RO(aliases);
60077
60078 -@@ -4787,6 +4879,22 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
60079 +@@ -4785,6 +4877,22 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
60080 SLAB_ATTR_RO(cache_dma);
60081 #endif
60082
60083 @@ -123143,7 +147969,7 @@ index 4699751..bb1f0cf 100644
60084 static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf)
60085 {
60086 return sprintf(buf, "%d\n", !!(s->flags & SLAB_DESTROY_BY_RCU));
60087 -@@ -4842,7 +4950,7 @@ static ssize_t trace_store(struct kmem_cache *s, const char *buf,
60088 +@@ -4840,7 +4948,7 @@ static ssize_t trace_store(struct kmem_cache *s, const char *buf,
60089 * as well as cause other issues like converting a mergeable
60090 * cache into an umergeable one.
60091 */
60092 @@ -123152,7 +147978,7 @@ index 4699751..bb1f0cf 100644
60093 return -EINVAL;
60094
60095 s->flags &= ~SLAB_TRACE;
60096 -@@ -4962,7 +5070,7 @@ static ssize_t failslab_show(struct kmem_cache *s, char *buf)
60097 +@@ -4960,7 +5068,7 @@ static ssize_t failslab_show(struct kmem_cache *s, char *buf)
60098 static ssize_t failslab_store(struct kmem_cache *s, const char *buf,
60099 size_t length)
60100 {
60101 @@ -123161,7 +147987,7 @@ index 4699751..bb1f0cf 100644
60102 return -EINVAL;
60103
60104 s->flags &= ~SLAB_FAILSLAB;
60105 -@@ -5094,7 +5202,7 @@ STAT_ATTR(CPU_PARTIAL_NODE, cpu_partial_node);
60106 +@@ -5092,7 +5200,7 @@ STAT_ATTR(CPU_PARTIAL_NODE, cpu_partial_node);
60107 STAT_ATTR(CPU_PARTIAL_DRAIN, cpu_partial_drain);
60108 #endif
60109
60110 @@ -123170,7 +147996,7 @@ index 4699751..bb1f0cf 100644
60111 &slab_size_attr.attr,
60112 &object_size_attr.attr,
60113 &objs_per_slab_attr.attr,
60114 -@@ -5129,6 +5237,12 @@ static struct attribute *slab_attrs[] = {
60115 +@@ -5127,6 +5235,12 @@ static struct attribute *slab_attrs[] = {
60116 #ifdef CONFIG_ZONE_DMA
60117 &cache_dma_attr.attr,
60118 #endif
60119 @@ -123216,10 +148042,10 @@ index 4699751..bb1f0cf 100644
60120 static int __init slab_sysfs_init(void)
60121 {
60122 diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
60123 -index 4cba9c2..b4f9fcc 100644
60124 +index b60802b..0a05e3c 100644
60125 --- a/mm/sparse-vmemmap.c
60126 +++ b/mm/sparse-vmemmap.c
60127 -@@ -131,7 +131,7 @@ pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node)
60128 +@@ -203,7 +203,7 @@ pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node)
60129 void *p = vmemmap_alloc_block(PAGE_SIZE, node);
60130 if (!p)
60131 return NULL;
60132 @@ -123228,7 +148054,7 @@ index 4cba9c2..b4f9fcc 100644
60133 }
60134 return pud;
60135 }
60136 -@@ -143,7 +143,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)
60137 +@@ -215,7 +215,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)
60138 void *p = vmemmap_alloc_block(PAGE_SIZE, node);
60139 if (!p)
60140 return NULL;
60141 @@ -123238,12 +148064,12 @@ index 4cba9c2..b4f9fcc 100644
60142 return pgd;
60143 }
60144 diff --git a/mm/sparse.c b/mm/sparse.c
60145 -index d1b48b6..6e8590e 100644
60146 +index 3717cee..7ee2c16 100644
60147 --- a/mm/sparse.c
60148 +++ b/mm/sparse.c
60149 @@ -750,7 +750,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
60150
60151 - for (i = 0; i < PAGES_PER_SECTION; i++) {
60152 + for (i = 0; i < nr_pages; i++) {
60153 if (PageHWPoison(&memmap[i])) {
60154 - atomic_long_sub(1, &num_poisoned_pages);
60155 + atomic_long_sub_unchecked(1, &num_poisoned_pages);
60156 @@ -123251,20 +148077,25 @@ index d1b48b6..6e8590e 100644
60157 }
60158 }
60159 diff --git a/mm/swap.c b/mm/swap.c
60160 -index 39395fb..addaf53 100644
60161 +index 09fe5e9..be5ad5b 100644
60162 --- a/mm/swap.c
60163 +++ b/mm/swap.c
60164 -@@ -86,6 +86,8 @@ static void __put_compound_page(struct page *page)
60165 +@@ -88,6 +88,13 @@ static void __put_compound_page(struct page *page)
60166 if (!PageHuge(page))
60167 __page_cache_release(page);
60168 dtor = get_compound_page_dtor(page);
60169 + if (!PageHuge(page))
60170 -+ BUG_ON(dtor != free_compound_page);
60171 ++ BUG_ON(dtor != free_compound_page
60172 ++#ifdef CONFIG_TRANSPARENT_HUGEPAGE
60173 ++ && dtor != free_transhuge_page
60174 ++#endif
60175 ++ );
60176 ++
60177 (*dtor)(page);
60178 }
60179
60180 diff --git a/mm/swapfile.c b/mm/swapfile.c
60181 -index 5887731..e23a30e 100644
60182 +index d2c3736..bf79426 100644
60183 --- a/mm/swapfile.c
60184 +++ b/mm/swapfile.c
60185 @@ -84,7 +84,7 @@ static DEFINE_MUTEX(swapon_mutex);
60186 @@ -123276,7 +148107,7 @@ index 5887731..e23a30e 100644
60187
60188 static inline unsigned char swap_count(unsigned char ent)
60189 {
60190 -@@ -1986,7 +1986,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
60191 +@@ -1972,7 +1972,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
60192 spin_unlock(&swap_lock);
60193
60194 err = 0;
60195 @@ -123285,7 +148116,7 @@ index 5887731..e23a30e 100644
60196 wake_up_interruptible(&proc_poll_wait);
60197
60198 out_dput:
60199 -@@ -2003,8 +2003,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
60200 +@@ -1989,8 +1989,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
60201
60202 poll_wait(file, &proc_poll_wait, wait);
60203
60204 @@ -123296,7 +148127,7 @@ index 5887731..e23a30e 100644
60205 return POLLIN | POLLRDNORM | POLLERR | POLLPRI;
60206 }
60207
60208 -@@ -2102,7 +2102,7 @@ static int swaps_open(struct inode *inode, struct file *file)
60209 +@@ -2088,7 +2088,7 @@ static int swaps_open(struct inode *inode, struct file *file)
60210 return ret;
60211
60212 seq = file->private_data;
60213 @@ -123305,7 +148136,7 @@ index 5887731..e23a30e 100644
60214 return 0;
60215 }
60216
60217 -@@ -2551,7 +2551,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
60218 +@@ -2537,7 +2537,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
60219 (frontswap_map) ? "FS" : "");
60220
60221 mutex_unlock(&swapon_mutex);
60222 @@ -123315,10 +148146,10 @@ index 5887731..e23a30e 100644
60223
60224 if (S_ISREG(inode->i_mode))
60225 diff --git a/mm/util.c b/mm/util.c
60226 -index 9af1c12..d58f645 100644
60227 +index 4fb14ca..bb377d3 100644
60228 --- a/mm/util.c
60229 +++ b/mm/util.c
60230 -@@ -233,6 +233,12 @@ struct task_struct *task_of_stack(struct task_struct *task,
60231 +@@ -239,6 +239,12 @@ int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t)
60232 void arch_pick_mmap_layout(struct mm_struct *mm)
60233 {
60234 mm->mmap_base = TASK_UNMAPPED_BASE;
60235 @@ -123331,18 +148162,18 @@ index 9af1c12..d58f645 100644
60236 mm->get_unmapped_area = arch_get_unmapped_area;
60237 }
60238 #endif
60239 -@@ -434,6 +440,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
60240 +@@ -457,6 +463,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
60241 if (!mm->arg_end)
60242 goto out_mm; /* Shh! No looking before we're done */
60243
60244 + if (gr_acl_handle_procpidmem(task))
60245 + goto out_mm;
60246 +
60247 - len = mm->arg_end - mm->arg_start;
60248 -
60249 - if (len > buflen)
60250 + down_read(&mm->mmap_sem);
60251 + arg_start = mm->arg_start;
60252 + arg_end = mm->arg_end;
60253 diff --git a/mm/vmalloc.c b/mm/vmalloc.c
60254 -index 8e3c9c5..a4b63af 100644
60255 +index fb42a5b..3f4666e 100644
60256 --- a/mm/vmalloc.c
60257 +++ b/mm/vmalloc.c
60258 @@ -42,20 +42,65 @@ struct vfree_deferred {
60259 @@ -123527,7 +148358,7 @@ index 8e3c9c5..a4b63af 100644
60260 unsigned long align,
60261 unsigned long vstart, unsigned long vend,
60262 int node, gfp_t gfp_mask)
60263 -@@ -1204,13 +1287,27 @@ void __init vmalloc_init(void)
60264 +@@ -1203,13 +1286,27 @@ void __init vmalloc_init(void)
60265 for_each_possible_cpu(i) {
60266 struct vmap_block_queue *vbq;
60267 struct vfree_deferred *p;
60268 @@ -123556,7 +148387,7 @@ index 8e3c9c5..a4b63af 100644
60269 }
60270
60271 /* Import existing vmlist entries. */
60272 -@@ -1335,6 +1432,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
60273 +@@ -1334,6 +1431,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
60274 struct vm_struct *area;
60275
60276 BUG_ON(in_interrupt());
60277 @@ -123573,7 +148404,7 @@ index 8e3c9c5..a4b63af 100644
60278 if (flags & VM_IOREMAP)
60279 align = 1ul << clamp_t(int, fls_long(size),
60280 PAGE_SHIFT, IOREMAP_MAX_ORDER);
60281 -@@ -1347,7 +1454,9 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
60282 +@@ -1346,7 +1453,9 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
60283 if (unlikely(!area))
60284 return NULL;
60285
60286 @@ -123583,7 +148414,7 @@ index 8e3c9c5..a4b63af 100644
60287 size += PAGE_SIZE;
60288
60289 va = alloc_vmap_area(size, align, start, end, node, gfp_mask);
60290 -@@ -1532,13 +1641,36 @@ EXPORT_SYMBOL(vfree);
60291 +@@ -1528,13 +1637,36 @@ EXPORT_SYMBOL(vfree);
60292 */
60293 void vunmap(const void *addr)
60294 {
60295 @@ -123623,7 +148454,7 @@ index 8e3c9c5..a4b63af 100644
60296 /**
60297 * vmap - map an array of pages into virtually contiguous space
60298 * @pages: array of page pointers
60299 -@@ -1559,6 +1691,11 @@ void *vmap(struct page **pages, unsigned int count,
60300 +@@ -1555,6 +1687,11 @@ void *vmap(struct page **pages, unsigned int count,
60301 if (count > totalram_pages)
60302 return NULL;
60303
60304 @@ -123635,7 +148466,7 @@ index 8e3c9c5..a4b63af 100644
60305 area = get_vm_area_caller((count << PAGE_SHIFT), flags,
60306 __builtin_return_address(0));
60307 if (!area)
60308 -@@ -1663,6 +1800,14 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
60309 +@@ -1658,6 +1795,14 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
60310 if (!size || (size >> PAGE_SHIFT) > totalram_pages)
60311 goto fail;
60312
60313 @@ -123650,7 +148481,7 @@ index 8e3c9c5..a4b63af 100644
60314 area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNINITIALIZED |
60315 vm_flags, start, end, node, gfp_mask, caller);
60316 if (!area)
60317 -@@ -1716,6 +1861,14 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
60318 +@@ -1711,6 +1856,14 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
60319 gfp_mask, prot, 0, node, caller);
60320 }
60321
60322 @@ -123665,7 +148496,7 @@ index 8e3c9c5..a4b63af 100644
60323 void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
60324 {
60325 return __vmalloc_node(size, 1, gfp_mask, prot, NUMA_NO_NODE,
60326 -@@ -1839,10 +1992,9 @@ EXPORT_SYMBOL(vzalloc_node);
60327 +@@ -1834,10 +1987,9 @@ EXPORT_SYMBOL(vzalloc_node);
60328 * For tight control over page level allocator and protection flags
60329 * use __vmalloc() instead.
60330 */
60331 @@ -123677,7 +148508,7 @@ index 8e3c9c5..a4b63af 100644
60332 NUMA_NO_NODE, __builtin_return_address(0));
60333 }
60334
60335 -@@ -2149,6 +2301,8 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr,
60336 +@@ -2144,6 +2296,8 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr,
60337 {
60338 struct vm_struct *area;
60339
60340 @@ -123686,7 +148517,16 @@ index 8e3c9c5..a4b63af 100644
60341 size = PAGE_ALIGN(size);
60342
60343 if (!PAGE_ALIGNED(uaddr) || !PAGE_ALIGNED(kaddr))
60344 -@@ -2631,7 +2785,11 @@ static int s_show(struct seq_file *m, void *p)
60345 +@@ -2513,7 +2667,7 @@ found:
60346 + /* insert all vm's */
60347 + for (area = 0; area < nr_vms; area++)
60348 + setup_vmalloc_vm(vms[area], vas[area], VM_ALLOC,
60349 +- pcpu_get_vm_areas);
60350 ++ __builtin_return_address(0));
60351 +
60352 + kfree(vas);
60353 + return vms;
60354 +@@ -2626,7 +2780,11 @@ static int s_show(struct seq_file *m, void *p)
60355 v->addr, v->addr + v->size, v->size);
60356
60357 if (v->caller)
60358 @@ -123699,7 +148539,7 @@ index 8e3c9c5..a4b63af 100644
60359 if (v->nr_pages)
60360 seq_printf(m, " pages=%d", v->nr_pages);
60361 diff --git a/mm/vmstat.c b/mm/vmstat.c
60362 -index c54fd29..c37890c 100644
60363 +index 084c672..50f9c10 100644
60364 --- a/mm/vmstat.c
60365 +++ b/mm/vmstat.c
60366 @@ -27,6 +27,7 @@
60367 @@ -123728,7 +148568,7 @@ index c54fd29..c37890c 100644
60368 changes++;
60369 }
60370 return changes;
60371 -@@ -476,7 +477,7 @@ static int refresh_cpu_vm_stats(void)
60372 +@@ -476,7 +477,7 @@ static int refresh_cpu_vm_stats(bool do_pagesets)
60373 v = this_cpu_xchg(p->vm_stat_diff[i], 0);
60374 if (v) {
60375
60376 @@ -123737,7 +148577,7 @@ index c54fd29..c37890c 100644
60377 global_diff[i] += v;
60378 #ifdef CONFIG_NUMA
60379 /* 3 seconds idle till flush */
60380 -@@ -540,7 +541,7 @@ void cpu_vm_stats_fold(int cpu)
60381 +@@ -542,7 +543,7 @@ void cpu_vm_stats_fold(int cpu)
60382
60383 v = p->vm_stat_diff[i];
60384 p->vm_stat_diff[i] = 0;
60385 @@ -123746,7 +148586,7 @@ index c54fd29..c37890c 100644
60386 global_diff[i] += v;
60387 }
60388 }
60389 -@@ -560,8 +561,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
60390 +@@ -562,8 +563,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
60391 if (pset->vm_stat_diff[i]) {
60392 int v = pset->vm_stat_diff[i];
60393 pset->vm_stat_diff[i] = 0;
60394 @@ -123757,7 +148597,7 @@ index c54fd29..c37890c 100644
60395 }
60396 }
60397 #endif
60398 -@@ -1315,10 +1316,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
60399 +@@ -1320,10 +1321,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
60400 stat_items_size += sizeof(struct vm_event_state);
60401 #endif
60402
60403 @@ -123781,7 +148621,7 @@ index c54fd29..c37890c 100644
60404 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
60405 v[i] = global_page_state(i);
60406 v += NR_VM_ZONE_STAT_ITEMS;
60407 -@@ -1553,10 +1566,16 @@ static int __init setup_vmstat(void)
60408 +@@ -1589,10 +1602,16 @@ static int __init setup_vmstat(void)
60409 cpu_notifier_register_done();
60410 #endif
60411 #ifdef CONFIG_PROC_FS
60412 @@ -123861,10 +148701,10 @@ index 6ab36ae..6f1841b 100644
60413 }
60414 EXPORT_SYMBOL(v9fs_unregister_trans);
60415 diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
60416 -index bced8c0..ef253b7 100644
60417 +index 7bc2208..79c8068 100644
60418 --- a/net/9p/trans_fd.c
60419 +++ b/net/9p/trans_fd.c
60420 -@@ -428,7 +428,7 @@ static int p9_fd_write(struct p9_client *client, void *v, int len)
60421 +@@ -432,7 +432,7 @@ static int p9_fd_write(struct p9_client *client, void *v, int len)
60422 oldfs = get_fs();
60423 set_fs(get_ds());
60424 /* The cast to a user pointer is valid due to the set_fs() */
60425 @@ -123957,13 +148797,13 @@ index 4149db1..f2ab682 100644
60426 /*
60427 * ATM LAN Emulation supports both LLC & Dix Ethernet EtherType
60428 diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
60429 -index d1b2d9a..d549f7f 100644
60430 +index 9e60e74..a89fdeb 100644
60431 --- a/net/atm/mpoa_caches.c
60432 +++ b/net/atm/mpoa_caches.c
60433 -@@ -535,30 +535,30 @@ static void eg_destroy_cache(struct mpoa_client *mpc)
60434 +@@ -535,33 +535,32 @@ static void eg_destroy_cache(struct mpoa_client *mpc)
60435
60436
60437 - static struct in_cache_ops ingress_ops = {
60438 + static const struct in_cache_ops ingress_ops = {
60439 - in_cache_add_entry, /* add_entry */
60440 - in_cache_get, /* get */
60441 - in_cache_get_with_mask, /* get_with_mask */
60442 @@ -123988,7 +148828,7 @@ index d1b2d9a..d549f7f 100644
60443 + .destroy_cache = in_destroy_cache
60444 };
60445
60446 - static struct eg_cache_ops egress_ops = {
60447 + static const struct eg_cache_ops egress_ops = {
60448 - eg_cache_add_entry, /* add_entry */
60449 - eg_cache_get_by_cache_id, /* get_by_cache_id */
60450 - eg_cache_get_by_tag, /* get_by_tag */
60451 @@ -124011,7 +148851,10 @@ index d1b2d9a..d549f7f 100644
60452 + .destroy_cache = eg_destroy_cache
60453 };
60454
60455 -
60456 +-
60457 + void atm_mpoa_init_cache(struct mpoa_client *mpc)
60458 + {
60459 + mpc->in_ops = &ingress_ops;
60460 diff --git a/net/atm/proc.c b/net/atm/proc.c
60461 index bbb6461..cf04016 100644
60462 --- a/net/atm/proc.c
60463 @@ -124065,10 +148908,10 @@ index 919a5ce..cc6b444 100644
60464 table = kmemdup(ax25_param_table, sizeof(ax25_param_table), GFP_KERNEL);
60465 if (!table)
60466 diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
60467 -index 912d9c3..2494d1e 100644
60468 +index df625de..1ecaa3d 100644
60469 --- a/net/batman-adv/bat_iv_ogm.c
60470 +++ b/net/batman-adv/bat_iv_ogm.c
60471 -@@ -316,7 +316,7 @@ static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface)
60472 +@@ -318,7 +318,7 @@ static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface)
60473
60474 /* randomize initial seqno to avoid collision */
60475 get_random_bytes(&random_seqno, sizeof(random_seqno));
60476 @@ -124077,7 +148920,7 @@ index 912d9c3..2494d1e 100644
60477
60478 hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN;
60479 ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC);
60480 -@@ -919,9 +919,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
60481 +@@ -918,9 +918,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
60482 batadv_ogm_packet->tvlv_len = htons(tvlv_len);
60483
60484 /* change sequence number to network order */
60485 @@ -124089,7 +148932,7 @@ index 912d9c3..2494d1e 100644
60486
60487 batadv_iv_ogm_slide_own_bcast_window(hard_iface);
60488
60489 -@@ -1600,7 +1600,7 @@ static void batadv_iv_ogm_process(const struct sk_buff *skb, int ogm_offset,
60490 +@@ -1609,7 +1609,7 @@ static void batadv_iv_ogm_process(const struct sk_buff *skb, int ogm_offset,
60491 return;
60492
60493 /* could be changed by schedule_own_packet() */
60494 @@ -124099,7 +148942,7 @@ index 912d9c3..2494d1e 100644
60495 if (ogm_packet->flags & BATADV_DIRECTLINK)
60496 has_directlink_flag = true;
60497 diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
60498 -index 700c96c..637df49 100644
60499 +index 20d9282..c575313 100644
60500 --- a/net/batman-adv/fragmentation.c
60501 +++ b/net/batman-adv/fragmentation.c
60502 @@ -468,7 +468,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
60503 @@ -124112,7 +148955,7 @@ index 700c96c..637df49 100644
60504 frag_header.no = 0;
60505 frag_header.total_size = htons(skb->len);
60506 diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
60507 -index 3207667..c281989 100644
60508 +index e4f2646..68a6e61 100644
60509 --- a/net/batman-adv/routing.c
60510 +++ b/net/batman-adv/routing.c
60511 @@ -665,7 +665,7 @@ batadv_reroute_unicast_packet(struct batadv_priv *bat_priv,
60512 @@ -124134,9 +148977,18 @@ index 3207667..c281989 100644
60513 orig_node = batadv_orig_hash_find(bat_priv,
60514 unicast_packet->dest);
60515 diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
60516 -index ac4d08d..76780fe 100644
60517 +index ac4d08d..482d3a0 100644
60518 --- a/net/batman-adv/soft-interface.c
60519 +++ b/net/batman-adv/soft-interface.c
60520 +@@ -178,7 +178,7 @@ static void batadv_interface_set_rx_mode(struct net_device *dev)
60521 + {
60522 + }
60523 +
60524 +-static int batadv_interface_tx(struct sk_buff *skb,
60525 ++static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
60526 + struct net_device *soft_iface)
60527 + {
60528 + struct ethhdr *ethhdr;
60529 @@ -330,7 +330,7 @@ send:
60530 primary_if->net_dev->dev_addr);
60531
60532 @@ -124175,11 +149027,206 @@ index ac4d08d..76780fe 100644
60533 .kind = "batadv",
60534 .priv_size = sizeof(struct batadv_priv),
60535 .setup = batadv_softif_init_early,
60536 +diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
60537 +index fe87777..d115a3a 100644
60538 +--- a/net/batman-adv/sysfs.c
60539 ++++ b/net/batman-adv/sysfs.c
60540 +@@ -141,7 +141,7 @@ struct batadv_attribute batadv_attr_##_name = { \
60541 +
60542 + #define BATADV_ATTR_SIF_STORE_BOOL(_name, _post_func) \
60543 + ssize_t batadv_store_##_name(struct kobject *kobj, \
60544 +- struct attribute *attr, char *buff, \
60545 ++ struct kobj_attribute *attr, char *buff, \
60546 + size_t count) \
60547 + { \
60548 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
60549 +@@ -153,7 +153,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \
60550 +
60551 + #define BATADV_ATTR_SIF_SHOW_BOOL(_name) \
60552 + ssize_t batadv_show_##_name(struct kobject *kobj, \
60553 +- struct attribute *attr, char *buff) \
60554 ++ struct kobj_attribute *attr, char *buff) \
60555 + { \
60556 + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
60557 + \
60558 +@@ -173,7 +173,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
60559 +
60560 + #define BATADV_ATTR_SIF_STORE_UINT(_name, _var, _min, _max, _post_func) \
60561 + ssize_t batadv_store_##_name(struct kobject *kobj, \
60562 +- struct attribute *attr, char *buff, \
60563 ++ struct kobj_attribute *attr, char *buff, \
60564 + size_t count) \
60565 + { \
60566 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
60567 +@@ -186,7 +186,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \
60568 +
60569 + #define BATADV_ATTR_SIF_SHOW_UINT(_name, _var) \
60570 + ssize_t batadv_show_##_name(struct kobject *kobj, \
60571 +- struct attribute *attr, char *buff) \
60572 ++ struct kobj_attribute *attr, char *buff) \
60573 + { \
60574 + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
60575 + \
60576 +@@ -204,7 +204,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
60577 +
60578 + #define BATADV_ATTR_VLAN_STORE_BOOL(_name, _post_func) \
60579 + ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \
60580 +- struct attribute *attr, char *buff, \
60581 ++ struct kobj_attribute *attr, char *buff,\
60582 + size_t count) \
60583 + { \
60584 + struct batadv_priv *bat_priv = batadv_vlan_kobj_to_batpriv(kobj);\
60585 +@@ -220,7 +220,7 @@ ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \
60586 +
60587 + #define BATADV_ATTR_VLAN_SHOW_BOOL(_name) \
60588 + ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
60589 +- struct attribute *attr, char *buff) \
60590 ++ struct kobj_attribute *attr, char *buff)\
60591 + { \
60592 + struct batadv_priv *bat_priv = batadv_vlan_kobj_to_batpriv(kobj);\
60593 + struct batadv_softif_vlan *vlan = batadv_kobj_to_vlan(bat_priv, \
60594 +@@ -284,13 +284,13 @@ static int batadv_store_bool_attr(char *buff, size_t count,
60595 + static inline ssize_t
60596 + __batadv_store_bool_attr(char *buff, size_t count,
60597 + void (*post_func)(struct net_device *),
60598 +- struct attribute *attr,
60599 ++ struct kobj_attribute *attr,
60600 + atomic_t *attr_store, struct net_device *net_dev)
60601 + {
60602 + bool changed;
60603 + int ret;
60604 +
60605 +- ret = batadv_store_bool_attr(buff, count, net_dev, attr->name,
60606 ++ ret = batadv_store_bool_attr(buff, count, net_dev, attr->attr.name,
60607 + attr_store, &changed);
60608 + if (post_func && changed)
60609 + post_func(net_dev);
60610 +@@ -340,12 +340,12 @@ static inline ssize_t
60611 + __batadv_store_uint_attr(const char *buff, size_t count,
60612 + int min, int max,
60613 + void (*post_func)(struct net_device *),
60614 +- const struct attribute *attr,
60615 ++ const struct kobj_attribute *attr,
60616 + atomic_t *attr_store, struct net_device *net_dev)
60617 + {
60618 + int ret;
60619 +
60620 +- ret = batadv_store_uint_attr(buff, count, net_dev, attr->name, min, max,
60621 ++ ret = batadv_store_uint_attr(buff, count, net_dev, attr->attr.name, min, max,
60622 + attr_store);
60623 + if (post_func && ret)
60624 + post_func(net_dev);
60625 +@@ -354,7 +354,7 @@ __batadv_store_uint_attr(const char *buff, size_t count,
60626 + }
60627 +
60628 + static ssize_t batadv_show_bat_algo(struct kobject *kobj,
60629 +- struct attribute *attr, char *buff)
60630 ++ struct kobj_attribute *attr, char *buff)
60631 + {
60632 + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
60633 +
60634 +@@ -368,7 +368,7 @@ static void batadv_post_gw_reselect(struct net_device *net_dev)
60635 + batadv_gw_reselect(bat_priv);
60636 + }
60637 +
60638 +-static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct attribute *attr,
60639 ++static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct kobj_attribute *attr,
60640 + char *buff)
60641 + {
60642 + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
60643 +@@ -393,7 +393,7 @@ static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct attribute *attr,
60644 + }
60645 +
60646 + static ssize_t batadv_store_gw_mode(struct kobject *kobj,
60647 +- struct attribute *attr, char *buff,
60648 ++ struct kobj_attribute *attr, char *buff,
60649 + size_t count)
60650 + {
60651 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
60652 +@@ -461,7 +461,7 @@ static ssize_t batadv_store_gw_mode(struct kobject *kobj,
60653 + }
60654 +
60655 + static ssize_t batadv_show_gw_bwidth(struct kobject *kobj,
60656 +- struct attribute *attr, char *buff)
60657 ++ struct kobj_attribute *attr, char *buff)
60658 + {
60659 + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
60660 + u32 down, up;
60661 +@@ -474,7 +474,7 @@ static ssize_t batadv_show_gw_bwidth(struct kobject *kobj,
60662 + }
60663 +
60664 + static ssize_t batadv_store_gw_bwidth(struct kobject *kobj,
60665 +- struct attribute *attr, char *buff,
60666 ++ struct kobj_attribute *attr, char *buff,
60667 + size_t count)
60668 + {
60669 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
60670 +@@ -495,7 +495,7 @@ static ssize_t batadv_store_gw_bwidth(struct kobject *kobj,
60671 + * error code in case of failure
60672 + */
60673 + static ssize_t batadv_show_isolation_mark(struct kobject *kobj,
60674 +- struct attribute *attr, char *buff)
60675 ++ struct kobj_attribute *attr, char *buff)
60676 + {
60677 + struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
60678 +
60679 +@@ -514,7 +514,7 @@ static ssize_t batadv_show_isolation_mark(struct kobject *kobj,
60680 + * Returns 'count' on success or a negative error code in case of failure
60681 + */
60682 + static ssize_t batadv_store_isolation_mark(struct kobject *kobj,
60683 +- struct attribute *attr, char *buff,
60684 ++ struct kobj_attribute *attr, char *buff,
60685 + size_t count)
60686 + {
60687 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
60688 +@@ -753,7 +753,7 @@ void batadv_sysfs_del_vlan(struct batadv_priv *bat_priv,
60689 + }
60690 +
60691 + static ssize_t batadv_show_mesh_iface(struct kobject *kobj,
60692 +- struct attribute *attr, char *buff)
60693 ++ struct kobj_attribute *attr, char *buff)
60694 + {
60695 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
60696 + struct batadv_hard_iface *hard_iface;
60697 +@@ -777,7 +777,7 @@ static ssize_t batadv_show_mesh_iface(struct kobject *kobj,
60698 + }
60699 +
60700 + static ssize_t batadv_store_mesh_iface(struct kobject *kobj,
60701 +- struct attribute *attr, char *buff,
60702 ++ struct kobj_attribute *attr, char *buff,
60703 + size_t count)
60704 + {
60705 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
60706 +@@ -834,7 +834,7 @@ out:
60707 + }
60708 +
60709 + static ssize_t batadv_show_iface_status(struct kobject *kobj,
60710 +- struct attribute *attr, char *buff)
60711 ++ struct kobj_attribute *attr, char *buff)
60712 + {
60713 + struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
60714 + struct batadv_hard_iface *hard_iface;
60715 +diff --git a/net/batman-adv/sysfs.h b/net/batman-adv/sysfs.h
60716 +index 6197442..d762dac 100644
60717 +--- a/net/batman-adv/sysfs.h
60718 ++++ b/net/batman-adv/sysfs.h
60719 +@@ -37,9 +37,9 @@ struct net_device;
60720 +
60721 + struct batadv_attribute {
60722 + struct attribute attr;
60723 +- ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
60724 ++ ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
60725 + char *buf);
60726 +- ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
60727 ++ ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
60728 + char *buf, size_t count);
60729 + };
60730 +
60731 diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
60732 -index 83b0ca2..6ebbdf4 100644
60733 +index 0e80fd1..65abb77 100644
60734 --- a/net/batman-adv/translation-table.c
60735 +++ b/net/batman-adv/translation-table.c
60736 -@@ -607,7 +607,7 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
60737 +@@ -609,7 +609,7 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
60738 batadv_dbg(BATADV_DBG_TT, bat_priv,
60739 "Creating new local tt entry: %pM (vid: %d, ttvn: %d)\n",
60740 addr, BATADV_PRINT_VID(vid),
60741 @@ -124188,7 +149235,7 @@ index 83b0ca2..6ebbdf4 100644
60742
60743 ether_addr_copy(tt_local->common.addr, addr);
60744 /* The local entry has to be marked as NEW to avoid to send it in
60745 -@@ -837,7 +837,7 @@ batadv_tt_prepare_tvlv_local_data(struct batadv_priv *bat_priv,
60746 +@@ -839,7 +839,7 @@ batadv_tt_prepare_tvlv_local_data(struct batadv_priv *bat_priv,
60747 }
60748
60749 (*tt_data)->flags = BATADV_NO_FLAGS;
60750 @@ -124197,7 +149244,7 @@ index 83b0ca2..6ebbdf4 100644
60751 (*tt_data)->num_vlan = htons(num_vlan);
60752
60753 tt_vlan = (struct batadv_tvlv_tt_vlan_data *)(*tt_data + 1);
60754 -@@ -956,7 +956,7 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset)
60755 +@@ -958,7 +958,7 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset)
60756
60757 seq_printf(seq,
60758 "Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n",
60759 @@ -124206,7 +149253,7 @@ index 83b0ca2..6ebbdf4 100644
60760 seq_printf(seq, " %-13s %s %-8s %-9s (%-10s)\n", "Client", "VID",
60761 "Flags", "Last seen", "CRC");
60762
60763 -@@ -2733,7 +2733,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
60764 +@@ -2747,7 +2747,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
60765
60766 spin_lock_bh(&bat_priv->tt.commit_lock);
60767
60768 @@ -124215,7 +149262,7 @@ index 83b0ca2..6ebbdf4 100644
60769 req_ttvn = tt_data->ttvn;
60770
60771 orig_node = batadv_orig_hash_find(bat_priv, req_src);
60772 -@@ -2772,7 +2772,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
60773 +@@ -2786,7 +2786,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
60774 bat_priv->tt.last_changeset_len);
60775 spin_unlock_bh(&bat_priv->tt.last_changeset_lock);
60776 } else {
60777 @@ -124224,7 +149271,7 @@ index 83b0ca2..6ebbdf4 100644
60778
60779 /* allocate the tvlv, put the tt_data and all the tt_vlan_data
60780 * in the initial part
60781 -@@ -3294,10 +3294,10 @@ static void batadv_tt_local_commit_changes_nolock(struct batadv_priv *bat_priv)
60782 +@@ -3308,10 +3308,10 @@ static void batadv_tt_local_commit_changes_nolock(struct batadv_priv *bat_priv)
60783 batadv_tt_local_update_crc(bat_priv);
60784
60785 /* Increment the TTVN only once per OGM interval */
60786 @@ -124238,7 +149285,7 @@ index 83b0ca2..6ebbdf4 100644
60787 /* reset the sending counter */
60788 atomic_set(&bat_priv->tt.ogm_append_cnt, BATADV_TT_OGM_APPEND_MAX);
60789 diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
60790 -index d260efd..1548fb3 100644
60791 +index 3437b66..8fa5b54 100644
60792 --- a/net/batman-adv/types.h
60793 +++ b/net/batman-adv/types.h
60794 @@ -81,7 +81,7 @@ enum batadv_dhcp_recipient {
60795 @@ -124250,7 +149297,7 @@ index d260efd..1548fb3 100644
60796 };
60797
60798 /**
60799 -@@ -529,7 +529,7 @@ enum batadv_counters {
60800 +@@ -551,7 +551,7 @@ enum batadv_counters {
60801 * @work: work queue callback item for translation table purging
60802 */
60803 struct batadv_priv_tt {
60804 @@ -124259,7 +149306,7 @@ index d260efd..1548fb3 100644
60805 atomic_t ogm_append_cnt;
60806 atomic_t local_changes;
60807 struct list_head changes_list;
60808 -@@ -784,7 +784,7 @@ struct batadv_priv {
60809 +@@ -809,7 +809,7 @@ struct batadv_priv {
60810 atomic_t bonding;
60811 atomic_t fragmentation;
60812 atomic_t packet_size_max;
60813 @@ -124268,7 +149315,7 @@ index d260efd..1548fb3 100644
60814 #ifdef CONFIG_BATMAN_ADV_BLA
60815 atomic_t bridge_loop_avoidance;
60816 #endif
60817 -@@ -803,7 +803,7 @@ struct batadv_priv {
60818 +@@ -828,7 +828,7 @@ struct batadv_priv {
60819 #endif
60820 u32 isolation_mark;
60821 u32 isolation_mark_mask;
60822 @@ -124278,10 +149325,10 @@ index d260efd..1548fb3 100644
60823 atomic_t batman_queue_left;
60824 char num_ifaces;
60825 diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
60826 -index b1eb8c0..266b4100 100644
60827 +index 1298d72..423f410 100644
60828 --- a/net/bluetooth/hci_sock.c
60829 +++ b/net/bluetooth/hci_sock.c
60830 -@@ -1332,7 +1332,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
60831 +@@ -1477,7 +1477,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
60832 uf.event_mask[1] = *((u32 *) f->event_mask + 1);
60833 }
60834
60835 @@ -124291,10 +149338,10 @@ index b1eb8c0..266b4100 100644
60836 err = -EFAULT;
60837 break;
60838 diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
60839 -index 66e8b6e..6b53602 100644
60840 +index eb4f5f2..2cc4c50 100644
60841 --- a/net/bluetooth/l2cap_core.c
60842 +++ b/net/bluetooth/l2cap_core.c
60843 -@@ -3537,8 +3537,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
60844 +@@ -3547,8 +3547,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
60845 break;
60846
60847 case L2CAP_CONF_RFC:
60848 @@ -124308,7 +149355,7 @@ index 66e8b6e..6b53602 100644
60849 if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) &&
60850 rfc.mode != chan->mode)
60851 diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
60852 -index 1bb5515..17f48c6 100644
60853 +index e4cae72..95cc097ba 100644
60854 --- a/net/bluetooth/l2cap_sock.c
60855 +++ b/net/bluetooth/l2cap_sock.c
60856 @@ -633,7 +633,8 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
60857 @@ -124416,10 +149463,10 @@ index 40197ff..58633af 100644
60858 .priv_size = sizeof(struct net_bridge),
60859 .setup = br_dev_setup,
60860 diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
60861 -index f46ca41..6e76045 100644
60862 +index 67b2e27..07fb939 100644
60863 --- a/net/bridge/netfilter/ebtables.c
60864 +++ b/net/bridge/netfilter/ebtables.c
60865 -@@ -1513,6 +1513,8 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
60866 +@@ -1521,6 +1521,8 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
60867 if (copy_from_user(&tmp, user, sizeof(tmp)))
60868 return -EFAULT;
60869
60870 @@ -124428,7 +149475,7 @@ index f46ca41..6e76045 100644
60871 t = find_table_lock(net, tmp.name, &ret, &ebt_mutex);
60872 if (!t)
60873 return ret;
60874 -@@ -1535,7 +1537,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
60875 +@@ -1543,7 +1545,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
60876 tmp.valid_hooks = t->table->valid_hooks;
60877 }
60878 mutex_unlock(&ebt_mutex);
60879 @@ -124437,7 +149484,7 @@ index f46ca41..6e76045 100644
60880 BUGPRINT("c2u Didn't work\n");
60881 ret = -EFAULT;
60882 break;
60883 -@@ -2328,6 +2330,8 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
60884 +@@ -2332,6 +2334,8 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
60885 if (copy_from_user(&tmp, user, sizeof(tmp)))
60886 return -EFAULT;
60887
60888 @@ -124446,7 +149493,7 @@ index f46ca41..6e76045 100644
60889 t = find_table_lock(net, tmp.name, &ret, &ebt_mutex);
60890 if (!t)
60891 return ret;
60892 -@@ -2341,7 +2345,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
60893 +@@ -2345,7 +2349,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
60894 goto out;
60895 tmp.valid_hooks = t->valid_hooks;
60896
60897 @@ -124455,7 +149502,7 @@ index f46ca41..6e76045 100644
60898 ret = -EFAULT;
60899 break;
60900 }
60901 -@@ -2352,7 +2356,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
60902 +@@ -2356,7 +2360,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
60903 tmp.entries_size = t->table->entries_size;
60904 tmp.valid_hooks = t->table->valid_hooks;
60905
60906 @@ -124508,9 +149555,18 @@ index f5afda1..dcf770a 100644
60907 list_del(&p->list);
60908 goto out;
60909 diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
60910 -index 67a4a36..8d28068 100644
60911 +index 67a4a36..406eefc 100644
60912 --- a/net/caif/chnl_net.c
60913 +++ b/net/caif/chnl_net.c
60914 +@@ -214,7 +214,7 @@ static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow,
60915 + }
60916 + }
60917 +
60918 +-static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
60919 ++static netdev_tx_t chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
60920 + {
60921 + struct chnl_net *priv;
60922 + struct cfpkt *pkt = NULL;
60923 @@ -515,7 +515,7 @@ static const struct nla_policy ipcaif_policy[IFLA_CAIF_MAX + 1] = {
60924 };
60925
60926 @@ -124590,11 +149646,24 @@ index 1a19b98..df2b4ec 100644
60927
60928 if (!can_dir) {
60929 printk(KERN_INFO "can: failed to create /proc/net/can . "
60930 +diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
60931 +index bcbec33..5a84f6f 100644
60932 +--- a/net/ceph/ceph_common.c
60933 ++++ b/net/ceph/ceph_common.c
60934 +@@ -5,7 +5,7 @@
60935 + #include <linux/fs.h>
60936 + #include <linux/inet.h>
60937 + #include <linux/in6.h>
60938 +-#include <linux/key.h>
60939 ++#include <linux/key-type.h>
60940 + #include <keys/ceph-type.h>
60941 + #include <linux/module.h>
60942 + #include <linux/mount.h>
60943 diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
60944 -index 63ae5dd..40e8dce 100644
60945 +index 9382619..0a029e7 100644
60946 --- a/net/ceph/messenger.c
60947 +++ b/net/ceph/messenger.c
60948 -@@ -190,7 +190,7 @@ static void con_fault(struct ceph_connection *con);
60949 +@@ -187,7 +187,7 @@ static void con_fault(struct ceph_connection *con);
60950 #define MAX_ADDR_STR_LEN 64 /* 54 is enough */
60951
60952 static char addr_str[ADDR_STR_COUNT][MAX_ADDR_STR_LEN];
60953 @@ -124603,7 +149672,7 @@ index 63ae5dd..40e8dce 100644
60954
60955 static struct page *zero_page; /* used in certain error cases */
60956
60957 -@@ -201,7 +201,7 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss)
60958 +@@ -198,7 +198,7 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss)
60959 struct sockaddr_in *in4 = (struct sockaddr_in *) ss;
60960 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) ss;
60961
60962 @@ -124731,10 +149800,10 @@ index 5cfd26a..3c50cb0 100644
60963 a0 = a[0];
60964 a1 = a[1];
60965 diff --git a/net/core/datagram.c b/net/core/datagram.c
60966 -index d62af69..2e07b22 100644
60967 +index fa9dc64..73dd85a 100644
60968 --- a/net/core/datagram.c
60969 +++ b/net/core/datagram.c
60970 -@@ -338,7 +338,7 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
60971 +@@ -357,7 +357,7 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
60972 }
60973
60974 kfree_skb(skb);
60975 @@ -124744,10 +149813,10 @@ index d62af69..2e07b22 100644
60976
60977 return err;
60978 diff --git a/net/core/dev.c b/net/core/dev.c
60979 -index 9efbdb3..16a834b 100644
60980 +index 0ef061b..6d2375a 100644
60981 --- a/net/core/dev.c
60982 +++ b/net/core/dev.c
60983 -@@ -1748,7 +1748,7 @@ int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
60984 +@@ -1766,7 +1766,7 @@ int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
60985 {
60986 if (skb_orphan_frags(skb, GFP_ATOMIC) ||
60987 unlikely(!is_skb_forwardable(dev, skb))) {
60988 @@ -124756,7 +149825,7 @@ index 9efbdb3..16a834b 100644
60989 kfree_skb(skb);
60990 return NET_RX_DROP;
60991 }
60992 -@@ -3173,7 +3173,7 @@ recursion_alert:
60993 +@@ -3379,7 +3379,7 @@ recursion_alert:
60994 drop:
60995 rcu_read_unlock_bh();
60996
60997 @@ -124765,7 +149834,7 @@ index 9efbdb3..16a834b 100644
60998 kfree_skb_list(skb);
60999 return rc;
61000 out:
61001 -@@ -3525,7 +3525,7 @@ drop:
61002 +@@ -3731,7 +3731,7 @@ drop:
61003
61004 local_irq_restore(flags);
61005
61006 @@ -124774,7 +149843,7 @@ index 9efbdb3..16a834b 100644
61007 kfree_skb(skb);
61008 return NET_RX_DROP;
61009 }
61010 -@@ -3602,7 +3602,7 @@ int netif_rx_ni(struct sk_buff *skb)
61011 +@@ -3808,7 +3808,7 @@ int netif_rx_ni(struct sk_buff *skb)
61012 }
61013 EXPORT_SYMBOL(netif_rx_ni);
61014
61015 @@ -124783,7 +149852,7 @@ index 9efbdb3..16a834b 100644
61016 {
61017 struct softnet_data *sd = this_cpu_ptr(&softnet_data);
61018
61019 -@@ -3948,7 +3948,7 @@ ncls:
61020 +@@ -4154,7 +4154,7 @@ ncls:
61021 ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
61022 } else {
61023 drop:
61024 @@ -124792,7 +149861,7 @@ index 9efbdb3..16a834b 100644
61025 kfree_skb(skb);
61026 /* Jamal, now you will not able to escape explaining
61027 * me how you were going to use this. :-)
61028 -@@ -4844,7 +4844,7 @@ out_unlock:
61029 +@@ -5117,7 +5117,7 @@ out_unlock:
61030 return work;
61031 }
61032
61033 @@ -124801,7 +149870,7 @@ index 9efbdb3..16a834b 100644
61034 {
61035 struct softnet_data *sd = this_cpu_ptr(&softnet_data);
61036 unsigned long time_limit = jiffies + 2;
61037 -@@ -7004,8 +7004,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
61038 +@@ -7298,8 +7298,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
61039 } else {
61040 netdev_stats_to_stats64(storage, &dev->stats);
61041 }
61042 @@ -124832,10 +149901,10 @@ index b94b1d2..da3ed7c 100644
61043 EXPORT_SYMBOL(dev_load);
61044
61045 diff --git a/net/core/filter.c b/net/core/filter.c
61046 -index f393a22..a106bc8 100644
61047 +index fb2951c..27ce8a9 100644
61048 --- a/net/core/filter.c
61049 +++ b/net/core/filter.c
61050 -@@ -580,7 +580,11 @@ do_pass:
61051 +@@ -588,7 +588,11 @@ do_pass:
61052
61053 /* Unknown instruction. */
61054 default:
61055 @@ -124848,7 +149917,7 @@ index f393a22..a106bc8 100644
61056 }
61057
61058 insn++;
61059 -@@ -624,7 +628,7 @@ static int check_load_and_stores(const struct sock_filter *filter, int flen)
61060 +@@ -632,7 +636,7 @@ static int check_load_and_stores(const struct sock_filter *filter, int flen)
61061 u16 *masks, memvalid = 0; /* One bit per cell, 16 cells */
61062 int pc, ret = 0;
61063
61064 @@ -124857,7 +149926,7 @@ index f393a22..a106bc8 100644
61065
61066 masks = kmalloc_array(flen, sizeof(*masks), GFP_KERNEL);
61067 if (!masks)
61068 -@@ -1058,7 +1062,7 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog)
61069 +@@ -1066,7 +1070,7 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog)
61070 if (!fp)
61071 return -ENOMEM;
61072
61073 @@ -125034,7 +150103,7 @@ index 2bf8329..2eb1423 100644
61074
61075 return 0;
61076 diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
61077 -index f88a62ab..ba29125 100644
61078 +index b6c8a66..0da5ffc 100644
61079 --- a/net/core/net-sysfs.c
61080 +++ b/net/core/net-sysfs.c
61081 @@ -287,7 +287,7 @@ static ssize_t carrier_changes_show(struct device *dev,
61082 @@ -125109,7 +150178,7 @@ index 94acfc8..01545c0 100644
61083 iph->ttl = 64;
61084 iph->protocol = IPPROTO_UDP;
61085 diff --git a/net/core/pktgen.c b/net/core/pktgen.c
61086 -index 4da4d51..ef1aa60 100644
61087 +index 1474cfd..961bc9f 100644
61088 --- a/net/core/pktgen.c
61089 +++ b/net/core/pktgen.c
61090 @@ -3829,7 +3829,7 @@ static int __net_init pg_net_init(struct net *net)
61091 @@ -125122,7 +150191,7 @@ index 4da4d51..ef1aa60 100644
61092 pr_warn("cannot create /proc/net/%s\n", PG_PROC_DIR);
61093 return -ENODEV;
61094 diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
61095 -index ca966f7..34ad6fa 100644
61096 +index 215e613..893522a 100644
61097 --- a/net/core/rtnetlink.c
61098 +++ b/net/core/rtnetlink.c
61099 @@ -61,7 +61,7 @@ struct rtnl_link {
61100 @@ -125160,7 +150229,7 @@ index ca966f7..34ad6fa 100644
61101 }
61102 EXPORT_SYMBOL_GPL(__rtnl_link_unregister);
61103
61104 -@@ -1234,7 +1237,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
61105 +@@ -1235,7 +1238,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
61106 (dev->ifalias &&
61107 nla_put_string(skb, IFLA_IFALIAS, dev->ifalias)) ||
61108 nla_put_u32(skb, IFLA_CARRIER_CHANGES,
61109 @@ -125169,7 +150238,7 @@ index ca966f7..34ad6fa 100644
61110 nla_put_u8(skb, IFLA_PROTO_DOWN, dev->proto_down))
61111 goto nla_put_failure;
61112
61113 -@@ -3386,7 +3389,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
61114 +@@ -3395,7 +3398,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
61115 __rtnl_unlock();
61116 rtnl = net->rtnl;
61117 {
61118 @@ -125179,7 +150248,7 @@ index ca966f7..34ad6fa 100644
61119 .min_dump_alloc = min_dump_alloc,
61120 };
61121 diff --git a/net/core/scm.c b/net/core/scm.c
61122 -index dce0acb..69f6cac 100644
61123 +index 2696aef..dbd5807 100644
61124 --- a/net/core/scm.c
61125 +++ b/net/core/scm.c
61126 @@ -215,9 +215,9 @@ EXPORT_SYMBOL(__scm_send);
61127 @@ -125271,10 +150340,10 @@ index 8616d11..8b30348 100644
61128 }
61129
61130 diff --git a/net/core/sock.c b/net/core/sock.c
61131 -index 0d91f7d..47dcbc8 100644
61132 +index 6c1c8bc..325316d 100644
61133 --- a/net/core/sock.c
61134 +++ b/net/core/sock.c
61135 -@@ -451,7 +451,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
61136 +@@ -409,7 +409,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
61137 struct sk_buff_head *list = &sk->sk_receive_queue;
61138
61139 if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) {
61140 @@ -125283,7 +150352,7 @@ index 0d91f7d..47dcbc8 100644
61141 trace_sock_rcvqueue_full(sk, skb);
61142 return -ENOMEM;
61143 }
61144 -@@ -461,7 +461,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
61145 +@@ -419,7 +419,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
61146 return err;
61147
61148 if (!sk_rmem_schedule(sk, skb, skb->truesize)) {
61149 @@ -125292,7 +150361,7 @@ index 0d91f7d..47dcbc8 100644
61150 return -ENOBUFS;
61151 }
61152
61153 -@@ -494,7 +494,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
61154 +@@ -452,7 +452,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
61155 skb->dev = NULL;
61156
61157 if (sk_rcvqueues_full(sk, sk->sk_rcvbuf)) {
61158 @@ -125301,7 +150370,7 @@ index 0d91f7d..47dcbc8 100644
61159 goto discard_and_relse;
61160 }
61161 if (nested)
61162 -@@ -512,7 +512,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
61163 +@@ -470,7 +470,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
61164 mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
61165 } else if (sk_add_backlog(sk, skb, sk->sk_rcvbuf)) {
61166 bh_unlock_sock(sk);
61167 @@ -125310,24 +150379,57 @@ index 0d91f7d..47dcbc8 100644
61168 goto discard_and_relse;
61169 }
61170
61171 -@@ -919,6 +919,7 @@ set_rcvbuf:
61172 +@@ -877,19 +877,6 @@ set_rcvbuf:
61173 + }
61174 + break;
61175 +
61176 +- case SO_ATTACH_BPF:
61177 +- ret = -EINVAL;
61178 +- if (optlen == sizeof(u32)) {
61179 +- u32 ufd;
61180 +-
61181 +- ret = -EFAULT;
61182 +- if (copy_from_user(&ufd, optval, sizeof(ufd)))
61183 +- break;
61184 +-
61185 +- ret = sk_attach_bpf(ufd, sk);
61186 +- }
61187 +- break;
61188 +-
61189 + case SO_ATTACH_REUSEPORT_CBPF:
61190 + ret = -EINVAL;
61191 + if (optlen == sizeof(struct sock_fprog)) {
61192 +@@ -903,6 +890,20 @@ set_rcvbuf:
61193 }
61194 break;
61195
61196 +#ifndef GRKERNSEC_BPF_HARDEN
61197 - case SO_ATTACH_BPF:
61198 ++ case SO_ATTACH_BPF:
61199 ++ ret = -EINVAL;
61200 ++ if (optlen == sizeof(u32)) {
61201 ++ u32 ufd;
61202 ++
61203 ++ ret = -EFAULT;
61204 ++ if (copy_from_user(&ufd, optval, sizeof(ufd)))
61205 ++ break;
61206 ++
61207 ++ ret = sk_attach_bpf(ufd, sk);
61208 ++ }
61209 ++ break;
61210 ++
61211 + case SO_ATTACH_REUSEPORT_EBPF:
61212 ret = -EINVAL;
61213 if (optlen == sizeof(u32)) {
61214 -@@ -931,7 +932,7 @@ set_rcvbuf:
61215 - ret = sk_attach_bpf(ufd, sk);
61216 +@@ -916,6 +917,8 @@ set_rcvbuf:
61217 }
61218 break;
61219 --
61220 +
61221 +#endif
61222 ++
61223 case SO_DETACH_FILTER:
61224 ret = sk_detach_filter(sk);
61225 break;
61226 -@@ -1037,12 +1038,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
61227 +@@ -1021,12 +1024,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
61228 struct timeval tm;
61229 } v;
61230
61231 @@ -125343,7 +150445,7 @@ index 0d91f7d..47dcbc8 100644
61232 return -EINVAL;
61233
61234 memset(&v, 0, sizeof(v));
61235 -@@ -1180,11 +1181,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
61236 +@@ -1164,11 +1167,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
61237
61238 case SO_PEERNAME:
61239 {
61240 @@ -125357,7 +150459,7 @@ index 0d91f7d..47dcbc8 100644
61241 return -EINVAL;
61242 if (copy_to_user(optval, address, len))
61243 return -EFAULT;
61244 -@@ -1272,7 +1273,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
61245 +@@ -1256,7 +1259,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
61246
61247 if (len > lv)
61248 len = lv;
61249 @@ -125366,7 +150468,7 @@ index 0d91f7d..47dcbc8 100644
61250 return -EFAULT;
61251 lenout:
61252 if (put_user(len, optlen))
61253 -@@ -1564,7 +1565,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
61254 +@@ -1535,7 +1538,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
61255 newsk->sk_err = 0;
61256 newsk->sk_priority = 0;
61257 newsk->sk_incoming_cpu = raw_smp_processor_id();
61258 @@ -125375,7 +150477,7 @@ index 0d91f7d..47dcbc8 100644
61259 /*
61260 * Before updating sk_refcnt, we must commit prior changes to memory
61261 * (Documentation/RCU/rculist_nulls.txt for details)
61262 -@@ -2424,7 +2425,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
61263 +@@ -2402,7 +2405,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
61264 */
61265 smp_wmb();
61266 atomic_set(&sk->sk_refcnt, 1);
61267 @@ -125384,7 +150486,7 @@ index 0d91f7d..47dcbc8 100644
61268 }
61269 EXPORT_SYMBOL(sock_init_data);
61270
61271 -@@ -2553,6 +2554,7 @@ void sock_enable_timestamp(struct sock *sk, int flag)
61272 +@@ -2531,6 +2534,7 @@ void sock_enable_timestamp(struct sock *sk, int flag)
61273 int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
61274 int level, int type)
61275 {
61276 @@ -125392,7 +150494,7 @@ index 0d91f7d..47dcbc8 100644
61277 struct sock_exterr_skb *serr;
61278 struct sk_buff *skb;
61279 int copied, err;
61280 -@@ -2574,7 +2576,8 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
61281 +@@ -2552,7 +2556,8 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
61282 sock_recv_timestamp(msg, sk, skb);
61283
61284 serr = SKB_EXT_ERR(skb);
61285 @@ -125403,7 +150505,7 @@ index 0d91f7d..47dcbc8 100644
61286 msg->msg_flags |= MSG_ERRQUEUE;
61287 err = copied;
61288 diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
61289 -index 0c1d58d..e6ad04f 100644
61290 +index a996ce8..e0d5d3d 100644
61291 --- a/net/core/sock_diag.c
61292 +++ b/net/core/sock_diag.c
61293 @@ -14,7 +14,7 @@
61294 @@ -125589,10 +150691,10 @@ index 5325b54..a0d4d69 100644
61295
61296 *lenp = len;
61297 diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
61298 -index 1eba07f..4859469 100644
61299 +index d8fb47f..f0914ca 100644
61300 --- a/net/dsa/dsa.c
61301 +++ b/net/dsa/dsa.c
61302 -@@ -999,7 +999,7 @@ static struct packet_type dsa_pack_type __read_mostly = {
61303 +@@ -985,7 +985,7 @@ static struct packet_type dsa_pack_type __read_mostly = {
61304 .func = dsa_switch_rcv,
61305 };
61306
61307 @@ -125601,6 +150703,19 @@ index 1eba07f..4859469 100644
61308 .notifier_call = dsa_slave_netdevice_event,
61309 };
61310
61311 +diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
61312 +index c7d1adc..e4d688b 100644
61313 +--- a/net/hsr/hsr_device.c
61314 ++++ b/net/hsr/hsr_device.c
61315 +@@ -232,7 +232,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev,
61316 + }
61317 +
61318 +
61319 +-static int hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
61320 ++static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
61321 + {
61322 + struct hsr_priv *hsr = netdev_priv(dev);
61323 + struct hsr_port *master;
61324 diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
61325 index a2c7e4c..3dc9f67 100644
61326 --- a/net/hsr/hsr_netlink.c
61327 @@ -125615,10 +150730,10 @@ index a2c7e4c..3dc9f67 100644
61328 .maxtype = IFLA_HSR_MAX,
61329 .policy = hsr_policy,
61330 diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
61331 -index 20c49c7..94377ab 100644
61332 +index 737c87a..33f9fec 100644
61333 --- a/net/ieee802154/6lowpan/core.c
61334 +++ b/net/ieee802154/6lowpan/core.c
61335 -@@ -184,7 +184,7 @@ static void lowpan_dellink(struct net_device *ldev, struct list_head *head)
61336 +@@ -182,7 +182,7 @@ static void lowpan_dellink(struct net_device *ldev, struct list_head *head)
61337 dev_put(wdev);
61338 }
61339
61340 @@ -125628,7 +150743,7 @@ index 20c49c7..94377ab 100644
61341 .priv_size = LOWPAN_PRIV_SIZE(sizeof(struct lowpan_dev_info)),
61342 .setup = lowpan_setup,
61343 diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
61344 -index 6b437e8..47c6566 100644
61345 +index 30d875d..760f4f1 100644
61346 --- a/net/ieee802154/6lowpan/reassembly.c
61347 +++ b/net/ieee802154/6lowpan/reassembly.c
61348 @@ -492,14 +492,13 @@ static struct ctl_table lowpan_frags_ctl_table[] = {
61349 @@ -125671,18 +150786,6 @@ index 6b437e8..47c6566 100644
61350 err_alloc:
61351 return -ENOMEM;
61352 }
61353 -diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
61354 -index 416dfa0..6e41f17 100644
61355 ---- a/net/ipv4/Kconfig
61356 -+++ b/net/ipv4/Kconfig
61357 -@@ -353,6 +353,7 @@ config INET_ESP
61358 - select CRYPTO_CBC
61359 - select CRYPTO_SHA1
61360 - select CRYPTO_DES
61361 -+ select CRYPTO_ECHAINIV
61362 - ---help---
61363 - Support for IPsec ESP.
61364 -
61365 diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
61366 index 5c5db66..c10a4a2 100644
61367 --- a/net/ipv4/af_inet.c
61368 @@ -125857,10 +150960,10 @@ index 6414891..30ec9bf 100644
61369 newicsk->icsk_retransmits = 0;
61370 newicsk->icsk_backoff = 0;
61371 diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
61372 -index ab9f8a6..238aa59 100644
61373 +index 6029157..92bcf89 100644
61374 --- a/net/ipv4/inet_diag.c
61375 +++ b/net/ipv4/inet_diag.c
61376 -@@ -962,7 +962,7 @@ static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh)
61377 +@@ -985,7 +985,7 @@ static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh)
61378 return -EINVAL;
61379 }
61380 {
61381 @@ -125869,7 +150972,7 @@ index ab9f8a6..238aa59 100644
61382 .dump = inet_diag_dump_compat,
61383 };
61384 return netlink_dump_start(net->diag_nlsk, skb, nlh, &c);
61385 -@@ -992,7 +992,7 @@ static int inet_diag_handler_dump(struct sk_buff *skb, struct nlmsghdr *h)
61386 +@@ -1016,7 +1016,7 @@ static int inet_diag_handler_cmd(struct sk_buff *skb, struct nlmsghdr *h)
61387 return -EINVAL;
61388 }
61389 {
61390 @@ -125934,7 +151037,7 @@ index 86fa458..5f601b9 100644
61391 p->rate_tokens = 0;
61392 /* 60*HZ is arbitrary, but chosen enough high so that the first
61393 diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
61394 -index b8a0607d..0ef8880 100644
61395 +index 187c6fc..f4a802c 100644
61396 --- a/net/ipv4/ip_fragment.c
61397 +++ b/net/ipv4/ip_fragment.c
61398 @@ -284,7 +284,7 @@ static int ip_frag_too_far(struct ipq *qp)
61399 @@ -125985,10 +151088,10 @@ index b8a0607d..0ef8880 100644
61400 return -ENOMEM;
61401 }
61402 diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
61403 -index 6145214..77ebc63 100644
61404 +index 41ba68d..599331a 100644
61405 --- a/net/ipv4/ip_gre.c
61406 +++ b/net/ipv4/ip_gre.c
61407 -@@ -117,7 +117,7 @@ static bool log_ecn_error = true;
61408 +@@ -116,7 +116,7 @@ static bool log_ecn_error = true;
61409 module_param(log_ecn_error, bool, 0644);
61410 MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
61411
61412 @@ -125997,7 +151100,7 @@ index 6145214..77ebc63 100644
61413 static int ipgre_tunnel_init(struct net_device *dev);
61414
61415 static int ipgre_net_id __read_mostly;
61416 -@@ -1190,7 +1190,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
61417 +@@ -1189,7 +1189,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
61418 [IFLA_GRE_COLLECT_METADATA] = { .type = NLA_FLAG },
61419 };
61420
61421 @@ -126006,7 +151109,7 @@ index 6145214..77ebc63 100644
61422 .kind = "gre",
61423 .maxtype = IFLA_GRE_MAX,
61424 .policy = ipgre_policy,
61425 -@@ -1205,7 +1205,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
61426 +@@ -1204,7 +1204,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
61427 .get_link_net = ip_tunnel_get_link_net,
61428 };
61429
61430 @@ -126016,7 +151119,7 @@ index 6145214..77ebc63 100644
61431 .maxtype = IFLA_GRE_MAX,
61432 .policy = ipgre_policy,
61433 diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
61434 -index b1209b6..c2f63ba 100644
61435 +index d77eb0c..4482235 100644
61436 --- a/net/ipv4/ip_input.c
61437 +++ b/net/ipv4/ip_input.c
61438 @@ -148,6 +148,10 @@
61439 @@ -126064,10 +151167,10 @@ index a501242..ea6b81d 100644
61440 msg.msg_flags = flags;
61441
61442 diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
61443 -index 4d8f0b6..a2c583b 100644
61444 +index 5cf10b7..2e40e55 100644
61445 --- a/net/ipv4/ip_vti.c
61446 +++ b/net/ipv4/ip_vti.c
61447 -@@ -45,7 +45,7 @@
61448 +@@ -44,7 +44,7 @@
61449 #include <net/net_namespace.h>
61450 #include <net/netns/generic.h>
61451
61452 @@ -126076,7 +151179,7 @@ index 4d8f0b6..a2c583b 100644
61453
61454 static int vti_net_id __read_mostly;
61455 static int vti_tunnel_init(struct net_device *dev);
61456 -@@ -525,7 +525,7 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = {
61457 +@@ -524,7 +524,7 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = {
61458 [IFLA_VTI_REMOTE] = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
61459 };
61460
61461 @@ -126086,10 +151189,10 @@ index 4d8f0b6..a2c583b 100644
61462 .maxtype = IFLA_VTI_MAX,
61463 .policy = vti_policy,
61464 diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
61465 -index 0bc7412..9bf43d2 100644
61466 +index 2ed9dd2..0682cfe 100644
61467 --- a/net/ipv4/ipconfig.c
61468 +++ b/net/ipv4/ipconfig.c
61469 -@@ -337,7 +337,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
61470 +@@ -332,7 +332,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
61471
61472 mm_segment_t oldfs = get_fs();
61473 set_fs(get_ds());
61474 @@ -126098,7 +151201,7 @@ index 0bc7412..9bf43d2 100644
61475 set_fs(oldfs);
61476 return res;
61477 }
61478 -@@ -348,7 +348,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
61479 +@@ -343,7 +343,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
61480
61481 mm_segment_t oldfs = get_fs();
61482 set_fs(get_ds());
61483 @@ -126107,7 +151210,7 @@ index 0bc7412..9bf43d2 100644
61484 set_fs(oldfs);
61485 return res;
61486 }
61487 -@@ -359,7 +359,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
61488 +@@ -354,7 +354,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
61489
61490 mm_segment_t oldfs = get_fs();
61491 set_fs(get_ds());
61492 @@ -126117,10 +151220,10 @@ index 0bc7412..9bf43d2 100644
61493 return res;
61494 }
61495 diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
61496 -index a09fb0d..24e19b2 100644
61497 +index 4044da6..7e21175 100644
61498 --- a/net/ipv4/ipip.c
61499 +++ b/net/ipv4/ipip.c
61500 -@@ -124,7 +124,7 @@ MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
61501 +@@ -123,7 +123,7 @@ MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
61502 static int ipip_net_id __read_mostly;
61503
61504 static int ipip_tunnel_init(struct net_device *dev);
61505 @@ -126129,7 +151232,7 @@ index a09fb0d..24e19b2 100644
61506
61507 static int ipip_err(struct sk_buff *skb, u32 info)
61508 {
61509 -@@ -485,7 +485,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
61510 +@@ -484,7 +484,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
61511 [IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
61512 };
61513
61514 @@ -126139,7 +151242,7 @@ index a09fb0d..24e19b2 100644
61515 .maxtype = IFLA_IPTUN_MAX,
61516 .policy = ipip_policy,
61517 diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
61518 -index 11dccba..db794f4 100644
61519 +index b488cac..7955324 100644
61520 --- a/net/ipv4/netfilter/arp_tables.c
61521 +++ b/net/ipv4/netfilter/arp_tables.c
61522 @@ -359,11 +359,12 @@ unsigned int arpt_do_table(struct sk_buff *skb,
61523 @@ -126540,7 +151643,7 @@ index 4a9e6db..06174e1 100644
61524 pr_err("Unable to proc dir entry\n");
61525 return -ENOMEM;
61526 diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
61527 -index aa67e0e..3c65672 100644
61528 +index d3a2716..884331c 100644
61529 --- a/net/ipv4/ping.c
61530 +++ b/net/ipv4/ping.c
61531 @@ -59,7 +59,7 @@ struct ping_table {
61532 @@ -126592,7 +151695,7 @@ index aa67e0e..3c65672 100644
61533 else if (skb->protocol == htons(ETH_P_IP) && isk->cmsg_flags)
61534 ip_cmsg_recv(msg, skb);
61535 #endif
61536 -@@ -1119,7 +1119,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
61537 +@@ -1121,7 +1121,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
61538 from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
61539 0, sock_i_ino(sp),
61540 atomic_read(&sp->sk_refcnt), sp,
61541 @@ -126820,10 +151923,10 @@ index 02c6229..68cc2a6 100644
61542 ip_tstamps = kcalloc(IP_IDENTS_SZ, sizeof(*ip_tstamps), GFP_KERNEL);
61543 if (!ip_tstamps)
61544 diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
61545 -index a0bd7a5..79fdbb9 100644
61546 +index 4d367b4..84f04b1 100644
61547 --- a/net/ipv4/sysctl_net_ipv4.c
61548 +++ b/net/ipv4/sysctl_net_ipv4.c
61549 -@@ -67,7 +67,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
61550 +@@ -66,7 +66,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
61551 container_of(table->data, struct net, ipv4.ip_local_ports.range);
61552 int ret;
61553 int range[2];
61554 @@ -126832,7 +151935,7 @@ index a0bd7a5..79fdbb9 100644
61555 .data = &range,
61556 .maxlen = sizeof(range),
61557 .mode = table->mode,
61558 -@@ -125,7 +125,7 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write,
61559 +@@ -124,7 +124,7 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write,
61560 int ret;
61561 gid_t urange[2];
61562 kgid_t low, high;
61563 @@ -126841,7 +151944,7 @@ index a0bd7a5..79fdbb9 100644
61564 .data = &urange,
61565 .maxlen = sizeof(urange),
61566 .mode = table->mode,
61567 -@@ -156,7 +156,7 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
61568 +@@ -155,7 +155,7 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
61569 void __user *buffer, size_t *lenp, loff_t *ppos)
61570 {
61571 char val[TCP_CA_NAME_MAX];
61572 @@ -126850,7 +151953,7 @@ index a0bd7a5..79fdbb9 100644
61573 .data = val,
61574 .maxlen = TCP_CA_NAME_MAX,
61575 };
61576 -@@ -175,7 +175,7 @@ static int proc_tcp_available_congestion_control(struct ctl_table *ctl,
61577 +@@ -174,7 +174,7 @@ static int proc_tcp_available_congestion_control(struct ctl_table *ctl,
61578 void __user *buffer, size_t *lenp,
61579 loff_t *ppos)
61580 {
61581 @@ -126859,7 +151962,7 @@ index a0bd7a5..79fdbb9 100644
61582 int ret;
61583
61584 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
61585 -@@ -192,7 +192,7 @@ static int proc_allowed_congestion_control(struct ctl_table *ctl,
61586 +@@ -191,7 +191,7 @@ static int proc_allowed_congestion_control(struct ctl_table *ctl,
61587 void __user *buffer, size_t *lenp,
61588 loff_t *ppos)
61589 {
61590 @@ -126868,7 +151971,7 @@ index a0bd7a5..79fdbb9 100644
61591 int ret;
61592
61593 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
61594 -@@ -211,7 +211,7 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write,
61595 +@@ -210,7 +210,7 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write,
61596 void __user *buffer, size_t *lenp,
61597 loff_t *ppos)
61598 {
61599 @@ -126877,7 +151980,7 @@ index a0bd7a5..79fdbb9 100644
61600 struct tcp_fastopen_context *ctxt;
61601 int ret;
61602 u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */
61603 -@@ -955,13 +955,12 @@ static struct ctl_table ipv4_net_table[] = {
61604 +@@ -965,13 +965,12 @@ static struct ctl_table ipv4_net_table[] = {
61605
61606 static __net_init int ipv4_sysctl_init_net(struct net *net)
61607 {
61608 @@ -126893,7 +151996,7 @@ index a0bd7a5..79fdbb9 100644
61609 if (!table)
61610 goto err_alloc;
61611
61612 -@@ -970,7 +969,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
61613 +@@ -980,7 +979,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
61614 table[i].data += (void *)net - (void *)&init_net;
61615 }
61616
61617 @@ -126906,7 +152009,7 @@ index a0bd7a5..79fdbb9 100644
61618 goto err_reg;
61619
61620 diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
61621 -index d4c5115..f949b08 100644
61622 +index 3b2c8e9..601c090 100644
61623 --- a/net/ipv4/tcp_input.c
61624 +++ b/net/ipv4/tcp_input.c
61625 @@ -266,11 +266,13 @@ static void tcp_ecn_rcv_synack(struct tcp_sock *tp, const struct tcphdr *th)
61626 @@ -126932,7 +152035,7 @@ index d4c5115..f949b08 100644
61627 sk->sk_max_pacing_rate);
61628 }
61629
61630 -@@ -4674,7 +4676,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
61631 +@@ -4675,7 +4677,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
61632 * simplifies code)
61633 */
61634 static void
61635 @@ -126941,7 +152044,7 @@ index d4c5115..f949b08 100644
61636 struct sk_buff *head, struct sk_buff *tail,
61637 u32 start, u32 end)
61638 {
61639 -@@ -5669,6 +5671,7 @@ discard:
61640 +@@ -5670,6 +5672,7 @@ discard:
61641 tcp_paws_reject(&tp->rx_opt, 0))
61642 goto discard_and_undo;
61643
61644 @@ -126949,7 +152052,7 @@ index d4c5115..f949b08 100644
61645 if (th->syn) {
61646 /* We see SYN without ACK. It is attempt of
61647 * simultaneous connect with crossed SYNs.
61648 -@@ -5720,6 +5723,7 @@ discard:
61649 +@@ -5721,6 +5724,7 @@ discard:
61650 goto discard;
61651 #endif
61652 }
61653 @@ -126957,7 +152060,7 @@ index d4c5115..f949b08 100644
61654 /* "fifth, if neither of the SYN or RST bits is set then
61655 * drop the segment and return."
61656 */
61657 -@@ -5765,7 +5769,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
61658 +@@ -5766,7 +5770,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
61659 goto discard;
61660
61661 if (th->syn) {
61662 @@ -126966,7 +152069,7 @@ index d4c5115..f949b08 100644
61663 goto discard;
61664 if (icsk->icsk_af_ops->conn_request(sk, skb) < 0)
61665 return 1;
61666 -@@ -6097,7 +6101,7 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
61667 +@@ -6098,7 +6102,7 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
61668
61669 kmemcheck_annotate_bitfield(ireq, flags);
61670 ireq->opt = NULL;
61671 @@ -126976,10 +152079,10 @@ index d4c5115..f949b08 100644
61672 write_pnet(&ireq->ireq_net, sock_net(sk_listener));
61673 ireq->ireq_family = sk_listener->sk_family;
61674 diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
61675 -index 048418b..bb14e83 100644
61676 +index a7b1a90..9f6c261 100644
61677 --- a/net/ipv4/tcp_ipv4.c
61678 +++ b/net/ipv4/tcp_ipv4.c
61679 -@@ -89,6 +89,10 @@ int sysctl_tcp_tw_reuse __read_mostly;
61680 +@@ -88,6 +88,10 @@ int sysctl_tcp_tw_reuse __read_mostly;
61681 int sysctl_tcp_low_latency __read_mostly;
61682 EXPORT_SYMBOL(sysctl_tcp_low_latency);
61683
61684 @@ -126990,7 +152093,7 @@ index 048418b..bb14e83 100644
61685 #ifdef CONFIG_TCP_MD5SIG
61686 static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key,
61687 __be32 daddr, __be32 saddr, const struct tcphdr *th);
61688 -@@ -1418,6 +1422,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
61689 +@@ -1421,6 +1425,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
61690 return 0;
61691
61692 reset:
61693 @@ -127000,7 +152103,7 @@ index 048418b..bb14e83 100644
61694 tcp_v4_send_reset(rsk, skb);
61695 discard:
61696 kfree_skb(skb);
61697 -@@ -1583,12 +1590,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
61698 +@@ -1586,12 +1593,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
61699
61700 lookup:
61701 sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
61702 @@ -127023,7 +152126,7 @@ index 048418b..bb14e83 100644
61703
61704 if (sk->sk_state == TCP_NEW_SYN_RECV) {
61705 struct request_sock *req = inet_reqsk(sk);
61706 -@@ -1673,6 +1687,10 @@ csum_error:
61707 +@@ -1676,6 +1690,10 @@ csum_error:
61708 bad_packet:
61709 TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
61710 } else {
61711 @@ -127035,7 +152138,7 @@ index 048418b..bb14e83 100644
61712 }
61713
61714 diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
61715 -index 9475a27..8bc7bde 100644
61716 +index 9b02af2..5b73e16 100644
61717 --- a/net/ipv4/tcp_minisocks.c
61718 +++ b/net/ipv4/tcp_minisocks.c
61719 @@ -27,6 +27,10 @@
61720 @@ -127049,7 +152152,7 @@ index 9475a27..8bc7bde 100644
61721 int sysctl_tcp_syncookies __read_mostly = 1;
61722 EXPORT_SYMBOL(sysctl_tcp_syncookies);
61723
61724 -@@ -787,7 +791,10 @@ embryonic_reset:
61725 +@@ -784,7 +788,10 @@ embryonic_reset:
61726 * avoid becoming vulnerable to outside attack aiming at
61727 * resetting legit local connections.
61728 */
61729 @@ -127075,7 +152178,7 @@ index ebf5ff5..4d1ff32 100644
61730 cnt += width;
61731 }
61732 diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
61733 -index 193ba1f..aeda727 100644
61734 +index a4730a2..1a92c3a 100644
61735 --- a/net/ipv4/tcp_timer.c
61736 +++ b/net/ipv4/tcp_timer.c
61737 @@ -22,6 +22,10 @@
61738 @@ -127088,8 +152191,8 @@ index 193ba1f..aeda727 100644
61739 +
61740 int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES;
61741 int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES;
61742 - int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME;
61743 -@@ -207,6 +211,13 @@ static int tcp_write_timeout(struct sock *sk)
61744 + int sysctl_tcp_retries1 __read_mostly = TCP_RETR1;
61745 +@@ -204,6 +208,13 @@ static int tcp_write_timeout(struct sock *sk)
61746 }
61747 }
61748
61749 @@ -127104,7 +152207,7 @@ index 193ba1f..aeda727 100644
61750 syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {
61751 /* Has it gone just too far? */
61752 diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
61753 -index 21fbb54..45345d8 100644
61754 +index eb8933b..21e9109 100644
61755 --- a/net/ipv4/udp.c
61756 +++ b/net/ipv4/udp.c
61757 @@ -87,6 +87,7 @@
61758 @@ -127115,9 +152218,9 @@ index 21fbb54..45345d8 100644
61759 #include <linux/socket.h>
61760 #include <linux/sockios.h>
61761 #include <linux/igmp.h>
61762 -@@ -114,6 +115,10 @@
61763 - #include <net/busy_poll.h>
61764 +@@ -115,6 +116,10 @@
61765 #include "udp_impl.h"
61766 + #include <net/sock_reuseport.h>
61767
61768 +#ifdef CONFIG_GRKERNSEC_BLACKHOLE
61769 +extern int grsec_enable_blackhole;
61770 @@ -127126,7 +152229,7 @@ index 21fbb54..45345d8 100644
61771 struct udp_table udp_table __read_mostly;
61772 EXPORT_SYMBOL(udp_table);
61773
61774 -@@ -611,6 +616,9 @@ static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
61775 +@@ -691,6 +696,9 @@ static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
61776 return true;
61777 }
61778
61779 @@ -127136,7 +152239,7 @@ index 21fbb54..45345d8 100644
61780 /*
61781 * This routine is called by the ICMP module when it gets some
61782 * sort of error condition. If err < 0 then the socket should
61783 -@@ -947,9 +955,18 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
61784 +@@ -1029,9 +1037,18 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
61785 dport = usin->sin_port;
61786 if (dport == 0)
61787 return -EINVAL;
61788 @@ -127155,7 +152258,7 @@ index 21fbb54..45345d8 100644
61789 daddr = inet->inet_daddr;
61790 dport = inet->inet_dport;
61791 /* Open fast path for connected socket.
61792 -@@ -1206,7 +1223,7 @@ static unsigned int first_packet_length(struct sock *sk)
61793 +@@ -1288,7 +1305,7 @@ static unsigned int first_packet_length(struct sock *sk)
61794 IS_UDPLITE(sk));
61795 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
61796 IS_UDPLITE(sk));
61797 @@ -127164,7 +152267,7 @@ index 21fbb54..45345d8 100644
61798 __skb_unlink(skb, rcvq);
61799 __skb_queue_tail(&list_kill, skb);
61800 }
61801 -@@ -1286,6 +1303,10 @@ try_again:
61802 +@@ -1369,6 +1386,10 @@ try_again:
61803 if (!skb)
61804 goto out;
61805
61806 @@ -127175,7 +152278,7 @@ index 21fbb54..45345d8 100644
61807 ulen = skb->len - sizeof(struct udphdr);
61808 copied = len;
61809 if (copied > ulen)
61810 -@@ -1318,7 +1339,7 @@ try_again:
61811 +@@ -1402,7 +1423,7 @@ try_again:
61812 if (unlikely(err)) {
61813 trace_kfree_skb(skb, udp_recvmsg);
61814 if (!peeked) {
61815 @@ -127184,7 +152287,7 @@ index 21fbb54..45345d8 100644
61816 UDP_INC_STATS_USER(sock_net(sk),
61817 UDP_MIB_INERRORS, is_udplite);
61818 }
61819 -@@ -1612,7 +1633,7 @@ csum_error:
61820 +@@ -1704,7 +1725,7 @@ csum_error:
61821 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
61822 drop:
61823 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
61824 @@ -127193,7 +152296,7 @@ index 21fbb54..45345d8 100644
61825 kfree_skb(skb);
61826 return -1;
61827 }
61828 -@@ -1630,7 +1651,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
61829 +@@ -1722,7 +1743,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
61830 skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
61831
61832 if (!skb1) {
61833 @@ -127202,7 +152305,7 @@ index 21fbb54..45345d8 100644
61834 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
61835 IS_UDPLITE(sk));
61836 UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
61837 -@@ -1836,6 +1857,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
61838 +@@ -1928,6 +1949,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
61839 goto csum_error;
61840
61841 UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
61842 @@ -127212,7 +152315,7 @@ index 21fbb54..45345d8 100644
61843 icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
61844
61845 /*
61846 -@@ -2444,7 +2468,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
61847 +@@ -2536,7 +2560,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
61848 from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
61849 0, sock_i_ino(sp),
61850 atomic_read(&sp->sk_refcnt), sp,
61851 @@ -127309,20 +152412,8 @@ index 542074c..648df74 100644
61852 memset(XFRM_MODE_SKB_CB(skb)->flow_lbl, 0,
61853 sizeof(XFRM_MODE_SKB_CB(skb)->flow_lbl));
61854
61855 -diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
61856 -index 983bb99..ebc39e1 100644
61857 ---- a/net/ipv6/Kconfig
61858 -+++ b/net/ipv6/Kconfig
61859 -@@ -69,6 +69,7 @@ config INET6_ESP
61860 - select CRYPTO_CBC
61861 - select CRYPTO_SHA1
61862 - select CRYPTO_DES
61863 -+ select CRYPTO_ECHAINIV
61864 - ---help---
61865 - Support for IPsec ESP.
61866 -
61867 diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
61868 -index e8d3da0..c1ab725 100644
61869 +index bdd7eac..5a18ee4 100644
61870 --- a/net/ipv6/addrconf.c
61871 +++ b/net/ipv6/addrconf.c
61872 @@ -179,7 +179,7 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
61873 @@ -127352,7 +152443,7 @@ index e8d3da0..c1ab725 100644
61874 net->dev_base_seq;
61875 hlist_for_each_entry_rcu(dev, head, index_hlist) {
61876 if (idx < s_idx)
61877 -@@ -2584,7 +2584,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
61878 +@@ -2589,7 +2589,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
61879 p.iph.ihl = 5;
61880 p.iph.protocol = IPPROTO_IPV6;
61881 p.iph.ttl = 64;
61882 @@ -127361,7 +152452,7 @@ index e8d3da0..c1ab725 100644
61883
61884 if (ops->ndo_do_ioctl) {
61885 mm_segment_t oldfs = get_fs();
61886 -@@ -3867,16 +3867,23 @@ static const struct file_operations if6_fops = {
61887 +@@ -3899,16 +3899,23 @@ static const struct file_operations if6_fops = {
61888 .release = seq_release_net,
61889 };
61890
61891 @@ -127386,7 +152477,7 @@ index e8d3da0..c1ab725 100644
61892 }
61893
61894 static struct pernet_operations if6_proc_net_ops = {
61895 -@@ -4495,7 +4502,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
61896 +@@ -4527,7 +4534,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
61897 s_ip_idx = ip_idx = cb->args[2];
61898
61899 rcu_read_lock();
61900 @@ -127395,7 +152486,7 @@ index e8d3da0..c1ab725 100644
61901 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
61902 idx = 0;
61903 head = &net->dev_index_head[h];
61904 -@@ -4705,7 +4712,7 @@ static inline size_t inet6_if_nlmsg_size(void)
61905 +@@ -4737,7 +4744,7 @@ static inline size_t inet6_if_nlmsg_size(void)
61906 + nla_total_size(inet6_ifla6_size()); /* IFLA_PROTINFO */
61907 }
61908
61909 @@ -127404,7 +152495,7 @@ index e8d3da0..c1ab725 100644
61910 int items, int bytes)
61911 {
61912 int i;
61913 -@@ -4715,7 +4722,7 @@ static inline void __snmp6_fill_statsdev(u64 *stats, atomic_long_t *mib,
61914 +@@ -4747,7 +4754,7 @@ static inline void __snmp6_fill_statsdev(u64 *stats, atomic_long_t *mib,
61915 /* Use put_unaligned() because stats may not be aligned for u64. */
61916 put_unaligned(items, &stats[0]);
61917 for (i = 1; i < items; i++)
61918 @@ -127413,7 +152504,7 @@ index e8d3da0..c1ab725 100644
61919
61920 memset(&stats[items], 0, pad);
61921 }
61922 -@@ -5169,7 +5176,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
61923 +@@ -5202,7 +5209,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
61924 rt_genid_bump_ipv6(net);
61925 break;
61926 }
61927 @@ -127422,7 +152513,7 @@ index e8d3da0..c1ab725 100644
61928 }
61929
61930 static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
61931 -@@ -5189,7 +5196,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
61932 +@@ -5222,7 +5229,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
61933 int *valp = ctl->data;
61934 int val = *valp;
61935 loff_t pos = *ppos;
61936 @@ -127431,7 +152522,16 @@ index e8d3da0..c1ab725 100644
61937 int ret;
61938
61939 /*
61940 -@@ -5214,7 +5221,7 @@ int addrconf_sysctl_mtu(struct ctl_table *ctl, int write,
61941 +@@ -5245,7 +5252,7 @@ static
61942 + int addrconf_sysctl_hop_limit(struct ctl_table *ctl, int write,
61943 + void __user *buffer, size_t *lenp, loff_t *ppos)
61944 + {
61945 +- struct ctl_table lctl;
61946 ++ ctl_table_no_const lctl;
61947 + int min_hl = 1, max_hl = 255;
61948 +
61949 + lctl = *ctl;
61950 +@@ -5261,7 +5268,7 @@ int addrconf_sysctl_mtu(struct ctl_table *ctl, int write,
61951 {
61952 struct inet6_dev *idev = ctl->extra1;
61953 int min_mtu = IPV6_MIN_MTU;
61954 @@ -127440,7 +152540,7 @@ index e8d3da0..c1ab725 100644
61955
61956 lctl = *ctl;
61957 lctl.extra1 = &min_mtu;
61958 -@@ -5289,7 +5296,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
61959 +@@ -5336,7 +5343,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
61960 int *valp = ctl->data;
61961 int val = *valp;
61962 loff_t pos = *ppos;
61963 @@ -127449,7 +152549,7 @@ index e8d3da0..c1ab725 100644
61964 int ret;
61965
61966 /*
61967 -@@ -5354,7 +5361,7 @@ static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write,
61968 +@@ -5401,7 +5408,7 @@ static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write,
61969 int err;
61970 struct in6_addr addr;
61971 char str[IPV6_MAX_STRLEN];
61972 @@ -127458,7 +152558,7 @@ index e8d3da0..c1ab725 100644
61973 struct net *net = ctl->extra2;
61974 struct ipv6_stable_secret *secret = ctl->data;
61975
61976 -@@ -5423,7 +5430,7 @@ int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl,
61977 +@@ -5470,7 +5477,7 @@ int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl,
61978 int *valp = ctl->data;
61979 int val = *valp;
61980 loff_t pos = *ppos;
61981 @@ -127504,6 +152604,19 @@ index 0a37ddc..af81b1a 100644
61982
61983 table = kmemdup(ipv6_icmp_table_template,
61984 sizeof(ipv6_icmp_table_template),
61985 +diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
61986 +index 21ace5a..270fb64 100644
61987 +--- a/net/ipv6/inet6_hashtables.c
61988 ++++ b/net/ipv6/inet6_hashtables.c
61989 +@@ -192,7 +192,7 @@ struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
61990 + EXPORT_SYMBOL_GPL(inet6_lookup);
61991 +
61992 + static int __inet6_check_established(struct inet_timewait_death_row *death_row,
61993 +- struct sock *sk, const __u16 lport,
61994 ++ struct sock *sk, __u16 lport,
61995 + struct inet_timewait_sock **twp)
61996 + {
61997 + struct inet_hashinfo *hinfo = death_row->hashinfo;
61998 diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
61999 index 0c7e276..68d9b36 100644
62000 --- a/net/ipv6/ip6_fib.c
62001 @@ -127521,10 +152634,10 @@ index 0c7e276..68d9b36 100644
62002 return new;
62003 }
62004 diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
62005 -index 4650c68..5b6762e 100644
62006 +index c0d4dc1..96afdd9 100644
62007 --- a/net/ipv6/ip6_gre.c
62008 +++ b/net/ipv6/ip6_gre.c
62009 -@@ -71,8 +71,8 @@ struct ip6gre_net {
62010 +@@ -70,8 +70,8 @@ struct ip6gre_net {
62011 struct net_device *fb_tunnel_dev;
62012 };
62013
62014 @@ -127535,7 +152648,7 @@ index 4650c68..5b6762e 100644
62015 static int ip6gre_tunnel_init(struct net_device *dev);
62016 static void ip6gre_tunnel_setup(struct net_device *dev);
62017 static void ip6gre_tunnel_link(struct ip6gre_net *ign, struct ip6_tnl *t);
62018 -@@ -1304,7 +1304,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
62019 +@@ -1303,7 +1303,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
62020 }
62021
62022
62023 @@ -127834,10 +152947,10 @@ index 99425cf..cc99e7c 100644
62024
62025 case IP6T_SO_GET_ENTRIES:
62026 diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
62027 -index bab4441..233aa7a 100644
62028 +index e4347ae..c7654e7 100644
62029 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c
62030 +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
62031 -@@ -96,12 +96,11 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
62032 +@@ -95,12 +95,11 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
62033
62034 static int nf_ct_frag6_sysctl_register(struct net *net)
62035 {
62036 @@ -127852,7 +152965,7 @@ index bab4441..233aa7a 100644
62037 GFP_KERNEL);
62038 if (table == NULL)
62039 goto err_alloc;
62040 -@@ -112,9 +111,9 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
62041 +@@ -111,9 +110,9 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
62042 table[2].data = &net->nf_frag.frags.high_thresh;
62043 table[2].extra1 = &net->nf_frag.frags.low_thresh;
62044 table[2].extra2 = &init_net.nf_frag.frags.high_thresh;
62045 @@ -127865,7 +152978,7 @@ index bab4441..233aa7a 100644
62046 if (hdr == NULL)
62047 goto err_reg;
62048
62049 -@@ -122,8 +121,7 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
62050 +@@ -121,8 +120,7 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
62051 return 0;
62052
62053 err_reg:
62054 @@ -127993,7 +153106,7 @@ index 679253d0..d85dd97 100644
62055 goto proc_dev_snmp6_fail;
62056 return 0;
62057 diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
62058 -index 9914098..f3f8888 100644
62059 +index fa59dd7..d9d9c9d 100644
62060 --- a/net/ipv6/raw.c
62061 +++ b/net/ipv6/raw.c
62062 @@ -389,7 +389,7 @@ static inline int rawv6_rcv_skb(struct sock *sk, struct sk_buff *skb)
62063 @@ -128068,7 +153181,7 @@ index 9914098..f3f8888 100644
62064 return 0;
62065 default:
62066 diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
62067 -index 45f5ae5..1c57cbe 100644
62068 +index 18f3498..74cbfc9 100644
62069 --- a/net/ipv6/reassembly.c
62070 +++ b/net/ipv6/reassembly.c
62071 @@ -630,12 +630,11 @@ static struct ctl_table ip6_frags_ctl_table[] = {
62072 @@ -128110,10 +153223,10 @@ index 45f5ae5..1c57cbe 100644
62073 return -ENOMEM;
62074 }
62075 diff --git a/net/ipv6/route.c b/net/ipv6/route.c
62076 -index 3f164d3..cd507d9 100644
62077 +index ed44663..fa4d1d9 100644
62078 --- a/net/ipv6/route.c
62079 +++ b/net/ipv6/route.c
62080 -@@ -3503,7 +3503,7 @@ struct ctl_table ipv6_route_table_template[] = {
62081 +@@ -3523,7 +3523,7 @@ struct ctl_table ipv6_route_table_template[] = {
62082
62083 struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net)
62084 {
62085 @@ -128123,7 +153236,7 @@ index 3f164d3..cd507d9 100644
62086 table = kmemdup(ipv6_route_table_template,
62087 sizeof(ipv6_route_table_template),
62088 diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
62089 -index dcccae8..33152e7 100644
62090 +index 2066d1c..190a677 100644
62091 --- a/net/ipv6/sit.c
62092 +++ b/net/ipv6/sit.c
62093 @@ -74,7 +74,7 @@ static void ipip6_tunnel_setup(struct net_device *dev);
62094 @@ -128135,7 +153248,7 @@ index dcccae8..33152e7 100644
62095
62096 static int sit_net_id __read_mostly;
62097 struct sit_net {
62098 -@@ -1735,7 +1735,7 @@ static void ipip6_dellink(struct net_device *dev, struct list_head *head)
62099 +@@ -1732,7 +1732,7 @@ static void ipip6_dellink(struct net_device *dev, struct list_head *head)
62100 unregister_netdevice_queue(dev, head);
62101 }
62102
62103 @@ -128158,10 +153271,10 @@ index 45243bb..cdb398e 100644
62104 struct ctl_table *ipv6_icmp_table;
62105 int err;
62106 diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
62107 -index b8d4056..9509e20 100644
62108 +index 5c8c842..e67c742 100644
62109 --- a/net/ipv6/tcp_ipv6.c
62110 +++ b/net/ipv6/tcp_ipv6.c
62111 -@@ -102,6 +102,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
62112 +@@ -101,6 +101,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
62113 }
62114 }
62115
62116 @@ -128172,7 +153285,7 @@ index b8d4056..9509e20 100644
62117 static __u32 tcp_v6_init_sequence(const struct sk_buff *skb)
62118 {
62119 return secure_tcpv6_sequence_number(ipv6_hdr(skb)->daddr.s6_addr32,
62120 -@@ -1269,6 +1273,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
62121 +@@ -1268,6 +1272,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
62122 return 0;
62123
62124 reset:
62125 @@ -128182,7 +153295,7 @@ index b8d4056..9509e20 100644
62126 tcp_v6_send_reset(sk, skb);
62127 discard:
62128 if (opt_skb)
62129 -@@ -1379,12 +1386,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
62130 +@@ -1378,12 +1385,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
62131 lookup:
62132 sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest,
62133 inet6_iif(skb));
62134 @@ -128205,7 +153318,7 @@ index b8d4056..9509e20 100644
62135
62136 if (sk->sk_state == TCP_NEW_SYN_RECV) {
62137 struct request_sock *req = inet_reqsk(sk);
62138 -@@ -1472,6 +1487,10 @@ csum_error:
62139 +@@ -1471,6 +1486,10 @@ csum_error:
62140 bad_packet:
62141 TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
62142 } else {
62143 @@ -128217,10 +153330,10 @@ index b8d4056..9509e20 100644
62144 }
62145
62146 diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
62147 -index 6665e1a..e84ef29 100644
62148 +index 6794120..21d5fae 100644
62149 --- a/net/ipv6/udp.c
62150 +++ b/net/ipv6/udp.c
62151 -@@ -76,6 +76,10 @@ static u32 udp6_ehashfn(const struct net *net,
62152 +@@ -77,6 +77,10 @@ static u32 udp6_ehashfn(const struct net *net,
62153 udp_ipv6_hash_secret + net_hash_mix(net));
62154 }
62155
62156 @@ -128228,10 +153341,10 @@ index 6665e1a..e84ef29 100644
62157 +extern int grsec_enable_blackhole;
62158 +#endif
62159 +
62160 - int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
62161 - {
62162 - const struct in6_addr *sk2_rcv_saddr6 = inet6_rcv_saddr(sk2);
62163 -@@ -448,7 +452,7 @@ try_again:
62164 + /* match_wildcard == true: IPV6_ADDR_ANY equals to any IPv6 addresses if IPv6
62165 + * only, and any IPv4 addresses if not IPv6 only
62166 + * match_wildcard == false: addresses must be exactly the same, i.e.
62167 +@@ -494,7 +498,7 @@ try_again:
62168 if (unlikely(err)) {
62169 trace_kfree_skb(skb, udpv6_recvmsg);
62170 if (!peeked) {
62171 @@ -128240,7 +153353,7 @@ index 6665e1a..e84ef29 100644
62172 if (is_udp4)
62173 UDP_INC_STATS_USER(sock_net(sk),
62174 UDP_MIB_INERRORS,
62175 -@@ -712,7 +716,7 @@ csum_error:
62176 +@@ -758,7 +762,7 @@ csum_error:
62177 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
62178 drop:
62179 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
62180 @@ -128249,7 +153362,7 @@ index 6665e1a..e84ef29 100644
62181 kfree_skb(skb);
62182 return -1;
62183 }
62184 -@@ -753,7 +757,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
62185 +@@ -799,7 +803,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
62186 if (likely(!skb1))
62187 skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
62188 if (!skb1) {
62189 @@ -128258,7 +153371,7 @@ index 6665e1a..e84ef29 100644
62190 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
62191 IS_UDPLITE(sk));
62192 UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
62193 -@@ -935,6 +939,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
62194 +@@ -981,6 +985,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
62195 goto csum_error;
62196
62197 UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
62198 @@ -128347,11 +153460,98 @@ index c1d247e..9e5949d 100644
62199
62200 if (!ipx_proc_dir)
62201 goto out;
62202 +diff --git a/net/irda/discovery.c b/net/irda/discovery.c
62203 +index 364d70a..c503f3f 100644
62204 +--- a/net/irda/discovery.c
62205 ++++ b/net/irda/discovery.c
62206 +@@ -136,7 +136,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
62207 + }
62208 +
62209 + /* Delete the now empty log */
62210 +- hashbin_delete(log, (FREE_FUNC) kfree);
62211 ++ hashbin_delete(log, irlmp_kfree);
62212 + }
62213 +
62214 + /*
62215 +diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
62216 +index 3af2195..a38e804 100644
62217 +--- a/net/irda/ircomm/ircomm_core.c
62218 ++++ b/net/irda/ircomm/ircomm_core.c
62219 +@@ -46,7 +46,7 @@
62220 + #include <net/irda/ircomm_param.h>
62221 + #include <net/irda/ircomm_core.h>
62222 +
62223 +-static int __ircomm_close(struct ircomm_cb *self);
62224 ++static void __ircomm_close(void *_self);
62225 + static void ircomm_control_indication(struct ircomm_cb *self,
62226 + struct sk_buff *skb, int clen);
62227 +
62228 +@@ -91,7 +91,7 @@ static int __init ircomm_init(void)
62229 +
62230 + static void __exit ircomm_cleanup(void)
62231 + {
62232 +- hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
62233 ++ hashbin_delete(ircomm, __ircomm_close);
62234 +
62235 + #ifdef CONFIG_PROC_FS
62236 + remove_proc_entry("ircomm", proc_irda);
62237 +@@ -151,8 +151,10 @@ EXPORT_SYMBOL(ircomm_open);
62238 + * Remove IrCOMM instance
62239 + *
62240 + */
62241 +-static int __ircomm_close(struct ircomm_cb *self)
62242 ++static void __ircomm_close(void *_self)
62243 + {
62244 ++ struct ircomm_cb *self = _self;
62245 ++
62246 + /* Disconnect link if any */
62247 + ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
62248 +
62249 +@@ -170,8 +172,6 @@ static int __ircomm_close(struct ircomm_cb *self)
62250 + self->magic = 0;
62251 +
62252 + kfree(self);
62253 +-
62254 +- return 0;
62255 + }
62256 +
62257 + /*
62258 +@@ -191,7 +191,8 @@ int ircomm_close(struct ircomm_cb *self)
62259 +
62260 + IRDA_ASSERT(entry == self, return -1;);
62261 +
62262 +- return __ircomm_close(self);
62263 ++ __ircomm_close(self);
62264 ++ return 0;
62265 + }
62266 +
62267 + EXPORT_SYMBOL(ircomm_close);
62268 diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
62269 -index a423770..a6e53a3 100644
62270 +index a423770..e995a21 100644
62271 --- a/net/irda/ircomm/ircomm_tty.c
62272 +++ b/net/irda/ircomm/ircomm_tty.c
62273 -@@ -310,10 +310,10 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
62274 +@@ -172,8 +172,10 @@ static int __init ircomm_tty_init(void)
62275 + return 0;
62276 + }
62277 +
62278 +-static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
62279 ++static void __exit __ircomm_tty_cleanup(void *_self)
62280 + {
62281 ++ struct ircomm_tty_cb *self = _self;
62282 ++
62283 + IRDA_ASSERT(self != NULL, return;);
62284 + IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
62285 +
62286 +@@ -201,7 +203,7 @@ static void __exit ircomm_tty_cleanup(void)
62287 + return;
62288 + }
62289 +
62290 +- hashbin_delete(ircomm_tty, (FREE_FUNC) __ircomm_tty_cleanup);
62291 ++ hashbin_delete(ircomm_tty, __ircomm_tty_cleanup);
62292 + put_tty_driver(driver);
62293 + }
62294 +
62295 +@@ -310,10 +312,10 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
62296 add_wait_queue(&port->open_wait, &wait);
62297
62298 pr_debug("%s(%d):block_til_ready before block on %s open_count=%d\n",
62299 @@ -128364,7 +153564,7 @@ index a423770..a6e53a3 100644
62300 port->blocked_open++;
62301 spin_unlock_irqrestore(&port->lock, flags);
62302
62303 -@@ -347,7 +347,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
62304 +@@ -347,7 +349,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
62305 }
62306
62307 pr_debug("%s(%d):block_til_ready blocking on %s open_count=%d\n",
62308 @@ -128373,7 +153573,7 @@ index a423770..a6e53a3 100644
62309
62310 schedule();
62311 }
62312 -@@ -357,12 +357,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
62313 +@@ -357,12 +359,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
62314
62315 spin_lock_irqsave(&port->lock, flags);
62316 if (!tty_hung_up_p(filp))
62317 @@ -128388,7 +153588,7 @@ index a423770..a6e53a3 100644
62318
62319 if (!retval)
62320 port->flags |= ASYNC_NORMAL_ACTIVE;
62321 -@@ -432,12 +432,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
62322 +@@ -432,12 +434,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
62323
62324 /* ++ is not atomic, so this should be protected - Jean II */
62325 spin_lock_irqsave(&self->port.lock, flags);
62326 @@ -128403,7 +153603,7 @@ index a423770..a6e53a3 100644
62327
62328 /* Not really used by us, but lets do it anyway */
62329 self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
62330 -@@ -932,7 +932,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
62331 +@@ -932,7 +934,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
62332 tty_kref_put(port->tty);
62333 }
62334 port->tty = NULL;
62335 @@ -128412,7 +153612,7 @@ index a423770..a6e53a3 100644
62336 spin_unlock_irqrestore(&port->lock, flags);
62337
62338 wake_up_interruptible(&port->open_wait);
62339 -@@ -1279,7 +1279,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
62340 +@@ -1279,7 +1281,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
62341 seq_putc(m, '\n');
62342
62343 seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
62344 @@ -128421,6 +153621,375 @@ index a423770..a6e53a3 100644
62345 seq_printf(m, "Max data size: %d\n", self->max_data_size);
62346 seq_printf(m, "Max header size: %d\n", self->max_header_size);
62347
62348 +diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
62349 +index 61137f8..465b9ea 100644
62350 +--- a/net/irda/ircomm/ircomm_tty_attach.c
62351 ++++ b/net/irda/ircomm/ircomm_tty_attach.c
62352 +@@ -52,7 +52,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
62353 + struct ias_value *value, void *priv);
62354 + static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self,
62355 + int timeout);
62356 +-static void ircomm_tty_watchdog_timer_expired(void *data);
62357 ++static void ircomm_tty_watchdog_timer_expired(unsigned long data);
62358 +
62359 + static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
62360 + IRCOMM_TTY_EVENT event,
62361 +@@ -597,7 +597,7 @@ static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self,
62362 + * Called when the connect procedure have taken to much time.
62363 + *
62364 + */
62365 +-static void ircomm_tty_watchdog_timer_expired(void *data)
62366 ++static void ircomm_tty_watchdog_timer_expired(unsigned long data)
62367 + {
62368 + struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
62369 +
62370 +diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
62371 +index 8567366..7c8aa51 100644
62372 +--- a/net/irda/irda_device.c
62373 ++++ b/net/irda/irda_device.c
62374 +@@ -52,12 +52,12 @@
62375 + #include <net/irda/timer.h>
62376 + #include <net/irda/wrapper.h>
62377 +
62378 +-static void __irda_task_delete(struct irda_task *task);
62379 ++static void __irda_task_delete(void *_task);
62380 +
62381 + static hashbin_t *dongles = NULL;
62382 + static hashbin_t *tasks = NULL;
62383 +
62384 +-static void irda_task_timer_expired(void *data);
62385 ++static void irda_task_timer_expired(unsigned long data);
62386 +
62387 + int __init irda_device_init( void)
62388 + {
62389 +@@ -90,7 +90,7 @@ static void leftover_dongle(void *arg)
62390 +
62391 + void irda_device_cleanup(void)
62392 + {
62393 +- hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
62394 ++ hashbin_delete(tasks, __irda_task_delete);
62395 +
62396 + hashbin_delete(dongles, leftover_dongle);
62397 + }
62398 +@@ -159,8 +159,10 @@ int irda_device_is_receiving(struct net_device *dev)
62399 + return req.ifr_receiving;
62400 + }
62401 +
62402 +-static void __irda_task_delete(struct irda_task *task)
62403 ++static void __irda_task_delete(void *_task)
62404 + {
62405 ++ struct irda_task *task = _task;
62406 ++
62407 + del_timer(&task->timer);
62408 +
62409 + kfree(task);
62410 +@@ -249,11 +251,11 @@ static int irda_task_kick(struct irda_task *task)
62411 + * Task time has expired. We now try to execute task (again), and restart
62412 + * the timer if the task has not finished yet
62413 + */
62414 +-static void irda_task_timer_expired(void *data)
62415 ++static void irda_task_timer_expired(unsigned long data)
62416 + {
62417 + struct irda_task *task;
62418 +
62419 +- task = data;
62420 ++ task = (struct irda_task *)data;
62421 +
62422 + irda_task_kick(task);
62423 + }
62424 +diff --git a/net/irda/iriap.c b/net/irda/iriap.c
62425 +index 4a7ae32a..bfe8e78 100644
62426 +--- a/net/irda/iriap.c
62427 ++++ b/net/irda/iriap.c
62428 +@@ -61,7 +61,7 @@ static const char *const ias_charset_types[] __maybe_unused = {
62429 + static hashbin_t *iriap = NULL;
62430 + static void *service_handle;
62431 +
62432 +-static void __iriap_close(struct iriap_cb *self);
62433 ++static void __iriap_close(void *_self);
62434 + static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode);
62435 + static void iriap_disconnect_indication(void *instance, void *sap,
62436 + LM_REASON reason, struct sk_buff *skb);
62437 +@@ -76,7 +76,7 @@ static void iriap_connect_confirm(void *instance, void *sap,
62438 + static int iriap_data_indication(void *instance, void *sap,
62439 + struct sk_buff *skb);
62440 +
62441 +-static void iriap_watchdog_timer_expired(void *data);
62442 ++static void iriap_watchdog_timer_expired(unsigned long data);
62443 +
62444 + static inline void iriap_start_watchdog_timer(struct iriap_cb *self,
62445 + int timeout)
62446 +@@ -161,8 +161,8 @@ void iriap_cleanup(void)
62447 + {
62448 + irlmp_unregister_service(service_handle);
62449 +
62450 +- hashbin_delete(iriap, (FREE_FUNC) __iriap_close);
62451 +- hashbin_delete(irias_objects, (FREE_FUNC) __irias_delete_object);
62452 ++ hashbin_delete(iriap, __iriap_close);
62453 ++ hashbin_delete(irias_objects, __irias_delete_object);
62454 + }
62455 +
62456 + /*
62457 +@@ -215,8 +215,10 @@ EXPORT_SYMBOL(iriap_open);
62458 + * Removes (deallocates) the IrIAP instance
62459 + *
62460 + */
62461 +-static void __iriap_close(struct iriap_cb *self)
62462 ++static void __iriap_close(void *_self)
62463 + {
62464 ++ struct iriap_cb *self = _self;
62465 ++
62466 + IRDA_ASSERT(self != NULL, return;);
62467 + IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
62468 +
62469 +@@ -942,7 +944,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
62470 + * Query has taken too long time, so abort
62471 + *
62472 + */
62473 +-static void iriap_watchdog_timer_expired(void *data)
62474 ++static void iriap_watchdog_timer_expired(unsigned long data)
62475 + {
62476 + struct iriap_cb *self = (struct iriap_cb *) data;
62477 +
62478 +diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
62479 +index 53b86d0..5b884f3 100644
62480 +--- a/net/irda/irias_object.c
62481 ++++ b/net/irda/irias_object.c
62482 +@@ -88,8 +88,10 @@ EXPORT_SYMBOL(irias_new_object);
62483 + * Delete given attribute and deallocate all its memory
62484 + *
62485 + */
62486 +-static void __irias_delete_attrib(struct ias_attrib *attrib)
62487 ++static void __irias_delete_attrib(void *_attrib)
62488 + {
62489 ++ struct ias_attrib *attrib = _attrib;
62490 ++
62491 + IRDA_ASSERT(attrib != NULL, return;);
62492 + IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;);
62493 +
62494 +@@ -101,14 +103,16 @@ static void __irias_delete_attrib(struct ias_attrib *attrib)
62495 + kfree(attrib);
62496 + }
62497 +
62498 +-void __irias_delete_object(struct ias_object *obj)
62499 ++void __irias_delete_object(void *_obj)
62500 + {
62501 ++ struct ias_object *obj = _obj;
62502 ++
62503 + IRDA_ASSERT(obj != NULL, return;);
62504 + IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;);
62505 +
62506 + kfree(obj->name);
62507 +
62508 +- hashbin_delete(obj->attribs, (FREE_FUNC) __irias_delete_attrib);
62509 ++ hashbin_delete(obj->attribs, __irias_delete_attrib);
62510 +
62511 + obj->magic = ~IAS_OBJECT_MAGIC;
62512 +
62513 +diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
62514 +index c5837a4..518b358 100644
62515 +--- a/net/irda/irlan/irlan_client.c
62516 ++++ b/net/irda/irlan/irlan_client.c
62517 +@@ -68,7 +68,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
62518 + char *value, int val_len);
62519 + static void irlan_client_open_ctrl_tsap(struct irlan_cb *self);
62520 +
62521 +-static void irlan_client_kick_timer_expired(void *data)
62522 ++static void irlan_client_kick_timer_expired(unsigned long data)
62523 + {
62524 + struct irlan_cb *self = (struct irlan_cb *) data;
62525 +
62526 +diff --git a/net/irda/irlap.c b/net/irda/irlap.c
62527 +index 1cde711..d05a5fb 100644
62528 +--- a/net/irda/irlap.c
62529 ++++ b/net/irda/irlap.c
62530 +@@ -56,7 +56,7 @@ int sysctl_slot_timeout = SLOT_TIMEOUT * 1000 / HZ;
62531 + int sysctl_warn_noreply_time = 3;
62532 +
62533 + extern void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb);
62534 +-static void __irlap_close(struct irlap_cb *self);
62535 ++static void __irlap_close(void *_self);
62536 + static void irlap_init_qos_capabilities(struct irlap_cb *self,
62537 + struct qos_info *qos_user);
62538 +
62539 +@@ -95,7 +95,7 @@ void irlap_cleanup(void)
62540 + {
62541 + IRDA_ASSERT(irlap != NULL, return;);
62542 +
62543 +- hashbin_delete(irlap, (FREE_FUNC) __irlap_close);
62544 ++ hashbin_delete(irlap, __irlap_close);
62545 + }
62546 +
62547 + /*
62548 +@@ -177,8 +177,10 @@ EXPORT_SYMBOL(irlap_open);
62549 + * Remove IrLAP and all allocated memory. Stop any pending timers.
62550 + *
62551 + */
62552 +-static void __irlap_close(struct irlap_cb *self)
62553 ++static void __irlap_close(void *_self)
62554 + {
62555 ++ struct irlap_cb *self = _self;
62556 ++
62557 + IRDA_ASSERT(self != NULL, return;);
62558 + IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
62559 +
62560 +@@ -482,6 +484,11 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
62561 + * Start one single discovery operation.
62562 + *
62563 + */
62564 ++static void irlap_kfree(void *arg)
62565 ++{
62566 ++ kfree(arg);
62567 ++}
62568 ++
62569 + void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
62570 + {
62571 + struct irlap_info info;
62572 +@@ -513,7 +520,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
62573 + /* Check if last discovery request finished in time, or if
62574 + * it was aborted due to the media busy flag. */
62575 + if (self->discovery_log != NULL) {
62576 +- hashbin_delete(self->discovery_log, (FREE_FUNC) kfree);
62577 ++ hashbin_delete(self->discovery_log, irlap_kfree);
62578 + self->discovery_log = NULL;
62579 + }
62580 +
62581 +diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
62582 +index 0e1b4d7..7e39b12 100644
62583 +--- a/net/irda/irlap_event.c
62584 ++++ b/net/irda/irlap_event.c
62585 +@@ -163,7 +163,7 @@ static int (*state[])(struct irlap_cb *self, IRLAP_EVENT event,
62586 + * Poll timer has expired. Normally we must now send a RR frame to the
62587 + * remote device
62588 + */
62589 +-static void irlap_poll_timer_expired(void *data)
62590 ++static void irlap_poll_timer_expired(unsigned long data)
62591 + {
62592 + struct irlap_cb *self = (struct irlap_cb *) data;
62593 +
62594 +diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
62595 +index 4396459..cbf44c2 100644
62596 +--- a/net/irda/irlmp.c
62597 ++++ b/net/irda/irlmp.c
62598 +@@ -125,6 +125,11 @@ int __init irlmp_init(void)
62599 + * Remove IrLMP layer
62600 + *
62601 + */
62602 ++void irlmp_kfree(void *arg)
62603 ++{
62604 ++ kfree(arg);
62605 ++}
62606 ++
62607 + void irlmp_cleanup(void)
62608 + {
62609 + /* Check for main structure */
62610 +@@ -133,11 +138,11 @@ void irlmp_cleanup(void)
62611 +
62612 + del_timer(&irlmp->discovery_timer);
62613 +
62614 +- hashbin_delete(irlmp->links, (FREE_FUNC) kfree);
62615 +- hashbin_delete(irlmp->unconnected_lsaps, (FREE_FUNC) kfree);
62616 +- hashbin_delete(irlmp->clients, (FREE_FUNC) kfree);
62617 +- hashbin_delete(irlmp->services, (FREE_FUNC) kfree);
62618 +- hashbin_delete(irlmp->cachelog, (FREE_FUNC) kfree);
62619 ++ hashbin_delete(irlmp->links, irlmp_kfree);
62620 ++ hashbin_delete(irlmp->unconnected_lsaps, irlmp_kfree);
62621 ++ hashbin_delete(irlmp->clients, irlmp_kfree);
62622 ++ hashbin_delete(irlmp->services, irlmp_kfree);
62623 ++ hashbin_delete(irlmp->cachelog, irlmp_kfree);
62624 +
62625 + /* De-allocate main structure */
62626 + kfree(irlmp);
62627 +@@ -204,8 +209,10 @@ EXPORT_SYMBOL(irlmp_open_lsap);
62628 + *
62629 + * Remove an instance of LSAP
62630 + */
62631 +-static void __irlmp_close_lsap(struct lsap_cb *self)
62632 ++static void __irlmp_close_lsap(void *_self)
62633 + {
62634 ++ struct lsap_cb *self = _self;
62635 ++
62636 + IRDA_ASSERT(self != NULL, return;);
62637 + IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
62638 +
62639 +@@ -354,7 +361,7 @@ void irlmp_unregister_link(__u32 saddr)
62640 + /* Final cleanup */
62641 + del_timer(&link->idle_timer);
62642 + link->magic = 0;
62643 +- hashbin_delete(link->lsaps, (FREE_FUNC) __irlmp_close_lsap);
62644 ++ hashbin_delete(link->lsaps, __irlmp_close_lsap);
62645 + kfree(link);
62646 + }
62647 + }
62648 +diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
62649 +index e306cf2..e6e0e90 100644
62650 +--- a/net/irda/irlmp_event.c
62651 ++++ b/net/irda/irlmp_event.c
62652 +@@ -165,7 +165,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
62653 + (*lap_state[self->lap_state]) (self, event, skb);
62654 + }
62655 +
62656 +-void irlmp_discovery_timer_expired(void *data)
62657 ++void irlmp_discovery_timer_expired(unsigned long data)
62658 + {
62659 + /* We always cleanup the log (active & passive discovery) */
62660 + irlmp_do_expiry();
62661 +@@ -176,7 +176,7 @@ void irlmp_discovery_timer_expired(void *data)
62662 + irlmp_start_discovery_timer(irlmp, sysctl_discovery_timeout * HZ);
62663 + }
62664 +
62665 +-void irlmp_watchdog_timer_expired(void *data)
62666 ++void irlmp_watchdog_timer_expired(unsigned long data)
62667 + {
62668 + struct lsap_cb *self = (struct lsap_cb *) data;
62669 +
62670 +@@ -186,7 +186,7 @@ void irlmp_watchdog_timer_expired(void *data)
62671 + irlmp_do_lsap_event(self, LM_WATCHDOG_TIMEOUT, NULL);
62672 + }
62673 +
62674 +-void irlmp_idle_timer_expired(void *data)
62675 ++void irlmp_idle_timer_expired(unsigned long data)
62676 + {
62677 + struct lap_cb *self = (struct lap_cb *) data;
62678 +
62679 +diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
62680 +index 8d65bb9..677364b 100644
62681 +--- a/net/irda/irnet/irnet.h
62682 ++++ b/net/irda/irnet/irnet.h
62683 +@@ -511,7 +511,7 @@ typedef struct irnet_ctrl_channel
62684 + /* -------------------------- IRDA PART -------------------------- */
62685 + int irda_irnet_create(irnet_socket *); /* Initialise an IrNET socket */
62686 + int irda_irnet_connect(irnet_socket *); /* Try to connect over IrDA */
62687 +-void irda_irnet_destroy(irnet_socket *); /* Teardown an IrNET socket */
62688 ++void irda_irnet_destroy(void *); /* Teardown an IrNET socket */
62689 + int irda_irnet_init(void); /* Initialise IrDA part of IrNET */
62690 + void irda_irnet_cleanup(void); /* Teardown IrDA part of IrNET */
62691 +
62692 +diff --git a/net/irda/irnet/irnet_irda.c b/net/irda/irnet/irnet_irda.c
62693 +index 7f17a80..98575e1 100644
62694 +--- a/net/irda/irnet/irnet_irda.c
62695 ++++ b/net/irda/irnet/irnet_irda.c
62696 +@@ -613,8 +613,10 @@ irda_irnet_connect(irnet_socket * self)
62697 + * Note : this need to be called from a process context.
62698 + */
62699 + void
62700 +-irda_irnet_destroy(irnet_socket * self)
62701 ++irda_irnet_destroy(void *_self)
62702 + {
62703 ++ irnet_socket *self = _self;
62704 ++
62705 + DENTER(IRDA_SOCK_TRACE, "(self=0x%p)\n", self);
62706 + if(self == NULL)
62707 + return;
62708 +@@ -1879,7 +1881,7 @@ irda_irnet_cleanup(void)
62709 + irnet_destroy_server();
62710 +
62711 + /* Remove all instances of IrNET socket still present */
62712 +- hashbin_delete(irnet_server.list, (FREE_FUNC) irda_irnet_destroy);
62713 ++ hashbin_delete(irnet_server.list, irda_irnet_destroy);
62714 +
62715 + DEXIT(MODULE_TRACE, "\n");
62716 + }
62717 diff --git a/net/irda/irproc.c b/net/irda/irproc.c
62718 index b9ac598..f88cc56 100644
62719 --- a/net/irda/irproc.c
62720 @@ -128434,8 +154003,119 @@ index b9ac598..f88cc56 100644
62721 if (proc_irda == NULL)
62722 return;
62723
62724 +diff --git a/net/irda/irttp.c b/net/irda/irttp.c
62725 +index b6ab41d..e2263ce 100644
62726 +--- a/net/irda/irttp.c
62727 ++++ b/net/irda/irttp.c
62728 +@@ -42,7 +42,7 @@
62729 +
62730 + static struct irttp_cb *irttp;
62731 +
62732 +-static void __irttp_close_tsap(struct tsap_cb *self);
62733 ++static void __irttp_close_tsap(void *_self);
62734 +
62735 + static int irttp_data_indication(void *instance, void *sap,
62736 + struct sk_buff *skb);
62737 +@@ -121,7 +121,7 @@ void irttp_cleanup(void)
62738 + /*
62739 + * Delete hashbin and close all TSAP instances in it
62740 + */
62741 +- hashbin_delete(irttp->tsaps, (FREE_FUNC) __irttp_close_tsap);
62742 ++ hashbin_delete(irttp->tsaps, __irttp_close_tsap);
62743 +
62744 + irttp->magic = 0;
62745 +
62746 +@@ -469,8 +469,10 @@ EXPORT_SYMBOL(irttp_open_tsap);
62747 + * deallocation of the TSAP, and resetting of the TSAPs values;
62748 + *
62749 + */
62750 +-static void __irttp_close_tsap(struct tsap_cb *self)
62751 ++static void __irttp_close_tsap(void *_self)
62752 + {
62753 ++ struct tsap_cb *self = _self;
62754 ++
62755 + /* First make sure we're connected. */
62756 + IRDA_ASSERT(self != NULL, return;);
62757 + IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
62758 +diff --git a/net/irda/timer.c b/net/irda/timer.c
62759 +index f2280f7..c0a006f 100644
62760 +--- a/net/irda/timer.c
62761 ++++ b/net/irda/timer.c
62762 +@@ -34,12 +34,12 @@
62763 +
62764 + extern int sysctl_slot_timeout;
62765 +
62766 +-static void irlap_slot_timer_expired(void* data);
62767 +-static void irlap_query_timer_expired(void* data);
62768 +-static void irlap_final_timer_expired(void* data);
62769 +-static void irlap_wd_timer_expired(void* data);
62770 +-static void irlap_backoff_timer_expired(void* data);
62771 +-static void irlap_media_busy_expired(void* data);
62772 ++static void irlap_slot_timer_expired(unsigned long data);
62773 ++static void irlap_query_timer_expired(unsigned long data);
62774 ++static void irlap_final_timer_expired(unsigned long data);
62775 ++static void irlap_wd_timer_expired(unsigned long data);
62776 ++static void irlap_backoff_timer_expired(unsigned long data);
62777 ++static void irlap_media_busy_expired(unsigned long data);
62778 +
62779 + void irlap_start_slot_timer(struct irlap_cb *self, int timeout)
62780 + {
62781 +@@ -138,7 +138,7 @@ void irlmp_stop_idle_timer(struct lap_cb *self)
62782 + * IrLAP slot timer has expired
62783 + *
62784 + */
62785 +-static void irlap_slot_timer_expired(void *data)
62786 ++static void irlap_slot_timer_expired(unsigned long data)
62787 + {
62788 + struct irlap_cb *self = (struct irlap_cb *) data;
62789 +
62790 +@@ -154,7 +154,7 @@ static void irlap_slot_timer_expired(void *data)
62791 + * IrLAP query timer has expired
62792 + *
62793 + */
62794 +-static void irlap_query_timer_expired(void *data)
62795 ++static void irlap_query_timer_expired(unsigned long data)
62796 + {
62797 + struct irlap_cb *self = (struct irlap_cb *) data;
62798 +
62799 +@@ -170,7 +170,7 @@ static void irlap_query_timer_expired(void *data)
62800 + *
62801 + *
62802 + */
62803 +-static void irlap_final_timer_expired(void *data)
62804 ++static void irlap_final_timer_expired(unsigned long data)
62805 + {
62806 + struct irlap_cb *self = (struct irlap_cb *) data;
62807 +
62808 +@@ -186,7 +186,7 @@ static void irlap_final_timer_expired(void *data)
62809 + *
62810 + *
62811 + */
62812 +-static void irlap_wd_timer_expired(void *data)
62813 ++static void irlap_wd_timer_expired(unsigned long data)
62814 + {
62815 + struct irlap_cb *self = (struct irlap_cb *) data;
62816 +
62817 +@@ -202,7 +202,7 @@ static void irlap_wd_timer_expired(void *data)
62818 + *
62819 + *
62820 + */
62821 +-static void irlap_backoff_timer_expired(void *data)
62822 ++static void irlap_backoff_timer_expired(unsigned long data)
62823 + {
62824 + struct irlap_cb *self = (struct irlap_cb *) data;
62825 +
62826 +@@ -218,7 +218,7 @@ static void irlap_backoff_timer_expired(void *data)
62827 + *
62828 + *
62829 + */
62830 +-static void irlap_media_busy_expired(void *data)
62831 ++static void irlap_media_busy_expired(unsigned long data)
62832 + {
62833 + struct irlap_cb *self = (struct irlap_cb *) data;
62834 +
62835 diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
62836 -index 20ab7b2..1b7d8bb 100644
62837 +index fc3598a..03a184e 100644
62838 --- a/net/iucv/af_iucv.c
62839 +++ b/net/iucv/af_iucv.c
62840 @@ -685,10 +685,10 @@ static void __iucv_auto_name(struct iucv_sock *iucv)
62841 @@ -128482,7 +154162,7 @@ index f9c9ecb..060751e 100644
62842 return res;
62843 }
62844 diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
62845 -index e253c26..609e848 100644
62846 +index e253c26..eec4c65 100644
62847 --- a/net/l2tp/l2tp_eth.c
62848 +++ b/net/l2tp/l2tp_eth.c
62849 @@ -42,12 +42,12 @@ struct l2tp_eth {
62850 @@ -128504,6 +154184,15 @@ index e253c26..609e848 100644
62851 };
62852
62853 /* via l2tp_session_priv() */
62854 +@@ -90,7 +90,7 @@ static void l2tp_eth_dev_uninit(struct net_device *dev)
62855 + dev_put(dev);
62856 + }
62857 +
62858 +-static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
62859 ++static netdev_tx_t l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
62860 + {
62861 + struct l2tp_eth *priv = netdev_priv(dev);
62862 + struct l2tp_session *session = priv->session;
62863 @@ -98,10 +98,10 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
62864 int ret = l2tp_xmit_skb(session, skb, session->hdr_len);
62865
62866 @@ -128597,7 +154286,7 @@ index 1a3c7e0..80f8b0c 100644
62867 goto out;
62868
62869 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
62870 -index c12f348..adb3b48 100644
62871 +index 166a29f..b9bec4b 100644
62872 --- a/net/mac80211/cfg.c
62873 +++ b/net/mac80211/cfg.c
62874 @@ -378,7 +378,7 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev,
62875 @@ -128618,7 +154307,7 @@ index c12f348..adb3b48 100644
62876 local->_oper_chandef = *chandef;
62877 ieee80211_hw_config(local, 0);
62878 }
62879 -@@ -3513,7 +3513,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
62880 +@@ -3035,7 +3035,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
62881 sdata->vif.probe_req_reg--;
62882 }
62883
62884 @@ -128627,7 +154316,7 @@ index c12f348..adb3b48 100644
62885 break;
62886
62887 if (sdata->vif.probe_req_reg == 1)
62888 -@@ -3669,8 +3669,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
62889 +@@ -3190,8 +3190,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
62890 if (chanctx_conf) {
62891 *chandef = sdata->vif.bss_conf.chandef;
62892 ret = 0;
62893 @@ -128638,6 +154327,19 @@ index c12f348..adb3b48 100644
62894 sdata->vif.type == NL80211_IFTYPE_MONITOR) {
62895 if (local->use_chanctx)
62896 *chandef = local->monitor_chandef;
62897 +diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
62898 +index 3e24d0d..be640c0 100644
62899 +--- a/net/mac80211/debugfs.c
62900 ++++ b/net/mac80211/debugfs.c
62901 +@@ -91,7 +91,7 @@ static const struct file_operations reset_ops = {
62902 + };
62903 + #endif
62904 +
62905 +-static const char *hw_flag_names[] = {
62906 ++static const char * const hw_flag_names[] = {
62907 + #define FLAG(F) [IEEE80211_HW_##F] = #F
62908 + FLAG(HAS_RATE_CONTROL),
62909 + FLAG(RX_INCLUDES_FCS),
62910 diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
62911 index 7961e7d..eea148f 100644
62912 --- a/net/mac80211/debugfs_key.c
62913 @@ -128661,7 +154363,7 @@ index 7961e7d..eea148f 100644
62914 (u8)(pn >> 40), (u8)(pn >> 32), (u8)(pn >> 24),
62915 (u8)(pn >> 16), (u8)(pn >> 8), (u8)pn);
62916 diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
62917 -index 6837a46..f8aaf7d 100644
62918 +index f006f4a..884f09e 100644
62919 --- a/net/mac80211/ieee80211_i.h
62920 +++ b/net/mac80211/ieee80211_i.h
62921 @@ -30,6 +30,7 @@
62922 @@ -128672,7 +154374,7 @@ index 6837a46..f8aaf7d 100644
62923 #include "key.h"
62924 #include "sta_info.h"
62925 #include "debug.h"
62926 -@@ -1111,7 +1112,7 @@ struct ieee80211_local {
62927 +@@ -1107,7 +1108,7 @@ struct ieee80211_local {
62928 /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
62929 spinlock_t queue_stop_reason_lock;
62930
62931 @@ -128769,10 +154471,10 @@ index 7a2b791..3297152 100644
62932 mutex_lock(&local->iflist_mtx);
62933 list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
62934 diff --git a/net/mac80211/key.c b/net/mac80211/key.c
62935 -index 44388d6..a052880 100644
62936 +index 5e5bc59..e033047 100644
62937 --- a/net/mac80211/key.c
62938 +++ b/net/mac80211/key.c
62939 -@@ -914,7 +914,7 @@ void ieee80211_get_key_tx_seq(struct ieee80211_key_conf *keyconf,
62940 +@@ -962,7 +962,7 @@ void ieee80211_get_key_tx_seq(struct ieee80211_key_conf *keyconf,
62941 case WLAN_CIPHER_SUITE_GCMP_256:
62942 BUILD_BUG_ON(offsetof(typeof(*seq), ccmp) !=
62943 offsetof(typeof(*seq), gcmp));
62944 @@ -128781,7 +154483,7 @@ index 44388d6..a052880 100644
62945 seq->ccmp.pn[5] = pn64;
62946 seq->ccmp.pn[4] = pn64 >> 8;
62947 seq->ccmp.pn[3] = pn64 >> 16;
62948 -@@ -1014,7 +1014,7 @@ void ieee80211_set_key_tx_seq(struct ieee80211_key_conf *keyconf,
62949 +@@ -1062,7 +1062,7 @@ void ieee80211_set_key_tx_seq(struct ieee80211_key_conf *keyconf,
62950 ((u64)seq->ccmp.pn[2] << 24) |
62951 ((u64)seq->ccmp.pn[1] << 32) |
62952 ((u64)seq->ccmp.pn[0] << 40);
62953 @@ -128791,7 +154493,7 @@ index 44388d6..a052880 100644
62954 default:
62955 WARN_ON(1);
62956 diff --git a/net/mac80211/main.c b/net/mac80211/main.c
62957 -index 175ffcf..2212fd2 100644
62958 +index 8190bf27..a428476 100644
62959 --- a/net/mac80211/main.c
62960 +++ b/net/mac80211/main.c
62961 @@ -170,7 +170,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
62962 @@ -128839,10 +154541,10 @@ index a4e2f4e..02bfac1 100644
62963
62964 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
62965 diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
62966 -index 67066d0..9d015cc 100644
62967 +index 23ed038..cd63e86 100644
62968 --- a/net/mac80211/sta_info.c
62969 +++ b/net/mac80211/sta_info.c
62970 -@@ -348,7 +348,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
62971 +@@ -349,7 +349,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
62972 int size = sizeof(struct txq_info) +
62973 ALIGN(hw->txq_data_size, sizeof(void *));
62974
62975 @@ -128852,7 +154554,7 @@ index 67066d0..9d015cc 100644
62976 goto free;
62977
62978 diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
62979 -index bdc224d..11c229f 100644
62980 +index 3311ce0..2b1323c 100644
62981 --- a/net/mac80211/tx.c
62982 +++ b/net/mac80211/tx.c
62983 @@ -2825,7 +2825,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
62984 @@ -128865,10 +154567,10 @@ index bdc224d..11c229f 100644
62985 crypto_hdr[1] = pn >> 8;
62986 crypto_hdr[4] = pn >> 16;
62987 diff --git a/net/mac80211/util.c b/net/mac80211/util.c
62988 -index 33344f5..2e15b8f 100644
62989 +index 58f58bd..8d39508 100644
62990 --- a/net/mac80211/util.c
62991 +++ b/net/mac80211/util.c
62992 -@@ -1758,7 +1758,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
62993 +@@ -1761,7 +1761,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
62994 bool suspended = local->suspended;
62995
62996 /* nothing to do if HW shouldn't run */
62997 @@ -128877,16 +154579,16 @@ index 33344f5..2e15b8f 100644
62998 goto wake_up;
62999
63000 #ifdef CONFIG_PM
63001 -@@ -2051,7 +2051,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
63002 - local->in_reconfig = false;
63003 - barrier();
63004 +@@ -2064,7 +2064,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
63005 + mutex_unlock(&local->mtx);
63006 + }
63007
63008 - if (local->monitors == local->open_count && local->monitors > 0)
63009 + if (local->monitors == local_read(&local->open_count) && local->monitors > 0)
63010 ieee80211_add_virtual_monitor(local);
63011
63012 /*
63013 -@@ -2085,7 +2085,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
63014 +@@ -2098,7 +2098,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
63015 * If this is for hw restart things are still running.
63016 * We may want to change that later, however.
63017 */
63018 @@ -128895,7 +154597,7 @@ index 33344f5..2e15b8f 100644
63019 drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART);
63020
63021 if (!suspended)
63022 -@@ -2099,7 +2099,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
63023 +@@ -2112,7 +2112,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
63024
63025 ieee80211_flush_completed_scan(local, false);
63026
63027 @@ -128985,10 +154687,10 @@ index 7079cd3..c299f08 100644
63028 /* defaults per 802.15.4-2011 */
63029 wpan_dev->min_be = 3;
63030 diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
63031 -index 881bc20..a01db58 100644
63032 +index 0b80a71..8b0a639 100644
63033 --- a/net/mpls/af_mpls.c
63034 +++ b/net/mpls/af_mpls.c
63035 -@@ -831,7 +831,7 @@ static int mpls_dev_sysctl_register(struct net_device *dev,
63036 +@@ -871,7 +871,7 @@ static int mpls_dev_sysctl_register(struct net_device *dev,
63037 struct mpls_dev *mdev)
63038 {
63039 char path[sizeof("net/mpls/conf/") + IFNAMSIZ];
63040 @@ -128997,7 +154699,25 @@ index 881bc20..a01db58 100644
63041 int i;
63042
63043 table = kmemdup(&mpls_dev_table, sizeof(mpls_dev_table), GFP_KERNEL);
63044 -@@ -1492,7 +1492,7 @@ static int mpls_platform_labels(struct ctl_table *table, int write,
63045 +@@ -954,7 +954,7 @@ static void mpls_ifdown(struct net_device *dev, int event)
63046 + /* fall through */
63047 + case NETDEV_CHANGE:
63048 + nh->nh_flags |= RTNH_F_LINKDOWN;
63049 +- ACCESS_ONCE(rt->rt_nhn_alive) = rt->rt_nhn_alive - 1;
63050 ++ ACCESS_ONCE_RW(rt->rt_nhn_alive) = rt->rt_nhn_alive - 1;
63051 + break;
63052 + }
63053 + if (event == NETDEV_UNREGISTER)
63054 +@@ -995,7 +995,7 @@ static void mpls_ifup(struct net_device *dev, unsigned int nh_flags)
63055 + nh->nh_flags &= ~nh_flags;
63056 + } endfor_nexthops(rt);
63057 +
63058 +- ACCESS_ONCE(rt->rt_nhn_alive) = alive;
63059 ++ ACCESS_ONCE_RW(rt->rt_nhn_alive) = alive;
63060 + }
63061 +
63062 + return;
63063 +@@ -1621,7 +1621,7 @@ static int mpls_platform_labels(struct ctl_table *table, int write,
63064 struct net *net = table->data;
63065 int platform_labels = net->mpls.platform_labels;
63066 int ret;
63067 @@ -129006,7 +154726,7 @@ index 881bc20..a01db58 100644
63068 .procname = table->procname,
63069 .data = &platform_labels,
63070 .maxlen = sizeof(int),
63071 -@@ -1522,7 +1522,7 @@ static const struct ctl_table mpls_table[] = {
63072 +@@ -1651,7 +1651,7 @@ static const struct ctl_table mpls_table[] = {
63073
63074 static int mpls_net_init(struct net *net)
63075 {
63076 @@ -129016,10 +154736,10 @@ index 881bc20..a01db58 100644
63077 net->mpls.platform_labels = 0;
63078 net->mpls.platform_label = NULL;
63079 diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
63080 -index 4692782..24f2db1 100644
63081 +index 95e757c..30e3a16 100644
63082 --- a/net/netfilter/Kconfig
63083 +++ b/net/netfilter/Kconfig
63084 -@@ -1128,6 +1128,16 @@ config NETFILTER_XT_MATCH_ESP
63085 +@@ -1150,6 +1150,16 @@ config NETFILTER_XT_MATCH_ESP
63086
63087 To compile it as a module, choose M here. If unsure, say N.
63088
63089 @@ -129037,10 +154757,10 @@ index 4692782..24f2db1 100644
63090 tristate '"hashlimit" match support'
63091 depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n
63092 diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
63093 -index 7638c36..faf3ac2 100644
63094 +index 6913454..43686aa 100644
63095 --- a/net/netfilter/Makefile
63096 +++ b/net/netfilter/Makefile
63097 -@@ -138,6 +138,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
63098 +@@ -145,6 +145,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
63099 obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
63100 obj-$(CONFIG_NETFILTER_XT_MATCH_ECN) += xt_ecn.o
63101 obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
63102 @@ -129049,10 +154769,27 @@ index 7638c36..faf3ac2 100644
63103 obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
63104 obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
63105 diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
63106 -index 54f3d7c..fba57f5 100644
63107 +index 95db43f..ed368dc 100644
63108 --- a/net/netfilter/ipset/ip_set_core.c
63109 +++ b/net/netfilter/ipset/ip_set_core.c
63110 -@@ -1422,7 +1422,7 @@ ip_set_dump(struct sock *ctnl, struct sk_buff *skb,
63111 +@@ -324,7 +324,6 @@ ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr)
63112 + }
63113 + EXPORT_SYMBOL_GPL(ip_set_get_ipaddr6);
63114 +
63115 +-typedef void (*destroyer)(void *);
63116 + /* ipset data extension types, in size order */
63117 +
63118 + const struct ip_set_ext_type ip_set_extensions[] = {
63119 +@@ -350,7 +349,7 @@ const struct ip_set_ext_type ip_set_extensions[] = {
63120 + .flag = IPSET_FLAG_WITH_COMMENT,
63121 + .len = sizeof(struct ip_set_comment),
63122 + .align = __alignof__(struct ip_set_comment),
63123 +- .destroy = (destroyer) ip_set_comment_free,
63124 ++ .destroy = ip_set_comment_free,
63125 + },
63126 + };
63127 + EXPORT_SYMBOL_GPL(ip_set_extensions);
63128 +@@ -1414,7 +1413,7 @@ static int ip_set_dump(struct net *net, struct sock *ctnl, struct sk_buff *skb,
63129 return -IPSET_ERR_PROTOCOL;
63130
63131 {
63132 @@ -129061,7 +154798,7 @@ index 54f3d7c..fba57f5 100644
63133 .dump = ip_set_dump_start,
63134 .done = ip_set_dump_done,
63135 };
63136 -@@ -1997,7 +1997,7 @@ done:
63137 +@@ -1983,7 +1982,7 @@ done:
63138 return ret;
63139 }
63140
63141 @@ -129283,93 +155020,19 @@ index 45da11a..ef3e5dc 100644
63142 table = kmemdup(acct_sysctl_table, sizeof(acct_sysctl_table),
63143 GFP_KERNEL);
63144 diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
63145 -index 3cb3cb8..c9fcad80 100644
63146 +index f60b4fd..739155b 100644
63147 --- a/net/netfilter/nf_conntrack_core.c
63148 +++ b/net/netfilter/nf_conntrack_core.c
63149 -@@ -66,6 +66,21 @@ EXPORT_SYMBOL_GPL(nf_conntrack_locks);
63150 - __cacheline_aligned_in_smp DEFINE_SPINLOCK(nf_conntrack_expect_lock);
63151 - EXPORT_SYMBOL_GPL(nf_conntrack_expect_lock);
63152 +@@ -1581,7 +1581,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
63153 + }
63154 + EXPORT_SYMBOL_GPL(nf_ct_alloc_hashtable);
63155
63156 -+static __read_mostly spinlock_t nf_conntrack_locks_all_lock;
63157 -+static __read_mostly bool nf_conntrack_locks_all;
63158 -+
63159 -+void nf_conntrack_lock(spinlock_t *lock) __acquires(lock)
63160 -+{
63161 -+ spin_lock(lock);
63162 -+ while (unlikely(nf_conntrack_locks_all)) {
63163 -+ spin_unlock(lock);
63164 -+ spin_lock(&nf_conntrack_locks_all_lock);
63165 -+ spin_unlock(&nf_conntrack_locks_all_lock);
63166 -+ spin_lock(lock);
63167 -+ }
63168 -+}
63169 -+EXPORT_SYMBOL_GPL(nf_conntrack_lock);
63170 -+
63171 - static void nf_conntrack_double_unlock(unsigned int h1, unsigned int h2)
63172 +-int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
63173 ++int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp)
63174 {
63175 - h1 %= CONNTRACK_LOCKS;
63176 -@@ -82,12 +97,12 @@ static bool nf_conntrack_double_lock(struct net *net, unsigned int h1,
63177 - h1 %= CONNTRACK_LOCKS;
63178 - h2 %= CONNTRACK_LOCKS;
63179 - if (h1 <= h2) {
63180 -- spin_lock(&nf_conntrack_locks[h1]);
63181 -+ nf_conntrack_lock(&nf_conntrack_locks[h1]);
63182 - if (h1 != h2)
63183 - spin_lock_nested(&nf_conntrack_locks[h2],
63184 - SINGLE_DEPTH_NESTING);
63185 - } else {
63186 -- spin_lock(&nf_conntrack_locks[h2]);
63187 -+ nf_conntrack_lock(&nf_conntrack_locks[h2]);
63188 - spin_lock_nested(&nf_conntrack_locks[h1],
63189 - SINGLE_DEPTH_NESTING);
63190 - }
63191 -@@ -102,16 +117,19 @@ static void nf_conntrack_all_lock(void)
63192 - {
63193 - int i;
63194 -
63195 -- for (i = 0; i < CONNTRACK_LOCKS; i++)
63196 -- spin_lock_nested(&nf_conntrack_locks[i], i);
63197 --}
63198 -+ spin_lock(&nf_conntrack_locks_all_lock);
63199 -+ nf_conntrack_locks_all = true;
63200 -
63201 --static void nf_conntrack_all_unlock(void)
63202 --{
63203 -- int i;
63204 --
63205 -- for (i = 0; i < CONNTRACK_LOCKS; i++)
63206 -+ for (i = 0; i < CONNTRACK_LOCKS; i++) {
63207 -+ spin_lock(&nf_conntrack_locks[i]);
63208 - spin_unlock(&nf_conntrack_locks[i]);
63209 -+ }
63210 -+}
63211 -+
63212 -+static void nf_conntrack_all_unlock(void)
63213 -+{
63214 -+ nf_conntrack_locks_all = false;
63215 -+ spin_unlock(&nf_conntrack_locks_all_lock);
63216 - }
63217 -
63218 - unsigned int nf_conntrack_htable_size __read_mostly;
63219 -@@ -757,7 +775,7 @@ restart:
63220 - hash = hash_bucket(_hash, net);
63221 - for (; i < net->ct.htable_size; i++) {
63222 - lockp = &nf_conntrack_locks[hash % CONNTRACK_LOCKS];
63223 -- spin_lock(lockp);
63224 -+ nf_conntrack_lock(lockp);
63225 - if (read_seqcount_retry(&net->ct.generation, sequence)) {
63226 - spin_unlock(lockp);
63227 - goto restart;
63228 -@@ -1382,7 +1400,7 @@ get_next_corpse(struct net *net, int (*iter)(struct nf_conn *i, void *data),
63229 - for (; *bucket < net->ct.htable_size; (*bucket)++) {
63230 - lockp = &nf_conntrack_locks[*bucket % CONNTRACK_LOCKS];
63231 - local_bh_disable();
63232 -- spin_lock(lockp);
63233 -+ nf_conntrack_lock(lockp);
63234 - if (*bucket < net->ct.htable_size) {
63235 - hlist_nulls_for_each_entry(h, n, &net->ct.hash[*bucket], hnnode) {
63236 - if (NF_CT_DIRECTION(h) != IP_CT_DIR_ORIGINAL)
63237 -@@ -1755,6 +1773,10 @@ void nf_conntrack_init_end(void)
63238 + int i, bucket, rc;
63239 + unsigned int hashsize, old_size;
63240 +@@ -1778,6 +1778,10 @@ void nf_conntrack_init_end(void)
63241 #define DYING_NULLS_VAL ((1<<30)+1)
63242 #define TEMPLATE_NULLS_VAL ((1<<30)+2)
63243
63244 @@ -129380,7 +155043,7 @@ index 3cb3cb8..c9fcad80 100644
63245 int nf_conntrack_init_net(struct net *net)
63246 {
63247 int ret = -ENOMEM;
63248 -@@ -1779,7 +1801,11 @@ int nf_conntrack_init_net(struct net *net)
63249 +@@ -1802,7 +1806,11 @@ int nf_conntrack_init_net(struct net *net)
63250 if (!net->ct.stat)
63251 goto err_pcpu_lists;
63252
63253 @@ -129406,7 +155069,7 @@ index 4e78c57..ec8fb74 100644
63254 table = kmemdup(event_sysctl_table, sizeof(event_sysctl_table),
63255 GFP_KERNEL);
63256 diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
63257 -index bd9d315..fbd2fb7 100644
63258 +index 3b40ec5..fbd2fb7 100644
63259 --- a/net/netfilter/nf_conntrack_helper.c
63260 +++ b/net/netfilter/nf_conntrack_helper.c
63261 @@ -57,7 +57,7 @@ static struct ctl_table helper_sysctl_table[] = {
63262 @@ -129418,29 +155081,11 @@ index bd9d315..fbd2fb7 100644
63263
63264 table = kmemdup(helper_sysctl_table, sizeof(helper_sysctl_table),
63265 GFP_KERNEL);
63266 -@@ -425,7 +425,7 @@ static void __nf_conntrack_helper_unregister(struct nf_conntrack_helper *me,
63267 - }
63268 - local_bh_disable();
63269 - for (i = 0; i < net->ct.htable_size; i++) {
63270 -- spin_lock(&nf_conntrack_locks[i % CONNTRACK_LOCKS]);
63271 -+ nf_conntrack_lock(&nf_conntrack_locks[i % CONNTRACK_LOCKS]);
63272 - if (i < net->ct.htable_size) {
63273 - hlist_nulls_for_each_entry(h, nn, &net->ct.hash[i], hnnode)
63274 - unhelp(h, me);
63275 diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
63276 -index 9f52729..7e7a2c6 100644
63277 +index 355e855..4973252 100644
63278 --- a/net/netfilter/nf_conntrack_netlink.c
63279 +++ b/net/netfilter/nf_conntrack_netlink.c
63280 -@@ -840,7 +840,7 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
63281 - for (; cb->args[0] < net->ct.htable_size; cb->args[0]++) {
63282 - restart:
63283 - lockp = &nf_conntrack_locks[cb->args[0] % CONNTRACK_LOCKS];
63284 -- spin_lock(lockp);
63285 -+ nf_conntrack_lock(lockp);
63286 - if (cb->args[0] >= net->ct.htable_size) {
63287 - spin_unlock(lockp);
63288 - goto out;
63289 -@@ -1184,10 +1184,11 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
63290 +@@ -1182,10 +1182,11 @@ static int ctnetlink_get_conntrack(struct net *net, struct sock *ctnl,
63291 int err;
63292
63293 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63294 @@ -129453,7 +155098,7 @@ index 9f52729..7e7a2c6 100644
63295
63296 if (cda[CTA_MARK] && cda[CTA_MARK_MASK]) {
63297 struct ctnetlink_filter *filter;
63298 -@@ -1196,9 +1197,9 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
63299 +@@ -1194,9 +1195,9 @@ static int ctnetlink_get_conntrack(struct net *net, struct sock *ctnl,
63300 if (IS_ERR(filter))
63301 return PTR_ERR(filter);
63302
63303 @@ -129465,8 +155110,8 @@ index 9f52729..7e7a2c6 100644
63304 }
63305
63306 err = ctnetlink_parse_zone(cda[CTA_ZONE], &zone);
63307 -@@ -1336,7 +1337,7 @@ ctnetlink_get_ct_dying(struct sock *ctnl, struct sk_buff *skb,
63308 - const struct nlattr * const cda[])
63309 +@@ -1334,7 +1335,7 @@ static int ctnetlink_get_ct_dying(struct net *net, struct sock *ctnl,
63310 + const struct nlattr * const cda[])
63311 {
63312 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63313 - struct netlink_dump_control c = {
63314 @@ -129474,8 +155119,8 @@ index 9f52729..7e7a2c6 100644
63315 .dump = ctnetlink_dump_dying,
63316 .done = ctnetlink_done_list,
63317 };
63318 -@@ -1358,7 +1359,7 @@ ctnetlink_get_ct_unconfirmed(struct sock *ctnl, struct sk_buff *skb,
63319 - const struct nlattr * const cda[])
63320 +@@ -1356,7 +1357,7 @@ static int ctnetlink_get_ct_unconfirmed(struct net *net, struct sock *ctnl,
63321 + const struct nlattr * const cda[])
63322 {
63323 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63324 - struct netlink_dump_control c = {
63325 @@ -129483,8 +155128,8 @@ index 9f52729..7e7a2c6 100644
63326 .dump = ctnetlink_dump_unconfirmed,
63327 .done = ctnetlink_done_list,
63328 };
63329 -@@ -2040,7 +2041,7 @@ ctnetlink_stat_ct_cpu(struct sock *ctnl, struct sk_buff *skb,
63330 - const struct nlattr * const cda[])
63331 +@@ -2037,7 +2038,7 @@ static int ctnetlink_stat_ct_cpu(struct net *net, struct sock *ctnl,
63332 + const struct nlattr * const cda[])
63333 {
63334 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63335 - struct netlink_dump_control c = {
63336 @@ -129492,7 +155137,7 @@ index 9f52729..7e7a2c6 100644
63337 .dump = ctnetlink_ct_stat_cpu_dump,
63338 };
63339 return netlink_dump_start(ctnl, skb, nlh, &c);
63340 -@@ -2741,7 +2742,7 @@ static int ctnetlink_dump_exp_ct(struct sock *ctnl, struct sk_buff *skb,
63341 +@@ -2737,7 +2738,7 @@ static int ctnetlink_dump_exp_ct(struct net *net, struct sock *ctnl,
63342 struct nf_conntrack_tuple_hash *h;
63343 struct nf_conn *ct;
63344 struct nf_conntrack_zone zone;
63345 @@ -129501,7 +155146,7 @@ index 9f52729..7e7a2c6 100644
63346 .dump = ctnetlink_exp_ct_dump_table,
63347 .done = ctnetlink_exp_done,
63348 };
63349 -@@ -2760,9 +2761,8 @@ static int ctnetlink_dump_exp_ct(struct sock *ctnl, struct sk_buff *skb,
63350 +@@ -2756,9 +2757,8 @@ static int ctnetlink_dump_exp_ct(struct net *net, struct sock *ctnl,
63351 return -ENOENT;
63352
63353 ct = nf_ct_tuplehash_to_ctrack(h);
63354 @@ -129512,17 +155157,17 @@ index 9f52729..7e7a2c6 100644
63355 nf_ct_put(ct);
63356
63357 return err;
63358 -@@ -2786,7 +2786,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
63359 +@@ -2780,7 +2780,7 @@ static int ctnetlink_get_expect(struct net *net, struct sock *ctnl,
63360 if (cda[CTA_EXPECT_MASTER])
63361 - return ctnetlink_dump_exp_ct(ctnl, skb, nlh, cda);
63362 + return ctnetlink_dump_exp_ct(net, ctnl, skb, nlh, cda);
63363 else {
63364 - struct netlink_dump_control c = {
63365 + static struct netlink_dump_control c = {
63366 .dump = ctnetlink_exp_dump_table,
63367 .done = ctnetlink_exp_done,
63368 };
63369 -@@ -3248,7 +3248,7 @@ ctnetlink_stat_exp_cpu(struct sock *ctnl, struct sk_buff *skb,
63370 - const struct nlattr * const cda[])
63371 +@@ -3238,7 +3238,7 @@ static int ctnetlink_stat_exp_cpu(struct net *net, struct sock *ctnl,
63372 + const struct nlattr * const cda[])
63373 {
63374 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63375 - struct netlink_dump_control c = {
63376 @@ -129544,10 +155189,10 @@ index b65d586..beec902 100644
63377 {
63378 if (users > 0)
63379 diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
63380 -index 1fb3cac..a35219b 100644
63381 +index 0f1a45b..a6ce792 100644
63382 --- a/net/netfilter/nf_conntrack_standalone.c
63383 +++ b/net/netfilter/nf_conntrack_standalone.c
63384 -@@ -497,7 +497,7 @@ static struct ctl_table nf_ct_netfilter_table[] = {
63385 +@@ -504,7 +504,7 @@ static struct ctl_table nf_ct_netfilter_table[] = {
63386
63387 static int nf_conntrack_standalone_init_sysctl(struct net *net)
63388 {
63389 @@ -129601,6 +155246,32 @@ index a5d41df..1ff49be 100644
63390 mutex_unlock(&nf_log_mutex);
63391 }
63392
63393 +diff --git a/net/netfilter/nf_nat_ftp.c b/net/netfilter/nf_nat_ftp.c
63394 +index e84a578..d76afaf 100644
63395 +--- a/net/netfilter/nf_nat_ftp.c
63396 ++++ b/net/netfilter/nf_nat_ftp.c
63397 +@@ -134,7 +134,7 @@ static int __init nf_nat_ftp_init(void)
63398 + }
63399 +
63400 + /* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */
63401 +-static int warn_set(const char *val, struct kernel_param *kp)
63402 ++static int warn_set(const char *val, const struct kernel_param *kp)
63403 + {
63404 + printk(KERN_INFO KBUILD_MODNAME
63405 + ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
63406 +diff --git a/net/netfilter/nf_nat_irc.c b/net/netfilter/nf_nat_irc.c
63407 +index 1fb2258..8039bcd 100644
63408 +--- a/net/netfilter/nf_nat_irc.c
63409 ++++ b/net/netfilter/nf_nat_irc.c
63410 +@@ -107,7 +107,7 @@ static int __init nf_nat_irc_init(void)
63411 + }
63412 +
63413 + /* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */
63414 +-static int warn_set(const char *val, struct kernel_param *kp)
63415 ++static int warn_set(const char *val, const struct kernel_param *kp)
63416 + {
63417 + printk(KERN_INFO KBUILD_MODNAME
63418 + ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
63419 diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
63420 index c68c1e5..8b5d670 100644
63421 --- a/net/netfilter/nf_sockopt.c
63422 @@ -129624,10 +155295,10 @@ index c68c1e5..8b5d670 100644
63423 }
63424 EXPORT_SYMBOL(nf_unregister_sockopt);
63425 diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
63426 -index 2cb429d..77adda0 100644
63427 +index 2011977..ba46f29 100644
63428 --- a/net/netfilter/nf_tables_api.c
63429 +++ b/net/netfilter/nf_tables_api.c
63430 -@@ -555,7 +555,7 @@ static int nf_tables_gettable(struct sock *nlsk, struct sk_buff *skb,
63431 +@@ -555,7 +555,7 @@ static int nf_tables_gettable(struct net *net, struct sock *nlsk,
63432 int err;
63433
63434 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63435 @@ -129636,7 +155307,7 @@ index 2cb429d..77adda0 100644
63436 .dump = nf_tables_dump_tables,
63437 };
63438 return netlink_dump_start(nlsk, skb, nlh, &c);
63439 -@@ -1112,7 +1112,7 @@ static int nf_tables_getchain(struct sock *nlsk, struct sk_buff *skb,
63440 +@@ -1109,7 +1109,7 @@ static int nf_tables_getchain(struct net *net, struct sock *nlsk,
63441 int err;
63442
63443 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63444 @@ -129645,7 +155316,7 @@ index 2cb429d..77adda0 100644
63445 .dump = nf_tables_dump_chains,
63446 };
63447 return netlink_dump_start(nlsk, skb, nlh, &c);
63448 -@@ -1943,7 +1943,7 @@ static int nf_tables_getrule(struct sock *nlsk, struct sk_buff *skb,
63449 +@@ -1935,7 +1935,7 @@ static int nf_tables_getrule(struct net *net, struct sock *nlsk,
63450 int err;
63451
63452 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63453 @@ -129654,7 +155325,7 @@ index 2cb429d..77adda0 100644
63454 .dump = nf_tables_dump_rules,
63455 };
63456 return netlink_dump_start(nlsk, skb, nlh, &c);
63457 -@@ -2630,7 +2630,7 @@ static int nf_tables_getset(struct sock *nlsk, struct sk_buff *skb,
63458 +@@ -2622,7 +2622,7 @@ static int nf_tables_getset(struct net *net, struct sock *nlsk,
63459 return err;
63460
63461 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63462 @@ -129663,7 +155334,7 @@ index 2cb429d..77adda0 100644
63463 .dump = nf_tables_dump_sets,
63464 .done = nf_tables_dump_sets_done,
63465 };
63466 -@@ -2641,9 +2641,8 @@ static int nf_tables_getset(struct sock *nlsk, struct sk_buff *skb,
63467 +@@ -2633,9 +2633,8 @@ static int nf_tables_getset(struct net *net, struct sock *nlsk,
63468 return -ENOMEM;
63469
63470 *ctx_dump = ctx;
63471 @@ -129674,7 +155345,7 @@ index 2cb429d..77adda0 100644
63472 }
63473
63474 /* Only accept unspec with dump */
63475 -@@ -3222,7 +3221,7 @@ static int nf_tables_getsetelem(struct sock *nlsk, struct sk_buff *skb,
63476 +@@ -3226,7 +3225,7 @@ static int nf_tables_getsetelem(struct net *net, struct sock *nlsk,
63477 return -ENOENT;
63478
63479 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63480 @@ -129684,10 +155355,10 @@ index 2cb429d..77adda0 100644
63481 };
63482 return netlink_dump_start(nlsk, skb, nlh, &c);
63483 diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c
63484 -index fefbf5f..996b6ef 100644
63485 +index 5274b04..12fded1 100644
63486 --- a/net/netfilter/nfnetlink_acct.c
63487 +++ b/net/netfilter/nfnetlink_acct.c
63488 -@@ -263,10 +263,11 @@ nfnl_acct_get(struct sock *nfnl, struct sk_buff *skb,
63489 +@@ -261,10 +261,11 @@ static int nfnl_acct_get(struct net *net, struct sock *nfnl,
63490 char *acct_name;
63491
63492 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63493 @@ -129700,7 +155371,7 @@ index fefbf5f..996b6ef 100644
63494
63495 if (tb[NFACCT_FILTER]) {
63496 struct nfacct_filter *filter;
63497 -@@ -275,9 +276,9 @@ nfnl_acct_get(struct sock *nfnl, struct sk_buff *skb,
63498 +@@ -273,9 +274,9 @@ static int nfnl_acct_get(struct net *net, struct sock *nfnl,
63499 if (IS_ERR(filter))
63500 return PTR_ERR(filter);
63501
63502 @@ -129713,10 +155384,10 @@ index fefbf5f..996b6ef 100644
63503
63504 if (!tb[NFACCT_NAME])
63505 diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
63506 -index 54330fb..77d3fb1 100644
63507 +index e924e95..1e2e233 100644
63508 --- a/net/netfilter/nfnetlink_cthelper.c
63509 +++ b/net/netfilter/nfnetlink_cthelper.c
63510 -@@ -510,7 +510,7 @@ nfnl_cthelper_get(struct sock *nfnl, struct sk_buff *skb,
63511 +@@ -510,7 +510,7 @@ static int nfnl_cthelper_get(struct net *net, struct sock *nfnl,
63512 bool tuple_set = false;
63513
63514 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63515 @@ -129726,10 +155397,10 @@ index 54330fb..77d3fb1 100644
63516 };
63517 return netlink_dump_start(nfnl, skb, nlh, &c);
63518 diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c
63519 -index c7a2d0e..272225e 100644
63520 +index 2671b9d..e518410 100644
63521 --- a/net/netfilter/nfnetlink_cttimeout.c
63522 +++ b/net/netfilter/nfnetlink_cttimeout.c
63523 -@@ -250,7 +250,7 @@ cttimeout_get_timeout(struct sock *ctnl, struct sk_buff *skb,
63524 +@@ -248,7 +248,7 @@ static int cttimeout_get_timeout(struct net *net, struct sock *ctnl,
63525 struct ctnl_timeout *cur;
63526
63527 if (nlh->nlmsg_flags & NLM_F_DUMP) {
63528 @@ -129739,7 +155410,7 @@ index c7a2d0e..272225e 100644
63529 };
63530 return netlink_dump_start(ctnl, skb, nlh, &c);
63531 diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
63532 -index 740cce4..4672d73 100644
63533 +index 8ca9320..e509290 100644
63534 --- a/net/netfilter/nfnetlink_log.c
63535 +++ b/net/netfilter/nfnetlink_log.c
63536 @@ -85,7 +85,7 @@ static int nfnl_log_net_id __read_mostly;
63537 @@ -129751,7 +155422,7 @@ index 740cce4..4672d73 100644
63538 };
63539
63540 static struct nfnl_log_net *nfnl_log_pernet(struct net *net)
63541 -@@ -575,7 +575,7 @@ __build_packet_message(struct nfnl_log_net *log,
63542 +@@ -571,7 +571,7 @@ __build_packet_message(struct nfnl_log_net *log,
63543 /* global sequence number */
63544 if ((inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) &&
63545 nla_put_be32(inst->skb, NFULA_SEQ_GLOBAL,
63546 @@ -129761,7 +155432,7 @@ index 740cce4..4672d73 100644
63547
63548 if (ct && nfnl_ct->build(inst->skb, ct, ctinfo,
63549 diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
63550 -index 9c8fab0..5080c7c 100644
63551 +index 454841b..c8868616 100644
63552 --- a/net/netfilter/nft_compat.c
63553 +++ b/net/netfilter/nft_compat.c
63554 @@ -322,14 +322,7 @@ static void nft_match_eval(const struct nft_expr *expr,
63555 @@ -129780,6 +155451,49 @@ index 9c8fab0..5080c7c 100644
63556 }
63557
63558 static const struct nla_policy nft_match_policy[NFTA_MATCH_MAX + 1] = {
63559 +diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c
63560 +index 29d2c31..bf2c6a0 100644
63561 +--- a/net/netfilter/xt_IDLETIMER.c
63562 ++++ b/net/netfilter/xt_IDLETIMER.c
63563 +@@ -41,19 +41,13 @@
63564 + #include <linux/workqueue.h>
63565 + #include <linux/sysfs.h>
63566 +
63567 +-struct idletimer_tg_attr {
63568 +- struct attribute attr;
63569 +- ssize_t (*show)(struct kobject *kobj,
63570 +- struct attribute *attr, char *buf);
63571 +-};
63572 +-
63573 + struct idletimer_tg {
63574 + struct list_head entry;
63575 + struct timer_list timer;
63576 + struct work_struct work;
63577 +
63578 + struct kobject *kobj;
63579 +- struct idletimer_tg_attr attr;
63580 ++ struct device_attribute attr;
63581 +
63582 + unsigned int refcnt;
63583 + };
63584 +@@ -78,7 +72,7 @@ struct idletimer_tg *__idletimer_tg_find_by_label(const char *label)
63585 + return NULL;
63586 + }
63587 +
63588 +-static ssize_t idletimer_tg_show(struct kobject *kobj, struct attribute *attr,
63589 ++static ssize_t idletimer_tg_show(struct device *dev, struct device_attribute *attr,
63590 + char *buf)
63591 + {
63592 + struct idletimer_tg *timer;
63593 +@@ -86,7 +80,7 @@ static ssize_t idletimer_tg_show(struct kobject *kobj, struct attribute *attr,
63594 +
63595 + mutex_lock(&list_mutex);
63596 +
63597 +- timer = __idletimer_tg_find_by_label(attr->name);
63598 ++ timer = __idletimer_tg_find_by_label(attr->attr.name);
63599 + if (timer)
63600 + expires = timer->timer.expires;
63601 +
63602 diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c
63603 new file mode 100644
63604 index 0000000..a7cb915
63605 @@ -129903,7 +155617,7 @@ index 11de55e..f25e448 100644
63606 return 0;
63607 }
63608 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
63609 -index 59651af..45b9a6e 100644
63610 +index f1ffb34..4e5a217 100644
63611 --- a/net/netlink/af_netlink.c
63612 +++ b/net/netlink/af_netlink.c
63613 @@ -287,7 +287,7 @@ static void netlink_overrun(struct sock *sk)
63614 @@ -129915,7 +155629,7 @@ index 59651af..45b9a6e 100644
63615 }
63616
63617 static void netlink_rcv_wake(struct sock *sk)
63618 -@@ -2876,7 +2876,9 @@ errout_skb:
63619 +@@ -2877,7 +2877,9 @@ errout_skb:
63620
63621 int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
63622 const struct nlmsghdr *nlh,
63623 @@ -129926,7 +155640,7 @@ index 59651af..45b9a6e 100644
63624 {
63625 struct netlink_callback *cb;
63626 struct sock *sk;
63627 -@@ -2908,7 +2910,7 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
63628 +@@ -2909,7 +2911,7 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
63629 goto error_unlock;
63630 }
63631 /* add reference of module which cb->dump belongs to */
63632 @@ -129935,7 +155649,7 @@ index 59651af..45b9a6e 100644
63633 ret = -EPROTONOSUPPORT;
63634 goto error_unlock;
63635 }
63636 -@@ -2918,8 +2920,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
63637 +@@ -2920,8 +2922,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
63638 cb->dump = control->dump;
63639 cb->done = control->done;
63640 cb->nlh = nlh;
63641 @@ -129946,7 +155660,7 @@ index 59651af..45b9a6e 100644
63642 cb->min_dump_alloc = control->min_dump_alloc;
63643 cb->skb = skb;
63644
63645 -@@ -3183,7 +3185,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
63646 +@@ -3188,7 +3190,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
63647 sk_wmem_alloc_get(s),
63648 nlk->cb_running,
63649 atomic_read(&s->sk_refcnt),
63650 @@ -129969,10 +155683,10 @@ index 3ee63a3cf..d6df4d8 100644
63651 };
63652 return netlink_dump_start(net->diag_nlsk, skb, h, &c);
63653 diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
63654 -index bc0e504..9a71c81 100644
63655 +index f830326..162f6da 100644
63656 --- a/net/netlink/genetlink.c
63657 +++ b/net/netlink/genetlink.c
63658 -@@ -573,26 +573,24 @@ static int genl_family_rcv_msg(struct genl_family *family,
63659 +@@ -587,28 +587,26 @@ static int genl_family_rcv_msg(struct genl_family *family,
63660 return -EOPNOTSUPP;
63661
63662 if (!family->parallel_ops) {
63663 @@ -129981,6 +155695,7 @@ index bc0e504..9a71c81 100644
63664 - /* we have const, but the netlink API doesn't */
63665 - .data = (void *)ops,
63666 + static struct netlink_dump_control c = {
63667 + .start = genl_lock_start,
63668 .dump = genl_lock_dumpit,
63669 .done = genl_lock_done,
63670 };
63671 @@ -129996,6 +155711,7 @@ index bc0e504..9a71c81 100644
63672 - struct netlink_dump_control c = {
63673 - .module = family->module,
63674 + netlink_dump_control_no_const c = {
63675 + .start = ops->start,
63676 .dump = ops->dumpit,
63677 .done = ops->done,
63678 };
63679 @@ -130005,46 +155721,63 @@ index bc0e504..9a71c81 100644
63680 }
63681
63682 return rc;
63683 -diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
63684 -index c88d0f2..2d59df5 100644
63685 ---- a/net/openvswitch/actions.c
63686 -+++ b/net/openvswitch/actions.c
63687 -@@ -1160,17 +1160,26 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
63688 - const struct sw_flow_actions *acts,
63689 - struct sw_flow_key *key)
63690 - {
63691 -- int level = this_cpu_read(exec_actions_level);
63692 -- int err;
63693 -+ static const int ovs_recursion_limit = 5;
63694 -+ int err, level;
63695 -+
63696 -+ level = __this_cpu_inc_return(exec_actions_level);
63697 -+ if (unlikely(level > ovs_recursion_limit)) {
63698 -+ net_crit_ratelimited("ovs: recursion limit reached on datapath %s, probable configuration error\n",
63699 -+ ovs_dp_name(dp));
63700 -+ kfree_skb(skb);
63701 -+ err = -ENETDOWN;
63702 -+ goto out;
63703 -+ }
63704 -
63705 -- this_cpu_inc(exec_actions_level);
63706 - err = do_execute_actions(dp, skb, key,
63707 - acts->actions, acts->actions_len);
63708 +diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
63709 +index 30ab8e1..00ff20a 100644
63710 +--- a/net/openvswitch/vport-geneve.c
63711 ++++ b/net/openvswitch/vport-geneve.c
63712 +@@ -111,12 +111,17 @@ static struct vport *geneve_create(const struct vport_parms *parms)
63713 + return ovs_netdev_link(vport, parms->name);
63714 + }
63715
63716 -- if (!level)
63717 -+ if (level == 1)
63718 - process_deferred_actions(dp);
63719 ++static netdev_tx_t geneve_send(struct sk_buff *skb)
63720 ++{
63721 ++ return dev_queue_xmit(skb);
63722 ++}
63723 ++
63724 + static struct vport_ops ovs_geneve_vport_ops = {
63725 + .type = OVS_VPORT_TYPE_GENEVE,
63726 + .create = geneve_create,
63727 + .destroy = ovs_netdev_tunnel_destroy,
63728 + .get_options = geneve_get_options,
63729 +- .send = dev_queue_xmit,
63730 ++ .send = geneve_send,
63731 + };
63732
63733 -- this_cpu_dec(exec_actions_level);
63734 -+out:
63735 -+ __this_cpu_dec(exec_actions_level);
63736 - return err;
63737 + static int __init ovs_geneve_tnl_init(void)
63738 +diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
63739 +index 7f8897f..15b61a2 100644
63740 +--- a/net/openvswitch/vport-gre.c
63741 ++++ b/net/openvswitch/vport-gre.c
63742 +@@ -84,10 +84,15 @@ static struct vport *gre_create(const struct vport_parms *parms)
63743 + return ovs_netdev_link(vport, parms->name);
63744 }
63745
63746 ++static netdev_tx_t gre_send(struct sk_buff *skb)
63747 ++{
63748 ++ return dev_queue_xmit(skb);
63749 ++}
63750 ++
63751 + static struct vport_ops ovs_gre_vport_ops = {
63752 + .type = OVS_VPORT_TYPE_GRE,
63753 + .create = gre_create,
63754 +- .send = dev_queue_xmit,
63755 ++ .send = gre_send,
63756 + .destroy = ovs_netdev_tunnel_destroy,
63757 + };
63758 +
63759 diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
63760 -index ec76398..52091dd 100644
63761 +index ec76398..81d562c 100644
63762 --- a/net/openvswitch/vport-internal_dev.c
63763 +++ b/net/openvswitch/vport-internal_dev.c
63764 +@@ -44,7 +44,7 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev)
63765 + }
63766 +
63767 + /* Called with rcu_read_lock_bh. */
63768 +-static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
63769 ++static netdev_tx_t internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
63770 + {
63771 + int len, err;
63772 +
63773 @@ -147,7 +147,7 @@ static const struct net_device_ops internal_dev_netdev_ops = {
63774 .ndo_get_stats64 = internal_get_stats,
63775 };
63776 @@ -130054,6 +155787,51 @@ index ec76398..52091dd 100644
63777 .kind = "openvswitch",
63778 };
63779
63780 +diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
63781 +index 6a6adf3..055fe97 100644
63782 +--- a/net/openvswitch/vport-netdev.c
63783 ++++ b/net/openvswitch/vport-netdev.c
63784 +@@ -204,11 +204,16 @@ struct vport *ovs_netdev_get_vport(struct net_device *dev)
63785 + return NULL;
63786 + }
63787 +
63788 ++static netdev_tx_t netdev_send(struct sk_buff *skb)
63789 ++{
63790 ++ return dev_queue_xmit(skb);
63791 ++}
63792 ++
63793 + static struct vport_ops ovs_netdev_vport_ops = {
63794 + .type = OVS_VPORT_TYPE_NETDEV,
63795 + .create = netdev_create,
63796 + .destroy = netdev_destroy,
63797 +- .send = dev_queue_xmit,
63798 ++ .send = netdev_send,
63799 + };
63800 +
63801 + int __init ovs_netdev_init(void)
63802 +diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
63803 +index 5eb7694..58d8f08 100644
63804 +--- a/net/openvswitch/vport-vxlan.c
63805 ++++ b/net/openvswitch/vport-vxlan.c
63806 +@@ -148,12 +148,17 @@ static struct vport *vxlan_create(const struct vport_parms *parms)
63807 + return ovs_netdev_link(vport, parms->name);
63808 + }
63809 +
63810 ++static netdev_tx_t vxlan_send(struct sk_buff *skb)
63811 ++{
63812 ++ return dev_queue_xmit(skb);
63813 ++}
63814 ++
63815 + static struct vport_ops ovs_vxlan_netdev_vport_ops = {
63816 + .type = OVS_VPORT_TYPE_VXLAN,
63817 + .create = vxlan_create,
63818 + .destroy = ovs_netdev_tunnel_destroy,
63819 + .get_options = vxlan_get_options,
63820 +- .send = dev_queue_xmit,
63821 ++ .send = vxlan_send,
63822 + };
63823 +
63824 + static int __init ovs_vxlan_tnl_init(void)
63825 diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
63826 index da1ae0e1..3eb11c3 100644
63827 --- a/net/packet/af_packet.c
63828 @@ -130389,6 +156167,23 @@ index 9d6ddba..da3cd96 100644
63829 sizeof(val));
63830 set_fs(oldfs);
63831 }
63832 +diff --git a/net/rds/tcp.h b/net/rds/tcp.h
63833 +index 64f873c..a52c8aa 100644
63834 +--- a/net/rds/tcp.h
63835 ++++ b/net/rds/tcp.h
63836 +@@ -13,9 +13,9 @@ struct rds_tcp_connection {
63837 + struct list_head t_tcp_node;
63838 + struct rds_connection *conn;
63839 + struct socket *t_sock;
63840 +- void *t_orig_write_space;
63841 +- void *t_orig_data_ready;
63842 +- void *t_orig_state_change;
63843 ++ void (*t_orig_write_space)(struct sock *sk);
63844 ++ void (*t_orig_data_ready)(struct sock *sk);
63845 ++ void (*t_orig_state_change)(struct sock *sk);
63846 +
63847 + struct rds_tcp_incoming *t_tinc;
63848 + size_t t_tinc_hdr_rem;
63849 diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
63850 index 2894e60..f9c01ac 100644
63851 --- a/net/rds/tcp_send.c
63852 @@ -130403,7 +156198,7 @@ index 2894e60..f9c01ac 100644
63853 set_fs(oldfs);
63854 }
63855 diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
63856 -index 1f8a144..2c93350 100644
63857 +index 7e2d105..c060cb7 100644
63858 --- a/net/rxrpc/af_rxrpc.c
63859 +++ b/net/rxrpc/af_rxrpc.c
63860 @@ -40,7 +40,7 @@ static const struct proto_ops rxrpc_rpc_ops;
63861 @@ -130801,7 +156596,7 @@ index ce46f1c..47ef3e1 100644
63862
63863 /* Initialize IPv6 support and register with socket layer. */
63864 diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
63865 -index 8b4ff31..9e73fb3 100644
63866 +index 1099e99..e309828 100644
63867 --- a/net/sctp/protocol.c
63868 +++ b/net/sctp/protocol.c
63869 @@ -216,6 +216,7 @@ int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,
63870 @@ -130866,19 +156661,10 @@ index 5d6a03f..7fe971e 100644
63871
63872 retval->next_tsn = retval->c.initial_tsn;
63873 diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
63874 -index 6098d4c..9920c54 100644
63875 +index b5327bb..807f714 100644
63876 --- a/net/sctp/sm_sideeffect.c
63877 +++ b/net/sctp/sm_sideeffect.c
63878 -@@ -63,7 +63,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
63879 - static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
63880 - sctp_state_t state,
63881 - struct sctp_endpoint *ep,
63882 -- struct sctp_association *asoc,
63883 -+ struct sctp_association **asoc,
63884 - void *event_arg,
63885 - sctp_disposition_t status,
63886 - sctp_cmd_seq_t *commands,
63887 -@@ -443,7 +443,7 @@ static void sctp_generate_sack_event(unsigned long data)
63888 +@@ -431,7 +431,7 @@ static void sctp_generate_sack_event(unsigned long data)
63889 sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_SACK);
63890 }
63891
63892 @@ -130887,130 +156673,17 @@ index 6098d4c..9920c54 100644
63893 NULL,
63894 sctp_generate_t1_cookie_event,
63895 sctp_generate_t1_init_event,
63896 -@@ -1123,7 +1123,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
63897 - debug_post_sfn();
63898 -
63899 - error = sctp_side_effects(event_type, subtype, state,
63900 -- ep, asoc, event_arg, status,
63901 -+ ep, &asoc, event_arg, status,
63902 - &commands, gfp);
63903 - debug_post_sfx();
63904 -
63905 -@@ -1136,7 +1136,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
63906 - static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
63907 - sctp_state_t state,
63908 - struct sctp_endpoint *ep,
63909 -- struct sctp_association *asoc,
63910 -+ struct sctp_association **asoc,
63911 - void *event_arg,
63912 - sctp_disposition_t status,
63913 - sctp_cmd_seq_t *commands,
63914 -@@ -1151,7 +1151,7 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
63915 - * disposition SCTP_DISPOSITION_CONSUME.
63916 - */
63917 - if (0 != (error = sctp_cmd_interpreter(event_type, subtype, state,
63918 -- ep, asoc,
63919 -+ ep, *asoc,
63920 - event_arg, status,
63921 - commands, gfp)))
63922 - goto bail;
63923 -@@ -1174,11 +1174,12 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
63924 - break;
63925 -
63926 - case SCTP_DISPOSITION_DELETE_TCB:
63927 -+ case SCTP_DISPOSITION_ABORT:
63928 - /* This should now be a command. */
63929 -+ *asoc = NULL;
63930 - break;
63931 -
63932 - case SCTP_DISPOSITION_CONSUME:
63933 -- case SCTP_DISPOSITION_ABORT:
63934 - /*
63935 - * We should no longer have much work to do here as the
63936 - * real work has been done as explicit commands above.
63937 -diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
63938 -index 22c2bf3..f1f08c8 100644
63939 ---- a/net/sctp/sm_statefuns.c
63940 -+++ b/net/sctp/sm_statefuns.c
63941 -@@ -2976,7 +2976,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net,
63942 - SCTP_INC_STATS(net, SCTP_MIB_IN_DATA_CHUNK_DISCARDS);
63943 - goto discard_force;
63944 - case SCTP_IERROR_NO_DATA:
63945 -- goto consume;
63946 -+ return SCTP_DISPOSITION_ABORT;
63947 - case SCTP_IERROR_PROTO_VIOLATION:
63948 - return sctp_sf_abort_violation(net, ep, asoc, chunk, commands,
63949 - (u8 *)chunk->subh.data_hdr, sizeof(sctp_datahdr_t));
63950 -@@ -3043,9 +3043,6 @@ discard_noforce:
63951 - sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, force);
63952 -
63953 - return SCTP_DISPOSITION_DISCARD;
63954 --consume:
63955 -- return SCTP_DISPOSITION_CONSUME;
63956 --
63957 - }
63958 -
63959 - /*
63960 -@@ -3093,7 +3090,7 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
63961 - case SCTP_IERROR_BAD_STREAM:
63962 - break;
63963 - case SCTP_IERROR_NO_DATA:
63964 -- goto consume;
63965 -+ return SCTP_DISPOSITION_ABORT;
63966 - case SCTP_IERROR_PROTO_VIOLATION:
63967 - return sctp_sf_abort_violation(net, ep, asoc, chunk, commands,
63968 - (u8 *)chunk->subh.data_hdr, sizeof(sctp_datahdr_t));
63969 -@@ -3119,7 +3116,6 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
63970 - SCTP_TO(SCTP_EVENT_TIMEOUT_T2_SHUTDOWN));
63971 - }
63972 -
63973 --consume:
63974 - return SCTP_DISPOSITION_CONSUME;
63975 - }
63976 -
63977 -@@ -4825,9 +4821,6 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
63978 - * if necessary to fill gaps.
63979 - */
63980 - struct sctp_chunk *abort = arg;
63981 -- sctp_disposition_t retval;
63982 --
63983 -- retval = SCTP_DISPOSITION_CONSUME;
63984 -
63985 - if (abort)
63986 - sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
63987 -@@ -4845,7 +4838,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
63988 - SCTP_INC_STATS(net, SCTP_MIB_ABORTEDS);
63989 - SCTP_DEC_STATS(net, SCTP_MIB_CURRESTAB);
63990 -
63991 -- return retval;
63992 -+ return SCTP_DISPOSITION_ABORT;
63993 - }
63994 -
63995 - /* We tried an illegal operation on an association which is closed. */
63996 -@@ -4960,12 +4953,10 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort(
63997 - sctp_cmd_seq_t *commands)
63998 - {
63999 - struct sctp_chunk *abort = arg;
64000 -- sctp_disposition_t retval;
64001 -
64002 - /* Stop T1-init timer */
64003 - sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
64004 - SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT));
64005 -- retval = SCTP_DISPOSITION_CONSUME;
64006 -
64007 - if (abort)
64008 - sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
64009 -@@ -4985,7 +4976,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort(
64010 - sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
64011 - SCTP_PERR(SCTP_ERROR_USER_ABORT));
64012 -
64013 -- return retval;
64014 -+ return SCTP_DISPOSITION_ABORT;
64015 - }
64016 -
64017 - /*
64018 +@@ -1095,7 +1095,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
64019 + const sctp_sm_table_entry_t *state_fn;
64020 + sctp_disposition_t status;
64021 + int error = 0;
64022 +- typedef const char *(printfn_t)(sctp_subtype_t);
64023 ++ typedef const char *(printfn_t)(const sctp_subtype_t);
64024 + static printfn_t *table[] = {
64025 + NULL, sctp_cname, sctp_tname, sctp_oname, sctp_pname,
64026 + };
64027 diff --git a/net/sctp/socket.c b/net/sctp/socket.c
64028 -index be1489f..9d8cbd9 100644
64029 +index e878da0..f0f6b12 100644
64030 --- a/net/sctp/socket.c
64031 +++ b/net/sctp/socket.c
64032 @@ -386,7 +386,8 @@ static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
64033 @@ -131031,7 +156704,7 @@ index be1489f..9d8cbd9 100644
64034 SCTP_ADDR_NEW, GFP_ATOMIC);
64035 addr_buf += af->sockaddr_len;
64036 }
64037 -@@ -2192,11 +2194,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
64038 +@@ -2188,11 +2190,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
64039 {
64040 struct sctp_association *asoc;
64041 struct sctp_ulpevent *event;
64042 @@ -131046,7 +156719,7 @@ index be1489f..9d8cbd9 100644
64043
64044 /* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
64045 * if there is no data to be sent or retransmit, the stack will
64046 -@@ -4371,13 +4375,16 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
64047 +@@ -4367,13 +4371,16 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
64048 static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
64049 int __user *optlen)
64050 {
64051 @@ -131064,7 +156737,7 @@ index be1489f..9d8cbd9 100644
64052 return -EFAULT;
64053 return 0;
64054 }
64055 -@@ -4395,6 +4402,8 @@ static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
64056 +@@ -4391,6 +4398,8 @@ static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
64057 */
64058 static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optval, int __user *optlen)
64059 {
64060 @@ -131073,7 +156746,7 @@ index be1489f..9d8cbd9 100644
64061 /* Applicable to UDP-style socket only */
64062 if (sctp_style(sk, TCP))
64063 return -EOPNOTSUPP;
64064 -@@ -4403,7 +4412,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv
64065 +@@ -4399,7 +4408,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv
64066 len = sizeof(int);
64067 if (put_user(len, optlen))
64068 return -EFAULT;
64069 @@ -131083,7 +156756,7 @@ index be1489f..9d8cbd9 100644
64070 return -EFAULT;
64071 return 0;
64072 }
64073 -@@ -4777,12 +4787,15 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
64074 +@@ -4773,12 +4783,15 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
64075 */
64076 static int sctp_getsockopt_initmsg(struct sock *sk, int len, char __user *optval, int __user *optlen)
64077 {
64078 @@ -131100,7 +156773,7 @@ index be1489f..9d8cbd9 100644
64079 return -EFAULT;
64080 return 0;
64081 }
64082 -@@ -4823,6 +4836,8 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
64083 +@@ -4819,6 +4832,8 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
64084 ->addr_to_user(sp, &temp);
64085 if (space_left < addrlen)
64086 return -ENOMEM;
64087 @@ -131110,10 +156783,10 @@ index be1489f..9d8cbd9 100644
64088 return -EFAULT;
64089 to += addrlen;
64090 diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
64091 -index 3e0fc51..289fe22 100644
64092 +index daf8554..4ab495b 100644
64093 --- a/net/sctp/sysctl.c
64094 +++ b/net/sctp/sysctl.c
64095 -@@ -317,7 +317,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,
64096 +@@ -324,7 +324,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,
64097 loff_t *ppos)
64098 {
64099 struct net *net = current->nsproxy->net_ns;
64100 @@ -131122,7 +156795,7 @@ index 3e0fc51..289fe22 100644
64101 bool changed = false;
64102 char *none = "none";
64103 char tmp[8] = {0};
64104 -@@ -365,7 +365,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,
64105 +@@ -372,7 +372,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,
64106 struct net *net = current->nsproxy->net_ns;
64107 unsigned int min = *(unsigned int *) ctl->extra1;
64108 unsigned int max = *(unsigned int *) ctl->extra2;
64109 @@ -131131,7 +156804,7 @@ index 3e0fc51..289fe22 100644
64110 int ret, new_value;
64111
64112 memset(&tbl, 0, sizeof(struct ctl_table));
64113 -@@ -394,7 +394,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write,
64114 +@@ -401,7 +401,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write,
64115 struct net *net = current->nsproxy->net_ns;
64116 unsigned int min = *(unsigned int *) ctl->extra1;
64117 unsigned int max = *(unsigned int *) ctl->extra2;
64118 @@ -131140,7 +156813,7 @@ index 3e0fc51..289fe22 100644
64119 int ret, new_value;
64120
64121 memset(&tbl, 0, sizeof(struct ctl_table));
64122 -@@ -432,7 +432,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
64123 +@@ -439,7 +439,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
64124 loff_t *ppos)
64125 {
64126 struct net *net = current->nsproxy->net_ns;
64127 @@ -131149,7 +156822,7 @@ index 3e0fc51..289fe22 100644
64128 int new_value, ret;
64129
64130 memset(&tbl, 0, sizeof(struct ctl_table));
64131 -@@ -459,7 +459,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
64132 +@@ -466,7 +466,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
64133
64134 int sctp_sysctl_net_register(struct net *net)
64135 {
64136 @@ -131159,7 +156832,7 @@ index 3e0fc51..289fe22 100644
64137
64138 table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
64139 diff --git a/net/socket.c b/net/socket.c
64140 -index 263b334..bcfd0d6 100644
64141 +index db13ae8..dabfbea 100644
64142 --- a/net/socket.c
64143 +++ b/net/socket.c
64144 @@ -89,6 +89,7 @@
64145 @@ -131369,7 +157042,7 @@ index 263b334..bcfd0d6 100644
64146 ctl_len))
64147 goto out_freectl;
64148 msg_sys->msg_control = ctl_buf;
64149 -@@ -2072,7 +2137,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
64150 +@@ -2073,7 +2138,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
64151 ssize_t err;
64152
64153 /* kernel mode address */
64154 @@ -131378,7 +157051,7 @@ index 263b334..bcfd0d6 100644
64155
64156 /* user mode address pointers */
64157 struct sockaddr __user *uaddr;
64158 -@@ -2717,7 +2782,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
64159 +@@ -2719,7 +2784,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
64160 ifr = compat_alloc_user_space(buf_size);
64161 rxnfc = (void __user *)ifr + ALIGN(sizeof(struct ifreq), 8);
64162
64163 @@ -131387,7 +157060,7 @@ index 263b334..bcfd0d6 100644
64164 return -EFAULT;
64165
64166 if (put_user(convert_in ? rxnfc : compat_ptr(data),
64167 -@@ -2828,7 +2893,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
64168 +@@ -2830,7 +2895,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
64169 old_fs = get_fs();
64170 set_fs(KERNEL_DS);
64171 err = dev_ioctl(net, cmd,
64172 @@ -131396,7 +157069,7 @@ index 263b334..bcfd0d6 100644
64173 set_fs(old_fs);
64174
64175 return err;
64176 -@@ -2921,7 +2986,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
64177 +@@ -2923,7 +2988,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
64178
64179 old_fs = get_fs();
64180 set_fs(KERNEL_DS);
64181 @@ -131405,7 +157078,7 @@ index 263b334..bcfd0d6 100644
64182 set_fs(old_fs);
64183
64184 if (cmd == SIOCGIFMAP && !err) {
64185 -@@ -3005,7 +3070,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
64186 +@@ -3007,7 +3072,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
64187 ret |= get_user(rtdev, &(ur4->rt_dev));
64188 if (rtdev) {
64189 ret |= copy_from_user(devname, compat_ptr(rtdev), 15);
64190 @@ -131414,7 +157087,7 @@ index 263b334..bcfd0d6 100644
64191 devname[15] = 0;
64192 } else
64193 r4.rt_dev = NULL;
64194 -@@ -3232,8 +3297,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
64195 +@@ -3234,8 +3299,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
64196 int __user *uoptlen;
64197 int err;
64198
64199 @@ -131425,7 +157098,7 @@ index 263b334..bcfd0d6 100644
64200
64201 set_fs(KERNEL_DS);
64202 if (level == SOL_SOCKET)
64203 -@@ -3253,7 +3318,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
64204 +@@ -3255,7 +3320,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
64205 char __user *uoptval;
64206 int err;
64207
64208 @@ -131446,6 +157119,75 @@ index 04ce2c0..b1dd1bd 100644
64209 help
64210 This option enables a sysctl-based debugging interface
64211 that is be used by the 'rpcdebug' utility to turn on or off
64212 +diff --git a/net/sunrpc/auth_gss/gss_rpc_upcall.c b/net/sunrpc/auth_gss/gss_rpc_upcall.c
64213 +index f0c6a8c..3acb459 100644
64214 +--- a/net/sunrpc/auth_gss/gss_rpc_upcall.c
64215 ++++ b/net/sunrpc/auth_gss/gss_rpc_upcall.c
64216 +@@ -55,8 +55,8 @@ enum {
64217 + #define PROC(proc, name) \
64218 + [GSSX_##proc] = { \
64219 + .p_proc = GSSX_##proc, \
64220 +- .p_encode = (kxdreproc_t)gssx_enc_##name, \
64221 +- .p_decode = (kxdrdproc_t)gssx_dec_##name, \
64222 ++ .p_encode = gssx_enc_##name, \
64223 ++ .p_decode = gssx_dec_##name, \
64224 + .p_arglen = GSSX_ARG_##name##_sz, \
64225 + .p_replen = GSSX_RES_##name##_sz, \
64226 + .p_statidx = GSSX_##proc, \
64227 +diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
64228 +index eeeba5a..c0d96a1 100644
64229 +--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
64230 ++++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
64231 +@@ -731,10 +731,12 @@ static int gssx_enc_cb(struct xdr_stream *xdr, struct gssx_cb *cb)
64232 + return err;
64233 + }
64234 +
64235 +-void gssx_enc_accept_sec_context(struct rpc_rqst *req,
64236 ++void gssx_enc_accept_sec_context(void *_req,
64237 + struct xdr_stream *xdr,
64238 +- struct gssx_arg_accept_sec_context *arg)
64239 ++ void *_arg)
64240 + {
64241 ++ struct rpc_rqst *req = _req;
64242 ++ struct gssx_arg_accept_sec_context *arg = _arg;
64243 + int err;
64244 +
64245 + err = gssx_enc_call_ctx(xdr, &arg->call_ctx);
64246 +@@ -787,10 +789,11 @@ done:
64247 + dprintk("RPC: gssx_enc_accept_sec_context: %d\n", err);
64248 + }
64249 +
64250 +-int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
64251 ++int gssx_dec_accept_sec_context(void *rqstp,
64252 + struct xdr_stream *xdr,
64253 +- struct gssx_res_accept_sec_context *res)
64254 ++ void *_res)
64255 + {
64256 ++ struct gssx_res_accept_sec_context *res = _res;
64257 + u32 value_follows;
64258 + int err;
64259 + struct page *scratch;
64260 +diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.h b/net/sunrpc/auth_gss/gss_rpc_xdr.h
64261 +index 9d88c62..53396b6 100644
64262 +--- a/net/sunrpc/auth_gss/gss_rpc_xdr.h
64263 ++++ b/net/sunrpc/auth_gss/gss_rpc_xdr.h
64264 +@@ -177,12 +177,12 @@ struct gssx_res_accept_sec_context {
64265 + #define gssx_dec_store_cred NULL
64266 + #define gssx_enc_init_sec_context NULL
64267 + #define gssx_dec_init_sec_context NULL
64268 +-void gssx_enc_accept_sec_context(struct rpc_rqst *req,
64269 ++void gssx_enc_accept_sec_context(void *req,
64270 + struct xdr_stream *xdr,
64271 +- struct gssx_arg_accept_sec_context *args);
64272 +-int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
64273 ++ void *args);
64274 ++int gssx_dec_accept_sec_context(void *rqstp,
64275 + struct xdr_stream *xdr,
64276 +- struct gssx_res_accept_sec_context *res);
64277 ++ void *res);
64278 + #define gssx_enc_release_handle NULL
64279 + #define gssx_dec_release_handle NULL
64280 + #define gssx_enc_get_mic NULL
64281 diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
64282 index 1095be9..815d777 100644
64283 --- a/net/sunrpc/auth_gss/svcauth_gss.c
64284 @@ -131469,7 +157211,7 @@ index 1095be9..815d777 100644
64285 /* make a copy for the caller */
64286 *handle = ctxh;
64287 diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
64288 -index 21e2035..2e567b1 100644
64289 +index 273bc3a..1a4b204 100644
64290 --- a/net/sunrpc/cache.c
64291 +++ b/net/sunrpc/cache.c
64292 @@ -1623,7 +1623,7 @@ static int create_cache_proc_entries(struct cache_detail *cd, struct net *net)
64293 @@ -131482,10 +157224,10 @@ index 21e2035..2e567b1 100644
64294 goto out_nomem;
64295 cd->u.procfs.channel_ent = NULL;
64296 diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
64297 -index 23608eb..f2b5208 100644
64298 +index b7f2104..62e2195d 100644
64299 --- a/net/sunrpc/clnt.c
64300 +++ b/net/sunrpc/clnt.c
64301 -@@ -1428,7 +1428,9 @@ call_start(struct rpc_task *task)
64302 +@@ -1429,7 +1429,9 @@ call_start(struct rpc_task *task)
64303 (RPC_IS_ASYNC(task) ? "async" : "sync"));
64304
64305 /* Increment call count */
64306 @@ -131496,6 +157238,179 @@ index 23608eb..f2b5208 100644
64307 clnt->cl_stats->rpccnt++;
64308 task->tk_action = call_reserve;
64309 }
64310 +diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
64311 +index cf5770d..6309968 100644
64312 +--- a/net/sunrpc/rpcb_clnt.c
64313 ++++ b/net/sunrpc/rpcb_clnt.c
64314 +@@ -844,9 +844,11 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
64315 + * XDR functions for rpcbind
64316 + */
64317 +
64318 +-static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
64319 +- const struct rpcbind_args *rpcb)
64320 ++static void rpcb_enc_mapping(void *_req, struct xdr_stream *xdr,
64321 ++ void *_rpcb)
64322 + {
64323 ++ struct rpc_rqst *req = _req;
64324 ++ const struct rpcbind_args *rpcb = _rpcb;
64325 + __be32 *p;
64326 +
64327 + dprintk("RPC: %5u encoding PMAP_%s call (%u, %u, %d, %u)\n",
64328 +@@ -861,9 +863,11 @@ static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
64329 + *p = cpu_to_be32(rpcb->r_port);
64330 + }
64331 +
64332 +-static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
64333 +- struct rpcbind_args *rpcb)
64334 ++static int rpcb_dec_getport(void *_req, struct xdr_stream *xdr,
64335 ++ void *_rpcb)
64336 + {
64337 ++ struct rpc_rqst *req = _req;
64338 ++ struct rpcbind_args *rpcb = _rpcb;
64339 + unsigned long port;
64340 + __be32 *p;
64341 +
64342 +@@ -883,9 +887,11 @@ static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
64343 + return 0;
64344 + }
64345 +
64346 +-static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr,
64347 +- unsigned int *boolp)
64348 ++static int rpcb_dec_set(void *_req, struct xdr_stream *xdr,
64349 ++ void *_boolp)
64350 + {
64351 ++ struct rpc_rqst *req = _req;
64352 ++ unsigned int *boolp = _boolp;
64353 + __be32 *p;
64354 +
64355 + p = xdr_inline_decode(xdr, 4);
64356 +@@ -918,9 +924,11 @@ static void encode_rpcb_string(struct xdr_stream *xdr, const char *string,
64357 + xdr_encode_opaque(p, string, len);
64358 + }
64359 +
64360 +-static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
64361 +- const struct rpcbind_args *rpcb)
64362 ++static void rpcb_enc_getaddr(void *_req, struct xdr_stream *xdr,
64363 ++ void *_rpcb)
64364 + {
64365 ++ struct rpc_rqst *req = _req;
64366 ++ const struct rpcbind_args *rpcb = _rpcb;
64367 + __be32 *p;
64368 +
64369 + dprintk("RPC: %5u encoding RPCB_%s call (%u, %u, '%s', '%s')\n",
64370 +@@ -938,9 +946,11 @@ static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
64371 + encode_rpcb_string(xdr, rpcb->r_owner, RPCB_MAXOWNERLEN);
64372 + }
64373 +
64374 +-static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
64375 +- struct rpcbind_args *rpcb)
64376 ++static int rpcb_dec_getaddr(void *_req, struct xdr_stream *xdr,
64377 ++ void *_rpcb)
64378 + {
64379 ++ struct rpc_rqst *req = _req;
64380 ++ struct rpcbind_args *rpcb = _rpcb;
64381 + struct sockaddr_storage address;
64382 + struct sockaddr *sap = (struct sockaddr *)&address;
64383 + __be32 *p;
64384 +@@ -994,8 +1004,8 @@ out_fail:
64385 + static struct rpc_procinfo rpcb_procedures2[] = {
64386 + [RPCBPROC_SET] = {
64387 + .p_proc = RPCBPROC_SET,
64388 +- .p_encode = (kxdreproc_t)rpcb_enc_mapping,
64389 +- .p_decode = (kxdrdproc_t)rpcb_dec_set,
64390 ++ .p_encode = rpcb_enc_mapping,
64391 ++ .p_decode = rpcb_dec_set,
64392 + .p_arglen = RPCB_mappingargs_sz,
64393 + .p_replen = RPCB_setres_sz,
64394 + .p_statidx = RPCBPROC_SET,
64395 +@@ -1004,8 +1014,8 @@ static struct rpc_procinfo rpcb_procedures2[] = {
64396 + },
64397 + [RPCBPROC_UNSET] = {
64398 + .p_proc = RPCBPROC_UNSET,
64399 +- .p_encode = (kxdreproc_t)rpcb_enc_mapping,
64400 +- .p_decode = (kxdrdproc_t)rpcb_dec_set,
64401 ++ .p_encode = rpcb_enc_mapping,
64402 ++ .p_decode = rpcb_dec_set,
64403 + .p_arglen = RPCB_mappingargs_sz,
64404 + .p_replen = RPCB_setres_sz,
64405 + .p_statidx = RPCBPROC_UNSET,
64406 +@@ -1014,8 +1024,8 @@ static struct rpc_procinfo rpcb_procedures2[] = {
64407 + },
64408 + [RPCBPROC_GETPORT] = {
64409 + .p_proc = RPCBPROC_GETPORT,
64410 +- .p_encode = (kxdreproc_t)rpcb_enc_mapping,
64411 +- .p_decode = (kxdrdproc_t)rpcb_dec_getport,
64412 ++ .p_encode = rpcb_enc_mapping,
64413 ++ .p_decode = rpcb_dec_getport,
64414 + .p_arglen = RPCB_mappingargs_sz,
64415 + .p_replen = RPCB_getportres_sz,
64416 + .p_statidx = RPCBPROC_GETPORT,
64417 +@@ -1027,8 +1037,8 @@ static struct rpc_procinfo rpcb_procedures2[] = {
64418 + static struct rpc_procinfo rpcb_procedures3[] = {
64419 + [RPCBPROC_SET] = {
64420 + .p_proc = RPCBPROC_SET,
64421 +- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
64422 +- .p_decode = (kxdrdproc_t)rpcb_dec_set,
64423 ++ .p_encode = rpcb_enc_getaddr,
64424 ++ .p_decode = rpcb_dec_set,
64425 + .p_arglen = RPCB_getaddrargs_sz,
64426 + .p_replen = RPCB_setres_sz,
64427 + .p_statidx = RPCBPROC_SET,
64428 +@@ -1037,8 +1047,8 @@ static struct rpc_procinfo rpcb_procedures3[] = {
64429 + },
64430 + [RPCBPROC_UNSET] = {
64431 + .p_proc = RPCBPROC_UNSET,
64432 +- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
64433 +- .p_decode = (kxdrdproc_t)rpcb_dec_set,
64434 ++ .p_encode = rpcb_enc_getaddr,
64435 ++ .p_decode = rpcb_dec_set,
64436 + .p_arglen = RPCB_getaddrargs_sz,
64437 + .p_replen = RPCB_setres_sz,
64438 + .p_statidx = RPCBPROC_UNSET,
64439 +@@ -1047,8 +1057,8 @@ static struct rpc_procinfo rpcb_procedures3[] = {
64440 + },
64441 + [RPCBPROC_GETADDR] = {
64442 + .p_proc = RPCBPROC_GETADDR,
64443 +- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
64444 +- .p_decode = (kxdrdproc_t)rpcb_dec_getaddr,
64445 ++ .p_encode = rpcb_enc_getaddr,
64446 ++ .p_decode = rpcb_dec_getaddr,
64447 + .p_arglen = RPCB_getaddrargs_sz,
64448 + .p_replen = RPCB_getaddrres_sz,
64449 + .p_statidx = RPCBPROC_GETADDR,
64450 +@@ -1060,8 +1070,8 @@ static struct rpc_procinfo rpcb_procedures3[] = {
64451 + static struct rpc_procinfo rpcb_procedures4[] = {
64452 + [RPCBPROC_SET] = {
64453 + .p_proc = RPCBPROC_SET,
64454 +- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
64455 +- .p_decode = (kxdrdproc_t)rpcb_dec_set,
64456 ++ .p_encode = rpcb_enc_getaddr,
64457 ++ .p_decode = rpcb_dec_set,
64458 + .p_arglen = RPCB_getaddrargs_sz,
64459 + .p_replen = RPCB_setres_sz,
64460 + .p_statidx = RPCBPROC_SET,
64461 +@@ -1070,8 +1080,8 @@ static struct rpc_procinfo rpcb_procedures4[] = {
64462 + },
64463 + [RPCBPROC_UNSET] = {
64464 + .p_proc = RPCBPROC_UNSET,
64465 +- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
64466 +- .p_decode = (kxdrdproc_t)rpcb_dec_set,
64467 ++ .p_encode = rpcb_enc_getaddr,
64468 ++ .p_decode = rpcb_dec_set,
64469 + .p_arglen = RPCB_getaddrargs_sz,
64470 + .p_replen = RPCB_setres_sz,
64471 + .p_statidx = RPCBPROC_UNSET,
64472 +@@ -1080,8 +1090,8 @@ static struct rpc_procinfo rpcb_procedures4[] = {
64473 + },
64474 + [RPCBPROC_GETADDR] = {
64475 + .p_proc = RPCBPROC_GETADDR,
64476 +- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
64477 +- .p_decode = (kxdrdproc_t)rpcb_dec_getaddr,
64478 ++ .p_encode = rpcb_enc_getaddr,
64479 ++ .p_decode = rpcb_dec_getaddr,
64480 + .p_arglen = RPCB_getaddrargs_sz,
64481 + .p_replen = RPCB_getaddrres_sz,
64482 + .p_statidx = RPCBPROC_GETADDR,
64483 diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
64484 index 73ad57a..d7a0c08 100644
64485 --- a/net/sunrpc/sched.c
64486 @@ -131526,9 +157441,27 @@ index 2ecb994..5afb49f 100644
64487 return -ENOMEM;
64488
64489 diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
64490 -index cc98528..f427662 100644
64491 +index cc98528..925844d 100644
64492 --- a/net/sunrpc/svc.c
64493 +++ b/net/sunrpc/svc.c
64494 +@@ -50,7 +50,7 @@ EXPORT_SYMBOL_GPL(svc_pool_map);
64495 + static DEFINE_MUTEX(svc_pool_map_mutex);/* protects svc_pool_map.count only */
64496 +
64497 + static int
64498 +-param_set_pool_mode(const char *val, struct kernel_param *kp)
64499 ++param_set_pool_mode(const char *val, const struct kernel_param *kp)
64500 + {
64501 + int *ip = (int *)kp->arg;
64502 + struct svc_pool_map *m = &svc_pool_map;
64503 +@@ -80,7 +80,7 @@ out:
64504 + }
64505 +
64506 + static int
64507 +-param_get_pool_mode(char *buf, struct kernel_param *kp)
64508 ++param_get_pool_mode(char *buf, const struct kernel_param *kp)
64509 + {
64510 + int *ip = (int *)kp->arg;
64511 +
64512 @@ -1166,7 +1166,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
64513 svc_putnl(resv, RPC_SUCCESS);
64514
64515 @@ -131541,7 +157474,7 @@ index cc98528..f427662 100644
64516 /* Initialize storage for argp and resp */
64517 memset(rqstp->rq_argp, 0, procp->pc_argsize);
64518 diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
64519 -index 621ca7b..78bf76b 100644
64520 +index dfacdc9..3cb08de 100644
64521 --- a/net/sunrpc/svcauth_unix.c
64522 +++ b/net/sunrpc/svcauth_unix.c
64523 @@ -470,7 +470,7 @@ static void unix_gid_request(struct cache_detail *cd,
64524 @@ -131554,10 +157487,10 @@ index 621ca7b..78bf76b 100644
64525 static int unix_gid_parse(struct cache_detail *cd,
64526 char *mesg, int mlen)
64527 diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
64528 -index 1b7051b..65b0d80 100644
64529 +index c846ca9..d5968b4 100644
64530 --- a/net/sunrpc/xprtrdma/svc_rdma.c
64531 +++ b/net/sunrpc/xprtrdma/svc_rdma.c
64532 -@@ -61,15 +61,15 @@ unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
64533 +@@ -62,15 +62,15 @@ unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
64534 static unsigned int min_max_inline = 4096;
64535 static unsigned int max_max_inline = 65536;
64536
64537 @@ -131580,9 +157513,9 @@ index 1b7051b..65b0d80 100644
64538 +atomic_unchecked_t rdma_stat_sq_poll;
64539 +atomic_unchecked_t rdma_stat_sq_prod;
64540
64541 - /* Temporary NFS request map and context caches */
64542 - struct kmem_cache *svc_rdma_map_cachep;
64543 -@@ -87,17 +87,17 @@ static int read_reset_stat(struct ctl_table *table, int write,
64544 + struct workqueue_struct *svc_rdma_wq;
64545 +
64546 +@@ -84,17 +84,17 @@ static int read_reset_stat(struct ctl_table *table, int write,
64547 void __user *buffer, size_t *lenp,
64548 loff_t *ppos)
64549 {
64550 @@ -131603,7 +157536,7 @@ index 1b7051b..65b0d80 100644
64551 if (len >= 32)
64552 return -EFAULT;
64553 len = strlen(str_buf);
64554 -@@ -109,7 +109,7 @@ static int read_reset_stat(struct ctl_table *table, int write,
64555 +@@ -106,7 +106,7 @@ static int read_reset_stat(struct ctl_table *table, int write,
64556 len -= *ppos;
64557 if (len > *lenp)
64558 len = *lenp;
64559 @@ -131612,7 +157545,7 @@ index 1b7051b..65b0d80 100644
64560 return -EFAULT;
64561 *lenp = len;
64562 *ppos += len;
64563 -@@ -150,63 +150,63 @@ static struct ctl_table svcrdma_parm_table[] = {
64564 +@@ -147,63 +147,63 @@ static struct ctl_table svcrdma_parm_table[] = {
64565 {
64566 .procname = "rdma_stat_read",
64567 .data = &rdma_stat_read,
64568 @@ -131686,7 +157619,7 @@ index 1b7051b..65b0d80 100644
64569 .proc_handler = read_reset_stat,
64570 },
64571 diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
64572 -index ff4f01e..997f03d 100644
64573 +index c8b8a8b..75b302c 100644
64574 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
64575 +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
64576 @@ -200,7 +200,7 @@ int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
64577 @@ -131707,7 +157640,7 @@ index ff4f01e..997f03d 100644
64578 return ret;
64579 err:
64580 ib_dma_unmap_sg(xprt->sc_cm_id->device,
64581 -@@ -598,7 +598,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
64582 +@@ -630,7 +630,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
64583 dto_q);
64584 list_del_init(&ctxt->dto_q);
64585 } else {
64586 @@ -131716,7 +157649,7 @@ index ff4f01e..997f03d 100644
64587 clear_bit(XPT_DATA, &xprt->xpt_flags);
64588 ctxt = NULL;
64589 }
64590 -@@ -616,7 +616,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
64591 +@@ -648,7 +648,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
64592 }
64593 dprintk("svcrdma: processing ctxt=%p on xprt=%p, rqstp=%p, status=%d\n",
64594 ctxt, rdma_xprt, rqstp, ctxt->wc_status);
64595 @@ -131726,7 +157659,7 @@ index ff4f01e..997f03d 100644
64596 /* Build up the XDR from the receive buffers. */
64597 rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len);
64598 diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
64599 -index 969a1ab..ee9b382 100644
64600 +index df57f3c..5febb1e 100644
64601 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
64602 +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
64603 @@ -291,7 +291,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
64604 @@ -131739,10 +157672,10 @@ index 969a1ab..ee9b382 100644
64605 goto err;
64606 return write_len - bc;
64607 diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
64608 -index b348b4a..db45b20 100644
64609 +index 5763825..6a73bd1 100644
64610 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
64611 +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
64612 -@@ -346,7 +346,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
64613 +@@ -477,7 +477,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
64614 return;
64615
64616 ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP);
64617 @@ -131751,7 +157684,7 @@ index b348b4a..db45b20 100644
64618
64619 while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) {
64620 ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id;
64621 -@@ -368,7 +368,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
64622 +@@ -499,7 +499,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
64623 }
64624
64625 if (ctxt)
64626 @@ -131760,7 +157693,7 @@ index b348b4a..db45b20 100644
64627
64628 set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
64629 /*
64630 -@@ -447,7 +447,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
64631 +@@ -576,7 +576,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
64632 return;
64633
64634 ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP);
64635 @@ -131769,7 +157702,7 @@ index b348b4a..db45b20 100644
64636 while ((ret = ib_poll_cq(cq, ARRAY_SIZE(wc_a), wc_a)) > 0) {
64637 int i;
64638
64639 -@@ -476,7 +476,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
64640 +@@ -605,7 +605,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
64641 }
64642
64643 if (ctxt)
64644 @@ -131778,7 +157711,7 @@ index b348b4a..db45b20 100644
64645 }
64646
64647 static void sq_comp_handler(struct ib_cq *cq, void *cq_context)
64648 -@@ -1273,7 +1273,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
64649 +@@ -1381,7 +1381,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
64650 spin_lock_bh(&xprt->sc_lock);
64651 if (xprt->sc_sq_depth < atomic_read(&xprt->sc_sq_count) + wr_count) {
64652 spin_unlock_bh(&xprt->sc_lock);
64653 @@ -131801,7 +157734,7 @@ index ed98c1f..f74b659 100644
64654 int mode = (table->mode >> 6) & 7;
64655 return (mode << 6) | (mode << 3) | mode;
64656 diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
64657 -index 1eadc95..f6ccd08 100644
64658 +index 2c016fd..68f02f3 100644
64659 --- a/net/tipc/netlink_compat.c
64660 +++ b/net/tipc/netlink_compat.c
64661 @@ -65,13 +65,13 @@ struct tipc_nl_compat_cmd_dump {
64662 @@ -131843,7 +157776,7 @@ index 1eadc95..f6ccd08 100644
64663
64664 kfree_skb(args);
64665 diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
64666 -index 69ee2ee..3352a8d 100644
64667 +index f9ff73a..2f69dd4 100644
64668 --- a/net/tipc/subscr.c
64669 +++ b/net/tipc/subscr.c
64670 @@ -75,7 +75,7 @@ static void tipc_subscrp_send_event(struct tipc_subscription *sub,
64671 @@ -131856,7 +157789,7 @@ index 69ee2ee..3352a8d 100644
64672 sub->evt.event = htohl(event, sub->swap);
64673 sub->evt.found_lower = htohl(found_lower, sub->swap);
64674 diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
64675 -index 898a53a..5a23004 100644
64676 +index f75f847..3388f3a 100644
64677 --- a/net/unix/af_unix.c
64678 +++ b/net/unix/af_unix.c
64679 @@ -919,6 +919,12 @@ static struct sock *unix_find_other(struct net *net,
64680 @@ -131906,7 +157839,7 @@ index 898a53a..5a23004 100644
64681 return err;
64682 }
64683
64684 -@@ -2806,9 +2825,13 @@ static int unix_seq_show(struct seq_file *seq, void *v)
64685 +@@ -2814,9 +2833,13 @@ static int unix_seq_show(struct seq_file *seq, void *v)
64686 seq_puts(seq, "Num RefCount Protocol Flags Type St "
64687 "Inode Path\n");
64688 else {
64689 @@ -131921,7 +157854,7 @@ index 898a53a..5a23004 100644
64690
64691 seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu",
64692 s,
64693 -@@ -2833,10 +2856,29 @@ static int unix_seq_show(struct seq_file *seq, void *v)
64694 +@@ -2841,10 +2864,29 @@ static int unix_seq_show(struct seq_file *seq, void *v)
64695 seq_putc(seq, '@');
64696 i++;
64697 }
64698 @@ -131982,13 +157915,13 @@ index b3d5150..ff3a837 100644
64699 table = kmemdup(unix_table, sizeof(unix_table), GFP_KERNEL);
64700 if (table == NULL)
64701 diff --git a/net/vmw_vsock/vmci_transport_notify.c b/net/vmw_vsock/vmci_transport_notify.c
64702 -index 9b7f207..2596621 100644
64703 +index fd8cf02..1406db4 100644
64704 --- a/net/vmw_vsock/vmci_transport_notify.c
64705 +++ b/net/vmw_vsock/vmci_transport_notify.c
64706 @@ -662,19 +662,19 @@ static void vmci_transport_notify_pkt_process_negotiate(struct sock *sk)
64707
64708 /* Socket control packet based operations. */
64709 - struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops = {
64710 + const struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops = {
64711 - vmci_transport_notify_pkt_socket_init,
64712 - vmci_transport_notify_pkt_socket_destruct,
64713 - vmci_transport_notify_pkt_poll_in,
64714 @@ -132021,13 +157954,13 @@ index 9b7f207..2596621 100644
64715 + .process_negotiate = vmci_transport_notify_pkt_process_negotiate,
64716 };
64717 diff --git a/net/vmw_vsock/vmci_transport_notify_qstate.c b/net/vmw_vsock/vmci_transport_notify_qstate.c
64718 -index dc9c792..3089de0 100644
64719 +index 21e591d..f3a0afc 100644
64720 --- a/net/vmw_vsock/vmci_transport_notify_qstate.c
64721 +++ b/net/vmw_vsock/vmci_transport_notify_qstate.c
64722 @@ -420,19 +420,19 @@ vmci_transport_notify_pkt_send_pre_enqueue(
64723
64724 /* Socket always on control packet based operations. */
64725 - struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops = {
64726 + const struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops = {
64727 - vmci_transport_notify_pkt_socket_init,
64728 - vmci_transport_notify_pkt_socket_destruct,
64729 - vmci_transport_notify_pkt_poll_in,
64730 @@ -132059,6 +157992,413 @@ index dc9c792..3089de0 100644
64731 + .process_request = vmci_transport_notify_pkt_process_request,
64732 + .process_negotiate = vmci_transport_notify_pkt_process_negotiate,
64733 };
64734 +diff --git a/net/wireless/scan.c b/net/wireless/scan.c
64735 +index 14d5369..7142d8e 100644
64736 +--- a/net/wireless/scan.c
64737 ++++ b/net/wireless/scan.c
64738 +@@ -1651,8 +1651,9 @@ static int ieee80211_scan_results(struct cfg80211_registered_device *rdev,
64739 +
64740 + int cfg80211_wext_giwscan(struct net_device *dev,
64741 + struct iw_request_info *info,
64742 +- struct iw_point *data, char *extra)
64743 ++ union iwreq_data *wrqu, char *extra)
64744 + {
64745 ++ struct iw_point *data = &wrqu->data;
64746 + struct cfg80211_registered_device *rdev;
64747 + int res;
64748 +
64749 +diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
64750 +index fd68283..0681bb2 100644
64751 +--- a/net/wireless/wext-compat.c
64752 ++++ b/net/wireless/wext-compat.c
64753 +@@ -23,8 +23,9 @@
64754 +
64755 + int cfg80211_wext_giwname(struct net_device *dev,
64756 + struct iw_request_info *info,
64757 +- char *name, char *extra)
64758 ++ union iwreq_data *wrqu, char *extra)
64759 + {
64760 ++ char *name = wrqu->name;
64761 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64762 + struct ieee80211_supported_band *sband;
64763 + bool is_ht = false, is_a = false, is_b = false, is_g = false;
64764 +@@ -66,8 +67,9 @@ int cfg80211_wext_giwname(struct net_device *dev,
64765 + EXPORT_WEXT_HANDLER(cfg80211_wext_giwname);
64766 +
64767 + int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
64768 +- u32 *mode, char *extra)
64769 ++ union iwreq_data *wrqu, char *extra)
64770 + {
64771 ++ u32 *mode = &wrqu->mode;
64772 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64773 + struct cfg80211_registered_device *rdev;
64774 + struct vif_params vifparams;
64775 +@@ -102,8 +104,9 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
64776 + EXPORT_WEXT_HANDLER(cfg80211_wext_siwmode);
64777 +
64778 + int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
64779 +- u32 *mode, char *extra)
64780 ++ union iwreq_data *wrqu, char *extra)
64781 + {
64782 ++ u32 *mode = &wrqu->mode;
64783 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64784 +
64785 + if (!wdev)
64786 +@@ -139,8 +142,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_giwmode);
64787 +
64788 + int cfg80211_wext_giwrange(struct net_device *dev,
64789 + struct iw_request_info *info,
64790 +- struct iw_point *data, char *extra)
64791 ++ union iwreq_data *wrqu, char *extra)
64792 + {
64793 ++ struct iw_point *data = &wrqu->data;
64794 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64795 + struct iw_range *range = (struct iw_range *) extra;
64796 + enum ieee80211_band band;
64797 +@@ -283,8 +287,9 @@ int cfg80211_wext_freq(struct iw_freq *freq)
64798 +
64799 + int cfg80211_wext_siwrts(struct net_device *dev,
64800 + struct iw_request_info *info,
64801 +- struct iw_param *rts, char *extra)
64802 ++ union iwreq_data *wrqu, char *extra)
64803 + {
64804 ++ struct iw_param *rts = &wrqu->rts;
64805 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64806 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64807 + u32 orts = wdev->wiphy->rts_threshold;
64808 +@@ -307,8 +312,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_siwrts);
64809 +
64810 + int cfg80211_wext_giwrts(struct net_device *dev,
64811 + struct iw_request_info *info,
64812 +- struct iw_param *rts, char *extra)
64813 ++ union iwreq_data *wrqu, char *extra)
64814 + {
64815 ++ struct iw_param *rts = &wrqu->rts;
64816 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64817 +
64818 + rts->value = wdev->wiphy->rts_threshold;
64819 +@@ -321,8 +327,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_giwrts);
64820 +
64821 + int cfg80211_wext_siwfrag(struct net_device *dev,
64822 + struct iw_request_info *info,
64823 +- struct iw_param *frag, char *extra)
64824 ++ union iwreq_data *wrqu, char *extra)
64825 + {
64826 ++ struct iw_param *frag = &wrqu->frag;
64827 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64828 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64829 + u32 ofrag = wdev->wiphy->frag_threshold;
64830 +@@ -347,8 +354,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_siwfrag);
64831 +
64832 + int cfg80211_wext_giwfrag(struct net_device *dev,
64833 + struct iw_request_info *info,
64834 +- struct iw_param *frag, char *extra)
64835 ++ union iwreq_data *wrqu, char *extra)
64836 + {
64837 ++ struct iw_param *frag = &wrqu->frag;
64838 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64839 +
64840 + frag->value = wdev->wiphy->frag_threshold;
64841 +@@ -361,8 +369,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_giwfrag);
64842 +
64843 + static int cfg80211_wext_siwretry(struct net_device *dev,
64844 + struct iw_request_info *info,
64845 +- struct iw_param *retry, char *extra)
64846 ++ union iwreq_data *wrqu, char *extra)
64847 + {
64848 ++ struct iw_param *retry = &wrqu->retry;
64849 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64850 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64851 + u32 changed = 0;
64852 +@@ -401,8 +410,9 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
64853 +
64854 + int cfg80211_wext_giwretry(struct net_device *dev,
64855 + struct iw_request_info *info,
64856 +- struct iw_param *retry, char *extra)
64857 ++ union iwreq_data *wrqu, char *extra)
64858 + {
64859 ++ struct iw_param *retry = &wrqu->retry;
64860 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64861 +
64862 + retry->disabled = 0;
64863 +@@ -586,8 +596,9 @@ static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
64864 +
64865 + static int cfg80211_wext_siwencode(struct net_device *dev,
64866 + struct iw_request_info *info,
64867 +- struct iw_point *erq, char *keybuf)
64868 ++ union iwreq_data *wrqu, char *keybuf)
64869 + {
64870 ++ struct iw_point *erq = &wrqu->encoding;
64871 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64872 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64873 + int idx, err;
64874 +@@ -646,8 +657,9 @@ static int cfg80211_wext_siwencode(struct net_device *dev,
64875 +
64876 + static int cfg80211_wext_siwencodeext(struct net_device *dev,
64877 + struct iw_request_info *info,
64878 +- struct iw_point *erq, char *extra)
64879 ++ union iwreq_data *wrqu, char *extra)
64880 + {
64881 ++ struct iw_point *erq = &wrqu->encoding;
64882 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64883 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64884 + struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
64885 +@@ -737,8 +749,9 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev,
64886 +
64887 + static int cfg80211_wext_giwencode(struct net_device *dev,
64888 + struct iw_request_info *info,
64889 +- struct iw_point *erq, char *keybuf)
64890 ++ union iwreq_data *wrqu, char *keybuf)
64891 + {
64892 ++ struct iw_point *erq = &wrqu->encoding;
64893 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64894 + int idx;
64895 +
64896 +@@ -774,8 +787,9 @@ static int cfg80211_wext_giwencode(struct net_device *dev,
64897 +
64898 + static int cfg80211_wext_siwfreq(struct net_device *dev,
64899 + struct iw_request_info *info,
64900 +- struct iw_freq *wextfreq, char *extra)
64901 ++ union iwreq_data *wrqu, char *extra)
64902 + {
64903 ++ struct iw_freq *wextfreq = &wrqu->freq;
64904 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64905 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64906 + struct cfg80211_chan_def chandef = {
64907 +@@ -817,8 +831,9 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
64908 +
64909 + static int cfg80211_wext_giwfreq(struct net_device *dev,
64910 + struct iw_request_info *info,
64911 +- struct iw_freq *freq, char *extra)
64912 ++ union iwreq_data *wrqu, char *extra)
64913 + {
64914 ++ struct iw_freq *freq = &wrqu->freq;
64915 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64916 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64917 + struct cfg80211_chan_def chandef;
64918 +@@ -1076,8 +1091,9 @@ static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt)
64919 +
64920 + static int cfg80211_wext_siwauth(struct net_device *dev,
64921 + struct iw_request_info *info,
64922 +- struct iw_param *data, char *extra)
64923 ++ union iwreq_data *wrqu, char *extra)
64924 + {
64925 ++ struct iw_param *data = &wrqu->param;
64926 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64927 +
64928 + if (wdev->iftype != NL80211_IFTYPE_STATION)
64929 +@@ -1109,7 +1125,7 @@ static int cfg80211_wext_siwauth(struct net_device *dev,
64930 +
64931 + static int cfg80211_wext_giwauth(struct net_device *dev,
64932 + struct iw_request_info *info,
64933 +- struct iw_param *data, char *extra)
64934 ++ union iwreq_data *wrqu, char *extra)
64935 + {
64936 + /* XXX: what do we need? */
64937 +
64938 +@@ -1118,8 +1134,9 @@ static int cfg80211_wext_giwauth(struct net_device *dev,
64939 +
64940 + static int cfg80211_wext_siwpower(struct net_device *dev,
64941 + struct iw_request_info *info,
64942 +- struct iw_param *wrq, char *extra)
64943 ++ union iwreq_data *wrqu, char *extra)
64944 + {
64945 ++ struct iw_param *wrq = &wrqu->power;
64946 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64947 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64948 + bool ps = wdev->ps;
64949 +@@ -1165,8 +1182,9 @@ static int cfg80211_wext_siwpower(struct net_device *dev,
64950 +
64951 + static int cfg80211_wext_giwpower(struct net_device *dev,
64952 + struct iw_request_info *info,
64953 +- struct iw_param *wrq, char *extra)
64954 ++ union iwreq_data *wrqu, char *extra)
64955 + {
64956 ++ struct iw_param *wrq = &wrqu->power;
64957 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64958 +
64959 + wrq->disabled = !wdev->ps;
64960 +@@ -1220,8 +1238,9 @@ static int cfg80211_wds_wext_giwap(struct net_device *dev,
64961 +
64962 + static int cfg80211_wext_siwrate(struct net_device *dev,
64963 + struct iw_request_info *info,
64964 +- struct iw_param *rate, char *extra)
64965 ++ union iwreq_data *wrqu, char *extra)
64966 + {
64967 ++ struct iw_param *rate = &wrqu->bitrate;
64968 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64969 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64970 + struct cfg80211_bitrate_mask mask;
64971 +@@ -1271,8 +1290,9 @@ static int cfg80211_wext_siwrate(struct net_device *dev,
64972 +
64973 + static int cfg80211_wext_giwrate(struct net_device *dev,
64974 + struct iw_request_info *info,
64975 +- struct iw_param *rate, char *extra)
64976 ++ union iwreq_data *wrqu, char *extra)
64977 + {
64978 ++ struct iw_param *rate = &wrqu->bitrate;
64979 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64980 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
64981 + /* we are under RTNL - globally locked - so can use a static struct */
64982 +@@ -1379,8 +1399,9 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
64983 +
64984 + static int cfg80211_wext_siwap(struct net_device *dev,
64985 + struct iw_request_info *info,
64986 +- struct sockaddr *ap_addr, char *extra)
64987 ++ union iwreq_data *wrqu, char *extra)
64988 + {
64989 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
64990 + struct wireless_dev *wdev = dev->ieee80211_ptr;
64991 +
64992 + switch (wdev->iftype) {
64993 +@@ -1397,8 +1418,9 @@ static int cfg80211_wext_siwap(struct net_device *dev,
64994 +
64995 + static int cfg80211_wext_giwap(struct net_device *dev,
64996 + struct iw_request_info *info,
64997 +- struct sockaddr *ap_addr, char *extra)
64998 ++ union iwreq_data *wrqu, char *extra)
64999 + {
65000 ++ struct sockaddr *ap_addr = &wrqu->ap_addr;
65001 + struct wireless_dev *wdev = dev->ieee80211_ptr;
65002 +
65003 + switch (wdev->iftype) {
65004 +@@ -1415,8 +1437,9 @@ static int cfg80211_wext_giwap(struct net_device *dev,
65005 +
65006 + static int cfg80211_wext_siwessid(struct net_device *dev,
65007 + struct iw_request_info *info,
65008 +- struct iw_point *data, char *ssid)
65009 ++ union iwreq_data *wrqu, char *ssid)
65010 + {
65011 ++ struct iw_point *data = &wrqu->data;
65012 + struct wireless_dev *wdev = dev->ieee80211_ptr;
65013 +
65014 + switch (wdev->iftype) {
65015 +@@ -1431,8 +1454,9 @@ static int cfg80211_wext_siwessid(struct net_device *dev,
65016 +
65017 + static int cfg80211_wext_giwessid(struct net_device *dev,
65018 + struct iw_request_info *info,
65019 +- struct iw_point *data, char *ssid)
65020 ++ union iwreq_data *wrqu, char *ssid)
65021 + {
65022 ++ struct iw_point *data = &wrqu->data;
65023 + struct wireless_dev *wdev = dev->ieee80211_ptr;
65024 +
65025 + data->flags = 0;
65026 +@@ -1450,7 +1474,7 @@ static int cfg80211_wext_giwessid(struct net_device *dev,
65027 +
65028 + static int cfg80211_wext_siwpmksa(struct net_device *dev,
65029 + struct iw_request_info *info,
65030 +- struct iw_point *data, char *extra)
65031 ++ union iwreq_data *wrqu, char *extra)
65032 + {
65033 + struct wireless_dev *wdev = dev->ieee80211_ptr;
65034 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
65035 +@@ -1490,38 +1514,38 @@ static int cfg80211_wext_siwpmksa(struct net_device *dev,
65036 + }
65037 +
65038 + static const iw_handler cfg80211_handlers[] = {
65039 +- [IW_IOCTL_IDX(SIOCGIWNAME)] = (iw_handler) cfg80211_wext_giwname,
65040 +- [IW_IOCTL_IDX(SIOCSIWFREQ)] = (iw_handler) cfg80211_wext_siwfreq,
65041 +- [IW_IOCTL_IDX(SIOCGIWFREQ)] = (iw_handler) cfg80211_wext_giwfreq,
65042 +- [IW_IOCTL_IDX(SIOCSIWMODE)] = (iw_handler) cfg80211_wext_siwmode,
65043 +- [IW_IOCTL_IDX(SIOCGIWMODE)] = (iw_handler) cfg80211_wext_giwmode,
65044 +- [IW_IOCTL_IDX(SIOCGIWRANGE)] = (iw_handler) cfg80211_wext_giwrange,
65045 +- [IW_IOCTL_IDX(SIOCSIWAP)] = (iw_handler) cfg80211_wext_siwap,
65046 +- [IW_IOCTL_IDX(SIOCGIWAP)] = (iw_handler) cfg80211_wext_giwap,
65047 +- [IW_IOCTL_IDX(SIOCSIWMLME)] = (iw_handler) cfg80211_wext_siwmlme,
65048 +- [IW_IOCTL_IDX(SIOCSIWSCAN)] = (iw_handler) cfg80211_wext_siwscan,
65049 +- [IW_IOCTL_IDX(SIOCGIWSCAN)] = (iw_handler) cfg80211_wext_giwscan,
65050 +- [IW_IOCTL_IDX(SIOCSIWESSID)] = (iw_handler) cfg80211_wext_siwessid,
65051 +- [IW_IOCTL_IDX(SIOCGIWESSID)] = (iw_handler) cfg80211_wext_giwessid,
65052 +- [IW_IOCTL_IDX(SIOCSIWRATE)] = (iw_handler) cfg80211_wext_siwrate,
65053 +- [IW_IOCTL_IDX(SIOCGIWRATE)] = (iw_handler) cfg80211_wext_giwrate,
65054 +- [IW_IOCTL_IDX(SIOCSIWRTS)] = (iw_handler) cfg80211_wext_siwrts,
65055 +- [IW_IOCTL_IDX(SIOCGIWRTS)] = (iw_handler) cfg80211_wext_giwrts,
65056 +- [IW_IOCTL_IDX(SIOCSIWFRAG)] = (iw_handler) cfg80211_wext_siwfrag,
65057 +- [IW_IOCTL_IDX(SIOCGIWFRAG)] = (iw_handler) cfg80211_wext_giwfrag,
65058 +- [IW_IOCTL_IDX(SIOCSIWTXPOW)] = (iw_handler) cfg80211_wext_siwtxpower,
65059 +- [IW_IOCTL_IDX(SIOCGIWTXPOW)] = (iw_handler) cfg80211_wext_giwtxpower,
65060 +- [IW_IOCTL_IDX(SIOCSIWRETRY)] = (iw_handler) cfg80211_wext_siwretry,
65061 +- [IW_IOCTL_IDX(SIOCGIWRETRY)] = (iw_handler) cfg80211_wext_giwretry,
65062 +- [IW_IOCTL_IDX(SIOCSIWENCODE)] = (iw_handler) cfg80211_wext_siwencode,
65063 +- [IW_IOCTL_IDX(SIOCGIWENCODE)] = (iw_handler) cfg80211_wext_giwencode,
65064 +- [IW_IOCTL_IDX(SIOCSIWPOWER)] = (iw_handler) cfg80211_wext_siwpower,
65065 +- [IW_IOCTL_IDX(SIOCGIWPOWER)] = (iw_handler) cfg80211_wext_giwpower,
65066 +- [IW_IOCTL_IDX(SIOCSIWGENIE)] = (iw_handler) cfg80211_wext_siwgenie,
65067 +- [IW_IOCTL_IDX(SIOCSIWAUTH)] = (iw_handler) cfg80211_wext_siwauth,
65068 +- [IW_IOCTL_IDX(SIOCGIWAUTH)] = (iw_handler) cfg80211_wext_giwauth,
65069 +- [IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= (iw_handler) cfg80211_wext_siwencodeext,
65070 +- [IW_IOCTL_IDX(SIOCSIWPMKSA)] = (iw_handler) cfg80211_wext_siwpmksa,
65071 ++ [IW_IOCTL_IDX(SIOCGIWNAME)] = cfg80211_wext_giwname,
65072 ++ [IW_IOCTL_IDX(SIOCSIWFREQ)] = cfg80211_wext_siwfreq,
65073 ++ [IW_IOCTL_IDX(SIOCGIWFREQ)] = cfg80211_wext_giwfreq,
65074 ++ [IW_IOCTL_IDX(SIOCSIWMODE)] = cfg80211_wext_siwmode,
65075 ++ [IW_IOCTL_IDX(SIOCGIWMODE)] = cfg80211_wext_giwmode,
65076 ++ [IW_IOCTL_IDX(SIOCGIWRANGE)] = cfg80211_wext_giwrange,
65077 ++ [IW_IOCTL_IDX(SIOCSIWAP)] = cfg80211_wext_siwap,
65078 ++ [IW_IOCTL_IDX(SIOCGIWAP)] = cfg80211_wext_giwap,
65079 ++ [IW_IOCTL_IDX(SIOCSIWMLME)] = cfg80211_wext_siwmlme,
65080 ++ [IW_IOCTL_IDX(SIOCSIWSCAN)] = cfg80211_wext_siwscan,
65081 ++ [IW_IOCTL_IDX(SIOCGIWSCAN)] = cfg80211_wext_giwscan,
65082 ++ [IW_IOCTL_IDX(SIOCSIWESSID)] = cfg80211_wext_siwessid,
65083 ++ [IW_IOCTL_IDX(SIOCGIWESSID)] = cfg80211_wext_giwessid,
65084 ++ [IW_IOCTL_IDX(SIOCSIWRATE)] = cfg80211_wext_siwrate,
65085 ++ [IW_IOCTL_IDX(SIOCGIWRATE)] = cfg80211_wext_giwrate,
65086 ++ [IW_IOCTL_IDX(SIOCSIWRTS)] = cfg80211_wext_siwrts,
65087 ++ [IW_IOCTL_IDX(SIOCGIWRTS)] = cfg80211_wext_giwrts,
65088 ++ [IW_IOCTL_IDX(SIOCSIWFRAG)] = cfg80211_wext_siwfrag,
65089 ++ [IW_IOCTL_IDX(SIOCGIWFRAG)] = cfg80211_wext_giwfrag,
65090 ++ [IW_IOCTL_IDX(SIOCSIWTXPOW)] = cfg80211_wext_siwtxpower,
65091 ++ [IW_IOCTL_IDX(SIOCGIWTXPOW)] = cfg80211_wext_giwtxpower,
65092 ++ [IW_IOCTL_IDX(SIOCSIWRETRY)] = cfg80211_wext_siwretry,
65093 ++ [IW_IOCTL_IDX(SIOCGIWRETRY)] = cfg80211_wext_giwretry,
65094 ++ [IW_IOCTL_IDX(SIOCSIWENCODE)] = cfg80211_wext_siwencode,
65095 ++ [IW_IOCTL_IDX(SIOCGIWENCODE)] = cfg80211_wext_giwencode,
65096 ++ [IW_IOCTL_IDX(SIOCSIWPOWER)] = cfg80211_wext_siwpower,
65097 ++ [IW_IOCTL_IDX(SIOCGIWPOWER)] = cfg80211_wext_giwpower,
65098 ++ [IW_IOCTL_IDX(SIOCSIWGENIE)] = cfg80211_wext_siwgenie,
65099 ++ [IW_IOCTL_IDX(SIOCSIWAUTH)] = cfg80211_wext_siwauth,
65100 ++ [IW_IOCTL_IDX(SIOCGIWAUTH)] = cfg80211_wext_giwauth,
65101 ++ [IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= cfg80211_wext_siwencodeext,
65102 ++ [IW_IOCTL_IDX(SIOCSIWPMKSA)] = cfg80211_wext_siwpmksa,
65103 + };
65104 +
65105 + const struct iw_handler_def cfg80211_wext_handler = {
65106 +diff --git a/net/wireless/wext-compat.h b/net/wireless/wext-compat.h
65107 +index 94c7405..499cca4 100644
65108 +--- a/net/wireless/wext-compat.h
65109 ++++ b/net/wireless/wext-compat.h
65110 +@@ -12,7 +12,7 @@
65111 +
65112 + int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
65113 + struct iw_request_info *info,
65114 +- struct iw_freq *freq, char *extra);
65115 ++ struct iw_freq *wextfreq, char *extra);
65116 + int cfg80211_ibss_wext_giwfreq(struct net_device *dev,
65117 + struct iw_request_info *info,
65118 + struct iw_freq *freq, char *extra);
65119 +@@ -31,7 +31,7 @@ int cfg80211_ibss_wext_giwessid(struct net_device *dev,
65120 +
65121 + int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
65122 + struct iw_request_info *info,
65123 +- struct iw_freq *freq, char *extra);
65124 ++ struct iw_freq *wextfreq, char *extra);
65125 + int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
65126 + struct iw_request_info *info,
65127 + struct iw_freq *freq, char *extra);
65128 +@@ -50,10 +50,10 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
65129 +
65130 + int cfg80211_wext_siwmlme(struct net_device *dev,
65131 + struct iw_request_info *info,
65132 +- struct iw_point *data, char *extra);
65133 ++ union iwreq_data *wrqu, char *extra);
65134 + int cfg80211_wext_siwgenie(struct net_device *dev,
65135 + struct iw_request_info *info,
65136 +- struct iw_point *data, char *extra);
65137 ++ union iwreq_data *wrqu, char *extra);
65138 +
65139 +
65140 + int cfg80211_wext_freq(struct iw_freq *freq);
65141 diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
65142 index b50ee5d..ccf70ab 100644
65143 --- a/net/wireless/wext-core.c
65144 @@ -132096,6 +158436,30 @@ index b50ee5d..ccf70ab 100644
65145 err = handler(dev, info, (union iwreq_data *) iwp, extra);
65146
65147 iwp->length += essid_compat;
65148 +diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
65149 +index a4e8af3..f8c0e76 100644
65150 +--- a/net/wireless/wext-sme.c
65151 ++++ b/net/wireless/wext-sme.c
65152 +@@ -330,8 +330,9 @@ int cfg80211_mgd_wext_giwap(struct net_device *dev,
65153 +
65154 + int cfg80211_wext_siwgenie(struct net_device *dev,
65155 + struct iw_request_info *info,
65156 +- struct iw_point *data, char *extra)
65157 ++ union iwreq_data *wrqu, char *extra)
65158 + {
65159 ++ struct iw_point *data = &wrqu->data;
65160 + struct wireless_dev *wdev = dev->ieee80211_ptr;
65161 + struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
65162 + u8 *ie = extra;
65163 +@@ -380,7 +381,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
65164 +
65165 + int cfg80211_wext_siwmlme(struct net_device *dev,
65166 + struct iw_request_info *info,
65167 +- struct iw_point *data, char *extra)
65168 ++ union iwreq_data *wrqu, char *extra)
65169 + {
65170 + struct wireless_dev *wdev = dev->ieee80211_ptr;
65171 + struct iw_mlme *mlme = (struct iw_mlme *)extra;
65172 diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
65173 index 4323952..a06dfe1 100644
65174 --- a/net/x25/sysctl_net_x25.c
65175 @@ -132367,7 +158731,7 @@ index 1db6d73..0819042 100644
65176 # ld-option
65177 # Usage: LDFLAGS += $(call ld-option, -X)
65178 diff --git a/scripts/Makefile.build b/scripts/Makefile.build
65179 -index 01df30a..b687dbf 100644
65180 +index 2c47f9c..9d46008 100644
65181 --- a/scripts/Makefile.build
65182 +++ b/scripts/Makefile.build
65183 @@ -60,7 +60,7 @@ endif
65184 @@ -132394,12 +158758,12 @@ index 55c96cb..e4e88ab 100644
65185 __clean-files := $(filter-out $(no-clean-files), $(__clean-files))
65186
65187 diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
65188 -index 4efedcb..0220ab2 100644
65189 +index f9e47a7..b72022a 100644
65190 --- a/scripts/Makefile.extrawarn
65191 +++ b/scripts/Makefile.extrawarn
65192 -@@ -26,6 +26,10 @@ warning-1 += $(call cc-option, -Wmissing-include-dirs)
65193 - warning-1 += $(call cc-option, -Wunused-but-set-variable)
65194 +@@ -27,6 +27,10 @@ warning-1 += $(call cc-option, -Wunused-but-set-variable)
65195 warning-1 += $(call cc-disable-warning, missing-field-initializers)
65196 + warning-1 += $(call cc-disable-warning, sign-compare)
65197
65198 +#warning-1 += $(call cc-option, -Wnull-dereference)
65199 +warning-1 += $(call cc-option, -Wduplicated-cond)
65200 @@ -132410,11 +158774,10 @@ index 4efedcb..0220ab2 100644
65201 warning-2 += -Wdisabled-optimization
65202 diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins
65203 new file mode 100644
65204 -index 0000000..2972943
65205 +index 0000000..02fd848
65206 --- /dev/null
65207 +++ b/scripts/Makefile.gcc-plugins
65208 -@@ -0,0 +1,72 @@
65209 -+ifndef DISABLE_PAX_PLUGINS
65210 +@@ -0,0 +1,69 @@
65211 +__PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
65212 +PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
65213 +ifneq ($(PLUGINCC),)
65214 @@ -132433,12 +158796,6 @@ index 0000000..2972943
65215 +KERNEXEC_PLUGIN_CFLAGS += -fplugin-arg-kernexec_plugin-method=$(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD) -DKERNEXEC_PLUGIN
65216 +KERNEXEC_PLUGIN_AFLAGS := -DKERNEXEC_PLUGIN
65217 +endif
65218 -+ifdef CONFIG_GRKERNSEC_RANDSTRUCT
65219 -+RANDSTRUCT_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/randomize_layout_plugin.so -DRANDSTRUCT_PLUGIN
65220 -+ifdef CONFIG_GRKERNSEC_RANDSTRUCT_PERFORMANCE
65221 -+RANDSTRUCT_PLUGIN_CFLAGS += -fplugin-arg-randomize_layout_plugin-performance-mode
65222 -+endif
65223 -+endif
65224 +ifdef CONFIG_CHECKER_PLUGIN
65225 +ifeq ($(call cc-ifversion, -ge, 0406, y), y)
65226 +CHECKER_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN
65227 @@ -132461,13 +158818,19 @@ index 0000000..2972943
65228 +STRUCTLEAK_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/structleak_plugin.so -DSTRUCTLEAK_PLUGIN
65229 +endif
65230 +INITIFY_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/initify_plugin.so -DINITIFY_PLUGIN
65231 ++ifdef CONFIG_PAX_RAP
65232 ++RAP_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/rap_plugin/rap_plugin.so -fplugin-arg-rap_plugin-check=call -DRAP_PLUGIN
65233 ++#RAP_PLUGIN_CFLAGS += -fplugin-arg-rap_plugin-report=func,fptr,abs
65234 ++RAP_PLUGIN_ABS_CFLAGS := -fplugin-arg-rap_plugin-hash=abs-finish
65235 ++RAP_PLUGIN_AFLAGS := -DRAP_PLUGIN
65236 ++endif
65237 +GCC_PLUGINS_CFLAGS := $(CONSTIFY_PLUGIN_CFLAGS) $(STACKLEAK_PLUGIN_CFLAGS) $(KALLOCSTAT_PLUGIN_CFLAGS)
65238 +GCC_PLUGINS_CFLAGS += $(KERNEXEC_PLUGIN_CFLAGS) $(CHECKER_PLUGIN_CFLAGS) $(COLORIZE_PLUGIN_CFLAGS)
65239 +GCC_PLUGINS_CFLAGS += $(SIZE_OVERFLOW_PLUGIN_CFLAGS) $(LATENT_ENTROPY_PLUGIN_CFLAGS) $(STRUCTLEAK_PLUGIN_CFLAGS)
65240 +GCC_PLUGINS_CFLAGS += $(INITIFY_PLUGIN_CFLAGS)
65241 -+GCC_PLUGINS_CFLAGS += $(RANDSTRUCT_PLUGIN_CFLAGS)
65242 -+GCC_PLUGINS_AFLAGS := $(KERNEXEC_PLUGIN_AFLAGS)
65243 -+export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS CONSTIFY_PLUGIN LATENT_ENTROPY_PLUGIN_CFLAGS
65244 ++GCC_PLUGINS_CFLAGS += $(RAP_PLUGIN_CFLAGS) $(RAP_PLUGIN_ABS_CFLAGS)
65245 ++GCC_PLUGINS_AFLAGS := $(KERNEXEC_PLUGIN_AFLAGS) $(RAP_PLUGIN_AFLAGS)
65246 ++export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS CONSTIFY_PLUGIN LATENT_ENTROPY_PLUGIN_CFLAGS RAP_PLUGIN_CFLAGS RAP_PLUGIN_ABS_CFLAGS
65247 +ifeq ($(KBUILD_EXTMOD),)
65248 +gcc-plugins:
65249 + $(Q)$(MAKE) $(build)=tools/gcc
65250 @@ -132477,15 +158840,13 @@ index 0000000..2972943
65251 +else
65252 +gcc-plugins:
65253 +ifeq ($(call cc-ifversion, -ge, 0405, y), y)
65254 -+ $(error Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev. If you choose to ignore this error and lessen the improvements provided by this patch, re-run make with the DISABLE_PAX_PLUGINS=y argument.)
65255 ++ $(warning warning, your gcc installation does not support plugins, perhaps the necessary headers are missing?)
65256 + $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)"
65257 +else
65258 -+ $(warning Warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least.)
65259 -+endif
65260 -+ $(warning PAX_MEMORY_STACKLEAK, constification, PAX_LATENT_ENTROPY and other features will be less secure. PAX_SIZE_OVERFLOW will not be active.)
65261 ++ $(warning warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least)
65262 +endif
65263 ++ $(warning PAX_MEMORY_STACKLEAK and other features will be less secure)
65264 +endif
65265 -+
65266 diff --git a/scripts/Makefile.host b/scripts/Makefile.host
65267 index 133edfa..3cc6af2 100644
65268 --- a/scripts/Makefile.host
65269 @@ -132586,7 +158947,7 @@ index 133edfa..3cc6af2 100644
65270 - $(host-cxxmulti) $(host-cxxobjs)
65271 + $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) $(host-cxxshlib) $(host-cxxshobjs)
65272 diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
65273 -index c68fd61..f9a3b74 100644
65274 +index 5b327c6..f7bdbac 100644
65275 --- a/scripts/basic/fixdep.c
65276 +++ b/scripts/basic/fixdep.c
65277 @@ -161,7 +161,7 @@ static unsigned int strhash(const char *str, unsigned int sz)
65278 @@ -132902,7 +159263,7 @@ index 91ca126..5f7cad6 100644
65279 struct gstr str_new(void);
65280 void str_free(struct gstr *gs);
65281 diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
65282 -index b05cc3d..72fb2a8 100644
65283 +index aed678e..1a703de 100644
65284 --- a/scripts/kconfig/menu.c
65285 +++ b/scripts/kconfig/menu.c
65286 @@ -109,7 +109,7 @@ void menu_add_dep(struct expr *dep)
65287 @@ -132952,7 +159313,7 @@ index ba6c34e..ea10bce 100755
65288 kallsymso=""
65289 kallsyms_vmlinux=""
65290 diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
65291 -index 5b96206..fc27edc 100644
65292 +index 161dd0d..ca7a0f1 100644
65293 --- a/scripts/mod/file2alias.c
65294 +++ b/scripts/mod/file2alias.c
65295 @@ -156,7 +156,7 @@ static void device_id_check(const char *modname, const char *device_id,
65296 @@ -133009,7 +159370,7 @@ index 5b96206..fc27edc 100644
65297
65298 buf_printf(&mod->dev_table_buf,
65299 "MODULE_ALIAS(\"pnp:d%s*\");\n", id);
65300 -@@ -981,7 +981,7 @@ static void dmi_ascii_filter(char *d, const char *s)
65301 +@@ -980,7 +980,7 @@ static void dmi_ascii_filter(char *d, const char *s)
65302 static int do_dmi_entry(const char *filename, void *symval,
65303 char *alias)
65304 {
65305 @@ -133019,7 +159380,7 @@ index 5b96206..fc27edc 100644
65306 sprintf(alias, "dmi*");
65307
65308 diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
65309 -index e080746..73f4e65 100644
65310 +index 48958d3..d5ccb52 100644
65311 --- a/scripts/mod/modpost.c
65312 +++ b/scripts/mod/modpost.c
65313 @@ -37,6 +37,7 @@ static int vmlinux_section_warnings = 1;
65314 @@ -133030,7 +159391,7 @@ index e080746..73f4e65 100644
65315 static int sec_mismatch_verbose = 1;
65316 static int sec_mismatch_fatal = 0;
65317 /* ignore missing files */
65318 -@@ -946,6 +947,7 @@ enum mismatch {
65319 +@@ -947,6 +948,7 @@ enum mismatch {
65320 ANY_EXIT_TO_ANY_INIT,
65321 EXPORT_TO_INIT_EXIT,
65322 EXTABLE_TO_NON_TEXT,
65323 @@ -133038,7 +159399,7 @@ index e080746..73f4e65 100644
65324 };
65325
65326 /**
65327 -@@ -1072,6 +1074,12 @@ static const struct sectioncheck sectioncheck[] = {
65328 +@@ -1073,6 +1075,12 @@ static const struct sectioncheck sectioncheck[] = {
65329 .good_tosec = {ALL_TEXT_SECTIONS , NULL},
65330 .mismatch = EXTABLE_TO_NON_TEXT,
65331 .handler = extable_mismatch_handler,
65332 @@ -133051,7 +159412,7 @@ index e080746..73f4e65 100644
65333 }
65334 };
65335
65336 -@@ -1221,10 +1229,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
65337 +@@ -1222,10 +1230,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
65338 continue;
65339 if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
65340 continue;
65341 @@ -133064,7 +159425,7 @@ index e080746..73f4e65 100644
65342 if (d < 0)
65343 d = addr - sym->st_value;
65344 if (d < distance) {
65345 -@@ -1383,7 +1391,11 @@ static void report_sec_mismatch(const char *modname,
65346 +@@ -1384,7 +1392,11 @@ static void report_sec_mismatch(const char *modname,
65347 char *prl_from;
65348 char *prl_to;
65349
65350 @@ -133077,7 +159438,7 @@ index e080746..73f4e65 100644
65351 if (!sec_mismatch_verbose)
65352 return;
65353
65354 -@@ -1507,6 +1519,14 @@ static void report_sec_mismatch(const char *modname,
65355 +@@ -1508,6 +1520,14 @@ static void report_sec_mismatch(const char *modname,
65356 fatal("There's a special handler for this mismatch type, "
65357 "we should never get here.");
65358 break;
65359 @@ -133092,7 +159453,7 @@ index e080746..73f4e65 100644
65360 }
65361 fprintf(stderr, "\n");
65362 }
65363 -@@ -1896,7 +1916,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
65364 +@@ -1897,7 +1917,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
65365 static void check_sec_ref(struct module *mod, const char *modname,
65366 struct elf_info *elf)
65367 {
65368 @@ -133101,7 +159462,7 @@ index e080746..73f4e65 100644
65369 Elf_Shdr *sechdrs = elf->sechdrs;
65370
65371 /* Walk through all sections */
65372 -@@ -2027,7 +2047,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
65373 +@@ -2028,7 +2048,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
65374 va_end(ap);
65375 }
65376
65377 @@ -133110,7 +159471,7 @@ index e080746..73f4e65 100644
65378 {
65379 if (buf->size - buf->pos < len) {
65380 buf->size += len + SZ;
65381 -@@ -2257,7 +2277,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
65382 +@@ -2258,7 +2278,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
65383 if (fstat(fileno(file), &st) < 0)
65384 goto close_write;
65385
65386 @@ -133119,7 +159480,7 @@ index e080746..73f4e65 100644
65387 goto close_write;
65388
65389 tmp = NOFAIL(malloc(b->pos));
65390 -@@ -2495,6 +2515,14 @@ int main(int argc, char **argv)
65391 +@@ -2496,6 +2516,14 @@ int main(int argc, char **argv)
65392 "Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
65393 }
65394 }
65395 @@ -133186,7 +159547,7 @@ index 73a2c7d..df11b31 100644
65396 __ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }
65397 __ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }
65398 diff --git a/scripts/package/Makefile b/scripts/package/Makefile
65399 -index 1aca224..3c71eb0 100644
65400 +index c2c7389..81b8117 100644
65401 --- a/scripts/package/Makefile
65402 +++ b/scripts/package/Makefile
65403 @@ -40,7 +40,7 @@ if test "$(objtree)" != "$(srctree)"; then \
65404 @@ -133329,7 +159690,7 @@ index ba87004..3f4852c 100644
65405 unsigned int secindex_strings;
65406
65407 diff --git a/scripts/tags.sh b/scripts/tags.sh
65408 -index 2628890..1c2f5c6 100755
65409 +index 23ba1c6..cad2484 100755
65410 --- a/scripts/tags.sh
65411 +++ b/scripts/tags.sh
65412 @@ -26,7 +26,7 @@ else
65413 @@ -133342,10 +159703,10 @@ index 2628890..1c2f5c6 100755
65414 # Find all available archs
65415 find_all_archs()
65416 diff --git a/security/Kconfig b/security/Kconfig
65417 -index e452378..d8f5de9 100644
65418 +index e452378..51e3107 100644
65419 --- a/security/Kconfig
65420 +++ b/security/Kconfig
65421 -@@ -4,6 +4,974 @@
65422 +@@ -4,6 +4,987 @@
65423
65424 menu "Security options"
65425
65426 @@ -134307,6 +160668,19 @@ index e452378..d8f5de9 100644
65427 + Note that entropy extracted this way is not cryptographically
65428 + secure!
65429 +
65430 ++config PAX_RAP
65431 ++ bool "Prevent code reuse attacks"
65432 ++ depends on X86_64 && !PARAVIRT
65433 ++ default y if GRKERNSEC_CONFIG_AUTO
65434 ++ help
65435 ++ By saying Y here the kernel will check indirect control transfers
65436 ++ in order to detect and prevent attacks that try to hijack control
65437 ++ flow by overwriting code pointers.
65438 ++
65439 ++ Note that the implementation requires a gcc with plugin support,
65440 ++ i.e., gcc 4.5 or newer. You may need to install the supporting
65441 ++ headers explicitly in addition to the normal gcc package.
65442 ++
65443 +endmenu
65444 +
65445 +endmenu
65446 @@ -134320,7 +160694,7 @@ index e452378..d8f5de9 100644
65447 source security/keys/Kconfig
65448
65449 config SECURITY_DMESG_RESTRICT
65450 -@@ -104,7 +1072,7 @@ config INTEL_TXT
65451 +@@ -104,7 +1085,7 @@ config INTEL_TXT
65452 config LSM_MMAP_MIN_ADDR
65453 int "Low address space for LSM to protect from user allocation"
65454 depends on SECURITY && SECURITY_SELINUX
65455 @@ -134358,7 +160732,7 @@ index c28b0f2..3b9fee0 100644
65456
65457 struct dentry *dents[AAFS_NS_SIZEOF];
65458 diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
65459 -index dec607c..2f291ad9 100644
65460 +index dec607c..37fe357 100644
65461 --- a/security/apparmor/lsm.c
65462 +++ b/security/apparmor/lsm.c
65463 @@ -176,7 +176,7 @@ static int common_perm_dir_dentry(int op, struct path *dir,
65464 @@ -134390,6 +160764,58 @@ index dec607c..2f291ad9 100644
65465 struct path_cond cond = { d_backing_inode(old_dentry)->i_uid,
65466 d_backing_inode(old_dentry)->i_mode
65467 };
65468 +@@ -677,11 +677,11 @@ static const struct kernel_param_ops param_ops_aalockpolicy = {
65469 + .get = param_get_aalockpolicy
65470 + };
65471 +
65472 +-static int param_set_audit(const char *val, struct kernel_param *kp);
65473 +-static int param_get_audit(char *buffer, struct kernel_param *kp);
65474 ++static int param_set_audit(const char *val, const struct kernel_param *kp);
65475 ++static int param_get_audit(char *buffer, const struct kernel_param *kp);
65476 +
65477 +-static int param_set_mode(const char *val, struct kernel_param *kp);
65478 +-static int param_get_mode(char *buffer, struct kernel_param *kp);
65479 ++static int param_set_mode(const char *val, const struct kernel_param *kp);
65480 ++static int param_get_mode(char *buffer, const struct kernel_param *kp);
65481 +
65482 + /* Flag values, also controllable via /sys/module/apparmor/parameters
65483 + * We define special types as we want to do additional mediation.
65484 +@@ -791,7 +791,7 @@ static int param_get_aauint(char *buffer, const struct kernel_param *kp)
65485 + return param_get_uint(buffer, kp);
65486 + }
65487 +
65488 +-static int param_get_audit(char *buffer, struct kernel_param *kp)
65489 ++static int param_get_audit(char *buffer, const struct kernel_param *kp)
65490 + {
65491 + if (!capable(CAP_MAC_ADMIN))
65492 + return -EPERM;
65493 +@@ -802,7 +802,7 @@ static int param_get_audit(char *buffer, struct kernel_param *kp)
65494 + return sprintf(buffer, "%s", audit_mode_names[aa_g_audit]);
65495 + }
65496 +
65497 +-static int param_set_audit(const char *val, struct kernel_param *kp)
65498 ++static int param_set_audit(const char *val, const struct kernel_param *kp)
65499 + {
65500 + int i;
65501 + if (!capable(CAP_MAC_ADMIN))
65502 +@@ -824,7 +824,7 @@ static int param_set_audit(const char *val, struct kernel_param *kp)
65503 + return -EINVAL;
65504 + }
65505 +
65506 +-static int param_get_mode(char *buffer, struct kernel_param *kp)
65507 ++static int param_get_mode(char *buffer, const struct kernel_param *kp)
65508 + {
65509 + if (!capable(CAP_MAC_ADMIN))
65510 + return -EPERM;
65511 +@@ -835,7 +835,7 @@ static int param_get_mode(char *buffer, struct kernel_param *kp)
65512 + return sprintf(buffer, "%s", aa_profile_mode_names[aa_g_profile_mode]);
65513 + }
65514 +
65515 +-static int param_set_mode(const char *val, struct kernel_param *kp)
65516 ++static int param_set_mode(const char *val, const struct kernel_param *kp)
65517 + {
65518 + int i;
65519 + if (!capable(CAP_MAC_ADMIN))
65520 diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
65521 index 705c287..81257f1 100644
65522 --- a/security/apparmor/policy.c
65523 @@ -134460,7 +160886,7 @@ index 48071ed..b805e0f 100644
65524 if (bprm->cap_effective)
65525 return 1;
65526 diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
65527 -index e2a60c3..2e41dd3 100644
65528 +index 585af61..b7d35ff 100644
65529 --- a/security/integrity/ima/ima.h
65530 +++ b/security/integrity/ima/ima.h
65531 @@ -125,8 +125,8 @@ int ima_init_template(void);
65532 @@ -134488,10 +160914,10 @@ index 1d950fb..a8f4eab 100644
65533 result = ima_alloc_init_template(&event_data, &entry);
65534 if (result < 0) {
65535 diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
65536 -index 816d175..20079ae 100644
65537 +index f355231..c71f640 100644
65538 --- a/security/integrity/ima/ima_fs.c
65539 +++ b/security/integrity/ima/ima_fs.c
65540 -@@ -28,12 +28,12 @@
65541 +@@ -30,12 +30,12 @@ static DEFINE_MUTEX(ima_write_mutex);
65542 static int valid_policy = 1;
65543 #define TMPBUFLEN 12
65544 static ssize_t ima_show_htable_value(char __user *buf, size_t count,
65545 @@ -134552,7 +160978,7 @@ index 5105c2c..a5010e6 100644
65546 extern struct key_type key_type_request_key_auth;
65547 extern struct key *request_key_auth_new(struct key *target,
65548 diff --git a/security/keys/key.c b/security/keys/key.c
65549 -index ab7997d..adba677 100644
65550 +index 09ef276..ab2894f 100644
65551 --- a/security/keys/key.c
65552 +++ b/security/keys/key.c
65553 @@ -283,7 +283,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
65554 @@ -134564,7 +160990,7 @@ index ab7997d..adba677 100644
65555 key->index_key.type = type;
65556 key->user = user;
65557 key->quotalen = quotalen;
65558 -@@ -1073,7 +1073,9 @@ int register_key_type(struct key_type *ktype)
65559 +@@ -1077,7 +1077,9 @@ int register_key_type(struct key_type *ktype)
65560 struct key_type *p;
65561 int ret;
65562
65563 @@ -134575,7 +161001,7 @@ index ab7997d..adba677 100644
65564
65565 ret = -EEXIST;
65566 down_write(&key_types_sem);
65567 -@@ -1085,7 +1087,7 @@ int register_key_type(struct key_type *ktype)
65568 +@@ -1089,7 +1091,7 @@ int register_key_type(struct key_type *ktype)
65569 }
65570
65571 /* store the type */
65572 @@ -134584,7 +161010,7 @@ index ab7997d..adba677 100644
65573
65574 pr_notice("Key type %s registered\n", ktype->name);
65575 ret = 0;
65576 -@@ -1107,7 +1109,7 @@ EXPORT_SYMBOL(register_key_type);
65577 +@@ -1111,7 +1113,7 @@ EXPORT_SYMBOL(register_key_type);
65578 void unregister_key_type(struct key_type *ktype)
65579 {
65580 down_write(&key_types_sem);
65581 @@ -134593,7 +161019,7 @@ index ab7997d..adba677 100644
65582 downgrade_write(&key_types_sem);
65583 key_gc_keytype(ktype);
65584 pr_notice("Key type %s unregistered\n", ktype->name);
65585 -@@ -1125,10 +1127,10 @@ void __init key_init(void)
65586 +@@ -1129,10 +1131,10 @@ void __init key_init(void)
65587 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
65588
65589 /* add the special key types */
65590 @@ -134910,7 +161336,7 @@ index ffd2025..df062c9 100644
65591 /* PCM3052 register definitions */
65592
65593 diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
65594 -index 33e72c8..2b72441 100644
65595 +index ebc9fdf..61f491e 100644
65596 --- a/sound/core/oss/pcm_oss.c
65597 +++ b/sound/core/oss/pcm_oss.c
65598 @@ -1193,10 +1193,10 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
65599 @@ -134997,8 +161423,23 @@ index 1f64ab0..26a7233 100644
65600 snd_leave_user(fs);
65601 if (err < 0)
65602 return err;
65603 +diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
65604 +index 3a9b66c..2b38b21 100644
65605 +--- a/sound/core/pcm_lib.c
65606 ++++ b/sound/core/pcm_lib.c
65607 +@@ -1867,8 +1867,9 @@ EXPORT_SYMBOL(snd_pcm_lib_ioctl);
65608 + * Even if more than one periods have elapsed since the last call, you
65609 + * have to call this only once.
65610 + */
65611 +-void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
65612 ++void snd_pcm_period_elapsed(void *_substream)
65613 + {
65614 ++ struct snd_pcm_substream *substream = _substream;
65615 + struct snd_pcm_runtime *runtime;
65616 + unsigned long flags;
65617 +
65618 diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
65619 -index 4ba64fd..49be507 100644
65620 +index 9106d8e..e7e2e3c 100644
65621 --- a/sound/core/pcm_native.c
65622 +++ b/sound/core/pcm_native.c
65623 @@ -3014,11 +3014,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
65624 @@ -135015,6 +161456,38 @@ index 4ba64fd..49be507 100644
65625 break;
65626 default:
65627 result = -EINVAL;
65628 +diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
65629 +index 795437b..3650746 100644
65630 +--- a/sound/core/rawmidi.c
65631 ++++ b/sound/core/rawmidi.c
65632 +@@ -871,9 +871,10 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card,
65633 + *
65634 + * Return: The size of read data, or a negative error code on failure.
65635 + */
65636 +-int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
65637 +- const unsigned char *buffer, int count)
65638 ++int snd_rawmidi_receive(void *_substream, const void *_buffer, int count)
65639 + {
65640 ++ struct snd_rawmidi_substream *substream = _substream;
65641 ++ const unsigned char *buffer = _buffer;
65642 + unsigned long flags;
65643 + int result = 0, count1;
65644 + struct snd_rawmidi_runtime *runtime = substream->runtime;
65645 +diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
65646 +index b16dbef04..8eb05a4 100644
65647 +--- a/sound/core/seq/oss/seq_oss_synth.c
65648 ++++ b/sound/core/seq/oss/seq_oss_synth.c
65649 +@@ -653,8 +653,8 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
65650 + rec->synth_type, rec->synth_subtype,
65651 + rec->nr_voices);
65652 + snd_iprintf(buf, " capabilities : ioctl %s / load_patch %s\n",
65653 +- enabled_str((long)rec->oper.ioctl),
65654 +- enabled_str((long)rec->oper.load_patch));
65655 ++ enabled_str(!!rec->oper.ioctl),
65656 ++ enabled_str(!!rec->oper.load_patch));
65657 + snd_use_lock_free(&rec->use_lock);
65658 + }
65659 + }
65660 diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
65661 index 58e79e0..19751d1 100644
65662 --- a/sound/core/seq/seq_clientmgr.c
65663 @@ -135120,7 +161593,7 @@ index 062c446..a4b6f4c 100644
65664 };
65665
65666 diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
65667 -index c850345..71c5fd4 100644
65668 +index c850345..ec0a853 100644
65669 --- a/sound/core/seq/seq_memory.c
65670 +++ b/sound/core/seq/seq_memory.c
65671 @@ -87,7 +87,7 @@ int snd_seq_dump_var_event(const struct snd_seq_event *event,
65672 @@ -135132,7 +161605,29 @@ index c850345..71c5fd4 100644
65673 while (len > 0) {
65674 int size = sizeof(buf);
65675 if (len < size)
65676 -@@ -158,7 +158,7 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
65677 +@@ -126,15 +126,19 @@ EXPORT_SYMBOL(snd_seq_dump_var_event);
65678 + * expand the variable length event to linear buffer space.
65679 + */
65680 +
65681 +-static int seq_copy_in_kernel(char **bufptr, const void *src, int size)
65682 ++static int seq_copy_in_kernel(void *_bufptr, const void *src, int size)
65683 + {
65684 ++ char **bufptr = (char **)_bufptr;
65685 ++
65686 + memcpy(*bufptr, src, size);
65687 + *bufptr += size;
65688 + return 0;
65689 + }
65690 +
65691 +-static int seq_copy_in_user(char __user **bufptr, const void *src, int size)
65692 ++static int seq_copy_in_user(void *_bufptr, const void *src, int size)
65693 + {
65694 ++ char __user **bufptr = (char __user **)_bufptr;
65695 ++
65696 + if (copy_to_user(*bufptr, src, size))
65697 + return -EFAULT;
65698 + *bufptr += size;
65699 +@@ -158,13 +162,13 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
65700 if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) {
65701 if (! in_kernel)
65702 return -EINVAL;
65703 @@ -135141,7 +161636,15 @@ index c850345..71c5fd4 100644
65704 return -EFAULT;
65705 return newlen;
65706 }
65707 -@@ -344,7 +344,7 @@ int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
65708 + err = snd_seq_dump_var_event(event,
65709 +- in_kernel ? (snd_seq_dump_func_t)seq_copy_in_kernel :
65710 +- (snd_seq_dump_func_t)seq_copy_in_user,
65711 ++ in_kernel ? seq_copy_in_kernel :
65712 ++ seq_copy_in_user,
65713 + &buf);
65714 + return err < 0 ? err : newlen;
65715 + }
65716 +@@ -344,7 +348,7 @@ int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
65717 tmp->event = src->event;
65718 src = src->next;
65719 } else if (is_usrptr) {
65720 @@ -135150,6 +161653,43 @@ index c850345..71c5fd4 100644
65721 err = -EFAULT;
65722 goto __error;
65723 }
65724 +diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
65725 +index 5dd0ee2..0208e35 100644
65726 +--- a/sound/core/seq/seq_midi.c
65727 ++++ b/sound/core/seq/seq_midi.c
65728 +@@ -111,8 +111,9 @@ static void snd_midi_input_event(struct snd_rawmidi_substream *substream)
65729 + }
65730 + }
65731 +
65732 +-static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, int count)
65733 ++static int dump_midi(void *_substream, const void *buf, int count)
65734 + {
65735 ++ struct snd_rawmidi_substream *substream = _substream;
65736 + struct snd_rawmidi_runtime *runtime;
65737 + int tmp;
65738 +
65739 +@@ -148,7 +149,7 @@ static int event_process_midi(struct snd_seq_event *ev, int direct,
65740 + pr_debug("ALSA: seq_midi: invalid sysex event flags = 0x%x\n", ev->flags);
65741 + return 0;
65742 + }
65743 +- snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream);
65744 ++ snd_seq_dump_var_event(ev, dump_midi, substream);
65745 + snd_midi_event_reset_decode(msynth->parser);
65746 + } else {
65747 + if (msynth->parser == NULL)
65748 +diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
65749 +index c82ed3e..e11d039 100644
65750 +--- a/sound/core/seq/seq_virmidi.c
65751 ++++ b/sound/core/seq/seq_virmidi.c
65752 +@@ -90,7 +90,7 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,
65753 + if (ev->type == SNDRV_SEQ_EVENT_SYSEX) {
65754 + if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
65755 + continue;
65756 +- snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream);
65757 ++ snd_seq_dump_var_event(ev, snd_rawmidi_receive, vmidi->substream);
65758 + } else {
65759 + len = snd_midi_event_decode(vmidi->parser, msg, sizeof(msg), ev);
65760 + if (len > 0)
65761 diff --git a/sound/core/sound.c b/sound/core/sound.c
65762 index 175f9e4..3518d31 100644
65763 --- a/sound/core/sound.c
65764 @@ -135306,7 +161846,7 @@ index 8775704..8fea566 100644
65765
65766 static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc)
65767 diff --git a/sound/firewire/digi00x/amdtp-dot.c b/sound/firewire/digi00x/amdtp-dot.c
65768 -index b02a5e8c..96ac8b5 100644
65769 +index 0ac92ab..a2081aa 100644
65770 --- a/sound/firewire/digi00x/amdtp-dot.c
65771 +++ b/sound/firewire/digi00x/amdtp-dot.c
65772 @@ -365,7 +365,7 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
65773 @@ -135362,39 +161902,35 @@ index 48d6dca..a0266c23 100644
65774 break;
65775 default:
65776 return -EINVAL;
65777 -diff --git a/sound/firewire/scs1x.c b/sound/firewire/scs1x.c
65778 -index 2dba848..c682aef 100644
65779 ---- a/sound/firewire/scs1x.c
65780 -+++ b/sound/firewire/scs1x.c
65781 -@@ -74,7 +74,7 @@ static void scs_output_trigger(struct snd_rawmidi_substream *stream, int up)
65782 - {
65783 - struct scs *scs = stream->rmidi->private_data;
65784 +diff --git a/sound/firewire/oxfw/oxfw-scs1x.c b/sound/firewire/oxfw/oxfw-scs1x.c
65785 +index bb53eb3..670cd89 100644
65786 +--- a/sound/firewire/oxfw/oxfw-scs1x.c
65787 ++++ b/sound/firewire/oxfw/oxfw-scs1x.c
65788 +@@ -278,9 +278,9 @@ static void midi_capture_trigger(struct snd_rawmidi_substream *stream, int up)
65789
65790 -- ACCESS_ONCE(scs->output) = up ? stream : NULL;
65791 -+ ACCESS_ONCE_RW(scs->output) = up ? stream : NULL;
65792 if (up) {
65793 - scs->output_idle = false;
65794 - tasklet_schedule(&scs->tasklet);
65795 -@@ -257,7 +257,7 @@ static void scs_input_trigger(struct snd_rawmidi_substream *stream, int up)
65796 - {
65797 - struct scs *scs = stream->rmidi->private_data;
65798 -
65799 -- ACCESS_ONCE(scs->input) = up ? stream : NULL;
65800 -+ ACCESS_ONCE_RW(scs->input) = up ? stream : NULL;
65801 + scs->input_escape_count = 0;
65802 +- ACCESS_ONCE(scs->input) = stream;
65803 ++ ACCESS_ONCE_RW(scs->input) = stream;
65804 + } else {
65805 +- ACCESS_ONCE(scs->input) = NULL;
65806 ++ ACCESS_ONCE_RW(scs->input) = NULL;
65807 + }
65808 }
65809
65810 - static void scs_input_escaped_byte(struct snd_rawmidi_substream *stream,
65811 -@@ -473,8 +473,8 @@ static void scs_remove(struct fw_unit *unit)
65812 -
65813 - snd_card_disconnect(scs->card);
65814 -
65815 -- ACCESS_ONCE(scs->output) = NULL;
65816 -- ACCESS_ONCE(scs->input) = NULL;
65817 -+ ACCESS_ONCE_RW(scs->output) = NULL;
65818 -+ ACCESS_ONCE_RW(scs->input) = NULL;
65819 -
65820 - wait_event(scs->idle_wait, scs->output_idle);
65821 +@@ -310,10 +310,10 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *stream, int up)
65822 + scs->output_escaped = false;
65823 + scs->output_idle = false;
65824
65825 +- ACCESS_ONCE(scs->output) = stream;
65826 ++ ACCESS_ONCE_RW(scs->output) = stream;
65827 + tasklet_schedule(&scs->tasklet);
65828 + } else {
65829 +- ACCESS_ONCE(scs->output) = NULL;
65830 ++ ACCESS_ONCE_RW(scs->output) = NULL;
65831 + }
65832 + }
65833 + static void midi_playback_drain(struct snd_rawmidi_substream *stream)
65834 diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c
65835 index dc91072..d85a10a 100644
65836 --- a/sound/oss/sb_audio.c
65837 @@ -135446,6 +161982,275 @@ index 213a416..aeab5c9 100644
65838
65839 list_add(&s->list, &cs4297a_devs);
65840
65841 +diff --git a/sound/pci/als300.c b/sound/pci/als300.c
65842 +index add3176..c9394d9 100644
65843 +--- a/sound/pci/als300.c
65844 ++++ b/sound/pci/als300.c
65845 +@@ -647,7 +647,7 @@ static int snd_als300_create(struct snd_card *card,
65846 + struct snd_als300 **rchip)
65847 + {
65848 + struct snd_als300 *chip;
65849 +- void *irq_handler;
65850 ++ irq_handler_t irq_handler;
65851 + int err;
65852 +
65853 + static struct snd_device_ops ops = {
65854 +diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
65855 +index 1677143..85aca1d 100644
65856 +--- a/sound/pci/aw2/aw2-alsa.c
65857 ++++ b/sound/pci/aw2/aw2-alsa.c
65858 +@@ -458,7 +458,6 @@ static int snd_aw2_pcm_prepare_playback(struct snd_pcm_substream *substream)
65859 +
65860 + /* Define Interrupt callback */
65861 + snd_aw2_saa7146_define_it_playback_callback(pcm_device->stream_number,
65862 +- (snd_aw2_saa7146_it_cb)
65863 + snd_pcm_period_elapsed,
65864 + (void *)substream);
65865 +
65866 +@@ -487,7 +486,6 @@ static int snd_aw2_pcm_prepare_capture(struct snd_pcm_substream *substream)
65867 +
65868 + /* Define Interrupt callback */
65869 + snd_aw2_saa7146_define_it_capture_callback(pcm_device->stream_number,
65870 +- (snd_aw2_saa7146_it_cb)
65871 + snd_pcm_period_elapsed,
65872 + (void *)substream);
65873 +
65874 +diff --git a/sound/pci/aw2/aw2-saa7146.c b/sound/pci/aw2/aw2-saa7146.c
65875 +index 1d78904..d9c1056 100644
65876 +--- a/sound/pci/aw2/aw2-saa7146.c
65877 ++++ b/sound/pci/aw2/aw2-saa7146.c
65878 +@@ -262,7 +262,7 @@ void snd_aw2_saa7146_define_it_playback_callback(unsigned int stream_number,
65879 + {
65880 + if (stream_number < NB_STREAM_PLAYBACK) {
65881 + arr_substream_it_playback_cb[stream_number].p_it_callback =
65882 +- (snd_aw2_saa7146_it_cb) p_it_callback;
65883 ++ p_it_callback;
65884 + arr_substream_it_playback_cb[stream_number].p_callback_param =
65885 + (void *)p_callback_param;
65886 + }
65887 +@@ -275,7 +275,7 @@ void snd_aw2_saa7146_define_it_capture_callback(unsigned int stream_number,
65888 + {
65889 + if (stream_number < NB_STREAM_CAPTURE) {
65890 + arr_substream_it_capture_cb[stream_number].p_it_callback =
65891 +- (snd_aw2_saa7146_it_cb) p_it_callback;
65892 ++ p_it_callback;
65893 + arr_substream_it_capture_cb[stream_number].p_callback_param =
65894 + (void *)p_callback_param;
65895 + }
65896 +diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c
65897 +index 5fcbb06..f4b85df 100644
65898 +--- a/sound/pci/ctxfi/ctamixer.c
65899 ++++ b/sound/pci/ctxfi/ctamixer.c
65900 +@@ -297,8 +297,9 @@ static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer)
65901 + return 0;
65902 + }
65903 +
65904 +-int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr)
65905 ++int amixer_mgr_create(struct hw *hw, void **_ramixer_mgr)
65906 + {
65907 ++ struct amixer_mgr **ramixer_mgr = (struct amixer_mgr **)_ramixer_mgr;
65908 + int err;
65909 + struct amixer_mgr *amixer_mgr;
65910 +
65911 +@@ -326,8 +327,10 @@ error:
65912 + return err;
65913 + }
65914 +
65915 +-int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr)
65916 ++int amixer_mgr_destroy(void *_amixer_mgr)
65917 + {
65918 ++ struct amixer_mgr *amixer_mgr = _amixer_mgr;
65919 ++
65920 + rsc_mgr_uninit(&amixer_mgr->mgr);
65921 + kfree(amixer_mgr);
65922 + return 0;
65923 +@@ -452,8 +455,9 @@ static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum)
65924 + return 0;
65925 + }
65926 +
65927 +-int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr)
65928 ++int sum_mgr_create(struct hw *hw, void **_rsum_mgr)
65929 + {
65930 ++ struct sum_mgr **rsum_mgr = (struct sum_mgr **)_rsum_mgr;
65931 + int err;
65932 + struct sum_mgr *sum_mgr;
65933 +
65934 +@@ -481,8 +485,10 @@ error:
65935 + return err;
65936 + }
65937 +
65938 +-int sum_mgr_destroy(struct sum_mgr *sum_mgr)
65939 ++int sum_mgr_destroy(void *_sum_mgr)
65940 + {
65941 ++ struct sum_mgr *sum_mgr = _sum_mgr;
65942 ++
65943 + rsc_mgr_uninit(&sum_mgr->mgr);
65944 + kfree(sum_mgr);
65945 + return 0;
65946 +diff --git a/sound/pci/ctxfi/ctamixer.h b/sound/pci/ctxfi/ctamixer.h
65947 +index 2de18aa..2fbd01b 100644
65948 +--- a/sound/pci/ctxfi/ctamixer.h
65949 ++++ b/sound/pci/ctxfi/ctamixer.h
65950 +@@ -47,8 +47,8 @@ struct sum_mgr {
65951 + };
65952 +
65953 + /* Constructor and destructor of daio resource manager */
65954 +-int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr);
65955 +-int sum_mgr_destroy(struct sum_mgr *sum_mgr);
65956 ++int sum_mgr_create(struct hw *hw, void **rsum_mgr);
65957 ++int sum_mgr_destroy(void *sum_mgr);
65958 +
65959 + /* Define the descriptor of a amixer resource */
65960 + struct amixer_rsc_ops;
65961 +@@ -93,7 +93,7 @@ struct amixer_mgr {
65962 + };
65963 +
65964 + /* Constructor and destructor of amixer resource manager */
65965 +-int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr);
65966 +-int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr);
65967 ++int amixer_mgr_create(struct hw *hw, void **ramixer_mgr);
65968 ++int amixer_mgr_destroy(void *amixer_mgr);
65969 +
65970 + #endif /* CTAMIXER_H */
65971 +diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
65972 +index 977a598..a787004 100644
65973 +--- a/sound/pci/ctxfi/ctatc.c
65974 ++++ b/sound/pci/ctxfi/ctatc.c
65975 +@@ -113,16 +113,16 @@ static struct {
65976 + int (*create)(struct hw *hw, void **rmgr);
65977 + int (*destroy)(void *mgr);
65978 + } rsc_mgr_funcs[NUM_RSCTYP] = {
65979 +- [SRC] = { .create = (create_t)src_mgr_create,
65980 +- .destroy = (destroy_t)src_mgr_destroy },
65981 +- [SRCIMP] = { .create = (create_t)srcimp_mgr_create,
65982 +- .destroy = (destroy_t)srcimp_mgr_destroy },
65983 +- [AMIXER] = { .create = (create_t)amixer_mgr_create,
65984 +- .destroy = (destroy_t)amixer_mgr_destroy },
65985 +- [SUM] = { .create = (create_t)sum_mgr_create,
65986 +- .destroy = (destroy_t)sum_mgr_destroy },
65987 +- [DAIO] = { .create = (create_t)daio_mgr_create,
65988 +- .destroy = (destroy_t)daio_mgr_destroy }
65989 ++ [SRC] = { .create = src_mgr_create,
65990 ++ .destroy = src_mgr_destroy },
65991 ++ [SRCIMP] = { .create = srcimp_mgr_create,
65992 ++ .destroy = srcimp_mgr_destroy },
65993 ++ [AMIXER] = { .create = amixer_mgr_create,
65994 ++ .destroy = amixer_mgr_destroy },
65995 ++ [SUM] = { .create = sum_mgr_create,
65996 ++ .destroy = sum_mgr_destroy },
65997 ++ [DAIO] = { .create = daio_mgr_create,
65998 ++ .destroy = daio_mgr_destroy }
65999 + };
66000 +
66001 + static int
66002 +diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c
66003 +index 7f089cb..6bea28e 100644
66004 +--- a/sound/pci/ctxfi/ctdaio.c
66005 ++++ b/sound/pci/ctxfi/ctdaio.c
66006 +@@ -687,8 +687,9 @@ static int daio_mgr_commit_write(struct daio_mgr *mgr)
66007 + return 0;
66008 + }
66009 +
66010 +-int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr)
66011 ++int daio_mgr_create(struct hw *hw, void **_rdaio_mgr)
66012 + {
66013 ++ struct daio_mgr **rdaio_mgr = (struct daio_mgr **)_rdaio_mgr;
66014 + int err, i;
66015 + struct daio_mgr *daio_mgr;
66016 + struct imapper *entry;
66017 +@@ -741,8 +742,9 @@ error1:
66018 + return err;
66019 + }
66020 +
66021 +-int daio_mgr_destroy(struct daio_mgr *daio_mgr)
66022 ++int daio_mgr_destroy(void *_daio_mgr)
66023 + {
66024 ++ struct daio_mgr *daio_mgr = _daio_mgr;
66025 + unsigned long flags;
66026 +
66027 + /* free daio input mapper list */
66028 +diff --git a/sound/pci/ctxfi/ctdaio.h b/sound/pci/ctxfi/ctdaio.h
66029 +index a30be73..91b8dbd 100644
66030 +--- a/sound/pci/ctxfi/ctdaio.h
66031 ++++ b/sound/pci/ctxfi/ctdaio.h
66032 +@@ -119,7 +119,7 @@ struct daio_mgr {
66033 + };
66034 +
66035 + /* Constructor and destructor of daio resource manager */
66036 +-int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr);
66037 +-int daio_mgr_destroy(struct daio_mgr *daio_mgr);
66038 ++int daio_mgr_create(struct hw *hw, void **rdaio_mgr);
66039 ++int daio_mgr_destroy(void *daio_mgr);
66040 +
66041 + #endif /* CTDAIO_H */
66042 +diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c
66043 +index a5a72df..f86edb8 100644
66044 +--- a/sound/pci/ctxfi/ctsrc.c
66045 ++++ b/sound/pci/ctxfi/ctsrc.c
66046 +@@ -544,8 +544,9 @@ static int src_mgr_commit_write(struct src_mgr *mgr)
66047 + return 0;
66048 + }
66049 +
66050 +-int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr)
66051 ++int src_mgr_create(struct hw *hw, void **_rsrc_mgr)
66052 + {
66053 ++ struct src_mgr **rsrc_mgr = (struct src_mgr **)_rsrc_mgr;
66054 + int err, i;
66055 + struct src_mgr *src_mgr;
66056 +
66057 +@@ -584,8 +585,10 @@ error1:
66058 + return err;
66059 + }
66060 +
66061 +-int src_mgr_destroy(struct src_mgr *src_mgr)
66062 ++int src_mgr_destroy(void *_src_mgr)
66063 + {
66064 ++ struct src_mgr *src_mgr = _src_mgr;
66065 ++
66066 + rsc_mgr_uninit(&src_mgr->mgr);
66067 + kfree(src_mgr);
66068 +
66069 +@@ -828,8 +831,9 @@ static int srcimp_imap_delete(struct srcimp_mgr *mgr, struct imapper *entry)
66070 + return err;
66071 + }
66072 +
66073 +-int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrcimp_mgr)
66074 ++int srcimp_mgr_create(struct hw *hw, void **_rsrcimp_mgr)
66075 + {
66076 ++ struct srcimp_mgr **rsrcimp_mgr = (struct srcimp_mgr **)_rsrcimp_mgr;
66077 + int err;
66078 + struct srcimp_mgr *srcimp_mgr;
66079 + struct imapper *entry;
66080 +@@ -873,8 +877,9 @@ error1:
66081 + return err;
66082 + }
66083 +
66084 +-int srcimp_mgr_destroy(struct srcimp_mgr *srcimp_mgr)
66085 ++int srcimp_mgr_destroy(void *_srcimp_mgr)
66086 + {
66087 ++ struct srcimp_mgr *srcimp_mgr = _srcimp_mgr;
66088 + unsigned long flags;
66089 +
66090 + /* free src input mapper list */
66091 +diff --git a/sound/pci/ctxfi/ctsrc.h b/sound/pci/ctxfi/ctsrc.h
66092 +index 92944a0..fc78ed4 100644
66093 +--- a/sound/pci/ctxfi/ctsrc.h
66094 ++++ b/sound/pci/ctxfi/ctsrc.h
66095 +@@ -143,10 +143,10 @@ struct srcimp_mgr {
66096 + };
66097 +
66098 + /* Constructor and destructor of SRC resource manager */
66099 +-int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr);
66100 +-int src_mgr_destroy(struct src_mgr *src_mgr);
66101 ++int src_mgr_create(struct hw *hw, void **rsrc_mgr);
66102 ++int src_mgr_destroy(void *src_mgr);
66103 + /* Constructor and destructor of SRCIMP resource manager */
66104 +-int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrc_mgr);
66105 +-int srcimp_mgr_destroy(struct srcimp_mgr *srcimp_mgr);
66106 ++int srcimp_mgr_create(struct hw *hw, void **rsrc_mgr);
66107 ++int srcimp_mgr_destroy(void *srcimp_mgr);
66108 +
66109 + #endif /* CTSRC_H */
66110 diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
66111 index 8374188..f073778 100644
66112 --- a/sound/pci/hda/hda_codec.c
66113 @@ -135516,6 +162321,32 @@ index 4c26076..a13f370 100644
66114 chip->card = card;
66115 chip->pci = pci;
66116 chip->irq = -1;
66117 +diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
66118 +index d6f4abb..5d59f0c 100644
66119 +--- a/sound/soc/codecs/cx20442.c
66120 ++++ b/sound/soc/codecs/cx20442.c
66121 +@@ -263,6 +263,12 @@ static int v253_hangup(struct tty_struct *tty)
66122 + return 0;
66123 + }
66124 +
66125 ++static int v253_hw_write(void *client, const char *buf, int count)
66126 ++{
66127 ++ struct tty_struct *tty = client;
66128 ++ return tty->ops->write(client, buf, count);
66129 ++}
66130 ++
66131 + /* Line discipline .receive_buf() */
66132 + static void v253_receive(struct tty_struct *tty,
66133 + const unsigned char *cp, char *fp, int count)
66134 +@@ -280,7 +286,7 @@ static void v253_receive(struct tty_struct *tty,
66135 +
66136 + /* Set up codec driver access to modem controls */
66137 + cx20442->control_data = tty;
66138 +- codec->hw_write = (hw_write_t)tty->ops->write;
66139 ++ codec->hw_write = v253_hw_write;
66140 + codec->component.card->pop_time = 1;
66141 + }
66142 + }
66143 diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
66144 index 160d61a..10bfd63 100644
66145 --- a/sound/soc/codecs/sti-sas.c
66146 @@ -135538,14 +162369,63 @@ index 160d61a..10bfd63 100644
66147
66148 /* Store context */
66149 dev_set_drvdata(&pdev->dev, drvdata);
66150 +diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
66151 +index f7a6ce7..82310c8 100644
66152 +--- a/sound/soc/codecs/tlv320dac33.c
66153 ++++ b/sound/soc/codecs/tlv320dac33.c
66154 +@@ -1375,13 +1375,18 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai,
66155 + return 0;
66156 + }
66157 +
66158 ++static int dac33_hw_write(void *client, const char *buf, int count)
66159 ++{
66160 ++ return i2c_master_send(client, buf, count);
66161 ++}
66162 ++
66163 + static int dac33_soc_probe(struct snd_soc_codec *codec)
66164 + {
66165 + struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
66166 + int ret = 0;
66167 +
66168 + codec->control_data = dac33->control_data;
66169 +- codec->hw_write = (hw_write_t) i2c_master_send;
66170 ++ codec->hw_write = dac33_hw_write;
66171 + dac33->codec = codec;
66172 +
66173 + /* Read the tlv320dac33 ID registers */
66174 +diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
66175 +index 35f0469..7c25cd5 100644
66176 +--- a/sound/soc/codecs/uda1380.c
66177 ++++ b/sound/soc/codecs/uda1380.c
66178 +@@ -687,6 +687,11 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
66179 + },
66180 + };
66181 +
66182 ++static int uda1380_hw_write(void *client, const char *buf, int count)
66183 ++{
66184 ++ return i2c_master_send(client, buf, count);
66185 ++}
66186 ++
66187 + static int uda1380_probe(struct snd_soc_codec *codec)
66188 + {
66189 + struct uda1380_platform_data *pdata =codec->dev->platform_data;
66190 +@@ -695,7 +700,7 @@ static int uda1380_probe(struct snd_soc_codec *codec)
66191 +
66192 + uda1380->codec = codec;
66193 +
66194 +- codec->hw_write = (hw_write_t)i2c_master_send;
66195 ++ codec->hw_write = uda1380_hw_write;
66196 + codec->control_data = uda1380->control_data;
66197 +
66198 + if (!pdata)
66199 diff --git a/sound/soc/intel/skylake/skl-sst-dsp.h b/sound/soc/intel/skylake/skl-sst-dsp.h
66200 -index 6bfcef4..201ca47 100644
66201 +index cbb4075..edda3dd 100644
66202 --- a/sound/soc/intel/skylake/skl-sst-dsp.h
66203 +++ b/sound/soc/intel/skylake/skl-sst-dsp.h
66204 -@@ -114,14 +114,14 @@ struct skl_dsp_fw_ops {
66205 - int (*set_state_D0)(struct sst_dsp *ctx);
66206 - int (*set_state_D3)(struct sst_dsp *ctx);
66207 - unsigned int (*get_fw_errcode)(struct sst_dsp *ctx);
66208 +@@ -117,14 +117,14 @@ struct skl_dsp_fw_ops {
66209 + int (*load_mod)(struct sst_dsp *ctx, u16 mod_id, char *mod_name);
66210 + int (*unload_mod)(struct sst_dsp *ctx, u16 mod_id);
66211 +
66212 -};
66213 +} __no_const;
66214
66215 @@ -135557,13 +162437,13 @@ index 6bfcef4..201ca47 100644
66216 -};
66217 +} __no_const;
66218
66219 - void skl_cldma_process_intr(struct sst_dsp *ctx);
66220 - void skl_cldma_int_disable(struct sst_dsp *ctx);
66221 + struct skl_load_module_info {
66222 + u16 mod_id;
66223 diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c
66224 -index d40efc9..4dbd571 100644
66225 +index 7e0acd8..7fe0f65 100644
66226 --- a/sound/soc/soc-ac97.c
66227 +++ b/sound/soc/soc-ac97.c
66228 -@@ -291,8 +291,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
66229 +@@ -416,8 +416,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
66230 if (ret)
66231 return ret;
66232
66233 @@ -135772,10 +162652,10 @@ index 0000000..de92ed9
66234 +randomize_layout_seed.h
66235 diff --git a/tools/gcc/Makefile b/tools/gcc/Makefile
66236 new file mode 100644
66237 -index 0000000..4945d82
66238 +index 0000000..f1db084
66239 --- /dev/null
66240 +++ b/tools/gcc/Makefile
66241 -@@ -0,0 +1,54 @@
66242 +@@ -0,0 +1,58 @@
66243 +#CC := gcc
66244 +#PLUGIN_SOURCE_FILES := pax_plugin.c
66245 +#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
66246 @@ -135784,11 +162664,11 @@ index 0000000..4945d82
66247 +
66248 +ifeq ($(PLUGINCC),$(HOSTCC))
66249 +HOSTLIBS := hostlibs
66250 -+HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb
66251 ++HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb -Wall -W
66252 +export HOST_EXTRACFLAGS
66253 +else
66254 +HOSTLIBS := hostcxxlibs
66255 -+HOST_EXTRACXXFLAGS += -I$(GCCPLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables -ggdb -Wno-unused-parameter -Wno-narrowing -Wno-unused-variable
66256 ++HOST_EXTRACXXFLAGS += -I$(GCCPLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables -ggdb -Wall -W -Wno-unused-parameter -Wno-narrowing -Wno-unused-variable
66257 +export HOST_EXTRACXXFLAGS
66258 +endif
66259 +
66260 @@ -135808,6 +162688,9 @@ index 0000000..4945d82
66261 +subdir-$(CONFIG_PAX_SIZE_OVERFLOW) := size_overflow_plugin
66262 +subdir- += size_overflow_plugin
66263 +
66264 ++subdir-$(CONFIG_PAX_RAP) += rap_plugin
66265 ++subdir- += rap_plugin
66266 ++
66267 +always := $($(HOSTLIBS)-y)
66268 +
66269 +constify_plugin-objs := constify_plugin.o
66270 @@ -135819,6 +162702,7 @@ index 0000000..4945d82
66271 +latent_entropy_plugin-objs := latent_entropy_plugin.o
66272 +structleak_plugin-objs := structleak_plugin.o
66273 +initify_plugin-objs := initify_plugin.o
66274 ++rap_plugin-objs := rap_plugin.o sip.o
66275 +randomize_layout_plugin-objs := randomize_layout_plugin.o
66276 +
66277 +$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h
66278 @@ -136334,7 +163218,7 @@ index 0000000..efaf576
66279 +}
66280 diff --git a/tools/gcc/colorize_plugin.c b/tools/gcc/colorize_plugin.c
66281 new file mode 100644
66282 -index 0000000..eec3fd1
66283 +index 0000000..ffe60f6
66284 --- /dev/null
66285 +++ b/tools/gcc/colorize_plugin.c
66286 @@ -0,0 +1,162 @@
66287 @@ -136433,7 +163317,7 @@ index 0000000..eec3fd1
66288 +
66289 +#define PASS_NAME colorize_rearm
66290 +#define NO_GATE
66291 -+#include "gcc-generate-gimple-pass.h"
66292 ++#include "gcc-generate-simple_ipa-pass.h"
66293 +
66294 +static void colorize_start_unit(void *gcc_data, void *user_data)
66295 +{
66296 @@ -137029,10 +163913,10 @@ index 0000000..b52a700
66297 +}
66298 diff --git a/tools/gcc/gcc-common.h b/tools/gcc/gcc-common.h
66299 new file mode 100644
66300 -index 0000000..fbed673
66301 +index 0000000..0c0b842
66302 --- /dev/null
66303 +++ b/tools/gcc/gcc-common.h
66304 -@@ -0,0 +1,858 @@
66305 +@@ -0,0 +1,879 @@
66306 +#ifndef GCC_COMMON_H_INCLUDED
66307 +#define GCC_COMMON_H_INCLUDED
66308 +
66309 @@ -137347,6 +164231,22 @@ index 0000000..fbed673
66310 + return NULL;
66311 +}
66312 +
66313 ++static inline bool cgraph_for_node_and_aliases(cgraph_node_ptr node, bool (*callback)(cgraph_node_ptr, void *), void *data, bool include_overwritable)
66314 ++{
66315 ++ cgraph_node_ptr alias;
66316 ++
66317 ++ if (callback(node, data))
66318 ++ return true;
66319 ++
66320 ++ for (alias = node->same_body; alias; alias = alias->next) {
66321 ++ if (include_overwritable || cgraph_function_body_availability(alias) > AVAIL_OVERWRITABLE)
66322 ++ if (cgraph_for_node_and_aliases(alias, callback, data, include_overwritable))
66323 ++ return true;
66324 ++ }
66325 ++
66326 ++ return false;
66327 ++}
66328 ++
66329 +#define FOR_EACH_FUNCTION_WITH_GIMPLE_BODY(node) \
66330 + for ((node) = cgraph_first_function_with_gimple_body(); (node); \
66331 + (node) = cgraph_next_function_with_gimple_body(node))
66332 @@ -137736,6 +164636,11 @@ index 0000000..fbed673
66333 + return node->get_alias_target();
66334 +}
66335 +
66336 ++static inline bool cgraph_for_node_and_aliases(cgraph_node_ptr node, bool (*callback)(cgraph_node_ptr, void *), void *data, bool include_overwritable)
66337 ++{
66338 ++ return node->call_for_symbol_thunks_and_aliases(callback, data, include_overwritable);
66339 ++}
66340 ++
66341 +static inline struct cgraph_node_hook_list *cgraph_add_function_insertion_hook(cgraph_node_hook hook, void *data)
66342 +{
66343 + return symtab->add_cgraph_insertion_hook(hook, data);
66344 @@ -139428,7 +166333,7 @@ index 0000000..30ecc9a
66345 +}
66346 diff --git a/tools/gcc/kernexec_plugin.c b/tools/gcc/kernexec_plugin.c
66347 new file mode 100644
66348 -index 0000000..5598420
66349 +index 0000000..e31e92f
66350 --- /dev/null
66351 +++ b/tools/gcc/kernexec_plugin.c
66352 @@ -0,0 +1,407 @@
66353 @@ -139816,10 +166721,10 @@ index 0000000..5598420
66354 + error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
66355 + continue;
66356 + }
66357 -+ if (!strcmp(argv[i].value, "bts")) {
66358 ++ if (!strcmp(argv[i].value, "bts") || !strcmp(argv[i].value, "\"bts\"")) {
66359 + kernexec_instrument_fptr = kernexec_instrument_fptr_bts;
66360 + kernexec_instrument_retaddr = kernexec_instrument_retaddr_bts;
66361 -+ } else if (!strcmp(argv[i].value, "or")) {
66362 ++ } else if (!strcmp(argv[i].value, "or") || !strcmp(argv[i].value, "\"or\"")) {
66363 + kernexec_instrument_fptr = kernexec_instrument_fptr_or;
66364 + kernexec_instrument_retaddr = kernexec_instrument_retaddr_or;
66365 + fix_register("r12", 1, 1);
66366 @@ -141208,6 +168113,1258 @@ index 0000000..c77d26d
66367 +
66368 + return 0;
66369 +}
66370 +diff --git a/tools/gcc/rap_plugin/Makefile b/tools/gcc/rap_plugin/Makefile
66371 +new file mode 100644
66372 +index 0000000..8171be8
66373 +--- /dev/null
66374 ++++ b/tools/gcc/rap_plugin/Makefile
66375 +@@ -0,0 +1,4 @@
66376 ++$(HOSTLIBS)-$(CONFIG_PAX_RAP) += rap_plugin.so
66377 ++always := $($(HOSTLIBS)-y)
66378 ++
66379 ++rap_plugin-objs := $(patsubst $(srctree)/$(src)/%.c,%.o,$(wildcard $(srctree)/$(src)/*.c))
66380 +diff --git a/tools/gcc/rap_plugin/rap.h b/tools/gcc/rap_plugin/rap.h
66381 +new file mode 100644
66382 +index 0000000..f6a284d
66383 +--- /dev/null
66384 ++++ b/tools/gcc/rap_plugin/rap.h
66385 +@@ -0,0 +1,36 @@
66386 ++#ifndef RAP_H_INCLUDED
66387 ++#define RAP_H_INCLUDED
66388 ++
66389 ++#include "gcc-common.h"
66390 ++
66391 ++typedef struct {
66392 ++ int hash; // will be sign extended to long in reality
66393 ++} rap_hash_t;
66394 ++
66395 ++typedef struct {
66396 ++ unsigned int qual_const:1;
66397 ++ unsigned int qual_volatile:1;
66398 ++} rap_hash_flags_t;
66399 ++extern rap_hash_flags_t imprecise_rap_hash_flags;
66400 ++
66401 ++extern bool report_fptr_hash;
66402 ++
66403 ++extern GTY(()) tree rap_hash_type_node;
66404 ++
66405 ++void siphash24fold(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k);
66406 ++void rap_calculate_func_hashes(void *event_data, void *data);
66407 ++rap_hash_t rap_hash_function_type(const_tree fntype, rap_hash_flags_t flags);
66408 ++rap_hash_t rap_hash_function_decl(const_tree fndecl, rap_hash_flags_t flags);
66409 ++rap_hash_t rap_hash_function_node_imprecise(cgraph_node_ptr node);
66410 ++const_tree type_name(const_tree type);
66411 ++tree create_new_var(tree type, const char *name);
66412 ++
66413 ++gimple barrier(tree var, bool full);
66414 ++
66415 ++#if BUILDING_GCC_VERSION >= 4009
66416 ++opt_pass *make_rap_fptr_pass(void);
66417 ++#else
66418 ++struct opt_pass *make_rap_fptr_pass(void);
66419 ++#endif
66420 ++
66421 ++#endif
66422 +diff --git a/tools/gcc/rap_plugin/rap_fptr_pass.c b/tools/gcc/rap_plugin/rap_fptr_pass.c
66423 +new file mode 100644
66424 +index 0000000..7e377d7
66425 +--- /dev/null
66426 ++++ b/tools/gcc/rap_plugin/rap_fptr_pass.c
66427 +@@ -0,0 +1,220 @@
66428 ++/*
66429 ++ * Copyright 2012-2016 by PaX Team <pageexec@××××××××.hu>
66430 ++ * Licensed under the GPL v2
66431 ++ *
66432 ++ * Homepage: http://pax.grsecurity.net/
66433 ++ */
66434 ++
66435 ++#include "rap.h"
66436 ++
66437 ++bool report_fptr_hash;
66438 ++
66439 ++static bool rap_fptr_gate(void)
66440 ++{
66441 ++#ifdef TARGET_386
66442 ++ tree section;
66443 ++
66444 ++ if (!TARGET_64BIT || ix86_cmodel != CM_KERNEL)
66445 ++ return true;
66446 ++
66447 ++ section = lookup_attribute("section", DECL_ATTRIBUTES(current_function_decl));
66448 ++ if (!section || !TREE_VALUE(section))
66449 ++ return true;
66450 ++
66451 ++ section = TREE_VALUE(TREE_VALUE(section));
66452 ++ return strncmp(TREE_STRING_POINTER(section), ".vsyscall_", 10);
66453 ++#else
66454 ++#error unsupported target
66455 ++#endif
66456 ++}
66457 ++
66458 ++static tree build_rap_hash(gimple call_stmt, tree fntype)
66459 ++{
66460 ++ rap_hash_t hash;
66461 ++
66462 ++ hash = rap_hash_function_type(fntype, imprecise_rap_hash_flags);
66463 ++ if (report_fptr_hash)
66464 ++ inform(gimple_location(call_stmt), "fptr rap_hash: %x", hash.hash);
66465 ++ return build_int_cst_type(rap_hash_type_node, hash.hash);
66466 ++}
66467 ++
66468 ++// check the function hash of the target of the fptr
66469 ++static basic_block rap_instrument_fptr(gimple_stmt_iterator *gsi)
66470 ++{
66471 ++ gimple assign_hash, check_hash, call_stmt, stmt;
66472 ++ location_t loc;
66473 ++ tree computed_hash, target_hash, fptr, fntype;
66474 ++#if BUILDING_GCC_VERSION == 4005
66475 ++ tree fptr2;
66476 ++#endif
66477 ++ basic_block cond_bb, join_bb, true_bb;
66478 ++ edge e;
66479 ++ const HOST_WIDE_INT rap_hash_offset = 2 * sizeof(rap_hash_t);
66480 ++
66481 ++ call_stmt = gsi_stmt(*gsi);
66482 ++ loc = gimple_location(call_stmt);
66483 ++ fptr = gimple_call_fn(call_stmt);
66484 ++ fntype = TREE_TYPE(TREE_TYPE(fptr));
66485 ++
66486 ++ if (TREE_CODE(fntype) == FUNCTION_TYPE) {
66487 ++ computed_hash = build_rap_hash(call_stmt, fntype);
66488 ++ } else {
66489 ++ debug_tree(fntype);
66490 ++ gcc_unreachable();
66491 ++ }
66492 ++
66493 ++ // target_hash = ((s64*)fptr)[-rap_hash_offset]
66494 ++ target_hash = create_tmp_var(rap_hash_type_node, "rap_hash");
66495 ++ add_referenced_var(target_hash);
66496 ++ target_hash = make_ssa_name(target_hash, NULL);
66497 ++#if BUILDING_GCC_VERSION == 4005
66498 ++ fptr2 = create_tmp_var(ptr_type_node, "rap_fptr2");
66499 ++ fptr2 = make_ssa_name(fptr2, NULL);
66500 ++ assign_hash = gimple_build_assign(fptr2, build2(POINTER_PLUS_EXPR, ptr_type_node, fptr, build_int_cst_type(sizetype, -rap_hash_offset)));
66501 ++ gimple_set_location(assign_hash, loc);
66502 ++ SSA_NAME_DEF_STMT(fptr2) = assign_hash;
66503 ++ gsi_insert_before(gsi, assign_hash, GSI_SAME_STMT);
66504 ++ update_stmt(assign_hash);
66505 ++ fptr = gimple_get_lhs(assign_hash);
66506 ++
66507 ++ fptr2 = create_tmp_var(build_pointer_type(rap_hash_type_node), "rap_fptr2");
66508 ++ fptr2 = make_ssa_name(fptr2, NULL);
66509 ++ assign_hash = gimple_build_assign(fptr2, fold_convert(build_pointer_type(TREE_TYPE(target_hash)), fptr));
66510 ++ gimple_set_location(assign_hash, loc);
66511 ++ SSA_NAME_DEF_STMT(fptr2) = assign_hash;
66512 ++ gsi_insert_before(gsi, assign_hash, GSI_SAME_STMT);
66513 ++ update_stmt(assign_hash);
66514 ++ fptr = gimple_get_lhs(assign_hash);
66515 ++
66516 ++ assign_hash = gimple_build_assign(target_hash, build1(INDIRECT_REF, rap_hash_type_node, fptr));
66517 ++#else
66518 ++ assign_hash = gimple_build_assign(target_hash, build2(MEM_REF, rap_hash_type_node, fptr, build_int_cst_type(build_pointer_type(rap_hash_type_node), -rap_hash_offset)));
66519 ++#endif
66520 ++ gimple_set_location(assign_hash, loc);
66521 ++ SSA_NAME_DEF_STMT(target_hash) = assign_hash;
66522 ++ gsi_insert_before(gsi, assign_hash, GSI_NEW_STMT);
66523 ++ update_stmt(assign_hash);
66524 ++
66525 ++ // compare target_hash against computed function hash
66526 ++ // bail out on mismatch
66527 ++ check_hash = gimple_build_cond(NE_EXPR, target_hash, computed_hash, NULL_TREE, NULL_TREE);
66528 ++ gimple_set_location(check_hash, loc);
66529 ++ gsi_insert_after(gsi, check_hash, GSI_NEW_STMT);
66530 ++
66531 ++ cond_bb = gimple_bb(gsi_stmt(*gsi));
66532 ++ gcc_assert(!gsi_end_p(*gsi));
66533 ++ gcc_assert(check_hash == gsi_stmt(*gsi));
66534 ++
66535 ++ e = split_block(cond_bb, gsi_stmt(*gsi));
66536 ++ cond_bb = e->src;
66537 ++ join_bb = e->dest;
66538 ++ e->flags = EDGE_FALSE_VALUE;
66539 ++ e->probability = REG_BR_PROB_BASE;
66540 ++
66541 ++ true_bb = create_empty_bb(EXIT_BLOCK_PTR_FOR_FN(cfun)->prev_bb);
66542 ++ make_edge(cond_bb, true_bb, EDGE_TRUE_VALUE | EDGE_PRESERVE);
66543 ++
66544 ++ gcc_assert(dom_info_available_p(CDI_DOMINATORS));
66545 ++ set_immediate_dominator(CDI_DOMINATORS, true_bb, cond_bb);
66546 ++ set_immediate_dominator(CDI_DOMINATORS, join_bb, cond_bb);
66547 ++
66548 ++ gcc_assert(cond_bb->loop_father == join_bb->loop_father);
66549 ++ add_bb_to_loop(true_bb, cond_bb->loop_father);
66550 ++
66551 ++ *gsi = gsi_start_bb(true_bb);
66552 ++
66553 ++ // this fake dependency is to prevent PRE from merging this BB with others of the same kind
66554 ++ stmt = barrier(fptr, false);
66555 ++ gimple_set_location(stmt, loc);
66556 ++ gsi_insert_after(gsi, stmt, GSI_CONTINUE_LINKING);
66557 ++
66558 ++ stmt = gimple_build_call(builtin_decl_implicit(BUILT_IN_TRAP), 0);
66559 ++ gimple_set_location(stmt, loc);
66560 ++ gsi_insert_after(gsi, stmt, GSI_CONTINUE_LINKING);
66561 ++
66562 ++ return join_bb;
66563 ++}
66564 ++
66565 ++// find all language level function pointer dereferences and verify the target function
66566 ++static unsigned int rap_fptr_execute(void)
66567 ++{
66568 ++ basic_block bb;
66569 ++
66570 ++ loop_optimizer_init(LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
66571 ++ gcc_assert(current_loops);
66572 ++
66573 ++ calculate_dominance_info(CDI_DOMINATORS);
66574 ++ calculate_dominance_info(CDI_POST_DOMINATORS);
66575 ++
66576 ++ // 1. loop through BBs and GIMPLE statements
66577 ++ FOR_EACH_BB_FN(bb, cfun) {
66578 ++ gimple_stmt_iterator gsi;
66579 ++
66580 ++ for (gsi = gsi_start_bb(bb); !gsi_end_p(gsi); gsi_next(&gsi)) {
66581 ++ // gimple match: h_1 = get_fptr (); D.2709_3 = h_1 (x_2(D));
66582 ++ tree fptr, fntype;
66583 ++ gimple call_stmt;
66584 ++
66585 ++ // is it a call ...
66586 ++ call_stmt = gsi_stmt(gsi);
66587 ++ if (!is_gimple_call(call_stmt))
66588 ++ continue;
66589 ++
66590 ++ fptr = gimple_call_fn(call_stmt);
66591 ++ if (!fptr)
66592 ++ continue;
66593 ++
66594 ++ switch (TREE_CODE(fptr)) {
66595 ++ default:
66596 ++ debug_gimple_stmt(call_stmt);
66597 ++ debug_tree(fptr);
66598 ++ debug_tree(TREE_TYPE(fptr));
66599 ++ gcc_unreachable();
66600 ++
66601 ++ case ADDR_EXPR:
66602 ++ continue;
66603 ++
66604 ++ case SSA_NAME:
66605 ++ if (SSA_NAME_VAR(fptr) == NULL_TREE)
66606 ++ break;
66607 ++
66608 ++ switch (TREE_CODE(SSA_NAME_VAR(fptr))) {
66609 ++ default:
66610 ++ debug_gimple_stmt(call_stmt);
66611 ++ debug_tree(fptr);
66612 ++ gcc_unreachable();
66613 ++
66614 ++ case VAR_DECL:
66615 ++ case PARM_DECL:
66616 ++ break;
66617 ++ }
66618 ++ break;
66619 ++
66620 ++ case INTEGER_CST:
66621 ++ case OBJ_TYPE_REF:
66622 ++ break;
66623 ++ }
66624 ++
66625 ++ // ... through a function pointer
66626 ++ fntype = TREE_TYPE(fptr);
66627 ++ if (TREE_CODE(fntype) != POINTER_TYPE)
66628 ++ continue;
66629 ++
66630 ++ fntype = TREE_TYPE(fntype);
66631 ++ gcc_assert(TREE_CODE(fntype) == FUNCTION_TYPE || TREE_CODE(fntype) == METHOD_TYPE);
66632 ++
66633 ++ bb = rap_instrument_fptr(&gsi);
66634 ++ gsi = gsi_start_bb(bb);
66635 ++ }
66636 ++ }
66637 ++
66638 ++ free_dominance_info(CDI_DOMINATORS);
66639 ++ free_dominance_info(CDI_POST_DOMINATORS);
66640 ++ loop_optimizer_finalize();
66641 ++
66642 ++ return 0;
66643 ++}
66644 ++
66645 ++#define PASS_NAME rap_fptr
66646 ++#define TODO_FLAGS_FINISH TODO_verify_ssa | TODO_verify_stmts | TODO_dump_func | TODO_remove_unused_locals | TODO_update_ssa | TODO_cleanup_cfg | TODO_rebuild_cgraph_edges | TODO_verify_flow
66647 ++#include "gcc-generate-gimple-pass.h"
66648 +diff --git a/tools/gcc/rap_plugin/rap_hash.c b/tools/gcc/rap_plugin/rap_hash.c
66649 +new file mode 100644
66650 +index 0000000..ebdcf7c
66651 +--- /dev/null
66652 ++++ b/tools/gcc/rap_plugin/rap_hash.c
66653 +@@ -0,0 +1,381 @@
66654 ++/*
66655 ++ * Copyright 2012-2016 by PaX Team <pageexec@××××××××.hu>
66656 ++ * Licensed under the GPL v2
66657 ++ *
66658 ++ * Homepage: http://pax.grsecurity.net/
66659 ++ */
66660 ++
66661 ++#include "rap.h"
66662 ++
66663 ++static rap_hash_t *rap_imprecise_hashes;
66664 ++static int rap_cgraph_max_uid;
66665 ++
66666 ++static void rap_hash_function(const_tree fntype, rap_hash_flags_t flags, unsigned char sip_hash[8]);
66667 ++
66668 ++static const unsigned char rap_hash_tree_code[MAX_TREE_CODES] = {
66669 ++ [0] = 0,
66670 ++ [1] = 0,
66671 ++ [2] = 0,
66672 ++ [3] = 0,
66673 ++ [4] = 0,
66674 ++ [OFFSET_TYPE] = 10,
66675 ++ [ENUMERAL_TYPE] = 20,
66676 ++ [BOOLEAN_TYPE] = 30,
66677 ++ [INTEGER_TYPE] = 40,
66678 ++ [REAL_TYPE] = 50,
66679 ++ [POINTER_TYPE] = 60,
66680 ++ [REFERENCE_TYPE] = 70,
66681 ++#if BUILDING_GCC_VERSION >= 4006
66682 ++ [NULLPTR_TYPE] = 80,
66683 ++#endif
66684 ++ [FIXED_POINT_TYPE] = 0,
66685 ++ [COMPLEX_TYPE] = 100,
66686 ++ [VECTOR_TYPE] = 110,
66687 ++ [ARRAY_TYPE] = 120,
66688 ++ [RECORD_TYPE] = 130,
66689 ++ [UNION_TYPE] = 140,
66690 ++ [QUAL_UNION_TYPE] = 0,
66691 ++ [VOID_TYPE] = 160,
66692 ++#if BUILDING_GCC_VERSION >= 5000
66693 ++ [POINTER_BOUNDS_TYPE] = 170,
66694 ++#endif
66695 ++ [FUNCTION_TYPE] = 180,
66696 ++ [METHOD_TYPE] = 0,
66697 ++ [LANG_TYPE] = 0,
66698 ++};
66699 ++
66700 ++static void rap_fold_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen)
66701 ++{
66702 ++ static const unsigned char rap_sip_key[16] = {
66703 ++ 'P', 'a', 'X', ' ', 'T', 'e', 'a', 'm',
66704 ++ 'R', 'A', 'P', ' ', 'H', 'A', 'S', 'H',
66705 ++ };
66706 ++
66707 ++ siphash24fold(out, in, inlen, rap_sip_key);
66708 ++}
66709 ++
66710 ++// compute the final hash value in the range [1,INT_MAX]
66711 ++// the % and +1 trick leaves the value 0 available for marking non-indirectly callable functions
66712 ++// and INT_MIN (0x80000000) for longjmp targets (sign extended)
66713 ++// return places will use the (sign extended) range [INT_MIN+1,-1] ([0x8000001,0xffffffff])
66714 ++static rap_hash_t rap_extract_hash(const unsigned char sip_hash[8])
66715 ++{
66716 ++ rap_hash_t hash;
66717 ++ unsigned long long dividend, divisor;
66718 ++
66719 ++ memcpy(&dividend, sip_hash, sizeof dividend);
66720 ++// divisor = 1ULL << (sizeof hash * 8 - 1);
66721 ++// divisor |= divisor - 1;
66722 ++ divisor = 0x7fffffffUL;
66723 ++ hash.hash = dividend % divisor + 1;
66724 ++ return hash;
66725 ++}
66726 ++
66727 ++static void rap_hash_type_name(const_tree type, unsigned char sip_hash[8])
66728 ++{
66729 ++ const_tree name = type_name(TYPE_MAIN_VARIANT(type));
66730 ++
66731 ++ // handle typedefs of anonymous structs/unions
66732 ++ if (name == NULL_TREE)
66733 ++ name = type_name(type);
66734 ++
66735 ++ if (name == NULL_TREE)
66736 ++ return;
66737 ++
66738 ++ gcc_assert(TREE_CODE(name) == IDENTIFIER_NODE);
66739 ++ rap_fold_hash(sip_hash, (const unsigned char *)IDENTIFIER_POINTER(name), IDENTIFIER_LENGTH(name));
66740 ++}
66741 ++
66742 ++static void rap_hash_type_precision(const_tree type, unsigned char sip_hash[8])
66743 ++{
66744 ++ unsigned HOST_WIDE_INT size;
66745 ++
66746 ++ gcc_assert(TYPE_PRECISION(type));
66747 ++
66748 ++ size = TYPE_PRECISION(type);
66749 ++ rap_fold_hash(sip_hash, (const unsigned char *)&size, sizeof size);
66750 ++}
66751 ++
66752 ++const_tree type_name(const_tree type)
66753 ++{
66754 ++ const_tree name;
66755 ++
66756 ++ name = TYPE_NAME(type);
66757 ++ if (!name)
66758 ++ return NULL_TREE;
66759 ++
66760 ++ switch (TREE_CODE(name)) {
66761 ++ case IDENTIFIER_NODE:
66762 ++ return name;
66763 ++
66764 ++ case TYPE_DECL:
66765 ++ gcc_assert(DECL_NAME(name));
66766 ++ return DECL_NAME(name);
66767 ++
66768 ++ default:
66769 ++ gcc_unreachable();
66770 ++ }
66771 ++}
66772 ++
66773 ++__attribute__((weak)) tree c_global_trees[CTI_MAX];
66774 ++
66775 ++// the core computation of the rap hash
66776 ++// the first piece is a (hopefully) compiler independent encondig of the type, derived from the gcc tree code
66777 ++// the second piece is type specific information, such as the size, qualifiers, (recursively) referenced types, etc
66778 ++static void rap_hash_tree(const_tree type, rap_hash_flags_t flags, unsigned char sip_hash[8])
66779 ++{
66780 ++ enum tree_code code;
66781 ++ unsigned int attrs;
66782 ++
66783 ++ code = TREE_CODE(type);
66784 ++ attrs = rap_hash_tree_code[code];
66785 ++ if (!attrs) {
66786 ++ fprintf(stderr, "unhandled tree_code %s %d\n", get_tree_code_name(code), code);
66787 ++ debug_tree(type);
66788 ++ gcc_unreachable();
66789 ++ }
66790 ++ rap_fold_hash(sip_hash, (const unsigned char *)&attrs, sizeof attrs);
66791 ++
66792 ++ enum {
66793 ++ // attrs layout for
66794 ++ // - all types:
66795 ++ RAP_HASH_VOLATILE = 1U << 31,
66796 ++ RAP_HASH_NOT_VOLATILE = 1U << 30,
66797 ++ RAP_HASH_CONST = 1U << 29,
66798 ++ RAP_HASH_NOT_CONST = 1U << 28,
66799 ++
66800 ++ // - pointer types:
66801 ++ RAP_HASH_RESTRICT = 1U << 27,
66802 ++ RAP_HASH_NOT_RESTRICT = 1U << 26,
66803 ++
66804 ++ // - C integer types:
66805 ++ RAP_HASH_UNSIGNED = 1U << 25,
66806 ++ RAP_HASH_SIGNED = 1U << 24,
66807 ++
66808 ++ RAP_HASH_UNQUALIFIED_CHAR = 1U << 23,
66809 ++ RAP_HASH_CHAR = 1U << 22,
66810 ++ RAP_HASH_SHORT = 1U << 21,
66811 ++ RAP_HASH_INT = 1U << 20,
66812 ++ RAP_HASH_LONG = 1U << 19,
66813 ++ RAP_HASH_LONG_LONG = 1U << 18,
66814 ++ RAP_HASH_WCHAR = 1U << 17,
66815 ++ RAP_HASH_CHAR16 = 1U << 16,
66816 ++ RAP_HASH_CHAR32 = 1U << 15,
66817 ++
66818 ++ // - C float types
66819 ++ RAP_HASH_FLOAT = 1U << 14,
66820 ++ RAP_HASH_DOUBLE = 1U << 13,
66821 ++ RAP_HASH_LONG_DOUBLE = 1U << 12,
66822 ++ RAP_HASH_DFLOAT32 = 1U << 11,
66823 ++ RAP_HASH_DFLOAT64 = 1U << 10,
66824 ++ RAP_HASH_DFLOAT128 = 1U << 9,
66825 ++ };
66826 ++
66827 ++ attrs = 0;
66828 ++ if (flags.qual_volatile)
66829 ++ attrs |= TYPE_VOLATILE(type) ? RAP_HASH_VOLATILE : RAP_HASH_NOT_VOLATILE;
66830 ++ if (flags.qual_const)
66831 ++ attrs |= TYPE_READONLY(type) ? RAP_HASH_CONST : RAP_HASH_NOT_CONST;
66832 ++
66833 ++ switch (code) {
66834 ++ default:
66835 ++ debug_tree(type);
66836 ++ gcc_unreachable();
66837 ++ break;
66838 ++
66839 ++ case VOID_TYPE:
66840 ++ break;
66841 ++
66842 ++ case OFFSET_TYPE:
66843 ++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
66844 ++ rap_hash_tree(TYPE_OFFSET_BASETYPE(type), flags, sip_hash);
66845 ++ break;
66846 ++
66847 ++ case FUNCTION_TYPE:
66848 ++ rap_hash_function(type, flags, sip_hash);
66849 ++ break;
66850 ++
66851 ++ case RECORD_TYPE:
66852 ++ rap_hash_type_name(type, sip_hash);
66853 ++ break;
66854 ++
66855 ++ case UNION_TYPE:
66856 ++ rap_hash_type_name(type, sip_hash);
66857 ++ break;
66858 ++
66859 ++ case POINTER_TYPE:
66860 ++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
66861 ++ break;
66862 ++
66863 ++ case VECTOR_TYPE:
66864 ++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
66865 ++ rap_hash_type_precision(TREE_TYPE(type), sip_hash);
66866 ++ break;
66867 ++
66868 ++ case ARRAY_TYPE:
66869 ++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
66870 ++ break;
66871 ++
66872 ++ case REAL_TYPE: {
66873 ++ const_tree main_variant = TYPE_MAIN_VARIANT(type);
66874 ++
66875 ++ switch (TYPE_PRECISION(main_variant)) {
66876 ++ default:
66877 ++ debug_tree(type);
66878 ++ debug_tree(TYPE_MAIN_VARIANT(type));
66879 ++ gcc_unreachable();
66880 ++
66881 ++ case 32:
66882 ++// attrs |= RAP_HASH_FLOAT;
66883 ++ break;
66884 ++
66885 ++ case 64:
66886 ++// attrs |= RAP_HASH_DOUBLE;
66887 ++ break;
66888 ++
66889 ++ case 80:
66890 ++ case 128:
66891 ++ attrs |= RAP_HASH_LONG_DOUBLE;
66892 ++ break;
66893 ++ }
66894 ++ rap_hash_type_precision(main_variant, sip_hash);
66895 ++ break;
66896 ++ }
66897 ++
66898 ++ case ENUMERAL_TYPE:
66899 ++ rap_hash_type_name(type, sip_hash);
66900 ++ case BOOLEAN_TYPE:
66901 ++ rap_hash_type_precision(type, sip_hash);
66902 ++ break;
66903 ++
66904 ++ case INTEGER_TYPE: {
66905 ++ attrs |= TYPE_UNSIGNED(type) ? RAP_HASH_UNSIGNED : RAP_HASH_SIGNED;
66906 ++ rap_hash_type_precision(type, sip_hash);
66907 ++ break;
66908 ++ }
66909 ++ }
66910 ++
66911 ++ rap_fold_hash(sip_hash, (const unsigned char *)&attrs, sizeof attrs);
66912 ++}
66913 ++
66914 ++static const_tree rap_dequal_argtype(const_tree argtype)
66915 ++{
66916 ++ // since gcc/tree.c:free_lang_data_in_type removes const/volatile from the top level param decl
66917 ++ // we have to simulate it here as this can be called earlier from the frontend as well
66918 ++ if (TYPE_READONLY(argtype) || TYPE_VOLATILE(argtype)) {
66919 ++ int quals;
66920 ++
66921 ++ quals = TYPE_QUALS(argtype) & ~TYPE_QUAL_CONST & ~TYPE_QUAL_VOLATILE;
66922 ++ argtype = build_qualified_type(CONST_CAST_TREE(argtype), quals);
66923 ++ }
66924 ++
66925 ++ return argtype;
66926 ++}
66927 ++
66928 ++// main function to compute the rap hash for function types
66929 ++// while virtual class methods are always replaced with their ancestor,
66930 ++// callers can decide whether to fully utilize that information via flags.method_ancestor
66931 ++static void rap_hash_function(const_tree fntype, rap_hash_flags_t flags, unsigned char sip_hash[8])
66932 ++{
66933 ++ function_args_iterator args_iter;
66934 ++ const_tree arg;
66935 ++
66936 ++ switch (TREE_CODE(fntype)) {
66937 ++ default:
66938 ++ debug_tree(fntype);
66939 ++ gcc_unreachable();
66940 ++
66941 ++ case FUNCTION_TYPE:
66942 ++ // 1. hash the result
66943 ++ rap_hash_tree(TREE_TYPE(fntype), flags, sip_hash);
66944 ++
66945 ++ // 2. hash the function parameters
66946 ++ FOREACH_FUNCTION_ARGS(fntype, arg, args_iter) {
66947 ++ const_tree argtype = arg;
66948 ++
66949 ++ argtype = rap_dequal_argtype(argtype);
66950 ++ rap_hash_tree(argtype, flags, sip_hash);
66951 ++ }
66952 ++ break;
66953 ++ }
66954 ++}
66955 ++
66956 ++rap_hash_t rap_hash_function_type(const_tree fntype, rap_hash_flags_t flags)
66957 ++{
66958 ++ unsigned char sip_hash[8] = { };
66959 ++ rap_hash_t hash;
66960 ++
66961 ++ rap_hash_function(fntype, flags, sip_hash);
66962 ++ hash = rap_extract_hash(sip_hash);
66963 ++
66964 ++ gcc_assert(hash.hash);
66965 ++ return hash;
66966 ++}
66967 ++
66968 ++rap_hash_t rap_hash_function_decl(const_tree fndecl, rap_hash_flags_t flags)
66969 ++{
66970 ++ tree fntype;
66971 ++
66972 ++ gcc_assert(TREE_CODE(fndecl) == FUNCTION_DECL);
66973 ++ fntype = TREE_TYPE(fndecl);
66974 ++
66975 ++ switch (TREE_CODE(fntype)) {
66976 ++ default:
66977 ++ debug_tree(fndecl);
66978 ++ gcc_unreachable();
66979 ++
66980 ++ case FUNCTION_TYPE:
66981 ++ return rap_hash_function_type(fntype, flags);
66982 ++ }
66983 ++}
66984 ++
66985 ++rap_hash_t rap_hash_function_node_imprecise(cgraph_node_ptr node)
66986 ++{
66987 ++ rap_hash_t hash;
66988 ++ tree fndecl;
66989 ++
66990 ++ gcc_assert(rap_imprecise_hashes);
66991 ++
66992 ++ hash.hash = 0;
66993 ++ if (node->uid < rap_cgraph_max_uid)
66994 ++ hash = rap_imprecise_hashes[node->uid];
66995 ++
66996 ++ if (hash.hash)
66997 ++ return hash;
66998 ++
66999 ++ fndecl = NODE_DECL(node);
67000 ++ if (TREE_CODE(TREE_TYPE(fndecl)) == FUNCTION_TYPE)
67001 ++ return rap_hash_function_decl(fndecl, imprecise_rap_hash_flags);
67002 ++
67003 ++ debug_cgraph_node(node);
67004 ++ debug_tree(fndecl);
67005 ++ error("indirect call to function %qD with a reserved hash value", fndecl);
67006 ++ return hash;
67007 ++}
67008 ++
67009 ++void rap_calculate_func_hashes(void *event_data __unused, void *data __unused)
67010 ++{
67011 ++ cgraph_node_ptr node;
67012 ++ int uid;
67013 ++
67014 ++ gcc_assert(!rap_imprecise_hashes);
67015 ++
67016 ++ rap_imprecise_hashes = (rap_hash_t *)xcalloc(cgraph_max_uid, sizeof(*rap_imprecise_hashes));
67017 ++ rap_cgraph_max_uid = cgraph_max_uid;
67018 ++
67019 ++ FOR_EACH_FUNCTION(node) {
67020 ++ const_tree fndecl;
67021 ++
67022 ++ uid = node->uid;
67023 ++ gcc_assert(uid < rap_cgraph_max_uid);
67024 ++
67025 ++ if (node->global.inlined_to)
67026 ++ continue;
67027 ++
67028 ++ fndecl = NODE_DECL(node);
67029 ++ gcc_assert(fndecl);
67030 ++
67031 ++ rap_imprecise_hashes[uid] = rap_hash_function_decl(fndecl, imprecise_rap_hash_flags);
67032 ++ gcc_assert(rap_imprecise_hashes[uid].hash);
67033 ++ }
67034 ++}
67035 +diff --git a/tools/gcc/rap_plugin/rap_plugin.c b/tools/gcc/rap_plugin/rap_plugin.c
67036 +new file mode 100644
67037 +index 0000000..c5827cb
67038 +--- /dev/null
67039 ++++ b/tools/gcc/rap_plugin/rap_plugin.c
67040 +@@ -0,0 +1,479 @@
67041 ++/*
67042 ++ * Copyright 2012-2016 by PaX Team <pageexec@××××××××.hu>
67043 ++ * Licensed under the GPL v2
67044 ++ *
67045 ++ * Homepage: http://pax.grsecurity.net/
67046 ++ *
67047 ++ * Usage:
67048 ++ * $ # for 4.5/4.6/C based 4.7
67049 ++ * $ gcc -I`gcc -print-file-name=plugin`/include -I`gcc -print-file-name=plugin`/include/c-family -fPIC -shared -O2 -o rap_plugin.so rap_plugin.c
67050 ++ * $ # for C++ based 4.7/4.8+
67051 ++ * $ g++ -I`g++ -print-file-name=plugin`/include -I`g++ -print-file-name=plugin`/include/c-family -fPIC -shared -O2 -o rap_plugin.so rap_plugin.c
67052 ++ * $ gcc -fplugin=./rap_plugin.so -fplugin-arg-rap_plugin-check=call test.c -O2
67053 ++ */
67054 ++
67055 ++#include "rap.h"
67056 ++
67057 ++int plugin_is_GPL_compatible;
67058 ++
67059 ++static struct plugin_info rap_plugin_info = {
67060 ++ .version = "201604272100",
67061 ++ .help = "check=call\tenable the corresponding features\n"
67062 ++ "hash=abs,abs-finish,const,volatile\n"
67063 ++ "report=func,fptr,abs\n"
67064 ++};
67065 ++
67066 ++rap_hash_flags_t imprecise_rap_hash_flags = {
67067 ++ .qual_const = 1,
67068 ++ .qual_volatile = 1,
67069 ++};
67070 ++
67071 ++tree rap_hash_type_node;
67072 ++
67073 ++static bool report_func_hash, report_abs_hash;
67074 ++
67075 ++// create the equivalent of
67076 ++// asm volatile("" : : : "memory");
67077 ++// or
67078 ++// asm("" : "+rm"(var));
67079 ++// or
67080 ++// asm("" : : "rm"(var));
67081 ++gimple barrier(tree var, bool full)
67082 ++{
67083 ++ gimple stmt;
67084 ++ gasm *asm_stmt;
67085 ++#if BUILDING_GCC_VERSION <= 4007
67086 ++ VEC(tree, gc) *inputs = NULL;
67087 ++ VEC(tree, gc) *outputs = NULL;
67088 ++ VEC(tree, gc) *clobbers = NULL;
67089 ++#else
67090 ++ vec<tree, va_gc> *inputs = NULL;
67091 ++ vec<tree, va_gc> *outputs = NULL;
67092 ++ vec<tree, va_gc> *clobbers = NULL;
67093 ++#endif
67094 ++
67095 ++ if (!var && full) {
67096 ++ tree clobber;
67097 ++
67098 ++ clobber = build_tree_list(NULL_TREE, build_string(7, "memory"));
67099 ++#if BUILDING_GCC_VERSION <= 4007
67100 ++ VEC_safe_push(tree, gc, clobbers, clobber);
67101 ++#else
67102 ++ vec_safe_push(clobbers, clobber);
67103 ++#endif
67104 ++ } else if (full) {
67105 ++ tree input, output;
67106 ++
67107 ++ input = build_tree_list(NULL_TREE, build_string(2, "0"));
67108 ++ input = chainon(NULL_TREE, build_tree_list(input, var));
67109 ++#if BUILDING_GCC_VERSION <= 4007
67110 ++ VEC_safe_push(tree, gc, inputs, input);
67111 ++#else
67112 ++ vec_safe_push(inputs, input);
67113 ++#endif
67114 ++
67115 ++ output = build_tree_list(NULL_TREE, build_string(4, "=rm"));
67116 ++ gcc_assert(SSA_NAME_VAR(var));
67117 ++ var = make_ssa_name(SSA_NAME_VAR(var), NULL);
67118 ++ output = chainon(NULL_TREE, build_tree_list(output, var));
67119 ++#if BUILDING_GCC_VERSION <= 4007
67120 ++ VEC_safe_push(tree, gc, outputs, output);
67121 ++#else
67122 ++ vec_safe_push(outputs, output);
67123 ++#endif
67124 ++ } else {
67125 ++ tree input;
67126 ++
67127 ++ input = build_tree_list(NULL_TREE, build_string(3, "rm"));
67128 ++ input = chainon(NULL_TREE, build_tree_list(input, var));
67129 ++#if BUILDING_GCC_VERSION <= 4007
67130 ++ VEC_safe_push(tree, gc, inputs, input);
67131 ++#else
67132 ++ vec_safe_push(inputs, input);
67133 ++#endif
67134 ++ }
67135 ++
67136 ++ stmt = gimple_build_asm_vec("", inputs, outputs, clobbers, NULL);
67137 ++ asm_stmt = as_a_gasm(stmt);
67138 ++ if (!var && full)
67139 ++ gimple_asm_set_volatile(asm_stmt, true);
67140 ++ else if (full)
67141 ++ SSA_NAME_DEF_STMT(var) = stmt;
67142 ++ return stmt;
67143 ++}
67144 ++
67145 ++static const struct gcc_debug_hooks *old_debug_hooks;
67146 ++static struct gcc_debug_hooks rap_debug_hooks;
67147 ++
67148 ++static bool __rap_cgraph_indirectly_callable(cgraph_node_ptr node, void *data)
67149 ++{
67150 ++#if BUILDING_GCC_VERSION >= 4008
67151 ++ if (NODE_SYMBOL(node)->externally_visible)
67152 ++#else
67153 ++ if (node->local.externally_visible)
67154 ++#endif
67155 ++ return true;
67156 ++
67157 ++ if (NODE_SYMBOL(node)->address_taken)
67158 ++ return true;
67159 ++
67160 ++ return false;
67161 ++}
67162 ++
67163 ++static bool rap_cgraph_indirectly_callable(cgraph_node_ptr node)
67164 ++{
67165 ++ return cgraph_for_node_and_aliases(node, __rap_cgraph_indirectly_callable, NULL, true);
67166 ++}
67167 ++
67168 ++static void rap_begin_function(tree decl)
67169 ++{
67170 ++ cgraph_node_ptr node;
67171 ++ rap_hash_t imprecise_rap_hash;
67172 ++ unsigned HOST_WIDE_INT skip;
67173 ++
67174 ++ gcc_assert(debug_hooks == &rap_debug_hooks);
67175 ++
67176 ++ // chain to previous callback
67177 ++ if (old_debug_hooks && old_debug_hooks->begin_function)
67178 ++ old_debug_hooks->begin_function(decl);
67179 ++
67180 ++ // align the rap hash if necessary
67181 ++ skip = 1ULL << align_functions_log;
67182 ++ if (skip > 4 * sizeof(rap_hash_t))
67183 ++ ASM_OUTPUT_SKIP(asm_out_file, skip - 4 * sizeof(rap_hash_t));
67184 ++
67185 ++ // don't compute hash for functions called only directly
67186 ++ node = cgraph_get_node(decl);
67187 ++ gcc_assert(node);
67188 ++ if (!rap_cgraph_indirectly_callable(node)) {
67189 ++ imprecise_rap_hash.hash = 0;
67190 ++ } else {
67191 ++ imprecise_rap_hash = rap_hash_function_node_imprecise(node);
67192 ++ }
67193 ++
67194 ++ if (report_func_hash)
67195 ++ inform(DECL_SOURCE_LOCATION(decl), "func rap_hash: %x %s", imprecise_rap_hash.hash, IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(decl)));
67196 ++
67197 ++ fprintf(asm_out_file, ASM_QUAD " %#lx\t%s __rap_hash_%s\n", (long)imprecise_rap_hash.hash, ASM_COMMENT_START, IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(decl)));
67198 ++}
67199 ++
67200 ++static void rap_start_unit_common(void *gcc_data __unused, void *user_data __unused)
67201 ++{
67202 ++ rap_hash_type_node = long_integer_type_node;
67203 ++
67204 ++ if (debug_hooks)
67205 ++ rap_debug_hooks = *debug_hooks;
67206 ++ rap_debug_hooks.begin_function = rap_begin_function;
67207 ++ old_debug_hooks = debug_hooks;
67208 ++ debug_hooks = &rap_debug_hooks;
67209 ++}
67210 ++
67211 ++/*
67212 ++ emit an absolute symbol for each function that may be referenced through the plt
67213 ++ - all externs
67214 ++ - non-static functions
67215 ++ - use visibility instead?
67216 ++
67217 ++ .globl __rap_hash_func
67218 ++ .offset 0xhash_for_func
67219 ++ .type __rap_hash_func, @object
67220 ++ __rap_hash_func:
67221 ++ .previous
67222 ++*/
67223 ++static void rap_finish_unit(void *gcc_data __unused, void *user_data __unused)
67224 ++{
67225 ++ cgraph_node_ptr node;
67226 ++ rap_hash_t hash;
67227 ++
67228 ++ gcc_assert(debug_hooks == &rap_debug_hooks);
67229 ++
67230 ++ hash.hash = 0;
67231 ++ FOR_EACH_FUNCTION(node) {
67232 ++ tree fndecl;
67233 ++ const char *asmname;
67234 ++ char *name = NULL;
67235 ++
67236 ++ if (cgraph_function_body_availability(node) >= AVAIL_INTERPOSABLE) {
67237 ++ if (node->thunk.thunk_p || node->alias)
67238 ++ continue;
67239 ++ if (!rap_cgraph_indirectly_callable(node))
67240 ++ continue;
67241 ++ }
67242 ++
67243 ++#if BUILDING_GCC_VERSION >= 4007
67244 ++ gcc_assert(cgraph_function_or_thunk_node(node, NULL) == node);
67245 ++#endif
67246 ++
67247 ++ fndecl = NODE_DECL(node);
67248 ++ gcc_assert(fndecl);
67249 ++ if (DECL_IS_BUILTIN(fndecl) && DECL_BUILT_IN_CLASS(fndecl) == BUILT_IN_NORMAL)
67250 ++ continue;
67251 ++
67252 ++ if (!TREE_PUBLIC(fndecl))
67253 ++ continue;
67254 ++
67255 ++ if (DECL_ARTIFICIAL(fndecl))
67256 ++ continue;
67257 ++
67258 ++ if (DECL_ABSTRACT_ORIGIN(fndecl) && DECL_ABSTRACT_ORIGIN(fndecl) != fndecl)
67259 ++ continue;
67260 ++
67261 ++ gcc_assert(DECL_ASSEMBLER_NAME(fndecl));
67262 ++ asmname = IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(fndecl));
67263 ++ if (strchr(asmname, '.'))
67264 ++ continue;
67265 ++
67266 ++ if (asmname[0] == '*')
67267 ++ asmname++;
67268 ++
67269 ++ gcc_assert(asmname[0]);
67270 ++ gcc_assert(asprintf(&name, "__rap_hash_%s", asmname) != -1);
67271 ++
67272 ++ hash = rap_hash_function_node_imprecise(node);
67273 ++ if (report_abs_hash)
67274 ++ inform(DECL_SOURCE_LOCATION(fndecl), "abs rap_hash: %x %s", hash.hash, IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(fndecl)));
67275 ++
67276 ++ fprintf(asm_out_file, GLOBAL_ASM_OP " %s\n", name);
67277 ++ fprintf(asm_out_file, "\t.offset %#lx\n", (long)hash.hash);
67278 ++ ASM_OUTPUT_TYPE_DIRECTIVE(asm_out_file, name, "object");
67279 ++ ASM_OUTPUT_LABEL(asm_out_file, name);
67280 ++ free(name);
67281 ++ }
67282 ++ if (hash.hash)
67283 ++ fprintf(asm_out_file, "\t.previous\n");
67284 ++}
67285 ++
67286 ++// emit the rap hash as an absolute symbol for all functions seen in the frontend
67287 ++// this is necessary as later unreferenced nodes will be removed yet we'd like to emit as many hashes as possible
67288 ++static void rap_finish_decl(void *event_data, void *data __unused)
67289 ++{
67290 ++ tree fndecl = (tree)event_data;
67291 ++ rap_hash_t hash;
67292 ++ const char *asmname;
67293 ++ char *name = NULL;
67294 ++
67295 ++ if (fndecl == error_mark_node)
67296 ++ return;
67297 ++
67298 ++ if (TREE_CODE(fndecl) != FUNCTION_DECL)
67299 ++ return;
67300 ++
67301 ++ if (!TREE_PUBLIC(fndecl))
67302 ++ return;
67303 ++
67304 ++ if (DECL_ARTIFICIAL(fndecl))
67305 ++ return;
67306 ++
67307 ++ if (DECL_ABSTRACT_ORIGIN(fndecl) && DECL_ABSTRACT_ORIGIN(fndecl) != fndecl)
67308 ++ return;
67309 ++
67310 ++ asmname = DECL_NAME_POINTER(fndecl);
67311 ++ gcc_assert(asmname[0]);
67312 ++
67313 ++ if (strchr(asmname, '.'))
67314 ++ return;
67315 ++
67316 ++ gcc_assert(asprintf(&name, "__rap_hash_%s", asmname) != -1);
67317 ++
67318 ++ hash = rap_hash_function_decl(fndecl, imprecise_rap_hash_flags);
67319 ++
67320 ++ if (report_abs_hash)
67321 ++ inform(DECL_SOURCE_LOCATION(fndecl), "abs rap_hash: %x %s", hash.hash, asmname);
67322 ++
67323 ++ fprintf(asm_out_file, GLOBAL_ASM_OP " %s\n", name);
67324 ++ fprintf(asm_out_file, "\t.offset %#lx\n", (long)hash.hash);
67325 ++ ASM_OUTPUT_TYPE_DIRECTIVE(asm_out_file, name, "object");
67326 ++ ASM_OUTPUT_LABEL(asm_out_file, name);
67327 ++ free(name);
67328 ++
67329 ++ fprintf(asm_out_file, "\t.previous\n");
67330 ++}
67331 ++
67332 ++static bool rap_unignore_gate(void)
67333 ++{
67334 ++ if (!DECL_IGNORED_P(current_function_decl))
67335 ++ return false;
67336 ++
67337 ++ inform(DECL_SOURCE_LOCATION(current_function_decl), "DECL_IGNORED fixed");
67338 ++
67339 ++ DECL_IGNORED_P(current_function_decl) = 0;
67340 ++ return false;
67341 ++}
67342 ++
67343 ++#define PASS_NAME rap_unignore
67344 ++#define NO_EXECUTE
67345 ++#define TODO_FLAGS_FINISH TODO_dump_func
67346 ++#include "gcc-generate-rtl-pass.h"
67347 ++
67348 ++static bool rap_version_check(struct plugin_gcc_version *gcc_version, struct plugin_gcc_version *plugin_version)
67349 ++{
67350 ++ if (!gcc_version || !plugin_version)
67351 ++ return false;
67352 ++
67353 ++#if BUILDING_GCC_VERSION >= 5000
67354 ++ if (strncmp(gcc_version->basever, plugin_version->basever, 4))
67355 ++#else
67356 ++ if (strcmp(gcc_version->basever, plugin_version->basever))
67357 ++#endif
67358 ++ return false;
67359 ++ if (strcmp(gcc_version->datestamp, plugin_version->datestamp))
67360 ++ return false;
67361 ++ if (strcmp(gcc_version->devphase, plugin_version->devphase))
67362 ++ return false;
67363 ++ if (strcmp(gcc_version->revision, plugin_version->revision))
67364 ++ return false;
67365 ++// if (strcmp(gcc_version->configuration_arguments, plugin_version->configuration_arguments))
67366 ++// return false;
67367 ++ return true;
67368 ++}
67369 ++
67370 ++EXPORTED_CONST struct ggc_root_tab gt_ggc_r_gt_rap[] = {
67371 ++ {
67372 ++ .base = &rap_hash_type_node,
67373 ++ .nelt = 1,
67374 ++ .stride = sizeof(rap_hash_type_node),
67375 ++ .cb = &gt_ggc_mx_tree_node,
67376 ++ .pchw = &gt_pch_nx_tree_node
67377 ++ },
67378 ++ LAST_GGC_ROOT_TAB
67379 ++};
67380 ++
67381 ++int plugin_init(struct plugin_name_args *plugin_info, struct plugin_gcc_version *version)
67382 ++{
67383 ++ int i;
67384 ++ const char * const plugin_name = plugin_info->base_name;
67385 ++ const int argc = plugin_info->argc;
67386 ++ const struct plugin_argument * const argv = plugin_info->argv;
67387 ++ bool enable_call = false;
67388 ++ bool enable_abs = false, enable_abs_finish = false;
67389 ++
67390 ++ struct register_pass_info rap_fptr_pass_info;
67391 ++ struct register_pass_info rap_unignore_pass_info;
67392 ++
67393 ++ rap_fptr_pass_info.pass = make_rap_fptr_pass();
67394 ++ rap_fptr_pass_info.reference_pass_name = "nrv";
67395 ++ rap_fptr_pass_info.ref_pass_instance_number = 1;
67396 ++ rap_fptr_pass_info.pos_op = PASS_POS_INSERT_AFTER;
67397 ++
67398 ++ rap_unignore_pass_info.pass = make_rap_unignore_pass();
67399 ++ rap_unignore_pass_info.reference_pass_name = "final";
67400 ++ rap_unignore_pass_info.ref_pass_instance_number = 1;
67401 ++ rap_unignore_pass_info.pos_op = PASS_POS_INSERT_BEFORE;
67402 ++
67403 ++ if (!rap_version_check(version, &gcc_version)) {
67404 ++ error(G_("incompatible gcc/plugin versions"));
67405 ++ return 1;
67406 ++ }
67407 ++
67408 ++#if BUILDING_GCC_VERSION >= 5000
67409 ++ if (flag_ipa_icf_functions) {
67410 ++// warning_at(UNKNOWN_LOCATION, 0, G_("-fipa-icf is incompatible with %s, disabling..."), plugin_name);
67411 ++// inform(UNKNOWN_LOCATION, G_("-fipa-icf is incompatible with %s, disabling..."), plugin_name);
67412 ++ flag_ipa_icf_functions = 0;
67413 ++ }
67414 ++#endif
67415 ++
67416 ++ for (i = 0; i < argc; ++i) {
67417 ++ if (!strcmp(argv[i].key, "disable"))
67418 ++ continue;
67419 ++
67420 ++ if (!strcmp(argv[i].key, "check")) {
67421 ++ char *values, *value, *saveptr;
67422 ++
67423 ++ if (!argv[i].value) {
67424 ++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
67425 ++ continue;
67426 ++ }
67427 ++
67428 ++ values = xstrdup(argv[i].value);
67429 ++ value = strtok_r(values, ",", &saveptr);
67430 ++ while (value) {
67431 ++ if (!strcmp(value, "call"))
67432 ++ enable_call = TARGET_64BIT;//true;
67433 ++ else
67434 ++ error(G_("unknown value supplied for option '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, value);
67435 ++ value = strtok_r(NULL, ",", &saveptr);
67436 ++ }
67437 ++ free(values);
67438 ++ continue;
67439 ++ }
67440 ++
67441 ++ if (!strcmp(argv[i].key, "hash")) {
67442 ++ char *values, *value, *saveptr;
67443 ++
67444 ++ if (!argv[i].value) {
67445 ++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
67446 ++ continue;
67447 ++ }
67448 ++
67449 ++ values = xstrdup(argv[i].value);
67450 ++ value = strtok_r(values, ",", &saveptr);
67451 ++ while (value) {
67452 ++ if (!strcmp(value, "abs"))
67453 ++ enable_abs = enable_abs_finish = true;
67454 ++ else if (!strcmp(value, "abs-finish"))
67455 ++ enable_abs_finish = true;
67456 ++// else if (!strcmp(value, "const"))
67457 ++// imprecise_rap_hash_flags.qual_const = 1;
67458 ++// else if (!strcmp(value, "volatile"))
67459 ++// imprecise_rap_hash_flags.qual_volatile = 1;
67460 ++ else
67461 ++ error(G_("unknown value supplied for option '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, value);
67462 ++ value = strtok_r(NULL, ",", &saveptr);
67463 ++ }
67464 ++ free(values);
67465 ++ continue;
67466 ++ }
67467 ++
67468 ++ if (!strcmp(argv[i].key, "report")) {
67469 ++ char *values, *value, *saveptr;
67470 ++
67471 ++ if (!argv[i].value) {
67472 ++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
67473 ++ continue;
67474 ++ }
67475 ++
67476 ++ values = xstrdup(argv[i].value);
67477 ++ value = strtok_r(values, ",", &saveptr);
67478 ++ while (value) {
67479 ++ if (!strcmp(value, "func"))
67480 ++ report_func_hash = true;
67481 ++ else if (!strcmp(value, "fptr"))
67482 ++ report_fptr_hash = true;
67483 ++ else if (!strcmp(value, "abs"))
67484 ++ report_abs_hash = true;
67485 ++ else
67486 ++ error(G_("unknown value supplied for option '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, value);
67487 ++ value = strtok_r(NULL, ",", &saveptr);
67488 ++ }
67489 ++ free(values);
67490 ++ continue;
67491 ++ }
67492 ++
67493 ++ error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
67494 ++ }
67495 ++
67496 ++ register_callback(plugin_name, PLUGIN_INFO, NULL, &rap_plugin_info);
67497 ++
67498 ++ if (enable_call) {
67499 ++#if BUILDING_GCC_VERSION >= 4007
67500 ++ if (enable_abs)
67501 ++ register_callback(plugin_name, PLUGIN_FINISH_DECL, rap_finish_decl, NULL);
67502 ++#else
67503 ++#warning TODO
67504 ++#endif
67505 ++ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &rap_unignore_pass_info);
67506 ++ register_callback(plugin_name, PLUGIN_START_UNIT, rap_start_unit_common, NULL);
67507 ++ register_callback(plugin_name, PLUGIN_REGISTER_GGC_ROOTS, NULL, (void *)&gt_ggc_r_gt_rap);
67508 ++ if (enable_abs_finish)
67509 ++ register_callback(plugin_name, PLUGIN_FINISH_UNIT, rap_finish_unit, NULL);
67510 ++ }
67511 ++
67512 ++ if (enable_call)
67513 ++ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &rap_fptr_pass_info);
67514 ++
67515 ++ if (enable_call)
67516 ++ register_callback(plugin_name, PLUGIN_ALL_IPA_PASSES_START, rap_calculate_func_hashes, NULL);
67517 ++
67518 ++ return 0;
67519 ++}
67520 +diff --git a/tools/gcc/rap_plugin/sip.c b/tools/gcc/rap_plugin/sip.c
67521 +new file mode 100644
67522 +index 0000000..65bc1cd
67523 +--- /dev/null
67524 ++++ b/tools/gcc/rap_plugin/sip.c
67525 +@@ -0,0 +1,96 @@
67526 ++// SipHash-2-4 adapted by the PaX Team from the public domain version written by
67527 ++// Jean-Philippe Aumasson <jeanphilippe.aumasson@×××××.com>
67528 ++// Daniel J. Bernstein <djb@×××××.to>
67529 ++
67530 ++#include <stdint.h>
67531 ++
67532 ++#define ROTL(x, b) (u64)(((x) << (b)) | ((x) >> (64 - (b))))
67533 ++
67534 ++#define U32TO8_LE(p, v) \
67535 ++ (p)[0] = (u8)((v) ); (p)[1] = (u8)((v) >> 8); \
67536 ++ (p)[2] = (u8)((v) >> 16); (p)[3] = (u8)((v) >> 24);
67537 ++
67538 ++#define U64TO8_LE(p, v) \
67539 ++ U32TO8_LE((p), (u32)((v) )); \
67540 ++ U32TO8_LE((p) + 4, (u32)((v) >> 32));
67541 ++
67542 ++#define U8TO64_LE(p) ( \
67543 ++ ((u64)((p)[0]) ) | \
67544 ++ ((u64)((p)[1]) << 8) | \
67545 ++ ((u64)((p)[2]) << 16) | \
67546 ++ ((u64)((p)[3]) << 24) | \
67547 ++ ((u64)((p)[4]) << 32) | \
67548 ++ ((u64)((p)[5]) << 40) | \
67549 ++ ((u64)((p)[6]) << 48) | \
67550 ++ ((u64)((p)[7]) << 56))
67551 ++
67552 ++#define SIPROUND \
67553 ++do { \
67554 ++ v0 += v1; v1 = ROTL(v1, 13); v1 ^= v0; v0 = ROTL(v0, 32); \
67555 ++ v2 += v3; v3 = ROTL(v3, 16); v3 ^= v2; \
67556 ++ v0 += v3; v3 = ROTL(v3, 21); v3 ^= v0; \
67557 ++ v2 += v1; v1 = ROTL(v1, 17); v1 ^= v2; v2 = ROTL(v2, 32); \
67558 ++} while(0)
67559 ++
67560 ++typedef uint64_t u64;
67561 ++typedef uint32_t u32;
67562 ++typedef uint8_t u8;
67563 ++
67564 ++/* SipHash-2-4 with previous output folding, a poor man's streaming interface */
67565 ++void siphash24fold(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k);
67566 ++
67567 ++void siphash24fold(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k)
67568 ++{
67569 ++ u64 k0 = U8TO64_LE(k);
67570 ++ u64 k1 = U8TO64_LE(k + 8);
67571 ++ /* "somepseudorandomlygeneratedbytes" */
67572 ++ u64 v0 = 0x736f6d6570736575ULL ^ k0;
67573 ++ u64 v1 = 0x646f72616e646f6dULL ^ k1;
67574 ++ u64 v2 = 0x6c7967656e657261ULL ^ k0;
67575 ++ u64 v3 = 0x7465646279746573ULL ^ k1;
67576 ++ u64 b, m;
67577 ++ const u8 * const end = in + inlen - (inlen % sizeof(u64));
67578 ++ const int left = inlen & 7;
67579 ++ b = ((u64)inlen) << 56;
67580 ++
67581 ++ // fold in the previous output
67582 ++ m = U8TO64_LE(out);
67583 ++ v3 ^= m;
67584 ++ SIPROUND;
67585 ++ SIPROUND;
67586 ++ v0 ^= m;
67587 ++
67588 ++ // consume full input blocks
67589 ++ for (; in != end; in += 8) {
67590 ++ m = U8TO64_LE(in);
67591 ++ v3 ^= m;
67592 ++ SIPROUND;
67593 ++ SIPROUND;
67594 ++ v0 ^= m;
67595 ++ }
67596 ++
67597 ++ // consume the last potentially partial block
67598 ++ switch (left) {
67599 ++ case 7: b |= ((u64)in[6]) << 48;
67600 ++ case 6: b |= ((u64)in[5]) << 40;
67601 ++ case 5: b |= ((u64)in[4]) << 32;
67602 ++ case 4: b |= ((u64)in[3]) << 24;
67603 ++ case 3: b |= ((u64)in[2]) << 16;
67604 ++ case 2: b |= ((u64)in[1]) << 8;
67605 ++ case 1: b |= ((u64)in[0]); break;
67606 ++ case 0: break;
67607 ++ }
67608 ++
67609 ++ // finalize
67610 ++ v3 ^= b;
67611 ++ SIPROUND;
67612 ++ SIPROUND;
67613 ++ v0 ^= b;
67614 ++ v2 ^= 0xff;
67615 ++ SIPROUND;
67616 ++ SIPROUND;
67617 ++ SIPROUND;
67618 ++ SIPROUND;
67619 ++ b = v0 ^ v1 ^ v2 ^ v3;
67620 ++ U64TO8_LE(out, b);
67621 ++}
67622 diff --git a/tools/gcc/size_overflow_plugin/.gitignore b/tools/gcc/size_overflow_plugin/.gitignore
67623 new file mode 100644
67624 index 0000000..c4b24b9
67625 @@ -155985,10 +184142,10 @@ index 0000000..fc58e16
67626 +}
67627 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
67628 new file mode 100644
67629 -index 0000000..951b3be
67630 +index 0000000..837e6d0
67631 --- /dev/null
67632 +++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
67633 -@@ -0,0 +1,21510 @@
67634 +@@ -0,0 +1,21648 @@
67635 +enable_so_recv_ctrl_pipe_us_data_0 recv_ctrl_pipe us_data 0 0 NULL
67636 +enable_so___earlyonly_bootmem_alloc_fndecl_3 __earlyonly_bootmem_alloc fndecl 2-3-4 3 NULL
67637 +enable_so_v9fs_xattr_get_acl_fndecl_4 v9fs_xattr_get_acl fndecl 5 4 NULL
67638 @@ -156010,6 +184167,7 @@ index 0000000..951b3be
67639 +enable_so_ath10k_core_create_fndecl_34 ath10k_core_create fndecl 1 34 &enable_so_ocfs2_xattr_get_clusters_fndecl_34
67640 +enable_so_total_drm_buf_35 total drm_buf 0 35 NULL
67641 +enable_so_sis5595_device_add_fndecl_39 sis5595_device_add fndecl 1 39 NULL
67642 ++enable_so_nr_rings_blkfront_info_42 nr_rings blkfront_info 0 42 NULL
67643 +enable_so_mc_vram_size_amdgpu_mc_45 mc_vram_size amdgpu_mc 0 45 NULL
67644 +enable_so_pattern_len_tcf_em_text_57 pattern_len tcf_em_text 0 57 NULL nohasharray
67645 +enable_so_p54_init_common_fndecl_57 p54_init_common fndecl 1 57 &enable_so_pattern_len_tcf_em_text_57
67646 @@ -156063,6 +184221,7 @@ index 0000000..951b3be
67647 +enable_so_bn_shadow_fndecl_211 bn_shadow fndecl 2 211 &enable_so_xfs_zero_file_space_fndecl_211
67648 +enable_so_cxgb_alloc_mem_fndecl_212 cxgb_alloc_mem fndecl 1 212 NULL
67649 +enable_so_copies_r10conf_216 copies r10conf 0 216 NULL
67650 ++enable_so_drm_universal_plane_init_fndecl_219 drm_universal_plane_init fndecl 6 219 NULL
67651 +enable_so_optrom_size_qla_hw_data_230 optrom_size qla_hw_data 0 230 NULL
67652 +enable_so_pvid_ocrdma_dev_231 pvid ocrdma_dev 0 231 NULL nohasharray
67653 +enable_so_afs_cell_alloc_fndecl_231 afs_cell_alloc fndecl 2 231 &enable_so_pvid_ocrdma_dev_231
67654 @@ -156097,6 +184256,7 @@ index 0000000..951b3be
67655 +enable_so_MaxBufferSize_negotiate_rsp_314 MaxBufferSize negotiate_rsp 0 314 NULL nohasharray
67656 +enable_so_ip_num_acl_subject_label_314 ip_num acl_subject_label 0 314 &enable_so_MaxBufferSize_negotiate_rsp_314
67657 +enable_so_name_len_jffs2_raw_xattr_318 name_len jffs2_raw_xattr 0 318 NULL
67658 ++enable_so_bo_handle_count_drm_vc4_submit_cl_326 bo_handle_count drm_vc4_submit_cl 0 326 NULL
67659 +enable_so_num_alt_usb_usbvision_328 num_alt usb_usbvision 0 328 NULL
67660 +enable_so_start_fb_cmap_user_333 start fb_cmap_user 0 333 NULL
67661 +enable_so_block_size_se_dev_attrib_334 block_size se_dev_attrib 0 334 NULL
67662 @@ -156268,6 +184428,7 @@ index 0000000..951b3be
67663 +enable_so_qi_dqperchunk_xfs_quotainfo_863 qi_dqperchunk xfs_quotainfo 0 863 NULL
67664 +enable_so_adu_read_fndecl_866 adu_read fndecl 3 866 NULL
67665 +enable_so_safe_prepare_write_buffer_fndecl_872 safe_prepare_write_buffer fndecl 3 872 NULL
67666 ++enable_so_dvb_register_media_device_fndecl_878 dvb_register_media_device fndecl 4 878 NULL
67667 +enable_so_field_count_audit_rule_data_886 field_count audit_rule_data 0 886 NULL
67668 +enable_so_octeon_read_device_mem64_fndecl_892 octeon_read_device_mem64 fndecl 0 892 NULL
67669 +enable_so_orinoco_change_mtu_fndecl_895 orinoco_change_mtu fndecl 2 895 NULL nohasharray
67670 @@ -156817,7 +184978,8 @@ index 0000000..951b3be
67671 +enable_so_off_fuse_dirent_2561 off fuse_dirent 0 2561 NULL
67672 +enable_so_active_duplex_niu_link_config_2566 active_duplex niu_link_config 0 2566 NULL
67673 +enable_so_hdsp_external_sample_rate_fndecl_2568 hdsp_external_sample_rate fndecl 0 2568 NULL
67674 -+enable_so_extend_brk_fndecl_2574 extend_brk fndecl 2-1 2574 NULL
67675 ++enable_so_extend_brk_fndecl_2574 extend_brk fndecl 2-1 2574 NULL nohasharray
67676 ++enable_so_sec_size_nvm_dev_2574 sec_size nvm_dev 0 2574 &enable_so_extend_brk_fndecl_2574
67677 +enable_so___tun_chr_ioctl_fndecl_2575 __tun_chr_ioctl fndecl 4 2575 NULL
67678 +enable_so_aio_offset_iocb_2576 aio_offset iocb 0 2576 NULL nohasharray
67679 +enable_so_skb_checksum_trimmed_fndecl_2576 skb_checksum_trimmed fndecl 2 2576 &enable_so_aio_offset_iocb_2576
67680 @@ -157031,6 +185193,7 @@ index 0000000..951b3be
67681 +enable_so_lbs_rdbbp_write_fndecl_3237 lbs_rdbbp_write fndecl 3 3237 NULL
67682 +enable_so_inlen_ib_udata_3242 inlen ib_udata 0 3242 NULL nohasharray
67683 +enable_so_expect_class_max_nf_conntrack_helper_3242 expect_class_max nf_conntrack_helper 0 3242 &enable_so_inlen_ib_udata_3242
67684 ++enable_so_uniforms_size_drm_vc4_submit_cl_3245 uniforms_size drm_vc4_submit_cl 0 3245 NULL
67685 +enable_so_max_wqe_ocrdma_dev_attr_3246 max_wqe ocrdma_dev_attr 0 3246 NULL
67686 +enable_so_of_property_match_string_fndecl_3250 of_property_match_string fndecl 0 3250 NULL
67687 +enable_so_shmem_kernel_file_setup_fndecl_3251 shmem_kernel_file_setup fndecl 2 3251 NULL
67688 @@ -157165,6 +185328,7 @@ index 0000000..951b3be
67689 +enable_so_sl_ib_ah_attr_3633 sl ib_ah_attr 0 3633 NULL
67690 +enable_so_vmci_transport_queue_pair_alloc_fndecl_3639 vmci_transport_queue_pair_alloc fndecl 4-3 3639 NULL nohasharray
67691 +enable_so_xfs_attr3_leaf_freextent_fndecl_3639 xfs_attr3_leaf_freextent fndecl 4-3 3639 &enable_so_vmci_transport_queue_pair_alloc_fndecl_3639
67692 ++enable_so_count_phm_clock_voltage_dependency_table_3642 count phm_clock_voltage_dependency_table 0 3642 NULL
67693 +enable_so_t_blocknr_high_journal_block_tag_s_3648 t_blocknr_high journal_block_tag_s 0 3648 NULL
67694 +enable_so_s_desc_size_ext4_sb_info_3652 s_desc_size ext4_sb_info 0 3652 NULL
67695 +enable_so_pci_id_imc_uncore_pci_dev_3656 pci_id imc_uncore_pci_dev 0 3656 NULL
67696 @@ -157189,6 +185353,7 @@ index 0000000..951b3be
67697 +enable_so_ip_getsockopt_fndecl_3711 ip_getsockopt fndecl 0 3711 NULL
67698 +enable_so_len_sctp_auth_bytes_3715 len sctp_auth_bytes 0 3715 NULL
67699 +enable_so_byte_len_ib_wc_3716 byte_len ib_wc 0 3716 NULL
67700 ++enable_so_dvb_create_media_entity_fndecl_3720 dvb_create_media_entity fndecl 3 3720 NULL
67701 +enable_so_len_amp_assoc_3724 len amp_assoc 0 3724 NULL
67702 +enable_so___v4l2_ctrl_modify_range_fndecl_3726 __v4l2_ctrl_modify_range fndecl 3-2-5 3726 NULL
67703 +enable_so_SYSC_rt_sigpending_fndecl_3728 SYSC_rt_sigpending fndecl 2 3728 NULL
67704 @@ -157386,7 +185551,8 @@ index 0000000..951b3be
67705 +enable_so_h_next_leaf_blk_ocfs2_extent_block_4292 h_next_leaf_blk ocfs2_extent_block 0 4292 NULL
67706 +enable_so___add_section_fndecl_4296 __add_section fndecl 3 4296 NULL
67707 +enable_so_cgroup_task_count_fndecl_4297 cgroup_task_count fndecl 0 4297 NULL
67708 -+enable_so_maxpacket_musb_qh_4303 maxpacket musb_qh 0 4303 NULL
67709 ++enable_so_maxpacket_musb_qh_4303 maxpacket musb_qh 0 4303 NULL nohasharray
67710 ++enable_so_key_size_pkcs1pad_ctx_4303 key_size pkcs1pad_ctx 0 4303 &enable_so_maxpacket_musb_qh_4303
67711 +enable_so_rx_frm_len_mask_macb_4310 rx_frm_len_mask macb 0 4310 NULL
67712 +enable_so_raid56_alloc_missing_rbio_fndecl_4316 raid56_alloc_missing_rbio fndecl 4 4316 NULL
67713 +enable_so_ps_upsd_max_apturn_read_fndecl_4317 ps_upsd_max_apturn_read fndecl 3 4317 NULL
67714 @@ -157463,6 +185629,7 @@ index 0000000..951b3be
67715 +enable_so_LoadBitmap_fndecl_4569 LoadBitmap fndecl 2 4569 NULL
67716 +enable_so_far_copies_geom_4570 far_copies geom 0 4570 NULL
67717 +enable_so_dlen_nft_set_4577 dlen nft_set 0 4577 NULL
67718 ++enable_so_wilc_spi_tx_fndecl_4583 wilc_spi_tx fndecl 3 4583 NULL
67719 +enable_so_rx_buf_sz_gem_4593 rx_buf_sz gem 0 4593 NULL nohasharray
67720 +enable_so_cxd2841er_read_regs_fndecl_4593 cxd2841er_read_regs fndecl 5 4593 &enable_so_rx_buf_sz_gem_4593
67721 +enable_so_fdt_nop_node_fndecl_4595 fdt_nop_node fndecl 2 4595 NULL
67722 @@ -157648,7 +185815,8 @@ index 0000000..951b3be
67723 +enable_so_rlen_si2157_cmd_5138 rlen si2157_cmd 0 5138 NULL nohasharray
67724 +enable_so_channel_count_il_priv_5138 channel_count il_priv 0 5138 &enable_so_rlen_si2157_cmd_5138
67725 +enable_so_fnic_stats_debugfs_read_fndecl_5139 fnic_stats_debugfs_read fndecl 3 5139 NULL
67726 -+enable_so_echo_client_prep_commit_fndecl_5142 echo_client_prep_commit fndecl 8 5142 NULL
67727 ++enable_so_echo_client_prep_commit_fndecl_5142 echo_client_prep_commit fndecl 8 5142 NULL nohasharray
67728 ++enable_so___nvme_submit_user_cmd_fndecl_5142 __nvme_submit_user_cmd fndecl 6 5142 &enable_so_echo_client_prep_commit_fndecl_5142
67729 +enable_so_csio_scsi_eqsize_vardecl_5146 csio_scsi_eqsize vardecl 0 5146 NULL
67730 +enable_so_ocfs2_iget_fndecl_5154 ocfs2_iget fndecl 2 5154 NULL
67731 +enable_so_total_in_z_stream_s_5155 total_in z_stream_s 0 5155 NULL
67732 @@ -157679,6 +185847,7 @@ index 0000000..951b3be
67733 +enable_so_sq905_read_data_fndecl_5229 sq905_read_data fndecl 0 5229 NULL
67734 +enable_so_madvise_hwpoison_fndecl_5231 madvise_hwpoison fndecl 2 5231 NULL
67735 +enable_so_rx_tpa_end_cmp_misc_v1_rx_tpa_end_cmp_5235 rx_tpa_end_cmp_misc_v1 rx_tpa_end_cmp 0 5235 NULL
67736 ++enable_so_cnt_nfp_net_tx_ring_5239 cnt nfp_net_tx_ring 0 5239 NULL
67737 +enable_so_nr_extents__ntfs_inode_5242 nr_extents _ntfs_inode 0 5242 NULL
67738 +enable_so_nf_reject_iphdr_put_fndecl_5243 nf_reject_iphdr_put fndecl 3 5243 NULL nohasharray
67739 +enable_so___scif_pin_pages_fndecl_5243 __scif_pin_pages fndecl 2 5243 &enable_so_nf_reject_iphdr_put_fndecl_5243
67740 @@ -157733,6 +185902,7 @@ index 0000000..951b3be
67741 +enable_so_len_iw_mgmt_info_element_5411 len iw_mgmt_info_element 0 5411 NULL
67742 +enable_so_udpv6_setsockopt_fndecl_5412 udpv6_setsockopt fndecl 5 5412 NULL
67743 +enable_so_session_key_encryption_key_bytes_ecryptfs_password_5413 session_key_encryption_key_bytes ecryptfs_password 0 5413 NULL
67744 ++enable_so_ies_len_user_conn_req_5414 ies_len user_conn_req 0 5414 NULL
67745 +enable_so_value_xen_pci_op_5416 value xen_pci_op 0 5416 NULL
67746 +enable_so_allocmin_nilfs_sufile_info_5418 allocmin nilfs_sufile_info 0 5418 NULL
67747 +enable_so_nilfs_sufile_truncate_range_fndecl_5423 nilfs_sufile_truncate_range fndecl 3-2 5423 NULL nohasharray
67748 @@ -157740,6 +185910,7 @@ index 0000000..951b3be
67749 +enable_so_reg_size_intel_iommu_5423 reg_size intel_iommu 0 5423 &enable_so_ino_ncp_entry_info_5423
67750 +enable_so_port_mad_size_fndecl_5434 port_mad_size fndecl 0 5434 NULL
67751 +enable_so_sigmadsp_read_i2c_fndecl_5435 sigmadsp_read_i2c fndecl 4 5435 NULL
67752 ++enable_so_wilc_add_wep_key_bss_sta_fndecl_5436 wilc_add_wep_key_bss_sta fndecl 3 5436 NULL
67753 +enable_so_size_drm_radeon_gem_create_5440 size drm_radeon_gem_create 0 5440 NULL
67754 +enable_so_vlen_nfsd_writeargs_5461 vlen nfsd_writeargs 0 5461 NULL
67755 +enable_so_btrfs_fiemap_fndecl_5462 btrfs_fiemap fndecl 4-3 5462 NULL
67756 @@ -157873,11 +186044,13 @@ index 0000000..951b3be
67757 +enable_so_read_len_t3_swsq_5880 read_len t3_swsq 0 5880 NULL
67758 +enable_so_xfs_qm_vop_dqalloc_fndecl_5887 xfs_qm_vop_dqalloc fndecl 2-3-4 5887 NULL nohasharray
67759 +enable_so_cydata_ofsh_cyttsp4_sysinfo_data_5887 cydata_ofsh cyttsp4_sysinfo_data 0 5887 &enable_so_xfs_qm_vop_dqalloc_fndecl_5887
67760 -+enable_so_max_sg_count_hpt_iop_request_get_config_5890 max_sg_count hpt_iop_request_get_config 0 5890 NULL
67761 ++enable_so_max_sg_count_hpt_iop_request_get_config_5890 max_sg_count hpt_iop_request_get_config 0 5890 NULL nohasharray
67762 ++enable_so_entity_internal_idx_max_media_device_5890 entity_internal_idx_max media_device 0 5890 &enable_so_max_sg_count_hpt_iop_request_get_config_5890
67763 +enable_so_force_max_req_size_vardecl_vub300_c_5891 force_max_req_size vardecl_vub300.c 0 5891 NULL
67764 +enable_so_dma_common_pages_remap_fndecl_5893 dma_common_pages_remap fndecl 2 5893 NULL
67765 +enable_so_size_squashfs_dir_entry_5896 size squashfs_dir_entry 0 5896 NULL
67766 +enable_so___nla_reserve_fndecl_5901 __nla_reserve fndecl 3 5901 NULL
67767 ++enable_so_iproc_asiu_setup_fndecl_5902 iproc_asiu_setup fndecl 4 5902 NULL
67768 +enable_so_alloc_rx_slot_fndecl_5908 alloc_rx_slot fndecl 0 5908 NULL
67769 +enable_so_sctp_tsnmap_num_gabs_fndecl_5915 sctp_tsnmap_num_gabs fndecl 0 5915 NULL
67770 +enable_so_grec_nsrcs_igmpv3_grec_5916 grec_nsrcs igmpv3_grec 0 5916 NULL
67771 @@ -157920,6 +186093,7 @@ index 0000000..951b3be
67772 +enable_so_icv_trunc_len_ah_data_6025 icv_trunc_len ah_data 0 6025 NULL nohasharray
67773 +enable_so_flags_rtl8180_rx_desc_6025 flags rtl8180_rx_desc 0 6025 &enable_so_icv_trunc_len_ah_data_6025
67774 +enable_so_xlog_bwrite_fndecl_6028 xlog_bwrite fndecl 2 6028 NULL
67775 ++enable_so_size_drm_vc4_create_shader_bo_6033 size drm_vc4_create_shader_bo 0 6033 NULL
67776 +enable_so_msix_map_region_fndecl_6035 msix_map_region fndecl 2 6035 NULL
67777 +enable_so_ceph_create_snap_context_fndecl_6041 ceph_create_snap_context fndecl 1 6041 NULL
67778 +enable_so_cmipci_sb_reg_decode_fndecl_6048 cmipci_sb_reg_decode fndecl 2 6048 NULL
67779 @@ -158061,6 +186235,7 @@ index 0000000..951b3be
67780 +enable_so_skd_end_request_fndecl_6438 skd_end_request fndecl 3 6438 NULL
67781 +enable_so_parse_dcb20_entry_fndecl_6440 parse_dcb20_entry fndecl 3 6440 NULL
67782 +enable_so_user_base_qib_mregion_6443 user_base qib_mregion 0 6443 NULL
67783 ++enable_so_nvme_iod_alloc_size_fndecl_6444 nvme_iod_alloc_size fndecl 2-3-0 6444 NULL
67784 +enable_so_max_packet_sz_tx_musb_hw_ep_6448 max_packet_sz_tx musb_hw_ep 0 6448 NULL
67785 +enable_so_snd_hammerfall_get_buffer_fndecl_6450 snd_hammerfall_get_buffer fndecl 3 6450 NULL
67786 +enable_so_qib_init_pportdata_fndecl_6452 qib_init_pportdata fndecl 4 6452 NULL
67787 @@ -158274,7 +186449,8 @@ index 0000000..951b3be
67788 +enable_so_srq_entry_sz_mlx4_dev_cap_7052 srq_entry_sz mlx4_dev_cap 0 7052 NULL
67789 +enable_so_SYSC_pselect6_fndecl_7055 SYSC_pselect6 fndecl 1 7055 NULL
67790 +enable_so_packet_size_usbatm_channel_7056 packet_size usbatm_channel 0 7056 NULL
67791 -+enable_so___btrfs_drop_extents_fndecl_7058 __btrfs_drop_extents fndecl 6-5 7058 NULL
67792 ++enable_so___btrfs_drop_extents_fndecl_7058 __btrfs_drop_extents fndecl 6-5 7058 NULL nohasharray
67793 ++enable_so_txd_cnt_nfp_net_7058 txd_cnt nfp_net 0 7058 &enable_so___btrfs_drop_extents_fndecl_7058
67794 +enable_so_cryptd_alloc_instance_fndecl_7059 cryptd_alloc_instance fndecl 3-2 7059 NULL
67795 +enable_so_dccph_doff_dccp_hdr_7060 dccph_doff dccp_hdr 0 7060 NULL nohasharray
67796 +enable_so_ddebug_proc_write_fndecl_7060 ddebug_proc_write fndecl 3 7060 &enable_so_dccph_doff_dccp_hdr_7060
67797 @@ -158453,7 +186629,8 @@ index 0000000..951b3be
67798 +enable_so_count_ivtvfb_dma_frame_7586 count ivtvfb_dma_frame 0 7586 NULL
67799 +enable_so_length_sctp_chunkhdr_7587 length sctp_chunkhdr 0 7587 NULL
67800 +enable_so_ftdi_elan_edset_input_fndecl_7588 ftdi_elan_edset_input fndecl 0 7588 NULL
67801 -+enable_so_scan_index_iio_chan_spec_7597 scan_index iio_chan_spec 0 7597 NULL
67802 ++enable_so_scan_index_iio_chan_spec_7597 scan_index iio_chan_spec 0 7597 NULL nohasharray
67803 ++enable_so_num_regions_wm_adsp_fw_caps_7597 num_regions wm_adsp_fw_caps 0 7597 &enable_so_scan_index_iio_chan_spec_7597
67804 +enable_so_q_blkno_xfs_dquot_7601 q_blkno xfs_dquot 0 7601 NULL
67805 +enable_so_pathmtu_sctp_transport_7603 pathmtu sctp_transport 0 7603 NULL
67806 +enable_so_fuse_listxattr_fndecl_7605 fuse_listxattr fndecl 3 7605 NULL
67807 @@ -158521,6 +186698,7 @@ index 0000000..951b3be
67808 +enable_so_alloc_ep_fndecl_7782 alloc_ep fndecl 1 7782 NULL
67809 +enable_so_mmu_private_affs_inode_info_7785 mmu_private affs_inode_info 0 7785 NULL nohasharray
67810 +enable_so_pkt_len_rx_desc_7785 pkt_len rx_desc 0 7785 &enable_so_mmu_private_affs_inode_info_7785
67811 ++enable_so_read_index_wm_adsp_compr_buf_7788 read_index wm_adsp_compr_buf 0 7788 NULL
67812 +enable_so_st_do_scsi_fndecl_7789 st_do_scsi fndecl 4 7789 NULL
67813 +enable_so_qxl_framebuffer_surface_dirty_fndecl_7791 qxl_framebuffer_surface_dirty fndecl 6 7791 NULL nohasharray
67814 +enable_so_pg_read_fndecl_7791 pg_read fndecl 3 7791 &enable_so_qxl_framebuffer_surface_dirty_fndecl_7791
67815 @@ -158664,6 +186842,7 @@ index 0000000..951b3be
67816 +enable_so_num_alloc_vsi_i40e_pf_8259 num_alloc_vsi i40e_pf 0 8259 NULL
67817 +enable_so_datablkcnt_capi_register_params_8263 datablkcnt capi_register_params 0 8263 NULL
67818 +enable_so_cow_file_range_inline_fndecl_8264 cow_file_range_inline fndecl 4-3 8264 NULL
67819 ++enable_so_num_u3_ports_xhci_hcd_mtk_8272 num_u3_ports xhci_hcd_mtk 0 8272 NULL
67820 +enable_so_datablklen_capi_register_params_8275 datablklen capi_register_params 0 8275 NULL nohasharray
67821 +enable_so_proc_scsi_devinfo_write_fndecl_8275 proc_scsi_devinfo_write fndecl 3 8275 &enable_so_datablklen_capi_register_params_8275
67822 +enable_so_cdc_ncm_check_tx_max_fndecl_8278 cdc_ncm_check_tx_max fndecl 0-2 8278 NULL
67823 @@ -158820,6 +186999,7 @@ index 0000000..951b3be
67824 +enable_so_read_hdlc_status_fritz_adapter_8730 read_hdlc_status fritz_adapter 0 8730 NULL nohasharray
67825 +enable_so_disconnect_fndecl_8730 disconnect fndecl 4 8730 &enable_so_read_hdlc_status_fritz_adapter_8730 nohasharray
67826 +enable_so_ip_set_elem_len_fndecl_8730 ip_set_elem_len fndecl 0-4-3 8730 &enable_so_disconnect_fndecl_8730
67827 ++enable_so_alloc_state_change_fndecl_8735 alloc_state_change fndecl 1-2 8735 NULL
67828 +enable_so_ext_param_page_length_nand_onfi_params_8736 ext_param_page_length nand_onfi_params 0 8736 NULL
67829 +enable_so___blockdev_direct_IO_fndecl_8738 __blockdev_direct_IO fndecl 5-0 8738 NULL nohasharray
67830 +enable_so_ipgre_header_fndecl_8738 ipgre_header fndecl 3 8738 &enable_so___blockdev_direct_IO_fndecl_8738
67831 @@ -158856,6 +187036,7 @@ index 0000000..951b3be
67832 +enable_so_dma_buf_mmap_fndecl_8825 dma_buf_mmap fndecl 3 8825 NULL
67833 +enable_so_buflow_ring_desc_ex_8829 buflow ring_desc_ex 0 8829 NULL
67834 +enable_so_vsync_len_videomode_8830 vsync_len videomode 0 8830 NULL
67835 ++enable_so_response_length_mlx5_ib_alloc_ucontext_resp_8839 response_length mlx5_ib_alloc_ucontext_resp 0 8839 NULL
67836 +enable_so_wm5110_set_fll_fndecl_8841 wm5110_set_fll fndecl 5 8841 NULL
67837 +enable_so_iscsi_tcp_segment_recv_fndecl_8845 iscsi_tcp_segment_recv fndecl 4-0 8845 NULL
67838 +enable_so_max_packet_size_ftdi_private_8847 max_packet_size ftdi_private 0 8847 NULL
67839 @@ -159029,7 +187210,8 @@ index 0000000..951b3be
67840 +enable_so_htree_dirblock_to_tree_fndecl_9339 htree_dirblock_to_tree fndecl 3 9339 NULL
67841 +enable_so_di_size_xfs_icdinode_9350 di_size xfs_icdinode 0 9350 NULL
67842 +enable_so_tse_init_rx_buffer_fndecl_9354 tse_init_rx_buffer fndecl 3 9354 NULL
67843 -+enable_so_offset_ore_io_state_9357 offset ore_io_state 0 9357 NULL
67844 ++enable_so_offset_ore_io_state_9357 offset ore_io_state 0 9357 NULL nohasharray
67845 ++enable_so_length_property_entry_9357 length property_entry 0 9357 &enable_so_offset_ore_io_state_9357
67846 +enable_so_stv6110x_write_regs_fndecl_9359 stv6110x_write_regs fndecl 4 9359 NULL
67847 +enable_so_qib_qp_rcv_fndecl_9365 qib_qp_rcv fndecl 5 9365 NULL
67848 +enable_so_compat_sys_get_mempolicy_fndecl_9366 compat_sys_get_mempolicy fndecl 4-3 9366 NULL
67849 @@ -159319,6 +187501,7 @@ index 0000000..951b3be
67850 +enable_so_ext4_xattr_set_handle_fndecl_10221 ext4_xattr_set_handle fndecl 6 10221 NULL
67851 +enable_so_alg_setkey_fndecl_10222 alg_setkey fndecl 3 10222 NULL
67852 +enable_so_next_id_hfs_sb_info_10229 next_id hfs_sb_info 0 10229 NULL
67853 ++enable_so_storage_size_phm_runtime_table_header_10230 storage_size phm_runtime_table_header 0 10230 NULL
67854 +enable_so_qlcnic_set_sds_ring_count_fndecl_10232 qlcnic_set_sds_ring_count fndecl 2 10232 NULL
67855 +enable_so_input_get_new_minor_fndecl_10235 input_get_new_minor fndecl 0 10235 NULL
67856 +enable_so_iio_devt_vardecl_industrialio_core_c_10237 iio_devt vardecl_industrialio-core.c 0 10237 NULL nohasharray
67857 @@ -159647,6 +187830,7 @@ index 0000000..951b3be
67858 +enable_so_o2nm_this_node_fndecl_11157 o2nm_this_node fndecl 0 11157 NULL
67859 +enable_so_resource_from_user_fndecl_11158 resource_from_user fndecl 3 11158 NULL
67860 +enable_so_batadv_bla_add_claim_fndecl_11159 batadv_bla_add_claim fndecl 3 11159 NULL
67861 ++enable_so_nvme_fill_device_id_eui64_fndecl_11160 nvme_fill_device_id_eui64 fndecl 4 11160 NULL
67862 +enable_so_tclass_mlx5_av_11167 tclass mlx5_av 0 11167 NULL
67863 +enable_so_rmtvaluelen2_xfs_da_args_11168 rmtvaluelen2 xfs_da_args 0 11168 NULL
67864 +enable_so_FlNum_hfs_cat_file_11169 FlNum hfs_cat_file 0 11169 NULL nohasharray
67865 @@ -159794,6 +187978,7 @@ index 0000000..951b3be
67866 +enable_so_ceph_sync_direct_write_fndecl_11641 ceph_sync_direct_write fndecl 0-3 11641 NULL
67867 +enable_so_vmw_execbuf_process_fndecl_11642 vmw_execbuf_process fndecl 5 11642 NULL
67868 +enable_so_ath6kl_get_num_reg_fndecl_11647 ath6kl_get_num_reg fndecl 0 11647 NULL
67869 ++enable_so_device_property_read_u32_array_fndecl_11662 device_property_read_u32_array fndecl 0 11662 NULL
67870 +enable_so_bulk_size_cam_11663 bulk_size cam 0 11663 NULL
67871 +enable_so___setup_root_fndecl_11664 __setup_root fndecl 2-1 11664 NULL nohasharray
67872 +enable_so_num_snd_ratnum_11664 num snd_ratnum 0 11664 &enable_so___setup_root_fndecl_11664 nohasharray
67873 @@ -160094,6 +188279,7 @@ index 0000000..951b3be
67874 +enable_so_m25p80_read_reg_fndecl_12535 m25p80_read_reg fndecl 4 12535 NULL
67875 +enable_so_learn_buffer_user_len_vardecl_gracl_learn_c_12538 learn_buffer_user_len vardecl_gracl_learn.c 0 12538 NULL
67876 +enable_so_mlxsw_cmd_mbox_query_aq_cap_max_num_cqs_get_fndecl_12540 mlxsw_cmd_mbox_query_aq_cap_max_num_cqs_get fndecl 0 12540 NULL
67877 ++enable_so_rxd_cnt_nfp_net_12541 rxd_cnt nfp_net 0 12541 NULL
67878 +enable_so_sd_tuning_rx_cmd_fndecl_12543 sd_tuning_rx_cmd fndecl 2 12543 NULL
67879 +enable_so_cdrom_read_cdda_old_fndecl_12547 cdrom_read_cdda_old fndecl 4 12547 NULL
67880 +enable_so_qword_get_fndecl_12549 qword_get fndecl 0 12549 NULL
67881 @@ -160288,6 +188474,7 @@ index 0000000..951b3be
67882 +enable_so_num_pg_nvm_id_group_13160 num_pg nvm_id_group 0 13160 NULL
67883 +enable_so_inline_xattr_size_fndecl_13166 inline_xattr_size fndecl 0 13166 NULL
67884 +enable_so_hpfs_add_to_dnode_fndecl_13167 hpfs_add_to_dnode fndecl 4-2 13167 NULL
67885 ++enable_so_iproc_pll_clk_setup_fndecl_13179 iproc_pll_clk_setup fndecl 6 13179 NULL
67886 +enable_so_len_rsv_13186 len rsv 0 13186 NULL nohasharray
67887 +enable_so_nouveau_compat_ioctl_fndecl_13186 nouveau_compat_ioctl fndecl 2 13186 &enable_so_len_rsv_13186
67888 +enable_so_blocksize_f2fs_sb_info_13191 blocksize f2fs_sb_info 0 13191 NULL
67889 @@ -160417,6 +188604,7 @@ index 0000000..951b3be
67890 +enable_so_find_rsb_nodir_fndecl_13537 find_rsb_nodir fndecl 3 13537 NULL
67891 +enable_so_hfi1_snoop_write_fndecl_13544 hfi1_snoop_write fndecl 3 13544 NULL
67892 +enable_so_p_filesz_elf64_phdr_13545 p_filesz elf64_phdr 0 13545 NULL
67893 ++enable_so_pset_prop_count_elems_of_size_fndecl_13547 pset_prop_count_elems_of_size fndecl 3-0 13547 NULL
67894 +enable_so_len_prism2_download_data_area_13551 len prism2_download_data_area 0 13551 NULL
67895 +enable_so_nes_reg_user_mr_fndecl_13553 nes_reg_user_mr fndecl 2-3 13553 NULL nohasharray
67896 +enable_so_nvme_trans_send_download_fw_cmd_fndecl_13553 nvme_trans_send_download_fw_cmd fndecl 4 13553 &enable_so_nes_reg_user_mr_fndecl_13553
67897 @@ -160474,7 +188662,8 @@ index 0000000..951b3be
67898 +enable_so_fixup_pmc551_fndecl_13679 fixup_pmc551 fndecl 0 13679 NULL
67899 +enable_so_nfc_hci_send_cmd_async_fndecl_13680 nfc_hci_send_cmd_async fndecl 5 13680 NULL
67900 +enable_so_receive_big_fndecl_13686 receive_big fndecl 5 13686 NULL
67901 -+enable_so_writing_osst_buffer_13689 writing osst_buffer 0 13689 NULL
67902 ++enable_so_writing_osst_buffer_13689 writing osst_buffer 0 13689 NULL nohasharray
67903 ++enable_so___fwnode_property_read_string_array_fndecl_13689 __fwnode_property_read_string_array fndecl 0 13689 &enable_so_writing_osst_buffer_13689
67904 +enable_so_w_align_bdisp_fmt_13694 w_align bdisp_fmt 0 13694 NULL
67905 +enable_so_hpfs_free_sectors_fndecl_13696 hpfs_free_sectors fndecl 3 13696 NULL
67906 +enable_so_skb_size_qlcnic_host_rds_ring_13698 skb_size qlcnic_host_rds_ring 0 13698 NULL
67907 @@ -160577,7 +188766,8 @@ index 0000000..951b3be
67908 +enable_so_rd_size_uhid_device_13986 rd_size uhid_device 0 13986 NULL
67909 +enable_so_libipw_alloc_txb_fndecl_13992 libipw_alloc_txb fndecl 3-2-1 13992 NULL
67910 +enable_so_size_urb_list_13995 size urb_list 0 13995 NULL
67911 -+enable_so_i2400mu_notification_grok_fndecl_13997 i2400mu_notification_grok fndecl 3 13997 NULL
67912 ++enable_so_i2400mu_notification_grok_fndecl_13997 i2400mu_notification_grok fndecl 3 13997 NULL nohasharray
67913 ++enable_so_n_channels_iwl_mcc_update_resp_v1_13997 n_channels iwl_mcc_update_resp_v1 0 13997 &enable_so_i2400mu_notification_grok_fndecl_13997
67914 +enable_so_pnp_add_io_resource_fndecl_14000 pnp_add_io_resource fndecl 3-2 14000 NULL
67915 +enable_so_n_grants_vscsibk_pend_14001 n_grants vscsibk_pend 0 14001 NULL
67916 +enable_so_blkno_xfs_da_state_blk_14003 blkno xfs_da_state_blk 0 14003 NULL nohasharray
67917 @@ -160814,6 +189004,7 @@ index 0000000..951b3be
67918 +enable_so_ep_usbip_header_basic_14659 ep usbip_header_basic 0 14659 NULL
67919 +enable_so_interval_solo_enc_dev_14661 interval solo_enc_dev 0 14661 NULL
67920 +enable_so___btrfs_qgroup_release_data_fndecl_14664 __btrfs_qgroup_release_data fndecl 2-3 14664 NULL
67921 ++enable_so_tty_copy_to_user_fndecl_14668 tty_copy_to_user fndecl 3-4 14668 NULL
67922 +enable_so_ext2_try_to_allocate_fndecl_14672 ext2_try_to_allocate fndecl 0-4 14672 NULL
67923 +enable_so_sg_tablesize_usb_bus_14673 sg_tablesize usb_bus 0 14673 NULL
67924 +enable_so_di_anextents_xfs_dinode_14674 di_anextents xfs_dinode 0 14674 NULL
67925 @@ -160857,6 +189048,7 @@ index 0000000..951b3be
67926 +enable_so_brcmf_sdio_verifymemory_fndecl_14795 brcmf_sdio_verifymemory fndecl 4-2 14795 NULL nohasharray
67927 +enable_so_realloc_buffer_fndecl_14795 realloc_buffer fndecl 2 14795 &enable_so_brcmf_sdio_verifymemory_fndecl_14795
67928 +enable_so_mthca_map_user_db_fndecl_14796 mthca_map_user_db fndecl 5 14796 NULL
67929 ++enable_so_alloc_component_match_14799 alloc component_match 0 14799 NULL
67930 +enable_so_event_rx_pool_read_fndecl_14803 event_rx_pool_read fndecl 3 14803 NULL
67931 +enable_so_sg_read_fndecl_14804 sg_read fndecl 3 14804 NULL
67932 +enable_so_sb_max_fwd_alloc_hpfs_sb_info_14807 sb_max_fwd_alloc hpfs_sb_info 0 14807 NULL
67933 @@ -160868,6 +189060,7 @@ index 0000000..951b3be
67934 +enable_so_tg3_change_mtu_fndecl_14826 tg3_change_mtu fndecl 2 14826 NULL
67935 +enable_so_mlxsw_sx_flood_init_fndecl_14827 mlxsw_sx_flood_init fndecl 0 14827 NULL
67936 +enable_so_parport_read_fndecl_14828 parport_read fndecl 0 14828 NULL
67937 ++enable_so_mlx5_core_sriov_configure_fndecl_14829 mlx5_core_sriov_configure fndecl 2 14829 NULL
67938 +enable_so_residual_length_response_14830 residual_length response 0 14830 NULL
67939 +enable_so_sis5595_base_vardecl_i2c_sis5595_c_14832 sis5595_base vardecl_i2c-sis5595.c 0 14832 NULL
67940 +enable_so_shift_arg_pages_fndecl_14835 shift_arg_pages fndecl 2 14835 NULL nohasharray
67941 @@ -160880,6 +189073,7 @@ index 0000000..951b3be
67942 +enable_so_iwl_pcie_alloc_fw_monitor_fndecl_14872 iwl_pcie_alloc_fw_monitor fndecl 2 14872 NULL
67943 +enable_so_threads_mask_netns_ipvs_14873 threads_mask netns_ipvs 0 14873 NULL
67944 +enable_so_inocache_hashsize_jffs2_sb_info_14875 inocache_hashsize jffs2_sb_info 0 14875 NULL
67945 ++enable_so_wm_adsp_buffer_write_fndecl_14879 wm_adsp_buffer_write fndecl 0 14879 NULL
67946 +enable_so_submit_queues_vardecl_null_blk_c_14881 submit_queues vardecl_null_blk.c 0 14881 NULL
67947 +enable_so_pg_first_page_collect_14888 pg_first page_collect 0 14888 NULL
67948 +enable_so___vb2_get_done_vb_fndecl_14889 __vb2_get_done_vb fndecl 0 14889 NULL
67949 @@ -161113,6 +189307,7 @@ index 0000000..951b3be
67950 +enable_so_end_bttv_vbi_fmt_15637 end bttv_vbi_fmt 0 15637 NULL nohasharray
67951 +enable_so_SyS_pselect6_fndecl_15637 SyS_pselect6 fndecl 1 15637 &enable_so_end_bttv_vbi_fmt_15637
67952 +enable_so_dma_in_redrat3_dev_15639 dma_in redrat3_dev 0 15639 NULL
67953 ++enable_so_num_active_peers_ath10k_15643 num_active_peers ath10k 0 15643 NULL
67954 +enable_so_akid_raw_issuer_size_x509_parse_context_15651 akid_raw_issuer_size x509_parse_context 0 15651 NULL
67955 +enable_so_read_bytes_from_xdr_buf_fndecl_15654 read_bytes_from_xdr_buf fndecl 4-2 15654 NULL nohasharray
67956 +enable_so_mapped_vram_radeonfb_info_15654 mapped_vram radeonfb_info 0 15654 &enable_so_read_bytes_from_xdr_buf_fndecl_15654 nohasharray
67957 @@ -161182,6 +189377,7 @@ index 0000000..951b3be
67958 +enable_so_msg_print_ext_body_fndecl_15847 msg_print_ext_body fndecl 0 15847 NULL
67959 +enable_so_pnp_register_mem_resource_fndecl_15849 pnp_register_mem_resource fndecl 6-3-5 15849 NULL
67960 +enable_so_net2272_read_fndecl_15850 net2272_read fndecl 0 15850 NULL
67961 ++enable_so_max_num_peers_ath10k_15853 max_num_peers ath10k 0 15853 NULL
67962 +enable_so_sb_set_blocksize_fndecl_15860 sb_set_blocksize fndecl 2-0 15860 NULL
67963 +enable_so_kvm_read_guest_virt_helper_fndecl_15863 kvm_read_guest_virt_helper fndecl 3-1 15863 NULL
67964 +enable_so_period_bytes_min_snd_pcm_hardware_15864 period_bytes_min snd_pcm_hardware 0 15864 NULL
67965 @@ -161315,7 +189511,8 @@ index 0000000..951b3be
67966 +enable_so_crypto_alloc_instance2_fndecl_16302 crypto_alloc_instance2 fndecl 3 16302 NULL
67967 +enable_so_isdn_tty_countDLE_fndecl_16304 isdn_tty_countDLE fndecl 0 16304 NULL
67968 +enable_so_brcmf_sdiod_txglomsz_vardecl_bcmsdh_c_16306 brcmf_sdiod_txglomsz vardecl_bcmsdh.c 0 16306 NULL
67969 -+enable_so_len_ieee80211_vendor_radiotap_16308 len ieee80211_vendor_radiotap 0 16308 NULL
67970 ++enable_so_len_ieee80211_vendor_radiotap_16308 len ieee80211_vendor_radiotap 0 16308 NULL nohasharray
67971 ++enable_so_wm_adsp_compr_copy_fndecl_16308 wm_adsp_compr_copy fndecl 3 16308 &enable_so_len_ieee80211_vendor_radiotap_16308
67972 +enable_so_aac_fib_send_fndecl_16315 aac_fib_send fndecl 3 16315 NULL
67973 +enable_so_memblock_mark_mirror_fndecl_16321 memblock_mark_mirror fndecl 2-1 16321 NULL
67974 +enable_so_major_tty_driver_16323 major tty_driver 0 16323 NULL
67975 @@ -161435,6 +189632,7 @@ index 0000000..951b3be
67976 +enable_so_opcfg_ofsl_cyttsp4_sysinfo_data_16723 opcfg_ofsl cyttsp4_sysinfo_data 0 16723 NULL
67977 +enable_so_multi_io_quirk_mmc_host_ops_16729 multi_io_quirk mmc_host_ops 0 16729 NULL
67978 +enable_so_fat_length_fat_boot_sector_16730 fat_length fat_boot_sector 0 16730 NULL
67979 ++enable_so_shader_rec_size_drm_vc4_submit_cl_16731 shader_rec_size drm_vc4_submit_cl 0 16731 NULL
67980 +enable_so_width_qxl_head_16734 width qxl_head 0 16734 NULL
67981 +enable_so_nchannels_twl6030_gpadc_platform_data_16736 nchannels twl6030_gpadc_platform_data 0 16736 NULL
67982 +enable_so_rx_rate_rx_frames_per_rates_read_fndecl_16737 rx_rate_rx_frames_per_rates_read fndecl 3 16737 NULL nohasharray
67983 @@ -161445,6 +189643,7 @@ index 0000000..951b3be
67984 +enable_so_lib80211_wep_encrypt_fndecl_16752 lib80211_wep_encrypt fndecl 2 16752 NULL
67985 +enable_so_skb_pull_rcsum_fndecl_16757 skb_pull_rcsum fndecl 2 16757 NULL
67986 +enable_so_discard_next_dnode_fndecl_16758 discard_next_dnode fndecl 2 16758 NULL
67987 ++enable_so_ucNumEntries__ATOM_Tonga_PCIE_Table_16761 ucNumEntries _ATOM_Tonga_PCIE_Table 0 16761 NULL
67988 +enable_so___vfs_write_fndecl_16765 __vfs_write fndecl 0-3 16765 NULL
67989 +enable_so___blk_end_request_all_fndecl_16766 __blk_end_request_all fndecl 2 16766 NULL
67990 +enable_so_cluster_vardecl_pd_c_16770 cluster vardecl_pd.c 0 16770 NULL nohasharray
67991 @@ -161519,6 +189718,7 @@ index 0000000..951b3be
67992 +enable_so_vcs_read_fndecl_16962 vcs_read fndecl 3 16962 NULL
67993 +enable_so_call_id_rxrpc_call_16964 call_id rxrpc_call 0 16964 NULL
67994 +enable_so_minor_oss_minor_dev_16965 minor oss_minor_dev 0 16965 NULL
67995 ++enable_so___alloc_dummy_extent_buffer_fndecl_16969 __alloc_dummy_extent_buffer fndecl 2 16969 NULL
67996 +enable_so_cifs_sync_write_fndecl_16972 cifs_sync_write fndecl 6 16972 NULL
67997 +enable_so_fat_reserved_fat_bios_param_block_16977 fat_reserved fat_bios_param_block 0 16977 NULL
67998 +enable_so_virtio_gpu_alloc_cmd_fndecl_16978 virtio_gpu_alloc_cmd fndecl 3 16978 NULL
67999 @@ -161607,6 +189807,7 @@ index 0000000..951b3be
68000 +enable_so_offset_rbuf_info_17181 offset rbuf_info 0 17181 NULL
68001 +enable_so_luma_size_s5p_mfc_ctx_17182 luma_size s5p_mfc_ctx 0 17182 NULL
68002 +enable_so_pci_raw_set_power_state_fndecl_17186 pci_raw_set_power_state fndecl 0 17186 NULL
68003 ++enable_so_num_component_match_17187 num component_match 0 17187 NULL
68004 +enable_so_sys_pread64_fndecl_17210 sys_pread64 fndecl 3 17210 NULL
68005 +enable_so_type_to_neq_fw_pfvf_cmd_17213 type_to_neq fw_pfvf_cmd 0 17213 NULL
68006 +enable_so_logical_blk_num_osst_tape_17216 logical_blk_num osst_tape 0 17216 NULL
68007 @@ -161751,7 +189952,8 @@ index 0000000..951b3be
68008 +enable_so_buf_len_ceph_none_authorizer_17652 buf_len ceph_none_authorizer 0 17652 NULL nohasharray
68009 +enable_so_dvb_dmx_init_fndecl_17652 dvb_dmx_init fndecl 0 17652 &enable_so_buf_len_ceph_none_authorizer_17652
68010 +enable_so_size_mem_array_17655 size mem_array 0 17655 NULL
68011 -+enable_so_snd_wscale_tcp_options_received_17658 snd_wscale tcp_options_received 0 17658 NULL
68012 ++enable_so_snd_wscale_tcp_options_received_17658 snd_wscale tcp_options_received 0 17658 NULL nohasharray
68013 ++enable_so_btrfs_dedupe_file_range_fndecl_17658 btrfs_dedupe_file_range fndecl 3 17658 &enable_so_snd_wscale_tcp_options_received_17658
68014 +enable_so_size_scsi_host_sg_pool_17661 size scsi_host_sg_pool 0 17661 NULL nohasharray
68015 +enable_so_batadv_tt_add_temporary_global_entry_fndecl_17661 batadv_tt_add_temporary_global_entry fndecl 4 17661 &enable_so_size_scsi_host_sg_pool_17661
68016 +enable_so_stereo_cmipci_sb_reg_17667 stereo cmipci_sb_reg 0 17667 NULL
68017 @@ -162439,6 +190641,7 @@ index 0000000..951b3be
68018 +enable_so_set_fp_int_qed_common_ops_19644 set_fp_int qed_common_ops 0 19644 NULL nohasharray
68019 +enable_so_pcfg_ofsh_cyttsp4_sysinfo_data_19644 pcfg_ofsh cyttsp4_sysinfo_data 0 19644 &enable_so_set_fp_int_qed_common_ops_19644
68020 +enable_so_memory_maker_code_mspro_sys_info_19650 memory_maker_code mspro_sys_info 0 19650 NULL
68021 ++enable_so_get_rq_pas_size_fndecl_19651 get_rq_pas_size fndecl 0 19651 NULL
68022 +enable_so_af9033_rd_regs_fndecl_19652 af9033_rd_regs fndecl 4 19652 NULL
68023 +enable_so_shadow_step_fndecl_19653 shadow_step fndecl 2 19653 NULL
68024 +enable_so_thermal_false_irq_read_fndecl_19654 thermal_false_irq_read fndecl 3 19654 NULL
68025 @@ -162483,6 +190686,7 @@ index 0000000..951b3be
68026 +enable_so_fw_mem_block_size_wl1271_19784 fw_mem_block_size wl1271 0 19784 NULL
68027 +enable_so_gss_decrypt_xdr_buf_fndecl_19786 gss_decrypt_xdr_buf fndecl 3 19786 NULL
68028 +enable_so_get_alua_req_fndecl_19797 get_alua_req fndecl 3 19797 NULL
68029 ++enable_so_num_u2_ports_xhci_hcd_mtk_19801 num_u2_ports xhci_hcd_mtk 0 19801 NULL
68030 +enable_so_pvscsi_get_max_targets_fndecl_19802 pvscsi_get_max_targets fndecl 0 19802 NULL
68031 +enable_so_fromlen_nfs3_symlinkargs_19803 fromlen nfs3_symlinkargs 0 19803 NULL
68032 +enable_so_exit_error_msb_data_19810 exit_error msb_data 0 19810 NULL
68033 @@ -162596,6 +190800,7 @@ index 0000000..951b3be
68034 +enable_so_usb_ftdi_elan_edset_single_fndecl_20181 usb_ftdi_elan_edset_single fndecl 0 20181 NULL nohasharray
68035 +enable_so_swapRB_sd_20181 swapRB sd 0 20181 &enable_so_usb_ftdi_elan_edset_single_fndecl_20181
68036 +enable_so___kmalloc_track_caller_fndecl_20188 __kmalloc_track_caller fndecl 1 20188 NULL
68037 ++enable_so_qp_attach_mbox_size_fndecl_20191 qp_attach_mbox_size fndecl 0 20191 NULL
68038 +enable_so_lookup_memtype_fndecl_20192 lookup_memtype fndecl 1 20192 NULL
68039 +enable_so_agp_memory_reserved_vardecl_20196 agp_memory_reserved vardecl 0 20196 NULL nohasharray
68040 +enable_so_iram_base_intel_sst_drv_20196 iram_base intel_sst_drv 0 20196 &enable_so_agp_memory_reserved_vardecl_20196
68041 @@ -162642,6 +190847,7 @@ index 0000000..951b3be
68042 +enable_so_xfs_dir2_leaf_trim_data_fndecl_20310 xfs_dir2_leaf_trim_data fndecl 3 20310 NULL nohasharray
68043 +enable_so_index_vardecl_nm256_c_20310 index vardecl_nm256.c 0 20310 &enable_so_xfs_dir2_leaf_trim_data_fndecl_20310
68044 +enable_so_cx18_read_pos_fndecl_20312 cx18_read_pos fndecl 3 20312 NULL
68045 ++enable_so_wilc_spi_rx_fndecl_20314 wilc_spi_rx fndecl 3 20314 NULL
68046 +enable_so_cas_change_mtu_fndecl_20320 cas_change_mtu fndecl 2 20320 NULL
68047 +enable_so_ati_create_gatt_pages_fndecl_20321 ati_create_gatt_pages fndecl 1 20321 NULL
68048 +enable_so_max_rxsz_cxgbi_ddp_info_20322 max_rxsz cxgbi_ddp_info 0 20322 NULL nohasharray
68049 @@ -162679,6 +190885,7 @@ index 0000000..951b3be
68050 +enable_so_regulator_register_always_on_fndecl_20403 regulator_register_always_on fndecl 1 20403 &enable_so_xfs_qm_dqusage_adjust_fndecl_20403
68051 +enable_so_pwr_rcvd_bcns_cnt_read_fndecl_20405 pwr_rcvd_bcns_cnt_read fndecl 3 20405 NULL
68052 +enable_so_diversity_total_num_of_toggles_read_fndecl_20407 diversity_total_num_of_toggles_read fndecl 3 20407 NULL
68053 ++enable_so_num_units_wlan_host_mem_req_20410 num_units wlan_host_mem_req 0 20410 NULL
68054 +enable_so_mc_rreg_radeon_device_20418 mc_rreg radeon_device 0 20418 NULL
68055 +enable_so_sd_log_head_gfs2_sbd_20435 sd_log_head gfs2_sbd 0 20435 NULL
68056 +enable_so_max_vblank_mt9v032_model_data_20437 max_vblank mt9v032_model_data 0 20437 NULL nohasharray
68057 @@ -162799,6 +191006,7 @@ index 0000000..951b3be
68058 +enable_so_channels_min_snd_soc_pcm_stream_20771 channels_min snd_soc_pcm_stream 0 20771 NULL nohasharray
68059 +enable_so_tx_ring_size_mlx4_en_port_profile_20771 tx_ring_size mlx4_en_port_profile 0 20771 &enable_so_channels_min_snd_soc_pcm_stream_20771
68060 +enable_so_ltab_sz_ubifs_info_20776 ltab_sz ubifs_info 0 20776 NULL
68061 ++enable_so_amdgpu_sched_jobs_vardecl_20778 amdgpu_sched_jobs vardecl 0 20778 NULL
68062 +enable_so_fat_fats_fat_bios_param_block_20785 fat_fats fat_bios_param_block 0 20785 NULL
68063 +enable_so_orig_x_screen_info_20787 orig_x screen_info 0 20787 NULL nohasharray
68064 +enable_so_ncp_search_for_fileset_fndecl_20787 ncp_search_for_fileset fndecl 6 20787 &enable_so_orig_x_screen_info_20787
68065 @@ -162891,7 +191099,8 @@ index 0000000..951b3be
68066 +enable_so_start_range_21034 start range 0 21034 NULL
68067 +enable_so_crtc_vdisplay_drm_display_mode_21037 crtc_vdisplay drm_display_mode 0 21037 NULL
68068 +enable_so_garp_attr_create_fndecl_21048 garp_attr_create fndecl 3 21048 NULL
68069 -+enable_so_prep_umr_reg_wqe_fndecl_21050 prep_umr_reg_wqe fndecl 5 21050 NULL
68070 ++enable_so_prep_umr_reg_wqe_fndecl_21050 prep_umr_reg_wqe fndecl 5 21050 NULL nohasharray
68071 ++enable_so_vary_usbtest_param_32_21050 vary usbtest_param_32 0 21050 &enable_so_prep_umr_reg_wqe_fndecl_21050
68072 +enable_so_erase_shift_onenand_chip_21052 erase_shift onenand_chip 0 21052 NULL nohasharray
68073 +enable_so_tx_queues_rt2x00_ops_21052 tx_queues rt2x00_ops 0 21052 &enable_so_erase_shift_onenand_chip_21052
68074 +enable_so_xfs_alloc_min_freelist_fndecl_21056 xfs_alloc_min_freelist fndecl 0 21056 NULL
68075 @@ -163193,6 +191402,7 @@ index 0000000..951b3be
68076 +enable_so_error_memstick_request_21931 error memstick_request 0 21931 NULL nohasharray
68077 +enable_so_bfad_iocmd_rport_set_speed_fndecl_21931 bfad_iocmd_rport_set_speed fndecl 0 21931 &enable_so_error_memstick_request_21931 nohasharray
68078 +enable_so_rx_eth_fndecl_21931 rx_eth fndecl 4 21931 &enable_so_bfad_iocmd_rport_set_speed_fndecl_21931
68079 ++enable_so_wilc_network_info_received_fndecl_21936 wilc_network_info_received fndecl 3 21936 NULL
68080 +enable_so_page_cache_async_readahead_fndecl_21944 page_cache_async_readahead fndecl 5 21944 NULL
68081 +enable_so_ssb_bus_ssbbus_register_fndecl_21946 ssb_bus_ssbbus_register fndecl 2 21946 NULL
68082 +enable_so_in_pipe_ttusb_dec_21947 in_pipe ttusb_dec 0 21947 NULL
68083 @@ -163520,6 +191730,7 @@ index 0000000..951b3be
68084 +enable_so_count_nfs3_readdirargs_22881 count nfs3_readdirargs 0 22881 NULL
68085 +enable_so_max_wrs_rds_iw_device_22882 max_wrs rds_iw_device 0 22882 NULL
68086 +enable_so_len_prism2_download_area_22884 len prism2_download_area 0 22884 NULL
68087 ++enable_so_length_usbtest_param_32_22886 length usbtest_param_32 0 22886 NULL
68088 +enable_so_frag_len_atmel_private_22893 frag_len atmel_private 0 22893 NULL
68089 +enable_so_snap_names_len_rbd_image_header_ondisk_22898 snap_names_len rbd_image_header_ondisk 0 22898 NULL
68090 +enable_so___btrfs_cow_block_fndecl_22902 __btrfs_cow_block fndecl 0 22902 NULL
68091 @@ -163619,6 +191830,7 @@ index 0000000..951b3be
68092 +enable_so_x_res_vbe_mode_ib_23177 x_res vbe_mode_ib 0 23177 NULL
68093 +enable_so_uhid_char_read_fndecl_23187 uhid_char_read fndecl 3 23187 NULL
68094 +enable_so_tx_tx_retry_data_read_fndecl_23189 tx_tx_retry_data_read fndecl 3 23189 NULL
68095 ++enable_so___reuseport_alloc_fndecl_23190 __reuseport_alloc fndecl 1 23190 NULL
68096 +enable_so_ir_context_mask_fw_ohci_23196 ir_context_mask fw_ohci 0 23196 NULL
68097 +enable_so_seq_lseek_fndecl_23197 seq_lseek fndecl 2 23197 NULL
68098 +enable_so_bdev_erase_fndecl_23198 bdev_erase fndecl 2-3 23198 NULL
68099 @@ -163685,6 +191897,7 @@ index 0000000..951b3be
68100 +enable_so_calculate_xstate_size_fndecl_23404 calculate_xstate_size fndecl 0 23404 NULL
68101 +enable_so_s5p_jpeg_get_subsampling_mode_fndecl_23405 s5p_jpeg_get_subsampling_mode fndecl 0 23405 NULL nohasharray
68102 +enable_so_map_block_for_writepage_fndecl_23405 map_block_for_writepage fndecl 3 23405 &enable_so_s5p_jpeg_get_subsampling_mode_fndecl_23405
68103 ++enable_so_max_socks_sock_reuseport_23407 max_socks sock_reuseport 0 23407 NULL
68104 +enable_so_nx_fw_cmd_set_gbe_port_fndecl_23412 nx_fw_cmd_set_gbe_port fndecl 3 23412 NULL
68105 +enable_so_numerator_v4l2_fract_23413 numerator v4l2_fract 0 23413 NULL
68106 +enable_so_logfs_safe_iget_fndecl_23415 logfs_safe_iget fndecl 2 23415 NULL
68107 @@ -163920,6 +192133,7 @@ index 0000000..951b3be
68108 +enable_so_cfs_trace_allocate_string_buffer_fndecl_24094 cfs_trace_allocate_string_buffer fndecl 2 24094 &enable_so_mw_count_ntb_transport_ctx_24094
68109 +enable_so_irq_base_pm860x_chip_24096 irq_base pm860x_chip 0 24096 NULL
68110 +enable_so_sectors_md_rdev_24098 sectors md_rdev 0 24098 NULL
68111 ++enable_so_cnt_nfp_net_rx_ring_24099 cnt nfp_net_rx_ring 0 24099 NULL
68112 +enable_so_capture_bufsize_vardecl_nm256_c_24100 capture_bufsize vardecl_nm256.c 0 24100 NULL
68113 +enable_so_dcbp_set_pad_bits_fndecl_24101 dcbp_set_pad_bits fndecl 2 24101 NULL
68114 +enable_so_bus_mtu_brcmf_usbdev_24102 bus_mtu brcmf_usbdev 0 24102 NULL
68115 @@ -164159,7 +192373,9 @@ index 0000000..951b3be
68116 +enable_so_queue_depth_blk_mq_tag_set_24719 queue_depth blk_mq_tag_set 0 24719 NULL
68117 +enable_so_qxl_ttm_tt_create_fndecl_24720 qxl_ttm_tt_create fndecl 2 24720 NULL
68118 +enable_so_drm_gem_cma_create_with_handle_fndecl_24721 drm_gem_cma_create_with_handle fndecl 3 24721 NULL
68119 ++enable_so_wilc_set_join_req_fndecl_24725 wilc_set_join_req fndecl 4-6 24725 NULL
68120 +enable_so_bfs_get_block_fndecl_24726 bfs_get_block fndecl 2 24726 NULL
68121 ++enable_so_outlen_ib_udata_24729 outlen ib_udata 0 24729 NULL
68122 +enable_so_VBP_kyrofb_info_24731 VBP kyrofb_info 0 24731 NULL nohasharray
68123 +enable_so_HiSax_readstatus_fndecl_24731 HiSax_readstatus fndecl 2 24731 &enable_so_VBP_kyrofb_info_24731
68124 +enable_so_next_idtentry_24734 next idtentry 0 24734 NULL
68125 @@ -164173,7 +192389,8 @@ index 0000000..951b3be
68126 +enable_so_scif_create_pinned_pages_fndecl_24761 scif_create_pinned_pages fndecl 1 24761 NULL nohasharray
68127 +enable_so_inftl_read_oob_fndecl_24761 inftl_read_oob fndecl 2-3 24761 &enable_so_scif_create_pinned_pages_fndecl_24761
68128 +enable_so_pending_deflate_state_24766 pending deflate_state 0 24766 NULL
68129 -+enable_so_drbd_bm_total_weight_fndecl_24776 drbd_bm_total_weight fndecl 0 24776 NULL
68130 ++enable_so_drbd_bm_total_weight_fndecl_24776 drbd_bm_total_weight fndecl 0 24776 NULL nohasharray
68131 ++enable_so_s_hdrwords_hfi1_qp_24776 s_hdrwords hfi1_qp 0 24776 &enable_so_drbd_bm_total_weight_fndecl_24776
68132 +enable_so_xlog_state_switch_iclogs_fndecl_24782 xlog_state_switch_iclogs fndecl 3 24782 NULL
68133 +enable_so__sdma_txadd_daddr_fndecl_24789 _sdma_txadd_daddr fndecl 5 24789 NULL
68134 +enable_so_gx1_read_conf_reg_fndecl_24794 gx1_read_conf_reg fndecl 0 24794 NULL nohasharray
68135 @@ -164567,6 +192784,7 @@ index 0000000..951b3be
68136 +enable_so_kvm_hv_set_msr_common_fndecl_25940 kvm_hv_set_msr_common fndecl 3 25940 NULL nohasharray
68137 +enable_so_n_piobufs_efx_ef10_nic_data_25940 n_piobufs efx_ef10_nic_data 0 25940 &enable_so_kvm_hv_set_msr_common_fndecl_25940
68138 +enable_so___xfs_bmbt_get_all_fndecl_25952 __xfs_bmbt_get_all fndecl 2-1 25952 NULL
68139 ++enable_so___media_entity_enum_init_fndecl_25953 __media_entity_enum_init fndecl 2 25953 NULL
68140 +enable_so_cyttsp_spi_read_block_data_fndecl_25954 cyttsp_spi_read_block_data fndecl 4 25954 NULL
68141 +enable_so_len_xsd_sockmsg_25963 len xsd_sockmsg 0 25963 NULL
68142 +enable_so_ieee802154_hdr_get_sechdr_fndecl_25965 ieee802154_hdr_get_sechdr fndecl 0 25965 NULL
68143 @@ -164595,6 +192813,7 @@ index 0000000..951b3be
68144 +enable_so_dataflash_read_user_otp_fndecl_26075 dataflash_read_user_otp fndecl 3-2 26075 NULL nohasharray
68145 +enable_so_ep0_write_fndecl_26075 ep0_write fndecl 3 26075 &enable_so_dataflash_read_user_otp_fndecl_26075
68146 +enable_so_hfsplus_ext_build_key_fndecl_26076 hfsplus_ext_build_key fndecl 3 26076 NULL
68147 ++enable_so_alloc_bitmap_fndecl_26079 alloc_bitmap fndecl 1 26079 NULL
68148 +enable_so_fratio_arizona_fll_cfg_26082 fratio arizona_fll_cfg 0 26082 NULL
68149 +enable_so_fdt_first_subnode_fndecl_26084 fdt_first_subnode fndecl 2 26084 NULL nohasharray
68150 +enable_so_remap_to_origin_then_cache_fndecl_26084 remap_to_origin_then_cache fndecl 4 26084 &enable_so_fdt_first_subnode_fndecl_26084
68151 @@ -164773,6 +192992,7 @@ index 0000000..951b3be
68152 +enable_so_read_tree_block_fndecl_26587 read_tree_block fndecl 2 26587 NULL
68153 +enable_so_early_init_dt_scan_chosen_fndecl_26588 early_init_dt_scan_chosen fndecl 1 26588 NULL
68154 +enable_so_bytes_per_word_tegra_slink_data_26590 bytes_per_word tegra_slink_data 0 26590 NULL
68155 ++enable_so_rates_len_add_sta_param_26593 rates_len add_sta_param 0 26593 NULL
68156 +enable_so_nvme_trans_completion_fndecl_26597 nvme_trans_completion fndecl 0 26597 NULL
68157 +enable_so_tx_desc_count_xgbe_prv_data_26603 tx_desc_count xgbe_prv_data 0 26603 NULL
68158 +enable_so_UMAsize_sis_video_info_26611 UMAsize sis_video_info 0 26611 NULL
68159 @@ -165145,6 +193365,7 @@ index 0000000..951b3be
68160 +enable_so_period_frames_usb_stream_config_27656 period_frames usb_stream_config 0 27656 NULL
68161 +enable_so_WriteRegs_fndecl_27658 WriteRegs fndecl 4 27658 NULL
68162 +enable_so_xen_get_pages_limit_fndecl_27661 xen_get_pages_limit fndecl 0 27661 NULL
68163 ++enable_so_ceph_osdc_wait_request_fndecl_27663 ceph_osdc_wait_request fndecl 0 27663 NULL
68164 +enable_so_efx_ef10_mem_map_size_fndecl_27664 efx_ef10_mem_map_size fndecl 0 27664 NULL
68165 +enable_so_mr_write_fndecl_27670 mr_write fndecl 0 27670 NULL
68166 +enable_so_size_compat_ip6t_replace_27672 size compat_ip6t_replace 0 27672 NULL
68167 @@ -165240,6 +193461,7 @@ index 0000000..951b3be
68168 +enable_so_ext4_seek_hole_fndecl_27990 ext4_seek_hole fndecl 2 27990 NULL
68169 +enable_so_write_mei_hw_ops_27991 write mei_hw_ops 0 27991 NULL
68170 +enable_so_alloc_ccbs_blogic_adapter_27993 alloc_ccbs blogic_adapter 0 27993 NULL
68171 ++enable_so_cumulative_size_wm_adsp_buffer_region_27998 cumulative_size wm_adsp_buffer_region 0 27998 NULL
68172 +enable_so___nf_ct_ext_add_length_fndecl_27999 __nf_ct_ext_add_length fndecl 3 27999 NULL
68173 +enable_so_ubifs_end_scan_fndecl_28000 ubifs_end_scan fndecl 4 28000 NULL nohasharray
68174 +enable_so_page_count_scrub_block_28000 page_count scrub_block 0 28000 &enable_so_ubifs_end_scan_fndecl_28000
68175 @@ -165439,6 +193661,7 @@ index 0000000..951b3be
68176 +enable_so_ci_ll_init_fndecl_28561 ci_ll_init fndecl 3 28561 NULL nohasharray
68177 +enable_so_num_pads_uvc_entity_28561 num_pads uvc_entity 0 28561 &enable_so_ci_ll_init_fndecl_28561
68178 +enable_so_PRO_RATE_DEFAULT_vardecl_ice1712_c_28563 PRO_RATE_DEFAULT vardecl_ice1712.c 0 28563 NULL
68179 ++enable_so_wm_adsp_write_data_word_fndecl_28566 wm_adsp_write_data_word fndecl 0 28566 NULL
68180 +enable_so_wil_write_back_fndecl_28568 wil_write_back fndecl 3 28568 NULL
68181 +enable_so_nvme_npages_fndecl_28569 nvme_npages fndecl 0-1 28569 NULL
68182 +enable_so_out_max_chans_snd_card_asihpi_28574 out_max_chans snd_card_asihpi 0 28574 NULL nohasharray
68183 @@ -166110,6 +194333,7 @@ index 0000000..951b3be
68184 +enable_so_rx_filter_accum_arp_pend_requests_read_fndecl_30696 rx_filter_accum_arp_pend_requests_read fndecl 3 30696 &enable_so_status_urb_30696
68185 +enable_so_hdsp_spdif_sample_rate_fndecl_30700 hdsp_spdif_sample_rate fndecl 0 30700 NULL
68186 +enable_so_bm_entry_read_fndecl_30707 bm_entry_read fndecl 3 30707 NULL
68187 ++enable_so_bin_cl_size_drm_vc4_submit_cl_30710 bin_cl_size drm_vc4_submit_cl 0 30710 NULL
68188 +enable_so_sched_autogroup_write_fndecl_30715 sched_autogroup_write fndecl 3 30715 NULL
68189 +enable_so_numPhys_PVSCSIConfigPageController_30726 numPhys PVSCSIConfigPageController 0 30726 NULL
68190 +enable_so_lbs_threshold_write_fndecl_30733 lbs_threshold_write fndecl 5 30733 NULL
68191 @@ -166322,6 +194546,7 @@ index 0000000..951b3be
68192 +enable_so_mmap_base_kioctx_31285 mmap_base kioctx 0 31285 NULL
68193 +enable_so_igb_enable_sriov_fndecl_31288 igb_enable_sriov fndecl 2 31288 NULL
68194 +enable_so_nfs_readdir_page_filler_fndecl_31292 nfs_readdir_page_filler fndecl 5 31292 NULL
68195 ++enable_so_avail_wm_adsp_compr_buf_31294 avail wm_adsp_compr_buf 0 31294 NULL
68196 +enable_so_asymmetric_key_generate_id_fndecl_31299 asymmetric_key_generate_id fndecl 4-2 31299 NULL
68197 +enable_so_fs_shift_hfsplus_sb_info_31309 fs_shift hfsplus_sb_info 0 31309 NULL
68198 +enable_so_rxblen_brcmf_sdio_31317 rxblen brcmf_sdio 0 31317 NULL
68199 @@ -166342,6 +194567,7 @@ index 0000000..951b3be
68200 +enable_so_device_acpiphp_slot_31359 device acpiphp_slot 0 31359 NULL
68201 +enable_so_romfs_dev_strcmp_fndecl_31365 romfs_dev_strcmp fndecl 4-2 31365 NULL nohasharray
68202 +enable_so_SyS_migrate_pages_fndecl_31365 SyS_migrate_pages fndecl 2 31365 &enable_so_romfs_dev_strcmp_fndecl_31365
68203 ++enable_so_wilc_scan_fndecl_31368 wilc_scan fndecl 5-7 31368 NULL
68204 +enable_so_req_lim_delta_srp_rsp_31371 req_lim_delta srp_rsp 0 31371 NULL
68205 +enable_so_ioctl_fndecl_31375 ioctl fndecl 3 31375 NULL
68206 +enable_so_gfs2_meta_read_fndecl_31379 gfs2_meta_read fndecl 2 31379 NULL
68207 @@ -166566,6 +194792,7 @@ index 0000000..951b3be
68208 +enable_so_blocksize_udf_options_32019 blocksize udf_options 0 32019 NULL
68209 +enable_so_depth_zr364xx_fmt_32028 depth zr364xx_fmt 0 32028 NULL
68210 +enable_so_recent_mt_proc_write_fndecl_32029 recent_mt_proc_write fndecl 3 32029 NULL
68211 ++enable_so_skl_tplg_tlv_control_get_fndecl_32038 skl_tplg_tlv_control_get fndecl 3 32038 NULL
68212 +enable_so_check_xattr_ref_inode_fndecl_32039 check_xattr_ref_inode fndecl 0 32039 NULL
68213 +enable_so_base_efifb_dmi_info_32041 base efifb_dmi_info 0 32041 NULL
68214 +enable_so_balloon_set_new_target_fndecl_32044 balloon_set_new_target fndecl 1 32044 NULL
68215 @@ -166700,6 +194927,7 @@ index 0000000..951b3be
68216 +enable_so_permission_inode_operations_32455 permission inode_operations 0 32455 NULL
68217 +enable_so_ext4_da_write_inline_data_end_fndecl_32456 ext4_da_write_inline_data_end fndecl 2-4 32456 NULL
68218 +enable_so_snd_buf_bytes_vardecl_usbatm_c_32457 snd_buf_bytes vardecl_usbatm.c 0 32457 NULL
68219 ++enable_so_dvb_create_tsout_entity_fndecl_32460 dvb_create_tsout_entity fndecl 3 32460 NULL
68220 +enable_so_isr_irqs_read_fndecl_32462 isr_irqs_read fndecl 3 32462 NULL nohasharray
68221 +enable_so_ddata_ofs_cyttsp4_sysinfo_ofs_32462 ddata_ofs cyttsp4_sysinfo_ofs 0 32462 &enable_so_isr_irqs_read_fndecl_32462
68222 +enable_so_neighbormtu_mastersmsl_ib_port_info_32464 neighbormtu_mastersmsl ib_port_info 0 32464 NULL
68223 @@ -166751,6 +194979,7 @@ index 0000000..951b3be
68224 +enable_so_msg_print_ext_header_fndecl_32580 msg_print_ext_header fndecl 0 32580 NULL
68225 +enable_so_check_right_item_operations_32585 check_right item_operations 0 32585 NULL nohasharray
68226 +enable_so_fnic_fc_trace_get_data_fndecl_32585 fnic_fc_trace_get_data fndecl 0 32585 &enable_so_check_right_item_operations_32585
68227 ++enable_so_mlx5_modify_nic_vport_vlans_fndecl_32595 mlx5_modify_nic_vport_vlans fndecl 3 32595 NULL
68228 +enable_so_bop_assign_nilfs_bmap_operations_32598 bop_assign nilfs_bmap_operations 0 32598 NULL
68229 +enable_so_paging32_prefetch_gpte_fndecl_32604 paging32_prefetch_gpte fndecl 4 32604 NULL
68230 +enable_so_channel_num_sh_dmae_pdata_32606 channel_num sh_dmae_pdata 0 32606 NULL
68231 @@ -166808,6 +195037,7 @@ index 0000000..951b3be
68232 +enable_so_reg_word_size_snd_soc_codec_driver_32786 reg_word_size snd_soc_codec_driver 0 32786 &enable_so_hpi_instream_ancillary_write_fndecl_32786
68233 +enable_so_portcntrs_2_read_fndecl_32793 portcntrs_2_read fndecl 3 32793 NULL
68234 +enable_so_mp_register_ioapic_fndecl_32802 mp_register_ioapic fndecl 3 32802 NULL
68235 ++enable_so_wilc_setup_multicast_filter_fndecl_32803 wilc_setup_multicast_filter fndecl 3 32803 NULL
68236 +enable_so_pipe_usb_fifo_32805 pipe usb_fifo 0 32805 NULL nohasharray
68237 +enable_so_nfc_allocate_device_fndecl_32805 nfc_allocate_device fndecl 3 32805 &enable_so_pipe_usb_fifo_32805
68238 +enable_so_info_len_ib_ucm_info_32807 info_len ib_ucm_info 0 32807 NULL
68239 @@ -166836,7 +195066,8 @@ index 0000000..951b3be
68240 +enable_so_dvb_ringbuffer_read_user_fndecl_32877 dvb_ringbuffer_read_user fndecl 3-0 32877 NULL nohasharray
68241 +enable_so_dz_divisor_dn_zone_32877 dz_divisor dn_zone 0 32877 &enable_so_dvb_ringbuffer_read_user_fndecl_32877
68242 +enable_so_mem_cgroup_move_charge_pte_range_fndecl_32885 mem_cgroup_move_charge_pte_range fndecl 2 32885 NULL nohasharray
68243 -+enable_so_btrfs_cow_block_fndecl_32885 btrfs_cow_block fndecl 0 32885 &enable_so_mem_cgroup_move_charge_pte_range_fndecl_32885
68244 ++enable_so_btrfs_cow_block_fndecl_32885 btrfs_cow_block fndecl 0 32885 &enable_so_mem_cgroup_move_charge_pte_range_fndecl_32885 nohasharray
68245 ++enable_so_wilc_spi_write_fndecl_32885 wilc_spi_write fndecl 4 32885 &enable_so_btrfs_cow_block_fndecl_32885
68246 +enable_so_m_ialloc_inos_xfs_mount_32889 m_ialloc_inos xfs_mount 0 32889 NULL
68247 +enable_so_snoop_table_size_ib_mad_qp_info_32891 snoop_table_size ib_mad_qp_info 0 32891 NULL
68248 +enable_so_snd_gus_dram_read_fndecl_32893 snd_gus_dram_read fndecl 4 32893 NULL
68249 @@ -166997,6 +195228,7 @@ index 0000000..951b3be
68250 +enable_so_dvb_register_device_fndecl_33363 dvb_register_device fndecl 0 33363 NULL
68251 +enable_so_udl_prime_create_fndecl_33364 udl_prime_create fndecl 2 33364 NULL nohasharray
68252 +enable_so_scanlength_usbvision_frame_33364 scanlength usbvision_frame 0 33364 &enable_so_udl_prime_create_fndecl_33364
68253 ++enable_so_mlx5_core_sriov_enable_fndecl_33369 mlx5_core_sriov_enable fndecl 2 33369 NULL
68254 +enable_so_ihandlen_xfs_fsop_handlereq_33370 ihandlen xfs_fsop_handlereq 0 33370 NULL
68255 +enable_so_lpfc_sg_seg_cnt_init_fndecl_33371 lpfc_sg_seg_cnt_init fndecl 2 33371 NULL
68256 +enable_so_ib_qib_max_srq_wrs_vardecl_33376 ib_qib_max_srq_wrs vardecl 0 33376 NULL
68257 @@ -167056,6 +195288,7 @@ index 0000000..951b3be
68258 +enable_so_num_seq_vgastate_33544 num_seq vgastate 0 33544 &enable_so_sq_size_nes_hw_qp_33544
68259 +enable_so_tx_queues_nicvf_33546 tx_queues nicvf 0 33546 NULL
68260 +enable_so_dlfb_setup_modes_fndecl_33548 dlfb_setup_modes fndecl 4 33548 NULL
68261 ++enable_so_uinput_abs_setup_fndecl_33551 uinput_abs_setup fndecl 3 33551 NULL
68262 +enable_so_kvm_vcpu_read_guest_fndecl_33552 kvm_vcpu_read_guest fndecl 2-4 33552 NULL
68263 +enable_so_hns_nic_change_mtu_fndecl_33553 hns_nic_change_mtu fndecl 2 33553 NULL nohasharray
68264 +enable_so_tcf_hash_create_fndecl_33553 tcf_hash_create fndecl 4 33553 &enable_so_hns_nic_change_mtu_fndecl_33553
68265 @@ -167200,6 +195433,7 @@ index 0000000..951b3be
68266 +enable_so_cwarn_cm4000_dev_33978 cwarn cm4000_dev 0 33978 NULL
68267 +enable_so_buf_len_wmi_tlv_mgmt_rx_ev_33979 buf_len wmi_tlv_mgmt_rx_ev 0 33979 NULL
68268 +enable_so_usbat_bulk_write_fndecl_33983 usbat_bulk_write fndecl 3-4 33983 NULL
68269 ++enable_so_spi_data_write_fndecl_33987 spi_data_write fndecl 3 33987 NULL
68270 +enable_so_unit_off_ore_striping_info_33989 unit_off ore_striping_info 0 33989 NULL
68271 +enable_so_size_fjes_hw_resource_33991 size fjes_hw_resource 0 33991 NULL
68272 +enable_so_sectorsize_scrub_ctx_33993 sectorsize scrub_ctx 0 33993 NULL
68273 @@ -167481,6 +195715,7 @@ index 0000000..951b3be
68274 +enable_so_max_msix_vectors_fm10k_mac_info_34860 max_msix_vectors fm10k_mac_info 0 34860 NULL
68275 +enable_so_tipc_link_set_mtu_fndecl_34861 tipc_link_set_mtu fndecl 2 34861 NULL nohasharray
68276 +enable_so_gk20a_instobj_ctor_iommu_fndecl_34861 gk20a_instobj_ctor_iommu fndecl 2 34861 &enable_so_tipc_link_set_mtu_fndecl_34861
68277 ++enable_so_pset_prop_read_string_array_fndecl_34862 pset_prop_read_string_array fndecl 0 34862 NULL
68278 +enable_so_pfkey_recvmsg_fndecl_34863 pfkey_recvmsg fndecl 3 34863 NULL nohasharray
68279 +enable_so_s_map_size_adfs_sb_info_34863 s_map_size adfs_sb_info 0 34863 &enable_so_pfkey_recvmsg_fndecl_34863
68280 +enable_so_odm_num_comps_pnfs_osd_data_map_34865 odm_num_comps pnfs_osd_data_map 0 34865 NULL
68281 @@ -167528,6 +195763,7 @@ index 0000000..951b3be
68282 +enable_so_rfkill_fop_read_fndecl_34980 rfkill_fop_read fndecl 3 34980 NULL
68283 +enable_so_amdgpu_cgs_add_irq_source_fndecl_34994 amdgpu_cgs_add_irq_source fndecl 3 34994 NULL
68284 +enable_so_kfd_gtt_sa_init_fndecl_34996 kfd_gtt_sa_init fndecl 3-2 34996 NULL
68285 ++enable_so_wm_adsp_buffer_capture_block_fndecl_35001 wm_adsp_buffer_capture_block fndecl 2-0 35001 NULL
68286 +enable_so_error_elp_while_tx_read_fndecl_35002 error_elp_while_tx_read fndecl 3 35002 NULL
68287 +enable_so_rx_ring_count_ixgbe_adapter_35004 rx_ring_count ixgbe_adapter 0 35004 NULL
68288 +enable_so_amb_len_i5k_amb_data_35007 amb_len i5k_amb_data 0 35007 NULL
68289 @@ -168115,6 +196351,7 @@ index 0000000..951b3be
68290 +enable_so___tty_alloc_driver_fndecl_36660 __tty_alloc_driver fndecl 1 36660 NULL
68291 +enable_so_qp_alloc_host_work_fndecl_36661 qp_alloc_host_work fndecl 3-5 36661 NULL
68292 +enable_so_dac_channels_mixer_oxygen_model_36662 dac_channels_mixer oxygen_model 0 36662 NULL
68293 ++enable_so_regmap_raw_write_fndecl_36664 regmap_raw_write fndecl 0 36664 NULL
68294 +enable_so_roffset_scifioctl_copy_36667 roffset scifioctl_copy 0 36667 NULL
68295 +enable_so_max_queue_pairs_virtnet_info_36669 max_queue_pairs virtnet_info 0 36669 NULL
68296 +enable_so_i_file_acl_lo_ext4_inode_36684 i_file_acl_lo ext4_inode 0 36684 NULL
68297 @@ -168213,6 +196450,7 @@ index 0000000..951b3be
68298 +enable_so_to_fw_map_37020 to fw_map 0 37020 NULL
68299 +enable_so_cb_group_width_exofs_dt_data_map_37027 cb_group_width exofs_dt_data_map 0 37027 NULL
68300 +enable_so_result_fc_bsg_reply_37029 result fc_bsg_reply 0 37029 NULL
68301 ++enable_so_ib_is_udata_cleared_fndecl_37036 ib_is_udata_cleared fndecl 3 37036 NULL
68302 +enable_so_dirty_poll_interval_fndecl_37038 dirty_poll_interval fndecl 0 37038 NULL nohasharray
68303 +enable_so_mmio_size_vmw_private_37038 mmio_size vmw_private 0 37038 &enable_so_dirty_poll_interval_fndecl_37038
68304 +enable_so_adjust_resource_fndecl_37046 adjust_resource fndecl 3-2 37046 NULL
68305 @@ -168324,7 +196562,8 @@ index 0000000..951b3be
68306 +enable_so_bt_alloc_fndecl_37370 bt_alloc fndecl 2 37370 NULL
68307 +enable_so_peer_addr_len_drbd_connection_37371 peer_addr_len drbd_connection 0 37371 NULL
68308 +enable_so_orig_bi_size_usb_idmouse_37372 orig_bi_size usb_idmouse 0 37372 NULL
68309 -+enable_so_virtscsi_add_cmd_fndecl_37379 virtscsi_add_cmd fndecl 3-4 37379 NULL
68310 ++enable_so_virtscsi_add_cmd_fndecl_37379 virtscsi_add_cmd fndecl 3-4 37379 NULL nohasharray
68311 ++enable_so_size_list_size_vc4_bo_cache_37379 size_list_size vc4_bo_cache 0 37379 &enable_so_virtscsi_add_cmd_fndecl_37379
68312 +enable_so_gotoxay_fndecl_37380 gotoxay fndecl 2-3 37380 NULL
68313 +enable_so_nvkm_ramht_new_fndecl_37381 nvkm_ramht_new fndecl 2 37381 NULL
68314 +enable_so_size_pnp_mem_37384 size pnp_mem 0 37384 NULL
68315 @@ -168478,6 +196717,7 @@ index 0000000..951b3be
68316 +enable_so_prod_xfs_alloc_arg_37897 prod xfs_alloc_arg 0 37897 NULL
68317 +enable_so_calc_send_wqe_fndecl_37899 calc_send_wqe fndecl 0 37899 NULL nohasharray
68318 +enable_so_logi_dj_hidpp_event_fndecl_37899 logi_dj_hidpp_event fndecl 4 37899 &enable_so_calc_send_wqe_fndecl_37899
68319 ++enable_so_vc4_get_cache_list_for_size_fndecl_37902 vc4_get_cache_list_for_size fndecl 2 37902 NULL
68320 +enable_so_datalen_user_key_payload_37906 datalen user_key_payload 0 37906 NULL
68321 +enable_so_pasid_kfd_process_37907 pasid kfd_process 0 37907 NULL
68322 +enable_so_pvr2_i2c_basic_op_fndecl_37917 pvr2_i2c_basic_op fndecl 4-6 37917 NULL
68323 @@ -168609,6 +196849,7 @@ index 0000000..951b3be
68324 +enable_so_ext4_get_block_write_fndecl_38313 ext4_get_block_write fndecl 2 38313 NULL nohasharray
68325 +enable_so_ftid_base_tid_info_38313 ftid_base tid_info 0 38313 &enable_so_ext4_get_block_write_fndecl_38313
68326 +enable_so_nr_siblings_perf_event_38320 nr_siblings perf_event 0 38320 NULL
68327 ++enable_so_shader_rec_count_drm_vc4_submit_cl_38324 shader_rec_count drm_vc4_submit_cl 0 38324 NULL
68328 +enable_so_ob_max_size_mvumi_hba_38327 ob_max_size mvumi_hba 0 38327 NULL
68329 +enable_so_radeon_kms_compat_ioctl_fndecl_38328 radeon_kms_compat_ioctl fndecl 2 38328 NULL
68330 +enable_so_xfs_vn_fiemap_fndecl_38336 xfs_vn_fiemap fndecl 3-4 38336 NULL
68331 @@ -168723,7 +196964,8 @@ index 0000000..951b3be
68332 +enable_so_level_kvm_shadow_walk_iterator_38631 level kvm_shadow_walk_iterator 0 38631 NULL
68333 +enable_so_next_burst_len_iscsi_datain_req_38632 next_burst_len iscsi_datain_req 0 38632 NULL nohasharray
68334 +enable_so_iscsi_if_send_reply_fndecl_38632 iscsi_if_send_reply fndecl 7 38632 &enable_so_next_burst_len_iscsi_datain_req_38632
68335 -+enable_so_vmci_qp_broker_alloc_fndecl_38635 vmci_qp_broker_alloc fndecl 5-6 38635 NULL
68336 ++enable_so_vmci_qp_broker_alloc_fndecl_38635 vmci_qp_broker_alloc fndecl 5-6 38635 NULL nohasharray
68337 ++enable_so_data_offset_vb2_plane_38635 data_offset vb2_plane 0 38635 &enable_so_vmci_qp_broker_alloc_fndecl_38635
68338 +enable_so_size_bucket_table_38640 size bucket_table 0 38640 NULL
68339 +enable_so_f2fs_seek_block_fndecl_38641 f2fs_seek_block fndecl 2 38641 NULL
68340 +enable_so_uart_offset_pciserial_board_38647 uart_offset pciserial_board 0 38647 NULL nohasharray
68341 @@ -169125,6 +197367,7 @@ index 0000000..951b3be
68342 +enable_so_delta_disks_mddev_39759 delta_disks mddev 0 39759 NULL
68343 +enable_so_free_full_branch_fndecl_39768 free_full_branch fndecl 2 39768 NULL nohasharray
68344 +enable_so_map_swap_page_fndecl_39768 map_swap_page fndecl 0 39768 &enable_so_free_full_branch_fndecl_39768
68345 ++enable_so_phy_get_sset_count_fndecl_39774 phy_get_sset_count fndecl 0 39774 NULL
68346 +enable_so_write_flush_fndecl_39776 write_flush fndecl 3 39776 NULL
68347 +enable_so_add_range_with_merge_fndecl_39778 add_range_with_merge fndecl 5-4 39778 NULL
68348 +enable_so___collapse_huge_page_isolate_fndecl_39784 __collapse_huge_page_isolate fndecl 2 39784 NULL
68349 @@ -169444,6 +197687,7 @@ index 0000000..951b3be
68350 +enable_so_multi_write_idx_wmi_40801 multi_write_idx wmi 0 40801 NULL nohasharray
68351 +enable_so_cmd_len_request_40801 cmd_len request 0 40801 &enable_so_multi_write_idx_wmi_40801 nohasharray
68352 +enable_so_num_channels_hpb_dmae_pdata_40801 num_channels hpb_dmae_pdata 0 40801 &enable_so_cmd_len_request_40801
68353 ++enable_so_ath10k_wmi_alloc_chunk_fndecl_40804 ath10k_wmi_alloc_chunk fndecl 4-3-0 40804 NULL
68354 +enable_so_sz_m1_mlx5_wq_ll_40805 sz_m1 mlx5_wq_ll 0 40805 NULL
68355 +enable_so_ceph_osdc_readpages_fndecl_40814 ceph_osdc_readpages fndecl 0 40814 NULL nohasharray
68356 +enable_so_sysctl_wmem_max_vardecl_40814 sysctl_wmem_max vardecl 0 40814 &enable_so_ceph_osdc_readpages_fndecl_40814
68357 @@ -169575,6 +197819,7 @@ index 0000000..951b3be
68358 +enable_so_ies_len_connect_attr_41234 ies_len connect_attr 0 41234 NULL
68359 +enable_so_len_driver_data_41237 len driver_data 0 41237 NULL
68360 +enable_so_opera1_usb_i2c_msgxfer_fndecl_41242 opera1_usb_i2c_msgxfer fndecl 4 41242 NULL
68361 ++enable_so_sel_write_validatetrans_fndecl_41243 sel_write_validatetrans fndecl 3 41243 NULL
68362 +enable_so_ses_send_diag_fndecl_41244 ses_send_diag fndecl 4 41244 NULL
68363 +enable_so_iwl_dbgfs_ucode_tracing_write_fndecl_41247 iwl_dbgfs_ucode_tracing_write fndecl 3 41247 NULL
68364 +enable_so___apei_exec_run_fndecl_41248 __apei_exec_run fndecl 0 41248 NULL
68365 @@ -169661,7 +197906,8 @@ index 0000000..951b3be
68366 +enable_so_lpddr_info_query_fndecl_41492 lpddr_info_query fndecl 0 41492 NULL
68367 +enable_so_compat_core_sys_select_fndecl_41494 compat_core_sys_select fndecl 1 41494 NULL
68368 +enable_so_dir_entries_fat_floppy_defaults_41499 dir_entries fat_floppy_defaults 0 41499 NULL
68369 -+enable_so_mpi_set_buffer_fndecl_41501 mpi_set_buffer fndecl 3 41501 NULL
68370 ++enable_so_mpi_set_buffer_fndecl_41501 mpi_set_buffer fndecl 3 41501 NULL nohasharray
68371 ++enable_so_join_req_size_vardecl_host_interface_c_41501 join_req_size vardecl_host_interface.c 0 41501 &enable_so_mpi_set_buffer_fndecl_41501
68372 +enable_so_irda_param_insert_fndecl_41502 irda_param_insert fndecl 0 41502 NULL
68373 +enable_so_max_shutter_mt9v032_model_data_41509 max_shutter mt9v032_model_data 0 41509 NULL
68374 +enable_so_b_fifo_size_hfcSX_hw_41512 b_fifo_size hfcSX_hw 0 41512 NULL
68375 @@ -169925,7 +198171,8 @@ index 0000000..951b3be
68376 +enable_so_generic_cont_expand_simple_fndecl_42301 generic_cont_expand_simple fndecl 2 42301 NULL nohasharray
68377 +enable_so_ubi_more_leb_change_data_fndecl_42301 ubi_more_leb_change_data fndecl 4 42301 &enable_so_generic_cont_expand_simple_fndecl_42301
68378 +enable_so_dcache_dir_lseek_fndecl_42308 dcache_dir_lseek fndecl 2 42308 NULL nohasharray
68379 -+enable_so_iwch_reg_user_mr_fndecl_42308 iwch_reg_user_mr fndecl 2-3 42308 &enable_so_dcache_dir_lseek_fndecl_42308
68380 ++enable_so_iwch_reg_user_mr_fndecl_42308 iwch_reg_user_mr fndecl 2-3 42308 &enable_so_dcache_dir_lseek_fndecl_42308 nohasharray
68381 ++enable_so_level_cgroup_42308 level cgroup 0 42308 &enable_so_iwch_reg_user_mr_fndecl_42308
68382 +enable_so_rproc_alloc_fndecl_42314 rproc_alloc fndecl 5 42314 NULL
68383 +enable_so_log_pg_sz_remote_qpn_mlx5_qp_context_42315 log_pg_sz_remote_qpn mlx5_qp_context 0 42315 NULL
68384 +enable_so_num_rcv_contexts_hfi1_devdata_42317 num_rcv_contexts hfi1_devdata 0 42317 NULL
68385 @@ -169955,6 +198202,7 @@ index 0000000..951b3be
68386 +enable_so_remote_payload_max_nfc_digital_dev_42391 remote_payload_max nfc_digital_dev 0 42391 NULL
68387 +enable_so_no_of_vpath_vxgedev_42396 no_of_vpath vxgedev 0 42396 NULL
68388 +enable_so_module_alloc_fndecl_42397 module_alloc fndecl 1 42397 NULL
68389 ++enable_so_xen_blkif_max_queues_vardecl_xen_blkfront_c_42404 xen_blkif_max_queues vardecl_xen-blkfront.c 0 42404 NULL
68390 +enable_so_prof_len_vardecl_profile_c_42405 prof_len vardecl_profile.c 0 42405 NULL
68391 +enable_so_maximum_v4l2_ctrl_42407 maximum v4l2_ctrl 0 42407 NULL
68392 +enable_so_dma_rxsize_vardecl_stmmac_main_c_42409 dma_rxsize vardecl_stmmac_main.c 0 42409 NULL
68393 @@ -170218,6 +198466,7 @@ index 0000000..951b3be
68394 +enable_so_prepare_elf64_ram_headers_callback_fndecl_43123 prepare_elf64_ram_headers_callback fndecl 1-2 43123 NULL
68395 +enable_so_output_pool_snd_seq_client_pool_43126 output_pool snd_seq_client_pool 0 43126 NULL
68396 +enable_so_fm10k_change_mtu_fndecl_43135 fm10k_change_mtu fndecl 2 43135 NULL
68397 ++enable_so_ndev_init_isr_fndecl_43138 ndev_init_isr fndecl 3 43138 NULL
68398 +enable_so_pcf8563_read_block_data_fndecl_43139 pcf8563_read_block_data fndecl 3 43139 NULL
68399 +enable_so_Size_aac_fibhdr_43144 Size aac_fibhdr 0 43144 NULL
68400 +enable_so_btrfs_create_subvol_root_fndecl_43148 btrfs_create_subvol_root fndecl 4 43148 NULL
68401 @@ -170398,6 +198647,7 @@ index 0000000..951b3be
68402 +enable_so_drm_format_plane_cpp_fndecl_43621 drm_format_plane_cpp fndecl 0 43621 NULL nohasharray
68403 +enable_so_chipshift_cfi_private_43621 chipshift cfi_private 0 43621 &enable_so_drm_format_plane_cpp_fndecl_43621
68404 +enable_so_btusb_recv_isoc_fndecl_43628 btusb_recv_isoc fndecl 3 43628 NULL
68405 ++enable_so_count_phm_ppt_v1_clock_voltage_dependency_table_43634 count phm_ppt_v1_clock_voltage_dependency_table 0 43634 NULL
68406 +enable_so_drm_gtf2_k_fndecl_43638 drm_gtf2_k fndecl 0 43638 NULL nohasharray
68407 +enable_so_technisat_usb2_eeprom_lrc_read_fndecl_43638 technisat_usb2_eeprom_lrc_read fndecl 4 43638 &enable_so_drm_gtf2_k_fndecl_43638
68408 +enable_so_sdricoh_mmc_cmd_fndecl_43641 sdricoh_mmc_cmd fndecl 0 43641 NULL
68409 @@ -170459,7 +198709,8 @@ index 0000000..951b3be
68410 +enable_so_initrd_start_vardecl_43848 initrd_start vardecl 0 43848 NULL nohasharray
68411 +enable_so_parport_ieee1284_ecp_write_data_fndecl_43848 parport_ieee1284_ecp_write_data fndecl 0 43848 &enable_so_initrd_start_vardecl_43848
68412 +enable_so_xen_set_nslabs_fndecl_43849 xen_set_nslabs fndecl 0-1 43849 NULL
68413 -+enable_so_wlcore_scan_fndecl_43850 wlcore_scan fndecl 4 43850 NULL
68414 ++enable_so_wlcore_scan_fndecl_43850 wlcore_scan fndecl 4 43850 NULL nohasharray
68415 ++enable_so_wm_adsp_read_data_block_fndecl_43850 wm_adsp_read_data_block fndecl 0 43850 &enable_so_wlcore_scan_fndecl_43850
68416 +enable_so_scsi_host_alloc_fndecl_43858 scsi_host_alloc fndecl 2 43858 NULL
68417 +enable_so_indat_endpoint_keyspan_device_details_43860 indat_endpoint keyspan_device_details 0 43860 NULL
68418 +enable_so_get_sset_count_ethtool_ops_43861 get_sset_count ethtool_ops 0 43861 NULL
68419 @@ -170526,8 +198777,10 @@ index 0000000..951b3be
68420 +enable_so_rx_buffer_truesize_efx_nic_44027 rx_buffer_truesize efx_nic 0 44027 NULL
68421 +enable_so_response_length_ib_uverbs_ex_create_qp_resp_44030 response_length ib_uverbs_ex_create_qp_resp 0 44030 NULL
68422 +enable_so_SyS_kexec_file_load_fndecl_44032 SyS_kexec_file_load fndecl 3 44032 NULL
68423 ++enable_so_wilc_gnrl_async_info_received_fndecl_44034 wilc_gnrl_async_info_received fndecl 3 44034 NULL
68424 +enable_so_regsize_octeon_mdiobus_44041 regsize octeon_mdiobus 0 44041 NULL
68425 +enable_so_convert_extent_bit_fndecl_44046 convert_extent_bit fndecl 2-3 44046 NULL
68426 ++enable_so_nr_rings_xen_blkif_44058 nr_rings xen_blkif 0 44058 NULL
68427 +enable_so_ahc_linux_map_seg_fndecl_44059 ahc_linux_map_seg fndecl 4-5 44059 NULL nohasharray
68428 +enable_so_btrfs_submit_direct_fndecl_44059 btrfs_submit_direct fndecl 4 44059 &enable_so_ahc_linux_map_seg_fndecl_44059
68429 +enable_so_prog_page_fndecl_44060 prog_page fndecl 2 44060 NULL
68430 @@ -170862,6 +199115,7 @@ index 0000000..951b3be
68431 +enable_so_tx_ring_count_e1000_adapter_45060 tx_ring_count e1000_adapter 0 45060 NULL
68432 +enable_so_sd_sgentry_align_brcmfmac_sdio_platform_data_45061 sd_sgentry_align brcmfmac_sdio_platform_data 0 45061 NULL
68433 +enable_so_write_buffer_size_vardecl_legousbtower_c_45062 write_buffer_size vardecl_legousbtower.c 0 45062 NULL
68434 ++enable_so_crypto_akcipher_maxsize_fndecl_45073 crypto_akcipher_maxsize fndecl 0 45073 NULL
68435 +enable_so_read_vbt_r10_fndecl_45076 read_vbt_r10 fndecl 1 45076 NULL
68436 +enable_so_sendpage_iscsi_sw_tcp_conn_45081 sendpage iscsi_sw_tcp_conn 0 45081 NULL
68437 +enable_so_unmap_mapping_range_vma_fndecl_45084 unmap_mapping_range_vma fndecl 2-3 45084 NULL
68438 @@ -171175,7 +199429,9 @@ index 0000000..951b3be
68439 +enable_so___devcgroup_check_permission_fndecl_46082 __devcgroup_check_permission fndecl 0 46082 NULL
68440 +enable_so_wSamplesPerFrame_uac_format_type_ii_ext_descriptor_46084 wSamplesPerFrame uac_format_type_ii_ext_descriptor 0 46084 NULL
68441 +enable_so_alloc_dca_provider_fndecl_46085 alloc_dca_provider fndecl 2 46085 NULL
68442 ++enable_so_wilc_add_wep_key_bss_ap_fndecl_46087 wilc_add_wep_key_bss_ap fndecl 3 46087 NULL
68443 +enable_so_dm_startblk_adfs_discmap_46088 dm_startblk adfs_discmap 0 46088 NULL
68444 ++enable_so_num_type_reg_regmap_irq_chip_46090 num_type_reg regmap_irq_chip 0 46090 NULL
68445 +enable_so_nr_pages_splice_pipe_desc_46095 nr_pages splice_pipe_desc 0 46095 NULL
68446 +enable_so_ubifs_setxattr_fndecl_46097 ubifs_setxattr fndecl 4 46097 NULL nohasharray
68447 +enable_so_len_sfi_table_header_46097 len sfi_table_header 0 46097 &enable_so_ubifs_setxattr_fndecl_46097 nohasharray
68448 @@ -171290,6 +199546,7 @@ index 0000000..951b3be
68449 +enable_so_iblock_execute_unmap_fndecl_46444 iblock_execute_unmap fndecl 3-2 46444 &enable_so_btrfsic_process_superblock_dev_mirror_fndecl_46444
68450 +enable_so_C_SYSC_get_mempolicy_fndecl_46447 C_SYSC_get_mempolicy fndecl 3 46447 NULL
68451 +enable_so_fb_base_phys_mb862xxfb_par_46449 fb_base_phys mb862xxfb_par 0 46449 NULL
68452 ++enable_so_sglen_usbtest_param_32_46451 sglen usbtest_param_32 0 46451 NULL
68453 +enable_so_untranslate_fndecl_46453 untranslate fndecl 3 46453 NULL
68454 +enable_so_snd_seq_oss_writeq_new_fndecl_46455 snd_seq_oss_writeq_new fndecl 2 46455 NULL
68455 +enable_so_nfsd_nrpools_fndecl_46460 nfsd_nrpools fndecl 0 46460 NULL
68456 @@ -171532,6 +199789,7 @@ index 0000000..951b3be
68457 +enable_so_start_block_hfsplus_extent_47172 start_block hfsplus_extent 0 47172 NULL
68458 +enable_so_max_blk_size_mmc_host_47174 max_blk_size mmc_host 0 47174 NULL
68459 +enable_so_value_drm_radeon_setparam_47185 value drm_radeon_setparam 0 47185 NULL
68460 ++enable_so_msr_init_context_fndecl_47188 msr_init_context fndecl 2 47188 NULL
68461 +enable_so_msix_count_qla_hw_data_47192 msix_count qla_hw_data 0 47192 NULL
68462 +enable_so_max_sq_sg_mlx4_caps_47193 max_sq_sg mlx4_caps 0 47193 NULL
68463 +enable_so_block_count_msb_data_47194 block_count msb_data 0 47194 NULL
68464 @@ -171633,11 +199891,13 @@ index 0000000..951b3be
68465 +enable_so_mac_offset_skb_gso_cb_47491 mac_offset skb_gso_cb 0 47491 NULL
68466 +enable_so_page_size_cas_47493 page_size cas 0 47493 NULL
68467 +enable_so_first_block_efs_sb_info_47499 first_block efs_sb_info 0 47499 NULL
68468 ++enable_so_rss_table_size_i40e_vsi_47500 rss_table_size i40e_vsi 0 47500 NULL
68469 +enable_so_cifs_write_from_iter_fndecl_47501 cifs_write_from_iter fndecl 1-2 47501 NULL
68470 +enable_so_gr_ep_init_fndecl_47502 gr_ep_init fndecl 4 47502 NULL
68471 +enable_so_try_unmap_single_bt_fndecl_47503 try_unmap_single_bt fndecl 2-3 47503 NULL
68472 +enable_so_btrfs_cont_expand_fndecl_47505 btrfs_cont_expand fndecl 3-2 47505 NULL
68473 -+enable_so_romfs_blk_strcmp_fndecl_47510 romfs_blk_strcmp fndecl 4-2 47510 NULL
68474 ++enable_so_romfs_blk_strcmp_fndecl_47510 romfs_blk_strcmp fndecl 4-2 47510 NULL nohasharray
68475 ++enable_so_ucNumEntries__ATOM_Tonga_MCLK_Dependency_Table_47510 ucNumEntries _ATOM_Tonga_MCLK_Dependency_Table 0 47510 &enable_so_romfs_blk_strcmp_fndecl_47510
68476 +enable_so_setcontrast_fndecl_47513 setcontrast fndecl 0 47513 NULL
68477 +enable_so_elf_header_exclude_ranges_fndecl_47518 elf_header_exclude_ranges fndecl 2-3 47518 NULL nohasharray
68478 +enable_so_gfs2_dir_get_new_buffer_fndecl_47518 gfs2_dir_get_new_buffer fndecl 2 47518 &enable_so_elf_header_exclude_ranges_fndecl_47518 nohasharray
68479 @@ -171650,6 +199910,7 @@ index 0000000..951b3be
68480 +enable_so_llcp_sock_sendmsg_fndecl_47535 llcp_sock_sendmsg fndecl 3 47535 NULL
68481 +enable_so_bytes_nvmem_cell_47539 bytes nvmem_cell 0 47539 NULL
68482 +enable_so_skb_headers_offset_update_fndecl_47543 skb_headers_offset_update fndecl 2 47543 NULL
68483 ++enable_so_skl_tplg_tlv_control_set_fndecl_47545 skl_tplg_tlv_control_set fndecl 3 47545 NULL
68484 +enable_so_show_sysfs_ops_47546 show sysfs_ops 0 47546 NULL
68485 +enable_so_relocs_num_drm_qxl_command_47550 relocs_num drm_qxl_command 0 47550 NULL
68486 +enable_so_add_replay_bud_fndecl_47552 add_replay_bud fndecl 3 47552 NULL
68487 @@ -171667,8 +199928,10 @@ index 0000000..951b3be
68488 +enable_so_dir_logfs_transaction_47599 dir logfs_transaction 0 47599 NULL
68489 +enable_so_ecryptfs_write_end_fndecl_47601 ecryptfs_write_end fndecl 5-3 47601 NULL
68490 +enable_so_rx_page_order_iwl_trans_pcie_47605 rx_page_order iwl_trans_pcie 0 47605 NULL
68491 ++enable_so_num_codecs_snd_soc_dai_link_47607 num_codecs snd_soc_dai_link 0 47607 NULL
68492 +enable_so_ebt_buf_count_fndecl_47612 ebt_buf_count fndecl 2 47612 NULL
68493 +enable_so_control_1_vxge_hw_ring_rxd_1_47616 control_1 vxge_hw_ring_rxd_1 0 47616 NULL
68494 ++enable_so_nvme_fill_device_id_scsi_string_fndecl_47624 nvme_fill_device_id_scsi_string fndecl 4 47624 NULL
68495 +enable_so_mincore_pte_range_fndecl_47625 mincore_pte_range fndecl 2 47625 NULL nohasharray
68496 +enable_so_len_ib_ucm_req_47625 len ib_ucm_req 0 47625 &enable_so_mincore_pte_range_fndecl_47625
68497 +enable_so_ubifs_load_znode_fndecl_47628 ubifs_load_znode fndecl 4 47628 NULL
68498 @@ -171990,7 +200253,8 @@ index 0000000..951b3be
68499 +enable_so_iomem_reg_shift_old_serial_port_48579 iomem_reg_shift old_serial_port 0 48579 NULL nohasharray
68500 +enable_so_dynamic_fw_traces_read_fndecl_48579 dynamic_fw_traces_read fndecl 3 48579 &enable_so_iomem_reg_shift_old_serial_port_48579
68501 +enable_so_vce_v2_0_bo_size_fndecl_48581 vce_v2_0_bo_size fndecl 0 48581 NULL
68502 -+enable_so_tx_ring_size_bnx2x_48584 tx_ring_size bnx2x 0 48584 NULL
68503 ++enable_so_tx_ring_size_bnx2x_48584 tx_ring_size bnx2x 0 48584 NULL nohasharray
68504 ++enable_so_max_num_vdevs_ath10k_48584 max_num_vdevs ath10k 0 48584 &enable_so_tx_ring_size_bnx2x_48584
68505 +enable_so_rc_position_rpcrdma_read_chunk_48586 rc_position rpcrdma_read_chunk 0 48586 NULL
68506 +enable_so_flow_label_ib_sa_path_rec_48590 flow_label ib_sa_path_rec 0 48590 NULL nohasharray
68507 +enable_so_backup_size_vmw_resource_48590 backup_size vmw_resource 0 48590 &enable_so_flow_label_ib_sa_path_rec_48590
68508 @@ -172146,6 +200410,7 @@ index 0000000..951b3be
68509 +enable_so_dev_id_rfcomm_dev_req_49039 dev_id rfcomm_dev_req 0 49039 NULL
68510 +enable_so_reg_r_fndecl_49040 reg_r fndecl 0 49040 NULL
68511 +enable_so_dwMaxVideoFrameSize_uvc_streaming_control_49044 dwMaxVideoFrameSize uvc_streaming_control 0 49044 NULL
68512 ++enable_so_max_port_per_lag_mlxsw_config_profile_49046 max_port_per_lag mlxsw_config_profile 0 49046 NULL
68513 +enable_so_devices_per_bus__MPT_ADAPTER_49051 devices_per_bus _MPT_ADAPTER 0 49051 NULL nohasharray
68514 +enable_so_devno_skd_device_49051 devno skd_device 0 49051 &enable_so_devices_per_bus__MPT_ADAPTER_49051
68515 +enable_so_cxacru_cm_fndecl_49052 cxacru_cm fndecl 4 49052 NULL
68516 @@ -172193,6 +200458,7 @@ index 0000000..951b3be
68517 +enable_so_guc_fw_size_intel_guc_fw_49177 guc_fw_size intel_guc_fw 0 49177 NULL
68518 +enable_so_nilfs_sufile_do_cancel_free_fndecl_49183 nilfs_sufile_do_cancel_free fndecl 2 49183 NULL
68519 +enable_so_s_last_ino_logfs_super_49185 s_last_ino logfs_super 0 49185 NULL
68520 ++enable_so_page_size_nvme_ctrl_49190 page_size nvme_ctrl 0 49190 NULL
68521 +enable_so_len_fb_cmap_user_49195 len fb_cmap_user 0 49195 NULL
68522 +enable_so_fsl_edma_prep_dma_cyclic_fndecl_49197 fsl_edma_prep_dma_cyclic fndecl 4-2-3 49197 NULL nohasharray
68523 +enable_so_of_get_child_count_fndecl_49197 of_get_child_count fndecl 0 49197 &enable_so_fsl_edma_prep_dma_cyclic_fndecl_49197
68524 @@ -172639,6 +200905,7 @@ index 0000000..951b3be
68525 +enable_so_recalc_rate_clk_ops_50655 recalc_rate clk_ops 0 50655 NULL
68526 +enable_so_io_size_tulip_chip_table_50656 io_size tulip_chip_table 0 50656 NULL
68527 +enable_so_proc_coredump_filter_read_fndecl_50658 proc_coredump_filter_read fndecl 3 50658 NULL
68528 ++enable_so_ucNumEntries__ATOM_Tonga_SCLK_Dependency_Table_50666 ucNumEntries _ATOM_Tonga_SCLK_Dependency_Table 0 50666 NULL
68529 +enable_so_da9150_i2c_write_device_fndecl_50670 da9150_i2c_write_device fndecl 3 50670 NULL
68530 +enable_so_i915_gem_alloc_context_obj_fndecl_50671 i915_gem_alloc_context_obj fndecl 2 50671 NULL
68531 +enable_so_nclips_bttv_overlay_50673 nclips bttv_overlay 0 50673 NULL
68532 @@ -172728,6 +200995,7 @@ index 0000000..951b3be
68533 +enable_so_exofs_read_kern_fndecl_50914 exofs_read_kern fndecl 6 50914 NULL nohasharray
68534 +enable_so_oom_score_adj_read_fndecl_50914 oom_score_adj_read fndecl 3 50914 &enable_so_exofs_read_kern_fndecl_50914
68535 +enable_so_vnet_hdr_sz_tun_struct_50916 vnet_hdr_sz tun_struct 0 50916 NULL
68536 ++enable_so_raid1_sync_request_fndecl_50917 raid1_sync_request fndecl 2 50917 NULL
68537 +enable_so_num_chunks_drm_radeon_cs_50925 num_chunks drm_radeon_cs 0 50925 NULL nohasharray
68538 +enable_so_first_minor_gendisk_50925 first_minor gendisk 0 50925 &enable_so_num_chunks_drm_radeon_cs_50925
68539 +enable_so___spi_async_fndecl_50927 __spi_async fndecl 0 50927 NULL
68540 @@ -172741,10 +201009,12 @@ index 0000000..951b3be
68541 +enable_so_wil_rx_init_fndecl_50939 wil_rx_init fndecl 2 50939 NULL
68542 +enable_so_ubi_start_update_fndecl_50948 ubi_start_update fndecl 3 50948 NULL
68543 +enable_so_sync_key_len_pvr2_ioread_50952 sync_key_len pvr2_ioread 0 50952 NULL
68544 -+enable_so_iser_prepare_write_cmd_fndecl_50953 iser_prepare_write_cmd fndecl 2-3 50953 NULL
68545 ++enable_so_iser_prepare_write_cmd_fndecl_50953 iser_prepare_write_cmd fndecl 2-3 50953 NULL nohasharray
68546 ++enable_so_brcmf_p2p_escan_fndecl_50953 brcmf_p2p_escan fndecl 2 50953 &enable_so_iser_prepare_write_cmd_fndecl_50953
68547 +enable_so_reg_list_size_radeon_rlc_50955 reg_list_size radeon_rlc 0 50955 NULL
68548 +enable_so_alloc_agpphysmem_i8xx_fndecl_50960 alloc_agpphysmem_i8xx fndecl 1 50960 NULL
68549 +enable_so_nsegments_dsp_module_desc_50965 nsegments dsp_module_desc 0 50965 NULL
68550 ++enable_so_memdup_user_nul_fndecl_50968 memdup_user_nul fndecl 2 50968 NULL
68551 +enable_so_gamma_sd_gl860_50970 gamma sd_gl860 0 50970 NULL
68552 +enable_so_sdma_get_descq_cnt_fndecl_50975 sdma_get_descq_cnt fndecl 0 50975 NULL
68553 +enable_so_irq_ssb_device_50977 irq ssb_device 0 50977 NULL nohasharray
68554 @@ -172821,6 +201091,7 @@ index 0000000..951b3be
68555 +enable_so_cirrus_ttm_tt_create_fndecl_51204 cirrus_ttm_tt_create fndecl 2 51204 NULL
68556 +enable_so_vcc_recvmsg_fndecl_51205 vcc_recvmsg fndecl 3 51205 NULL
68557 +enable_so_kvm_clear_guest_fndecl_51207 kvm_clear_guest fndecl 2-3 51207 NULL
68558 ++enable_so_goodix_i2c_write_fndecl_51209 goodix_i2c_write fndecl 4 51209 NULL
68559 +enable_so_phys_vram_area_51217 phys vram_area 0 51217 NULL
68560 +enable_so_mt9v032_calc_ratio_fndecl_51219 mt9v032_calc_ratio fndecl 0 51219 NULL
68561 +enable_so_vsi_oltext_vxfs_sb_info_51222 vsi_oltext vxfs_sb_info 0 51222 NULL
68562 @@ -172849,6 +201120,7 @@ index 0000000..951b3be
68563 +enable_so_mthca_alloc_icm_table_fndecl_51311 mthca_alloc_icm_table fndecl 3-4 51311 NULL
68564 +enable_so__ipw_read_reg32_fndecl_51318 _ipw_read_reg32 fndecl 0 51318 NULL
68565 +enable_so_drv_sds_rings_qlcnic_adapter_51319 drv_sds_rings qlcnic_adapter 0 51319 NULL
68566 ++enable_so_dvb_register_device_fndecl_51331 dvb_register_device fndecl 6 51331 NULL
68567 +enable_so_size_bts_phys_51332 size bts_phys 0 51332 NULL
68568 +enable_so_sync_dma_snd_usb_endpoint_51333 sync_dma snd_usb_endpoint 0 51333 NULL
68569 +enable_so_counter_vardecl_inode_c_51334 counter vardecl_inode.c 0 51334 NULL
68570 @@ -172936,7 +201208,8 @@ index 0000000..951b3be
68571 +enable_so_klsi_105_prepare_write_buffer_fndecl_51599 klsi_105_prepare_write_buffer fndecl 3 51599 NULL nohasharray
68572 +enable_so_af9013_wr_regs_i2c_fndecl_51599 af9013_wr_regs_i2c fndecl 5 51599 &enable_so_klsi_105_prepare_write_buffer_fndecl_51599 nohasharray
68573 +enable_so_ep_count_bytes_remain_fndecl_51599 ep_count_bytes_remain fndecl 0 51599 &enable_so_af9013_wr_regs_i2c_fndecl_51599
68574 -+enable_so_receive_mergeable_fndecl_51601 receive_mergeable fndecl 5-4 51601 NULL
68575 ++enable_so_receive_mergeable_fndecl_51601 receive_mergeable fndecl 5-4 51601 NULL nohasharray
68576 ++enable_so_wilc_add_beacon_fndecl_51601 wilc_add_beacon fndecl 6-4 51601 &enable_so_receive_mergeable_fndecl_51601
68577 +enable_so_va_for_temp_scif_window_51603 va_for_temp scif_window 0 51603 NULL
68578 +enable_so_data_transfer_length_vmscsi_request_51616 data_transfer_length vmscsi_request 0 51616 NULL nohasharray
68579 +enable_so_cur_vfio_pci_fill_info_51616 cur vfio_pci_fill_info 0 51616 &enable_so_data_transfer_length_vmscsi_request_51616
68580 @@ -173446,7 +201719,8 @@ index 0000000..951b3be
68581 +enable_so_h_vlan_TCI_vlan_ethhdr_53095 h_vlan_TCI vlan_ethhdr 0 53095 NULL
68582 +enable_so_packet_create_fndecl_53098 packet_create fndecl 3 53098 NULL nohasharray
68583 +enable_so_size_fuse_attr_53098 size fuse_attr 0 53098 &enable_so_packet_create_fndecl_53098
68584 -+enable_so_s_blocksize_minix3_super_block_53099 s_blocksize minix3_super_block 0 53099 NULL
68585 ++enable_so_s_blocksize_minix3_super_block_53099 s_blocksize minix3_super_block 0 53099 NULL nohasharray
68586 ++enable_so_wilc_spi_read_fndecl_53099 wilc_spi_read fndecl 4 53099 &enable_so_s_blocksize_minix3_super_block_53099
68587 +enable_so_brcmf_fw_nvram_strip_fndecl_53102 brcmf_fw_nvram_strip fndecl 2 53102 NULL
68588 +enable_so_prepare_header80_fndecl_53108 prepare_header80 fndecl 3-0 53108 NULL nohasharray
68589 +enable_so_rx_nr_rings_bnxt_53108 rx_nr_rings bnxt 0 53108 &enable_so_prepare_header80_fndecl_53108
68590 @@ -173754,6 +202028,7 @@ index 0000000..951b3be
68591 +enable_so_c_srate_f_uac2_opts_53962 c_srate f_uac2_opts 0 53962 &enable_so_vmw_sou_backing_alloc_fndecl_53962
68592 +enable_so_recover_orphan_inode_fndecl_53969 recover_orphan_inode fndecl 2 53969 NULL nohasharray
68593 +enable_so_proc_fault_inject_read_fndecl_53969 proc_fault_inject_read fndecl 3 53969 &enable_so_recover_orphan_inode_fndecl_53969
68594 ++enable_so_dests_size_fs_fte_53973 dests_size fs_fte 0 53973 NULL
68595 +enable_so_dib9000_fw_boot_fndecl_53978 dib9000_fw_boot fndecl 3-5 53978 NULL
68596 +enable_so_rx_buf_sz_cp_private_53982 rx_buf_sz cp_private 0 53982 NULL
68597 +enable_so_assoc_resp_len_wmi_connect_event_53983 assoc_resp_len wmi_connect_event 0 53983 NULL
68598 @@ -173999,6 +202274,7 @@ index 0000000..951b3be
68599 +enable_so_target_freq_mt9p031_platform_data_54660 target_freq mt9p031_platform_data 0 54660 NULL nohasharray
68600 +enable_so_truncate_pagecache_fndecl_54660 truncate_pagecache fndecl 2 54660 &enable_so_target_freq_mt9p031_platform_data_54660 nohasharray
68601 +enable_so_reshape_position_mddev_54660 reshape_position mddev 0 54660 &enable_so_truncate_pagecache_fndecl_54660
68602 ++enable_so_get_vddc_lookup_table_fndecl_54661 get_vddc_lookup_table fndecl 4 54661 NULL
68603 +enable_so_s_session_udf_sb_info_54662 s_session udf_sb_info 0 54662 NULL
68604 +enable_so_qed_cxt_set_proto_cid_count_fndecl_54663 qed_cxt_set_proto_cid_count fndecl 3 54663 NULL
68605 +enable_so_ssid_len_hostap_bss_info_54670 ssid_len hostap_bss_info 0 54670 NULL
68606 @@ -174492,6 +202768,7 @@ index 0000000..951b3be
68607 +enable_so_dt_gpio_count_fndecl_56245 dt_gpio_count fndecl 0 56245 &enable_so_cfpkt_peek_head_fndecl_56245
68608 +enable_so_qtd_fill_fndecl_56249 qtd_fill fndecl 5-6-3-0-4 56249 NULL
68609 +enable_so_size_uvc_xu_control_query_56263 size uvc_xu_control_query 0 56263 NULL
68610 ++enable_so_size_udata_s_56266 size udata_s 0 56266 NULL
68611 +enable_so_dmreq_start_crypt_config_56268 dmreq_start crypt_config 0 56268 NULL
68612 +enable_so_qp_alloc_res_fndecl_56275 qp_alloc_res fndecl 5 56275 NULL
68613 +enable_so_vyres_crtc_56276 vyres crtc 0 56276 NULL
68614 @@ -174619,6 +202896,7 @@ index 0000000..951b3be
68615 +enable_so_ath6kl_wmi_set_rssi_filter_cmd_fndecl_56701 ath6kl_wmi_set_rssi_filter_cmd fndecl 2 56701 &enable_so_remove_migration_pte_fndecl_56701
68616 +enable_so_usb_err_gspca_dev_56706 usb_err gspca_dev 0 56706 NULL
68617 +enable_so_mmc_erase_fndecl_56707 mmc_erase fndecl 0 56707 NULL
68618 ++enable_so_mlx5_modify_nic_vport_mac_list_fndecl_56715 mlx5_modify_nic_vport_mac_list fndecl 4 56715 NULL
68619 +enable_so_zlib_inflate_workspacesize_fndecl_56716 zlib_inflate_workspacesize fndecl 0 56716 NULL
68620 +enable_so_qgroupid_btrfs_ioctl_qgroup_create_args_56717 qgroupid btrfs_ioctl_qgroup_create_args 0 56717 NULL
68621 +enable_so_munlock_vma_pages_range_fndecl_56718 munlock_vma_pages_range fndecl 2 56718 NULL
68622 @@ -174659,6 +202937,7 @@ index 0000000..951b3be
68623 +enable_so_sc_max_requests_svcxprt_rdma_56840 sc_max_requests svcxprt_rdma 0 56840 NULL
68624 +enable_so_tail_TxFifo_56844 tail TxFifo 0 56844 NULL
68625 +enable_so_capacity_alauda_media_info_56845 capacity alauda_media_info 0 56845 NULL
68626 ++enable_so_unit_size_wlan_host_mem_req_56846 unit_size wlan_host_mem_req 0 56846 NULL
68627 +enable_so_tomoyo_read_self_fndecl_56848 tomoyo_read_self fndecl 3 56848 NULL
68628 +enable_so_blocks_mmc_test_area_56853 blocks mmc_test_area 0 56853 NULL
68629 +enable_so_transfer_one_spi_master_56858 transfer_one spi_master 0 56858 NULL
68630 @@ -174755,6 +203034,7 @@ index 0000000..951b3be
68631 +enable_so_part_shift_vardecl_loop_c_57103 part_shift vardecl_loop.c 0 57103 NULL nohasharray
68632 +enable_so_mcs7830_get_reg_fndecl_57103 mcs7830_get_reg fndecl 3 57103 &enable_so_part_shift_vardecl_loop_c_57103
68633 +enable_so_sync_pt_create_fndecl_57105 sync_pt_create fndecl 2 57105 NULL
68634 ++enable_so_wm_adsp_buffer_size_fndecl_57116 wm_adsp_buffer_size fndecl 0 57116 NULL
68635 +enable_so_total_sections_f2fs_sb_info_57118 total_sections f2fs_sb_info 0 57118 NULL
68636 +enable_so_size_nvif_notify_57130 size nvif_notify 0 57130 NULL
68637 +enable_so_gsm_mux_rx_netchar_fndecl_57131 gsm_mux_rx_netchar fndecl 3 57131 NULL
68638 @@ -174781,7 +203061,8 @@ index 0000000..951b3be
68639 +enable_so_num_vfs_mlx4_dev_persistent_57187 num_vfs mlx4_dev_persistent 0 57187 NULL
68640 +enable_so_h_datalen_logfs_journal_header_57189 h_datalen logfs_journal_header 0 57189 NULL nohasharray
68641 +enable_so_z1_zt_57189 z1 zt 0 57189 &enable_so_h_datalen_logfs_journal_header_57189
68642 -+enable_so_cfs_trace_copyin_string_fndecl_57191 cfs_trace_copyin_string fndecl 4 57191 NULL
68643 ++enable_so_cfs_trace_copyin_string_fndecl_57191 cfs_trace_copyin_string fndecl 4 57191 NULL nohasharray
68644 ++enable_so_max_lag_mlxsw_config_profile_57191 max_lag mlxsw_config_profile 0 57191 &enable_so_cfs_trace_copyin_string_fndecl_57191
68645 +enable_so_OutputCount_smb2_ioctl_rsp_57198 OutputCount smb2_ioctl_rsp 0 57198 NULL
68646 +enable_so_sector_dm_crypt_io_57208 sector dm_crypt_io 0 57208 NULL
68647 +enable_so_frag_max_size_inet6_skb_parm_57210 frag_max_size inet6_skb_parm 0 57210 NULL
68648 @@ -175032,6 +203313,7 @@ index 0000000..951b3be
68649 +enable_so_mei_cl_alloc_cb_fndecl_57971 mei_cl_alloc_cb fndecl 2 57971 NULL
68650 +enable_so_sel_write_enforce_fndecl_57973 sel_write_enforce fndecl 3 57973 NULL
68651 +enable_so_rds_rm_size_fndecl_57975 rds_rm_size fndecl 0-2 57975 NULL
68652 ++enable_so_input_count_cgs_acpi_method_info_57981 input_count cgs_acpi_method_info 0 57981 NULL
68653 +enable_so_hpfs_map_anode_fndecl_57993 hpfs_map_anode fndecl 2 57993 NULL
68654 +enable_so_faultin_page_fndecl_57994 faultin_page fndecl 3 57994 NULL
68655 +enable_so_perf_sample_ustack_size_fndecl_57995 perf_sample_ustack_size fndecl 0-2-1 57995 NULL
68656 @@ -175049,8 +203331,10 @@ index 0000000..951b3be
68657 +enable_so_rindex_sc18is602_58043 rindex sc18is602 0 58043 NULL nohasharray
68658 +enable_so_rtw_check_beacon_data23a_fndecl_58043 rtw_check_beacon_data23a fndecl 3 58043 &enable_so_rindex_sc18is602_58043
68659 +enable_so_len_mic_vring_58048 len mic_vring 0 58048 NULL nohasharray
68660 -+enable_so_num_sqsets_csio_hw_58048 num_sqsets csio_hw 0 58048 &enable_so_len_mic_vring_58048
68661 ++enable_so_num_sqsets_csio_hw_58048 num_sqsets csio_hw 0 58048 &enable_so_len_mic_vring_58048 nohasharray
68662 ++enable_so_cur_fw_iocb_count_qla_hw_data_58048 cur_fw_iocb_count qla_hw_data 0 58048 &enable_so_num_sqsets_csio_hw_58048
68663 +enable_so_acpi_gbl_integer_byte_width_vardecl_58054 acpi_gbl_integer_byte_width vardecl 0 58054 NULL
68664 ++enable_so_num_pairs_nvm_id_lp_mlc_58055 num_pairs nvm_id_lp_mlc 0 58055 NULL
68665 +enable_so_cylinders_mspro_devinfo_58057 cylinders mspro_devinfo 0 58057 NULL
68666 +enable_so_offset_m48t59_plat_data_58063 offset m48t59_plat_data 0 58063 NULL nohasharray
68667 +enable_so_buffer_size_octeon_droq_58063 buffer_size octeon_droq 0 58063 &enable_so_offset_m48t59_plat_data_58063 nohasharray
68668 @@ -175249,7 +203533,8 @@ index 0000000..951b3be
68669 +enable_so_thermal_tx_resume_read_fndecl_58616 thermal_tx_resume_read fndecl 3 58616 &enable_so_rd_count_ring_descr_hw_58616
68670 +enable_so_mousedev_read_fndecl_58624 mousedev_read fndecl 3 58624 NULL
68671 +enable_so_wusb_key_dump_fndecl_58627 wusb_key_dump fndecl 2 58627 NULL nohasharray
68672 -+enable_so___erst_write_to_storage_fndecl_58627 __erst_write_to_storage fndecl 1 58627 &enable_so_wusb_key_dump_fndecl_58627
68673 ++enable_so___erst_write_to_storage_fndecl_58627 __erst_write_to_storage fndecl 1 58627 &enable_so_wusb_key_dump_fndecl_58627 nohasharray
68674 ++enable_so_ath10k_wmi_alloc_host_mem_fndecl_58627 ath10k_wmi_alloc_host_mem fndecl 4-3 58627 &enable_so___erst_write_to_storage_fndecl_58627
68675 +enable_so_dccps_gss_dccp_sock_58634 dccps_gss dccp_sock 0 58634 NULL
68676 +enable_so_layout_mdu_array_info_s_58636 layout mdu_array_info_s 0 58636 NULL nohasharray
68677 +enable_so_ext4_ext_handle_unwritten_extents_fndecl_58636 ext4_ext_handle_unwritten_extents fndecl 7-0-6 58636 &enable_so_layout_mdu_array_info_s_58636
68678 @@ -175677,6 +203962,7 @@ index 0000000..951b3be
68679 +enable_so_src_offset_btrfs_ioctl_clone_range_args_59876 src_offset btrfs_ioctl_clone_range_args 0 59876 NULL
68680 +enable_so_ide_scan_pio_blacklist_fndecl_59877 ide_scan_pio_blacklist fndecl 0 59877 NULL
68681 +enable_so_dx_fb_fillrect_59878 dx fb_fillrect 0 59878 NULL
68682 ++enable_so_max_ars_out_nd_cmd_ars_cap_59879 max_ars_out nd_cmd_ars_cap 0 59879 NULL
68683 +enable_so___hwahc_dev_set_key_fndecl_59883 __hwahc_dev_set_key fndecl 5 59883 NULL
68684 +enable_so_vfs_allocated_count_igb_adapter_59900 vfs_allocated_count igb_adapter 0 59900 NULL
68685 +enable_so_mos7720_write_fndecl_59901 mos7720_write fndecl 4 59901 NULL nohasharray
68686 @@ -175786,7 +204072,8 @@ index 0000000..951b3be
68687 +enable_so_l2cap_create_le_flowctl_pdu_fndecl_60233 l2cap_create_le_flowctl_pdu fndecl 3 60233 NULL
68688 +enable_so_dlfb_alloc_urb_list_fndecl_60234 dlfb_alloc_urb_list fndecl 3 60234 NULL
68689 +enable_so_bttv_crop_adjust_fndecl_60236 bttv_crop_adjust fndecl 4-3 60236 NULL nohasharray
68690 -+enable_so_irnet_connect_indication_fndecl_60236 irnet_connect_indication fndecl 5 60236 &enable_so_bttv_crop_adjust_fndecl_60236
68691 ++enable_so_irnet_connect_indication_fndecl_60236 irnet_connect_indication fndecl 5 60236 &enable_so_bttv_crop_adjust_fndecl_60236 nohasharray
68692 ++enable_so_bo_count_vc4_exec_info_60236 bo_count vc4_exec_info 0 60236 &enable_so_irnet_connect_indication_fndecl_60236
68693 +enable_so_mwifiex_usb_host_to_card_fndecl_60239 mwifiex_usb_host_to_card fndecl 2 60239 NULL
68694 +enable_so_frag_len_pau_fpdu_frag_60242 frag_len pau_fpdu_frag 0 60242 NULL
68695 +enable_so_max_pages_per_fmr_ib_fmr_pool_param_60248 max_pages_per_fmr ib_fmr_pool_param 0 60248 NULL
68696 @@ -176158,6 +204445,7 @@ index 0000000..951b3be
68697 +enable_so_total_size_iscsi_segment_61454 total_size iscsi_segment 0 61454 NULL
68698 +enable_so_ocfs2_zero_range_for_truncate_fndecl_61461 ocfs2_zero_range_for_truncate fndecl 3-4 61461 NULL nohasharray
68699 +enable_so_next_interface_id_usb_configuration_61461 next_interface_id usb_configuration 0 61461 &enable_so_ocfs2_zero_range_for_truncate_fndecl_61461
68700 ++enable_so_ucNumEntries__ATOM_Tonga_MM_Dependency_Table_61467 ucNumEntries _ATOM_Tonga_MM_Dependency_Table 0 61467 NULL
68701 +enable_so_ath6kl_keepalive_read_fndecl_61468 ath6kl_keepalive_read fndecl 3 61468 NULL
68702 +enable_so_irlan_client_ctrl_connect_confirm_fndecl_61475 irlan_client_ctrl_connect_confirm fndecl 5 61475 NULL
68703 +enable_so_ubi_eba_write_leb_st_fndecl_61476 ubi_eba_write_leb_st fndecl 5 61476 NULL
68704 @@ -176323,6 +204611,7 @@ index 0000000..951b3be
68705 +enable_so_s_maxbytes_super_block_61963 s_maxbytes super_block 0 61963 NULL
68706 +enable_so_periods_min_snd_pcm_hardware_61965 periods_min snd_pcm_hardware 0 61965 NULL
68707 +enable_so_radeon_audio_calc_cts_fndecl_61966 radeon_audio_calc_cts fndecl 1-4 61966 NULL
68708 ++enable_so_wm_adsp_compr_read_fndecl_61972 wm_adsp_compr_read fndecl 3 61972 NULL
68709 +enable_so_nfs_set_pgio_error_fndecl_61975 nfs_set_pgio_error fndecl 3 61975 NULL
68710 +enable_so_physical_for_dev_replace_scrub_page_61977 physical_for_dev_replace scrub_page 0 61977 NULL
68711 +enable_so_qla4xxx_alloc_work_fndecl_61982 qla4xxx_alloc_work fndecl 2 61982 NULL
68712 @@ -176382,7 +204671,8 @@ index 0000000..951b3be
68713 +enable_so___process_deleted_xattr_fndecl_62133 __process_deleted_xattr fndecl 4 62133 NULL
68714 +enable_so_hfs_cat_create_fndecl_62139 hfs_cat_create fndecl 1 62139 NULL
68715 +enable_so_next_setup_data_62142 next setup_data 0 62142 NULL
68716 -+enable_so_drbd_recv_all_warn_fndecl_62144 drbd_recv_all_warn fndecl 3 62144 NULL
68717 ++enable_so_drbd_recv_all_warn_fndecl_62144 drbd_recv_all_warn fndecl 3 62144 NULL nohasharray
68718 ++enable_so_free_space_bitmap_size_fndecl_62144 free_space_bitmap_size fndecl 0 62144 &enable_so_drbd_recv_all_warn_fndecl_62144
68719 +enable_so_cciss_tape_cmds_vardecl_cciss_c_62147 cciss_tape_cmds vardecl_cciss.c 0 62147 NULL
68720 +enable_so_tcp_trim_head_fndecl_62157 tcp_trim_head fndecl 3 62157 NULL
68721 +enable_so_ptrace_writedata_fndecl_62158 ptrace_writedata fndecl 4-3 62158 NULL
68722 @@ -176417,6 +204707,7 @@ index 0000000..951b3be
68723 +enable_so_omfs_scan_list_fndecl_62289 omfs_scan_list fndecl 2 62289 NULL
68724 +enable_so___kvm_read_guest_page_fndecl_62291 __kvm_read_guest_page fndecl 2-5 62291 NULL
68725 +enable_so_num_arq_entries_i40e_adminq_info_62293 num_arq_entries i40e_adminq_info 0 62293 NULL
68726 ++enable_so_num_chunks_icp_qat_suof_filehdr_62296 num_chunks icp_qat_suof_filehdr 0 62296 NULL
68727 +enable_so_max_io_mvumi_hba_62301 max_io mvumi_hba 0 62301 NULL
68728 +enable_so_ceph_llseek_fndecl_62305 ceph_llseek fndecl 2 62305 NULL
68729 +enable_so_sb_rbmblocks_xfs_sb_62307 sb_rbmblocks xfs_sb 0 62307 NULL
68730 @@ -176806,6 +205097,7 @@ index 0000000..951b3be
68731 +enable_so_vb2_create_framevec_fndecl_63451 vb2_create_framevec fndecl 1-2 63451 NULL
68732 +enable_so_cmd_status_netdev_desc_63452 cmd_status netdev_desc 0 63452 NULL
68733 +enable_so_fuse_send_read_fndecl_63454 fuse_send_read fndecl 4 63454 NULL
68734 ++enable_so_bo_count_drm_vc4_get_hang_state_63455 bo_count drm_vc4_get_hang_state 0 63455 NULL
68735 +enable_so_sysv_raw_inode_fndecl_63458 sysv_raw_inode fndecl 2 63458 NULL
68736 +enable_so_c_width_g2d_frame_63459 c_width g2d_frame 0 63459 NULL
68737 +enable_so_btrfs_drop_extent_cache_fndecl_63461 btrfs_drop_extent_cache fndecl 3-2 63461 NULL
68738 @@ -176816,7 +205108,8 @@ index 0000000..951b3be
68739 +enable_so_srq_lmt_max_sge_ocrdma_query_srq_rsp_63477 srq_lmt_max_sge ocrdma_query_srq_rsp 0 63477 NULL
68740 +enable_so___bm_find_next_fndecl_63479 __bm_find_next fndecl 0-2 63479 NULL
68741 +enable_so_mlx5_ib_read_user_wqe_fndecl_63480 mlx5_ib_read_user_wqe fndecl 3-5 63480 NULL nohasharray
68742 -+enable_so_sctp_setsockopt_active_key_fndecl_63480 sctp_setsockopt_active_key fndecl 3 63480 &enable_so_mlx5_ib_read_user_wqe_fndecl_63480
68743 ++enable_so_sctp_setsockopt_active_key_fndecl_63480 sctp_setsockopt_active_key fndecl 3 63480 &enable_so_mlx5_ib_read_user_wqe_fndecl_63480 nohasharray
68744 ++enable_so_cur_fw_xcb_count_qla_hw_data_63480 cur_fw_xcb_count qla_hw_data 0 63480 &enable_so_sctp_setsockopt_active_key_fndecl_63480
68745 +enable_so_gigaset_initcs_fndecl_63482 gigaset_initcs fndecl 2 63482 NULL nohasharray
68746 +enable_so_length_dw_amdgpu_cs_chunk_63482 length_dw amdgpu_cs_chunk 0 63482 &enable_so_gigaset_initcs_fndecl_63482
68747 +enable_so_width_v4l2_pix_format_63491 width v4l2_pix_format 0 63491 NULL
68748 @@ -176967,6 +205260,7 @@ index 0000000..951b3be
68749 +enable_so_start_btrfs_ioctl_defrag_range_args_63924 start btrfs_ioctl_defrag_range_args 0 63924 NULL
68750 +enable_so_efx_change_mtu_fndecl_63926 efx_change_mtu fndecl 2 63926 NULL
68751 +enable_so_cqm_max_rmid_vardecl_perf_event_intel_cqm_c_63930 cqm_max_rmid vardecl_perf_event_intel_cqm.c 0 63930 NULL
68752 ++enable_so_component_match_realloc_fndecl_63932 component_match_realloc fndecl 3 63932 NULL
68753 +enable_so_dentry_needs_remove_privs_fndecl_63934 dentry_needs_remove_privs fndecl 0 63934 NULL
68754 +enable_so_ro_maxpages_rpcrdma_memreg_ops_63937 ro_maxpages rpcrdma_memreg_ops 0 63937 NULL nohasharray
68755 +enable_so_filemark_cnt_osst_tape_63937 filemark_cnt osst_tape 0 63937 &enable_so_ro_maxpages_rpcrdma_memreg_ops_63937
68756 @@ -177479,6 +205773,7 @@ index 0000000..951b3be
68757 +enable_so_data_in_size_mpt3_ioctl_command_65434 data_in_size mpt3_ioctl_command 0 65434 NULL
68758 +enable_so_a2mp_send_fndecl_65436 a2mp_send fndecl 4 65436 NULL
68759 +enable_so_lbs_bcnmiss_write_fndecl_65438 lbs_bcnmiss_write fndecl 3 65438 NULL
68760 ++enable_so_spi_cmd_complete_fndecl_65442 spi_cmd_complete fndecl 5 65442 NULL
68761 +enable_so_rx_rx_pre_complt_read_fndecl_65446 rx_rx_pre_complt_read fndecl 3 65446 NULL
68762 +enable_so_carm_handle_generic_fndecl_65450 carm_handle_generic fndecl 3 65450 NULL
68763 +enable_so_squashfs_cache_init_fndecl_65451 squashfs_cache_init fndecl 3-2 65451 NULL
68764 @@ -182349,7 +210644,7 @@ index 0a578fe..b81f62d 100644
68765 })
68766
68767 diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
68768 -index fefbf2d..7b0dc7f 100644
68769 +index 2984737..c142f22 100644
68770 --- a/virt/kvm/kvm_main.c
68771 +++ b/virt/kvm/kvm_main.c
68772 @@ -90,12 +90,17 @@ LIST_HEAD(vm_list);
68773 @@ -182372,7 +210667,7 @@ index fefbf2d..7b0dc7f 100644
68774
68775 struct dentry *kvm_debugfs_dir;
68776 EXPORT_SYMBOL_GPL(kvm_debugfs_dir);
68777 -@@ -843,7 +848,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
68778 +@@ -833,7 +838,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
68779 /* We can read the guest memory with __xxx_user() later on. */
68780 if ((id < KVM_USER_MEM_SLOTS) &&
68781 ((mem->userspace_addr & (PAGE_SIZE - 1)) ||
68782 @@ -182381,7 +210676,7 @@ index fefbf2d..7b0dc7f 100644
68783 (void __user *)(unsigned long)mem->userspace_addr,
68784 mem->memory_size)))
68785 goto out;
68786 -@@ -1898,9 +1903,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached);
68787 +@@ -1889,9 +1894,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached);
68788
68789 int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len)
68790 {
68791 @@ -182401,7 +210696,7 @@ index fefbf2d..7b0dc7f 100644
68792 }
68793 EXPORT_SYMBOL_GPL(kvm_clear_guest_page);
68794
68795 -@@ -2237,7 +2250,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
68796 +@@ -2228,7 +2241,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
68797 return 0;
68798 }
68799
68800 @@ -182410,7 +210705,7 @@ index fefbf2d..7b0dc7f 100644
68801 .release = kvm_vcpu_release,
68802 .unlocked_ioctl = kvm_vcpu_ioctl,
68803 #ifdef CONFIG_KVM_COMPAT
68804 -@@ -2953,7 +2966,7 @@ out:
68805 +@@ -2942,7 +2955,7 @@ out:
68806 }
68807 #endif
68808
68809 @@ -182419,7 +210714,7 @@ index fefbf2d..7b0dc7f 100644
68810 .release = kvm_vm_release,
68811 .unlocked_ioctl = kvm_vm_ioctl,
68812 #ifdef CONFIG_KVM_COMPAT
68813 -@@ -3024,7 +3037,7 @@ out:
68814 +@@ -3013,7 +3026,7 @@ out:
68815 return r;
68816 }
68817
68818 @@ -182428,7 +210723,7 @@ index fefbf2d..7b0dc7f 100644
68819 .unlocked_ioctl = kvm_dev_ioctl,
68820 .compat_ioctl = kvm_dev_ioctl,
68821 .llseek = noop_llseek,
68822 -@@ -3050,7 +3063,7 @@ static void hardware_enable_nolock(void *junk)
68823 +@@ -3039,7 +3052,7 @@ static void hardware_enable_nolock(void *junk)
68824
68825 if (r) {
68826 cpumask_clear_cpu(cpu, cpus_hardware_enabled);
68827 @@ -182437,7 +210732,7 @@ index fefbf2d..7b0dc7f 100644
68828 pr_info("kvm: enabling virtualization on CPU%d failed\n", cpu);
68829 }
68830 }
68831 -@@ -3105,10 +3118,10 @@ static int hardware_enable_all(void)
68832 +@@ -3094,10 +3107,10 @@ static int hardware_enable_all(void)
68833
68834 kvm_usage_count++;
68835 if (kvm_usage_count == 1) {
68836 @@ -182450,7 +210745,7 @@ index fefbf2d..7b0dc7f 100644
68837 hardware_disable_all_nolock();
68838 r = -EBUSY;
68839 }
68840 -@@ -3572,7 +3585,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
68841 +@@ -3551,7 +3564,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
68842 if (!vcpu_align)
68843 vcpu_align = __alignof__(struct kvm_vcpu);
68844 kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, vcpu_align,
68845 @@ -182459,7 +210754,7 @@ index fefbf2d..7b0dc7f 100644
68846 if (!kvm_vcpu_cache) {
68847 r = -ENOMEM;
68848 goto out_free_3;
68849 -@@ -3582,9 +3595,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
68850 +@@ -3561,9 +3574,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
68851 if (r)
68852 goto out_free;
68853
68854 @@ -182471,7 +210766,7 @@ index fefbf2d..7b0dc7f 100644
68855
68856 r = misc_register(&kvm_dev);
68857 if (r) {
68858 -@@ -3594,9 +3609,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
68859 +@@ -3573,9 +3588,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
68860
68861 register_syscore_ops(&kvm_syscore_ops);
68862
68863
68864 diff --git a/4.4.8/4425_grsec_remove_EI_PAX.patch b/4.5.2/4425_grsec_remove_EI_PAX.patch
68865 similarity index 100%
68866 rename from 4.4.8/4425_grsec_remove_EI_PAX.patch
68867 rename to 4.5.2/4425_grsec_remove_EI_PAX.patch
68868
68869 diff --git a/4.5.2/4427_force_XATTR_PAX_tmpfs.patch b/4.5.2/4427_force_XATTR_PAX_tmpfs.patch
68870 new file mode 100644
68871 index 0000000..6db8e37
68872 --- /dev/null
68873 +++ b/4.5.2/4427_force_XATTR_PAX_tmpfs.patch
68874 @@ -0,0 +1,57 @@
68875 +From: Anthony G. Basile <blueness@g.o>
68876 +
68877 +For users that emerge without XATTR_PAX support enabled, we still want user.pax.flags
68878 +namespace supported on tmpfs so that the PaX markings survive emerge.
68879 +
68880 +diff -Naur a/mm/shmem.c b/mm/shmem.c
68881 +--- a/mm/shmem.c 2016-04-29 19:56:25.306101147 -0400
68882 ++++ b/mm/shmem.c 2016-04-29 19:59:44.126104490 -0400
68883 +@@ -2670,24 +2670,20 @@
68884 + return simple_xattr_set(&info->xattrs, name, value, size, flags);
68885 + }
68886 +
68887 +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
68888 + static int shmem_user_xattr_handler_set(const struct xattr_handler *handler,
68889 + struct dentry *dentry, const char *name,
68890 + const void *value, size_t size, int flags)
68891 + {
68892 + struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
68893 +
68894 +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
68895 + if (strcmp(name, XATTR_NAME_PAX_FLAGS))
68896 + return -EOPNOTSUPP;
68897 + if (size > 8)
68898 + return -EINVAL;
68899 +-#endif
68900 +
68901 + name = xattr_full_name(handler, name);
68902 + return simple_xattr_set(&info->xattrs, name, value, size, flags);
68903 + }
68904 +-#endif
68905 +
68906 + static const struct xattr_handler shmem_security_xattr_handler = {
68907 + .prefix = XATTR_SECURITY_PREFIX,
68908 +@@ -2701,13 +2697,11 @@
68909 + .set = shmem_xattr_handler_set,
68910 + };
68911 +
68912 +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
68913 + static const struct xattr_handler shmem_user_xattr_handler = {
68914 + .prefix = XATTR_USER_PREFIX,
68915 + .get = shmem_xattr_handler_get,
68916 + .set = shmem_user_xattr_handler_set,
68917 + };
68918 +-#endif
68919 +
68920 + static const struct xattr_handler *shmem_xattr_handlers[] = {
68921 + #ifdef CONFIG_TMPFS_POSIX_ACL
68922 +@@ -2717,9 +2711,7 @@
68923 + &shmem_security_xattr_handler,
68924 + &shmem_trusted_xattr_handler,
68925 +
68926 +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
68927 + &shmem_user_xattr_handler,
68928 +-#endif
68929 +
68930 + NULL
68931 + };
68932
68933 diff --git a/4.4.8/4430_grsec-remove-localversion-grsec.patch b/4.5.2/4430_grsec-remove-localversion-grsec.patch
68934 similarity index 100%
68935 rename from 4.4.8/4430_grsec-remove-localversion-grsec.patch
68936 rename to 4.5.2/4430_grsec-remove-localversion-grsec.patch
68937
68938 diff --git a/4.4.8/4435_grsec-mute-warnings.patch b/4.5.2/4435_grsec-mute-warnings.patch
68939 similarity index 100%
68940 rename from 4.4.8/4435_grsec-mute-warnings.patch
68941 rename to 4.5.2/4435_grsec-mute-warnings.patch
68942
68943 diff --git a/4.4.8/4440_grsec-remove-protected-paths.patch b/4.5.2/4440_grsec-remove-protected-paths.patch
68944 similarity index 100%
68945 rename from 4.4.8/4440_grsec-remove-protected-paths.patch
68946 rename to 4.5.2/4440_grsec-remove-protected-paths.patch
68947
68948 diff --git a/4.4.8/4450_grsec-kconfig-default-gids.patch b/4.5.2/4450_grsec-kconfig-default-gids.patch
68949 similarity index 100%
68950 rename from 4.4.8/4450_grsec-kconfig-default-gids.patch
68951 rename to 4.5.2/4450_grsec-kconfig-default-gids.patch
68952
68953 diff --git a/4.4.8/4465_selinux-avc_audit-log-curr_ip.patch b/4.5.2/4465_selinux-avc_audit-log-curr_ip.patch
68954 similarity index 100%
68955 rename from 4.4.8/4465_selinux-avc_audit-log-curr_ip.patch
68956 rename to 4.5.2/4465_selinux-avc_audit-log-curr_ip.patch
68957
68958 diff --git a/4.4.8/4470_disable-compat_vdso.patch b/4.5.2/4470_disable-compat_vdso.patch
68959 similarity index 99%
68960 rename from 4.4.8/4470_disable-compat_vdso.patch
68961 rename to 4.5.2/4470_disable-compat_vdso.patch
68962 index 742df26..4aba080 100644
68963 --- a/4.4.8/4470_disable-compat_vdso.patch
68964 +++ b/4.5.2/4470_disable-compat_vdso.patch
68965 @@ -26,7 +26,7 @@ Closes bug: http://bugs.gentoo.org/show_bug.cgi?id=210138
68966 diff -urp a/arch/x86/Kconfig b/arch/x86/Kconfig
68967 --- a/arch/x86/Kconfig 2009-07-31 01:36:57.323857684 +0100
68968 +++ b/arch/x86/Kconfig 2009-07-31 01:51:39.395749681 +0100
68969 -@@ -2010,29 +2010,8 @@
68970 +@@ -2044,29 +2044,8 @@
68971
68972 config COMPAT_VDSO
68973 def_bool n
68974
68975 diff --git a/4.4.8/4475_emutramp_default_on.patch b/4.5.2/4475_emutramp_default_on.patch
68976 similarity index 100%
68977 rename from 4.4.8/4475_emutramp_default_on.patch
68978 rename to 4.5.2/4475_emutramp_default_on.patch