summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-04-29 20:52:52 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-04-29 20:52:52 -0400
commitc724961ddb517e3d599cc88d13ae5b5c7614753e (patch)
treef758340d57bc4106c4fd60377b9dde4a9d3e5386
parentgrsecurity-3.1-4.4.8-201604252206 (diff)
downloadhardened-patchset-c724961ddb517e3d599cc88d13ae5b5c7614753e.tar.gz
hardened-patchset-c724961ddb517e3d599cc88d13ae5b5c7614753e.tar.bz2
hardened-patchset-c724961ddb517e3d599cc88d13ae5b5c7614753e.zip
grsecurity-3.1-4.5.2-20160428205820160428
-rw-r--r--4.4.8/4427_force_XATTR_PAX_tmpfs.patch35
-rw-r--r--4.5.2/0000_README (renamed from 4.4.8/0000_README)6
-rw-r--r--4.5.2/1001_linux-4.5.2.patch (renamed from 4.4.8/1007_linux-4.4.8.patch)2008
-rw-r--r--4.5.2/4420_grsecurity-3.1-4.5.2-201604282058.patch (renamed from 4.4.8/4420_grsecurity-3.1-4.4.8-201604252206.patch)41813
-rw-r--r--4.5.2/4425_grsec_remove_EI_PAX.patch (renamed from 4.4.8/4425_grsec_remove_EI_PAX.patch)0
-rw-r--r--4.5.2/4427_force_XATTR_PAX_tmpfs.patch57
-rw-r--r--4.5.2/4430_grsec-remove-localversion-grsec.patch (renamed from 4.4.8/4430_grsec-remove-localversion-grsec.patch)0
-rw-r--r--4.5.2/4435_grsec-mute-warnings.patch (renamed from 4.4.8/4435_grsec-mute-warnings.patch)0
-rw-r--r--4.5.2/4440_grsec-remove-protected-paths.patch (renamed from 4.4.8/4440_grsec-remove-protected-paths.patch)0
-rw-r--r--4.5.2/4450_grsec-kconfig-default-gids.patch (renamed from 4.4.8/4450_grsec-kconfig-default-gids.patch)0
-rw-r--r--4.5.2/4465_selinux-avc_audit-log-curr_ip.patch (renamed from 4.4.8/4465_selinux-avc_audit-log-curr_ip.patch)0
-rw-r--r--4.5.2/4470_disable-compat_vdso.patch (renamed from 4.4.8/4470_disable-compat_vdso.patch)2
-rw-r--r--4.5.2/4475_emutramp_default_on.patch (renamed from 4.4.8/4475_emutramp_default_on.patch)0
13 files changed, 35965 insertions, 7956 deletions
diff --git a/4.4.8/4427_force_XATTR_PAX_tmpfs.patch b/4.4.8/4427_force_XATTR_PAX_tmpfs.patch
deleted file mode 100644
index f6aea64..0000000
--- a/4.4.8/4427_force_XATTR_PAX_tmpfs.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Anthony G. Basile <blueness@gentoo.org>
-
-For users that emerge without XATTR_PAX support enabled, we still want user.pax.flags
-namespace supported on tmpfs so that the PaX markings survive emerge.
-
-diff -Naur a/mm/shmem.c b/mm/shmem.c
---- a/mm/shmem.c 2013-06-11 21:00:18.000000000 -0400
-+++ b/mm/shmem.c 2013-06-11 21:08:18.000000000 -0400
-@@ -2564,11 +2564,7 @@
- static int shmem_xattr_validate(const char *name)
- {
- struct { const char *prefix; size_t len; } arr[] = {
--
--#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
- { XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN},
--#endif
--
- { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
- { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
- };
-@@ -2624,14 +2620,12 @@
- if (err)
- return err;
-
--#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
- if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) {
- if (strcmp(name, XATTR_NAME_PAX_FLAGS))
- return -EOPNOTSUPP;
- if (size > 8)
- return -EINVAL;
- }
--#endif
-
- return simple_xattr_set(&info->xattrs, name, value, size, flags);
- }
diff --git a/4.4.8/0000_README b/4.5.2/0000_README
index 31bb556..6857874 100644
--- a/4.4.8/0000_README
+++ b/4.5.2/0000_README
@@ -2,11 +2,11 @@ README
-----------------------------------------------------------------------------
Individual Patch Descriptions:
-----------------------------------------------------------------------------
-Patch: 1007_linux-4.4.8.patch
+Patch: 1001_linux-4.5.2.patch
From: http://www.kernel.org
-Desc: Linux 4.4.8
+Desc: Linux 4.5.2
-Patch: 4420_grsecurity-3.1-4.4.8-201604252206.patch
+Patch: 4420_grsecurity-3.1-4.5.2-201604282058.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/4.4.8/1007_linux-4.4.8.patch b/4.5.2/1001_linux-4.5.2.patch
index e8c236b..2c2064e 100644
--- a/4.4.8/1007_linux-4.4.8.patch
+++ b/4.5.2/1001_linux-4.5.2.patch
@@ -22,10 +22,10 @@ index 08a4a32..0326154 100644
trstn
tdi
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 742f69d..0e4102a 100644
+index 9a53c92..21e4b48 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
-@@ -3928,6 +3928,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+@@ -4016,6 +4016,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
sector if the number is odd);
i = IGNORE_DEVICE (don't bind to this
device);
@@ -35,17 +35,35 @@ index 742f69d..0e4102a 100644
unlock ejectable media);
m = MAX_SECTORS_64 (don't transfer more
diff --git a/Makefile b/Makefile
-index 5a493e7..1928fcd 100644
+index c621889..1ecaaeb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
VERSION = 4
- PATCHLEVEL = 4
--SUBLEVEL = 7
-+SUBLEVEL = 8
+ PATCHLEVEL = 5
+-SUBLEVEL = 1
++SUBLEVEL = 2
EXTRAVERSION =
NAME = Blurry Fish Butt
+diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
+index 7d0cba6f..c86ea8a 100644
+--- a/arch/arm/kernel/setup.c
++++ b/arch/arm/kernel/setup.c
+@@ -430,11 +430,13 @@ static void __init patch_aeabi_idiv(void)
+ pr_info("CPU: div instructions available: patching division code\n");
+
+ fn_addr = ((uintptr_t)&__aeabi_uidiv) & ~1;
++ asm ("" : "+g" (fn_addr));
+ ((u32 *)fn_addr)[0] = udiv_instruction();
+ ((u32 *)fn_addr)[1] = bx_lr_instruction();
+ flush_icache_range(fn_addr, fn_addr + 8);
+
+ fn_addr = ((uintptr_t)&__aeabi_idiv) & ~1;
++ asm ("" : "+g" (fn_addr));
+ ((u32 *)fn_addr)[0] = sdiv_instruction();
+ ((u32 *)fn_addr)[1] = bx_lr_instruction();
+ flush_icache_range(fn_addr, fn_addr + 8);
diff --git a/arch/arm64/include/asm/opcodes.h b/arch/arm64/include/asm/opcodes.h
index 4e603ea..123f45d 100644
--- a/arch/arm64/include/asm/opcodes.h
@@ -57,7 +75,7 @@ index 4e603ea..123f45d 100644
+
#include <../../arm/include/asm/opcodes.h>
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
-index 8aee3ae..c1492ba 100644
+index c536c9e..0931155 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -186,20 +186,21 @@ static void clear_regs_spsr_ss(struct pt_regs *regs)
@@ -177,7 +195,7 @@ index bdeed9d..433c4b9 100644
irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW);
diff --git a/arch/mips/alchemy/devboards/db1550.c b/arch/mips/alchemy/devboards/db1550.c
-index 5740bcf..6c37b93 100644
+index b518f02..1c01d6e 100644
--- a/arch/mips/alchemy/devboards/db1550.c
+++ b/arch/mips/alchemy/devboards/db1550.c
@@ -514,7 +514,7 @@ static void __init db1550_devices(void)
@@ -268,6 +286,60 @@ index 490cea5..5c62065 100644
break;
case msa_st_op:
+diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
+index 14f655c..86ed376 100644
+--- a/arch/parisc/Kconfig
++++ b/arch/parisc/Kconfig
+@@ -29,6 +29,7 @@ config PARISC
+ select TTY # Needed for pdc_cons.c
+ select HAVE_DEBUG_STACKOVERFLOW
+ select HAVE_ARCH_AUDITSYSCALL
++ select HAVE_ARCH_SECCOMP_FILTER
+ select ARCH_NO_COHERENT_DMA_MMAP
+
+ help
+diff --git a/arch/parisc/include/asm/compat.h b/arch/parisc/include/asm/compat.h
+index 0448a2c..3387307 100644
+--- a/arch/parisc/include/asm/compat.h
++++ b/arch/parisc/include/asm/compat.h
+@@ -183,6 +183,13 @@ typedef struct compat_siginfo {
+ int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
+ int _fd;
+ } _sigpoll;
++
++ /* SIGSYS */
++ struct {
++ compat_uptr_t _call_addr; /* calling user insn */
++ int _syscall; /* triggering system call number */
++ compat_uint_t _arch; /* AUDIT_ARCH_* of syscall */
++ } _sigsys;
+ } _sifields;
+ } compat_siginfo_t;
+
+diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h
+index a5eba95..637ce8d 100644
+--- a/arch/parisc/include/asm/syscall.h
++++ b/arch/parisc/include/asm/syscall.h
+@@ -39,6 +39,19 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
+ }
+ }
+
++static inline void syscall_set_return_value(struct task_struct *task,
++ struct pt_regs *regs,
++ int error, long val)
++{
++ regs->gr[28] = error ? error : val;
++}
++
++static inline void syscall_rollback(struct task_struct *task,
++ struct pt_regs *regs)
++{
++ /* do nothing */
++}
++
+ static inline int syscall_get_arch(void)
+ {
+ int arch = AUDIT_ARCH_PARISC;
diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h
index 0abdd4c..1960b87 100644
--- a/arch/parisc/include/asm/uaccess.h
@@ -313,6 +385,69 @@ index 568b2c6..3cad8aa 100644
EXPORT_SYMBOL(fixup_get_user_skip_1);
EXPORT_SYMBOL(fixup_get_user_skip_2);
EXPORT_SYMBOL(fixup_put_user_skip_1);
+diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
+index ce0b2b4..8fb81a3 100644
+--- a/arch/parisc/kernel/ptrace.c
++++ b/arch/parisc/kernel/ptrace.c
+@@ -270,7 +270,8 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
+ long do_syscall_trace_enter(struct pt_regs *regs)
+ {
+ /* Do the secure computing check first. */
+- secure_computing_strict(regs->gr[20]);
++ if (secure_computing() == -1)
++ return -1;
+
+ if (test_thread_flag(TIF_SYSCALL_TRACE) &&
+ tracehook_report_syscall_entry(regs)) {
+@@ -296,7 +297,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
+ regs->gr[23] & 0xffffffff);
+
+ out:
+- return regs->gr[20];
++ /*
++ * Sign extend the syscall number to 64bit since it may have been
++ * modified by a compat ptrace call
++ */
++ return (int) ((u32) regs->gr[20]);
+ }
+
+ void do_syscall_trace_exit(struct pt_regs *regs)
+diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c
+index 984abbe..c342b2e 100644
+--- a/arch/parisc/kernel/signal32.c
++++ b/arch/parisc/kernel/signal32.c
+@@ -371,6 +371,11 @@ copy_siginfo_to_user32 (compat_siginfo_t __user *to, const siginfo_t *from)
+ val = (compat_int_t)from->si_int;
+ err |= __put_user(val, &to->si_int);
+ break;
++ case __SI_SYS >> 16:
++ err |= __put_user(ptr_to_compat(from->si_call_addr), &to->si_call_addr);
++ err |= __put_user(from->si_syscall, &to->si_syscall);
++ err |= __put_user(from->si_arch, &to->si_arch);
++ break;
+ }
+ }
+ return err;
+diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
+index fbafa0d..c976ebf 100644
+--- a/arch/parisc/kernel/syscall.S
++++ b/arch/parisc/kernel/syscall.S
+@@ -329,6 +329,7 @@ tracesys_next:
+
+ ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */
+ LDREG TI_TASK(%r1), %r1
++ LDREG TASK_PT_GR28(%r1), %r28 /* Restore return value */
+ LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */
+ LDREG TASK_PT_GR25(%r1), %r25
+ LDREG TASK_PT_GR24(%r1), %r24
+@@ -342,6 +343,7 @@ tracesys_next:
+ stw %r21, -56(%r30) /* 6th argument */
+ #endif
+
++ cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */
+ comiclr,>>= __NR_Linux_syscalls, %r20, %r0
+ b,n .Ltracesys_nosys
+
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 553b098..77e2262 100644
--- a/arch/parisc/kernel/traps.c
@@ -371,11 +506,24 @@ index a762864..f906444 100644
d->fault_space = regs->isr;
d->fault_addr = regs->ior;
+diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
+index 3c5736e..54ed9c7 100644
+--- a/arch/powerpc/kernel/process.c
++++ b/arch/powerpc/kernel/process.c
+@@ -854,7 +854,7 @@ void restore_tm_state(struct pt_regs *regs)
+ static inline void save_sprs(struct thread_struct *t)
+ {
+ #ifdef CONFIG_ALTIVEC
+- if (cpu_has_feature(cpu_has_feature(CPU_FTR_ALTIVEC)))
++ if (cpu_has_feature(CPU_FTR_ALTIVEC))
+ t->vrsave = mfspr(SPRN_VRSAVE);
+ #endif
+ #ifdef CONFIG_PPC_BOOK3S_64
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
-index 9833fee..807f159 100644
+index 744e24b..4a811ca 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
-@@ -486,13 +486,13 @@ static void hugepd_free(struct mmu_gather *tlb, void *hugepte)
+@@ -414,13 +414,13 @@ static void hugepd_free(struct mmu_gather *tlb, void *hugepte)
{
struct hugepd_freelist **batchp;
@@ -391,11 +539,43 @@ index 9833fee..807f159 100644
return;
}
+diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c
+index 13dab0c..3776aca 100644
+--- a/arch/s390/mm/gup.c
++++ b/arch/s390/mm/gup.c
+@@ -20,9 +20,9 @@
+ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
+ unsigned long end, int write, struct page **pages, int *nr)
+ {
++ struct page *head, *page;
+ unsigned long mask;
+ pte_t *ptep, pte;
+- struct page *page;
+
+ mask = (write ? _PAGE_PROTECT : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
+
+@@ -37,12 +37,14 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
+ return 0;
+ VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+ page = pte_page(pte);
+- if (!page_cache_get_speculative(page))
++ head = compound_head(page);
++ if (!page_cache_get_speculative(head))
+ return 0;
+ if (unlikely(pte_val(pte) != pte_val(*ptep))) {
+- put_page(page);
++ put_page(head);
+ return 0;
+ }
++ VM_BUG_ON_PAGE(compound_head(page) != head, page);
+ pages[*nr] = page;
+ (*nr)++;
+
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
-index 30cfd64..9d2abb2 100644
+index 44adbb8..f8dba20 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
-@@ -41,7 +41,7 @@
+@@ -42,7 +42,7 @@
#define KVM_PIO_PAGE_OFFSET 1
#define KVM_COALESCED_MMIO_PAGE_OFFSET 2
@@ -404,24 +584,11 @@ index 30cfd64..9d2abb2 100644
#define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS
-diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
-index fa1195d..164e3f8 100644
---- a/arch/x86/include/asm/pci_x86.h
-+++ b/arch/x86/include/asm/pci_x86.h
-@@ -93,6 +93,8 @@ extern raw_spinlock_t pci_config_lock;
- extern int (*pcibios_enable_irq)(struct pci_dev *dev);
- extern void (*pcibios_disable_irq)(struct pci_dev *dev);
-
-+extern bool mp_should_keep_irq(struct device *dev);
-+
- struct pci_raw_ops {
- int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn,
- int reg, int len, u32 *val);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index 8bfc5fc..7eb4ebd 100644
+index d47d231..eca5bd9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
-@@ -6024,12 +6024,10 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, bool req_int_win)
+@@ -6074,12 +6074,10 @@ static int inject_pending_event(struct kvm_vcpu *vcpu, bool req_int_win)
}
/* try to inject new event if pending */
@@ -438,7 +605,7 @@ index 8bfc5fc..7eb4ebd 100644
} else if (kvm_cpu_has_injectable_intr(vcpu)) {
/*
* Because interrupts can be injected asynchronously, we are
-@@ -6474,10 +6472,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
+@@ -6548,10 +6546,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
if (inject_pending_event(vcpu, req_int_win) != 0)
req_immediate_exit = true;
/* enable NMI/IRQ window open exits if needed */
@@ -455,128 +622,6 @@ index 8bfc5fc..7eb4ebd 100644
if (kvm_lapic_enabled(vcpu)) {
update_cr8_intercept(vcpu);
-diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
-index eccd4d9..8fd6f44 100644
---- a/arch/x86/pci/common.c
-+++ b/arch/x86/pci/common.c
-@@ -673,28 +673,22 @@ int pcibios_add_device(struct pci_dev *dev)
- return 0;
- }
-
--int pcibios_alloc_irq(struct pci_dev *dev)
-+int pcibios_enable_device(struct pci_dev *dev, int mask)
- {
-- /*
-- * If the PCI device was already claimed by core code and has
-- * MSI enabled, probing of the pcibios IRQ will overwrite
-- * dev->irq. So bail out if MSI is already enabled.
-- */
-- if (pci_dev_msi_enabled(dev))
-- return -EBUSY;
-+ int err;
-
-- return pcibios_enable_irq(dev);
--}
-+ if ((err = pci_enable_resources(dev, mask)) < 0)
-+ return err;
-
--void pcibios_free_irq(struct pci_dev *dev)
--{
-- if (pcibios_disable_irq)
-- pcibios_disable_irq(dev);
-+ if (!pci_dev_msi_enabled(dev))
-+ return pcibios_enable_irq(dev);
-+ return 0;
- }
-
--int pcibios_enable_device(struct pci_dev *dev, int mask)
-+void pcibios_disable_device (struct pci_dev *dev)
- {
-- return pci_enable_resources(dev, mask);
-+ if (!pci_dev_msi_enabled(dev) && pcibios_disable_irq)
-+ pcibios_disable_irq(dev);
- }
-
- int pci_ext_cfg_avail(void)
-diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
-index 0d24e7c..8b93e63 100644
---- a/arch/x86/pci/intel_mid_pci.c
-+++ b/arch/x86/pci/intel_mid_pci.c
-@@ -215,7 +215,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
- int polarity;
- int ret;
-
-- if (pci_has_managed_irq(dev))
-+ if (dev->irq_managed && dev->irq > 0)
- return 0;
-
- switch (intel_mid_identify_cpu()) {
-@@ -256,13 +256,10 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
-
- static void intel_mid_pci_irq_disable(struct pci_dev *dev)
- {
-- if (pci_has_managed_irq(dev)) {
-+ if (!mp_should_keep_irq(&dev->dev) && dev->irq_managed &&
-+ dev->irq > 0) {
- mp_unmap_irq(dev->irq);
- dev->irq_managed = 0;
-- /*
-- * Don't reset dev->irq here, otherwise
-- * intel_mid_pci_irq_enable() will fail on next call.
-- */
- }
- }
-
-diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
-index 32e7034..9bd1154 100644
---- a/arch/x86/pci/irq.c
-+++ b/arch/x86/pci/irq.c
-@@ -1202,7 +1202,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
- struct pci_dev *temp_dev;
- int irq;
-
-- if (pci_has_managed_irq(dev))
-+ if (dev->irq_managed && dev->irq > 0)
- return 0;
-
- irq = IO_APIC_get_PCI_irq_vector(dev->bus->number,
-@@ -1230,7 +1230,8 @@ static int pirq_enable_irq(struct pci_dev *dev)
- }
- dev = temp_dev;
- if (irq >= 0) {
-- pci_set_managed_irq(dev, irq);
-+ dev->irq_managed = 1;
-+ dev->irq = irq;
- dev_info(&dev->dev, "PCI->APIC IRQ transform: "
- "INT %c -> IRQ %d\n", 'A' + pin - 1, irq);
- return 0;
-@@ -1256,10 +1257,24 @@ static int pirq_enable_irq(struct pci_dev *dev)
- return 0;
- }
-
-+bool mp_should_keep_irq(struct device *dev)
-+{
-+ if (dev->power.is_prepared)
-+ return true;
-+#ifdef CONFIG_PM
-+ if (dev->power.runtime_status == RPM_SUSPENDING)
-+ return true;
-+#endif
-+
-+ return false;
-+}
-+
- static void pirq_disable_irq(struct pci_dev *dev)
- {
-- if (io_apic_assign_pci_irqs && pci_has_managed_irq(dev)) {
-+ if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) &&
-+ dev->irq_managed && dev->irq) {
- mp_unmap_irq(dev->irq);
-- pci_reset_managed_irq(dev);
-+ dev->irq = 0;
-+ dev->irq_managed = 0;
- }
- }
diff --git a/crypto/asymmetric_keys/pkcs7_trust.c b/crypto/asymmetric_keys/pkcs7_trust.c
index 90d6d47..ecdb5a2 100644
--- a/crypto/asymmetric_keys/pkcs7_trust.c
@@ -590,58 +635,8 @@ index 90d6d47..ecdb5a2 100644
for (p = pkcs7->certs; p; p = p->next)
p->seen = false;
-diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
-index c933675..8a10a7a 100644
---- a/drivers/acpi/pci_irq.c
-+++ b/drivers/acpi/pci_irq.c
-@@ -409,7 +409,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
- return 0;
- }
-
-- if (pci_has_managed_irq(dev))
-+ if (dev->irq_managed && dev->irq > 0)
- return 0;
-
- entry = acpi_pci_irq_lookup(dev, pin);
-@@ -454,7 +454,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
- kfree(entry);
- return rc;
- }
-- pci_set_managed_irq(dev, rc);
-+ dev->irq = rc;
-+ dev->irq_managed = 1;
-
- if (link)
- snprintf(link_desc, sizeof(link_desc), " -> Link[%s]", link);
-@@ -477,9 +478,17 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
- u8 pin;
-
- pin = dev->pin;
-- if (!pin || !pci_has_managed_irq(dev))
-+ if (!pin || !dev->irq_managed || dev->irq <= 0)
- return;
-
-+ /* Keep IOAPIC pin configuration when suspending */
-+ if (dev->dev.power.is_prepared)
-+ return;
-+#ifdef CONFIG_PM
-+ if (dev->dev.power.runtime_status == RPM_SUSPENDING)
-+ return;
-+#endif
-+
- entry = acpi_pci_irq_lookup(dev, pin);
- if (!entry)
- return;
-@@ -499,6 +508,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
- dev_dbg(&dev->dev, "PCI INT %c disabled\n", pin_name(pin));
- if (gsi >= 0) {
- acpi_unregister_gsi(gsi);
-- pci_reset_managed_irq(dev);
-+ dev->irq_managed = 0;
- }
- }
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
-index 81ea69f..fbdddd6 100644
+index 4a87678..9745cf9 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1955,7 +1955,7 @@ static struct ceph_osd_request *rbd_osd_req_create(
@@ -671,11 +666,89 @@ index 81ea69f..fbdddd6 100644
if (!obj_request->bio_list)
goto out_unwind;
} else if (type == OBJ_REQUEST_PAGES) {
+diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
+index 99b375c..90c1511 100644
+--- a/drivers/gpio/gpio-pca953x.c
++++ b/drivers/gpio/gpio-pca953x.c
+@@ -18,6 +18,7 @@
+ #include <linux/i2c.h>
+ #include <linux/platform_data/pca953x.h>
+ #include <linux/slab.h>
++#include <asm/unaligned.h>
+ #include <linux/of_platform.h>
+ #include <linux/acpi.h>
+
+@@ -159,7 +160,7 @@ static int pca953x_write_regs(struct pca953x_chip *chip, int reg, u8 *val)
+ switch (chip->chip_type) {
+ case PCA953X_TYPE:
+ ret = i2c_smbus_write_word_data(chip->client,
+- reg << 1, (u16) *val);
++ reg << 1, cpu_to_le16(get_unaligned((u16 *)val)));
+ break;
+ case PCA957X_TYPE:
+ ret = i2c_smbus_write_byte_data(chip->client, reg << 1,
+diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
+index b2b7b78..76ac906 100644
+--- a/drivers/gpio/gpio-pxa.c
++++ b/drivers/gpio/gpio-pxa.c
+@@ -283,8 +283,8 @@ static int pxa_gpio_direction_output(struct gpio_chip *chip,
+ writel_relaxed(mask, base + (value ? GPSR_OFFSET : GPCR_OFFSET));
+
+ ret = pinctrl_gpio_direction_output(chip->base + offset);
+- if (!ret)
+- return 0;
++ if (ret)
++ return ret;
+
+ spin_lock_irqsave(&gpio_lock, flags);
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+index 7a4b101..75cb5b9 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+@@ -816,10 +816,13 @@ static int amdgpu_cgs_get_active_displays_info(void *cgs_device,
+ struct drm_device *ddev = adev->ddev;
+ struct drm_crtc *crtc;
+ uint32_t line_time_us, vblank_lines;
++ struct cgs_mode_info *mode_info;
+
+ if (info == NULL)
+ return -EINVAL;
+
++ mode_info = info->mode_info;
++
+ if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) {
+ list_for_each_entry(crtc,
+ &ddev->mode_config.crtc_list, head) {
+@@ -828,7 +831,7 @@ static int amdgpu_cgs_get_active_displays_info(void *cgs_device,
+ info->active_display_mask |= (1 << amdgpu_crtc->crtc_id);
+ info->display_count++;
+ }
+- if (info->mode_info != NULL &&
++ if (mode_info != NULL &&
+ crtc->enabled && amdgpu_crtc->enabled &&
+ amdgpu_crtc->hw_mode.clock) {
+ line_time_us = (amdgpu_crtc->hw_mode.crtc_htotal * 1000) /
+@@ -836,10 +839,10 @@ static int amdgpu_cgs_get_active_displays_info(void *cgs_device,
+ vblank_lines = amdgpu_crtc->hw_mode.crtc_vblank_end -
+ amdgpu_crtc->hw_mode.crtc_vdisplay +
+ (amdgpu_crtc->v_border * 2);
+- info->mode_info->vblank_time_us = vblank_lines * line_time_us;
+- info->mode_info->refresh_rate = drm_mode_vrefresh(&amdgpu_crtc->hw_mode);
+- info->mode_info->ref_clock = adev->clock.spll.reference_freq;
+- info->mode_info++;
++ mode_info->vblank_time_us = vblank_lines * line_time_us;
++ mode_info->refresh_rate = drm_mode_vrefresh(&amdgpu_crtc->hw_mode);
++ mode_info->ref_clock = adev->clock.spll.reference_freq;
++ mode_info = NULL;
+ }
+ }
+ }
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
-index 272110c..ea87033 100644
+index b806079..53964b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
-@@ -898,14 +898,6 @@ static int gmc_v7_0_early_init(void *handle)
+@@ -902,14 +902,6 @@ static int gmc_v7_0_early_init(void *handle)
gmc_v7_0_set_gart_funcs(adev);
gmc_v7_0_set_irq_funcs(adev);
@@ -690,7 +763,7 @@ index 272110c..ea87033 100644
return 0;
}
-@@ -926,6 +918,14 @@ static int gmc_v7_0_sw_init(void *handle)
+@@ -930,6 +922,14 @@ static int gmc_v7_0_sw_init(void *handle)
if (r)
return r;
@@ -706,10 +779,10 @@ index 272110c..ea87033 100644
if (r)
return r;
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
-index ba4ad00..0842308 100644
+index 3efd455..e59251f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
-@@ -852,14 +852,6 @@ static int gmc_v8_0_early_init(void *handle)
+@@ -856,14 +856,6 @@ static int gmc_v8_0_early_init(void *handle)
gmc_v8_0_set_gart_funcs(adev);
gmc_v8_0_set_irq_funcs(adev);
@@ -724,7 +797,7 @@ index ba4ad00..0842308 100644
return 0;
}
-@@ -870,6 +862,8 @@ static int gmc_v8_0_late_init(void *handle)
+@@ -874,6 +866,8 @@ static int gmc_v8_0_late_init(void *handle)
return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0);
}
@@ -733,7 +806,7 @@ index ba4ad00..0842308 100644
static int gmc_v8_0_sw_init(void *handle)
{
int r;
-@@ -880,6 +874,19 @@ static int gmc_v8_0_sw_init(void *handle)
+@@ -884,6 +878,19 @@ static int gmc_v8_0_sw_init(void *handle)
if (r)
return r;
@@ -875,10 +948,10 @@ index a82b891..7285adb 100644
if (rps->vce_active) {
rps->evclk = rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].evclk;
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
-index 62c7b1d..73e41a8 100644
+index 200419d..18a2acb 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
-@@ -539,7 +539,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
+@@ -538,7 +538,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
out_destroy_fbi:
drm_fb_helper_release_fbi(helper);
out_gfree:
@@ -901,7 +974,7 @@ index 2a0a784..d7528e0 100644
return 0;
}
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
-index 5dd426f..0df32fe 100644
+index ad71160..ae83af6 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -951,14 +951,6 @@ static int usbhid_output_report(struct hid_device *hid, __u8 *buf, size_t count)
@@ -1029,10 +1102,10 @@ index 5dd426f..0df32fe 100644
if (status >= 0 && hid->driver && hid->driver->reset_resume) {
int ret = hid->driver->reset_resume(hid);
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
-index 01a4f05..3c0f47a 100644
+index 99ef77f..94a8875 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
-@@ -2493,6 +2493,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
+@@ -2409,6 +2409,17 @@ void wacom_setup_device_quirks(struct wacom *wacom)
}
/*
@@ -1075,7 +1148,7 @@ index 36544c4..303d0c9 100644
sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group);
sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
-index 2d33f1e..291c61a 100644
+index c73331f7..2072a31 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -547,7 +547,7 @@ static int bmc150_accel_get_axis(struct bmc150_accel_data *data,
@@ -1113,7 +1186,7 @@ index 2d33f1e..291c61a 100644
.event_spec = &bmc150_accel_event, \
.num_event_specs = 1 \
diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c
-index 02ff789..acb3b30 100644
+index bbce3b0..4dac567 100644
--- a/drivers/iio/gyro/bmg160_core.c
+++ b/drivers/iio/gyro/bmg160_core.c
@@ -452,7 +452,7 @@ static int bmg160_get_temp(struct bmg160_data *data, int *val)
@@ -1160,6 +1233,18 @@ index 02ff789..acb3b30 100644
}
mutex_unlock(&data->mutex);
+diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
+index 139ae91..5b6abc5 100644
+--- a/drivers/iio/industrialio-buffer.c
++++ b/drivers/iio/industrialio-buffer.c
+@@ -645,6 +645,7 @@ static int iio_verify_update(struct iio_dev *indio_dev,
+ unsigned int modes;
+
+ memset(config, 0, sizeof(*config));
++ config->watermark = ~0;
+
+ /*
+ * If there is just one buffer and we are removing it there is nothing
diff --git a/drivers/iio/magnetometer/st_magn.h b/drivers/iio/magnetometer/st_magn.h
index 06a4d9c..9daca46 100644
--- a/drivers/iio/magnetometer/st_magn.h
@@ -1187,10 +1272,10 @@ index 0e3b009..515bb8b 100644
ret = iommu_group_add_device(group, dev);
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
-index 15516a6..323aad3 100644
+index 2d782ce..7ae89c6 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
-@@ -2119,14 +2119,12 @@ static int coda_probe(struct platform_device *pdev)
+@@ -2118,14 +2118,12 @@ static int coda_probe(struct platform_device *pdev)
pdev_id = of_id ? of_id->data : platform_get_device_id(pdev);
@@ -1222,10 +1307,10 @@ index 6310aca..d41ae95 100644
vsp1_sru_write(sru, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5);
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
-index 0934024..d91ded7 100644
+index 9e29e70..d898880 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
-@@ -159,7 +159,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
+@@ -192,7 +192,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
Set the status so poll routines can check and avoid
access after disconnect.
*/
@@ -1257,7 +1342,7 @@ index b0f0679..3d6687f 100644
au8522_rc_clear(ir, 0xe0, 1 << 4);
}
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
-index 45c622e..7b2fe1b 100644
+index a136257..8bc69af 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -104,14 +104,13 @@ static inline void print_err_status(struct au0828_dev *dev,
@@ -1289,7 +1374,7 @@ index 45c622e..7b2fe1b 100644
return 0;
if (urb->status < 0) {
-@@ -766,10 +765,10 @@ static int au0828_stream_interrupt(struct au0828_dev *dev)
+@@ -822,10 +821,10 @@ static int au0828_stream_interrupt(struct au0828_dev *dev)
int ret = 0;
dev->stream_state = STREAM_INTERRUPT;
@@ -1302,7 +1387,7 @@ index 45c622e..7b2fe1b 100644
dprintk(1, "%s device is misconfigured!\n", __func__);
return ret;
}
-@@ -958,7 +957,7 @@ static int au0828_v4l2_open(struct file *filp)
+@@ -1014,7 +1013,7 @@ static int au0828_v4l2_open(struct file *filp)
int ret;
dprintk(1,
@@ -1311,7 +1396,7 @@ index 45c622e..7b2fe1b 100644
__func__, dev->std_set_in_tuner_core, dev->dev_state,
dev->streaming_users, dev->users);
-@@ -977,7 +976,7 @@ static int au0828_v4l2_open(struct file *filp)
+@@ -1033,7 +1032,7 @@ static int au0828_v4l2_open(struct file *filp)
au0828_analog_stream_enable(dev);
au0828_analog_stream_reset(dev);
dev->stream_state = STREAM_OFF;
@@ -1320,7 +1405,7 @@ index 45c622e..7b2fe1b 100644
}
dev->users++;
mutex_unlock(&dev->lock);
-@@ -991,7 +990,7 @@ static int au0828_v4l2_close(struct file *filp)
+@@ -1047,7 +1046,7 @@ static int au0828_v4l2_close(struct file *filp)
struct video_device *vdev = video_devdata(filp);
dprintk(1,
@@ -1329,7 +1414,7 @@ index 45c622e..7b2fe1b 100644
__func__, dev->std_set_in_tuner_core, dev->dev_state,
dev->streaming_users, dev->users);
-@@ -1007,7 +1006,7 @@ static int au0828_v4l2_close(struct file *filp)
+@@ -1063,7 +1062,7 @@ static int au0828_v4l2_close(struct file *filp)
del_timer_sync(&dev->vbi_timeout);
}
@@ -1338,7 +1423,7 @@ index 45c622e..7b2fe1b 100644
goto end;
if (dev->users == 1) {
-@@ -1036,7 +1035,7 @@ static void au0828_init_tuner(struct au0828_dev *dev)
+@@ -1092,7 +1091,7 @@ static void au0828_init_tuner(struct au0828_dev *dev)
.type = V4L2_TUNER_ANALOG_TV,
};
@@ -1347,7 +1432,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
if (dev->std_set_in_tuner_core)
-@@ -1108,7 +1107,7 @@ static int vidioc_querycap(struct file *file, void *priv,
+@@ -1164,7 +1163,7 @@ static int vidioc_querycap(struct file *file, void *priv,
struct video_device *vdev = video_devdata(file);
struct au0828_dev *dev = video_drvdata(file);
@@ -1356,7 +1441,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
strlcpy(cap->driver, "au0828", sizeof(cap->driver));
-@@ -1151,7 +1150,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
+@@ -1207,7 +1206,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1365,7 +1450,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
f->fmt.pix.width = dev->width;
-@@ -1170,7 +1169,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
+@@ -1226,7 +1225,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1374,7 +1459,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
return au0828_set_format(dev, VIDIOC_TRY_FMT, f);
-@@ -1182,7 +1181,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
+@@ -1238,7 +1237,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
struct au0828_dev *dev = video_drvdata(file);
int rc;
@@ -1383,7 +1468,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
rc = check_dev(dev);
-@@ -1204,7 +1203,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
+@@ -1260,7 +1259,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1392,7 +1477,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
if (norm == dev->std)
-@@ -1236,7 +1235,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
+@@ -1292,7 +1291,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1401,7 +1486,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
*norm = dev->std;
-@@ -1259,7 +1258,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
+@@ -1315,7 +1314,7 @@ static int vidioc_enum_input(struct file *file, void *priv,
[AU0828_VMUX_DEBUG] = "tv debug"
};
@@ -1410,7 +1495,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
tmp = input->index;
-@@ -1289,7 +1288,7 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
+@@ -1345,7 +1344,7 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1419,7 +1504,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
*i = dev->ctrl_input;
-@@ -1300,7 +1299,7 @@ static void au0828_s_input(struct au0828_dev *dev, int index)
+@@ -1356,7 +1355,7 @@ static void au0828_s_input(struct au0828_dev *dev, int index)
{
int i;
@@ -1428,7 +1513,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
switch (AUVI_INPUT(index).type) {
-@@ -1385,7 +1384,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
+@@ -1441,7 +1440,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1437,7 +1522,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
a->index = dev->ctrl_ainput;
-@@ -1405,7 +1404,7 @@ static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio
+@@ -1461,7 +1460,7 @@ static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio
if (a->index != dev->ctrl_ainput)
return -EINVAL;
@@ -1446,7 +1531,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
return 0;
}
-@@ -1417,7 +1416,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
+@@ -1473,7 +1472,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
if (t->index != 0)
return -EINVAL;
@@ -1455,7 +1540,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
strcpy(t->name, "Auvitek tuner");
-@@ -1437,7 +1436,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
+@@ -1493,7 +1492,7 @@ static int vidioc_s_tuner(struct file *file, void *priv,
if (t->index != 0)
return -EINVAL;
@@ -1464,7 +1549,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
au0828_init_tuner(dev);
-@@ -1459,7 +1458,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
+@@ -1515,7 +1514,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
if (freq->tuner != 0)
return -EINVAL;
@@ -1473,7 +1558,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
freq->frequency = dev->ctrl_freq;
return 0;
-@@ -1474,7 +1473,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
+@@ -1530,7 +1529,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
if (freq->tuner != 0)
return -EINVAL;
@@ -1482,7 +1567,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
au0828_init_tuner(dev);
-@@ -1500,7 +1499,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
+@@ -1556,7 +1555,7 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1491,7 +1576,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
format->fmt.vbi.samples_per_line = dev->vbi_width;
-@@ -1526,7 +1525,7 @@ static int vidioc_cropcap(struct file *file, void *priv,
+@@ -1582,7 +1581,7 @@ static int vidioc_cropcap(struct file *file, void *priv,
if (cc->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
@@ -1500,7 +1585,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
cc->bounds.left = 0;
-@@ -1548,7 +1547,7 @@ static int vidioc_g_register(struct file *file, void *priv,
+@@ -1604,7 +1603,7 @@ static int vidioc_g_register(struct file *file, void *priv,
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1509,7 +1594,7 @@ index 45c622e..7b2fe1b 100644
dev->std_set_in_tuner_core, dev->dev_state);
reg->val = au0828_read(dev, reg->reg);
-@@ -1561,7 +1560,7 @@ static int vidioc_s_register(struct file *file, void *priv,
+@@ -1617,7 +1616,7 @@ static int vidioc_s_register(struct file *file, void *priv,
{
struct au0828_dev *dev = video_drvdata(file);
@@ -1519,7 +1604,7 @@ index 45c622e..7b2fe1b 100644
return au0828_writereg(dev, reg->reg, reg->val);
diff --git a/drivers/media/usb/au0828/au0828.h b/drivers/media/usb/au0828/au0828.h
-index 60b5939..d1b6405a 100644
+index 8276072..b28a05d 100644
--- a/drivers/media/usb/au0828/au0828.h
+++ b/drivers/media/usb/au0828/au0828.h
@@ -21,6 +21,7 @@
@@ -1552,37 +1637,8 @@ index 60b5939..d1b6405a 100644
enum au0828_stream_state stream_state;
wait_queue_head_t open;
-diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
-index b693206..d1dc1a1 100644
---- a/drivers/media/usb/usbvision/usbvision-video.c
-+++ b/drivers/media/usb/usbvision/usbvision-video.c
-@@ -1463,9 +1463,23 @@ static int usbvision_probe(struct usb_interface *intf,
-
- if (usbvision_device_data[model].interface >= 0)
- interface = &dev->actconfig->interface[usbvision_device_data[model].interface]->altsetting[0];
-- else
-+ else if (ifnum < dev->actconfig->desc.bNumInterfaces)
- interface = &dev->actconfig->interface[ifnum]->altsetting[0];
-+ else {
-+ dev_err(&intf->dev, "interface %d is invalid, max is %d\n",
-+ ifnum, dev->actconfig->desc.bNumInterfaces - 1);
-+ ret = -ENODEV;
-+ goto err_usb;
-+ }
-+
-+ if (interface->desc.bNumEndpoints < 2) {
-+ dev_err(&intf->dev, "interface %d has %d endpoints, but must"
-+ " have minimum 2\n", ifnum, interface->desc.bNumEndpoints);
-+ ret = -ENODEV;
-+ goto err_usb;
-+ }
- endpoint = &interface->endpoint[1].desc;
-+
- if (!usb_endpoint_xfer_isoc(endpoint)) {
- dev_err(&intf->dev, "%s: interface %d. has non-ISO endpoint!\n",
- __func__, ifnum);
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
-index 45ee07d..6101548 100644
+index df3b8ec..a04d0f7 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -390,6 +390,7 @@ static int byt_sd_probe_slot(struct sdhci_pci_slot *slot)
@@ -1638,11 +1694,142 @@ index d1a0b4d..89e7151 100644
#define PCI_DEVICE_ID_INTEL_APL_SD 0x5aca
#define PCI_DEVICE_ID_INTEL_APL_EMMC 0x5acc
#define PCI_DEVICE_ID_INTEL_APL_SDIO 0x5ad0
+diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
+index c7f27fe..452bf500 100644
+--- a/drivers/mmc/host/sdhci-pxav3.c
++++ b/drivers/mmc/host/sdhci-pxav3.c
+@@ -309,8 +309,30 @@ static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs)
+ __func__, uhs, ctrl_2);
+ }
+
++static void pxav3_set_power(struct sdhci_host *host, unsigned char mode,
++ unsigned short vdd)
++{
++ struct mmc_host *mmc = host->mmc;
++ u8 pwr = host->pwr;
++
++ sdhci_set_power(host, mode, vdd);
++
++ if (host->pwr == pwr)
++ return;
++
++ if (host->pwr == 0)
++ vdd = 0;
++
++ if (!IS_ERR(mmc->supply.vmmc)) {
++ spin_unlock_irq(&host->lock);
++ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
++ spin_lock_irq(&host->lock);
++ }
++}
++
+ static const struct sdhci_ops pxav3_sdhci_ops = {
+ .set_clock = sdhci_set_clock,
++ .set_power = pxav3_set_power,
+ .platform_send_init_74_clocks = pxav3_gen_init_74_clocks,
+ .get_max_clock = sdhci_pltfm_clk_get_max_clock,
+ .set_bus_width = sdhci_set_bus_width,
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
+index 8059d72..6d485b5 100644
+--- a/drivers/mmc/host/sdhci.c
++++ b/drivers/mmc/host/sdhci.c
+@@ -1250,10 +1250,24 @@ clock_set:
+ }
+ EXPORT_SYMBOL_GPL(sdhci_set_clock);
+
+-static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
+- unsigned short vdd)
++static void sdhci_set_power_reg(struct sdhci_host *host, unsigned char mode,
++ unsigned short vdd)
+ {
+ struct mmc_host *mmc = host->mmc;
++
++ spin_unlock_irq(&host->lock);
++ mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
++ spin_lock_irq(&host->lock);
++
++ if (mode != MMC_POWER_OFF)
++ sdhci_writeb(host, SDHCI_POWER_ON, SDHCI_POWER_CONTROL);
++ else
++ sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
++}
++
++void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
++ unsigned short vdd)
++{
+ u8 pwr = 0;
+
+ if (mode != MMC_POWER_OFF) {
+@@ -1285,7 +1299,6 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
+ sdhci_writeb(host, 0, SDHCI_POWER_CONTROL);
+ if (host->quirks2 & SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON)
+ sdhci_runtime_pm_bus_off(host);
+- vdd = 0;
+ } else {
+ /*
+ * Spec says that we should clear the power reg before setting
+@@ -1316,12 +1329,20 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
+ if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER)
+ mdelay(10);
+ }
++}
++EXPORT_SYMBOL_GPL(sdhci_set_power);
+
+- if (!IS_ERR(mmc->supply.vmmc)) {
+- spin_unlock_irq(&host->lock);
+- mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd);
+- spin_lock_irq(&host->lock);
+- }
++static void __sdhci_set_power(struct sdhci_host *host, unsigned char mode,
++ unsigned short vdd)
++{
++ struct mmc_host *mmc = host->mmc;
++
++ if (host->ops->set_power)
++ host->ops->set_power(host, mode, vdd);
++ else if (!IS_ERR(mmc->supply.vmmc))
++ sdhci_set_power_reg(host, mode, vdd);
++ else
++ sdhci_set_power(host, mode, vdd);
+ }
+
+ /*****************************************************************************\
+@@ -1471,7 +1492,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
+ }
+ }
+
+- sdhci_set_power(host, ios->power_mode, ios->vdd);
++ __sdhci_set_power(host, ios->power_mode, ios->vdd);
+
+ if (host->ops->platform_send_init_74_clocks)
+ host->ops->platform_send_init_74_clocks(host, ios->power_mode);
+diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
+index 0115e99..033d72b 100644
+--- a/drivers/mmc/host/sdhci.h
++++ b/drivers/mmc/host/sdhci.h
+@@ -529,6 +529,8 @@ struct sdhci_ops {
+ #endif
+
+ void (*set_clock)(struct sdhci_host *host, unsigned int clock);
++ void (*set_power)(struct sdhci_host *host, unsigned char mode,
++ unsigned short vdd);
+
+ int (*enable_dma)(struct sdhci_host *host);
+ unsigned int (*get_max_clock)(struct sdhci_host *host);
+@@ -660,6 +662,8 @@ static inline bool sdhci_sdio_irq_enabled(struct sdhci_host *host)
+ }
+
+ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock);
++void sdhci_set_power(struct sdhci_host *host, unsigned char mode,
++ unsigned short vdd);
+ void sdhci_set_bus_width(struct sdhci_host *host, int width);
+ void sdhci_reset(struct sdhci_host *host, u8 mask);
+ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
-index 28bbca0..b3d70a7 100644
+index b7f1a99..5ec8195 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
-@@ -3260,6 +3260,30 @@ static int bond_close(struct net_device *bond_dev)
+@@ -3308,6 +3308,30 @@ static int bond_close(struct net_device *bond_dev)
return 0;
}
@@ -1673,7 +1860,7 @@ index 28bbca0..b3d70a7 100644
static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
struct rtnl_link_stats64 *stats)
{
-@@ -3268,43 +3292,23 @@ static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
+@@ -3316,43 +3340,23 @@ static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
struct list_head *iter;
struct slave *slave;
@@ -1727,7 +1914,7 @@ index 28bbca0..b3d70a7 100644
return stats;
}
-@@ -4118,6 +4122,7 @@ void bond_setup(struct net_device *bond_dev)
+@@ -4166,6 +4170,7 @@ void bond_setup(struct net_device *bond_dev)
struct bonding *bond = netdev_priv(bond_dev);
spin_lock_init(&bond->mode_lock);
@@ -1736,7 +1923,7 @@ index 28bbca0..b3d70a7 100644
/* Initialize pointers */
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-index 17f017a..0fb3f8d 100644
+index d7e01a7..6746fd0 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -1197,7 +1197,7 @@ static unsigned int __bcmgenet_tx_reclaim(struct net_device *dev,
@@ -1757,31 +1944,46 @@ index 17f017a..0fb3f8d 100644
length_status = (skb_len << DMA_BUFLENGTH_SHIFT) | dma_desc_flags |
(priv->hw_params->qtag_mask << DMA_TX_QTAG_SHIFT) |
DMA_TX_APPEND_CRC;
-diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c
-index 060dd39..973dade 100644
---- a/drivers/net/ethernet/jme.c
-+++ b/drivers/net/ethernet/jme.c
-@@ -3312,13 +3312,14 @@ jme_resume(struct device *dev)
- jme_reset_phy_processor(jme);
- jme_phy_calibration(jme);
- jme_phy_setEA(jme);
-- jme_start_irq(jme);
- netif_device_attach(netdev);
-
- atomic_inc(&jme->link_changing);
-
- jme_reset_link(jme);
-
-+ jme_start_irq(jme);
+diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
+index acb1c5b..2ee05ce 100644
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -3070,17 +3070,17 @@ static int mvneta_stop(struct net_device *dev)
+ struct mvneta_port *pp = netdev_priv(dev);
+
+ /* Inform that we are stopping so we don't want to setup the
+- * driver for new CPUs in the notifiers
++ * driver for new CPUs in the notifiers. The code of the
++ * notifier for CPU online is protected by the same spinlock,
++ * so when we get the lock, the notifer work is done.
+ */
+ spin_lock(&pp->lock);
+ pp->is_stopped = true;
++ spin_unlock(&pp->lock);
+
- return 0;
- }
+ mvneta_stop_dev(pp);
+ mvneta_mdio_remove(pp);
+ unregister_cpu_notifier(&pp->cpu_notifier);
+- /* Now that the notifier are unregistered, we can release le
+- * lock
+- */
+- spin_unlock(&pp->lock);
+ on_each_cpu(mvneta_percpu_disable, pp, true);
+ free_percpu_irq(dev->irq, pp->ports);
+ mvneta_cleanup_rxqs(pp);
+@@ -3612,6 +3612,7 @@ static int mvneta_probe(struct platform_device *pdev)
+ dev->ethtool_ops = &mvneta_eth_tool_ops;
+
+ pp = netdev_priv(dev);
++ spin_lock_init(&pp->lock);
+ pp->phy_node = phy_node;
+ pp->phy_interface = phy_mode;
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
-index cad6c44..d314d96 100644
+index 25ce1b0..cd9b2b2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
-@@ -3132,7 +3132,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
+@@ -3141,7 +3141,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
case QP_TRANS_RTS2RTS:
case QP_TRANS_SQD2SQD:
case QP_TRANS_SQD2RTS:
@@ -1790,7 +1992,7 @@ index cad6c44..d314d96 100644
if (optpar & MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH) {
port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB)
-@@ -3151,6 +3151,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
+@@ -3160,6 +3160,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
if (qp_ctx->alt_path.mgid_index >= num_gids)
return -EINVAL;
}
@@ -1799,10 +2001,10 @@ index cad6c44..d314d96 100644
default:
break;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
-index 4365c8b..605f641 100644
+index 3b89ed2..65a115f 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
-@@ -61,6 +61,8 @@ struct mlxsw_sp {
+@@ -118,6 +118,8 @@ struct mlxsw_sp {
#define MLXSW_SP_DEFAULT_LEARNING_INTERVAL 100
unsigned int interval; /* ms */
} fdb_notify;
@@ -1810,12 +2012,12 @@ index 4365c8b..605f641 100644
+#define MLXSW_SP_MAX_AGEING_TIME 1000000
#define MLXSW_SP_DEFAULT_AGEING_TIME 300
u32 ageing_time;
- struct {
+ struct mlxsw_sp_upper master_bridge;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
-index 7dbeafa..d4c4c2b 100644
+index 7b56098..e1c74ef 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
-@@ -232,8 +232,13 @@ static int mlxsw_sp_port_attr_br_ageing_set(struct mlxsw_sp_port *mlxsw_sp_port,
+@@ -311,8 +311,13 @@ static int mlxsw_sp_port_attr_br_ageing_set(struct mlxsw_sp_port *mlxsw_sp_port,
unsigned long ageing_jiffies = clock_t_to_jiffies(ageing_clock_t);
u32 ageing_time = jiffies_to_msecs(ageing_jiffies) / 1000;
@@ -1972,24 +2174,11 @@ index 9979764..b28e73e 100644
skb = new_skb;
/* Frame error, so drop the packet. */
-diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
-index 689a4a5..1ef0393 100644
---- a/drivers/net/ethernet/qualcomm/qca_spi.c
-+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
-@@ -811,7 +811,7 @@ qcaspi_netdev_setup(struct net_device *dev)
- dev->netdev_ops = &qcaspi_netdev_ops;
- qcaspi_set_ethtool_ops(dev);
- dev->watchdog_timeo = QCASPI_TX_TIMEOUT;
-- dev->flags = IFF_MULTICAST;
-+ dev->priv_flags &= ~IFF_TX_SKB_SHARING;
- dev->tx_queue_len = 100;
-
- qca = netdev_priv(dev);
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 6a8fc0f..36fc942 100644
+index 7384499..01f6d5b 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1185,11 +1185,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
+@@ -1136,11 +1136,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
break;
sh_eth_set_receive_align(skb);
@@ -1997,33 +2186,33 @@ index 6a8fc0f..36fc942 100644
- rxdesc = &mdp->rx_ring[i];
/* The size of the buffer is a multiple of 32 bytes. */
buf_len = ALIGN(mdp->rx_buf_sz, 32);
-- rxdesc->len = cpu_to_edmac(mdp, buf_len << 16);
+- rxdesc->len = cpu_to_le32(buf_len << 16);
dma_addr = dma_map_single(&ndev->dev, skb->data, buf_len,
DMA_FROM_DEVICE);
if (dma_mapping_error(&ndev->dev, dma_addr)) {
-@@ -1197,6 +1194,10 @@ static void sh_eth_ring_format(struct net_device *ndev)
+@@ -1148,6 +1145,10 @@ static void sh_eth_ring_format(struct net_device *ndev)
break;
}
mdp->rx_skbuff[i] = skb;
+
+ /* RX descriptor */
+ rxdesc = &mdp->rx_ring[i];
-+ rxdesc->len = cpu_to_edmac(mdp, buf_len << 16);
- rxdesc->addr = cpu_to_edmac(mdp, dma_addr);
- rxdesc->status = cpu_to_edmac(mdp, RD_RACT | RD_RFP);
++ rxdesc->len = cpu_to_le32(buf_len << 16);
+ rxdesc->addr = cpu_to_le32(dma_addr);
+ rxdesc->status = cpu_to_le32(RD_RACT | RD_RFP);
-@@ -1212,7 +1213,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
+@@ -1163,7 +1164,8 @@ static void sh_eth_ring_format(struct net_device *ndev)
mdp->dirty_rx = (u32) (i - mdp->num_rx_ring);
/* Mark the last entry as wrapping the ring. */
-- rxdesc->status |= cpu_to_edmac(mdp, RD_RDLE);
+- rxdesc->status |= cpu_to_le32(RD_RDLE);
+ if (rxdesc)
-+ rxdesc->status |= cpu_to_edmac(mdp, RD_RDLE);
++ rxdesc->status |= cpu_to_le32(RD_RDLE);
memset(mdp->tx_ring, 0, tx_ringsize);
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
-index 52ec3d6..2b34622 100644
+index 166a7fc..f39e719 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -239,6 +239,7 @@ struct rocker {
@@ -2071,7 +2260,7 @@ index 52ec3d6..2b34622 100644
if (err) {
dev_err(&pdev->dev, "failed to probe ports\n");
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
-index 0fc5219..159a687 100644
+index d636d05..95394ed 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -760,6 +760,8 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
@@ -2099,10 +2288,10 @@ index 0fc5219..159a687 100644
skb = macvtap_alloc_skb(&q->sk, MACVTAP_RESERVE, copylen,
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
-index 9a863c6..174e06e 100644
+index d61da9ec..aafe237 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
-@@ -567,7 +567,7 @@ static int get_filter(void __user *arg, struct sock_filter **p)
+@@ -575,7 +575,7 @@ static int get_filter(void __user *arg, struct sock_filter **p)
static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
@@ -2111,7 +2300,7 @@ index 9a863c6..174e06e 100644
struct ppp *ppp;
int err = -EFAULT, val, val2, i;
struct ppp_idle idle;
-@@ -577,9 +577,14 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+@@ -585,9 +585,14 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
void __user *argp = (void __user *)arg;
int __user *p = argp;
@@ -2129,7 +2318,7 @@ index 9a863c6..174e06e 100644
if (cmd == PPPIOCDETACH) {
/*
-@@ -594,7 +599,6 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+@@ -602,7 +607,6 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
* this fd and reopening /dev/ppp.
*/
err = -EINVAL;
@@ -2137,7 +2326,7 @@ index 9a863c6..174e06e 100644
if (pf->kind == INTERFACE) {
ppp = PF_TO_PPP(pf);
rtnl_lock();
-@@ -608,15 +612,13 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+@@ -616,15 +620,13 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
} else
pr_warn("PPPIOCDETACH file->f_count=%ld\n",
atomic_long_read(&file->f_count));
@@ -2154,7 +2343,7 @@ index 9a863c6..174e06e 100644
pch = PF_TO_CHANNEL(pf);
switch (cmd) {
-@@ -638,17 +640,16 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+@@ -646,17 +648,16 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
err = chan->ops->ioctl(chan, cmd, arg);
up_read(&pch->chan_sem);
}
@@ -2175,7 +2364,7 @@ index 9a863c6..174e06e 100644
ppp = PF_TO_PPP(pf);
switch (cmd) {
case PPPIOCSMRU:
-@@ -823,7 +824,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+@@ -831,7 +832,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
default:
err = -ENOTTY;
}
@@ -2186,7 +2375,7 @@ index 9a863c6..174e06e 100644
return err;
}
-@@ -836,7 +840,6 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
+@@ -844,7 +848,6 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
struct ppp_net *pn;
int __user *p = (int __user *)arg;
@@ -2194,7 +2383,7 @@ index 9a863c6..174e06e 100644
switch (cmd) {
case PPPIOCNEWUNIT:
/* Create a new ppp unit */
-@@ -886,7 +889,7 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
+@@ -894,7 +897,7 @@ static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf,
default:
err = -ENOTTY;
}
@@ -2203,7 +2392,7 @@ index 9a863c6..174e06e 100644
return err;
}
-@@ -2290,7 +2293,7 @@ int ppp_register_net_channel(struct net *net, struct ppp_channel *chan)
+@@ -2304,7 +2307,7 @@ int ppp_register_net_channel(struct net *net, struct ppp_channel *chan)
pch->ppp = NULL;
pch->chan = chan;
@@ -2212,7 +2401,7 @@ index 9a863c6..174e06e 100644
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
pch->file.hdrlen = chan->hdrlen;
-@@ -2387,6 +2390,8 @@ ppp_unregister_channel(struct ppp_channel *chan)
+@@ -2401,6 +2404,8 @@ ppp_unregister_channel(struct ppp_channel *chan)
spin_lock_bh(&pn->all_channels_lock);
list_del(&pch->list);
spin_unlock_bh(&pn->all_channels_lock);
@@ -2221,16 +2410,8 @@ index 9a863c6..174e06e 100644
pch->file.dead = 1;
wake_up_interruptible(&pch->file.rwait);
-@@ -2803,6 +2808,7 @@ static struct ppp *ppp_create_interface(struct net *net, int unit,
-
- out2:
- mutex_unlock(&pn->all_ppp_mutex);
-+ rtnl_unlock();
- free_netdev(dev);
- out1:
- *retp = ret;
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
-index f0db770..2d186bd 100644
+index 88bb8cc..81ecc2e 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -621,7 +621,8 @@ static int tun_attach(struct tun_struct *tun, struct file *file, bool skip_filte
@@ -2259,7 +2440,7 @@ index f0db770..2d186bd 100644
break;
}
}
-@@ -1463,6 +1462,8 @@ static void tun_setup(struct net_device *dev)
+@@ -1466,6 +1465,8 @@ static void tun_setup(struct net_device *dev)
dev->ethtool_ops = &tun_ethtool_ops;
dev->destructor = tun_free_netdev;
@@ -2268,7 +2449,7 @@ index f0db770..2d186bd 100644
}
/* Trivial set of netlink ops to allow deleting tun or tap
-@@ -1804,7 +1805,7 @@ static void tun_detach_filter(struct tun_struct *tun, int n)
+@@ -1807,7 +1808,7 @@ static void tun_detach_filter(struct tun_struct *tun, int n)
for (i = 0; i < n; i++) {
tfile = rtnl_dereference(tun->tfiles[i]);
@@ -2277,7 +2458,7 @@ index f0db770..2d186bd 100644
}
tun->filter_attached = false;
-@@ -1817,7 +1818,8 @@ static int tun_attach_filter(struct tun_struct *tun)
+@@ -1820,7 +1821,8 @@ static int tun_attach_filter(struct tun_struct *tun)
for (i = 0; i < tun->numqueues; i++) {
tfile = rtnl_dereference(tun->tfiles[i]);
@@ -2287,54 +2468,11 @@ index f0db770..2d186bd 100644
if (ret) {
tun_detach_filter(tun, i);
return ret;
-diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
-index 3da70bf..7cba2c3 100644
---- a/drivers/net/usb/cdc_ether.c
-+++ b/drivers/net/usb/cdc_ether.c
-@@ -160,6 +160,12 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
- info->u = header.usb_cdc_union_desc;
- info->header = header.usb_cdc_header_desc;
- info->ether = header.usb_cdc_ether_desc;
-+ if (!info->u) {
-+ if (rndis)
-+ goto skip;
-+ else /* in that case a quirk is mandatory */
-+ goto bad_desc;
-+ }
- /* we need a master/control interface (what we're
- * probed with) and a slave/data interface; union
- * descriptors sort this all out.
-@@ -256,7 +262,7 @@ skip:
- goto bad_desc;
- }
-
-- } else if (!info->header || !info->u || (!rndis && !info->ether)) {
-+ } else if (!info->header || (!rndis && !info->ether)) {
- dev_dbg(&intf->dev, "missing cdc %s%s%sdescriptor\n",
- info->header ? "" : "header ",
- info->u ? "" : "union ",
-diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
-index e8a1144..8c2bb77 100644
---- a/drivers/net/usb/cdc_ncm.c
-+++ b/drivers/net/usb/cdc_ncm.c
-@@ -794,7 +794,11 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
-
- iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber;
-
-- /* reset data interface */
-+ /* Reset data interface. Some devices will not reset properly
-+ * unless they are configured first. Toggle the altsetting to
-+ * force a reset
-+ */
-+ usb_set_interface(dev->udev, iface_no, data_altsetting);
- temp = usb_set_interface(dev->udev, iface_no, 0);
- if (temp) {
- dev_dbg(&intf->dev, "set interface failed\n");
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
-index 982e0acd..a34f491 100644
+index a3a4ccf..1232a8c6 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
-@@ -699,6 +699,7 @@ static const struct usb_device_id products[] = {
+@@ -844,6 +844,7 @@ static const struct usb_device_id products[] = {
{QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */
{QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
{QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */
@@ -2342,86 +2480,6 @@ index 982e0acd..a34f491 100644
{QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
{QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
{QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
-@@ -718,8 +719,10 @@ static const struct usb_device_id products[] = {
- {QMI_FIXED_INTF(0x1199, 0x9061, 8)}, /* Sierra Wireless Modem */
- {QMI_FIXED_INTF(0x1199, 0x9070, 8)}, /* Sierra Wireless MC74xx/EM74xx */
- {QMI_FIXED_INTF(0x1199, 0x9070, 10)}, /* Sierra Wireless MC74xx/EM74xx */
-- {QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx/EM74xx */
-- {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx/EM74xx */
-+ {QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx */
-+ {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx */
-+ {QMI_FIXED_INTF(0x1199, 0x9079, 8)}, /* Sierra Wireless EM74xx */
-+ {QMI_FIXED_INTF(0x1199, 0x9079, 10)}, /* Sierra Wireless EM74xx */
- {QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
- {QMI_FIXED_INTF(0x1bbb, 0x0203, 2)}, /* Alcatel L800MA */
- {QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
-diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
-index 0744bf2..c2ea4e5 100644
---- a/drivers/net/usb/usbnet.c
-+++ b/drivers/net/usb/usbnet.c
-@@ -1766,6 +1766,13 @@ out3:
- if (info->unbind)
- info->unbind (dev, udev);
- out1:
-+ /* subdrivers must undo all they did in bind() if they
-+ * fail it, but we may fail later and a deferred kevent
-+ * may trigger an error resubmitting itself and, worse,
-+ * schedule a timer. So we kill it all just in case.
-+ */
-+ cancel_work_sync(&dev->kevent);
-+ del_timer_sync(&dev->delay);
- free_netdev(net);
- out:
- return status;
-diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
-index 0a242b2..903bda4 100644
---- a/drivers/net/vrf.c
-+++ b/drivers/net/vrf.c
-@@ -114,20 +114,23 @@ static struct dst_ops vrf_dst_ops = {
- #if IS_ENABLED(CONFIG_IPV6)
- static bool check_ipv6_frame(const struct sk_buff *skb)
- {
-- const struct ipv6hdr *ipv6h = (struct ipv6hdr *)skb->data;
-- size_t hlen = sizeof(*ipv6h);
-+ const struct ipv6hdr *ipv6h;
-+ struct ipv6hdr _ipv6h;
- bool rc = true;
-
-- if (skb->len < hlen)
-+ ipv6h = skb_header_pointer(skb, 0, sizeof(_ipv6h), &_ipv6h);
-+ if (!ipv6h)
- goto out;
-
- if (ipv6h->nexthdr == NEXTHDR_ICMP) {
- const struct icmp6hdr *icmph;
-+ struct icmp6hdr _icmph;
-
-- if (skb->len < hlen + sizeof(*icmph))
-+ icmph = skb_header_pointer(skb, sizeof(_ipv6h),
-+ sizeof(_icmph), &_icmph);
-+ if (!icmph)
- goto out;
-
-- icmph = (struct icmp6hdr *)(skb->data + sizeof(*ipv6h));
- switch (icmph->icmp6_type) {
- case NDISC_ROUTER_SOLICITATION:
- case NDISC_ROUTER_ADVERTISEMENT:
-diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
-index e0fcda4..3c0df70 100644
---- a/drivers/net/vxlan.c
-+++ b/drivers/net/vxlan.c
-@@ -1306,8 +1306,10 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
- gbp = (struct vxlanhdr_gbp *)vxh;
- md->gbp = ntohs(gbp->policy_id);
-
-- if (tun_dst)
-+ if (tun_dst) {
- tun_dst->u.tun_info.key.tun_flags |= TUNNEL_VXLAN_OPT;
-+ tun_dst->u.tun_info.options_len = sizeof(*md);
-+ }
-
- if (gbp->dont_learn)
- md->gbp |= VXLAN_GBP_DONT_LEARN;
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 44541dbc..69b994f 100644
--- a/drivers/net/wan/farsync.c
@@ -2436,10 +2494,10 @@ index 44541dbc..69b994f 100644
dev->irq = card->irq;
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
-index cc81482..113a43f 100644
+index 73fb423..a794157 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
-@@ -403,10 +403,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
+@@ -477,10 +477,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
if (match) {
if (AR_SREV_9287(ah)) {
@@ -2451,7 +2509,7 @@ index cc81482..113a43f 100644
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
data_9287[idxL].pwrPdg[i],
data_9287[idxL].vpdPdg[i],
-@@ -416,7 +415,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
+@@ -490,7 +489,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
} else if (eeprom_4k) {
for (i = 0; i < numXpdGains; i++) {
minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
@@ -2460,7 +2518,7 @@ index cc81482..113a43f 100644
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
data_4k[idxL].pwrPdg[i],
data_4k[idxL].vpdPdg[i],
-@@ -426,7 +425,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
+@@ -500,7 +499,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
} else {
for (i = 0; i < numXpdGains; i++) {
minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
@@ -2470,7 +2528,7 @@ index cc81482..113a43f 100644
data_def[idxL].pwrPdg[i],
data_def[idxL].vpdPdg[i],
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
-index 496b9b6..5f47356 100644
+index 576eb70..cdbab06 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -335,7 +335,7 @@ static const struct nd_cmd_desc __nd_cmd_dimm_descs[] = {
@@ -2483,10 +2541,10 @@ index 496b9b6..5f47356 100644
[ND_CMD_SMART_THRESHOLD] = {
.out_num = 2,
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c
-index 71805a1..9d39745 100644
+index ae81a2f..f0b56b3 100644
--- a/drivers/nvdimm/pfn_devs.c
+++ b/drivers/nvdimm/pfn_devs.c
-@@ -275,7 +275,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn)
+@@ -315,7 +315,7 @@ int nd_pfn_validate(struct nd_pfn *nd_pfn)
} else {
/* from init we validate */
if (memcmp(nd_pfn->uuid, pfn_sb->uuid, 16) != 0)
@@ -2494,7 +2552,7 @@ index 71805a1..9d39745 100644
+ return -ENODEV;
}
- /*
+ if (nd_pfn->align > nvdimm_namespace_capacity(ndns)) {
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
index 4c2fa05..944674e 100644
--- a/drivers/pcmcia/db1xxx_ss.c
@@ -2566,10 +2624,10 @@ index a5bb939..1029aa7 100644
imx_pinctrl_desc.name = dev_name(&pdev->dev);
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
-index eebfae0..f844b4a 100644
+index 3524061..c8969dd 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
-@@ -995,7 +995,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
+@@ -990,7 +990,7 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
int val;
if (pull)
@@ -2579,7 +2637,7 @@ index eebfae0..f844b4a 100644
seq_printf(s, " gpio-%-3d (%-20.20s) in %s %s",
gpio,
diff --git a/drivers/pinctrl/pinctrl-pistachio.c b/drivers/pinctrl/pinctrl-pistachio.c
-index 85c9046..6b1a47f 100644
+index 856f736..2673cd9 100644
--- a/drivers/pinctrl/pinctrl-pistachio.c
+++ b/drivers/pinctrl/pinctrl-pistachio.c
@@ -469,27 +469,27 @@ static const char * const pistachio_mips_pll_lock_groups[] = {
@@ -2676,7 +2734,7 @@ index 00265f0..8b381d6 100644
static int sun8i_a33_pinctrl_probe(struct platform_device *pdev)
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
-index dead97d..a4a5b50 100644
+index 7a2465f..884c2b3 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -578,7 +578,7 @@ static void sunxi_pinctrl_irq_release_resources(struct irq_data *d)
@@ -2808,8 +2866,23 @@ index e248e81..0afce1a 100644
}
static inline u32 sunxi_irq_status_offset(u16 irq)
+diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
+index b1bf42b..1deb6ad 100644
+--- a/drivers/scsi/scsi.c
++++ b/drivers/scsi/scsi.c
+@@ -784,8 +784,9 @@ void scsi_attach_vpd(struct scsi_device *sdev)
+ int pg83_supported = 0;
+ unsigned char __rcu *vpd_buf, *orig_vpd_buf = NULL;
+
+- if (sdev->skip_vpd_pages)
++ if (!scsi_device_supports_vpd(sdev))
+ return;
++
+ retry_pg0:
+ vpd_buf = kmalloc(vpd_len, GFP_KERNEL);
+ if (!vpd_buf)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
-index cc84ea7..0d7c6e8 100644
+index 5a5457a..974ca5b 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1275,18 +1275,19 @@ static int sd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
@@ -2853,10 +2926,27 @@ index cc84ea7..0d7c6e8 100644
blk_queue_physical_block_size(sdp->request_queue,
sdkp->physical_block_size);
sdkp->device->sector_size = sector_size;
-@@ -2812,11 +2805,6 @@ static int sd_try_extended_inquiry(struct scsi_device *sdp)
- return 0;
+@@ -2795,28 +2788,6 @@ static void sd_read_write_same(struct scsi_disk *sdkp, unsigned char *buffer)
+ sdkp->ws10 = 1;
}
+-static int sd_try_extended_inquiry(struct scsi_device *sdp)
+-{
+- /* Attempt VPD inquiry if the device blacklist explicitly calls
+- * for it.
+- */
+- if (sdp->try_vpd_pages)
+- return 1;
+- /*
+- * Although VPD inquiries can go to SCSI-2 type devices,
+- * some USB ones crash on receiving them, and the pages
+- * we currently ask for are for SPC-3 and beyond
+- */
+- if (sdp->scsi_level > SCSI_SPC_2 && !sdp->skip_vpd_pages)
+- return 1;
+- return 0;
+-}
+-
-static inline u32 logical_to_sectors(struct scsi_device *sdev, u32 blocks)
-{
- return blocks << (ilog2(sdev->sector_size) - 9);
@@ -2865,7 +2955,16 @@ index cc84ea7..0d7c6e8 100644
/**
* sd_revalidate_disk - called the first time a new disk is seen,
* performs disk spin up, read_capacity, etc.
-@@ -2900,7 +2888,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
+@@ -2856,7 +2827,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
+ if (sdkp->media_present) {
+ sd_read_capacity(sdkp, buffer);
+
+- if (sd_try_extended_inquiry(sdp)) {
++ if (scsi_device_supports_vpd(sdp)) {
+ sd_read_block_provisioning(sdkp);
+ sd_read_block_limits(sdkp);
+ sd_read_block_characteristics(sdkp);
+@@ -2900,7 +2871,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
/* Combine with controller limits */
q->limits.max_sectors = min(rw_max, queue_max_hw_sectors(q));
@@ -2915,32 +3014,6 @@ index e237e9f..df56021 100644
mutex_lock(&dev->buffer_lock);
ion_buffer_add(dev, buffer);
mutex_unlock(&dev->buffer_lock);
-diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
-index 2a27488..84df093 100644
---- a/drivers/usb/core/hub.c
-+++ b/drivers/usb/core/hub.c
-@@ -5392,6 +5392,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev)
- }
-
- bos = udev->bos;
-+ udev->bos = NULL;
-
- for (i = 0; i < SET_CONFIG_TRIES; ++i) {
-
-@@ -5484,11 +5485,8 @@ done:
- usb_set_usb2_hardware_lpm(udev, 1);
- usb_unlocked_enable_lpm(udev);
- usb_enable_ltm(udev);
-- /* release the new BOS descriptor allocated by hub_port_init() */
-- if (udev->bos != bos) {
-- usb_release_bos_descriptor(udev);
-- udev->bos = bos;
-- }
-+ usb_release_bos_descriptor(udev);
-+ udev->bos = bos;
- return 0;
-
- re_enumerate:
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index c0f5c65..f1893e0 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
@@ -2964,7 +3037,7 @@ index c0f5c65..f1893e0 100644
schedule_work(&pkt->work);
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
-index 8f7a78e..fa14198 100644
+index 657f967..2510535 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -158,10 +158,14 @@ static void usbhsg_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
@@ -2984,7 +3057,7 @@ index 8f7a78e..fa14198 100644
static void usbhsg_queue_push(struct usbhsg_uep *uep,
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
-index ce0cd6e..9baf081 100644
+index c90a7e4..e4ade8d 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -2,7 +2,7 @@
@@ -3085,7 +3158,7 @@ index 43576ed..9de988a 100644
f |= US_FL_NOT_LOCKABLE;
break;
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
-index 8e5cf19..4469202 100644
+index 7760fc1..1f413a2 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -17,6 +17,7 @@
@@ -3162,10 +3235,10 @@ index 524c221..4436778 100644
}
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
-index 0f09526..5e5db36 100644
+index 098bb8f..9a30ca6 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
-@@ -1885,7 +1885,7 @@ static int start_ordered_ops(struct inode *inode, loff_t start, loff_t end)
+@@ -1883,7 +1883,7 @@ static int start_ordered_ops(struct inode *inode, loff_t start, loff_t end)
*/
int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
{
@@ -3175,10 +3248,10 @@ index 0f09526..5e5db36 100644
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_trans_handle *trans;
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
-index 323e12c..0e044d7 100644
+index 978c3a8..849a30a 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
-@@ -4406,6 +4406,127 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans,
+@@ -4414,6 +4414,127 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans,
return ret;
}
@@ -3306,7 +3379,7 @@ index 323e12c..0e044d7 100644
/* log a single inode in the tree log.
* At least one parent directory for this inode must exist in the tree
* or be logged already.
-@@ -4578,6 +4699,22 @@ again:
+@@ -4586,6 +4707,22 @@ again:
if (min_key.type == BTRFS_INODE_ITEM_KEY)
need_log_inode_item = false;
@@ -3330,10 +3403,10 @@ index 323e12c..0e044d7 100644
if (min_key.type == BTRFS_XATTR_ITEM_KEY) {
if (ins_nr == 0)
diff --git a/fs/dcache.c b/fs/dcache.c
-index 877bcbb..18effa3 100644
+index 2398f9f9..7566b26 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
-@@ -1666,7 +1666,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
+@@ -1667,7 +1667,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
DCACHE_OP_REVALIDATE |
DCACHE_OP_WEAK_REVALIDATE |
DCACHE_OP_DELETE |
@@ -3343,7 +3416,7 @@ index 877bcbb..18effa3 100644
dentry->d_op = op;
if (!op)
return;
-@@ -1684,6 +1685,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
+@@ -1685,6 +1686,8 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
dentry->d_flags |= DCACHE_OP_PRUNE;
if (op->d_select_inode)
dentry->d_flags |= DCACHE_OP_SELECT_INODE;
@@ -3352,11 +3425,44 @@ index 877bcbb..18effa3 100644
}
EXPORT_SYMBOL(d_set_d_op);
+diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c
+index 38f7562..ecb5439 100644
+--- a/fs/ext4/crypto.c
++++ b/fs/ext4/crypto.c
+@@ -475,13 +475,16 @@ uint32_t ext4_validate_encryption_key_size(uint32_t mode, uint32_t size)
+ */
+ static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags)
+ {
+- struct inode *dir = d_inode(dentry->d_parent);
+- struct ext4_crypt_info *ci = EXT4_I(dir)->i_crypt_info;
++ struct dentry *dir;
++ struct ext4_crypt_info *ci;
+ int dir_has_key, cached_with_key;
+
+- if (!ext4_encrypted_inode(dir))
++ dir = dget_parent(dentry);
++ if (!ext4_encrypted_inode(d_inode(dir))) {
++ dput(dir);
+ return 0;
+-
++ }
++ ci = EXT4_I(d_inode(dir))->i_crypt_info;
+ if (ci && ci->ci_keyring_key &&
+ (ci->ci_keyring_key->flags & ((1 << KEY_FLAG_INVALIDATED) |
+ (1 << KEY_FLAG_REVOKED) |
+@@ -491,6 +494,7 @@ static int ext4_d_revalidate(struct dentry *dentry, unsigned int flags)
+ /* this should eventually be an flag in d_flags */
+ cached_with_key = dentry->d_fsdata != NULL;
+ dir_has_key = (ci != NULL);
++ dput(dir);
+
+ /*
+ * If the dentry was cached without the key, and it is a
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
-index cc7ca4e..d4156e1 100644
+index 157b458a..b213449 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
-@@ -850,6 +850,29 @@ do { \
+@@ -900,6 +900,29 @@ do { \
#include "extents_status.h"
/*
@@ -3386,8 +3492,43 @@ index cc7ca4e..d4156e1 100644
* fourth extended file system inode data in memory
*/
struct ext4_inode_info {
+diff --git a/fs/ext4/file.c b/fs/ext4/file.c
+index 4cd318f..38847f3 100644
+--- a/fs/ext4/file.c
++++ b/fs/ext4/file.c
+@@ -335,7 +335,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
+ struct super_block *sb = inode->i_sb;
+ struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
+ struct vfsmount *mnt = filp->f_path.mnt;
+- struct inode *dir = filp->f_path.dentry->d_parent->d_inode;
++ struct dentry *dir;
+ struct path path;
+ char buf[64], *cp;
+ int ret;
+@@ -379,14 +379,18 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
+ if (ext4_encryption_info(inode) == NULL)
+ return -ENOKEY;
+ }
+- if (ext4_encrypted_inode(dir) &&
+- !ext4_is_child_context_consistent_with_parent(dir, inode)) {
++
++ dir = dget_parent(file_dentry(filp));
++ if (ext4_encrypted_inode(d_inode(dir)) &&
++ !ext4_is_child_context_consistent_with_parent(d_inode(dir), inode)) {
+ ext4_warning(inode->i_sb,
+ "Inconsistent encryption contexts: %lu/%lu\n",
+- (unsigned long) dir->i_ino,
++ (unsigned long) d_inode(dir)->i_ino,
+ (unsigned long) inode->i_ino);
++ dput(dir);
+ return -EPERM;
+ }
++ dput(dir);
+ /*
+ * Set up the jbd2_inode if we are opening the inode for
+ * writing and the journal is present
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
-index e032a04..9bdbf98 100644
+index 4098acc..796ff0e 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -60,10 +60,10 @@ ext4_double_down_write_data_sem(struct inode *first, struct inode *second)
@@ -3403,7 +3544,7 @@ index e032a04..9bdbf98 100644
}
}
-@@ -483,6 +483,13 @@ mext_check_arguments(struct inode *orig_inode,
+@@ -484,6 +484,13 @@ mext_check_arguments(struct inode *orig_inode,
return -EBUSY;
}
@@ -3418,10 +3559,10 @@ index e032a04..9bdbf98 100644
if (!(ext4_test_inode_flag(orig_inode, EXT4_INODE_EXTENTS))) {
ext4_debug("ext4 move extent: orig file is not extents "
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
-index c9ab67d..ba1cf0b 100644
+index 3ed01ec..a76ca67 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
-@@ -1292,9 +1292,9 @@ static int set_qf_name(struct super_block *sb, int qtype, substring_t *args)
+@@ -1324,9 +1324,9 @@ static int set_qf_name(struct super_block *sb, int qtype, substring_t *args)
return -1;
}
if (ext4_has_feature_quota(sb)) {
@@ -3434,7 +3575,7 @@ index c9ab67d..ba1cf0b 100644
}
qname = match_strdup(args);
if (!qname) {
-@@ -1657,10 +1657,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
+@@ -1689,10 +1689,10 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
return -1;
}
if (ext4_has_feature_quota(sb)) {
@@ -3448,7 +3589,7 @@ index c9ab67d..ba1cf0b 100644
}
sbi->s_jquota_fmt = m->mount_opt;
#endif
-@@ -1721,11 +1721,11 @@ static int parse_options(char *options, struct super_block *sb,
+@@ -1753,11 +1753,11 @@ static int parse_options(char *options, struct super_block *sb,
#ifdef CONFIG_QUOTA
if (ext4_has_feature_quota(sb) &&
(test_opt(sb, USRQUOTA) || test_opt(sb, GRPQUOTA))) {
@@ -3465,7 +3606,7 @@ index c9ab67d..ba1cf0b 100644
if (test_opt(sb, USRQUOTA) && sbi->s_qf_names[USRQUOTA])
clear_opt(sb, USRQUOTA);
-@@ -4936,6 +4936,20 @@ static int ext4_quota_on_mount(struct super_block *sb, int type)
+@@ -5021,6 +5021,20 @@ static int ext4_quota_on_mount(struct super_block *sb, int type)
EXT4_SB(sb)->s_jquota_fmt, type);
}
@@ -3486,7 +3627,7 @@ index c9ab67d..ba1cf0b 100644
/*
* Standard function to be called on quota_on
*/
-@@ -4975,8 +4989,12 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
+@@ -5060,8 +5074,12 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
if (err)
return err;
}
@@ -3501,7 +3642,7 @@ index c9ab67d..ba1cf0b 100644
}
static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
-@@ -5002,8 +5020,11 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
+@@ -5088,8 +5106,11 @@ static int ext4_quota_enable(struct super_block *sb, int type, int format_id,
/* Don't account quota for quota files to avoid recursion */
qf_inode->i_flags |= S_NOQUOTA;
@@ -3514,7 +3655,7 @@ index c9ab67d..ba1cf0b 100644
return err;
}
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
-index ce5a218..5fc2162 100644
+index 9cce670..7ded177 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -377,7 +377,7 @@ int nfs_readdir_xdr_filler(struct page **pages, nfs_readdir_descriptor_t *desc,
@@ -3545,10 +3686,10 @@ index ce5a218..5fc2162 100644
nfs_readdir_descriptor_t my_desc,
*desc = &my_desc;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
-index 3e2071a..f714b98 100644
+index 86faecf..847b678 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
-@@ -927,7 +927,7 @@ int nfs_open(struct inode *inode, struct file *filp)
+@@ -940,7 +940,7 @@ int nfs_open(struct inode *inode, struct file *filp)
{
struct nfs_open_context *ctx;
@@ -3558,7 +3699,7 @@ index 3e2071a..f714b98 100644
return PTR_ERR(ctx);
nfs_file_set_open_context(filp, ctx);
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
-index db9b5fe..679e003 100644
+index 57ca1c8..2a9ff14 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -26,7 +26,7 @@ static int
@@ -3580,10 +3721,10 @@ index db9b5fe..679e003 100644
if (IS_ERR(ctx))
goto out;
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-index 000b2ed..a1acc60 100644
+index 619ad4b..4399ea8 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
-@@ -276,6 +276,37 @@ static void ovl_dentry_release(struct dentry *dentry)
+@@ -295,6 +295,37 @@ static void ovl_dentry_release(struct dentry *dentry)
}
}
@@ -3621,7 +3762,7 @@ index 000b2ed..a1acc60 100644
static int ovl_dentry_revalidate(struct dentry *dentry, unsigned int flags)
{
struct ovl_entry *oe = dentry->d_fsdata;
-@@ -320,11 +351,13 @@ static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags)
+@@ -339,11 +370,13 @@ static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags)
static const struct dentry_operations ovl_dentry_operations = {
.d_release = ovl_dentry_release,
.d_select_inode = ovl_d_select_inode,
@@ -3649,7 +3790,7 @@ index 22ab246..eeae401 100644
#endif /* GCC_VERSION >= 40500 */
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
-index 8a2e009..f513dd8 100644
+index c4b5f4b..03dda7b 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -161,6 +161,7 @@ struct dentry_operations {
@@ -3682,16 +3823,18 @@ index 8a2e009..f513dd8 100644
+
#endif /* __LINUX_DCACHE_H */
diff --git a/include/linux/filter.h b/include/linux/filter.h
-index 5972ffe..5110d42 100644
+index 43aa1f8..a51a536 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
-@@ -446,8 +446,12 @@ int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
+@@ -465,10 +465,14 @@ int bpf_prog_create_from_user(struct bpf_prog **pfp, struct sock_fprog *fprog,
void bpf_prog_destroy(struct bpf_prog *fp);
int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
+int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk,
+ bool locked);
int sk_attach_bpf(u32 ufd, struct sock *sk);
+ int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk);
+ int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk);
int sk_detach_filter(struct sock *sk);
+int __sk_detach_filter(struct sock *sk, bool locked);
+
@@ -3699,10 +3842,10 @@ index 5972ffe..5110d42 100644
unsigned int len);
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 22c5a0c..ab3d8d9 100644
+index 2c7f8d9..83c77b0 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1207,6 +1207,16 @@ static inline struct inode *file_inode(const struct file *f)
+@@ -1234,6 +1234,16 @@ static inline struct inode *file_inode(const struct file *f)
return f->f_inode;
}
@@ -3735,10 +3878,10 @@ index a338a688..dcb89e3 100644
extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index 3143c84..04c068e 100644
+index 5440b7b..6d1d8f4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -265,6 +265,7 @@ struct header_ops {
+@@ -267,6 +267,7 @@ struct header_ops {
void (*cache_update)(struct hh_cache *hh,
const struct net_device *dev,
const unsigned char *haddr);
@@ -3746,7 +3889,7 @@ index 3143c84..04c068e 100644
};
/* These flag bits are private to the generic network queueing
-@@ -1398,8 +1399,7 @@ enum netdev_priv_flags {
+@@ -1420,8 +1421,7 @@ enum netdev_priv_flags {
* @dma: DMA channel
* @mtu: Interface MTU value
* @type: Interface hardware type
@@ -3756,7 +3899,7 @@ index 3143c84..04c068e 100644
*
* @needed_headroom: Extra headroom the hardware may need, but not in all
* cases can this be guaranteed
-@@ -2493,6 +2493,24 @@ static inline int dev_parse_header(const struct sk_buff *skb,
+@@ -2627,6 +2627,24 @@ static inline int dev_parse_header(const struct sk_buff *skb,
return dev->header_ops->parse(skb, haddr);
}
@@ -3781,93 +3924,6 @@ index 3143c84..04c068e 100644
typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
int register_gifconf(unsigned int family, gifconf_func_t *gifconf);
static inline int unregister_gifconf(unsigned int family)
-diff --git a/include/linux/pci.h b/include/linux/pci.h
-index 4e554bf..e89c7ee 100644
---- a/include/linux/pci.h
-+++ b/include/linux/pci.h
-@@ -989,23 +989,6 @@ static inline int pci_is_managed(struct pci_dev *pdev)
- return pdev->is_managed;
- }
-
--static inline void pci_set_managed_irq(struct pci_dev *pdev, unsigned int irq)
--{
-- pdev->irq = irq;
-- pdev->irq_managed = 1;
--}
--
--static inline void pci_reset_managed_irq(struct pci_dev *pdev)
--{
-- pdev->irq = 0;
-- pdev->irq_managed = 0;
--}
--
--static inline bool pci_has_managed_irq(struct pci_dev *pdev)
--{
-- return pdev->irq_managed && pdev->irq > 0;
--}
--
- void pci_disable_device(struct pci_dev *dev);
-
- extern unsigned int pcibios_max_latency;
-diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 75f136a..4fde618 100644
---- a/include/linux/skbuff.h
-+++ b/include/linux/skbuff.h
-@@ -1908,6 +1908,30 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
- skb->tail += len;
- }
-
-+/**
-+ * skb_tailroom_reserve - adjust reserved_tailroom
-+ * @skb: buffer to alter
-+ * @mtu: maximum amount of headlen permitted
-+ * @needed_tailroom: minimum amount of reserved_tailroom
-+ *
-+ * Set reserved_tailroom so that headlen can be as large as possible but
-+ * not larger than mtu and tailroom cannot be smaller than
-+ * needed_tailroom.
-+ * The required headroom should already have been reserved before using
-+ * this function.
-+ */
-+static inline void skb_tailroom_reserve(struct sk_buff *skb, unsigned int mtu,
-+ unsigned int needed_tailroom)
-+{
-+ SKB_LINEAR_ASSERT(skb);
-+ if (mtu < skb_tailroom(skb) - needed_tailroom)
-+ /* use at most mtu */
-+ skb->reserved_tailroom = skb_tailroom(skb) - mtu;
-+ else
-+ /* use up to all available space */
-+ skb->reserved_tailroom = needed_tailroom;
-+}
-+
- #define ENCAP_TYPE_ETHER 0
- #define ENCAP_TYPE_IPPROTO 1
-
-@@ -2724,6 +2748,23 @@ static inline void skb_postpull_rcsum(struct sk_buff *skb,
-
- unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
-
-+static inline void skb_postpush_rcsum(struct sk_buff *skb,
-+ const void *start, unsigned int len)
-+{
-+ /* For performing the reverse operation to skb_postpull_rcsum(),
-+ * we can instead of ...
-+ *
-+ * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
-+ *
-+ * ... just use this equivalent version here to save a few
-+ * instructions. Feeding csum of 0 in csum_partial() and later
-+ * on adding skb->csum is equivalent to feed skb->csum in the
-+ * first place.
-+ */
-+ if (skb->ip_summed == CHECKSUM_COMPLETE)
-+ skb->csum = csum_partial(start, len, skb->csum);
-+}
-+
- /**
- * pskb_trim_rcsum - trim received skb and update checksum
- * @skb: buffer to trim
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index 7f5f78b..245f57d 100644
--- a/include/linux/usb_usual.h
@@ -3882,10 +3938,10 @@ index 7f5f78b..245f57d 100644
#define US_FLAG(name, value) US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
diff --git a/include/net/bonding.h b/include/net/bonding.h
-index c1740a2..93abe5f 100644
+index ee6c520..791800d 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
-@@ -214,6 +214,7 @@ struct bonding {
+@@ -215,6 +215,7 @@ struct bonding {
* ALB mode (6) - to sync the use and modifications of its hash table
*/
spinlock_t mode_lock;
@@ -3893,6 +3949,42 @@ index c1740a2..93abe5f 100644
u8 send_peer_notif;
u8 igmp_retrans;
#ifdef CONFIG_PROC_FS
+diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
+index f63a167..ba93c0f 100644
+--- a/include/scsi/scsi_device.h
++++ b/include/scsi/scsi_device.h
+@@ -513,6 +513,31 @@ static inline int scsi_device_tpgs(struct scsi_device *sdev)
+ return sdev->inquiry ? (sdev->inquiry[5] >> 4) & 0x3 : 0;
+ }
+
++/**
++ * scsi_device_supports_vpd - test if a device supports VPD pages
++ * @sdev: the &struct scsi_device to test
++ *
++ * If the 'try_vpd_pages' flag is set it takes precedence.
++ * Otherwise we will assume VPD pages are supported if the
++ * SCSI level is at least SPC-3 and 'skip_vpd_pages' is not set.
++ */
++static inline int scsi_device_supports_vpd(struct scsi_device *sdev)
++{
++ /* Attempt VPD inquiry if the device blacklist explicitly calls
++ * for it.
++ */
++ if (sdev->try_vpd_pages)
++ return 1;
++ /*
++ * Although VPD inquiries can go to SCSI-2 type devices,
++ * some USB ones crash on receiving them, and the pages
++ * we currently ask for are for SPC-3 and beyond
++ */
++ if (sdev->scsi_level > SCSI_SPC_2 && !sdev->skip_vpd_pages)
++ return 1;
++ return 0;
++}
++
+ #define MODULE_ALIAS_SCSI_DEVICE(type) \
+ MODULE_ALIAS("scsi:t-" __stringify(type) "*")
+ #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x"
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index 4504ca6..50da680 100644
--- a/kernel/bpf/helpers.c
@@ -3906,47 +3998,11 @@ index 4504ca6..50da680 100644
return 0;
}
-diff --git a/kernel/events/core.c b/kernel/events/core.c
-index faf2067..1e889a0 100644
---- a/kernel/events/core.c
-+++ b/kernel/events/core.c
-@@ -1580,14 +1580,14 @@ event_sched_out(struct perf_event *event,
-
- perf_pmu_disable(event->pmu);
-
-+ event->tstamp_stopped = tstamp;
-+ event->pmu->del(event, 0);
-+ event->oncpu = -1;
- event->state = PERF_EVENT_STATE_INACTIVE;
- if (event->pending_disable) {
- event->pending_disable = 0;
- event->state = PERF_EVENT_STATE_OFF;
- }
-- event->tstamp_stopped = tstamp;
-- event->pmu->del(event, 0);
-- event->oncpu = -1;
-
- if (!is_software_event(event))
- cpuctx->active_oncpu--;
-@@ -8583,7 +8583,12 @@ err_context:
- perf_unpin_context(ctx);
- put_ctx(ctx);
- err_alloc:
-- free_event(event);
-+ /*
-+ * If event_file is set, the fput() above will have called ->release()
-+ * and that will take care of freeing the event.
-+ */
-+ if (!event_file)
-+ free_event(event);
- err_cpus:
- put_online_cpus();
- err_task:
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
-index 4568fd5..00c9646 100644
+index 92c4c36..31555b6 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
-@@ -283,11 +283,11 @@ struct page *alloc_migrate_target(struct page *page, unsigned long private,
+@@ -289,11 +289,11 @@ struct page *alloc_migrate_target(struct page *page, unsigned long private,
* now as a simple work-around, we use the next node for destination.
*/
if (PageHuge(page)) {
@@ -3991,10 +4047,10 @@ index b563a3f..2fa3be9 100644
EXPORT_SYMBOL(ax25_header_ops);
diff --git a/net/bridge/br_stp.c b/net/bridge/br_stp.c
-index 5f3f645..eff69cb 100644
+index b3cca12..e2670c5 100644
--- a/net/bridge/br_stp.c
+++ b/net/bridge/br_stp.c
-@@ -567,6 +567,14 @@ int br_set_max_age(struct net_bridge *br, unsigned long val)
+@@ -568,6 +568,14 @@ int br_set_max_age(struct net_bridge *br, unsigned long val)
}
@@ -4009,7 +4065,7 @@ index 5f3f645..eff69cb 100644
int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
{
struct switchdev_attr attr = {
-@@ -577,11 +585,8 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
+@@ -579,11 +587,8 @@ int br_set_ageing_time(struct net_bridge *br, u32 ageing_time)
unsigned long t = clock_t_to_jiffies(ageing_time);
int err;
@@ -4023,10 +4079,10 @@ index 5f3f645..eff69cb 100644
br->ageing_time = t;
diff --git a/net/core/filter.c b/net/core/filter.c
-index 37157c4..f393a22 100644
+index bba502f..fb2951c 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
-@@ -1139,7 +1139,8 @@ void bpf_prog_destroy(struct bpf_prog *fp)
+@@ -1147,7 +1147,8 @@ void bpf_prog_destroy(struct bpf_prog *fp)
}
EXPORT_SYMBOL_GPL(bpf_prog_destroy);
@@ -4036,7 +4092,7 @@ index 37157c4..f393a22 100644
{
struct sk_filter *fp, *old_fp;
-@@ -1155,10 +1156,8 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
+@@ -1163,10 +1164,8 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
return -ENOMEM;
}
@@ -4048,7 +4104,7 @@ index 37157c4..f393a22 100644
if (old_fp)
sk_filter_uncharge(sk, old_fp);
-@@ -1175,7 +1174,8 @@ static int __sk_attach_prog(struct bpf_prog *prog, struct sock *sk)
+@@ -1245,7 +1244,8 @@ struct bpf_prog *__get_filter(struct sock_fprog *fprog, struct sock *sk)
* occurs or there is insufficient memory for the filter a negative
* errno code is returned. On success the return is zero.
*/
@@ -4056,9 +4112,9 @@ index 37157c4..f393a22 100644
+int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk,
+ bool locked)
{
- unsigned int fsize = bpf_classic_proglen(fprog);
- unsigned int bpf_fsize = bpf_prog_size(fprog->len);
-@@ -1213,7 +1213,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
+ struct bpf_prog *prog = __get_filter(fprog, sk);
+ int err;
+@@ -1253,7 +1253,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
if (IS_ERR(prog))
return PTR_ERR(prog);
@@ -4067,7 +4123,7 @@ index 37157c4..f393a22 100644
if (err < 0) {
__bpf_prog_release(prog);
return err;
-@@ -1221,7 +1221,12 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
+@@ -1261,7 +1261,12 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
return 0;
}
@@ -4079,18 +4135,18 @@ index 37157c4..f393a22 100644
+ return __sk_attach_filter(fprog, sk, sock_owned_by_user(sk));
+}
- int sk_attach_bpf(u32 ufd, struct sock *sk)
+ int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk)
{
-@@ -1240,7 +1245,7 @@ int sk_attach_bpf(u32 ufd, struct sock *sk)
- return -EINVAL;
- }
+@@ -1307,7 +1312,7 @@ int sk_attach_bpf(u32 ufd, struct sock *sk)
+ if (IS_ERR(prog))
+ return PTR_ERR(prog);
- err = __sk_attach_prog(prog, sk);
+ err = __sk_attach_prog(prog, sk, sock_owned_by_user(sk));
if (err < 0) {
bpf_prog_put(prog);
return err;
-@@ -1913,7 +1918,7 @@ static int __init register_sk_filter_ops(void)
+@@ -2105,7 +2110,7 @@ static int __init register_sk_filter_ops(void)
}
late_initcall(register_sk_filter_ops);
@@ -4099,7 +4155,7 @@ index 37157c4..f393a22 100644
{
int ret = -ENOENT;
struct sk_filter *filter;
-@@ -1921,8 +1926,7 @@ int sk_detach_filter(struct sock *sk)
+@@ -2113,8 +2118,7 @@ int sk_detach_filter(struct sock *sk)
if (sock_flag(sk, SOCK_FILTER_LOCKED))
return -EPERM;
@@ -4109,7 +4165,7 @@ index 37157c4..f393a22 100644
if (filter) {
RCU_INIT_POINTER(sk->sk_filter, NULL);
sk_filter_uncharge(sk, filter);
-@@ -1931,7 +1935,12 @@ int sk_detach_filter(struct sock *sk)
+@@ -2123,7 +2127,12 @@ int sk_detach_filter(struct sock *sk)
return ret;
}
@@ -4124,7 +4180,7 @@ index 37157c4..f393a22 100644
int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf,
unsigned int len)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
-index 34ba7a0..ca966f7 100644
+index 8261d95..215e613 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -905,6 +905,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev,
@@ -4135,47 +4191,6 @@ index 34ba7a0..ca966f7 100644
+ nla_total_size(1); /* IFLA_PROTO_DOWN */
}
-diff --git a/net/core/skbuff.c b/net/core/skbuff.c
-index 5bf88f5..8616d11 100644
---- a/net/core/skbuff.c
-+++ b/net/core/skbuff.c
-@@ -2948,6 +2948,24 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page,
- EXPORT_SYMBOL_GPL(skb_append_pagefrags);
-
- /**
-+ * skb_push_rcsum - push skb and update receive checksum
-+ * @skb: buffer to update
-+ * @len: length of data pulled
-+ *
-+ * This function performs an skb_push on the packet and updates
-+ * the CHECKSUM_COMPLETE checksum. It should be used on
-+ * receive path processing instead of skb_push unless you know
-+ * that the checksum difference is zero (e.g., a valid IP header)
-+ * or you are setting ip_summed to CHECKSUM_NONE.
-+ */
-+static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)
-+{
-+ skb_push(skb, len);
-+ skb_postpush_rcsum(skb, skb->data, len);
-+ return skb->data;
-+}
-+
-+/**
- * skb_pull_rcsum - pull skb and update receive checksum
- * @skb: buffer to update
- * @len: length of data pulled
-@@ -4084,9 +4102,9 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
- if (!pskb_may_pull(skb_chk, offset))
- goto err;
-
-- __skb_pull(skb_chk, offset);
-+ skb_pull_rcsum(skb_chk, offset);
- ret = skb_chkf(skb_chk);
-- __skb_push(skb_chk, offset);
-+ skb_push_rcsum(skb_chk, offset);
-
- if (ret)
- goto err;
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 902d606..8be8f27 100644
--- a/net/dccp/ipv4.c
@@ -4189,6 +4204,40 @@ index 902d606..8be8f27 100644
if (!between48(seq, dccp_rsk(req)->dreq_iss, dccp_rsk(req)->dreq_gss)) {
NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
} else {
+diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
+index fa4daba..d8fb47f 100644
+--- a/net/dsa/dsa.c
++++ b/net/dsa/dsa.c
+@@ -935,6 +935,14 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
+ {
+ int i;
+
++ dst->master_netdev->dsa_ptr = NULL;
++
++ /* If we used a tagging format that doesn't have an ethertype
++ * field, make sure that all packets from this point get sent
++ * without the tag and go through the regular receive path.
++ */
++ wmb();
++
+ for (i = 0; i < dst->pd->nr_chips; i++) {
+ struct dsa_switch *ds = dst->ds[i];
+
+@@ -988,14 +996,6 @@ static int dsa_suspend(struct device *d)
+ struct dsa_switch_tree *dst = platform_get_drvdata(pdev);
+ int i, ret = 0;
+
+- dst->master_netdev->dsa_ptr = NULL;
+-
+- /* If we used a tagging format that doesn't have an ethertype
+- * field, make sure that all packets from this point get sent
+- * without the tag and go through the regular receive path.
+- */
+- wmb();
+-
+ for (i = 0; i < dst->pd->nr_chips; i++) {
+ struct dsa_switch *ds = dst->ds[i];
+
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index f6303b1..0212591 100644
--- a/net/ipv4/devinet.c
@@ -4263,64 +4312,6 @@ index 4734475..8a9246d 100644
if (!(ok & BRD_OK))
fib_magic(RTM_DELROUTE, RTN_BROADCAST, ifa->ifa_broadcast, 32, prim);
if (subnet && ifa->ifa_prefixlen < 31) {
-diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
-index 05e4cba..b3086cf 100644
---- a/net/ipv4/igmp.c
-+++ b/net/ipv4/igmp.c
-@@ -356,9 +356,8 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, unsigned int mtu)
- skb_dst_set(skb, &rt->dst);
- skb->dev = dev;
-
-- skb->reserved_tailroom = skb_end_offset(skb) -
-- min(mtu, skb_end_offset(skb));
- skb_reserve(skb, hlen);
-+ skb_tailroom_reserve(skb, mtu, tlen);
-
- skb_reset_network_header(skb);
- pip = ip_hdr(skb);
-diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
-index 49f0285..f2ad521 100644
---- a/net/ipv4/ip_output.c
-+++ b/net/ipv4/ip_output.c
-@@ -1237,13 +1237,16 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
- if (!skb)
- return -EINVAL;
-
-- cork->length += size;
- if ((size + skb->len > mtu) &&
- (sk->sk_protocol == IPPROTO_UDP) &&
- (rt->dst.dev->features & NETIF_F_UFO)) {
-+ if (skb->ip_summed != CHECKSUM_PARTIAL)
-+ return -EOPNOTSUPP;
-+
- skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
- skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
- }
-+ cork->length += size;
-
- while (size > 0) {
- if (skb_is_gso(skb)) {
-diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
-index cbb51f3..ce30c8b 100644
---- a/net/ipv4/ip_tunnel.c
-+++ b/net/ipv4/ip_tunnel.c
-@@ -663,6 +663,8 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
- inner_iph = (const struct iphdr *)skb_inner_network_header(skb);
- connected = (tunnel->parms.iph.daddr != 0);
-
-+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-+
- dst = tnl_params->daddr;
- if (dst == 0) {
- /* NBMA tunnel */
-@@ -760,7 +762,6 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
- tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
- tunnel->err_count--;
-
-- memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
- dst_link_failure(skb);
- } else
- tunnel->err_count = 0;
diff --git a/net/ipv4/netfilter/nf_nat_masquerade_ipv4.c b/net/ipv4/netfilter/nf_nat_masquerade_ipv4.c
index c6eb421..ea91058 100644
--- a/net/ipv4/netfilter/nf_nat_masquerade_ipv4.c
@@ -4347,10 +4338,10 @@ index c6eb421..ea91058 100644
}
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
-index 8c7e631..048418b 100644
+index 487ac67..a7b1a90 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
-@@ -320,8 +320,6 @@ void tcp_req_err(struct sock *sk, u32 seq, bool abort)
+@@ -319,8 +319,6 @@ void tcp_req_err(struct sock *sk, u32 seq, bool abort)
/* ICMPs are not backlogged, hence we cannot get
* an established socket here.
*/
@@ -4359,45 +4350,11 @@ index 8c7e631..048418b 100644
if (seq != tcp_rsk(req)->snt_isn) {
NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS);
} else if (abort) {
-diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
-index c8cbc2b..a726d78 100644
---- a/net/ipv4/tcp_metrics.c
-+++ b/net/ipv4/tcp_metrics.c
-@@ -550,7 +550,7 @@ reset:
- */
- if (crtt > tp->srtt_us) {
- /* Set RTO like tcp_rtt_estimator(), but from cached RTT. */
-- crtt /= 8 * USEC_PER_MSEC;
-+ crtt /= 8 * USEC_PER_SEC / HZ;
- inet_csk(sk)->icsk_rto = crtt + max(2 * crtt, tcp_rto_min(sk));
- } else if (tp->srtt_us == 0) {
- /* RFC6298: 5.7 We've failed to get a valid RTT sample from
-diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
-index ac6b196..9475a27 100644
---- a/net/ipv4/tcp_minisocks.c
-+++ b/net/ipv4/tcp_minisocks.c
-@@ -458,7 +458,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
-
- newtp->rcv_wup = newtp->copied_seq =
- newtp->rcv_nxt = treq->rcv_isn + 1;
-- newtp->segs_in = 0;
-+ newtp->segs_in = 1;
-
- newtp->snd_sml = newtp->snd_una =
- newtp->snd_nxt = newtp->snd_up = treq->snt_isn + 1;
-@@ -818,6 +818,7 @@ int tcp_child_process(struct sock *parent, struct sock *child,
- int ret = 0;
- int state = child->sk_state;
-
-+ tcp_sk(child)->segs_in += max_t(u16, 1, skb_shinfo(skb)->gso_segs);
- if (!sock_owned_by_user(child)) {
- ret = tcp_rcv_state_process(child, skb);
- /* Wakeup parent, send SIGIO */
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
-index 7f8ab46..21fbb54 100644
+index 95d2f19..eb8933b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
-@@ -1990,10 +1990,14 @@ void udp_v4_early_demux(struct sk_buff *skb)
+@@ -2082,10 +2082,14 @@ void udp_v4_early_demux(struct sk_buff *skb)
if (!in_dev)
return;
@@ -4416,51 +4373,8 @@ index 7f8ab46..21fbb54 100644
sk = __udp4_lib_mcast_demux_lookup(net, uh->dest, iph->daddr,
uh->source, iph->saddr, dif);
} else if (skb->pkt_type == PACKET_HOST) {
-diff --git a/net/ipv4/udp_tunnel.c b/net/ipv4/udp_tunnel.c
-index aba4286..280a9bd 100644
---- a/net/ipv4/udp_tunnel.c
-+++ b/net/ipv4/udp_tunnel.c
-@@ -89,6 +89,8 @@ int udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
- uh->source = src_port;
- uh->len = htons(skb->len);
-
-+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-+
- udp_set_csum(nocheck, skb, src, dst, skb->len);
-
- return iptunnel_xmit(sk, rt, skb, src, dst, IPPROTO_UDP,
-diff --git a/net/ipv6/exthdrs_core.c b/net/ipv6/exthdrs_core.c
-index 5c5d23e..9508a20 100644
---- a/net/ipv6/exthdrs_core.c
-+++ b/net/ipv6/exthdrs_core.c
-@@ -257,7 +257,11 @@ int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
- *fragoff = _frag_off;
- return hp->nexthdr;
- }
-- return -ENOENT;
-+ if (!found)
-+ return -ENOENT;
-+ if (fragoff)
-+ *fragoff = _frag_off;
-+ break;
- }
- hdrlen = 8;
- } else if (nexthdr == NEXTHDR_AUTH) {
-diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
-index e5ea177..4650c68 100644
---- a/net/ipv6/ip6_gre.c
-+++ b/net/ipv6/ip6_gre.c
-@@ -778,6 +778,8 @@ static inline int ip6gre_xmit_ipv4(struct sk_buff *skb, struct net_device *dev)
- __u32 mtu;
- int err;
-
-+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-+
- if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT))
- encap_limit = t->parms.encap_limit;
-
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
-index 31144c4..a175152 100644
+index a163102..2a6606c 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1091,8 +1091,8 @@ static inline int ip6_ufo_append_data(struct sock *sk,
@@ -4493,7 +4407,7 @@ index 31144c4..a175152 100644
if (err)
goto error;
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
-index 137fca4..3991b21 100644
+index 6c5dfec..3991b21 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -343,12 +343,12 @@ static int ip6_tnl_create2(struct net_device *dev)
@@ -4510,35 +4424,11 @@ index 137fca4..3991b21 100644
dev_hold(dev);
ip6_tnl_link(ip6n, t);
-@@ -1180,6 +1180,8 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
- u8 tproto;
- int err;
-
-+ memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
-+
- tproto = ACCESS_ONCE(t->parms.proto);
- if (tproto != IPPROTO_IPIP && tproto != 0)
- return -1;
-diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
-index 5ee56d0..d64ee7e 100644
---- a/net/ipv6/mcast.c
-+++ b/net/ipv6/mcast.c
-@@ -1574,9 +1574,8 @@ static struct sk_buff *mld_newpack(struct inet6_dev *idev, unsigned int mtu)
- return NULL;
-
- skb->priority = TC_PRIO_CONTROL;
-- skb->reserved_tailroom = skb_end_offset(skb) -
-- min(mtu, skb_end_offset(skb));
- skb_reserve(skb, hlen);
-+ skb_tailroom_reserve(skb, mtu, tlen);
-
- if (__ipv6_get_lladdr(idev, &addr_buf, IFA_F_TENTATIVE)) {
- /* <draft-ietf-magma-mld-source-05.txt>:
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
-index 9da3287..6665e1a 100644
+index 422dd01..6794120 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
-@@ -837,8 +837,8 @@ start_lookup:
+@@ -883,8 +883,8 @@ start_lookup:
flush_stack(stack, count, skb, count - 1);
} else {
if (!inner_flushed)
@@ -4549,20 +4439,6 @@ index 9da3287..6665e1a 100644
consume_skb(skb);
}
return 0;
-@@ -916,11 +916,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
- ret = udpv6_queue_rcv_skb(sk, skb);
- sock_put(sk);
-
-- /* a return value > 0 means to resubmit the input, but
-- * it wants the return to be -protocol, or 0
-- */
-+ /* a return value > 0 means to resubmit the input */
- if (ret > 0)
-- return -ret;
-+ return ret;
-
- return 0;
- }
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index ec22078..42de4cc 100644
--- a/net/l2tp/l2tp_ip.c
@@ -4622,7 +4498,7 @@ index a2c8747..9ee4ddb 100644
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, ptr, length);
}
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
-index 6a12b0f..980e9e9 100644
+index 978d3bc..1b33d89 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -7,6 +7,7 @@
@@ -4633,7 +4509,7 @@ index 6a12b0f..980e9e9 100644
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
-@@ -1484,14 +1485,21 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
+@@ -1485,14 +1486,21 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
sdata_info(sdata, "Trigger new scan to find an IBSS to join\n");
@@ -4678,10 +4554,10 @@ index c9e325d..7a2b791 100644
}
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 4cbf36c..a3bb8f7 100644
+index 60d093f..261df74 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2250,7 +2250,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
+@@ -2249,7 +2249,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
struct ieee80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -4690,7 +4566,7 @@ index 4cbf36c..a3bb8f7 100644
hdr = (struct ieee80211_hdr *) skb->data;
hdrlen = ieee80211_hdrlen(hdr->frame_control);
-@@ -2319,7 +2319,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
+@@ -2318,7 +2318,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
ether_addr_equal(sdata->vif.addr, hdr->addr3))
return RX_CONTINUE;
@@ -4701,10 +4577,10 @@ index 4cbf36c..a3bb8f7 100644
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_congestion);
return RX_DROP_MONITOR;
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
-index f91d187..67066d0 100644
+index a4a4f89..23ed038 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -256,11 +256,11 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
+@@ -257,11 +257,11 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
}
/* Caller must hold local->sta_mtx */
@@ -4720,7 +4596,7 @@ index f91d187..67066d0 100644
}
static void sta_deliver_ps_frames(struct work_struct *wk)
-@@ -484,11 +484,17 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
+@@ -498,11 +498,17 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
{
struct ieee80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
@@ -4739,7 +4615,7 @@ index f91d187..67066d0 100644
/* check if STA exists already */
if (sta_info_get_bss(sdata, sta->sta.addr)) {
err = -EEXIST;
-@@ -503,7 +509,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
+@@ -517,7 +523,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
set_sta_flag(sta, WLAN_STA_BLOCK_BA);
/* make the station visible */
@@ -4750,7 +4626,7 @@ index f91d187..67066d0 100644
list_add_tail_rcu(&sta->list, &local->sta_list);
-@@ -520,10 +528,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
+@@ -534,10 +542,9 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
ieee80211_sta_debugfs_add(sta);
rate_control_add_sta_debugfs(sta);
@@ -4764,7 +4640,7 @@ index f91d187..67066d0 100644
sta_dbg(sdata, "Inserted STA %pM\n", sta->sta.addr);
-@@ -538,6 +545,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
+@@ -552,6 +559,7 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
out_remove:
sta_info_hash_del(local, sta);
list_del_rcu(&sta->list);
@@ -4772,7 +4648,7 @@ index f91d187..67066d0 100644
local->num_sta--;
synchronize_net();
__cleanup_single_sta(sta);
-@@ -882,7 +890,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
+@@ -898,7 +906,7 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
{
struct ieee80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
@@ -4781,7 +4657,7 @@ index f91d187..67066d0 100644
int ret;
/*
-@@ -920,8 +928,11 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
+@@ -936,8 +944,11 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
sta_dbg(sdata, "Removed STA %pM\n", sta->sta.addr);
@@ -4796,10 +4672,10 @@ index f91d187..67066d0 100644
rate_control_remove_sta_debugfs(sta);
ieee80211_sta_debugfs_remove(sta);
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
-index c32fc41..881bc20 100644
+index b18c5ed..0b80a71 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
-@@ -518,6 +518,9 @@ static struct net_device *find_outdev(struct net *net,
+@@ -543,6 +543,9 @@ static struct net_device *find_outdev(struct net *net,
if (!dev)
return ERR_PTR(-ENODEV);
@@ -4892,25 +4768,12 @@ index 992396a..da1ae0e1 100644
sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
if (!gso_type && (len > dev->mtu + reserve + extra_len) &&
-diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
-index ec52912..ce46f1c 100644
---- a/net/sctp/ipv6.c
-+++ b/net/sctp/ipv6.c
-@@ -526,6 +526,8 @@ static int sctp_v6_cmp_addr(const union sctp_addr *addr1,
- }
- return 0;
- }
-+ if (addr1->v6.sin6_port != addr2->v6.sin6_port)
-+ return 0;
- if (!ipv6_addr_equal(&addr1->v6.sin6_addr, &addr2->v6.sin6_addr))
- return 0;
- /* If this is a linklocal address, compare the scope_id. */
diff --git a/net/socket.c b/net/socket.c
-index d730ef9..263b334 100644
+index c044d1e..db13ae8 100644
--- a/net/socket.c
+++ b/net/socket.c
-@@ -2238,31 +2238,31 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
- break;
+@@ -2240,31 +2240,31 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
+ cond_resched();
}
-out_put:
@@ -4960,136 +4823,6 @@ index d730ef9..263b334 100644
}
SYSCALL_DEFINE5(recvmmsg, int, fd, struct mmsghdr __user *, mmsg,
-diff --git a/net/tipc/socket.c b/net/tipc/socket.c
-index b53246f..e53003c 100644
---- a/net/tipc/socket.c
-+++ b/net/tipc/socket.c
-@@ -673,7 +673,7 @@ static int tipc_sendmcast(struct socket *sock, struct tipc_name_seq *seq,
- struct tipc_sock *tsk = tipc_sk(sk);
- struct net *net = sock_net(sk);
- struct tipc_msg *mhdr = &tsk->phdr;
-- struct sk_buff_head *pktchain = &sk->sk_write_queue;
-+ struct sk_buff_head pktchain;
- struct iov_iter save = msg->msg_iter;
- uint mtu;
- int rc;
-@@ -687,14 +687,16 @@ static int tipc_sendmcast(struct socket *sock, struct tipc_name_seq *seq,
- msg_set_nameupper(mhdr, seq->upper);
- msg_set_hdr_sz(mhdr, MCAST_H_SIZE);
-
-+ skb_queue_head_init(&pktchain);
-+
- new_mtu:
- mtu = tipc_bcast_get_mtu(net);
-- rc = tipc_msg_build(mhdr, msg, 0, dsz, mtu, pktchain);
-+ rc = tipc_msg_build(mhdr, msg, 0, dsz, mtu, &pktchain);
- if (unlikely(rc < 0))
- return rc;
-
- do {
-- rc = tipc_bcast_xmit(net, pktchain);
-+ rc = tipc_bcast_xmit(net, &pktchain);
- if (likely(!rc))
- return dsz;
-
-@@ -704,7 +706,7 @@ new_mtu:
- if (!rc)
- continue;
- }
-- __skb_queue_purge(pktchain);
-+ __skb_queue_purge(&pktchain);
- if (rc == -EMSGSIZE) {
- msg->msg_iter = save;
- goto new_mtu;
-@@ -863,7 +865,7 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz)
- struct net *net = sock_net(sk);
- struct tipc_msg *mhdr = &tsk->phdr;
- u32 dnode, dport;
-- struct sk_buff_head *pktchain = &sk->sk_write_queue;
-+ struct sk_buff_head pktchain;
- struct sk_buff *skb;
- struct tipc_name_seq *seq;
- struct iov_iter save;
-@@ -924,17 +926,18 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz)
- msg_set_hdr_sz(mhdr, BASIC_H_SIZE);
- }
-
-+ skb_queue_head_init(&pktchain);
- save = m->msg_iter;
- new_mtu:
- mtu = tipc_node_get_mtu(net, dnode, tsk->portid);
-- rc = tipc_msg_build(mhdr, m, 0, dsz, mtu, pktchain);
-+ rc = tipc_msg_build(mhdr, m, 0, dsz, mtu, &pktchain);
- if (rc < 0)
- return rc;
-
- do {
-- skb = skb_peek(pktchain);
-+ skb = skb_peek(&pktchain);
- TIPC_SKB_CB(skb)->wakeup_pending = tsk->link_cong;
-- rc = tipc_node_xmit(net, pktchain, dnode, tsk->portid);
-+ rc = tipc_node_xmit(net, &pktchain, dnode, tsk->portid);
- if (likely(!rc)) {
- if (sock->state != SS_READY)
- sock->state = SS_CONNECTING;
-@@ -946,7 +949,7 @@ new_mtu:
- if (!rc)
- continue;
- }
-- __skb_queue_purge(pktchain);
-+ __skb_queue_purge(&pktchain);
- if (rc == -EMSGSIZE) {
- m->msg_iter = save;
- goto new_mtu;
-@@ -1016,7 +1019,7 @@ static int __tipc_send_stream(struct socket *sock, struct msghdr *m, size_t dsz)
- struct net *net = sock_net(sk);
- struct tipc_sock *tsk = tipc_sk(sk);
- struct tipc_msg *mhdr = &tsk->phdr;
-- struct sk_buff_head *pktchain = &sk->sk_write_queue;
-+ struct sk_buff_head pktchain;
- DECLARE_SOCKADDR(struct sockaddr_tipc *, dest, m->msg_name);
- u32 portid = tsk->portid;
- int rc = -EINVAL;
-@@ -1044,17 +1047,19 @@ static int __tipc_send_stream(struct socket *sock, struct msghdr *m, size_t dsz)
-
- timeo = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);
- dnode = tsk_peer_node(tsk);
-+ skb_queue_head_init(&pktchain);
-
- next:
- save = m->msg_iter;
- mtu = tsk->max_pkt;
- send = min_t(uint, dsz - sent, TIPC_MAX_USER_MSG_SIZE);
-- rc = tipc_msg_build(mhdr, m, sent, send, mtu, pktchain);
-+ rc = tipc_msg_build(mhdr, m, sent, send, mtu, &pktchain);
- if (unlikely(rc < 0))
- return rc;
-+
- do {
- if (likely(!tsk_conn_cong(tsk))) {
-- rc = tipc_node_xmit(net, pktchain, dnode, portid);
-+ rc = tipc_node_xmit(net, &pktchain, dnode, portid);
- if (likely(!rc)) {
- tsk->sent_unacked++;
- sent += send;
-@@ -1063,7 +1068,7 @@ next:
- goto next;
- }
- if (rc == -EMSGSIZE) {
-- __skb_queue_purge(pktchain);
-+ __skb_queue_purge(&pktchain);
- tsk->max_pkt = tipc_node_get_mtu(net, dnode,
- portid);
- m->msg_iter = save;
-@@ -1077,7 +1082,7 @@ next:
- rc = tipc_wait_for_sndpkt(sock, &timeo);
- } while (!rc);
-
-- __skb_queue_purge(pktchain);
-+ __skb_queue_purge(&pktchain);
- return sent ? sent : rc;
- }
-
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index ad7f5b3..1c4ad47 100644
--- a/net/xfrm/xfrm_input.c
@@ -5111,10 +4844,10 @@ index ad7f5b3..1c4ad47 100644
if (nexthdr <= 0) {
if (nexthdr == -EBADMSG) {
diff --git a/sound/core/timer.c b/sound/core/timer.c
-index f24c9fc..b982d1b 100644
+index dca817f..e5e7e43 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
-@@ -1051,8 +1051,8 @@ static int snd_timer_s_start(struct snd_timer * timer)
+@@ -1041,8 +1041,8 @@ static int snd_timer_s_start(struct snd_timer * timer)
njiff += timer->sticks - priv->correction;
priv->correction = 0;
}
@@ -5125,63 +4858,36 @@ index f24c9fc..b982d1b 100644
return 0;
}
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
+index e68fa44..0c95856 100644
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -1623,6 +1623,8 @@ static bool hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin,
+
+ mutex_lock(&per_pin->lock);
+ pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE);
++ eld->monitor_present = pin_eld->monitor_present;
++
+ if (pin_eld->monitor_present)
+ eld->eld_valid = !!(present & AC_PINSENSE_ELDV);
+ else
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
-index 6968b79..1402ba9 100644
+index 4f5ca0b..1402ba9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
-@@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
-
- static void alc_headset_mode_default(struct hda_codec *codec)
- {
-+ static struct coef_fw coef0225[] = {
-+ UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
-+ {}
-+ };
- static struct coef_fw coef0255[] = {
- WRITE_COEF(0x45, 0xc089),
- WRITE_COEF(0x45, 0xc489),
-@@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
- };
-
- switch (codec->core.vendor_id) {
-+ case 0x10ec0225:
-+ alc_process_coef_fw(codec, coef0225);
-+ break;
- case 0x10ec0255:
- case 0x10ec0256:
- alc_process_coef_fw(codec, coef0255);
-@@ -4750,6 +4757,10 @@ enum {
- ALC293_FIXUP_LENOVO_SPK_NOISE,
- ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
+@@ -4759,6 +4759,8 @@ enum {
ALC255_FIXUP_DELL_SPK_NOISE,
-+ ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
-+ ALC280_FIXUP_HP_HEADSET_MIC,
+ ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
+ ALC280_FIXUP_HP_HEADSET_MIC,
+ ALC221_FIXUP_HP_FRONT_MIC,
+ ALC292_FIXUP_TPT460,
};
static const struct hda_fixup alc269_fixups[] = {
-@@ -5375,6 +5386,36 @@ static const struct hda_fixup alc269_fixups[] = {
+@@ -5401,6 +5403,19 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true,
- .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
+ .chain_id = ALC269_FIXUP_HEADSET_MIC,
},
-+ [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
-+ .type = HDA_FIXUP_VERBS,
-+ .v.verbs = (const struct hda_verb[]) {
-+ /* Disable pass-through path for FRONT 14h */
-+ { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
-+ { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
-+ {}
-+ },
-+ .chained = true,
-+ .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
-+ },
-+ [ALC280_FIXUP_HP_HEADSET_MIC] = {
-+ .type = HDA_FIXUP_FUNC,
-+ .v.func = alc_fixup_disable_aamix,
-+ .chained = true,
-+ .chain_id = ALC269_FIXUP_HEADSET_MIC,
-+ },
+ [ALC221_FIXUP_HP_FRONT_MIC] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
@@ -5198,16 +4904,15 @@ index 6968b79..1402ba9 100644
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
-@@ -5479,6 +5520,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
- SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+@@ -5506,6 +5521,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
-+ SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
+ SND_PCI_QUIRK(0x103c, 0x221c, "HP EliteBook 755 G2", ALC280_FIXUP_HP_HEADSET_MIC),
+ SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC),
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
-@@ -5527,7 +5570,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+@@ -5554,7 +5570,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x2218, "Thinkpad X1 Carbon 2nd", ALC292_FIXUP_TPT440_DOCK),
SND_PCI_QUIRK(0x17aa, 0x2223, "ThinkPad T550", ALC292_FIXUP_TPT440_DOCK),
SND_PCI_QUIRK(0x17aa, 0x2226, "ThinkPad X250", ALC292_FIXUP_TPT440_DOCK),
@@ -5216,7 +4921,7 @@ index 6968b79..1402ba9 100644
SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
-@@ -5622,6 +5665,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
+@@ -5649,6 +5665,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"},
{.id = ALC292_FIXUP_TPT440_DOCK, .name = "tpt440-dock"},
{.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
@@ -5224,20 +4929,7 @@ index 6968b79..1402ba9 100644
{}
};
#define ALC225_STANDARD_PINS \
-@@ -5648,10 +5692,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
- {0x21, 0x03211020}
-
- static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
-- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
-+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
- ALC225_STANDARD_PINS,
- {0x14, 0x901701a0}),
-- SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
-+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
- ALC225_STANDARD_PINS,
- {0x14, 0x901701b0}),
- SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
-@@ -6379,6 +6423,7 @@ enum {
+@@ -6406,6 +6423,7 @@ enum {
ALC668_FIXUP_AUTO_MUTE,
ALC668_FIXUP_DELL_DISABLE_AAMIX,
ALC668_FIXUP_DELL_XPS13,
@@ -5245,7 +4937,7 @@ index 6968b79..1402ba9 100644
};
static const struct hda_fixup alc662_fixups[] = {
-@@ -6619,6 +6664,12 @@ static const struct hda_fixup alc662_fixups[] = {
+@@ -6646,6 +6664,12 @@ static const struct hda_fixup alc662_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_bass_chmap,
},
@@ -5258,7 +4950,7 @@ index 6968b79..1402ba9 100644
};
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
-@@ -6641,8 +6692,9 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
+@@ -6668,8 +6692,9 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x0698, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x069f, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
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
index a7a3280..00a02a9 100644
--- 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
@@ -311,10 +311,10 @@ index 13f888a..250729b 100644
A typical pattern in a Kbuild file looks like this:
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
-index 0e4102a..d24a808 100644
+index 21e4b48..82bb512 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
-@@ -1282,6 +1282,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+@@ -1300,6 +1300,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
[KNL] Should the hard-lockup detector generate
backtraces on all cpus.
Format: <integer>
@@ -327,7 +327,7 @@ index 0e4102a..d24a808 100644
hashdist= [KNL,NUMA] Large hashes allocated during boot
are distributed across NUMA nodes. Defaults on
-@@ -2418,6 +2424,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+@@ -2476,6 +2482,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
noexec=on: enable non-executable mappings (default)
noexec=off: disable non-executable mappings
@@ -338,7 +338,7 @@ index 0e4102a..d24a808 100644
nosmap [X86]
Disable SMAP (Supervisor Mode Access Prevention)
even if it is supported by processor.
-@@ -2716,6 +2726,35 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
+@@ -2772,6 +2782,35 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
the specified number of seconds. This is to be used if
your oopses keep scrolling off the screen.
@@ -374,49 +374,8 @@ index 0e4102a..d24a808 100644
pcbit= [HW,ISDN]
pcd. [PARIDE]
-diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
-index 88152f2..302b5ed 100644
---- a/Documentation/sysctl/fs.txt
-+++ b/Documentation/sysctl/fs.txt
-@@ -32,6 +32,8 @@ Currently, these files are in /proc/sys/fs:
- - nr_open
- - overflowuid
- - overflowgid
-+- pipe-user-pages-hard
-+- pipe-user-pages-soft
- - protected_hardlinks
- - protected_symlinks
- - suid_dumpable
-@@ -159,6 +161,27 @@ The default is 65534.
-
- ==============================================================
-
-+pipe-user-pages-hard:
-+
-+Maximum total number of pages a non-privileged user may allocate for pipes.
-+Once this limit is reached, no new pipes may be allocated until usage goes
-+below the limit again. When set to 0, no limit is applied, which is the default
-+setting.
-+
-+==============================================================
-+
-+pipe-user-pages-soft:
-+
-+Maximum total number of pages a non-privileged user may allocate for pipes
-+before the pipe size gets limited to a single page. Once this limit is reached,
-+new pipes will be limited to a single page in size for this user in order to
-+limit total memory usage, and trying to increase them using fcntl() will be
-+denied until usage goes below the limit again. The default value allows to
-+allocate up to 1024 pipes at their default size. When set to 0, no limit is
-+applied.
-+
-+==============================================================
-+
- protected_hardlinks:
-
- A long-standing class of security issues is the hardlink-based
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
-index af70d15..ccd3786 100644
+index a93b414..f50a50b 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -42,6 +42,7 @@ show up in /proc/sys/kernel:
@@ -449,7 +408,7 @@ index af70d15..ccd3786 100644
A toggle value indicating if modules are allowed to be loaded
diff --git a/Makefile b/Makefile
-index 1928fcd..e58439b 100644
+index 1ecaaeb..8e81686 100644
--- a/Makefile
+++ b/Makefile
@@ -298,7 +298,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -474,7 +433,7 @@ index 1928fcd..e58439b 100644
$(Q)$(MAKE) $(build)=scripts/basic
$(Q)rm -f .tmp_quiet_recordmcount
-@@ -616,6 +618,8 @@ endif
+@@ -622,6 +624,8 @@ endif
# Tell gcc to never replace conditional load with a non-conditional one
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
@@ -483,7 +442,7 @@ index 1928fcd..e58439b 100644
ifdef CONFIG_READABLE_ASM
# Disable optimizations that make assembler listings hard to read.
# reorder blocks reorders the control in the function
-@@ -708,7 +712,7 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
+@@ -714,7 +718,7 @@ KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
else
KBUILD_CFLAGS += -g
endif
@@ -492,7 +451,7 @@ index 1928fcd..e58439b 100644
endif
ifdef CONFIG_DEBUG_INFO_DWARF4
KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,)
-@@ -879,7 +883,7 @@ export mod_sign_cmd
+@@ -886,7 +890,7 @@ export mod_sign_cmd
ifeq ($(KBUILD_EXTMOD),)
@@ -501,7 +460,7 @@ index 1928fcd..e58439b 100644
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
-@@ -930,6 +934,8 @@ endif
+@@ -937,6 +941,8 @@ endif
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
@@ -510,7 +469,7 @@ index 1928fcd..e58439b 100644
$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
# Handle descending into subdirectories listed in $(vmlinux-dirs)
-@@ -939,7 +945,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
+@@ -946,7 +952,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
# Error messages still appears in the original language
PHONY += $(vmlinux-dirs)
@@ -519,7 +478,7 @@ index 1928fcd..e58439b 100644
$(Q)$(MAKE) $(build)=$@
define filechk_kernel.release
-@@ -982,10 +988,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
+@@ -989,10 +995,13 @@ prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
archprepare: archheaders archscripts prepare1 scripts_basic
@@ -533,7 +492,7 @@ index 1928fcd..e58439b 100644
prepare: prepare0
# Generate some files
-@@ -1096,6 +1105,8 @@ all: modules
+@@ -1103,6 +1112,8 @@ all: modules
# using awk while concatenating to the final file.
PHONY += modules
@@ -542,7 +501,7 @@ index 1928fcd..e58439b 100644
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
@$(kecho) ' Building modules, stage 2.';
-@@ -1111,7 +1122,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
+@@ -1118,7 +1129,7 @@ modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
# Target to prepare building external modules
PHONY += modules_prepare
@@ -551,7 +510,7 @@ index 1928fcd..e58439b 100644
# Target to install modules
PHONY += modules_install
-@@ -1177,7 +1188,11 @@ MRPROPER_FILES += .config .config.old .version .old_version \
+@@ -1184,7 +1195,11 @@ MRPROPER_FILES += .config .config.old .version .old_version \
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
signing_key.pem signing_key.priv signing_key.x509 \
x509.genkey extra_certificates signing_key.x509.keyid \
@@ -564,7 +523,7 @@ index 1928fcd..e58439b 100644
# clean - Delete most, but leave enough to build external modules
#
-@@ -1216,7 +1231,7 @@ distclean: mrproper
+@@ -1223,7 +1238,7 @@ distclean: mrproper
@find $(srctree) $(RCS_FIND_IGNORE) \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
@@ -573,7 +532,7 @@ index 1928fcd..e58439b 100644
-type f -print | xargs rm -f
-@@ -1383,6 +1398,8 @@ PHONY += $(module-dirs) modules
+@@ -1390,6 +1405,8 @@ PHONY += $(module-dirs) modules
$(module-dirs): crmodverdir $(objtree)/Module.symvers
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
@@ -582,7 +541,7 @@ index 1928fcd..e58439b 100644
modules: $(module-dirs)
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-@@ -1524,17 +1541,21 @@ else
+@@ -1531,17 +1548,21 @@ else
target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
endif
@@ -608,7 +567,7 @@ index 1928fcd..e58439b 100644
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.symtypes: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
-@@ -1546,11 +1567,15 @@ endif
+@@ -1553,11 +1574,15 @@ endif
$(build)=$(build-dir)
# Make sure the latest headers are built for Documentation
Documentation/: headers_install
@@ -729,15 +688,15 @@ index a9a1195..e9b8417 100644
#define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
-index 2fd00b7..cfd5069 100644
+index 936bc8f..bb1859f 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -160,7 +160,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
/* The small sections were sorted to the end of the segment.
The following should definitely cover them. */
-- gp = (u64)me->module_core + me->core_size - 0x8000;
-+ gp = (u64)me->module_core_rw + me->core_size_rw - 0x8000;
+- gp = (u64)me->core_layout.base + me->core_layout.size - 0x8000;
++ gp = (u64)me->core_layout.base_rw + me->core_layout.size_rw - 0x8000;
got = sechdrs[me->arch.gotsecindex].sh_addr;
for (i = 0; i < n; i++) {
@@ -957,7 +916,7 @@ index 4a905bd..0a4da53 100644
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
-index 6312f60..bd07545 100644
+index 8a188bc..26608f1 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -528,6 +528,7 @@ config ARC_DBG_TLB_MISS_COUNT
@@ -969,10 +928,10 @@ index 6312f60..bd07545 100644
Counts number of I and D TLB Misses and exports them via Debugfs
The counters can be cleared via Debugfs as well
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 34e1569..b48ad87 100644
+index 4f799e5..261490f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
-@@ -1690,6 +1690,7 @@ config HIGHPTE
+@@ -1622,6 +1622,7 @@ config HIGHPTE
config CPU_SW_DOMAIN_PAN
bool "Enable use of CPU domains to implement privileged no-access"
depends on MMU && !ARM_LPAE
@@ -980,7 +939,7 @@ index 34e1569..b48ad87 100644
default y
help
Increase kernel security by ensuring that normal kernel accesses
-@@ -1766,7 +1767,7 @@ config ALIGNMENT_TRAP
+@@ -1698,7 +1699,7 @@ config ALIGNMENT_TRAP
config UACCESS_WITH_MEMCPY
bool "Use kernel mem{cpy,set}() for {copy_to,clear}_user()"
@@ -989,7 +948,7 @@ index 34e1569..b48ad87 100644
default y if CPU_FEROCEON
help
Implement faster copy_to_user and clear_user methods for CPU
-@@ -2001,6 +2002,7 @@ config KEXEC
+@@ -1953,6 +1954,7 @@ config KEXEC
depends on (!SMP || PM_SLEEP_SMP)
depends on !CPU_V7M
select KEXEC_CORE
@@ -998,7 +957,7 @@ index 34e1569..b48ad87 100644
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
-index ddbb361..caf403d 100644
+index c6b6175..2884505 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -7,6 +7,7 @@ config ARM_PTDUMP
@@ -1663,12 +1622,12 @@ index 97882f9..0cc6ef1 100644
#include <asm-generic/cmpxchg-local.h>
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
-index 0f84249..8e83c55 100644
+index 3848259..bee9d84 100644
--- a/arch/arm/include/asm/cpuidle.h
+++ b/arch/arm/include/asm/cpuidle.h
@@ -32,7 +32,7 @@ struct device_node;
struct cpuidle_ops {
- int (*suspend)(int cpu, unsigned long arg);
+ int (*suspend)(unsigned long arg);
int (*init)(struct device_node *, int cpu);
-};
+} __no_const;
@@ -1828,7 +1787,7 @@ index 9e614a1..3302cca 100644
struct dma_struct {
void *addr; /* single DMA address */
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h
-index f98c7f3..e5c626d 100644
+index 9b7c328..2dfe68b 100644
--- a/arch/arm/include/asm/mach/map.h
+++ b/arch/arm/include/asm/mach/map.h
@@ -23,17 +23,19 @@ struct map_desc {
@@ -1988,7 +1947,7 @@ index aeddd28..207745c 100644
* These are the memory types, defined to be compatible with
* pre-ARMv6 CPUs cacheable and bufferable bits: n/a,n/a,C,B
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
-index a745a2a..481350a 100644
+index dc46398..70dab92 100644
--- a/arch/arm/include/asm/pgtable-3level.h
+++ b/arch/arm/include/asm/pgtable-3level.h
@@ -80,6 +80,7 @@
@@ -1999,8 +1958,8 @@ index a745a2a..481350a 100644
#define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */
#define L_PTE_DIRTY (_AT(pteval_t, 1) << 55)
#define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56)
-@@ -91,10 +92,12 @@
- #define L_PMD_SECT_SPLITTING (_AT(pmdval_t, 1) << 56)
+@@ -90,10 +91,12 @@
+ #define L_PMD_SECT_DIRTY (_AT(pmdval_t, 1) << 55)
#define L_PMD_SECT_NONE (_AT(pmdval_t, 1) << 57)
#define L_PMD_SECT_RDONLY (_AT(pteval_t, 1) << 58)
+#define PMD_SECT_RDONLY PMD_SECT_AP2
@@ -2393,10 +2352,10 @@ index 5af0ed1..cea83883 100644
#define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
-index f89811f..1d110d1 100644
+index 7e45f69..2c047db 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
-@@ -58,7 +58,7 @@ EXPORT_SYMBOL(arm_delay_ops);
+@@ -59,7 +59,7 @@ EXPORT_SYMBOL(arm_delay_ops);
/* networking */
EXPORT_SYMBOL(csum_partial);
@@ -2406,7 +2365,7 @@ index f89811f..1d110d1 100644
EXPORT_SYMBOL(__csum_ipv6_magic);
diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
-index 318da33..373689f 100644
+index 703926e..39aa432 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -19,7 +19,7 @@ extern struct of_cpuidle_method __cpuidle_method_of_table[];
@@ -2791,7 +2750,7 @@ index 059c3da..8e45cfc 100644
flush_icache_range((unsigned long)base + offset, offset +
length);
diff --git a/arch/arm/kernel/module-plts.c b/arch/arm/kernel/module-plts.c
-index 097e2e2..3927085 100644
+index 0c7efc3..3927085 100644
--- a/arch/arm/kernel/module-plts.c
+++ b/arch/arm/kernel/module-plts.c
@@ -30,17 +30,12 @@ struct plt_entries {
@@ -2800,7 +2759,7 @@ index 097e2e2..3927085 100644
-static bool in_init(const struct module *mod, u32 addr)
-{
-- return addr - (u32)mod->module_init < mod->init_size;
+- return addr - (u32)mod->init_layout.base < mod->init_layout.size;
-}
-
u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val)
@@ -3066,10 +3025,10 @@ index 3826935..8ed63ed 100644
/*
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
-index 20edd34..e18ac81 100644
+index c86ea8a..fd03a2d 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
-@@ -110,21 +110,23 @@ EXPORT_SYMBOL(elf_hwcap);
+@@ -113,21 +113,23 @@ EXPORT_SYMBOL(elf_hwcap);
unsigned int elf_hwcap2 __read_mostly;
EXPORT_SYMBOL(elf_hwcap2);
@@ -3098,7 +3057,7 @@ index 20edd34..e18ac81 100644
EXPORT_SYMBOL(outer_cache);
#endif
-@@ -255,9 +257,13 @@ static int __get_cpu_architecture(void)
+@@ -258,9 +260,13 @@ static int __get_cpu_architecture(void)
* Register 0 and check for VMSAv7 or PMSAv7 */
unsigned int mmfr0 = read_cpuid_ext(CPUID_EXT_MMFR0);
if ((mmfr0 & 0x0000000f) >= 0x00000003 ||
@@ -3172,10 +3131,10 @@ index 7b8f214..ece8e28 100644
- return page;
-}
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
-index b263613..93419ed 100644
+index 37312f6..bb32c9b 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
-@@ -78,7 +78,7 @@ enum ipi_msg_type {
+@@ -82,7 +82,7 @@ enum ipi_msg_type {
static DECLARE_COMPLETION(cpu_running);
@@ -3271,19 +3230,19 @@ index 8b60fde..8d986dd 100644
# ifdef CONFIG_ARM_KERNMEM_PERMS
. = ALIGN(1<<SECTION_SHIFT);
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
-index e06fd29..0d3f8ab 100644
+index dda1959..0de41b4 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
-@@ -57,7 +57,7 @@ static unsigned long hyp_default_vectors;
+@@ -58,7 +58,7 @@ static unsigned long hyp_default_vectors;
static DEFINE_PER_CPU(struct kvm_vcpu *, kvm_arm_running_vcpu);
/* The VMID used in the VTTBR */
-static atomic64_t kvm_vmid_gen = ATOMIC64_INIT(1);
+static atomic64_unchecked_t kvm_vmid_gen = ATOMIC64_INIT(1);
- static u8 kvm_next_vmid;
+ static u32 kvm_next_vmid;
+ static unsigned int kvm_vmid_bits __read_mostly;
static DEFINE_SPINLOCK(kvm_vmid_lock);
-
-@@ -380,7 +380,7 @@ void force_vm_exit(const cpumask_t *mask)
+@@ -387,7 +387,7 @@ void force_vm_exit(const cpumask_t *mask)
*/
static bool need_new_vmid_gen(struct kvm *kvm)
{
@@ -3292,7 +3251,7 @@ index e06fd29..0d3f8ab 100644
}
/**
-@@ -413,7 +413,7 @@ static void update_vttbr(struct kvm *kvm)
+@@ -420,7 +420,7 @@ static void update_vttbr(struct kvm *kvm)
/* First user of a new VMID generation? */
if (unlikely(kvm_next_vmid == 0)) {
@@ -3301,7 +3260,7 @@ index e06fd29..0d3f8ab 100644
kvm_next_vmid = 1;
/*
-@@ -430,7 +430,7 @@ static void update_vttbr(struct kvm *kvm)
+@@ -437,7 +437,7 @@ static void update_vttbr(struct kvm *kvm)
kvm_call_hyp(__kvm_flush_vm_context);
}
@@ -3309,7 +3268,7 @@ index e06fd29..0d3f8ab 100644
+ kvm->arch.vmid_gen = atomic64_read_unchecked(&kvm_vmid_gen);
kvm->arch.vmid = kvm_next_vmid;
kvm_next_vmid++;
-
+ kvm_next_vmid &= (1 << kvm_vmid_bits) - 1;
diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S
index 6ee2f67..d1cce76 100644
--- a/arch/arm/lib/copy_page.S
@@ -3351,10 +3310,10 @@ index 8044591..c9b2609 100644
.const_udelay = __loop_const_udelay,
.udelay = __loop_udelay,
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
-index 588bbc2..4f57e0b 100644
+index 6bd1089..e999400 100644
--- a/arch/arm/lib/uaccess_with_memcpy.c
+++ b/arch/arm/lib/uaccess_with_memcpy.c
-@@ -85,7 +85,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
+@@ -84,7 +84,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
return 1;
}
@@ -3363,7 +3322,7 @@ index 588bbc2..4f57e0b 100644
__copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
{
unsigned long ua_flags;
-@@ -158,7 +158,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n)
+@@ -157,7 +157,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n)
return n;
}
@@ -3447,7 +3406,7 @@ index 65024af..70bf184 100644
.resume = dummy_cpu_resume,
.scu_prepare = dummy_scu_prepare,
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
-index 79e1f87..6dd91e3 100644
+index c625cc1..3f47aae 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -19,6 +19,7 @@
@@ -3459,10 +3418,10 @@ index 79e1f87..6dd91e3 100644
#include <asm/smp_scu.h>
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
-index 72ebc4c..18c4406 100644
+index f7ff3b9..e6d5420 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
-@@ -504,7 +504,7 @@ void omap_device_delete(struct omap_device *od)
+@@ -515,7 +515,7 @@ void omap_device_delete(struct omap_device *od)
struct platform_device __init *omap_device_build(const char *pdev_name,
int pdev_id,
struct omap_hwmod *oh,
@@ -3471,7 +3430,7 @@ index 72ebc4c..18c4406 100644
{
struct omap_hwmod *ohs[] = { oh };
-@@ -532,7 +532,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
+@@ -543,7 +543,7 @@ struct platform_device __init *omap_device_build(const char *pdev_name,
struct platform_device __init *omap_device_build_ss(const char *pdev_name,
int pdev_id,
struct omap_hwmod **ohs,
@@ -3500,7 +3459,7 @@ index 78c02b3..c94109a 100644
struct omap_device *omap_device_alloc(struct platform_device *pdev,
struct omap_hwmod **ohs, int oh_cnt);
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
-index 8e0bd59..1d0b85e 100644
+index b6d62e4..6ba9f74 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -200,10 +200,10 @@ struct omap_hwmod_soc_ops {
@@ -3564,7 +3523,7 @@ index ff0a68c..b312aa0 100644
sizeof(struct omap_wd_timer_platform_data));
WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index 911884f..2f3aa90 100644
+index aba75c8..b55a9d7 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -22,6 +22,7 @@
@@ -3575,7 +3534,7 @@ index 911884f..2f3aa90 100644
#include "common.h"
#include "platsmp-apmu.h"
-@@ -233,6 +234,8 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
+@@ -232,6 +233,8 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
void __init shmobile_smp_apmu_suspend_init(void)
{
@@ -3623,7 +3582,7 @@ index 8538910..2f39bc4 100644
#include <linux/delay.h>
#include <linux/io.h>
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
-index f66816c..228b951 100644
+index 7cd9865..a00b6ab 100644
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -24,6 +24,7 @@
@@ -3635,7 +3594,7 @@ index f66816c..228b951 100644
#include "common.h"
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
-index 4121886..d24c0a1 100644
+index 549f6d3..909a9dc 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -442,6 +442,7 @@ config CPU_32v5
@@ -3682,7 +3641,7 @@ index 4121886..d24c0a1 100644
select GENERIC_TIME_VSYSCALL
help
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
-index 493692d..42a4504 100644
+index 9f9d542..5189649 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -44,7 +44,7 @@ struct l2c_init_data {
@@ -3993,10 +3952,10 @@ index 05ec5e0..0b70277 100644
unsigned long search_exception_table(unsigned long addr);
void early_abt_enable(void);
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
-index 7f8cd1b..6ac64cd 100644
+index 49bd081..a4502de 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
-@@ -742,7 +742,46 @@ void free_tcmmem(void)
+@@ -745,7 +745,46 @@ void free_tcmmem(void)
{
#ifdef CONFIG_HAVE_TCM
extern char __tcm_start, __tcm_end;
@@ -4044,10 +4003,10 @@ index 7f8cd1b..6ac64cd 100644
free_reserved_area(&__tcm_start, &__tcm_end, -1, "TCM link");
#endif
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
-index 0c81056..97279f7 100644
+index 66a978d..e808c4b 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
-@@ -405,9 +405,9 @@ __arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached)
+@@ -406,9 +406,9 @@ __arm_ioremap_exec(phys_addr_t phys_addr, size_t size, bool cached)
unsigned int mtype;
if (cached)
@@ -4060,7 +4019,7 @@ index 0c81056..97279f7 100644
return __arm_ioremap_caller(phys_addr, size, mtype,
__builtin_return_address(0));
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
-index 407dc78..047ce9d 100644
+index 66353ca..8aad9f8 100644
--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -59,6 +59,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
@@ -4092,7 +4051,7 @@ index 407dc78..047ce9d 100644
return addr;
}
-@@ -99,6 +103,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -99,19 +103,21 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
info.high_limit = TASK_SIZE;
info.align_mask = do_align ? (PAGE_MASK & (SHMLBA - 1)) : 0;
info.align_offset = pgoff << PAGE_SHIFT;
@@ -4100,7 +4059,16 @@ index 407dc78..047ce9d 100644
return vm_unmapped_area(&info);
}
-@@ -112,6 +117,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+ unsigned long
+-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+- const unsigned long len, const unsigned long pgoff,
+- const unsigned long flags)
++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
++ unsigned long len, unsigned long pgoff,
++ unsigned long flags)
+ {
+ struct vm_area_struct *vma;
+ struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
int do_align = 0;
int aliasing = cache_is_vipt_aliasing();
@@ -4137,7 +4105,7 @@ index 407dc78..047ce9d 100644
addr = vm_unmapped_area(&info);
/*
-@@ -183,14 +193,30 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
+@@ -182,14 +192,30 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
{
unsigned long random_factor = 0UL;
@@ -4169,7 +4137,7 @@ index 407dc78..047ce9d 100644
}
}
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
-index 4867f5d..dbfed1e 100644
+index 434d76f..af843d5 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -243,7 +243,15 @@ __setup("noalign", noalign_setup);
@@ -4374,7 +4342,7 @@ index 4867f5d..dbfed1e 100644
break;
}
pr_info("Memory policy: %sData cache %s\n",
-@@ -896,7 +937,7 @@ static void __init create_mapping(struct map_desc *md)
+@@ -958,7 +999,7 @@ static void __init create_mapping(struct map_desc *md)
return;
}
@@ -4383,7 +4351,7 @@ index 4867f5d..dbfed1e 100644
md->virtual >= PAGE_OFFSET && md->virtual < FIXADDR_START &&
(md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) {
pr_warn("BUG: mapping for 0x%08llx at 0x%08lx out of vmalloc space\n",
-@@ -1266,18 +1307,15 @@ void __init arm_mm_memblock_reserve(void)
+@@ -1309,18 +1350,15 @@ void __init arm_mm_memblock_reserve(void)
* Any other function or debugging method which may touch any device _will_
* crash the kernel.
*/
@@ -4406,7 +4374,7 @@ index 4867f5d..dbfed1e 100644
/*
* Clear page table except top pmd used by early fixmaps
-@@ -1293,7 +1331,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
+@@ -1336,7 +1374,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK);
map.virtual = MODULES_VADDR;
map.length = ((unsigned long)_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK;
@@ -4415,7 +4383,7 @@ index 4867f5d..dbfed1e 100644
create_mapping(&map);
#endif
-@@ -1304,14 +1342,14 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
+@@ -1347,14 +1385,14 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS);
map.virtual = FLUSH_BASE;
map.length = SZ_1M;
@@ -4432,7 +4400,7 @@ index 4867f5d..dbfed1e 100644
create_mapping(&map);
#endif
-@@ -1320,7 +1358,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
+@@ -1363,7 +1401,7 @@ static void __init devicemaps_init(const struct machine_desc *mdesc)
* location (0xffff0000). If we aren't using high-vectors, also
* create a mapping at the low-vectors virtual address.
*/
@@ -4441,7 +4409,7 @@ index 4867f5d..dbfed1e 100644
map.virtual = 0xffff0000;
map.length = PAGE_SIZE;
#ifdef CONFIG_KUSER_HELPERS
-@@ -1383,8 +1421,10 @@ static void __init kmap_init(void)
+@@ -1426,8 +1464,10 @@ static void __init kmap_init(void)
static void __init map_lowmem(void)
{
struct memblock_region *reg;
@@ -4452,7 +4420,7 @@ index 4867f5d..dbfed1e 100644
/* Map all the lowmem memory banks. */
for_each_memblock(memory, reg) {
-@@ -1397,11 +1437,48 @@ static void __init map_lowmem(void)
+@@ -1443,11 +1483,48 @@ static void __init map_lowmem(void)
if (start >= end)
break;
@@ -4502,7 +4470,7 @@ index 4867f5d..dbfed1e 100644
create_mapping(&map);
} else if (start >= kernel_x_end) {
-@@ -1425,7 +1502,7 @@ static void __init map_lowmem(void)
+@@ -1471,7 +1548,7 @@ static void __init map_lowmem(void)
map.pfn = __phys_to_pfn(kernel_x_start);
map.virtual = __phys_to_virt(kernel_x_start);
map.length = kernel_x_end - kernel_x_start;
@@ -4511,7 +4479,7 @@ index 4867f5d..dbfed1e 100644
create_mapping(&map);
-@@ -1438,6 +1515,7 @@ static void __init map_lowmem(void)
+@@ -1484,6 +1561,7 @@ static void __init map_lowmem(void)
create_mapping(&map);
}
}
@@ -4519,20 +4487,6 @@ index 4867f5d..dbfed1e 100644
}
}
-diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c
-index cf30daf..d19b1ad 100644
---- a/arch/arm/mm/pageattr.c
-+++ b/arch/arm/mm/pageattr.c
-@@ -49,6 +49,9 @@ static int change_memory_common(unsigned long addr, int numpages,
- WARN_ON_ONCE(1);
- }
-
-+ if (!numpages)
-+ return 0;
-+
- if (start < MODULES_VADDR || start >= MODULES_END)
- return -EINVAL;
-
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 93d0b6d..2db6d99 100644
--- a/arch/arm/net/bpf_jit_32.c
@@ -4677,7 +4631,7 @@ index a5bc92d..0bb4730 100644
+ pax_close_kernel();
}
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
-index 04fb73b..368beca 100644
+index e13c4bf..3feaea7 100644
--- a/arch/arm64/Kconfig.debug
+++ b/arch/arm64/Kconfig.debug
@@ -6,6 +6,7 @@ config ARM64_PTDUMP
@@ -4762,7 +4716,7 @@ index b2ede967..865eed5 100644
#define user_addr_max get_fs
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
-index 354144e..f8c556b 100644
+index a6e757c..00fc586 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -132,7 +132,7 @@ static void __dma_free_coherent(struct device *dev, size_t size,
@@ -5036,10 +4990,10 @@ index 69952c18..4fa2908 100644
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
-index eb0249e..388ff32 100644
+index fb0515e..ca9715a 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
-@@ -519,6 +519,7 @@ config KEXEC
+@@ -518,6 +518,7 @@ config KEXEC
bool "kexec system call"
depends on !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
select KEXEC_CORE
@@ -5261,84 +5215,57 @@ index 4f3fb6cc..254055e 100644
})
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
-index b15933c..098b1c8 100644
+index 6ab0ae7..88f1b60 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
-@@ -484,15 +484,39 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
- }
-
+@@ -486,13 +486,13 @@ module_frob_arch_sections (Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings,
static inline int
-+in_init_rx (const struct module *mod, uint64_t addr)
-+{
-+ return addr - (uint64_t) mod->module_init_rx < mod->init_size_rx;
-+}
-+
-+static inline int
-+in_init_rw (const struct module *mod, uint64_t addr)
-+{
-+ return addr - (uint64_t) mod->module_init_rw < mod->init_size_rw;
-+}
-+
-+static inline int
in_init (const struct module *mod, uint64_t addr)
{
-- return addr - (uint64_t) mod->module_init < mod->init_size;
-+ return in_init_rx(mod, addr) || in_init_rw(mod, addr);
-+}
-+
-+static inline int
-+in_core_rx (const struct module *mod, uint64_t addr)
-+{
-+ return addr - (uint64_t) mod->module_core_rx < mod->core_size_rx;
-+}
-+
-+static inline int
-+in_core_rw (const struct module *mod, uint64_t addr)
-+{
-+ return addr - (uint64_t) mod->module_core_rw < mod->core_size_rw;
+- return addr - (uint64_t) mod->init_layout.base < mod->init_layout.size;
++ return within_module_init(addr, mod);
}
static inline int
in_core (const struct module *mod, uint64_t addr)
{
-- return addr - (uint64_t) mod->module_core < mod->core_size;
-+ return in_core_rx(mod, addr) || in_core_rw(mod, addr);
+- return addr - (uint64_t) mod->core_layout.base < mod->core_layout.size;
++ return within_module_core(addr, mod);
}
static inline int
-@@ -675,7 +699,14 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
- break;
+@@ -676,6 +676,14 @@ do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend,
case RV_BDREL:
-- val -= (uint64_t) (in_init(mod, val) ? mod->module_init : mod->module_core);
-+ if (in_init_rx(mod, val))
-+ val -= (uint64_t) mod->module_init_rx;
-+ else if (in_init_rw(mod, val))
-+ val -= (uint64_t) mod->module_init_rw;
-+ else if (in_core_rx(mod, val))
-+ val -= (uint64_t) mod->module_core_rx;
-+ else if (in_core_rw(mod, val))
-+ val -= (uint64_t) mod->module_core_rw;
+ val -= (uint64_t) (in_init(mod, val) ? mod->init_layout.base : mod->core_layout.base);
++ if (within_module_rx(val, &mod->init_layout))
++ val -= mod->init_layout.base_rx;
++ else if (within_module_rw(val, &mod->init_layout))
++ val -= mod->init_layout.base_rw;
++ else if (within_module_rx(val, &mod->core_layout))
++ val -= mod->core_layout.base_rx;
++ else if (within_module_rw(val, &mod->core_layout))
++ val -= mod->core_layout.base_rw;
break;
case RV_LTV:
-@@ -810,15 +841,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
+@@ -810,15 +818,15 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
* addresses have been selected...
*/
uint64_t gp;
-- if (mod->core_size > MAX_LTOFF)
-+ if (mod->core_size_rx + mod->core_size_rw > MAX_LTOFF)
+- if (mod->core_layout.size > MAX_LTOFF)
++ if (mod->core_layout.size_rx + mod->core_layout.size_rw > MAX_LTOFF)
/*
* This takes advantage of fact that SHF_ARCH_SMALL gets allocated
* at the end of the module.
*/
-- gp = mod->core_size - MAX_LTOFF / 2;
-+ gp = mod->core_size_rx + mod->core_size_rw - MAX_LTOFF / 2;
+- gp = mod->core_layout.size - MAX_LTOFF / 2;
++ gp = mod->core_layout.size_rx + mod->core_layout.size_rw - MAX_LTOFF / 2;
else
-- gp = mod->core_size / 2;
-- gp = (uint64_t) mod->module_core + ((gp + 7) & -8);
-+ gp = (mod->core_size_rx + mod->core_size_rw) / 2;
-+ gp = (uint64_t) mod->module_core_rx + ((gp + 7) & -8);
+- gp = mod->core_layout.size / 2;
+- gp = (uint64_t) mod->core_layout.base + ((gp + 7) & -8);
++ gp = (mod->core_layout.size_rx + mod->core_layout.size_rw) / 2;
++ gp = (uint64_t) mod->core_layout.base_rx + ((gp + 7) & -8);
mod->arch.gp = gp;
DEBUGP("%s: placing gp at 0x%lx\n", __func__, gp);
}
@@ -5594,10 +5521,10 @@ index 4efe96a..60e8699 100644
#define SMP_CACHE_BYTES L1_CACHE_BYTES
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index db45961..6932668 100644
+index d3da79d..e607104 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -2642,6 +2642,7 @@ source "kernel/Kconfig.preempt"
+@@ -2656,6 +2656,7 @@ source "kernel/Kconfig.preempt"
config KEXEC
bool "Kexec system call"
select KEXEC_CORE
@@ -6255,10 +6182,10 @@ index b4db69f..8f3b093 100644
#define SMP_CACHE_SHIFT L1_CACHE_SHIFT
#define SMP_CACHE_BYTES L1_CACHE_BYTES
diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
-index b01a6ff..aa29db0 100644
+index e090fc3..eae24400 100644
--- a/arch/mips/include/asm/elf.h
+++ b/arch/mips/include/asm/elf.h
-@@ -420,6 +420,13 @@ extern const char *__elf_platform;
+@@ -425,6 +425,13 @@ extern const char *__elf_platform;
#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
#endif
@@ -6418,7 +6345,7 @@ index b336037..5b874cc 100644
/*
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
-index 18826aa..f5a6216 100644
+index 9a4fe01..3aa92e9 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -20,6 +20,9 @@
@@ -6486,7 +6413,7 @@ index 095ecaf..f1da6ff 100644
likely(__access_ok((addr), (size), __access_mask))
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
-index 1188e00..41cf144 100644
+index 1b992c6..4f250db 100644
--- a/arch/mips/kernel/binfmt_elfn32.c
+++ b/arch/mips/kernel/binfmt_elfn32.c
@@ -50,6 +50,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
@@ -6504,7 +6431,7 @@ index 1188e00..41cf144 100644
#include <linux/module.h>
#include <linux/elfcore.h>
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
-index 9287678..f870e47 100644
+index abd3aff..ab1b84a 100644
--- a/arch/mips/kernel/binfmt_elfo32.c
+++ b/arch/mips/kernel/binfmt_elfo32.c
@@ -70,6 +70,13 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
@@ -6590,10 +6517,10 @@ index f63a289..53037c22 100644
/* Run the generated entry code */
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
-index f2975d4..f61d355 100644
+index eddd5fd..97314be 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
-@@ -541,18 +541,6 @@ out:
+@@ -539,18 +539,6 @@ out:
return pc;
}
@@ -6613,10 +6540,10 @@ index f2975d4..f61d355 100644
{
struct pt_regs *regs;
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
-index 4f0ac78..491124a 100644
+index a5279b2..50b73be 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
-@@ -873,6 +873,10 @@ long arch_ptrace(struct task_struct *child, long request,
+@@ -870,6 +870,10 @@ long arch_ptrace(struct task_struct *child, long request,
return ret;
}
@@ -6627,7 +6554,7 @@ index 4f0ac78..491124a 100644
/*
* Notification of system call entry/exit
* - triggered by current->work.syscall_trace
-@@ -891,6 +895,11 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
+@@ -888,6 +892,11 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)
tracehook_report_syscall_entry(regs))
ret = -1;
@@ -6640,21 +6567,21 @@ index 4f0ac78..491124a 100644
trace_sys_enter(regs, regs->regs[2]);
diff --git a/arch/mips/kernel/sync-r4k.c b/arch/mips/kernel/sync-r4k.c
-index 2242bdd..b284048 100644
+index 4472a7f..c5905e6 100644
--- a/arch/mips/kernel/sync-r4k.c
+++ b/arch/mips/kernel/sync-r4k.c
@@ -18,8 +18,8 @@
#include <asm/mipsregs.h>
- static atomic_t count_start_flag = ATOMIC_INIT(0);
+ static unsigned int initcount = 0;
-static atomic_t count_count_start = ATOMIC_INIT(0);
-static atomic_t count_count_stop = ATOMIC_INIT(0);
+static atomic_unchecked_t count_count_start = ATOMIC_INIT(0);
+static atomic_unchecked_t count_count_stop = ATOMIC_INIT(0);
- static atomic_t count_reference = ATOMIC_INIT(0);
#define COUNTON 100
-@@ -58,13 +58,13 @@ void synchronise_count_master(int cpu)
+ #define NR_LOOPS 3
+@@ -46,13 +46,13 @@ void synchronise_count_master(int cpu)
for (i = 0; i < NR_LOOPS; i++) {
/* slaves loop on '!= 2' */
@@ -6665,15 +6592,15 @@ index 2242bdd..b284048 100644
+ atomic_set_unchecked(&count_count_stop, 0);
smp_wmb();
- /* this lets the slaves write their count register */
+ /* Let the slave writes its count register */
- atomic_inc(&count_count_start);
+ atomic_inc_unchecked(&count_count_start);
+ /* Count will be initialised to current timer */
+ if (i == 1)
+@@ -67,11 +67,11 @@ void synchronise_count_master(int cpu)
/*
- * Everyone initialises count in the last loop:
-@@ -75,11 +75,11 @@ void synchronise_count_master(int cpu)
- /*
- * Wait for all slaves to leave the synchronization point:
+ * Wait for slave to leave the synchronization point:
*/
- while (atomic_read(&count_count_stop) != 1)
+ while (atomic_read_unchecked(&count_count_stop) != 1)
@@ -6686,8 +6613,8 @@ index 2242bdd..b284048 100644
}
/* Arrange for an interrupt in a short while */
write_c0_compare(read_c0_count() + COUNTON);
-@@ -112,8 +112,8 @@ void synchronise_count_slave(int cpu)
- initcount = atomic_read(&count_reference);
+@@ -96,8 +96,8 @@ void synchronise_count_slave(int cpu)
+ */
for (i = 0; i < NR_LOOPS; i++) {
- atomic_inc(&count_count_start);
@@ -6697,7 +6624,7 @@ index 2242bdd..b284048 100644
mb();
/*
-@@ -122,8 +122,8 @@ void synchronise_count_slave(int cpu)
+@@ -106,8 +106,8 @@ void synchronise_count_slave(int cpu)
if (i == NR_LOOPS-1)
write_c0_count(initcount);
@@ -6709,7 +6636,7 @@ index 2242bdd..b284048 100644
}
/* Arrange for an interrupt in a short while */
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
-index ca9a810..e00a026 100644
+index bf14da9..d1e0ded 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -697,7 +697,18 @@ asmlinkage void do_ov(struct pt_regs *regs)
@@ -6903,8 +6830,25 @@ index 4b88fa0..b16bc17 100644
tsk->thread.cp0_badvaddr = address;
tsk->thread.error_code = write;
if (show_unhandled_signals &&
+diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
+index 7e5fa09..65c1072 100644
+--- a/arch/mips/mm/init.c
++++ b/arch/mips/mm/init.c
+@@ -468,10 +468,10 @@ void __init mem_init(void)
+
+ #ifdef CONFIG_64BIT
+ if ((unsigned long) &_text > (unsigned long) CKSEG0)
+- /* The -4 is a hack so that user tools don't have to handle
++ /* The -0x2000-4 is a hack so that user tools don't have to handle
+ the overflow. */
+ kclist_add(&kcore_kseg0, (void *) CKSEG0,
+- 0x80000000 - 4, KCORE_TEXT);
++ 0x80000000 - 0x2000 - 4, KCORE_TEXT);
+ #endif
+ }
+ #endif /* !CONFIG_NEED_MULTIPLE_NODES */
diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c
-index 5c81fdd..db158d3 100644
+index 3530376..81fb96b 100644
--- a/arch/mips/mm/mmap.c
+++ b/arch/mips/mm/mmap.c
@@ -59,6 +59,7 @@ static unsigned long arch_get_unmapped_area_common(struct file *filp,
@@ -6978,7 +6922,7 @@ index 5c81fdd..db158d3 100644
-static inline unsigned long brk_rnd(void)
-{
-- unsigned long rnd = get_random_int();
+- unsigned long rnd = get_random_long();
-
- rnd = rnd << PAGE_SHIFT;
- /* 8MB for 32bit, 256MB for 64bit */
@@ -7120,6 +7064,19 @@ index bcb5df2..84fabd2 100644
#define L1_CACHE_WAYDISP 0x1000 /* distance from one way to the next */
#define L1_CACHE_TAG_VALID 0x00000001 /* cache tag valid bit */
+diff --git a/arch/nios2/lib/memset.c b/arch/nios2/lib/memset.c
+index c2cfcb1..2fcefe7 100644
+--- a/arch/nios2/lib/memset.c
++++ b/arch/nios2/lib/memset.c
+@@ -68,7 +68,7 @@ void *memset(void *s, int c, size_t count)
+ "=r" (charcnt), /* %1 Output */
+ "=r" (dwordcnt), /* %2 Output */
+ "=r" (fill8reg), /* %3 Output */
+- "=r" (wrkrega) /* %4 Output */
++ "=&r" (wrkrega) /* %4 Output only */
+ : "r" (c), /* %5 Input */
+ "0" (s), /* %0 Input/Output */
+ "1" (count) /* %1 Input/Output */
diff --git a/arch/openrisc/include/asm/cache.h b/arch/openrisc/include/asm/cache.h
index 4ce7a01..449202a 100644
--- a/arch/openrisc/include/asm/cache.h
@@ -7263,105 +7220,79 @@ index 1960b87..e8f57e3 100644
else
copy_from_user_overflow();
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
-index 3c63a82..b1d6ee9 100644
+index b9d75d9..dae5c9a 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
-@@ -98,16 +98,38 @@
-
- /* three functions to determine where in the module core
+@@ -100,14 +100,12 @@
* or init pieces the location is */
-+static inline int in_init_rx(struct module *me, void *loc)
-+{
-+ return (loc >= me->module_init_rx &&
-+ loc < (me->module_init_rx + me->init_size_rx));
-+}
-+
-+static inline int in_init_rw(struct module *me, void *loc)
-+{
-+ return (loc >= me->module_init_rw &&
-+ loc < (me->module_init_rw + me->init_size_rw));
-+}
-+
static inline int in_init(struct module *me, void *loc)
{
-- return (loc >= me->module_init &&
-- loc <= (me->module_init + me->init_size));
-+ return in_init_rx(me, loc) || in_init_rw(me, loc);
-+}
-+
-+static inline int in_core_rx(struct module *me, void *loc)
-+{
-+ return (loc >= me->module_core_rx &&
-+ loc < (me->module_core_rx + me->core_size_rx));
-+}
-+
-+static inline int in_core_rw(struct module *me, void *loc)
-+{
-+ return (loc >= me->module_core_rw &&
-+ loc < (me->module_core_rw + me->core_size_rw));
+- return (loc >= me->init_layout.base &&
+- loc <= (me->init_layout.base + me->init_layout.size));
++ within_module_init((unsigned long)loc, me);
}
static inline int in_core(struct module *me, void *loc)
{
-- return (loc >= me->module_core &&
-- loc <= (me->module_core + me->core_size));
-+ return in_core_rx(me, loc) || in_core_rw(me, loc);
+- return (loc >= me->core_layout.base &&
+- loc <= (me->core_layout.base + me->core_layout.size));
++ within_module_core((unsigned long)loc, me);
}
static inline int in_local(struct module *me, void *loc)
-@@ -367,13 +389,13 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
+@@ -367,13 +365,13 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
}
/* align things a bit */
-- me->core_size = ALIGN(me->core_size, 16);
-- me->arch.got_offset = me->core_size;
-- me->core_size += gots * sizeof(struct got_entry);
-+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
-+ me->arch.got_offset = me->core_size_rw;
-+ me->core_size_rw += gots * sizeof(struct got_entry);
-
-- me->core_size = ALIGN(me->core_size, 16);
-- me->arch.fdesc_offset = me->core_size;
-- me->core_size += fdescs * sizeof(Elf_Fdesc);
-+ me->core_size_rw = ALIGN(me->core_size_rw, 16);
-+ me->arch.fdesc_offset = me->core_size_rw;
-+ me->core_size_rw += fdescs * sizeof(Elf_Fdesc);
+- me->core_layout.size = ALIGN(me->core_layout.size, 16);
+- me->arch.got_offset = me->core_layout.size;
+- me->core_layout.size += gots * sizeof(struct got_entry);
++ me->core_layout.size_rw = ALIGN(me->core_layout.size_rw, 16);
++ me->arch.got_offset = me->core_layout.size_rw;
++ me->core_layout.size_rw += gots * sizeof(struct got_entry);
+
+- me->core_layout.size = ALIGN(me->core_layout.size, 16);
+- me->arch.fdesc_offset = me->core_layout.size;
+- me->core_layout.size += fdescs * sizeof(Elf_Fdesc);
++ me->core_layout.size_rw = ALIGN(me->core_layout.size_rw, 16);
++ me->arch.fdesc_offset = me->core_layout.size_rw;
++ me->core_layout.size_rw += fdescs * sizeof(Elf_Fdesc);
me->arch.got_max = gots;
me->arch.fdesc_max = fdescs;
-@@ -391,7 +413,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
+@@ -391,7 +389,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
BUG_ON(value == 0);
-- got = me->module_core + me->arch.got_offset;
-+ got = me->module_core_rw + me->arch.got_offset;
+- got = me->core_layout.base + me->arch.got_offset;
++ got = me->core_layout.base_rw + me->arch.got_offset;
for (i = 0; got[i].addr; i++)
if (got[i].addr == value)
goto out;
-@@ -409,7 +431,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
+@@ -409,7 +407,7 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend)
#ifdef CONFIG_64BIT
static Elf_Addr get_fdesc(struct module *me, unsigned long value)
{
-- Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset;
-+ Elf_Fdesc *fdesc = me->module_core_rw + me->arch.fdesc_offset;
+- Elf_Fdesc *fdesc = me->core_layout.base + me->arch.fdesc_offset;
++ Elf_Fdesc *fdesc = me->core_layout.base_rw + me->arch.fdesc_offset;
if (!value) {
printk(KERN_ERR "%s: zero OPD requested!\n", me->name);
-@@ -427,7 +449,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
+@@ -427,7 +425,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value)
/* Create new one */
fdesc->addr = value;
-- fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset;
-+ fdesc->gp = (Elf_Addr)me->module_core_rw + me->arch.got_offset;
+- fdesc->gp = (Elf_Addr)me->core_layout.base + me->arch.got_offset;
++ fdesc->gp = (Elf_Addr)me->core_layout.base_rw + me->arch.got_offset;
return (Elf_Addr)fdesc;
}
#endif /* CONFIG_64BIT */
-@@ -839,7 +861,7 @@ register_unwind_table(struct module *me,
+@@ -839,7 +837,7 @@ register_unwind_table(struct module *me,
table = (unsigned char *)sechdrs[me->arch.unwind_section].sh_addr;
end = table + sechdrs[me->arch.unwind_section].sh_size;
-- gp = (Elf_Addr)me->module_core + me->arch.got_offset;
-+ gp = (Elf_Addr)me->module_core_rw + me->arch.got_offset;
+- gp = (Elf_Addr)me->core_layout.base + me->arch.got_offset;
++ gp = (Elf_Addr)me->core_layout.base_rw + me->arch.got_offset;
DEBUGP("register_unwind_table(), sect = %d at 0x%p - 0x%p (gp=0x%lx)\n",
me->arch.unwind_section, table, end, gp);
@@ -7626,10 +7557,10 @@ index f906444..0bb73ae 100644
/*
* If for any reason at all we couldn't handle the fault, make
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
-index db49e0d..de977a0 100644
+index 9faa18c..6061610 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
-@@ -421,6 +421,7 @@ config KEXEC
+@@ -419,6 +419,7 @@ config KEXEC
bool "kexec system call"
depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
select KEXEC_CORE
@@ -8150,6 +8081,18 @@ index 55f106e..70cc82a 100644
" subf %0,%2,%0 \n\
2:"
: "=&r" (t)
+diff --git a/arch/powerpc/include/asm/book3s/32/hash.h b/arch/powerpc/include/asm/book3s/32/hash.h
+index 264b754..187b7f6 100644
+--- a/arch/powerpc/include/asm/book3s/32/hash.h
++++ b/arch/powerpc/include/asm/book3s/32/hash.h
+@@ -20,6 +20,7 @@
+ #define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */
+ #define _PAGE_USER 0x004 /* usermode access allowed */
+ #define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
++#define _PAGE_EXEC _PAGE_GUARDED
+ #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
+ #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
+ #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h
index 5f8229e..385d90b 100644
--- a/arch/powerpc/include/asm/cache.h
@@ -8313,7 +8256,7 @@ index 8565c25..2865190 100644
return (vm_flags & VM_SAO) ? __pgprot(_PAGE_SAO) : __pgprot(0);
}
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
-index 3140c19..0c43168 100644
+index e34124f..c146c14 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -230,8 +230,9 @@ extern long long virt_phys_offset;
@@ -8364,13 +8307,13 @@ index d908a46..3753f71 100644
#include <asm-generic/getorder.h>
diff --git a/arch/powerpc/include/asm/pgalloc-64.h b/arch/powerpc/include/asm/pgalloc-64.h
-index 4b0be20..c15a27d 100644
+index 69ef28a..216486d 100644
--- a/arch/powerpc/include/asm/pgalloc-64.h
+++ b/arch/powerpc/include/asm/pgalloc-64.h
@@ -54,6 +54,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
#ifndef CONFIG_PPC_64K_PAGES
- #define pgd_populate(MM, PGD, PUD) pgd_set(PGD, PUD)
+ #define pgd_populate(MM, PGD, PUD) pgd_set(PGD, (unsigned long)PUD)
+#define pgd_populate_kernel(MM, PGD, PUD) pgd_populate((MM), (PGD), (PUD))
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
@@ -8384,10 +8327,10 @@ index 4b0be20..c15a27d 100644
+ pud_populate(mm, pud, pmd);
+}
+
- #define pmd_populate(mm, pmd, pte_page) \
- pmd_populate_kernel(mm, pmd, page_address(pte_page))
- #define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, (unsigned long)(pte))
-@@ -173,6 +179,7 @@ extern void __tlb_remove_table(void *_table);
+ static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
+ pte_t *pte)
+ {
+@@ -172,6 +178,7 @@ extern void __tlb_remove_table(void *_table);
#endif
#define pud_populate(mm, pud, pmd) pud_set(pud, (unsigned long)pmd)
@@ -8396,31 +8339,19 @@ index 4b0be20..c15a27d 100644
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
pte_t *pte)
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
-index b64b421..cc8447a 100644
+index ac9fb11..4efa476 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
-@@ -2,6 +2,7 @@
+@@ -1,6 +1,7 @@
+ #ifndef _ASM_POWERPC_PGTABLE_H
#define _ASM_POWERPC_PGTABLE_H
- #ifdef __KERNEL__
+#include <linux/const.h>
#ifndef __ASSEMBLY__
#include <linux/mmdebug.h>
#include <linux/mmzone.h>
-diff --git a/arch/powerpc/include/asm/pte-hash32.h b/arch/powerpc/include/asm/pte-hash32.h
-index 62cfb0c..50c6402 100644
---- a/arch/powerpc/include/asm/pte-hash32.h
-+++ b/arch/powerpc/include/asm/pte-hash32.h
-@@ -20,6 +20,7 @@
- #define _PAGE_HASHPTE 0x002 /* hash_page has made an HPTE for this pte */
- #define _PAGE_USER 0x004 /* usermode access allowed */
- #define _PAGE_GUARDED 0x008 /* G: prohibit speculative access */
-+#define _PAGE_EXEC _PAGE_GUARDED
- #define _PAGE_COHERENT 0x010 /* M: enforce memory coherence (SMP systems) */
- #define _PAGE_NO_CACHE 0x020 /* I: cache inhibit */
- #define _PAGE_WRITETHRU 0x040 /* W: cache write-through */
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
-index 2220f7a..5a9420e 100644
+index c4cb2ff..b04130e 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -253,6 +253,7 @@
@@ -8537,7 +8468,7 @@ index 7efee4a..48d47cc 100644
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
_TIF_NOTIFY_RESUME | _TIF_UPROBE | \
diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
-index 2a8ebae..5643c6f 100644
+index b7c20f0..4adc0f1 100644
--- a/arch/powerpc/include/asm/uaccess.h
+++ b/arch/powerpc/include/asm/uaccess.h
@@ -58,6 +58,7 @@
@@ -8548,7 +8479,7 @@ index 2a8ebae..5643c6f 100644
#define access_ok(type, addr, size) \
(__chk_user_ptr(addr), \
__access_ok((__force unsigned long)(addr), (size), get_fs()))
-@@ -318,52 +319,6 @@ do { \
+@@ -303,52 +304,6 @@ do { \
extern unsigned long __copy_tofrom_user(void __user *to,
const void __user *from, unsigned long size);
@@ -8601,7 +8532,7 @@ index 2a8ebae..5643c6f 100644
static inline unsigned long __copy_from_user_inatomic(void *to,
const void __user *from, unsigned long n)
{
-@@ -387,6 +342,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
+@@ -372,6 +327,10 @@ static inline unsigned long __copy_from_user_inatomic(void *to,
if (ret == 0)
return 0;
}
@@ -8612,7 +8543,7 @@ index 2a8ebae..5643c6f 100644
return __copy_tofrom_user((__force void __user *)to, from, n);
}
-@@ -413,6 +372,10 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
+@@ -398,6 +357,10 @@ static inline unsigned long __copy_to_user_inatomic(void __user *to,
if (ret == 0)
return 0;
}
@@ -8623,7 +8554,7 @@ index 2a8ebae..5643c6f 100644
return __copy_tofrom_user(to, (__force const void __user *)from, n);
}
-@@ -430,6 +393,92 @@ static inline unsigned long __copy_to_user(void __user *to,
+@@ -415,6 +378,92 @@ static inline unsigned long __copy_to_user(void __user *to,
return __copy_to_user_inatomic(to, from, size);
}
@@ -8717,7 +8648,7 @@ index 2a8ebae..5643c6f 100644
static inline unsigned long clear_user(void __user *addr, unsigned long size)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
-index ba33693..d8db875 100644
+index 794f22a..f8de42b 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -14,6 +14,11 @@ CFLAGS_prom_init.o += -fPIC
@@ -8764,10 +8695,10 @@ index 488e631..6cdd928 100644
ld r4,_DAR(r1)
bl bad_page_fault
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
-index 0a0399c2..262a2e6 100644
+index 7716ceb..6018173 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
-@@ -1591,10 +1591,10 @@ handle_page_fault:
+@@ -1572,10 +1572,10 @@ handle_page_fault:
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD
@@ -8801,7 +8732,7 @@ index 290559d..0094ddb 100644
#endif
}
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
-index c94d2e0..992a9ce 100644
+index 2c01665..85a54a8 100644
--- a/arch/powerpc/kernel/module_32.c
+++ b/arch/powerpc/kernel/module_32.c
@@ -158,7 +158,7 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
@@ -8817,14 +8748,14 @@ index c94d2e0..992a9ce 100644
pr_debug("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
/* Init, or core PLT? */
-- if (location >= mod->module_core
-- && location < mod->module_core + mod->core_size)
-+ if ((location >= mod->module_core_rx && location < mod->module_core_rx + mod->core_size_rx) ||
-+ (location >= mod->module_core_rw && location < mod->module_core_rw + mod->core_size_rw))
+- if (location >= mod->core_layout.base
+- && location < mod->core_layout.base + mod->core_layout.size)
++ if ((location >= mod->core_layout.base_rx && location < mod->core_layout.base_rx + mod->core_layout.size_rx) ||
++ (location >= mod->core_layout.base_rw && location < mod->core_layout.base_rw + mod->core_layout.size_rw))
entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr;
- else
-+ else if ((location >= mod->module_init_rx && location < mod->module_init_rx + mod->init_size_rx) ||
-+ (location >= mod->module_init_rw && location < mod->module_init_rw + mod->init_size_rw))
++ else if ((location >= mod->init_layout.base_rx && location < mod->init_layout.base_rx + mod->init_layout.size_rx) ||
++ (location >= mod->init_layout.base_rw && location < mod->init_layout.base_rw + mod->init_layout.size_rw))
entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;
+ else {
+ printk(KERN_ERR "%s: invalid R_PPC_REL24 entry found\n", mod->name);
@@ -8837,16 +8768,16 @@ index c94d2e0..992a9ce 100644
}
#ifdef CONFIG_DYNAMIC_FTRACE
module->arch.tramp =
-- do_plt_call(module->module_core,
-+ do_plt_call(module->module_core_rx,
+- do_plt_call(module->core_layout.base,
++ do_plt_call(module->core_layout.base_rx,
(unsigned long)ftrace_caller,
sechdrs, module);
#endif
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
-index ef2ad2d..645e131 100644
+index 54ed9c7..f7d6e72 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
-@@ -1069,8 +1069,8 @@ void show_regs(struct pt_regs * regs)
+@@ -1185,8 +1185,8 @@ void show_regs(struct pt_regs * regs)
* Lookup NIP late so we have the best change of getting the
* above info out without failing
*/
@@ -8857,7 +8788,7 @@ index ef2ad2d..645e131 100644
#endif
show_stack(current, (unsigned long *) regs->gpr[1]);
if (!user_mode(regs))
-@@ -1586,10 +1586,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
+@@ -1695,10 +1695,10 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
newsp = stack[0];
ip = stack[STACK_FRAME_LR_SAVE];
if (!firstframe || ip != lr) {
@@ -8870,7 +8801,7 @@ index ef2ad2d..645e131 100644
(void *)current->ret_stack[curr_frame].ret);
curr_frame--;
}
-@@ -1609,7 +1609,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
+@@ -1718,7 +1718,7 @@ void show_stack(struct task_struct *tsk, unsigned long *stack)
struct pt_regs *regs = (struct pt_regs *)
(sp + STACK_FRAME_OVERHEAD);
lr = regs->link;
@@ -8879,7 +8810,7 @@ index ef2ad2d..645e131 100644
regs->trap, (void *)regs->nip, (void *)lr);
firstframe = 1;
}
-@@ -1645,49 +1645,3 @@ void notrace __ppc64_runlatch_off(void)
+@@ -1754,49 +1754,3 @@ void notrace __ppc64_runlatch_off(void)
mtspr(SPRN_CTRLT, ctrl);
}
#endif /* CONFIG_PPC64 */
@@ -8897,9 +8828,9 @@ index ef2ad2d..645e131 100644
-
- /* 8MB for 32bit, 1GB for 64bit */
- if (is_32bit_task())
-- rnd = (long)(get_random_int() % (1<<(23-PAGE_SHIFT)));
+- rnd = (get_random_long() % (1UL<<(23-PAGE_SHIFT)));
- else
-- rnd = (long)(get_random_int() % (1<<(30-PAGE_SHIFT)));
+- rnd = (get_random_long() % (1UL<<(30-PAGE_SHIFT)));
-
- return rnd << PAGE_SHIFT;
-}
@@ -8930,10 +8861,10 @@ index ef2ad2d..645e131 100644
-}
-
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
-index 737c0d0..59c7417 100644
+index 30a03c0..e2d507b 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
-@@ -1800,6 +1800,10 @@ static int do_seccomp(struct pt_regs *regs)
+@@ -1801,6 +1801,10 @@ static int do_seccomp(struct pt_regs *regs)
static inline int do_seccomp(struct pt_regs *regs) { return 0; }
#endif /* CONFIG_SECCOMP */
@@ -8944,7 +8875,7 @@ index 737c0d0..59c7417 100644
/**
* do_syscall_trace_enter() - Do syscall tracing on kernel entry.
* @regs: the pt_regs of the task to trace (current)
-@@ -1828,6 +1832,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
+@@ -1829,6 +1833,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
if (do_seccomp(regs))
return -1;
@@ -8956,7 +8887,7 @@ index 737c0d0..59c7417 100644
if (test_thread_flag(TIF_SYSCALL_TRACE)) {
/*
* The tracer may decide to abort the syscall, if so tracehook
-@@ -1870,6 +1879,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
+@@ -1871,6 +1880,11 @@ void do_syscall_trace_leave(struct pt_regs *regs)
{
int step;
@@ -8969,10 +8900,10 @@ index 737c0d0..59c7417 100644
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
-index ef7c24e..755a485 100644
+index b6aa378..a491f51 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
-@@ -1018,7 +1018,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
+@@ -1000,7 +1000,7 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset,
/* Save user registers on the stack */
frame = &rt_sf->uc.uc_mcontext;
addr = frame;
@@ -8982,10 +8913,10 @@ index ef7c24e..755a485 100644
tramp = current->mm->context.vdso_base + vdso32_rt_sigtramp;
} else {
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
-index c676ece..188c057 100644
+index 2552079..a290dc8a 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
-@@ -769,7 +769,7 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
+@@ -751,7 +751,7 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs
current->thread.fp_state.fpscr = 0;
/* Set up to return from userspace. */
@@ -8995,7 +8926,7 @@ index c676ece..188c057 100644
} else {
err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
-index 37de90f..12472ac 100644
+index b6becc7..31a89c4 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -36,6 +36,7 @@
@@ -9053,7 +8984,7 @@ index 37de90f..12472ac 100644
* has no FPU, in that case the reason flags will be 0 */
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
-index b457bfa..9018cde 100644
+index def1b8b..51ae209 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -34,6 +34,7 @@
@@ -9218,7 +9149,7 @@ index a67c6d7..a662e6d 100644
goto bail;
}
diff --git a/arch/powerpc/mm/mmap.c b/arch/powerpc/mm/mmap.c
-index 0f0502e..bc3e7a3 100644
+index 4087705..7e75693 100644
--- a/arch/powerpc/mm/mmap.c
+++ b/arch/powerpc/mm/mmap.c
@@ -86,6 +86,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
@@ -9255,7 +9186,7 @@ index 0f0502e..bc3e7a3 100644
}
}
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
-index 0f432a7..abfe841 100644
+index 42954f0..a8252e2 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -105,7 +105,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr,
@@ -9267,7 +9198,7 @@ index 0f432a7..abfe841 100644
}
static int slice_low_has_vma(struct mm_struct *mm, unsigned long slice)
-@@ -277,6 +277,12 @@ static unsigned long slice_find_area_bottomup(struct mm_struct *mm,
+@@ -276,6 +276,12 @@ static unsigned long slice_find_area_bottomup(struct mm_struct *mm,
info.align_offset = 0;
addr = TASK_UNMAPPED_BASE;
@@ -9280,7 +9211,7 @@ index 0f432a7..abfe841 100644
while (addr < TASK_SIZE) {
info.low_limit = addr;
if (!slice_scan_available(addr, available, 1, &addr))
-@@ -410,6 +416,11 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
+@@ -409,6 +415,11 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
if (fixed && addr > (mm->task_size - len))
return -ENOMEM;
@@ -9292,8 +9223,23 @@ index 0f432a7..abfe841 100644
/* If hint, make sure it matches our alignment restrictions */
if (!fixed && addr) {
addr = _ALIGN_UP(addr, 1ul << pshift);
+@@ -554,10 +565,10 @@ unsigned long arch_get_unmapped_area(struct file *filp,
+ }
+
+ unsigned long arch_get_unmapped_area_topdown(struct file *filp,
+- const unsigned long addr0,
+- const unsigned long len,
+- const unsigned long pgoff,
+- const unsigned long flags)
++ unsigned long addr0,
++ unsigned long len,
++ unsigned long pgoff,
++ unsigned long flags)
+ {
+ return slice_get_unmapped_area(addr0, len, flags,
+ current->mm->context.user_psize, 1);
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
-index 5038fd5..87a2033 100644
+index 2936a00..2e73ed6 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -263,9 +263,9 @@ spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
@@ -9309,10 +9255,10 @@ index 5038fd5..87a2033 100644
struct spu_context *ctx = vma->vm_file->private_data;
unsigned long offset = address - vma->vm_start;
diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug
-index c56878e..073d04e 100644
+index 26c5d5be..a308c28 100644
--- a/arch/s390/Kconfig.debug
+++ b/arch/s390/Kconfig.debug
-@@ -21,6 +21,7 @@ config S390_PTDUMP
+@@ -9,6 +9,7 @@ config S390_PTDUMP
bool "Export kernel pagetable layout to userspace via debugfs"
depends on DEBUG_KERNEL
select DEBUG_FS
@@ -9356,10 +9302,10 @@ index 4d7ccac..d03d0ad 100644
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
-index bab6739..f0d5493 100644
+index 563ab9f..65d8bd4 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
-@@ -163,6 +163,13 @@ extern unsigned int vdso_enabled;
+@@ -167,6 +167,13 @@ extern unsigned int vdso_enabled;
(STACK_TOP / 3 * 2) : \
(STACK_TOP / 3 * 2) & ~((1UL << 32) - 1))
@@ -9426,23 +9372,23 @@ index 9dd4cc4..36f4b84 100644
return n;
}
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
-index 0c1a679..e1df357 100644
+index 7873e17..d21af5b 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -159,11 +159,11 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
/* Increase core size by size of got & plt and set start
offsets for got and plt. */
-- me->core_size = ALIGN(me->core_size, 4);
-- me->arch.got_offset = me->core_size;
-- me->core_size += me->arch.got_size;
-- me->arch.plt_offset = me->core_size;
-- me->core_size += me->arch.plt_size;
-+ me->core_size_rw = ALIGN(me->core_size_rw, 4);
-+ me->arch.got_offset = me->core_size_rw;
-+ me->core_size_rw += me->arch.got_size;
-+ me->arch.plt_offset = me->core_size_rx;
-+ me->core_size_rx += me->arch.plt_size;
+- me->core_layout.size = ALIGN(me->core_layout.size, 4);
+- me->arch.got_offset = me->core_layout.size;
+- me->core_layout.size += me->arch.got_size;
+- me->arch.plt_offset = me->core_layout.size;
+- me->core_layout.size += me->arch.plt_size;
++ me->core_layout.size_rw = ALIGN(me->core_layout.size_rw, 4);
++ me->arch.got_offset = me->core_layout.size_rw;
++ me->core_layout.size_rw += me->arch.got_size;
++ me->arch.plt_offset = me->core_layout.size_rx;
++ me->core_layout.size_rx += me->arch.plt_size;
return 0;
}
@@ -9450,8 +9396,8 @@ index 0c1a679..e1df357 100644
if (info->got_initialized == 0) {
Elf_Addr *gotent;
-- gotent = me->module_core + me->arch.got_offset +
-+ gotent = me->module_core_rw + me->arch.got_offset +
+- gotent = me->core_layout.base + me->arch.got_offset +
++ gotent = me->core_layout.base_rw + me->arch.got_offset +
info->got_offset;
*gotent = val;
info->got_initialized = 1;
@@ -9459,8 +9405,8 @@ index 0c1a679..e1df357 100644
rc = apply_rela_bits(loc, val, 0, 64, 0);
else if (r_type == R_390_GOTENT ||
r_type == R_390_GOTPLTENT) {
-- val += (Elf_Addr) me->module_core - loc;
-+ val += (Elf_Addr) me->module_core_rw - loc;
+- val += (Elf_Addr) me->core_layout.base - loc;
++ val += (Elf_Addr) me->core_layout.base_rw - loc;
rc = apply_rela_bits(loc, val, 1, 32, 1);
}
break;
@@ -9468,8 +9414,8 @@ index 0c1a679..e1df357 100644
case R_390_PLTOFF64: /* 16 bit offset from GOT to PLT. */
if (info->plt_initialized == 0) {
unsigned int *ip;
-- ip = me->module_core + me->arch.plt_offset +
-+ ip = me->module_core_rx + me->arch.plt_offset +
+- ip = me->core_layout.base + me->arch.plt_offset +
++ ip = me->core_layout.base_rx + me->arch.plt_offset +
info->plt_offset;
ip[0] = 0x0d10e310; /* basr 1,0; lg 1,10(1); br 1 */
ip[1] = 0x100a0004;
@@ -9477,8 +9423,8 @@ index 0c1a679..e1df357 100644
val - loc + 0xffffUL < 0x1ffffeUL) ||
(r_type == R_390_PLT32DBL &&
val - loc + 0xffffffffULL < 0x1fffffffeULL)))
-- val = (Elf_Addr) me->module_core +
-+ val = (Elf_Addr) me->module_core_rx +
+- val = (Elf_Addr) me->core_layout.base +
++ val = (Elf_Addr) me->core_layout.base_rx +
me->arch.plt_offset +
info->plt_offset;
val += rela->r_addend - loc;
@@ -9486,8 +9432,8 @@ index 0c1a679..e1df357 100644
case R_390_GOTOFF32: /* 32 bit offset to GOT. */
case R_390_GOTOFF64: /* 64 bit offset to GOT. */
val = val + rela->r_addend -
-- ((Elf_Addr) me->module_core + me->arch.got_offset);
-+ ((Elf_Addr) me->module_core_rw + me->arch.got_offset);
+- ((Elf_Addr) me->core_layout.base + me->arch.got_offset);
++ ((Elf_Addr) me->core_layout.base_rw + me->arch.got_offset);
if (r_type == R_390_GOTOFF16)
rc = apply_rela_bits(loc, val, 0, 16, 0);
else if (r_type == R_390_GOTOFF32)
@@ -9495,13 +9441,13 @@ index 0c1a679..e1df357 100644
break;
case R_390_GOTPC: /* 32 bit PC relative offset to GOT. */
case R_390_GOTPCDBL: /* 32 bit PC rel. off. to GOT shifted by 1. */
-- val = (Elf_Addr) me->module_core + me->arch.got_offset +
-+ val = (Elf_Addr) me->module_core_rw + me->arch.got_offset +
+- val = (Elf_Addr) me->core_layout.base + me->arch.got_offset +
++ val = (Elf_Addr) me->core_layout.base_rw + me->arch.got_offset +
rela->r_addend - loc;
if (r_type == R_390_GOTPC)
rc = apply_rela_bits(loc, val, 1, 32, 0);
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
-index 114ee8b..7d1123f 100644
+index 2bba7df..587489f 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -233,23 +233,3 @@ unsigned long get_wchan(struct task_struct *p)
@@ -9529,9 +9475,22 @@ index 114ee8b..7d1123f 100644
- return (ret > mm->brk) ? ret : mm->brk;
-}
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
-index ea01477..ff5ec44 100644
+index 45c4daa..42703fb 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
+@@ -200,9 +200,9 @@ s390_get_unmapped_area(struct file *filp, unsigned long addr,
+ }
+
+ static unsigned long
+-s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr,
+- const unsigned long len, const unsigned long pgoff,
+- const unsigned long flags)
++s390_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
++ unsigned long len, unsigned long pgoff,
++ unsigned long flags)
+ {
+ struct mm_struct *mm = current->mm;
+ unsigned long area;
@@ -229,6 +229,10 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
{
unsigned long random_factor = 0UL;
@@ -9623,7 +9582,7 @@ index ef9e555..331bd29 100644
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c
-index 6777177..cb5e44f 100644
+index 6777177..d44b592 100644
--- a/arch/sh/mm/mmap.c
+++ b/arch/sh/mm/mmap.c
@@ -36,6 +36,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
@@ -9662,7 +9621,18 @@ index 6777177..cb5e44f 100644
info.high_limit = TASK_SIZE;
info.align_mask = do_colour_align ? (PAGE_MASK & shm_align_mask) : 0;
info.align_offset = pgoff << PAGE_SHIFT;
-@@ -85,6 +89,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -77,14 +81,15 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
+ }
+
+ unsigned long
+-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+- const unsigned long len, const unsigned long pgoff,
+- const unsigned long flags)
++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
++ unsigned long len, unsigned long pgoff,
++ unsigned long flags)
+ {
+ struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
int do_colour_align;
@@ -10232,7 +10202,7 @@ index bd56c28..4b63d83 100644
#include <asm/uaccess_64.h>
#else
diff --git a/arch/sparc/include/asm/uaccess_32.h b/arch/sparc/include/asm/uaccess_32.h
-index 64ee103..388aef0 100644
+index 57aca27..a87e6eb 100644
--- a/arch/sparc/include/asm/uaccess_32.h
+++ b/arch/sparc/include/asm/uaccess_32.h
@@ -47,6 +47,7 @@
@@ -10243,7 +10213,7 @@ index 64ee103..388aef0 100644
#define access_ok(type, addr, size) \
({ (void)(type); __access_ok((unsigned long)(addr), size); })
-@@ -313,27 +314,46 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon
+@@ -248,27 +249,46 @@ unsigned long __copy_user(void __user *to, const void __user *from, unsigned lon
static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -10295,7 +10265,7 @@ index 64ee103..388aef0 100644
}
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
-index ea6e9a2..5703598 100644
+index e9a51d6..3ef910c 100644
--- a/arch/sparc/include/asm/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
@@ -10,6 +10,7 @@
@@ -10318,7 +10288,7 @@ index ea6e9a2..5703598 100644
static inline int access_ok(int type, const void __user * addr, unsigned long size)
{
return 1;
-@@ -250,8 +256,15 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from,
+@@ -210,8 +216,15 @@ unsigned long copy_from_user_fixup(void *to, const void __user *from,
static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long size)
{
@@ -10335,7 +10305,7 @@ index ea6e9a2..5703598 100644
if (unlikely(ret))
ret = copy_from_user_fixup(to, from, size);
-@@ -267,8 +280,15 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from,
+@@ -227,8 +240,15 @@ unsigned long copy_to_user_fixup(void __user *to, const void *from,
static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long size)
{
@@ -10541,7 +10511,7 @@ index 646988d..b88905f 100644
info.flags = 0;
info.length = len;
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
-index c690c8e..1d5798e 100644
+index b489e97..44620ad 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -89,13 +89,14 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
@@ -10603,7 +10573,19 @@ index c690c8e..1d5798e 100644
info.high_limit = task_size;
addr = vm_unmapped_area(&info);
}
-@@ -150,6 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -141,15 +152,16 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
+ }
+
+ unsigned long
+-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+- const unsigned long len, const unsigned long pgoff,
+- const unsigned long flags)
++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
++ unsigned long len, unsigned long pgoff,
++ unsigned long flags)
+ {
+ struct vm_area_struct *vma;
+ struct mm_struct *mm = current->mm;
unsigned long task_size = STACK_TOP32;
unsigned long addr = addr0;
int do_color_align;
@@ -10676,7 +10658,7 @@ index c690c8e..1d5798e 100644
+#endif
+
if (current->flags & PF_RANDOMIZE) {
- unsigned long val = get_random_int();
+ unsigned long val = get_random_long();
if (test_thread_flag(TIF_32BIT))
@@ -275,7 +301,7 @@ static unsigned long mmap_rnd(void)
@@ -10714,7 +10696,7 @@ index c690c8e..1d5798e 100644
}
}
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S
-index bb00089..e0ea580 100644
+index c4a1b5c..c5e0ef3 100644
--- a/arch/sparc/kernel/syscalls.S
+++ b/arch/sparc/kernel/syscalls.S
@@ -62,7 +62,7 @@ sys32_rt_sigreturn:
@@ -10726,7 +10708,7 @@ index bb00089..e0ea580 100644
be,pt %icc, rtrap
nop
call syscall_trace_leave
-@@ -194,7 +194,7 @@ linux_sparc_syscall32:
+@@ -230,7 +230,7 @@ linux_sparc_syscall32:
srl %i3, 0, %o3 ! IEU0
srl %i2, 0, %o2 ! IEU0 Group
@@ -10735,7 +10717,7 @@ index bb00089..e0ea580 100644
bne,pn %icc, linux_syscall_trace32 ! CTI
mov %i0, %l5 ! IEU1
5: call %l7 ! CTI Group brk forced
-@@ -218,7 +218,7 @@ linux_sparc_syscall:
+@@ -254,7 +254,7 @@ linux_sparc_syscall:
mov %i3, %o3 ! IEU1
mov %i4, %o4 ! IEU0 Group
@@ -10744,7 +10726,7 @@ index bb00089..e0ea580 100644
bne,pn %icc, linux_syscall_trace ! CTI Group
mov %i0, %l5 ! IEU0
2: call %l7 ! CTI Group brk forced
-@@ -233,7 +233,7 @@ ret_sys_call:
+@@ -269,7 +269,7 @@ ret_sys_call:
cmp %o0, -ERESTART_RESTARTBLOCK
bgeu,pn %xcc, 1f
@@ -11478,7 +11460,7 @@ index c399e7b..2387414 100644
if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
-index dbabe57..d34d315 100644
+index cb841a3..f2061fb 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -23,6 +23,9 @@
@@ -11500,7 +11482,7 @@ index dbabe57..d34d315 100644
printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr);
dump_stack();
unhandled_fault(regs->tpc, current, regs);
-@@ -279,6 +282,466 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs)
+@@ -276,6 +279,466 @@ static void noinline __kprobes bogus_32bit_fault_tpc(struct pt_regs *regs)
show_regs(regs);
}
@@ -11967,7 +11949,7 @@ index dbabe57..d34d315 100644
asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
{
enum ctx_state prev_state = exception_enter();
-@@ -353,6 +816,29 @@ retry:
+@@ -350,6 +813,29 @@ retry:
if (!vma)
goto bad_area;
@@ -11998,7 +11980,7 @@ index dbabe57..d34d315 100644
* load/store/atomic was a write or not, it only says that there
* was no match. So in such a case we (carefully) read the
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c
-index 131eaf4..285ea31 100644
+index 131eaf4..4ad6678 100644
--- a/arch/sparc/mm/hugetlbpage.c
+++ b/arch/sparc/mm/hugetlbpage.c
@@ -25,8 +25,10 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp,
@@ -12037,13 +12019,19 @@ index 131eaf4..285ea31 100644
info.high_limit = task_size;
addr = vm_unmapped_area(&info);
}
-@@ -55,7 +64,8 @@ static unsigned long
- hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
- const unsigned long len,
- const unsigned long pgoff,
+@@ -52,10 +61,11 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *filp,
+ }
+
+ static unsigned long
+-hugetlb_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+- const unsigned long len,
+- const unsigned long pgoff,
- const unsigned long flags)
-+ const unsigned long flags,
-+ const unsigned long offset)
++hugetlb_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
++ unsigned long len,
++ unsigned long pgoff,
++ unsigned long flags,
++ unsigned long offset)
{
struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
@@ -12104,7 +12092,7 @@ index 131eaf4..285ea31 100644
pte_t *huge_pte_alloc(struct mm_struct *mm,
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
-index 3025bd5..4934c29 100644
+index 6f21685..5831fed 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -189,9 +189,9 @@ unsigned long sparc64_kern_sec_context __read_mostly;
@@ -12142,10 +12130,10 @@ index 3025bd5..4934c29 100644
#endif /* CONFIG_DEBUG_DCFLUSH */
}
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
-index 8ec7a45..b0c6dc1 100644
+index de4a4ff..477c014 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
-@@ -205,6 +205,7 @@ source "kernel/Kconfig.hz"
+@@ -203,6 +203,7 @@ source "kernel/Kconfig.hz"
config KEXEC
bool "kexec system call"
select KEXEC_CORE
@@ -12276,7 +12264,7 @@ index 2e0a6b1..a64d0f5 100644
#endif
diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
-index 71c5d13..4c7b9f1 100644
+index f878bec..ca09300 100644
--- a/arch/um/include/asm/page.h
+++ b/arch/um/include/asm/page.h
@@ -14,6 +14,9 @@
@@ -12290,7 +12278,7 @@ index 71c5d13..4c7b9f1 100644
struct page;
diff --git a/arch/um/include/asm/pgtable-3level.h b/arch/um/include/asm/pgtable-3level.h
-index 2b4274e..754fe06 100644
+index bae8523..ba9484b 100644
--- a/arch/um/include/asm/pgtable-3level.h
+++ b/arch/um/include/asm/pgtable-3level.h
@@ -58,6 +58,7 @@
@@ -12346,10 +12334,10 @@ index ad8f795..2c7eec6 100644
/*
* Memory returned by kmalloc() may be used for DMA, so we must make
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
-index 436639a..3d211bb 100644
+index 3bf45a0..7b04039 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
-@@ -36,14 +36,13 @@ config X86
+@@ -38,14 +38,13 @@ config X86
select ARCH_MIGHT_HAVE_PC_SERIO
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT
@@ -12365,7 +12353,7 @@ index 436639a..3d211bb 100644
select ARCH_WANT_FRAME_POINTERS
select ARCH_WANT_IPC_PARSE_VERSION if X86_32
select ARCH_WANT_OPTIONAL_GPIOLIB
-@@ -87,7 +86,7 @@ config X86
+@@ -91,7 +90,7 @@ config X86
select HAVE_ARCH_TRACEHOOK
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
select HAVE_BPF_JIT if X86_64
@@ -12374,7 +12362,7 @@ index 436639a..3d211bb 100644
select HAVE_CMPXCHG_DOUBLE
select HAVE_CMPXCHG_LOCAL
select HAVE_CONTEXT_TRACKING if X86_64
-@@ -276,7 +275,7 @@ config X86_64_SMP
+@@ -290,7 +289,7 @@ config X86_64_SMP
config X86_32_LAZY_GS
def_bool y
@@ -12383,7 +12371,7 @@ index 436639a..3d211bb 100644
config ARCH_HWEIGHT_CFLAGS
string
-@@ -648,6 +647,7 @@ config SCHED_OMIT_FRAME_POINTER
+@@ -674,6 +673,7 @@ config SCHED_OMIT_FRAME_POINTER
menuconfig HYPERVISOR_GUEST
bool "Linux guest support"
@@ -12391,7 +12379,7 @@ index 436639a..3d211bb 100644
---help---
Say Y here to enable options for running Linux under various hyper-
visors. This option enables basic hypervisor detection and platform
-@@ -1039,6 +1039,7 @@ config VM86
+@@ -1073,6 +1073,7 @@ config VM86
config X86_16BIT
bool "Enable support for 16-bit segments" if EXPERT
@@ -12399,7 +12387,7 @@ index 436639a..3d211bb 100644
default y
depends on MODIFY_LDT_SYSCALL
---help---
-@@ -1193,6 +1194,7 @@ choice
+@@ -1227,6 +1228,7 @@ choice
config NOHIGHMEM
bool "off"
@@ -12407,7 +12395,7 @@ index 436639a..3d211bb 100644
---help---
Linux can use up to 64 Gigabytes of physical memory on x86 systems.
However, the address space of 32-bit x86 processors is only 4
-@@ -1229,6 +1231,7 @@ config NOHIGHMEM
+@@ -1263,6 +1265,7 @@ config NOHIGHMEM
config HIGHMEM4G
bool "4GB"
@@ -12415,7 +12403,7 @@ index 436639a..3d211bb 100644
---help---
Select this if you have a 32-bit processor and between 1 and 4
gigabytes of physical RAM.
-@@ -1281,7 +1284,7 @@ config PAGE_OFFSET
+@@ -1315,7 +1318,7 @@ config PAGE_OFFSET
hex
default 0xB0000000 if VMSPLIT_3G_OPT
default 0x80000000 if VMSPLIT_2G
@@ -12424,7 +12412,7 @@ index 436639a..3d211bb 100644
default 0x40000000 if VMSPLIT_1G
default 0xC0000000
depends on X86_32
-@@ -1302,7 +1305,6 @@ config X86_PAE
+@@ -1336,7 +1339,6 @@ config X86_PAE
config ARCH_PHYS_ADDR_T_64BIT
def_bool y
@@ -12432,7 +12420,7 @@ index 436639a..3d211bb 100644
config ARCH_DMA_ADDR_T_64BIT
def_bool y
-@@ -1433,7 +1435,7 @@ config ARCH_PROC_KCORE_TEXT
+@@ -1467,7 +1469,7 @@ config ARCH_PROC_KCORE_TEXT
config ILLEGAL_POINTER_VALUE
hex
@@ -12441,7 +12429,7 @@ index 436639a..3d211bb 100644
default 0xdead000000000000 if X86_64
source "mm/Kconfig"
-@@ -1742,6 +1744,7 @@ source kernel/Kconfig.hz
+@@ -1776,6 +1778,7 @@ source kernel/Kconfig.hz
config KEXEC
bool "kexec system call"
select KEXEC_CORE
@@ -12449,7 +12437,7 @@ index 436639a..3d211bb 100644
---help---
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
-@@ -1924,7 +1927,9 @@ config X86_NEED_RELOCS
+@@ -1958,7 +1961,9 @@ config X86_NEED_RELOCS
config PHYSICAL_ALIGN
hex "Alignment value to which kernel should be aligned"
@@ -12460,7 +12448,7 @@ index 436639a..3d211bb 100644
range 0x2000 0x1000000 if X86_32
range 0x200000 0x1000000 if X86_64
---help---
-@@ -2007,6 +2012,7 @@ config COMPAT_VDSO
+@@ -2041,6 +2046,7 @@ config COMPAT_VDSO
def_bool n
prompt "Disable the 32-bit vDSO (needed for glibc 2.3.3)"
depends on X86_32 || IA32_EMULATION
@@ -12468,7 +12456,7 @@ index 436639a..3d211bb 100644
---help---
Certain buggy versions of glibc will crash if they are
presented with a 32-bit vDSO that is not mapped at the address
-@@ -2047,15 +2053,6 @@ choice
+@@ -2081,15 +2087,6 @@ choice
If unsure, select "Emulate".
@@ -12484,7 +12472,7 @@ index 436639a..3d211bb 100644
config LEGACY_VSYSCALL_EMULATE
bool "Emulate"
help
-@@ -2136,6 +2133,22 @@ config MODIFY_LDT_SYSCALL
+@@ -2170,6 +2167,22 @@ config MODIFY_LDT_SYSCALL
Saying 'N' here may make sense for embedded or server kernels.
@@ -12539,18 +12527,18 @@ index 3ba5ff2..44bdacc 100644
config X86_MINIMUM_CPU_FAMILY
int
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
-index 137dfa9..6efdd4e 100644
+index 9b18ed9..9528749 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
-@@ -72,6 +72,7 @@ config X86_PTDUMP
- bool "Export kernel pagetable layout to userspace via debugfs"
+@@ -55,6 +55,7 @@ config X86_PTDUMP
+ tristate "Export kernel pagetable layout to userspace via debugfs"
depends on DEBUG_KERNEL
select DEBUG_FS
+ depends on !GRKERNSEC_KMEM
select X86_PTDUMP_CORE
---help---
Say Y here if you want to show the kernel pagetable layout in a
-@@ -94,7 +95,7 @@ config EFI_PGT_DUMP
+@@ -77,7 +78,7 @@ config EFI_PGT_DUMP
config DEBUG_RODATA
bool "Write protect kernel read-only data structures"
default y
@@ -12559,7 +12547,7 @@ index 137dfa9..6efdd4e 100644
---help---
Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const
-@@ -140,7 +141,7 @@ config DEBUG_WX
+@@ -123,7 +124,7 @@ config DEBUG_WX
config DEBUG_SET_MODULE_RONX
bool "Set loadable kernel module data as NX and text as RO"
@@ -12568,7 +12556,7 @@ index 137dfa9..6efdd4e 100644
---help---
This option helps catch unintended modifications to loadable
kernel module's text and read-only data. It also prevents execution
-@@ -392,6 +393,7 @@ config X86_DEBUG_FPU
+@@ -375,6 +376,7 @@ config X86_DEBUG_FPU
config PUNIT_ATOM_DEBUG
tristate "ATOM Punit debug driver"
select DEBUG_FS
@@ -12619,7 +12607,7 @@ index 4086abc..52a0a9b 100644
+*** Please upgrade your binutils to 2.18 or newer
+endef
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
-index 2ee62db..5f320a9 100644
+index bbe1a62..ec6a3ec 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -58,6 +58,9 @@ clean-files += cpustr.h
@@ -12631,7 +12619,7 @@ index 2ee62db..5f320a9 100644
+endif
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
-
+ UBSAN_SANITIZE := n
diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
index 878e4b9..20537ab 100644
--- a/arch/x86/boot/bitops.h
@@ -12668,16 +12656,33 @@ index 9011a88..06aa820 100644
}
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
-index 0a291cd..9686efc 100644
+index f9ce75d..0b1600d 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
-@@ -30,6 +30,9 @@ KBUILD_CFLAGS += $(cflags-y)
+@@ -30,6 +30,26 @@ KBUILD_CFLAGS += $(cflags-y)
KBUILD_CFLAGS += -mno-mmx -mno-sse
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
+ifdef CONSTIFY_PLUGIN
+KBUILD_CFLAGS += -fplugin-arg-constify_plugin-no-constify
+endif
++
++ifdef CONFIG_DEBUG_INFO
++ifdef CONFIG_DEBUG_INFO_SPLIT
++KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
++else
++KBUILD_CFLAGS += -g
++endif
++KBUILD_AFLAGS += -Wa,--gdwarf-2
++endif
++ifdef CONFIG_DEBUG_INFO_DWARF4
++KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,)
++endif
++
++ifdef CONFIG_DEBUG_INFO_REDUCED
++KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
++ $(call cc-option,-fno-var-tracking)
++endif
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
@@ -12971,7 +12976,7 @@ index 9105655..41779c1 100644
movq r1,r2; \
movq r3,r4; \
diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
-index 6bd2c6c..368c93e 100644
+index 6bd2c6c..cd46c9d 100644
--- a/arch/x86/crypto/aesni-intel_asm.S
+++ b/arch/x86/crypto/aesni-intel_asm.S
@@ -31,6 +31,7 @@
@@ -13253,7 +13258,7 @@ index 6bd2c6c..368c93e 100644
ret
ENDPROC(_key_expansion_256b)
-@@ -1905,6 +1912,7 @@ ENTRY(aesni_set_key)
+@@ -1905,13 +1912,14 @@ ENTRY(aesni_set_key)
#ifndef __x86_64__
popl KEYP
#endif
@@ -13261,6 +13266,14 @@ index 6bd2c6c..368c93e 100644
ret
ENDPROC(aesni_set_key)
+ /*
+ * void aesni_enc(struct crypto_aes_ctx *ctx, u8 *dst, const u8 *src)
+ */
+-ENTRY(aesni_enc)
++RAP_ENTRY(aesni_enc)
+ #ifndef __x86_64__
+ pushl KEYP
+ pushl KLEN
@@ -1927,6 +1935,7 @@ ENTRY(aesni_enc)
popl KLEN
popl KEYP
@@ -13277,7 +13290,7 @@ index 6bd2c6c..368c93e 100644
ret
ENDPROC(_aesni_enc1)
-@@ -2094,6 +2104,7 @@ _aesni_enc4:
+@@ -2094,13 +2104,14 @@ _aesni_enc4:
AESENCLAST KEY STATE2
AESENCLAST KEY STATE3
AESENCLAST KEY STATE4
@@ -13285,6 +13298,14 @@ index 6bd2c6c..368c93e 100644
ret
ENDPROC(_aesni_enc4)
+ /*
+ * void aesni_dec (struct crypto_aes_ctx *ctx, u8 *dst, const u8 *src)
+ */
+-ENTRY(aesni_dec)
++RAP_ENTRY(aesni_dec)
+ #ifndef __x86_64__
+ pushl KEYP
+ pushl KLEN
@@ -2117,6 +2128,7 @@ ENTRY(aesni_dec)
popl KLEN
popl KEYP
@@ -13373,8 +13394,24 @@ index 6bd2c6c..368c93e 100644
ret
ENDPROC(aesni_xts_crypt8)
+diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
+index 3633ad6..2bf146f 100644
+--- a/arch/x86/crypto/aesni-intel_glue.c
++++ b/arch/x86/crypto/aesni-intel_glue.c
+@@ -82,9 +82,9 @@ struct aesni_xts_ctx {
+
+ asmlinkage int aesni_set_key(struct crypto_aes_ctx *ctx, const u8 *in_key,
+ unsigned int key_len);
+-asmlinkage void aesni_enc(struct crypto_aes_ctx *ctx, u8 *out,
++asmlinkage void aesni_enc(void *ctx, u8 *out,
+ const u8 *in);
+-asmlinkage void aesni_dec(struct crypto_aes_ctx *ctx, u8 *out,
++asmlinkage void aesni_dec(void *ctx, u8 *out,
+ const u8 *in);
+ asmlinkage void aesni_ecb_enc(struct crypto_aes_ctx *ctx, u8 *out,
+ const u8 *in, unsigned int len);
diff --git a/arch/x86/crypto/blowfish-x86_64-asm_64.S b/arch/x86/crypto/blowfish-x86_64-asm_64.S
-index 246c670..466e2d6 100644
+index 246c670..4fb7603 100644
--- a/arch/x86/crypto/blowfish-x86_64-asm_64.S
+++ b/arch/x86/crypto/blowfish-x86_64-asm_64.S
@@ -21,6 +21,7 @@
@@ -13385,7 +13422,7 @@ index 246c670..466e2d6 100644
.file "blowfish-x86_64-asm.S"
.text
-@@ -149,9 +150,11 @@ ENTRY(__blowfish_enc_blk)
+@@ -149,13 +150,15 @@ ENTRY(__blowfish_enc_blk)
jnz .L__enc_xor;
write_block();
@@ -13397,6 +13434,11 @@ index 246c670..466e2d6 100644
ret;
ENDPROC(__blowfish_enc_blk)
+-ENTRY(blowfish_dec_blk)
++RAP_ENTRY(blowfish_dec_blk)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -183,6 +186,7 @@ ENTRY(blowfish_dec_blk)
movq %r11, %rbp;
@@ -13413,7 +13455,7 @@ index 246c670..466e2d6 100644
ret;
.L__enc_xor4:
-@@ -341,6 +346,7 @@ ENTRY(__blowfish_enc_blk_4way)
+@@ -341,10 +346,11 @@ ENTRY(__blowfish_enc_blk_4way)
popq %rbx;
popq %rbp;
@@ -13421,6 +13463,11 @@ index 246c670..466e2d6 100644
ret;
ENDPROC(__blowfish_enc_blk_4way)
+-ENTRY(blowfish_dec_blk_4way)
++RAP_ENTRY(blowfish_dec_blk_4way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -375,5 +381,6 @@ ENTRY(blowfish_dec_blk_4way)
popq %rbx;
popq %rbp;
@@ -13429,7 +13476,7 @@ index 246c670..466e2d6 100644
ret;
ENDPROC(blowfish_dec_blk_4way)
diff --git a/arch/x86/crypto/camellia-aesni-avx-asm_64.S b/arch/x86/crypto/camellia-aesni-avx-asm_64.S
-index ce71f92..1dce7ec 100644
+index ce71f92..059975a 100644
--- a/arch/x86/crypto/camellia-aesni-avx-asm_64.S
+++ b/arch/x86/crypto/camellia-aesni-avx-asm_64.S
@@ -16,6 +16,7 @@
@@ -13472,7 +13519,16 @@ index ce71f92..1dce7ec 100644
ret;
.align 8
-@@ -904,6 +909,7 @@ ENTRY(camellia_ecb_enc_16way)
+@@ -884,7 +889,7 @@ __camellia_dec_blk16:
+ jmp .Ldec_max24;
+ ENDPROC(__camellia_dec_blk16)
+
+-ENTRY(camellia_ecb_enc_16way)
++RAP_ENTRY(camellia_ecb_enc_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
+@@ -904,10 +909,11 @@ ENTRY(camellia_ecb_enc_16way)
%xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
%xmm8, %rsi);
@@ -13480,7 +13536,12 @@ index ce71f92..1dce7ec 100644
ret;
ENDPROC(camellia_ecb_enc_16way)
-@@ -932,6 +938,7 @@ ENTRY(camellia_ecb_dec_16way)
+-ENTRY(camellia_ecb_dec_16way)
++RAP_ENTRY(camellia_ecb_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
+@@ -932,10 +938,11 @@ ENTRY(camellia_ecb_dec_16way)
%xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
%xmm8, %rsi);
@@ -13488,6 +13549,11 @@ index ce71f92..1dce7ec 100644
ret;
ENDPROC(camellia_ecb_dec_16way)
+-ENTRY(camellia_cbc_dec_16way)
++RAP_ENTRY(camellia_cbc_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
@@ -981,6 +988,7 @@ ENTRY(camellia_cbc_dec_16way)
%xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
%xmm8, %rsi);
@@ -13496,6 +13562,15 @@ index ce71f92..1dce7ec 100644
ret;
ENDPROC(camellia_cbc_dec_16way)
+@@ -990,7 +998,7 @@ ENDPROC(camellia_cbc_dec_16way)
+ vpslldq $8, tmp, tmp; \
+ vpsubq tmp, x, x;
+
+-ENTRY(camellia_ctr_16way)
++RAP_ENTRY(camellia_ctr_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
@@ -1092,6 +1100,7 @@ ENTRY(camellia_ctr_16way)
%xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
%xmm8, %rsi);
@@ -13504,7 +13579,7 @@ index ce71f92..1dce7ec 100644
ret;
ENDPROC(camellia_ctr_16way)
-@@ -1234,6 +1243,7 @@ camellia_xts_crypt_16way:
+@@ -1234,10 +1243,11 @@ camellia_xts_crypt_16way:
%xmm15, %xmm14, %xmm13, %xmm12, %xmm11, %xmm10, %xmm9,
%xmm8, %rsi);
@@ -13512,8 +13587,22 @@ index ce71f92..1dce7ec 100644
ret;
ENDPROC(camellia_xts_crypt_16way)
+-ENTRY(camellia_xts_enc_16way)
++RAP_ENTRY(camellia_xts_enc_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
+@@ -1251,7 +1261,7 @@ ENTRY(camellia_xts_enc_16way)
+ jmp camellia_xts_crypt_16way;
+ ENDPROC(camellia_xts_enc_16way)
+
+-ENTRY(camellia_xts_dec_16way)
++RAP_ENTRY(camellia_xts_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
diff --git a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
-index 0e0b886..5a3123c 100644
+index 0e0b886..7bad080 100644
--- a/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
+++ b/arch/x86/crypto/camellia-aesni-avx2-asm_64.S
@@ -11,6 +11,7 @@
@@ -13556,7 +13645,16 @@ index 0e0b886..5a3123c 100644
ret;
.align 8
-@@ -948,6 +953,7 @@ ENTRY(camellia_ecb_enc_32way)
+@@ -924,7 +929,7 @@ __camellia_dec_blk32:
+ jmp .Ldec_max24;
+ ENDPROC(__camellia_dec_blk32)
+
+-ENTRY(camellia_ecb_enc_32way)
++RAP_ENTRY(camellia_ecb_enc_32way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (32 blocks)
+@@ -948,10 +953,11 @@ ENTRY(camellia_ecb_enc_32way)
vzeroupper;
@@ -13564,7 +13662,12 @@ index 0e0b886..5a3123c 100644
ret;
ENDPROC(camellia_ecb_enc_32way)
-@@ -980,6 +986,7 @@ ENTRY(camellia_ecb_dec_32way)
+-ENTRY(camellia_ecb_dec_32way)
++RAP_ENTRY(camellia_ecb_dec_32way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (32 blocks)
+@@ -980,10 +986,11 @@ ENTRY(camellia_ecb_dec_32way)
vzeroupper;
@@ -13572,6 +13675,11 @@ index 0e0b886..5a3123c 100644
ret;
ENDPROC(camellia_ecb_dec_32way)
+-ENTRY(camellia_cbc_dec_32way)
++RAP_ENTRY(camellia_cbc_dec_32way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (32 blocks)
@@ -1046,6 +1053,7 @@ ENTRY(camellia_cbc_dec_32way)
vzeroupper;
@@ -13580,6 +13688,15 @@ index 0e0b886..5a3123c 100644
ret;
ENDPROC(camellia_cbc_dec_32way)
+@@ -1063,7 +1071,7 @@ ENDPROC(camellia_cbc_dec_32way)
+ vpslldq $8, tmp1, tmp1; \
+ vpsubq tmp1, x, x;
+
+-ENTRY(camellia_ctr_32way)
++RAP_ENTRY(camellia_ctr_32way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (32 blocks)
@@ -1184,6 +1192,7 @@ ENTRY(camellia_ctr_32way)
vzeroupper;
@@ -13588,7 +13705,7 @@ index 0e0b886..5a3123c 100644
ret;
ENDPROC(camellia_ctr_32way)
-@@ -1349,6 +1358,7 @@ camellia_xts_crypt_32way:
+@@ -1349,10 +1358,11 @@ camellia_xts_crypt_32way:
vzeroupper;
@@ -13596,8 +13713,22 @@ index 0e0b886..5a3123c 100644
ret;
ENDPROC(camellia_xts_crypt_32way)
+-ENTRY(camellia_xts_enc_32way)
++RAP_ENTRY(camellia_xts_enc_32way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (32 blocks)
+@@ -1367,7 +1377,7 @@ ENTRY(camellia_xts_enc_32way)
+ jmp camellia_xts_crypt_32way;
+ ENDPROC(camellia_xts_enc_32way)
+
+-ENTRY(camellia_xts_dec_32way)
++RAP_ENTRY(camellia_xts_dec_32way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (32 blocks)
diff --git a/arch/x86/crypto/camellia-x86_64-asm_64.S b/arch/x86/crypto/camellia-x86_64-asm_64.S
-index 310319c..db3d7b5 100644
+index 310319c..9253a8f 100644
--- a/arch/x86/crypto/camellia-x86_64-asm_64.S
+++ b/arch/x86/crypto/camellia-x86_64-asm_64.S
@@ -21,6 +21,7 @@
@@ -13608,7 +13739,7 @@ index 310319c..db3d7b5 100644
.file "camellia-x86_64-asm_64.S"
.text
-@@ -228,12 +229,14 @@ ENTRY(__camellia_enc_blk)
+@@ -228,16 +229,18 @@ ENTRY(__camellia_enc_blk)
enc_outunpack(mov, RT1);
movq RRBP, %rbp;
@@ -13623,6 +13754,11 @@ index 310319c..db3d7b5 100644
ret;
ENDPROC(__camellia_enc_blk)
+-ENTRY(camellia_dec_blk)
++RAP_ENTRY(camellia_dec_blk)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -272,6 +275,7 @@ ENTRY(camellia_dec_blk)
dec_outunpack();
@@ -13639,7 +13775,7 @@ index 310319c..db3d7b5 100644
ret;
.L__enc2_xor:
-@@ -470,6 +475,7 @@ ENTRY(__camellia_enc_blk_2way)
+@@ -470,10 +475,11 @@ ENTRY(__camellia_enc_blk_2way)
movq RRBP, %rbp;
popq %rbx;
@@ -13647,6 +13783,11 @@ index 310319c..db3d7b5 100644
ret;
ENDPROC(__camellia_enc_blk_2way)
+-ENTRY(camellia_dec_blk_2way)
++RAP_ENTRY(camellia_dec_blk_2way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -510,5 +516,6 @@ ENTRY(camellia_dec_blk_2way)
movq RRBP, %rbp;
@@ -13654,8 +13795,118 @@ index 310319c..db3d7b5 100644
+ pax_force_retaddr
ret;
ENDPROC(camellia_dec_blk_2way)
+diff --git a/arch/x86/crypto/camellia_aesni_avx2_glue.c b/arch/x86/crypto/camellia_aesni_avx2_glue.c
+index d844569..edaf489 100644
+--- a/arch/x86/crypto/camellia_aesni_avx2_glue.c
++++ b/arch/x86/crypto/camellia_aesni_avx2_glue.c
+@@ -27,20 +27,20 @@
+ #define CAMELLIA_AESNI_AVX2_PARALLEL_BLOCKS 32
+
+ /* 32-way AVX2/AES-NI parallel cipher functions */
+-asmlinkage void camellia_ecb_enc_32way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_ecb_enc_32way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void camellia_ecb_dec_32way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_ecb_dec_32way(void *ctx, u8 *dst,
+ const u8 *src);
+
+-asmlinkage void camellia_cbc_dec_32way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_cbc_dec_32way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void camellia_ctr_32way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_ctr_32way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+-asmlinkage void camellia_xts_enc_32way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
+-asmlinkage void camellia_xts_dec_32way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_xts_enc_32way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
++asmlinkage void camellia_xts_dec_32way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+ static const struct common_glue_ctx camellia_enc = {
+ .num_funcs = 4,
+diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c
+index 93d8f29..4218a74 100644
+--- a/arch/x86/crypto/camellia_aesni_avx_glue.c
++++ b/arch/x86/crypto/camellia_aesni_avx_glue.c
+@@ -26,28 +26,28 @@
+ #define CAMELLIA_AESNI_PARALLEL_BLOCKS 16
+
+ /* 16-way parallel cipher functions (avx/aes-ni) */
+-asmlinkage void camellia_ecb_enc_16way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_ecb_enc_16way(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(camellia_ecb_enc_16way);
+
+-asmlinkage void camellia_ecb_dec_16way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_ecb_dec_16way(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(camellia_ecb_dec_16way);
+
+-asmlinkage void camellia_cbc_dec_16way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_cbc_dec_16way(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(camellia_cbc_dec_16way);
+
+-asmlinkage void camellia_ctr_16way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_ctr_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+ EXPORT_SYMBOL_GPL(camellia_ctr_16way);
+
+-asmlinkage void camellia_xts_enc_16way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_xts_enc_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+ EXPORT_SYMBOL_GPL(camellia_xts_enc_16way);
+
+-asmlinkage void camellia_xts_dec_16way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_xts_dec_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+ EXPORT_SYMBOL_GPL(camellia_xts_dec_16way);
+
+ void camellia_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv)
+diff --git a/arch/x86/crypto/camellia_glue.c b/arch/x86/crypto/camellia_glue.c
+index 5c8b626..934a4b6 100644
+--- a/arch/x86/crypto/camellia_glue.c
++++ b/arch/x86/crypto/camellia_glue.c
+@@ -39,7 +39,7 @@
+ asmlinkage void __camellia_enc_blk(struct camellia_ctx *ctx, u8 *dst,
+ const u8 *src, bool xor);
+ EXPORT_SYMBOL_GPL(__camellia_enc_blk);
+-asmlinkage void camellia_dec_blk(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_dec_blk(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(camellia_dec_blk);
+
+@@ -47,7 +47,7 @@ EXPORT_SYMBOL_GPL(camellia_dec_blk);
+ asmlinkage void __camellia_enc_blk_2way(struct camellia_ctx *ctx, u8 *dst,
+ const u8 *src, bool xor);
+ EXPORT_SYMBOL_GPL(__camellia_enc_blk_2way);
+-asmlinkage void camellia_dec_blk_2way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_dec_blk_2way(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(camellia_dec_blk_2way);
+
+@@ -1279,8 +1279,10 @@ static int camellia_setkey(struct crypto_tfm *tfm, const u8 *in_key,
+ &tfm->crt_flags);
+ }
+
+-void camellia_decrypt_cbc_2way(void *ctx, u128 *dst, const u128 *src)
++void camellia_decrypt_cbc_2way(void *ctx, u8 *_dst, const u8 *_src)
+ {
++ u128 *dst = (u128 *)_dst;
++ u128 *src = (u128 *)_src;
+ u128 iv = *src;
+
+ camellia_dec_blk_2way(ctx, (u8 *)dst, (u8 *)src);
diff --git a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
-index c35fd5d..2d8c7db 100644
+index c35fd5d..563138e 100644
--- a/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
+++ b/arch/x86/crypto/cast5-avx-x86_64-asm_64.S
@@ -24,6 +24,7 @@
@@ -13682,7 +13933,16 @@ index c35fd5d..2d8c7db 100644
ret;
.L__skip_dec:
-@@ -388,6 +391,7 @@ ENTRY(cast5_ecb_enc_16way)
+@@ -359,7 +362,7 @@ __cast5_dec_blk16:
+ jmp .L__dec_tail;
+ ENDPROC(__cast5_dec_blk16)
+
+-ENTRY(cast5_ecb_enc_16way)
++RAP_ENTRY(cast5_ecb_enc_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -388,10 +391,11 @@ ENTRY(cast5_ecb_enc_16way)
vmovdqu RR4, (6*4*4)(%r11);
vmovdqu RL4, (7*4*4)(%r11);
@@ -13690,6 +13950,11 @@ index c35fd5d..2d8c7db 100644
ret;
ENDPROC(cast5_ecb_enc_16way)
+-ENTRY(cast5_ecb_dec_16way)
++RAP_ENTRY(cast5_ecb_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -420,6 +424,7 @@ ENTRY(cast5_ecb_dec_16way)
vmovdqu RR4, (6*4*4)(%r11);
vmovdqu RL4, (7*4*4)(%r11);
@@ -13794,7 +14059,7 @@ index c35fd5d..2d8c7db 100644
ret;
ENDPROC(cast5_ctr_16way)
diff --git a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
-index e3531f8..e123f35 100644
+index e3531f8..564f08b 100644
--- a/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
+++ b/arch/x86/crypto/cast6-avx-x86_64-asm_64.S
@@ -24,6 +24,7 @@
@@ -13813,7 +14078,7 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(__cast6_enc_blk8)
-@@ -340,6 +342,7 @@ __cast6_dec_blk8:
+@@ -340,10 +342,11 @@ __cast6_dec_blk8:
outunpack_blocks(RA1, RB1, RC1, RD1, RTMP, RX, RKRF, RKM);
outunpack_blocks(RA2, RB2, RC2, RD2, RTMP, RX, RKRF, RKM);
@@ -13821,7 +14086,12 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(__cast6_dec_blk8)
-@@ -358,6 +361,7 @@ ENTRY(cast6_ecb_enc_8way)
+-ENTRY(cast6_ecb_enc_8way)
++RAP_ENTRY(cast6_ecb_enc_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -358,10 +361,11 @@ ENTRY(cast6_ecb_enc_8way)
store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -13829,7 +14099,12 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(cast6_ecb_enc_8way)
-@@ -376,6 +380,7 @@ ENTRY(cast6_ecb_dec_8way)
+-ENTRY(cast6_ecb_dec_8way)
++RAP_ENTRY(cast6_ecb_dec_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -376,33 +380,35 @@ ENTRY(cast6_ecb_dec_8way)
store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -13837,7 +14112,11 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(cast6_ecb_dec_8way)
-@@ -386,19 +391,20 @@ ENTRY(cast6_cbc_dec_8way)
+-ENTRY(cast6_cbc_dec_8way)
++RAP_ENTRY(cast6_cbc_dec_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
* %rdx: src
*/
@@ -13862,7 +14141,12 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(cast6_cbc_dec_8way)
-@@ -410,20 +416,21 @@ ENTRY(cast6_ctr_8way)
+-ENTRY(cast6_ctr_8way)
++RAP_ENTRY(cast6_ctr_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -410,24 +416,25 @@ ENTRY(cast6_ctr_8way)
* %rcx: iv (little endian, 128bit)
*/
@@ -13888,7 +14172,12 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(cast6_ctr_8way)
-@@ -446,6 +453,7 @@ ENTRY(cast6_xts_enc_8way)
+-ENTRY(cast6_xts_enc_8way)
++RAP_ENTRY(cast6_xts_enc_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -446,10 +453,11 @@ ENTRY(cast6_xts_enc_8way)
/* dst <= regs xor IVs(in dst) */
store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -13896,6 +14185,11 @@ index e3531f8..e123f35 100644
ret;
ENDPROC(cast6_xts_enc_8way)
+-ENTRY(cast6_xts_dec_8way)
++RAP_ENTRY(cast6_xts_dec_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -468,5 +476,6 @@ ENTRY(cast6_xts_dec_8way)
/* dst <= regs xor IVs(in dst) */
store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -13903,6 +14197,39 @@ index e3531f8..e123f35 100644
+ pax_force_retaddr
ret;
ENDPROC(cast6_xts_dec_8way)
+diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x86/crypto/cast6_avx_glue.c
+index fca4595..e5d2127 100644
+--- a/arch/x86/crypto/cast6_avx_glue.c
++++ b/arch/x86/crypto/cast6_avx_glue.c
+@@ -41,20 +41,20 @@
+
+ #define CAST6_PARALLEL_BLOCKS 8
+
+-asmlinkage void cast6_ecb_enc_8way(struct cast6_ctx *ctx, u8 *dst,
++asmlinkage void cast6_ecb_enc_8way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void cast6_ecb_dec_8way(struct cast6_ctx *ctx, u8 *dst,
++asmlinkage void cast6_ecb_dec_8way(void *ctx, u8 *dst,
+ const u8 *src);
+
+-asmlinkage void cast6_cbc_dec_8way(struct cast6_ctx *ctx, u8 *dst,
++asmlinkage void cast6_cbc_dec_8way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void cast6_ctr_8way(struct cast6_ctx *ctx, u8 *dst, const u8 *src,
++asmlinkage void cast6_ctr_8way(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+
+-asmlinkage void cast6_xts_enc_8way(struct cast6_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
+-asmlinkage void cast6_xts_dec_8way(struct cast6_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void cast6_xts_enc_8way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
++asmlinkage void cast6_xts_dec_8way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+ static void cast6_xts_enc(void *ctx, u128 *dst, const u128 *src, le128 *iv)
+ {
diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
index 4fe27e0..2885e731 100644
--- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
@@ -13958,6 +14285,19 @@ index 5d1e007..098cb4f 100644
+ pax_force_retaddr
ret
ENDPROC(clmul_ghash_update)
+diff --git a/arch/x86/crypto/glue_helper.c b/arch/x86/crypto/glue_helper.c
+index 6a85598..fed2ada 100644
+--- a/arch/x86/crypto/glue_helper.c
++++ b/arch/x86/crypto/glue_helper.c
+@@ -165,7 +165,7 @@ __glue_cbc_decrypt_128bit(const struct common_glue_ctx *gctx,
+ src -= num_blocks - 1;
+ dst -= num_blocks - 1;
+
+- gctx->funcs[i].fn_u.cbc(ctx, dst, src);
++ gctx->funcs[i].fn_u.cbc(ctx, (u8 *)dst, (u8 *)src);
+
+ nbytes -= bsize;
+ if (nbytes < bsize)
diff --git a/arch/x86/crypto/salsa20-x86_64-asm_64.S b/arch/x86/crypto/salsa20-x86_64-asm_64.S
index 9279e0b..c4b3d2c 100644
--- a/arch/x86/crypto/salsa20-x86_64-asm_64.S
@@ -13992,7 +14332,7 @@ index 9279e0b..c4b3d2c 100644
ret
ENDPROC(salsa20_ivsetup)
diff --git a/arch/x86/crypto/serpent-avx-x86_64-asm_64.S b/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
-index 2f202f4..d9164d6 100644
+index 2f202f4..e671172 100644
--- a/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
+++ b/arch/x86/crypto/serpent-avx-x86_64-asm_64.S
@@ -24,6 +24,7 @@
@@ -14011,7 +14351,7 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(__serpent_enc_blk8_avx)
-@@ -672,6 +674,7 @@ __serpent_dec_blk8_avx:
+@@ -672,10 +674,11 @@ __serpent_dec_blk8_avx:
write_blocks(RC1, RD1, RB1, RE1, RK0, RK1, RK2);
write_blocks(RC2, RD2, RB2, RE2, RK0, RK1, RK2);
@@ -14019,7 +14359,12 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(__serpent_dec_blk8_avx)
-@@ -688,6 +691,7 @@ ENTRY(serpent_ecb_enc_8way_avx)
+-ENTRY(serpent_ecb_enc_8way_avx)
++RAP_ENTRY(serpent_ecb_enc_8way_avx)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -688,10 +691,11 @@ ENTRY(serpent_ecb_enc_8way_avx)
store_8way(%rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -14027,7 +14372,12 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(serpent_ecb_enc_8way_avx)
-@@ -704,6 +708,7 @@ ENTRY(serpent_ecb_dec_8way_avx)
+-ENTRY(serpent_ecb_dec_8way_avx)
++RAP_ENTRY(serpent_ecb_dec_8way_avx)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -704,10 +708,11 @@ ENTRY(serpent_ecb_dec_8way_avx)
store_8way(%rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
@@ -14035,7 +14385,12 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(serpent_ecb_dec_8way_avx)
-@@ -720,6 +725,7 @@ ENTRY(serpent_cbc_dec_8way_avx)
+-ENTRY(serpent_cbc_dec_8way_avx)
++RAP_ENTRY(serpent_cbc_dec_8way_avx)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -720,10 +725,11 @@ ENTRY(serpent_cbc_dec_8way_avx)
store_cbc_8way(%rdx, %rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
@@ -14043,7 +14398,12 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(serpent_cbc_dec_8way_avx)
-@@ -738,6 +744,7 @@ ENTRY(serpent_ctr_8way_avx)
+-ENTRY(serpent_ctr_8way_avx)
++RAP_ENTRY(serpent_ctr_8way_avx)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -738,10 +744,11 @@ ENTRY(serpent_ctr_8way_avx)
store_ctr_8way(%rdx, %rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -14051,7 +14411,12 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(serpent_ctr_8way_avx)
-@@ -758,6 +765,7 @@ ENTRY(serpent_xts_enc_8way_avx)
+-ENTRY(serpent_xts_enc_8way_avx)
++RAP_ENTRY(serpent_xts_enc_8way_avx)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -758,10 +765,11 @@ ENTRY(serpent_xts_enc_8way_avx)
/* dst <= regs xor IVs(in dst) */
store_xts_8way(%rsi, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -14059,6 +14424,11 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(serpent_xts_enc_8way_avx)
+-ENTRY(serpent_xts_dec_8way_avx)
++RAP_ENTRY(serpent_xts_dec_8way_avx)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -778,5 +786,6 @@ ENTRY(serpent_xts_dec_8way_avx)
/* dst <= regs xor IVs(in dst) */
store_xts_8way(%rsi, RC1, RD1, RB1, RE1, RC2, RD2, RB2, RE2);
@@ -14067,7 +14437,7 @@ index 2f202f4..d9164d6 100644
ret;
ENDPROC(serpent_xts_dec_8way_avx)
diff --git a/arch/x86/crypto/serpent-avx2-asm_64.S b/arch/x86/crypto/serpent-avx2-asm_64.S
-index b222085..abd483c 100644
+index b222085..c43efce 100644
--- a/arch/x86/crypto/serpent-avx2-asm_64.S
+++ b/arch/x86/crypto/serpent-avx2-asm_64.S
@@ -15,6 +15,7 @@
@@ -14086,7 +14456,7 @@ index b222085..abd483c 100644
ret;
ENDPROC(__serpent_enc_blk16)
-@@ -664,6 +666,7 @@ __serpent_dec_blk16:
+@@ -664,10 +666,11 @@ __serpent_dec_blk16:
write_blocks(RC1, RD1, RB1, RE1, RK0, RK1, RK2);
write_blocks(RC2, RD2, RB2, RE2, RK0, RK1, RK2);
@@ -14094,7 +14464,12 @@ index b222085..abd483c 100644
ret;
ENDPROC(__serpent_dec_blk16)
-@@ -684,6 +687,7 @@ ENTRY(serpent_ecb_enc_16way)
+-ENTRY(serpent_ecb_enc_16way)
++RAP_ENTRY(serpent_ecb_enc_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -684,10 +687,11 @@ ENTRY(serpent_ecb_enc_16way)
vzeroupper;
@@ -14102,7 +14477,12 @@ index b222085..abd483c 100644
ret;
ENDPROC(serpent_ecb_enc_16way)
-@@ -704,6 +708,7 @@ ENTRY(serpent_ecb_dec_16way)
+-ENTRY(serpent_ecb_dec_16way)
++RAP_ENTRY(serpent_ecb_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -704,10 +708,11 @@ ENTRY(serpent_ecb_dec_16way)
vzeroupper;
@@ -14110,7 +14490,12 @@ index b222085..abd483c 100644
ret;
ENDPROC(serpent_ecb_dec_16way)
-@@ -725,6 +730,7 @@ ENTRY(serpent_cbc_dec_16way)
+-ENTRY(serpent_cbc_dec_16way)
++RAP_ENTRY(serpent_cbc_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -725,10 +730,11 @@ ENTRY(serpent_cbc_dec_16way)
vzeroupper;
@@ -14118,7 +14503,12 @@ index b222085..abd483c 100644
ret;
ENDPROC(serpent_cbc_dec_16way)
-@@ -748,6 +754,7 @@ ENTRY(serpent_ctr_16way)
+-ENTRY(serpent_ctr_16way)
++RAP_ENTRY(serpent_ctr_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
+@@ -748,10 +754,11 @@ ENTRY(serpent_ctr_16way)
vzeroupper;
@@ -14126,7 +14516,12 @@ index b222085..abd483c 100644
ret;
ENDPROC(serpent_ctr_16way)
-@@ -772,6 +779,7 @@ ENTRY(serpent_xts_enc_16way)
+-ENTRY(serpent_xts_enc_16way)
++RAP_ENTRY(serpent_xts_enc_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
+@@ -772,10 +779,11 @@ ENTRY(serpent_xts_enc_16way)
vzeroupper;
@@ -14134,6 +14529,11 @@ index b222085..abd483c 100644
ret;
ENDPROC(serpent_xts_enc_16way)
+-ENTRY(serpent_xts_dec_16way)
++RAP_ENTRY(serpent_xts_dec_16way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst (16 blocks)
@@ -796,5 +804,6 @@ ENTRY(serpent_xts_dec_16way)
vzeroupper;
@@ -14175,6 +14575,94 @@ index acc066c..1559cc4 100644
+ pax_force_retaddr
ret;
ENDPROC(serpent_dec_blk_8way)
+diff --git a/arch/x86/crypto/serpent_avx2_glue.c b/arch/x86/crypto/serpent_avx2_glue.c
+index 6d19834..a08fbe9 100644
+--- a/arch/x86/crypto/serpent_avx2_glue.c
++++ b/arch/x86/crypto/serpent_avx2_glue.c
+@@ -27,18 +27,18 @@
+ #define SERPENT_AVX2_PARALLEL_BLOCKS 16
+
+ /* 16-way AVX2 parallel cipher functions */
+-asmlinkage void serpent_ecb_enc_16way(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_ecb_enc_16way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void serpent_ecb_dec_16way(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_ecb_dec_16way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void serpent_cbc_dec_16way(void *ctx, u128 *dst, const u128 *src);
++asmlinkage void serpent_cbc_dec_16way(void *ctx, u8 *dst, const u8 *src);
+
+ asmlinkage void serpent_ctr_16way(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+-asmlinkage void serpent_xts_enc_16way(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
+-asmlinkage void serpent_xts_dec_16way(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void serpent_xts_enc_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
++asmlinkage void serpent_xts_dec_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+ static const struct common_glue_ctx serpent_enc = {
+ .num_funcs = 3,
+diff --git a/arch/x86/crypto/serpent_avx_glue.c b/arch/x86/crypto/serpent_avx_glue.c
+index 5dc3702..10f232a 100644
+--- a/arch/x86/crypto/serpent_avx_glue.c
++++ b/arch/x86/crypto/serpent_avx_glue.c
+@@ -41,28 +41,28 @@
+ #include <asm/crypto/glue_helper.h>
+
+ /* 8-way parallel cipher functions */
+-asmlinkage void serpent_ecb_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_ecb_enc_8way_avx(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(serpent_ecb_enc_8way_avx);
+
+-asmlinkage void serpent_ecb_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_ecb_dec_8way_avx(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(serpent_ecb_dec_8way_avx);
+
+-asmlinkage void serpent_cbc_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_cbc_dec_8way_avx(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(serpent_cbc_dec_8way_avx);
+
+-asmlinkage void serpent_ctr_8way_avx(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void serpent_ctr_8way_avx(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+ EXPORT_SYMBOL_GPL(serpent_ctr_8way_avx);
+
+-asmlinkage void serpent_xts_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void serpent_xts_enc_8way_avx(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+ EXPORT_SYMBOL_GPL(serpent_xts_enc_8way_avx);
+
+-asmlinkage void serpent_xts_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void serpent_xts_dec_8way_avx(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+ EXPORT_SYMBOL_GPL(serpent_xts_dec_8way_avx);
+
+ void __serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src, le128 *iv)
+diff --git a/arch/x86/crypto/serpent_sse2_glue.c b/arch/x86/crypto/serpent_sse2_glue.c
+index 3643dd5..17d5e30 100644
+--- a/arch/x86/crypto/serpent_sse2_glue.c
++++ b/arch/x86/crypto/serpent_sse2_glue.c
+@@ -45,8 +45,10 @@
+ #include <asm/crypto/serpent-sse2.h>
+ #include <asm/crypto/glue_helper.h>
+
+-static void serpent_decrypt_cbc_xway(void *ctx, u128 *dst, const u128 *src)
++static void serpent_decrypt_cbc_xway(void *ctx, u8 *_dst, const u8 *_src)
+ {
++ u128 *dst = (u128 *)_dst;
++ const u128 *src = (const u128 *)_src;
+ u128 ivs[SERPENT_PARALLEL_BLOCKS - 1];
+ unsigned int j;
+
diff --git a/arch/x86/crypto/sha-mb/sha1_mb.c b/arch/x86/crypto/sha-mb/sha1_mb.c
index a841e97..8381c09d 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb.c
@@ -14193,7 +14681,7 @@ index a841e97..8381c09d 100644
}
}
diff --git a/arch/x86/crypto/sha1_ssse3_asm.S b/arch/x86/crypto/sha1_ssse3_asm.S
-index a410950..9dfe7ad 100644
+index a410950..02d2056 100644
--- a/arch/x86/crypto/sha1_ssse3_asm.S
+++ b/arch/x86/crypto/sha1_ssse3_asm.S
@@ -29,6 +29,7 @@
@@ -14204,7 +14692,13 @@ index a410950..9dfe7ad 100644
#define CTX %rdi // arg1
#define BUF %rsi // arg2
-@@ -75,9 +76,9 @@
+@@ -71,13 +72,14 @@
+ * param: function's name
+ */
+ .macro SHA1_VECTOR_ASM name
+- ENTRY(\name)
++ALIGN
++ RAP_ENTRY(\name)
push %rbx
push %rbp
@@ -14216,7 +14710,7 @@ index a410950..9dfe7ad 100644
sub $64, %rsp # allocate workspace
and $~15, %rsp # align stack
-@@ -99,11 +100,12 @@
+@@ -99,11 +101,12 @@
xor %rax, %rax
rep stosq
@@ -14231,8 +14725,161 @@ index a410950..9dfe7ad 100644
ret
ENDPROC(\name)
+diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c
+index dd14616..53358bb 100644
+--- a/arch/x86/crypto/sha1_ssse3_glue.c
++++ b/arch/x86/crypto/sha1_ssse3_glue.c
+@@ -31,8 +31,8 @@
+ #include <crypto/sha1_base.h>
+ #include <asm/fpu/api.h>
+
+-typedef void (sha1_transform_fn)(u32 *digest, const char *data,
+- unsigned int rounds);
++typedef void (sha1_transform_fn)(struct sha1_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha1_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len, sha1_transform_fn *sha1_xform)
+@@ -47,8 +47,7 @@ static int sha1_update(struct shash_desc *desc, const u8 *data,
+ BUILD_BUG_ON(offsetof(struct sha1_state, state) != 0);
+
+ kernel_fpu_begin();
+- sha1_base_do_update(desc, data, len,
+- (sha1_block_fn *)sha1_xform);
++ sha1_base_do_update(desc, data, len, sha1_xform);
+ kernel_fpu_end();
+
+ return 0;
+@@ -62,29 +61,26 @@ static int sha1_finup(struct shash_desc *desc, const u8 *data,
+
+ kernel_fpu_begin();
+ if (len)
+- sha1_base_do_update(desc, data, len,
+- (sha1_block_fn *)sha1_xform);
+- sha1_base_do_finalize(desc, (sha1_block_fn *)sha1_xform);
++ sha1_base_do_update(desc, data, len, sha1_xform);
++ sha1_base_do_finalize(desc, sha1_xform);
+ kernel_fpu_end();
+
+ return sha1_base_finish(desc, out);
+ }
+
+-asmlinkage void sha1_transform_ssse3(u32 *digest, const char *data,
+- unsigned int rounds);
++asmlinkage void sha1_transform_ssse3(struct sha1_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha1_ssse3_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
+ {
+- return sha1_update(desc, data, len,
+- (sha1_transform_fn *) sha1_transform_ssse3);
++ return sha1_update(desc, data, len, sha1_transform_ssse3);
+ }
+
+ static int sha1_ssse3_finup(struct shash_desc *desc, const u8 *data,
+ unsigned int len, u8 *out)
+ {
+- return sha1_finup(desc, data, len, out,
+- (sha1_transform_fn *) sha1_transform_ssse3);
++ return sha1_finup(desc, data, len, out, sha1_transform_ssse3);
+ }
+
+ /* Add padding and return the message digest. */
+@@ -124,21 +120,19 @@ static void unregister_sha1_ssse3(void)
+ }
+
+ #ifdef CONFIG_AS_AVX
+-asmlinkage void sha1_transform_avx(u32 *digest, const char *data,
+- unsigned int rounds);
++asmlinkage void sha1_transform_avx(struct sha1_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha1_avx_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
+ {
+- return sha1_update(desc, data, len,
+- (sha1_transform_fn *) sha1_transform_avx);
++ return sha1_update(desc, data, len, sha1_transform_avx);
+ }
+
+ static int sha1_avx_finup(struct shash_desc *desc, const u8 *data,
+ unsigned int len, u8 *out)
+ {
+- return sha1_finup(desc, data, len, out,
+- (sha1_transform_fn *) sha1_transform_avx);
++ return sha1_finup(desc, data, len, out, sha1_transform_avx);
+ }
+
+ static int sha1_avx_final(struct shash_desc *desc, u8 *out)
+@@ -196,8 +190,8 @@ static inline void unregister_sha1_avx(void) { }
+ #if defined(CONFIG_AS_AVX2) && (CONFIG_AS_AVX)
+ #define SHA1_AVX2_BLOCK_OPTSIZE 4 /* optimal 4*64 bytes of SHA1 blocks */
+
+-asmlinkage void sha1_transform_avx2(u32 *digest, const char *data,
+- unsigned int rounds);
++asmlinkage void sha1_transform_avx2(struct sha1_state *digest, const u8 *data,
++ int rounds);
+
+ static bool avx2_usable(void)
+ {
+@@ -209,8 +203,8 @@ static bool avx2_usable(void)
+ return false;
+ }
+
+-static void sha1_apply_transform_avx2(u32 *digest, const char *data,
+- unsigned int rounds)
++static void sha1_apply_transform_avx2(struct sha1_state *digest, const u8 *data,
++ int rounds)
+ {
+ /* Select the optimal transform based on data block size */
+ if (rounds >= SHA1_AVX2_BLOCK_OPTSIZE)
+@@ -222,15 +216,13 @@ static void sha1_apply_transform_avx2(u32 *digest, const char *data,
+ static int sha1_avx2_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
+ {
+- return sha1_update(desc, data, len,
+- (sha1_transform_fn *) sha1_apply_transform_avx2);
++ return sha1_update(desc, data, len, sha1_apply_transform_avx2);
+ }
+
+ static int sha1_avx2_finup(struct shash_desc *desc, const u8 *data,
+ unsigned int len, u8 *out)
+ {
+- return sha1_finup(desc, data, len, out,
+- (sha1_transform_fn *) sha1_apply_transform_avx2);
++ return sha1_finup(desc, data, len, out, sha1_apply_transform_avx2);
+ }
+
+ static int sha1_avx2_final(struct shash_desc *desc, u8 *out)
+@@ -274,21 +266,19 @@ static inline void unregister_sha1_avx2(void) { }
+ #endif
+
+ #ifdef CONFIG_AS_SHA1_NI
+-asmlinkage void sha1_ni_transform(u32 *digest, const char *data,
+- unsigned int rounds);
++asmlinkage void sha1_ni_transform(struct sha1_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha1_ni_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
+ {
+- return sha1_update(desc, data, len,
+- (sha1_transform_fn *) sha1_ni_transform);
++ return sha1_update(desc, data, len, sha1_ni_transform);
+ }
+
+ static int sha1_ni_finup(struct shash_desc *desc, const u8 *data,
+ unsigned int len, u8 *out)
+ {
+- return sha1_finup(desc, data, len, out,
+- (sha1_transform_fn *) sha1_ni_transform);
++ return sha1_finup(desc, data, len, out, sha1_ni_transform);
+ }
+
+ static int sha1_ni_final(struct shash_desc *desc, u8 *out)
diff --git a/arch/x86/crypto/sha256-avx-asm.S b/arch/x86/crypto/sha256-avx-asm.S
-index 92b3b5d..0dc1dcb 100644
+index 92b3b5d..8732479 100644
--- a/arch/x86/crypto/sha256-avx-asm.S
+++ b/arch/x86/crypto/sha256-avx-asm.S
@@ -49,6 +49,7 @@
@@ -14243,7 +14890,17 @@ index 92b3b5d..0dc1dcb 100644
## assume buffers not aligned
#define VMOVDQ vmovdqu
-@@ -460,6 +461,7 @@ done_hash:
+@@ -347,8 +348,7 @@ a = TMP_
+ ## arg 3 : Num blocks
+ ########################################################################
+ .text
+-ENTRY(sha256_transform_avx)
+-.align 32
++RAP_ENTRY(sha256_transform_avx)
+ pushq %rbx
+ pushq %rbp
+ pushq %r13
+@@ -460,6 +460,7 @@ done_hash:
popq %r13
popq %rbp
popq %rbx
@@ -14252,7 +14909,7 @@ index 92b3b5d..0dc1dcb 100644
ENDPROC(sha256_transform_avx)
diff --git a/arch/x86/crypto/sha256-avx2-asm.S b/arch/x86/crypto/sha256-avx2-asm.S
-index 570ec5e..cf2b625 100644
+index 570ec5e..9bcfa25 100644
--- a/arch/x86/crypto/sha256-avx2-asm.S
+++ b/arch/x86/crypto/sha256-avx2-asm.S
@@ -50,6 +50,7 @@
@@ -14263,7 +14920,17 @@ index 570ec5e..cf2b625 100644
## assume buffers not aligned
#define VMOVDQ vmovdqu
-@@ -720,6 +721,7 @@ done_hash:
+@@ -528,8 +529,7 @@ STACK_SIZE = _RSP + _RSP_SIZE
+ ## arg 3 : Num blocks
+ ########################################################################
+ .text
+-ENTRY(sha256_transform_rorx)
+-.align 32
++RAP_ENTRY(sha256_transform_rorx)
+ pushq %rbx
+ pushq %rbp
+ pushq %r12
+@@ -720,6 +720,7 @@ done_hash:
popq %r12
popq %rbp
popq %rbx
@@ -14272,7 +14939,7 @@ index 570ec5e..cf2b625 100644
ENDPROC(sha256_transform_rorx)
diff --git a/arch/x86/crypto/sha256-ssse3-asm.S b/arch/x86/crypto/sha256-ssse3-asm.S
-index 2cedc44..5144899 100644
+index 2cedc44..6fb8582 100644
--- a/arch/x86/crypto/sha256-ssse3-asm.S
+++ b/arch/x86/crypto/sha256-ssse3-asm.S
@@ -47,6 +47,7 @@
@@ -14283,7 +14950,18 @@ index 2cedc44..5144899 100644
## assume buffers not aligned
#define MOVDQ movdqu
-@@ -471,6 +472,7 @@ done_hash:
+@@ -352,9 +353,7 @@ a = TMP_
+ ## arg 2 : pointer to input data
+ ## arg 3 : Num blocks
+ ########################################################################
+-.text
+-ENTRY(sha256_transform_ssse3)
+-.align 32
++RAP_ENTRY(sha256_transform_ssse3)
+ pushq %rbx
+ pushq %rbp
+ pushq %r13
+@@ -471,6 +470,7 @@ done_hash:
popq %rbp
popq %rbx
@@ -14291,8 +14969,80 @@ index 2cedc44..5144899 100644
ret
ENDPROC(sha256_transform_ssse3)
+diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c
+index 5f4d608..ddce00d 100644
+--- a/arch/x86/crypto/sha256_ssse3_glue.c
++++ b/arch/x86/crypto/sha256_ssse3_glue.c
+@@ -40,9 +40,9 @@
+ #include <asm/fpu/api.h>
+ #include <linux/string.h>
+
+-asmlinkage void sha256_transform_ssse3(u32 *digest, const char *data,
+- u64 rounds);
+-typedef void (sha256_transform_fn)(u32 *digest, const char *data, u64 rounds);
++asmlinkage void sha256_transform_ssse3(struct sha256_state *digest, const u8 *data,
++ int rounds);
++typedef void (sha256_transform_fn)(struct sha256_state *digest, const u8 *data, int rounds);
+
+ static int sha256_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len, sha256_transform_fn *sha256_xform)
+@@ -57,8 +57,7 @@ static int sha256_update(struct shash_desc *desc, const u8 *data,
+ BUILD_BUG_ON(offsetof(struct sha256_state, state) != 0);
+
+ kernel_fpu_begin();
+- sha256_base_do_update(desc, data, len,
+- (sha256_block_fn *)sha256_xform);
++ sha256_base_do_update(desc, data, len, sha256_xform);
+ kernel_fpu_end();
+
+ return 0;
+@@ -72,9 +71,8 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data,
+
+ kernel_fpu_begin();
+ if (len)
+- sha256_base_do_update(desc, data, len,
+- (sha256_block_fn *)sha256_xform);
+- sha256_base_do_finalize(desc, (sha256_block_fn *)sha256_xform);
++ sha256_base_do_update(desc, data, len, sha256_xform);
++ sha256_base_do_finalize(desc, sha256_xform);
+ kernel_fpu_end();
+
+ return sha256_base_finish(desc, out);
+@@ -146,8 +144,8 @@ static void unregister_sha256_ssse3(void)
+ }
+
+ #ifdef CONFIG_AS_AVX
+-asmlinkage void sha256_transform_avx(u32 *digest, const char *data,
+- u64 rounds);
++asmlinkage void sha256_transform_avx(struct sha256_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha256_avx_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
+@@ -230,8 +228,8 @@ static inline void unregister_sha256_avx(void) { }
+ #endif
+
+ #if defined(CONFIG_AS_AVX2) && defined(CONFIG_AS_AVX)
+-asmlinkage void sha256_transform_rorx(u32 *digest, const char *data,
+- u64 rounds);
++asmlinkage void sha256_transform_rorx(struct sha256_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha256_avx2_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
+@@ -312,8 +310,8 @@ static inline void unregister_sha256_avx2(void) { }
+ #endif
+
+ #ifdef CONFIG_AS_SHA256_NI
+-asmlinkage void sha256_ni_transform(u32 *digest, const char *data,
+- u64 rounds); /*unsigned int rounds);*/
++asmlinkage void sha256_ni_transform(struct sha256_state *digest, const u8 *data,
++ int rounds); /*unsigned int rounds);*/
+
+ static int sha256_ni_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
diff --git a/arch/x86/crypto/sha512-avx-asm.S b/arch/x86/crypto/sha512-avx-asm.S
-index 565274d..af6bc08 100644
+index 565274d..779d34a 100644
--- a/arch/x86/crypto/sha512-avx-asm.S
+++ b/arch/x86/crypto/sha512-avx-asm.S
@@ -49,6 +49,7 @@
@@ -14303,7 +15053,17 @@ index 565274d..af6bc08 100644
.text
-@@ -364,6 +365,7 @@ updateblock:
+@@ -277,7 +278,8 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
+ # message blocks.
+ # L is the message length in SHA512 blocks
+ ########################################################################
+-ENTRY(sha512_transform_avx)
++ALIGN
++RAP_ENTRY(sha512_transform_avx)
+ cmp $0, msglen
+ je nowork
+
+@@ -364,6 +366,7 @@ updateblock:
mov frame_RSPSAVE(%rsp), %rsp
nowork:
@@ -14312,7 +15072,7 @@ index 565274d..af6bc08 100644
ENDPROC(sha512_transform_avx)
diff --git a/arch/x86/crypto/sha512-avx2-asm.S b/arch/x86/crypto/sha512-avx2-asm.S
-index 1f20b35..f25c8c1 100644
+index 1f20b35..ab1f3a8 100644
--- a/arch/x86/crypto/sha512-avx2-asm.S
+++ b/arch/x86/crypto/sha512-avx2-asm.S
@@ -51,6 +51,7 @@
@@ -14323,7 +15083,17 @@ index 1f20b35..f25c8c1 100644
.text
-@@ -678,6 +679,7 @@ done_hash:
+@@ -568,7 +569,8 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
+ # message blocks.
+ # L is the message length in SHA512 blocks
+ ########################################################################
+-ENTRY(sha512_transform_rorx)
++ALIGN
++RAP_ENTRY(sha512_transform_rorx)
+ # Allocate Stack Space
+ mov %rsp, %rax
+ sub $frame_size, %rsp
+@@ -678,6 +680,7 @@ done_hash:
# Restore Stack Pointer
mov frame_RSPSAVE(%rsp), %rsp
@@ -14332,7 +15102,7 @@ index 1f20b35..f25c8c1 100644
ENDPROC(sha512_transform_rorx)
diff --git a/arch/x86/crypto/sha512-ssse3-asm.S b/arch/x86/crypto/sha512-ssse3-asm.S
-index e610e29..ffcb5ed 100644
+index e610e29..83f1cde 100644
--- a/arch/x86/crypto/sha512-ssse3-asm.S
+++ b/arch/x86/crypto/sha512-ssse3-asm.S
@@ -48,6 +48,7 @@
@@ -14343,7 +15113,17 @@ index e610e29..ffcb5ed 100644
.text
-@@ -363,6 +364,7 @@ updateblock:
+@@ -275,7 +276,8 @@ frame_size = frame_GPRSAVE + GPRSAVE_SIZE
+ # message blocks.
+ # L is the message length in SHA512 blocks.
+ ########################################################################
+-ENTRY(sha512_transform_ssse3)
++ALIGN
++RAP_ENTRY(sha512_transform_ssse3)
+
+ cmp $0, msglen
+ je nowork
+@@ -363,6 +365,7 @@ updateblock:
mov frame_RSPSAVE(%rsp), %rsp
nowork:
@@ -14351,8 +15131,70 @@ index e610e29..ffcb5ed 100644
ret
ENDPROC(sha512_transform_ssse3)
+diff --git a/arch/x86/crypto/sha512_ssse3_glue.c b/arch/x86/crypto/sha512_ssse3_glue.c
+index 34e5083..eb57a5e 100644
+--- a/arch/x86/crypto/sha512_ssse3_glue.c
++++ b/arch/x86/crypto/sha512_ssse3_glue.c
+@@ -39,10 +39,10 @@
+
+ #include <linux/string.h>
+
+-asmlinkage void sha512_transform_ssse3(u64 *digest, const char *data,
+- u64 rounds);
++asmlinkage void sha512_transform_ssse3(struct sha512_state *digest, const u8 *data,
++ int rounds);
+
+-typedef void (sha512_transform_fn)(u64 *digest, const char *data, u64 rounds);
++typedef void (sha512_transform_fn)(struct sha512_state *digest, const u8 *data, int rounds);
+
+ static int sha512_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len, sha512_transform_fn *sha512_xform)
+@@ -57,8 +57,7 @@ static int sha512_update(struct shash_desc *desc, const u8 *data,
+ BUILD_BUG_ON(offsetof(struct sha512_state, state) != 0);
+
+ kernel_fpu_begin();
+- sha512_base_do_update(desc, data, len,
+- (sha512_block_fn *)sha512_xform);
++ sha512_base_do_update(desc, data, len, sha512_xform);
+ kernel_fpu_end();
+
+ return 0;
+@@ -72,9 +71,8 @@ static int sha512_finup(struct shash_desc *desc, const u8 *data,
+
+ kernel_fpu_begin();
+ if (len)
+- sha512_base_do_update(desc, data, len,
+- (sha512_block_fn *)sha512_xform);
+- sha512_base_do_finalize(desc, (sha512_block_fn *)sha512_xform);
++ sha512_base_do_update(desc, data, len, sha512_xform);
++ sha512_base_do_finalize(desc, sha512_xform);
+ kernel_fpu_end();
+
+ return sha512_base_finish(desc, out);
+@@ -146,8 +144,8 @@ static void unregister_sha512_ssse3(void)
+ }
+
+ #ifdef CONFIG_AS_AVX
+-asmlinkage void sha512_transform_avx(u64 *digest, const char *data,
+- u64 rounds);
++asmlinkage void sha512_transform_avx(struct sha512_state *digest, const u8 *data,
++ int rounds);
+ static bool avx_usable(void)
+ {
+ if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
+@@ -229,8 +227,8 @@ static inline void unregister_sha512_avx(void) { }
+ #endif
+
+ #if defined(CONFIG_AS_AVX2) && defined(CONFIG_AS_AVX)
+-asmlinkage void sha512_transform_rorx(u64 *digest, const char *data,
+- u64 rounds);
++asmlinkage void sha512_transform_rorx(struct sha512_state *digest, const u8 *data,
++ int rounds);
+
+ static int sha512_avx2_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
diff --git a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
-index 0505813..b067311 100644
+index 0505813..912c9c1 100644
--- a/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
+++ b/arch/x86/crypto/twofish-avx-x86_64-asm_64.S
@@ -24,6 +24,7 @@
@@ -14371,7 +15213,7 @@ index 0505813..b067311 100644
ret;
ENDPROC(__twofish_enc_blk8)
-@@ -324,6 +326,7 @@ __twofish_dec_blk8:
+@@ -324,10 +326,11 @@ __twofish_dec_blk8:
outunpack_blocks(RA1, RB1, RC1, RD1, RK1, RX0, RY0, RK2);
outunpack_blocks(RA2, RB2, RC2, RD2, RK1, RX0, RY0, RK2);
@@ -14379,7 +15221,12 @@ index 0505813..b067311 100644
ret;
ENDPROC(__twofish_dec_blk8)
-@@ -342,6 +345,7 @@ ENTRY(twofish_ecb_enc_8way)
+-ENTRY(twofish_ecb_enc_8way)
++RAP_ENTRY(twofish_ecb_enc_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -342,10 +345,11 @@ ENTRY(twofish_ecb_enc_8way)
store_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2);
@@ -14387,7 +15234,12 @@ index 0505813..b067311 100644
ret;
ENDPROC(twofish_ecb_enc_8way)
-@@ -360,6 +364,7 @@ ENTRY(twofish_ecb_dec_8way)
+-ENTRY(twofish_ecb_dec_8way)
++RAP_ENTRY(twofish_ecb_dec_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -360,33 +364,35 @@ ENTRY(twofish_ecb_dec_8way)
store_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -14395,7 +15247,11 @@ index 0505813..b067311 100644
ret;
ENDPROC(twofish_ecb_dec_8way)
-@@ -370,19 +375,20 @@ ENTRY(twofish_cbc_dec_8way)
+-ENTRY(twofish_cbc_dec_8way)
++RAP_ENTRY(twofish_cbc_dec_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
* %rdx: src
*/
@@ -14420,7 +15276,12 @@ index 0505813..b067311 100644
ret;
ENDPROC(twofish_cbc_dec_8way)
-@@ -394,20 +400,21 @@ ENTRY(twofish_ctr_8way)
+-ENTRY(twofish_ctr_8way)
++RAP_ENTRY(twofish_ctr_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -394,24 +400,25 @@ ENTRY(twofish_ctr_8way)
* %rcx: iv (little endian, 128bit)
*/
@@ -14446,7 +15307,12 @@ index 0505813..b067311 100644
ret;
ENDPROC(twofish_ctr_8way)
-@@ -430,6 +437,7 @@ ENTRY(twofish_xts_enc_8way)
+-ENTRY(twofish_xts_enc_8way)
++RAP_ENTRY(twofish_xts_enc_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
+@@ -430,10 +437,11 @@ ENTRY(twofish_xts_enc_8way)
/* dst <= regs xor IVs(in dst) */
store_xts_8way(%r11, RC1, RD1, RA1, RB1, RC2, RD2, RA2, RB2);
@@ -14454,6 +15320,11 @@ index 0505813..b067311 100644
ret;
ENDPROC(twofish_xts_enc_8way)
+-ENTRY(twofish_xts_dec_8way)
++RAP_ENTRY(twofish_xts_dec_8way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -452,5 +460,6 @@ ENTRY(twofish_xts_dec_8way)
/* dst <= regs xor IVs(in dst) */
store_xts_8way(%r11, RA1, RB1, RC1, RD1, RA2, RB2, RC2, RD2);
@@ -14461,8 +15332,21 @@ index 0505813..b067311 100644
+ pax_force_retaddr
ret;
ENDPROC(twofish_xts_dec_8way)
+diff --git a/arch/x86/crypto/twofish-i586-asm_32.S b/arch/x86/crypto/twofish-i586-asm_32.S
+index 694ea45..91cc5b2 100644
+--- a/arch/x86/crypto/twofish-i586-asm_32.S
++++ b/arch/x86/crypto/twofish-i586-asm_32.S
+@@ -220,7 +220,7 @@
+ xor %esi, d ## D;\
+ ror $1, d ## D;
+
+-ENTRY(twofish_enc_blk)
++RAP_ENTRY(twofish_enc_blk)
+ push %ebp /* save registers according to calling convention*/
+ push %ebx
+ push %esi
diff --git a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
-index 1c3b7ce..02f578d 100644
+index 1c3b7ce..c9912c7 100644
--- a/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
+++ b/arch/x86/crypto/twofish-x86_64-asm_64-3way.S
@@ -21,6 +21,7 @@
@@ -14481,7 +15365,7 @@ index 1c3b7ce..02f578d 100644
ret;
.L__enc_xor3:
-@@ -269,6 +271,7 @@ ENTRY(__twofish_enc_blk_3way)
+@@ -269,10 +271,11 @@ ENTRY(__twofish_enc_blk_3way)
popq %r13;
popq %r14;
popq %r15;
@@ -14489,6 +15373,11 @@ index 1c3b7ce..02f578d 100644
ret;
ENDPROC(__twofish_enc_blk_3way)
+-ENTRY(twofish_dec_blk_3way)
++RAP_ENTRY(twofish_dec_blk_3way)
+ /* input:
+ * %rdi: ctx, CTX
+ * %rsi: dst
@@ -308,5 +311,6 @@ ENTRY(twofish_dec_blk_3way)
popq %r13;
popq %r14;
@@ -14497,7 +15386,7 @@ index 1c3b7ce..02f578d 100644
ret;
ENDPROC(twofish_dec_blk_3way)
diff --git a/arch/x86/crypto/twofish-x86_64-asm_64.S b/arch/x86/crypto/twofish-x86_64-asm_64.S
-index a350c99..c1bac24 100644
+index a350c99..080c5ab 100644
--- a/arch/x86/crypto/twofish-x86_64-asm_64.S
+++ b/arch/x86/crypto/twofish-x86_64-asm_64.S
@@ -22,6 +22,7 @@
@@ -14508,7 +15397,16 @@ index a350c99..c1bac24 100644
#define a_offset 0
#define b_offset 4
-@@ -265,6 +266,7 @@ ENTRY(twofish_enc_blk)
+@@ -215,7 +216,7 @@
+ xor %r8d, d ## D;\
+ ror $1, d ## D;
+
+-ENTRY(twofish_enc_blk)
++RAP_ENTRY(twofish_enc_blk)
+ pushq R1
+
+ /* %rdi contains the ctx address */
+@@ -265,10 +266,11 @@ ENTRY(twofish_enc_blk)
popq R1
movl $1,%eax
@@ -14516,6 +15414,11 @@ index a350c99..c1bac24 100644
ret
ENDPROC(twofish_enc_blk)
+-ENTRY(twofish_dec_blk)
++RAP_ENTRY(twofish_dec_blk)
+ pushq R1
+
+ /* %rdi contains the ctx address */
@@ -317,5 +319,6 @@ ENTRY(twofish_dec_blk)
popq R1
@@ -14523,11 +15426,121 @@ index a350c99..c1bac24 100644
+ pax_force_retaddr
ret
ENDPROC(twofish_dec_blk)
+diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c
+index b7a3904b..3e4d0d6 100644
+--- a/arch/x86/crypto/twofish_avx_glue.c
++++ b/arch/x86/crypto/twofish_avx_glue.c
+@@ -46,24 +46,25 @@
+ #define TWOFISH_PARALLEL_BLOCKS 8
+
+ /* 8-way parallel cipher functions */
+-asmlinkage void twofish_ecb_enc_8way(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_ecb_enc_8way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void twofish_ecb_dec_8way(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_ecb_dec_8way(void *ctx, u8 *dst,
+ const u8 *src);
+
+-asmlinkage void twofish_cbc_dec_8way(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_cbc_dec_8way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void twofish_ctr_8way(struct twofish_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void twofish_ctr_8way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+-asmlinkage void twofish_xts_enc_8way(struct twofish_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
+-asmlinkage void twofish_xts_dec_8way(struct twofish_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void twofish_xts_enc_8way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
++asmlinkage void twofish_xts_dec_8way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+-static inline void twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,
++static inline void twofish_enc_blk_3way(void *_ctx, u8 *dst,
+ const u8 *src)
+ {
++ struct twofish_ctx *ctx = _ctx;
+ __twofish_enc_blk_3way(ctx, dst, src, false);
+ }
+
+diff --git a/arch/x86/crypto/twofish_glue.c b/arch/x86/crypto/twofish_glue.c
+index 77e06c2..a45c27b 100644
+--- a/arch/x86/crypto/twofish_glue.c
++++ b/arch/x86/crypto/twofish_glue.c
+@@ -44,10 +44,10 @@
+ #include <linux/module.h>
+ #include <linux/types.h>
+
+-asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_enc_blk(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(twofish_enc_blk);
+-asmlinkage void twofish_dec_blk(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_dec_blk(void *ctx, u8 *dst,
+ const u8 *src);
+ EXPORT_SYMBOL_GPL(twofish_dec_blk);
+
+diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c
+index 56d8a08..a9f21f5 100644
+--- a/arch/x86/crypto/twofish_glue_3way.c
++++ b/arch/x86/crypto/twofish_glue_3way.c
+@@ -36,21 +36,21 @@
+ EXPORT_SYMBOL_GPL(__twofish_enc_blk_3way);
+ EXPORT_SYMBOL_GPL(twofish_dec_blk_3way);
+
+-static inline void twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,
++static inline void twofish_enc_blk_3way(void *ctx, u8 *dst,
+ const u8 *src)
+ {
+ __twofish_enc_blk_3way(ctx, dst, src, false);
+ }
+
+-static inline void twofish_enc_blk_xor_3way(struct twofish_ctx *ctx, u8 *dst,
++static inline void twofish_enc_blk_xor_3way(void *ctx, u8 *dst,
+ const u8 *src)
+ {
+ __twofish_enc_blk_3way(ctx, dst, src, true);
+ }
+
+-void twofish_dec_blk_cbc_3way(void *ctx, u128 *dst, const u128 *src)
++void twofish_dec_blk_cbc_3way(void *ctx, u8 *_dst, const u8 *_src)
+ {
+- u128 ivs[2];
++ u128 ivs[2], *dst = (u128 *)_dst, *src = (u128 *)_src;
+
+ ivs[0] = src[0];
+ ivs[1] = src[1];
+@@ -118,10 +118,10 @@ static const struct common_glue_ctx twofish_ctr = {
+
+ .funcs = { {
+ .num_blocks = 3,
+- .fn_u = { .ecb = GLUE_FUNC_CAST(twofish_enc_blk_ctr_3way) }
++ .fn_u = { .ctr = GLUE_CTR_FUNC_CAST(twofish_enc_blk_ctr_3way) }
+ }, {
+ .num_blocks = 1,
+- .fn_u = { .ecb = GLUE_FUNC_CAST(twofish_enc_blk_ctr) }
++ .fn_u = { .ctr = GLUE_CTR_FUNC_CAST(twofish_enc_blk_ctr) }
+ } }
+ };
+
+diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile
+index bd55ded..1310c8e 100644
+--- a/arch/x86/entry/Makefile
++++ b/arch/x86/entry/Makefile
+@@ -9,3 +9,5 @@ obj-y += vsyscall/
+
+ obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o
+
++CFLAGS_REMOVE_syscall_32.o = $(RAP_PLUGIN_ABS_CFLAGS)
++CFLAGS_REMOVE_syscall_64.o = $(RAP_PLUGIN_ABS_CFLAGS)
diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
-index 3c71dd9..008b8db 100644
+index e32206e0..809adae 100644
--- a/arch/x86/entry/calling.h
+++ b/arch/x86/entry/calling.h
-@@ -93,23 +93,26 @@ For 32-bit we have the following conventions - kernel is built with
+@@ -95,23 +95,26 @@ For 32-bit we have the following conventions - kernel is built with
.endm
.macro SAVE_C_REGS_HELPER offset=0 rax=1 rcx=1 r8910=1 r11=1
@@ -14563,7 +15576,7 @@ index 3c71dd9..008b8db 100644
.endm
.macro SAVE_C_REGS offset=0
SAVE_C_REGS_HELPER \offset, 1, 1, 1, 1
-@@ -128,67 +131,78 @@ For 32-bit we have the following conventions - kernel is built with
+@@ -130,67 +133,78 @@ For 32-bit we have the following conventions - kernel is built with
.endm
.macro SAVE_EXTRA_REGS offset=0
@@ -14670,7 +15683,7 @@ index 3c71dd9..008b8db 100644
.macro REMOVE_PT_GPREGS_FROM_STACK addskip=0
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
-index 1a4477c..9bc8a3a 100644
+index 1a4477c..0031513 100644
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -32,9 +32,7 @@
@@ -14761,7 +15774,60 @@ index 1a4477c..9bc8a3a 100644
/*
* First do one-time work. If these work items are enabled, we
* want to run them exactly once per syscall exit with IRQs on.
-@@ -415,6 +432,7 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
+@@ -387,10 +404,52 @@ __always_inline void do_syscall_32_irqs_on(struct pt_regs *regs)
+ * the high bits are zero. Make sure we zero-extend all
+ * of the args.
+ */
++#ifdef CONFIG_PAX_RAP
++#ifdef CONFIG_X86_64
++ asm volatile("movl %[param1],%%edi\n\t"
++ "movl %[param2],%%esi\n\t"
++ "movl %[param3],%%edx\n\t"
++ "movl %[param4],%%ecx\n\t"
++ "movl %[param5],%%r8d\n\t"
++ "movl %[param6],%%r9d\n\t"
++ "call *%P[syscall]\n\t"
++ "mov %%rax,%[result]\n\t"
++ : [result] "=m" (regs->ax)
++ : [syscall] "m" (ia32_sys_call_table[nr]),
++ [param1] "m" (regs->bx),
++ [param2] "m" (regs->cx),
++ [param3] "m" (regs->dx),
++ [param4] "m" (regs->si),
++ [param5] "m" (regs->di),
++ [param6] "m" (regs->bp)
++ : "di", "si", "dx", "cx", "r8", "r9", "memory");
++#else
++#error XXX VERIFY
++ asm volatile("pushl %[param6]\n\t"
++ "pushl %[param5]\n\t"
++ "pushl %[param4]\n\t"
++ "pushl %[param3]\n\t"
++ "pushl %[param2]\n\t"
++ "pushl %[param1]\n\t"
++ "call *%P[syscall]\n\t"
++ "addl $6*8,%%esp\n\t"
++ "mov %%eax,%[result]\n\t"
++ : [result] "=m" (regs->ax)
++ : [syscall] "m" (ia32_sys_call_table[nr]),
++ [param1] "m" (regs->bx),
++ [param2] "m" (regs->cx),
++ [param3] "m" (regs->dx),
++ [param4] "m" (regs->si),
++ [param5] "m" (regs->di),
++ [param6] "m" (regs->bp)
++ : "ax", "dx", "cx", "memory");
++#endif
++#else
+ regs->ax = ia32_sys_call_table[nr](
+ (unsigned int)regs->bx, (unsigned int)regs->cx,
+ (unsigned int)regs->dx, (unsigned int)regs->si,
+ (unsigned int)regs->di, (unsigned int)regs->bp);
++#endif
+ }
+
+ syscall_return_slowpath(regs);
+@@ -415,6 +474,7 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
unsigned long landing_pad = (unsigned long)current->mm->context.vdso +
vdso_image_32.sym_int80_landing_pad;
@@ -14769,7 +15835,7 @@ index 1a4477c..9bc8a3a 100644
/*
* SYSENTER loses EIP, and even SYSCALL32 needs us to skip forward
-@@ -435,11 +453,9 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
+@@ -435,11 +495,9 @@ __visible long do_fast_syscall_32(struct pt_regs *regs)
* Micro-optimization: the pointer we're following is explicitly
* 32 bits, so it can't be out of range.
*/
@@ -14784,7 +15850,7 @@ index 1a4477c..9bc8a3a 100644
) {
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
-index f3b6d54..d41929e 100644
+index bb3e376..567eb30 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -147,13 +147,157 @@
@@ -15015,7 +16081,7 @@ index f3b6d54..d41929e 100644
#endif
# SYSENTER call handler stub
-@@ -300,6 +461,10 @@ sysenter_past_esp:
+@@ -301,6 +462,10 @@ sysenter_past_esp:
pushl %eax /* pt_regs->orig_ax */
SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest */
@@ -15026,7 +16092,7 @@ index f3b6d54..d41929e 100644
/*
* User mode is traced as though IRQs are on, and SYSENTER
* turned them off.
-@@ -312,11 +477,20 @@ sysenter_past_esp:
+@@ -313,11 +478,20 @@ sysenter_past_esp:
ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
"jmp .Lsyscall_32_done", X86_FEATURE_XENPV
@@ -15047,8 +16113,8 @@ index f3b6d54..d41929e 100644
PTGS_TO_GS
popl %ebx /* pt_regs->bx */
addl $2*4, %esp /* skip pt_regs->cx and pt_regs->dx */
-@@ -332,10 +506,16 @@ sysenter_past_esp:
- ENABLE_INTERRUPTS_SYSEXIT
+@@ -334,10 +508,16 @@ sysenter_past_esp:
+ sysexit
.pushsection .fixup, "ax"
-2: movl $0, PT_FS(%esp)
@@ -15066,7 +16132,7 @@ index f3b6d54..d41929e 100644
PTGS_TO_GS_EX
ENDPROC(entry_SYSENTER_32)
-@@ -345,6 +525,10 @@ ENTRY(entry_INT80_32)
+@@ -347,6 +527,10 @@ ENTRY(entry_INT80_32)
pushl %eax /* pt_regs->orig_ax */
SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest */
@@ -15077,7 +16143,7 @@ index f3b6d54..d41929e 100644
/*
* User mode is traced as though IRQs are on. Unlike the 64-bit
* case, INT80 is a trap gate on 32-bit kernels, so interrupts
-@@ -355,6 +539,13 @@ ENTRY(entry_INT80_32)
+@@ -357,6 +541,13 @@ ENTRY(entry_INT80_32)
call do_syscall_32_irqs_on
.Lsyscall_32_done:
@@ -15091,7 +16157,7 @@ index f3b6d54..d41929e 100644
restore_all:
TRACE_IRQS_IRET
restore_all_notrace:
-@@ -409,14 +600,34 @@ ldt_ss:
+@@ -411,14 +602,34 @@ ldt_ss:
* compensating for the offset by changing to the ESPFIX segment with
* a base address that matches for the difference.
*/
@@ -15129,7 +16195,7 @@ index f3b6d54..d41929e 100644
pushl $__ESPFIX_SS
pushl %eax /* new kernel esp */
/*
-@@ -440,8 +651,15 @@ ENDPROC(entry_INT80_32)
+@@ -442,8 +653,15 @@ ENDPROC(entry_INT80_32)
*/
#ifdef CONFIG_X86_ESPFIX32
/* fixup the stack */
@@ -15147,7 +16213,7 @@ index f3b6d54..d41929e 100644
shl $16, %eax
addl %esp, %eax /* the adjusted stack pointer */
pushl $__KERNEL_DS
-@@ -477,7 +695,7 @@ ENTRY(irq_entries_start)
+@@ -479,7 +697,7 @@ ENTRY(irq_entries_start)
jmp common_interrupt
.align 8
.endr
@@ -15156,7 +16222,7 @@ index f3b6d54..d41929e 100644
/*
* the CPU automatically disables interrupts when executing an IRQ vector,
-@@ -524,7 +742,7 @@ ENTRY(coprocessor_error)
+@@ -526,7 +744,7 @@ ENTRY(coprocessor_error)
pushl $0
pushl $do_coprocessor_error
jmp error_code
@@ -15165,7 +16231,7 @@ index f3b6d54..d41929e 100644
ENTRY(simd_coprocessor_error)
ASM_CLAC
-@@ -538,25 +756,25 @@ ENTRY(simd_coprocessor_error)
+@@ -540,7 +758,7 @@ ENTRY(simd_coprocessor_error)
pushl $do_simd_coprocessor_error
#endif
jmp error_code
@@ -15174,28 +16240,16 @@ index f3b6d54..d41929e 100644
ENTRY(device_not_available)
ASM_CLAC
- pushl $-1 # mark this as an int
- pushl $do_device_not_available
- jmp error_code
--END(device_not_available)
-+ENDPROC(device_not_available)
-
- #ifdef CONFIG_PARAVIRT
+@@ -553,7 +771,7 @@ END(device_not_available)
ENTRY(native_iret)
iret
_ASM_EXTABLE(native_iret, iret_exc)
-END(native_iret)
+ENDPROC(native_iret)
-
- ENTRY(native_irq_enable_sysexit)
- sti
- sysexit
--END(native_irq_enable_sysexit)
-+ENDPROC(native_irq_enable_sysexit)
#endif
ENTRY(overflow)
-@@ -564,59 +782,59 @@ ENTRY(overflow)
+@@ -561,59 +779,59 @@ ENTRY(overflow)
pushl $0
pushl $do_overflow
jmp error_code
@@ -15264,7 +16318,7 @@ index f3b6d54..d41929e 100644
#ifdef CONFIG_X86_MCE
ENTRY(machine_check)
-@@ -624,7 +842,7 @@ ENTRY(machine_check)
+@@ -621,7 +839,7 @@ ENTRY(machine_check)
pushl $0
pushl machine_check_vector
jmp error_code
@@ -15273,7 +16327,7 @@ index f3b6d54..d41929e 100644
#endif
ENTRY(spurious_interrupt_bug)
-@@ -632,7 +850,7 @@ ENTRY(spurious_interrupt_bug)
+@@ -629,7 +847,7 @@ ENTRY(spurious_interrupt_bug)
pushl $0
pushl $do_spurious_interrupt_bug
jmp error_code
@@ -15282,7 +16336,7 @@ index f3b6d54..d41929e 100644
#ifdef CONFIG_XEN
/*
-@@ -739,7 +957,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
+@@ -736,7 +954,7 @@ BUILD_INTERRUPT3(hyperv_callback_vector, HYPERVISOR_CALLBACK_VECTOR,
ENTRY(mcount)
ret
@@ -15291,7 +16345,7 @@ index f3b6d54..d41929e 100644
ENTRY(ftrace_caller)
pushl %eax
-@@ -769,7 +987,7 @@ ftrace_graph_call:
+@@ -766,7 +984,7 @@ ftrace_graph_call:
.globl ftrace_stub
ftrace_stub:
ret
@@ -15300,7 +16354,7 @@ index f3b6d54..d41929e 100644
ENTRY(ftrace_regs_caller)
pushf /* push flags before compare (in cs location) */
-@@ -867,7 +1085,7 @@ trace:
+@@ -864,7 +1082,7 @@ trace:
popl %ecx
popl %eax
jmp ftrace_stub
@@ -15309,7 +16363,7 @@ index f3b6d54..d41929e 100644
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* CONFIG_FUNCTION_TRACER */
-@@ -885,7 +1103,7 @@ ENTRY(ftrace_graph_caller)
+@@ -882,7 +1100,7 @@ ENTRY(ftrace_graph_caller)
popl %ecx
popl %eax
ret
@@ -15318,7 +16372,7 @@ index f3b6d54..d41929e 100644
.globl return_to_handler
return_to_handler:
-@@ -904,7 +1122,7 @@ ENTRY(trace_page_fault)
+@@ -901,7 +1119,7 @@ ENTRY(trace_page_fault)
ASM_CLAC
pushl $trace_do_page_fault
jmp error_code
@@ -15327,7 +16381,7 @@ index f3b6d54..d41929e 100644
#endif
ENTRY(page_fault)
-@@ -933,14 +1151,17 @@ error_code:
+@@ -930,14 +1148,17 @@ error_code:
movl $-1, PT_ORIG_EAX(%esp) # no syscall to restart
REG_TO_PTGS %ecx
SET_KERNEL_GS %ecx
@@ -15347,16 +16401,25 @@ index f3b6d54..d41929e 100644
/*
* Debug traps and NMI can happen at the one SYSENTER instruction
-@@ -978,7 +1199,7 @@ debug_stack_correct:
+@@ -962,7 +1183,7 @@ END(page_fault)
+ pushl $sysenter_past_esp
+ .endm
+
+-ENTRY(debug)
++ENTRY(int1)
+ ASM_CLAC
+ cmpl $entry_SYSENTER_32, (%esp)
+ jne debug_stack_correct
+@@ -975,7 +1196,7 @@ debug_stack_correct:
movl %esp, %eax # pt_regs pointer
call do_debug
jmp ret_from_exception
-END(debug)
-+ENDPROC(debug)
++ENDPROC(int1)
/*
* NMI is doubly nasty. It can happen _while_ we're handling
-@@ -1017,6 +1238,9 @@ nmi_stack_correct:
+@@ -1014,6 +1235,9 @@ nmi_stack_correct:
xorl %edx, %edx # zero error code
movl %esp, %eax # pt_regs pointer
call do_nmi
@@ -15366,7 +16429,16 @@ index f3b6d54..d41929e 100644
jmp restore_all_notrace
nmi_stack_fixup:
-@@ -1050,11 +1274,14 @@ nmi_espfix_stack:
+@@ -1023,7 +1247,7 @@ nmi_stack_fixup:
+ nmi_debug_stack_check:
+ cmpw $__KERNEL_CS, 16(%esp)
+ jne nmi_stack_correct
+- cmpl $debug, (%esp)
++ cmpl $int1, (%esp)
+ jb nmi_stack_correct
+ cmpl $debug_esp_fix_insn, (%esp)
+ ja nmi_stack_correct
+@@ -1047,11 +1271,14 @@ nmi_espfix_stack:
FIXUP_ESPFIX_STACK # %eax == %esp
xorl %edx, %edx # zero error code
call do_nmi
@@ -15382,7 +16454,7 @@ index f3b6d54..d41929e 100644
ENTRY(int3)
ASM_CLAC
-@@ -1065,17 +1292,17 @@ ENTRY(int3)
+@@ -1062,17 +1289,17 @@ ENTRY(int3)
movl %esp, %eax # pt_regs pointer
call do_int3
jmp ret_from_exception
@@ -15404,7 +16476,7 @@ index f3b6d54..d41929e 100644
+ENDPROC(async_page_fault)
#endif
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
-index a55697d..66473ae 100644
+index 9d34d3c..2398c40 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -36,6 +36,8 @@
@@ -16012,9 +17084,9 @@ index a55697d..66473ae 100644
/*
* We need to tell lockdep that IRQs are off. We can't do this until
* we fix gsbase, and we should do it before enter_from_user_mode
-@@ -524,7 +951,9 @@ END(irq_entries_start)
- call enter_from_user_mode
- #endif
+@@ -522,7 +949,9 @@ END(irq_entries_start)
+
+ CALL_enter_from_user_mode
-1:
+ jmp 2f
@@ -16023,7 +17095,7 @@ index a55697d..66473ae 100644
/*
* Save previous stack pointer, optionally switch to interrupt stack.
* irq_count is used to check if a CPU is already on an interrupt stack
-@@ -536,6 +965,7 @@ END(irq_entries_start)
+@@ -534,6 +963,7 @@ END(irq_entries_start)
incl PER_CPU_VAR(irq_count)
cmovzq PER_CPU_VAR(irq_stack_ptr), %rsp
pushq %rdi
@@ -16031,7 +17103,7 @@ index a55697d..66473ae 100644
/* We entered an interrupt context - irqs are off: */
TRACE_IRQS_OFF
-@@ -567,6 +997,8 @@ ret_from_intr:
+@@ -565,6 +995,8 @@ ret_from_intr:
GLOBAL(retint_user)
mov %rsp,%rdi
call prepare_exit_to_usermode
@@ -16040,7 +17112,7 @@ index a55697d..66473ae 100644
TRACE_IRQS_IRETQ
SWAPGS
jmp restore_regs_and_iret
-@@ -584,6 +1016,21 @@ retint_kernel:
+@@ -582,6 +1014,21 @@ retint_kernel:
jmp 0b
1:
#endif
@@ -16062,7 +17134,7 @@ index a55697d..66473ae 100644
/*
* The iretq could re-enable interrupts:
*/
-@@ -627,15 +1074,15 @@ native_irq_return_ldt:
+@@ -625,15 +1072,15 @@ native_irq_return_ldt:
SWAPGS
movq PER_CPU_VAR(espfix_waddr), %rdi
movq %rax, (0*8)(%rdi) /* RAX */
@@ -16083,7 +17155,7 @@ index a55697d..66473ae 100644
movq %rax, (4*8)(%rdi)
andl $0xffff0000, %eax
popq %rdi
-@@ -645,7 +1092,7 @@ native_irq_return_ldt:
+@@ -643,7 +1090,7 @@ native_irq_return_ldt:
popq %rax
jmp native_irq_return_iret
#endif
@@ -16092,7 +17164,7 @@ index a55697d..66473ae 100644
/*
* APIC interrupts.
-@@ -657,7 +1104,7 @@ ENTRY(\sym)
+@@ -655,7 +1102,7 @@ ENTRY(\sym)
.Lcommon_\sym:
interrupt \do_sym
jmp ret_from_intr
@@ -16101,7 +17173,7 @@ index a55697d..66473ae 100644
.endm
#ifdef CONFIG_TRACING
-@@ -722,7 +1169,7 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt
+@@ -720,7 +1167,7 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt
/*
* Exception entry points.
*/
@@ -16110,7 +17182,7 @@ index a55697d..66473ae 100644
.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1
ENTRY(\sym)
-@@ -769,6 +1216,12 @@ ENTRY(\sym)
+@@ -767,6 +1214,12 @@ ENTRY(\sym)
.endif
.if \shift_ist != -1
@@ -16123,7 +17195,7 @@ index a55697d..66473ae 100644
subq $EXCEPTION_STKSZ, CPU_TSS_IST(\shift_ist)
.endif
-@@ -812,7 +1265,7 @@ ENTRY(\sym)
+@@ -810,7 +1263,7 @@ ENTRY(\sym)
jmp error_exit /* %ebx: no swapgs flag */
.endif
@@ -16132,7 +17204,7 @@ index a55697d..66473ae 100644
.endm
#ifdef CONFIG_TRACING
-@@ -854,8 +1307,9 @@ gs_change:
+@@ -852,8 +1305,9 @@ gs_change:
2: mfence /* workaround */
SWAPGS
popfq
@@ -16143,7 +17215,7 @@ index a55697d..66473ae 100644
_ASM_EXTABLE(gs_change, bad_gs)
.section .fixup, "ax"
-@@ -877,8 +1331,9 @@ ENTRY(do_softirq_own_stack)
+@@ -875,8 +1329,9 @@ ENTRY(do_softirq_own_stack)
call __do_softirq
leaveq
decl PER_CPU_VAR(irq_count)
@@ -16154,7 +17226,7 @@ index a55697d..66473ae 100644
#ifdef CONFIG_XEN
idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
-@@ -914,7 +1369,7 @@ ENTRY(xen_do_hypervisor_callback) /* do_hypervisor_callback(struct *pt_regs) */
+@@ -912,7 +1367,7 @@ ENTRY(xen_do_hypervisor_callback) /* do_hypervisor_callback(struct *pt_regs) */
call xen_maybe_preempt_hcall
#endif
jmp error_exit
@@ -16163,7 +17235,7 @@ index a55697d..66473ae 100644
/*
* Hypervisor uses this for application faults while it executes.
-@@ -959,7 +1414,7 @@ ENTRY(xen_failsafe_callback)
+@@ -957,7 +1412,7 @@ ENTRY(xen_failsafe_callback)
SAVE_C_REGS
SAVE_EXTRA_REGS
jmp error_exit
@@ -16172,7 +17244,16 @@ index a55697d..66473ae 100644
apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
xen_hvm_callback_vector xen_evtchn_do_upcall
-@@ -1008,8 +1463,34 @@ ENTRY(paranoid_entry)
+@@ -969,7 +1424,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
+ hyperv_callback_vector hyperv_vector_handler
+ #endif /* CONFIG_HYPERV */
+
+-idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
++idtentry int1 do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
+ idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
+ idtentry stack_segment do_stack_segment has_error_code=1
+
+@@ -1006,8 +1461,34 @@ ENTRY(paranoid_entry)
js 1f /* negative -> in kernel */
SWAPGS
xorl %ebx, %ebx
@@ -16209,7 +17290,7 @@ index a55697d..66473ae 100644
/*
* "Paranoid" exit path from exception stack. This is invoked
-@@ -1026,19 +1507,26 @@ END(paranoid_entry)
+@@ -1024,19 +1505,26 @@ END(paranoid_entry)
ENTRY(paranoid_exit)
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF_DEBUG
@@ -16238,7 +17319,7 @@ index a55697d..66473ae 100644
/*
* Save all registers in pt_regs, and switch gs if needed.
-@@ -1052,13 +1540,18 @@ ENTRY(error_entry)
+@@ -1050,13 +1538,18 @@ ENTRY(error_entry)
testb $3, CS+8(%rsp)
jz .Lerror_kernelspace
@@ -16258,10 +17339,10 @@ index a55697d..66473ae 100644
.Lerror_entry_from_usermode_after_swapgs:
/*
* We need to tell lockdep that IRQs are off. We can't do this until
-@@ -1069,10 +1562,12 @@ ENTRY(error_entry)
- #ifdef CONFIG_CONTEXT_TRACKING
- call enter_from_user_mode
- #endif
+@@ -1065,10 +1558,12 @@ ENTRY(error_entry)
+ */
+ TRACE_IRQS_OFF
+ CALL_enter_from_user_mode
+ pax_force_retaddr
ret
@@ -16271,7 +17352,7 @@ index a55697d..66473ae 100644
ret
/*
-@@ -1090,14 +1585,16 @@ ENTRY(error_entry)
+@@ -1086,14 +1581,16 @@ ENTRY(error_entry)
cmpq %rax, RIP+8(%rsp)
je .Lbstep_iret
cmpq $gs_change, RIP+8(%rsp)
@@ -16290,7 +17371,7 @@ index a55697d..66473ae 100644
.Lbstep_iret:
/* Fix truncated RIP */
-@@ -1111,6 +1608,12 @@ ENTRY(error_entry)
+@@ -1107,6 +1604,12 @@ ENTRY(error_entry)
*/
SWAPGS
@@ -16303,7 +17384,7 @@ index a55697d..66473ae 100644
/*
* Pretend that the exception came from user mode: set up pt_regs
* as if we faulted immediately after IRET and clear EBX so that
-@@ -1121,11 +1624,11 @@ ENTRY(error_entry)
+@@ -1117,11 +1620,11 @@ ENTRY(error_entry)
mov %rax, %rsp
decl %ebx
jmp .Lerror_entry_from_usermode_after_swapgs
@@ -16317,7 +17398,7 @@ index a55697d..66473ae 100644
* 1: already in kernel mode, don't need SWAPGS
* 0: user gsbase is loaded, we need SWAPGS and standard preparation for return to usermode
*/
-@@ -1133,10 +1636,10 @@ ENTRY(error_exit)
+@@ -1129,10 +1632,10 @@ ENTRY(error_exit)
movl %ebx, %eax
DISABLE_INTERRUPTS(CLBR_NONE)
TRACE_IRQS_OFF
@@ -16330,7 +17411,7 @@ index a55697d..66473ae 100644
/* Runs on exception stack */
ENTRY(nmi)
-@@ -1190,6 +1693,8 @@ ENTRY(nmi)
+@@ -1186,6 +1689,8 @@ ENTRY(nmi)
* other IST entries.
*/
@@ -16339,7 +17420,7 @@ index a55697d..66473ae 100644
/* Use %rdx as our temp variable throughout */
pushq %rdx
-@@ -1233,6 +1738,12 @@ ENTRY(nmi)
+@@ -1229,6 +1734,12 @@ ENTRY(nmi)
pushq %r14 /* pt_regs->r14 */
pushq %r15 /* pt_regs->r15 */
@@ -16352,7 +17433,7 @@ index a55697d..66473ae 100644
/*
* At this point we no longer need to worry about stack damage
* due to nesting -- we're on the normal thread stack and we're
-@@ -1243,12 +1754,19 @@ ENTRY(nmi)
+@@ -1239,12 +1750,19 @@ ENTRY(nmi)
movq $-1, %rsi
call do_nmi
@@ -16372,7 +17453,7 @@ index a55697d..66473ae 100644
jmp restore_c_regs_and_iret
.Lnmi_from_kernel:
-@@ -1370,6 +1888,7 @@ nested_nmi_out:
+@@ -1366,6 +1884,7 @@ nested_nmi_out:
popq %rdx
/* We are returning to kernel mode, so this cannot result in a fault. */
@@ -16380,7 +17461,7 @@ index a55697d..66473ae 100644
INTERRUPT_RETURN
first_nmi:
-@@ -1398,7 +1917,7 @@ first_nmi:
+@@ -1394,7 +1913,7 @@ first_nmi:
pushq %rsp /* RSP (minus 8 because of the previous push) */
addq $8, (%rsp) /* Fix up RSP */
pushfq /* RFLAGS */
@@ -16389,7 +17470,7 @@ index a55697d..66473ae 100644
pushq $1f /* RIP */
INTERRUPT_RETURN /* continues at repeat_nmi below */
1:
-@@ -1443,20 +1962,22 @@ end_repeat_nmi:
+@@ -1439,20 +1958,22 @@ end_repeat_nmi:
ALLOC_PT_GPREGS_ON_STACK
/*
@@ -16415,7 +17496,7 @@ index a55697d..66473ae 100644
jnz nmi_restore
nmi_swapgs:
SWAPGS_UNSAFE_STACK
-@@ -1467,6 +1988,8 @@ nmi_restore:
+@@ -1463,6 +1984,8 @@ nmi_restore:
/* Point RSP at the "iret" frame. */
REMOVE_PT_GPREGS_FROM_STACK 6*8
@@ -16424,7 +17505,7 @@ index a55697d..66473ae 100644
/*
* Clear "NMI executing". Set DF first so that we can easily
* distinguish the remaining code between here and IRET from
-@@ -1484,9 +2007,9 @@ nmi_restore:
+@@ -1480,9 +2003,9 @@ nmi_restore:
* mode, so this cannot result in a fault.
*/
INTERRUPT_RETURN
@@ -16437,10 +17518,10 @@ index a55697d..66473ae 100644
-END(ignore_sysret)
+ENDPROC(ignore_sysret)
diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
-index 15cfeba..da22a57 100644
+index 3c990ee..d49c8f4 100644
--- a/arch/x86/entry/entry_64_compat.S
+++ b/arch/x86/entry/entry_64_compat.S
-@@ -13,8 +13,10 @@
+@@ -13,11 +13,39 @@
#include <asm/irqflags.h>
#include <asm/asm.h>
#include <asm/smap.h>
@@ -16451,10 +17532,6 @@ index 15cfeba..da22a57 100644
.section .entry.text, "ax"
-@@ -25,6 +27,32 @@ ENTRY(native_usergs_sysret32)
- ENDPROC(native_usergs_sysret32)
- #endif
-
+ .macro pax_enter_kernel_user
+ pax_set_fptr_mask
+#ifdef CONFIG_PAX_MEMORY_UDEREF
@@ -16484,7 +17561,7 @@ index 15cfeba..da22a57 100644
/*
* 32-bit SYSENTER instruction entry.
*
-@@ -76,26 +104,36 @@ ENTRY(entry_SYSENTER_compat)
+@@ -69,26 +97,36 @@ ENTRY(entry_SYSENTER_compat)
ASM_CLAC /* Clear AC after saving FLAGS */
pushq $__USER32_CS /* pt_regs->cs */
@@ -16531,7 +17608,7 @@ index 15cfeba..da22a57 100644
/*
* Sysenter doesn't filter flags, so we need to clear NT
* ourselves. To save a few cycles, we can check whether
-@@ -181,17 +219,27 @@ ENTRY(entry_SYSCALL_compat)
+@@ -174,17 +212,27 @@ ENTRY(entry_SYSCALL_compat)
pushq %rdx /* pt_regs->dx */
pushq %rbp /* pt_regs->cx (stashed in bp) */
pushq $-ENOSYS /* pt_regs->ax */
@@ -16568,7 +17645,7 @@ index 15cfeba..da22a57 100644
/*
* User mode is traced as though IRQs are on, and SYSENTER
-@@ -207,11 +255,18 @@ ENTRY(entry_SYSCALL_compat)
+@@ -200,11 +248,18 @@ ENTRY(entry_SYSCALL_compat)
/* Opportunistic SYSRET */
sysret32_from_system_call:
@@ -16587,16 +17664,16 @@ index 15cfeba..da22a57 100644
addq $RAX, %rsp /* Skip r8-r15 */
popq %rax /* pt_regs->rax */
popq %rdx /* Skip pt_regs->cx */
-@@ -239,7 +294,7 @@ sysret32_from_system_call:
- xorq %r10, %r10
+@@ -233,7 +288,7 @@ sysret32_from_system_call:
movq RSP-ORIG_RAX(%rsp), %rsp
- USERGS_SYSRET32
+ swapgs
+ sysretl
-END(entry_SYSCALL_compat)
+ENDPROC(entry_SYSCALL_compat)
/*
* Emulated IA32 system calls via int 0x80.
-@@ -286,11 +341,11 @@ ENTRY(entry_INT80_compat)
+@@ -280,11 +335,11 @@ ENTRY(entry_INT80_compat)
pushq %rdx /* pt_regs->dx */
pushq %rcx /* pt_regs->cx */
pushq $-ENOSYS /* pt_regs->ax */
@@ -16613,7 +17690,7 @@ index 15cfeba..da22a57 100644
pushq %rbx /* pt_regs->rbx */
pushq %rbp /* pt_regs->rbp */
pushq %r12 /* pt_regs->r12 */
-@@ -299,6 +354,12 @@ ENTRY(entry_INT80_compat)
+@@ -293,6 +348,12 @@ ENTRY(entry_INT80_compat)
pushq %r15 /* pt_regs->r15 */
cld
@@ -16626,7 +17703,7 @@ index 15cfeba..da22a57 100644
/*
* User mode is traced as though IRQs are on, and the interrupt
* gate turned them off.
-@@ -310,10 +371,12 @@ ENTRY(entry_INT80_compat)
+@@ -304,10 +365,12 @@ ENTRY(entry_INT80_compat)
.Lsyscall_32_done:
/* Go back to user mode. */
@@ -16661,10 +17738,10 @@ index efb2b93..8a9cb8e 100644
_ASM_NOKPROBE(restore)
#endif
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
-index 265c0ed..a706eb9 100644
+index c854541..1786538 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
-@@ -69,7 +69,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
+@@ -70,7 +70,7 @@ CFL := $(PROFILING) -mcmodel=small -fPIC -O2 -fasynchronous-unwind-tables -m64 \
-fno-omit-frame-pointer -foptimize-sibling-calls \
-DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
@@ -16673,7 +17750,7 @@ index 265c0ed..a706eb9 100644
#
# vDSO code runs in userspace and -pg doesn't help with profiling anyway.
-@@ -139,6 +139,7 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
+@@ -140,6 +140,7 @@ KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
KBUILD_CFLAGS_32 := $(filter-out -mcmodel=kernel,$(KBUILD_CFLAGS_32))
KBUILD_CFLAGS_32 := $(filter-out -fno-pic,$(KBUILD_CFLAGS_32))
KBUILD_CFLAGS_32 := $(filter-out -mfentry,$(KBUILD_CFLAGS_32))
@@ -16681,7 +17758,7 @@ index 265c0ed..a706eb9 100644
KBUILD_CFLAGS_32 += -m32 -msoft-float -mregparm=0 -fpic
KBUILD_CFLAGS_32 += $(call cc-option, -fno-stack-protector)
KBUILD_CFLAGS_32 += $(call cc-option, -foptimize-sibling-calls)
-@@ -162,7 +163,7 @@ quiet_cmd_vdso = VDSO $@
+@@ -163,7 +164,7 @@ quiet_cmd_vdso = VDSO $@
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
@@ -16690,6 +17767,17 @@ index 265c0ed..a706eb9 100644
$(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS)
GCOV_PROFILE := n
+diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c
+index 1a50e09..3e25e7a 100644
+--- a/arch/x86/entry/vdso/vclock_gettime.c
++++ b/arch/x86/entry/vdso/vclock_gettime.c
+@@ -330,5 +330,5 @@ notrace time_t __vdso_time(time_t *t)
+ *t = result;
+ return result;
+ }
+-int time(time_t *t)
++time_t time(time_t *t)
+ __attribute__((weak, alias("__vdso_time")));
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index 0224987..0359810 100644
--- a/arch/x86/entry/vdso/vdso2c.h
@@ -16731,10 +17819,10 @@ index 0224987..0359810 100644
fprintf(outfile, "const struct vdso_image %s = {\n", name);
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
-index 64df471..8346804 100644
+index b8f69e2..2489643 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
-@@ -19,10 +19,7 @@
+@@ -20,10 +20,7 @@
#include <asm/page.h>
#include <asm/hpet.h>
#include <asm/desc.h>
@@ -16746,9 +17834,9 @@ index 64df471..8346804 100644
void __init init_vdso_image(const struct vdso_image *image)
{
-@@ -101,6 +98,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
- .pages = no_pages,
+@@ -103,6 +100,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
};
+ struct pvclock_vsyscall_time_info *pvti;
+#ifdef CONFIG_PAX_RANDMMAP
+ if (mm->pax_flags & MF_PAX_RANDMMAP)
@@ -16758,7 +17846,7 @@ index 64df471..8346804 100644
if (calculate_addr) {
addr = vdso_addr(current->mm->start_stack,
image->size - image->sym_vvar_start);
-@@ -111,14 +113,14 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
+@@ -113,14 +115,14 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
down_write(&mm->mmap_sem);
addr = get_unmapped_area(NULL, addr,
@@ -16775,15 +17863,14 @@ index 64df471..8346804 100644
/*
* MAYWRITE to allow gdb to COW and set breakpoints
-@@ -163,15 +165,12 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
- hpet_address >> PAGE_SHIFT,
- PAGE_SIZE,
- pgprot_noncached(PAGE_READONLY));
+@@ -178,14 +180,11 @@ static int map_vdso(const struct vdso_image *image, bool calculate_addr)
+ __pa(pvti) >> PAGE_SHIFT,
+ PAGE_SIZE,
+ PAGE_READONLY);
-
- if (ret)
- goto up_fail;
}
- #endif
up_fail:
if (ret)
@@ -16792,7 +17879,7 @@ index 64df471..8346804 100644
up_write(&mm->mmap_sem);
return ret;
-@@ -190,9 +189,6 @@ static int load_vdso32(void)
+@@ -204,9 +203,6 @@ static int load_vdso32(void)
#ifdef CONFIG_X86_64
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
{
@@ -16802,7 +17889,7 @@ index 64df471..8346804 100644
return map_vdso(&vdso_image_64, true);
}
-@@ -201,12 +197,8 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
+@@ -215,12 +211,8 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
int uses_interp)
{
#ifdef CONFIG_X86_X32_ABI
@@ -16816,7 +17903,7 @@ index 64df471..8346804 100644
#endif
#ifdef CONFIG_IA32_EMULATION
return load_vdso32();
-@@ -223,15 +215,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
+@@ -237,15 +229,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
#endif
#ifdef CONFIG_X86_64
@@ -17179,10 +18266,10 @@ index 7bfc85b..65d1ec4 100644
ALTINSTR_REPLACEMENT(newinstr2, feature2, 2) \
".popsection"
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
-index 163769d..d41133e 100644
+index e8c4fba..8d42c8c 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
-@@ -45,7 +45,7 @@ static inline void generic_apic_probe(void)
+@@ -50,7 +50,7 @@ static inline void generic_apic_probe(void)
#ifdef CONFIG_X86_LOCAL_APIC
@@ -17214,10 +18301,10 @@ index 20370c6..a2eb9b0 100644
"popl %%ebp\n\t"
"popl %%edi\n\t"
diff --git a/arch/x86/include/asm/atomic.h b/arch/x86/include/asm/atomic.h
-index ae5fb83..f6a093d 100644
+index 3e86742..1b19554 100644
--- a/arch/x86/include/asm/atomic.h
+++ b/arch/x86/include/asm/atomic.h
-@@ -28,6 +28,17 @@ static __always_inline int atomic_read(const atomic_t *v)
+@@ -27,6 +27,17 @@ static __always_inline int atomic_read(const atomic_t *v)
}
/**
@@ -17235,7 +18322,7 @@ index ae5fb83..f6a093d 100644
* atomic_set - set atomic variable
* @v: pointer of type atomic_t
* @i: required value
-@@ -40,6 +51,18 @@ static __always_inline void atomic_set(atomic_t *v, int i)
+@@ -39,6 +50,18 @@ static __always_inline void atomic_set(atomic_t *v, int i)
}
/**
@@ -17254,7 +18341,7 @@ index ae5fb83..f6a093d 100644
* atomic_add - add integer to atomic variable
* @i: integer value to add
* @v: pointer of type atomic_t
-@@ -48,7 +71,29 @@ static __always_inline void atomic_set(atomic_t *v, int i)
+@@ -47,7 +70,29 @@ static __always_inline void atomic_set(atomic_t *v, int i)
*/
static __always_inline void atomic_add(int i, atomic_t *v)
{
@@ -17285,7 +18372,7 @@ index ae5fb83..f6a093d 100644
: "+m" (v->counter)
: "ir" (i));
}
-@@ -62,7 +107,29 @@ static __always_inline void atomic_add(int i, atomic_t *v)
+@@ -61,7 +106,29 @@ static __always_inline void atomic_add(int i, atomic_t *v)
*/
static __always_inline void atomic_sub(int i, atomic_t *v)
{
@@ -17316,7 +18403,7 @@ index ae5fb83..f6a093d 100644
: "+m" (v->counter)
: "ir" (i));
}
-@@ -78,7 +145,7 @@ static __always_inline void atomic_sub(int i, atomic_t *v)
+@@ -77,7 +144,7 @@ static __always_inline void atomic_sub(int i, atomic_t *v)
*/
static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
{
@@ -17325,7 +18412,7 @@ index ae5fb83..f6a093d 100644
}
/**
-@@ -89,7 +156,27 @@ static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
+@@ -88,7 +155,27 @@ static __always_inline int atomic_sub_and_test(int i, atomic_t *v)
*/
static __always_inline void atomic_inc(atomic_t *v)
{
@@ -17354,7 +18441,7 @@ index ae5fb83..f6a093d 100644
: "+m" (v->counter));
}
-@@ -101,7 +188,27 @@ static __always_inline void atomic_inc(atomic_t *v)
+@@ -100,7 +187,27 @@ static __always_inline void atomic_inc(atomic_t *v)
*/
static __always_inline void atomic_dec(atomic_t *v)
{
@@ -17383,7 +18470,7 @@ index ae5fb83..f6a093d 100644
: "+m" (v->counter));
}
-@@ -115,7 +222,7 @@ static __always_inline void atomic_dec(atomic_t *v)
+@@ -114,7 +221,7 @@ static __always_inline void atomic_dec(atomic_t *v)
*/
static __always_inline int atomic_dec_and_test(atomic_t *v)
{
@@ -17392,7 +18479,7 @@ index ae5fb83..f6a093d 100644
}
/**
-@@ -128,7 +235,20 @@ static __always_inline int atomic_dec_and_test(atomic_t *v)
+@@ -127,7 +234,20 @@ static __always_inline int atomic_dec_and_test(atomic_t *v)
*/
static __always_inline int atomic_inc_and_test(atomic_t *v)
{
@@ -17414,7 +18501,7 @@ index ae5fb83..f6a093d 100644
}
/**
-@@ -142,7 +262,7 @@ static __always_inline int atomic_inc_and_test(atomic_t *v)
+@@ -141,7 +261,7 @@ static __always_inline int atomic_inc_and_test(atomic_t *v)
*/
static __always_inline int atomic_add_negative(int i, atomic_t *v)
{
@@ -17423,7 +18510,7 @@ index ae5fb83..f6a093d 100644
}
/**
-@@ -152,7 +272,19 @@ static __always_inline int atomic_add_negative(int i, atomic_t *v)
+@@ -151,7 +271,19 @@ static __always_inline int atomic_add_negative(int i, atomic_t *v)
*
* Atomically adds @i to @v and returns @i + @v
*/
@@ -17444,7 +18531,7 @@ index ae5fb83..f6a093d 100644
{
return i + xadd(&v->counter, i);
}
-@@ -164,15 +296,24 @@ static __always_inline int atomic_add_return(int i, atomic_t *v)
+@@ -163,15 +295,24 @@ static __always_inline int atomic_add_return(int i, atomic_t *v)
*
* Atomically subtracts @i from @v and returns @v - @i
*/
@@ -17471,7 +18558,7 @@ index ae5fb83..f6a093d 100644
{
return cmpxchg(&v->counter, old, new);
}
-@@ -182,6 +323,11 @@ static inline int atomic_xchg(atomic_t *v, int new)
+@@ -181,6 +322,11 @@ static inline int atomic_xchg(atomic_t *v, int new)
return xchg(&v->counter, new);
}
@@ -17483,7 +18570,7 @@ index ae5fb83..f6a093d 100644
#define ATOMIC_OP(op) \
static inline void atomic_##op(int i, atomic_t *v) \
{ \
-@@ -208,12 +354,25 @@ ATOMIC_OP(xor)
+@@ -207,12 +353,25 @@ ATOMIC_OP(xor)
*/
static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)
{
@@ -17512,7 +18599,7 @@ index ae5fb83..f6a093d 100644
if (likely(old == c))
break;
c = old;
-@@ -222,6 +381,49 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)
+@@ -221,6 +380,49 @@ static __always_inline int __atomic_add_unless(atomic_t *v, int a, int u)
}
/**
@@ -17563,10 +18650,10 @@ index ae5fb83..f6a093d 100644
* @v: pointer to type int
*
diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
-index a11c30b..66fd8a0 100644
+index a984111..9c1ae68 100644
--- a/arch/x86/include/asm/atomic64_32.h
+++ b/arch/x86/include/asm/atomic64_32.h
-@@ -12,6 +12,14 @@ typedef struct {
+@@ -11,6 +11,14 @@ typedef struct {
u64 __aligned(8) counter;
} atomic64_t;
@@ -17581,7 +18668,7 @@ index a11c30b..66fd8a0 100644
#define ATOMIC64_INIT(val) { (val) }
#define __ATOMIC64_DECL(sym) void atomic64_##sym(atomic64_t *, ...)
-@@ -37,21 +45,31 @@ typedef struct {
+@@ -36,21 +44,31 @@ typedef struct {
ATOMIC64_DECL_ONE(sym##_386)
ATOMIC64_DECL_ONE(add_386);
@@ -17613,7 +18700,7 @@ index a11c30b..66fd8a0 100644
ATOMIC64_DECL(dec_if_positive);
ATOMIC64_DECL(inc_not_zero);
ATOMIC64_DECL(add_unless);
-@@ -77,6 +95,21 @@ static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n
+@@ -76,6 +94,21 @@ static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n
}
/**
@@ -17635,7 +18722,7 @@ index a11c30b..66fd8a0 100644
* atomic64_xchg - xchg atomic64 variable
* @v: pointer to type atomic64_t
* @n: value to assign
-@@ -112,6 +145,22 @@ static inline void atomic64_set(atomic64_t *v, long long i)
+@@ -111,6 +144,22 @@ static inline void atomic64_set(atomic64_t *v, long long i)
}
/**
@@ -17658,7 +18745,7 @@ index a11c30b..66fd8a0 100644
* atomic64_read - read atomic64 variable
* @v: pointer to type atomic64_t
*
-@@ -125,6 +174,19 @@ static inline long long atomic64_read(const atomic64_t *v)
+@@ -124,6 +173,19 @@ static inline long long atomic64_read(const atomic64_t *v)
}
/**
@@ -17678,7 +18765,7 @@ index a11c30b..66fd8a0 100644
* atomic64_add_return - add and return
* @i: integer value to add
* @v: pointer to type atomic64_t
-@@ -139,6 +201,21 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v)
+@@ -138,6 +200,21 @@ static inline long long atomic64_add_return(long long i, atomic64_t *v)
return i;
}
@@ -17700,7 +18787,7 @@ index a11c30b..66fd8a0 100644
/*
* Other variants with different arithmetic operators:
*/
-@@ -158,6 +235,14 @@ static inline long long atomic64_inc_return(atomic64_t *v)
+@@ -157,6 +234,14 @@ static inline long long atomic64_inc_return(atomic64_t *v)
return a;
}
@@ -17715,7 +18802,7 @@ index a11c30b..66fd8a0 100644
static inline long long atomic64_dec_return(atomic64_t *v)
{
long long a;
-@@ -182,6 +267,21 @@ static inline long long atomic64_add(long long i, atomic64_t *v)
+@@ -181,6 +266,21 @@ static inline long long atomic64_add(long long i, atomic64_t *v)
}
/**
@@ -18248,11 +19335,11 @@ index acdee09..e5c31cd 100644
struct compat_timespec {
compat_time_t tv_sec;
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
-index f7ba9fb..d3945be 100644
+index 7ad8c94..00a0aa3 100644
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
-@@ -217,7 +217,8 @@
- #define X86_FEATURE_PFTHRESHOLD ( 8*32+14) /* AMD pause filter threshold */
+@@ -203,7 +203,8 @@
+
#define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer vmmcall to vmcall */
#define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */
-
@@ -18261,7 +19348,7 @@ index f7ba9fb..d3945be 100644
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
#define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* {RD/WR}{FS/GS}BASE instructions*/
-@@ -225,7 +226,7 @@
+@@ -211,7 +212,7 @@
#define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */
#define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */
#define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */
@@ -18270,7 +19357,7 @@ index f7ba9fb..d3945be 100644
#define X86_FEATURE_BMI2 ( 9*32+ 8) /* 2nd group bit manipulation extensions */
#define X86_FEATURE_ERMS ( 9*32+ 9) /* Enhanced REP MOVSB/STOSB */
#define X86_FEATURE_INVPCID ( 9*32+10) /* Invalidate Processor Context ID */
-@@ -461,7 +462,8 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
+@@ -462,7 +463,8 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
#ifdef CONFIG_X86_DEBUG_STATIC_CPU_HAS
t_warn:
@@ -18280,7 +19367,7 @@ index f7ba9fb..d3945be 100644
return false;
#endif
-@@ -482,7 +484,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
+@@ -483,7 +485,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit)
".section .discard,\"aw\",@progbits\n"
" .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
".previous\n"
@@ -18289,7 +19376,7 @@ index f7ba9fb..d3945be 100644
"3: movb $1,%0\n"
"4:\n"
".previous\n"
-@@ -517,7 +519,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
+@@ -518,7 +520,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
" .byte 5f - 4f\n" /* repl len */
" .byte 3b - 2b\n" /* pad len */
".previous\n"
@@ -18298,7 +19385,7 @@ index f7ba9fb..d3945be 100644
"4: jmp %l[t_no]\n"
"5:\n"
".previous\n"
-@@ -552,7 +554,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
+@@ -553,7 +555,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
".section .discard,\"aw\",@progbits\n"
" .byte 0xff + (4f-3f) - (2b-1b)\n" /* size check */
".previous\n"
@@ -18307,7 +19394,7 @@ index f7ba9fb..d3945be 100644
"3: movb $0,%0\n"
"4:\n"
".previous\n"
-@@ -567,7 +569,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
+@@ -568,7 +570,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit)
".section .discard,\"aw\",@progbits\n"
" .byte 0xff + (6f-5f) - (4b-3b)\n" /* size check */
".previous\n"
@@ -18316,6 +19403,208 @@ index f7ba9fb..d3945be 100644
"5: movb $1,%0\n"
"6:\n"
".previous\n"
+diff --git a/arch/x86/include/asm/crypto/camellia.h b/arch/x86/include/asm/crypto/camellia.h
+index bb93333..e3d3d57 100644
+--- a/arch/x86/include/asm/crypto/camellia.h
++++ b/arch/x86/include/asm/crypto/camellia.h
+@@ -39,34 +39,35 @@ extern int xts_camellia_setkey(struct crypto_tfm *tfm, const u8 *key,
+ /* regular block cipher functions */
+ asmlinkage void __camellia_enc_blk(struct camellia_ctx *ctx, u8 *dst,
+ const u8 *src, bool xor);
+-asmlinkage void camellia_dec_blk(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_dec_blk(void *ctx, u8 *dst,
+ const u8 *src);
+
+ /* 2-way parallel cipher functions */
+ asmlinkage void __camellia_enc_blk_2way(struct camellia_ctx *ctx, u8 *dst,
+ const u8 *src, bool xor);
+-asmlinkage void camellia_dec_blk_2way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_dec_blk_2way(void *ctx, u8 *dst,
+ const u8 *src);
+
+ /* 16-way parallel cipher functions (avx/aes-ni) */
+-asmlinkage void camellia_ecb_enc_16way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_ecb_enc_16way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void camellia_ecb_dec_16way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_ecb_dec_16way(void *ctx, u8 *dst,
+ const u8 *src);
+
+-asmlinkage void camellia_cbc_dec_16way(struct camellia_ctx *ctx, u8 *dst,
++asmlinkage void camellia_cbc_dec_16way(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void camellia_ctr_16way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_ctr_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+-asmlinkage void camellia_xts_enc_16way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
+-asmlinkage void camellia_xts_dec_16way(struct camellia_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void camellia_xts_enc_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
++asmlinkage void camellia_xts_dec_16way(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+-static inline void camellia_enc_blk(struct camellia_ctx *ctx, u8 *dst,
++static inline void camellia_enc_blk(void *_ctx, u8 *dst,
+ const u8 *src)
+ {
++ struct camellia_ctx *ctx = _ctx;
+ __camellia_enc_blk(ctx, dst, src, false);
+ }
+
+@@ -76,9 +77,10 @@ static inline void camellia_enc_blk_xor(struct camellia_ctx *ctx, u8 *dst,
+ __camellia_enc_blk(ctx, dst, src, true);
+ }
+
+-static inline void camellia_enc_blk_2way(struct camellia_ctx *ctx, u8 *dst,
++static inline void camellia_enc_blk_2way(void *_ctx, u8 *dst,
+ const u8 *src)
+ {
++ struct camellia_ctx *ctx = _ctx;
+ __camellia_enc_blk_2way(ctx, dst, src, false);
+ }
+
+@@ -89,7 +91,7 @@ static inline void camellia_enc_blk_xor_2way(struct camellia_ctx *ctx, u8 *dst,
+ }
+
+ /* glue helpers */
+-extern void camellia_decrypt_cbc_2way(void *ctx, u128 *dst, const u128 *src);
++extern void camellia_decrypt_cbc_2way(void *ctx, u8 *dst, const u8 *src);
+ extern void camellia_crypt_ctr(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+ extern void camellia_crypt_ctr_2way(void *ctx, u128 *dst, const u128 *src,
+diff --git a/arch/x86/include/asm/crypto/glue_helper.h b/arch/x86/include/asm/crypto/glue_helper.h
+index 03bb106..9e7a45c 100644
+--- a/arch/x86/include/asm/crypto/glue_helper.h
++++ b/arch/x86/include/asm/crypto/glue_helper.h
+@@ -11,16 +11,16 @@
+ #include <crypto/b128ops.h>
+
+ typedef void (*common_glue_func_t)(void *ctx, u8 *dst, const u8 *src);
+-typedef void (*common_glue_cbc_func_t)(void *ctx, u128 *dst, const u128 *src);
++typedef void (*common_glue_cbc_func_t)(void *ctx, u8 *dst, const u8 *src);
+ typedef void (*common_glue_ctr_func_t)(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+ typedef void (*common_glue_xts_func_t)(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+
+-#define GLUE_FUNC_CAST(fn) ((common_glue_func_t)(fn))
+-#define GLUE_CBC_FUNC_CAST(fn) ((common_glue_cbc_func_t)(fn))
+-#define GLUE_CTR_FUNC_CAST(fn) ((common_glue_ctr_func_t)(fn))
+-#define GLUE_XTS_FUNC_CAST(fn) ((common_glue_xts_func_t)(fn))
++#define GLUE_FUNC_CAST(fn) (fn)
++#define GLUE_CBC_FUNC_CAST(fn) (fn)
++#define GLUE_CTR_FUNC_CAST(fn) (fn)
++#define GLUE_XTS_FUNC_CAST(fn) (fn)
+
+ struct common_glue_func_entry {
+ unsigned int num_blocks; /* number of blocks that @fn will process */
+diff --git a/arch/x86/include/asm/crypto/serpent-avx.h b/arch/x86/include/asm/crypto/serpent-avx.h
+index 33c2b8a..586871f 100644
+--- a/arch/x86/include/asm/crypto/serpent-avx.h
++++ b/arch/x86/include/asm/crypto/serpent-avx.h
+@@ -16,20 +16,20 @@ struct serpent_xts_ctx {
+ struct serpent_ctx crypt_ctx;
+ };
+
+-asmlinkage void serpent_ecb_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_ecb_enc_8way_avx(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void serpent_ecb_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_ecb_dec_8way_avx(void *ctx, u8 *dst,
+ const u8 *src);
+
+-asmlinkage void serpent_cbc_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
++asmlinkage void serpent_cbc_dec_8way_avx(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void serpent_ctr_8way_avx(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void serpent_ctr_8way_avx(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+-asmlinkage void serpent_xts_enc_8way_avx(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
+-asmlinkage void serpent_xts_dec_8way_avx(struct serpent_ctx *ctx, u8 *dst,
+- const u8 *src, le128 *iv);
++asmlinkage void serpent_xts_enc_8way_avx(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
++asmlinkage void serpent_xts_dec_8way_avx(void *ctx, u128 *dst,
++ const u128 *src, le128 *iv);
+
+ extern void __serpent_crypt_ctr(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+diff --git a/arch/x86/include/asm/crypto/serpent-sse2.h b/arch/x86/include/asm/crypto/serpent-sse2.h
+index e6e77df..fe42081 100644
+--- a/arch/x86/include/asm/crypto/serpent-sse2.h
++++ b/arch/x86/include/asm/crypto/serpent-sse2.h
+@@ -13,7 +13,7 @@ asmlinkage void __serpent_enc_blk_4way(struct serpent_ctx *ctx, u8 *dst,
+ asmlinkage void serpent_dec_blk_4way(struct serpent_ctx *ctx, u8 *dst,
+ const u8 *src);
+
+-static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
++static inline void serpent_enc_blk_xway(void *ctx, u8 *dst,
+ const u8 *src)
+ {
+ __serpent_enc_blk_4way(ctx, dst, src, false);
+@@ -25,7 +25,7 @@ static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
+ __serpent_enc_blk_4way(ctx, dst, src, true);
+ }
+
+-static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
++static inline void serpent_dec_blk_xway(void *ctx, u8 *dst,
+ const u8 *src)
+ {
+ serpent_dec_blk_4way(ctx, dst, src);
+@@ -40,7 +40,7 @@ asmlinkage void __serpent_enc_blk_8way(struct serpent_ctx *ctx, u8 *dst,
+ asmlinkage void serpent_dec_blk_8way(struct serpent_ctx *ctx, u8 *dst,
+ const u8 *src);
+
+-static inline void serpent_enc_blk_xway(struct serpent_ctx *ctx, u8 *dst,
++static inline void serpent_enc_blk_xway(void *ctx, u8 *dst,
+ const u8 *src)
+ {
+ __serpent_enc_blk_8way(ctx, dst, src, false);
+@@ -52,7 +52,7 @@ static inline void serpent_enc_blk_xway_xor(struct serpent_ctx *ctx, u8 *dst,
+ __serpent_enc_blk_8way(ctx, dst, src, true);
+ }
+
+-static inline void serpent_dec_blk_xway(struct serpent_ctx *ctx, u8 *dst,
++static inline void serpent_dec_blk_xway(void *ctx, u8 *dst,
+ const u8 *src)
+ {
+ serpent_dec_blk_8way(ctx, dst, src);
+diff --git a/arch/x86/include/asm/crypto/twofish.h b/arch/x86/include/asm/crypto/twofish.h
+index 878c51c..86fc65f 100644
+--- a/arch/x86/include/asm/crypto/twofish.h
++++ b/arch/x86/include/asm/crypto/twofish.h
+@@ -17,19 +17,19 @@ struct twofish_xts_ctx {
+ };
+
+ /* regular block cipher functions from twofish_x86_64 module */
+-asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_enc_blk(void *ctx, u8 *dst,
+ const u8 *src);
+-asmlinkage void twofish_dec_blk(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_dec_blk(void *ctx, u8 *dst,
+ const u8 *src);
+
+ /* 3-way parallel cipher functions */
+-asmlinkage void __twofish_enc_blk_3way(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void __twofish_enc_blk_3way(void *ctx, u8 *dst,
+ const u8 *src, bool xor);
+-asmlinkage void twofish_dec_blk_3way(struct twofish_ctx *ctx, u8 *dst,
++asmlinkage void twofish_dec_blk_3way(void *ctx, u8 *dst,
+ const u8 *src);
+
+ /* helpers from twofish_x86_64-3way module */
+-extern void twofish_dec_blk_cbc_3way(void *ctx, u128 *dst, const u128 *src);
++extern void twofish_dec_blk_cbc_3way(void *ctx, u8 *dst, const u8 *src);
+ extern void twofish_enc_blk_ctr(void *ctx, u128 *dst, const u128 *src,
+ le128 *iv);
+ extern void twofish_enc_blk_ctr_3way(void *ctx, u128 *dst, const u128 *src,
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h
index 4e10d73..7319a47 100644
--- a/arch/x86/include/asm/desc.h
@@ -18718,10 +20007,10 @@ index 1c7eefe..d0e4702 100644
};
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h
-index 3c3550c..ca9e4c3 100644
+index 0fd440d..5f883a5 100644
--- a/arch/x86/include/asm/fpu/internal.h
+++ b/arch/x86/include/asm/fpu/internal.h
-@@ -97,8 +97,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
+@@ -98,8 +98,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
#define user_insn(insn, output, input...) \
({ \
int err; \
@@ -18734,7 +20023,7 @@ index 3c3550c..ca9e4c3 100644
"2: " ASM_CLAC "\n" \
".section .fixup,\"ax\"\n" \
"3: movl $-1,%[err]\n" \
-@@ -107,6 +110,7 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
+@@ -108,6 +111,7 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
_ASM_EXTABLE(1b, 3b) \
: [err] "=r" (err), output \
: "0"(0), input); \
@@ -18742,7 +20031,7 @@ index 3c3550c..ca9e4c3 100644
err; \
})
-@@ -186,9 +190,9 @@ static inline int copy_user_to_fregs(struct fregs_state __user *fx)
+@@ -187,9 +191,9 @@ static inline int copy_user_to_fregs(struct fregs_state __user *fx)
static inline void copy_fxregs_to_kernel(struct fpu *fpu)
{
if (config_enabled(CONFIG_X86_32))
@@ -18754,7 +20043,7 @@ index 3c3550c..ca9e4c3 100644
else {
/* Using "rex64; fxsave %0" is broken because, if the memory
* operand uses any extended registers for addressing, a second
-@@ -205,15 +209,15 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
+@@ -206,15 +210,15 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
* an extended register is needed for addressing (fix submitted
* to mainline 2005-11-21).
*
@@ -18773,25 +20062,20 @@ index 3c3550c..ca9e4c3 100644
}
}
-@@ -388,12 +392,16 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
+@@ -386,9 +390,11 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
if (unlikely(err))
return -EFAULT;
+ pax_open_userland();
- __asm__ __volatile__(ASM_STAC "\n"
-- "1:"XSAVE"\n"
-+ "1:"
-+ __copyuser_seg
-+ XSAVE"\n"
- "2: " ASM_CLAC "\n"
- xstate_fault(err)
- : "D" (buf), "a" (-1), "d" (-1), "0" (err)
- : "memory");
+ stac();
+- XSTATE_OP(XSAVE, buf, -1, -1, err);
++ XSTATE_OP(__copyuser_seg XSAVE, buf, -1, -1, err);
+ clac();
+ pax_close_userland();
+
return err;
}
-
-@@ -402,17 +410,21 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
+@@ -398,14 +404,16 @@ static inline int copy_xregs_to_user(struct xregs_state __user *buf)
*/
static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
{
@@ -18799,23 +20083,18 @@ index 3c3550c..ca9e4c3 100644
+ struct xregs_state *xstate = ((__force_kernel struct xregs_state *)buf);
u32 lmask = mask;
u32 hmask = mask >> 32;
- int err = 0;
+ int err;
+ pax_open_userland();
- __asm__ __volatile__(ASM_STAC "\n"
-- "1:"XRSTOR"\n"
-+ "1:"
-+ __copyuser_seg
-+ XRSTOR"\n"
- "2: " ASM_CLAC "\n"
- xstate_fault(err)
- : "D" (xstate), "a" (lmask), "d" (hmask), "0" (err)
- : "memory"); /* memory required? */
+ stac();
+- XSTATE_OP(XRSTOR, xstate, lmask, hmask, err);
++ XSTATE_OP(__copyuser_seg XRSTOR, xstate, lmask, hmask, err);
+ clac();
+ pax_close_userland();
+
return err;
}
-
-@@ -429,7 +441,7 @@ static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
+@@ -423,7 +431,7 @@ static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
{
if (likely(use_xsave())) {
@@ -18824,7 +20103,7 @@ index 3c3550c..ca9e4c3 100644
return 1;
}
-@@ -442,7 +454,7 @@ static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
+@@ -436,7 +444,7 @@ static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
* Legacy FPU register saving, FNSAVE always clears FPU registers,
* so we have to mark them inactive:
*/
@@ -18833,7 +20112,7 @@ index 3c3550c..ca9e4c3 100644
return 0;
}
-@@ -471,7 +483,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate)
+@@ -465,7 +473,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate)
"fnclex\n\t"
"emms\n\t"
"fildl %P[addr]" /* set F?P to defined value */
@@ -18842,7 +20121,7 @@ index 3c3550c..ca9e4c3 100644
}
__copy_kernel_to_fpregs(fpstate);
-@@ -611,7 +623,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
+@@ -605,7 +613,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
if (fpu.preload) {
new_fpu->counter++;
__fpregs_activate(new_fpu);
@@ -18851,7 +20130,7 @@ index 3c3550c..ca9e4c3 100644
} else {
__fpregs_deactivate_hw();
}
-@@ -623,7 +635,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
+@@ -617,7 +625,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
if (fpu_want_lazy_restore(new_fpu, cpu))
fpu.preload = 0;
else
@@ -18860,7 +20139,7 @@ index 3c3550c..ca9e4c3 100644
fpregs_activate(new_fpu);
}
}
-@@ -643,7 +655,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
+@@ -637,7 +645,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu)
static inline void switch_fpu_finish(struct fpu *new_fpu, fpu_switch_t fpu_switch)
{
if (fpu_switch.preload)
@@ -19022,10 +20301,10 @@ index b4c1f54..e290c08 100644
pagefault_enable();
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
-index 59caa55..e4d3fec 100644
+index 84b3d19..8ea9f03 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
-@@ -159,8 +159,8 @@ static inline void unlock_vector_lock(void) {}
+@@ -164,8 +164,8 @@ static inline void unlock_vector_lock(void) {}
#endif /* CONFIG_X86_LOCAL_APIC */
/* Statistics */
@@ -19163,6 +20442,31 @@ index 4421b5d..8543006 100644
#define flush_insn_slot(p) do { } while (0)
+diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
+index e9cd7be..0f3574f 100644
+--- a/arch/x86/include/asm/kvm_emulate.h
++++ b/arch/x86/include/asm/kvm_emulate.h
+@@ -279,6 +279,8 @@ enum x86emul_mode {
+ #define X86EMUL_SMM_MASK (1 << 6)
+ #define X86EMUL_SMM_INSIDE_NMI_MASK (1 << 7)
+
++struct fastop;
++
+ struct x86_emulate_ctxt {
+ const struct x86_emulate_ops *ops;
+
+@@ -311,7 +313,10 @@ struct x86_emulate_ctxt {
+ struct operand src;
+ struct operand src2;
+ struct operand dst;
+- int (*execute)(struct x86_emulate_ctxt *ctxt);
++ union {
++ int (*execute)(struct x86_emulate_ctxt *ctxt);
++ void (*fastop)(struct fastop *fake);
++ } u;
+ int (*check_perm)(struct x86_emulate_ctxt *ctxt);
+ /*
+ * The following six fields are cleared together,
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
index 4ad6560..75c7bdd 100644
--- a/arch/x86/include/asm/local.h
@@ -19600,7 +20904,7 @@ index bfd9b2a..0d64fc2 100644
#define activate_mm(prev, next) \
diff --git a/arch/x86/include/asm/module.h b/arch/x86/include/asm/module.h
-index e3b7819..b257c64 100644
+index e3b7819..ba128ec 100644
--- a/arch/x86/include/asm/module.h
+++ b/arch/x86/include/asm/module.h
@@ -5,6 +5,7 @@
@@ -19611,7 +20915,7 @@ index e3b7819..b257c64 100644
#elif defined CONFIG_M486
#define MODULE_PROC_FAMILY "486 "
#elif defined CONFIG_M586
-@@ -57,8 +58,20 @@
+@@ -57,8 +58,26 @@
#error unknown processor family
#endif
@@ -19631,7 +20935,13 @@ index e3b7819..b257c64 100644
+#define MODULE_PAX_UDEREF ""
+#endif
+
-+#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_PAX_KERNEXEC MODULE_PAX_UDEREF
++#ifdef CONFIG_PAX_RAP
++#define MODULE_PAX_RAP "RAP "
++#else
++#define MODULE_PAX_RAP ""
++#endif
++
++#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_PAX_KERNEXEC MODULE_PAX_UDEREF MODULE_PAX_RAP
+
#endif /* _ASM_X86_MODULE_H */
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
@@ -19775,10 +21085,10 @@ index b3bebf9..cb419e7 100644
#define __phys_reloc_hide(x) (x)
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
-index c759b3c..043875b 100644
+index f619250..8b851d8 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
-@@ -536,7 +536,7 @@ static inline pmd_t __pmd(pmdval_t val)
+@@ -510,7 +510,7 @@ static inline pmd_t __pmd(pmdval_t val)
return (pmd_t) { ret };
}
@@ -19787,7 +21097,7 @@ index c759b3c..043875b 100644
{
pmdval_t ret;
-@@ -602,6 +602,18 @@ static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
+@@ -576,6 +576,18 @@ static inline void set_pgd(pgd_t *pgdp, pgd_t pgd)
val);
}
@@ -19806,7 +21116,7 @@ index c759b3c..043875b 100644
static inline void pgd_clear(pgd_t *pgdp)
{
set_pgd(pgdp, __pgd(0));
-@@ -686,6 +698,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
+@@ -660,6 +672,21 @@ static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx,
pv_mmu_ops.set_fixmap(idx, phys, flags);
}
@@ -19828,7 +21138,7 @@ index c759b3c..043875b 100644
#if defined(CONFIG_SMP) && defined(CONFIG_PARAVIRT_SPINLOCKS)
#ifdef CONFIG_QUEUED_SPINLOCKS
-@@ -909,7 +936,7 @@ extern void default_banner(void);
+@@ -883,7 +910,7 @@ extern void default_banner(void);
#define PARA_PATCH(struct, off) ((PARAVIRT_PATCH_##struct + (off)) / 4)
#define PARA_SITE(ptype, clobbers, ops) _PVSITE(ptype, clobbers, ops, .long, 4)
@@ -19837,7 +21147,7 @@ index c759b3c..043875b 100644
#endif
#define INTERRUPT_RETURN \
-@@ -979,6 +1006,21 @@ extern void default_banner(void);
+@@ -941,6 +968,21 @@ extern void default_banner(void);
PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_usergs_sysret64), \
CLBR_NONE, \
jmp PARA_INDIRECT(pv_cpu_ops+PV_CPU_usergs_sysret64))
@@ -19860,7 +21170,7 @@ index c759b3c..043875b 100644
#endif /* __ASSEMBLY__ */
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
-index 3d44191..1992d40 100644
+index 77db561..bc4a1ea 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -89,7 +89,7 @@ struct pv_init_ops {
@@ -19887,7 +21197,7 @@ index 3d44191..1992d40 100644
struct pv_cpu_ops {
/* hooks for various privileged instructions */
-@@ -195,7 +195,7 @@ struct pv_cpu_ops {
+@@ -178,7 +178,7 @@ struct pv_cpu_ops {
void (*start_context_switch)(struct task_struct *prev);
void (*end_context_switch)(struct task_struct *next);
@@ -19896,25 +21206,16 @@ index 3d44191..1992d40 100644
struct pv_irq_ops {
/*
-@@ -218,7 +218,7 @@ struct pv_irq_ops {
+@@ -201,7 +201,7 @@ struct pv_irq_ops {
#ifdef CONFIG_X86_64
void (*adjust_exception_frame)(void);
#endif
-};
+} __no_randomize_layout;
- struct pv_apic_ops {
- #ifdef CONFIG_X86_LOCAL_APIC
-@@ -226,7 +226,7 @@ struct pv_apic_ops {
- unsigned long start_eip,
- unsigned long start_esp);
- #endif
--};
-+} __no_const __no_randomize_layout;
-
struct pv_mmu_ops {
unsigned long (*read_cr2)(void);
-@@ -316,6 +316,7 @@ struct pv_mmu_ops {
+@@ -285,6 +285,7 @@ struct pv_mmu_ops {
struct paravirt_callee_save make_pud;
void (*set_pgd)(pgd_t *pudp, pgd_t pgdval);
@@ -19922,7 +21223,7 @@ index 3d44191..1992d40 100644
#endif /* CONFIG_PGTABLE_LEVELS == 4 */
#endif /* CONFIG_PGTABLE_LEVELS >= 3 */
-@@ -327,7 +328,13 @@ struct pv_mmu_ops {
+@@ -296,7 +297,13 @@ struct pv_mmu_ops {
an mfn. We can tell which is which from the index. */
void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
phys_addr_t phys, pgprot_t flags);
@@ -19937,7 +21238,7 @@ index 3d44191..1992d40 100644
struct arch_spinlock;
#ifdef CONFIG_SMP
-@@ -349,11 +356,14 @@ struct pv_lock_ops {
+@@ -318,11 +325,14 @@ struct pv_lock_ops {
struct paravirt_callee_save lock_spinning;
void (*unlock_kick)(struct arch_spinlock *lock, __ticket_t ticket);
#endif /* !CONFIG_QUEUED_SPINLOCKS */
@@ -19954,8 +21255,8 @@ index 3d44191..1992d40 100644
struct paravirt_patch_template {
struct pv_init_ops pv_init_ops;
struct pv_time_ops pv_time_ops;
-@@ -362,7 +372,7 @@ struct paravirt_patch_template {
- struct pv_apic_ops pv_apic_ops;
+@@ -330,7 +340,7 @@ struct paravirt_patch_template {
+ struct pv_irq_ops pv_irq_ops;
struct pv_mmu_ops pv_mmu_ops;
struct pv_lock_ops pv_lock_ops;
-};
@@ -20066,7 +21367,7 @@ index cdaa58c..ae30f0d 100644
static inline void pud_clear(pud_t *pudp)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
-index 6ec0c8b..1e50b49 100644
+index 0687c47..7425416 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -54,6 +54,7 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
@@ -20077,7 +21378,7 @@ index 6ec0c8b..1e50b49 100644
#define pgd_clear(pgd) native_pgd_clear(pgd)
#endif
-@@ -91,12 +92,53 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
+@@ -88,12 +89,53 @@ extern struct mm_struct *pgd_page_get_mm(struct page *page);
#define arch_end_context_switch(prev) do {} while(0)
@@ -20131,7 +21432,7 @@ index 6ec0c8b..1e50b49 100644
static inline int pte_dirty(pte_t pte)
{
return pte_flags(pte) & _PAGE_DIRTY;
-@@ -157,6 +199,11 @@ static inline unsigned long pud_pfn(pud_t pud)
+@@ -154,6 +196,11 @@ static inline unsigned long pud_pfn(pud_t pud)
return (pud_val(pud) & pud_pfn_mask(pud)) >> PAGE_SHIFT;
}
@@ -20143,7 +21444,7 @@ index 6ec0c8b..1e50b49 100644
#define pte_page(pte) pfn_to_page(pte_pfn(pte))
static inline int pmd_large(pmd_t pte)
-@@ -210,9 +257,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
+@@ -209,9 +256,29 @@ static inline pte_t pte_wrprotect(pte_t pte)
return pte_clear_flags(pte, _PAGE_RW);
}
@@ -20174,7 +21475,7 @@ index 6ec0c8b..1e50b49 100644
}
static inline pte_t pte_mkdirty(pte_t pte)
-@@ -445,6 +512,16 @@ pte_t *populate_extra_pte(unsigned long vaddr);
+@@ -459,6 +526,16 @@ pte_t *populate_extra_pte(unsigned long vaddr);
#endif
#ifndef __ASSEMBLY__
@@ -20191,7 +21492,7 @@ index 6ec0c8b..1e50b49 100644
#include <linux/mm_types.h>
#include <linux/mmdebug.h>
#include <linux/log2.h>
-@@ -638,7 +715,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)
+@@ -659,7 +736,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd)
* Currently stuck as a macro due to indirect forward reference to
* linux/mmzone.h's __section_mem_map_addr() definition:
*/
@@ -20200,7 +21501,7 @@ index 6ec0c8b..1e50b49 100644
/* to find an entry in a page-table-directory. */
static inline unsigned long pud_index(unsigned long address)
-@@ -653,7 +730,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
+@@ -674,7 +751,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
static inline int pgd_bad(pgd_t pgd)
{
@@ -20209,7 +21510,7 @@ index 6ec0c8b..1e50b49 100644
}
static inline int pgd_none(pgd_t pgd)
-@@ -676,7 +753,12 @@ static inline int pgd_none(pgd_t pgd)
+@@ -697,7 +774,12 @@ static inline int pgd_none(pgd_t pgd)
* pgd_offset() returns a (pgd_t *)
* pgd_index() is used get the offset into the pgd page's array of pgd_t's;
*/
@@ -20223,7 +21524,7 @@ index 6ec0c8b..1e50b49 100644
/*
* a shortcut which implies the use of the kernel's pgd, instead
* of a process's
-@@ -687,6 +769,25 @@ static inline int pgd_none(pgd_t pgd)
+@@ -708,6 +790,25 @@ static inline int pgd_none(pgd_t pgd)
#define KERNEL_PGD_BOUNDARY pgd_index(PAGE_OFFSET)
#define KERNEL_PGD_PTRS (PTRS_PER_PGD - KERNEL_PGD_BOUNDARY)
@@ -20249,7 +21550,7 @@ index 6ec0c8b..1e50b49 100644
#ifndef __ASSEMBLY__
extern int direct_gbpages;
-@@ -853,11 +954,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
+@@ -862,11 +963,24 @@ static inline void pmdp_set_wrprotect(struct mm_struct *mm,
* dst and src can be on the same page, but the range must not overlap,
* and must not cross a page boundary.
*/
@@ -20444,22 +21745,24 @@ index e6844df..432b56e 100644
#endif /* _ASM_X86_PGTABLE_64_DEFS_H */
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
-index 79c9185..d1e3128 100644
+index 4432ab7..43778ff 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
-@@ -85,8 +85,10 @@
-
- #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
+@@ -87,9 +87,12 @@
#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
+ #define _PAGE_DEVMAP (_AT(u64, 1) << _PAGE_BIT_DEVMAP)
+ #define __HAVE_ARCH_PTE_DEVMAP
-#else
+#elif defined(CONFIG_KMEMCHECK) || defined(CONFIG_MEM_SOFT_DIRTY)
#define _PAGE_NX (_AT(pteval_t, 0))
+ #define _PAGE_DEVMAP (_AT(pteval_t, 0))
+#else
+#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN)
++#define _PAGE_DEVMAP (_AT(pteval_t, 0))
#endif
#define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE)
-@@ -141,6 +143,9 @@ enum page_cache_mode {
+@@ -144,6 +147,9 @@ enum page_cache_mode {
#define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \
_PAGE_ACCESSED)
@@ -20469,7 +21772,7 @@ index 79c9185..d1e3128 100644
#define __PAGE_KERNEL_EXEC \
(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL)
#define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX)
-@@ -148,7 +153,7 @@ enum page_cache_mode {
+@@ -151,7 +157,7 @@ enum page_cache_mode {
#define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW)
#define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW)
#define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_NOCACHE)
@@ -20478,7 +21781,7 @@ index 79c9185..d1e3128 100644
#define __PAGE_KERNEL_VVAR (__PAGE_KERNEL_RO | _PAGE_USER)
#define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE)
#define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE)
-@@ -194,7 +199,7 @@ enum page_cache_mode {
+@@ -197,7 +203,7 @@ enum page_cache_mode {
#ifdef CONFIG_X86_64
#define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC
#else
@@ -20487,7 +21790,7 @@ index 79c9185..d1e3128 100644
#define PDE_IDENT_ATTR 0x063 /* PRESENT+RW+DIRTY+ACCESSED */
#define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */
#endif
-@@ -233,7 +238,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
+@@ -236,7 +242,17 @@ static inline pgdval_t pgd_flags(pgd_t pgd)
{
return native_pgd_val(pgd) & PTE_FLAGS_MASK;
}
@@ -20505,7 +21808,7 @@ index 79c9185..d1e3128 100644
#if CONFIG_PGTABLE_LEVELS > 3
typedef struct { pudval_t pud; } pud_t;
-@@ -247,8 +262,6 @@ static inline pudval_t native_pud_val(pud_t pud)
+@@ -250,8 +266,6 @@ static inline pudval_t native_pud_val(pud_t pud)
return pud.pud;
}
#else
@@ -20514,7 +21817,7 @@ index 79c9185..d1e3128 100644
static inline pudval_t native_pud_val(pud_t pud)
{
return native_pgd_val(pud.pgd);
-@@ -268,8 +281,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
+@@ -271,8 +285,6 @@ static inline pmdval_t native_pmd_val(pmd_t pmd)
return pmd.pmd;
}
#else
@@ -20523,7 +21826,7 @@ index 79c9185..d1e3128 100644
static inline pmdval_t native_pmd_val(pmd_t pmd)
{
return native_pgd_val(pmd.pud.pgd);
-@@ -386,7 +397,6 @@ typedef struct page *pgtable_t;
+@@ -389,7 +401,6 @@ typedef struct page *pgtable_t;
extern pteval_t __supported_pte_mask;
extern void set_nx(void);
@@ -20532,7 +21835,7 @@ index 79c9185..d1e3128 100644
#define pgprot_writecombine pgprot_writecombine
extern pgprot_t pgprot_writecombine(pgprot_t prot);
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h
-index d8ce3ec..96b12e2 100644
+index c57fd1e..426fc11 100644
--- a/arch/x86/include/asm/pmem.h
+++ b/arch/x86/include/asm/pmem.h
@@ -41,7 +41,7 @@ static inline void arch_memcpy_to_pmem(void __pmem *dst, const void *src,
@@ -20558,7 +21861,7 @@ index 01bcde8..a6f1377 100644
/*
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
-index 2d5a50c..9fc95aaf 100644
+index 20c11d1..f4a4f69 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -136,7 +136,7 @@ struct cpuinfo_x86 {
@@ -20820,7 +22123,7 @@ index 9c6b890..5305f53 100644
u32 gdt_base;
#else
diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
-index a82c4f1..ac45053 100644
+index 2cb1cc2..787d524 100644
--- a/arch/x86/include/asm/reboot.h
+++ b/arch/x86/include/asm/reboot.h
@@ -6,13 +6,13 @@
@@ -21228,10 +22531,10 @@ index ba665eb..0f72938 100644
static __always_inline void clac(void)
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
-index 222a6a3..839da8d 100644
+index dfcf072..97cd79a 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
-@@ -35,7 +35,7 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
+@@ -26,7 +26,7 @@ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
/* cpus sharing the last level cache: */
DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_llc_id);
@@ -21240,7 +22543,7 @@ index 222a6a3..839da8d 100644
static inline struct cpumask *cpu_llc_shared_mask(int cpu)
{
-@@ -68,7 +68,7 @@ struct smp_ops {
+@@ -59,7 +59,7 @@ struct smp_ops {
void (*send_call_func_ipi)(const struct cpumask *mask);
void (*send_call_func_single_ipi)(int cpu);
@@ -21249,7 +22552,7 @@ index 222a6a3..839da8d 100644
/* Globals due to paravirt */
extern void set_cpu_sibling_map(int cpu);
-@@ -182,14 +182,8 @@ extern unsigned disabled_cpus;
+@@ -170,14 +170,8 @@ extern unsigned disabled_cpus;
extern int safe_smp_processor_id(void);
#elif defined(CONFIG_X86_64_SMP)
@@ -21598,8 +22901,30 @@ index 6df2029..a359a58 100644
asm volatile("invlpg (%0)" ::"r" (addr) : "memory");
}
+diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
+index c3496619..3f3a7dc 100644
+--- a/arch/x86/include/asm/traps.h
++++ b/arch/x86/include/asm/traps.h
+@@ -10,7 +10,7 @@
+ #define dotraplinkage __visible
+
+ asmlinkage void divide_error(void);
+-asmlinkage void debug(void);
++asmlinkage void int1(void);
+ asmlinkage void nmi(void);
+ asmlinkage void int3(void);
+ asmlinkage void xen_debug(void);
+@@ -107,7 +107,7 @@ extern int panic_on_unrecovered_nmi;
+
+ void math_emulate(struct math_emu_info *);
+ #ifndef CONFIG_X86_32
+-asmlinkage void smp_thermal_interrupt(void);
++asmlinkage void smp_thermal_interrupt(struct pt_regs *regs);
+ asmlinkage void smp_threshold_interrupt(void);
+ asmlinkage void smp_deferred_error_interrupt(void);
+ #endif
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
-index 09b1b0a..8f56367 100644
+index a4a30e4..44891b7 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -7,6 +7,7 @@
@@ -21662,8 +22987,8 @@ index 09b1b0a..8f56367 100644
/*
* The exception table consists of pairs of addresses relative to the
-@@ -135,11 +169,13 @@ extern int __get_user_8(void);
- extern int __get_user_bad(void);
+@@ -138,11 +172,13 @@ extern int __get_user_bad(void);
+ #define __uaccess_end() clac()
/*
- * This is a type: either unsigned long, if the argument fits into
@@ -21679,7 +23004,7 @@ index 09b1b0a..8f56367 100644
/**
* get_user: - Get a simple variable from user space.
-@@ -178,10 +214,12 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
+@@ -181,10 +217,12 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX); \
__chk_user_ptr(ptr); \
might_fault(); \
@@ -21692,7 +23017,7 @@ index 09b1b0a..8f56367 100644
__builtin_expect(__ret_gu, 0); \
})
-@@ -189,13 +227,21 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
+@@ -192,13 +230,21 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
: "0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
@@ -21709,26 +23034,26 @@ index 09b1b0a..8f56367 100644
#ifdef CONFIG_X86_32
#define __put_user_asm_u64(x, addr, err, errret) \
- asm volatile(ASM_STAC "\n" \
+ asm volatile("\n" \
- "1: movl %%eax,0(%2)\n" \
- "2: movl %%edx,4(%2)\n" \
+ "1: "__copyuser_seg"movl %%eax,0(%2)\n" \
+ "2: "__copyuser_seg"movl %%edx,4(%2)\n" \
- "3: " ASM_CLAC "\n" \
+ "3:" \
".section .fixup,\"ax\"\n" \
"4: movl %3,%0\n" \
-@@ -208,8 +254,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
+@@ -211,8 +257,8 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
#define __put_user_asm_ex_u64(x, addr) \
- asm volatile(ASM_STAC "\n" \
+ asm volatile("\n" \
- "1: movl %%eax,0(%1)\n" \
- "2: movl %%edx,4(%1)\n" \
+ "1: "__copyuser_seg"movl %%eax,0(%1)\n" \
+ "2: "__copyuser_seg"movl %%edx,4(%1)\n" \
- "3: " ASM_CLAC "\n" \
+ "3:" \
_ASM_EXTABLE_EX(1b, 2b) \
_ASM_EXTABLE_EX(2b, 3b) \
-@@ -257,10 +303,11 @@ extern void __put_user_8(void);
+@@ -260,10 +306,11 @@ extern void __put_user_8(void);
#define put_user(x, ptr) \
({ \
int __ret_pu; \
@@ -21742,7 +23067,7 @@ index 09b1b0a..8f56367 100644
switch (sizeof(*(ptr))) { \
case 1: \
__put_user_x(1, __pu_val, ptr, __ret_pu); \
-@@ -278,6 +325,7 @@ extern void __put_user_8(void);
+@@ -281,6 +328,7 @@ extern void __put_user_8(void);
__put_user_x(X, __pu_val, ptr, __ret_pu); \
break; \
} \
@@ -21750,7 +23075,7 @@ index 09b1b0a..8f56367 100644
__builtin_expect(__ret_pu, 0); \
})
-@@ -341,10 +389,10 @@ do { \
+@@ -348,10 +396,10 @@ do { \
__chk_user_ptr(ptr); \
switch (size) { \
case 1: \
@@ -21763,16 +23088,16 @@ index 09b1b0a..8f56367 100644
break; \
case 4: \
__get_user_asm(x, ptr, retval, "l", "k", "=r", errret); \
-@@ -358,27 +406,31 @@ do { \
+@@ -365,17 +413,21 @@ do { \
} while (0)
#define __get_user_asm(x, addr, err, itype, rtype, ltype, errret) \
+do { \
+ pax_open_userland(); \
- asm volatile(ASM_STAC "\n" \
+ asm volatile("\n" \
- "1: mov"itype" %2,%"rtype"1\n" \
+ "1: "__copyuser_seg"mov"itype" %2,%"rtype"1\n"\
- "2: " ASM_CLAC "\n" \
+ "2:\n" \
".section .fixup,\"ax\"\n" \
"3: mov %3,%0\n" \
- " xor"itype" %"rtype"1,%"rtype"1\n" \
@@ -21787,8 +23112,9 @@ index 09b1b0a..8f56367 100644
+ pax_close_userland(); \
+} while (0)
- #define __get_user_size_ex(x, ptr, size) \
- do { \
+ /*
+ * This doesn't do __uaccess_begin/end - the exception handling
+@@ -386,10 +438,10 @@ do { \
__chk_user_ptr(ptr); \
switch (size) { \
case 1: \
@@ -21801,7 +23127,7 @@ index 09b1b0a..8f56367 100644
break; \
case 4: \
__get_user_asm_ex(x, ptr, "l", "k", "=r"); \
-@@ -392,7 +444,7 @@ do { \
+@@ -403,7 +455,7 @@ do { \
} while (0)
#define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
@@ -21810,13 +23136,10 @@ index 09b1b0a..8f56367 100644
"2:\n" \
_ASM_EXTABLE_EX(1b, 2b) \
: ltype(x) : "m" (__m(addr)))
-@@ -407,15 +459,26 @@ do { \
- #define __get_user_nocheck(x, ptr, size) \
- ({ \
- int __gu_err; \
-- unsigned long __gu_val; \
-+ __inttype(*(ptr)) __gu_val; \
+@@ -424,13 +476,24 @@ do { \
+ __uaccess_begin(); \
__get_user_size(__gu_val, (ptr), (size), __gu_err, -EFAULT); \
+ __uaccess_end(); \
- (x) = (__force __typeof__(*(ptr)))__gu_val; \
+ (x) = (__typeof__(*(ptr)))__gu_val; \
__builtin_expect(__gu_err, 0); \
@@ -21840,19 +23163,19 @@ index 09b1b0a..8f56367 100644
/*
* Tell gcc we read from memory instead of writing: this is because
-@@ -423,8 +486,10 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -438,8 +501,10 @@ struct __large_struct { unsigned long buf[100]; };
* aliasing issues.
*/
#define __put_user_asm(x, addr, err, itype, rtype, ltype, errret) \
+do { \
+ pax_open_userland(); \
- asm volatile(ASM_STAC "\n" \
+ asm volatile("\n" \
- "1: mov"itype" %"rtype"1,%2\n" \
+ "1: "__copyuser_seg"mov"itype" %"rtype"1,%2\n"\
- "2: " ASM_CLAC "\n" \
+ "2:\n" \
".section .fixup,\"ax\"\n" \
"3: mov %3,%0\n" \
-@@ -432,10 +497,12 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -447,10 +512,12 @@ struct __large_struct { unsigned long buf[100]; };
".previous\n" \
_ASM_EXTABLE(1b, 3b) \
: "=r"(err) \
@@ -21867,21 +23190,21 @@ index 09b1b0a..8f56367 100644
"2:\n" \
_ASM_EXTABLE_EX(1b, 2b) \
: : ltype(x), "m" (__m(addr)))
-@@ -445,11 +512,13 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -460,11 +527,13 @@ struct __large_struct { unsigned long buf[100]; };
*/
#define uaccess_try do { \
current_thread_info()->uaccess_err = 0; \
+ pax_open_userland(); \
- stac(); \
+ __uaccess_begin(); \
barrier();
#define uaccess_catch(err) \
- clac(); \
+ __uaccess_end(); \
+ pax_close_userland(); \
(err) |= (current_thread_info()->uaccess_err ? -EFAULT : 0); \
} while (0)
-@@ -475,8 +544,12 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -490,8 +559,12 @@ struct __large_struct { unsigned long buf[100]; };
* On error, the variable @x is set to zero.
*/
@@ -21894,7 +23217,7 @@ index 09b1b0a..8f56367 100644
/**
* __put_user: - Write a simple value into user space, with less checking.
-@@ -499,8 +572,12 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -514,8 +587,12 @@ struct __large_struct { unsigned long buf[100]; };
* Returns zero on success, or -EFAULT on error.
*/
@@ -21907,7 +23230,7 @@ index 09b1b0a..8f56367 100644
#define __get_user_unaligned __get_user
#define __put_user_unaligned __put_user
-@@ -518,7 +595,7 @@ struct __large_struct { unsigned long buf[100]; };
+@@ -533,7 +610,7 @@ struct __large_struct { unsigned long buf[100]; };
#define get_user_ex(x, ptr) do { \
unsigned long __gue_val; \
__get_user_size_ex((__gue_val), (ptr), (sizeof(*(ptr)))); \
@@ -21916,7 +23239,7 @@ index 09b1b0a..8f56367 100644
} while (0)
#define put_user_try uaccess_try
-@@ -536,7 +613,7 @@ extern __must_check long strlen_user(const char __user *str);
+@@ -551,7 +628,7 @@ extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *str, long n);
unsigned long __must_check clear_user(void __user *mem, unsigned long len);
@@ -21925,7 +23248,7 @@ index 09b1b0a..8f56367 100644
extern void __cmpxchg_wrong_size(void)
__compiletime_error("Bad argument size for cmpxchg");
-@@ -544,21 +621,22 @@ extern void __cmpxchg_wrong_size(void)
+@@ -559,22 +636,23 @@ extern void __cmpxchg_wrong_size(void)
#define __user_atomic_cmpxchg_inatomic(uval, ptr, old, new, size) \
({ \
int __ret = 0; \
@@ -21936,13 +23259,14 @@ index 09b1b0a..8f56367 100644
+ __typeof__(*(uval)) __old = (old); \
+ __typeof__(*(uval)) __new = (new); \
+ pax_open_userland(); \
+ __uaccess_begin(); \
switch (size) { \
case 1: \
{ \
- asm volatile("\t" ASM_STAC "\n" \
+ asm volatile("\n" \
- "1:\t" LOCK_PREFIX "cmpxchgb %4, %2\n" \
+ "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgb %4, %2\n"\
- "2:\t" ASM_CLAC "\n" \
+ "2:\n" \
"\t.section .fixup, \"ax\"\n" \
"3:\tmov %3, %0\n" \
"\tjmp 2b\n" \
@@ -21953,13 +23277,13 @@ index 09b1b0a..8f56367 100644
: "i" (-EFAULT), "q" (__new), "1" (__old) \
: "memory" \
); \
-@@ -567,14 +645,14 @@ extern void __cmpxchg_wrong_size(void)
+@@ -583,14 +661,14 @@ extern void __cmpxchg_wrong_size(void)
case 2: \
{ \
- asm volatile("\t" ASM_STAC "\n" \
+ asm volatile("\n" \
- "1:\t" LOCK_PREFIX "cmpxchgw %4, %2\n" \
+ "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgw %4, %2\n"\
- "2:\t" ASM_CLAC "\n" \
+ "2:\n" \
"\t.section .fixup, \"ax\"\n" \
"3:\tmov %3, %0\n" \
"\tjmp 2b\n" \
@@ -21970,13 +23294,13 @@ index 09b1b0a..8f56367 100644
: "i" (-EFAULT), "r" (__new), "1" (__old) \
: "memory" \
); \
-@@ -583,14 +661,14 @@ extern void __cmpxchg_wrong_size(void)
+@@ -599,14 +677,14 @@ extern void __cmpxchg_wrong_size(void)
case 4: \
{ \
- asm volatile("\t" ASM_STAC "\n" \
+ asm volatile("\n" \
- "1:\t" LOCK_PREFIX "cmpxchgl %4, %2\n" \
+ "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgl %4, %2\n"\
- "2:\t" ASM_CLAC "\n" \
+ "2:\n" \
"\t.section .fixup, \"ax\"\n" \
"3:\tmov %3, %0\n" \
"\tjmp 2b\n" \
@@ -21987,13 +23311,13 @@ index 09b1b0a..8f56367 100644
: "i" (-EFAULT), "r" (__new), "1" (__old) \
: "memory" \
); \
-@@ -602,14 +680,14 @@ extern void __cmpxchg_wrong_size(void)
+@@ -618,14 +696,14 @@ extern void __cmpxchg_wrong_size(void)
__cmpxchg_wrong_size(); \
\
- asm volatile("\t" ASM_STAC "\n" \
+ asm volatile("\n" \
- "1:\t" LOCK_PREFIX "cmpxchgq %4, %2\n" \
+ "1:\t" LOCK_PREFIX __copyuser_seg"cmpxchgq %4, %2\n"\
- "2:\t" ASM_CLAC "\n" \
+ "2:\n" \
"\t.section .fixup, \"ax\"\n" \
"3:\tmov %3, %0\n" \
"\tjmp 2b\n" \
@@ -22004,15 +23328,15 @@ index 09b1b0a..8f56367 100644
: "i" (-EFAULT), "r" (__new), "1" (__old) \
: "memory" \
); \
-@@ -618,6 +696,7 @@ extern void __cmpxchg_wrong_size(void)
- default: \
+@@ -635,6 +713,7 @@ extern void __cmpxchg_wrong_size(void)
__cmpxchg_wrong_size(); \
} \
+ __uaccess_end(); \
+ pax_close_userland(); \
*__uval = __old; \
__ret; \
})
-@@ -641,17 +720,6 @@ extern struct movsl_mask {
+@@ -658,17 +737,6 @@ extern struct movsl_mask {
#define ARCH_HAS_NOCACHE_UACCESS 1
@@ -22030,7 +23354,7 @@ index 09b1b0a..8f56367 100644
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
# define copy_user_diag __compiletime_error
#else
-@@ -661,7 +729,7 @@ unsigned long __must_check _copy_to_user(void __user *to, const void *from,
+@@ -678,7 +746,7 @@ unsigned long __must_check _copy_to_user(void __user *to, const void *from,
extern void copy_user_diag("copy_from_user() buffer size is too small")
copy_from_user_overflow(void);
extern void copy_user_diag("copy_to_user() buffer size is too small")
@@ -22039,7 +23363,7 @@ index 09b1b0a..8f56367 100644
#undef copy_user_diag
-@@ -674,7 +742,7 @@ __copy_from_user_overflow(void) __asm__("copy_from_user_overflow");
+@@ -691,7 +759,7 @@ __copy_from_user_overflow(void) __asm__("copy_from_user_overflow");
extern void
__compiletime_warning("copy_to_user() buffer size is not provably correct")
@@ -22048,7 +23372,7 @@ index 09b1b0a..8f56367 100644
#define __copy_to_user_overflow(size, count) __copy_to_user_overflow()
#else
-@@ -689,10 +757,16 @@ __copy_from_user_overflow(int size, unsigned long count)
+@@ -706,10 +774,16 @@ __copy_from_user_overflow(int size, unsigned long count)
#endif
@@ -22066,7 +23390,7 @@ index 09b1b0a..8f56367 100644
might_fault();
-@@ -714,12 +788,15 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
+@@ -731,12 +805,15 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
* case, and do only runtime checking for non-constant sizes.
*/
@@ -22088,7 +23412,7 @@ index 09b1b0a..8f56367 100644
return n;
}
-@@ -727,17 +804,18 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
+@@ -744,17 +821,18 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long n)
{
@@ -22115,7 +23439,7 @@ index 09b1b0a..8f56367 100644
return n;
}
diff --git a/arch/x86/include/asm/uaccess_32.h b/arch/x86/include/asm/uaccess_32.h
-index f5dcb52..da2c15b 100644
+index 3fe0eac..18dfa8b 100644
--- a/arch/x86/include/asm/uaccess_32.h
+++ b/arch/x86/include/asm/uaccess_32.h
@@ -40,9 +40,14 @@ unsigned long __must_check __copy_from_user_ll_nocache_nozero
@@ -22134,7 +23458,7 @@ index f5dcb52..da2c15b 100644
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -87,12 +92,16 @@ static __always_inline unsigned long __must_check
+@@ -95,12 +100,16 @@ static __always_inline unsigned long __must_check
__copy_to_user(void __user *to, const void *from, unsigned long n)
{
might_fault();
@@ -22152,7 +23476,7 @@ index f5dcb52..da2c15b 100644
/* Avoid zeroing the tail if the copy fails..
* If 'n' is constant and 1, 2, or 4, we do still zero on a failure,
* but as the zeroing behaviour is only significant when n is not
-@@ -143,6 +152,12 @@ static __always_inline unsigned long
+@@ -157,6 +166,12 @@ static __always_inline unsigned long
__copy_from_user(void *to, const void __user *from, unsigned long n)
{
might_fault();
@@ -22165,7 +23489,7 @@ index f5dcb52..da2c15b 100644
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -165,6 +180,10 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
+@@ -185,6 +200,10 @@ static __always_inline unsigned long __copy_from_user_nocache(void *to,
const void __user *from, unsigned long n)
{
might_fault();
@@ -22176,7 +23500,7 @@ index f5dcb52..da2c15b 100644
if (__builtin_constant_p(n)) {
unsigned long ret;
-@@ -187,7 +206,10 @@ static __always_inline unsigned long
+@@ -213,7 +232,10 @@ static __always_inline unsigned long
__copy_from_user_inatomic_nocache(void *to, const void __user *from,
unsigned long n)
{
@@ -22189,7 +23513,7 @@ index f5dcb52..da2c15b 100644
#endif /* _ASM_X86_UACCESS_32_H */
diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h
-index f2f9b39..2ae1bf8 100644
+index b89c34c..93a6bce 100644
--- a/arch/x86/include/asm/uaccess_64.h
+++ b/arch/x86/include/asm/uaccess_64.h
@@ -10,6 +10,9 @@
@@ -22213,7 +23537,7 @@ index f2f9b39..2ae1bf8 100644
{
unsigned ret;
-@@ -46,121 +49,170 @@ copy_user_generic(void *to, const void *from, unsigned len)
+@@ -46,152 +49,201 @@ copy_user_generic(void *to, const void *from, unsigned len)
}
__must_check unsigned long
@@ -22250,43 +23574,57 @@ index f2f9b39..2ae1bf8 100644
- return copy_user_generic(dst, (__force void *)src, size);
+ return copy_user_generic(dst, (__force_kernel const void *)____m(src), size);
switch (size) {
-- case 1:__get_user_asm(*(u8 *)dst, (u8 __user *)src,
-+ case 1:__get_user_asm(*(u8 *)dst, (const u8 __user *)src,
+ case 1:
+ __uaccess_begin();
+- __get_user_asm(*(u8 *)dst, (u8 __user *)src,
++ __get_user_asm(*(u8 *)dst, (const u8 __user *)src,
ret, "b", "b", "=q", 1);
+ __uaccess_end();
return ret;
-- case 2:__get_user_asm(*(u16 *)dst, (u16 __user *)src,
-+ case 2:__get_user_asm(*(u16 *)dst, (const u16 __user *)src,
+ case 2:
+ __uaccess_begin();
+- __get_user_asm(*(u16 *)dst, (u16 __user *)src,
++ __get_user_asm(*(u16 *)dst, (const u16 __user *)src,
ret, "w", "w", "=r", 2);
+ __uaccess_end();
return ret;
-- case 4:__get_user_asm(*(u32 *)dst, (u32 __user *)src,
-+ case 4:__get_user_asm(*(u32 *)dst, (const u32 __user *)src,
+ case 4:
+ __uaccess_begin();
+- __get_user_asm(*(u32 *)dst, (u32 __user *)src,
++ __get_user_asm(*(u32 *)dst, (const u32 __user *)src,
ret, "l", "k", "=r", 4);
+ __uaccess_end();
return ret;
-- case 8:__get_user_asm(*(u64 *)dst, (u64 __user *)src,
-+ case 8:__get_user_asm(*(u64 *)dst, (const u64 __user *)src,
+ case 8:
+ __uaccess_begin();
+- __get_user_asm(*(u64 *)dst, (u64 __user *)src,
++ __get_user_asm(*(u64 *)dst, (const u64 __user *)src,
ret, "q", "", "=r", 8);
+ __uaccess_end();
return ret;
case 10:
+ __uaccess_begin();
- __get_user_asm(*(u64 *)dst, (u64 __user *)src,
+ __get_user_asm(*(u64 *)dst, (const u64 __user *)src,
ret, "q", "", "=r", 10);
- if (unlikely(ret))
- return ret;
- __get_user_asm(*(u16 *)(8 + (char *)dst),
-- (u16 __user *)(8 + (char __user *)src),
-+ (const u16 __user *)(8 + (const char __user *)src),
- ret, "w", "w", "=r", 2);
+ if (likely(!ret))
+ __get_user_asm(*(u16 *)(8 + (char *)dst),
+- (u16 __user *)(8 + (char __user *)src),
++ (const u16 __user *)(8 + (const char __user *)src),
+ ret, "w", "w", "=r", 2);
+ __uaccess_end();
return ret;
case 16:
+ __uaccess_begin();
- __get_user_asm(*(u64 *)dst, (u64 __user *)src,
+ __get_user_asm(*(u64 *)dst, (const u64 __user *)src,
ret, "q", "", "=r", 16);
- if (unlikely(ret))
- return ret;
- __get_user_asm(*(u64 *)(8 + (char *)dst),
-- (u64 __user *)(8 + (char __user *)src),
-+ (const u64 __user *)(8 + (const char __user *)src),
- ret, "q", "", "=r", 8);
+ if (likely(!ret))
+ __get_user_asm(*(u64 *)(8 + (char *)dst),
+- (u64 __user *)(8 + (char __user *)src),
++ (const u64 __user *)(8 + (const char __user *)src),
+ ret, "q", "", "=r", 8);
+ __uaccess_end();
return ret;
default:
- return copy_user_generic(dst, (__force void *)src, size);
@@ -22332,43 +23670,59 @@ index f2f9b39..2ae1bf8 100644
- return copy_user_generic((__force void *)dst, src, size);
+ return copy_user_generic((__force_kernel void *)____m(dst), src, size);
switch (size) {
-- case 1:__put_user_asm(*(u8 *)src, (u8 __user *)dst,
-+ case 1:__put_user_asm(*(const u8 *)src, (u8 __user *)dst,
+ case 1:
+ __uaccess_begin();
+- __put_user_asm(*(u8 *)src, (u8 __user *)dst,
++ __put_user_asm(*(const u8 *)src, (u8 __user *)dst,
ret, "b", "b", "iq", 1);
+ __uaccess_end();
return ret;
-- case 2:__put_user_asm(*(u16 *)src, (u16 __user *)dst,
-+ case 2:__put_user_asm(*(const u16 *)src, (u16 __user *)dst,
+ case 2:
+ __uaccess_begin();
+- __put_user_asm(*(u16 *)src, (u16 __user *)dst,
++ __put_user_asm(*(const u16 *)src, (u16 __user *)dst,
ret, "w", "w", "ir", 2);
+ __uaccess_end();
return ret;
-- case 4:__put_user_asm(*(u32 *)src, (u32 __user *)dst,
-+ case 4:__put_user_asm(*(const u32 *)src, (u32 __user *)dst,
+ case 4:
+ __uaccess_begin();
+- __put_user_asm(*(u32 *)src, (u32 __user *)dst,
++ __put_user_asm(*(const u32 *)src, (u32 __user *)dst,
ret, "l", "k", "ir", 4);
+ __uaccess_end();
return ret;
-- case 8:__put_user_asm(*(u64 *)src, (u64 __user *)dst,
-+ case 8:__put_user_asm(*(const u64 *)src, (u64 __user *)dst,
+ case 8:
+ __uaccess_begin();
+- __put_user_asm(*(u64 *)src, (u64 __user *)dst,
++ __put_user_asm(*(const u64 *)src, (u64 __user *)dst,
ret, "q", "", "er", 8);
+ __uaccess_end();
return ret;
case 10:
+ __uaccess_begin();
- __put_user_asm(*(u64 *)src, (u64 __user *)dst,
+ __put_user_asm(*(const u64 *)src, (u64 __user *)dst,
ret, "q", "", "er", 10);
- if (unlikely(ret))
- return ret;
- asm("":::"memory");
-- __put_user_asm(4[(u16 *)src], 4 + (u16 __user *)dst,
-+ __put_user_asm(4[(const u16 *)src], 4 + (u16 __user *)dst,
- ret, "w", "w", "ir", 2);
+ if (likely(!ret)) {
+ asm("":::"memory");
+- __put_user_asm(4[(u16 *)src], 4 + (u16 __user *)dst,
++ __put_user_asm(4[(const u16 *)src], 4 + (u16 __user *)dst,
+ ret, "w", "w", "ir", 2);
+ }
+ __uaccess_end();
return ret;
case 16:
+ __uaccess_begin();
- __put_user_asm(*(u64 *)src, (u64 __user *)dst,
+ __put_user_asm(*(const u64 *)src, (u64 __user *)dst,
ret, "q", "", "er", 16);
- if (unlikely(ret))
- return ret;
- asm("":::"memory");
-- __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst,
-+ __put_user_asm(1[(const u64 *)src], 1 + (u64 __user *)dst,
- ret, "q", "", "er", 8);
+ if (likely(!ret)) {
+ asm("":::"memory");
+- __put_user_asm(1[(u64 *)src], 1 + (u64 __user *)dst,
++ __put_user_asm(1[(const u64 *)src], 1 + (u64 __user *)dst,
+ ret, "q", "", "er", 8);
+ }
+ __uaccess_end();
return ret;
default:
- return copy_user_generic((__force void *)dst, src, size);
@@ -22411,39 +23765,40 @@ index f2f9b39..2ae1bf8 100644
switch (size) {
case 1: {
u8 tmp;
+ __uaccess_begin();
- __get_user_asm(tmp, (u8 __user *)src,
+ __get_user_asm(tmp, (const u8 __user *)src,
ret, "b", "b", "=q", 1);
if (likely(!ret))
__put_user_asm(tmp, (u8 __user *)dst,
-@@ -169,7 +221,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
- }
+@@ -202,7 +254,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
case 2: {
u16 tmp;
+ __uaccess_begin();
- __get_user_asm(tmp, (u16 __user *)src,
+ __get_user_asm(tmp, (const u16 __user *)src,
ret, "w", "w", "=r", 2);
if (likely(!ret))
__put_user_asm(tmp, (u16 __user *)dst,
-@@ -179,7 +231,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
-
+@@ -214,7 +266,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
case 4: {
u32 tmp;
+ __uaccess_begin();
- __get_user_asm(tmp, (u32 __user *)src,
+ __get_user_asm(tmp, (const u32 __user *)src,
ret, "l", "k", "=r", 4);
if (likely(!ret))
__put_user_asm(tmp, (u32 __user *)dst,
-@@ -188,7 +240,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
- }
+@@ -225,7 +277,7 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
case 8: {
u64 tmp;
+ __uaccess_begin();
- __get_user_asm(tmp, (u64 __user *)src,
+ __get_user_asm(tmp, (const u64 __user *)src,
ret, "q", "", "=r", 8);
if (likely(!ret))
__put_user_asm(tmp, (u64 __user *)dst,
-@@ -196,41 +248,58 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
+@@ -234,41 +286,58 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
return ret;
}
default:
@@ -22529,10 +23884,10 @@ index 5b238981..77fdd78 100644
#define WORD_AT_A_TIME_CONSTANTS { REPEAT_BYTE(0x01), REPEAT_BYTE(0x80) }
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
-index cd0fc0c..64e7559 100644
+index 1ae89a2..a279bf4 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
-@@ -128,7 +128,7 @@ struct x86_init_ops {
+@@ -126,7 +126,7 @@ struct x86_init_ops {
struct x86_init_timers timers;
struct x86_init_iommu iommu;
struct x86_init_pci pci;
@@ -22541,7 +23896,7 @@ index cd0fc0c..64e7559 100644
/**
* struct x86_cpuinit_ops - platform specific cpu hotplug setups
-@@ -139,7 +139,7 @@ struct x86_cpuinit_ops {
+@@ -137,7 +137,7 @@ struct x86_cpuinit_ops {
void (*setup_percpu_clockev)(void);
void (*early_percpu_clock_init)(void);
void (*fixup_cpu_id)(struct cpuinfo_x86 *c, int node);
@@ -22550,7 +23905,7 @@ index cd0fc0c..64e7559 100644
struct timespec;
-@@ -167,7 +167,7 @@ struct x86_platform_ops {
+@@ -165,7 +165,7 @@ struct x86_platform_ops {
void (*save_sched_clock_state)(void);
void (*restore_sched_clock_state)(void);
void (*apic_post_init)(void);
@@ -22559,7 +23914,7 @@ index cd0fc0c..64e7559 100644
struct pci_dev;
-@@ -176,12 +176,12 @@ struct x86_msi_ops {
+@@ -174,12 +174,12 @@ struct x86_msi_ops {
void (*teardown_msi_irq)(unsigned int irq);
void (*teardown_msi_irqs)(struct pci_dev *dev);
void (*restore_msi_irqs)(struct pci_dev *dev);
@@ -22931,10 +24286,10 @@ index 25f9093..f630040 100644
bp_int3_handler = handler;
bp_int3_addr = (u8 *)addr + sizeof(int3);
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
-index 2f69e3b..f301e5f 100644
+index 8a5cdda..ef3aabc 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
-@@ -171,7 +171,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR;
+@@ -177,7 +177,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR;
/*
* Debug level, exported for io_apic.c
*/
@@ -22943,7 +24298,7 @@ index 2f69e3b..f301e5f 100644
int pic_mode;
-@@ -1868,7 +1868,7 @@ static void __smp_error_interrupt(struct pt_regs *regs)
+@@ -1878,7 +1878,7 @@ static void __smp_error_interrupt(struct pt_regs *regs)
apic_write(APIC_ESR, 0);
v = apic_read(APIC_ESR);
ack_APIC_irq();
@@ -22953,7 +24308,7 @@ index 2f69e3b..f301e5f 100644
apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x",
smp_processor_id(), v);
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
-index f92ab36..1884323 100644
+index 9968f30..b06feae 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -25,7 +25,7 @@
@@ -22974,7 +24329,7 @@ index f92ab36..1884323 100644
.name = "flat",
.probe = flat_probe,
.acpi_madt_oem_check = flat_acpi_madt_oem_check,
-@@ -259,7 +259,7 @@ static int physflat_probe(void)
+@@ -249,7 +249,7 @@ static int physflat_probe(void)
return 0;
}
@@ -22984,10 +24339,10 @@ index f92ab36..1884323 100644
.name = "physical flat",
.probe = physflat_probe,
diff --git a/arch/x86/kernel/apic/apic_noop.c b/arch/x86/kernel/apic/apic_noop.c
-index 0d96749..ce6b722 100644
+index 331a7a0..2173347 100644
--- a/arch/x86/kernel/apic/apic_noop.c
+++ b/arch/x86/kernel/apic/apic_noop.c
-@@ -108,7 +108,7 @@ static void noop_apic_write(u32 reg, u32 v)
+@@ -109,7 +109,7 @@ static void noop_apic_write(u32 reg, u32 v)
WARN_ON_ONCE(cpu_has_apic && !disable_apic);
}
@@ -22997,10 +24352,10 @@ index 0d96749..ce6b722 100644
.probe = noop_probe,
.acpi_madt_oem_check = NULL,
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c
-index 971cf88..a8e01ae 100644
+index cf9bd89..75fcb85 100644
--- a/arch/x86/kernel/apic/bigsmp_32.c
+++ b/arch/x86/kernel/apic/bigsmp_32.c
-@@ -147,7 +147,7 @@ static int probe_bigsmp(void)
+@@ -142,7 +142,7 @@ static int probe_bigsmp(void)
return dmi_bigsmp;
}
@@ -23010,7 +24365,7 @@ index 971cf88..a8e01ae 100644
.name = "bigsmp",
.probe = probe_bigsmp,
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
-index fdb0fbf..1426add 100644
+index fdb0fbf..352c2f0 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1682,7 +1682,7 @@ static unsigned int startup_ioapic_irq(struct irq_data *data)
@@ -23040,6 +24395,15 @@ index fdb0fbf..1426add 100644
.name = "IO-APIC",
.irq_startup = startup_ioapic_irq,
.irq_mask = mask_ioapic_irq,
+@@ -1878,7 +1878,7 @@ static struct irq_chip ioapic_chip __read_mostly = {
+ .flags = IRQCHIP_SKIP_SET_WAKE,
+ };
+
+-static struct irq_chip ioapic_ir_chip __read_mostly = {
++static struct irq_chip ioapic_ir_chip = {
+ .name = "IR-IO-APIC",
+ .irq_startup = startup_ioapic_irq,
+ .irq_mask = mask_ioapic_irq,
@@ -1936,7 +1936,7 @@ static void ack_lapic_irq(struct irq_data *data)
ack_APIC_irq();
}
@@ -23050,10 +24414,10 @@ index fdb0fbf..1426add 100644
.irq_mask = mask_lapic_irq,
.irq_unmask = unmask_lapic_irq,
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
-index 5f1feb6..199d454 100644
+index ade2532..5fc7f4f9 100644
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
-@@ -267,7 +267,7 @@ static void hpet_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
+@@ -269,7 +269,7 @@ static void hpet_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
hpet_msi_write(irq_data_get_irq_handler_data(data), msg);
}
@@ -23063,7 +24427,7 @@ index 5f1feb6..199d454 100644
.irq_unmask = hpet_msi_unmask,
.irq_mask = hpet_msi_mask,
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c
-index 7694ae6..5abb08e 100644
+index f316e34..48c21c5 100644
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -72,7 +72,7 @@ static int probe_default(void)
@@ -23075,7 +24439,7 @@ index 7694ae6..5abb08e 100644
.name = "default",
.probe = probe_default,
-@@ -126,7 +126,7 @@ static struct apic apic_default = {
+@@ -127,7 +127,7 @@ static struct apic apic_default = {
apic_driver(apic_default);
@@ -23085,10 +24449,10 @@ index 7694ae6..5abb08e 100644
static int cmdline_apic __initdata;
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
-index 7af2505..d1ea63f 100644
+index ad59d70..c3570b7 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
-@@ -36,6 +36,7 @@ static struct irq_chip lapic_controller;
+@@ -37,6 +37,7 @@ static struct irq_chip lapic_controller;
static struct apic_chip_data *legacy_irq_data[NR_IRQS_LEGACY];
#endif
@@ -23096,7 +24460,7 @@ index 7af2505..d1ea63f 100644
void lock_vector_lock(void)
{
/* Used to the online set of cpus does not change
-@@ -44,6 +45,7 @@ void lock_vector_lock(void)
+@@ -45,6 +46,7 @@ void lock_vector_lock(void)
raw_spin_lock(&vector_lock);
}
@@ -23105,10 +24469,10 @@ index 7af2505..d1ea63f 100644
{
raw_spin_unlock(&vector_lock);
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
-index cc8311c..d72f027 100644
+index aca8b75..4c1a7f5 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
-@@ -234,7 +234,7 @@ static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask,
+@@ -242,7 +242,7 @@ static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask,
cpumask_and(retmask, mask, per_cpu(cpus_in_cluster, cpu));
}
@@ -23118,10 +24482,10 @@ index cc8311c..d72f027 100644
.name = "cluster x2apic",
.probe = x2apic_cluster_probe,
diff --git a/arch/x86/kernel/apic/x2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c
-index 662e915..e721634 100644
+index a1242e2..0e7f712 100644
--- a/arch/x86/kernel/apic/x2apic_phys.c
+++ b/arch/x86/kernel/apic/x2apic_phys.c
-@@ -90,7 +90,7 @@ static int x2apic_phys_probe(void)
+@@ -98,7 +98,7 @@ static int x2apic_phys_probe(void)
return apic == &apic_x2apic_phys;
}
@@ -23131,7 +24495,7 @@ index 662e915..e721634 100644
.name = "physical x2apic",
.probe = x2apic_phys_probe,
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
-index 4a13946..067ed8c 100644
+index 624db005..86c508a 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -374,7 +374,7 @@ static int uv_probe(void)
@@ -23228,7 +24592,7 @@ index 052c9c3..bc22ccdba 100644
proc_create("apm", 0, NULL, &apm_file_ops);
diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
-index 439df97..884bc37 100644
+index 84a7524..e8edc49 100644
--- a/arch/x86/kernel/asm-offsets.c
+++ b/arch/x86/kernel/asm-offsets.c
@@ -32,6 +32,8 @@ void common(void) {
@@ -23240,8 +24604,8 @@ index 439df97..884bc37 100644
BLANK();
OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx);
-@@ -70,8 +72,26 @@ void common(void) {
- #endif
+@@ -67,8 +69,26 @@ void common(void) {
+ OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
OFFSET(PV_MMU_read_cr2, pv_mmu_ops, read_cr2);
+
@@ -23268,10 +24632,10 @@ index 439df97..884bc37 100644
BLANK();
OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c
-index d8f42f9..a46f1fc 100644
+index f2edafb..460f4e6 100644
--- a/arch/x86/kernel/asm-offsets_64.c
+++ b/arch/x86/kernel/asm-offsets_64.c
-@@ -59,6 +59,7 @@ int main(void)
+@@ -58,6 +58,7 @@ int main(void)
BLANK();
#undef ENTRY
@@ -23295,10 +24659,10 @@ index 5803130..c899b3d 100644
obj-y += common.o
obj-y += rdrand.o
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
-index a8816b3..a9c0bf8 100644
+index a07956a..368a2eb 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
-@@ -767,7 +767,7 @@ static void init_amd(struct cpuinfo_x86 *c)
+@@ -766,7 +766,7 @@ static void init_amd(struct cpuinfo_x86 *c)
static unsigned int amd_size_cache(struct cpuinfo_x86 *c, unsigned int size)
{
/* AMD errata T13 (order #21922) */
@@ -23328,7 +24692,7 @@ index 04f0fe5..3c0598c 100644
/*
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
-index c2b7522..a9a9453 100644
+index 37830de..54677f5 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -92,60 +92,6 @@ static const struct cpu_dev default_cpu = {
@@ -23511,7 +24875,7 @@ index c2b7522..a9a9453 100644
gdt_descr.size = GDT_SIZE - 1;
load_gdt(&gdt_descr);
/* Reload the per-cpu base */
-@@ -919,6 +968,20 @@ static void identify_cpu(struct cpuinfo_x86 *c)
+@@ -916,6 +965,20 @@ static void identify_cpu(struct cpuinfo_x86 *c)
setup_smep(c);
setup_smap(c);
@@ -23532,7 +24896,7 @@ index c2b7522..a9a9453 100644
/*
* The vendor-specific functions might have changed features.
* Now we do "generic changes."
-@@ -993,7 +1056,7 @@ void enable_sep_cpu(void)
+@@ -990,7 +1053,7 @@ void enable_sep_cpu(void)
int cpu;
cpu = get_cpu();
@@ -23541,7 +24905,7 @@ index c2b7522..a9a9453 100644
if (!boot_cpu_has(X86_FEATURE_SEP))
goto out;
-@@ -1139,10 +1202,12 @@ static __init int setup_disablecpuid(char *arg)
+@@ -1136,10 +1199,12 @@ static __init int setup_disablecpuid(char *arg)
}
__setup("clearcpuid=", setup_disablecpuid);
@@ -23557,7 +24921,7 @@ index c2b7522..a9a9453 100644
DEFINE_PER_CPU_FIRST(union irq_stack_union,
irq_stack_union) __aligned(PAGE_SIZE) __visible;
-@@ -1254,21 +1319,21 @@ EXPORT_PER_CPU_SYMBOL(current_task);
+@@ -1251,21 +1316,21 @@ EXPORT_PER_CPU_SYMBOL(current_task);
DEFINE_PER_CPU(int, __preempt_count) = INIT_PREEMPT_COUNT;
EXPORT_PER_CPU_SYMBOL(__preempt_count);
@@ -23586,7 +24950,7 @@ index c2b7522..a9a9453 100644
/*
* Clear all 6 debug registers:
*/
-@@ -1344,7 +1409,7 @@ void cpu_init(void)
+@@ -1341,7 +1406,7 @@ void cpu_init(void)
*/
load_ucode_ap();
@@ -23595,7 +24959,7 @@ index c2b7522..a9a9453 100644
oist = &per_cpu(orig_ist, cpu);
#ifdef CONFIG_NUMA
-@@ -1376,7 +1441,6 @@ void cpu_init(void)
+@@ -1373,7 +1438,6 @@ void cpu_init(void)
wrmsrl(MSR_KERNEL_GS_BASE, 0);
barrier();
@@ -23603,7 +24967,7 @@ index c2b7522..a9a9453 100644
x2apic_setup();
/*
-@@ -1428,7 +1492,7 @@ void cpu_init(void)
+@@ -1425,7 +1489,7 @@ void cpu_init(void)
{
int cpu = smp_processor_id();
struct task_struct *curr = current;
@@ -23613,7 +24977,7 @@ index c2b7522..a9a9453 100644
wait_for_master_cpu(cpu);
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
-index e38d338..48498df 100644
+index 0b6c523..54d8406 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -519,25 +519,23 @@ cache_private_attrs_is_visible(struct kobject *kobj,
@@ -23665,7 +25029,7 @@ index e38d338..48498df 100644
return &cache_private_group;
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
-index 7e8a736..c00fc59 100644
+index a006f4c..9c0afe2 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -47,6 +47,7 @@
@@ -23676,7 +25040,7 @@ index 7e8a736..c00fc59 100644
#include "mce-internal.h"
-@@ -212,8 +213,7 @@ static struct notifier_block mce_srao_nb;
+@@ -211,8 +212,7 @@ static struct notifier_block mce_srao_nb;
void mce_register_decode_chain(struct notifier_block *nb)
{
/* Ensure SRAO notifier has the highest priority in the decode chain. */
@@ -23686,7 +25050,7 @@ index 7e8a736..c00fc59 100644
atomic_notifier_chain_register(&x86_mce_decoder_chain, nb);
}
-@@ -237,7 +237,7 @@ static void print_mce(struct mce *m)
+@@ -236,7 +236,7 @@ static void print_mce(struct mce *m)
!(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "",
m->cs, m->ip);
@@ -23695,7 +25059,7 @@ index 7e8a736..c00fc59 100644
print_symbol("{%s}", m->ip);
pr_cont("\n");
}
-@@ -270,10 +270,10 @@ static void print_mce(struct mce *m)
+@@ -269,10 +269,10 @@ static void print_mce(struct mce *m)
#define PANIC_TIMEOUT 5 /* 5 seconds */
@@ -23708,7 +25072,7 @@ index 7e8a736..c00fc59 100644
/* Panic in progress. Enable interrupts and wait for final IPI */
static void wait_for_panic(void)
-@@ -297,7 +297,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
+@@ -296,7 +296,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
/*
* Make sure only one CPU runs in machine check panic
*/
@@ -23717,7 +25081,7 @@ index 7e8a736..c00fc59 100644
wait_for_panic();
barrier();
-@@ -305,7 +305,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
+@@ -304,7 +304,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
console_verbose();
} else {
/* Don't log too much for fake panic */
@@ -23726,7 +25090,7 @@ index 7e8a736..c00fc59 100644
return;
}
/* First print corrected ones that are still unlogged */
-@@ -344,7 +344,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
+@@ -343,7 +343,7 @@ static void mce_panic(const char *msg, struct mce *final, char *exp)
if (!fake_panic) {
if (panic_timeout == 0)
panic_timeout = mca_cfg.panic_timeout;
@@ -23735,7 +25099,7 @@ index 7e8a736..c00fc59 100644
} else
pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg);
}
-@@ -697,7 +697,7 @@ static int mce_timed_out(u64 *t, const char *msg)
+@@ -717,7 +717,7 @@ static int mce_timed_out(u64 *t, const char *msg)
* might have been modified by someone else.
*/
rmb();
@@ -23744,7 +25108,7 @@ index 7e8a736..c00fc59 100644
wait_for_panic();
if (!mca_cfg.monarch_timeout)
goto out;
-@@ -1669,7 +1669,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
+@@ -1671,7 +1671,7 @@ static void unexpected_machine_check(struct pt_regs *regs, long error_code)
}
/* Call the installed machine check handler for this CPU setup. */
@@ -23753,7 +25117,7 @@ index 7e8a736..c00fc59 100644
unexpected_machine_check;
/*
-@@ -1698,7 +1698,9 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c)
+@@ -1700,7 +1700,9 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c)
return;
}
@@ -23763,7 +25127,7 @@ index 7e8a736..c00fc59 100644
__mcheck_cpu_init_generic();
__mcheck_cpu_init_vendor(c);
-@@ -1729,7 +1731,7 @@ void mcheck_cpu_clear(struct cpuinfo_x86 *c)
+@@ -1731,7 +1733,7 @@ void mcheck_cpu_clear(struct cpuinfo_x86 *c)
*/
static DEFINE_SPINLOCK(mce_chrdev_state_lock);
@@ -23772,7 +25136,7 @@ index 7e8a736..c00fc59 100644
static int mce_chrdev_open_exclu; /* already open exclusive? */
static int mce_chrdev_open(struct inode *inode, struct file *file)
-@@ -1737,7 +1739,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
+@@ -1739,7 +1741,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
spin_lock(&mce_chrdev_state_lock);
if (mce_chrdev_open_exclu ||
@@ -23781,7 +25145,7 @@ index 7e8a736..c00fc59 100644
spin_unlock(&mce_chrdev_state_lock);
return -EBUSY;
-@@ -1745,7 +1747,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
+@@ -1747,7 +1749,7 @@ static int mce_chrdev_open(struct inode *inode, struct file *file)
if (file->f_flags & O_EXCL)
mce_chrdev_open_exclu = 1;
@@ -23790,7 +25154,7 @@ index 7e8a736..c00fc59 100644
spin_unlock(&mce_chrdev_state_lock);
-@@ -1756,7 +1758,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
+@@ -1758,7 +1760,7 @@ static int mce_chrdev_release(struct inode *inode, struct file *file)
{
spin_lock(&mce_chrdev_state_lock);
@@ -23799,7 +25163,7 @@ index 7e8a736..c00fc59 100644
mce_chrdev_open_exclu = 0;
spin_unlock(&mce_chrdev_state_lock);
-@@ -2446,7 +2448,7 @@ static __init void mce_init_banks(void)
+@@ -2448,7 +2450,7 @@ static __init void mce_init_banks(void)
for (i = 0; i < mca_cfg.banks; i++) {
struct mce_bank *b = &mce_banks[i];
@@ -23808,7 +25172,7 @@ index 7e8a736..c00fc59 100644
sysfs_attr_init(&a->attr);
a->attr.name = b->attrname;
-@@ -2553,7 +2555,7 @@ struct dentry *mce_get_debugfs_dir(void)
+@@ -2555,7 +2557,7 @@ struct dentry *mce_get_debugfs_dir(void)
static void mce_reset(void)
{
cpu_missing = 0;
@@ -23862,10 +25226,10 @@ index 01dd870..6fd1c59 100644
wmb();
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
-index ac8975a..37d9aa6 100644
+index 4f4735b..05b4ca6 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
-@@ -1016,13 +1016,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
+@@ -1012,13 +1012,13 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
static int get_ucode_user(void *to, const void *from, size_t n)
{
@@ -23895,7 +25259,7 @@ index 20e242e..14b1629 100644
.detect = ms_hyperv_platform,
.init_platform = ms_hyperv_init_platform,
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c
-index 3b533cf..b40d426 100644
+index c870af1..173e1cc 100644
--- a/arch/x86/kernel/cpu/mtrr/generic.c
+++ b/arch/x86/kernel/cpu/mtrr/generic.c
@@ -723,7 +723,8 @@ static DEFINE_RAW_SPINLOCK(set_atomicity_lock);
@@ -23919,7 +25283,7 @@ index 3b533cf..b40d426 100644
/* Flush TLBs (no need to flush caches - they are disabled) */
count_vm_tlb_event(NR_TLB_LOCAL_FLUSH_ALL);
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
-index f891b47..9dff300 100644
+index 5c3d149..a052b18 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -72,7 +72,7 @@ static DEFINE_MUTEX(mtrr_mutex);
@@ -23945,10 +25309,10 @@ index 951884d..4796b75 100644
extern int generic_get_free_region(unsigned long base, unsigned long size,
int replace_reg);
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
-index a3aeb2c..935e1d7 100644
+index 6532f5b..5de6c88 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
-@@ -1531,7 +1531,7 @@ static void __init pmu_check_apic(void)
+@@ -1534,7 +1534,7 @@ static void __init pmu_check_apic(void)
}
@@ -23957,7 +25321,7 @@ index a3aeb2c..935e1d7 100644
.name = "format",
.attrs = NULL,
};
-@@ -1630,7 +1630,7 @@ static struct attribute *events_attr[] = {
+@@ -1642,7 +1642,7 @@ static struct attribute *events_attr[] = {
NULL,
};
@@ -23966,7 +25330,7 @@ index a3aeb2c..935e1d7 100644
.name = "events",
.attrs = events_attr,
};
-@@ -2216,7 +2216,7 @@ valid_user_frame(const void __user *fp, unsigned long size)
+@@ -2228,7 +2228,7 @@ valid_user_frame(const void __user *fp, unsigned long size)
static unsigned long get_segment_base(unsigned int segment)
{
struct desc_struct *desc;
@@ -23975,7 +25339,7 @@ index a3aeb2c..935e1d7 100644
if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) {
#ifdef CONFIG_MODIFY_LDT_SYSCALL
-@@ -2238,7 +2238,7 @@ static unsigned long get_segment_base(unsigned int segment)
+@@ -2250,7 +2250,7 @@ static unsigned long get_segment_base(unsigned int segment)
if (idx > GDT_ENTRIES)
return 0;
@@ -23984,20 +25348,20 @@ index a3aeb2c..935e1d7 100644
}
return get_desc_base(desc);
-@@ -2328,7 +2328,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
+@@ -2355,7 +2355,7 @@ perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs)
break;
perf_callchain_store(entry, frame.return_address);
-- fp = frame.next_frame;
-+ fp = (const void __force_user *)frame.next_frame;
+- fp = (void __user *)frame.next_frame;
++ fp = (void __force_user *)frame.next_frame;
}
+ pagefault_enable();
}
-
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
-index ee70445..7c6859c 100644
+index 98be6d6..b44c81a 100644
--- a/arch/x86/kernel/cpu/perf_event.h
+++ b/arch/x86/kernel/cpu/perf_event.h
-@@ -792,7 +792,7 @@ static inline void set_linear_ip(struct pt_regs *regs, unsigned long ip)
+@@ -787,7 +787,7 @@ static inline void set_linear_ip(struct pt_regs *regs, unsigned long ip)
regs->cs = kernel_ip(ip) ? __KERNEL_CS : __USER_CS;
if (regs->flags & X86_VM_MASK)
regs->flags ^= (PERF_EFLAGS_VM | X86_VM_MASK);
@@ -24007,9 +25371,25 @@ index ee70445..7c6859c 100644
ssize_t x86_event_sysfs_show(char *page, u64 config, u64 event);
diff --git a/arch/x86/kernel/cpu/perf_event_amd_iommu.c b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
-index 97242a9..cf9c30e 100644
+index 97242a9..ba15e8c 100644
--- a/arch/x86/kernel/cpu/perf_event_amd_iommu.c
+++ b/arch/x86/kernel/cpu/perf_event_amd_iommu.c
+@@ -80,12 +80,12 @@ static struct attribute_group amd_iommu_format_group = {
+ * sysfs events attributes
+ *---------------------------------------------*/
+ struct amd_iommu_event_desc {
+- struct kobj_attribute attr;
++ struct device_attribute attr;
+ const char *event;
+ };
+
+-static ssize_t _iommu_event_show(struct kobject *kobj,
+- struct kobj_attribute *attr, char *buf)
++static ssize_t _iommu_event_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct amd_iommu_event_desc *event =
+ container_of(attr, struct amd_iommu_event_desc, attr);
@@ -402,7 +402,7 @@ static void perf_iommu_del(struct perf_event *event, int flags)
static __init int _init_events_attrs(struct perf_amd_iommu *perf_iommu)
{
@@ -24020,10 +25400,10 @@ index 97242a9..cf9c30e 100644
while (amd_iommu_v2_event_descs[i].attr.attr.name)
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
-index 078de2e..7ac50e5 100644
+index 760aec1..3c64694 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
-@@ -2140,6 +2140,8 @@ __intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
+@@ -2185,6 +2185,8 @@ __intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
}
static void
@@ -24032,7 +25412,7 @@ index 078de2e..7ac50e5 100644
intel_start_scheduling(struct cpu_hw_events *cpuc)
{
struct intel_excl_cntrs *excl_cntrs = cpuc->excl_cntrs;
-@@ -2149,14 +2151,18 @@ intel_start_scheduling(struct cpu_hw_events *cpuc)
+@@ -2194,14 +2196,18 @@ intel_start_scheduling(struct cpu_hw_events *cpuc)
/*
* nothing needed if in group validation mode
*/
@@ -24053,7 +25433,7 @@ index 078de2e..7ac50e5 100644
xl = &excl_cntrs->states[tid];
-@@ -2196,6 +2202,8 @@ static void intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cnt
+@@ -2241,6 +2247,8 @@ static void intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cnt
}
static void
@@ -24062,7 +25442,7 @@ index 078de2e..7ac50e5 100644
intel_stop_scheduling(struct cpu_hw_events *cpuc)
{
struct intel_excl_cntrs *excl_cntrs = cpuc->excl_cntrs;
-@@ -2205,13 +2213,18 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
+@@ -2250,13 +2258,18 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
/*
* nothing needed if in group validation mode
*/
@@ -24083,7 +25463,7 @@ index 078de2e..7ac50e5 100644
xl = &excl_cntrs->states[tid];
-@@ -2394,19 +2407,22 @@ static void intel_put_excl_constraints(struct cpu_hw_events *cpuc,
+@@ -2439,19 +2452,22 @@ static void intel_put_excl_constraints(struct cpu_hw_events *cpuc,
* unused now.
*/
if (hwc->idx >= 0) {
@@ -24108,7 +25488,7 @@ index 078de2e..7ac50e5 100644
raw_spin_unlock(&excl_cntrs->lock);
}
}
-@@ -3279,10 +3295,10 @@ __init int intel_pmu_init(void)
+@@ -3360,10 +3376,10 @@ __init int intel_pmu_init(void)
x86_pmu.num_counters_fixed = max((int)edx.split.num_counters_fixed, 3);
if (boot_cpu_has(X86_FEATURE_PDCM)) {
@@ -24169,7 +25549,7 @@ index a316ca9..99344f4 100644
ret = intel_cqm_setup_rmid_cache();
if (ret)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
-index 7abb2b8..ea24517 100644
+index 9551401..649b91c 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -598,7 +598,7 @@ int intel_pmu_drain_bts_buffer(void)
@@ -24181,7 +25561,7 @@ index 7abb2b8..ea24517 100644
x86_pmu.drain_pebs(&regs);
}
-@@ -869,7 +869,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
+@@ -876,7 +876,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
unsigned long from = cpuc->lbr_entries[0].from;
unsigned long old_to, to = cpuc->lbr_entries[0].to;
@@ -24190,7 +25570,7 @@ index 7abb2b8..ea24517 100644
int is_64bit = 0;
void *kaddr;
int size;
-@@ -921,6 +921,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
+@@ -928,6 +928,7 @@ static int intel_pmu_pebs_fixup_ip(struct pt_regs *regs)
} else {
kaddr = (void *)to;
}
@@ -24198,7 +25578,7 @@ index 7abb2b8..ea24517 100644
do {
struct insn insn;
-@@ -1069,7 +1070,7 @@ static void setup_pebs_sample_data(struct perf_event *event,
+@@ -1076,7 +1077,7 @@ static void setup_pebs_sample_data(struct perf_event *event,
}
if (event->attr.precise_ip > 1 && x86_pmu.intel_cap.pebs_format >= 2) {
@@ -24208,10 +25588,10 @@ index 7abb2b8..ea24517 100644
} else if (event->attr.precise_ip > 1 && intel_pmu_pebs_fixup_ip(regs))
regs->flags |= PERF_EFLAGS_EXACT;
diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
-index 659f01e..ef67d60 100644
+index 653f88d..11b6b78 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
-@@ -686,7 +686,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
+@@ -704,7 +704,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
* Ensure we don't blindy read any address by validating it is
* a known text address.
*/
@@ -24220,7 +25600,7 @@ index 659f01e..ef67d60 100644
addr = (void *)from;
/*
* Assume we can get the maximum possible size
-@@ -708,7 +708,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
+@@ -726,7 +726,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
#ifdef CONFIG_X86_64
is64 = kernel_ip((unsigned long)addr) || !test_thread_flag(TIF_IA32);
#endif
@@ -24230,10 +25610,10 @@ index 659f01e..ef67d60 100644
if (!insn.opcode.got)
return X86_BR_ABORT;
diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c
-index 868e119..be39b45 100644
+index c0bbd10..727ae15e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_pt.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c
-@@ -132,14 +132,10 @@ static const struct attribute_group *pt_attr_groups[] = {
+@@ -133,14 +133,10 @@ static const struct attribute_group *pt_attr_groups[] = {
static int __init pt_pmu_hw_init(void)
{
@@ -24250,7 +25630,7 @@ index 868e119..be39b45 100644
for (i = 0; i < PT_CPUID_LEAVES; i++) {
cpuid_count(20, i,
&pt_pmu.caps[CR_EAX + i*PT_CPUID_REGS_NUM],
-@@ -148,39 +144,25 @@ static int __init pt_pmu_hw_init(void)
+@@ -149,39 +145,25 @@ static int __init pt_pmu_hw_init(void)
&pt_pmu.caps[CR_EDX + i*PT_CPUID_REGS_NUM]);
}
@@ -24298,7 +25678,7 @@ index 868e119..be39b45 100644
}
#define RTIT_CTL_CYC_PSB (RTIT_CTL_CYCLEACC | \
-@@ -996,7 +978,7 @@ static void pt_event_start(struct perf_event *event, int mode)
+@@ -997,7 +979,7 @@ static void pt_event_start(struct perf_event *event, int mode)
return;
}
@@ -24307,7 +25687,7 @@ index 868e119..be39b45 100644
event->hw.state = 0;
pt_config_buffer(buf->cur->table, buf->cur_idx,
-@@ -1012,7 +994,7 @@ static void pt_event_stop(struct perf_event *event, int mode)
+@@ -1013,7 +995,7 @@ static void pt_event_stop(struct perf_event *event, int mode)
* Protect against the PMI racing with disabling wrmsr,
* see comment in intel_pt_interrupt().
*/
@@ -24317,10 +25697,28 @@ index 868e119..be39b45 100644
if (event->hw.state == PERF_HES_STOPPED)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
-index ed446bd..413b10e 100644
+index 24a351a..d429cd7 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
-@@ -496,7 +496,7 @@ static struct attribute *rapl_events_knl_attr[] = {
+@@ -97,14 +97,14 @@ static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
+ #define RAPL_EVENT_MASK 0xFFULL
+
+ #define DEFINE_RAPL_FORMAT_ATTR(_var, _name, _format) \
+-static ssize_t __rapl_##_var##_show(struct kobject *kobj, \
+- struct kobj_attribute *attr, \
++static ssize_t __rapl_##_var##_show(struct device *dev, \
++ struct device_attribute *attr, \
+ char *page) \
+ { \
+ BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE); \
+ return sprintf(page, _format "\n"); \
+ } \
+-static struct kobj_attribute format_attr_##_var = \
++static struct device_attribute format_attr_##_var = \
+ __ATTR(_name, 0444, __rapl_##_var##_show, NULL)
+
+ #define RAPL_CNTR_WIDTH 32 /* 32-bit rapl counters */
+@@ -483,7 +483,7 @@ static struct attribute *rapl_events_knl_attr[] = {
NULL,
};
@@ -24330,9 +25728,20 @@ index ed446bd..413b10e 100644
.attrs = NULL, /* patched at runtime */
};
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
-index 61215a6..ceee0e5 100644
+index 3bf41d4..b5dc2c2 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+@@ -74,8 +74,8 @@ end:
+ return map;
+ }
+
+-ssize_t uncore_event_show(struct kobject *kobj,
+- struct kobj_attribute *attr, char *buf)
++ssize_t uncore_event_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
+ {
+ struct uncore_event_desc *event =
+ container_of(attr, struct uncore_event_desc, attr);
@@ -785,7 +785,7 @@ static void __init uncore_types_exit(struct intel_uncore_type **types)
static int __init uncore_type_init(struct intel_uncore_type *type)
{
@@ -24343,18 +25752,50 @@ index 61215a6..ceee0e5 100644
int i, j;
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
-index 2f0a4a9..8f4b802 100644
+index a7086b8..ccac9b1 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
-@@ -115,7 +115,7 @@ struct intel_uncore_box {
+@@ -113,9 +113,9 @@ struct intel_uncore_box {
+ #define UNCORE_BOX_FLAG_INITIATED 0
+
struct uncore_event_desc {
- struct kobj_attribute attr;
+- struct kobj_attribute attr;
++ struct device_attribute attr;
const char *config;
-};
+} __do_const;
struct pci2phy_map {
struct list_head list;
+@@ -126,8 +126,8 @@ struct pci2phy_map {
+ int uncore_pcibus_to_physid(struct pci_bus *bus);
+ struct pci2phy_map *__find_pci2phy_map(int segment);
+
+-ssize_t uncore_event_show(struct kobject *kobj,
+- struct kobj_attribute *attr, char *buf);
++ssize_t uncore_event_show(struct device *dev,
++ struct device_attribute *attr, char *buf);
+
+ #define INTEL_UNCORE_EVENT_DESC(_name, _config) \
+ { \
+@@ -136,14 +136,14 @@ ssize_t uncore_event_show(struct kobject *kobj,
+ }
+
+ #define DEFINE_UNCORE_FORMAT_ATTR(_var, _name, _format) \
+-static ssize_t __uncore_##_var##_show(struct kobject *kobj, \
+- struct kobj_attribute *attr, \
++static ssize_t __uncore_##_var##_show(struct device *dev, \
++ struct device_attribute *attr, \
+ char *page) \
+ { \
+ BUILD_BUG_ON(sizeof(_format) >= PAGE_SIZE); \
+ return sprintf(page, _format "\n"); \
+ } \
+-static struct kobj_attribute format_attr_##_var = \
++static struct device_attribute format_attr_##_var = \
+ __ATTR(_name, 0444, __uncore_##_var##_show, NULL)
+
+ static inline unsigned uncore_pci_box_ctl(struct intel_uncore_box *box)
diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 628a059..83bced6 100644
--- a/arch/x86/kernel/cpu/vmware.c
@@ -24627,7 +26068,7 @@ index 464ffd6..01f2cda 100644
+EXPORT_SYMBOL(pax_check_alloca);
+#endif
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
-index 5f1c626..14b4999 100644
+index 5f1c626..059e830 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -153,12 +153,12 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
@@ -24681,7 +26122,7 @@ index 5f1c626..14b4999 100644
* exception stack:
*/
+ if ((u16)stack_end[-1] != __KERNEL_DS)
-+ break;
++ goto out;
stack = (unsigned long *) stack_end[-2];
done = 0;
break;
@@ -24695,7 +26136,7 @@ index 5f1c626..14b4999 100644
ops, data, stack_end, &graph);
/*
* We link to the next stack (which would be
-@@ -237,10 +239,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
+@@ -237,10 +239,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
}
}
@@ -24703,10 +26144,11 @@ index 5f1c626..14b4999 100644
- * This handles the process stack:
- */
- bp = ops->walk_stack(tinfo, stack, bp, ops, data, NULL, &graph);
++out:
put_cpu();
}
EXPORT_SYMBOL(dump_trace);
-@@ -347,8 +345,55 @@ int is_valid_bugaddr(unsigned long ip)
+@@ -347,8 +346,55 @@ int is_valid_bugaddr(unsigned long ip)
{
unsigned short ud2;
@@ -24888,7 +26330,7 @@ index 4d38416..ec7cc4e 100644
unlock_done:
mutex_unlock(&espfix_init_mutex);
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
-index d25097c..4c36ff6 100644
+index d5804ad..4c36ff6 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -127,7 +127,7 @@ void __kernel_fpu_end(void)
@@ -24954,19 +26396,7 @@ index d25097c..4c36ff6 100644
fpu->counter++;
kernel_fpu_enable();
}
-@@ -409,8 +409,10 @@ static inline void copy_init_fpstate_to_fpregs(void)
- {
- if (use_xsave())
- copy_kernel_to_xregs(&init_fpstate.xsave, -1);
-- else
-+ else if (static_cpu_has(X86_FEATURE_FXSR))
- copy_kernel_to_fxregs(&init_fpstate.fxsave);
-+ else
-+ copy_kernel_to_fregs(&init_fpstate.fsave);
- }
-
- /*
-@@ -442,25 +444,25 @@ void fpu__clear(struct fpu *fpu)
+@@ -444,25 +444,25 @@ void fpu__clear(struct fpu *fpu)
static inline unsigned short get_fpu_cwd(struct fpu *fpu)
{
if (cpu_has_fxsr) {
@@ -24998,10 +26428,10 @@ index d25097c..4c36ff6 100644
return MXCSR_DEFAULT;
}
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
-index be39b5f..1095798 100644
+index bd08fb7..dc29a0a 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
-@@ -42,7 +42,7 @@ static void fpu__init_cpu_generic(void)
+@@ -45,7 +45,7 @@ static void fpu__init_cpu_generic(void)
/* Flush out any pending x87 state: */
#ifdef CONFIG_MATH_EMULATION
if (!cpu_has_fpu)
@@ -25010,22 +26440,22 @@ index be39b5f..1095798 100644
else
#endif
asm volatile ("fninit");
-@@ -129,7 +129,7 @@ static void __init fpu__init_system_generic(void)
- * Set up the legacy init FPU context. (xstate init might overwrite this
- * with a more modern format, if the CPU supports it.)
- */
-- fpstate_init_fxstate(&init_fpstate.fxsave);
-+ fpstate_init(&init_fpstate);
-
- fpu__init_system_mxcsr();
- }
-@@ -143,42 +143,7 @@ static void __init fpu__init_system_generic(void)
+@@ -148,51 +148,7 @@ static void __init fpu__init_system_generic(void)
unsigned int xstate_size;
EXPORT_SYMBOL_GPL(xstate_size);
--/* Enforce that 'MEMBER' is the last field of 'TYPE': */
+-/* Get alignment of the TYPE. */
+-#define TYPE_ALIGN(TYPE) offsetof(struct { char x; TYPE test; }, test)
+-
+-/*
+- * Enforce that 'MEMBER' is the last field of 'TYPE'.
+- *
+- * Align the computed size with alignment of the TYPE,
+- * because that's how C aligns structs.
+- */
-#define CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) \
-- BUILD_BUG_ON(sizeof(TYPE) != offsetofend(TYPE, MEMBER))
+- BUILD_BUG_ON(sizeof(TYPE) != ALIGN(offsetofend(TYPE, MEMBER), \
+- TYPE_ALIGN(TYPE)))
-
-/*
- * We append the 'struct fpu' to the task_struct:
@@ -25063,7 +26493,7 @@ index be39b5f..1095798 100644
/*
* Set up the xstate_size based on the legacy FPU context size.
-@@ -331,7 +296,6 @@ void __init fpu__init_system(struct cpuinfo_x86 *c)
+@@ -400,7 +356,6 @@ void __init fpu__init_system(struct cpuinfo_x86 *c)
fpu__init_system_generic();
fpu__init_system_xstate_size_legacy();
fpu__init_system_xstate();
@@ -25261,10 +26691,10 @@ index 31c6a60..523f27e 100644
} else {
sanitize_restored_xstate(tsk, &env, xfeatures, fx_only);
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
-index 70fc312..30dfd14 100644
+index d425cda5..011b570 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
-@@ -109,14 +109,14 @@ EXPORT_SYMBOL_GPL(cpu_has_xfeatures);
+@@ -110,14 +110,14 @@ EXPORT_SYMBOL_GPL(cpu_has_xfeatures);
*/
void fpstate_sanitize_xstate(struct fpu *fpu)
{
@@ -25289,7 +26719,7 @@ index 70fc312..30dfd14 100644
+ return get_xsave_addr(&fpu->state->xsave, xsave_state);
}
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
-index 311bcf3..83b8e85 100644
+index 29408d6..cd88f18 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -89,7 +89,7 @@ static unsigned long text_ip_addr(unsigned long ip)
@@ -25307,10 +26737,10 @@ index 311bcf3..83b8e85 100644
+ ip = ktla_ktva(ip);
+
+ ftrace_expected = old_code;
+
/*
- * Note: Due to modules and __init, code can
- * disappear and change, we need to protect against faulting
-@@ -230,7 +232,7 @@ static int update_ftrace_func(unsigned long ip, void *new)
+@@ -233,7 +235,7 @@ static int update_ftrace_func(unsigned long ip, void *new)
unsigned char old[MCOUNT_INSN_SIZE];
int ret;
@@ -25319,7 +26749,7 @@ index 311bcf3..83b8e85 100644
ftrace_update_func = ip;
/* Make sure the breakpoints see the ftrace_update_func update */
-@@ -311,7 +313,7 @@ static int add_break(unsigned long ip, const char *old)
+@@ -314,7 +316,7 @@ static int add_break(unsigned long ip, const char *old)
unsigned char replaced[MCOUNT_INSN_SIZE];
unsigned char brk = BREAKPOINT_INSTRUCTION;
@@ -25327,8 +26757,8 @@ index 311bcf3..83b8e85 100644
+ if (probe_kernel_read(replaced, (void *)ktla_ktva(ip), MCOUNT_INSN_SIZE))
return -EFAULT;
- /* Make sure it is what we expect it to be */
-@@ -674,11 +676,11 @@ static unsigned char *ftrace_jmp_replace(unsigned long ip, unsigned long addr)
+ ftrace_expected = old;
+@@ -681,11 +683,11 @@ static unsigned char *ftrace_jmp_replace(unsigned long ip, unsigned long addr)
/* Module allocation simplifies allocating memory for code */
static inline void *alloc_tramp(unsigned long size)
{
@@ -25342,7 +26772,7 @@ index 311bcf3..83b8e85 100644
}
#else
/* Trampolines can only be created if modules are supported */
-@@ -757,7 +759,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
+@@ -764,7 +766,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
*tramp_size = size + MCOUNT_INSN_SIZE + sizeof(void *);
/* Copy ftrace_caller onto the trampoline memory */
@@ -25352,7 +26782,7 @@ index 311bcf3..83b8e85 100644
if (WARN_ON(ret < 0)) {
tramp_free(trampoline);
return 0;
-@@ -767,6 +771,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
+@@ -774,6 +778,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
/* The trampoline ends with a jmp to ftrace_return */
jmp = ftrace_jmp_replace(ip, (unsigned long)ftrace_return);
@@ -25360,7 +26790,7 @@ index 311bcf3..83b8e85 100644
memcpy(trampoline + size, jmp, MCOUNT_INSN_SIZE);
/*
-@@ -779,6 +784,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
+@@ -786,6 +791,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
ptr = (unsigned long *)(trampoline + size + MCOUNT_INSN_SIZE);
*ptr = (unsigned long)ops;
@@ -25368,7 +26798,7 @@ index 311bcf3..83b8e85 100644
op_offset -= start_offset;
memcpy(&op_ptr, trampoline + op_offset, OP_REF_SIZE);
-@@ -796,7 +802,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
+@@ -803,7 +809,9 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
op_ptr.offset = offset;
/* put in the new offset to the ftrace_ops */
@@ -25379,7 +26809,7 @@ index 311bcf3..83b8e85 100644
/* ALLOC_TRAMP flags lets us know we created it */
ops->flags |= FTRACE_OPS_FL_ALLOC_TRAMP;
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
-index f129a9a..af8f6da 100644
+index 2c0f340..76c1d24 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -68,12 +68,12 @@ again:
@@ -26811,7 +28241,7 @@ index 47190bd..0165c4d 100644
.detect = kvm_detect,
.x2apic_available = kvm_para_available,
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
-index 2bd81e3..2d5e042 100644
+index 72cef58..252d1b0 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -29,7 +29,7 @@
@@ -26831,8 +28261,8 @@ index 2bd81e3..2d5e042 100644
+static struct pvclock_vsyscall_time_info hv_clock[NR_CPUS] __page_aligned_bss;
static struct pvclock_wall_clock wall_clock;
- /*
-@@ -156,7 +156,7 @@ bool kvm_check_and_clear_guest_paused(void)
+ struct pvclock_vsyscall_time_info *pvclock_pvti_cpu0_va(void)
+@@ -161,7 +161,7 @@ bool kvm_check_and_clear_guest_paused(void)
struct pvclock_vcpu_time_info *src;
int cpu = smp_processor_id();
@@ -26841,7 +28271,7 @@ index 2bd81e3..2d5e042 100644
return ret;
src = &hv_clock[cpu].pvti;
-@@ -183,7 +183,7 @@ int kvm_register_clock(char *txt)
+@@ -188,7 +188,7 @@ int kvm_register_clock(char *txt)
int low, high, ret;
struct pvclock_vcpu_time_info *src;
@@ -26850,7 +28280,7 @@ index 2bd81e3..2d5e042 100644
return 0;
src = &hv_clock[cpu].pvti;
-@@ -243,7 +243,6 @@ static void kvm_shutdown(void)
+@@ -248,7 +248,6 @@ static void kvm_shutdown(void)
void __init kvmclock_init(void)
{
struct pvclock_vcpu_time_info *vcpu_time;
@@ -26858,7 +28288,7 @@ index 2bd81e3..2d5e042 100644
int size, cpu;
u8 flags;
-@@ -261,15 +260,8 @@ void __init kvmclock_init(void)
+@@ -266,15 +265,8 @@ void __init kvmclock_init(void)
printk(KERN_INFO "kvm-clock: Using msrs %x and %x",
msr_kvm_system_time, msr_kvm_wall_clock);
@@ -26875,7 +28305,7 @@ index 2bd81e3..2d5e042 100644
return;
}
-@@ -310,7 +302,7 @@ int __init kvm_setup_vsyscall_timeinfo(void)
+@@ -314,7 +306,7 @@ int __init kvm_setup_vsyscall_timeinfo(void)
struct pvclock_vcpu_time_info *vcpu_time;
unsigned int size;
@@ -26967,23 +28397,23 @@ index 6acc9dd..f72931d 100644
case 0:
ret = read_ldt(ptr, bytecount);
diff --git a/arch/x86/kernel/livepatch.c b/arch/x86/kernel/livepatch.c
-index d1d35cc..d5b1193 100644
+index 92fc1a5..478b427 100644
--- a/arch/x86/kernel/livepatch.c
+++ b/arch/x86/kernel/livepatch.c
-@@ -41,8 +41,10 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
- int ret, numpages, size = 4;
- bool readonly;
+@@ -38,8 +38,10 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
+ {
+ size_t size = 4;
unsigned long val;
-- unsigned long core = (unsigned long)mod->module_core;
-- unsigned long core_size = mod->core_size;
-+ unsigned long core_rx = (unsigned long)mod->module_core_rx;
-+ unsigned long core_rw = (unsigned long)mod->module_core_rw;
-+ unsigned long core_size_rx = mod->core_size_rx;
-+ unsigned long core_size_rw = mod->core_size_rw;
+- unsigned long core = (unsigned long)mod->core_layout.base;
+- unsigned long core_size = mod->core_layout.size;
++ unsigned long core_rx = (unsigned long)mod->core_layout.base_rx;
++ unsigned long core_rw = (unsigned long)mod->core_layout.base_rw;
++ unsigned long core_size_rx = mod->core_layout.size_rx;
++ unsigned long core_size_rw = mod->core_layout.size_rw;
switch (type) {
case R_X86_64_NONE:
-@@ -65,14 +67,15 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
+@@ -62,7 +64,8 @@ int klp_write_module_reloc(struct module *mod, unsigned long type,
return -EINVAL;
}
@@ -26993,14 +28423,6 @@ index d1d35cc..d5b1193 100644
/* loc does not point to any symbol inside the module */
return -EINVAL;
- readonly = false;
-
- #ifdef CONFIG_DEBUG_SET_MODULE_RONX
-- if (loc < core + mod->core_ro_size)
-+ if (loc < core_rx + core_size_rx)
- readonly = true;
- #endif
-
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
index 469b23d..5449cfe 100644
--- a/arch/x86/kernel/machine_kexec_32.c
@@ -27033,7 +28455,7 @@ index 469b23d..5449cfe 100644
relocate_kernel_ptr = control_page;
page_list[PA_CONTROL_PAGE] = __pa(control_page);
diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
-index 87e1762..994fdb6 100644
+index 87e1762..f08a93d 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -7,7 +7,7 @@
@@ -27056,10 +28478,12 @@ index 87e1762..994fdb6 100644
ENTRY(ftrace_caller)
/* save_mcount_regs fills in first two parameters */
-@@ -181,8 +182,9 @@ GLOBAL(ftrace_graph_call)
+@@ -180,9 +181,10 @@ GLOBAL(ftrace_graph_call)
+ jmp ftrace_stub
#endif
- GLOBAL(ftrace_stub)
+-GLOBAL(ftrace_stub)
++RAP_ENTRY(ftrace_stub)
+ pax_force_retaddr
retq
-END(ftrace_caller)
@@ -27266,7 +28690,7 @@ index 005c03e..7000fe4 100644
if ((s64)val != *(s32 *)loc)
goto overflow;
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
-index 113e707..0a690e1 100644
+index 64f9616..c94695d 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -39,6 +39,7 @@
@@ -27277,7 +28701,7 @@ index 113e707..0a690e1 100644
#include <asm/processor.h>
#include <asm/msr.h>
-@@ -105,6 +106,11 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
+@@ -83,6 +84,11 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
int err = 0;
ssize_t bytes = 0;
@@ -27289,7 +28713,7 @@ index 113e707..0a690e1 100644
if (count % 8)
return -EINVAL; /* Invalid chunk size */
-@@ -152,6 +158,10 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
+@@ -130,6 +136,10 @@ static long msr_ioctl(struct file *file, unsigned int ioc, unsigned long arg)
err = -EBADF;
break;
}
@@ -27300,7 +28724,7 @@ index 113e707..0a690e1 100644
if (copy_from_user(&regs, uregs, sizeof regs)) {
err = -EFAULT;
break;
-@@ -235,7 +245,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb,
+@@ -213,7 +223,7 @@ static int msr_class_cpu_callback(struct notifier_block *nfb,
return notifier_from_errno(err);
}
@@ -27310,10 +28734,10 @@ index 113e707..0a690e1 100644
};
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
-index 697f90d..8b1c639 100644
+index 8a2cdd7..5b45fda 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
-@@ -98,16 +98,16 @@ fs_initcall(nmi_warning_debugfs);
+@@ -99,16 +99,16 @@ fs_initcall(nmi_warning_debugfs);
static void nmi_max_handler(struct irq_work *w)
{
@@ -27333,7 +28757,7 @@ index 697f90d..8b1c639 100644
}
static int nmi_handle(unsigned int type, struct pt_regs *regs)
-@@ -134,11 +134,11 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
+@@ -135,11 +135,11 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
delta = sched_clock() - delta;
trace_nmi_handler(a->handler, (int)delta, thishandled);
@@ -27348,7 +28772,7 @@ index 697f90d..8b1c639 100644
}
rcu_read_unlock();
-@@ -148,7 +148,7 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
+@@ -149,7 +149,7 @@ static int nmi_handle(unsigned int type, struct pt_regs *regs)
}
NOKPROBE_SYMBOL(nmi_handle);
@@ -27357,7 +28781,7 @@ index 697f90d..8b1c639 100644
{
struct nmi_desc *desc = nmi_to_desc(type);
unsigned long flags;
-@@ -156,7 +156,8 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
+@@ -157,7 +157,8 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
if (!action->handler)
return -EINVAL;
@@ -27367,7 +28791,7 @@ index 697f90d..8b1c639 100644
spin_lock_irqsave(&desc->lock, flags);
-@@ -174,9 +175,9 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
+@@ -175,9 +176,9 @@ int __register_nmi_handler(unsigned int type, struct nmiaction *action)
* event confuses some handlers (kdump uses this flag)
*/
if (action->flags & NMI_FLAG_FIRST)
@@ -27379,7 +28803,7 @@ index 697f90d..8b1c639 100644
spin_unlock_irqrestore(&desc->lock, flags);
return 0;
-@@ -199,7 +200,7 @@ void unregister_nmi_handler(unsigned int type, const char *name)
+@@ -200,7 +201,7 @@ void unregister_nmi_handler(unsigned int type, const char *name)
if (!strcmp(n->name, name)) {
WARN(in_nmi(),
"Trying to free NMI (%s) from NMI context!\n", n->name);
@@ -27388,7 +28812,7 @@ index 697f90d..8b1c639 100644
break;
}
}
-@@ -481,6 +482,17 @@ static DEFINE_PER_CPU(int, update_debug_stack);
+@@ -501,6 +502,17 @@ static DEFINE_PER_CPU(int, update_debug_stack);
dotraplinkage notrace void
do_nmi(struct pt_regs *regs, long error_code)
{
@@ -27442,7 +28866,7 @@ index 33ee3e0..da3519a 100644
#ifdef CONFIG_QUEUED_SPINLOCKS
.queued_spin_lock_slowpath = native_queued_spin_lock_slowpath,
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
-index c2130ae..d52ca15 100644
+index f08ac28..0151389 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -64,6 +64,9 @@ u64 _paravirt_ident_64(u64 x)
@@ -27455,7 +28879,7 @@ index c2130ae..d52ca15 100644
void __init default_banner(void)
{
-@@ -150,16 +153,20 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
+@@ -139,15 +142,19 @@ unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
if (opfunc == NULL)
/* If there's no function, patch it with a ud2a (BUG) */
@@ -27463,8 +28887,7 @@ index c2130ae..d52ca15 100644
- else if (opfunc == _paravirt_nop)
+ ret = paravirt_patch_insns(insnbuf, len, (const char *)ktva_ktla((unsigned long)ud2a), ud2a+sizeof(ud2a));
+ else if (opfunc == (void *)_paravirt_nop)
- /* If the operation is a nop, then nop the callsite */
- ret = paravirt_patch_nop();
+ ret = 0;
/* identity functions just return their single argument */
- else if (opfunc == _paravirt_ident_32)
@@ -27479,8 +28902,8 @@ index c2130ae..d52ca15 100644
+#endif
else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) ||
- #ifdef CONFIG_X86_32
-@@ -186,7 +193,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
+ type == PARAVIRT_PATCH(pv_cpu_ops.usergs_sysret64))
+@@ -170,7 +177,7 @@ unsigned paravirt_patch_insns(void *insnbuf, unsigned len,
if (insn_len > len || start == NULL)
insn_len = len;
else
@@ -27489,7 +28912,7 @@ index c2130ae..d52ca15 100644
return insn_len;
}
-@@ -310,7 +317,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
+@@ -292,7 +299,7 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
return this_cpu_read(paravirt_lazy_mode);
}
@@ -27498,7 +28921,7 @@ index c2130ae..d52ca15 100644
.name = "bare hardware",
.paravirt_enabled = 0,
.kernel_rpl = 0,
-@@ -321,16 +328,16 @@ struct pv_info pv_info = {
+@@ -303,16 +310,16 @@ struct pv_info pv_info = {
#endif
};
@@ -27518,7 +28941,7 @@ index c2130ae..d52ca15 100644
.save_fl = __PV_IS_CALLEE_SAVE(native_save_fl),
.restore_fl = __PV_IS_CALLEE_SAVE(native_restore_fl),
.irq_disable = __PV_IS_CALLEE_SAVE(native_irq_disable),
-@@ -342,7 +349,7 @@ __visible struct pv_irq_ops pv_irq_ops = {
+@@ -324,7 +331,7 @@ __visible struct pv_irq_ops pv_irq_ops = {
#endif
};
@@ -27527,17 +28950,10 @@ index c2130ae..d52ca15 100644
.cpuid = native_cpuid,
.get_debugreg = native_get_debugreg,
.set_debugreg = native_set_debugreg,
-@@ -403,21 +410,26 @@ NOKPROBE_SYMBOL(native_get_debugreg);
+@@ -379,15 +386,20 @@ NOKPROBE_SYMBOL(native_get_debugreg);
NOKPROBE_SYMBOL(native_set_debugreg);
NOKPROBE_SYMBOL(native_load_idt);
--struct pv_apic_ops pv_apic_ops = {
-+struct pv_apic_ops pv_apic_ops __read_only= {
- #ifdef CONFIG_X86_LOCAL_APIC
- .startup_ipi_hook = paravirt_nop,
- #endif
- };
-
-#if defined(CONFIG_X86_32) && !defined(CONFIG_X86_PAE)
+#ifdef CONFIG_X86_32
+#ifdef CONFIG_X86_PAE
@@ -27557,7 +28973,7 @@ index c2130ae..d52ca15 100644
.read_cr2 = native_read_cr2,
.write_cr2 = native_write_cr2,
-@@ -467,6 +479,7 @@ struct pv_mmu_ops pv_mmu_ops = {
+@@ -434,6 +446,7 @@ struct pv_mmu_ops pv_mmu_ops = {
.make_pud = PTE_IDENT,
.set_pgd = native_set_pgd,
@@ -27565,7 +28981,7 @@ index c2130ae..d52ca15 100644
#endif
#endif /* CONFIG_PGTABLE_LEVELS >= 3 */
-@@ -487,6 +500,12 @@ struct pv_mmu_ops pv_mmu_ops = {
+@@ -454,6 +467,12 @@ struct pv_mmu_ops pv_mmu_ops = {
},
.set_fixmap = native_set_fixmap,
@@ -27579,7 +28995,7 @@ index c2130ae..d52ca15 100644
EXPORT_SYMBOL_GPL(pv_time_ops);
diff --git a/arch/x86/kernel/paravirt_patch_64.c b/arch/x86/kernel/paravirt_patch_64.c
-index 8aa0558..465512e 100644
+index e70087a..b083377 100644
--- a/arch/x86/kernel/paravirt_patch_64.c
+++ b/arch/x86/kernel/paravirt_patch_64.c
@@ -9,7 +9,11 @@ DEF_NATIVE(pv_irq_ops, save_fl, "pushfq; popq %rax");
@@ -27594,7 +29010,7 @@ index 8aa0558..465512e 100644
DEF_NATIVE(pv_cpu_ops, clts, "clts");
DEF_NATIVE(pv_cpu_ops, wbinvd, "wbinvd");
-@@ -62,7 +66,11 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
+@@ -59,7 +63,11 @@ unsigned native_patch(u8 type, u16 clobbers, void *ibuf,
PATCH_SITE(pv_mmu_ops, read_cr3);
PATCH_SITE(pv_mmu_ops, write_cr3);
PATCH_SITE(pv_cpu_ops, clts);
@@ -27607,7 +29023,7 @@ index 8aa0558..465512e 100644
#if defined(CONFIG_PARAVIRT_SPINLOCKS) && defined(CONFIG_QUEUED_SPINLOCKS)
case PARAVIRT_PATCH(pv_lock_ops.queued_spin_unlock):
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
-index 0497f71..7186c0d 100644
+index 833b1d3..f839e8b 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1347,7 +1347,7 @@ static void __init get_tce_space_from_tar(void)
@@ -27633,7 +29049,7 @@ index 35ccf75..7a15747 100644
#define DEBUG 1
diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
-index adf0392..88a7576 100644
+index 7c577a1..3557b10 100644
--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -40,7 +40,7 @@ void x86_swiotlb_free_coherent(struct device *dev, size_t size,
@@ -27923,7 +29339,7 @@ index 9f95091..6885108 100644
return prev_p;
}
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
-index 4cbb60f..7cc4cb4 100644
+index 9f75187..9b2d358 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -160,9 +160,10 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long sp,
@@ -27982,10 +29398,10 @@ index 4cbb60f..7cc4cb4 100644
* Now maybe reload the debug registers and handle I/O bitmaps
*/
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
-index 558f50e..2312c52 100644
+index 32e9d9c..afd5732 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
-@@ -184,10 +184,10 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)
+@@ -169,10 +169,10 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)
unsigned long sp = (unsigned long)&regs->sp;
u32 *prev_esp;
@@ -27998,7 +29414,7 @@ index 558f50e..2312c52 100644
if (prev_esp)
return (unsigned long)prev_esp;
-@@ -444,6 +444,20 @@ static int putreg(struct task_struct *child,
+@@ -429,6 +429,20 @@ static int putreg(struct task_struct *child,
if (child->thread.gs != value)
return do_arch_prctl(child, ARCH_SET_GS, value);
return 0;
@@ -28019,7 +29435,7 @@ index 558f50e..2312c52 100644
#endif
}
-@@ -580,7 +594,7 @@ static void ptrace_triggered(struct perf_event *bp,
+@@ -565,7 +579,7 @@ static void ptrace_triggered(struct perf_event *bp,
static unsigned long ptrace_get_dr7(struct perf_event *bp[])
{
int i;
@@ -28028,7 +29444,7 @@ index 558f50e..2312c52 100644
struct arch_hw_breakpoint *info;
for (i = 0; i < HBP_NUM; i++) {
-@@ -814,7 +828,7 @@ long arch_ptrace(struct task_struct *child, long request,
+@@ -799,7 +813,7 @@ long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
int ret;
@@ -28037,7 +29453,7 @@ index 558f50e..2312c52 100644
switch (request) {
/* read the word at location addr in the USER area. */
-@@ -899,14 +913,14 @@ long arch_ptrace(struct task_struct *child, long request,
+@@ -884,14 +898,14 @@ long arch_ptrace(struct task_struct *child, long request,
if ((int) addr < 0)
return -EIO;
ret = do_get_thread_area(child, addr,
@@ -28054,7 +29470,7 @@ index 558f50e..2312c52 100644
break;
#endif
-@@ -1294,7 +1308,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
+@@ -1279,7 +1293,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
#ifdef CONFIG_X86_64
@@ -28063,7 +29479,7 @@ index 558f50e..2312c52 100644
[REGSET_GENERAL] = {
.core_note_type = NT_PRSTATUS,
.n = sizeof(struct user_regs_struct) / sizeof(long),
-@@ -1335,7 +1349,7 @@ static const struct user_regset_view user_x86_64_view = {
+@@ -1320,7 +1334,7 @@ static const struct user_regset_view user_x86_64_view = {
#endif /* CONFIG_X86_64 */
#if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
@@ -28072,7 +29488,7 @@ index 558f50e..2312c52 100644
[REGSET_GENERAL] = {
.core_note_type = NT_PRSTATUS,
.n = sizeof(struct user_regs_struct32) / sizeof(u32),
-@@ -1388,7 +1402,7 @@ static const struct user_regset_view user_x86_32_view = {
+@@ -1373,7 +1387,7 @@ static const struct user_regset_view user_x86_32_view = {
*/
u64 xstate_fx_sw_bytes[USER_XSTATE_FX_SW_WORDS];
@@ -28081,7 +29497,7 @@ index 558f50e..2312c52 100644
{
#ifdef CONFIG_X86_64
x86_64_regsets[REGSET_XSTATE].n = size / sizeof(u64);
-@@ -1423,7 +1437,7 @@ static void fill_sigtrap_info(struct task_struct *tsk,
+@@ -1408,7 +1422,7 @@ static void fill_sigtrap_info(struct task_struct *tsk,
memset(info, 0, sizeof(*info));
info->si_signo = SIGTRAP;
info->si_code = si_code;
@@ -28091,7 +29507,7 @@ index 558f50e..2312c52 100644
void user_single_step_siginfo(struct task_struct *tsk,
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
-index 2f355d2..e75ed0a 100644
+index 99bfc02..c85b4c4 100644
--- a/arch/x86/kernel/pvclock.c
+++ b/arch/x86/kernel/pvclock.c
@@ -51,11 +51,11 @@ void pvclock_touch_watchdogs(void)
@@ -28123,7 +29539,7 @@ index 2f355d2..e75ed0a 100644
return ret;
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
-index f660d63..564a120 100644
+index ab0adc0..502dfc2 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -70,6 +70,11 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -28261,7 +29677,7 @@ index 98111b3..73ca125 100644
identity_mapped:
/* set return address to 0 if not preserving context */
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
-index d2bbe34..9d8fdaa 100644
+index d3d80e6..5c5b8de 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -112,6 +112,7 @@
@@ -28497,7 +29913,7 @@ index cb6282c..7cda5d0 100644
}
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
-index 12c8286..aa65d13 100644
+index 658777c..6285f88 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -336,7 +336,7 @@ static int __init nonmi_ipi_setup(char *str)
@@ -28510,7 +29926,7 @@ index 12c8286..aa65d13 100644
.smp_prepare_cpus = native_smp_prepare_cpus,
.smp_cpus_done = native_smp_cpus_done,
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
-index fbabe4f..c686333 100644
+index 24d57f7..36e49a2 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -213,14 +213,17 @@ static void notrace start_secondary(void *unused)
@@ -28535,7 +29951,7 @@ index fbabe4f..c686333 100644
/*
* Check TSC synchronization with the BP:
*/
-@@ -810,16 +813,15 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
+@@ -803,16 +806,15 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
alternatives_enable_smp();
per_cpu(current_task, cpu) = idle;
@@ -28554,7 +29970,7 @@ index fbabe4f..c686333 100644
}
/*
-@@ -840,9 +842,11 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
+@@ -833,9 +835,11 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
unsigned long timeout;
idle->thread.sp = (unsigned long) (((struct pt_regs *)
@@ -28567,7 +29983,7 @@ index fbabe4f..c686333 100644
initial_code = (unsigned long)start_secondary;
stack_start = idle->thread.sp;
-@@ -990,6 +994,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
+@@ -983,6 +987,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
common_cpu_up(cpu, tidle);
@@ -28609,7 +30025,7 @@ index c9a0738..f0ab628 100644
switch (opcode[i]) {
diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
new file mode 100644
-index 0000000..5877189
+index 0000000..920e413
--- /dev/null
+++ b/arch/x86/kernel/sys_i386_32.c
@@ -0,0 +1,189 @@
@@ -28737,9 +30153,9 @@ index 0000000..5877189
+}
+
+unsigned long
-+arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
-+ const unsigned long len, const unsigned long pgoff,
-+ const unsigned long flags)
++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
++ unsigned long len, unsigned long pgoff,
++ unsigned long flags)
+{
+ struct vm_area_struct *vma;
+ struct mm_struct *mm = current->mm;
@@ -28803,7 +30219,7 @@ index 0000000..5877189
+ return arch_get_unmapped_area(filp, addr0, len, pgoff, flags);
+}
diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
-index 10e0272..b4bb9a7 100644
+index 10e0272..a73232f 100644
--- a/arch/x86/kernel/sys_x86_64.c
+++ b/arch/x86/kernel/sys_x86_64.c
@@ -97,8 +97,8 @@ out:
@@ -28854,7 +30270,7 @@ index 10e0272..b4bb9a7 100644
return addr;
}
-@@ -157,6 +161,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -157,18 +161,20 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
info.align_mask = get_align_mask();
info.align_offset += get_align_bits();
}
@@ -28862,7 +30278,15 @@ index 10e0272..b4bb9a7 100644
return vm_unmapped_area(&info);
}
-@@ -169,6 +174,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+ unsigned long
+-arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+- const unsigned long len, const unsigned long pgoff,
+- const unsigned long flags)
++arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0,
++ unsigned long len, unsigned long pgoff,
++ unsigned long flags)
+ {
+ struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
struct vm_unmapped_area_info info;
@@ -29048,7 +30472,7 @@ index 1c113db..287b42e 100644
static int trace_irq_vector_refcount;
static DEFINE_MUTEX(irq_vector_mutex);
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
-index ade185a..2452e8b 100644
+index ade185a..4c354a0 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -70,7 +70,7 @@
@@ -29087,7 +30511,7 @@ index ade185a..2452e8b 100644
struct pt_regs *regs, long error_code)
{
if (v8086_mode(regs)) {
-@@ -202,8 +202,20 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str,
+@@ -202,8 +202,25 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str,
if (!fixup_exception(regs)) {
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = trapnr;
@@ -29097,6 +30521,11 @@ index ade185a..2452e8b 100644
+ str = "PAX: suspicious stack segment fault";
+#endif
+
++#ifdef CONFIG_PAX_RAP
++ if (trapnr == X86_TRAP_UD)
++ str = "PAX: overwritten function pointer or return address detected";
++#endif
++
die(str, regs, error_code);
}
+
@@ -29108,7 +30537,7 @@ index ade185a..2452e8b 100644
return 0;
}
-@@ -242,7 +254,7 @@ static siginfo_t *fill_trap_info(struct pt_regs *regs, int signr, int trapnr,
+@@ -242,7 +259,7 @@ static siginfo_t *fill_trap_info(struct pt_regs *regs, int signr, int trapnr,
}
static void
@@ -29117,7 +30546,7 @@ index ade185a..2452e8b 100644
long error_code, siginfo_t *info)
{
struct task_struct *tsk = current;
-@@ -266,7 +278,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
+@@ -266,7 +283,7 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
if (show_unhandled_signals && unhandled_signal(tsk, signr) &&
printk_ratelimit()) {
pr_info("%s[%d] trap %s ip:%lx sp:%lx error:%lx",
@@ -29126,7 +30555,7 @@ index ade185a..2452e8b 100644
regs->ip, regs->sp, error_code);
print_vma_addr(" in ", regs->ip);
pr_cont("\n");
-@@ -347,6 +359,11 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code)
+@@ -347,6 +364,11 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code)
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = X86_TRAP_DF;
@@ -29138,7 +30567,7 @@ index ade185a..2452e8b 100644
#ifdef CONFIG_DOUBLEFAULT
df_debug(regs, error_code);
#endif
-@@ -459,11 +476,35 @@ do_general_protection(struct pt_regs *regs, long error_code)
+@@ -459,11 +481,35 @@ do_general_protection(struct pt_regs *regs, long error_code)
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = X86_TRAP_GP;
if (notify_die(DIE_GPF, "general protection fault", regs, error_code,
@@ -29175,7 +30604,7 @@ index ade185a..2452e8b 100644
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = X86_TRAP_GP;
-@@ -559,6 +600,9 @@ struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s)
+@@ -559,6 +605,9 @@ struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s)
container_of(task_pt_regs(current),
struct bad_iret_stack, regs);
@@ -29185,8 +30614,35 @@ index ade185a..2452e8b 100644
/* Copy the IRET target to the new stack. */
memmove(&new_stack->regs.ip, (void *)s->regs.sp, 5*8);
+@@ -805,7 +854,7 @@ void __init early_trap_init(void)
+ * since we don't have trace_debug and it will be reset to
+ * 'debug' in trap_init() by set_intr_gate_ist().
+ */
+- set_intr_gate_notrace(X86_TRAP_DB, debug);
++ set_intr_gate_notrace(X86_TRAP_DB, int1);
+ /* int3 can be called from all */
+ set_system_intr_gate(X86_TRAP_BP, &int3);
+ #ifdef CONFIG_X86_32
+@@ -890,7 +939,7 @@ void __init trap_init(void)
+ * in early_trap_init(). However, ITS works only after
+ * cpu_init() loads TSS. See comments in early_trap_init().
+ */
+- set_intr_gate_ist(X86_TRAP_DB, &debug, DEBUG_STACK);
++ set_intr_gate_ist(X86_TRAP_DB, &int1, DEBUG_STACK);
+ /* int3 can be called from all */
+ set_system_intr_gate_ist(X86_TRAP_BP, &int3, DEBUG_STACK);
+
+@@ -898,7 +947,7 @@ void __init trap_init(void)
+
+ #ifdef CONFIG_X86_64
+ memcpy(&debug_idt_table, &idt_table, IDT_ENTRIES * 16);
+- set_nmi_gate(X86_TRAP_DB, &debug);
++ set_nmi_gate(X86_TRAP_DB, &int1);
+ set_nmi_gate(X86_TRAP_BP, &int3);
+ #endif
+ }
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
-index c7c4d9c..ddd1454 100644
+index 3d743da..d74c208 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -151,7 +151,7 @@ static void cyc2ns_write_end(int cpu, struct cyc2ns_data *data)
@@ -29221,7 +30677,7 @@ index bf4db6e..624137c 100644
force_sig_info(SIGSEGV, SEND_SIG_FORCED, current);
}
diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S
-index 4cf401f..ae8c9cf 100644
+index 07efb35..2bf8766 100644
--- a/arch/x86/kernel/verify_cpu.S
+++ b/arch/x86/kernel/verify_cpu.S
@@ -20,6 +20,7 @@
@@ -29233,7 +30689,7 @@ index 4cf401f..ae8c9cf 100644
* verify_cpu, returns the status of longmode and SSE in register %eax.
* 0: Success 1: Failure
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
-index 5246193..c6bed42 100644
+index e574b85..5514c57 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -144,7 +144,7 @@ void save_v86_state(struct kernel_vm86_regs *regs, int retval)
@@ -29245,7 +30701,7 @@ index 5246193..c6bed42 100644
tsk->thread.sp0 = vm86->saved_sp0;
tsk->thread.sysenter_cs = __KERNEL_CS;
load_sp0(tss, &tsk->thread);
-@@ -259,6 +259,13 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
+@@ -263,6 +263,13 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
return -EPERM;
}
@@ -29259,7 +30715,7 @@ index 5246193..c6bed42 100644
if (!vm86) {
if (!(vm86 = kzalloc(sizeof(*vm86), GFP_KERNEL)))
return -ENOMEM;
-@@ -354,7 +361,7 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
+@@ -358,7 +365,7 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)
vm86->saved_sp0 = tsk->thread.sp0;
lazy_save_gs(vm86->regs32.gs);
@@ -29267,8 +30723,8 @@ index 5246193..c6bed42 100644
+ tss = cpu_tss + get_cpu();
/* make room for real-mode segments */
tsk->thread.sp0 += 16;
- if (cpu_has_sep)
-@@ -535,7 +542,7 @@ static void do_int(struct kernel_vm86_regs *regs, int i,
+
+@@ -541,7 +548,7 @@ static void do_int(struct kernel_vm86_regs *regs, int i,
goto cannot_handle;
if (i == 0x21 && is_revectored(AH(regs), &vm86->int21_revectored))
goto cannot_handle;
@@ -29277,7 +30733,7 @@ index 5246193..c6bed42 100644
if (get_user(segoffs, intr_ptr))
goto cannot_handle;
if ((segoffs >> 16) == BIOSSEG)
-@@ -828,6 +835,14 @@ static inline int get_and_reset_irq(int irqnumber)
+@@ -834,6 +841,14 @@ static inline int get_and_reset_irq(int irqnumber)
static int do_vm86_irq_handling(int subfunction, int irqnumber)
{
int ret;
@@ -29584,10 +31040,10 @@ index a0695be..33e180c 100644
+EXPORT_SYMBOL(cpu_pgd);
+#endif
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
-index 3839628..2e5b5b35 100644
+index dad5fe9..ce5f4ba 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
-@@ -92,7 +92,7 @@ struct x86_cpuinit_ops x86_cpuinit = {
+@@ -91,7 +91,7 @@ struct x86_cpuinit_ops x86_cpuinit = {
static void default_nmi_init(void) { };
static int default_i8042_detect(void) { return 1; };
@@ -29596,7 +31052,7 @@ index 3839628..2e5b5b35 100644
.calibrate_tsc = native_calibrate_tsc,
.get_wallclock = mach_get_cmos_time,
.set_wallclock = mach_set_rtc_mmss,
-@@ -108,7 +108,7 @@ struct x86_platform_ops x86_platform = {
+@@ -107,7 +107,7 @@ struct x86_platform_ops x86_platform = {
EXPORT_SYMBOL_GPL(x86_platform);
#if defined(CONFIG_PCI_MSI)
@@ -29605,7 +31061,7 @@ index 3839628..2e5b5b35 100644
.setup_msi_irqs = native_setup_msi_irqs,
.teardown_msi_irq = native_teardown_msi_irq,
.teardown_msi_irqs = default_teardown_msi_irqs,
-@@ -137,7 +137,7 @@ void arch_restore_msi_irqs(struct pci_dev *dev)
+@@ -136,7 +136,7 @@ void arch_restore_msi_irqs(struct pci_dev *dev)
}
#endif
@@ -29666,9 +31122,18 @@ index 6525e92..28559d2 100644
out:
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
-index b9b09fe..138addd 100644
+index b9b09fe..2e1cfb3 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
+@@ -959,7 +959,7 @@ static int em_bsr_c(struct x86_emulate_ctxt *ctxt)
+ static u8 test_cc(unsigned int condition, unsigned long flags)
+ {
+ u8 rc;
+- void (*fop)(void) = (void *)em_setcc + 4 * (condition & 0xf);
++ void (*fop)(struct fastop *) = (void *)em_setcc + 4 * (condition & 0xf);
+
+ flags = (flags & EFLAGS_MASK) | X86_EFLAGS_IF;
+ asm("push %[flags]; popf; call *%[fastop]"
@@ -1881,7 +1881,7 @@ static int em_push_sreg(struct x86_emulate_ctxt *ctxt)
static int em_pop_sreg(struct x86_emulate_ctxt *ctxt)
{
@@ -29696,6 +31161,37 @@ index b9b09fe..138addd 100644
0xffffffff00000000ULL,
0, 0, 0, /* CR3 checked later */
CR4_RESERVED_BITS,
+@@ -4956,7 +4956,10 @@ done_prefixes:
+ if (ctxt->d == 0)
+ return EMULATION_FAILED;
+
+- ctxt->execute = opcode.u.execute;
++ if (ctxt->d & Fastop)
++ ctxt->u.fastop = opcode.u.fastop;
++ else
++ ctxt->u.execute = opcode.u.execute;
+
+ if (unlikely(ctxt->ud) && likely(!(ctxt->d & EmulateOnUD)))
+ return EMULATION_FAILED;
+@@ -5267,15 +5270,14 @@ special_insn:
+ else
+ ctxt->eflags &= ~X86_EFLAGS_RF;
+
+- if (ctxt->execute) {
++ if (ctxt->u.execute) {
+ if (ctxt->d & Fastop) {
+- void (*fop)(struct fastop *) = (void *)ctxt->execute;
+- rc = fastop(ctxt, fop);
++ rc = fastop(ctxt, ctxt->u.fastop);
+ if (rc != X86EMUL_CONTINUE)
+ goto done;
+ goto writeback;
+ }
+- rc = ctxt->execute(ctxt);
++ rc = ctxt->u.execute(ctxt);
+ if (rc != X86EMUL_CONTINUE)
+ goto done;
+ goto writeback;
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index 7cc2360..6ae1236 100644
--- a/arch/x86/kvm/i8259.c
@@ -29766,7 +31262,7 @@ index 7cc2360..6ae1236 100644
{
struct kvm_kpic_state *s = opaque;
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
-index 88d0a92..fa8b52a 100644
+index 1facfd6..51dcfd3 100644
--- a/arch/x86/kvm/ioapic.c
+++ b/arch/x86/kvm/ioapic.c
@@ -405,6 +405,8 @@ static void kvm_ioapic_eoi_inject_work(struct work_struct *work)
@@ -29779,10 +31275,10 @@ index 88d0a92..fa8b52a 100644
{
int i;
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
-index 4d30b86..94115f0 100644
+index 36591fa..3b2fa3f 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
-@@ -56,7 +56,7 @@
+@@ -57,7 +57,7 @@
#define APIC_BUS_CYCLE_NS 1
/* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
@@ -29792,7 +31288,7 @@ index 4d30b86..94115f0 100644
#define APIC_LVT_NUM 6
/* 14 is the version for Xeon and Pentium 8.4.8*/
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
-index 7be8a25..7d71250 100644
+index 2ce4f05..ab8fa72 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -335,7 +335,7 @@ retry_walk:
@@ -29805,10 +31301,10 @@ index 7be8a25..7d71250 100644
goto error;
walker->ptep_user[walker->level - 1] = ptep_user;
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
-index 899c40f..a114588 100644
+index c13a64b..2075a7c 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
-@@ -3490,7 +3490,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
+@@ -3529,7 +3529,11 @@ static void reload_tss(struct kvm_vcpu *vcpu)
int cpu = raw_smp_processor_id();
struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
@@ -29820,7 +31316,7 @@ index 899c40f..a114588 100644
load_TR_desc();
}
-@@ -3885,6 +3889,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -3928,6 +3932,10 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
#endif
#endif
@@ -29831,7 +31327,7 @@ index 899c40f..a114588 100644
reload_tss(vcpu);
local_irq_disable();
-@@ -4260,7 +4268,7 @@ static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu)
+@@ -4303,7 +4311,7 @@ static void svm_sched_in(struct kvm_vcpu *vcpu, int cpu)
{
}
@@ -29841,25 +31337,27 @@ index 899c40f..a114588 100644
.disabled_by_bios = is_disabled,
.hardware_setup = svm_hardware_setup,
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
-index f34ab71..049ebd8 100644
+index 539062e..0aa69ab 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
-@@ -1514,12 +1514,12 @@ static void vmcs_write64(unsigned long field, u64 value)
- #endif
+@@ -1575,14 +1575,14 @@ static __always_inline void vmcs_writel(unsigned long field, unsigned long value
+ __vmcs_writel(field, value);
}
--static void vmcs_clear_bits(unsigned long field, u32 mask)
-+static void vmcs_clear_bits(unsigned long field, unsigned long mask)
+-static __always_inline void vmcs_clear_bits(unsigned long field, u32 mask)
++static __always_inline void vmcs_clear_bits(unsigned long field, unsigned long mask)
{
- vmcs_writel(field, vmcs_readl(field) & ~mask);
+ BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000,
+ "vmcs_clear_bits does not support 64-bit fields");
+ __vmcs_writel(field, __vmcs_readl(field) & ~mask);
}
--static void vmcs_set_bits(unsigned long field, u32 mask)
-+static void vmcs_set_bits(unsigned long field, unsigned long mask)
+-static __always_inline void vmcs_set_bits(unsigned long field, u32 mask)
++static __always_inline void vmcs_set_bits(unsigned long field, unsigned long mask)
{
- vmcs_writel(field, vmcs_readl(field) | mask);
- }
-@@ -1786,7 +1786,11 @@ static void reload_tss(void)
+ BUILD_BUG_ON_MSG(__builtin_constant_p(field) && ((field) & 0x6000) == 0x2000,
+ "vmcs_set_bits does not support 64-bit fields");
+@@ -1851,7 +1851,11 @@ static void reload_tss(void)
struct desc_struct *descs;
descs = (void *)gdt->address;
@@ -29871,7 +31369,7 @@ index f34ab71..049ebd8 100644
load_TR_desc();
}
-@@ -2078,6 +2082,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
+@@ -2143,6 +2147,10 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
vmcs_writel(HOST_TR_BASE, kvm_read_tr_base()); /* 22.2.4 */
vmcs_writel(HOST_GDTR_BASE, gdt->address); /* 22.2.4 */
@@ -29882,7 +31380,7 @@ index f34ab71..049ebd8 100644
rdmsrl(MSR_IA32_SYSENTER_ESP, sysenter_esp);
vmcs_writel(HOST_IA32_SYSENTER_ESP, sysenter_esp); /* 22.2.3 */
-@@ -2395,7 +2403,7 @@ static void setup_msrs(struct vcpu_vmx *vmx)
+@@ -2460,7 +2468,7 @@ static void setup_msrs(struct vcpu_vmx *vmx)
* guest_tsc = (host_tsc * tsc multiplier) >> 48 + tsc_offset
* -- Intel TSC Scaling for Virtualization White Paper, sec 1.3
*/
@@ -29891,7 +31389,7 @@ index f34ab71..049ebd8 100644
{
u64 host_tsc, tsc_offset;
-@@ -4633,7 +4641,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
+@@ -4693,7 +4701,10 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
unsigned long cr4;
vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */
@@ -29902,7 +31400,7 @@ index f34ab71..049ebd8 100644
/* Save the most likely value for this task's CR4 in the VMCS. */
cr4 = cr4_read_shadow();
-@@ -4660,7 +4671,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
+@@ -4720,7 +4731,7 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
vmcs_writel(HOST_IDTR_BASE, dt.address); /* 22.2.4 */
vmx->host_idt_base = dt.address;
@@ -29911,7 +31409,7 @@ index f34ab71..049ebd8 100644
rdmsr(MSR_IA32_SYSENTER_CS, low32, high32);
vmcs_write32(HOST_IA32_SYSENTER_CS, low32);
-@@ -6210,11 +6221,17 @@ static __init int hardware_setup(void)
+@@ -6277,11 +6288,17 @@ static __init int hardware_setup(void)
* page upon invalidation. No need to do anything if not
* using the APIC_ACCESS_ADDR VMCS field.
*/
@@ -29931,23 +31429,7 @@ index f34ab71..049ebd8 100644
if (enable_ept && !cpu_has_vmx_ept_2m_page())
kvm_disable_largepages();
-@@ -6231,6 +6248,7 @@ static __init int hardware_setup(void)
- kvm_tsc_scaling_ratio_frac_bits = 48;
- }
-
-+ pax_open_kernel();
- if (enable_apicv)
- kvm_x86_ops->update_cr8_intercept = NULL;
- else {
-@@ -6239,6 +6257,7 @@ static __init int hardware_setup(void)
- kvm_x86_ops->deliver_posted_interrupt = NULL;
- kvm_x86_ops->sync_pir_to_irr = vmx_sync_pir_to_irr_dummy;
- }
-+ pax_close_kernel();
-
- vmx_disable_intercept_for_msr(MSR_FS_BASE, false);
- vmx_disable_intercept_for_msr(MSR_GS_BASE, false);
-@@ -6293,10 +6312,12 @@ static __init int hardware_setup(void)
+@@ -6351,10 +6368,12 @@ static __init int hardware_setup(void)
enable_pml = 0;
if (!enable_pml) {
@@ -29960,7 +31442,7 @@ index f34ab71..049ebd8 100644
}
kvm_set_posted_intr_wakeup_handler(wakeup_handler);
-@@ -8615,6 +8636,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -8673,6 +8692,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
"jmp 2f \n\t"
"1: " __ex(ASM_VMX_VMRESUME) "\n\t"
"2: "
@@ -29973,7 +31455,7 @@ index f34ab71..049ebd8 100644
/* Save guest registers, load host registers, keep flags */
"mov %0, %c[wordsize](%%" _ASM_SP ") \n\t"
"pop %0 \n\t"
-@@ -8667,6 +8694,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -8725,6 +8750,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
#endif
[cr2]"i"(offsetof(struct vcpu_vmx, vcpu.arch.cr2)),
[wordsize]"i"(sizeof(ulong))
@@ -29985,7 +31467,7 @@ index f34ab71..049ebd8 100644
: "cc", "memory"
#ifdef CONFIG_X86_64
, "rax", "rbx", "rdi", "rsi"
-@@ -8680,7 +8712,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -8738,7 +8768,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
if (debugctlmsr)
update_debugctlmsr(debugctlmsr);
@@ -29994,7 +31476,7 @@ index f34ab71..049ebd8 100644
/*
* The sysexit path does not restore ds/es, so we must set them to
* a reasonable value ourselves.
-@@ -8689,8 +8721,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
+@@ -8747,8 +8777,18 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
* may be executed in interrupt context, which saves and restore segments
* around it, nullifying its effect.
*/
@@ -30015,7 +31497,7 @@ index f34ab71..049ebd8 100644
#endif
vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP)
-@@ -10772,7 +10814,7 @@ out:
+@@ -10830,7 +10870,7 @@ out:
return ret;
}
@@ -30025,10 +31507,10 @@ index f34ab71..049ebd8 100644
.disabled_by_bios = vmx_disabled_by_bios,
.hardware_setup = hardware_setup,
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index 7eb4ebd..9431608 100644
+index eca5bd9..5cf1b68 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
-@@ -1937,8 +1937,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
+@@ -1945,8 +1945,8 @@ static int xen_hvm_config(struct kvm_vcpu *vcpu, u64 data)
{
struct kvm *kvm = vcpu->kvm;
int lm = is_long_mode(vcpu);
@@ -30039,7 +31521,7 @@ index 7eb4ebd..9431608 100644
u8 blob_size = lm ? kvm->arch.xen_hvm_config.blob_size_64
: kvm->arch.xen_hvm_config.blob_size_32;
u32 page_num = data & ~PAGE_MASK;
-@@ -2636,6 +2636,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
+@@ -2647,6 +2647,8 @@ long kvm_arch_dev_ioctl(struct file *filp,
if (n < msr_list.nmsrs)
goto out;
r = -EFAULT;
@@ -30048,7 +31530,7 @@ index 7eb4ebd..9431608 100644
if (copy_to_user(user_msr_list->indices, &msrs_to_save,
num_msrs_to_save * sizeof(u32)))
goto out;
-@@ -3029,7 +3031,7 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,
+@@ -3047,7 +3049,7 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,
static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
{
@@ -30057,7 +31539,7 @@ index 7eb4ebd..9431608 100644
u64 xstate_bv = xsave->header.xfeatures;
u64 valid;
-@@ -3065,7 +3067,7 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
+@@ -3083,7 +3085,7 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
static void load_xsave(struct kvm_vcpu *vcpu, u8 *src)
{
@@ -30066,7 +31548,7 @@ index 7eb4ebd..9431608 100644
u64 xstate_bv = *(u64 *)(src + XSAVE_HDR_OFFSET);
u64 valid;
-@@ -3109,7 +3111,7 @@ static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
+@@ -3127,7 +3129,7 @@ static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
fill_xsave((u8 *) guest_xsave->region, vcpu);
} else {
memcpy(guest_xsave->region,
@@ -30075,7 +31557,7 @@ index 7eb4ebd..9431608 100644
sizeof(struct fxregs_state));
*(u64 *)&guest_xsave->region[XSAVE_HDR_OFFSET / sizeof(u32)] =
XFEATURE_MASK_FPSSE;
-@@ -3134,7 +3136,7 @@ static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,
+@@ -3152,7 +3154,7 @@ static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,
} else {
if (xstate_bv & ~XFEATURE_MASK_FPSSE)
return -EINVAL;
@@ -30084,7 +31566,7 @@ index 7eb4ebd..9431608 100644
guest_xsave->region, sizeof(struct fxregs_state));
}
return 0;
-@@ -6362,6 +6364,7 @@ void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
+@@ -6422,6 +6424,7 @@ void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
* exiting to the userspace. Otherwise, the value will be returned to the
* userspace.
*/
@@ -30092,7 +31574,7 @@ index 7eb4ebd..9431608 100644
static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
{
int r;
-@@ -6612,6 +6615,7 @@ out:
+@@ -6686,6 +6689,7 @@ out:
return r;
}
@@ -30100,7 +31582,7 @@ index 7eb4ebd..9431608 100644
static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu)
{
if (!kvm_arch_vcpu_runnable(vcpu) &&
-@@ -7159,7 +7163,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
+@@ -7233,7 +7237,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
{
struct fxregs_state *fxsave =
@@ -30109,7 +31591,7 @@ index 7eb4ebd..9431608 100644
memcpy(fpu->fpr, fxsave->st_space, 128);
fpu->fcw = fxsave->cwd;
-@@ -7176,7 +7180,7 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
+@@ -7250,7 +7254,7 @@ int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
{
struct fxregs_state *fxsave =
@@ -30118,7 +31600,7 @@ index 7eb4ebd..9431608 100644
memcpy(fxsave->st_space, fpu->fpr, 128);
fxsave->cwd = fpu->fcw;
-@@ -7192,9 +7196,9 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
+@@ -7266,9 +7270,9 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
static void fx_init(struct kvm_vcpu *vcpu)
{
@@ -30130,7 +31612,7 @@ index 7eb4ebd..9431608 100644
host_xcr0 | XSTATE_COMPACTION_ENABLED;
/*
-@@ -7218,7 +7222,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
+@@ -7292,7 +7296,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
kvm_put_guest_xcr0(vcpu);
vcpu->guest_fpu_loaded = 1;
__kernel_fpu_begin();
@@ -30139,7 +31621,7 @@ index 7eb4ebd..9431608 100644
trace_kvm_fpu(1);
}
-@@ -7521,6 +7525,8 @@ bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
+@@ -7595,6 +7599,8 @@ bool kvm_vcpu_compatible(struct kvm_vcpu *vcpu)
struct static_key kvm_no_apic_vcpu __read_mostly;
@@ -30148,7 +31630,7 @@ index 7eb4ebd..9431608 100644
int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
{
struct page *page;
-@@ -7537,11 +7543,14 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
+@@ -7612,11 +7618,14 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
else
vcpu->arch.mp_state = KVM_MP_STATE_UNINITIALIZED;
@@ -30167,7 +31649,7 @@ index 7eb4ebd..9431608 100644
vcpu->arch.pio_data = page_address(page);
kvm_set_tsc_khz(vcpu, max_tsc_khz);
-@@ -7597,6 +7606,9 @@ fail_mmu_destroy:
+@@ -7674,6 +7683,9 @@ fail_mmu_destroy:
kvm_mmu_destroy(vcpu);
fail_free_pio_data:
free_page((unsigned long)vcpu->arch.pio_data);
@@ -30177,7 +31659,7 @@ index 7eb4ebd..9431608 100644
fail:
return r;
}
-@@ -7614,6 +7626,8 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
+@@ -7692,6 +7704,8 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
free_page((unsigned long)vcpu->arch.pio_data);
if (!lapic_in_kernel(vcpu))
static_key_slow_dec(&kvm_no_apic_vcpu);
@@ -30187,7 +31669,7 @@ index 7eb4ebd..9431608 100644
void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu)
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
-index a43b2ea..e64e453 100644
+index 4ba229a..470f861 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -1336,9 +1336,10 @@ static __init int early_put_chars(u32 vtermno, const char *buf, int count)
@@ -32779,10 +34261,10 @@ index 5e044d5..d342fce 100644
#define FPU_CS (*(unsigned short *) &(FPU_info->regs->cs))
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
-index 65c47fd..3e0fd98 100644
+index f9d38a4..556175f 100644
--- a/arch/x86/mm/Makefile
+++ b/arch/x86/mm/Makefile
-@@ -33,3 +33,7 @@ obj-$(CONFIG_ACPI_NUMA) += srat.o
+@@ -34,3 +34,7 @@ obj-$(CONFIG_ACPI_NUMA) += srat.o
obj-$(CONFIG_NUMA_EMU) += numa_emulation.o
obj-$(CONFIG_X86_INTEL_MPX) += mpx.o
@@ -33590,10 +35072,10 @@ index e830c71..f7e9e6c 100644
+ return ret ? -EFAULT : 0;
+}
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
-index ae9a37b..c5f8310 100644
+index d8a798d..6f803ca 100644
--- a/arch/x86/mm/gup.c
+++ b/arch/x86/mm/gup.c
-@@ -266,7 +266,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
+@@ -302,7 +302,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
addr = start;
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
@@ -33602,7 +35084,7 @@ index ae9a37b..c5f8310 100644
(void __user *)start, len)))
return 0;
-@@ -342,6 +342,10 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
+@@ -378,6 +378,10 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
goto slow_irqon;
#endif
@@ -33639,7 +35121,7 @@ index a6d7392..3b105a8 100644
return (void *)vaddr;
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
-index 42982b2..7168fc3 100644
+index 740d7ac..4091827 100644
--- a/arch/x86/mm/hugetlbpage.c
+++ b/arch/x86/mm/hugetlbpage.c
@@ -74,23 +74,24 @@ int pud_huge(pud_t pud)
@@ -34204,10 +35686,10 @@ index cb4ef3d..377ec5a 100644
printk(KERN_INFO "Write protecting the kernel text: %luk\n",
size >> 10);
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
-index ec081fe..14e8743 100644
+index 5488d21..6063860 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
-@@ -136,7 +136,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
+@@ -137,7 +137,7 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
* around without checking the pgd every time.
*/
@@ -34216,7 +35698,7 @@ index ec081fe..14e8743 100644
EXPORT_SYMBOL_GPL(__supported_pte_mask);
int force_personality32;
-@@ -169,7 +169,12 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
+@@ -170,7 +170,12 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
for (address = start; address <= end; address += PGDIR_SIZE) {
const pgd_t *pgd_ref = pgd_offset_k(address);
@@ -34229,7 +35711,7 @@ index ec081fe..14e8743 100644
/*
* When it is called after memory hot remove, pgd_none()
-@@ -180,6 +185,25 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
+@@ -181,6 +186,25 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
continue;
spin_lock(&pgd_lock);
@@ -34255,7 +35737,7 @@ index ec081fe..14e8743 100644
list_for_each_entry(page, &pgd_list, lru) {
pgd_t *pgd;
spinlock_t *pgt_lock;
-@@ -188,6 +212,7 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
+@@ -189,6 +213,7 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
/* the pgt_lock only for Xen */
pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
spin_lock(pgt_lock);
@@ -34263,7 +35745,7 @@ index ec081fe..14e8743 100644
if (!pgd_none(*pgd_ref) && !pgd_none(*pgd))
BUG_ON(pgd_page_vaddr(*pgd)
-@@ -201,7 +226,10 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
+@@ -202,7 +227,10 @@ void sync_global_pgds(unsigned long start, unsigned long end, int removed)
set_pgd(pgd, *pgd_ref);
}
@@ -34274,7 +35756,7 @@ index ec081fe..14e8743 100644
}
spin_unlock(&pgd_lock);
}
-@@ -234,7 +262,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
+@@ -235,7 +263,7 @@ static pud_t *fill_pud(pgd_t *pgd, unsigned long vaddr)
{
if (pgd_none(*pgd)) {
pud_t *pud = (pud_t *)spp_getpage();
@@ -34283,7 +35765,7 @@ index ec081fe..14e8743 100644
if (pud != pud_offset(pgd, 0))
printk(KERN_ERR "PAGETABLE BUG #00! %p <-> %p\n",
pud, pud_offset(pgd, 0));
-@@ -246,7 +274,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
+@@ -247,7 +275,7 @@ static pmd_t *fill_pmd(pud_t *pud, unsigned long vaddr)
{
if (pud_none(*pud)) {
pmd_t *pmd = (pmd_t *) spp_getpage();
@@ -34292,7 +35774,7 @@ index ec081fe..14e8743 100644
if (pmd != pmd_offset(pud, 0))
printk(KERN_ERR "PAGETABLE BUG #01! %p <-> %p\n",
pmd, pmd_offset(pud, 0));
-@@ -275,7 +303,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
+@@ -276,7 +304,9 @@ void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte)
pmd = fill_pmd(pud, vaddr);
pte = fill_pte(pmd, vaddr);
@@ -34302,7 +35784,7 @@ index ec081fe..14e8743 100644
/*
* It's enough to flush this one mapping.
-@@ -337,14 +367,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
+@@ -338,14 +368,12 @@ static void __init __init_extra_mapping(unsigned long phys, unsigned long size,
pgd = pgd_offset_k((unsigned long)__va(phys));
if (pgd_none(*pgd)) {
pud = (pud_t *) spp_getpage();
@@ -34319,7 +35801,7 @@ index ec081fe..14e8743 100644
}
pmd = pmd_offset(pud, phys);
BUG_ON(!pmd_none(*pmd));
-@@ -585,7 +613,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
+@@ -586,7 +614,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
prot);
spin_lock(&init_mm.page_table_lock);
@@ -34328,7 +35810,7 @@ index ec081fe..14e8743 100644
spin_unlock(&init_mm.page_table_lock);
}
__flush_tlb_all();
-@@ -626,7 +654,7 @@ kernel_physical_mapping_init(unsigned long start,
+@@ -627,7 +655,7 @@ kernel_physical_mapping_init(unsigned long start,
page_size_mask);
spin_lock(&init_mm.page_table_lock);
@@ -34354,7 +35836,7 @@ index 9c0ff04..9020d5f 100644
return (void *)vaddr;
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
-index b9c78f3..c757af4 100644
+index 0d8d53d..5f7315c 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -59,8 +59,8 @@ static int __ioremap_check_ram(unsigned long start_pfn, unsigned long nr_pages,
@@ -34464,7 +35946,7 @@ index b4f2e7e..96c9c3e 100644
pte = kmemcheck_pte_lookup(address);
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
-index 844b06d..f363c86 100644
+index 72bb52f..4bc6d52 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -52,7 +52,7 @@ static unsigned long stack_maxrandom_size(void)
@@ -34631,18 +36113,9 @@ index ef05755..7125725 100644
err_out:
/* info might be NULL, but kfree() handles that */
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
-index c3b3f65..5bfe5dc 100644
+index d04f809..683f0be 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
-@@ -469,7 +469,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
- {
- int i, nid;
- nodemask_t numa_kernel_nodes = NODE_MASK_NONE;
-- unsigned long start, end;
-+ u64 start, end;
- struct memblock_region *r;
-
- /*
@@ -508,7 +508,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
}
}
@@ -34653,10 +36126,10 @@ index c3b3f65..5bfe5dc 100644
unsigned long uninitialized_var(pfn_align);
int i, nid;
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
-index b599a78..4ac899d 100644
+index 9cf96d8..ce09f13 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
-@@ -259,7 +259,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
+@@ -264,7 +264,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
*/
#ifdef CONFIG_PCI_BIOS
if (pcibios_enabled && within(pfn, BIOS_BEGIN >> PAGE_SHIFT, BIOS_END >> PAGE_SHIFT))
@@ -34665,7 +36138,7 @@ index b599a78..4ac899d 100644
#endif
/*
-@@ -267,9 +267,10 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
+@@ -272,9 +272,10 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
* Does not cover __inittext since that is gone later on. On
* 64bit we do not enforce !NX on the low mapping
*/
@@ -34678,7 +36151,7 @@ index b599a78..4ac899d 100644
/*
* The .rodata section needs to be read-only. Using the pfn
* catches all aliases.
-@@ -277,6 +278,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
+@@ -282,6 +283,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
if (within(pfn, __pa_symbol(__start_rodata) >> PAGE_SHIFT,
__pa_symbol(__end_rodata) >> PAGE_SHIFT))
pgprot_val(forbidden) |= _PAGE_RW;
@@ -34686,7 +36159,7 @@ index b599a78..4ac899d 100644
#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
/*
-@@ -315,6 +317,13 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
+@@ -320,6 +322,13 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address,
}
#endif
@@ -34700,7 +36173,7 @@ index b599a78..4ac899d 100644
prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
return prot;
-@@ -451,23 +460,37 @@ EXPORT_SYMBOL_GPL(slow_virt_to_phys);
+@@ -456,23 +465,37 @@ EXPORT_SYMBOL_GPL(slow_virt_to_phys);
static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
{
/* change init_mm */
@@ -34740,7 +36213,7 @@ index b599a78..4ac899d 100644
}
static int
-@@ -704,6 +727,10 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
+@@ -709,6 +732,10 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
return 0;
}
@@ -34751,7 +36224,7 @@ index b599a78..4ac899d 100644
static int split_large_page(struct cpa_data *cpa, pte_t *kpte,
unsigned long address)
{
-@@ -1147,6 +1174,9 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
+@@ -1152,6 +1179,9 @@ static int __cpa_process_fault(struct cpa_data *cpa, unsigned long vaddr,
}
}
@@ -34761,7 +36234,7 @@ index b599a78..4ac899d 100644
static int __change_page_attr(struct cpa_data *cpa, int primary)
{
unsigned long address;
-@@ -1205,7 +1235,9 @@ repeat:
+@@ -1210,7 +1240,9 @@ repeat:
* Do we really change anything ?
*/
if (pte_val(old_pte) != pte_val(new_pte)) {
@@ -34772,19 +36245,19 @@ index b599a78..4ac899d 100644
}
cpa->numpages = 1;
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
-index 188e3e0..5c75446 100644
+index f4ae536..e250eec 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
-@@ -588,7 +588,7 @@ int free_memtype(u64 start, u64 end)
+@@ -589,7 +589,7 @@ int free_memtype(u64 start, u64 end)
- if (!entry) {
+ if (IS_ERR(entry)) {
pr_info("x86/PAT: %s:%d freeing invalid memtype [mem %#010Lx-%#010Lx]\n",
- current->comm, current->pid, start, end - 1);
+ current->comm, task_pid_nr(current), start, end - 1);
return -EINVAL;
}
-@@ -711,8 +711,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
+@@ -712,8 +712,8 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
@@ -34795,7 +36268,7 @@ index 188e3e0..5c75446 100644
return 0;
}
cursor += PAGE_SIZE;
-@@ -782,7 +782,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size,
+@@ -783,7 +783,7 @@ int kernel_map_sync_memtype(u64 base, unsigned long size,
if (ioremap_change_attr((unsigned long)__va(base), id_sz, pcm) < 0) {
pr_info("x86/PAT: %s:%d ioremap_change_attr failed %s for [mem %#010Lx-%#010Lx]\n",
@@ -34804,7 +36277,7 @@ index 188e3e0..5c75446 100644
cattr_name(pcm),
base, (unsigned long long)(base + size-1));
return -EINVAL;
-@@ -817,7 +817,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
+@@ -818,7 +818,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
pcm = lookup_memtype(paddr);
if (want_pcm != pcm) {
pr_warn("x86/PAT: %s:%d map pfn RAM range req %s for [mem %#010Lx-%#010Lx], got %s\n",
@@ -34813,7 +36286,7 @@ index 188e3e0..5c75446 100644
cattr_name(want_pcm),
(unsigned long long)paddr,
(unsigned long long)(paddr + size - 1),
-@@ -838,7 +838,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
+@@ -839,7 +839,7 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
!is_new_memtype_allowed(paddr, size, want_pcm, pcm)) {
free_memtype(paddr, paddr + size);
pr_err("x86/PAT: %s:%d map pfn expected mapping type %s for [mem %#010Lx-%#010Lx], got %s\n",
@@ -34823,10 +36296,10 @@ index 188e3e0..5c75446 100644
(unsigned long long)paddr,
(unsigned long long)(paddr + size - 1),
diff --git a/arch/x86/mm/pat_rbtree.c b/arch/x86/mm/pat_rbtree.c
-index 6393108..890adda 100644
+index 2f770225..22a4d23 100644
--- a/arch/x86/mm/pat_rbtree.c
+++ b/arch/x86/mm/pat_rbtree.c
-@@ -161,7 +161,7 @@ success:
+@@ -171,7 +171,7 @@ success:
failure:
pr_info("x86/PAT: %s:%d conflicting memory types %Lx-%Lx %s<->%s\n",
@@ -34885,7 +36358,7 @@ index 9f0614d..92ae64a 100644
p += get_opcode(p, &opcode);
for (i = 0; i < ARRAY_SIZE(imm_wop); i++)
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
-index fb0a9dd..5ab49c4 100644
+index 4eb287e..e91945b 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -98,10 +98,75 @@ static inline void pgd_list_del(pgd_t *pgd)
@@ -35173,7 +36646,7 @@ index fb0a9dd..5ab49c4 100644
pgd_dtor(pgd);
paravirt_pgd_free(mm, pgd);
_pgd_free(pgd);
-@@ -544,6 +616,55 @@ void __init reserve_top_address(unsigned long reserve)
+@@ -526,6 +598,50 @@ void __init reserve_top_address(unsigned long reserve)
int fixmaps_set;
@@ -35192,11 +36665,6 @@ index fb0a9dd..5ab49c4 100644
+ case VSYSCALL_PAGE:
+ break;
+#endif
-+
-+#ifdef CONFIG_PARAVIRT_CLOCK
-+ case PVCLOCK_FIXMAP_BEGIN ... PVCLOCK_FIXMAP_END:
-+ break;
-+#endif
+ }
+
+ pgd = pgd_offset_k(address);
@@ -35229,7 +36697,7 @@ index fb0a9dd..5ab49c4 100644
void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
{
unsigned long address = __fix_to_virt(idx);
-@@ -554,6 +675,7 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
+@@ -536,6 +652,7 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
}
set_pte_vaddr(address, pte);
fixmaps_set++;
@@ -35237,7 +36705,7 @@ index fb0a9dd..5ab49c4 100644
}
void native_set_fixmap(enum fixed_addresses idx, phys_addr_t phys,
-@@ -620,9 +742,11 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
+@@ -602,9 +719,11 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)
prot = pgprot_4k_2_large(prot);
@@ -35268,7 +36736,7 @@ index 75cc097..79a097f 100644
/*
* It's enough to flush this one mapping.
diff --git a/arch/x86/mm/setup_nx.c b/arch/x86/mm/setup_nx.c
-index 90555bf..f5f1828 100644
+index 92e2eac..92fc081 100644
--- a/arch/x86/mm/setup_nx.c
+++ b/arch/x86/mm/setup_nx.c
@@ -5,8 +5,10 @@
@@ -35293,7 +36761,7 @@ index 90555bf..f5f1828 100644
void x86_configure_nx(void)
{
+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
- if (cpu_has_nx && !disable_nx)
+ if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx)
__supported_pte_mask |= _PAGE_NX;
else
+#endif
@@ -35449,7 +36917,7 @@ index 4093216..44b6b83 100644
+ pax_force_retaddr
ret
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
-index 7599197..8e986f3 100644
+index 4286f36..54471fd 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -14,7 +14,11 @@
@@ -35474,7 +36942,7 @@ index 7599197..8e986f3 100644
}
struct jit_context {
-@@ -1030,7 +1036,9 @@ common_load:
+@@ -1060,7 +1066,9 @@ common_load:
pr_err("bpf_jit_compile fatal error\n");
return -EFAULT;
}
@@ -35484,7 +36952,7 @@ index 7599197..8e986f3 100644
}
proglen += ilen;
addrs[i] = proglen;
-@@ -1107,7 +1115,6 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
+@@ -1137,7 +1145,6 @@ void bpf_int_jit_compile(struct bpf_prog *prog)
if (image) {
bpf_flush_icache(header, image + proglen);
@@ -35492,7 +36960,7 @@ index 7599197..8e986f3 100644
prog->bpf_func = (void *)image;
prog->jited = 1;
}
-@@ -1120,12 +1127,8 @@ void bpf_jit_free(struct bpf_prog *fp)
+@@ -1150,12 +1157,8 @@ void bpf_jit_free(struct bpf_prog *fp)
unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
struct bpf_binary_header *header = (void *)addr;
@@ -35535,7 +37003,7 @@ index 4e664bd..2beeaa2 100644
return NULL;
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
-index 1d2e639..f6ef82a 100644
+index 1d2e639..d7f0e67 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -23,6 +23,7 @@
@@ -35546,6 +37014,15 @@ index 1d2e639..f6ef82a 100644
#include "op_counter.h"
#include "op_x86_model.h"
+@@ -614,7 +615,7 @@ enum __force_cpu_type {
+
+ static int force_cpu_type;
+
+-static int set_cpu_type(const char *str, struct kernel_param *kp)
++static int set_cpu_type(const char *str, const struct kernel_param *kp)
+ {
+ if (!strcmp(str, "timer")) {
+ force_cpu_type = timer;
@@ -785,8 +786,11 @@ int __init op_nmi_init(struct oprofile_operations *ops)
if (ret)
return ret;
@@ -35671,7 +37148,7 @@ index 9bd1154..e9d4656 100644
.callback = fix_broken_hp_bios_irq9,
.ident = "HP Pavilion N5400 Series Laptop",
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
-index 9b83b90..2c256c5 100644
+index 9770e55..76067ec 100644
--- a/arch/x86/pci/pcbios.c
+++ b/arch/x86/pci/pcbios.c
@@ -79,7 +79,7 @@ union bios32 {
@@ -35803,129 +37280,51 @@ index 9b83b90..2c256c5 100644
: "memory");
local_irq_restore(flags);
-@@ -189,7 +235,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
-
- switch (len) {
- case 1:
-- __asm__("lcall *(%%esi); cld\n\t"
-+ __asm__("movw %w6, %%ds\n\t"
-+ "lcall *%%ss:(%%esi); cld\n\t"
-+ "push %%ss\n\t"
-+ "pop %%ds\n\t"
- "jc 1f\n\t"
- "xor %%ah, %%ah\n"
- "1:"
-@@ -198,7 +247,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
- : "1" (PCIBIOS_READ_CONFIG_BYTE),
- "b" (bx),
- "D" ((long)reg),
-- "S" (&pci_indirect));
-+ "S" (&pci_indirect),
-+ "r" (__PCIBIOS_DS));
- /*
- * Zero-extend the result beyond 8 bits, do not trust the
- * BIOS having done it:
-@@ -206,7 +256,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
- *value &= 0xff;
- break;
- case 2:
-- __asm__("lcall *(%%esi); cld\n\t"
-+ __asm__("movw %w6, %%ds\n\t"
-+ "lcall *%%ss:(%%esi); cld\n\t"
-+ "push %%ss\n\t"
-+ "pop %%ds\n\t"
- "jc 1f\n\t"
- "xor %%ah, %%ah\n"
- "1:"
-@@ -215,7 +268,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
- : "1" (PCIBIOS_READ_CONFIG_WORD),
- "b" (bx),
- "D" ((long)reg),
-- "S" (&pci_indirect));
-+ "S" (&pci_indirect),
-+ "r" (__PCIBIOS_DS));
- /*
- * Zero-extend the result beyond 16 bits, do not trust the
- * BIOS having done it:
-@@ -223,7 +277,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
- *value &= 0xffff;
- break;
- case 4:
-- __asm__("lcall *(%%esi); cld\n\t"
-+ __asm__("movw %w6, %%ds\n\t"
-+ "lcall *%%ss:(%%esi); cld\n\t"
-+ "push %%ss\n\t"
-+ "pop %%ds\n\t"
- "jc 1f\n\t"
- "xor %%ah, %%ah\n"
- "1:"
-@@ -232,7 +289,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
- : "1" (PCIBIOS_READ_CONFIG_DWORD),
- "b" (bx),
- "D" ((long)reg),
-- "S" (&pci_indirect));
-+ "S" (&pci_indirect),
-+ "r" (__PCIBIOS_DS));
+@@ -202,7 +248,10 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
break;
}
-@@ -256,7 +314,10 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
-
- switch (len) {
- case 1:
-- __asm__("lcall *(%%esi); cld\n\t"
-+ __asm__("movw %w6, %%ds\n\t"
-+ "lcall *%%ss:(%%esi); cld\n\t"
-+ "push %%ss\n\t"
-+ "pop %%ds\n\t"
- "jc 1f\n\t"
- "xor %%ah, %%ah\n"
- "1:"
-@@ -265,10 +326,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
- "c" (value),
- "b" (bx),
- "D" ((long)reg),
-- "S" (&pci_indirect));
-+ "S" (&pci_indirect),
-+ "r" (__PCIBIOS_DS));
- break;
- case 2:
-- __asm__("lcall *(%%esi); cld\n\t"
-+ __asm__("movw %w6, %%ds\n\t"
-+ "lcall *%%ss:(%%esi); cld\n\t"
-+ "push %%ss\n\t"
-+ "pop %%ds\n\t"
- "jc 1f\n\t"
- "xor %%ah, %%ah\n"
- "1:"
-@@ -277,10 +342,14 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
- "c" (value),
- "b" (bx),
- "D" ((long)reg),
-- "S" (&pci_indirect));
-+ "S" (&pci_indirect),
-+ "r" (__PCIBIOS_DS));
- break;
- case 4:
-- __asm__("lcall *(%%esi); cld\n\t"
-+ __asm__("movw %w6, %%ds\n\t"
-+ "lcall *%%ss:(%%esi); cld\n\t"
-+ "push %%ss\n\t"
-+ "pop %%ds\n\t"
- "jc 1f\n\t"
- "xor %%ah, %%ah\n"
- "1:"
-@@ -289,7 +358,8 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
- "c" (value),
- "b" (bx),
- "D" ((long)reg),
-- "S" (&pci_indirect));
-+ "S" (&pci_indirect),
-+ "r" (__PCIBIOS_DS));
+- __asm__("lcall *(%%esi); cld\n\t"
++ __asm__("movw %w6, %%ds\n\t"
++ "lcall *%%ss:(%%esi); cld\n\t"
++ "push %%ss\n\t"
++ "pop %%ds\n\t"
+ "jc 1f\n\t"
+ "xor %%ah, %%ah\n"
+ "1:"
+@@ -211,7 +260,8 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
+ : "1" (number),
+ "b" (bx),
+ "D" ((long)reg),
+- "S" (&pci_indirect));
++ "S" (&pci_indirect),
++ "r" (__PCIBIOS_DS));
+ /*
+ * Zero-extend the result beyond 8 or 16 bits, do not trust the
+ * BIOS having done it:
+@@ -250,7 +300,10 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
break;
}
-@@ -394,10 +464,13 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
+- __asm__("lcall *(%%esi); cld\n\t"
++ __asm__("movw %w6, %%ds\n\t"
++ "lcall *%%ss:(%%esi); cld\n\t"
++ "push %%ss\n\t"
++ "pop %%ds\n\t"
+ "jc 1f\n\t"
+ "xor %%ah, %%ah\n"
+ "1:"
+@@ -259,7 +312,8 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
+ "c" (value),
+ "b" (bx),
+ "D" ((long)reg),
+- "S" (&pci_indirect));
++ "S" (&pci_indirect),
++ "r" (__PCIBIOS_DS));
+
+ raw_spin_unlock_irqrestore(&pci_config_lock, flags);
+
+@@ -362,10 +416,13 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
DBG("PCI: Fetching IRQ routing table... ");
__asm__("push %%es\n\t"
@@ -35940,7 +37339,7 @@ index 9b83b90..2c256c5 100644
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -408,7 +481,8 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
+@@ -376,7 +433,8 @@ struct irq_routing_table * pcibios_get_irq_routing_table(void)
"1" (0),
"D" ((long) &opt),
"S" (&pci_indirect),
@@ -35950,7 +37349,7 @@ index 9b83b90..2c256c5 100644
: "memory");
DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
if (ret & 0xff00)
-@@ -432,7 +506,10 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
+@@ -400,7 +458,10 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
{
int ret;
@@ -35962,7 +37361,7 @@ index 9b83b90..2c256c5 100644
"jc 1f\n\t"
"xor %%ah, %%ah\n"
"1:"
-@@ -440,7 +517,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
+@@ -408,7 +469,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
: "0" (PCIBIOS_SET_PCI_HW_INT),
"b" ((dev->bus->number << 8) | dev->devfn),
"c" ((irq << 8) | (pin + 10)),
@@ -35972,6 +37371,35 @@ index 9b83b90..2c256c5 100644
return !(ret & 0xff00);
}
EXPORT_SYMBOL(pcibios_set_irq_routing);
+diff --git a/arch/x86/pci/vmd.c b/arch/x86/pci/vmd.c
+index d57e480..20eb97a 100644
+--- a/arch/x86/pci/vmd.c
++++ b/arch/x86/pci/vmd.c
+@@ -374,7 +374,7 @@ static void vmd_teardown_dma_ops(struct vmd_dev *vmd)
+ #define ASSIGN_VMD_DMA_OPS(source, dest, fn) \
+ do { \
+ if (source->fn) \
+- dest->fn = vmd_##fn; \
++ *(void **)&dest->fn = vmd_##fn; \
+ } while (0)
+
+ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
+@@ -388,6 +388,7 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
+
+ if (!source)
+ return;
++ pax_open_kernel();
+ ASSIGN_VMD_DMA_OPS(source, dest, alloc);
+ ASSIGN_VMD_DMA_OPS(source, dest, free);
+ ASSIGN_VMD_DMA_OPS(source, dest, mmap);
+@@ -405,6 +406,7 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
+ #ifdef ARCH_HAS_DMA_GET_REQUIRED_MASK
+ ASSIGN_VMD_DMA_OPS(source, dest, get_required_mask);
+ #endif
++ pax_close_kernel();
+ add_dma_domain(domain);
+ }
+ #undef ASSIGN_VMD_DMA_OPS
diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index ed5b673..24d2d53 100644
--- a/arch/x86/platform/efi/efi_32.c
@@ -36221,7 +37649,7 @@ index 86d0f9e..6d499f4 100644
ENDPROC(efi_call)
diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c
-index 1bbc21e..8a50853 100644
+index 90bb997..3cca066 100644
--- a/arch/x86/platform/intel-mid/intel-mid.c
+++ b/arch/x86/platform/intel-mid/intel-mid.c
@@ -63,7 +63,7 @@ enum intel_mid_timer_options intel_mid_timer_options;
@@ -36318,10 +37746,10 @@ index d6ee929..3637cb5 100644
.getproplen = olpc_dt_getproplen,
.getproperty = olpc_dt_getproperty,
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
-index 9ab5279..8ba4611 100644
+index d5f6499..12939f1 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
-@@ -134,11 +134,8 @@ static void do_fpu_end(void)
+@@ -159,11 +159,8 @@ static void do_fpu_end(void)
static void fix_processor_context(void)
{
int cpu = smp_processor_id();
@@ -36335,7 +37763,7 @@ index 9ab5279..8ba4611 100644
set_tss_desc(cpu, t); /*
* This just modifies memory; should not be
* necessary. But... This is necessary, because
-@@ -147,10 +144,6 @@ static void fix_processor_context(void)
+@@ -172,10 +169,6 @@ static void fix_processor_context(void)
*/
#ifdef CONFIG_X86_64
@@ -36375,10 +37803,10 @@ index 0b7a63d..dff2199 100644
#endif
}
diff --git a/arch/x86/realmode/rm/Makefile b/arch/x86/realmode/rm/Makefile
-index 2730d77..2e4cd19 100644
+index 3e75fcf..4cfefb8 100644
--- a/arch/x86/realmode/rm/Makefile
+++ b/arch/x86/realmode/rm/Makefile
-@@ -68,5 +68,8 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
+@@ -68,6 +68,9 @@ $(obj)/realmode.relocs: $(obj)/realmode.elf FORCE
KBUILD_CFLAGS := $(LINUXINCLUDE) $(REALMODE_CFLAGS) -D_SETUP -D_WAKEUP \
-I$(srctree)/arch/x86/boot
@@ -36387,6 +37815,7 @@ index 2730d77..2e4cd19 100644
+endif
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
+ UBSAN_SANITIZE := n
diff --git a/arch/x86/realmode/rm/header.S b/arch/x86/realmode/rm/header.S
index a28221d..93c40f1 100644
--- a/arch/x86/realmode/rm/header.S
@@ -36514,7 +37943,7 @@ index 604a37e..e49702a 100644
relocs-objs := relocs_32.o relocs_64.o relocs_common.o
PHONY += relocs
diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
-index 0c2fae8..88d7719 100644
+index 0c2fae8..1d2a079 100644
--- a/arch/x86/tools/relocs.c
+++ b/arch/x86/tools/relocs.c
@@ -1,5 +1,7 @@
@@ -36533,7 +37962,15 @@ index 0c2fae8..88d7719 100644
struct relocs {
uint32_t *offset;
-@@ -386,9 +389,39 @@ static void read_ehdr(FILE *fp)
+@@ -45,6 +48,7 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = {
+ "^(xen_irq_disable_direct_reloc$|"
+ "xen_save_fl_direct_reloc$|"
+ "VDSO|"
++ "__rap_hash_|"
+ "__crc_)",
+
+ /*
+@@ -386,9 +390,39 @@ static void read_ehdr(FILE *fp)
}
}
@@ -36574,7 +38011,7 @@ index 0c2fae8..88d7719 100644
Elf_Shdr shdr;
secs = calloc(ehdr.e_shnum, sizeof(struct section));
-@@ -423,7 +456,7 @@ static void read_shdrs(FILE *fp)
+@@ -423,7 +457,7 @@ static void read_shdrs(FILE *fp)
static void read_strtabs(FILE *fp)
{
@@ -36583,7 +38020,7 @@ index 0c2fae8..88d7719 100644
for (i = 0; i < ehdr.e_shnum; i++) {
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_STRTAB) {
-@@ -448,7 +481,7 @@ static void read_strtabs(FILE *fp)
+@@ -448,7 +482,7 @@ static void read_strtabs(FILE *fp)
static void read_symtabs(FILE *fp)
{
@@ -36592,7 +38029,7 @@ index 0c2fae8..88d7719 100644
for (i = 0; i < ehdr.e_shnum; i++) {
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_SYMTAB) {
-@@ -479,9 +512,11 @@ static void read_symtabs(FILE *fp)
+@@ -479,9 +513,11 @@ static void read_symtabs(FILE *fp)
}
@@ -36606,7 +38043,7 @@ index 0c2fae8..88d7719 100644
for (i = 0; i < ehdr.e_shnum; i++) {
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_REL_TYPE) {
-@@ -501,9 +536,22 @@ static void read_relocs(FILE *fp)
+@@ -501,9 +537,22 @@ static void read_relocs(FILE *fp)
die("Cannot read symbol table: %s\n",
strerror(errno));
}
@@ -36630,7 +38067,7 @@ index 0c2fae8..88d7719 100644
rel->r_info = elf_xword_to_cpu(rel->r_info);
#if (SHT_REL_TYPE == SHT_RELA)
rel->r_addend = elf_xword_to_cpu(rel->r_addend);
-@@ -515,7 +563,7 @@ static void read_relocs(FILE *fp)
+@@ -515,7 +564,7 @@ static void read_relocs(FILE *fp)
static void print_absolute_symbols(void)
{
@@ -36639,7 +38076,7 @@ index 0c2fae8..88d7719 100644
const char *format;
if (ELF_BITS == 64)
-@@ -528,7 +576,7 @@ static void print_absolute_symbols(void)
+@@ -528,7 +577,7 @@ static void print_absolute_symbols(void)
for (i = 0; i < ehdr.e_shnum; i++) {
struct section *sec = &secs[i];
char *sym_strtab;
@@ -36648,7 +38085,7 @@ index 0c2fae8..88d7719 100644
if (sec->shdr.sh_type != SHT_SYMTAB) {
continue;
-@@ -555,7 +603,7 @@ static void print_absolute_symbols(void)
+@@ -555,7 +604,7 @@ static void print_absolute_symbols(void)
static void print_absolute_relocs(void)
{
@@ -36657,7 +38094,7 @@ index 0c2fae8..88d7719 100644
const char *format;
if (ELF_BITS == 64)
-@@ -568,7 +616,7 @@ static void print_absolute_relocs(void)
+@@ -568,7 +617,7 @@ static void print_absolute_relocs(void)
struct section *sec_applies, *sec_symtab;
char *sym_strtab;
Elf_Sym *sh_symtab;
@@ -36666,7 +38103,7 @@ index 0c2fae8..88d7719 100644
if (sec->shdr.sh_type != SHT_REL_TYPE) {
continue;
}
-@@ -645,13 +693,13 @@ static void add_reloc(struct relocs *r, uint32_t offset)
+@@ -645,13 +694,13 @@ static void add_reloc(struct relocs *r, uint32_t offset)
static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
Elf_Sym *sym, const char *symname))
{
@@ -36682,7 +38119,7 @@ index 0c2fae8..88d7719 100644
struct section *sec = &secs[i];
if (sec->shdr.sh_type != SHT_REL_TYPE) {
-@@ -697,7 +745,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
+@@ -697,7 +746,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
* kernel data and does not require special treatment.
*
*/
@@ -36691,7 +38128,7 @@ index 0c2fae8..88d7719 100644
static Elf_Addr per_cpu_load_addr;
static void percpu_init(void)
-@@ -830,6 +878,23 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
+@@ -830,6 +879,23 @@ static int do_reloc32(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
{
unsigned r_type = ELF32_R_TYPE(rel->r_info);
int shn_abs = (sym->st_shndx == SHN_ABS) && !is_reloc(S_REL, symname);
@@ -36715,7 +38152,7 @@ index 0c2fae8..88d7719 100644
switch (r_type) {
case R_386_NONE:
-@@ -968,7 +1033,7 @@ static int write32_as_text(uint32_t v, FILE *f)
+@@ -968,7 +1034,7 @@ static int write32_as_text(uint32_t v, FILE *f)
static void emit_relocs(int as_text, int use_real_mode)
{
@@ -36724,7 +38161,7 @@ index 0c2fae8..88d7719 100644
int (*write_reloc)(uint32_t, FILE *) = write32;
int (*do_reloc)(struct section *sec, Elf_Rel *rel, Elf_Sym *sym,
const char *symname);
-@@ -1078,10 +1143,11 @@ void process(FILE *fp, int use_real_mode, int as_text,
+@@ -1078,10 +1144,11 @@ void process(FILE *fp, int use_real_mode, int as_text,
{
regex_init(use_real_mode);
read_ehdr(fp);
@@ -36776,7 +38213,7 @@ index c7b15f3..cc09a65 100644
This is the Linux Xen port. Enabling this will allow the
kernel to boot in a paravirtualized environment under the
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
-index beab8c7..9a29803 100644
+index e3679db..16b93d1 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -131,8 +131,6 @@ EXPORT_SYMBOL_GPL(xen_start_info);
@@ -36817,8 +38254,17 @@ index beab8c7..9a29803 100644
BUG_ON(va & ~PAGE_MASK);
for (f = 0; va < dtr->address + size; va += PAGE_SIZE, f++) {
-@@ -1271,7 +1267,7 @@ static const struct pv_apic_ops xen_apic_ops __initconst = {
- #endif
+@@ -777,7 +773,7 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
+ * so we should never see them. Warn if
+ * there's an unexpected IST-using fault handler.
+ */
+- if (addr == (unsigned long)debug)
++ if (addr == (unsigned long)int1)
+ addr = (unsigned long)xen_debug;
+ else if (addr == (unsigned long)int3)
+ addr = (unsigned long)xen_int3;
+@@ -1262,7 +1258,7 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = {
+ .end_context_switch = xen_end_context_switch,
};
-static void xen_reboot(int reason)
@@ -36826,7 +38272,7 @@ index beab8c7..9a29803 100644
{
struct sched_shutdown r = { .reason = reason };
int cpu;
-@@ -1279,26 +1275,26 @@ static void xen_reboot(int reason)
+@@ -1270,26 +1266,26 @@ static void xen_reboot(int reason)
for_each_online_cpu(cpu)
xen_pmu_finish(cpu);
@@ -36859,7 +38305,7 @@ index beab8c7..9a29803 100644
{
if (pm_power_off)
pm_power_off();
-@@ -1451,8 +1447,11 @@ static void __ref xen_setup_gdt(int cpu)
+@@ -1442,8 +1438,11 @@ static void __ref xen_setup_gdt(int cpu)
pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry_boot;
pv_cpu_ops.load_gdt = xen_load_gdt_boot;
@@ -36873,7 +38319,7 @@ index beab8c7..9a29803 100644
pv_cpu_ops.write_gdt_entry = xen_write_gdt_entry;
pv_cpu_ops.load_gdt = xen_load_gdt;
-@@ -1570,7 +1569,17 @@ asmlinkage __visible void __init xen_start_kernel(void)
+@@ -1560,7 +1559,17 @@ asmlinkage __visible void __init xen_start_kernel(void)
__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
/* Work out if we support NX */
@@ -36892,7 +38338,7 @@ index beab8c7..9a29803 100644
/* Get mfn list */
xen_build_dynamic_phys_to_machine();
-@@ -1598,13 +1607,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
+@@ -1588,13 +1597,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
machine_ops = xen_machine_ops;
@@ -36907,7 +38353,7 @@ index beab8c7..9a29803 100644
#ifdef CONFIG_ACPI_NUMA
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
-index cb5e266..cd5bcab 100644
+index c913ca4..b6d8c05 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1950,7 +1950,11 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
@@ -36954,7 +38400,7 @@ index cb5e266..cd5bcab 100644
#endif
/* This will work as long as patching hasn't happened yet
-@@ -2473,6 +2489,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
+@@ -2472,6 +2488,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initconst = {
.pud_val = PV_CALLEE_SAVE(xen_pud_val),
.make_pud = PV_CALLEE_SAVE(xen_make_pud),
.set_pgd = xen_set_pgd_hyper,
@@ -37016,10 +38462,10 @@ index 3f4ebf0..f074dc1 100644
}
diff --git a/arch/x86/xen/xen-asm_32.S b/arch/x86/xen/xen-asm_32.S
-index fd92a64..1f72641 100644
+index feb6d40..e59382c 100644
--- a/arch/x86/xen/xen-asm_32.S
+++ b/arch/x86/xen/xen-asm_32.S
-@@ -99,7 +99,7 @@ ENTRY(xen_iret)
+@@ -85,7 +85,7 @@ ENTRY(xen_iret)
pushw %fs
movl $(__KERNEL_PERCPU), %eax
movl %eax, %fs
@@ -37051,7 +38497,7 @@ index b65f59a..c43f9c6 100644
mov %rsi,xen_start_info
mov $init_thread_union+THREAD_SIZE,%rsp
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
-index 1399423..b1ae0fa 100644
+index 4140b07..a391b69 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -16,8 +16,6 @@ void xen_syscall_target(void);
@@ -37102,7 +38548,7 @@ index 2f33760..835e50a 100644
#define XCHAL_ICACHE_SIZE 8192 /* I-cache size in bytes or 0 */
#define XCHAL_DCACHE_SIZE 8192 /* D-cache size in bytes or 0 */
diff --git a/block/bio.c b/block/bio.c
-index d4d1443..bb167da 100644
+index cf75915..02d854f 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1143,7 +1143,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
@@ -37124,7 +38570,7 @@ index d4d1443..bb167da 100644
nr_pages += end - start;
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
-index 5a37188..0361054 100644
+index 66e6f1a..8fb30f4 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -561,10 +561,10 @@ u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd,
@@ -37159,7 +38605,7 @@ index 5a37188..0361054 100644
percpu_counter_sum_positive(&rwstat->cpu_cnt[i]),
&sum.aux_cnt[i]);
}
-@@ -877,13 +877,13 @@ static int blkcg_print_stat(struct seq_file *sf, void *v)
+@@ -886,13 +886,13 @@ static int blkcg_print_stat(struct seq_file *sf, void *v)
rwstat = blkg_rwstat_recursive_sum(blkg, NULL,
offsetof(struct blkcg_gq, stat_bytes));
@@ -37177,24 +38623,11 @@ index 5a37188..0361054 100644
spin_unlock_irq(blkg->q->queue_lock);
-diff --git a/block/blk-iopoll.c b/block/blk-iopoll.c
-index 0736729..2ec3b48 100644
---- a/block/blk-iopoll.c
-+++ b/block/blk-iopoll.c
-@@ -74,7 +74,7 @@ void blk_iopoll_complete(struct blk_iopoll *iop)
- }
- EXPORT_SYMBOL(blk_iopoll_complete);
-
--static void blk_iopoll_softirq(struct softirq_action *h)
-+static __latent_entropy void blk_iopoll_softirq(void)
- {
- struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll);
- int rearm = 0, budget = blk_iopoll_budget;
diff --git a/block/blk-map.c b/block/blk-map.c
-index f565e11..f05b424 100644
+index a54f054..760b494 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
-@@ -214,7 +214,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
+@@ -245,7 +245,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
if (!len || !kbuf)
return -EINVAL;
@@ -37285,10 +38718,10 @@ index f678c73..f35aa18 100644
err = -EFAULT;
goto out;
diff --git a/block/genhd.c b/block/genhd.c
-index e5cafa51..65e4557 100644
+index 9f42526..fcc8648 100644
--- a/block/genhd.c
+++ b/block/genhd.c
-@@ -470,21 +470,24 @@ static char *bdevt_str(dev_t devt, char *buf)
+@@ -471,21 +471,24 @@ static char *bdevt_str(dev_t devt, char *buf)
/*
* Register device numbers dev..(dev+range-1)
@@ -37405,8 +38838,34 @@ index 0774799..7afc734 100644
if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len))
goto error;
+diff --git a/crypto/cast6_generic.c b/crypto/cast6_generic.c
+index 058c8d7..55229dd 100644
+--- a/crypto/cast6_generic.c
++++ b/crypto/cast6_generic.c
+@@ -181,8 +181,9 @@ static inline void QBAR(u32 *block, u8 *Kr, u32 *Km)
+ block[2] ^= F1(block[3], Kr[0], Km[0]);
+ }
+
+-void __cast6_encrypt(struct cast6_ctx *c, u8 *outbuf, const u8 *inbuf)
++void __cast6_encrypt(void *_c, u8 *outbuf, const u8 *inbuf)
+ {
++ struct cast6_ctx *c = _c;
+ const __be32 *src = (const __be32 *)inbuf;
+ __be32 *dst = (__be32 *)outbuf;
+ u32 block[4];
+@@ -219,8 +220,9 @@ static void cast6_encrypt(struct crypto_tfm *tfm, u8 *outbuf, const u8 *inbuf)
+ __cast6_encrypt(crypto_tfm_ctx(tfm), outbuf, inbuf);
+ }
+
+-void __cast6_decrypt(struct cast6_ctx *c, u8 *outbuf, const u8 *inbuf)
++void __cast6_decrypt(void *_c, u8 *outbuf, const u8 *inbuf)
+ {
++ struct cast6_ctx *c = _c;
+ const __be32 *src = (const __be32 *)inbuf;
+ __be32 *dst = (__be32 *)outbuf;
+ u32 block[4];
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
-index c81861b..dbf894f 100644
+index 7921251..ba86330 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -63,7 +63,7 @@ struct cryptd_blkcipher_ctx {
@@ -37453,6 +38912,75 @@ index ee9cfb9..30b36ed 100644
if (!ret)
kobject_uevent(&pinst->kobj, KOBJ_ADD);
+diff --git a/crypto/salsa20_generic.c b/crypto/salsa20_generic.c
+index f550b5d..8488beb 100644
+--- a/crypto/salsa20_generic.c
++++ b/crypto/salsa20_generic.c
+@@ -104,7 +104,7 @@ static void salsa20_wordtobyte(u8 output[64], const u32 input[16])
+ static const char sigma[16] = "expand 32-byte k";
+ static const char tau[16] = "expand 16-byte k";
+
+-static void salsa20_keysetup(struct salsa20_ctx *ctx, const u8 *k, u32 kbytes)
++static void __salsa20_keysetup(struct salsa20_ctx *ctx, const u8 *k, u32 kbytes)
+ {
+ const char *constants;
+
+@@ -128,7 +128,7 @@ static void salsa20_keysetup(struct salsa20_ctx *ctx, const u8 *k, u32 kbytes)
+ ctx->input[15] = U8TO32_LITTLE(constants + 12);
+ }
+
+-static void salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv)
++static void __salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv)
+ {
+ ctx->input[6] = U8TO32_LITTLE(iv + 0);
+ ctx->input[7] = U8TO32_LITTLE(iv + 4);
+@@ -136,7 +136,7 @@ static void salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv)
+ ctx->input[9] = 0;
+ }
+
+-static void salsa20_encrypt_bytes(struct salsa20_ctx *ctx, u8 *dst,
++static void __salsa20_encrypt_bytes(struct salsa20_ctx *ctx, u8 *dst,
+ const u8 *src, unsigned int bytes)
+ {
+ u8 buf[64];
+@@ -170,7 +170,7 @@ static int setkey(struct crypto_tfm *tfm, const u8 *key,
+ unsigned int keysize)
+ {
+ struct salsa20_ctx *ctx = crypto_tfm_ctx(tfm);
+- salsa20_keysetup(ctx, key, keysize);
++ __salsa20_keysetup(ctx, key, keysize);
+ return 0;
+ }
+
+@@ -186,24 +186,24 @@ static int encrypt(struct blkcipher_desc *desc,
+ blkcipher_walk_init(&walk, dst, src, nbytes);
+ err = blkcipher_walk_virt_block(desc, &walk, 64);
+
+- salsa20_ivsetup(ctx, walk.iv);
++ __salsa20_ivsetup(ctx, walk.iv);
+
+ if (likely(walk.nbytes == nbytes))
+ {
+- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
++ __salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes);
+ return blkcipher_walk_done(desc, &walk, 0);
+ }
+
+ while (walk.nbytes >= 64) {
+- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
++ __salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
+ walk.src.virt.addr,
+ walk.nbytes - (walk.nbytes % 64));
+ err = blkcipher_walk_done(desc, &walk, walk.nbytes % 64);
+ }
+
+ if (walk.nbytes) {
+- salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
++ __salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
+ walk.src.virt.addr, walk.nbytes);
+ err = blkcipher_walk_done(desc, &walk, 0);
+ }
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index ea5815c..5880da6 100644
--- a/crypto/scatterwalk.c
@@ -37480,6 +39008,32 @@ index ea5815c..5880da6 100644
return;
scatterwalk_start(&walk, sg);
+diff --git a/crypto/serpent_generic.c b/crypto/serpent_generic.c
+index 94970a7..f0c8d26 100644
+--- a/crypto/serpent_generic.c
++++ b/crypto/serpent_generic.c
+@@ -442,8 +442,9 @@ int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
+ }
+ EXPORT_SYMBOL_GPL(serpent_setkey);
+
+-void __serpent_encrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src)
++void __serpent_encrypt(void *_ctx, u8 *dst, const u8 *src)
+ {
++ struct serpent_ctx *ctx = _ctx;
+ const u32 *k = ctx->expkey;
+ const __le32 *s = (const __le32 *)src;
+ __le32 *d = (__le32 *)dst;
+@@ -507,8 +508,9 @@ static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
+ __serpent_encrypt(ctx, dst, src);
+ }
+
+-void __serpent_decrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src)
++void __serpent_decrypt(void *_ctx, u8 *dst, const u8 *src)
+ {
++ struct serpent_ctx *ctx = _ctx;
+ const u32 *k = ctx->expkey;
+ const __le32 *s = (const __le32 *)src;
+ __le32 *d = (__le32 *)dst;
diff --git a/crypto/zlib.c b/crypto/zlib.c
index d51a30a..b6891a3 100644
--- a/crypto/zlib.c
@@ -37525,11 +39079,24 @@ index d51a30a..b6891a3 100644
: DEF_WBITS;
stream->workspace = vzalloc(zlib_inflate_workspacesize());
+diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
+index f71b756..b96847c 100644
+--- a/drivers/acpi/ac.c
++++ b/drivers/acpi/ac.c
+@@ -70,7 +70,7 @@ static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
+
+ #ifdef CONFIG_ACPI_PROCFS_POWER
+ extern struct proc_dir_entry *acpi_lock_ac_dir(void);
+-extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
++extern void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
+ static int acpi_ac_open_fs(struct inode *inode, struct file *file);
+ #endif
+
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
-index 5fdac39..ce3c90e 100644
+index a76f8be..28cef93 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
-@@ -412,7 +412,7 @@ static int video_enable_only_lcd(const struct dmi_system_id *d)
+@@ -426,7 +426,7 @@ static int video_set_report_key_events(const struct dmi_system_id *id)
return 0;
}
@@ -37539,7 +39106,7 @@ index 5fdac39..ce3c90e 100644
* Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
*/
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
-index d62a616..387dbd0 100644
+index f76e0ea..4b83315 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -70,11 +70,12 @@ static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
@@ -37622,6 +39189,19 @@ index 3dd9c46..cf0678f 100644
period = duration;
do_div(period, (count + 1));
if (period > max_period) {
+diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
+index b719ab3..371e2a6 100644
+--- a/drivers/acpi/battery.c
++++ b/drivers/acpi/battery.c
+@@ -75,7 +75,7 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
+
+ #ifdef CONFIG_ACPI_PROCFS_POWER
+ extern struct proc_dir_entry *acpi_lock_battery_dir(void);
+-extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
++extern void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
+
+ enum acpi_battery_files {
+ info_tag = 0,
diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c
index a83e3c6..c3d617f 100644
--- a/drivers/acpi/bgrt.c
@@ -37662,7 +39242,7 @@ index 96809cd..6a49f979 100644
.callback = dmi_disable_osi_vista,
.ident = "Fujitsu Siemens",
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
-index a212cef..443c9c4 100644
+index 891c42d..ac31987 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -63,7 +63,7 @@ static int set_copy_dsdt(const struct dmi_system_id *id)
@@ -37699,10 +39279,10 @@ index c68e724..e863008 100644
/* parse the table header to get the table length */
if (count <= sizeof(struct acpi_table_header))
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
-index 08a02cd..1fa9787 100644
+index cd2c3d6..2031a4a 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
-@@ -1024,6 +1024,8 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
+@@ -1025,6 +1025,8 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
#endif /* CONFIG_PM_SLEEP */
@@ -37711,7 +39291,7 @@ index 08a02cd..1fa9787 100644
static struct dev_pm_domain acpi_general_pm_domain = {
.ops = {
.runtime_suspend = acpi_subsys_runtime_suspend,
-@@ -1040,6 +1042,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
+@@ -1041,6 +1043,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
.restore_early = acpi_subsys_resume_early,
#endif
},
@@ -37719,7 +39299,7 @@ index 08a02cd..1fa9787 100644
};
/**
-@@ -1117,7 +1120,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
+@@ -1118,7 +1121,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
acpi_device_wakeup(adev, ACPI_STATE_S0, false);
}
@@ -37728,7 +39308,7 @@ index 08a02cd..1fa9787 100644
}
EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
-index b420fb4..e8d7e29 100644
+index b420fb4..b66c430 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1503,7 +1503,7 @@ static int ec_clear_on_resume(const struct dmi_system_id *id)
@@ -37740,6 +39320,24 @@ index b420fb4..e8d7e29 100644
{
ec_skip_dsdt_scan, "Compal JFL92", {
DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"),
+@@ -1610,7 +1610,7 @@ error:
+ return -ENODEV;
+ }
+
+-static int param_set_event_clearing(const char *val, struct kernel_param *kp)
++static int param_set_event_clearing(const char *val, const struct kernel_param *kp)
+ {
+ int result = 0;
+
+@@ -1628,7 +1628,7 @@ static int param_set_event_clearing(const char *val, struct kernel_param *kp)
+ return result;
+ }
+
+-static int param_get_event_clearing(char *buffer, struct kernel_param *kp)
++static int param_get_event_clearing(char *buffer, const struct kernel_param *kp)
+ {
+ switch (ec_event_clearing) {
+ case ACPI_EC_EVT_TIMING_STATUS:
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index 7188e53..6012bc4 100644
--- a/drivers/acpi/pci_slot.c
@@ -37780,7 +39378,7 @@ index 7cfbda4..74f738c 100644
set_no_mwait, "Extensa 5220", {
DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
-index e3322ad..4a03c27 100644
+index f054cad..e3c1453 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -148,7 +148,7 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
@@ -37793,9 +39391,36 @@ index e3322ad..4a03c27 100644
.callback = init_old_suspend_ordering,
.ident = "Abit KN9 (nForce4 variant)",
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
-index 0243d37..774aa56 100644
+index 0243d37..dcf52db 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
+@@ -227,7 +227,7 @@ module_param_cb(trace_method_name, &param_ops_trace_method, &trace_method_name,
+ module_param_cb(trace_debug_layer, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_layer, 0644);
+ module_param_cb(trace_debug_level, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_level, 0644);
+
+-static int param_set_trace_state(const char *val, struct kernel_param *kp)
++static int param_set_trace_state(const char *val, const struct kernel_param *kp)
+ {
+ acpi_status status;
+ const char *method = trace_method_name;
+@@ -263,7 +263,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
+ return 0;
+ }
+
+-static int param_get_trace_state(char *buffer, struct kernel_param *kp)
++static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
+ {
+ if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
+ return sprintf(buffer, "disable");
+@@ -292,7 +292,7 @@ MODULE_PARM_DESC(aml_debug_output,
+ "To enable/disable the ACPI Debug Object output.");
+
+ /* /sys/module/acpi/parameters/acpica_version */
+-static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
++static int param_get_acpica_version(char *buffer, const struct kernel_param *kp)
+ {
+ int result;
+
@@ -486,11 +486,11 @@ static u32 num_counters;
static struct attribute **all_attrs;
static u32 acpi_gpe_count;
@@ -37810,6 +39435,22 @@ index 0243d37..774aa56 100644
static void delete_gpe_attr_array(void)
{
+@@ -777,13 +777,13 @@ static void __exit interrupt_stats_exit(void)
+ }
+
+ static ssize_t
+-acpi_show_profile(struct device *dev, struct device_attribute *attr,
++acpi_show_profile(struct kobject *kobj, struct kobj_attribute *attr,
+ char *buf)
+ {
+ return sprintf(buf, "%d\n", acpi_gbl_FADT.preferred_profile);
+ }
+
+-static const struct device_attribute pm_profile_attr =
++static const struct kobj_attribute pm_profile_attr =
+ __ATTR(pm_profile, S_IRUGO, acpi_show_profile, NULL);
+
+ static ssize_t hotplug_enabled_show(struct kobject *kobj,
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 82707f9..a6b19f5 100644
--- a/drivers/acpi/thermal.c
@@ -37824,7 +39465,7 @@ index 82707f9..a6b19f5 100644
* Award BIOS on this AOpen makes thermal control almost worthless.
* http://bugzilla.kernel.org/show_bug.cgi?id=8842
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
-index 80e55cb..f660caf 100644
+index 1316ddd..0f10a1d 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -41,7 +41,6 @@ ACPI_MODULE_NAME("video");
@@ -37835,7 +39476,7 @@ index 80e55cb..f660caf 100644
static struct work_struct backlight_notify_work;
static enum acpi_backlight_type acpi_backlight_cmdline = acpi_backlight_undef;
-@@ -294,6 +293,10 @@ static int acpi_video_backlight_notify(struct notifier_block *nb,
+@@ -311,6 +310,10 @@ static int acpi_video_backlight_notify(struct notifier_block *nb,
return NOTIFY_OK;
}
@@ -37846,7 +39487,7 @@ index 80e55cb..f660caf 100644
/*
* Determine which type of backlight interface to use on this system,
* First check cmdline, then dmi quirks, then do autodetect.
-@@ -324,8 +327,6 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
+@@ -341,8 +344,6 @@ enum acpi_backlight_type acpi_video_get_backlight_type(void)
&video_caps, NULL);
INIT_WORK(&backlight_notify_work,
acpi_video_backlight_notify_work);
@@ -37855,11 +39496,24 @@ index 80e55cb..f660caf 100644
if (backlight_register_notifier(&backlight_nb) == 0)
backlight_notifier_registered = true;
init_done = true;
+diff --git a/drivers/android/binder.c b/drivers/android/binder.c
+index 7d00b7a..d5fd80d 100644
+--- a/drivers/android/binder.c
++++ b/drivers/android/binder.c
+@@ -120,7 +120,7 @@ static DECLARE_WAIT_QUEUE_HEAD(binder_user_error_wait);
+ static int binder_stop_on_user_error;
+
+ static int binder_set_stop_on_user_error(const char *val,
+- struct kernel_param *kp)
++ const struct kernel_param *kp)
+ {
+ int ret;
+
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
-index b79cb10..7daa9f7 100644
+index 55e257c..28b9a25 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
-@@ -102,7 +102,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
+@@ -103,7 +103,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
static void ata_dev_xfermask(struct ata_device *dev);
static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
@@ -37868,7 +39522,7 @@ index b79cb10..7daa9f7 100644
struct ata_force_param {
const char *name;
-@@ -4801,7 +4801,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
+@@ -4804,7 +4804,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
struct ata_port *ap;
unsigned int tag;
@@ -37877,7 +39531,7 @@ index b79cb10..7daa9f7 100644
ap = qc->ap;
qc->flags = 0;
-@@ -4818,7 +4818,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
+@@ -4821,7 +4821,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
struct ata_port *ap;
struct ata_link *link;
@@ -37886,7 +39540,7 @@ index b79cb10..7daa9f7 100644
WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
ap = qc->ap;
link = qc->dev->link;
-@@ -5925,6 +5925,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
+@@ -5928,6 +5928,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
return;
spin_lock(&lock);
@@ -37894,7 +39548,7 @@ index b79cb10..7daa9f7 100644
for (cur = ops->inherits; cur; cur = cur->inherits) {
void **inherit = (void **)cur;
-@@ -5938,8 +5939,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
+@@ -5941,8 +5942,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
if (IS_ERR(*pp))
*pp = NULL;
@@ -37905,7 +39559,7 @@ index b79cb10..7daa9f7 100644
spin_unlock(&lock);
}
-@@ -6135,7 +6137,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
+@@ -6138,7 +6140,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
/* give ports names and add SCSI hosts */
for (i = 0; i < host->n_ports; i++) {
@@ -38834,10 +40488,10 @@ index ddc4ceb..36e29aa 100644
}
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
-index 3d7fb65..0f26393 100644
+index 6ac2b2b..6373ebd 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
-@@ -843,7 +843,7 @@ static void solos_bh(unsigned long card_arg)
+@@ -849,7 +849,7 @@ static void solos_bh(unsigned long card_arg)
}
atm_charge(vcc, skb->truesize);
vcc->push(vcc, skb);
@@ -38846,7 +40500,7 @@ index 3d7fb65..0f26393 100644
break;
case PKT_STATUS:
-@@ -1124,7 +1124,7 @@ static uint32_t fpga_tx(struct solos_card *card)
+@@ -1130,7 +1130,7 @@ static uint32_t fpga_tx(struct solos_card *card)
vcc = SKB_CB(oldskb)->vcc;
if (vcc) {
@@ -38987,7 +40641,7 @@ index 8fc654f..36e28e9 100644
LIST_HEAD(todo);
int cnt;
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
-index 68f0314..ca2a609 100644
+index 44a74cf..a5dd826 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -354,7 +354,7 @@ int devtmpfs_mount(const char *mntdir)
@@ -39028,7 +40682,7 @@ index 560751b..3a4847a 100644
static ssize_t show_node_state(struct device *dev,
struct device_attribute *attr, char *buf)
diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c
-index 5df4575..986184b 100644
+index 279e539..b87ed03 100644
--- a/drivers/base/platform-msi.c
+++ b/drivers/base/platform-msi.c
@@ -24,6 +24,8 @@
@@ -39037,10 +40691,10 @@ index 5df4575..986184b 100644
+#include <asm/pgtable.h>
+
- #define DEV_ID_SHIFT 24
+ #define DEV_ID_SHIFT 21
+ #define MAX_DEV_MSIS (1 << (32 - DEV_ID_SHIFT))
- /*
-@@ -77,10 +79,12 @@ static void platform_msi_update_dom_ops(struct msi_domain_info *info)
+@@ -81,10 +83,12 @@ static void platform_msi_update_dom_ops(struct msi_domain_info *info)
BUG_ON(!ops);
@@ -39055,7 +40709,7 @@ index 5df4575..986184b 100644
}
static void platform_msi_write_msg(struct irq_data *data, struct msi_msg *msg)
-@@ -98,16 +102,18 @@ static void platform_msi_update_chip_ops(struct msi_domain_info *info)
+@@ -102,16 +106,18 @@ static void platform_msi_update_chip_ops(struct msi_domain_info *info)
struct irq_chip *chip = info->chip;
BUG_ON(!chip);
@@ -39078,12 +40732,12 @@ index 5df4575..986184b 100644
+ pax_close_kernel();
}
- static void platform_msi_free_descs(struct device *dev)
+ static void platform_msi_free_descs(struct device *dev, int base, int nvec)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
-index 65f50ec..acab2a1 100644
+index 301b785..82070c6 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
-@@ -1810,8 +1810,11 @@ int genpd_dev_pm_attach(struct device *dev)
+@@ -1804,8 +1804,10 @@ int genpd_dev_pm_attach(struct device *dev)
goto out;
}
@@ -39093,15 +40747,76 @@ index 65f50ec..acab2a1 100644
+ *(void **)&dev->pm_domain->detach = genpd_dev_pm_detach;
+ *(void **)&dev->pm_domain->sync = genpd_dev_pm_sync;
+ pax_close_kernel();
-+
- ret = genpd_poweron(pd);
- out:
+ mutex_lock(&pd->lock);
+ ret = genpd_poweron(pd, 0);
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
-index e1a10a0..a6bc363 100644
+index 4c70550..223bba1 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
-@@ -263,8 +263,8 @@ static int rpm_check_suspend_allowed(struct device *dev)
+@@ -16,35 +16,32 @@
+
+ typedef int (*pm_callback_t)(struct device *);
+
+-static pm_callback_t __rpm_get_callback(struct device *dev, size_t cb_offset)
+-{
+- pm_callback_t cb;
+- const struct dev_pm_ops *ops;
+-
+- if (dev->pm_domain)
+- ops = &dev->pm_domain->ops;
+- else if (dev->type && dev->type->pm)
+- ops = dev->type->pm;
+- else if (dev->class && dev->class->pm)
+- ops = dev->class->pm;
+- else if (dev->bus && dev->bus->pm)
+- ops = dev->bus->pm;
+- else
+- ops = NULL;
+-
+- if (ops)
+- cb = *(pm_callback_t *)((void *)ops + cb_offset);
+- else
+- cb = NULL;
+-
+- if (!cb && dev->driver && dev->driver->pm)
+- cb = *(pm_callback_t *)((void *)dev->driver->pm + cb_offset);
+-
+- return cb;
+-}
+-
+-#define RPM_GET_CALLBACK(dev, callback) \
+- __rpm_get_callback(dev, offsetof(struct dev_pm_ops, callback))
++#define RPM_GET_CALLBACK(dev, callback) \
++({ \
++ pm_callback_t cb; \
++ const struct dev_pm_ops *ops; \
++ \
++ if (dev->pm_domain) \
++ ops = &dev->pm_domain->ops; \
++ else if (dev->type && dev->type->pm) \
++ ops = dev->type->pm; \
++ else if (dev->class && dev->class->pm) \
++ ops = dev->class->pm; \
++ else if (dev->bus && dev->bus->pm) \
++ ops = dev->bus->pm; \
++ else \
++ ops = NULL; \
++ \
++ if (ops) \
++ cb = ops->callback; \
++ else \
++ cb = NULL; \
++ \
++ if (!cb && dev->driver && dev->driver->pm) \
++ cb = dev->driver->pm->callback; \
++ \
++ cb; \
++})
+
+ static int rpm_resume(struct device *dev, int rpmflags);
+ static int rpm_suspend(struct device *dev, int rpmflags);
+@@ -263,8 +260,8 @@ static int rpm_check_suspend_allowed(struct device *dev)
* @cb: Runtime PM callback to run.
* @dev: Device to run the callback for.
*/
@@ -39111,7 +40826,7 @@ index e1a10a0..a6bc363 100644
{
int retval;
-@@ -412,8 +412,8 @@ static int rpm_callback(int (*cb)(struct device *), struct device *dev)
+@@ -412,8 +409,8 @@ static int rpm_callback(int (*cb)(struct device *), struct device *dev)
*
* This function must be called under dev->power.lock with interrupts disabled.
*/
@@ -39121,7 +40836,7 @@ index e1a10a0..a6bc363 100644
{
int (*callback)(struct device *);
struct device *parent = NULL;
-@@ -594,8 +594,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
+@@ -594,8 +591,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
*
* This function must be called under dev->power.lock with interrupts disabled.
*/
@@ -39184,32 +40899,32 @@ index a1e0b9a..81fc106 100644
split_counters(&cnt, &inpr);
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
-index 3f0a7e2..8195e50 100644
+index 1ee3d40..3274424 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
-@@ -401,7 +401,7 @@ static ssize_t regmap_access_read_file(struct file *file,
- char __user *user_buf, size_t count,
- loff_t *ppos)
- {
-- int reg_len, tot_len;
-+ size_t reg_len, tot_len;
- size_t buf_pos = 0;
- loff_t p = 0;
- ssize_t ret;
-@@ -434,7 +434,7 @@ static ssize_t regmap_access_read_file(struct file *file,
- /* Format the register */
- snprintf(buf + buf_pos, count - buf_pos,
- "%.*x: %c %c %c %c\n",
-- reg_len, i,
-+ (int)reg_len, i,
- regmap_readable(map, i) ? 'y' : 'n',
- regmap_writeable(map, i) ? 'y' : 'n',
- regmap_volatile(map, i) ? 'y' : 'n',
+@@ -400,7 +400,7 @@ static const struct file_operations regmap_reg_ranges_fops = {
+ static int regmap_access_show(struct seq_file *s, void *ignored)
+ {
+ struct regmap *map = s->private;
+- int i, reg_len;
++ size_t i, reg_len;
+
+ reg_len = regmap_calc_reg_len(map->max_register);
+
+@@ -410,7 +410,7 @@ static int regmap_access_show(struct seq_file *s, void *ignored)
+ continue;
+
+ /* Format the register */
+- seq_printf(s, "%.*x: %c %c %c %c\n", reg_len, i,
++ seq_printf(s, "%.*x: %c %c %c %c\n", (int)reg_len, i,
+ regmap_readable(map, i) ? 'y' : 'n',
+ regmap_writeable(map, i) ? 'y' : 'n',
+ regmap_volatile(map, i) ? 'y' : 'n',
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
-index 4ac63c0..9007855 100644
+index ee54e84..f00a29c 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
-@@ -344,8 +344,8 @@ static void regmap_unlock_mutex(void *__map)
+@@ -401,8 +401,8 @@ static void regmap_unlock_mutex(void *__map)
mutex_unlock(&map->mutex);
}
@@ -39219,7 +40934,7 @@ index 4ac63c0..9007855 100644
{
struct regmap *map = __map;
unsigned long flags;
-@@ -354,8 +354,8 @@ __acquires(&map->spinlock)
+@@ -411,8 +411,8 @@ __acquires(&map->spinlock)
map->spinlock_flags = flags;
}
@@ -39252,10 +40967,10 @@ index 8d98a32..61d3165 100644
}
EXPORT_SYMBOL_GPL(unregister_syscore_ops);
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
-index 0422c47..b222c7a 100644
+index 63c2064..34fae98 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
-@@ -3024,7 +3024,7 @@ static void start_io(ctlr_info_t *h)
+@@ -3018,7 +3018,7 @@ static void start_io(ctlr_info_t *h)
while (!list_empty(&h->reqQ)) {
c = list_entry(h->reqQ.next, CommandList_struct, list);
/* can't do anything if fifo is full */
@@ -39264,7 +40979,7 @@ index 0422c47..b222c7a 100644
dev_warn(&h->pdev->dev, "fifo full\n");
break;
}
-@@ -3034,7 +3034,7 @@ static void start_io(ctlr_info_t *h)
+@@ -3028,7 +3028,7 @@ static void start_io(ctlr_info_t *h)
h->Qdepth--;
/* Tell the controller execute command */
@@ -39273,7 +40988,7 @@ index 0422c47..b222c7a 100644
/* Put job onto the completed Q */
addQ(&h->cmpQ, c);
-@@ -3460,17 +3460,17 @@ startio:
+@@ -3454,17 +3454,17 @@ startio:
static inline unsigned long get_next_completion(ctlr_info_t *h)
{
@@ -39294,7 +41009,7 @@ index 0422c47..b222c7a 100644
(h->interrupts_enabled == 0));
}
-@@ -3503,7 +3503,7 @@ static inline u32 next_command(ctlr_info_t *h)
+@@ -3497,7 +3497,7 @@ static inline u32 next_command(ctlr_info_t *h)
u32 a;
if (unlikely(!(h->transMethod & CFGTBL_Trans_Performant)))
@@ -39303,7 +41018,7 @@ index 0422c47..b222c7a 100644
if ((*(h->reply_pool_head) & 1) == (h->reply_pool_wraparound)) {
a = *(h->reply_pool_head); /* Next cmd in ring buffer */
-@@ -4060,7 +4060,7 @@ static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
+@@ -4054,7 +4054,7 @@ static void cciss_put_controller_into_performant_mode(ctlr_info_t *h)
trans_support & CFGTBL_Trans_use_short_tags);
/* Change the access methods to the performant access methods */
@@ -39312,7 +41027,7 @@ index 0422c47..b222c7a 100644
h->transMethod = CFGTBL_Trans_Performant;
return;
-@@ -4334,7 +4334,7 @@ static int cciss_pci_init(ctlr_info_t *h)
+@@ -4328,7 +4328,7 @@ static int cciss_pci_init(ctlr_info_t *h)
if (prod_index < 0)
return -ENODEV;
h->product_name = products[prod_index].product_name;
@@ -39321,7 +41036,7 @@ index 0422c47..b222c7a 100644
if (cciss_board_disabled(h)) {
dev_warn(&h->pdev->dev, "controller appears to be disabled\n");
-@@ -5065,7 +5065,7 @@ reinit_after_soft_reset:
+@@ -5059,7 +5059,7 @@ reinit_after_soft_reset:
}
/* make sure the board interrupts are off */
@@ -39330,7 +41045,7 @@ index 0422c47..b222c7a 100644
rc = cciss_request_irq(h, do_cciss_msix_intr, do_cciss_intx);
if (rc)
goto clean2;
-@@ -5115,7 +5115,7 @@ reinit_after_soft_reset:
+@@ -5109,7 +5109,7 @@ reinit_after_soft_reset:
* fake ones to scoop up any residual completions.
*/
spin_lock_irqsave(&h->lock, flags);
@@ -39339,7 +41054,7 @@ index 0422c47..b222c7a 100644
spin_unlock_irqrestore(&h->lock, flags);
free_irq(h->intr[h->intr_mode], h);
rc = cciss_request_irq(h, cciss_msix_discard_completions,
-@@ -5135,9 +5135,9 @@ reinit_after_soft_reset:
+@@ -5129,9 +5129,9 @@ reinit_after_soft_reset:
dev_info(&h->pdev->dev, "Board READY.\n");
dev_info(&h->pdev->dev,
"Waiting for stale completions to drain.\n");
@@ -39351,7 +41066,7 @@ index 0422c47..b222c7a 100644
rc = controller_reset_failed(h->cfgtable);
if (rc)
-@@ -5160,7 +5160,7 @@ reinit_after_soft_reset:
+@@ -5154,7 +5154,7 @@ reinit_after_soft_reset:
cciss_scsi_setup(h);
/* Turn the interrupts on so we can service requests */
@@ -39360,7 +41075,7 @@ index 0422c47..b222c7a 100644
/* Get the firmware version */
inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL);
-@@ -5232,7 +5232,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
+@@ -5226,7 +5226,7 @@ static void cciss_shutdown(struct pci_dev *pdev)
kfree(flush_buf);
if (return_code != IO_OK)
dev_warn(&h->pdev->dev, "Error flushing cache\n");
@@ -39559,10 +41274,10 @@ index be73e9d..7fbf140 100644
cmdlist_t *reqQ;
cmdlist_t *cmpQ;
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
-index 9462d27..4b9f997 100644
+index 92d6fc0..e4e1e27 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
-@@ -1027,7 +1027,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho
+@@ -1019,7 +1019,7 @@ static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_ho
submit_bio(rw, bio);
/* this should not count as user activity and cause the
* resync to throttle -- see drbd_rs_should_slow_down(). */
@@ -39572,10 +41287,10 @@ index 9462d27..4b9f997 100644
}
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
-index e66d453..edaae71 100644
+index 34bc84e..8bac095 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
-@@ -386,7 +386,7 @@ struct drbd_epoch {
+@@ -382,7 +382,7 @@ struct drbd_epoch {
struct drbd_connection *connection;
struct list_head list;
unsigned int barrier_nr;
@@ -39584,7 +41299,7 @@ index e66d453..edaae71 100644
atomic_t active; /* increased on every req. added, and dec on every finished. */
unsigned long flags;
};
-@@ -947,7 +947,7 @@ struct drbd_device {
+@@ -951,7 +951,7 @@ struct drbd_device {
unsigned int al_tr_number;
int al_tr_cycle;
wait_queue_head_t seq_wait;
@@ -39593,7 +41308,7 @@ index e66d453..edaae71 100644
unsigned int peer_seq;
spinlock_t peer_seq_lock;
unsigned long comm_bm_set; /* communicated number of set bits. */
-@@ -956,8 +956,8 @@ struct drbd_device {
+@@ -960,8 +960,8 @@ struct drbd_device {
struct mutex own_state_mutex;
struct mutex *state_mutex; /* either own_state_mutex or first_peer_device(device)->connection->cstate_mutex */
char congestion_reason; /* Why we where congested... */
@@ -39605,10 +41320,10 @@ index e66d453..edaae71 100644
int rs_last_events; /* counter of read or write "events" (unit sectors)
* on the lower level device when we last looked. */
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
-index 74d97f4..bb5a486 100644
+index 5b43dfb..d5f6e5c 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
-@@ -1328,7 +1328,7 @@ static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet
+@@ -1329,7 +1329,7 @@ static int _drbd_send_ack(struct drbd_peer_device *peer_device, enum drbd_packet
p->sector = sector;
p->block_id = block_id;
p->blksize = blksize;
@@ -39617,7 +41332,7 @@ index 74d97f4..bb5a486 100644
return drbd_send_command(peer_device, sock, cmd, sizeof(*p), NULL, 0);
}
-@@ -1634,7 +1634,7 @@ int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *
+@@ -1635,7 +1635,7 @@ int drbd_send_dblock(struct drbd_peer_device *peer_device, struct drbd_request *
return -EIO;
p->sector = cpu_to_be64(req->i.sector);
p->block_id = (unsigned long)req;
@@ -39626,7 +41341,7 @@ index 74d97f4..bb5a486 100644
dp_flags = bio_flags_to_wire(peer_device->connection, req->master_bio->bi_rw);
if (device->state.conn >= C_SYNC_SOURCE &&
device->state.conn <= C_PAUSED_SYNC_T)
-@@ -1915,8 +1915,8 @@ void drbd_init_set_defaults(struct drbd_device *device)
+@@ -1907,8 +1907,8 @@ void drbd_init_set_defaults(struct drbd_device *device)
atomic_set(&device->unacked_cnt, 0);
atomic_set(&device->local_cnt, 0);
atomic_set(&device->pp_in_use_by_net, 0);
@@ -39637,7 +41352,7 @@ index 74d97f4..bb5a486 100644
atomic_set(&device->ap_in_flight, 0);
atomic_set(&device->md_io.in_use, 0);
-@@ -2683,8 +2683,8 @@ void drbd_destroy_connection(struct kref *kref)
+@@ -2675,8 +2675,8 @@ void drbd_destroy_connection(struct kref *kref)
struct drbd_connection *connection = container_of(kref, struct drbd_connection, kref);
struct drbd_resource *resource = connection->resource;
@@ -39649,17 +41364,21 @@ index 74d97f4..bb5a486 100644
idr_destroy(&connection->peer_devices);
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
-index e80cbef..42533f1 100644
+index c055c5e..5cb3c1e 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
-@@ -3637,13 +3637,13 @@ finish:
+@@ -89,8 +89,8 @@ int drbd_adm_get_initial_state(struct sk_buff *skb, struct netlink_callback *cb)
+ #include "drbd_nla.h"
+ #include <linux/genl_magic_func.h>
- void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib)
- {
-- static atomic_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
-+ static atomic_unchecked_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
- struct sk_buff *msg;
- struct drbd_genlmsghdr *d_out;
+-static atomic_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
+-static atomic_t notify_genl_seq = ATOMIC_INIT(2); /* two. */
++static atomic_unchecked_t drbd_genl_seq = ATOMIC_INIT(2); /* two. */
++static atomic_unchecked_t notify_genl_seq = ATOMIC_INIT(2); /* two. */
+
+ DEFINE_MUTEX(notification_mutex);
+
+@@ -4374,7 +4374,7 @@ void drbd_bcast_event(struct drbd_device *device, const struct sib_info *sib)
unsigned seq;
int err = -ENOMEM;
@@ -39668,11 +41387,56 @@ index e80cbef..42533f1 100644
msg = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
if (!msg)
goto failed;
+@@ -4426,7 +4426,7 @@ void notify_resource_state(struct sk_buff *skb,
+ int err;
+
+ if (!skb) {
+- seq = atomic_inc_return(&notify_genl_seq);
++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
+ skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
+ err = -ENOMEM;
+ if (!skb)
+@@ -4477,7 +4477,7 @@ void notify_device_state(struct sk_buff *skb,
+ int err;
+
+ if (!skb) {
+- seq = atomic_inc_return(&notify_genl_seq);
++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
+ skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
+ err = -ENOMEM;
+ if (!skb)
+@@ -4526,7 +4526,7 @@ void notify_connection_state(struct sk_buff *skb,
+ int err;
+
+ if (!skb) {
+- seq = atomic_inc_return(&notify_genl_seq);
++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
+ skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
+ err = -ENOMEM;
+ if (!skb)
+@@ -4576,7 +4576,7 @@ void notify_peer_device_state(struct sk_buff *skb,
+ int err;
+
+ if (!skb) {
+- seq = atomic_inc_return(&notify_genl_seq);
++ seq = atomic_inc_return_unchecked(&notify_genl_seq);
+ skb = genlmsg_new(NLMSG_GOODSIZE, GFP_NOIO);
+ err = -ENOMEM;
+ if (!skb)
+@@ -4619,7 +4619,7 @@ void notify_helper(enum drbd_notification_type type,
+ {
+ struct drbd_resource *resource = device ? device->resource : connection->resource;
+ struct drbd_helper_info helper_info;
+- unsigned int seq = atomic_inc_return(&notify_genl_seq);
++ unsigned int seq = atomic_inc_return_unchecked(&notify_genl_seq);
+ struct sk_buff *skb = NULL;
+ struct drbd_genlmsghdr *dh;
+ int err;
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
-index b4b5680..4ae7b27 100644
+index 1957fe8..de39941 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
-@@ -871,7 +871,7 @@ int drbd_connected(struct drbd_peer_device *peer_device)
+@@ -895,7 +895,7 @@ int drbd_connected(struct drbd_peer_device *peer_device)
struct drbd_device *device = peer_device->device;
int err;
@@ -39681,7 +41445,7 @@ index b4b5680..4ae7b27 100644
device->peer_seq = 0;
device->state_mutex = peer_device->connection->agreed_pro_version < 100 ?
-@@ -1234,7 +1234,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
+@@ -1266,7 +1266,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
do {
next_epoch = NULL;
@@ -39690,7 +41454,7 @@ index b4b5680..4ae7b27 100644
switch (ev & ~EV_CLEANUP) {
case EV_PUT:
-@@ -1274,7 +1274,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
+@@ -1306,7 +1306,7 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_connection *connectio
rv = FE_DESTROYED;
} else {
epoch->flags = 0;
@@ -39699,7 +41463,7 @@ index b4b5680..4ae7b27 100644
/* atomic_set(&epoch->active, 0); is already zero */
if (rv == FE_STILL_LIVE)
rv = FE_RECYCLED;
-@@ -1551,7 +1551,7 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
+@@ -1577,7 +1577,7 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
conn_wait_active_ee_empty(connection);
drbd_flush(connection);
@@ -39708,7 +41472,7 @@ index b4b5680..4ae7b27 100644
epoch = kmalloc(sizeof(struct drbd_epoch), GFP_NOIO);
if (epoch)
break;
-@@ -1565,11 +1565,11 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
+@@ -1591,11 +1591,11 @@ static int receive_Barrier(struct drbd_connection *connection, struct packet_inf
}
epoch->flags = 0;
@@ -39722,7 +41486,7 @@ index b4b5680..4ae7b27 100644
list_add(&epoch->list, &connection->current_epoch->list);
connection->current_epoch = epoch;
connection->epochs++;
-@@ -1781,7 +1781,9 @@ static int e_end_resync_block(struct drbd_work *w, int unused)
+@@ -1807,7 +1807,9 @@ static int e_end_resync_block(struct drbd_work *w, int unused)
}
static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t sector,
@@ -39733,7 +41497,7 @@ index b4b5680..4ae7b27 100644
{
struct drbd_device *device = peer_device->device;
struct drbd_peer_request *peer_req;
-@@ -1803,7 +1805,7 @@ static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t secto
+@@ -1829,7 +1831,7 @@ static int recv_resync_read(struct drbd_peer_device *peer_device, sector_t secto
list_add_tail(&peer_req->w.list, &device->sync_ee);
spin_unlock_irq(&device->resource->req_lock);
@@ -39742,7 +41506,7 @@ index b4b5680..4ae7b27 100644
if (drbd_submit_peer_request(device, peer_req, WRITE, DRBD_FAULT_RS_WR) == 0)
return 0;
-@@ -1901,7 +1903,7 @@ static int receive_RSDataReply(struct drbd_connection *connection, struct packet
+@@ -1927,7 +1929,7 @@ static int receive_RSDataReply(struct drbd_connection *connection, struct packet
drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size);
}
@@ -39751,7 +41515,7 @@ index b4b5680..4ae7b27 100644
return err;
}
-@@ -2291,7 +2293,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
+@@ -2317,7 +2319,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
err = wait_for_and_update_peer_seq(peer_device, peer_seq);
drbd_send_ack_dp(peer_device, P_NEG_ACK, p, pi->size);
@@ -39760,7 +41524,7 @@ index b4b5680..4ae7b27 100644
err2 = drbd_drain_block(peer_device, pi->size);
if (!err)
err = err2;
-@@ -2335,7 +2337,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
+@@ -2361,7 +2363,7 @@ static int receive_Data(struct drbd_connection *connection, struct packet_info *
spin_lock(&connection->epoch_lock);
peer_req->epoch = connection->current_epoch;
@@ -39769,7 +41533,7 @@ index b4b5680..4ae7b27 100644
atomic_inc(&peer_req->epoch->active);
spin_unlock(&connection->epoch_lock);
-@@ -2480,7 +2482,7 @@ bool drbd_rs_c_min_rate_throttle(struct drbd_device *device)
+@@ -2506,7 +2508,7 @@ bool drbd_rs_c_min_rate_throttle(struct drbd_device *device)
curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
(int)part_stat_read(&disk->part0, sectors[1]) -
@@ -39778,7 +41542,7 @@ index b4b5680..4ae7b27 100644
if (atomic_read(&device->ap_actlog_cnt)
|| curr_events - device->rs_last_events > 64) {
-@@ -2619,7 +2621,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
+@@ -2645,7 +2647,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
device->use_csums = true;
} else if (pi->cmd == P_OV_REPLY) {
/* track progress, we may need to throttle */
@@ -39787,7 +41551,7 @@ index b4b5680..4ae7b27 100644
peer_req->w.cb = w_e_end_ov_reply;
dec_rs_pending(device);
/* drbd_rs_begin_io done when we sent this request,
-@@ -2692,7 +2694,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
+@@ -2718,7 +2720,7 @@ static int receive_DataRequest(struct drbd_connection *connection, struct packet
goto out_free_e;
submit_for_resync:
@@ -39796,7 +41560,7 @@ index b4b5680..4ae7b27 100644
submit:
update_receiver_timing_details(connection, drbd_submit_peer_request);
-@@ -4565,7 +4567,7 @@ struct data_cmd {
+@@ -4591,7 +4593,7 @@ struct data_cmd {
int expect_payload;
size_t pkt_size;
int (*fn)(struct drbd_connection *, struct packet_info *);
@@ -39805,7 +41569,7 @@ index b4b5680..4ae7b27 100644
static struct data_cmd drbd_cmd_handler[] = {
[P_DATA] = { 1, sizeof(struct p_data), receive_Data },
-@@ -4679,7 +4681,7 @@ static void conn_disconnect(struct drbd_connection *connection)
+@@ -4709,7 +4711,7 @@ static void conn_disconnect(struct drbd_connection *connection)
if (!list_empty(&connection->current_epoch->list))
drbd_err(connection, "ASSERTION FAILED: connection->current_epoch->list not empty\n");
/* ok, no more ee's on the fly, it is safe to reset the epoch_size */
@@ -39814,7 +41578,7 @@ index b4b5680..4ae7b27 100644
connection->send.seen_any_write_yet = false;
drbd_info(connection, "Connection closed\n");
-@@ -5183,7 +5185,7 @@ static int got_IsInSync(struct drbd_connection *connection, struct packet_info *
+@@ -5213,7 +5215,7 @@ static int got_IsInSync(struct drbd_connection *connection, struct packet_info *
put_ldev(device);
}
dec_rs_pending(device);
@@ -39823,20 +41587,113 @@ index b4b5680..4ae7b27 100644
return 0;
}
-@@ -5471,7 +5473,7 @@ static int connection_finish_peer_reqs(struct drbd_connection *connection)
- struct asender_cmd {
+@@ -5464,7 +5466,7 @@ static int got_skip(struct drbd_connection *connection, struct packet_info *pi)
+ struct meta_sock_cmd {
size_t pkt_size;
int (*fn)(struct drbd_connection *connection, struct packet_info *);
-};
+} __do_const;
- static struct asender_cmd asender_tbl[] = {
- [P_PING] = { 0, got_Ping },
+ static void set_rcvtimeo(struct drbd_connection *connection, bool ping_timeout)
+ {
+diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
+index 5a7ef78..bbd058b 100644
+--- a/drivers/block/drbd/drbd_state.c
++++ b/drivers/block/drbd/drbd_state.c
+@@ -1497,9 +1497,10 @@ int drbd_bitmap_io_from_worker(struct drbd_device *device,
+
+ void notify_resource_state_change(struct sk_buff *skb,
+ unsigned int seq,
+- struct drbd_resource_state_change *resource_state_change,
++ void *_resource_state_change,
+ enum drbd_notification_type type)
+ {
++ struct drbd_resource_state_change *resource_state_change = _resource_state_change;
+ struct drbd_resource *resource = resource_state_change->resource;
+ struct resource_info resource_info = {
+ .res_role = resource_state_change->role[NEW],
+@@ -1513,9 +1514,10 @@ void notify_resource_state_change(struct sk_buff *skb,
+
+ void notify_connection_state_change(struct sk_buff *skb,
+ unsigned int seq,
+- struct drbd_connection_state_change *connection_state_change,
++ void *_connection_state_change,
+ enum drbd_notification_type type)
+ {
++ struct drbd_connection_state_change *connection_state_change = _connection_state_change;
+ struct drbd_connection *connection = connection_state_change->connection;
+ struct connection_info connection_info = {
+ .conn_connection_state = connection_state_change->cstate[NEW],
+@@ -1527,9 +1529,10 @@ void notify_connection_state_change(struct sk_buff *skb,
+
+ void notify_device_state_change(struct sk_buff *skb,
+ unsigned int seq,
+- struct drbd_device_state_change *device_state_change,
++ void *_device_state_change,
+ enum drbd_notification_type type)
+ {
++ struct drbd_device_state_change *device_state_change = _device_state_change;
+ struct drbd_device *device = device_state_change->device;
+ struct device_info device_info = {
+ .dev_disk_state = device_state_change->disk_state[NEW],
+@@ -1540,9 +1543,10 @@ void notify_device_state_change(struct sk_buff *skb,
+
+ void notify_peer_device_state_change(struct sk_buff *skb,
+ unsigned int seq,
+- struct drbd_peer_device_state_change *p,
++ void *_p,
+ enum drbd_notification_type type)
+ {
++ struct drbd_peer_device_state_change *p = _p;
+ struct drbd_peer_device *peer_device = p->peer_device;
+ struct peer_device_info peer_device_info = {
+ .peer_repl_state = p->repl_state[NEW],
+diff --git a/drivers/block/drbd/drbd_state.h b/drivers/block/drbd/drbd_state.h
+index bd98953..488e501 100644
+--- a/drivers/block/drbd/drbd_state.h
++++ b/drivers/block/drbd/drbd_state.h
+@@ -126,7 +126,7 @@ extern enum drbd_state_rv _drbd_set_state(struct drbd_device *, union drbd_state
+ enum chg_state_flags,
+ struct completion *done);
+ extern void print_st_err(struct drbd_device *, union drbd_state,
+- union drbd_state, int);
++ union drbd_state, enum drbd_state_rv);
+
+ enum drbd_state_rv
+ _conn_request_state(struct drbd_connection *connection, union drbd_state mask, union drbd_state val,
+diff --git a/drivers/block/drbd/drbd_state_change.h b/drivers/block/drbd/drbd_state_change.h
+index 9e503a1..ac60262 100644
+--- a/drivers/block/drbd/drbd_state_change.h
++++ b/drivers/block/drbd/drbd_state_change.h
+@@ -45,19 +45,19 @@ extern void forget_state_change(struct drbd_state_change *);
+
+ extern void notify_resource_state_change(struct sk_buff *,
+ unsigned int,
+- struct drbd_resource_state_change *,
++ void *,
+ enum drbd_notification_type type);
+ extern void notify_connection_state_change(struct sk_buff *,
+ unsigned int,
+- struct drbd_connection_state_change *,
++ void *,
+ enum drbd_notification_type type);
+ extern void notify_device_state_change(struct sk_buff *,
+ unsigned int,
+- struct drbd_device_state_change *,
++ void *,
+ enum drbd_notification_type type);
+ extern void notify_peer_device_state_change(struct sk_buff *,
+ unsigned int,
+- struct drbd_peer_device_state_change *,
++ void *,
+ enum drbd_notification_type type);
+
+ #endif /* DRBD_STATE_CHANGE_H */
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
-index 5578c14..a05f791 100644
+index eff716c..4c52ef7 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
-@@ -94,7 +94,8 @@ void drbd_md_endio(struct bio *bio)
+@@ -87,7 +87,8 @@ void drbd_md_endio(struct bio *bio)
/* reads on behalf of the partner,
* "submitted" by the receiver
*/
@@ -39846,7 +41703,7 @@ index 5578c14..a05f791 100644
{
unsigned long flags = 0;
struct drbd_peer_device *peer_device = peer_req->peer_device;
-@@ -115,7 +116,8 @@ static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __rele
+@@ -108,7 +109,8 @@ static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __rele
/* writes on behalf of the partner, or resync writes,
* "submitted" by the receiver, final stage. */
@@ -39856,7 +41713,7 @@ index 5578c14..a05f791 100644
{
unsigned long flags = 0;
struct drbd_peer_device *peer_device = peer_req->peer_device;
-@@ -386,7 +388,7 @@ static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector,
+@@ -391,7 +393,7 @@ static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector,
list_add_tail(&peer_req->w.list, &device->read_ee);
spin_unlock_irq(&device->resource->req_lock);
@@ -39865,7 +41722,7 @@ index 5578c14..a05f791 100644
if (drbd_submit_peer_request(device, peer_req, READ, DRBD_FAULT_RS_RD) == 0)
return 0;
-@@ -531,7 +533,7 @@ static int drbd_rs_number_requests(struct drbd_device *device)
+@@ -536,7 +538,7 @@ static int drbd_rs_number_requests(struct drbd_device *device)
unsigned int sect_in; /* Number of sectors that came in since the last turn */
int number, mxb;
@@ -39874,7 +41731,7 @@ index 5578c14..a05f791 100644
device->rs_in_flight -= sect_in;
rcu_read_lock();
-@@ -1573,8 +1575,8 @@ void drbd_rs_controller_reset(struct drbd_device *device)
+@@ -1583,8 +1585,8 @@ void drbd_rs_controller_reset(struct drbd_device *device)
struct gendisk *disk = device->ldev->backing_bdev->bd_contains->bd_disk;
struct fifo_buffer *plan;
@@ -39885,6 +41742,38 @@ index 5578c14..a05f791 100644
device->rs_in_flight = 0;
device->rs_last_events =
(int)part_stat_read(&disk->part0, sectors[0]) +
+diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
+index 84708a5..95c0e55 100644
+--- a/drivers/block/floppy.c
++++ b/drivers/block/floppy.c
+@@ -961,6 +961,10 @@ static void empty(void)
+ {
+ }
+
++static void empty2(int i)
++{
++}
++
+ static void (*floppy_work_fn)(void);
+
+ static void floppy_work_workfn(struct work_struct *work)
+@@ -1953,14 +1957,14 @@ static const struct cont_t wakeup_cont = {
+ .interrupt = empty,
+ .redo = do_wakeup,
+ .error = empty,
+- .done = (done_f)empty
++ .done = empty2
+ };
+
+ static const struct cont_t intr_cont = {
+ .interrupt = empty,
+ .redo = process_fd_request,
+ .error = empty,
+- .done = (done_f)empty
++ .done = empty2
+ };
+
+ static int wait_til_done(void (*handler)(void), bool interruptible)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index d06c62e..cd04d96 100644
--- a/drivers/block/pktcdvd.c
@@ -39908,7 +41797,7 @@ index d06c62e..cd04d96 100644
if (ti.nwa_v) {
pd->nwa = be32_to_cpu(ti.next_writable);
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
-index fbdddd6..060ff07 100644
+index 9745cf9..8dbe1b5 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -64,7 +64,7 @@
@@ -39991,7 +41880,7 @@ index e5565fb..71be10b4 100644
+ .command_completed = smart1_completed,
};
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c
-index 57eb935..eafd6b8 100644
+index 24a652f..2dffae6 100644
--- a/drivers/bluetooth/btwilink.c
+++ b/drivers/bluetooth/btwilink.c
@@ -275,7 +275,7 @@ static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
@@ -40034,7 +41923,7 @@ index 577cc4b..bfe0c2d 100644
return 0;
}
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
-index c206ccd..375691c 100644
+index 1b257ea..ea76b22 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -610,7 +610,6 @@ int register_cdrom(struct cdrom_device_info *cdi)
@@ -40076,7 +41965,7 @@ index c206ccd..375691c 100644
if (cgc.buffer)
break;
-@@ -3435,7 +3436,7 @@ static int cdrom_print_info(const char *header, int val, char *info,
+@@ -3431,7 +3432,7 @@ static int cdrom_print_info(const char *header, int val, char *info,
struct cdrom_device_info *cdi;
int ret;
@@ -40182,7 +42071,7 @@ index 4f94375..413694e 100644
return -EINVAL;
else
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
-index 240b6cf..e0ba20c 100644
+index be54e53..50272fe 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -574,7 +574,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets,
@@ -40195,7 +42084,7 @@ index 240b6cf..e0ba20c 100644
{
struct hpet_timer __iomem *timer;
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
-index e3536da..b1617f0 100644
+index 94fb407..603dd43 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -436,7 +436,7 @@ struct ipmi_smi {
@@ -40217,9 +42106,9 @@ index e3536da..b1617f0 100644
- ((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
+ ((unsigned int) atomic_read_unchecked(&(intf)->stats[IPMI_STAT_ ## stat]))
- static char *addr_src_to_str[] = { "invalid", "hotmod", "hardcoded", "SPMI",
- "ACPI", "SMBIOS", "PCI",
-@@ -2834,7 +2834,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
+ static const char * const addr_src_to_str[] = {
+ "invalid", "hotmod", "hardcoded", "SPMI", "ACPI", "SMBIOS", "PCI",
+@@ -2835,7 +2835,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
INIT_LIST_HEAD(&intf->cmd_rcvrs);
init_waitqueue_head(&intf->waitq);
for (i = 0; i < IPMI_NUM_STATS; i++)
@@ -40228,11 +42117,24 @@ index e3536da..b1617f0 100644
intf->proc_dir = NULL;
+diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
+index 9f2e3be..676c910 100644
+--- a/drivers/char/ipmi/ipmi_poweroff.c
++++ b/drivers/char/ipmi/ipmi_poweroff.c
+@@ -66,7 +66,7 @@ static void (*specific_poweroff_func)(ipmi_user_t user);
+ /* Holds the old poweroff function so we can restore it on removal. */
+ static void (*old_poweroff_func)(void);
+
+-static int set_param_ifnum(const char *val, struct kernel_param *kp)
++static int set_param_ifnum(const char *val, const struct kernel_param *kp)
+ {
+ int rv = param_set_int(val, kp);
+ if (rv)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
-index 4cc72fa..4c6f80d 100644
+index 7fddd86..f5b038e 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
-@@ -300,7 +300,7 @@ struct smi_info {
+@@ -302,7 +302,7 @@ struct smi_info {
unsigned char slave_addr;
/* Counters and things for the proc filesystem. */
@@ -40241,7 +42143,7 @@ index 4cc72fa..4c6f80d 100644
struct task_struct *thread;
-@@ -309,9 +309,9 @@ struct smi_info {
+@@ -311,9 +311,9 @@ struct smi_info {
};
#define smi_inc_stat(smi, stat) \
@@ -40253,7 +42155,25 @@ index 4cc72fa..4c6f80d 100644
#define SI_MAX_PARMS 4
-@@ -3620,7 +3620,7 @@ static int try_smi_init(struct smi_info *new_smi)
+@@ -1345,7 +1345,7 @@ static unsigned int num_slave_addrs;
+ #define IPMI_MEM_ADDR_SPACE 1
+ static const char * const addr_space_to_str[] = { "i/o", "mem" };
+
+-static int hotmod_handler(const char *val, struct kernel_param *kp);
++static int hotmod_handler(const char *val, const struct kernel_param *kp);
+
+ module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200);
+ MODULE_PARM_DESC(hotmod, "Add and remove interfaces. See"
+@@ -1806,7 +1806,7 @@ static struct smi_info *smi_info_alloc(void)
+ return info;
+ }
+
+-static int hotmod_handler(const char *val, struct kernel_param *kp)
++static int hotmod_handler(const char *val, const struct kernel_param *kp)
+ {
+ char *str = kstrdup(val, GFP_KERNEL);
+ int rv;
+@@ -3623,7 +3623,7 @@ static int try_smi_init(struct smi_info *new_smi)
atomic_set(&new_smi->req_events, 0);
new_smi->run_to_completion = false;
for (i = 0; i < SI_NUM_STATS; i++)
@@ -40263,7 +42183,7 @@ index 4cc72fa..4c6f80d 100644
new_smi->interrupt_disabled = true;
atomic_set(&new_smi->need_watch, 0);
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
-index 90e6246..58acb77 100644
+index 5f1c3d0..8fca936 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -284,17 +284,17 @@ struct ssif_info {
@@ -40307,7 +42227,7 @@ index 90e6246..58acb77 100644
if (ssif_info->supports_pec)
ssif_info->client->flags |= I2C_CLIENT_PEC;
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
-index 6b1721f..fda9398 100644
+index 4f6f94c..1e20d2f5 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -18,6 +18,7 @@
@@ -40456,10 +42376,10 @@ index 6b1721f..fda9398 100644
return tty_init();
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
-index 97c2d8d..aa03a89 100644
+index 0129232..422edaa 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
-@@ -247,7 +247,7 @@ static ssize_t nvram_read(struct file *file, char __user *buf,
+@@ -235,7 +235,7 @@ static ssize_t nvram_read(struct file *file, char __user *buf,
spin_unlock_irq(&rtc_lock);
@@ -40541,7 +42461,7 @@ index 45df4bf..22d88d4 100644
if (cmd != SIOCWANDEV)
diff --git a/drivers/char/random.c b/drivers/char/random.c
-index d0da5d8..739fd3a 100644
+index b583e53..f3bb4ac 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -289,9 +289,6 @@
@@ -40843,10 +42763,10 @@ index b5bcd77..0f7bd99 100644
return 0;
}
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
-index cec1ee2..d8e33a0 100644
+index 51eef87..d944fa7 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
-@@ -687,8 +687,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
+@@ -682,8 +682,11 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
data->acpi_perf_cpu = cpu;
policy->driver_data = data;
@@ -40860,7 +42780,7 @@ index cec1ee2..d8e33a0 100644
result = acpi_processor_register_performance(perf, cpu);
if (result)
-@@ -821,7 +824,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
+@@ -816,7 +819,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu);
break;
case ACPI_ADR_SPACE_FIXED_HARDWARE:
@@ -40871,24 +42791,24 @@ index cec1ee2..d8e33a0 100644
break;
default:
break;
-@@ -916,8 +921,10 @@ static void __init acpi_cpufreq_boost_init(void)
+@@ -910,8 +915,10 @@ static void __init acpi_cpufreq_boost_init(void)
if (!msrs)
return;
-- acpi_cpufreq_driver.boost_supported = true;
+- acpi_cpufreq_driver.set_boost = set_boost;
- acpi_cpufreq_driver.boost_enabled = boost_state(0);
+ pax_open_kernel();
-+ *(bool *)&acpi_cpufreq_driver.boost_supported = true;
++ *(void **)&acpi_cpufreq_driver.set_boost = set_boost;
+ *(bool *)&acpi_cpufreq_driver.boost_enabled = boost_state(0);
+ pax_close_kernel();
cpu_notifier_register_begin();
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
-index 90d6408..0df4580 100644
+index 0ca74d0..15705fb 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
-@@ -456,7 +456,9 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
+@@ -461,7 +461,9 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
if (!IS_ERR(cpu_reg))
regulator_put(cpu_reg);
@@ -40900,9 +42820,24 @@ index 90d6408..0df4580 100644
ret = cpufreq_register_driver(&dt_cpufreq_driver);
if (ret)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
-index 8412ce5..3a40e15 100644
+index e979ec7..a024e16 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
+@@ -474,12 +474,12 @@ EXPORT_SYMBOL_GPL(cpufreq_freq_transition_end);
+ * SYSFS INTERFACE *
+ *********************************************************************/
+ static ssize_t show_boost(struct kobject *kobj,
+- struct attribute *attr, char *buf)
++ struct kobj_attribute *attr, char *buf)
+ {
+ return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
+ }
+
+-static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
++static ssize_t store_boost(struct kobject *kobj, struct kobj_attribute *attr,
+ const char *buf, size_t count)
+ {
+ int ret, enable;
@@ -2048,7 +2048,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
read_unlock_irqrestore(&cpufreq_driver_lock, flags);
@@ -40941,32 +42876,18 @@ index 8412ce5..3a40e15 100644
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
pr_err("%s: Cannot %s BOOST\n",
-@@ -2350,8 +2354,11 @@ static int create_boost_sysfs_file(void)
- * Check if driver provides function to enable boost -
- * if not, use cpufreq_boost_set_sw as default
- */
-- if (!cpufreq_driver->set_boost)
-- cpufreq_driver->set_boost = cpufreq_boost_set_sw;
-+ if (!cpufreq_driver->set_boost) {
-+ pax_open_kernel();
-+ *(void **)&cpufreq_driver->set_boost = cpufreq_boost_set_sw;
-+ pax_close_kernel();
-+ }
-
- ret = sysfs_create_file(cpufreq_global_kobject, &boost.attr);
- if (ret)
-@@ -2375,7 +2382,9 @@ int cpufreq_enable_boost_support(void)
+@@ -2361,7 +2365,9 @@ int cpufreq_enable_boost_support(void)
if (cpufreq_boost_supported())
return 0;
-- cpufreq_driver->boost_supported = true;
+- cpufreq_driver->set_boost = cpufreq_boost_set_sw;
+ pax_open_kernel();
-+ *(bool *)&cpufreq_driver->boost_supported = true;
++ *(void **)&cpufreq_driver->set_boost = cpufreq_boost_set_sw;
+ pax_close_kernel();
/* This will get removed on driver unregister */
return create_boost_sysfs_file();
-@@ -2432,8 +2441,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
+@@ -2418,8 +2424,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
cpufreq_driver = driver_data;
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
@@ -40978,13 +42899,13 @@ index 8412ce5..3a40e15 100644
+ pax_close_kernel();
+ }
- ret = create_boost_sysfs_file();
- if (ret)
+ if (cpufreq_boost_supported()) {
+ ret = create_boost_sysfs_file();
diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
-index d994b0f..b0b9d15 100644
+index e0d1110..575e673 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
-@@ -465,7 +465,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy,
+@@ -497,7 +497,7 @@ static int cpufreq_governor_start(struct cpufreq_policy *policy,
cs_dbs_info->down_skip = 0;
cs_dbs_info->requested_freq = policy->cur;
} else {
@@ -40994,10 +42915,28 @@ index d994b0f..b0b9d15 100644
od_dbs_info->rate_mult = 1;
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h
-index 5621bb0..a854d3c 100644
+index 91e767a0..3b40724 100644
--- a/drivers/cpufreq/cpufreq_governor.h
+++ b/drivers/cpufreq/cpufreq_governor.h
-@@ -217,7 +217,7 @@ struct common_dbs_data {
+@@ -75,7 +75,7 @@ __ATTR(_name, 0644, show_##_name##_gov_pol, store_##_name##_gov_pol)
+ /* Create show/store routines */
+ #define show_one(_gov, file_name) \
+ static ssize_t show_##file_name##_gov_sys \
+-(struct kobject *kobj, struct attribute *attr, char *buf) \
++(struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
+ { \
+ struct _gov##_dbs_tuners *tuners = _gov##_dbs_cdata.gdbs_data->tuners; \
+ return sprintf(buf, "%u\n", tuners->file_name); \
+@@ -91,7 +91,7 @@ static ssize_t show_##file_name##_gov_pol \
+
+ #define store_one(_gov, file_name) \
+ static ssize_t store_##file_name##_gov_sys \
+-(struct kobject *kobj, struct attribute *attr, const char *buf, size_t count) \
++(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) \
+ { \
+ struct dbs_data *dbs_data = _gov##_dbs_cdata.gdbs_data; \
+ return store_##file_name(dbs_data, buf, count); \
+@@ -219,7 +219,7 @@ struct common_dbs_data {
void (*exit)(struct dbs_data *dbs_data, bool notify);
/* Governor specific ops, see below */
@@ -41006,7 +42945,7 @@ index 5621bb0..a854d3c 100644
/*
* Protects governor's data (struct dbs_data and struct common_dbs_data)
-@@ -239,7 +239,7 @@ struct od_ops {
+@@ -241,7 +241,7 @@ struct od_ops {
unsigned int (*powersave_bias_target)(struct cpufreq_policy *policy,
unsigned int freq_next, unsigned int relation);
void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq);
@@ -41015,11 +42954,20 @@ index 5621bb0..a854d3c 100644
static inline int delay_for_sampling_rate(unsigned int sampling_rate)
{
+@@ -256,7 +256,7 @@ static inline int delay_for_sampling_rate(unsigned int sampling_rate)
+
+ #define declare_show_sampling_rate_min(_gov) \
+ static ssize_t show_sampling_rate_min_gov_sys \
+-(struct kobject *kobj, struct attribute *attr, char *buf) \
++(struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
+ { \
+ struct dbs_data *dbs_data = _gov##_dbs_cdata.gdbs_data; \
+ return sprintf(buf, "%u\n", dbs_data->min_sampling_rate); \
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
-index 03ac6ce..2d7a94b 100644
+index eae5107..26e7a39 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
-@@ -509,7 +509,7 @@ static void od_exit(struct dbs_data *dbs_data, bool notify)
+@@ -534,7 +534,7 @@ static void od_exit(struct dbs_data *dbs_data, bool notify)
define_get_cpu_dbs_routines(od_cpu_dbs_info);
@@ -41028,7 +42976,7 @@ index 03ac6ce..2d7a94b 100644
.powersave_bias_init_cpu = ondemand_powersave_bias_init_cpu,
.powersave_bias_target = generic_powersave_bias_target,
.freq_increase = dbs_freq_increase,
-@@ -568,14 +568,18 @@ void od_register_powersave_bias_handler(unsigned int (*f)
+@@ -593,14 +593,18 @@ void od_register_powersave_bias_handler(unsigned int (*f)
(struct cpufreq_policy *, unsigned int, unsigned int),
unsigned int powersave_bias)
{
@@ -41050,15 +42998,11 @@ index 03ac6ce..2d7a94b 100644
}
EXPORT_SYMBOL_GPL(od_unregister_powersave_bias_handler);
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
-index 98fb882..9f1d2a4 100644
+index cd83d47..3ad4309 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
-@@ -138,10 +138,10 @@ struct pstate_funcs {
- struct cpu_defaults {
- struct pstate_adjust_policy pid_policy;
- struct pstate_funcs funcs;
--};
-+} __do_const;
+@@ -147,7 +147,7 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu);
+ static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu);
static struct pstate_adjust_policy pid_params;
-static struct pstate_funcs pstate_funcs;
@@ -41066,7 +43010,68 @@ index 98fb882..9f1d2a4 100644
static int hwp_active;
struct perf_limits {
-@@ -840,19 +840,19 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate, bool force)
+@@ -374,13 +374,13 @@ static void __init intel_pstate_debug_expose_params(void)
+ /************************** sysfs begin ************************/
+ #define show_one(file_name, object) \
+ static ssize_t show_##file_name \
+- (struct kobject *kobj, struct attribute *attr, char *buf) \
++ (struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
+ { \
+ return sprintf(buf, "%u\n", limits->object); \
+ }
+
+ static ssize_t show_turbo_pct(struct kobject *kobj,
+- struct attribute *attr, char *buf)
++ struct kobj_attribute *attr, char *buf)
+ {
+ struct cpudata *cpu;
+ int total, no_turbo, turbo_pct;
+@@ -396,7 +396,7 @@ static ssize_t show_turbo_pct(struct kobject *kobj,
+ }
+
+ static ssize_t show_num_pstates(struct kobject *kobj,
+- struct attribute *attr, char *buf)
++ struct kobj_attribute *attr, char *buf)
+ {
+ struct cpudata *cpu;
+ int total;
+@@ -407,7 +407,7 @@ static ssize_t show_num_pstates(struct kobject *kobj,
+ }
+
+ static ssize_t show_no_turbo(struct kobject *kobj,
+- struct attribute *attr, char *buf)
++ struct kobj_attribute *attr, char *buf)
+ {
+ ssize_t ret;
+
+@@ -420,7 +420,7 @@ static ssize_t show_no_turbo(struct kobject *kobj,
+ return ret;
+ }
+
+-static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
++static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
+ const char *buf, size_t count)
+ {
+ unsigned int input;
+@@ -444,7 +444,7 @@ static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
+ return count;
+ }
+
+-static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
++static ssize_t store_max_perf_pct(struct kobject *a, struct kobj_attribute *b,
+ const char *buf, size_t count)
+ {
+ unsigned int input;
+@@ -469,7 +469,7 @@ static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
+ return count;
+ }
+
+-static ssize_t store_min_perf_pct(struct kobject *a, struct attribute *b,
++static ssize_t store_min_perf_pct(struct kobject *a, struct kobj_attribute *b,
+ const char *buf, size_t count)
+ {
+ unsigned int input;
+@@ -850,19 +850,19 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate, bool force)
cpu->pstate.current_pstate = pstate;
@@ -41094,7 +43099,16 @@ index 98fb882..9f1d2a4 100644
intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate, false);
}
-@@ -1210,15 +1210,15 @@ static unsigned int force_load;
+@@ -1016,7 +1016,7 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
+
+ from = cpu->pstate.current_pstate;
+
+- target_pstate = pstate_funcs.get_target_pstate(cpu);
++ target_pstate = pstate_funcs->get_target_pstate(cpu);
+
+ intel_pstate_set_pstate(cpu, target_pstate, true);
+
+@@ -1249,15 +1249,15 @@ static unsigned int force_load;
static int intel_pstate_msrs_not_valid(void)
{
@@ -41114,7 +43128,7 @@ index 98fb882..9f1d2a4 100644
{
pid_params.sample_rate_ms = policy->sample_rate_ms;
pid_params.p_gain_pct = policy->p_gain_pct;
-@@ -1230,13 +1230,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy)
+@@ -1269,15 +1269,7 @@ static void copy_pid_params(struct pstate_adjust_policy *policy)
static void copy_cpu_funcs(struct pstate_funcs *funcs)
{
@@ -41125,6 +43139,8 @@ index 98fb882..9f1d2a4 100644
- pstate_funcs.get_scaling = funcs->get_scaling;
- pstate_funcs.set = funcs->set;
- pstate_funcs.get_vid = funcs->get_vid;
+- pstate_funcs.get_target_pstate = funcs->get_target_pstate;
+-
+ pstate_funcs = funcs;
}
@@ -41328,6 +43344,38 @@ index fb9f511..213e6cc 100644
if (!cpuidle_curr_governor ||
cpuidle_curr_governor->rating < gov->rating)
cpuidle_switch_governor(gov);
+diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c
+index 63bd5a4..eea2dff 100644
+--- a/drivers/cpuidle/governors/ladder.c
++++ b/drivers/cpuidle/governors/ladder.c
+@@ -173,6 +173,15 @@ static void ladder_reflect(struct cpuidle_device *dev, int index)
+
+ static struct cpuidle_governor ladder_governor = {
+ .name = "ladder",
++ .rating = 25,
++ .enable = ladder_enable_device,
++ .select = ladder_select_state,
++ .reflect = ladder_reflect,
++ .owner = THIS_MODULE,
++};
++
++static struct cpuidle_governor ladder_governor_nohz = {
++ .name = "ladder",
+ .rating = 10,
+ .enable = ladder_enable_device,
+ .select = ladder_select_state,
+@@ -190,10 +199,8 @@ static int __init init_ladder(void)
+ * governor is better so give it a higher rating than the menu
+ * governor.
+ */
+- if (!tick_nohz_enabled)
+- ladder_governor.rating = 25;
+
+- return cpuidle_register_governor(&ladder_governor);
++ return cpuidle_register_governor(tick_nohz_enabled ? &ladder_governor_nohz : &ladder_governor);
+ }
+
+ postcore_initcall(init_ladder);
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
index 832a2c3..1794080 100644
--- a/drivers/cpuidle/sysfs.c
@@ -41370,10 +43418,10 @@ index 8ef06fa..ab9945f 100644
state.msg_bits = rctx->msg_bits;
state.first = rctx->first;
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
-index ca5c71a..df88d0c 100644
+index eee2c7e..268aa3e 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
-@@ -49,7 +49,7 @@ module_param_string(hifn_pll_ref, hifn_pll_ref, sizeof(hifn_pll_ref), 0444);
+@@ -37,7 +37,7 @@ module_param_string(hifn_pll_ref, hifn_pll_ref, sizeof(hifn_pll_ref), 0444);
MODULE_PARM_DESC(hifn_pll_ref,
"PLL reference clock (pci[freq] or ext[freq], default ext)");
@@ -41382,12 +43430,12 @@ index ca5c71a..df88d0c 100644
#define ACRYPTO_OP_DECRYPT 0
#define ACRYPTO_OP_ENCRYPT 1
-@@ -2575,7 +2575,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+@@ -2483,7 +2483,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto err_out_disable_pci_device;
snprintf(name, sizeof(name), "hifn%d",
-- atomic_inc_return(&hifn_dev_number)-1);
-+ atomic_inc_return_unchecked(&hifn_dev_number)-1);
+- atomic_inc_return(&hifn_dev_number) - 1);
++ atomic_inc_return_unchecked(&hifn_dev_number) - 1);
err = pci_request_regions(pdev, name);
if (err)
@@ -41413,7 +43461,7 @@ index bd985e7..74071e4 100644
u64 len;
int src_nents;
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
-index 6ec55b4..27b314e 100644
+index 683cca9..7ca2e0f 100644
--- a/drivers/crypto/marvell/hash.c
+++ b/drivers/crypto/marvell/hash.c
@@ -45,69 +45,25 @@ mv_cesa_ahash_req_iter_next_op(struct mv_cesa_ahash_dma_iter *iter)
@@ -41546,7 +43594,7 @@ index 6ec55b4..27b314e 100644
return mv_cesa_dma_add_data_transfer(chain,
CESA_SA_DATA_SRAM_OFFSET,
ahashdreq->cache_dma,
-@@ -844,10 +798,6 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
+@@ -848,10 +802,6 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
if (!cache_ptr)
return 0;
@@ -41557,7 +43605,7 @@ index 6ec55b4..27b314e 100644
memcpy(creq->cache, cache, cache_ptr);
creq->cache_ptr = cache_ptr;
-@@ -856,9 +806,14 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
+@@ -860,9 +810,14 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
static int mv_cesa_md5_init(struct ahash_request *req)
{
@@ -41572,7 +43620,7 @@ index 6ec55b4..27b314e 100644
mv_cesa_ahash_init(req, &tmpl, true);
-@@ -919,9 +874,15 @@ struct ahash_alg mv_md5_alg = {
+@@ -923,9 +878,15 @@ struct ahash_alg mv_md5_alg = {
static int mv_cesa_sha1_init(struct ahash_request *req)
{
@@ -41588,7 +43636,7 @@ index 6ec55b4..27b314e 100644
mv_cesa_ahash_init(req, &tmpl, false);
-@@ -982,9 +943,18 @@ struct ahash_alg mv_sha1_alg = {
+@@ -986,9 +947,18 @@ struct ahash_alg mv_sha1_alg = {
static int mv_cesa_sha256_init(struct ahash_request *req)
{
@@ -41607,11 +43655,71 @@ index 6ec55b4..27b314e 100644
mv_cesa_ahash_init(req, &tmpl, false);
+diff --git a/drivers/crypto/qat/qat_common/adf_aer.c b/drivers/crypto/qat/qat_common/adf_aer.c
+index e78a1d7..f6ef8aa 100644
+--- a/drivers/crypto/qat/qat_common/adf_aer.c
++++ b/drivers/crypto/qat/qat_common/adf_aer.c
+@@ -56,7 +56,7 @@
+ static struct workqueue_struct *device_reset_wq;
+
+ static pci_ers_result_t adf_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct adf_accel_dev *accel_dev = adf_devmgr_pci_to_accel_dev(pdev);
+
+diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c
+index 1117a8b..6f9dd73 100644
+--- a/drivers/crypto/qat/qat_common/adf_sriov.c
++++ b/drivers/crypto/qat/qat_common/adf_sriov.c
+@@ -93,7 +93,7 @@ static void adf_iov_send_resp(struct work_struct *work)
+ kfree(pf2vf_resp);
+ }
+
+-static void adf_vf2pf_bh_handler(void *data)
++static void adf_vf2pf_bh_handler(unsigned long data)
+ {
+ struct adf_accel_vf_info *vf_info = (struct adf_accel_vf_info *)data;
+ struct adf_pf2vf_resp *pf2vf_resp;
+@@ -131,7 +131,7 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev)
+ vf_info->vf_nr = i;
+
+ tasklet_init(&vf_info->vf2pf_bh_tasklet,
+- (void *)adf_vf2pf_bh_handler,
++ adf_vf2pf_bh_handler,
+ (unsigned long)vf_info);
+ mutex_init(&vf_info->pf2vf_lock);
+ ratelimit_state_init(&vf_info->vf2pf_ratelimit,
+diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c
+index 09427b3..50f7306 100644
+--- a/drivers/crypto/qat/qat_common/adf_vf_isr.c
++++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c
+@@ -90,9 +90,9 @@ static void adf_disable_msi(struct adf_accel_dev *accel_dev)
+ pci_disable_msi(pdev);
+ }
+
+-static void adf_pf2vf_bh_handler(void *data)
++static void adf_pf2vf_bh_handler(unsigned long data)
+ {
+- struct adf_accel_dev *accel_dev = data;
++ struct adf_accel_dev *accel_dev = (struct adf_accel_dev *)data;
+ struct adf_hw_device_data *hw_data = accel_dev->hw_device;
+ struct adf_bar *pmisc =
+ &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)];
+@@ -143,7 +143,7 @@ err:
+ static int adf_setup_pf2vf_bh(struct adf_accel_dev *accel_dev)
+ {
+ tasklet_init(&accel_dev->vf.pf2vf_bh_tasklet,
+- (void *)adf_pf2vf_bh_handler, (unsigned long)accel_dev);
++ adf_pf2vf_bh_handler, (unsigned long)accel_dev);
+
+ mutex_init(&accel_dev->vf.vf2pf_lock);
+ return 0;
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
-index ca848cc..9049c89 100644
+index 984c5e9..c873659 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
-@@ -671,7 +671,7 @@ int devfreq_add_governor(struct devfreq_governor *governor)
+@@ -717,7 +717,7 @@ int devfreq_add_governor(struct devfreq_governor *governor)
goto err_out;
}
@@ -41620,7 +43728,7 @@ index ca848cc..9049c89 100644
list_for_each_entry(devfreq, &devfreq_list, node) {
int ret = 0;
-@@ -759,7 +759,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
+@@ -805,7 +805,7 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
}
}
@@ -41658,10 +43766,10 @@ index 11707df..2ea96f7 100644
/* Run before NMI debug handler and KGDB */
diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
-index 5358737..2064670 100644
+index a979003..773b7f0 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
-@@ -474,9 +474,9 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
+@@ -468,9 +468,9 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
*/
int edac_device_alloc_index(void)
{
@@ -41673,10 +43781,32 @@ index 5358737..2064670 100644
}
EXPORT_SYMBOL_GPL(edac_device_alloc_index);
+diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c
+index 93da1a4..5e2c149 100644
+--- a/drivers/edac/edac_device_sysfs.c
++++ b/drivers/edac/edac_device_sysfs.c
+@@ -749,7 +749,7 @@ static int edac_device_add_main_sysfs_attributes(
+ */
+ while (sysfs_attrib->attr.name != NULL) {
+ err = sysfs_create_file(&edac_dev->kobj,
+- (struct attribute*) sysfs_attrib);
++ &sysfs_attrib->attr);
+ if (err)
+ goto err_out;
+
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
-index 58aed67..e6817a1 100644
+index 26e65ab..9a1e25d 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
+@@ -50,7 +50,7 @@ int edac_mc_get_poll_msec(void)
+ return edac_mc_poll_msec;
+ }
+
+-static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
++static int edac_set_poll_msec(const char *val, const struct kernel_param *kp)
+ {
+ unsigned long l;
+ int ret;
@@ -154,7 +154,7 @@ static const char * const edac_caps[] = {
struct dev_ch_attribute {
struct device_attribute attr;
@@ -41686,8 +43816,21 @@ index 58aed67..e6817a1 100644
#define DEVICE_CHANNEL(_name, _mode, _show, _store, _var) \
static struct dev_ch_attribute dev_attr_legacy_##_name = \
+diff --git a/drivers/edac/edac_module.c b/drivers/edac/edac_module.c
+index 5f8543b..46aa017 100644
+--- a/drivers/edac/edac_module.c
++++ b/drivers/edac/edac_module.c
+@@ -19,7 +19,7 @@
+
+ #ifdef CONFIG_EDAC_DEBUG
+
+-static int edac_set_debug_level(const char *buf, struct kernel_param *kp)
++static int edac_set_debug_level(const char *buf, const struct kernel_param *kp)
+ {
+ unsigned long val;
+ int ret;
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
-index b4b3860..08d7faa 100644
+index 9968538..fa53f93 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -29,7 +29,7 @@
@@ -41699,7 +43842,7 @@ index b4b3860..08d7faa 100644
/*
* edac_pci_alloc_ctl_info
-@@ -314,7 +314,7 @@ EXPORT_SYMBOL_GPL(edac_pci_reset_delay_period);
+@@ -255,7 +255,7 @@ static void edac_pci_workq_teardown(struct edac_pci_ctl_info *pci)
*/
int edac_pci_alloc_index(void)
{
@@ -41709,7 +43852,7 @@ index b4b3860..08d7faa 100644
EXPORT_SYMBOL_GPL(edac_pci_alloc_index);
diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c
-index 24d877f..4e30133 100644
+index 6e3428b..9bdb207 100644
--- a/drivers/edac/edac_pci_sysfs.c
+++ b/drivers/edac/edac_pci_sysfs.c
@@ -23,8 +23,8 @@ static int edac_pci_log_pe = 1; /* log PCI parity errors */
@@ -41732,7 +43875,7 @@ index 24d877f..4e30133 100644
/* Set of show/store abstract level functions for PCI Parity object */
static ssize_t edac_pci_dev_show(struct kobject *kobj, struct attribute *attr,
-@@ -576,7 +576,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
+@@ -564,7 +564,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_printk(KERN_CRIT, EDAC_PCI,
"Signaled System Error on %s\n",
pci_name(dev));
@@ -41741,7 +43884,7 @@ index 24d877f..4e30133 100644
}
if (status & (PCI_STATUS_PARITY)) {
-@@ -584,7 +584,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
+@@ -572,7 +572,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Master Data Parity Error on %s\n",
pci_name(dev));
@@ -41750,7 +43893,7 @@ index 24d877f..4e30133 100644
}
if (status & (PCI_STATUS_DETECTED_PARITY)) {
-@@ -592,7 +592,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
+@@ -580,7 +580,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Detected Parity Error on %s\n",
pci_name(dev));
@@ -41759,7 +43902,7 @@ index 24d877f..4e30133 100644
}
}
-@@ -615,7 +615,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
+@@ -603,7 +603,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
edac_printk(KERN_CRIT, EDAC_PCI, "Bridge "
"Signaled System Error on %s\n",
pci_name(dev));
@@ -41768,7 +43911,7 @@ index 24d877f..4e30133 100644
}
if (status & (PCI_STATUS_PARITY)) {
-@@ -623,7 +623,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
+@@ -611,7 +611,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Master Data Parity Error on "
"%s\n", pci_name(dev));
@@ -41777,7 +43920,7 @@ index 24d877f..4e30133 100644
}
if (status & (PCI_STATUS_DETECTED_PARITY)) {
-@@ -631,7 +631,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
+@@ -619,7 +619,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
"Detected Parity Error on %s\n",
pci_name(dev));
@@ -41786,7 +43929,7 @@ index 24d877f..4e30133 100644
}
}
}
-@@ -669,7 +669,7 @@ void edac_pci_do_parity_check(void)
+@@ -657,7 +657,7 @@ void edac_pci_do_parity_check(void)
if (!check_pci_errors)
return;
@@ -41795,7 +43938,7 @@ index 24d877f..4e30133 100644
/* scan all PCI devices looking for a Parity Error on devices and
* bridges.
-@@ -681,7 +681,7 @@ void edac_pci_do_parity_check(void)
+@@ -669,7 +669,7 @@ void edac_pci_do_parity_check(void)
/* Only if operator has selected panic on PCI Error */
if (edac_pci_get_panic_on_pe()) {
/* If the count is different 'after' from 'before' */
@@ -41842,6 +43985,28 @@ index 57ea7f4..af06b76 100644
card->driver->update_phy_reg(card, 4,
PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
+diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
+index 36a7c2d..3cea1bf 100644
+--- a/drivers/firewire/core-cdev.c
++++ b/drivers/firewire/core-cdev.c
+@@ -970,7 +970,7 @@ static int ioctl_create_iso_context(struct client *client, union ioctl_arg *arg)
+ {
+ struct fw_cdev_create_iso_context *a = &arg->create_iso_context;
+ struct fw_iso_context *context;
+- fw_iso_callback_t cb;
++ void *cb;
+ int ret;
+
+ BUILD_BUG_ON(FW_CDEV_ISO_CONTEXT_TRANSMIT != FW_ISO_CONTEXT_TRANSMIT ||
+@@ -995,7 +995,7 @@ static int ioctl_create_iso_context(struct client *client, union ioctl_arg *arg)
+ break;
+
+ case FW_ISO_CONTEXT_RECEIVE_MULTICHANNEL:
+- cb = (fw_iso_callback_t)iso_mc_callback;
++ cb = iso_mc_callback;
+ break;
+
+ default:
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c
index f9e3aee..269dbdb 100644
--- a/drivers/firewire/core-device.c
@@ -41855,6 +44020,19 @@ index f9e3aee..269dbdb 100644
static ssize_t show_immediate(struct device *dev,
struct device_attribute *dattr, char *buf)
+diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c
+index 38c0aa6..95466e4 100644
+--- a/drivers/firewire/core-iso.c
++++ b/drivers/firewire/core-iso.c
+@@ -162,7 +162,7 @@ size_t fw_iso_buffer_lookup(struct fw_iso_buffer *buffer, dma_addr_t completed)
+
+ struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
+ int type, int channel, int speed, size_t header_size,
+- fw_iso_callback_t callback, void *callback_data)
++ void *callback, void *callback_data)
+ {
+ struct fw_iso_context *ctx;
+
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index d6a09b9..18e90dd 100644
--- a/drivers/firewire/core-transaction.c
@@ -41908,7 +44086,7 @@ index c2f5117..e36414d 100644
/*
* FIXME: Make sure this bitmask is cleared when we clear the busReset
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
-index 94a58a0..f5eba42 100644
+index 94a58a0..5b8dd03 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -16,7 +16,7 @@
@@ -41920,11 +44098,27 @@ index 94a58a0..f5eba42 100644
#define to_dmi_dev_attr(_dev_attr) \
container_of(_dev_attr, struct dmi_device_attribute, dev_attr)
+@@ -159,9 +159,14 @@ static int dmi_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+ return 0;
+ }
+
++static void dmi_dev_release(struct device *dev)
++{
++ kfree(dev);
++}
++
+ static struct class dmi_class = {
+ .name = "dmi",
+- .dev_release = (void(*)(struct device *)) kfree,
++ .dev_release = dmi_dev_release,
+ .dev_uevent = dmi_dev_uevent,
+ };
+
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
-index 0e08e66..7824b4a 100644
+index 88bebe1..c7b636f 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
-@@ -690,14 +690,18 @@ static int __init dmi_init(void)
+@@ -712,14 +712,18 @@ static int __init dmi_init(void)
if (!dmi_table)
goto err_tables;
@@ -41969,10 +44163,10 @@ index d425374..1da1716 100644
EXPORT_SYMBOL_GPL(cper_next_record_id);
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
-index 027ca21..65689be 100644
+index 2cd37da..8bcbe8b 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
-@@ -174,14 +174,16 @@ static struct attribute_group efi_subsys_attr_group = {
+@@ -176,14 +176,16 @@ static struct attribute_group efi_subsys_attr_group = {
};
static struct efivars generic_efivars;
@@ -42072,10 +44266,10 @@ index 5de3ed2..d839c56 100644
.sysfs_ops = &memmap_attr_ops,
.default_attrs = def_attrs,
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
-index d24f35d..5875c5d 100644
+index f25cd79..7b7ad07 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
-@@ -54,7 +54,7 @@ bool psci_tos_resident_on(int cpu)
+@@ -55,7 +55,7 @@ bool psci_tos_resident_on(int cpu)
return cpu == resident_cpu;
}
@@ -42085,10 +44279,10 @@ index d24f35d..5875c5d 100644
typedef unsigned long (psci_fn)(unsigned long, unsigned long,
unsigned long, unsigned long);
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
-index 5e71538..00b7406 100644
+index cd007a6..6fd1a2e 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
-@@ -441,9 +441,9 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
+@@ -439,9 +439,9 @@ static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq)
return &gpio_unbanked.chip;
};
@@ -42100,7 +44294,7 @@ index 5e71538..00b7406 100644
gpio_unbanked = *irq_get_chip(irq);
return &gpio_unbanked;
-@@ -473,7 +473,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
+@@ -471,7 +471,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
struct davinci_gpio_regs __iomem *g;
struct irq_domain *irq_domain = NULL;
const struct of_device_id *match;
@@ -42110,7 +44304,7 @@ index 5e71538..00b7406 100644
/*
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
-index 6bca1e1..ed8b22e 100644
+index 8d32ccc..2d2ca61 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -274,7 +274,7 @@ static int em_gio_probe(struct platform_device *pdev)
@@ -42123,7 +44317,7 @@ index 6bca1e1..ed8b22e 100644
unsigned int ngpios;
int ret;
diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
-index 4ba7ed5..1536b5d 100644
+index a489338..3c0a85b 100644
--- a/drivers/gpio/gpio-ich.c
+++ b/drivers/gpio/gpio-ich.c
@@ -94,7 +94,7 @@ struct ichx_desc {
@@ -42136,7 +44330,7 @@ index 4ba7ed5..1536b5d 100644
static struct {
spinlock_t lock;
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
-index f7fbb46..cee8e40 100644
+index 189f672..c52c254 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1069,7 +1069,7 @@ static void omap_gpio_mod_init(struct gpio_bank *bank)
@@ -42158,10 +44352,10 @@ index f7fbb46..cee8e40 100644
match = of_match_device(of_match_ptr(omap_gpio_match), dev);
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
-index 2a81224..ec01fb3 100644
+index d9ab0cd..406ce88 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
-@@ -398,7 +398,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
+@@ -421,7 +421,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
struct gpio_rcar_priv *p;
struct resource *io, *irq;
struct gpio_chip *gpio_chip;
@@ -42169,9 +44363,9 @@ index 2a81224..ec01fb3 100644
+ irq_chip_no_const *irq_chip;
struct device *dev = &pdev->dev;
const char *name = dev_name(dev);
- int ret;
+ unsigned int npins;
diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
-index c1caa45..f0f97d2 100644
+index ac8deb0..f3caa10 100644
--- a/drivers/gpio/gpio-vr41xx.c
+++ b/drivers/gpio/gpio-vr41xx.c
@@ -224,7 +224,7 @@ static int giu_get_irq(unsigned int irq)
@@ -42184,10 +44378,10 @@ index c1caa45..f0f97d2 100644
return -EINVAL;
}
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
-index 4e4c308..d041d75 100644
+index 5c1ba87..ab4a059 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
-@@ -638,8 +638,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
+@@ -669,8 +669,10 @@ static void gpiochip_irqchip_remove(struct gpio_chip *gpiochip)
}
if (gpiochip->irqchip) {
@@ -42200,7 +44394,7 @@ index 4e4c308..d041d75 100644
gpiochip->irqchip = NULL;
}
}
-@@ -715,8 +717,10 @@ int _gpiochip_irqchip_add(struct gpio_chip *gpiochip,
+@@ -747,8 +749,10 @@ int _gpiochip_irqchip_add(struct gpio_chip *gpiochip,
*/
if (!irqchip->irq_request_resources &&
!irqchip->irq_release_resources) {
@@ -42214,10 +44408,19 @@ index 4e4c308..d041d75 100644
/*
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
-index bb1099c..8eff7b2 100644
+index 5e7770f..a84a2c6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
-@@ -2338,7 +2338,7 @@ static inline void amdgpu_unregister_atpx_handler(void) {}
+@@ -1733,7 +1733,7 @@ void amdgpu_debugfs_cleanup(struct drm_minor *minor);
+ * amdgpu smumgr functions
+ */
+ struct amdgpu_smumgr_funcs {
+- int (*check_fw_load_finish)(struct amdgpu_device *adev, uint32_t fwtype);
++ int (*check_fw_load_finish)(struct amdgpu_device *adev, enum AMDGPU_UCODE_ID fwtype);
+ int (*request_smu_load_fw)(struct amdgpu_device *adev);
+ int (*request_smu_specific_fw)(struct amdgpu_device *adev, uint32_t fwtype);
+ };
+@@ -2345,7 +2345,7 @@ static inline void amdgpu_unregister_atpx_handler(void) {}
* KMS
*/
extern const struct drm_ioctl_desc amdgpu_ioctls_kms[];
@@ -42226,11 +44429,24 @@ index bb1099c..8eff7b2 100644
int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags);
int amdgpu_driver_unload_kms(struct drm_device *dev);
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
+index 81dc6b6..2762d6b 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
+@@ -493,7 +493,7 @@ static int amdgpu_atpx_init(void)
+ * look up whether we are the integrated or discrete GPU (all asics).
+ * Returns the client id.
+ */
+-static int amdgpu_atpx_get_client_id(struct pci_dev *pdev)
++static enum vga_switcheroo_client_id amdgpu_atpx_get_client_id(struct pci_dev *pdev)
+ {
+ if (amdgpu_atpx_priv.dhandle == ACPI_HANDLE(&pdev->dev))
+ return VGA_SWITCHEROO_IGD;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
-index 8e99514..3d68786 100644
+index 75cb5b9..2f6481f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
-@@ -737,44 +737,44 @@ static int amdgpu_cgs_get_firmware_info(void *cgs_device,
+@@ -1066,48 +1066,48 @@ int amdgpu_cgs_call_acpi_method(void *cgs_device,
}
static const struct cgs_ops amdgpu_cgs_ops = {
@@ -42253,6 +44469,7 @@ index 8e99514..3d68786 100644
- amdgpu_cgs_write_pci_config_byte,
- amdgpu_cgs_write_pci_config_word,
- amdgpu_cgs_write_pci_config_dword,
+- amdgpu_cgs_get_pci_resource,
- amdgpu_cgs_atom_get_data_table,
- amdgpu_cgs_atom_get_cmd_table_revs,
- amdgpu_cgs_atom_exec_cmd_table,
@@ -42265,7 +44482,10 @@ index 8e99514..3d68786 100644
- amdgpu_cgs_set_camera_voltages,
- amdgpu_cgs_get_firmware_info,
- amdgpu_cgs_set_powergating_state,
-- amdgpu_cgs_set_clockgating_state
+- amdgpu_cgs_set_clockgating_state,
+- amdgpu_cgs_get_active_displays_info,
+- amdgpu_cgs_call_acpi_method,
+- amdgpu_cgs_query_system_info,
+ .gpu_mem_info = amdgpu_cgs_gpu_mem_info,
+ .gmap_kmem = amdgpu_cgs_gmap_kmem,
+ .gunmap_kmem = amdgpu_cgs_gunmap_kmem,
@@ -42285,6 +44505,7 @@ index 8e99514..3d68786 100644
+ .write_pci_config_byte = amdgpu_cgs_write_pci_config_byte,
+ .write_pci_config_word = amdgpu_cgs_write_pci_config_word,
+ .write_pci_config_dword = amdgpu_cgs_write_pci_config_dword,
++ .get_pci_resource = amdgpu_cgs_get_pci_resource,
+ .atom_get_data_table = amdgpu_cgs_atom_get_data_table,
+ .atom_get_cmd_table_revs = amdgpu_cgs_atom_get_cmd_table_revs,
+ .atom_exec_cmd_table = amdgpu_cgs_atom_exec_cmd_table,
@@ -42297,7 +44518,10 @@ index 8e99514..3d68786 100644
+ .set_camera_voltages = amdgpu_cgs_set_camera_voltages,
+ .get_firmware_info = amdgpu_cgs_get_firmware_info,
+ .set_powergating_state = amdgpu_cgs_set_powergating_state,
-+ .set_clockgating_state = amdgpu_cgs_set_clockgating_state
++ .set_clockgating_state = amdgpu_cgs_set_clockgating_state,
++ .get_active_displays_info = amdgpu_cgs_get_active_displays_info,
++ .call_acpi_method = amdgpu_cgs_call_acpi_method,
++ .query_system_info = amdgpu_cgs_query_system_info
};
static const struct cgs_os_ops amdgpu_cgs_os_ops = {
@@ -42310,11 +44534,51 @@ index 8e99514..3d68786 100644
};
void *amdgpu_cgs_create_device(struct amdgpu_device *adev)
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+index 119cdc2..fd6698c 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+@@ -701,7 +701,7 @@ static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int amdgpu_connector_lvds_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector);
+@@ -838,7 +838,7 @@ static int amdgpu_connector_vga_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int amdgpu_connector_vga_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
+@@ -1158,7 +1158,7 @@ static void amdgpu_connector_dvi_force(struct drm_connector *connector)
+ amdgpu_connector->use_digital = true;
+ }
+
+-static int amdgpu_connector_dvi_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
+@@ -1427,7 +1427,7 @@ out:
+ return ret;
+ }
+
+-static int amdgpu_connector_dp_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
-index 9d88023..5fe8189 100644
+index d6c68d0..ea00f37 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
-@@ -1081,7 +1081,7 @@ static bool amdgpu_switcheroo_can_switch(struct pci_dev *pdev)
+@@ -1091,7 +1091,7 @@ static bool amdgpu_switcheroo_can_switch(struct pci_dev *pdev)
* locking inversion with the driver load path. And the access here is
* completely racy anyway. So don't bother with locking for now.
*/
@@ -42324,10 +44588,10 @@ index 9d88023..5fe8189 100644
static const struct vga_switcheroo_client_ops amdgpu_switcheroo_ops = {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
-index 8d6668c..ea61792 100644
+index 9ef1db8..bfd5d78 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
-@@ -481,7 +481,7 @@ static struct drm_driver kms_driver = {
+@@ -495,7 +495,7 @@ static struct drm_driver kms_driver = {
.driver_features =
DRIVER_USE_AGP |
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
@@ -42336,7 +44600,7 @@ index 8d6668c..ea61792 100644
.dev_priv_size = 0,
.load = amdgpu_driver_load_kms,
.open = amdgpu_driver_open_kms,
-@@ -532,9 +532,6 @@ static struct drm_driver kms_driver = {
+@@ -546,9 +546,6 @@ static struct drm_driver kms_driver = {
.patchlevel = KMS_DRIVER_PATCHLEVEL,
};
@@ -42346,7 +44610,7 @@ index 8d6668c..ea61792 100644
static struct pci_driver amdgpu_kms_pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
-@@ -552,22 +549,23 @@ static int __init amdgpu_init(void)
+@@ -566,22 +563,23 @@ static int __init amdgpu_init(void)
}
#endif
DRM_INFO("amdgpu kernel modesetting enabled.\n");
@@ -42386,8 +44650,74 @@ index e23843f..9ecc6f3 100644
};
-int amdgpu_max_kms_ioctl = ARRAY_SIZE(amdgpu_ioctls_kms);
+const int amdgpu_max_kms_ioctl = ARRAY_SIZE(amdgpu_ioctls_kms);
+diff --git a/drivers/gpu/drm/amd/amdgpu/fiji_smc.c b/drivers/gpu/drm/amd/amdgpu/fiji_smc.c
+index e35340a..9f6d286 100644
+--- a/drivers/gpu/drm/amd/amdgpu/fiji_smc.c
++++ b/drivers/gpu/drm/amd/amdgpu/fiji_smc.c
+@@ -513,7 +513,7 @@ static int fiji_smu_request_load_fw(struct amdgpu_device *adev)
+ return 0;
+ }
+
+-static uint32_t fiji_smu_get_mask_for_fw_type(uint32_t fw_type)
++static uint32_t fiji_smu_get_mask_for_fw_type(enum AMDGPU_UCODE_ID fw_type)
+ {
+ switch (fw_type) {
+ case AMDGPU_UCODE_ID_SDMA0:
+@@ -539,7 +539,7 @@ static uint32_t fiji_smu_get_mask_for_fw_type(uint32_t fw_type)
+ }
+
+ static int fiji_smu_check_fw_load_finish(struct amdgpu_device *adev,
+- uint32_t fw_type)
++ enum AMDGPU_UCODE_ID fw_type)
+ {
+ uint32_t fw_mask = fiji_smu_get_mask_for_fw_type(fw_type);
+ int i;
+diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_smc.c b/drivers/gpu/drm/amd/amdgpu/iceland_smc.c
+index 090486c..699728e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/iceland_smc.c
++++ b/drivers/gpu/drm/amd/amdgpu/iceland_smc.c
+@@ -418,7 +418,7 @@ static enum AMDGPU_UCODE_ID iceland_convert_fw_type(uint32_t fw_type)
+ }
+ }
+
+-static uint32_t iceland_smu_get_mask_for_fw_type(uint32_t fw_type)
++static uint32_t iceland_smu_get_mask_for_fw_type(enum AMDGPU_UCODE_ID fw_type)
+ {
+ switch (fw_type) {
+ case AMDGPU_UCODE_ID_SDMA0:
+@@ -556,7 +556,7 @@ static int iceland_smu_request_load_fw(struct amdgpu_device *adev)
+ }
+
+ static int iceland_smu_check_fw_load_finish(struct amdgpu_device *adev,
+- uint32_t fw_type)
++ enum AMDGPU_UCODE_ID fw_type)
+ {
+ uint32_t fw_mask = iceland_smu_get_mask_for_fw_type(fw_type);
+ int i;
+diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_smc.c b/drivers/gpu/drm/amd/amdgpu/tonga_smc.c
+index 361c49a..1113506 100644
+--- a/drivers/gpu/drm/amd/amdgpu/tonga_smc.c
++++ b/drivers/gpu/drm/amd/amdgpu/tonga_smc.c
+@@ -515,7 +515,7 @@ static int tonga_smu_request_load_fw(struct amdgpu_device *adev)
+ return 0;
+ }
+
+-static uint32_t tonga_smu_get_mask_for_fw_type(uint32_t fw_type)
++static uint32_t tonga_smu_get_mask_for_fw_type(enum AMDGPU_UCODE_ID fw_type)
+ {
+ switch (fw_type) {
+ case AMDGPU_UCODE_ID_SDMA0:
+@@ -541,7 +541,7 @@ static uint32_t tonga_smu_get_mask_for_fw_type(uint32_t fw_type)
+ }
+
+ static int tonga_smu_check_fw_load_finish(struct amdgpu_device *adev,
+- uint32_t fw_type)
++ enum AMDGPU_UCODE_ID fw_type)
+ {
+ uint32_t fw_mask = tonga_smu_get_mask_for_fw_type(fw_type);
+ int i;
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
-index c6a1b4c..32873f8 100644
+index d2b49c0..478e036 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -419,7 +419,7 @@ static int kfd_ioctl_set_memory_policy(struct file *filep,
@@ -42844,10 +45174,10 @@ index 7b69070..d7bd78b 100644
if (retval != 0)
return retval;
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
-index 3a4820e..ece12c8 100644
+index 8b2becd..2d8f572 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
-@@ -135,7 +135,7 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
+@@ -139,7 +139,7 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
if (r)
return r;
@@ -42855,9 +45185,9 @@ index 3a4820e..ece12c8 100644
+ atomic_set_unchecked(&entity->fence_seq, 0);
entity->fence_context = fence_context_alloc(1);
- /* Add the entity to the run queue */
+ return 0;
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
-index a0f0ae5..1771582 100644
+index 9403145..b8842f1 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
@@ -49,7 +49,7 @@ struct amd_sched_entity {
@@ -42883,10 +45213,10 @@ index 87c78ee..59dc36e 100644
s_entity->fence_context, seq);
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
-index 77ab93d..ae69bac 100644
+index 3bd7e1c..565fe46 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
-@@ -217,6 +217,7 @@ static struct drm_driver armada_drm_driver = {
+@@ -218,6 +218,7 @@ static struct drm_driver armada_drm_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET |
DRIVER_HAVE_IRQ | DRIVER_PRIME,
.ioctls = armada_ioctls,
@@ -42894,7 +45224,7 @@ index 77ab93d..ae69bac 100644
.fops = &armada_drm_fops,
};
-@@ -337,8 +338,6 @@ static int __init armada_drm_init(void)
+@@ -338,8 +339,6 @@ static int __init armada_drm_init(void)
{
int ret;
@@ -42903,11 +45233,62 @@ index 77ab93d..ae69bac 100644
ret = platform_driver_register(&armada_lcd_platform_driver);
if (ret)
return ret;
+diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
+index 0123458..4169580 100644
+--- a/drivers/gpu/drm/ast/ast_mode.c
++++ b/drivers/gpu/drm/ast/ast_mode.c
+@@ -789,7 +789,7 @@ static int ast_get_modes(struct drm_connector *connector)
+ return 0;
+ }
+
+-static int ast_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status ast_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct ast_private *ast = connector->dev->dev_private;
+diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
+index 2849f1b..86f509b 100644
+--- a/drivers/gpu/drm/bochs/bochs_kms.c
++++ b/drivers/gpu/drm/bochs/bochs_kms.c
+@@ -210,7 +210,7 @@ int bochs_connector_get_modes(struct drm_connector *connector)
+ return count;
+ }
+
+-static int bochs_connector_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status bochs_connector_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct bochs_device *bochs =
+diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
+index 9a7b446..33576d3 100644
+--- a/drivers/gpu/drm/drm_atomic.c
++++ b/drivers/gpu/drm/drm_atomic.c
+@@ -1339,6 +1339,11 @@ EXPORT_SYMBOL(drm_atomic_async_commit);
+ * The big monstor ioctl
+ */
+
++static void free_vblank_event(struct drm_pending_event *event)
++{
++ kfree(event);
++}
++
+ static struct drm_pending_vblank_event *create_vblank_event(
+ struct drm_device *dev, struct drm_file *file_priv, uint64_t user_data)
+ {
+@@ -1366,7 +1371,7 @@ static struct drm_pending_vblank_event *create_vblank_event(
+ e->event.user_data = user_data;
+ e->base.event = &e->event.base;
+ e->base.file_priv = file_priv;
+- e->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
++ e->base.destroy = free_vblank_event;
+
+ out:
+ return e;
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
-index 24c5434..d4671de 100644
+index f619121..ef03460 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
-@@ -4090,7 +4090,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
+@@ -4152,7 +4152,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
goto done;
}
@@ -42916,11 +45297,33 @@ index 24c5434..d4671de 100644
&prop_enum->name, DRM_PROP_NAME_LEN)) {
ret = -EFAULT;
goto done;
+@@ -5229,6 +5229,11 @@ out:
+ return ret;
+ }
+
++static void drm_mode_page_flip_dmabuf_destroy(struct drm_pending_event *event)
++{
++ kfree(event);
++}
++
+ /**
+ * drm_mode_page_flip_ioctl - schedule an asynchronous fb update
+ * @dev: DRM device
+@@ -5327,8 +5332,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
+ e->event.user_data = page_flip->user_data;
+ e->base.event = &e->event.base;
+ e->base.file_priv = file_priv;
+- e->base.destroy =
+- (void (*) (struct drm_pending_event *)) kfree;
++ e->base.destroy = drm_mode_page_flip_dmabuf_destroy;
+ }
+
+ crtc->primary->old_fb = crtc->primary->fb;
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
-index 7dd6728..6271b191 100644
+index 167c8d3..bf13708 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
-@@ -471,7 +471,7 @@ void drm_unplug_dev(struct drm_device *dev)
+@@ -467,7 +467,7 @@ void drm_unplug_dev(struct drm_device *dev)
drm_device_set_unplugged(dev);
@@ -42930,7 +45333,7 @@ index 7dd6728..6271b191 100644
}
mutex_unlock(&drm_global_mutex);
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
-index 6b5625e..d49b9fb 100644
+index 1ea8790..03efb49 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -89,7 +89,7 @@ int drm_open(struct inode *inode, struct file *filp)
@@ -42951,7 +45354,7 @@ index 6b5625e..d49b9fb 100644
drm_minor_release(minor);
return retcode;
}
-@@ -405,7 +405,7 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -407,7 +407,7 @@ int drm_release(struct inode *inode, struct file *filp)
mutex_lock(&drm_global_mutex);
@@ -42960,7 +45363,7 @@ index 6b5625e..d49b9fb 100644
mutex_lock(&dev->struct_mutex);
list_del(&file_priv->lhead);
-@@ -420,10 +420,10 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -422,10 +422,10 @@ int drm_release(struct inode *inode, struct file *filp)
* Begin inline drm_release
*/
@@ -42973,7 +45376,7 @@ index 6b5625e..d49b9fb 100644
/* if the master has gone away we can't do anything with the lock */
if (file_priv->minor->master)
-@@ -493,7 +493,7 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -495,7 +495,7 @@ int drm_release(struct inode *inode, struct file *filp)
* End inline drm_release
*/
@@ -43139,8 +45542,33 @@ index 8ce2a0c..d09a8f6 100644
unsigned int nr = DRM_IOCTL_NR(cmd);
int retcode = -EINVAL;
char stack_kdata[128];
+diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
+index 1fe1457..a3e7822 100644
+--- a/drivers/gpu/drm/drm_irq.c
++++ b/drivers/gpu/drm/drm_irq.c
+@@ -1646,6 +1646,11 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
+ return 0;
+ }
+
++static void drm_vblank_dmabuf_destroy(struct drm_pending_event *event)
++{
++ kfree(event);
++}
++
+ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
+ union drm_wait_vblank *vblwait,
+ struct drm_file *file_priv)
+@@ -1670,7 +1675,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, unsigned int pipe,
+ e->event.user_data = vblwait->request.signal;
+ e->base.event = &e->event.base;
+ e->base.file_priv = file_priv;
+- e->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
++ e->base.destroy = drm_vblank_dmabuf_destroy;
+
+ spin_lock_irqsave(&dev->event_lock, flags);
+
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
-index fcd2a86..f50489e 100644
+index a1fff11..425c24b 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -308,7 +308,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
@@ -43164,7 +45592,7 @@ index fcd2a86..f50489e 100644
for (i = 0; pdriver->id_table[i].vendor != 0; i++) {
pid = &pdriver->id_table[i];
-@@ -457,7 +460,7 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
+@@ -477,7 +480,7 @@ void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver)
} else {
list_for_each_entry_safe(dev, tmp, &driver->legacy_dev_list,
legacy_dev_list) {
@@ -43174,10 +45602,10 @@ index fcd2a86..f50489e 100644
}
}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
-index 2c6019d..6508989 100644
+index 68f0f36..4e8daee 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
-@@ -616,7 +616,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
+@@ -605,7 +605,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
struct component_match *match;
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
@@ -43185,33 +45613,96 @@ index 2c6019d..6508989 100644
match = exynos_drm_match_add(&pdev->dev);
if (IS_ERR(match))
-diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
-index d4813e0..6c1ab4d 100644
---- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
-+++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
-@@ -825,10 +825,16 @@ void mdfld_dsi_dpi_mode_set(struct drm_encoder *encoder,
- u32 pipeconf_reg = PIPEACONF;
- u32 dspcntr_reg = DSPACNTR;
-
-- u32 pipeconf = dev_priv->pipeconf[pipe];
-- u32 dspcntr = dev_priv->dspcntr[pipe];
-+ u32 pipeconf;
-+ u32 dspcntr;
- u32 mipi = MIPI_PORT_EN | PASS_FROM_SPHY_TO_AFE | SEL_FLOPPED_HSTX;
-
-+ if (pipe == -1)
-+ return;
-+
-+ pipeconf = dev_priv->pipeconf[pipe];
-+ dspcntr = dev_priv->dspcntr[pipe];
+diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+index 8dfe6e1..e7957e6 100644
+--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
++++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+@@ -1060,6 +1060,11 @@ int exynos_g2d_get_ver_ioctl(struct drm_device *drm_dev, void *data,
+ return 0;
+ }
+
++static void exynos_g2d_dmabuf_destroy(struct drm_pending_event *event)
++{
++ kfree(event);
++}
+
- if (pipe) {
- pipeconf_reg = PIPECCONF;
- dspcntr_reg = DSPCCNTR;
+ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
+ struct drm_file *file)
+ {
+@@ -1118,7 +1123,7 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device *drm_dev, void *data,
+ e->event.user_data = req->user_data;
+ e->base.event = &e->event.base;
+ e->base.file_priv = file;
+- e->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
++ e->base.destroy = exynos_g2d_dmabuf_destroy;
+
+ node->event = e;
+ }
+diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
+index d0717a8..563f087 100644
+--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
++++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
+@@ -64,7 +64,7 @@ static void cdv_intel_crt_dpms(struct drm_encoder *encoder, int mode)
+ REG_WRITE(reg, temp);
+ }
+
+-static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status cdv_intel_crt_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
+diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
+index 7bb1f1af..a35770e 100644
+--- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
++++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
+@@ -505,7 +505,7 @@ static void cdv_intel_edp_backlight_off (struct gma_encoder *intel_encoder)
+ msleep(intel_dp->backlight_off_delay);
+ }
+
+-static int
++static enum drm_mode_status
+ cdv_intel_dp_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
+index ddf2d77..4e9e184 100644
+--- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
++++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
+@@ -223,7 +223,7 @@ static int cdv_hdmi_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int cdv_hdmi_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status cdv_hdmi_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ if (mode->clock > 165000)
+diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
+index 813ef23..17928d6 100644
+--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
++++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
+@@ -244,7 +244,7 @@ static void cdv_intel_lvds_restore(struct drm_connector *connector)
+ {
+ }
+
+-static int cdv_intel_lvds_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status cdv_intel_lvds_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
-index 89f705c..d262d0b 100644
+index d758f4c..7828190 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+@@ -351,7 +351,7 @@ static int mdfld_dsi_connector_get_modes(struct drm_connector *connector)
+ return 0;
+ }
+
+-static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct mdfld_dsi_connector *dsi_connector =
@@ -382,14 +382,14 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
return MODE_OK;
}
@@ -43230,6 +45721,19 @@ index 89f705c..d262d0b 100644
}
static struct drm_encoder *mdfld_dsi_connector_best_encoder(
+diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+index 2d18499..3d5f8b9 100644
+--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
++++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+@@ -509,7 +509,7 @@ static void oaktrail_hdmi_dpms(struct drm_encoder *encoder, int mode)
+ HDMI_WRITE(HDMI_VIDEO_REG, temp);
+ }
+
+-static int oaktrail_hdmi_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status oaktrail_hdmi_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ if (mode->clock > 165000)
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 92e7e57..5d74ff5 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
@@ -43242,6 +45746,58 @@ index 92e7e57..5d74ff5 100644
psb_modeset_init(dev);
psb_fbdev_init(dev);
+diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
+index 2a3b7c6..fbd3fa3 100644
+--- a/drivers/gpu/drm/gma500/psb_intel_drv.h
++++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
+@@ -255,7 +255,7 @@ extern int intelfb_remove(struct drm_device *dev,
+ extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
+ const struct drm_display_mode *mode,
+ struct drm_display_mode *adjusted_mode);
+-extern int psb_intel_lvds_mode_valid(struct drm_connector *connector,
++extern enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode);
+ extern int psb_intel_lvds_set_property(struct drm_connector *connector,
+ struct drm_property *property,
+diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
+index b1b9331..6b254ef 100644
+--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
++++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
+@@ -343,7 +343,7 @@ static void psb_intel_lvds_restore(struct drm_connector *connector)
+ }
+ }
+
+-int psb_intel_lvds_mode_valid(struct drm_connector *connector,
++enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_psb_private *dev_priv = connector->dev->dev_private;
+diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+index e787d37..91622fd 100644
+--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
++++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+@@ -1158,7 +1158,7 @@ static void psb_intel_sdvo_dpms(struct drm_encoder *encoder, int mode)
+ return;
+ }
+
+-static int psb_intel_sdvo_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status psb_intel_sdvo_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct psb_intel_sdvo *psb_intel_sdvo = intel_attached_sdvo(connector);
+diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
+index f8ee740..223ee4c 100644
+--- a/drivers/gpu/drm/i2c/tda998x_drv.c
++++ b/drivers/gpu/drm/i2c/tda998x_drv.c
+@@ -864,7 +864,7 @@ tda998x_encoder_mode_fixup(struct drm_encoder *encoder,
+ return true;
+ }
+
+-static int tda998x_connector_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status tda998x_connector_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ /* TDA19988 dotclock can go up to 165MHz */
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index d918567..6cfd904 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
@@ -43296,11 +45852,24 @@ index 93ec5dc..204ec92 100644
#define I810_BASE(reg) ((unsigned long) \
dev_priv->mmio_map->handle)
+diff --git a/drivers/gpu/drm/i915/dvo.h b/drivers/gpu/drm/i915/dvo.h
+index 5e6a301..b6e143e 100644
+--- a/drivers/gpu/drm/i915/dvo.h
++++ b/drivers/gpu/drm/i915/dvo.h
+@@ -74,7 +74,7 @@ struct intel_dvo_dev_ops {
+ *
+ * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
+ */
+- int (*mode_valid)(struct intel_dvo_device *dvo,
++ enum drm_mode_status (*mode_valid)(struct intel_dvo_device *dvo,
+ struct drm_display_mode *mode);
+
+ /*
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
-index 61fcb3b..bad2d5f 100644
+index d70d96f..d3a598e 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
-@@ -354,7 +354,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
+@@ -356,7 +356,7 @@ static bool i915_switcheroo_can_switch(struct pci_dev *pdev)
* locking inversion with the driver load path. And the access here is
* completely racy anyway. So don't bother with locking for now.
*/
@@ -43309,14 +45878,14 @@ index 61fcb3b..bad2d5f 100644
}
static const struct vga_switcheroo_client_ops i915_switcheroo_ops = {
-@@ -1331,4 +1331,4 @@ const struct drm_ioctl_desc i915_ioctls[] = {
+@@ -1334,4 +1334,4 @@ const struct drm_ioctl_desc i915_ioctls[] = {
DRM_IOCTL_DEF_DRV(I915_GEM_CONTEXT_SETPARAM, i915_gem_context_setparam_ioctl, DRM_RENDER_ALLOW),
};
-int i915_max_ioctl = ARRAY_SIZE(i915_ioctls);
+const int i915_max_ioctl = ARRAY_SIZE(i915_ioctls);
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
-index a6ad938..ad4ff46 100644
+index f357058..5638302 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -40,7 +40,7 @@
@@ -43328,7 +45897,7 @@ index a6ad938..ad4ff46 100644
#define GEN_DEFAULT_PIPEOFFSETS \
.pipe_offsets = { PIPE_A_OFFSET, PIPE_B_OFFSET, \
-@@ -1690,7 +1690,7 @@ static const struct file_operations i915_driver_fops = {
+@@ -1672,7 +1672,7 @@ static const struct file_operations i915_driver_fops = {
.llseek = noop_llseek,
};
@@ -43337,7 +45906,7 @@ index a6ad938..ad4ff46 100644
/* Don't use MTRRs here; the Xserver or userspace app should
* deal with them for Intel hardware.
*/
-@@ -1740,6 +1740,7 @@ static struct pci_driver i915_pci_driver = {
+@@ -1722,6 +1722,7 @@ static struct pci_driver i915_pci_driver = {
static int __init i915_init(void)
{
@@ -43345,7 +45914,7 @@ index a6ad938..ad4ff46 100644
driver.num_ioctls = i915_max_ioctl;
/*
-@@ -1757,6 +1758,7 @@ static int __init i915_init(void)
+@@ -1739,6 +1740,7 @@ static int __init i915_init(void)
#endif
if (!(driver.driver_features & DRIVER_MODESET)) {
@@ -43353,7 +45922,7 @@ index a6ad938..ad4ff46 100644
/* Silently fail loading to not upset userspace. */
DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
return 0;
-@@ -1764,6 +1766,7 @@ static int __init i915_init(void)
+@@ -1746,6 +1748,7 @@ static int __init i915_init(void)
if (i915.nuclear_pageflip)
driver.driver_features |= DRIVER_ATOMIC;
@@ -43362,10 +45931,10 @@ index a6ad938..ad4ff46 100644
return drm_pci_init(&driver, &i915_pci_driver);
}
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
-index d3ce4da..73a3dda 100644
+index b0847b9..c6116c8 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
-@@ -2637,7 +2637,7 @@ struct drm_i915_cmd_table {
+@@ -2665,7 +2665,7 @@ struct drm_i915_cmd_table {
#include "i915_trace.h"
extern const struct drm_ioctl_desc i915_ioctls[];
@@ -43375,10 +45944,10 @@ index d3ce4da..73a3dda 100644
extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
extern int i915_resume_switcheroo(struct drm_device *dev);
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-index 6ed7d63a..1863cfa 100644
+index dccb517..c5da26b 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-@@ -965,12 +965,12 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
+@@ -1001,12 +1001,12 @@ i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
static int
validate_exec_list(struct drm_device *dev,
struct drm_i915_gem_exec_object2 *exec,
@@ -43394,10 +45963,10 @@ index 6ed7d63a..1863cfa 100644
invalid_flags = __EXEC_OBJECT_UNKNOWN_FLAGS;
if (USES_FULL_PPGTT(dev))
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
-index 86c7500..f4d2025 100644
+index 56f4f2e..5f6e773 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
-@@ -2953,8 +2953,8 @@ static void chv_setup_private_ppat(struct drm_i915_private *dev_priv)
+@@ -3011,8 +3011,8 @@ static void chv_setup_private_ppat(struct drm_i915_private *dev_priv)
static int gen8_gmch_probe(struct drm_device *dev,
u64 *gtt_total,
@@ -43408,7 +45977,7 @@ index 86c7500..f4d2025 100644
u64 *mappable_end)
{
struct drm_i915_private *dev_priv = dev->dev_private;
-@@ -3001,8 +3001,8 @@ static int gen8_gmch_probe(struct drm_device *dev,
+@@ -3062,8 +3062,8 @@ static int gen8_gmch_probe(struct drm_device *dev,
static int gen6_gmch_probe(struct drm_device *dev,
u64 *gtt_total,
@@ -43419,7 +45988,7 @@ index 86c7500..f4d2025 100644
u64 *mappable_end)
{
struct drm_i915_private *dev_priv = dev->dev_private;
-@@ -3052,8 +3052,8 @@ static void gen6_gmch_remove(struct i915_address_space *vm)
+@@ -3113,8 +3113,8 @@ static void gen6_gmch_remove(struct i915_address_space *vm)
static int i915_gmch_probe(struct drm_device *dev,
u64 *gtt_total,
@@ -43430,7 +45999,7 @@ index 86c7500..f4d2025 100644
u64 *mappable_end)
{
struct drm_i915_private *dev_priv = dev->dev_private;
-@@ -3121,8 +3121,8 @@ int i915_gem_gtt_init(struct drm_device *dev)
+@@ -3182,8 +3182,8 @@ int i915_gem_gtt_init(struct drm_device *dev)
/* GMADR is the PCI mmio aperture into the global GTT. */
DRM_INFO("Memory usable by graphics device = %lluM\n",
gtt->base.total >> 20);
@@ -43442,10 +46011,10 @@ index 86c7500..f4d2025 100644
if (intel_iommu_gfx_mapped)
DRM_INFO("VT-d active for gfx access\n");
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
-index a216397..2906614 100644
+index b448ad8..422a8c5 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
-@@ -344,11 +344,11 @@ struct i915_address_space {
+@@ -341,11 +341,11 @@ struct i915_address_space {
struct i915_gtt {
struct i915_address_space base;
@@ -43459,7 +46028,7 @@ index a216397..2906614 100644
/** "Graphics Stolen Memory" holds the global PTEs */
void __iomem *gsm;
-@@ -359,7 +359,7 @@ struct i915_gtt {
+@@ -356,7 +356,7 @@ struct i915_gtt {
/* global gtt ops */
int (*gtt_probe)(struct drm_device *dev, u64 *gtt_total,
@@ -43502,10 +46071,10 @@ index 97f3a56..32c712e 100644
ret = drm_ioctl(filp, cmd, arg);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
-index 0f42a27..8d376ee 100644
+index fa8afa7..0bac957 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
-@@ -4399,14 +4399,15 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
+@@ -4490,14 +4490,15 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
pm_qos_add_request(&dev_priv->pm_qos, PM_QOS_CPU_DMA_LATENCY, PM_QOS_DEFAULT_VALUE);
@@ -43524,7 +46093,7 @@ index 0f42a27..8d376ee 100644
dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
}
-@@ -4418,32 +4419,32 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
+@@ -4509,32 +4510,32 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
if (!IS_GEN2(dev_priv))
dev->vblank_disable_immediate = true;
@@ -43577,7 +46146,7 @@ index 0f42a27..8d376ee 100644
if (IS_BROXTON(dev))
dev_priv->display.hpd_irq_setup = bxt_hpd_irq_setup;
else if (HAS_PCH_SPT(dev))
-@@ -4451,35 +4452,36 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
+@@ -4542,35 +4543,36 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
else
dev_priv->display.hpd_irq_setup = ilk_hpd_irq_setup;
} else if (HAS_PCH_SPLIT(dev)) {
@@ -43635,10 +46204,10 @@ index 0f42a27..8d376ee 100644
/**
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
-index f859a5b..c6ef76b 100644
+index 46947ff..c3efaa4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -14731,13 +14731,13 @@ struct intel_quirk {
+@@ -15106,13 +15106,13 @@ struct intel_quirk {
int subsystem_vendor;
int subsystem_device;
void (*hook)(struct drm_device *dev);
@@ -43654,7 +46223,7 @@ index f859a5b..c6ef76b 100644
static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
{
-@@ -14745,18 +14745,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
+@@ -15120,18 +15120,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
return 1;
}
@@ -43686,10 +46255,10 @@ index f859a5b..c6ef76b 100644
},
};
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
-index 7b990b4..452d7e4 100644
+index 2f57d79..7152e6e 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
-@@ -354,7 +354,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
+@@ -348,7 +348,7 @@ int imx_drm_add_crtc(struct drm_device *drm, struct drm_crtc *crtc,
if (imxdrm->pipes >= MAX_CRTC)
return -EINVAL;
@@ -43822,6 +46391,32 @@ index 792f924..aeb1334 100644
-int mga_max_ioctl = ARRAY_SIZE(mga_ioctls);
+const int mga_max_ioctl = ARRAY_SIZE(mga_ioctls);
+diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
+index dc13c48..7d8d1cd 100644
+--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
+@@ -1586,7 +1586,7 @@ static uint32_t mga_vga_calculate_mode_bandwidth(struct drm_display_mode *mode,
+
+ #define MODE_BANDWIDTH MODE_BAD
+
+-static int mga_vga_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status mga_vga_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
+diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
+index d5e6938..3c38707 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
++++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
+@@ -193,7 +193,7 @@ static int nouveau_dsm_power_state(enum vga_switcheroo_client_id id,
+ return nouveau_dsm_set_discrete_state(nouveau_dsm_priv.dhandle, state);
+ }
+
+-static int nouveau_dsm_get_client_id(struct pci_dev *pdev)
++static enum vga_switcheroo_client_id nouveau_dsm_get_client_id(struct pci_dev *pdev)
+ {
+ /* easy option one - intel vendor ID means Integrated */
+ if (pdev->vendor == PCI_VENDOR_ID_INTEL)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 4dca65a..3486961 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -43835,11 +46430,24 @@ index 4dca65a..3486961 100644
#define BIT_TABLE(id, funcid) ((struct bit_table){ id, parse_bit_##funcid##_tbl_entry })
+diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
+index fcebfae..2a7341d 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
++++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
+@@ -843,7 +843,7 @@ get_tmds_link_bandwidth(struct drm_connector *connector, bool hdmi)
+ return 112000;
+ }
+
+-static int
++static enum drm_mode_status
+ nouveau_connector_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
-index 1d3ee51..5fb4449 100644
+index 2f2f252e..305b42e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
-@@ -76,9 +76,8 @@ MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1
+@@ -80,9 +80,8 @@ MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1
int nouveau_runtime_pm = -1;
module_param_named(runpm, nouveau_runtime_pm, int, 0400);
@@ -43850,7 +46458,7 @@ index 1d3ee51..5fb4449 100644
static u64
nouveau_pci_name(struct pci_dev *pdev)
-@@ -915,7 +914,7 @@ nouveau_driver_fops = {
+@@ -919,7 +918,7 @@ nouveau_driver_fops = {
};
static struct drm_driver
@@ -43859,16 +46467,16 @@ index 1d3ee51..5fb4449 100644
.driver_features =
DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER |
DRIVER_KMS_LEGACY_CONTEXT,
-@@ -927,6 +926,8 @@ driver_stub = {
+@@ -931,6 +930,8 @@ driver_stub = {
.postclose = nouveau_drm_postclose,
.lastclose = nouveau_vga_lastclose,
+ .set_busid = drm_pci_set_busid,
+
#if defined(CONFIG_DEBUG_FS)
- .debugfs_init = nouveau_debugfs_init,
- .debugfs_cleanup = nouveau_debugfs_takedown,
-@@ -1064,10 +1065,10 @@ err_free:
+ .debugfs_init = nouveau_drm_debugfs_init,
+ .debugfs_cleanup = nouveau_drm_debugfs_cleanup,
+@@ -1063,10 +1064,10 @@ err_free:
static int __init
nouveau_drm_init(void)
{
@@ -43883,7 +46491,7 @@ index 1d3ee51..5fb4449 100644
nouveau_display_options();
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h
-index a02813e..c30a6b0 100644
+index 5c363ed..98fa924 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
@@ -124,7 +124,6 @@ struct nouveau_drm {
@@ -43960,6 +46568,31 @@ index d2e7d20..7bbe51f 100644
};
int
+diff --git a/drivers/gpu/drm/nouveau/nouveau_usif.c b/drivers/gpu/drm/nouveau/nouveau_usif.c
+index e9f52ef..b25cd62 100644
+--- a/drivers/gpu/drm/nouveau/nouveau_usif.c
++++ b/drivers/gpu/drm/nouveau/nouveau_usif.c
+@@ -186,6 +186,11 @@ usif_notify_del(struct drm_file *f, void *data, u32 size, void *argv, u32 argc)
+ return ret;
+ }
+
++static void usif_notify_release(struct drm_pending_event *event)
++{
++ kfree(event);
++}
++
+ static int
+ usif_notify_get(struct drm_file *f, void *data, u32 size, void *argv, u32 argc)
+ {
+@@ -212,7 +217,7 @@ usif_notify_get(struct drm_file *f, void *data, u32 size, void *argv, u32 argc)
+ ntfy->p->base.event = &ntfy->p->e.base;
+ ntfy->p->base.file_priv = f;
+ ntfy->p->base.pid = current->pid;
+- ntfy->p->base.destroy =(void(*)(struct drm_pending_event *))kfree;
++ ntfy->p->base.destroy = usif_notify_release;
+ ntfy->p->e.base.type = DRM_NOUVEAU_EVENT_NVIF;
+ ntfy->p->e.base.length = sizeof(ntfy->p->e.base) + ntfy->reply;
+
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
index af89c36..83ef136 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vga.c
@@ -43973,19 +46606,85 @@ index af89c36..83ef136 100644
}
static const struct vga_switcheroo_client_ops
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
+index b2557e8..2d4f9f4 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
+@@ -151,11 +151,16 @@ shadow_fw_init(struct nvkm_bios *bios, const char *name)
+ return (void *)fw;
+ }
+
++static void shadow_fw_fini(void *fw)
++{
++ release_firmware(fw);
++}
++
+ static const struct nvbios_source
+ shadow_fw = {
+ .name = "firmware",
+ .init = shadow_fw_init,
+- .fini = (void(*)(void *))release_firmware,
++ .fini = shadow_fw_fini,
+ .read = shadow_fw_read,
+ .rw = false,
+ };
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
+index 9b91da0..b3fa90d 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowpci.c
+@@ -111,11 +111,16 @@ platform_init(struct nvkm_bios *bios, const char *name)
+ return ERR_PTR(ret);
+ }
+
++static void platform_fini(void *data)
++{
++ kfree(data);
++}
++
+ const struct nvbios_source
+ nvbios_platform = {
+ .name = "PLATFORM",
+ .init = platform_init,
+- .fini = (void(*)(void *))kfree,
++ .fini = platform_fini,
+ .read = pcirom_read,
+ .rw = true,
+ };
diff --git a/drivers/gpu/drm/omapdrm/Makefile b/drivers/gpu/drm/omapdrm/Makefile
-index 778372b..4b81cb4 100644
+index fe4c222..48b7b75 100644
--- a/drivers/gpu/drm/omapdrm/Makefile
+++ b/drivers/gpu/drm/omapdrm/Makefile
-@@ -3,7 +3,7 @@
- # Direct Rendering Infrastructure (DRI)
- #
+@@ -6,7 +6,7 @@
+ obj-y += dss/
+ obj-y += displays/
-ccflags-y := -Iinclude/drm -Werror
+ccflags-y := -Iinclude/drm
omapdrm-y := omap_drv.o \
omap_irq.o \
omap_debugfs.o \
+diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c
+index ef5b902..47cf7f5 100644
+--- a/drivers/gpu/drm/omapdrm/dss/display.c
++++ b/drivers/gpu/drm/omapdrm/dss/display.c
+@@ -161,12 +161,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
+ if (dssdev->name == NULL)
+ dssdev->name = dssdev->alias;
+
++ pax_open_kernel();
+ if (drv && drv->get_resolution == NULL)
+- drv->get_resolution = omapdss_default_get_resolution;
++ *(void **)&drv->get_resolution = omapdss_default_get_resolution;
+ if (drv && drv->get_recommended_bpp == NULL)
+- drv->get_recommended_bpp = omapdss_default_get_recommended_bpp;
++ *(void **)&drv->get_recommended_bpp = omapdss_default_get_recommended_bpp;
+ if (drv && drv->get_timings == NULL)
+- drv->get_timings = omapdss_default_get_timings;
++ *(void **)&drv->get_timings = omapdss_default_get_timings;
++ pax_close_kernel();
+
+ mutex_lock(&panel_list_mutex);
+ list_add_tail(&dssdev->panel_list, &panel_list);
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index fdc1833..f307630 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -44043,6 +46742,19 @@ index 6911b8c..89d6867 100644
seq_printf(m, "%d\n", qdev->irq_received_error);
return 0;
}
+diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
+index 8627651..87df69f 100644
+--- a/drivers/gpu/drm/qxl/qxl_display.c
++++ b/drivers/gpu/drm/qxl/qxl_display.c
+@@ -831,7 +831,7 @@ static int qxl_conn_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int qxl_conn_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status qxl_conn_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *ddev = connector->dev;
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 7307b07..8eecdd0 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
@@ -44070,7 +46782,7 @@ index 7307b07..8eecdd0 100644
}
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
-index 01a8694..584fb48 100644
+index 6e6b9b1..4462096 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -290,10 +290,10 @@ struct qxl_device {
@@ -44174,7 +46886,7 @@ index 0bf1e20..42a7310 100644
ret = drm_irq_install(qdev->ddev, qdev->ddev->pdev->irq);
qdev->ram_header->int_mask = QXL_INTERRUPT_MASK;
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
-index 0cbc4c9..0e46686 100644
+index 9534127..3fbab8c 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -103,7 +103,7 @@ static void qxl_ttm_global_fini(struct qxl_device *qdev)
@@ -44395,8 +47107,70 @@ index b928c17..e5d9400 100644
if (regcomp
(&mask_rex, "(0x[0-9a-fA-F]*) *([_a-zA-Z0-9]*)", REG_EXTENDED)) {
+diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+index 9bc408c..3bb75f5 100644
+--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
++++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+@@ -491,7 +491,7 @@ static int radeon_atpx_init(void)
+ * look up whether we are the integrated or discrete GPU (all asics).
+ * Returns the client id.
+ */
+-static int radeon_atpx_get_client_id(struct pci_dev *pdev)
++static enum vga_switcheroo_client_id radeon_atpx_get_client_id(struct pci_dev *pdev)
+ {
+ if (radeon_atpx_priv.dhandle == ACPI_HANDLE(&pdev->dev))
+ return VGA_SWITCHEROO_IGD;
+diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
+index 340f3f5..3a0afbe 100644
+--- a/drivers/gpu/drm/radeon/radeon_connectors.c
++++ b/drivers/gpu/drm/radeon/radeon_connectors.c
+@@ -851,7 +851,7 @@ static int radeon_lvds_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int radeon_lvds_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_encoder *encoder = radeon_best_single_encoder(connector);
+@@ -994,7 +994,7 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int radeon_vga_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
+@@ -1133,7 +1133,7 @@ static int radeon_tv_get_modes(struct drm_connector *connector)
+ return 1;
+ }
+
+-static int radeon_tv_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ if ((mode->hdisplay > 1024) || (mode->vdisplay > 768))
+@@ -1464,7 +1464,7 @@ static void radeon_dvi_force(struct drm_connector *connector)
+ radeon_connector->use_digital = true;
+ }
+
+-static int radeon_dvi_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
+@@ -1761,7 +1761,7 @@ out:
+ return ret;
+ }
+
+-static int radeon_dp_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct drm_device *dev = connector->dev;
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
-index f78f111..3df7de6 100644
+index e239633..4ae1159 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1259,7 +1259,7 @@ static bool radeon_switcheroo_can_switch(struct pci_dev *pdev)
@@ -44409,7 +47183,7 @@ index f78f111..3df7de6 100644
static const struct vga_switcheroo_client_ops radeon_switcheroo_ops = {
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
-index 5b6a6f5..7f4e55a 100644
+index e266ffc..0392d08 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -130,7 +130,7 @@ extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc,
@@ -44421,7 +47195,7 @@ index 5b6a6f5..7f4e55a 100644
int radeon_mmap(struct file *filp, struct vm_area_struct *vma);
int radeon_mode_dumb_mmap(struct drm_file *filp,
struct drm_device *dev,
-@@ -566,7 +566,7 @@ static struct drm_driver kms_driver = {
+@@ -484,7 +484,7 @@ static struct drm_driver kms_driver = {
.driver_features =
DRIVER_USE_AGP |
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM |
@@ -44430,7 +47204,7 @@ index 5b6a6f5..7f4e55a 100644
.load = radeon_driver_load_kms,
.open = radeon_driver_open_kms,
.preclose = radeon_driver_preclose_kms,
-@@ -650,8 +650,11 @@ static int __init radeon_init(void)
+@@ -561,8 +561,11 @@ static int __init radeon_init(void)
DRM_INFO("radeon kernel modesetting enabled.\n");
driver = &kms_driver;
pdriver = &radeon_kms_pci_driver;
@@ -44444,41 +47218,6 @@ index 5b6a6f5..7f4e55a 100644
radeon_register_atpx_handler();
} else {
-@@ -659,8 +662,10 @@ static int __init radeon_init(void)
- DRM_INFO("radeon userspace modesetting enabled.\n");
- driver = &driver_old;
- pdriver = &radeon_pci_driver;
-- driver->driver_features &= ~DRIVER_MODESET;
-- driver->num_ioctls = radeon_max_ioctl;
-+
-+ pax_open_kernel();
-+ *(int *)&driver->num_ioctls = radeon_max_ioctl;
-+ pax_close_kernel();
- #else
- DRM_ERROR("No UMS support in radeon module!\n");
- return -EINVAL;
-diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
-index 0caafc7..32afc20 100644
---- a/drivers/gpu/drm/radeon/radeon_drv.h
-+++ b/drivers/gpu/drm/radeon/radeon_drv.h
-@@ -264,7 +264,7 @@ typedef struct drm_radeon_private {
-
- /* SW interrupt */
- wait_queue_head_t swi_queue;
-- atomic_t swi_emitted;
-+ atomic_unchecked_t swi_emitted;
- int vblank_crtc;
- uint32_t irq_enable_reg;
- uint32_t r500_disp_irq_reg;
-@@ -336,7 +336,7 @@ typedef struct drm_radeon_kcmd_buffer {
-
- extern int radeon_no_wb;
- extern struct drm_ioctl_desc radeon_ioctls[];
--extern int radeon_max_ioctl;
-+extern const int radeon_max_ioctl;
-
- extern u32 radeon_get_ring_head(drm_radeon_private_t *dev_priv);
- extern void radeon_set_ring_head(drm_radeon_private_t *dev_priv, u32 val);
diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c b/drivers/gpu/drm/radeon/radeon_ioc32.c
index 0b98ea1..a3c770f 100644
--- a/drivers/gpu/drm/radeon/radeon_ioc32.c
@@ -44521,68 +47260,43 @@ index 0b98ea1..a3c770f 100644
else
ret = drm_ioctl(filp, cmd, arg);
-diff --git a/drivers/gpu/drm/radeon/radeon_irq.c b/drivers/gpu/drm/radeon/radeon_irq.c
-index 688afb6..4b95df6 100644
---- a/drivers/gpu/drm/radeon/radeon_irq.c
-+++ b/drivers/gpu/drm/radeon/radeon_irq.c
-@@ -226,8 +226,8 @@ static int radeon_emit_irq(struct drm_device * dev)
- unsigned int ret;
- RING_LOCALS;
-
-- atomic_inc(&dev_priv->swi_emitted);
-- ret = atomic_read(&dev_priv->swi_emitted);
-+ atomic_inc_unchecked(&dev_priv->swi_emitted);
-+ ret = atomic_read_unchecked(&dev_priv->swi_emitted);
-
- BEGIN_RING(4);
- OUT_RING_REG(RADEON_LAST_SWI_REG, ret);
-@@ -353,7 +353,7 @@ int radeon_driver_irq_postinstall(struct drm_device *dev)
- drm_radeon_private_t *dev_priv =
- (drm_radeon_private_t *) dev->dev_private;
-
-- atomic_set(&dev_priv->swi_emitted, 0);
-+ atomic_set_unchecked(&dev_priv->swi_emitted, 0);
- init_waitqueue_head(&dev_priv->swi_queue);
-
- dev->max_vblank_count = 0x001fffff;
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
-index d290a8a..e165ba9 100644
+index 414953c..1b26674 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
+@@ -822,7 +822,7 @@ u32 radeon_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
+ * Enable the interrupt on the requested crtc (all asics).
+ * Returns 0 on success, -EINVAL on failure.
+ */
+-int radeon_enable_vblank_kms(struct drm_device *dev, int crtc)
++int radeon_enable_vblank_kms(struct drm_device *dev, unsigned int crtc)
+ {
+ struct radeon_device *rdev = dev->dev_private;
+ unsigned long irqflags;
+@@ -848,7 +848,7 @@ int radeon_enable_vblank_kms(struct drm_device *dev, int crtc)
+ *
+ * Disable the interrupt on the requested crtc (all asics).
+ */
+-void radeon_disable_vblank_kms(struct drm_device *dev, int crtc)
++void radeon_disable_vblank_kms(struct drm_device *dev, unsigned int crtc)
+ {
+ struct radeon_device *rdev = dev->dev_private;
+ unsigned long irqflags;
+@@ -877,7 +877,7 @@ void radeon_disable_vblank_kms(struct drm_device *dev, int crtc)
+ * scanout position. (all asics).
+ * Returns postive status flags on success, negative error on failure.
+ */
+-int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
++int radeon_get_vblank_timestamp_kms(struct drm_device *dev, unsigned int crtc,
+ int *max_error,
+ struct timeval *vblank_time,
+ unsigned flags)
@@ -946,4 +946,4 @@ const struct drm_ioctl_desc radeon_ioctls_kms[] = {
DRM_IOCTL_DEF_DRV(RADEON_GEM_OP, radeon_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
DRM_IOCTL_DEF_DRV(RADEON_GEM_USERPTR, radeon_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
};
-int radeon_max_kms_ioctl = ARRAY_SIZE(radeon_ioctls_kms);
+const int radeon_max_kms_ioctl = ARRAY_SIZE(radeon_ioctls_kms);
-diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
-index 15aee72..c6df119 100644
---- a/drivers/gpu/drm/radeon/radeon_state.c
-+++ b/drivers/gpu/drm/radeon/radeon_state.c
-@@ -2168,7 +2168,7 @@ static int radeon_cp_clear(struct drm_device *dev, void *data, struct drm_file *
- if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS)
- sarea_priv->nbox = RADEON_NR_SAREA_CLIPRECTS;
-
-- if (copy_from_user(&depth_boxes, clear->depth_boxes,
-+ if (sarea_priv->nbox > RADEON_NR_SAREA_CLIPRECTS || copy_from_user(&depth_boxes, clear->depth_boxes,
- sarea_priv->nbox * sizeof(depth_boxes[0])))
- return -EFAULT;
-
-@@ -3031,7 +3031,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
- {
- drm_radeon_private_t *dev_priv = dev->dev_private;
- drm_radeon_getparam_t *param = data;
-- int value;
-+ int value = 0;
-
- DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
-
-@@ -3258,4 +3258,4 @@ struct drm_ioctl_desc radeon_ioctls[] = {
- DRM_IOCTL_DEF_DRV(RADEON_CS, r600_cs_legacy_ioctl, DRM_AUTH)
- };
-
--int radeon_max_ioctl = ARRAY_SIZE(radeon_ioctls);
-+const int radeon_max_ioctl = ARRAY_SIZE(radeon_ioctls);
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index e06ac54..46eabfd 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -44685,10 +47399,10 @@ index 93ad8a5..48f0a57 100644
-int sis_max_ioctl = ARRAY_SIZE(sis_ioctls);
+const int sis_max_ioctl = ARRAY_SIZE(sis_ioctls);
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
-index e9f24a8..d790ccc 100644
+index dde6f20..1969ca6 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
-@@ -1654,7 +1654,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
+@@ -1657,7 +1657,7 @@ static int tegra_dc_debugfs_init(struct tegra_dc *dc, struct drm_minor *minor)
}
for (i = 0; i < ARRAY_SIZE(debugfs_files); i++)
@@ -44698,7 +47412,7 @@ index e9f24a8..d790ccc 100644
err = drm_debugfs_create_files(dc->debugfs_files,
ARRAY_SIZE(debugfs_files),
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
-index f0a138e..a390c07 100644
+index 44e1027..3548928 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -62,7 +62,7 @@ struct tegra_dsi {
@@ -44711,7 +47425,7 @@ index f0a138e..a390c07 100644
struct dentry *debugfs;
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
-index 52b32cb..a8b2d5b 100644
+index b7ef492..8968507 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -64,7 +64,7 @@ struct tegra_hdmi {
@@ -44724,7 +47438,7 @@ index 52b32cb..a8b2d5b 100644
struct dentry *debugfs;
};
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
-index 3eff7cf..06e8322 100644
+index 757c6e8..710a6ff 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1003,8 +1003,11 @@ static int tegra_sor_debugfs_init(struct tegra_sor *sor,
@@ -44953,11 +47667,24 @@ index 624d941..106fa1f 100644
p->pool->dev_name, p->pool->name, current->pid,
nr_free, shrink_pages);
}
+diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
+index 4709b54..beb015d 100644
+--- a/drivers/gpu/drm/udl/udl_connector.c
++++ b/drivers/gpu/drm/udl/udl_connector.c
+@@ -80,7 +80,7 @@ static int udl_get_modes(struct drm_connector *connector)
+ return ret;
+ }
+
+-static int udl_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status udl_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct udl_device *udl = connector->dev->dev_private;
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
-index 73e41a8..46d7a6a 100644
+index 18a2acb..0ca5376 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
-@@ -367,7 +367,6 @@ static int udl_fb_release(struct fb_info *info, int user)
+@@ -366,7 +366,6 @@ static int udl_fb_release(struct fb_info *info, int user)
fb_deferred_io_cleanup(info);
kfree(info->fbdefio);
info->fbdefio = NULL;
@@ -44965,6 +47692,32 @@ index 73e41a8..46d7a6a 100644
}
pr_warn("released /dev/fb%d user=%d count=%d\n",
+diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
+index f1655ff..e40254b 100644
+--- a/drivers/gpu/drm/vc4/vc4_drv.c
++++ b/drivers/gpu/drm/vc4/vc4_drv.c
+@@ -142,6 +142,11 @@ static int compare_dev(struct device *dev, void *data)
+ return dev == data;
+ }
+
++static int vc4_match(struct device *dev, void *drv)
++{
++ return platform_bus_type.match(dev, drv);
++}
++
+ static void vc4_match_add_drivers(struct device *dev,
+ struct component_match **match,
+ struct platform_driver *const *drivers,
+@@ -153,8 +158,7 @@ static void vc4_match_add_drivers(struct device *dev,
+ struct device_driver *drv = &drivers[i]->driver;
+ struct device *p = NULL, *d;
+
+- while ((d = bus_find_device(&platform_bus_type, p, drv,
+- (void *)platform_bus_type.match))) {
++ while ((d = bus_find_device(&platform_bus_type, p, drv, vc4_match))) {
+ put_device(p);
+ component_match_add(dev, match, compare_dev, d);
+ p = d;
diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c
index d17d8f2..67e8e48b 100644
--- a/drivers/gpu/drm/via/via_dma.c
@@ -45096,6 +47849,19 @@ index ea8172c..6ceff63 100644
irqwait->request.type &= ~_DRM_VBLANK_RELATIVE;
case VIA_IRQ_ABSOLUTE:
break;
+diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
+index a165f03..d89bd6a 100644
+--- a/drivers/gpu/drm/virtio/virtgpu_display.c
++++ b/drivers/gpu/drm/virtio/virtgpu_display.c
+@@ -330,7 +330,7 @@ static int virtio_gpu_conn_get_modes(struct drm_connector *connector)
+ return count;
+ }
+
+-static int virtio_gpu_conn_mode_valid(struct drm_connector *connector,
++static enum drm_mode_status virtio_gpu_conn_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
+ {
+ struct virtio_gpu_output *output =
diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c
index 9fd924c..c64b065 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
@@ -45130,6 +47896,31 @@ index 469cdd5..958866a 100644
wait_queue_head_t fence_queue;
wait_queue_head_t fifo_queue;
spinlock_t waiter_lock;
+diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+index 8e689b4..6c9eb8f 100644
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+@@ -1016,6 +1016,11 @@ struct vmw_event_fence_pending {
+ struct drm_vmw_event_fence event;
+ };
+
++static void vmw_event_fence_dmabuf_destroy(struct drm_pending_event *event)
++{
++ kfree(event);
++}
++
+ static int vmw_event_fence_action_create(struct drm_file *file_priv,
+ struct vmw_fence_obj *fence,
+ uint32_t flags,
+@@ -1055,7 +1060,7 @@ static int vmw_event_fence_action_create(struct drm_file *file_priv,
+
+ event->base.event = &event->event.base;
+ event->base.file_priv = file_priv;
+- event->base.destroy = (void (*) (struct drm_pending_event *)) kfree;
++ event->base.destroy = vmw_event_fence_dmabuf_destroy;
+
+
+ if (flags & DRM_VMW_FE_FLAG_REQ_TIME)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index b6a0806..9fb5479 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -45225,10 +48016,10 @@ index efd1ffd..0ae13ca 100644
marker = list_first_entry(&queue->head,
struct vmw_marker, head);
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
-index 41edd5a..cb008f0 100644
+index 665ab9f..7006609 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
-@@ -910,7 +910,7 @@ static int vga_switcheroo_runtime_resume(struct device *dev)
+@@ -911,7 +911,7 @@ static int vga_switcheroo_runtime_resume(struct device *dev)
* where the power switch is separate to the device being powered down.
*/
int vga_switcheroo_init_domain_pm_ops(struct device *dev,
@@ -45237,7 +48028,7 @@ index 41edd5a..cb008f0 100644
{
/* copy over all the bus versions */
if (dev->bus && dev->bus->pm) {
-@@ -981,7 +981,7 @@ static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev)
+@@ -982,7 +982,7 @@ static int vga_switcheroo_runtime_resume_hdmi_audio(struct device *dev)
*/
int
vga_switcheroo_init_domain_pm_optimus_hdmi_audio(struct device *dev,
@@ -45247,7 +48038,7 @@ index 41edd5a..cb008f0 100644
/* copy over all the bus versions */
if (dev->bus && dev->bus->pm) {
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
-index ec791e1..169a46d 100644
+index 99446ff..ab93719 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2584,7 +2584,7 @@ EXPORT_SYMBOL_GPL(hid_ignore);
@@ -45268,6 +48059,19 @@ index ec791e1..169a46d 100644
hid_debug_register(hdev, dev_name(&hdev->dev));
ret = device_add(&hdev->dev);
+diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
+index d6fa496..dde31aa 100644
+--- a/drivers/hid/hid-magicmouse.c
++++ b/drivers/hid/hid-magicmouse.c
+@@ -34,7 +34,7 @@ module_param(emulate_scroll_wheel, bool, 0644);
+ MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel");
+
+ static unsigned int scroll_speed = 32;
+-static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
++static int param_set_scroll_speed(const char *val, const struct kernel_param *kp) {
+ unsigned long speed;
+ if (!val || kstrtoul(val, 0, &speed) || speed > 63)
+ return -EINVAL;
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
index 5614fee..8a6f5f6 100644
--- a/drivers/hid/hid-sensor-custom.c
@@ -45295,10 +48099,10 @@ index c13fb5b..55a3802 100644
*off += size;
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
-index 9098f13..19a4855 100644
+index 1161d68..7a42e2c 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
-@@ -382,7 +382,7 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
+@@ -383,7 +383,7 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
int ret = 0;
next_gpadl_handle =
@@ -45307,7 +48111,7 @@ index 9098f13..19a4855 100644
ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
if (ret)
-@@ -705,9 +705,7 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel,
+@@ -728,9 +728,7 @@ int vmbus_sendpacket_pagebuffer_ctl(struct vmbus_channel *channel,
* Adjust the size down since vmbus_channel_packet_page_buffer is the
* largest size we support
*/
@@ -45319,10 +48123,10 @@ index 9098f13..19a4855 100644
packetlen_aligned = ALIGN(packetlen, sizeof(u64));
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
-index 6341be8..1a2fc8d 100644
+index 11bca51..17bdc9b 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
-@@ -95,7 +95,7 @@ static u64 do_hypercall(u64 control, void *input, void *output)
+@@ -95,7 +95,7 @@ u64 hv_do_hypercall(u64 control, void *input, void *output)
{
u64 input_address = (input) ? virt_to_phys(input) : 0;
u64 output_address = (output) ? virt_to_phys(output) : 0;
@@ -45331,7 +48135,7 @@ index 6341be8..1a2fc8d 100644
#ifdef CONFIG_X86_64
u64 hv_status = 0;
-@@ -219,7 +219,7 @@ int hv_init(void)
+@@ -218,7 +218,7 @@ int hv_init(void)
/* See if the hypercall page is already set */
rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
@@ -45426,10 +48230,10 @@ index b853b4b..3647b37 100644
cap_msg.caps.cap_bits.balloon = 1;
cap_msg.caps.cap_bits.hot_add = 1;
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
-index 3782636..7dc4e6c 100644
+index 4ebc796..776f2b1 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
-@@ -654,7 +654,7 @@ enum vmbus_connect_state {
+@@ -568,7 +568,7 @@ enum vmbus_connect_state {
struct vmbus_connection {
enum vmbus_connect_state conn_state;
@@ -45537,11 +48341,11 @@ index c43318d..72f7656 100644
.ident = "Dell Inspiron",
.matches = {
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c
-index 7a8a6fb..015c1fd 100644
+index 1f64378..2b6e615 100644
--- a/drivers/hwmon/ibmaem.c
+++ b/drivers/hwmon/ibmaem.c
@@ -924,7 +924,7 @@ static int aem_register_sensors(struct aem_data *data,
- struct aem_rw_sensor_template *rw)
+ const struct aem_rw_sensor_template *rw)
{
struct device *dev = &data->pdev->dev;
- struct sensor_device_attribute *sensors = data->sensors;
@@ -45563,11 +48367,11 @@ index 17ae2eb..21b71dd 100644
int in_i = 1, temp_i = 1, curr_i = 1, humidity_i = 1;
enum iio_chan_type type;
diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
-index 37f0170..414ec2c 100644
+index 559c596..3de1a96 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
-@@ -397,11 +397,11 @@ static struct attribute_group *
- nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg,
+@@ -404,11 +404,11 @@ nct6683_create_attr_group(struct device *dev,
+ const struct sensor_template_group *tg,
int repeat)
{
- struct sensor_device_attribute_2 *a2;
@@ -45582,11 +48386,11 @@ index 37f0170..414ec2c 100644
int i, j, count;
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
-index d7ebdf8..5d0cfb2 100644
+index d087a8e..54e963a 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
-@@ -1048,10 +1048,10 @@ static struct attribute_group *
- nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
+@@ -1049,10 +1049,10 @@ nct6775_create_attr_group(struct device *dev,
+ const struct sensor_template_group *tg,
int repeat)
{
- struct attribute_group *group;
@@ -45727,7 +48531,7 @@ index 65e3240..e6c511d 100644
/* Wrapper access functions for multiplexed SMBus */
static DEFINE_MUTEX(amd756_lock);
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
-index 1543d35d..6515f503 100644
+index 7368be0..00f2259 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -61,7 +61,7 @@ struct dw_scl_sda_cfg {
@@ -45791,6 +48595,28 @@ index 37a8a90..4724cbd 100644
sector_t block)
{
ide_hwif_t *hwif = drive->hwif;
+diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
+index d127ace..6ee866f 100644
+--- a/drivers/ide/ide.c
++++ b/drivers/ide/ide.c
+@@ -244,7 +244,7 @@ struct chs_geom {
+ static unsigned int ide_disks;
+ static struct chs_geom ide_disks_chs[MAX_HWIFS * MAX_DRIVES];
+
+-static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
++static int ide_set_disk_chs(const char *str, const struct kernel_param *kp)
+ {
+ unsigned int a, b, c = 0, h = 0, s = 0, i, j = 1;
+
+@@ -328,7 +328,7 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit)
+
+ static unsigned int ide_ignore_cable;
+
+-static int ide_set_ignore_cable(const char *s, struct kernel_param *kp)
++static int ide_set_ignore_cable(const char *s, const struct kernel_param *kp)
+ {
+ int i, j = 1;
+
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 146eed70b..7679efd 100644
--- a/drivers/idle/intel_idle.c
@@ -45809,10 +48635,10 @@ index 146eed70b..7679efd 100644
/*
* intel_idle_state_table_update()
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
-index 159ede6..856c0d5 100644
+index af7cc1e..9d2d06c 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
-@@ -594,7 +594,7 @@ static ssize_t iio_write_channel_info(struct device *dev,
+@@ -603,7 +603,7 @@ static ssize_t iio_write_channel_info(struct device *dev,
}
static
@@ -45835,7 +48661,7 @@ index b13936d..65322b2 100644
if (chipset >= AK_MAX_TYPE) {
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
-index d6d2b35..a97866a 100644
+index 1d92e09..215593e 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -115,7 +115,7 @@ static char const counter_group_names[CM_COUNTER_GROUPS]
@@ -45847,6 +48673,15 @@ index d6d2b35..a97866a 100644
};
struct cm_counter_attribute {
+@@ -1432,7 +1432,7 @@ static void cm_format_mra(struct cm_mra_msg *mra_msg,
+ static void cm_format_rej(struct cm_rej_msg *rej_msg,
+ struct cm_id_private *cm_id_priv,
+ enum ib_cm_rej_reason reason,
+- void *ari,
++ const void *ari,
+ u8 ari_length,
+ const void *private_data,
+ u8 private_data_len)
@@ -1476,7 +1476,7 @@ static void cm_dup_req_handler(struct cm_work *work,
struct ib_mad_send_buf *msg = NULL;
int ret;
@@ -45856,7 +48691,7 @@ index d6d2b35..a97866a 100644
counter[CM_REQ_COUNTER]);
/* Quick state check to discard duplicate REQs. */
-@@ -1862,7 +1862,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
+@@ -1884,7 +1884,7 @@ static void cm_dup_rep_handler(struct cm_work *work)
if (!cm_id_priv)
return;
@@ -45865,7 +48700,7 @@ index d6d2b35..a97866a 100644
counter[CM_REP_COUNTER]);
ret = cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg);
if (ret)
-@@ -2029,7 +2029,7 @@ static int cm_rtu_handler(struct cm_work *work)
+@@ -2051,7 +2051,7 @@ static int cm_rtu_handler(struct cm_work *work)
if (cm_id_priv->id.state != IB_CM_REP_SENT &&
cm_id_priv->id.state != IB_CM_MRA_REP_RCVD) {
spin_unlock_irq(&cm_id_priv->lock);
@@ -45874,7 +48709,7 @@ index d6d2b35..a97866a 100644
counter[CM_RTU_COUNTER]);
goto out;
}
-@@ -2212,7 +2212,7 @@ static int cm_dreq_handler(struct cm_work *work)
+@@ -2234,7 +2234,7 @@ static int cm_dreq_handler(struct cm_work *work)
cm_id_priv = cm_acquire_id(dreq_msg->remote_comm_id,
dreq_msg->local_comm_id);
if (!cm_id_priv) {
@@ -45883,7 +48718,7 @@ index d6d2b35..a97866a 100644
counter[CM_DREQ_COUNTER]);
cm_issue_drep(work->port, work->mad_recv_wc);
return -EINVAL;
-@@ -2237,7 +2237,7 @@ static int cm_dreq_handler(struct cm_work *work)
+@@ -2259,7 +2259,7 @@ static int cm_dreq_handler(struct cm_work *work)
case IB_CM_MRA_REP_RCVD:
break;
case IB_CM_TIMEWAIT:
@@ -45892,7 +48727,7 @@ index d6d2b35..a97866a 100644
counter[CM_DREQ_COUNTER]);
if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
goto unlock;
-@@ -2251,7 +2251,7 @@ static int cm_dreq_handler(struct cm_work *work)
+@@ -2273,7 +2273,7 @@ static int cm_dreq_handler(struct cm_work *work)
cm_free_msg(msg);
goto deref;
case IB_CM_DREQ_RCVD:
@@ -45901,7 +48736,23 @@ index d6d2b35..a97866a 100644
counter[CM_DREQ_COUNTER]);
goto unlock;
default:
-@@ -2618,7 +2618,7 @@ static int cm_mra_handler(struct cm_work *work)
+@@ -2336,12 +2336,13 @@ out:
+ }
+
+ int ib_send_cm_rej(struct ib_cm_id *cm_id,
+- enum ib_cm_rej_reason reason,
+- void *ari,
++ int _reason,
++ const void *ari,
+ u8 ari_length,
+ const void *private_data,
+ u8 private_data_len)
+ {
++ enum ib_cm_rej_reason reason = _reason;
+ struct cm_id_private *cm_id_priv;
+ struct ib_mad_send_buf *msg;
+ unsigned long flags;
+@@ -2640,7 +2641,7 @@ static int cm_mra_handler(struct cm_work *work)
ib_modify_mad(cm_id_priv->av.port->mad_agent,
cm_id_priv->msg, timeout)) {
if (cm_id_priv->id.lap_state == IB_CM_MRA_LAP_RCVD)
@@ -45910,7 +48761,7 @@ index d6d2b35..a97866a 100644
counter_group[CM_RECV_DUPLICATES].
counter[CM_MRA_COUNTER]);
goto out;
-@@ -2627,7 +2627,7 @@ static int cm_mra_handler(struct cm_work *work)
+@@ -2649,7 +2650,7 @@ static int cm_mra_handler(struct cm_work *work)
break;
case IB_CM_MRA_REQ_RCVD:
case IB_CM_MRA_REP_RCVD:
@@ -45919,7 +48770,7 @@ index d6d2b35..a97866a 100644
counter[CM_MRA_COUNTER]);
/* fall through */
default:
-@@ -2789,7 +2789,7 @@ static int cm_lap_handler(struct cm_work *work)
+@@ -2811,7 +2812,7 @@ static int cm_lap_handler(struct cm_work *work)
case IB_CM_LAP_IDLE:
break;
case IB_CM_MRA_LAP_SENT:
@@ -45928,7 +48779,7 @@ index d6d2b35..a97866a 100644
counter[CM_LAP_COUNTER]);
if (cm_alloc_response_msg(work->port, work->mad_recv_wc, &msg))
goto unlock;
-@@ -2805,7 +2805,7 @@ static int cm_lap_handler(struct cm_work *work)
+@@ -2827,7 +2828,7 @@ static int cm_lap_handler(struct cm_work *work)
cm_free_msg(msg);
goto deref;
case IB_CM_LAP_RCVD:
@@ -45937,7 +48788,32 @@ index d6d2b35..a97866a 100644
counter[CM_LAP_COUNTER]);
goto unlock;
default:
-@@ -3091,7 +3091,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
+@@ -2859,7 +2860,7 @@ deref: cm_deref_id(cm_id_priv);
+ static void cm_format_apr(struct cm_apr_msg *apr_msg,
+ struct cm_id_private *cm_id_priv,
+ enum ib_cm_apr_status status,
+- void *info,
++ const void *info,
+ u8 info_length,
+ const void *private_data,
+ u8 private_data_len)
+@@ -2879,12 +2880,13 @@ static void cm_format_apr(struct cm_apr_msg *apr_msg,
+ }
+
+ int ib_send_cm_apr(struct ib_cm_id *cm_id,
+- enum ib_cm_apr_status status,
+- void *info,
++ int _status,
++ const void *info,
+ u8 info_length,
+ const void *private_data,
+ u8 private_data_len)
+ {
++ enum ib_cm_apr_status status = _status;
+ struct cm_id_private *cm_id_priv;
+ struct ib_mad_send_buf *msg;
+ unsigned long flags;
+@@ -3113,7 +3115,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
cur_cm_id_priv = cm_insert_remote_sidr(cm_id_priv);
if (cur_cm_id_priv) {
spin_unlock_irq(&cm.lock);
@@ -45946,7 +48822,7 @@ index d6d2b35..a97866a 100644
counter[CM_SIDR_REQ_COUNTER]);
goto out; /* Duplicate message. */
}
-@@ -3305,10 +3305,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
+@@ -3327,10 +3329,10 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
if (!msg->context[0] && (attr_index != CM_REJ_COUNTER))
msg->retries = 1;
@@ -45959,7 +48835,7 @@ index d6d2b35..a97866a 100644
&port->counter_group[CM_XMIT_RETRIES].
counter[attr_index]);
-@@ -3534,7 +3534,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
+@@ -3557,7 +3559,7 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
}
attr_id = be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id);
@@ -45968,7 +48844,7 @@ index d6d2b35..a97866a 100644
counter[attr_id - CM_ATTR_ID_OFFSET]);
work = kmalloc(sizeof *work + sizeof(struct ib_sa_path_rec) * paths,
-@@ -3751,7 +3751,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
+@@ -3764,7 +3766,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
cm_attr = container_of(attr, struct cm_counter_attribute, attr);
return sprintf(buf, "%ld\n",
@@ -45978,7 +48854,7 @@ index d6d2b35..a97866a 100644
static const struct sysfs_ops cm_counter_ops = {
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
-index 9f5ad7c..588cd84 100644
+index 6ac3683..5723799e 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -98,8 +98,8 @@ struct ib_fmr_pool {
@@ -46014,7 +48890,7 @@ index 9f5ad7c..588cd84 100644
!kthread_should_stop())
schedule();
__set_current_state(TASK_RUNNING);
-@@ -282,8 +282,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
+@@ -266,8 +266,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd,
pool->dirty_watermark = params->dirty_watermark;
pool->dirty_len = 0;
spin_lock_init(&pool->pool_lock);
@@ -46025,7 +48901,7 @@ index 9f5ad7c..588cd84 100644
init_waitqueue_head(&pool->force_wait);
pool->thread = kthread_run(ib_fmr_cleanup_thread,
-@@ -411,11 +411,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
+@@ -395,11 +395,11 @@ int ib_flush_fmr_pool(struct ib_fmr_pool *pool)
}
spin_unlock_irq(&pool->pool_lock);
@@ -46039,7 +48915,7 @@ index 9f5ad7c..588cd84 100644
return -EINTR;
return 0;
-@@ -525,7 +525,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
+@@ -509,7 +509,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr)
} else {
list_add_tail(&fmr->list, &pool->dirty_list);
if (++pool->dirty_len >= pool->dirty_watermark) {
@@ -46066,11 +48942,32 @@ index d47df93..93e4cfd 100644
}
}
}
+diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
+index 6b4e8a0..271bdc3 100644
+--- a/drivers/infiniband/core/ucm.c
++++ b/drivers/infiniband/core/ucm.c
+@@ -919,14 +919,14 @@ static ssize_t ib_ucm_send_rej(struct ib_ucm_file *file,
+ const char __user *inbuf,
+ int in_len, int out_len)
+ {
+- return ib_ucm_send_info(file, inbuf, in_len, (void *)ib_send_cm_rej);
++ return ib_ucm_send_info(file, inbuf, in_len, ib_send_cm_rej);
+ }
+
+ static ssize_t ib_ucm_send_apr(struct ib_ucm_file *file,
+ const char __user *inbuf,
+ int in_len, int out_len)
+ {
+- return ib_ucm_send_info(file, inbuf, in_len, (void *)ib_send_cm_apr);
++ return ib_ucm_send_info(file, inbuf, in_len, ib_send_cm_apr);
+ }
+
+ static ssize_t ib_ucm_send_mra(struct ib_ucm_file *file,
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
-index 1c02dea..5f1efa6 100644
+index 6c6fbff..6eb969d 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
-@@ -961,6 +961,9 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file,
+@@ -949,6 +949,9 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file,
if (copy_from_user(&cmd, buf, sizeof cmd))
return -EFAULT;
@@ -46081,7 +48978,7 @@ index 1c02dea..5f1efa6 100644
(unsigned long) cmd.response + sizeof resp,
in_len - sizeof cmd, out_len - sizeof resp);
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
-index 58fce174..f6de2c2 100644
+index 8024ea4..e671455 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -122,7 +122,7 @@ void c4iw_log_wr_stats(struct t4_wq *wq, struct t4_cqe *cqe)
@@ -46102,7 +48999,7 @@ index 58fce174..f6de2c2 100644
(dev->rdev.wr_log_size - 1);
end = idx - 1;
if (end < 0)
-@@ -860,7 +860,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
+@@ -852,7 +852,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
sizeof(*rdev->wr_log), GFP_KERNEL);
if (rdev->wr_log) {
rdev->wr_log_size = 1 << c4iw_wr_log_size_order;
@@ -46112,7 +49009,7 @@ index 58fce174..f6de2c2 100644
pr_err(MOD "error allocating wr_log. Logging disabled\n");
}
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
-index 00e55fa..44a2635 100644
+index fb2de75..67d931a 100644
--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
+++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
@@ -180,7 +180,7 @@ struct c4iw_rdev {
@@ -46125,7 +49022,7 @@ index 00e55fa..44a2635 100644
int wr_log_size;
};
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
-index e1629ab..22d07b9 100644
+index 7849890..cfabd18 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -256,7 +256,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
@@ -46147,10 +49044,10 @@ index e1629ab..22d07b9 100644
PDBG("%s stag_state 0x%0x type 0x%0x pdid 0x%0x, stag_idx 0x%x\n",
__func__, stag_state, type, pdid, stag_idx);
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
-index 870e56b..c1985ce 100644
+index d68f506..00ff84a 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
-@@ -98,7 +98,7 @@ __be64 mlx4_ib_gen_node_guid(void)
+@@ -99,7 +99,7 @@ __be64 mlx4_ib_gen_node_guid(void)
__be64 mlx4_ib_get_new_demux_tid(struct mlx4_ib_demux_ctx *ctx)
{
@@ -46173,10 +49070,10 @@ index 99451d8..a9f0747 100644
ctx->mcg_wq = create_singlethread_workqueue(name);
if (!ctx->mcg_wq)
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
-index 1caa11e..2ebefd7 100644
+index 52ce7b0..8172e21 100644
--- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
+++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
-@@ -450,7 +450,7 @@ struct mlx4_ib_demux_ctx {
+@@ -457,7 +457,7 @@ struct mlx4_ib_demux_ctx {
struct list_head mcg_mgid0_list;
struct workqueue_struct *mcg_wq;
struct mlx4_ib_demux_pv_ctx **tun;
@@ -46270,7 +49167,7 @@ index ed9a989..6aa5dc2 100644
int list_len, u64 iova, u64 total_size,
u32 access, struct mthca_mr *mr)
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
-index dc2d48c..c1deb7b 100644
+index 9866c35..9c627c9 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -772,7 +772,7 @@ unlock:
@@ -46364,7 +49261,7 @@ index bd9d132..70d84f4 100644
extern u32 int_mod_timer_init;
extern u32 int_mod_cq_depth_256;
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
-index 8a3ad17..e1ed4bc 100644
+index cb9f0f2..a0bd53c 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -69,14 +69,14 @@ u32 cm_packets_dropped;
@@ -46392,7 +49289,7 @@ index 8a3ad17..e1ed4bc 100644
@@ -135,28 +135,28 @@ static void record_ird_ord(struct nes_cm_node *, u16, u16);
/* instance of function pointers for client API */
/* set address of this instance to cm_core->cm_ops at cm_core alloc */
- static struct nes_cm_ops nes_cm_api = {
+ static const struct nes_cm_ops nes_cm_api = {
- mini_cm_accelerated,
- mini_cm_listen,
- mini_cm_del_listen,
@@ -46517,7 +49414,7 @@ index 8a3ad17..e1ed4bc 100644
nes_disconnect(nesqp, 1);
cm_id->provider_data = nesqp;
-@@ -3278,7 +3278,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
+@@ -3277,7 +3277,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
nes_debug(NES_DBG_CM, "QP%u, cm_node=%p, jiffies = %lu listener = %p\n",
nesqp->hwqp.qp_id, cm_node, jiffies, cm_node->listener);
@@ -46526,7 +49423,7 @@ index 8a3ad17..e1ed4bc 100644
nes_debug(NES_DBG_CM, "netdev refcnt = %u.\n",
netdev_refcnt_read(nesvnic->netdev));
-@@ -3476,7 +3476,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
+@@ -3473,7 +3473,7 @@ int nes_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
struct nes_cm_core *cm_core;
u8 *start_buff;
@@ -46535,7 +49432,7 @@ index 8a3ad17..e1ed4bc 100644
cm_node = (struct nes_cm_node *)cm_id->provider_data;
loopback = cm_node->loopbackpartner;
cm_core = cm_node->cm_core;
-@@ -3541,7 +3541,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
+@@ -3538,7 +3538,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
ntohs(raddr->sin_port), ntohl(laddr->sin_addr.s_addr),
ntohs(laddr->sin_port));
@@ -46544,7 +49441,7 @@ index 8a3ad17..e1ed4bc 100644
nesqp->active_conn = 1;
/* cache the cm_id in the qp */
-@@ -3688,7 +3688,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
+@@ -3685,7 +3685,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
g_cm_core->api->stop_listener(g_cm_core, (void *)cm_node);
return err;
}
@@ -46553,7 +49450,7 @@ index 8a3ad17..e1ed4bc 100644
}
cm_id->add_ref(cm_id);
-@@ -3795,7 +3795,7 @@ static void cm_event_connected(struct nes_cm_event *event)
+@@ -3792,7 +3792,7 @@ static void cm_event_connected(struct nes_cm_event *event)
if (nesqp->destroyed)
return;
@@ -46562,7 +49459,7 @@ index 8a3ad17..e1ed4bc 100644
nes_debug(NES_DBG_CM, "QP%u attempting to connect to 0x%08X:0x%04X on"
" local port 0x%04X. jiffies = %lu.\n",
nesqp->hwqp.qp_id, ntohl(raddr->sin_addr.s_addr),
-@@ -3980,7 +3980,7 @@ static void cm_event_reset(struct nes_cm_event *event)
+@@ -3977,7 +3977,7 @@ static void cm_event_reset(struct nes_cm_event *event)
cm_id->add_ref(cm_id);
ret = cm_id->event_handler(cm_id, &cm_event);
@@ -46571,7 +49468,7 @@ index 8a3ad17..e1ed4bc 100644
cm_event.event = IW_CM_EVENT_CLOSE;
cm_event.status = 0;
cm_event.provider_data = cm_id->provider_data;
-@@ -4020,7 +4020,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
+@@ -4017,7 +4017,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
return;
cm_id = cm_node->cm_id;
@@ -46580,7 +49477,7 @@ index 8a3ad17..e1ed4bc 100644
nes_debug(NES_DBG_CM, "cm_node = %p - cm_id = %p, jiffies = %lu\n",
cm_node, cm_id, jiffies);
-@@ -4069,7 +4069,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event)
+@@ -4066,7 +4066,7 @@ static void cm_event_mpa_reject(struct nes_cm_event *event)
return;
cm_id = cm_node->cm_id;
@@ -46623,9 +49520,18 @@ index 4166452..fc952c3 100644
}
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
-index 6a0bdfa..f587041 100644
+index 6a0bdfa..57f9580 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
+@@ -462,7 +462,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
+ /**
+ * nes_netdev_start_xmit
+ */
+-static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct nes_vnic *nesvnic = netdev_priv(netdev);
+ struct nes_device *nesdev = nesvnic->nesdev;
@@ -1274,39 +1274,39 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = mh_detected;
target_stat_values[++index] = mh_pauses_sent;
@@ -46687,7 +49593,7 @@ index 6a0bdfa..f587041 100644
/**
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
-index 137880a..f3248f4 100644
+index 8c4daf7..77a87ab 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -46,9 +46,9 @@
@@ -46703,7 +49609,7 @@ index 137880a..f3248f4 100644
static void nes_unregister_ofa_device(struct nes_ib_device *nesibdev);
static int nes_dereg_mr(struct ib_mr *ib_mr);
-@@ -1114,7 +1114,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
+@@ -1040,7 +1040,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
if (init_attr->create_flags)
return ERR_PTR(-EINVAL);
@@ -46712,7 +49618,7 @@ index 137880a..f3248f4 100644
switch (init_attr->qp_type) {
case IB_QPT_RC:
if (nes_drv_opt & NES_DRV_OPT_NO_INLINE_DATA) {
-@@ -1448,7 +1448,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
+@@ -1374,7 +1374,7 @@ static int nes_destroy_qp(struct ib_qp *ibqp)
struct iw_cm_event cm_event;
int ret = 0;
@@ -46733,6 +49639,54 @@ index 7df16f7..7e1b21e 100644
#include "qib_common.h"
#include "qib_verbs.h"
+diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
+index 6c8ff10..73cfbb6 100644
+--- a/drivers/infiniband/hw/qib/qib_iba7322.c
++++ b/drivers/infiniband/hw/qib/qib_iba7322.c
+@@ -150,7 +150,7 @@ static struct kparam_string kp_txselect = {
+ .string = txselect_list,
+ .maxlen = MAX_ATTEN_LEN
+ };
+-static int setup_txselect(const char *, struct kernel_param *);
++static int setup_txselect(const char *, const struct kernel_param *);
+ module_param_call(txselect, setup_txselect, param_get_string,
+ &kp_txselect, S_IWUSR | S_IRUGO);
+ MODULE_PARM_DESC(txselect,
+@@ -6194,7 +6194,7 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
+ }
+
+ /* handle the txselect parameter changing */
+-static int setup_txselect(const char *str, struct kernel_param *kp)
++static int setup_txselect(const char *str, const struct kernel_param *kp)
+ {
+ struct qib_devdata *dd;
+ unsigned long val;
+diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
+index 4758a38..571a55f 100644
+--- a/drivers/infiniband/hw/qib/qib_pcie.c
++++ b/drivers/infiniband/hw/qib/qib_pcie.c
+@@ -628,7 +628,7 @@ static void qib_tune_pcie_caps(struct qib_devdata *dd)
+ * PCI error infrastructure, registered via pci
+ */
+ static pci_ers_result_t
+-qib_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++qib_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct qib_devdata *dd = pci_get_drvdata(pdev);
+ pci_ers_result_t ret = PCI_ERS_RESULT_RECOVERED;
+diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
+index 25509bb..0c443df 100644
+--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
++++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
+@@ -947,7 +947,7 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
+ spin_unlock_irqrestore(&priv->lock, flags);
+ }
+
+-static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+ struct ipoib_neigh *neigh;
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c b/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
index cdc7df4..a2fdfdb 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
@@ -46746,6 +49700,40 @@ index cdc7df4..a2fdfdb 100644
.kind = "ipoib",
.maxtype = IFLA_IPOIB_MAX,
.policy = ipoib_policy,
+diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
+index 4328679..5a01e76 100644
+--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
++++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
+@@ -80,7 +80,7 @@ module_param(srpt_srq_size, int, 0444);
+ MODULE_PARM_DESC(srpt_srq_size,
+ "Shared receive queue (SRQ) size.");
+
+-static int srpt_get_u64_x(char *buffer, struct kernel_param *kp)
++static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
+ {
+ return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
+ }
+@@ -223,8 +223,9 @@ static void srpt_srq_event(struct ib_event *event, void *ctx)
+ /**
+ * srpt_qp_event() - QP event callback function.
+ */
+-static void srpt_qp_event(struct ib_event *event, struct srpt_rdma_ch *ch)
++static void srpt_qp_event(struct ib_event *event, void *_ch)
+ {
++ struct srpt_rdma_ch *ch = _ch;
+ pr_debug("QP event %d on cm_id=%p sess_name=%s state=%d\n",
+ event->event, ch->cm_id, ch->sess_name, srpt_get_ch_state(ch));
+
+@@ -1908,8 +1909,7 @@ retry:
+ }
+
+ qp_init->qp_context = (void *)ch;
+- qp_init->event_handler
+- = (void(*)(struct ib_event *, void*))srpt_qp_event;
++ qp_init->event_handler = srpt_qp_event;
+ qp_init->send_cq = ch->cq;
+ qp_init->recv_cq = ch->cq;
+ qp_init->srq = sdev->srq;
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index e9ae3d5..96e4940 100644
--- a/drivers/input/evdev.c
@@ -46863,7 +49851,7 @@ index b604564..3f14ae4 100644
return count;
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
-index 8f82897..f5efcd9 100644
+index 1ca7f55..2562607 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -512,7 +512,7 @@ static void serio_release_port(struct device *dev)
@@ -46920,7 +49908,7 @@ index 92e2243..8fd9092 100644
.ident = "Shift",
.matches = {
diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
-index d214f22..b3afa9f 100644
+index b6c4d03..880c40b 100644
--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -197,28 +197,34 @@ static int sur40_command(struct sur40_state *dev,
@@ -46975,7 +49963,7 @@ index d214f22..b3afa9f 100644
}
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
-index b9094e9..a4885c6 100644
+index a1e75cb..88d1c47 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -109,6 +109,7 @@ config AMD_IOMMU_STATS
@@ -46987,10 +49975,10 @@ index b9094e9..a4885c6 100644
This option enables code in the AMD IOMMU driver to collect various
statistics about whats happening in the driver and exports that
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
-index fc836f5..9802f00 100644
+index 374c129..928e753 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
-@@ -695,11 +695,21 @@ static void copy_cmd_to_buffer(struct amd_iommu *iommu,
+@@ -739,11 +739,21 @@ static void copy_cmd_to_buffer(struct amd_iommu *iommu,
static void build_completion_wait(struct iommu_cmd *cmd, u64 address)
{
@@ -47015,10 +50003,10 @@ index fc836f5..9802f00 100644
CMD_SET_TYPE(cmd, CMD_COMPL_WAIT);
}
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
-index 4e5118a..6b1675e 100644
+index 2087534..c3f6b6c 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
-@@ -1539,7 +1539,7 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain)
+@@ -1554,7 +1554,7 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain)
.iommu_dev = smmu->dev,
};
@@ -47028,7 +50016,7 @@ index 4e5118a..6b1675e 100644
return -ENOMEM;
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
-index 47dc7a7..aa39188 100644
+index 59ee4b8..6632759 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -341,7 +341,7 @@ enum arm_smmu_domain_stage {
@@ -47040,7 +50028,7 @@ index 47dc7a7..aa39188 100644
spinlock_t pgtbl_lock;
struct arm_smmu_cfg cfg;
enum arm_smmu_domain_stage stage;
-@@ -798,7 +798,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
+@@ -808,7 +808,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
{
int irq, start, ret = 0;
unsigned long ias, oas;
@@ -47049,7 +50037,7 @@ index 47dc7a7..aa39188 100644
struct io_pgtable_cfg pgtbl_cfg;
enum io_pgtable_fmt fmt;
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
-@@ -884,14 +884,16 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
+@@ -894,14 +894,16 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
};
smmu_domain->smmu = smmu;
@@ -47069,7 +50057,7 @@ index 47dc7a7..aa39188 100644
/* Initialise the context bank with our page table cfg */
arm_smmu_init_context_bank(smmu_domain, &pgtbl_cfg);
-@@ -912,7 +914,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
+@@ -922,7 +924,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
mutex_unlock(&smmu_domain->init_mutex);
/* Publish page table ops for map/unmap */
@@ -47078,17 +50066,16 @@ index 47dc7a7..aa39188 100644
return 0;
out_clear_smmu:
-@@ -945,8 +947,7 @@ static void arm_smmu_destroy_domain_context(struct iommu_domain *domain)
+@@ -955,7 +957,7 @@ static void arm_smmu_destroy_domain_context(struct iommu_domain *domain)
free_irq(irq, domain);
}
-- if (smmu_domain->pgtbl_ops)
-- free_io_pgtable_ops(smmu_domain->pgtbl_ops);
+- free_io_pgtable_ops(smmu_domain->pgtbl_ops);
+ free_io_pgtable(smmu_domain->pgtbl);
-
__arm_smmu_free_bitmap(smmu->context_map, cfg->cbndx);
}
-@@ -1172,13 +1173,13 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
+
+@@ -1180,13 +1182,13 @@ static int arm_smmu_map(struct iommu_domain *domain, unsigned long iova,
int ret;
unsigned long flags;
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
@@ -47105,7 +50092,7 @@ index 47dc7a7..aa39188 100644
spin_unlock_irqrestore(&smmu_domain->pgtbl_lock, flags);
return ret;
}
-@@ -1189,13 +1190,13 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
+@@ -1197,13 +1199,13 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
size_t ret;
unsigned long flags;
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
@@ -47122,7 +50109,7 @@ index 47dc7a7..aa39188 100644
spin_unlock_irqrestore(&smmu_domain->pgtbl_lock, flags);
return ret;
}
-@@ -1206,7 +1207,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
+@@ -1214,7 +1216,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
struct arm_smmu_device *smmu = smmu_domain->smmu;
struct arm_smmu_cfg *cfg = &smmu_domain->cfg;
@@ -47131,7 +50118,7 @@ index 47dc7a7..aa39188 100644
struct device *dev = smmu->dev;
void __iomem *cb_base;
u32 tmp;
-@@ -1227,7 +1228,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
+@@ -1235,7 +1237,7 @@ static phys_addr_t arm_smmu_iova_to_phys_hard(struct iommu_domain *domain,
dev_err(dev,
"iova to phys timed out on %pad. Falling back to software table walk.\n",
&iova);
@@ -47140,7 +50127,7 @@ index 47dc7a7..aa39188 100644
}
phys = readl_relaxed(cb_base + ARM_SMMU_CB_PAR_LO);
-@@ -1248,9 +1249,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
+@@ -1256,9 +1258,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
phys_addr_t ret;
unsigned long flags;
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
@@ -47152,7 +50139,7 @@ index 47dc7a7..aa39188 100644
return 0;
spin_lock_irqsave(&smmu_domain->pgtbl_lock, flags);
-@@ -1258,7 +1259,7 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
+@@ -1266,7 +1268,7 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,
smmu_domain->stage == ARM_SMMU_DOMAIN_S1) {
ret = arm_smmu_iova_to_phys_hard(domain, iova);
} else {
@@ -47161,7 +50148,7 @@ index 47dc7a7..aa39188 100644
}
spin_unlock_irqrestore(&smmu_domain->pgtbl_lock, flags);
-@@ -1676,7 +1677,9 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
+@@ -1685,7 +1687,9 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
size |= SZ_64K | SZ_512M;
}
@@ -47173,23 +50160,20 @@ index 47dc7a7..aa39188 100644
if (smmu->features & ARM_SMMU_FEAT_TRANS_S1)
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
-index dad768c..6783134 100644
+index 381ca5a..f383021 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
-@@ -38,12 +38,6 @@
+@@ -39,9 +39,6 @@
#define io_pgtable_to_data(x) \
container_of((x), struct arm_lpae_io_pgtable, iop)
--#define io_pgtable_ops_to_pgtable(x) \
-- container_of((x), struct io_pgtable, ops)
--
-#define io_pgtable_ops_to_data(x) \
- io_pgtable_to_data(io_pgtable_ops_to_pgtable(x))
-
/*
* For consistency with the architecture, we always consider
* ARM_LPAE_MAX_LEVELS levels, with the walk starting at level n >=0
-@@ -376,10 +370,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
+@@ -376,10 +373,10 @@ static arm_lpae_iopte arm_lpae_prot_to_pte(struct arm_lpae_io_pgtable *data,
return pte;
}
@@ -47202,7 +50186,7 @@ index dad768c..6783134 100644
arm_lpae_iopte *ptep = data->pgd;
int ret, lvl = ARM_LPAE_START_LVL(data);
arm_lpae_iopte prot;
-@@ -524,12 +518,11 @@ static int __arm_lpae_unmap(struct arm_lpae_io_pgtable *data,
+@@ -527,12 +524,11 @@ static int __arm_lpae_unmap(struct arm_lpae_io_pgtable *data,
return __arm_lpae_unmap(data, iova, size, lvl + 1, ptep);
}
@@ -47217,7 +50201,7 @@ index dad768c..6783134 100644
arm_lpae_iopte *ptep = data->pgd;
int lvl = ARM_LPAE_START_LVL(data);
-@@ -540,10 +533,10 @@ static int arm_lpae_unmap(struct io_pgtable_ops *ops, unsigned long iova,
+@@ -543,10 +539,10 @@ static int arm_lpae_unmap(struct io_pgtable_ops *ops, unsigned long iova,
return unmapped;
}
@@ -47230,7 +50214,7 @@ index dad768c..6783134 100644
arm_lpae_iopte pte, *ptep = data->pgd;
int lvl = ARM_LPAE_START_LVL(data);
-@@ -610,6 +603,12 @@ static void arm_lpae_restrict_pgsizes(struct io_pgtable_cfg *cfg)
+@@ -613,6 +609,12 @@ static void arm_lpae_restrict_pgsizes(struct io_pgtable_cfg *cfg)
}
}
@@ -47243,7 +50227,7 @@ index dad768c..6783134 100644
static struct arm_lpae_io_pgtable *
arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
{
-@@ -646,11 +645,7 @@ arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
+@@ -649,11 +651,7 @@ arm_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg)
pgd_bits = va_bits - (data->bits_per_level * (data->levels - 1));
data->pgd_size = 1UL << (pgd_bits + ilog2(sizeof(arm_lpae_iopte)));
@@ -47256,7 +50240,7 @@ index dad768c..6783134 100644
return data;
}
-@@ -908,9 +903,9 @@ static struct iommu_gather_ops dummy_tlb_ops __initdata = {
+@@ -911,9 +909,9 @@ static struct iommu_gather_ops dummy_tlb_ops __initdata = {
.tlb_sync = dummy_tlb_sync,
};
@@ -47268,7 +50252,7 @@ index dad768c..6783134 100644
struct io_pgtable_cfg *cfg = &data->iop.cfg;
pr_err("cfg: pgsize_bitmap 0x%lx, ias %u-bit\n",
-@@ -920,9 +915,9 @@ static void __init arm_lpae_dump_ops(struct io_pgtable_ops *ops)
+@@ -923,9 +921,9 @@ static void __init arm_lpae_dump_ops(struct io_pgtable_ops *ops)
data->bits_per_level, data->pgd);
}
@@ -47280,7 +50264,7 @@ index dad768c..6783134 100644
selftest_running = false; \
-EFAULT; \
})
-@@ -937,30 +932,32 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
+@@ -940,30 +938,32 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
int i, j;
unsigned long iova;
size_t size;
@@ -47322,7 +50306,7 @@ index dad768c..6783134 100644
/*
* Distinct mappings of different granule sizes.
-@@ -970,19 +967,19 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
+@@ -973,19 +973,19 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
while (j != BITS_PER_LONG) {
size = 1UL << j;
@@ -47348,7 +50332,7 @@ index dad768c..6783134 100644
iova += SZ_1G;
j++;
-@@ -991,15 +988,15 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
+@@ -994,15 +994,15 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
/* Partial unmap */
size = 1UL << __ffs(cfg->pgsize_bitmap);
@@ -47370,7 +50354,7 @@ index dad768c..6783134 100644
/* Full unmap */
iova = 0;
-@@ -1007,25 +1004,25 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
+@@ -1010,25 +1010,25 @@ static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg)
while (j != BITS_PER_LONG) {
size = 1UL << j;
@@ -47444,7 +50428,7 @@ index 6f2e319..c24d09a 100644
io_pgtable_init_table[iop->fmt]->free(iop);
}
diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h
-index ac9e234..a2f206e 100644
+index 36673c8..9b3fcbe 100644
--- a/drivers/iommu/io-pgtable.h
+++ b/drivers/iommu/io-pgtable.h
@@ -78,17 +78,18 @@ struct io_pgtable_cfg {
@@ -47492,7 +50476,7 @@ index ac9e234..a2f206e 100644
/*
-@@ -128,7 +129,7 @@ struct io_pgtable {
+@@ -128,11 +129,9 @@ struct io_pgtable {
enum io_pgtable_fmt fmt;
void *cookie;
struct io_pgtable_cfg cfg;
@@ -47500,7 +50484,11 @@ index ac9e234..a2f206e 100644
+ const struct io_pgtable_ops *ops;
};
+-#define io_pgtable_ops_to_pgtable(x) container_of((x), struct io_pgtable, ops)
+-
/**
+ * struct io_pgtable_init_fns - Alloc/free a set of page tables for a
+ * particular format.
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 515bb8b..c2bb880 100644
--- a/drivers/iommu/iommu.c
@@ -47515,7 +50503,7 @@ index 515bb8b..c2bb880 100644
.ops = ops,
};
diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
-index dfb868e..7447315a 100644
+index 2fdbac6..7095311 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -41,7 +41,7 @@ struct ipmmu_vmsa_domain {
@@ -47587,18 +50575,18 @@ index 8adaaea..99dab8e 100644
void ir_ack_apic_edge(struct irq_data *data)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
-index abf2ffa..29cac65 100644
+index 8f9ebf7..e614150 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
-@@ -382,7 +382,7 @@ static void gic_handle_cascade_irq(struct irq_desc *desc)
+@@ -379,7 +379,7 @@ static void gic_handle_cascade_irq(struct irq_desc *desc)
chained_irq_exit(chip, desc);
}
-static struct irq_chip gic_chip = {
+static irq_chip_no_const gic_chip __read_only = {
- .name = "GIC",
.irq_mask = gic_mask_irq,
.irq_unmask = gic_unmask_irq,
+ .irq_eoi = gic_eoi_irq,
diff --git a/drivers/irqchip/irq-i8259.c b/drivers/irqchip/irq-i8259.c
index 6b304eb..6e3a1413 100644
--- a/drivers/irqchip/irq-i8259.c
@@ -47613,10 +50601,10 @@ index 6b304eb..6e3a1413 100644
* Theoretically we do not have to handle this IRQ,
* but in Linux this does not cause problems and is
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c
-index c325806..b18ef0f 100644
+index 713177d..3849ddd 100644
--- a/drivers/irqchip/irq-renesas-intc-irqpin.c
+++ b/drivers/irqchip/irq-renesas-intc-irqpin.c
-@@ -384,7 +384,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
+@@ -396,7 +396,7 @@ static int intc_irqpin_probe(struct platform_device *pdev)
struct intc_irqpin_iomem *i;
struct resource *io[INTC_IRQPIN_REG_NR];
struct resource *irq;
@@ -47625,6 +50613,19 @@ index c325806..b18ef0f 100644
void (*enable_fn)(struct irq_data *d);
void (*disable_fn)(struct irq_data *d);
const char *name = dev_name(dev);
+diff --git a/drivers/irqchip/irq-ts4800.c b/drivers/irqchip/irq-ts4800.c
+index 4192bdc..dabf7a7 100644
+--- a/drivers/irqchip/irq-ts4800.c
++++ b/drivers/irqchip/irq-ts4800.c
+@@ -93,7 +93,7 @@ static int ts4800_ic_probe(struct platform_device *pdev)
+ {
+ struct device_node *node = pdev->dev.of_node;
+ struct ts4800_irq_data *data;
+- struct irq_chip *irq_chip;
++ irq_chip_no_const *irq_chip;
+ struct resource *res;
+ int parent_irq;
+
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 6a2df32..dc962f1 100644
--- a/drivers/isdn/capi/capi.c
@@ -47738,10 +50739,10 @@ index 600c79b..3752bab 100644
mutex_unlock(&cs->mutex);
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c
-index 2a506fe..fdbe969 100644
+index d1f8ab9..c0412f2 100644
--- a/drivers/isdn/gigaset/ser-gigaset.c
+++ b/drivers/isdn/gigaset/ser-gigaset.c
-@@ -452,22 +452,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
+@@ -445,22 +445,22 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
}
static const struct gigaset_ops ops = {
@@ -47854,6 +50855,1042 @@ index 4d9b195..455075c 100644
return -EFAULT;
} else {
memcpy(buf, dp, left);
+diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
+index 7a0bdbd..0a7b7db 100644
+--- a/drivers/isdn/hardware/eicon/capifunc.c
++++ b/drivers/isdn/hardware/eicon/capifunc.c
+@@ -57,7 +57,7 @@ static u16 diva_send_message(struct capi_ctr *,
+ diva_os_message_buffer_s *);
+ extern void diva_os_set_controller_struct(struct capi_ctr *);
+
+-extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
++extern void DIVA_DIDD_Read(void *, int);
+
+ /*
+ * debug
+@@ -1032,7 +1032,6 @@ static void didd_callback(void *context, DESCRIPTOR *adapter, int removal)
+ stop_dbg();
+ } else {
+ memcpy(&MAdapter, adapter, sizeof(MAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ DbgRegister("CAPI20", DRIVERRELEASE_CAPI, DBG_DEFAULT);
+ }
+ } else if ((adapter->type > 0) && (adapter->type < 16)) { /* IDI Adapter */
+@@ -1060,7 +1059,6 @@ static int divacapi_connect_didd(void)
+ for (x = 0; x < MAX_DESCRIPTORS; x++) {
+ if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
+ memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ DbgRegister("CAPI20", DRIVERRELEASE_CAPI, DBG_DEFAULT);
+ break;
+ }
+@@ -1072,7 +1070,7 @@ static int divacapi_connect_didd(void)
+ req.didd_notify.e.Req = 0;
+ req.didd_notify.e.Rc =
+ IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
+- req.didd_notify.info.callback = (void *)didd_callback;
++ req.didd_notify.info.callback = didd_callback;
+ req.didd_notify.info.context = NULL;
+ DAdapter.request((ENTITY *)&req);
+ if (req.didd_notify.e.Rc != 0xff) {
+diff --git a/drivers/isdn/hardware/eicon/dadapter.c b/drivers/isdn/hardware/eicon/dadapter.c
+index 5142099..642b7de 100644
+--- a/drivers/isdn/hardware/eicon/dadapter.c
++++ b/drivers/isdn/hardware/eicon/dadapter.c
+@@ -63,10 +63,14 @@ static void no_printf(unsigned char *format, ...)
+ ------------------------------------------------------------------------- */
+ #include "debuglib.c"
+
++static void IDI_CALL_LINK_T no_request(ENTITY IDI_CALL_ENTITY_T *i)
++{
++}
++
+ static DESCRIPTOR MAdapter = {IDI_DIMAINT, /* Adapter Type */
+ 0x00, /* Channels */
+ 0x0000, /* Features */
+- (IDI_CALL)no_printf};
++ no_request};
+ /* --------------------------------------------------------------------------
+ DAdapter. Only IDI clients with buffer, that is huge enough to
+ get all descriptors will receive information about DAdapter
+@@ -100,6 +104,11 @@ void diva_didd_load_time_init(void) {
+ void diva_didd_load_time_finit(void) {
+ diva_os_destroy_spin_lock(&didd_spin, "didd");
+ }
++
++static void diva_didd_no_request(ENTITY *e)
++{
++}
++
+ /* --------------------------------------------------------------------------
+ Called in order to register new adapter in adapter array
+ return adapter handle (> 0) on success
+@@ -111,13 +120,12 @@ static int diva_didd_add_descriptor(DESCRIPTOR *d) {
+ if (d->type == IDI_DIMAINT) {
+ if (d->request) {
+ MAdapter.request = d->request;
+- dprintf = (DIVA_DI_PRINTF)d->request;
+ diva_notify_adapter_change(&MAdapter, 0); /* Inserted */
+ DBG_TRC(("DIMAINT registered, dprintf=%08x", d->request))
+ } else {
+ DBG_TRC(("DIMAINT removed"))
+ diva_notify_adapter_change(&MAdapter, 1); /* About to remove */
+- MAdapter.request = (IDI_CALL)no_printf;
++ MAdapter.request = diva_didd_no_request;
+ dprintf = no_printf;
+ }
+ return (NEW_MAX_DESCRIPTORS);
+@@ -149,7 +157,7 @@ static int diva_didd_remove_descriptor(IDI_CALL request) {
+ DBG_TRC(("DIMAINT removed"))
+ dprintf = no_printf;
+ diva_notify_adapter_change(&MAdapter, 1); /* About to remove */
+- MAdapter.request = (IDI_CALL)no_printf;
++ MAdapter.request = diva_didd_no_request;
+ return (0);
+ }
+ for (i = 0; (Adapters && (i < NEW_MAX_DESCRIPTORS)); i++) {
+@@ -222,7 +230,7 @@ static void IDI_CALL_LINK_T diva_dadapter_request( \
+ case IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY: {
+ diva_didd_adapter_notify_t *pinfo = &syncReq->didd_notify.info;
+ pinfo->handle = diva_register_adapter_callback( \
+- (didd_adapter_change_callback_t)pinfo->callback,
++ pinfo->callback,
+ (void IDI_CALL_ENTITY_T *)pinfo->context);
+ e->Rc = 0xff;
+ } break;
+diff --git a/drivers/isdn/hardware/eicon/diddfunc.c b/drivers/isdn/hardware/eicon/diddfunc.c
+index b0b23ed..e3d4e18 100644
+--- a/drivers/isdn/hardware/eicon/diddfunc.c
++++ b/drivers/isdn/hardware/eicon/diddfunc.c
+@@ -28,12 +28,12 @@ static DESCRIPTOR _DAdapter;
+ /*
+ * didd callback function
+ */
+-static void *didd_callback(void *context, DESCRIPTOR *adapter,
++static void didd_callback(void *context, DESCRIPTOR *adapter,
+ int removal)
+ {
+ if (adapter->type == IDI_DADAPTER) {
+ DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."))
+- return (NULL);
++ return;
+ } else if (adapter->type == IDI_DIMAINT) {
+ if (removal) {
+ DbgDeregister();
+@@ -41,7 +41,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
+ DbgRegister("DIDD", DRIVERRELEASE_DIDD, DBG_DEFAULT);
+ }
+ }
+- return (NULL);
+ }
+
+ /*
+@@ -63,7 +62,7 @@ static int __init connect_didd(void)
+ req.didd_notify.e.Req = 0;
+ req.didd_notify.e.Rc =
+ IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
+- req.didd_notify.info.callback = (void *)didd_callback;
++ req.didd_notify.info.callback = didd_callback;
+ req.didd_notify.info.context = NULL;
+ _DAdapter.request((ENTITY *)&req);
+ if (req.didd_notify.e.Rc != 0xff)
+diff --git a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c
+index 4be5f88..1dbd479 100644
+--- a/drivers/isdn/hardware/eicon/divasfunc.c
++++ b/drivers/isdn/hardware/eicon/divasfunc.c
+@@ -130,12 +130,12 @@ static void stop_dbg(void)
+ /*
+ * didd callback function
+ */
+-static void *didd_callback(void *context, DESCRIPTOR *adapter,
++static void didd_callback(void *context, DESCRIPTOR *adapter,
+ int removal)
+ {
+ if (adapter->type == IDI_DADAPTER) {
+ DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."));
+- return (NULL);
++ return;
+ }
+
+ if (adapter->type == IDI_DIMAINT) {
+@@ -143,11 +143,9 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
+ stop_dbg();
+ } else {
+ memcpy(&MAdapter, adapter, sizeof(MAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ start_dbg();
+ }
+ }
+- return (NULL);
+ }
+
+ /*
+@@ -169,7 +167,7 @@ static int __init connect_didd(void)
+ req.didd_notify.e.Req = 0;
+ req.didd_notify.e.Rc =
+ IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
+- req.didd_notify.info.callback = (void *)didd_callback;
++ req.didd_notify.info.callback = didd_callback;
+ req.didd_notify.info.context = NULL;
+ DAdapter.request((ENTITY *)&req);
+ if (req.didd_notify.e.Rc != 0xff) {
+@@ -179,7 +177,6 @@ static int __init connect_didd(void)
+ notify_handle = req.didd_notify.info.handle;
+ } else if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
+ memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ start_dbg();
+ }
+ }
+diff --git a/drivers/isdn/hardware/eicon/divasync.h b/drivers/isdn/hardware/eicon/divasync.h
+index dd6b53a..42661f6 100644
+--- a/drivers/isdn/hardware/eicon/divasync.h
++++ b/drivers/isdn/hardware/eicon/divasync.h
+@@ -138,7 +138,7 @@ typedef struct _diva_xdi_dma_descriptor_operation {
+ #define IDI_SYNC_REQ_DIDD_GET_CFG_LIB_IFC 0x10
+ typedef struct _diva_didd_adapter_notify {
+ dword handle; /* Notification handle */
+- void *callback;
++ didd_adapter_change_callback_t callback;
+ void *context;
+ } diva_didd_adapter_notify_t;
+ typedef struct _diva_didd_add_adapter {
+diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c
+index fef6586..22353ff 100644
+--- a/drivers/isdn/hardware/eicon/idifunc.c
++++ b/drivers/isdn/hardware/eicon/idifunc.c
+@@ -154,18 +154,17 @@ rescan:
+ /*
+ * DIDD notify callback
+ */
+-static void *didd_callback(void *context, DESCRIPTOR *adapter,
++static void didd_callback(void *context, DESCRIPTOR *adapter,
+ int removal)
+ {
+ if (adapter->type == IDI_DADAPTER) {
+ DBG_ERR(("Notification about IDI_DADAPTER change ! Oops."));
+- return (NULL);
++ return;
+ } else if (adapter->type == IDI_DIMAINT) {
+ if (removal) {
+ stop_dbg();
+ } else {
+ memcpy(&MAdapter, adapter, sizeof(MAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ DbgRegister("User IDI", DRIVERRELEASE_IDI, DBG_DEFAULT);
+ }
+ } else if ((adapter->type > 0) && (adapter->type < 16)) { /* IDI Adapter */
+@@ -175,7 +174,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
+ um_new_card(adapter);
+ }
+ }
+- return (NULL);
+ }
+
+ /*
+@@ -197,7 +195,7 @@ static int __init connect_didd(void)
+ req.didd_notify.e.Req = 0;
+ req.didd_notify.e.Rc =
+ IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
+- req.didd_notify.info.callback = (void *)didd_callback;
++ req.didd_notify.info.callback = didd_callback;
+ req.didd_notify.info.context = NULL;
+ DAdapter.request((ENTITY *)&req);
+ if (req.didd_notify.e.Rc != 0xff) {
+@@ -207,7 +205,6 @@ static int __init connect_didd(void)
+ notify_handle = req.didd_notify.info.handle;
+ } else if (DIDD_Table[x].type == IDI_DIMAINT) { /* MAINT found */
+ memcpy(&MAdapter, &DIDD_Table[x], sizeof(DAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ DbgRegister("User IDI", DRIVERRELEASE_IDI, DBG_DEFAULT);
+ } else if ((DIDD_Table[x].type > 0)
+ && (DIDD_Table[x].type < 16)) { /* IDI Adapter found */
+diff --git a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c
+index 1cd9aff..1a3e2b6 100644
+--- a/drivers/isdn/hardware/eicon/mntfunc.c
++++ b/drivers/isdn/hardware/eicon/mntfunc.c
+@@ -26,8 +26,13 @@ extern void DIVA_DIDD_Read(void *, int);
+ static dword notify_handle;
+ static DESCRIPTOR DAdapter;
+ static DESCRIPTOR MAdapter;
++
++static void didd_nothing(ENTITY IDI_CALL_ENTITY_T *e)
++{
++ diva_maint_prtComp(e);
++}
+ static DESCRIPTOR MaintDescriptor =
+-{ IDI_DIMAINT, 0, 0, (IDI_CALL) diva_maint_prtComp };
++{ IDI_DIMAINT, 0, 0, didd_nothing };
+
+ extern int diva_os_copy_to_user(void *os_handle, void __user *dst,
+ const void *src, int length);
+@@ -44,7 +49,7 @@ static void no_printf(unsigned char *x, ...)
+ /*
+ * DIDD callback function
+ */
+-static void *didd_callback(void *context, DESCRIPTOR *adapter,
++static void didd_callback(void *context, DESCRIPTOR *adapter,
+ int removal)
+ {
+ if (adapter->type == IDI_DADAPTER) {
+@@ -56,7 +61,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
+ dprintf = no_printf;
+ } else {
+ memcpy(&MAdapter, adapter, sizeof(MAdapter));
+- dprintf = (DIVA_DI_PRINTF) MAdapter.request;
+ DbgRegister("MAINT", DRIVERRELEASE_MNT, DBG_DEFAULT);
+ }
+ } else if ((adapter->type > 0) && (adapter->type < 16)) {
+@@ -66,7 +70,6 @@ static void *didd_callback(void *context, DESCRIPTOR *adapter,
+ diva_mnt_add_xdi_adapter(adapter);
+ }
+ }
+- return (NULL);
+ }
+
+ /*
+@@ -88,7 +91,7 @@ static int __init connect_didd(void)
+ req.didd_notify.e.Req = 0;
+ req.didd_notify.e.Rc =
+ IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY;
+- req.didd_notify.info.callback = (void *)didd_callback;
++ req.didd_notify.info.callback = didd_callback;
+ req.didd_notify.info.context = NULL;
+ DAdapter.request((ENTITY *)&req);
+ if (req.didd_notify.e.Rc != 0xff)
+diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
+index 292991c..f36f4cb 100644
+--- a/drivers/isdn/hardware/mISDN/avmfritz.c
++++ b/drivers/isdn/hardware/mISDN/avmfritz.c
+@@ -156,7 +156,7 @@ _set_debug(struct fritzcard *card)
+ }
+
+ static int
+-set_debug(const char *val, struct kernel_param *kp)
++set_debug(const char *val, const struct kernel_param *kp)
+ {
+ int ret;
+ struct fritzcard *card;
+diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
+index 28543d7..bd8cf91 100644
+--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
++++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
+@@ -2856,8 +2856,9 @@ irq_notforus:
+ */
+
+ static void
+-hfcmulti_dbusy_timer(struct hfc_multi *hc)
++hfcmulti_dbusy_timer(unsigned long _hc)
+ {
++ //struct hfc_multi *hc = (struct hfc_multi *)_hc;
+ }
+
+
+@@ -3878,7 +3879,7 @@ hfcmulti_initmode(struct dchannel *dch)
+ if (hc->dnum[pt]) {
+ mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
+ -1, 0, -1, 0);
+- dch->timer.function = (void *) hfcmulti_dbusy_timer;
++ dch->timer.function = hfcmulti_dbusy_timer;
+ dch->timer.data = (long) dch;
+ init_timer(&dch->timer);
+ }
+@@ -3986,7 +3987,7 @@ hfcmulti_initmode(struct dchannel *dch)
+ hc->chan[i].slot_rx = -1;
+ hc->chan[i].conf = -1;
+ mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0);
+- dch->timer.function = (void *) hfcmulti_dbusy_timer;
++ dch->timer.function = hfcmulti_dbusy_timer;
+ dch->timer.data = (long) dch;
+ init_timer(&dch->timer);
+ hc->chan[i - 2].slot_tx = -1;
+diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
+index ff48da6..497fb7b 100644
+--- a/drivers/isdn/hardware/mISDN/hfcpci.c
++++ b/drivers/isdn/hardware/mISDN/hfcpci.c
+@@ -301,8 +301,9 @@ reset_hfcpci(struct hfc_pci *hc)
+ * Timer function called when kernel timer expires
+ */
+ static void
+-hfcpci_Timer(struct hfc_pci *hc)
++hfcpci_Timer(unsigned long _hc)
+ {
++ struct hfc_pci *hc = (struct hfc_pci *)_hc;
+ hc->hw.timer.expires = jiffies + 75;
+ /* WD RESET */
+ /*
+@@ -1241,8 +1242,9 @@ hfcpci_int(int intno, void *dev_id)
+ * timer callback for D-chan busy resolution. Currently no function
+ */
+ static void
+-hfcpci_dbusy_timer(struct hfc_pci *hc)
++hfcpci_dbusy_timer(unsigned long _hc)
+ {
++// struct hfc_pci *hc = (struct hfc_pci *)_hc;
+ }
+
+ /*
+@@ -1717,7 +1719,7 @@ static void
+ inithfcpci(struct hfc_pci *hc)
+ {
+ printk(KERN_DEBUG "inithfcpci: entered\n");
+- hc->dch.timer.function = (void *) hfcpci_dbusy_timer;
++ hc->dch.timer.function = hfcpci_dbusy_timer;
+ hc->dch.timer.data = (long) &hc->dch;
+ init_timer(&hc->dch.timer);
+ hc->chanlimit = 2;
+@@ -2044,7 +2046,7 @@ setup_hw(struct hfc_pci *hc)
+ Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
+ /* At this point the needed PCI config is done */
+ /* fifos are still not enabled */
+- hc->hw.timer.function = (void *) hfcpci_Timer;
++ hc->hw.timer.function = hfcpci_Timer;
+ hc->hw.timer.data = (long) hc;
+ init_timer(&hc->hw.timer);
+ /* default PCM master */
+@@ -2293,9 +2295,9 @@ _hfcpci_softirq(struct device *dev, void *arg)
+ }
+
+ static void
+-hfcpci_softirq(void *arg)
++hfcpci_softirq(unsigned long arg)
+ {
+- WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, arg,
++ WARN_ON_ONCE(driver_for_each_device(&hfc_driver.driver, NULL, (void *)arg,
+ _hfcpci_softirq) != 0);
+
+ /* if next event would be in the past ... */
+@@ -2330,7 +2332,7 @@ HFC_init(void)
+ if (poll != HFCPCI_BTRANS_THRESHOLD) {
+ printk(KERN_INFO "%s: Using alternative poll value of %d\n",
+ __func__, poll);
+- hfc_tl.function = (void *)hfcpci_softirq;
++ hfc_tl.function = hfcpci_softirq;
+ hfc_tl.data = 0;
+ init_timer(&hfc_tl);
+ hfc_tl.expires = jiffies + tics;
+diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+index d5bdbaf..a7cdc61 100644
+--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
++++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c
+@@ -244,7 +244,7 @@ _set_debug(struct inf_hw *card)
+ }
+
+ static int
+-set_debug(const char *val, struct kernel_param *kp)
++set_debug(const char *val, const struct kernel_param *kp)
+ {
+ int ret;
+ struct inf_hw *card;
+@@ -586,9 +586,10 @@ reset_inf(struct inf_hw *hw)
+ }
+
+ static int
+-inf_ctrl(struct inf_hw *hw, u32 cmd, u_long arg)
++inf_ctrl(struct ipac_hw *_hw, u32 cmd, u_long arg)
+ {
+ int ret = 0;
++ struct inf_hw *hw = container_of(_hw, struct inf_hw, ipac);
+
+ switch (cmd) {
+ case HW_RESET_REQ:
+@@ -915,7 +916,7 @@ setup_instance(struct inf_hw *card)
+ spin_lock_init(&card->lock);
+ card->ipac.isac.hwlock = &card->lock;
+ card->ipac.hwlock = &card->lock;
+- card->ipac.ctrl = (void *)&inf_ctrl;
++ card->ipac.ctrl = &inf_ctrl;
+
+ err = setup_io(card);
+ if (err)
+diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
+index cb428b9..cb3d37c 100644
+--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
++++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
+@@ -725,8 +725,9 @@ isac_release(struct isac_hw *isac)
+ }
+
+ static void
+-dbusy_timer_handler(struct isac_hw *isac)
++dbusy_timer_handler(unsigned long _isac)
+ {
++ struct isac_hw *isac = (struct isac_hw *)_isac;
+ int rbch, star;
+ u_long flags;
+
+@@ -794,7 +795,7 @@ isac_init(struct isac_hw *isac)
+ }
+ isac->mon_tx = NULL;
+ isac->mon_rx = NULL;
+- isac->dch.timer.function = (void *) dbusy_timer_handler;
++ isac->dch.timer.function = dbusy_timer_handler;
+ isac->dch.timer.data = (long)isac;
+ init_timer(&isac->dch.timer);
+ isac->mocr = 0xaa;
+diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
+index afde4ed..e9fcae4 100644
+--- a/drivers/isdn/hardware/mISDN/netjet.c
++++ b/drivers/isdn/hardware/mISDN/netjet.c
+@@ -111,7 +111,7 @@ _set_debug(struct tiger_hw *card)
+ }
+
+ static int
+-set_debug(const char *val, struct kernel_param *kp)
++set_debug(const char *val, const struct kernel_param *kp)
+ {
+ int ret;
+ struct tiger_hw *card;
+diff --git a/drivers/isdn/hardware/mISDN/speedfax.c b/drivers/isdn/hardware/mISDN/speedfax.c
+index 9815bb4..3d6181e 100644
+--- a/drivers/isdn/hardware/mISDN/speedfax.c
++++ b/drivers/isdn/hardware/mISDN/speedfax.c
+@@ -94,7 +94,7 @@ _set_debug(struct sfax_hw *card)
+ }
+
+ static int
+-set_debug(const char *val, struct kernel_param *kp)
++set_debug(const char *val, const struct kernel_param *kp)
+ {
+ int ret;
+ struct sfax_hw *card;
+@@ -186,9 +186,10 @@ reset_speedfax(struct sfax_hw *sf)
+ }
+
+ static int
+-sfax_ctrl(struct sfax_hw *sf, u32 cmd, u_long arg)
++sfax_ctrl(void *_sf, u32 cmd, u_long arg)
+ {
+ int ret = 0;
++ struct sfax_hw *sf = (struct sfax_hw *)_sf;
+
+ switch (cmd) {
+ case HW_RESET_REQ:
+@@ -386,7 +387,7 @@ setup_instance(struct sfax_hw *card)
+ spin_lock_init(&card->lock);
+ card->isac.hwlock = &card->lock;
+ card->isar.hwlock = &card->lock;
+- card->isar.ctrl = (void *)&sfax_ctrl;
++ card->isar.ctrl = &sfax_ctrl;
+ card->isac.name = card->name;
+ card->isar.name = card->name;
+ card->isar.owner = THIS_MODULE;
+diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
+index 7416755..2914e7c 100644
+--- a/drivers/isdn/hardware/mISDN/w6692.c
++++ b/drivers/isdn/hardware/mISDN/w6692.c
+@@ -101,7 +101,7 @@ _set_debug(struct w6692_hw *card)
+ }
+
+ static int
+-set_debug(const char *val, struct kernel_param *kp)
++set_debug(const char *val, const struct kernel_param *kp)
+ {
+ int ret;
+ struct w6692_hw *card;
+@@ -819,8 +819,9 @@ w6692_irq(int intno, void *dev_id)
+ }
+
+ static void
+-dbusy_timer_handler(struct dchannel *dch)
++dbusy_timer_handler(unsigned long _dch)
+ {
++ struct dchannel *dch = (struct dchannel *)_dch;
+ struct w6692_hw *card = dch->hw;
+ int rbch, star;
+ u_long flags;
+@@ -852,7 +853,7 @@ void initW6692(struct w6692_hw *card)
+ {
+ u8 val;
+
+- card->dch.timer.function = (void *)dbusy_timer_handler;
++ card->dch.timer.function = dbusy_timer_handler;
+ card->dch.timer.data = (u_long)&card->dch;
+ init_timer(&card->dch.timer);
+ w6692_mode(&card->bc[0], ISDN_P_NONE);
+diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c
+index 36817e0..b02bb98 100644
+--- a/drivers/isdn/hisax/amd7930_fn.c
++++ b/drivers/isdn/hisax/amd7930_fn.c
+@@ -685,8 +685,9 @@ DC_Close_Amd7930(struct IsdnCardState *cs) {
+
+
+ static void
+-dbusy_timer_handler(struct IsdnCardState *cs)
++dbusy_timer_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ u_long flags;
+ struct PStack *stptr;
+ WORD dtcr, der;
+@@ -789,7 +790,7 @@ void Amd7930_init(struct IsdnCardState *cs)
+ void setup_Amd7930(struct IsdnCardState *cs)
+ {
+ INIT_WORK(&cs->tqueue, Amd7930_bh);
+- cs->dbusytimer.function = (void *) dbusy_timer_handler;
++ cs->dbusytimer.function = dbusy_timer_handler;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+ }
+diff --git a/drivers/isdn/hisax/arcofi.c b/drivers/isdn/hisax/arcofi.c
+index 29ec2df..9c7123c 100644
+--- a/drivers/isdn/hisax/arcofi.c
++++ b/drivers/isdn/hisax/arcofi.c
+@@ -112,7 +112,8 @@ arcofi_fsm(struct IsdnCardState *cs, int event, void *data) {
+ }
+
+ static void
+-arcofi_timer(struct IsdnCardState *cs) {
++arcofi_timer(unsigned long _cs) {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ arcofi_fsm(cs, ARCOFI_TIMEOUT, NULL);
+ }
+
+@@ -125,7 +126,7 @@ clear_arcofi(struct IsdnCardState *cs) {
+
+ void
+ init_arcofi(struct IsdnCardState *cs) {
+- cs->dc.isac.arcofitimer.function = (void *) arcofi_timer;
++ cs->dc.isac.arcofitimer.function = arcofi_timer;
+ cs->dc.isac.arcofitimer.data = (long) cs;
+ init_timer(&cs->dc.isac.arcofitimer);
+ init_waitqueue_head(&cs->dc.isac.arcofi_wait);
+diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
+index 4fc90de..fda68cd 100644
+--- a/drivers/isdn/hisax/diva.c
++++ b/drivers/isdn/hisax/diva.c
+@@ -796,8 +796,9 @@ reset_diva(struct IsdnCardState *cs)
+ #define DIVA_ASSIGN 1
+
+ static void
+-diva_led_handler(struct IsdnCardState *cs)
++diva_led_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ int blink = 0;
+
+ if ((cs->subtyp == DIVA_IPAC_ISA) ||
+@@ -898,7 +899,7 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg)
+ (cs->subtyp != DIVA_IPAC_PCI) &&
+ (cs->subtyp != DIVA_IPACX_PCI)) {
+ spin_lock_irqsave(&cs->lock, flags);
+- diva_led_handler(cs);
++ diva_led_handler((unsigned long)cs);
+ spin_unlock_irqrestore(&cs->lock, flags);
+ }
+ return (0);
+@@ -976,7 +977,7 @@ static int setup_diva_common(struct IsdnCardState *cs)
+ printk(KERN_INFO "Diva: IPACX Design Id: %x\n",
+ MemReadISAC_IPACX(cs, IPACX_ID) & 0x3F);
+ } else { /* DIVA 2.0 */
+- cs->hw.diva.tl.function = (void *) diva_led_handler;
++ cs->hw.diva.tl.function = diva_led_handler;
+ cs->hw.diva.tl.data = (long) cs;
+ init_timer(&cs->hw.diva.tl);
+ cs->readisac = &ReadISAC;
+diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
+index d8ef64d..9c50267 100644
+--- a/drivers/isdn/hisax/elsa.c
++++ b/drivers/isdn/hisax/elsa.c
+@@ -606,8 +606,9 @@ check_arcofi(struct IsdnCardState *cs)
+ #endif /* ARCOFI_USE */
+
+ static void
+-elsa_led_handler(struct IsdnCardState *cs)
++elsa_led_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ int blink = 0;
+
+ if (cs->subtyp == ELSA_PCMCIA || cs->subtyp == ELSA_PCMCIA_IPAC)
+@@ -715,7 +716,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
+ init_modem(cs);
+ }
+ #endif
+- elsa_led_handler(cs);
++ elsa_led_handler((unsigned long)cs);
+ return (ret);
+ case (MDL_REMOVE | REQUEST):
+ cs->hw.elsa.status &= 0;
+@@ -767,7 +768,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
+ else
+ cs->hw.elsa.status &= ~ELSA_BAD_PWR;
+ }
+- elsa_led_handler(cs);
++ elsa_led_handler((unsigned long)cs);
+ return (ret);
+ }
+
+@@ -1147,7 +1148,7 @@ static int setup_elsa_common(struct IsdnCard *card)
+ init_arcofi(cs);
+ #endif
+ setup_isac(cs);
+- cs->hw.elsa.tl.function = (void *) elsa_led_handler;
++ cs->hw.elsa.tl.function = elsa_led_handler;
+ cs->hw.elsa.tl.data = (long) cs;
+ init_timer(&cs->hw.elsa.tl);
+ /* Teste Timer */
+diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c
+index c7a9471..5409bd3 100644
+--- a/drivers/isdn/hisax/fsm.c
++++ b/drivers/isdn/hisax/fsm.c
+@@ -85,8 +85,9 @@ FsmChangeState(struct FsmInst *fi, int newstate)
+ }
+
+ static void
+-FsmExpireTimer(struct FsmTimer *ft)
++FsmExpireTimer(unsigned long _ft)
+ {
++ struct FsmTimer *ft = (struct FsmTimer *)_ft;
+ #if FSM_TIMER_DEBUG
+ if (ft->fi->debug)
+ ft->fi->printdebug(ft->fi, "FsmExpireTimer %lx", (long) ft);
+@@ -98,7 +99,7 @@ void
+ FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
+ {
+ ft->fi = fi;
+- ft->tl.function = (void *) FsmExpireTimer;
++ ft->tl.function = FsmExpireTimer;
+ ft->tl.data = (long) ft;
+ #if FSM_TIMER_DEBUG
+ if (ft->fi->debug)
+diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
+index 9600cd7..86ca5a3 100644
+--- a/drivers/isdn/hisax/hfc4s8s_l1.c
++++ b/drivers/isdn/hisax/hfc4s8s_l1.c
+@@ -299,8 +299,9 @@ Read_hfc16_stable(hfc4s8s_hw *hw, int reg)
+ /* D-channel call from HiSax */
+ /*****************************/
+ static void
+-dch_l2l1(struct hisax_d_if *iface, int pr, void *arg)
++dch_l2l1(struct hisax_if *_iface, int pr, void *arg)
+ {
++ struct hisax_d_if *iface = container_of(_iface, struct hisax_d_if, ifc);
+ struct hfc4s8s_l1 *l1 = iface->ifc.priv;
+ struct sk_buff *skb = (struct sk_buff *) arg;
+ u_long flags;
+@@ -591,8 +592,9 @@ bch_l2l1(struct hisax_if *ifc, int pr, void *arg)
+ /* layer 1 timer function */
+ /**************************/
+ static void
+-hfc_l1_timer(struct hfc4s8s_l1 *l1)
++hfc_l1_timer(unsigned long _l1)
+ {
++ struct hfc4s8s_l1 *l1 = (struct hfc4s8s_l1 *)_l1;
+ u_long flags;
+
+ if (!l1->enabled)
+@@ -1396,16 +1398,16 @@ setup_instance(hfc4s8s_hw *hw)
+ l1p = hw->l1 + i;
+ spin_lock_init(&l1p->lock);
+ l1p->hw = hw;
+- l1p->l1_timer.function = (void *) hfc_l1_timer;
++ l1p->l1_timer.function = hfc_l1_timer;
+ l1p->l1_timer.data = (long) (l1p);
+ init_timer(&l1p->l1_timer);
+ l1p->st_num = i;
+ skb_queue_head_init(&l1p->d_tx_queue);
+ l1p->d_if.ifc.priv = hw->l1 + i;
+- l1p->d_if.ifc.l2l1 = (void *) dch_l2l1;
++ l1p->d_if.ifc.l2l1 = dch_l2l1;
+
+ spin_lock_init(&l1p->b_ch[0].lock);
+- l1p->b_ch[0].b_if.ifc.l2l1 = (void *) bch_l2l1;
++ l1p->b_ch[0].b_if.ifc.l2l1 = bch_l2l1;
+ l1p->b_ch[0].b_if.ifc.priv = (void *) &l1p->b_ch[0];
+ l1p->b_ch[0].l1p = hw->l1 + i;
+ l1p->b_ch[0].bchan = 1;
+@@ -1413,7 +1415,7 @@ setup_instance(hfc4s8s_hw *hw)
+ skb_queue_head_init(&l1p->b_ch[0].tx_queue);
+
+ spin_lock_init(&l1p->b_ch[1].lock);
+- l1p->b_ch[1].b_if.ifc.l2l1 = (void *) bch_l2l1;
++ l1p->b_ch[1].b_if.ifc.l2l1 = bch_l2l1;
+ l1p->b_ch[1].b_if.ifc.priv = (void *) &l1p->b_ch[1];
+ l1p->b_ch[1].l1p = hw->l1 + i;
+ l1p->b_ch[1].bchan = 2;
+diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
+index 90449e1..9a5394c 100644
+--- a/drivers/isdn/hisax/hfc_pci.c
++++ b/drivers/isdn/hisax/hfc_pci.c
+@@ -165,8 +165,9 @@ reset_hfcpci(struct IsdnCardState *cs)
+ /* Timer function called when kernel timer expires */
+ /***************************************************/
+ static void
+-hfcpci_Timer(struct IsdnCardState *cs)
++hfcpci_Timer(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ cs->hw.hfcpci.timer.expires = jiffies + 75;
+ /* WD RESET */
+ /* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcpci.ctmt | 0x80);
+@@ -1095,8 +1096,9 @@ hfcpci_interrupt(int intno, void *dev_id)
+ /* timer callback for D-chan busy resolution. Currently no function */
+ /********************************************************************/
+ static void
+-hfcpci_dbusy_timer(struct IsdnCardState *cs)
++hfcpci_dbusy_timer(unsigned long _cs)
+ {
++ //struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ }
+
+ /*************************************/
+@@ -1582,7 +1584,7 @@ inithfcpci(struct IsdnCardState *cs)
+ cs->bcs[1].BC_SetStack = setstack_2b;
+ cs->bcs[0].BC_Close = close_hfcpci;
+ cs->bcs[1].BC_Close = close_hfcpci;
+- cs->dbusytimer.function = (void *) hfcpci_dbusy_timer;
++ cs->dbusytimer.function = hfcpci_dbusy_timer;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+ mode_hfcpci(cs->bcs, 0, 0);
+@@ -1746,7 +1748,7 @@ setup_hfcpci(struct IsdnCard *card)
+ cs->BC_Write_Reg = NULL;
+ cs->irq_func = &hfcpci_interrupt;
+ cs->irq_flags |= IRQF_SHARED;
+- cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer;
++ cs->hw.hfcpci.timer.function = hfcpci_Timer;
+ cs->hw.hfcpci.timer.data = (long) cs;
+ init_timer(&cs->hw.hfcpci.timer);
+ cs->cardmsg = &hfcpci_card_msg;
+diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
+index 13b2151..d3e0732 100644
+--- a/drivers/isdn/hisax/hfc_sx.c
++++ b/drivers/isdn/hisax/hfc_sx.c
+@@ -418,8 +418,9 @@ reset_hfcsx(struct IsdnCardState *cs)
+ /* Timer function called when kernel timer expires */
+ /***************************************************/
+ static void
+-hfcsx_Timer(struct IsdnCardState *cs)
++hfcsx_Timer(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ cs->hw.hfcsx.timer.expires = jiffies + 75;
+ /* WD RESET */
+ /* WriteReg(cs, HFCD_DATA, HFCD_CTMT, cs->hw.hfcsx.ctmt | 0x80);
+@@ -860,8 +861,9 @@ hfcsx_interrupt(int intno, void *dev_id)
+ /* timer callback for D-chan busy resolution. Currently no function */
+ /********************************************************************/
+ static void
+-hfcsx_dbusy_timer(struct IsdnCardState *cs)
++hfcsx_dbusy_timer(unsigned long _cs)
+ {
++ //struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ }
+
+ /*************************************/
+@@ -1495,7 +1497,7 @@ int setup_hfcsx(struct IsdnCard *card)
+ } else
+ return (0); /* no valid card type */
+
+- cs->dbusytimer.function = (void *) hfcsx_dbusy_timer;
++ cs->dbusytimer.function = hfcsx_dbusy_timer;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+ INIT_WORK(&cs->tqueue, hfcsx_bh);
+@@ -1507,7 +1509,7 @@ int setup_hfcsx(struct IsdnCard *card)
+ cs->BC_Write_Reg = NULL;
+ cs->irq_func = &hfcsx_interrupt;
+
+- cs->hw.hfcsx.timer.function = (void *) hfcsx_Timer;
++ cs->hw.hfcsx.timer.function = hfcsx_Timer;
+ cs->hw.hfcsx.timer.data = (long) cs;
+ cs->hw.hfcsx.b_fifo_size = 0; /* fifo size still unknown */
+ cs->hw.hfcsx.cirm = ccd_sp_irqtab[cs->irq & 0xF]; /* RAM not evaluated */
+diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
+index 678bd52..1c4f12a 100644
+--- a/drivers/isdn/hisax/hfc_usb.c
++++ b/drivers/isdn/hisax/hfc_usb.c
+@@ -343,8 +343,10 @@ handle_led(hfcusb_data *hfc, int event)
+
+ /* ISDN l1 timer T3 expires */
+ static void
+-l1_timer_expire_t3(hfcusb_data *hfc)
++l1_timer_expire_t3(unsigned long _hfc)
+ {
++ hfcusb_data *hfc = (hfcusb_data *)_hfc;
++
+ hfc->d_if.ifc.l1l2(&hfc->d_if.ifc, PH_DEACTIVATE | INDICATION,
+ NULL);
+
+@@ -360,8 +362,10 @@ l1_timer_expire_t3(hfcusb_data *hfc)
+
+ /* ISDN l1 timer T4 expires */
+ static void
+-l1_timer_expire_t4(hfcusb_data *hfc)
++l1_timer_expire_t4(unsigned long _hfc)
+ {
++ hfcusb_data *hfc = (hfcusb_data *)_hfc;
++
+ hfc->d_if.ifc.l1l2(&hfc->d_if.ifc, PH_DEACTIVATE | INDICATION,
+ NULL);
+
+@@ -1167,12 +1171,12 @@ hfc_usb_init(hfcusb_data *hfc)
+ /* init the t3 timer */
+ init_timer(&hfc->t3_timer);
+ hfc->t3_timer.data = (long) hfc;
+- hfc->t3_timer.function = (void *) l1_timer_expire_t3;
++ hfc->t3_timer.function = l1_timer_expire_t3;
+
+ /* init the t4 timer */
+ init_timer(&hfc->t4_timer);
+ hfc->t4_timer.data = (long) hfc;
+- hfc->t4_timer.function = (void *) l1_timer_expire_t4;
++ hfc->t4_timer.function = l1_timer_expire_t4;
+
+ /* init the background machinery for control requests */
+ hfc->ctrl_read.bRequestType = 0xc0;
+diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c
+index 96d1df0..77a05ee 100644
+--- a/drivers/isdn/hisax/icc.c
++++ b/drivers/isdn/hisax/icc.c
+@@ -580,8 +580,9 @@ DC_Close_icc(struct IsdnCardState *cs) {
+ }
+
+ static void
+-dbusy_timer_handler(struct IsdnCardState *cs)
++dbusy_timer_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ struct PStack *stptr;
+ int rbch, star;
+
+@@ -676,7 +677,7 @@ clear_pending_icc_ints(struct IsdnCardState *cs)
+ void setup_icc(struct IsdnCardState *cs)
+ {
+ INIT_WORK(&cs->tqueue, icc_bh);
+- cs->dbusytimer.function = (void *) dbusy_timer_handler;
++ cs->dbusytimer.function = dbusy_timer_handler;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+ }
+diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
+index 9cc26b4..d7fa044 100644
+--- a/drivers/isdn/hisax/ipacx.c
++++ b/drivers/isdn/hisax/ipacx.c
+@@ -35,7 +35,7 @@
+ static void ph_command(struct IsdnCardState *cs, unsigned int command);
+ static inline void cic_int(struct IsdnCardState *cs);
+ static void dch_l2l1(struct PStack *st, int pr, void *arg);
+-static void dbusy_timer_handler(struct IsdnCardState *cs);
++static void dbusy_timer_handler(unsigned long _cs);
+ static void dch_empty_fifo(struct IsdnCardState *cs, int count);
+ static void dch_fill_fifo(struct IsdnCardState *cs);
+ static inline void dch_int(struct IsdnCardState *cs);
+@@ -198,8 +198,9 @@ dch_l2l1(struct PStack *st, int pr, void *arg)
+ //----------------------------------------------------------
+ //----------------------------------------------------------
+ static void
+-dbusy_timer_handler(struct IsdnCardState *cs)
++dbusy_timer_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ struct PStack *st;
+ int rbchd, stard;
+
+@@ -424,7 +425,7 @@ dch_init(struct IsdnCardState *cs)
+
+ cs->setstack_d = dch_setstack;
+
+- cs->dbusytimer.function = (void *) dbusy_timer_handler;
++ cs->dbusytimer.function = dbusy_timer_handler;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+
+diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
+index 7fdf78f..eb02640 100644
+--- a/drivers/isdn/hisax/isac.c
++++ b/drivers/isdn/hisax/isac.c
+@@ -579,8 +579,9 @@ DC_Close_isac(struct IsdnCardState *cs)
+ }
+
+ static void
+-dbusy_timer_handler(struct IsdnCardState *cs)
++dbusy_timer_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ struct PStack *stptr;
+ int rbch, star;
+
+@@ -672,7 +673,7 @@ void clear_pending_isac_ints(struct IsdnCardState *cs)
+ void setup_isac(struct IsdnCardState *cs)
+ {
+ INIT_WORK(&cs->tqueue, isac_bh);
+- cs->dbusytimer.function = (void *) dbusy_timer_handler;
++ cs->dbusytimer.function = dbusy_timer_handler;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+ }
+diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
+index f4956c7..122d249 100644
+--- a/drivers/isdn/hisax/isar.c
++++ b/drivers/isdn/hisax/isar.c
+@@ -1267,7 +1267,8 @@ isar_int_main(struct IsdnCardState *cs)
+ }
+
+ static void
+-ftimer_handler(struct BCState *bcs) {
++ftimer_handler(unsigned long _bcs) {
++ struct BCState *bcs = (struct BCState *)_bcs;
+ if (bcs->cs->debug)
+ debugl1(bcs->cs, "ftimer flags %04lx",
+ bcs->Flag);
+@@ -1902,7 +1903,7 @@ void initisar(struct IsdnCardState *cs)
+ cs->bcs[1].BC_SetStack = setstack_isar;
+ cs->bcs[0].BC_Close = close_isarstate;
+ cs->bcs[1].BC_Close = close_isarstate;
+- cs->bcs[0].hw.isar.ftimer.function = (void *) ftimer_handler;
++ cs->bcs[0].hw.isar.ftimer.function = ftimer_handler;
+ cs->bcs[0].hw.isar.ftimer.data = (long) &cs->bcs[0];
+ init_timer(&cs->bcs[0].hw.isar.ftimer);
+ cs->bcs[1].hw.isar.ftimer.function = (void *) ftimer_handler;
+diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
+index c754706..8b1ffd5 100644
+--- a/drivers/isdn/hisax/isdnl3.c
++++ b/drivers/isdn/hisax/isdnl3.c
+@@ -160,8 +160,9 @@ newl3state(struct l3_process *pc, int state)
+ }
+
+ static void
+-L3ExpireTimer(struct L3Timer *t)
++L3ExpireTimer(unsigned long _t)
+ {
++ struct L3Timer *t = (struct L3Timer *)_t;
+ t->pc->st->lli.l4l3(t->pc->st, t->event, t->pc);
+ }
+
+@@ -169,7 +170,7 @@ void
+ L3InitTimer(struct l3_process *pc, struct L3Timer *t)
+ {
+ t->pc = pc;
+- t->tl.function = (void *) L3ExpireTimer;
++ t->tl.function = L3ExpireTimer;
+ t->tl.data = (long) t;
+ init_timer(&t->tl);
+ }
+diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
+index a858955..908285b 100644
+--- a/drivers/isdn/hisax/w6692.c
++++ b/drivers/isdn/hisax/w6692.c
+@@ -681,8 +681,9 @@ DC_Close_W6692(struct IsdnCardState *cs)
+ }
+
+ static void
+-dbusy_timer_handler(struct IsdnCardState *cs)
++dbusy_timer_handler(unsigned long _cs)
+ {
++ struct IsdnCardState *cs = (struct IsdnCardState *)_cs;
+ struct PStack *stptr;
+ int rbch, star;
+ u_long flags;
+@@ -901,7 +902,7 @@ static void initW6692(struct IsdnCardState *cs, int part)
+ if (part & 1) {
+ cs->setstack_d = setstack_W6692;
+ cs->DC_Close = DC_Close_W6692;
+- cs->dbusytimer.function = (void *) dbusy_timer_handler;
++ cs->dbusytimer.function = dbusy_timer_handler;
+ cs->dbusytimer.data = (long) cs;
+ init_timer(&cs->dbusytimer);
+ resetW6692(cs);
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 9b856e1..fa03c92 100644
--- a/drivers/isdn/i4l/isdn_common.c
@@ -47989,50 +52026,173 @@ index 358a574..b4987ea 100644
return -EFAULT;
} else
memcpy(msg, buf, count);
+diff --git a/drivers/isdn/mISDN/dsp.h b/drivers/isdn/mISDN/dsp.h
+index fc1733a..27bf261 100644
+--- a/drivers/isdn/mISDN/dsp.h
++++ b/drivers/isdn/mISDN/dsp.h
+@@ -247,7 +247,7 @@ extern void dsp_cmx_hardware(struct dsp_conf *conf, struct dsp *dsp);
+ extern int dsp_cmx_conf(struct dsp *dsp, u32 conf_id);
+ extern void dsp_cmx_receive(struct dsp *dsp, struct sk_buff *skb);
+ extern void dsp_cmx_hdlc(struct dsp *dsp, struct sk_buff *skb);
+-extern void dsp_cmx_send(void *arg);
++extern void dsp_cmx_send(unsigned long arg);
+ extern void dsp_cmx_transmit(struct dsp *dsp, struct sk_buff *skb);
+ extern int dsp_cmx_del_conf_member(struct dsp *dsp);
+ extern int dsp_cmx_del_conf(struct dsp_conf *conf);
+@@ -259,7 +259,7 @@ extern u8 *dsp_dtmf_goertzel_decode(struct dsp *dsp, u8 *data, int len,
+
+ extern int dsp_tone(struct dsp *dsp, int tone);
+ extern void dsp_tone_copy(struct dsp *dsp, u8 *data, int len);
+-extern void dsp_tone_timeout(void *arg);
++extern void dsp_tone_timeout(unsigned long arg);
+
+ extern void dsp_bf_encrypt(struct dsp *dsp, u8 *data, int len);
+ extern void dsp_bf_decrypt(struct dsp *dsp, u8 *data, int len);
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
-index 8e3aa00..65200ac 100644
+index 8e3aa00..723faf8 100644
--- a/drivers/isdn/mISDN/dsp_cmx.c
+++ b/drivers/isdn/mISDN/dsp_cmx.c
-@@ -1625,7 +1625,7 @@ unsigned long dsp_spl_jiffies; /* calculate the next time to fire */
+@@ -1625,8 +1625,8 @@ unsigned long dsp_spl_jiffies; /* calculate the next time to fire */
static u16 dsp_count; /* last sample count */
static int dsp_count_valid; /* if we have last sample count */
-void
+-dsp_cmx_send(void *arg)
+void __intentional_overflow(-1)
- dsp_cmx_send(void *arg)
++dsp_cmx_send(unsigned long arg)
{
struct dsp_conf *conf;
+ struct dsp_conf_member *member;
+diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
+index 0222b1a..67fb76a 100644
+--- a/drivers/isdn/mISDN/dsp_core.c
++++ b/drivers/isdn/mISDN/dsp_core.c
+@@ -1092,7 +1092,7 @@ dspcreate(struct channel_req *crq)
+ ndsp->pcm_bank_tx = -1;
+ ndsp->hfc_conf = -1; /* current conference number */
+ /* set tone timer */
+- ndsp->tone.tl.function = (void *)dsp_tone_timeout;
++ ndsp->tone.tl.function = dsp_tone_timeout;
+ ndsp->tone.tl.data = (long) ndsp;
+ init_timer(&ndsp->tone.tl);
+
+@@ -1204,7 +1204,7 @@ static int __init dsp_init(void)
+ }
+
+ /* set sample timer */
+- dsp_spl_tl.function = (void *)dsp_cmx_send;
++ dsp_spl_tl.function = dsp_cmx_send;
+ dsp_spl_tl.data = 0;
+ init_timer(&dsp_spl_tl);
+ dsp_spl_tl.expires = jiffies + dsp_tics;
+diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c
+index 057e0d6..ed229b5 100644
+--- a/drivers/isdn/mISDN/dsp_tones.c
++++ b/drivers/isdn/mISDN/dsp_tones.c
+@@ -457,9 +457,9 @@ dsp_tone_hw_message(struct dsp *dsp, u8 *sample, int len)
+ * timer expires *
+ *****************/
+ void
+-dsp_tone_timeout(void *arg)
++dsp_tone_timeout(unsigned long arg)
+ {
+- struct dsp *dsp = arg;
++ struct dsp *dsp = (struct dsp *)arg;
+ struct dsp_tone *tone = &dsp->tone;
+ struct pattern *pat = (struct pattern *)tone->pattern;
+ int index = tone->index;
+diff --git a/drivers/isdn/mISDN/fsm.c b/drivers/isdn/mISDN/fsm.c
+index 26477d4..4fa3876 100644
+--- a/drivers/isdn/mISDN/fsm.c
++++ b/drivers/isdn/mISDN/fsm.c
+@@ -97,8 +97,9 @@ mISDN_FsmChangeState(struct FsmInst *fi, int newstate)
+ EXPORT_SYMBOL(mISDN_FsmChangeState);
+
+ static void
+-FsmExpireTimer(struct FsmTimer *ft)
++FsmExpireTimer(unsigned long _ft)
+ {
++ struct FsmTimer *ft = (struct FsmTimer *)_ft;
+ #if FSM_TIMER_DEBUG
+ if (ft->fi->debug)
+ ft->fi->printdebug(ft->fi, "FsmExpireTimer %lx", (long) ft);
+@@ -110,7 +111,7 @@ void
+ mISDN_FsmInitTimer(struct FsmInst *fi, struct FsmTimer *ft)
+ {
+ ft->fi = fi;
+- ft->tl.function = (void *) FsmExpireTimer;
++ ft->tl.function = FsmExpireTimer;
+ ft->tl.data = (long) ft;
+ #if FSM_TIMER_DEBUG
+ if (ft->fi->debug)
+diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
+index 67c2187..fc71e33 100644
+--- a/drivers/isdn/mISDN/l1oip_core.c
++++ b/drivers/isdn/mISDN/l1oip_core.c
+@@ -840,7 +840,7 @@ l1oip_send_bh(struct work_struct *work)
+ * timer stuff
+ */
+ static void
+-l1oip_keepalive(void *data)
++l1oip_keepalive(unsigned long data)
+ {
+ struct l1oip *hc = (struct l1oip *)data;
+
+@@ -848,7 +848,7 @@ l1oip_keepalive(void *data)
+ }
+
+ static void
+-l1oip_timeout(void *data)
++l1oip_timeout(unsigned long data)
+ {
+ struct l1oip *hc = (struct l1oip *)data;
+ struct dchannel *dch = hc->chan[hc->d_idx].dch;
+@@ -1435,13 +1435,13 @@ init_card(struct l1oip *hc, int pri, int bundle)
+ if (ret)
+ return ret;
+
+- hc->keep_tl.function = (void *)l1oip_keepalive;
++ hc->keep_tl.function = l1oip_keepalive;
+ hc->keep_tl.data = (ulong)hc;
+ init_timer(&hc->keep_tl);
+ hc->keep_tl.expires = jiffies + 2 * HZ; /* two seconds first time */
+ add_timer(&hc->keep_tl);
+
+- hc->timeout_tl.function = (void *)l1oip_timeout;
++ hc->timeout_tl.function = l1oip_timeout;
+ hc->timeout_tl.data = (ulong)hc;
+ init_timer(&hc->timeout_tl);
+ hc->timeout_on = 0; /* state that we have timer off */
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
-index 312ffd3..d060510 100644
+index 9e385b3..7077882 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
-@@ -96,9 +96,17 @@ static __init int map_switcher(void)
- * The end address needs +1 because __get_vm_area allocates an
- * extra guard page, so we need space for that.
+@@ -87,7 +87,7 @@ static __init int map_switcher(void)
+ * Copy in the compiled-in Switcher code (from x86/switcher_32.S).
+ * It goes in the first page, which we map in momentarily.
+ */
+- memcpy(kmap(lg_switcher_pages[0]), start_switcher_text,
++ memcpy(kmap(lg_switcher_pages[0]), (void *)ktla_ktva((unsigned long)start_switcher_text),
+ end_switcher_text - start_switcher_text);
+ kunmap(lg_switcher_pages[0]);
+
+@@ -106,9 +106,16 @@ static __init int map_switcher(void)
+ * We want the switcher text to be read-only and executable, and
+ * the stacks to be read-write and non-executable.
*/
+
+#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
-+ switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
-+ VM_ALLOC | VM_KERNEXEC, switcher_addr, switcher_addr
-+ + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
++ switcher_text_vma = __get_vm_area(PAGE_SIZE, VM_ALLOC|VM_NO_GUARD|VM_KERNEXEC,
++ switcher_addr,
++ switcher_addr + PAGE_SIZE);
+#else
- switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
- VM_ALLOC, switcher_addr, switcher_addr
- + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
+ switcher_text_vma = __get_vm_area(PAGE_SIZE, VM_ALLOC|VM_NO_GUARD,
+ switcher_addr,
+ switcher_addr + PAGE_SIZE);
+#endif
-+
- if (!switcher_vma) {
- err = -ENOMEM;
- printk("lguest: could not map switcher pages high\n");
-@@ -121,7 +129,7 @@ static __init int map_switcher(void)
- * Now the Switcher is mapped at the right address, we can't fail!
- * Copy in the compiled-in Switcher code (from x86/switcher_32.S).
- */
-- memcpy(switcher_vma->addr, start_switcher_text,
-+ memcpy(switcher_vma->addr, (void *)ktla_ktva((unsigned long)start_switcher_text),
- end_switcher_text - start_switcher_text);
- printk(KERN_INFO "lguest: mapped switcher at %p\n",
+ if (!switcher_text_vma) {
+ err = -ENOMEM;
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
index e3abebc9..6a35328 100644
--- a/drivers/lguest/page_tables.c
@@ -48154,10 +52314,10 @@ index 40634b0..4f5855e 100644
// Every interrupt can come to us here
// But we must truly tell each apart.
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
-index 134e4fa..243bffe 100644
+index 307db1e..c35f298 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
-@@ -218,7 +218,7 @@ static void rrpc_put_blks(struct rrpc *rrpc)
+@@ -231,7 +231,7 @@ static void rrpc_put_blks(struct rrpc *rrpc)
static struct rrpc_lun *get_next_lun(struct rrpc *rrpc)
{
@@ -48166,7 +52326,7 @@ index 134e4fa..243bffe 100644
return &rrpc->luns[next % rrpc->nr_luns];
}
-@@ -1286,7 +1286,7 @@ static void *rrpc_init(struct nvm_dev *dev, struct gendisk *tdisk,
+@@ -1340,7 +1340,7 @@ static void *rrpc_init(struct nvm_dev *dev, struct gendisk *tdisk,
rrpc->nr_luns = lun_end - lun_begin + 1;
/* simple round-robin strategy */
@@ -48176,10 +52336,10 @@ index 134e4fa..243bffe 100644
ret = rrpc_luns_init(rrpc, lun_begin, lun_end);
if (ret) {
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
-index a9696a0..75d0008 100644
+index f7b3733..0bed14d 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
-@@ -99,7 +99,7 @@ struct rrpc {
+@@ -110,7 +110,7 @@ struct rrpc {
/* Write strategy variables. Move these into each for structure for each
* strategy
*/
@@ -48485,10 +52645,10 @@ index b3ff57d..b2e30fb 100644
return size;
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
-index 4f22e91..5b13fde 100644
+index d80cce4..d7f15c4 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
-@@ -1931,7 +1931,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
+@@ -1927,7 +1927,7 @@ void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
chunk_kb ? "KB" : "B");
if (bitmap->storage.file) {
seq_printf(seq, ", file: ");
@@ -48498,10 +52658,19 @@ index 4f22e91..5b13fde 100644
seq_printf(seq, "\n");
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
-index 515f83e..56f11f0 100644
+index bb9b92e..001e258 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
-@@ -185,16 +185,16 @@ struct cache_features {
+@@ -118,7 +118,7 @@ static void iot_io_end(struct io_tracker *iot, sector_t len)
+ */
+ struct dm_hook_info {
+ bio_end_io_t *bi_end_io;
+-};
++} __no_const;
+
+ static void dm_hook_bio(struct dm_hook_info *h, struct bio *bio,
+ bio_end_io_t *bi_end_io, void *bi_private)
+@@ -182,16 +182,16 @@ struct cache_features {
};
struct cache_stats {
@@ -48528,7 +52697,7 @@ index 515f83e..56f11f0 100644
};
/*
-@@ -273,8 +273,8 @@ struct cache {
+@@ -270,8 +270,8 @@ struct cache {
atomic_t nr_io_migrations;
wait_queue_head_t quiescing_wait;
@@ -48539,7 +52708,31 @@ index 515f83e..56f11f0 100644
/*
* cache_size entries, dirty if set
-@@ -640,7 +640,7 @@ static void set_discard(struct cache *cache, dm_dblock_t b)
+@@ -395,8 +395,10 @@ static struct dm_bio_prison_cell *alloc_prison_cell(struct cache *cache)
+ return dm_bio_prison_alloc_cell(cache->prison, GFP_NOWAIT);
+ }
+
+-static void free_prison_cell(struct cache *cache, struct dm_bio_prison_cell *cell)
++static void free_prison_cell(void *_cache, struct dm_bio_prison_cell *cell)
+ {
++ struct cache *cache = _cache;
++
+ dm_bio_prison_free_cell(cache->prison, cell);
+ }
+
+@@ -493,8 +495,10 @@ static struct dm_bio_prison_cell *prealloc_get_cell(struct prealloc *p)
+ * You can't have more than two cells in a prealloc struct. BUG() will be
+ * called if you try and overfill.
+ */
+-static void prealloc_put_cell(struct prealloc *p, struct dm_bio_prison_cell *cell)
++static void prealloc_put_cell(void *_p, struct dm_bio_prison_cell *cell)
+ {
++ struct prealloc *p = _p;
++
+ if (!p->cell2)
+ p->cell2 = cell;
+
+@@ -637,7 +641,7 @@ static void set_discard(struct cache *cache, dm_dblock_t b)
unsigned long flags;
BUG_ON(from_dblock(b) >= from_dblock(cache->discard_nr_blocks));
@@ -48548,7 +52741,7 @@ index 515f83e..56f11f0 100644
spin_lock_irqsave(&cache->lock, flags);
set_bit(from_dblock(b), cache->discard_bitset);
-@@ -688,10 +688,10 @@ static void load_stats(struct cache *cache)
+@@ -685,10 +689,10 @@ static void load_stats(struct cache *cache)
struct dm_cache_statistics stats;
dm_cache_metadata_get_stats(cache->cmd, &stats);
@@ -48563,7 +52756,7 @@ index 515f83e..56f11f0 100644
}
static void save_stats(struct cache *cache)
-@@ -701,10 +701,10 @@ static void save_stats(struct cache *cache)
+@@ -698,10 +702,10 @@ static void save_stats(struct cache *cache)
if (get_cache_mode(cache) >= CM_READ_ONLY)
return;
@@ -48578,7 +52771,7 @@ index 515f83e..56f11f0 100644
dm_cache_metadata_set_stats(cache->cmd, &stats);
}
-@@ -1327,7 +1327,7 @@ static bool bio_writes_complete_block(struct cache *cache, struct bio *bio)
+@@ -1324,7 +1328,7 @@ static bool bio_writes_complete_block(struct cache *cache, struct bio *bio)
static void avoid_copy(struct dm_cache_migration *mg)
{
@@ -48587,7 +52780,16 @@ index 515f83e..56f11f0 100644
migration_success_pre_commit(mg);
}
-@@ -1654,13 +1654,13 @@ static bool spare_migration_bandwidth(struct cache *cache)
+@@ -1634,7 +1638,7 @@ static void process_discard_bio(struct cache *cache, struct prealloc *structs,
+
+ cell_prealloc = prealloc_get_cell(structs);
+ r = bio_detain_range(cache, dblock_to_oblock(cache, b), dblock_to_oblock(cache, e), bio, cell_prealloc,
+- (cell_free_fn) prealloc_put_cell,
++ prealloc_put_cell,
+ structs, &new_ocell);
+ if (r > 0)
+ return;
+@@ -1651,13 +1655,13 @@ static bool spare_migration_bandwidth(struct cache *cache)
static void inc_hit_counter(struct cache *cache, struct bio *bio)
{
@@ -48603,7 +52805,16 @@ index 515f83e..56f11f0 100644
&cache->stats.read_miss : &cache->stats.write_miss);
}
-@@ -1833,7 +1833,7 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
+@@ -1788,7 +1792,7 @@ static int cell_locker(struct policy_locker *locker, dm_oblock_t b)
+ struct dm_bio_prison_cell *cell_prealloc = prealloc_get_cell(l->structs);
+
+ return bio_detain(l->cache, b, NULL, cell_prealloc,
+- (cell_free_fn) prealloc_put_cell,
++ prealloc_put_cell,
+ l->structs, &l->cell);
+ }
+
+@@ -1830,7 +1834,7 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
*/
if (bio_data_dir(bio) == WRITE) {
@@ -48612,7 +52823,7 @@ index 515f83e..56f11f0 100644
invalidate(cache, structs, block, lookup_result.cblock, new_ocell);
release_cell = false;
-@@ -1866,14 +1866,14 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
+@@ -1863,14 +1867,14 @@ static void process_cell(struct cache *cache, struct prealloc *structs,
break;
case POLICY_NEW:
@@ -48630,7 +52841,16 @@ index 515f83e..56f11f0 100644
demote_then_promote(cache, structs, lookup_result.old_oblock,
block, lookup_result.cblock,
ool.cell, new_ocell);
-@@ -1927,7 +1927,7 @@ static int commit(struct cache *cache, bool clean_shutdown)
+@@ -1900,7 +1904,7 @@ static void process_bio(struct cache *cache, struct prealloc *structs,
+ */
+ cell_prealloc = prealloc_get_cell(structs);
+ r = bio_detain(cache, block, bio, cell_prealloc,
+- (cell_free_fn) prealloc_put_cell,
++ prealloc_put_cell,
+ structs, &new_ocell);
+ if (r > 0)
+ return;
+@@ -1924,7 +1928,7 @@ static int commit(struct cache *cache, bool clean_shutdown)
if (get_cache_mode(cache) >= CM_READ_ONLY)
return -EINVAL;
@@ -48639,7 +52859,7 @@ index 515f83e..56f11f0 100644
r = dm_cache_commit(cache->cmd, clean_shutdown);
if (r)
metadata_operation_failed(cache, "dm_cache_commit", r);
-@@ -2158,32 +2158,32 @@ static void process_invalidation_requests(struct cache *cache)
+@@ -2155,32 +2159,32 @@ static void process_invalidation_requests(struct cache *cache)
*--------------------------------------------------------------*/
static bool is_quiescing(struct cache *cache)
{
@@ -48678,7 +52898,7 @@ index 515f83e..56f11f0 100644
}
static void wait_for_migrations(struct cache *cache)
-@@ -2870,8 +2870,8 @@ static int cache_create(struct cache_args *ca, struct cache **result)
+@@ -2867,8 +2871,8 @@ static int cache_create(struct cache_args *ca, struct cache **result)
init_waitqueue_head(&cache->migration_wait);
init_waitqueue_head(&cache->quiescing_wait);
@@ -48689,7 +52909,7 @@ index 515f83e..56f11f0 100644
r = -ENOMEM;
atomic_set(&cache->nr_dirty, 0);
-@@ -2938,12 +2938,12 @@ static int cache_create(struct cache_args *ca, struct cache **result)
+@@ -2935,12 +2939,12 @@ static int cache_create(struct cache_args *ca, struct cache **result)
load_stats(cache);
@@ -48708,7 +52928,16 @@ index 515f83e..56f11f0 100644
spin_lock_init(&cache->invalidation_lock);
INIT_LIST_HEAD(&cache->invalidation_requests);
-@@ -3554,12 +3554,12 @@ static void cache_status(struct dm_target *ti, status_type_t type,
+@@ -3057,7 +3061,7 @@ static int cache_map(struct dm_target *ti, struct bio *bio)
+ }
+
+ r = bio_detain(cache, block, bio, cell,
+- (cell_free_fn) free_prison_cell,
++ free_prison_cell,
+ cache, &cell);
+ if (r) {
+ if (r < 0)
+@@ -3551,12 +3555,12 @@ static void cache_status(struct dm_target *ti, status_type_t type,
cache->sectors_per_block,
(unsigned long long) from_cblock(residency),
(unsigned long long) from_cblock(cache->cache_size),
@@ -48918,7 +53147,7 @@ index cb5d0da..a06db6d 100644
"start=%llu, len=%llu, dev_size=%llu",
dm_device_name(ti->table->md), bdevname(bdev, b),
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
-index 911ada6..85d4750 100644
+index 185010d..1cc08ad9 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -405,7 +405,7 @@ static void __setup_btree_details(struct dm_pool_metadata *pmd)
@@ -49035,10 +53264,10 @@ index c338aeb..671c671 100644
void dm_uevent_add(struct mapped_device *md, struct list_head *elist)
diff --git a/drivers/md/md.c b/drivers/md/md.c
-index b1e1f6b..8fe237a 100644
+index e55e6cf..9d2a4c7 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
-@@ -197,10 +197,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev);
+@@ -198,10 +198,10 @@ EXPORT_SYMBOL_GPL(bio_clone_mddev);
* start build, activate spare
*/
static DECLARE_WAIT_QUEUE_HEAD(md_event_waiters);
@@ -49051,16 +53280,7 @@ index b1e1f6b..8fe237a 100644
wake_up(&md_event_waiters);
}
EXPORT_SYMBOL_GPL(md_new_event);
-@@ -210,7 +210,7 @@ EXPORT_SYMBOL_GPL(md_new_event);
- */
- static void md_new_event_inintr(struct mddev *mddev)
- {
-- atomic_inc(&md_event_count);
-+ atomic_inc_unchecked(&md_event_count);
- wake_up(&md_event_waiters);
- }
-
-@@ -1434,7 +1434,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
+@@ -1424,7 +1424,7 @@ static int super_1_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor_
if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_RESHAPE_ACTIVE) &&
(le32_to_cpu(sb->feature_map) & MD_FEATURE_NEW_OFFSET))
rdev->new_data_offset += (s32)le32_to_cpu(sb->new_offset);
@@ -49069,7 +53289,7 @@ index b1e1f6b..8fe237a 100644
rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
bmask = queue_logical_block_size(rdev->bdev->bd_disk->queue)-1;
-@@ -1703,7 +1703,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
+@@ -1693,7 +1693,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
else
sb->resync_offset = cpu_to_le64(0);
@@ -49078,7 +53298,7 @@ index b1e1f6b..8fe237a 100644
sb->raid_disks = cpu_to_le32(mddev->raid_disks);
sb->size = cpu_to_le64(mddev->dev_sectors);
-@@ -2711,7 +2711,7 @@ __ATTR_PREALLOC(state, S_IRUGO|S_IWUSR, state_show, state_store);
+@@ -2708,7 +2708,7 @@ __ATTR_PREALLOC(state, S_IRUGO|S_IWUSR, state_show, state_store);
static ssize_t
errors_show(struct md_rdev *rdev, char *page)
{
@@ -49087,7 +53307,7 @@ index b1e1f6b..8fe237a 100644
}
static ssize_t
-@@ -2723,7 +2723,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len)
+@@ -2720,7 +2720,7 @@ errors_store(struct md_rdev *rdev, const char *buf, size_t len)
rv = kstrtouint(buf, 10, &n);
if (rv < 0)
return rv;
@@ -49096,7 +53316,7 @@ index b1e1f6b..8fe237a 100644
return len;
}
static struct rdev_sysfs_entry rdev_errors =
-@@ -3167,8 +3167,8 @@ int md_rdev_init(struct md_rdev *rdev)
+@@ -3170,8 +3170,8 @@ int md_rdev_init(struct md_rdev *rdev)
rdev->sb_loaded = 0;
rdev->bb_page = NULL;
atomic_set(&rdev->nr_pending, 0);
@@ -49107,7 +53327,7 @@ index b1e1f6b..8fe237a 100644
INIT_LIST_HEAD(&rdev->same_set);
init_waitqueue_head(&rdev->blocked_wait);
-@@ -4392,7 +4392,7 @@ mismatch_cnt_show(struct mddev *mddev, char *page)
+@@ -4388,7 +4388,7 @@ mismatch_cnt_show(struct mddev *mddev, char *page)
{
return sprintf(page, "%llu\n",
(unsigned long long)
@@ -49116,7 +53336,16 @@ index b1e1f6b..8fe237a 100644
}
static struct md_sysfs_entry md_mismatches = __ATTR_RO(mismatch_cnt);
-@@ -5431,7 +5431,7 @@ static void md_clean(struct mddev *mddev)
+@@ -5076,7 +5076,7 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data)
+ return NULL;
+ }
+
+-static int add_named_array(const char *val, struct kernel_param *kp)
++static int add_named_array(const char *val, const struct kernel_param *kp)
+ {
+ /* val must be "md_*" where * is not all digits.
+ * We allocate an array with a large free minor number, and
+@@ -5426,7 +5426,7 @@ static void md_clean(struct mddev *mddev)
mddev->new_layout = 0;
mddev->new_chunk_sectors = 0;
mddev->curr_resync = 0;
@@ -49125,9 +53354,9 @@ index b1e1f6b..8fe237a 100644
mddev->suspend_lo = mddev->suspend_hi = 0;
mddev->sync_speed_min = mddev->sync_speed_max = 0;
mddev->recovery = 0;
-@@ -5847,9 +5847,10 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
+@@ -5841,9 +5841,10 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
info.patch_version = MD_PATCHLEVEL_VERSION;
- info.ctime = mddev->ctime;
+ info.ctime = clamp_t(time64_t, mddev->ctime, 0, U32_MAX);
info.level = mddev->level;
- info.size = mddev->dev_sectors / 2;
- if (info.size != mddev->dev_sectors / 2) /* overflow */
@@ -49138,7 +53367,7 @@ index b1e1f6b..8fe237a 100644
info.nr_disks = nr;
info.raid_disks = mddev->raid_disks;
info.md_minor = mddev->md_minor;
-@@ -7391,7 +7392,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
+@@ -7406,7 +7407,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
spin_unlock(&pers_lock);
seq_printf(seq, "\n");
@@ -49147,7 +53376,7 @@ index b1e1f6b..8fe237a 100644
return 0;
}
if (v == (void*)2) {
-@@ -7491,7 +7492,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
+@@ -7506,7 +7507,7 @@ static int md_seq_open(struct inode *inode, struct file *file)
return error;
seq = file->private_data;
@@ -49156,7 +53385,7 @@ index b1e1f6b..8fe237a 100644
return error;
}
-@@ -7508,7 +7509,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
+@@ -7523,7 +7524,7 @@ static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
/* always allow read */
mask = POLLIN | POLLRDNORM;
@@ -49165,7 +53394,7 @@ index b1e1f6b..8fe237a 100644
mask |= POLLERR | POLLPRI;
return mask;
}
-@@ -7608,7 +7609,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
+@@ -7623,7 +7624,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
(int)part_stat_read(&disk->part0, sectors[1]) -
@@ -49174,7 +53403,7 @@ index b1e1f6b..8fe237a 100644
/* sync IO will cause sync_io to increase before the disk_stats
* as sync_io is counted when a request starts, and
* disk_stats is counted when it completes.
-@@ -7859,7 +7860,7 @@ void md_do_sync(struct md_thread *thread)
+@@ -7874,7 +7875,7 @@ void md_do_sync(struct md_thread *thread)
* which defaults to physical size, but can be virtual size
*/
max_sectors = mddev->resync_max_sectors;
@@ -49183,11 +53412,25 @@ index b1e1f6b..8fe237a 100644
/* we don't use the checkpoint if there's a bitmap */
if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
j = mddev->resync_min;
+@@ -8870,11 +8871,11 @@ static __exit void md_exit(void)
+ subsys_initcall(md_init);
+ module_exit(md_exit)
+
+-static int get_ro(char *buffer, struct kernel_param *kp)
++static int get_ro(char *buffer, const struct kernel_param *kp)
+ {
+ return sprintf(buffer, "%d", start_readonly);
+ }
+-static int set_ro(const char *val, struct kernel_param *kp)
++static int set_ro(const char *val, const struct kernel_param *kp)
+ {
+ return kstrtouint(val, 10, (unsigned int *)&start_readonly);
+ }
diff --git a/drivers/md/md.h b/drivers/md/md.h
-index dfa57b4..7af9cda 100644
+index b5c4be7..d8da717 100644
--- a/drivers/md/md.h
+++ b/drivers/md/md.h
-@@ -102,13 +102,13 @@ struct md_rdev {
+@@ -96,13 +96,13 @@ struct md_rdev {
* only maintained for arrays that
* support hot removal
*/
@@ -49203,7 +53446,7 @@ index dfa57b4..7af9cda 100644
* for reporting to userspace and storing
* in superblock.
*/
-@@ -314,7 +314,7 @@ struct mddev {
+@@ -282,7 +282,7 @@ struct mddev {
sector_t resync_max_sectors; /* may be set by personality */
@@ -49212,7 +53455,7 @@ index dfa57b4..7af9cda 100644
* parity/replica mismatch found
*/
-@@ -492,7 +492,7 @@ extern void mddev_unlock(struct mddev *mddev);
+@@ -461,7 +461,7 @@ extern void mddev_unlock(struct mddev *mddev);
static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
{
@@ -49256,10 +53499,10 @@ index 3e6d115..ffecdeb 100644
/*----------------------------------------------------------------*/
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
-index 515554c..51df664 100644
+index bb5bce0..518482b 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
-@@ -1063,7 +1063,7 @@ static void make_request(struct mddev *mddev, struct bio * bio)
+@@ -1063,7 +1063,7 @@ static void raid1_make_request(struct mddev *mddev, struct bio * bio)
struct blk_plug_cb *cb;
struct raid1_plug_cb *plug = NULL;
int first_clone;
@@ -49296,7 +53539,7 @@ index 515554c..51df664 100644
"md/raid1:%s: read error corrected "
"(%d sectors at %llu on %s)\n",
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
-index ebb0dd6..2be20c1 100644
+index e3fd725..9e365b2 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1068,7 +1068,7 @@ static void __make_request(struct mddev *mddev, struct bio *bio)
@@ -49377,10 +53620,10 @@ index ebb0dd6..2be20c1 100644
rdev_dec_pending(rdev, mddev);
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
-index 10ce885..b98e542 100644
+index 32d5287..f9e1b58 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
-@@ -1112,23 +1112,23 @@ async_copy_data(int frombio, struct bio *bio, struct page **page,
+@@ -1110,23 +1110,23 @@ async_copy_data(int frombio, struct bio *bio, struct page **page,
struct bio_vec bvl;
struct bvec_iter iter;
struct page *bio_page;
@@ -49410,7 +53653,7 @@ index 10ce885..b98e542 100644
if (page_offset < 0) {
b_offset = -page_offset;
-@@ -2019,6 +2019,10 @@ static int grow_one_stripe(struct r5conf *conf, gfp_t gfp)
+@@ -2017,6 +2017,10 @@ static int grow_one_stripe(struct r5conf *conf, gfp_t gfp)
return 1;
}
@@ -49421,7 +53664,7 @@ index 10ce885..b98e542 100644
static int grow_stripes(struct r5conf *conf, int num)
{
struct kmem_cache *sc;
-@@ -2029,7 +2033,11 @@ static int grow_stripes(struct r5conf *conf, int num)
+@@ -2027,7 +2031,11 @@ static int grow_stripes(struct r5conf *conf, int num)
"raid%d-%s", conf->level, mdname(conf->mddev));
else
sprintf(conf->cache_name[0],
@@ -49433,7 +53676,7 @@ index 10ce885..b98e542 100644
sprintf(conf->cache_name[1], "%s-alt", conf->cache_name[0]);
conf->active_name = 0;
-@@ -2332,21 +2340,21 @@ static void raid5_end_read_request(struct bio * bi)
+@@ -2330,21 +2338,21 @@ static void raid5_end_read_request(struct bio * bi)
mdname(conf->mddev), STRIPE_SECTORS,
(unsigned long long)s,
bdevname(rdev->bdev, b));
@@ -49459,7 +53702,7 @@ index 10ce885..b98e542 100644
if (test_bit(R5_ReadRepl, &sh->dev[i].flags))
printk_ratelimited(
KERN_WARNING
-@@ -2374,7 +2382,7 @@ static void raid5_end_read_request(struct bio * bi)
+@@ -2372,7 +2380,7 @@ static void raid5_end_read_request(struct bio * bi)
mdname(conf->mddev),
(unsigned long long)s,
bdn);
@@ -49468,7 +53711,7 @@ index 10ce885..b98e542 100644
> conf->max_nr_stripes)
printk(KERN_WARNING
"md/raid:%s: Too many read errors, failing device %s.\n",
-@@ -3746,7 +3754,7 @@ static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh,
+@@ -3744,7 +3752,7 @@ static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh,
*/
set_bit(STRIPE_INSYNC, &sh->state);
else {
@@ -49477,7 +53720,7 @@ index 10ce885..b98e542 100644
if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery))
/* don't try to repair!! */
set_bit(STRIPE_INSYNC, &sh->state);
-@@ -3898,7 +3906,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
+@@ -3896,7 +3904,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
*/
}
} else {
@@ -49486,19 +53729,32 @@ index 10ce885..b98e542 100644
if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery))
/* don't try to repair!! */
set_bit(STRIPE_INSYNC, &sh->state);
+diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
+index ce6a711..f87ae51 100644
+--- a/drivers/media/dvb-core/dvb_net.c
++++ b/drivers/media/dvb-core/dvb_net.c
+@@ -882,7 +882,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
+ return 0;
+ }
+
+-static int dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
+ {
+ dev_kfree_skb(skb);
+ return NETDEV_TX_OK;
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
-index 13bb57f..0ca21b2 100644
+index 560450a..4a72ed8 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
-@@ -272,7 +272,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
- const struct dvb_device *template, void *priv, int type)
+@@ -428,7 +428,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
+ int demux_sink_pads)
{
struct dvb_device *dvbdev;
- struct file_operations *dvbdevfops;
+ file_operations_no_const *dvbdevfops;
struct device *clsdev;
int minor;
- int id;
+ int id, ret;
diff --git a/drivers/media/dvb-frontends/af9033.h b/drivers/media/dvb-frontends/af9033.h
index 6ad22b6..6e90e2a 100644
--- a/drivers/media/dvb-frontends/af9033.h
@@ -49511,6 +53767,71 @@ index 6ad22b6..6e90e2a 100644
+} __no_const;
#endif /* AF9033_H */
+diff --git a/drivers/media/dvb-frontends/cx24116.c b/drivers/media/dvb-frontends/cx24116.c
+index 8814f36..2adf845 100644
+--- a/drivers/media/dvb-frontends/cx24116.c
++++ b/drivers/media/dvb-frontends/cx24116.c
+@@ -1462,7 +1462,7 @@ static int cx24116_tune(struct dvb_frontend *fe, bool re_tune,
+ return cx24116_read_status(fe, status);
+ }
+
+-static int cx24116_get_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo cx24116_get_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
+diff --git a/drivers/media/dvb-frontends/cx24117.c b/drivers/media/dvb-frontends/cx24117.c
+index 5f77bc8..6d34c94 100644
+--- a/drivers/media/dvb-frontends/cx24117.c
++++ b/drivers/media/dvb-frontends/cx24117.c
+@@ -1555,7 +1555,7 @@ static int cx24117_tune(struct dvb_frontend *fe, bool re_tune,
+ return cx24117_read_status(fe, status);
+ }
+
+-static int cx24117_get_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo cx24117_get_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
+diff --git a/drivers/media/dvb-frontends/cx24120.c b/drivers/media/dvb-frontends/cx24120.c
+index 3b0ef52..75afcce 100644
+--- a/drivers/media/dvb-frontends/cx24120.c
++++ b/drivers/media/dvb-frontends/cx24120.c
+@@ -1492,7 +1492,7 @@ static int cx24120_tune(struct dvb_frontend *fe, bool re_tune,
+ return cx24120_read_status(fe, status);
+ }
+
+-static int cx24120_get_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo cx24120_get_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
+diff --git a/drivers/media/dvb-frontends/cx24123.c b/drivers/media/dvb-frontends/cx24123.c
+index 0fe7fb1..b0bed47 100644
+--- a/drivers/media/dvb-frontends/cx24123.c
++++ b/drivers/media/dvb-frontends/cx24123.c
+@@ -1009,7 +1009,7 @@ static int cx24123_tune(struct dvb_frontend *fe,
+ return retval;
+ }
+
+-static int cx24123_get_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo cx24123_get_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
+diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c
+index 24a457d..b206eca 100644
+--- a/drivers/media/dvb-frontends/cxd2820r_core.c
++++ b/drivers/media/dvb-frontends/cxd2820r_core.c
+@@ -571,7 +571,7 @@ error:
+ return DVBFE_ALGO_SEARCH_ERROR;
+ }
+
+-static int cxd2820r_get_frontend_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo cxd2820r_get_frontend_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_CUSTOM;
+ }
diff --git a/drivers/media/dvb-frontends/dib3000.h b/drivers/media/dvb-frontends/dib3000.h
index 6ae9899..07d8543 100644
--- a/drivers/media/dvb-frontends/dib3000.h
@@ -49550,8 +53871,91 @@ index 2b8b4b1..8cef451 100644
#if IS_REACHABLE(CONFIG_DVB_DIB8000)
void *dib8000_attach(struct dib8000_ops *ops);
+diff --git a/drivers/media/dvb-frontends/hd29l2.c b/drivers/media/dvb-frontends/hd29l2.c
+index 40e359f..550aea4 100644
+--- a/drivers/media/dvb-frontends/hd29l2.c
++++ b/drivers/media/dvb-frontends/hd29l2.c
+@@ -555,7 +555,7 @@ err:
+ return DVBFE_ALGO_SEARCH_ERROR;
+ }
+
+-static int hd29l2_get_frontend_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo hd29l2_get_frontend_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_CUSTOM;
+ }
+diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
+index 721fbc0..fe21cc9 100644
+--- a/drivers/media/dvb-frontends/lgdt3306a.c
++++ b/drivers/media/dvb-frontends/lgdt3306a.c
+@@ -1734,7 +1734,7 @@ static int lgdt3306a_get_tune_settings(struct dvb_frontend *fe,
+ return 0;
+ }
+
+-static int lgdt3306a_search(struct dvb_frontend *fe)
++static enum dvbfe_search lgdt3306a_search(struct dvb_frontend *fe)
+ {
+ enum fe_status status = 0;
+ int i, ret;
+diff --git a/drivers/media/dvb-frontends/mt312.c b/drivers/media/dvb-frontends/mt312.c
+index c36e676..6c3f140 100644
+--- a/drivers/media/dvb-frontends/mt312.c
++++ b/drivers/media/dvb-frontends/mt312.c
+@@ -381,7 +381,7 @@ static int mt312_send_master_cmd(struct dvb_frontend *fe,
+ }
+
+ static int mt312_send_burst(struct dvb_frontend *fe,
+- const enum fe_sec_mini_cmd c)
++ enum fe_sec_mini_cmd c)
+ {
+ struct mt312_state *state = fe->demodulator_priv;
+ const u8 mini_tab[2] = { 0x02, 0x03 };
+@@ -405,7 +405,7 @@ static int mt312_send_burst(struct dvb_frontend *fe,
+ }
+
+ static int mt312_set_tone(struct dvb_frontend *fe,
+- const enum fe_sec_tone_mode t)
++ enum fe_sec_tone_mode t)
+ {
+ struct mt312_state *state = fe->demodulator_priv;
+ const u8 tone_tab[2] = { 0x01, 0x00 };
+@@ -429,7 +429,7 @@ static int mt312_set_tone(struct dvb_frontend *fe,
+ }
+
+ static int mt312_set_voltage(struct dvb_frontend *fe,
+- const enum fe_sec_voltage v)
++ enum fe_sec_voltage v)
+ {
+ struct mt312_state *state = fe->demodulator_priv;
+ const u8 volt_tab[3] = { 0x00, 0x40, 0x00 };
+diff --git a/drivers/media/dvb-frontends/s921.c b/drivers/media/dvb-frontends/s921.c
+index d6a8fa6..b525f9c 100644
+--- a/drivers/media/dvb-frontends/s921.c
++++ b/drivers/media/dvb-frontends/s921.c
+@@ -464,7 +464,7 @@ static int s921_tune(struct dvb_frontend *fe,
+ return rc;
+ }
+
+-static int s921_get_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo s921_get_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
+diff --git a/drivers/media/pci/bt8xx/dst.c b/drivers/media/pci/bt8xx/dst.c
+index 4a90eee..2cec315 100644
+--- a/drivers/media/pci/bt8xx/dst.c
++++ b/drivers/media/pci/bt8xx/dst.c
+@@ -1683,7 +1683,7 @@ static int dst_tune_frontend(struct dvb_frontend* fe,
+ return 0;
+ }
+
+-static int dst_get_tuning_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo dst_get_tuning_algo(struct dvb_frontend *fe)
+ {
+ return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW;
+ }
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
-index aef9acf..722ff02 100644
+index 5f331df..674b0e0 100644
--- a/drivers/media/pci/cx88/cx88-video.c
+++ b/drivers/media/pci/cx88/cx88-video.c
@@ -50,9 +50,9 @@ MODULE_VERSION(CX88_VERSION);
@@ -49568,7 +53972,7 @@ index aef9acf..722ff02 100644
module_param_array(video_nr, int, NULL, 0444);
module_param_array(vbi_nr, int, NULL, 0444);
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c
-index c2e60b4..5eeccc0 100644
+index 374033a..461c38c 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -83,7 +83,7 @@ static struct pci_device_id ivtv_pci_tbl[] = {
@@ -49580,6 +53984,32 @@ index c2e60b4..5eeccc0 100644
/* Parameter declarations */
static int cardtype[IVTV_MAX_CARDS];
+diff --git a/drivers/media/pci/pt1/va1j5jf8007s.c b/drivers/media/pci/pt1/va1j5jf8007s.c
+index d0e70dc0..e4fee68 100644
+--- a/drivers/media/pci/pt1/va1j5jf8007s.c
++++ b/drivers/media/pci/pt1/va1j5jf8007s.c
+@@ -102,7 +102,7 @@ static int va1j5jf8007s_read_snr(struct dvb_frontend *fe, u16 *snr)
+ return 0;
+ }
+
+-static int va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo va1j5jf8007s_get_frontend_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
+diff --git a/drivers/media/pci/pt1/va1j5jf8007t.c b/drivers/media/pci/pt1/va1j5jf8007t.c
+index 0268f20..de9dff7 100644
+--- a/drivers/media/pci/pt1/va1j5jf8007t.c
++++ b/drivers/media/pci/pt1/va1j5jf8007t.c
+@@ -92,7 +92,7 @@ static int va1j5jf8007t_read_snr(struct dvb_frontend *fe, u16 *snr)
+ return 0;
+ }
+
+-static int va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe)
++static enum dvbfe_algo va1j5jf8007t_get_frontend_algo(struct dvb_frontend *fe)
+ {
+ return DVBFE_ALGO_HW;
+ }
diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
index f50d072..0214f25 100644
--- a/drivers/media/pci/solo6x10/solo6x10-core.c
@@ -49657,6 +54087,28 @@ index 4e7db89..bd7ef95 100644
};
struct zoran_buffer {
+diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c
+index 9d2697f..65fb18f 100644
+--- a/drivers/media/pci/zoran/zoran_card.c
++++ b/drivers/media/pci/zoran/zoran_card.c
+@@ -1356,7 +1356,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ if (zr->card.video_codec) {
+ codec_name = codecid_to_modulename(zr->card.video_codec);
+ if (codec_name) {
+- result = request_module(codec_name);
++ result = request_module("%s", codec_name);
+ if (result) {
+ dprintk(1,
+ KERN_ERR
+@@ -1368,7 +1368,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ if (zr->card.video_vfe) {
+ vfe_name = codecid_to_modulename(zr->card.video_vfe);
+ if (vfe_name) {
+- result = request_module(vfe_name);
++ result = request_module("%s", vfe_name);
+ if (result < 0) {
+ dprintk(1,
+ KERN_ERR
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
index 80caa70..d076ecf 100644
--- a/drivers/media/pci/zoran/zoran_driver.c
@@ -49754,7 +54206,7 @@ index a0ec14a..225f4ac 100644
if (done && done != layer->shadow_buf)
vb2_buffer_done(&done->vb.vb2_buf, VB2_BUF_STATE_DONE);
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
-index dc1c679..30aae739b 100644
+index d9e7f03..2732585 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -210,7 +210,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer)
@@ -49866,6 +54318,19 @@ index dd002a4..7fafd8a 100644
.release = mxr_vp_layer_release,
.buffer_set = mxr_vp_buffer_set,
.stream_set = mxr_vp_stream_set,
+diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
+index 46c7186..47130c8 100644
+--- a/drivers/media/platform/soc_camera/soc_camera.c
++++ b/drivers/media/platform/soc_camera/soc_camera.c
+@@ -1791,7 +1791,7 @@ static int soc_camera_probe(struct soc_camera_host *ici,
+ goto eadd;
+
+ if (shd->module_name)
+- ret = request_module(shd->module_name);
++ ret = request_module("%s", shd->module_name);
+
+ ret = shd->add_device(icd);
+ if (ret < 0)
diff --git a/drivers/media/platform/sti/c8sectpfe/Kconfig b/drivers/media/platform/sti/c8sectpfe/Kconfig
index 7420a50..e6f31a0 100644
--- a/drivers/media/platform/sti/c8sectpfe/Kconfig
@@ -49904,7 +54369,7 @@ index 82affae..42833ec 100644
}
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
-index 5236035..c622c74 100644
+index 70fd8e8..0088740 100644
--- a/drivers/media/radio/radio-maxiradio.c
+++ b/drivers/media/radio/radio-maxiradio.c
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(radio_nr, "Radio device number");
@@ -49917,7 +54382,7 @@ index 5236035..c622c74 100644
#define PCI_VENDOR_ID_GUILLEMOT 0x5046
#define PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO 0x1001
diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c
-index 050b3bb..79f62b9 100644
+index 85667a9..ec4dc0a 100644
--- a/drivers/media/radio/radio-shark.c
+++ b/drivers/media/radio/radio-shark.c
@@ -79,7 +79,7 @@ struct shark_device {
@@ -49930,7 +54395,7 @@ index 050b3bb..79f62b9 100644
static void shark_write_val(struct snd_tea575x *tea, u32 val)
{
diff --git a/drivers/media/radio/radio-shark2.c b/drivers/media/radio/radio-shark2.c
-index 8654e0d..0608a64 100644
+index 0e65a85..3fa6f5c 100644
--- a/drivers/media/radio/radio-shark2.c
+++ b/drivers/media/radio/radio-shark2.c
@@ -74,7 +74,7 @@ struct shark_device {
@@ -49943,7 +54408,7 @@ index 8654e0d..0608a64 100644
static int shark_write_reg(struct radio_tea5777 *tea, u64 reg)
{
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
-index 9cbb8cd..2bf2ff3 100644
+index 859f0c0..46e3c75 100644
--- a/drivers/media/radio/radio-si476x.c
+++ b/drivers/media/radio/radio-si476x.c
@@ -1445,7 +1445,7 @@ static int si476x_radio_probe(struct platform_device *pdev)
@@ -50674,8 +55139,147 @@ index 6c3c477..6c435a4 100644
return 1;
}
+diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c
+index fd888a6..0d01210 100644
+--- a/drivers/media/usb/pvrusb2/pvrusb2-context.c
++++ b/drivers/media/usb/pvrusb2/pvrusb2-context.c
+@@ -103,8 +103,10 @@ static void pvr2_context_destroy(struct pvr2_context *mp)
+ }
+
+
+-static void pvr2_context_notify(struct pvr2_context *mp)
++static void pvr2_context_notify(void *_mp)
+ {
++ struct pvr2_context *mp = _mp;
++
+ pvr2_context_set_notify(mp,!0);
+ }
+
+@@ -119,9 +121,7 @@ static void pvr2_context_check(struct pvr2_context *mp)
+ pvr2_trace(PVR2_TRACE_CTXT,
+ "pvr2_context %p (initialize)", mp);
+ /* Finish hardware initialization */
+- if (pvr2_hdw_initialize(mp->hdw,
+- (void (*)(void *))pvr2_context_notify,
+- mp)) {
++ if (pvr2_hdw_initialize(mp->hdw, pvr2_context_notify, mp)) {
+ mp->video_stream.stream =
+ pvr2_hdw_get_video_stream(mp->hdw);
+ /* Trigger interface initialization. By doing this
+diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
+index 8c95793..2309b9e 100644
+--- a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
++++ b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c
+@@ -101,8 +101,10 @@ static int pvr2_dvb_feed_thread(void *data)
+ return stat;
+ }
+
+-static void pvr2_dvb_notify(struct pvr2_dvb_adapter *adap)
++static void pvr2_dvb_notify(void *_adap)
+ {
++ struct pvr2_dvb_adapter *adap = _adap;
++
+ wake_up(&adap->buffer_wait_data);
+ }
+
+@@ -161,8 +163,7 @@ static int pvr2_dvb_stream_do_start(struct pvr2_dvb_adapter *adap)
+ if (!(adap->buffer_storage[idx])) return -ENOMEM;
+ }
+
+- pvr2_stream_set_callback(pvr->video_stream.stream,
+- (pvr2_stream_callback) pvr2_dvb_notify, adap);
++ pvr2_stream_set_callback(pvr->video_stream.stream, pvr2_dvb_notify, adap);
+
+ ret = pvr2_stream_set_buffer_count(stream, PVR2_DVB_BUFFER_COUNT);
+ if (ret < 0) return ret;
+diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
+index 0533ef2..2248d97 100644
+--- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
++++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
+@@ -2097,7 +2097,7 @@ static void pvr2_hdw_load_modules(struct pvr2_hdw *hdw)
+
+ cm = &hdw->hdw_desc->client_modules;
+ for (idx = 0; idx < cm->cnt; idx++) {
+- request_module(cm->lst[idx]);
++ request_module("%s", cm->lst[idx]);
+ }
+
+ ct = &hdw->hdw_desc->client_table;
+diff --git a/drivers/media/usb/pvrusb2/pvrusb2-std.c b/drivers/media/usb/pvrusb2/pvrusb2-std.c
+index 9a596a3..38de071 100644
+--- a/drivers/media/usb/pvrusb2/pvrusb2-std.c
++++ b/drivers/media/usb/pvrusb2/pvrusb2-std.c
+@@ -216,7 +216,7 @@ unsigned int pvr2_std_id_to_str(char *bufPtr, unsigned int bufSize,
+ bufSize -= c2;
+ bufPtr += c2;
+ c2 = scnprintf(bufPtr,bufSize,
+- ip->name);
++ "%s", ip->name);
+ c1 += c2;
+ bufSize -= c2;
+ bufPtr += c2;
+diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+index 81f788b..9619f47 100644
+--- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
++++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
+@@ -1069,8 +1069,10 @@ static int pvr2_v4l2_open(struct file *file)
+ }
+
+
+-static void pvr2_v4l2_notify(struct pvr2_v4l2_fh *fhp)
++static void pvr2_v4l2_notify(void *_fhp)
+ {
++ struct pvr2_v4l2_fh *fhp = _fhp;
++
+ wake_up(&fhp->wait_data);
+ }
+
+@@ -1103,7 +1105,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
+
+ hdw = fh->channel.mc_head->hdw;
+ sp = fh->pdi->stream->stream;
+- pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh);
++ pvr2_stream_set_callback(sp,pvr2_v4l2_notify,fh);
+ pvr2_hdw_set_stream_type(hdw,fh->pdi->config);
+ if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
+ return pvr2_ioread_set_enabled(fh->rhp,!0);
+diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
+index 4e71488..1bcd8a5 100644
+--- a/drivers/media/usb/uvc/uvc_driver.c
++++ b/drivers/media/usb/uvc/uvc_driver.c
+@@ -2058,7 +2058,7 @@ static int uvc_reset_resume(struct usb_interface *intf)
+ * Module parameters
+ */
+
+-static int uvc_clock_param_get(char *buffer, struct kernel_param *kp)
++static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp)
+ {
+ if (uvc_clock_param == CLOCK_MONOTONIC)
+ return sprintf(buffer, "CLOCK_MONOTONIC");
+@@ -2066,7 +2066,7 @@ static int uvc_clock_param_get(char *buffer, struct kernel_param *kp)
+ return sprintf(buffer, "CLOCK_REALTIME");
+ }
+
+-static int uvc_clock_param_set(const char *val, struct kernel_param *kp)
++static int uvc_clock_param_set(const char *val, const struct kernel_param *kp)
+ {
+ if (strncasecmp(val, "clock_", strlen("clock_")) == 0)
+ val += strlen("clock_");
+diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
+index 5b80850..97b8443 100644
+--- a/drivers/media/v4l2-core/v4l2-common.c
++++ b/drivers/media/v4l2-core/v4l2-common.c
+@@ -268,7 +268,7 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
+ BUG_ON(!v4l2_dev);
+
+ if (info->modalias[0])
+- request_module(info->modalias);
++ request_module("%s", info->modalias);
+
+ spi = spi_new_device(master, info);
+
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
-index f38c076..072bb90 100644
+index 019644f..a988084 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -448,7 +448,7 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
@@ -50733,7 +55337,7 @@ index f38c076..072bb90 100644
}
diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c
-index 5b0a30b..1974b38 100644
+index 06fa5f1..2231dda 100644
--- a/drivers/media/v4l2-core/v4l2-device.c
+++ b/drivers/media/v4l2-core/v4l2-device.c
@@ -74,9 +74,9 @@ int v4l2_device_put(struct v4l2_device *v4l2_dev)
@@ -50749,12 +55353,210 @@ index 5b0a30b..1974b38 100644
if (basename[len - 1] >= '0' && basename[len - 1] <= '9')
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
-index 7486af2..a1f2e87 100644
+index 8a018c6..83f25a7 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
-@@ -2382,7 +2382,8 @@ struct v4l2_ioctl_info {
- struct file *file, void *fh, void *p);
- } u;
+@@ -2372,49 +2372,222 @@ static int v4l_enum_freq_bands(const struct v4l2_ioctl_ops *ops,
+ return -ENOTTY;
+ }
+
++static int v4l_vidioc_g_fbuf(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_fbuf(file, fh, arg);
++}
++
++static int v4l_vidioc_s_fbuf(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_fbuf(file, fh, arg);
++}
++
++static int v4l_vidioc_expbuf(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_expbuf(file, fh, arg);
++}
++
++static int v4l_vidioc_g_std(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_std(file, fh, arg);
++}
++
++static int v4l_vidioc_g_audio(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_audio(file, fh, arg);
++}
++
++static int v4l_vidioc_s_audio(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_audio(file, fh, arg);
++}
++
++static int v4l_vidioc_g_input(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_input(file, fh, arg);
++}
++
++static int v4l_vidioc_g_edid(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_edid(file, fh, arg);
++}
++
++static int v4l_vidioc_s_edid(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_edid(file, fh, arg);
++}
++
++static int v4l_vidioc_g_output(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_output(file, fh, arg);
++}
++
++static int v4l_vidioc_g_audout(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_audout(file, fh, arg);
++}
++
++static int v4l_vidioc_s_audout(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_audout(file, fh, arg);
++}
++
++static int v4l_vidioc_s_modulator(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_modulator(file, fh, arg);
++}
++
++static int v4l_vidioc_g_selection(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_selection(file, fh, arg);
++}
++
++static int v4l_vidioc_s_selection(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_selection(file, fh, arg);
++}
++
++static int v4l_vidioc_g_jpegcomp(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_jpegcomp(file, fh, arg);
++}
++
++static int v4l_vidioc_s_jpegcomp(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_jpegcomp(file, fh, arg);
++}
++
++static int v4l_vidioc_enumaudio(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_enumaudio(file, fh, arg);
++}
++
++static int v4l_vidioc_enumaudout(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_enumaudout(file, fh, arg);
++}
++
++static int v4l_vidioc_enum_framesizes(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_enum_framesizes(file, fh, arg);
++}
++
++static int v4l_vidioc_enum_frameintervals(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_enum_frameintervals(file, fh, arg);
++}
++
++static int v4l_vidioc_g_enc_index(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_enc_index(file, fh, arg);
++}
++
++static int v4l_vidioc_encoder_cmd(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_encoder_cmd(file, fh, arg);
++}
++
++static int v4l_vidioc_try_encoder_cmd(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_try_encoder_cmd(file, fh, arg);
++}
++
++static int v4l_vidioc_decoder_cmd(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_decoder_cmd(file, fh, arg);
++}
++
++static int v4l_vidioc_try_decoder_cmd(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_try_decoder_cmd(file, fh, arg);
++}
++
++static int v4l_vidioc_s_dv_timings(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_s_dv_timings(file, fh, arg);
++}
++
++static int v4l_vidioc_g_dv_timings(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_g_dv_timings(file, fh, arg);
++}
++
++static int v4l_vidioc_enum_dv_timings(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_enum_dv_timings(file, fh, arg);
++}
++
++static int v4l_vidioc_query_dv_timings(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_query_dv_timings(file, fh, arg);
++}
++
++static int v4l_vidioc_dv_timings_cap(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *arg)
++{
++ return ops->vidioc_dv_timings_cap(file, fh, arg);
++}
++
+ struct v4l2_ioctl_info {
+ unsigned int ioctl;
+ u32 flags;
+ const char * const name;
+- union {
+- u32 offset;
+- int (*func)(const struct v4l2_ioctl_ops *ops,
+- struct file *file, void *fh, void *p);
+- } u;
++ int (*func)(const struct v4l2_ioctl_ops *ops,
++ struct file *file, void *fh, void *p);
void (*debug)(const void *arg, bool write_only);
-};
+} __do_const;
@@ -50762,7 +55564,152 @@ index 7486af2..a1f2e87 100644
/* This control needs a priority check */
#define INFO_FL_PRIO (1 << 0)
-@@ -2566,7 +2567,7 @@ static long __video_do_ioctl(struct file *file,
+ /* This control can be valid if the filehandle passes a control handler. */
+ #define INFO_FL_CTRL (1 << 1)
+-/* This is a standard ioctl, no need for special code */
+-#define INFO_FL_STD (1 << 2)
+ /* This is ioctl has its own function */
+-#define INFO_FL_FUNC (1 << 3)
++#define INFO_FL_FUNC (1 << 2)
+ /* Queuing ioctl */
+-#define INFO_FL_QUEUE (1 << 4)
++#define INFO_FL_QUEUE (1 << 3)
+ /* Zero struct from after the field to the end */
+ #define INFO_FL_CLEAR(v4l2_struct, field) \
+ ((offsetof(struct v4l2_struct, field) + \
+ sizeof(((struct v4l2_struct *)0)->field)) << 16)
+ #define INFO_FL_CLEAR_MASK (_IOC_SIZEMASK << 16)
+
+-#define IOCTL_INFO_STD(_ioctl, _vidioc, _debug, _flags) \
+- [_IOC_NR(_ioctl)] = { \
+- .ioctl = _ioctl, \
+- .flags = _flags | INFO_FL_STD, \
+- .name = #_ioctl, \
+- .u.offset = offsetof(struct v4l2_ioctl_ops, _vidioc), \
+- .debug = _debug, \
+- }
+-
+ #define IOCTL_INFO_FNC(_ioctl, _func, _debug, _flags) \
+ [_IOC_NR(_ioctl)] = { \
+ .ioctl = _ioctl, \
+ .flags = _flags | INFO_FL_FUNC, \
+ .name = #_ioctl, \
+- .u.func = _func, \
++ .func = _func, \
+ .debug = _debug, \
+ }
+
+@@ -2425,17 +2598,17 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
+ IOCTL_INFO_FNC(VIDIOC_S_FMT, v4l_s_fmt, v4l_print_format, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_REQBUFS, v4l_reqbufs, v4l_print_requestbuffers, INFO_FL_PRIO | INFO_FL_QUEUE),
+ IOCTL_INFO_FNC(VIDIOC_QUERYBUF, v4l_querybuf, v4l_print_buffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_buffer, length)),
+- IOCTL_INFO_STD(VIDIOC_G_FBUF, vidioc_g_fbuf, v4l_print_framebuffer, 0),
+- IOCTL_INFO_STD(VIDIOC_S_FBUF, vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_G_FBUF, v4l_vidioc_g_fbuf, v4l_print_framebuffer, 0),
++ IOCTL_INFO_FNC(VIDIOC_S_FBUF, v4l_vidioc_s_fbuf, v4l_print_framebuffer, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_OVERLAY, v4l_overlay, v4l_print_u32, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_QBUF, v4l_qbuf, v4l_print_buffer, INFO_FL_QUEUE),
+- IOCTL_INFO_STD(VIDIOC_EXPBUF, vidioc_expbuf, v4l_print_exportbuffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_exportbuffer, flags)),
++ IOCTL_INFO_FNC(VIDIOC_EXPBUF, v4l_vidioc_expbuf, v4l_print_exportbuffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_exportbuffer, flags)),
+ IOCTL_INFO_FNC(VIDIOC_DQBUF, v4l_dqbuf, v4l_print_buffer, INFO_FL_QUEUE),
+ IOCTL_INFO_FNC(VIDIOC_STREAMON, v4l_streamon, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE),
+ IOCTL_INFO_FNC(VIDIOC_STREAMOFF, v4l_streamoff, v4l_print_buftype, INFO_FL_PRIO | INFO_FL_QUEUE),
+ IOCTL_INFO_FNC(VIDIOC_G_PARM, v4l_g_parm, v4l_print_streamparm, INFO_FL_CLEAR(v4l2_streamparm, type)),
+ IOCTL_INFO_FNC(VIDIOC_S_PARM, v4l_s_parm, v4l_print_streamparm, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_G_STD, vidioc_g_std, v4l_print_std, 0),
++ IOCTL_INFO_FNC(VIDIOC_G_STD, v4l_vidioc_g_std, v4l_print_std, 0),
+ IOCTL_INFO_FNC(VIDIOC_S_STD, v4l_s_std, v4l_print_std, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_ENUMSTD, v4l_enumstd, v4l_print_standard, INFO_FL_CLEAR(v4l2_standard, index)),
+ IOCTL_INFO_FNC(VIDIOC_ENUMINPUT, v4l_enuminput, v4l_print_enuminput, INFO_FL_CLEAR(v4l2_input, index)),
+@@ -2443,19 +2616,19 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
+ IOCTL_INFO_FNC(VIDIOC_S_CTRL, v4l_s_ctrl, v4l_print_control, INFO_FL_PRIO | INFO_FL_CTRL),
+ IOCTL_INFO_FNC(VIDIOC_G_TUNER, v4l_g_tuner, v4l_print_tuner, INFO_FL_CLEAR(v4l2_tuner, index)),
+ IOCTL_INFO_FNC(VIDIOC_S_TUNER, v4l_s_tuner, v4l_print_tuner, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_G_AUDIO, vidioc_g_audio, v4l_print_audio, 0),
+- IOCTL_INFO_STD(VIDIOC_S_AUDIO, vidioc_s_audio, v4l_print_audio, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_G_AUDIO, v4l_vidioc_g_audio, v4l_print_audio, 0),
++ IOCTL_INFO_FNC(VIDIOC_S_AUDIO, v4l_vidioc_s_audio, v4l_print_audio, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_QUERYCTRL, v4l_queryctrl, v4l_print_queryctrl, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_queryctrl, id)),
+ IOCTL_INFO_FNC(VIDIOC_QUERYMENU, v4l_querymenu, v4l_print_querymenu, INFO_FL_CTRL | INFO_FL_CLEAR(v4l2_querymenu, index)),
+- IOCTL_INFO_STD(VIDIOC_G_INPUT, vidioc_g_input, v4l_print_u32, 0),
++ IOCTL_INFO_FNC(VIDIOC_G_INPUT, v4l_vidioc_g_input, v4l_print_u32, 0),
+ IOCTL_INFO_FNC(VIDIOC_S_INPUT, v4l_s_input, v4l_print_u32, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_G_EDID, vidioc_g_edid, v4l_print_edid, 0),
+- IOCTL_INFO_STD(VIDIOC_S_EDID, vidioc_s_edid, v4l_print_edid, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_G_OUTPUT, vidioc_g_output, v4l_print_u32, 0),
++ IOCTL_INFO_FNC(VIDIOC_G_EDID, v4l_vidioc_g_edid, v4l_print_edid, 0),
++ IOCTL_INFO_FNC(VIDIOC_S_EDID, v4l_vidioc_s_edid, v4l_print_edid, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_G_OUTPUT, v4l_vidioc_g_output, v4l_print_u32, 0),
+ IOCTL_INFO_FNC(VIDIOC_S_OUTPUT, v4l_s_output, v4l_print_u32, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_ENUMOUTPUT, v4l_enumoutput, v4l_print_enumoutput, INFO_FL_CLEAR(v4l2_output, index)),
+- IOCTL_INFO_STD(VIDIOC_G_AUDOUT, vidioc_g_audout, v4l_print_audioout, 0),
+- IOCTL_INFO_STD(VIDIOC_S_AUDOUT, vidioc_s_audout, v4l_print_audioout, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_G_AUDOUT, v4l_vidioc_g_audout, v4l_print_audioout, 0),
++ IOCTL_INFO_FNC(VIDIOC_S_AUDOUT, v4l_vidioc_s_audout, v4l_print_audioout, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_G_MODULATOR, v4l_g_modulator, v4l_print_modulator, INFO_FL_CLEAR(v4l2_modulator, index)),
+ IOCTL_INFO_FNC(VIDIOC_S_MODULATOR, v4l_s_modulator, v4l_print_modulator, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_G_FREQUENCY, v4l_g_frequency, v4l_print_frequency, INFO_FL_CLEAR(v4l2_frequency, tuner)),
+@@ -2463,14 +2636,14 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
+ IOCTL_INFO_FNC(VIDIOC_CROPCAP, v4l_cropcap, v4l_print_cropcap, INFO_FL_CLEAR(v4l2_cropcap, type)),
+ IOCTL_INFO_FNC(VIDIOC_G_CROP, v4l_g_crop, v4l_print_crop, INFO_FL_CLEAR(v4l2_crop, type)),
+ IOCTL_INFO_FNC(VIDIOC_S_CROP, v4l_s_crop, v4l_print_crop, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_G_SELECTION, vidioc_g_selection, v4l_print_selection, INFO_FL_CLEAR(v4l2_selection, r)),
+- IOCTL_INFO_STD(VIDIOC_S_SELECTION, vidioc_s_selection, v4l_print_selection, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_selection, r)),
+- IOCTL_INFO_STD(VIDIOC_G_JPEGCOMP, vidioc_g_jpegcomp, v4l_print_jpegcompression, 0),
+- IOCTL_INFO_STD(VIDIOC_S_JPEGCOMP, vidioc_s_jpegcomp, v4l_print_jpegcompression, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_G_SELECTION, v4l_vidioc_g_selection, v4l_print_selection, INFO_FL_CLEAR(v4l2_selection, r)),
++ IOCTL_INFO_FNC(VIDIOC_S_SELECTION, v4l_vidioc_s_selection, v4l_print_selection, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_selection, r)),
++ IOCTL_INFO_FNC(VIDIOC_G_JPEGCOMP, v4l_vidioc_g_jpegcomp, v4l_print_jpegcompression, 0),
++ IOCTL_INFO_FNC(VIDIOC_S_JPEGCOMP, v4l_vidioc_s_jpegcomp, v4l_print_jpegcompression, INFO_FL_PRIO),
+ IOCTL_INFO_FNC(VIDIOC_QUERYSTD, v4l_querystd, v4l_print_std, 0),
+ IOCTL_INFO_FNC(VIDIOC_TRY_FMT, v4l_try_fmt, v4l_print_format, 0),
+- IOCTL_INFO_STD(VIDIOC_ENUMAUDIO, vidioc_enumaudio, v4l_print_audio, INFO_FL_CLEAR(v4l2_audio, index)),
+- IOCTL_INFO_STD(VIDIOC_ENUMAUDOUT, vidioc_enumaudout, v4l_print_audioout, INFO_FL_CLEAR(v4l2_audioout, index)),
++ IOCTL_INFO_FNC(VIDIOC_ENUMAUDIO, v4l_vidioc_enumaudio, v4l_print_audio, INFO_FL_CLEAR(v4l2_audio, index)),
++ IOCTL_INFO_FNC(VIDIOC_ENUMAUDOUT, v4l_vidioc_enumaudout, v4l_print_audioout, INFO_FL_CLEAR(v4l2_audioout, index)),
+ IOCTL_INFO_FNC(VIDIOC_G_PRIORITY, v4l_g_priority, v4l_print_u32, 0),
+ IOCTL_INFO_FNC(VIDIOC_S_PRIORITY, v4l_s_priority, v4l_print_u32, INFO_FL_PRIO),
+ 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)),
+@@ -2478,26 +2651,26 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
+ IOCTL_INFO_FNC(VIDIOC_G_EXT_CTRLS, v4l_g_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL),
+ IOCTL_INFO_FNC(VIDIOC_S_EXT_CTRLS, v4l_s_ext_ctrls, v4l_print_ext_controls, INFO_FL_PRIO | INFO_FL_CTRL),
+ IOCTL_INFO_FNC(VIDIOC_TRY_EXT_CTRLS, v4l_try_ext_ctrls, v4l_print_ext_controls, INFO_FL_CTRL),
+- IOCTL_INFO_STD(VIDIOC_ENUM_FRAMESIZES, vidioc_enum_framesizes, v4l_print_frmsizeenum, INFO_FL_CLEAR(v4l2_frmsizeenum, pixel_format)),
+- IOCTL_INFO_STD(VIDIOC_ENUM_FRAMEINTERVALS, vidioc_enum_frameintervals, v4l_print_frmivalenum, INFO_FL_CLEAR(v4l2_frmivalenum, height)),
+- IOCTL_INFO_STD(VIDIOC_G_ENC_INDEX, vidioc_g_enc_index, v4l_print_enc_idx, 0),
+- IOCTL_INFO_STD(VIDIOC_ENCODER_CMD, vidioc_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
+- IOCTL_INFO_STD(VIDIOC_TRY_ENCODER_CMD, vidioc_try_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
+- IOCTL_INFO_STD(VIDIOC_DECODER_CMD, vidioc_decoder_cmd, v4l_print_decoder_cmd, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_TRY_DECODER_CMD, vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0),
++ IOCTL_INFO_FNC(VIDIOC_ENUM_FRAMESIZES, v4l_vidioc_enum_framesizes, v4l_print_frmsizeenum, INFO_FL_CLEAR(v4l2_frmsizeenum, pixel_format)),
++ IOCTL_INFO_FNC(VIDIOC_ENUM_FRAMEINTERVALS, v4l_vidioc_enum_frameintervals, v4l_print_frmivalenum, INFO_FL_CLEAR(v4l2_frmivalenum, height)),
++ IOCTL_INFO_FNC(VIDIOC_G_ENC_INDEX, v4l_vidioc_g_enc_index, v4l_print_enc_idx, 0),
++ IOCTL_INFO_FNC(VIDIOC_ENCODER_CMD, v4l_vidioc_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_PRIO | INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
++ IOCTL_INFO_FNC(VIDIOC_TRY_ENCODER_CMD, v4l_vidioc_try_encoder_cmd, v4l_print_encoder_cmd, INFO_FL_CLEAR(v4l2_encoder_cmd, flags)),
++ IOCTL_INFO_FNC(VIDIOC_DECODER_CMD, v4l_vidioc_decoder_cmd, v4l_print_decoder_cmd, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_TRY_DECODER_CMD, v4l_vidioc_try_decoder_cmd, v4l_print_decoder_cmd, 0),
+ IOCTL_INFO_FNC(VIDIOC_DBG_S_REGISTER, v4l_dbg_s_register, v4l_print_dbg_register, 0),
+ IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0),
+ IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO),
+- IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0),
++ IOCTL_INFO_FNC(VIDIOC_S_DV_TIMINGS, v4l_vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO),
++ IOCTL_INFO_FNC(VIDIOC_G_DV_TIMINGS, v4l_vidioc_g_dv_timings, v4l_print_dv_timings, 0),
+ IOCTL_INFO_FNC(VIDIOC_DQEVENT, v4l_dqevent, v4l_print_event, 0),
+ IOCTL_INFO_FNC(VIDIOC_SUBSCRIBE_EVENT, v4l_subscribe_event, v4l_print_event_subscription, 0),
+ IOCTL_INFO_FNC(VIDIOC_UNSUBSCRIBE_EVENT, v4l_unsubscribe_event, v4l_print_event_subscription, 0),
+ IOCTL_INFO_FNC(VIDIOC_CREATE_BUFS, v4l_create_bufs, v4l_print_create_buffers, INFO_FL_PRIO | INFO_FL_QUEUE),
+ IOCTL_INFO_FNC(VIDIOC_PREPARE_BUF, v4l_prepare_buf, v4l_print_buffer, INFO_FL_QUEUE),
+- IOCTL_INFO_STD(VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings, v4l_print_enum_dv_timings, 0),
+- IOCTL_INFO_STD(VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings, v4l_print_dv_timings, 0),
+- IOCTL_INFO_STD(VIDIOC_DV_TIMINGS_CAP, vidioc_dv_timings_cap, v4l_print_dv_timings_cap, INFO_FL_CLEAR(v4l2_dv_timings_cap, type)),
++ IOCTL_INFO_FNC(VIDIOC_ENUM_DV_TIMINGS, v4l_vidioc_enum_dv_timings, v4l_print_enum_dv_timings, 0),
++ IOCTL_INFO_FNC(VIDIOC_QUERY_DV_TIMINGS, v4l_vidioc_query_dv_timings, v4l_print_dv_timings, 0),
++ 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)),
+ IOCTL_INFO_FNC(VIDIOC_ENUM_FREQ_BANDS, v4l_enum_freq_bands, v4l_print_freq_band, 0),
+ 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)),
+ 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)),
+@@ -2566,7 +2739,7 @@ static long __video_do_ioctl(struct file *file,
struct video_device *vfd = video_devdata(file);
const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
bool write_only = false;
@@ -50771,7 +55718,24 @@ index 7486af2..a1f2e87 100644
const struct v4l2_ioctl_info *info;
void *fh = file->private_data;
struct v4l2_fh *vfh = NULL;
-@@ -2657,7 +2658,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
+@@ -2602,14 +2775,8 @@ static long __video_do_ioctl(struct file *file,
+ }
+
+ write_only = _IOC_DIR(cmd) == _IOC_WRITE;
+- if (info->flags & INFO_FL_STD) {
+- typedef int (*vidioc_op)(struct file *file, void *fh, void *p);
+- const void *p = vfd->ioctl_ops;
+- const vidioc_op *vidioc = p + info->u.offset;
+-
+- ret = (*vidioc)(file, fh, arg);
+- } else if (info->flags & INFO_FL_FUNC) {
+- ret = info->u.func(ops, file, fh, arg);
++ if (info->flags & INFO_FL_FUNC) {
++ ret = info->func(ops, file, fh, arg);
+ } else if (!ops->vidioc_default) {
+ ret = -ENOTTY;
+ } else {
+@@ -2657,7 +2824,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
ret = -EINVAL;
break;
}
@@ -50780,7 +55744,7 @@ index 7486af2..a1f2e87 100644
*kernel_ptr = (void **)&buf->m.planes;
*array_size = sizeof(struct v4l2_plane) * buf->length;
ret = 1;
-@@ -2674,7 +2675,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
+@@ -2674,7 +2841,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
ret = -EINVAL;
break;
}
@@ -50789,7 +55753,7 @@ index 7486af2..a1f2e87 100644
*kernel_ptr = (void **)&edid->edid;
*array_size = edid->blocks * 128;
ret = 1;
-@@ -2692,7 +2693,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
+@@ -2692,7 +2859,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
ret = -EINVAL;
break;
}
@@ -50798,7 +55762,7 @@ index 7486af2..a1f2e87 100644
*kernel_ptr = (void **)&ctrls->controls;
*array_size = sizeof(struct v4l2_ext_control)
* ctrls->count;
-@@ -2793,7 +2794,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
+@@ -2793,7 +2960,7 @@ video_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
}
if (has_array_args) {
@@ -50854,9 +55818,27 @@ index 6515dfc..3d39b80 100644
gpmc_client_irq[1].bitmask = GPMC_IRQ_COUNT_EVENT;
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
-index 5dcc031..e08ecd2 100644
+index 5dcc031..d5e16c2 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
+@@ -99,7 +99,7 @@ module_param(mpt_channel_mapping, int, 0);
+ MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)");
+
+ static int mpt_debug_level;
+-static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
++static int mpt_set_debug_level(const char *val, const struct kernel_param *kp);
+ module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
+ &mpt_debug_level, 0600);
+ MODULE_PARM_DESC(mpt_debug_level,
+@@ -242,7 +242,7 @@ pci_enable_io_access(struct pci_dev *pdev)
+ pci_write_config_word(pdev, PCI_COMMAND, command_reg);
+ }
+
+-static int mpt_set_debug_level(const char *val, struct kernel_param *kp)
++static int mpt_set_debug_level(const char *val, const struct kernel_param *kp)
+ {
+ int ret = param_set_int(val, kp);
+ MPT_ADAPTER *ioc;
@@ -6722,8 +6722,13 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
seq_printf(m, " MaxChainDepth = 0x%02x frames\n", ioc->facts.MaxChainDepth);
seq_printf(m, " MinBlockSize = 0x%02x bytes\n", 4*ioc->facts.BlockSize);
@@ -50883,6 +55865,19 @@ index 5dcc031..e08ecd2 100644
sz = (ioc->reply_sz * ioc->reply_depth) + 128;
seq_printf(m, " {CurRepSz=%d} x {CurRepDepth=%d} = %d bytes ^= 0x%x\n",
ioc->reply_sz, ioc->reply_depth, ioc->reply_sz*ioc->reply_depth, sz);
+diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
+index cbe9607..50db310 100644
+--- a/drivers/message/fusion/mptlan.c
++++ b/drivers/message/fusion/mptlan.c
+@@ -680,7 +680,7 @@ out:
+ }
+
+ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+-static int
++static netdev_tx_t
+ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
+ {
+ struct mpt_lan_priv *priv = netdev_priv(dev);
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 7ebccfa..a0cd0e6 100644
--- a/drivers/message/fusion/mptsas.c
@@ -50936,7 +55931,7 @@ index 7ebccfa..a0cd0e6 100644
mptsas_get_port(struct mptsas_phyinfo *phy_info)
{
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
-index 0236cd7..53b10d7 100644
+index 69d9fff..62cd090 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -100,7 +100,7 @@ static int irq_last;
@@ -50962,7 +55957,7 @@ index 05b9245..9f05055 100644
.ident = "BBL6",
.matches = {
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
-index b0fe810..eee08c4 100644
+index 70443b1..e6da89d 100644
--- a/drivers/mfd/max8925-i2c.c
+++ b/drivers/mfd/max8925-i2c.c
@@ -152,7 +152,7 @@ static int max8925_probe(struct i2c_client *client,
@@ -51031,7 +56026,7 @@ index cc8645b..7cc15e4 100644
c2dev->dev = device_create(c2port_class, NULL, 0, c2dev,
"c2port%d", c2dev->id);
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
-index 99635dd..5098638 100644
+index 99635dd..255bd78 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -834,7 +834,7 @@ static void run_plant_and_detach_test(int is_early)
@@ -51052,6 +56047,15 @@ index 99635dd..5098638 100644
BREAK_INSTR_SIZE);
if (memcmp(before, after, BREAK_INSTR_SIZE)) {
printk(KERN_CRIT "kgdbts: ERROR kgdb corrupted memory\n");
+@@ -1130,7 +1130,7 @@ static void kgdbts_put_char(u8 chr)
+ ts.run_test(0, chr);
+ }
+
+-static int param_set_kgdbts_var(const char *kmessage, struct kernel_param *kp)
++static int param_set_kgdbts_var(const char *kmessage, const struct kernel_param *kp)
+ {
+ int len = strlen(kmessage);
+
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index fb8705f..dc2f679 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -51403,10 +56407,42 @@ index c862cd4..0d176fe 100644
extern struct xpc_interface xpc_interface;
diff --git a/drivers/misc/sgi-xp/xp_main.c b/drivers/misc/sgi-xp/xp_main.c
-index 01be66d..e3a0c7e 100644
+index 01be66d..4a305b4 100644
--- a/drivers/misc/sgi-xp/xp_main.c
+++ b/drivers/misc/sgi-xp/xp_main.c
-@@ -78,13 +78,13 @@ xpc_notloaded(void)
+@@ -71,20 +71,42 @@ EXPORT_SYMBOL_GPL(xpc_registrations);
+ /*
+ * Initialize the XPC interface to indicate that XPC isn't loaded.
+ */
+-static enum xp_retval
+-xpc_notloaded(void)
++static void xpc_notloaded_connect(int ch_number)
++{
++}
++
++static void xpc_notloaded_disconnect(int ch_number)
++{
++}
++
++static enum xp_retval xpc_notloaded_send(short partid, int ch_number, u32 flags, void *payload,
++ u16 payload_size)
++{
++ return xpNotLoaded;
++}
++
++static enum xp_retval xpc_notloaded_send_notify(short partid, int ch_number, u32 flags, void *payload,
++ u16 payload_size, xpc_notify_func func, void *key)
++{
++ return xpNotLoaded;
++}
++
++static void xpc_notloaded_received(short partid, int ch_number, void *payload)
++{
++}
++
++static enum xp_retval xpc_notloaded_partid_to_nasids(short partid, void *nasid_mask)
+ {
+ return xpNotLoaded;
}
struct xpc_interface xpc_interface = {
@@ -51414,18 +56450,42 @@ index 01be66d..e3a0c7e 100644
- (void (*)(int))xpc_notloaded,
- (enum xp_retval(*)(short, int, u32, void *, u16))xpc_notloaded,
- (enum xp_retval(*)(short, int, u32, void *, u16, xpc_notify_func,
-+ .connect = (void (*)(int))xpc_notloaded,
-+ .disconnect = (void (*)(int))xpc_notloaded,
-+ .send = (enum xp_retval(*)(short, int, u32, void *, u16))xpc_notloaded,
-+ .send_notify = (enum xp_retval(*)(short, int, u32, void *, u16, xpc_notify_func,
- void *))xpc_notloaded,
+- void *))xpc_notloaded,
- (void (*)(short, int, void *))xpc_notloaded,
- (enum xp_retval(*)(short, void *))xpc_notloaded
-+ .received = (void (*)(short, int, void *))xpc_notloaded,
-+ .partid_to_nasids = (enum xp_retval(*)(short, void *))xpc_notloaded
++ .connect = xpc_notloaded_connect,
++ .disconnect = xpc_notloaded_disconnect,
++ .send = xpc_notloaded_send,
++ .send_notify = xpc_notloaded_send_notify,
++ .received = xpc_notloaded_received,
++ .partid_to_nasids = xpc_notloaded_partid_to_nasids
};
EXPORT_SYMBOL_GPL(xpc_interface);
+@@ -115,17 +137,12 @@ EXPORT_SYMBOL_GPL(xpc_set_interface);
+ void
+ xpc_clear_interface(void)
+ {
+- xpc_interface.connect = (void (*)(int))xpc_notloaded;
+- xpc_interface.disconnect = (void (*)(int))xpc_notloaded;
+- xpc_interface.send = (enum xp_retval(*)(short, int, u32, void *, u16))
+- xpc_notloaded;
+- xpc_interface.send_notify = (enum xp_retval(*)(short, int, u32, void *,
+- u16, xpc_notify_func,
+- void *))xpc_notloaded;
+- xpc_interface.received = (void (*)(short, int, void *))
+- xpc_notloaded;
+- xpc_interface.partid_to_nasids = (enum xp_retval(*)(short, void *))
+- xpc_notloaded;
++ xpc_interface.connect = xpc_notloaded_connect;
++ xpc_interface.disconnect = xpc_notloaded_disconnect;
++ xpc_interface.send = xpc_notloaded_send;
++ xpc_interface.send_notify = xpc_notloaded_send_notify;
++ xpc_interface.received = xpc_notloaded_received;
++ xpc_interface.partid_to_nasids = xpc_notloaded_partid_to_nasids;
+ }
+ EXPORT_SYMBOL_GPL(xpc_clear_interface);
+
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
index b94d5f7..7f494c5 100644
--- a/drivers/misc/sgi-xp/xpc.h
@@ -51460,6 +56520,114 @@ index 7f32712..8539ab2 100644
/*
* Timer function to enforce the timelimit on the partition disengage.
+diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c
+index 557f978..c8ce9fb 100644
+--- a/drivers/misc/sgi-xp/xpnet.c
++++ b/drivers/misc/sgi-xp/xpnet.c
+@@ -421,7 +421,7 @@ xpnet_send(struct sk_buff *skb, struct xpnet_pending_msg *queued_msg,
+ * destination partid. If the destination partid octets are 0xffff,
+ * this packet is to be broadcast to all connected partitions.
+ */
+-static int
++static netdev_tx_t
+ xpnet_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct xpnet_pending_msg *queued_msg;
+diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
+index 71b6455..9cc7886 100644
+--- a/drivers/misc/ti-st/st_kim.c
++++ b/drivers/misc/ti-st/st_kim.c
+@@ -582,9 +582,10 @@ static int show_list(struct seq_file *s, void *unused)
+ return 0;
+ }
+
+-static ssize_t show_install(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_install(struct kobject *_dev,
++ struct kobj_attribute *attr, char *buf)
+ {
++ struct device *dev = (struct device *)_dev;
+ struct kim_data_s *kim_data = dev_get_drvdata(dev);
+ return sprintf(buf, "%d\n", kim_data->ldisc_install);
+ }
+@@ -611,47 +612,50 @@ static ssize_t store_baud_rate(struct device *dev,
+ }
+ #endif /* if DEBUG */
+
+-static ssize_t show_dev_name(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_dev_name(struct kobject *_dev,
++ struct kobj_attribute *attr, char *buf)
+ {
++ struct device *dev = (struct device *)_dev;
+ struct kim_data_s *kim_data = dev_get_drvdata(dev);
+ return sprintf(buf, "%s\n", kim_data->dev_name);
+ }
+
+-static ssize_t show_baud_rate(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_baud_rate(struct kobject *_dev,
++ struct kobj_attribute *attr, char *buf)
+ {
++ struct device *dev = (struct device *)_dev;
+ struct kim_data_s *kim_data = dev_get_drvdata(dev);
+ return sprintf(buf, "%d\n", kim_data->baud_rate);
+ }
+
+-static ssize_t show_flow_cntrl(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_flow_cntrl(struct kobject *_dev,
++ struct kobj_attribute *attr, char *buf)
+ {
++ struct device *dev = (struct device *)_dev;
+ struct kim_data_s *kim_data = dev_get_drvdata(dev);
+ return sprintf(buf, "%d\n", kim_data->flow_cntrl);
+ }
+
+ /* structures specific for sysfs entries */
+ static struct kobj_attribute ldisc_install =
+-__ATTR(install, 0444, (void *)show_install, NULL);
++__ATTR(install, 0444, show_install, NULL);
+
+ static struct kobj_attribute uart_dev_name =
+ #ifdef DEBUG /* TODO: move this to debug-fs if possible */
+-__ATTR(dev_name, 0644, (void *)show_dev_name, (void *)store_dev_name);
++__ATTR(dev_name, 0644, show_dev_name, store_dev_name);
+ #else
+-__ATTR(dev_name, 0444, (void *)show_dev_name, NULL);
++__ATTR(dev_name, 0444, show_dev_name, NULL);
+ #endif
+
+ static struct kobj_attribute uart_baud_rate =
+ #ifdef DEBUG /* TODO: move to debugfs */
+-__ATTR(baud_rate, 0644, (void *)show_baud_rate, (void *)store_baud_rate);
++__ATTR(baud_rate, 0644, show_baud_rate, store_baud_rate);
+ #else
+-__ATTR(baud_rate, 0444, (void *)show_baud_rate, NULL);
++__ATTR(baud_rate, 0444, show_baud_rate, NULL);
+ #endif
+
+ static struct kobj_attribute uart_flow_cntrl =
+-__ATTR(flow_cntrl, 0444, (void *)show_flow_cntrl, NULL);
++__ATTR(flow_cntrl, 0444, show_flow_cntrl, NULL);
+
+ static struct attribute *uim_attrs[] = {
+ &ldisc_install.attr,
+diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
+index 7fc9174..bf669b2 100644
+--- a/drivers/mmc/card/mmc_test.c
++++ b/drivers/mmc/card/mmc_test.c
+@@ -2076,8 +2076,8 @@ static int mmc_test_rw_multiple_size(struct mmc_test_card *test,
+ {
+ int ret = 0;
+ int i;
+- void *pre_req = test->card->host->ops->pre_req;
+- void *post_req = test->card->host->ops->post_req;
++ void (*pre_req)(struct mmc_host *, struct mmc_request *, bool) = test->card->host->ops->pre_req;
++ void (*post_req)(struct mmc_host *, struct mmc_request *, int) = test->card->host->ops->post_req;
+
+ if (rw->do_nonblock_req &&
+ ((!pre_req && post_req) || (pre_req && !post_req))) {
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h
index f695b58..7b7d017 100644
--- a/drivers/mmc/host/dw_mmc.h
@@ -51472,10 +56640,10 @@ index f695b58..7b7d017 100644
+} __do_const;
#endif /* _DW_MMC_H_ */
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
-index acece32..a872279 100644
+index 0d6ca41..d438654 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
-@@ -1633,7 +1633,9 @@ static int mmci_probe(struct amba_device *dev,
+@@ -1634,7 +1634,9 @@ static int mmci_probe(struct amba_device *dev,
mmc->caps |= MMC_CAP_CMD23;
if (variant->busy_detect) {
@@ -51487,7 +56655,7 @@ index acece32..a872279 100644
mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
mmc->max_busy_timeout = 0;
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
-index 7fb0753..ad156f0 100644
+index f6e4d97..57358ff 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2088,7 +2088,9 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
@@ -51502,10 +56670,10 @@ index 7fb0753..ad156f0 100644
device_init_wakeup(&pdev->dev, true);
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
-index 1f1582f..b396c3a 100644
+index f25f292..a0e1250 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
-@@ -1191,9 +1191,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
+@@ -1194,9 +1194,12 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
host->ioaddr + 0x6c);
}
@@ -51552,8 +56720,169 @@ index 9a1a6ff..b8f1a57 100644
if (!ECCBUF_SIZE) {
/* We should fall back to a general writev implementation.
+diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
+index e2c0057..b468819 100644
+--- a/drivers/mtd/devices/block2mtd.c
++++ b/drivers/mtd/devices/block2mtd.c
+@@ -431,7 +431,7 @@ static int block2mtd_setup2(const char *val)
+ }
+
+
+-static int block2mtd_setup(const char *val, struct kernel_param *kp)
++static int block2mtd_setup(const char *val, const struct kernel_param *kp)
+ {
+ #ifdef MODULE
+ return block2mtd_setup2(val);
+diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
+index 8b66e52..7287696 100644
+--- a/drivers/mtd/devices/phram.c
++++ b/drivers/mtd/devices/phram.c
+@@ -266,7 +266,7 @@ static int phram_setup(const char *val)
+ return ret;
+ }
+
+-static int phram_param_call(const char *val, struct kernel_param *kp)
++static int phram_param_call(const char *val, const struct kernel_param *kp)
+ {
+ #ifdef MODULE
+ return phram_setup(val);
+diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
+index 385305e..8051e87 100644
+--- a/drivers/mtd/maps/gpio-addr-flash.c
++++ b/drivers/mtd/maps/gpio-addr-flash.c
+@@ -128,7 +128,7 @@ static void gf_copy_from(struct map_info *map, void *to, unsigned long from, ssi
+ * @map: MTD map state
+ * @ofs: desired offset to write
+ */
+-static void gf_write(struct map_info *map, map_word d1, unsigned long ofs)
++static void gf_write(struct map_info *map, const map_word d1, unsigned long ofs)
+ {
+ struct async_state *state = gf_map_info_to_state(map);
+ uint16_t d;
+diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
+index 6dc97aa..c251b90 100644
+--- a/drivers/mtd/maps/latch-addr-flash.c
++++ b/drivers/mtd/maps/latch-addr-flash.c
+@@ -52,7 +52,7 @@ static map_word lf_read(struct map_info *map, unsigned long ofs)
+ return datum;
+ }
+
+-static void lf_write(struct map_info *map, map_word datum, unsigned long ofs)
++static void lf_write(struct map_info *map, const map_word datum, unsigned long ofs)
+ {
+ struct latch_addr_flash_info *info;
+
+diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
+index eb0242e..1a4c5b9 100644
+--- a/drivers/mtd/maps/pci.c
++++ b/drivers/mtd/maps/pci.c
+@@ -59,13 +59,13 @@ static void mtd_pci_copyfrom(struct map_info *_map, void *to, unsigned long from
+ memcpy_fromio(to, map->base + map->translate(map, from), len);
+ }
+
+-static void mtd_pci_write8(struct map_info *_map, map_word val, unsigned long ofs)
++static void mtd_pci_write8(struct map_info *_map, const map_word val, unsigned long ofs)
+ {
+ struct map_pci_info *map = (struct map_pci_info *)_map;
+ writeb(val.x[0], map->base + map->translate(map, ofs));
+ }
+
+-static void mtd_pci_write32(struct map_info *_map, map_word val, unsigned long ofs)
++static void mtd_pci_write32(struct map_info *_map, const map_word val, unsigned long ofs)
+ {
+ struct map_pci_info *map = (struct map_pci_info *)_map;
+ writel(val.x[0], map->base + map->translate(map, ofs));
+diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
+index 70bb403..3ae94c6 100644
+--- a/drivers/mtd/maps/pcmciamtd.c
++++ b/drivers/mtd/maps/pcmciamtd.c
+@@ -161,7 +161,7 @@ static void pcmcia_copy_from_remap(struct map_info *map, void *to, unsigned long
+ }
+
+
+-static void pcmcia_write8_remap(struct map_info *map, map_word d, unsigned long adr)
++static void pcmcia_write8_remap(struct map_info *map, const map_word d, unsigned long adr)
+ {
+ void __iomem *addr = remap_window(map, adr);
+
+@@ -173,7 +173,7 @@ static void pcmcia_write8_remap(struct map_info *map, map_word d, unsigned long
+ }
+
+
+-static void pcmcia_write16_remap(struct map_info *map, map_word d, unsigned long adr)
++static void pcmcia_write16_remap(struct map_info *map, const map_word d, unsigned long adr)
+ {
+ void __iomem *addr = remap_window(map, adr);
+ if(!addr)
+@@ -256,7 +256,7 @@ static void pcmcia_copy_from(struct map_info *map, void *to, unsigned long from,
+ }
+
+
+-static void pcmcia_write8(struct map_info *map, map_word d, unsigned long adr)
++static void pcmcia_write8(struct map_info *map, const map_word d, unsigned long adr)
+ {
+ void __iomem *win_base = (void __iomem *)map->map_priv_2;
+
+@@ -269,7 +269,7 @@ static void pcmcia_write8(struct map_info *map, map_word d, unsigned long adr)
+ }
+
+
+-static void pcmcia_write16(struct map_info *map, map_word d, unsigned long adr)
++static void pcmcia_write16(struct map_info *map, const map_word d, unsigned long adr)
+ {
+ void __iomem *win_base = (void __iomem *)map->map_priv_2;
+
+diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c
+index 556a2df..e771329 100644
+--- a/drivers/mtd/maps/sbc_gxx.c
++++ b/drivers/mtd/maps/sbc_gxx.c
+@@ -138,7 +138,7 @@ static void sbc_gxx_copy_from(struct map_info *map, void *to, unsigned long from
+ }
+ }
+
+-static void sbc_gxx_write8(struct map_info *map, map_word d, unsigned long adr)
++static void sbc_gxx_write8(struct map_info *map, const map_word d, unsigned long adr)
+ {
+ spin_lock(&sbc_gxx_spin);
+ sbc_gxx_page(map, adr);
+diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
+index aa1a616..a47a33d 100644
+--- a/drivers/mtd/nand/cafe_nand.c
++++ b/drivers/mtd/nand/cafe_nand.c
+@@ -345,7 +345,17 @@ static irqreturn_t cafe_nand_interrupt(int irq, void *id)
+ return IRQ_HANDLED;
+ }
+
+-static void cafe_nand_bug(struct mtd_info *mtd)
++static void cafe_nand_bug_hwctl(struct mtd_info *mtd, int mode)
++{
++ BUG();
++}
++
++static int cafe_nand_bug_calculate(struct mtd_info *mtd, const uint8_t *dat, uint8_t *ecc_code)
++{
++ BUG();
++}
++
++static int cafe_nand_bug_correct(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, uint8_t *calc_ecc)
+ {
+ BUG();
+ }
+@@ -760,9 +770,9 @@ static int cafe_nand_probe(struct pci_dev *pdev,
+ cafe->nand.ecc.size = mtd->writesize;
+ cafe->nand.ecc.bytes = 14;
+ cafe->nand.ecc.strength = 4;
+- cafe->nand.ecc.hwctl = (void *)cafe_nand_bug;
+- cafe->nand.ecc.calculate = (void *)cafe_nand_bug;
+- cafe->nand.ecc.correct = (void *)cafe_nand_bug;
++ cafe->nand.ecc.hwctl = cafe_nand_bug_hwctl;
++ cafe->nand.ecc.calculate = cafe_nand_bug_calculate;
++ cafe->nand.ecc.correct = cafe_nand_bug_correct;
+ cafe->nand.ecc.write_page = cafe_nand_write_page_lowlevel;
+ cafe->nand.ecc.write_oob = cafe_nand_write_oob;
+ cafe->nand.ecc.read_page = cafe_nand_read_page;
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
-index 67eb2be..d1e2bf5 100644
+index 30bf5f6..9bb67d1 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -24,6 +24,7 @@
@@ -51565,7 +56894,7 @@ index 67eb2be..d1e2bf5 100644
#include "denali.h"
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
-index 2064ada..7c62920 100644
+index 235ddcb..778a09d 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -386,7 +386,7 @@ void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr)
@@ -51590,7 +56919,7 @@ index a5dfbfb..8042ab4 100644
#include <linux/mtd/nand.h>
#include <linux/mtd/nftl.h>
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
-index c23184a..4115c41 100644
+index b096f8b..727cc94 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -56,7 +56,7 @@ static ssize_t sm_attr_show(struct device *dev, struct device_attribute *attr,
@@ -51602,6 +56931,19 @@ index c23184a..4115c41 100644
struct attribute **attributes;
struct sm_sysfs_attribute *vendor_attribute;
char *vendor;
+diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
+index 22fd19c..54e16b1 100644
+--- a/drivers/mtd/ubi/build.c
++++ b/drivers/mtd/ubi/build.c
+@@ -1377,7 +1377,7 @@ static int __init bytes_str_to_int(const char *str)
+ * This function returns zero in case of success and a negative error code in
+ * case of error.
+ */
+-static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
++static int __init ubi_mtd_param_parse(const char *val, const struct kernel_param *kp)
+ {
+ int i, len;
+ struct mtd_dev_param *p;
diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
index db760e8..d53ca99 100644
--- a/drivers/net/bonding/bond_netlink.c
@@ -51616,9 +56958,18 @@ index db760e8..d53ca99 100644
.priv_size = sizeof(struct bonding),
.setup = bond_setup,
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
-index 615c65d..c6c0439 100644
+index 615c65d..e45dc26 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
+@@ -1011,7 +1011,7 @@ static void cfhsi_aggregation_tout(unsigned long arg)
+ cfhsi_start_tx(cfhsi);
+ }
+
+-static int cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t cfhsi_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct cfhsi *cfhsi = NULL;
+ int start_xfer = 0;
@@ -1444,7 +1444,7 @@ err:
return -ENODEV;
}
@@ -51628,6 +56979,45 @@ index 615c65d..c6c0439 100644
.kind = "cfhsi",
.priv_size = sizeof(struct cfhsi),
.setup = cfhsi_setup,
+diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
+index c2dea49..4bf83b5 100644
+--- a/drivers/net/caif/caif_serial.c
++++ b/drivers/net/caif/caif_serial.c
+@@ -277,7 +277,7 @@ error:
+ return tty_wr;
+ }
+
+-static int caif_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t caif_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct ser_device *ser;
+
+diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
+index 4721948..7d77dde 100644
+--- a/drivers/net/caif/caif_spi.c
++++ b/drivers/net/caif/caif_spi.c
+@@ -486,7 +486,7 @@ static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc)
+ complete(&cfspi->comp);
+ }
+
+-static int cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t cfspi_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct cfspi *cfspi = NULL;
+ unsigned long flags;
+diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
+index b306210..c5345de 100644
+--- a/drivers/net/caif/caif_virtio.c
++++ b/drivers/net/caif/caif_virtio.c
+@@ -519,7 +519,7 @@ err:
+ }
+
+ /* Put the CAIF packet on the virtio ring and kick the receiver */
+-static int cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct cfv_info *cfv = netdev_priv(netdev);
+ struct buf_info *buf_info;
diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
index 6d04183..d69aee9 100644
--- a/drivers/net/can/Kconfig
@@ -51654,6 +57044,19 @@ index 141c2a4..ca734ed 100644
.kind = "can",
.maxtype = IFLA_CAN_MAX,
.policy = can_policy,
+diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
+index 5d04f54..9586a90 100644
+--- a/drivers/net/can/janz-ican3.c
++++ b/drivers/net/can/janz-ican3.c
+@@ -1598,7 +1598,7 @@ static int ican3_stop(struct net_device *ndev)
+ return 0;
+ }
+
+-static int ican3_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t ican3_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct ican3_dev *mod = netdev_priv(ndev);
+ struct can_frame *cf = (struct can_frame *)skb->data;
diff --git a/drivers/net/can/led.c b/drivers/net/can/led.c
index c1b6676..50a8a51 100644
--- a/drivers/net/can/led.c
@@ -51667,6 +57070,19 @@ index c1b6676..50a8a51 100644
.notifier_call = can_led_notifier,
};
+diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c
+index 68ef0a4..9e4938b 100644
+--- a/drivers/net/can/sun4i_can.c
++++ b/drivers/net/can/sun4i_can.c
+@@ -409,7 +409,7 @@ static int sun4ican_set_mode(struct net_device *dev, enum can_mode mode)
+ * xx xx xx xx ff ll 00 11 22 33 44 55 66 77
+ * [ can_id ] [flags] [len] [can data (up to 8 bytes]
+ */
+-static int sun4ican_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t sun4ican_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct sun4ican_priv *priv = netdev_priv(dev);
+ struct can_frame *cf = (struct can_frame *)skb->data;
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 674f367..ec3a31f 100644
--- a/drivers/net/can/vcan.c
@@ -51680,6 +57096,19 @@ index 674f367..ec3a31f 100644
.kind = "vcan",
.setup = vcan_setup,
};
+diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
+index c71a035..08768ce 100644
+--- a/drivers/net/can/xilinx_can.c
++++ b/drivers/net/can/xilinx_can.c
+@@ -386,7 +386,7 @@ static int xcan_do_set_mode(struct net_device *ndev, enum can_mode mode)
+ *
+ * Return: 0 on success and failure value on error
+ */
+-static int xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t xcan_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct xcan_priv *priv = netdev_priv(ndev);
+ struct net_device_stats *stats = &ndev->stats;
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 69fc840..77a32fc 100644
--- a/drivers/net/dummy.c
@@ -51694,10 +57123,10 @@ index 69fc840..77a32fc 100644
.setup = dummy_setup,
.validate = dummy_validate,
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
-index 0443654..4f0aa18 100644
+index c89b9ae..7dcddfd 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
-@@ -889,9 +889,11 @@ static int ax_probe(struct platform_device *pdev)
+@@ -878,9 +878,11 @@ static int ax_probe(struct platform_device *pdev)
if (ax->plat->reg_offsets)
ei_local->reg_offset = ax->plat->reg_offsets;
else {
@@ -51710,11 +57139,88 @@ index 0443654..4f0aa18 100644
}
if (!request_mem_region(mem->start, mem_size, pdev->name)) {
+diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c
+index ec6eac1..4426e27 100644
+--- a/drivers/net/ethernet/8390/axnet_cs.c
++++ b/drivers/net/ethernet/8390/axnet_cs.c
+@@ -96,7 +96,7 @@ static void get_8390_hdr(struct net_device *,
+ static void block_input(struct net_device *dev, int count,
+ struct sk_buff *skb, int ring_offset);
+ static void block_output(struct net_device *dev, int count,
+- const u_char *buf, const int start_page);
++ const u_char *buf, int start_page);
+
+ static void axnet_detach(struct pcmcia_device *p_dev);
+
+@@ -667,7 +667,7 @@ static void block_input(struct net_device *dev, int count,
+ /*====================================================================*/
+
+ static void block_output(struct net_device *dev, int count,
+- const u_char *buf, const int start_page)
++ const u_char *buf, int start_page)
+ {
+ unsigned int nic_base = dev->base_addr;
+
+diff --git a/drivers/net/ethernet/8390/ne2k-pci.c b/drivers/net/ethernet/8390/ne2k-pci.c
+index 57e9791..c93b6a0 100644
+--- a/drivers/net/ethernet/8390/ne2k-pci.c
++++ b/drivers/net/ethernet/8390/ne2k-pci.c
+@@ -172,8 +172,8 @@ static void ne2k_pci_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *
+ int ring_page);
+ static void ne2k_pci_block_input(struct net_device *dev, int count,
+ struct sk_buff *skb, int ring_offset);
+-static void ne2k_pci_block_output(struct net_device *dev, const int count,
+- const unsigned char *buf, const int start_page);
++static void ne2k_pci_block_output(struct net_device *dev, int count,
++ const unsigned char *buf, int start_page);
+ static const struct ethtool_ops ne2k_pci_ethtool_ops;
+
+
+@@ -563,7 +563,7 @@ static void ne2k_pci_block_input(struct net_device *dev, int count,
+ }
+
+ static void ne2k_pci_block_output(struct net_device *dev, int count,
+- const unsigned char *buf, const int start_page)
++ const unsigned char *buf, int start_page)
+ {
+ long nic_base = NE_BASE;
+ unsigned long dma_start;
+diff --git a/drivers/net/ethernet/8390/pcnet_cs.c b/drivers/net/ethernet/8390/pcnet_cs.c
+index 2f79d29..ed5a64e 100644
+--- a/drivers/net/ethernet/8390/pcnet_cs.c
++++ b/drivers/net/ethernet/8390/pcnet_cs.c
+@@ -1208,7 +1208,7 @@ static void dma_block_input(struct net_device *dev, int count,
+ /*====================================================================*/
+
+ static void dma_block_output(struct net_device *dev, int count,
+- const u_char *buf, const int start_page)
++ const u_char *buf, int start_page)
+ {
+ unsigned int nic_base = dev->base_addr;
+ struct pcnet_dev *info = PRIV(dev);
+@@ -1387,7 +1387,7 @@ static void shmem_block_input(struct net_device *dev, int count,
+ /*====================================================================*/
+
+ static void shmem_block_output(struct net_device *dev, int count,
+- const u_char *buf, const int start_page)
++ const u_char *buf, int start_page)
+ {
+ void __iomem *shmem = ei_status.mem + (start_page << 8);
+ shmem -= ei_status.tx_start_page << 8;
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
-index fe64482..9a24726 100644
+index f749e4d..23a27f1 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
-@@ -1255,7 +1255,7 @@ static int tse_shutdown(struct net_device *dev)
+@@ -551,7 +551,7 @@ static irqreturn_t altera_isr(int irq, void *dev_id)
+ * physically contiguous fragment starting at
+ * skb->data, for length of skb_headlen(skb).
+ */
+-static int tse_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t tse_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct altera_tse_private *priv = netdev_priv(dev);
+ unsigned int txsize = priv->tx_ring_size;
+@@ -1243,7 +1243,7 @@ static int tse_shutdown(struct net_device *dev)
return 0;
}
@@ -51723,7 +57229,7 @@ index fe64482..9a24726 100644
.ndo_open = tse_open,
.ndo_stop = tse_shutdown,
.ndo_start_xmit = tse_start_xmit,
-@@ -1492,11 +1492,13 @@ static int altera_tse_probe(struct platform_device *pdev)
+@@ -1480,11 +1480,13 @@ static int altera_tse_probe(struct platform_device *pdev)
ndev->netdev_ops = &altera_tse_netdev_ops;
altera_tse_set_ethtool_ops(ndev);
@@ -51737,6 +57243,63 @@ index fe64482..9a24726 100644
/* Scatter/gather IO is not supported,
* so it is turned off
+diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c
+index 9496005..1fb7ac2 100644
+--- a/drivers/net/ethernet/amd/amd8111e.c
++++ b/drivers/net/ethernet/amd/amd8111e.c
+@@ -1690,8 +1690,9 @@ static int amd8111e_resume(struct pci_dev *pci_dev)
+ return 0;
+ }
+
+-static void amd8111e_config_ipg(struct net_device *dev)
++static void amd8111e_config_ipg(unsigned long _dev)
+ {
++ struct net_device *dev = (struct net_device *)_dev;
+ struct amd8111e_priv *lp = netdev_priv(dev);
+ struct ipg_info *ipg_data = &lp->ipg_data;
+ void __iomem *mmio = lp->mmio;
+@@ -1904,7 +1905,7 @@ static int amd8111e_probe_one(struct pci_dev *pdev,
+ if(lp->options & OPTION_DYN_IPG_ENABLE){
+ init_timer(&lp->ipg_data.ipg_timer);
+ lp->ipg_data.ipg_timer.data = (unsigned long) dev;
+- lp->ipg_data.ipg_timer.function = (void *)&amd8111e_config_ipg;
++ lp->ipg_data.ipg_timer.function = &amd8111e_config_ipg;
+ lp->ipg_data.ipg_timer.expires = jiffies +
+ IPG_CONVERGE_JIFFIES;
+ lp->ipg_data.ipg = DEFAULT_IPG;
+diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
+index 7ccebae..237f6bb 100644
+--- a/drivers/net/ethernet/amd/pcnet32.c
++++ b/drivers/net/ethernet/amd/pcnet32.c
+@@ -318,7 +318,7 @@ static struct net_device_stats *pcnet32_get_stats(struct net_device *);
+ static void pcnet32_load_multicast(struct net_device *dev);
+ static void pcnet32_set_multicast_list(struct net_device *);
+ static int pcnet32_ioctl(struct net_device *, struct ifreq *, int);
+-static void pcnet32_watchdog(struct net_device *);
++static void pcnet32_watchdog(unsigned long);
+ static int mdio_read(struct net_device *dev, int phy_id, int reg_num);
+ static void mdio_write(struct net_device *dev, int phy_id, int reg_num,
+ int val);
+@@ -1915,7 +1915,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
+
+ init_timer(&lp->watchdog_timer);
+ lp->watchdog_timer.data = (unsigned long)dev;
+- lp->watchdog_timer.function = (void *)&pcnet32_watchdog;
++ lp->watchdog_timer.function = &pcnet32_watchdog;
+
+ /* The PCNET32-specific entries in the device structure. */
+ dev->netdev_ops = &pcnet32_netdev_ops;
+@@ -2837,8 +2837,9 @@ static void pcnet32_check_media(struct net_device *dev, int verbose)
+ * Could possibly be changed to use mii_check_media instead.
+ */
+
+-static void pcnet32_watchdog(struct net_device *dev)
++static void pcnet32_watchdog(unsigned long _dev)
+ {
++ struct net_device *dev = (struct net_device *)_dev;
+ struct pcnet32_private *lp = netdev_priv(dev);
+ unsigned long flags;
+
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
index b6fa891..31ef157 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h
@@ -52026,7 +57589,7 @@ index f6a7161..aa98a8b 100644
+ .set_rss_lookup_table = xgbe_set_rss_lookup_table,
+};
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
-index 53ce122..de7d19d 100644
+index 8a9b493..d41363f 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -245,7 +245,7 @@ static int xgbe_maybe_stop_tx_queue(struct xgbe_channel *channel,
@@ -52184,8 +57747,12 @@ index 53ce122..de7d19d 100644
DBGPR("-->xgbe_close\n");
-@@ -1391,8 +1391,8 @@ static int xgbe_close(struct net_device *netdev)
- static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
+@@ -1388,11 +1388,11 @@ static int xgbe_close(struct net_device *netdev)
+ return 0;
+ }
+
+-static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
{
struct xgbe_prv_data *pdata = netdev_priv(netdev);
- struct xgbe_hw_if *hw_if = &pdata->hw_if;
@@ -52491,11 +58058,111 @@ index e234b99..4f0e2a1 100644
/* Function prototypes*/
void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *);
+diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+index 5eb9b20..8c5d652 100644
+--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+@@ -130,7 +130,7 @@ static void xgene_enet_delete_bufpool(struct xgene_enet_desc_ring *buf_pool)
+ buf_pool->tail = tail;
+ }
+
+-static irqreturn_t xgene_enet_rx_irq(const int irq, void *data)
++static irqreturn_t xgene_enet_rx_irq(int irq, void *data)
+ {
+ struct xgene_enet_desc_ring *rx_ring = data;
+
+@@ -597,7 +597,7 @@ static int xgene_enet_process_ring(struct xgene_enet_desc_ring *ring,
+ return processed;
+ }
+
+-static int xgene_enet_napi(struct napi_struct *napi, const int budget)
++static int xgene_enet_napi(struct napi_struct *napi, int budget)
+ {
+ struct xgene_enet_desc_ring *ring;
+ int processed;
+diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
+index 6446af1..e669e35 100644
+--- a/drivers/net/ethernet/arc/emac_main.c
++++ b/drivers/net/ethernet/arc/emac_main.c
+@@ -645,7 +645,7 @@ static struct net_device_stats *arc_emac_stats(struct net_device *ndev)
+ *
+ * This function is invoked from upper layers to initiate transmission.
+ */
+-static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct arc_emac_priv *priv = netdev_priv(ndev);
+ unsigned int len, *txbd_curr = &priv->txbd_curr;
+diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
+index 55b118e..6de7cd0 100644
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1451,7 +1451,7 @@ static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
+
+
+ static pci_ers_result_t alx_pci_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct alx_priv *alx = pci_get_drvdata(pdev);
+ struct net_device *netdev = alx->dev;
+diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+index 8b5988e..672022e 100644
+--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
++++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+@@ -2719,7 +2719,7 @@ static void atl1c_remove(struct pci_dev *pdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t atl1c_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct atl1c_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+index 59a03a1..1ae287b 100644
+--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+@@ -2485,7 +2485,7 @@ static void atl1e_remove(struct pci_dev *pdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t
+-atl1e_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++atl1e_io_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct atl1e_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
+index 08a23e6..2ffb80f 100644
+--- a/drivers/net/ethernet/aurora/nb8800.c
++++ b/drivers/net/ethernet/aurora/nb8800.c
+@@ -395,7 +395,7 @@ static void nb8800_tx_dma_start_irq(struct net_device *dev)
+ spin_unlock(&priv->tx_lock);
+ }
+
+-static int nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t nb8800_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct nb8800_priv *priv = netdev_priv(dev);
+ struct nb8800_tx_desc *txd;
+diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
+index 8fc3f3c..d97e01e 100644
+--- a/drivers/net/ethernet/broadcom/bnx2.c
++++ b/drivers/net/ethernet/broadcom/bnx2.c
+@@ -8701,7 +8701,7 @@ static SIMPLE_DEV_PM_OPS(bnx2_pm_ops, bnx2_suspend, bnx2_resume);
+ * this device has been detected.
+ */
+ static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *dev = pci_get_drvdata(pdev);
+ struct bnx2 *bp = netdev_priv(dev);
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
-index b7d32e8..ea5b559 100644
+index 4cbb03f8..d94eebe 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
-@@ -1122,7 +1122,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
+@@ -1115,7 +1115,7 @@ static inline u8 bnx2x_get_path_func_num(struct bnx2x *bp)
static inline void bnx2x_init_bp_objs(struct bnx2x *bp)
{
/* RX_MODE controlling object */
@@ -52504,6 +58171,561 @@ index b7d32e8..ea5b559 100644
/* multicast configuration controlling object */
bnx2x_init_mcast_obj(bp, &bp->mcast_obj, bp->fp->cl_id, bp->fp->cid,
+diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+index 1fb8010..0a8dc20 100644
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+@@ -5621,7 +5621,7 @@ static int bnx2x_get_link_speed_duplex(struct bnx2x_phy *phy,
+ return 0;
+ }
+
+-static int bnx2x_link_settings_status(struct bnx2x_phy *phy,
++static u8 bnx2x_link_settings_status(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -5695,7 +5695,7 @@ static int bnx2x_link_settings_status(struct bnx2x_phy *phy,
+ return rc;
+ }
+
+-static int bnx2x_warpcore_read_status(struct bnx2x_phy *phy,
++static u8 bnx2x_warpcore_read_status(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -7436,7 +7436,7 @@ static void bnx2x_8073_specific_func(struct bnx2x_phy *phy,
+ }
+ }
+
+-static int bnx2x_8073_config_init(struct bnx2x_phy *phy,
++static void bnx2x_8073_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -7499,7 +7499,7 @@ static int bnx2x_8073_config_init(struct bnx2x_phy *phy,
+ if (params->loopback_mode == LOOPBACK_EXT) {
+ bnx2x_807x_force_10G(bp, phy);
+ DP(NETIF_MSG_LINK, "Forced speed 10G on 807X\n");
+- return 0;
++ return;
+ } else {
+ bnx2x_cl45_write(bp, phy,
+ MDIO_PMA_DEVAD, MDIO_PMA_REG_BCM_CTRL, 0x0002);
+@@ -7581,7 +7581,6 @@ static int bnx2x_8073_config_init(struct bnx2x_phy *phy,
+ bnx2x_cl45_write(bp, phy, MDIO_AN_DEVAD, MDIO_AN_REG_CTRL, 0x1200);
+ DP(NETIF_MSG_LINK, "807x Autoneg Restart: Advertise 1G=%x, 10G=%x\n",
+ ((val & (1<<5)) > 0), ((val & (1<<7)) > 0));
+- return 0;
+ }
+
+ static u8 bnx2x_8073_read_status(struct bnx2x_phy *phy,
+@@ -7748,7 +7747,7 @@ static void bnx2x_8073_link_reset(struct bnx2x_phy *phy,
+ /******************************************************************/
+ /* BCM8705 PHY SECTION */
+ /******************************************************************/
+-static int bnx2x_8705_config_init(struct bnx2x_phy *phy,
++static void bnx2x_8705_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -7772,7 +7771,6 @@ static int bnx2x_8705_config_init(struct bnx2x_phy *phy,
+ MDIO_WIS_DEVAD, MDIO_WIS_REG_LASI_CNTL, 0x1);
+ /* BCM8705 doesn't have microcode, hence the 0 */
+ bnx2x_save_spirom_version(bp, params->port, params->shmem_base, 0);
+- return 0;
+ }
+
+ static u8 bnx2x_8705_read_status(struct bnx2x_phy *phy,
+@@ -8959,7 +8957,7 @@ static u8 bnx2x_8706_8726_read_status(struct bnx2x_phy *phy,
+ /******************************************************************/
+ /* BCM8706 PHY SECTION */
+ /******************************************************************/
+-static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy,
++static void bnx2x_8706_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -9061,11 +9059,9 @@ static u8 bnx2x_8706_config_init(struct bnx2x_phy *phy,
+ bnx2x_cl45_write(bp, phy,
+ MDIO_PMA_DEVAD, MDIO_PMA_REG_DIGITAL_CTRL, tmp1);
+ }
+-
+- return 0;
+ }
+
+-static int bnx2x_8706_read_status(struct bnx2x_phy *phy,
++static u8 bnx2x_8706_read_status(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -9142,7 +9138,7 @@ static u8 bnx2x_8726_read_status(struct bnx2x_phy *phy,
+ }
+
+
+-static int bnx2x_8726_config_init(struct bnx2x_phy *phy,
++static void bnx2x_8726_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -9223,8 +9219,6 @@ static int bnx2x_8726_config_init(struct bnx2x_phy *phy,
+ phy->tx_preemphasis[1]);
+ }
+
+- return 0;
+-
+ }
+
+ static void bnx2x_8726_link_reset(struct bnx2x_phy *phy,
+@@ -9360,7 +9354,7 @@ static void bnx2x_8727_config_speed(struct bnx2x_phy *phy,
+ }
+ }
+
+-static int bnx2x_8727_config_init(struct bnx2x_phy *phy,
++static void bnx2x_8727_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -9442,8 +9436,6 @@ static int bnx2x_8727_config_init(struct bnx2x_phy *phy,
+ MDIO_PMA_DEVAD, MDIO_PMA_REG_PHY_IDENTIFIER,
+ (tmp2 & 0x7fff));
+ }
+-
+- return 0;
+ }
+
+ static void bnx2x_8727_handle_mod_abs(struct bnx2x_phy *phy,
+@@ -10018,7 +10010,7 @@ static int bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy,
+ return 0;
+ }
+
+-static int bnx2x_8481_config_init(struct bnx2x_phy *phy,
++static void bnx2x_8481_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -10032,7 +10024,7 @@ static int bnx2x_8481_config_init(struct bnx2x_phy *phy,
+ bnx2x_wait_reset_complete(bp, phy, params);
+
+ bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15);
+- return bnx2x_848xx_cmn_config_init(phy, params, vars);
++ bnx2x_848xx_cmn_config_init(phy, params, vars);
+ }
+
+ #define PHY848xx_CMDHDLR_WAIT 300
+@@ -10282,7 +10274,7 @@ static u8 bnx2x_84833_get_reset_gpios(struct bnx2x *bp,
+ return reset_gpios;
+ }
+
+-static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
++static void bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
+ struct link_params *params)
+ {
+ struct bnx2x *bp = params->bp;
+@@ -10311,8 +10303,6 @@ static int bnx2x_84833_hw_reset_phy(struct bnx2x_phy *phy,
+ udelay(10);
+ DP(NETIF_MSG_LINK, "84833 hw reset on pin values 0x%x\n",
+ reset_gpios);
+-
+- return 0;
+ }
+
+ static int bnx2x_8483x_disable_eee(struct bnx2x_phy *phy,
+@@ -10355,7 +10345,7 @@ static int bnx2x_8483x_enable_eee(struct bnx2x_phy *phy,
+ }
+
+ #define PHY84833_CONSTANT_LATENCY 1193
+-static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
++static void bnx2x_848x3_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -10502,7 +10492,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
+ if (rc) {
+ DP(NETIF_MSG_LINK, "Failed to configure EEE timers\n");
+ bnx2x_8483x_disable_eee(phy, params, vars);
+- return rc;
++ return;
+ }
+
+ if ((phy->req_duplex == DUPLEX_FULL) &&
+@@ -10514,7 +10504,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
+ rc = bnx2x_8483x_disable_eee(phy, params, vars);
+ if (rc) {
+ DP(NETIF_MSG_LINK, "Failed to set EEE advertisement\n");
+- return rc;
++ return;
+ }
+ } else {
+ vars->eee_status &= ~SHMEM_EEE_SUPPORTED_MASK;
+@@ -10553,7 +10543,6 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
+ MDIO_84833_TOP_CFG_XGPHY_STRAP1,
+ (u16)~MDIO_84833_SUPER_ISOLATE);
+ }
+- return rc;
+ }
+
+ static u8 bnx2x_848xx_read_status(struct bnx2x_phy *phy,
+@@ -11113,7 +11102,7 @@ static void bnx2x_54618se_specific_func(struct bnx2x_phy *phy,
+ }
+ }
+
+-static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
++static void bnx2x_54618se_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -11315,8 +11304,6 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
+
+ bnx2x_cl22_write(bp, phy,
+ MDIO_PMA_REG_CTRL, autoneg_val);
+-
+- return 0;
+ }
+
+
+@@ -11540,7 +11527,7 @@ static void bnx2x_7101_config_loopback(struct bnx2x_phy *phy,
+ MDIO_XS_DEVAD, MDIO_XS_SFX7101_XGXS_TEST1, 0x100);
+ }
+
+-static int bnx2x_7101_config_init(struct bnx2x_phy *phy,
++static void bnx2x_7101_config_init(struct bnx2x_phy *phy,
+ struct link_params *params,
+ struct link_vars *vars)
+ {
+@@ -11577,7 +11564,6 @@ static int bnx2x_7101_config_init(struct bnx2x_phy *phy,
+ MDIO_PMA_DEVAD, MDIO_PMA_REG_7101_VER2, &fw_ver2);
+ bnx2x_save_spirom_version(bp, params->port,
+ (u32)(fw_ver1<<16 | fw_ver2), phy->ver_addr);
+- return 0;
+ }
+
+ static u8 bnx2x_7101_read_status(struct bnx2x_phy *phy,
+@@ -11746,9 +11732,9 @@ static const struct bnx2x_phy phy_serdes = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_xgxs_config_init,
+- .read_status = (read_status_t)bnx2x_link_settings_status,
+- .link_reset = (link_reset_t)bnx2x_int_link_reset,
++ .config_init = bnx2x_xgxs_config_init,
++ .read_status = bnx2x_link_settings_status,
++ .link_reset = bnx2x_int_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+ .format_fw_ver = (format_fw_ver_t)NULL,
+ .hw_reset = (hw_reset_t)NULL,
+@@ -11782,14 +11768,14 @@ static const struct bnx2x_phy phy_xgxs = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_xgxs_config_init,
+- .read_status = (read_status_t)bnx2x_link_settings_status,
+- .link_reset = (link_reset_t)bnx2x_int_link_reset,
+- .config_loopback = (config_loopback_t)bnx2x_set_xgxs_loopback,
++ .config_init = bnx2x_xgxs_config_init,
++ .read_status = bnx2x_link_settings_status,
++ .link_reset = bnx2x_int_link_reset,
++ .config_loopback = bnx2x_set_xgxs_loopback,
+ .format_fw_ver = (format_fw_ver_t)NULL,
+ .hw_reset = (hw_reset_t)NULL,
+ .set_link_led = (set_link_led_t)NULL,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_xgxs_specific_func
++ .phy_specific_func = bnx2x_xgxs_specific_func
+ };
+ static const struct bnx2x_phy phy_warpcore = {
+ .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT,
+@@ -11820,12 +11806,12 @@ static const struct bnx2x_phy phy_warpcore = {
+ .speed_cap_mask = 0,
+ /* req_duplex = */0,
+ /* rsrv = */0,
+- .config_init = (config_init_t)bnx2x_warpcore_config_init,
+- .read_status = (read_status_t)bnx2x_warpcore_read_status,
+- .link_reset = (link_reset_t)bnx2x_warpcore_link_reset,
+- .config_loopback = (config_loopback_t)bnx2x_set_warpcore_loopback,
++ .config_init = bnx2x_warpcore_config_init,
++ .read_status = bnx2x_warpcore_read_status,
++ .link_reset = bnx2x_warpcore_link_reset,
++ .config_loopback = bnx2x_set_warpcore_loopback,
+ .format_fw_ver = (format_fw_ver_t)NULL,
+- .hw_reset = (hw_reset_t)bnx2x_warpcore_hw_reset,
++ .hw_reset = bnx2x_warpcore_hw_reset,
+ .set_link_led = (set_link_led_t)NULL,
+ .phy_specific_func = (phy_specific_func_t)NULL
+ };
+@@ -11851,13 +11837,13 @@ static const struct bnx2x_phy phy_7101 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_7101_config_init,
+- .read_status = (read_status_t)bnx2x_7101_read_status,
+- .link_reset = (link_reset_t)bnx2x_common_ext_link_reset,
+- .config_loopback = (config_loopback_t)bnx2x_7101_config_loopback,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_7101_format_ver,
+- .hw_reset = (hw_reset_t)bnx2x_7101_hw_reset,
+- .set_link_led = (set_link_led_t)bnx2x_7101_set_link_led,
++ .config_init = bnx2x_7101_config_init,
++ .read_status = bnx2x_7101_read_status,
++ .link_reset = bnx2x_common_ext_link_reset,
++ .config_loopback = bnx2x_7101_config_loopback,
++ .format_fw_ver = bnx2x_7101_format_ver,
++ .hw_reset = bnx2x_7101_hw_reset,
++ .set_link_led = bnx2x_7101_set_link_led,
+ .phy_specific_func = (phy_specific_func_t)NULL
+ };
+ static const struct bnx2x_phy phy_8073 = {
+@@ -11882,14 +11868,14 @@ static const struct bnx2x_phy phy_8073 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_8073_config_init,
+- .read_status = (read_status_t)bnx2x_8073_read_status,
+- .link_reset = (link_reset_t)bnx2x_8073_link_reset,
++ .config_init = bnx2x_8073_config_init,
++ .read_status = bnx2x_8073_read_status,
++ .link_reset = bnx2x_8073_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
++ .format_fw_ver = bnx2x_format_ver,
+ .hw_reset = (hw_reset_t)NULL,
+ .set_link_led = (set_link_led_t)NULL,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_8073_specific_func
++ .phy_specific_func = bnx2x_8073_specific_func
+ };
+ static const struct bnx2x_phy phy_8705 = {
+ .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8705,
+@@ -11910,11 +11896,11 @@ static const struct bnx2x_phy phy_8705 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_8705_config_init,
+- .read_status = (read_status_t)bnx2x_8705_read_status,
+- .link_reset = (link_reset_t)bnx2x_common_ext_link_reset,
++ .config_init = bnx2x_8705_config_init,
++ .read_status = bnx2x_8705_read_status,
++ .link_reset = bnx2x_common_ext_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_null_format_ver,
++ .format_fw_ver = bnx2x_null_format_ver,
+ .hw_reset = (hw_reset_t)NULL,
+ .set_link_led = (set_link_led_t)NULL,
+ .phy_specific_func = (phy_specific_func_t)NULL
+@@ -11939,11 +11925,11 @@ static const struct bnx2x_phy phy_8706 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_8706_config_init,
+- .read_status = (read_status_t)bnx2x_8706_read_status,
+- .link_reset = (link_reset_t)bnx2x_common_ext_link_reset,
++ .config_init = bnx2x_8706_config_init,
++ .read_status = bnx2x_8706_read_status,
++ .link_reset = bnx2x_common_ext_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
++ .format_fw_ver = bnx2x_format_ver,
+ .hw_reset = (hw_reset_t)NULL,
+ .set_link_led = (set_link_led_t)NULL,
+ .phy_specific_func = (phy_specific_func_t)NULL
+@@ -11971,11 +11957,11 @@ static const struct bnx2x_phy phy_8726 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_8726_config_init,
+- .read_status = (read_status_t)bnx2x_8726_read_status,
+- .link_reset = (link_reset_t)bnx2x_8726_link_reset,
+- .config_loopback = (config_loopback_t)bnx2x_8726_config_loopback,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
++ .config_init = bnx2x_8726_config_init,
++ .read_status = bnx2x_8726_read_status,
++ .link_reset = bnx2x_8726_link_reset,
++ .config_loopback = bnx2x_8726_config_loopback,
++ .format_fw_ver = bnx2x_format_ver,
+ .hw_reset = (hw_reset_t)NULL,
+ .set_link_led = (set_link_led_t)NULL,
+ .phy_specific_func = (phy_specific_func_t)NULL
+@@ -12002,14 +11988,14 @@ static const struct bnx2x_phy phy_8727 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_8727_config_init,
+- .read_status = (read_status_t)bnx2x_8727_read_status,
+- .link_reset = (link_reset_t)bnx2x_8727_link_reset,
++ .config_init = bnx2x_8727_config_init,
++ .read_status = bnx2x_8727_read_status,
++ .link_reset = bnx2x_8727_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_format_ver,
+- .hw_reset = (hw_reset_t)bnx2x_8727_hw_reset,
+- .set_link_led = (set_link_led_t)bnx2x_8727_set_link_led,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_8727_specific_func
++ .format_fw_ver = bnx2x_format_ver,
++ .hw_reset = bnx2x_8727_hw_reset,
++ .set_link_led = bnx2x_8727_set_link_led,
++ .phy_specific_func = bnx2x_8727_specific_func
+ };
+ static const struct bnx2x_phy phy_8481 = {
+ .type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8481,
+@@ -12037,13 +12023,13 @@ static const struct bnx2x_phy phy_8481 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_8481_config_init,
+- .read_status = (read_status_t)bnx2x_848xx_read_status,
+- .link_reset = (link_reset_t)bnx2x_8481_link_reset,
++ .config_init = bnx2x_8481_config_init,
++ .read_status = bnx2x_848xx_read_status,
++ .link_reset = bnx2x_8481_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
+- .hw_reset = (hw_reset_t)bnx2x_8481_hw_reset,
+- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
++ .format_fw_ver = bnx2x_848xx_format_ver,
++ .hw_reset = bnx2x_8481_hw_reset,
++ .set_link_led = bnx2x_848xx_set_link_led,
+ .phy_specific_func = (phy_specific_func_t)NULL
+ };
+
+@@ -12074,14 +12060,14 @@ static const struct bnx2x_phy phy_84823 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_848x3_config_init,
+- .read_status = (read_status_t)bnx2x_848xx_read_status,
+- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
++ .config_init = bnx2x_848x3_config_init,
++ .read_status = bnx2x_848xx_read_status,
++ .link_reset = bnx2x_848x3_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
++ .format_fw_ver = bnx2x_848xx_format_ver,
+ .hw_reset = (hw_reset_t)NULL,
+- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
++ .set_link_led = bnx2x_848xx_set_link_led,
++ .phy_specific_func = bnx2x_848xx_specific_func
+ };
+
+ static const struct bnx2x_phy phy_84833 = {
+@@ -12109,14 +12095,14 @@ static const struct bnx2x_phy phy_84833 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_848x3_config_init,
+- .read_status = (read_status_t)bnx2x_848xx_read_status,
+- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
++ .config_init = bnx2x_848x3_config_init,
++ .read_status = bnx2x_848xx_read_status,
++ .link_reset = bnx2x_848x3_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
+- .hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy,
+- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
++ .format_fw_ver = bnx2x_848xx_format_ver,
++ .hw_reset = bnx2x_84833_hw_reset_phy,
++ .set_link_led = bnx2x_848xx_set_link_led,
++ .phy_specific_func = bnx2x_848xx_specific_func
+ };
+
+ static const struct bnx2x_phy phy_84834 = {
+@@ -12143,14 +12129,14 @@ static const struct bnx2x_phy phy_84834 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_848x3_config_init,
+- .read_status = (read_status_t)bnx2x_848xx_read_status,
+- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
++ .config_init = bnx2x_848x3_config_init,
++ .read_status = bnx2x_848xx_read_status,
++ .link_reset = bnx2x_848x3_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_848xx_format_ver,
+- .hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy,
+- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
++ .format_fw_ver = bnx2x_848xx_format_ver,
++ .hw_reset = bnx2x_84833_hw_reset_phy,
++ .set_link_led = bnx2x_848xx_set_link_led,
++ .phy_specific_func = bnx2x_848xx_specific_func
+ };
+
+ static const struct bnx2x_phy phy_84858 = {
+@@ -12177,14 +12163,14 @@ static const struct bnx2x_phy phy_84858 = {
+ .speed_cap_mask = 0,
+ .req_duplex = 0,
+ .rsrv = 0,
+- .config_init = (config_init_t)bnx2x_848x3_config_init,
+- .read_status = (read_status_t)bnx2x_848xx_read_status,
+- .link_reset = (link_reset_t)bnx2x_848x3_link_reset,
++ .config_init = bnx2x_848x3_config_init,
++ .read_status = bnx2x_848xx_read_status,
++ .link_reset = bnx2x_848x3_link_reset,
+ .config_loopback = (config_loopback_t)NULL,
+- .format_fw_ver = (format_fw_ver_t)bnx2x_8485x_format_ver,
+- .hw_reset = (hw_reset_t)bnx2x_84833_hw_reset_phy,
+- .set_link_led = (set_link_led_t)bnx2x_848xx_set_link_led,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_848xx_specific_func
++ .format_fw_ver = bnx2x_8485x_format_ver,
++ .hw_reset = bnx2x_84833_hw_reset_phy,
++ .set_link_led = bnx2x_848xx_set_link_led,
++ .phy_specific_func = bnx2x_848xx_specific_func
+ };
+
+ static const struct bnx2x_phy phy_54618se = {
+@@ -12211,14 +12197,14 @@ static const struct bnx2x_phy phy_54618se = {
+ .speed_cap_mask = 0,
+ /* req_duplex = */0,
+ /* rsrv = */0,
+- .config_init = (config_init_t)bnx2x_54618se_config_init,
+- .read_status = (read_status_t)bnx2x_54618se_read_status,
+- .link_reset = (link_reset_t)bnx2x_54618se_link_reset,
+- .config_loopback = (config_loopback_t)bnx2x_54618se_config_loopback,
++ .config_init = bnx2x_54618se_config_init,
++ .read_status = bnx2x_54618se_read_status,
++ .link_reset = bnx2x_54618se_link_reset,
++ .config_loopback = bnx2x_54618se_config_loopback,
+ .format_fw_ver = (format_fw_ver_t)NULL,
+ .hw_reset = (hw_reset_t)NULL,
+- .set_link_led = (set_link_led_t)bnx2x_5461x_set_link_led,
+- .phy_specific_func = (phy_specific_func_t)bnx2x_54618se_specific_func
++ .set_link_led = bnx2x_5461x_set_link_led,
++ .phy_specific_func = bnx2x_54618se_specific_func
+ };
+ /*****************************************************************/
+ /* */
+diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
+index b7d2511..a625bae 100644
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
+@@ -126,7 +126,7 @@ struct link_vars;
+ struct link_params;
+ struct bnx2x_phy;
+
+-typedef u8 (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params,
++typedef void (*config_init_t)(struct bnx2x_phy *phy, struct link_params *params,
+ struct link_vars *vars);
+ typedef u8 (*read_status_t)(struct bnx2x_phy *phy, struct link_params *params,
+ struct link_vars *vars);
+@@ -134,7 +134,7 @@ typedef void (*link_reset_t)(struct bnx2x_phy *phy,
+ struct link_params *params);
+ typedef void (*config_loopback_t)(struct bnx2x_phy *phy,
+ struct link_params *params);
+-typedef u8 (*format_fw_ver_t)(u32 raw, u8 *str, u16 *len);
++typedef int (*format_fw_ver_t)(u32 raw, u8 *str, u16 *len);
+ typedef void (*hw_reset_t)(struct bnx2x_phy *phy, struct link_params *params);
+ typedef void (*set_link_led_t)(struct bnx2x_phy *phy,
+ struct link_params *params, u8 mode);
+diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+index 2bf9c87..5a36b0f 100644
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -14130,7 +14130,7 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
+ * this device has been detected.
+ */
+ static pci_ers_result_t bnx2x_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *dev = pci_get_drvdata(pdev);
+ struct bnx2x *bp = netdev_priv(dev);
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index ff702a7..cb3ae16 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -52543,8 +58765,21 @@ index 4048fc5..333809f 100644
/**
* bnx2x_config_rx_mode - Send and RX_MODE ramrod according to the provided parameters.
+diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
+index 3010080..49824f1 100644
+--- a/drivers/net/ethernet/broadcom/tg3.c
++++ b/drivers/net/ethernet/broadcom/tg3.c
+@@ -18124,7 +18124,7 @@ static void tg3_shutdown(struct pci_dev *pdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct tg3 *tp = netdev_priv(netdev);
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
-index 31c9f82..e65e986 100644
+index 3b5e98e..52b3916 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -150,6 +150,7 @@
@@ -52555,10 +58790,183 @@ index 31c9f82..e65e986 100644
#define CHIPREV_ID_5750_C2 0x4202
#define CHIPREV_ID_5752_A0_HW 0x5000
#define CHIPREV_ID_5752_A0 0x6000
+diff --git a/drivers/net/ethernet/brocade/bna/bfa_cs.h b/drivers/net/ethernet/brocade/bna/bfa_cs.h
+index 1d11d66..8f7a3cb 100644
+--- a/drivers/net/ethernet/brocade/bna/bfa_cs.h
++++ b/drivers/net/ethernet/brocade/bna/bfa_cs.h
+@@ -34,10 +34,19 @@ struct bfa_sm_table {
+ int state; /*!< state machine encoding */
+ char *name; /*!< state name for display */
+ };
+-#define BFA_SM(_sm) ((bfa_sm_t)(_sm))
++#define BFA_SM(_sm) (_sm)
++
++#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (_state))
++#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (_state))
+
+ /* State machine with entry actions. */
+-typedef void (*bfa_fsm_t)(void *fsm, int event);
++struct bfa_ioc;
++enum ioc_event;
++struct bfa_iocpf;
++enum iocpf_event;
++
++typedef void (*bfa_fsm_ioc_t)(struct bfa_ioc *fsm, enum ioc_event event);
++typedef void (*bfa_fsm_iocpf_t)(struct bfa_iocpf *fsm, enum iocpf_event event);
+
+ /* oc - object class eg. bfa_ioc
+ * st - state, eg. reset
+@@ -49,16 +58,37 @@ typedef void (*bfa_fsm_t)(void *fsm, int event);
+ static void oc ## _sm_ ## st ## _entry(otype * fsm)
+
+ #define bfa_fsm_set_state(_fsm, _state) do { \
+- (_fsm)->fsm = (bfa_fsm_t)(_state); \
++ (_fsm)->fsm = (_state); \
+ _state ## _entry(_fsm); \
+ } while (0)
+
+ #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
+-#define bfa_fsm_cmp_state(_fsm, _state) \
+- ((_fsm)->fsm == (bfa_fsm_t)(_state))
++#define bfa_fsm_cmp_state(_fsm, _state) ((_fsm)->fsm == (_state))
++
++/* For converting from state machine function to state encoding. */
++struct iocpf_sm_table {
++ bfa_fsm_iocpf_t sm; /*!< state machine function */
++ int state; /*!< state machine encoding */
++ char *name; /*!< state name for display */
++};
++struct ioc_sm_table {
++ bfa_fsm_ioc_t sm; /*!< state machine function */
++ int state; /*!< state machine encoding */
++ char *name; /*!< state name for display */
++};
++
++static inline int
++iocpf_sm_to_state(const struct iocpf_sm_table *smt, bfa_fsm_iocpf_t sm)
++{
++ int i = 0;
++
++ while (smt[i].sm && smt[i].sm != sm)
++ i++;
++ return smt[i].state;
++}
+
+ static inline int
+-bfa_sm_to_state(const struct bfa_sm_table *smt, bfa_sm_t sm)
++ioc_sm_to_state(const struct ioc_sm_table *smt, bfa_fsm_ioc_t sm)
+ {
+ int i = 0;
+
+diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+index 9e59663..3564807 100644
+--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
++++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+@@ -122,7 +122,7 @@ bfa_fsm_state_decl(bfa_ioc, disabling, struct bfa_ioc, enum ioc_event);
+ bfa_fsm_state_decl(bfa_ioc, disabled, struct bfa_ioc, enum ioc_event);
+ bfa_fsm_state_decl(bfa_ioc, hwfail, struct bfa_ioc, enum ioc_event);
+
+-static struct bfa_sm_table ioc_sm_table[] = {
++static struct ioc_sm_table ioc_sm_table[] = {
+ {BFA_SM(bfa_ioc_sm_uninit), BFA_IOC_UNINIT},
+ {BFA_SM(bfa_ioc_sm_reset), BFA_IOC_RESET},
+ {BFA_SM(bfa_ioc_sm_enabling), BFA_IOC_ENABLING},
+@@ -191,7 +191,7 @@ bfa_fsm_state_decl(bfa_iocpf, disabling_sync, struct bfa_iocpf,
+ enum iocpf_event);
+ bfa_fsm_state_decl(bfa_iocpf, disabled, struct bfa_iocpf, enum iocpf_event);
+
+-static struct bfa_sm_table iocpf_sm_table[] = {
++static struct iocpf_sm_table iocpf_sm_table[] = {
+ {BFA_SM(bfa_iocpf_sm_reset), BFA_IOCPF_RESET},
+ {BFA_SM(bfa_iocpf_sm_fwcheck), BFA_IOCPF_FWMISMATCH},
+ {BFA_SM(bfa_iocpf_sm_mismatch), BFA_IOCPF_FWMISMATCH},
+@@ -2862,12 +2862,12 @@ static enum bfa_ioc_state
+ bfa_ioc_get_state(struct bfa_ioc *ioc)
+ {
+ enum bfa_iocpf_state iocpf_st;
+- enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm);
++ enum bfa_ioc_state ioc_st = ioc_sm_to_state(ioc_sm_table, ioc->fsm);
+
+ if (ioc_st == BFA_IOC_ENABLING ||
+ ioc_st == BFA_IOC_FAIL || ioc_st == BFA_IOC_INITFAIL) {
+
+- iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
++ iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
+
+ switch (iocpf_st) {
+ case BFA_IOCPF_SEMWAIT:
+@@ -2985,7 +2985,7 @@ bfa_nw_iocpf_timeout(struct bfa_ioc *ioc)
+ {
+ enum bfa_iocpf_state iocpf_st;
+
+- iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
++ iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
+
+ if (iocpf_st == BFA_IOCPF_HWINIT)
+ bfa_ioc_poll_fwinit(ioc);
+diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.h b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
+index 2c0b4c0..97873eb 100644
+--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.h
++++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.h
+@@ -156,7 +156,7 @@ struct bfa_ioc_notify {
+ } while (0)
+
+ struct bfa_iocpf {
+- bfa_fsm_t fsm;
++ bfa_fsm_iocpf_t fsm;
+ struct bfa_ioc *ioc;
+ bool fw_mismatch_notified;
+ bool auto_recover;
+@@ -164,7 +164,7 @@ struct bfa_iocpf {
+ };
+
+ struct bfa_ioc {
+- bfa_fsm_t fsm;
++ bfa_fsm_ioc_t fsm;
+ struct bfa *bfa;
+ struct bfa_pcidev pcidev;
+ struct timer_list ioc_timer;
+diff --git a/drivers/net/ethernet/brocade/bna/bfa_msgq.h b/drivers/net/ethernet/brocade/bna/bfa_msgq.h
+index 66bc8b5..bf64466 100644
+--- a/drivers/net/ethernet/brocade/bna/bfa_msgq.h
++++ b/drivers/net/ethernet/brocade/bna/bfa_msgq.h
+@@ -63,8 +63,10 @@ enum bfa_msgq_cmdq_flags {
+ BFA_MSGQ_CMDQ_F_DB_UPDATE = 1,
+ };
+
++enum cmdq_event;
++
+ struct bfa_msgq_cmdq {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bfa_msgq_cmdq *, enum cmdq_event);
+ enum bfa_msgq_cmdq_flags flags;
+
+ u16 producer_index;
+@@ -89,8 +91,10 @@ enum bfa_msgq_rspq_flags {
+
+ typedef void (*bfa_msgq_mcfunc_t)(void *cbarg, struct bfi_msgq_mhdr *mhdr);
+
++enum rspq_event;
++
+ struct bfa_msgq_rspq {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bfa_msgq_rspq *, enum rspq_event);
+ enum bfa_msgq_rspq_flags flags;
+
+ u16 producer_index;
diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c
-index 4e5c387..bba8173 100644
+index 4e5c387..0791dab 100644
--- a/drivers/net/ethernet/brocade/bna/bna_enet.c
+++ b/drivers/net/ethernet/brocade/bna/bna_enet.c
+@@ -1265,7 +1265,7 @@ bna_enet_mtu_get(struct bna_enet *enet)
+ void
+ bna_enet_enable(struct bna_enet *enet)
+ {
+- if (enet->fsm != (bfa_sm_t)bna_enet_sm_stopped)
++ if (enet->fsm != bna_enet_sm_stopped)
+ return;
+
+ enet->flags |= BNA_ENET_F_ENABLED;
@@ -1676,10 +1676,10 @@ bna_cb_ioceth_reset(void *arg)
}
@@ -52574,6 +58982,204 @@ index 4e5c387..bba8173 100644
};
static void bna_attr_init(struct bna_ioceth *ioceth)
+@@ -1759,12 +1759,12 @@ bna_ioceth_uninit(struct bna_ioceth *ioceth)
+ void
+ bna_ioceth_enable(struct bna_ioceth *ioceth)
+ {
+- if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_ready) {
++ if (ioceth->fsm == bna_ioceth_sm_ready) {
+ bnad_cb_ioceth_ready(ioceth->bna->bnad);
+ return;
+ }
+
+- if (ioceth->fsm == (bfa_fsm_t)bna_ioceth_sm_stopped)
++ if (ioceth->fsm == bna_ioceth_sm_stopped)
+ bfa_fsm_send_event(ioceth, IOCETH_E_ENABLE);
+ }
+
+diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
+index 95bc470..c12be9f 100644
+--- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
++++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
+@@ -1964,7 +1964,7 @@ static void
+ bna_rx_stop(struct bna_rx *rx)
+ {
+ rx->rx_flags &= ~BNA_RX_F_ENET_STARTED;
+- if (rx->fsm == (bfa_fsm_t) bna_rx_sm_stopped)
++ if (rx->fsm == bna_rx_sm_stopped)
+ bna_rx_mod_cb_rx_stopped(&rx->bna->rx_mod, rx);
+ else {
+ rx->stop_cbfn = bna_rx_mod_cb_rx_stopped;
+@@ -2543,7 +2543,7 @@ bna_rx_destroy(struct bna_rx *rx)
+ void
+ bna_rx_enable(struct bna_rx *rx)
+ {
+- if (rx->fsm != (bfa_sm_t)bna_rx_sm_stopped)
++ if (rx->fsm != bna_rx_sm_stopped)
+ return;
+
+ rx->rx_flags |= BNA_RX_F_ENABLED;
+@@ -3531,7 +3531,7 @@ bna_tx_destroy(struct bna_tx *tx)
+ void
+ bna_tx_enable(struct bna_tx *tx)
+ {
+- if (tx->fsm != (bfa_sm_t)bna_tx_sm_stopped)
++ if (tx->fsm != bna_tx_sm_stopped)
+ return;
+
+ tx->flags |= BNA_TX_F_ENABLED;
+diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h
+index c438d03..4653f43 100644
+--- a/drivers/net/ethernet/brocade/bna/bna_types.h
++++ b/drivers/net/ethernet/brocade/bna/bna_types.h
+@@ -320,8 +320,10 @@ struct bna_attr {
+
+ /* IOCEth */
+
++enum bna_ioceth_event;
++
+ struct bna_ioceth {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bna_ioceth *, enum bna_ioceth_event);
+ struct bfa_ioc ioc;
+
+ struct bna_attr attr;
+@@ -342,8 +344,10 @@ struct bna_pause_config {
+ enum bna_status rx_pause;
+ };
+
++enum bna_enet_event;
++
+ struct bna_enet {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bna_enet *, enum bna_enet_event);
+ enum bna_enet_flags flags;
+
+ enum bna_enet_type type;
+@@ -368,8 +372,10 @@ struct bna_enet {
+
+ /* Ethport */
+
++enum bna_ethport_event;
++
+ struct bna_ethport {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bna_ethport *, enum bna_ethport_event);
+ enum bna_ethport_flags flags;
+
+ enum bna_link_status link_status;
+@@ -462,13 +468,15 @@ struct bna_txq {
+ };
+
+ /* Tx object */
++enum bna_tx_event;
++
+ struct bna_tx {
+ /* This should be the first one */
+ struct list_head qe;
+ int rid;
+ int hw_id;
+
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bna_tx *, enum bna_tx_event);
+ enum bna_tx_flags flags;
+
+ enum bna_tx_type type;
+@@ -706,8 +714,10 @@ struct bna_rxp {
+ };
+
+ /* RxF structure (hardware Rx Function) */
++enum bna_rxf_event;
++
+ struct bna_rxf {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bna_rxf *, enum bna_rxf_event);
+
+ struct bfa_msgq_cmd_entry msgq_cmd;
+ union {
+@@ -777,13 +787,15 @@ struct bna_rxf {
+ };
+
+ /* Rx object */
++enum bna_rx_event;
++
+ struct bna_rx {
+ /* This should be the first one */
+ struct list_head qe;
+ int rid;
+ int hw_id;
+
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bna_rx *, enum bna_rx_event);
+
+ enum bna_rx_type type;
+
+diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
+index 771cc26..c681a90 100644
+--- a/drivers/net/ethernet/brocade/bna/bnad.c
++++ b/drivers/net/ethernet/brocade/bna/bnad.c
+@@ -1118,8 +1118,9 @@ bnad_cb_tx_resume(struct bnad *bnad, struct bna_tx *tx)
+ * Free all TxQs buffers and then notify TX_E_CLEANUP_DONE to Tx fsm.
+ */
+ static void
+-bnad_tx_cleanup(struct delayed_work *work)
++bnad_tx_cleanup(struct work_struct *_work)
+ {
++ struct delayed_work *work = (struct delayed_work *)_work;
+ struct bnad_tx_info *tx_info =
+ container_of(work, struct bnad_tx_info, tx_cleanup_work);
+ struct bnad *bnad = NULL;
+@@ -1197,7 +1198,7 @@ bnad_cb_rx_stall(struct bnad *bnad, struct bna_rx *rx)
+ * Free all RxQs buffers and then notify RX_E_CLEANUP_DONE to Rx fsm.
+ */
+ static void
+-bnad_rx_cleanup(void *work)
++bnad_rx_cleanup(struct work_struct *work)
+ {
+ struct bnad_rx_info *rx_info =
+ container_of(work, struct bnad_rx_info, rx_cleanup_work);
+@@ -2021,8 +2022,7 @@ bnad_setup_tx(struct bnad *bnad, u32 tx_id)
+ }
+ tx_info->tx = tx;
+
+- INIT_DELAYED_WORK(&tx_info->tx_cleanup_work,
+- (work_func_t)bnad_tx_cleanup);
++ INIT_DELAYED_WORK(&tx_info->tx_cleanup_work, bnad_tx_cleanup);
+
+ /* Register ISR for the Tx object */
+ if (intr_info->intr_type == BNA_INTR_T_MSIX) {
+@@ -2278,8 +2278,7 @@ bnad_setup_rx(struct bnad *bnad, u32 rx_id)
+ rx_info->rx = rx;
+ spin_unlock_irqrestore(&bnad->bna_lock, flags);
+
+- INIT_WORK(&rx_info->rx_cleanup_work,
+- (work_func_t)(bnad_rx_cleanup));
++ INIT_WORK(&rx_info->rx_cleanup_work, bnad_rx_cleanup);
+
+ /*
+ * Init NAPI, so that state is set to NAPI_STATE_SCHED,
+diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
+index 50c9410..afd792e 100644
+--- a/drivers/net/ethernet/cadence/macb.c
++++ b/drivers/net/ethernet/cadence/macb.c
+@@ -1279,7 +1279,7 @@ dma_error:
+ return 0;
+ }
+
+-static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ u16 queue_index = skb_get_queue_mapping(skb);
+ struct macb *bp = netdev_priv(dev);
+@@ -2550,7 +2550,7 @@ static int at91ether_close(struct net_device *dev)
+ }
+
+ /* Transmit packet */
+-static int at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t at91ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct macb *lp = netdev_priv(dev);
+
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
index 245c063..74ed9c9 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
@@ -52600,10 +59206,19 @@ index 245c063..74ed9c9 100644
mdio_cmd->op = op;
mdio_cmd->mdio_addr = loc;
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
-index b895044..f8ed0c3 100644
+index 34d269c..43dcc17 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
-@@ -1726,7 +1726,7 @@ static void if_cfg_callback(struct octeon_device *oct,
+@@ -475,7 +475,7 @@ static void stop_pci_io(struct octeon_device *oct)
+ * this device has been detected.
+ */
+ static pci_ers_result_t liquidio_pcie_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct octeon_device *oct = pci_get_drvdata(pdev);
+
+@@ -1724,7 +1724,7 @@ static void if_cfg_callback(struct octeon_device *oct,
if (resp->status)
dev_err(&oct->pci_dev->dev, "nic if cfg instruction failed. Status: %llx\n",
CVM_CAST64(resp->status));
@@ -52612,7 +59227,16 @@ index b895044..f8ed0c3 100644
/* This barrier is required to be sure that the response has been
* written fully before waking up the handler
-@@ -3176,7 +3176,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
+@@ -2662,7 +2662,7 @@ static inline u32 get_ipv6_5tuple_tag(struct sk_buff *skb)
+ * @returns whether the packet was transmitted to the device okay or not
+ * (NETDEV_TX_OK or NETDEV_TX_BUSY)
+ */
+-static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct lio *lio;
+ struct octnet_buf_free_info *finfo;
+@@ -3174,7 +3174,7 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
dev_dbg(&octeon_dev->pci_dev->dev,
"requesting config for interface %d, iqs %d, oqs %d\n",
i, num_iqueues, num_oqueues);
@@ -52621,7 +59245,7 @@ index b895044..f8ed0c3 100644
ctx->octeon_id = lio_get_device_id(octeon_dev);
init_waitqueue_head(&ctx->wc);
-@@ -3239,8 +3239,11 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
+@@ -3237,8 +3237,11 @@ static int setup_nic_devices(struct octeon_device *octeon_dev)
props = &octeon_dev->props[i];
props->netdev = netdev;
@@ -52635,6 +59259,19 @@ index b895044..f8ed0c3 100644
/* Associate the routines that will handle different
* netdev tasks.
+diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+index 60908ea..4ecee32 100644
+--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
++++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+@@ -2996,7 +2996,7 @@ void t3_fatal_err(struct adapter *adapter)
+ * this device has been detected.
+ */
+ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct adapter *adapter = pci_get_drvdata(pdev);
+
diff --git a/drivers/net/ethernet/chelsio/cxgb3/l2t.h b/drivers/net/ethernet/chelsio/cxgb3/l2t.h
index 8cffcdf..aadf043 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/l2t.h
@@ -52648,11 +59285,88 @@ index 8cffcdf..aadf043 100644
#define L2T_SKB_CB(skb) ((struct l2t_skb_cb *)(skb)->cb)
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+index b8a5fb0..39f0c9a 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+@@ -4103,7 +4103,7 @@ bye:
+ /* EEH callbacks */
+
+ static pci_ers_result_t eeh_err_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ int i;
+ struct adapter *adap = pci_get_drvdata(pdev);
+diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
+index 6049f70..6e1f19e 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
++++ b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
+@@ -538,7 +538,7 @@ int t4vf_sge_alloc_eth_txq(struct adapter *, struct sge_eth_txq *,
+ unsigned int);
+ void t4vf_free_sge_resources(struct adapter *);
+
+-int t4vf_eth_xmit(struct sk_buff *, struct net_device *);
++netdev_tx_t t4vf_eth_xmit(struct sk_buff *, struct net_device *);
+ int t4vf_ethrx_handler(struct sge_rspq *, const __be64 *,
+ const struct pkt_gl *);
+
+diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+index 6528231..8503500 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
++++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+@@ -1159,7 +1159,7 @@ static inline void txq_advance(struct sge_txq *tq, unsigned int n)
+ *
+ * Add a packet to an SGE Ethernet TX queue. Runs with softirqs disabled.
+ */
+-int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
++netdev_tx_t t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ u32 wr_mid;
+ u64 cntrl, *end;
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
-index 8966f31..e15a101 100644
+index 3acde3b..284086c 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
-@@ -5373,7 +5373,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+@@ -912,7 +912,7 @@ static int de4x5_init(struct net_device *dev);
+ static int de4x5_sw_reset(struct net_device *dev);
+ static int de4x5_rx(struct net_device *dev);
+ static int de4x5_tx(struct net_device *dev);
+-static void de4x5_ast(struct net_device *dev);
++static void de4x5_ast(unsigned long _dev);
+ static int de4x5_txur(struct net_device *dev);
+ static int de4x5_rx_ovfc(struct net_device *dev);
+
+@@ -1149,7 +1149,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
+ lp->gendev = gendev;
+ spin_lock_init(&lp->lock);
+ init_timer(&lp->timer);
+- lp->timer.function = (void (*)(unsigned long))de4x5_ast;
++ lp->timer.function = de4x5_ast;
+ lp->timer.data = (unsigned long)dev;
+ de4x5_parse_params(dev);
+
+@@ -1740,8 +1740,9 @@ de4x5_tx(struct net_device *dev)
+ }
+
+ static void
+-de4x5_ast(struct net_device *dev)
++de4x5_ast(unsigned long _dev)
+ {
++ struct net_device *dev = (struct net_device *)_dev;
+ struct de4x5_private *lp = netdev_priv(dev);
+ int next_tick = DE4X5_AUTOSENSE_MS;
+ int dt;
+@@ -2368,7 +2369,7 @@ autoconf_media(struct net_device *dev)
+ lp->media = INIT;
+ lp->tcount = 0;
+
+- de4x5_ast(dev);
++ de4x5_ast((unsigned long)dev);
+
+ return lp->media;
+ }
+@@ -5373,7 +5374,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
for (i=0; i<ETH_ALEN; i++) {
tmp.addr[i] = dev->dev_addr[i];
}
@@ -52661,7 +59375,7 @@ index 8966f31..e15a101 100644
break;
case DE4X5_SET_HWADDR: /* Set the hardware address */
-@@ -5413,7 +5413,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+@@ -5413,7 +5414,7 @@ de4x5_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_lock_irqsave(&lp->lock, flags);
memcpy(&statbuf, &lp->pktStats, ioc->len);
spin_unlock_irqrestore(&lp->lock, flags);
@@ -52671,10 +59385,10 @@ index 8966f31..e15a101 100644
break;
}
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
-index 8a1d9ff..5cc81dd 100644
+index d1cf127..9d52393 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
-@@ -551,7 +551,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
+@@ -556,7 +556,7 @@ static void accumulate_16bit_val(u32 *acc, u16 val)
if (wrapped)
newacc += 65536;
@@ -52683,8 +59397,17 @@ index 8a1d9ff..5cc81dd 100644
}
static void populate_erx_stats(struct be_adapter *adapter,
+@@ -5395,7 +5395,7 @@ static void be_shutdown(struct pci_dev *pdev)
+ }
+
+ static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct be_adapter *adapter = pci_get_drvdata(pdev);
+
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
-index 6d0c5d5..55be363 100644
+index 84384e1..baac17d 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -30,6 +30,8 @@
@@ -52709,6 +59432,109 @@ index dce5f7b..2433466 100644
#include "ftmac100.h"
+diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
+index 0c4afe9..d888314 100644
+--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
++++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
+@@ -422,7 +422,7 @@ static void hip04_start_tx_timer(struct hip04_priv *priv)
+ ns, HRTIMER_MODE_REL);
+ }
+
+-static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct hip04_priv *priv = netdev_priv(ndev);
+ struct net_device_stats *stats = &ndev->stats;
+diff --git a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
+index e51892d..3e645f4 100644
+--- a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
++++ b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
+@@ -601,7 +601,7 @@ static irqreturn_t hix5hd2_interrupt(int irq, void *dev_id)
+ return IRQ_HANDLED;
+ }
+
+-static int hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct hix5hd2_priv *priv = netdev_priv(dev);
+ struct hix5hd2_desc *desc;
+diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
+index d4f92ed..38fdf5b 100644
+--- a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
++++ b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
+@@ -857,16 +857,18 @@ int hns_dsaf_ae_init(struct dsaf_device *dsaf_dev)
+ struct hnae_ae_dev *ae_dev = &dsaf_dev->ae_dev;
+ static atomic_t id = ATOMIC_INIT(-1);
+
++ pax_open_kernel();
+ switch (dsaf_dev->dsaf_ver) {
+ case AE_VERSION_1:
+- hns_dsaf_ops.toggle_ring_irq = hns_ae_toggle_ring_irq;
++ *(void **)&hns_dsaf_ops.toggle_ring_irq = hns_ae_toggle_ring_irq;
+ break;
+ case AE_VERSION_2:
+- hns_dsaf_ops.toggle_ring_irq = hns_aev2_toggle_ring_irq;
++ *(void **)&hns_dsaf_ops.toggle_ring_irq = hns_aev2_toggle_ring_irq;
+ break;
+ default:
+ break;
+ }
++ pax_close_kernel();
+
+ snprintf(ae_dev->name, AE_NAME_SIZE, "%s%d", DSAF_DEVICE_NAME,
+ (int)atomic_inc_return(&id));
+diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
+index 068789e..f4928f0 100644
+--- a/drivers/net/ethernet/intel/e100.c
++++ b/drivers/net/ethernet/intel/e100.c
+@@ -3106,7 +3106,7 @@ static void e100_shutdown(struct pci_dev *pdev)
+ * @pdev: Pointer to PCI device
+ * @state: The current pci connection state
+ */
+-static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct nic *nic = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
+index 3fc7bde..de784b9 100644
+--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
++++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
+@@ -5255,7 +5255,7 @@ static void e1000_netpoll(struct net_device *netdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct e1000_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
+index c71ba1b..3d364c1 100644
+--- a/drivers/net/ethernet/intel/e1000e/netdev.c
++++ b/drivers/net/ethernet/intel/e1000e/netdev.c
+@@ -6734,7 +6734,7 @@ static void e1000_netpoll(struct net_device *netdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct e1000_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+index 4eb7a6f..da3c328 100644
+--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
++++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+@@ -2249,7 +2249,7 @@ static int fm10k_suspend(struct pci_dev *pdev,
+ * this device has been detected.
+ */
+ static pci_ers_result_t fm10k_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct fm10k_intfc *interface = pci_get_drvdata(pdev);
+ struct net_device *netdev = interface->netdev;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index 565ca7c..dcdf764 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -52722,11 +59548,50 @@ index 565ca7c..dcdf764 100644
smp_mb(); /* Force the above update. */
}
+diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
+index 31e5f39..d3a8073 100644
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -7612,7 +7612,7 @@ static void igb_netpoll(struct net_device *netdev)
+ * this device has been detected.
+ **/
+ static pci_ers_result_t igb_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct igb_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
+index 297af80..ae51655 100644
+--- a/drivers/net/ethernet/intel/igbvf/netdev.c
++++ b/drivers/net/ethernet/intel/igbvf/netdev.c
+@@ -2507,7 +2507,7 @@ static void igbvf_netpoll(struct net_device *netdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t igbvf_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct igbvf_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+index c4003a8..e464fee 100644
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+@@ -9349,7 +9349,7 @@ static void ixgbe_remove(struct pci_dev *pdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
+ struct net_device *netdev = adapter->netdev;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
-index e5ba040..d47531c 100644
+index ef1504d..e1c3402 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
-@@ -782,7 +782,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
+@@ -1119,7 +1119,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
}
/* update the base incval used to calculate frequency adjustment */
@@ -52735,8 +59600,43 @@ index e5ba040..d47531c 100644
smp_mb();
/* need lock to prevent incorrect read while modifying cyclecounter */
+diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+index 3558f01..ff4a352 100644
+--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
++++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+@@ -3607,7 +3607,7 @@ static int ixgbevf_maybe_stop_tx(struct ixgbevf_ring *tx_ring, int size)
+ return __ixgbevf_maybe_stop_tx(tx_ring, size);
+ }
+
+-static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct ixgbevf_adapter *adapter = netdev_priv(netdev);
+ struct ixgbevf_tx_buffer *first;
+@@ -4144,7 +4144,7 @@ static void ixgbevf_remove(struct pci_dev *pdev)
+ * this device has been detected.
+ **/
+ static pci_ers_result_t ixgbevf_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct ixgbevf_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
+index 7ace07d..b9eab92 100644
+--- a/drivers/net/ethernet/marvell/pxa168_eth.c
++++ b/drivers/net/ethernet/marvell/pxa168_eth.c
+@@ -1270,7 +1270,7 @@ static int pxa168_rx_poll(struct napi_struct *napi, int budget)
+ return work_done;
+ }
+
+-static int pxa168_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t pxa168_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct pxa168_eth_private *pep = netdev_priv(dev);
+ struct net_device_stats *stats = &dev->stats;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
-index e7a5000..982753a 100644
+index 41440b2..0ccefa2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -61,7 +61,7 @@ static int mlx4_alloc_pages(struct mlx4_en_priv *priv,
@@ -52749,10 +59649,10 @@ index e7a5000..982753a 100644
if (likely(page))
break;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
-index 4421bf54..c07afb0 100644
+index e0946ab..308403f 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
-@@ -475,8 +475,8 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev,
+@@ -477,8 +477,8 @@ static bool mlx4_en_process_tx_cq(struct net_device *dev,
wmb();
/* we want to dirty this cache line once */
@@ -52763,29 +59663,37 @@ index 4421bf54..c07afb0 100644
netdev_tx_completed_queue(ring->tx_queue, packets, bytes);
-diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
-index 1203d89..7895359 100644
---- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
-+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
-@@ -2033,8 +2033,11 @@ static void mlx5e_build_netdev(struct net_device *netdev)
+diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
+index f8674ae..7ef8ac5 100644
+--- a/drivers/net/ethernet/mellanox/mlx4/main.c
++++ b/drivers/net/ethernet/mellanox/mlx4/main.c
+@@ -3951,7 +3951,7 @@ static const struct pci_device_id mlx4_pci_table[] = {
+ MODULE_DEVICE_TABLE(pci, mlx4_pci_table);
- SET_NETDEV_DEV(netdev, &mdev->pdev->dev);
+ static pci_ers_result_t mlx4_pci_err_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct mlx4_dev_persistent *persist = pci_get_drvdata(pdev);
-- if (priv->params.num_tc > 1)
-- mlx5e_netdev_ops.ndo_select_queue = mlx5e_select_queue;
-+ if (priv->params.num_tc > 1) {
-+ pax_open_kernel();
-+ *(void **)&mlx5e_netdev_ops.ndo_select_queue = mlx5e_select_queue;
-+ pax_close_kernel();
-+ }
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
+index 1545a94..418888c 100644
+--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
+@@ -1367,7 +1367,7 @@ static void remove_one(struct pci_dev *pdev)
+ }
- netdev->netdev_ops = &mlx5e_netdev_ops;
- netdev->watchdog_timeo = 15 * HZ;
+ static pci_ers_result_t mlx5_pci_err_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct mlx5_core_dev *dev = pci_get_drvdata(pdev);
+ struct mlx5_priv *priv = &dev->priv;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
-index 3be4a23..e89602b 100644
+index a94daa8..d1d3bd0 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
-@@ -1915,7 +1915,7 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *unused,
+@@ -2994,7 +2994,7 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *unused,
return NOTIFY_DONE;
}
@@ -52794,6 +59702,32 @@ index 3be4a23..e89602b 100644
.notifier_call = mlxsw_sp_netdevice_event,
};
+diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
+index 2fc5cd5..6c6108a 100644
+--- a/drivers/net/ethernet/micrel/ks8851_mll.c
++++ b/drivers/net/ethernet/micrel/ks8851_mll.c
+@@ -1020,7 +1020,7 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
+ * spin_lock_irqsave is required because tx and rx should be mutual exclusive.
+ * So while tx is in-progress, prevent IRQ interrupt from happenning.
+ */
+-static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
+ {
+ int retv = NETDEV_TX_OK;
+ struct ks_net *ks = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
+index 9ba9758..9c7c77f 100644
+--- a/drivers/net/ethernet/neterion/s2io.c
++++ b/drivers/net/ethernet/neterion/s2io.c
+@@ -8563,7 +8563,7 @@ static void lro_append_pkt(struct s2io_nic *sp, struct lro *lro,
+ * this device has been detected.
+ */
+ static pci_ers_result_t s2io_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct s2io_nic *sp = netdev_priv(netdev);
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
index 6223930..975033d 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -52819,6 +59753,32 @@ index 6223930..975033d 100644
fifo->mempool =
__vxge_hw_mempool_create(vpath->hldev,
fifo->config->memblock_size,
+diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
+index e0993eb..d8d7f50 100644
+--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
++++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
+@@ -4043,7 +4043,7 @@ static int vxge_pm_resume(struct pci_dev *pdev)
+ * this device has been detected.
+ */
+ static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct __vxge_hw_device *hldev = pci_get_drvdata(pdev);
+ struct net_device *netdev = hldev->ndev;
+diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+index 43c618b..bb6e368 100644
+--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
++++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+@@ -630,7 +630,7 @@ static void nfp_net_tx_csum(struct nfp_net *nn, struct nfp_net_r_vector *r_vec,
+ *
+ * Return: NETDEV_TX_OK on success.
+ */
+-static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct nfp_net *nn = netdev_priv(netdev);
+ const struct skb_frag_struct *frag;
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 75e88f4..1db3bf6 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
@@ -52834,6 +59794,41 @@ index 75e88f4..1db3bf6 100644
__le32 txvlan;
__le32 flaglen;
};
+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
+index 3b98b263b..13d2129 100644
+--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
++++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+@@ -2131,7 +2131,7 @@ static int pch_gbe_stop(struct net_device *netdev)
+ * - NETDEV_TX_OK: Normal end
+ * - NETDEV_TX_BUSY: Error end
+ */
+-static int pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t pch_gbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct pch_gbe_adapter *adapter = netdev_priv(netdev);
+ struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring;
+@@ -2447,7 +2447,7 @@ static const struct net_device_ops pch_gbe_netdev_ops = {
+ };
+
+ static pci_ers_result_t pch_gbe_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct pch_gbe_adapter *adapter = netdev_priv(netdev);
+diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+index 6409a06..e5bd4d6 100644
+--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
++++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+@@ -1756,7 +1756,7 @@ err_out:
+ }
+
+ static pci_ers_result_t netxen_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct netxen_adapter *adapter = pci_get_drvdata(pdev);
+
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
index bf89216..4044d8c 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
@@ -52880,6 +59875,19 @@ index 3490675..0b9e15a 100644
break;
default:
dev_err(&adapter->pdev->dev, "Invalid Virtual NIC opmode\n");
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+index 1205f6f..4b7c75b 100644
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+@@ -3970,7 +3970,7 @@ static void qlcnic_82xx_io_resume(struct pci_dev *pdev)
+ }
+
+ static pci_ers_result_t qlcnic_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct qlcnic_adapter *adapter = pci_get_drvdata(pdev);
+ struct qlcnic_hardware_ops *hw_ops = adapter->ahw->hw_ops;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
index cda9e60..4019992 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
@@ -52894,7 +59902,7 @@ index cda9e60..4019992 100644
u32 entry_offset, dump, no_entries, buf_offset = 0;
int i, k, ops_cnt, ops_index, dump_size = 0;
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
-index 79ef799..59bbd1f 100644
+index dd2cf37..e36c9bb 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -798,22 +798,22 @@ struct rtl8169_private {
@@ -52924,8 +59932,21 @@ index 79ef799..59bbd1f 100644
int (*set_speed)(struct net_device *, u8 aneg, u16 sp, u8 dpx, u32 adv);
int (*get_settings)(struct net_device *, struct ethtool_cmd *);
+diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
+index 01f6d5b..5584cdb 100644
+--- a/drivers/net/ethernet/renesas/sh_eth.c
++++ b/drivers/net/ethernet/renesas/sh_eth.c
+@@ -2322,7 +2322,7 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
+ }
+
+ /* Packet transmit function */
+-static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct sh_eth_private *mdp = netdev_priv(ndev);
+ struct sh_eth_txdesc *txdesc;
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
-index 2b34622..c406e81 100644
+index f39e719..d05dce9 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -5418,7 +5418,7 @@ out:
@@ -53029,6 +60050,19 @@ index 9d78830..74fc649 100644
if (tx_done != state->packet_count) {
/* Don't free the skbs; they will be picked up on TX
* overflow or channel teardown.
+diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
+index 8af2556..6da27b9 100644
+--- a/drivers/net/ethernet/smsc/smsc911x.c
++++ b/drivers/net/ethernet/smsc/smsc911x.c
+@@ -1673,7 +1673,7 @@ static int smsc911x_stop(struct net_device *dev)
+ }
+
+ /* Entry point for transmitting a packet */
+-static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct smsc911x_data *pdata = netdev_priv(dev);
+ unsigned int freespace;
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
index 3f20bb1..59add41 100644
--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
@@ -53044,6 +60078,19 @@ index 3f20bb1..59add41 100644
}
/* To mask all all interrupts.*/
+diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
+index af11ed1..21bca5f 100644
+--- a/drivers/net/ethernet/synopsys/dwc_eth_qos.c
++++ b/drivers/net/ethernet/synopsys/dwc_eth_qos.c
+@@ -2173,7 +2173,7 @@ static void dwceqos_tx_rollback(struct net_local *lp, struct dwceqos_tx *tx)
+ lp->gso_size = tx->prev_gso_size;
+ }
+
+-static int dwceqos_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t dwceqos_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct net_local *lp = netdev_priv(ndev);
+ struct dwceqos_tx trans;
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 2b7550c..f75bc6c 100644
--- a/drivers/net/ethernet/via/via-rhine.c
@@ -53057,11 +60104,37 @@ index 2b7550c..f75bc6c 100644
{
.ident = "EPIA-M",
.matches = {
+diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
+index 8b282d0..134ab2e 100644
+--- a/drivers/net/ethernet/wiznet/w5100.c
++++ b/drivers/net/ethernet/wiznet/w5100.c
+@@ -437,7 +437,7 @@ static void w5100_tx_timeout(struct net_device *ndev)
+ netif_wake_queue(ndev);
+ }
+
+-static int w5100_start_tx(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t w5100_start_tx(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct w5100_priv *priv = netdev_priv(ndev);
+ u16 offset;
+diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
+index 8da7b93..719204a 100644
+--- a/drivers/net/ethernet/wiznet/w5300.c
++++ b/drivers/net/ethernet/wiznet/w5300.c
+@@ -366,7 +366,7 @@ static void w5300_tx_timeout(struct net_device *ndev)
+ netif_wake_queue(ndev);
+ }
+
+-static int w5300_start_tx(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t w5300_start_tx(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct w5300_priv *priv = netdev_priv(ndev);
+
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
-index 58efdec..4184f70 100644
+index 0bf7edd..7fc5d06 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
-@@ -1321,7 +1321,7 @@ nla_put_failure:
+@@ -1443,7 +1443,7 @@ nla_put_failure:
return -EMSGSIZE;
}
@@ -53071,19 +60144,19 @@ index 58efdec..4184f70 100644
.maxtype = IFLA_GENEVE_MAX,
.policy = geneve_policy,
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
-index 5fa98f5..74440cc 100644
+index fcb92c0..a900f7d 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
-@@ -178,7 +178,7 @@ struct rndis_device {
+@@ -162,7 +162,7 @@ struct rndis_device {
+
enum rndis_device_state state;
bool link_state;
- bool link_change;
- atomic_t new_req_id;
+ atomic_unchecked_t new_req_id;
spinlock_t request_lock;
struct list_head req_list;
-@@ -628,6 +628,7 @@ struct nvsp_message {
+@@ -619,6 +619,7 @@ struct nvsp_message {
#define NETVSC_PACKET_SIZE 4096
#define VRSS_SEND_TAB_SIZE 16
@@ -53091,7 +60164,7 @@ index 5fa98f5..74440cc 100644
#define RNDIS_MAX_PKT_DEFAULT 8
#define RNDIS_PKT_ALIGN_DEFAULT 8
-@@ -692,13 +693,13 @@ struct netvsc_device {
+@@ -696,13 +697,13 @@ struct netvsc_device {
struct net_device *ndev;
@@ -53107,7 +60180,7 @@ index 5fa98f5..74440cc 100644
/* Holds rndis device info */
void *extension;
-@@ -710,7 +711,7 @@ struct netvsc_device {
+@@ -714,7 +715,7 @@ struct netvsc_device {
/* The sub channel callback buffer */
unsigned char *sub_cb_buf;
@@ -53117,10 +60190,19 @@ index 5fa98f5..74440cc 100644
u32 pkt_align; /* alignment bytes, e.g. 8 */
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
-index 409b48e..710a23f 100644
+index 98e34fe..19c8206 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
-@@ -875,6 +875,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
+@@ -348,7 +348,7 @@ not_ip:
+ return ret_val;
+ }
+
+-static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
++static netdev_tx_t netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
+ {
+ struct net_device_context *net_device_ctx = netdev_priv(net);
+ struct hv_netvsc_packet *packet = NULL;
+@@ -799,6 +799,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
struct netvsc_device *nvdev = hv_get_drvdata(hdev);
struct netvsc_device_info device_info;
int limit = ETH_DATA_LEN;
@@ -53128,7 +60210,7 @@ index 409b48e..710a23f 100644
int ret = 0;
if (nvdev == NULL || nvdev->destroy)
-@@ -890,6 +891,8 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
+@@ -814,6 +815,8 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
if (ret)
goto out;
@@ -53137,7 +60219,7 @@ index 409b48e..710a23f 100644
nvdev->start_remove = true;
rndis_filter_device_remove(hdev);
-@@ -900,7 +903,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
+@@ -824,7 +827,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
memset(&device_info, 0, sizeof(device_info));
device_info.ring_size = ring_size;
@@ -53147,7 +60229,7 @@ index 409b48e..710a23f 100644
rndis_filter_device_add(hdev, &device_info);
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
-index 5931a79..b0645bb 100644
+index a37bbda..625cb2a 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -101,7 +101,7 @@ static struct rndis_request *get_rndis_request(struct rndis_device *dev,
@@ -53159,7 +60241,7 @@ index 5931a79..b0645bb 100644
/* Add to the request list */
spin_lock_irqsave(&dev->request_lock, flags);
-@@ -924,7 +924,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
+@@ -922,7 +922,7 @@ static void rndis_filter_halt_device(struct rndis_device *dev)
/* Setup the rndis set */
halt = &request->request_msg.msg.halt_req;
@@ -53168,7 +60250,7 @@ index 5931a79..b0645bb 100644
/* Ignore return since this msg is optional. */
rndis_filter_send_request(dev, request);
-@@ -1115,9 +1115,9 @@ int rndis_filter_device_add(struct hv_device *dev,
+@@ -1113,9 +1113,9 @@ int rndis_filter_device_add(struct hv_device *dev,
if (ret || rsscap.num_recv_que < 2)
goto out;
@@ -53180,7 +60262,7 @@ index 5931a79..b0645bb 100644
/*
* We will limit the VRSS channels to the number CPUs in the NUMA node
-@@ -1138,8 +1138,7 @@ int rndis_filter_device_add(struct hv_device *dev,
+@@ -1136,8 +1136,7 @@ int rndis_filter_device_add(struct hv_device *dev,
if (net_device->num_chn == 1)
goto out;
@@ -53217,7 +60299,7 @@ index 8c48bb2..0a03401 100644
}
}
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
-index a9268db..19d067f 100644
+index f94392d..2132934 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -751,15 +751,15 @@ static int ipvlan_addr4_event(struct notifier_block *unused,
@@ -53239,6 +60321,19 @@ index a9268db..19d067f 100644
.notifier_call = ipvlan_addr6_event,
};
+diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c
+index c96b46b..09f0e8c 100644
+--- a/drivers/net/irda/sh_irda.c
++++ b/drivers/net/irda/sh_irda.c
+@@ -620,7 +620,7 @@ static int sh_irda_init_iobuf(struct sh_irda_self *self, int rxsize, int txsize)
+
+
+ ************************************************************************/
+-static int sh_irda_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t sh_irda_hard_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct sh_irda_self *self = netdev_priv(ndev);
+ struct device *dev = &self->ndev->dev;
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index a0849f4..147a4a6 100644
--- a/drivers/net/irda/vlsi_ir.c
@@ -53337,7 +60432,7 @@ index f9db2ce..6cd460c 100644
}
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
-index 06c8bfe..a081f70 100644
+index 94e6888..1d08b6a 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -335,7 +335,7 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,
@@ -53349,7 +60444,7 @@ index 06c8bfe..a081f70 100644
}
static void macvlan_flush_sources(struct macvlan_port *port,
-@@ -1483,13 +1483,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
+@@ -1484,13 +1484,15 @@ static const struct nla_policy macvlan_policy[IFLA_MACVLAN_MAX + 1] = {
int macvlan_link_register(struct rtnl_link_ops *ops)
{
/* common fields */
@@ -53372,7 +60467,7 @@ index 06c8bfe..a081f70 100644
return rtnl_link_register(ops);
};
-@@ -1575,7 +1577,7 @@ static int macvlan_device_event(struct notifier_block *unused,
+@@ -1577,7 +1579,7 @@ static int macvlan_device_event(struct notifier_block *unused,
return NOTIFY_DONE;
}
@@ -53382,7 +60477,7 @@ index 06c8bfe..a081f70 100644
};
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
-index 159a687..2f1fae5 100644
+index 95394ed..a08b026 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -485,7 +485,7 @@ static void macvtap_setup(struct net_device *dev)
@@ -53437,10 +60532,10 @@ index 7b7c70e..a92dc83 100644
.priv_size = sizeof(struct nlmon),
.setup = nlmon_setup,
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
-index 0bfbaba..c81a3588 100644
+index e551f3a..e5fdf87 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
-@@ -249,7 +249,7 @@ static int get_phy_c45_devs_in_pkg(struct mii_bus *bus, int addr, int dev_addr,
+@@ -411,7 +411,7 @@ static int get_phy_c45_devs_in_pkg(struct mii_bus *bus, int addr, int dev_addr,
* zero on success.
*
*/
@@ -53449,7 +60544,7 @@ index 0bfbaba..c81a3588 100644
struct phy_c45_device_ids *c45_ids) {
int phy_reg;
int i, reg_addr;
-@@ -320,7 +320,7 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id,
+@@ -482,7 +482,7 @@ static int get_phy_c45_ids(struct mii_bus *bus, int addr, u32 *phy_id,
* its return value is in turn returned.
*
*/
@@ -53458,7 +60553,7 @@ index 0bfbaba..c81a3588 100644
bool is_c45, struct phy_c45_device_ids *c45_ids)
{
int phy_reg;
-@@ -358,7 +358,7 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id,
+@@ -520,7 +520,7 @@ static int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id,
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
{
struct phy_c45_device_ids c45_ids = {0};
@@ -53467,11 +60562,24 @@ index 0bfbaba..c81a3588 100644
int r;
r = get_phy_id(bus, addr, &phy_id, is_c45, &c45_ids);
+diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c
+index 9c4b41a..03da80b 100644
+--- a/drivers/net/plip/plip.c
++++ b/drivers/net/plip/plip.c
+@@ -950,7 +950,7 @@ plip_interrupt(void *dev_id)
+ spin_unlock_irqrestore(&nl->lock, flags);
+ }
+
+-static int
++static netdev_tx_t
+ plip_tx_packet(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct net_local *nl = netdev_priv(dev);
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
-index 174e06e..51e015c 100644
+index aafe237..5a65f90 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
-@@ -1048,7 +1048,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -1056,7 +1056,6 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
void __user *addr = (void __user *) ifr->ifr_ifru.ifru_data;
struct ppp_stats stats;
struct ppp_comp_stats cstats;
@@ -53479,7 +60587,7 @@ index 174e06e..51e015c 100644
switch (cmd) {
case SIOCGPPPSTATS:
-@@ -1070,8 +1069,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -1078,8 +1077,7 @@ ppp_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
break;
case SIOCGPPPVER:
@@ -53490,7 +60598,7 @@ index 174e06e..51e015c 100644
err = 0;
break;
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
-index f7e8c79..d5531cd 100644
+index ae0905e..7a7d9b2 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -369,6 +369,7 @@ allow_packet:
@@ -53501,6 +60609,19 @@ index f7e8c79..d5531cd 100644
ppp_input(&po->chan, skb);
return NET_RX_SUCCESS;
+diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
+index e7034c5..cf4cf05 100644
+--- a/drivers/net/rionet.c
++++ b/drivers/net/rionet.c
+@@ -165,7 +165,7 @@ static int rionet_queue_tx_msg(struct sk_buff *skb, struct net_device *ndev,
+ return 0;
+ }
+
+-static int rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
++static netdev_tx_t rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ int i;
+ struct rionet_private *rnet = netdev_priv(ndev);
diff --git a/drivers/net/slip/slhc.c b/drivers/net/slip/slhc.c
index 27ed252..80cffde 100644
--- a/drivers/net/slip/slhc.c
@@ -53515,10 +60636,10 @@ index 27ed252..80cffde 100644
/* We've got a compressed packet; read the change byte */
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
-index 59fefca..b1422b1 100644
+index 718ceea..7571cce 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
-@@ -2107,7 +2107,7 @@ static unsigned int team_get_num_rx_queues(void)
+@@ -2135,7 +2135,7 @@ static unsigned int team_get_num_rx_queues(void)
return TEAM_DEFAULT_NUM_RX_QUEUES;
}
@@ -53527,7 +60648,7 @@ index 59fefca..b1422b1 100644
.kind = DRV_NAME,
.priv_size = sizeof(struct team),
.setup = team_setup,
-@@ -2897,7 +2897,7 @@ static int team_device_event(struct notifier_block *unused,
+@@ -2930,7 +2930,7 @@ static int team_device_event(struct notifier_block *unused,
return NOTIFY_DONE;
}
@@ -53537,10 +60658,10 @@ index 59fefca..b1422b1 100644
};
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
-index 2d186bd..519779a 100644
+index 81ecc2e..248806a 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
-@@ -1474,7 +1474,7 @@ static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
+@@ -1477,7 +1477,7 @@ static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
return -EINVAL;
}
@@ -53549,7 +60670,7 @@ index 2d186bd..519779a 100644
.kind = DRV_NAME,
.priv_size = sizeof(struct tun_struct),
.setup = tun_setup,
-@@ -1874,7 +1874,7 @@ unlock:
+@@ -1877,7 +1877,7 @@ unlock:
}
static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
@@ -53558,7 +60679,7 @@ index 2d186bd..519779a 100644
{
struct tun_file *tfile = file->private_data;
struct tun_struct *tun;
-@@ -1888,6 +1888,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
+@@ -1891,6 +1891,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
int le;
int ret;
@@ -53569,7 +60690,7 @@ index 2d186bd..519779a 100644
if (copy_from_user(&ifr, argp, ifreq_len))
return -EFAULT;
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
-index 111d907..1ee643e 100644
+index 111d907..1dbbd3f 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -70,7 +70,7 @@
@@ -53599,7 +60720,18 @@ index 111d907..1ee643e 100644
return;
if (serial->parent->port_spec & HSO_INFO_CRC_BUG)
-@@ -1282,8 +1282,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
+@@ -1237,8 +1237,9 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
+ * This needs to be a tasklet otherwise we will
+ * end up recursively calling this function.
+ */
+-static void hso_unthrottle_tasklet(struct hso_serial *serial)
++static void hso_unthrottle_tasklet(unsigned long _serial)
+ {
++ struct hso_serial *serial = (struct hso_serial *)_serial;
+ unsigned long flags;
+
+ spin_lock_irqsave(&serial->serial_lock, flags);
+@@ -1282,18 +1283,17 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
tty_port_tty_set(&serial->port, tty);
/* check for port already opened, if not set the termios */
@@ -53609,7 +60741,10 @@ index 111d907..1ee643e 100644
serial->rx_state = RX_IDLE;
/* Force default termio settings */
_hso_serial_set_termios(tty, NULL);
-@@ -1293,7 +1292,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
+ tasklet_init(&serial->unthrottle_tasklet,
+- (void (*)(unsigned long))hso_unthrottle_tasklet,
++ hso_unthrottle_tasklet,
+ (unsigned long)serial);
result = hso_start_serial_device(serial->parent, GFP_KERNEL);
if (result) {
hso_stop_serial_device(serial->parent);
@@ -53618,7 +60753,7 @@ index 111d907..1ee643e 100644
} else {
kref_get(&serial->parent->ref);
}
-@@ -1331,10 +1330,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
+@@ -1331,10 +1331,10 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp)
/* reset the rts and dtr */
/* do the actual close */
@@ -53632,7 +60767,7 @@ index 111d907..1ee643e 100644
tty_port_tty_set(&serial->port, NULL);
if (!usb_gone)
hso_stop_serial_device(serial->parent);
-@@ -1417,7 +1416,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
+@@ -1417,7 +1417,7 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)
/* the actual setup */
spin_lock_irqsave(&serial->serial_lock, flags);
@@ -53641,7 +60776,7 @@ index 111d907..1ee643e 100644
_hso_serial_set_termios(tty, old);
else
tty->termios = *old;
-@@ -1891,7 +1890,7 @@ static void intr_callback(struct urb *urb)
+@@ -1891,7 +1891,7 @@ static void intr_callback(struct urb *urb)
D1("Pending read interrupt on port %d\n", i);
spin_lock(&serial->serial_lock);
if (serial->rx_state == RX_IDLE &&
@@ -53650,7 +60785,7 @@ index 111d907..1ee643e 100644
/* Setup and send a ctrl req read on
* port i */
if (!serial->rx_urb_filled[0]) {
-@@ -3058,7 +3057,7 @@ static int hso_resume(struct usb_interface *iface)
+@@ -3058,7 +3058,7 @@ static int hso_resume(struct usb_interface *iface)
/* Start all serial ports */
for (i = 0; i < HSO_SERIAL_TTY_MINORS; i++) {
if (serial_table[i] && (serial_table[i]->interface == iface)) {
@@ -53659,11 +60794,24 @@ index 111d907..1ee643e 100644
result =
hso_start_serial_device(serial_table[i], GFP_NOIO);
hso_kick_transmit(dev2ser(serial_table[i]));
+diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
+index 76465b1..2d72355 100644
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -400,7 +400,7 @@ static int ipheth_close(struct net_device *net)
+ return 0;
+ }
+
+-static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
++static netdev_tx_t ipheth_tx(struct sk_buff *skb, struct net_device *net)
+ {
+ struct ipheth_device *dev = netdev_priv(net);
+ struct usb_device *udev = dev->udev;
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
-index 2fb637a..1e442a2 100644
+index d1f78c2..5596ab1 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
-@@ -615,7 +615,7 @@ struct r8152 {
+@@ -619,7 +619,7 @@ struct r8152 {
int (*eee_get)(struct r8152 *, struct ethtool_eee *);
int (*eee_set)(struct r8152 *, struct ethtool_eee *);
bool (*in_nway)(struct r8152 *);
@@ -53695,7 +60843,7 @@ index a2515887..6d13233 100644
/* we will have to manufacture ethernet headers, prepare template */
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
-index f94ab78..675a3a4 100644
+index 767ab11..d02d99c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -48,7 +48,7 @@ module_param(gso, bool, 0444);
@@ -53708,10 +60856,10 @@ index f94ab78..675a3a4 100644
#define VIRTNET_DRIVER_VERSION "1.0.0"
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
-index 903bda4..ee77e53 100644
+index bdcf617..c7fedcd 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
-@@ -942,7 +942,7 @@ static const struct nla_policy vrf_nl_policy[IFLA_VRF_MAX + 1] = {
+@@ -884,7 +884,7 @@ static const struct nla_policy vrf_nl_policy[IFLA_VRF_MAX + 1] = {
[IFLA_VRF_TABLE] = { .type = NLA_U32 },
};
@@ -53720,7 +60868,7 @@ index 903bda4..ee77e53 100644
.kind = DRV_NAME,
.priv_size = sizeof(struct net_vrf),
-@@ -976,7 +976,7 @@ out:
+@@ -918,7 +918,7 @@ out:
return NOTIFY_DONE;
}
@@ -53730,10 +60878,10 @@ index 903bda4..ee77e53 100644
};
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
-index 3c0df70..a884dac 100644
+index 1c32bd1..a6a9694 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
-@@ -3146,7 +3146,7 @@ static struct net *vxlan_get_link_net(const struct net_device *dev)
+@@ -3169,7 +3169,7 @@ static struct net *vxlan_get_link_net(const struct net_device *dev)
return vxlan->net;
}
@@ -53742,7 +60890,7 @@ index 3c0df70..a884dac 100644
.kind = "vxlan",
.maxtype = IFLA_VXLAN_MAX,
.policy = vxlan_policy,
-@@ -3194,7 +3194,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
+@@ -3217,7 +3217,7 @@ static int vxlan_lowerdev_event(struct notifier_block *unused,
return NOTIFY_DONE;
}
@@ -53751,19 +60899,6 @@ index 3c0df70..a884dac 100644
.notifier_call = vxlan_lowerdev_event,
};
-diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
-index 7a72407..6292259 100644
---- a/drivers/net/wan/dscc4.c
-+++ b/drivers/net/wan/dscc4.c
-@@ -1626,7 +1626,7 @@ try:
- if (state & Xpr) {
- void __iomem *scc_addr;
- unsigned long ring;
-- int i;
-+ unsigned int i;
-
- /*
- * - the busy condition happens (sometimes);
diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c
index 5920c99..ff2e4a5 100644
--- a/drivers/net/wan/lmc/lmc_media.c
@@ -53945,32 +61080,6 @@ index 0b60295..b8bfa5b 100644
GFP_KERNEL);
if (rd == NULL) {
result = -ENOMEM;
-diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
-index 17c40f0..9646fee 100644
---- a/drivers/net/wireless/airo.c
-+++ b/drivers/net/wireless/airo.c
-@@ -7857,7 +7857,7 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) {
- struct airo_info *ai = dev->ml_priv;
- int ridcode;
- int enabled;
-- static int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
-+ int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
- unsigned char *iobuf;
-
- /* Only super-user can write RIDs */
-diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
-index dab2513..4c4b65d 100644
---- a/drivers/net/wireless/at76c50x-usb.c
-+++ b/drivers/net/wireless/at76c50x-usb.c
-@@ -353,7 +353,7 @@ static int at76_dfu_get_state(struct usb_device *udev, u8 *state)
- }
-
- /* Convert timeout from the DFU status to jiffies */
--static inline unsigned long at76_get_timeout(struct dfu_status *s)
-+static inline unsigned long __intentional_overflow(-1) at76_get_timeout(struct dfu_status *s)
- {
- return msecs_to_jiffies((s->poll_timeout[2] << 16)
- | (s->poll_timeout[1] << 8)
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index edf3629..9f20ef9 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
@@ -54019,8 +61128,34 @@ index e70aa38..2fcc407 100644
/* service connection information */
struct ath10k_htc_svc_conn_req {
+diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
+index 5f3acfe..e0d6a6b 100644
+--- a/drivers/net/wireless/ath/ath6kl/core.h
++++ b/drivers/net/wireless/ath/ath6kl/core.h
+@@ -914,7 +914,7 @@ void ath6kl_tx_data_cleanup(struct ath6kl *ar);
+
+ struct ath6kl_cookie *ath6kl_alloc_cookie(struct ath6kl *ar);
+ void ath6kl_free_cookie(struct ath6kl *ar, struct ath6kl_cookie *cookie);
+-int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
++netdev_tx_t ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
+
+ struct aggr_info *aggr_init(struct ath6kl_vif *vif);
+ void aggr_conn_init(struct ath6kl_vif *vif, struct aggr_info *aggr_info,
+diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
+index 40432fe..57d85b3 100644
+--- a/drivers/net/wireless/ath/ath6kl/txrx.c
++++ b/drivers/net/wireless/ath/ath6kl/txrx.c
+@@ -353,7 +353,7 @@ fail_ctrl_tx:
+ return status;
+ }
+
+-int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
++netdev_tx_t ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct ath6kl *ar = ath6kl_priv(dev);
+ struct ath6kl_cookie *cookie = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
-index fee0cad..a7a3b63 100644
+index 40fa915..9e5e0c4 100644
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -3,7 +3,6 @@ config ATH9K_HW
@@ -54277,10 +61412,10 @@ index 831a544..d846785 100644
struct ath_nf_limits {
s16 max;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
-index d184e68..1ba76e5 100644
+index c1b33fd..9f904b1 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -2585,16 +2585,18 @@ void ath9k_fill_chanctx_ops(void)
+@@ -2589,16 +2589,18 @@ void ath9k_fill_chanctx_ops(void)
if (!ath9k_is_chanctx_enabled())
return;
@@ -54442,23 +61577,463 @@ index ae86a600..28696b2 100644
ar->tx_ampdu_schedule = false;
if (atomic_read(&ar->tx_ampdu_upload))
+diff --git a/drivers/net/wireless/ath/wil6210/pcie_bus.c b/drivers/net/wireless/ath/wil6210/pcie_bus.c
+index e36f2a0..462af92 100644
+--- a/drivers/net/wireless/ath/wil6210/pcie_bus.c
++++ b/drivers/net/wireless/ath/wil6210/pcie_bus.c
+@@ -152,7 +152,7 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ struct wil6210_priv *wil;
+ struct device *dev = &pdev->dev;
+ int rc;
+- const struct wil_platform_rops rops = {
++ static const struct wil_platform_rops rops = {
+ .ramdump = wil_platform_rop_ramdump,
+ .fw_recovery = wil_platform_rop_fw_recovery,
+ };
diff --git a/drivers/net/wireless/ath/wil6210/wil_platform.h b/drivers/net/wireless/ath/wil6210/wil_platform.h
-index d7fa19b..6d84263 100644
+index 9a949d9..1307d61 100644
--- a/drivers/net/wireless/ath/wil6210/wil_platform.h
+++ b/drivers/net/wireless/ath/wil6210/wil_platform.h
-@@ -27,7 +27,7 @@ struct wil_platform_ops {
- int (*suspend)(void *handle);
+@@ -29,7 +29,7 @@ struct wil_platform_ops {
int (*resume)(void *handle);
void (*uninit)(void *handle);
+ int (*notify_crash)(void *handle);
-};
+} __no_const;
- void *wil_platform_init(struct device *dev, struct wil_platform_ops *ops);
+ /**
+ * struct wil_platform_rops - wil platform module callbacks from
+diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
+index dab2513..4c4b65d 100644
+--- a/drivers/net/wireless/atmel/at76c50x-usb.c
++++ b/drivers/net/wireless/atmel/at76c50x-usb.c
+@@ -353,7 +353,7 @@ static int at76_dfu_get_state(struct usb_device *udev, u8 *state)
+ }
+
+ /* Convert timeout from the DFU status to jiffies */
+-static inline unsigned long at76_get_timeout(struct dfu_status *s)
++static inline unsigned long __intentional_overflow(-1) at76_get_timeout(struct dfu_status *s)
+ {
+ return msecs_to_jiffies((s->poll_timeout[2] << 16)
+ | (s->poll_timeout[1] << 8)
+diff --git a/drivers/net/wireless/atmel/atmel.c b/drivers/net/wireless/atmel/atmel.c
+index 6a1f03c..8a14da4 100644
+--- a/drivers/net/wireless/atmel/atmel.c
++++ b/drivers/net/wireless/atmel/atmel.c
+@@ -1663,9 +1663,10 @@ EXPORT_SYMBOL(stop_atmel_card);
+
+ static int atmel_set_essid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->essid;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ /* Check if we asked for `any' */
+@@ -1691,9 +1692,10 @@ static int atmel_set_essid(struct net_device *dev,
+
+ static int atmel_get_essid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->essid;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ /* Get the current SSID */
+@@ -1712,9 +1714,10 @@ static int atmel_get_essid(struct net_device *dev,
+
+ static int atmel_get_wap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *awrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct sockaddr *awrq = &wrqu->ap_addr;
+ struct atmel_private *priv = netdev_priv(dev);
+ memcpy(awrq->sa_data, priv->CurrentBSSID, ETH_ALEN);
+ awrq->sa_family = ARPHRD_ETHER;
+@@ -1724,9 +1727,10 @@ static int atmel_get_wap(struct net_device *dev,
+
+ static int atmel_set_encode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->encoding;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ /* Basic checking: do we have a key to set ?
+@@ -1813,9 +1817,10 @@ static int atmel_set_encode(struct net_device *dev,
+
+ static int atmel_get_encode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->encoding;
+ struct atmel_private *priv = netdev_priv(dev);
+ int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
+
+@@ -2023,18 +2028,20 @@ static int atmel_get_auth(struct net_device *dev,
+
+ static int atmel_get_name(struct net_device *dev,
+ struct iw_request_info *info,
+- char *cwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ char *cwrq = wrqu->name;
+ strcpy(cwrq, "IEEE 802.11-DS");
+ return 0;
+ }
+
+ static int atmel_set_rate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->bitrate;
+ struct atmel_private *priv = netdev_priv(dev);
-diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
+ if (vwrq->fixed == 0) {
+@@ -2073,9 +2080,10 @@ static int atmel_set_rate(struct net_device *dev,
+
+ static int atmel_set_mode(struct net_device *dev,
+ struct iw_request_info *info,
+- __u32 *uwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ __u32 *uwrq = &wrqu->mode;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ if (*uwrq != IW_MODE_ADHOC && *uwrq != IW_MODE_INFRA)
+@@ -2087,9 +2095,10 @@ static int atmel_set_mode(struct net_device *dev,
+
+ static int atmel_get_mode(struct net_device *dev,
+ struct iw_request_info *info,
+- __u32 *uwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ __u32 *uwrq = &wrqu->mode;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ *uwrq = priv->operating_mode;
+@@ -2098,9 +2107,10 @@ static int atmel_get_mode(struct net_device *dev,
+
+ static int atmel_get_rate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->bitrate;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ if (priv->auto_tx_rate) {
+@@ -2128,9 +2138,10 @@ static int atmel_get_rate(struct net_device *dev,
+
+ static int atmel_set_power(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->power;
+ struct atmel_private *priv = netdev_priv(dev);
+ priv->power_mode = vwrq->disabled ? 0 : 1;
+ return -EINPROGRESS;
+@@ -2138,9 +2149,10 @@ static int atmel_set_power(struct net_device *dev,
+
+ static int atmel_get_power(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->power;
+ struct atmel_private *priv = netdev_priv(dev);
+ vwrq->disabled = priv->power_mode ? 0 : 1;
+ vwrq->flags = IW_POWER_ON;
+@@ -2149,9 +2161,10 @@ static int atmel_get_power(struct net_device *dev,
+
+ static int atmel_set_retry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->retry;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) {
+@@ -2172,9 +2185,10 @@ static int atmel_set_retry(struct net_device *dev,
+
+ static int atmel_get_retry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->retry;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ vwrq->disabled = 0; /* Can't be disabled */
+@@ -2195,9 +2209,10 @@ static int atmel_get_retry(struct net_device *dev,
+
+ static int atmel_set_rts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->rts;
+ struct atmel_private *priv = netdev_priv(dev);
+ int rthr = vwrq->value;
+
+@@ -2213,9 +2228,10 @@ static int atmel_set_rts(struct net_device *dev,
+
+ static int atmel_get_rts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->rts;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ vwrq->value = priv->rts_threshold;
+@@ -2227,9 +2243,10 @@ static int atmel_get_rts(struct net_device *dev,
+
+ static int atmel_set_frag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->frag;
+ struct atmel_private *priv = netdev_priv(dev);
+ int fthr = vwrq->value;
+
+@@ -2246,9 +2263,10 @@ static int atmel_set_frag(struct net_device *dev,
+
+ static int atmel_get_frag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->frag;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ vwrq->value = priv->frag_threshold;
+@@ -2260,9 +2278,10 @@ static int atmel_get_frag(struct net_device *dev,
+
+ static int atmel_set_freq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *fwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_freq *fwrq = &wrqu->freq;
+ struct atmel_private *priv = netdev_priv(dev);
+ int rc = -EINPROGRESS; /* Call commit handler */
+
+@@ -2290,9 +2309,10 @@ static int atmel_set_freq(struct net_device *dev,
+
+ static int atmel_get_freq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *fwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_freq *fwrq = &wrqu->freq;
+ struct atmel_private *priv = netdev_priv(dev);
+
+ fwrq->m = priv->channel;
+@@ -2302,7 +2322,7 @@ static int atmel_get_freq(struct net_device *dev,
+
+ static int atmel_set_scan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *dwrq,
+ char *extra)
+ {
+ struct atmel_private *priv = netdev_priv(dev);
+@@ -2340,9 +2360,10 @@ static int atmel_set_scan(struct net_device *dev,
+
+ static int atmel_get_scan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct atmel_private *priv = netdev_priv(dev);
+ int i;
+ char *current_ev = extra;
+@@ -2411,9 +2432,10 @@ static int atmel_get_scan(struct net_device *dev,
+
+ static int atmel_get_range(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct atmel_private *priv = netdev_priv(dev);
+ struct iw_range *range = (struct iw_range *) extra;
+ int k, i, j;
+@@ -2485,9 +2507,10 @@ static int atmel_get_range(struct net_device *dev,
+
+ static int atmel_set_wap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *awrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct sockaddr *awrq = &wrqu->ap_addr;
+ struct atmel_private *priv = netdev_priv(dev);
+ int i;
+ static const u8 any[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+@@ -2527,7 +2550,7 @@ static int atmel_set_wap(struct net_device *dev,
+
+ static int atmel_config_commit(struct net_device *dev,
+ struct iw_request_info *info, /* NULL */
+- void *zwrq, /* NULL */
++ union iwreq_data *zwrq, /* NULL */
+ char *extra) /* NULL */
+ {
+ return atmel_open(dev);
+@@ -2535,61 +2558,61 @@ static int atmel_config_commit(struct net_device *dev,
+
+ static const iw_handler atmel_handler[] =
+ {
+- (iw_handler) atmel_config_commit, /* SIOCSIWCOMMIT */
+- (iw_handler) atmel_get_name, /* SIOCGIWNAME */
+- (iw_handler) NULL, /* SIOCSIWNWID */
+- (iw_handler) NULL, /* SIOCGIWNWID */
+- (iw_handler) atmel_set_freq, /* SIOCSIWFREQ */
+- (iw_handler) atmel_get_freq, /* SIOCGIWFREQ */
+- (iw_handler) atmel_set_mode, /* SIOCSIWMODE */
+- (iw_handler) atmel_get_mode, /* SIOCGIWMODE */
+- (iw_handler) NULL, /* SIOCSIWSENS */
+- (iw_handler) NULL, /* SIOCGIWSENS */
+- (iw_handler) NULL, /* SIOCSIWRANGE */
+- (iw_handler) atmel_get_range, /* SIOCGIWRANGE */
+- (iw_handler) NULL, /* SIOCSIWPRIV */
+- (iw_handler) NULL, /* SIOCGIWPRIV */
+- (iw_handler) NULL, /* SIOCSIWSTATS */
+- (iw_handler) NULL, /* SIOCGIWSTATS */
+- (iw_handler) NULL, /* SIOCSIWSPY */
+- (iw_handler) NULL, /* SIOCGIWSPY */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) atmel_set_wap, /* SIOCSIWAP */
+- (iw_handler) atmel_get_wap, /* SIOCGIWAP */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* SIOCGIWAPLIST */
+- (iw_handler) atmel_set_scan, /* SIOCSIWSCAN */
+- (iw_handler) atmel_get_scan, /* SIOCGIWSCAN */
+- (iw_handler) atmel_set_essid, /* SIOCSIWESSID */
+- (iw_handler) atmel_get_essid, /* SIOCGIWESSID */
+- (iw_handler) NULL, /* SIOCSIWNICKN */
+- (iw_handler) NULL, /* SIOCGIWNICKN */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) atmel_set_rate, /* SIOCSIWRATE */
+- (iw_handler) atmel_get_rate, /* SIOCGIWRATE */
+- (iw_handler) atmel_set_rts, /* SIOCSIWRTS */
+- (iw_handler) atmel_get_rts, /* SIOCGIWRTS */
+- (iw_handler) atmel_set_frag, /* SIOCSIWFRAG */
+- (iw_handler) atmel_get_frag, /* SIOCGIWFRAG */
+- (iw_handler) NULL, /* SIOCSIWTXPOW */
+- (iw_handler) NULL, /* SIOCGIWTXPOW */
+- (iw_handler) atmel_set_retry, /* SIOCSIWRETRY */
+- (iw_handler) atmel_get_retry, /* SIOCGIWRETRY */
+- (iw_handler) atmel_set_encode, /* SIOCSIWENCODE */
+- (iw_handler) atmel_get_encode, /* SIOCGIWENCODE */
+- (iw_handler) atmel_set_power, /* SIOCSIWPOWER */
+- (iw_handler) atmel_get_power, /* SIOCGIWPOWER */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* SIOCSIWGENIE */
+- (iw_handler) NULL, /* SIOCGIWGENIE */
+- (iw_handler) atmel_set_auth, /* SIOCSIWAUTH */
+- (iw_handler) atmel_get_auth, /* SIOCGIWAUTH */
+- (iw_handler) atmel_set_encodeext, /* SIOCSIWENCODEEXT */
+- (iw_handler) atmel_get_encodeext, /* SIOCGIWENCODEEXT */
+- (iw_handler) NULL, /* SIOCSIWPMKSA */
++ atmel_config_commit, /* SIOCSIWCOMMIT */
++ atmel_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ atmel_set_freq, /* SIOCSIWFREQ */
++ atmel_get_freq, /* SIOCGIWFREQ */
++ atmel_set_mode, /* SIOCSIWMODE */
++ atmel_get_mode, /* SIOCGIWMODE */
++ NULL, /* SIOCSIWSENS */
++ NULL, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ atmel_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
++ NULL, /* SIOCSIWSPY */
++ NULL, /* SIOCGIWSPY */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ atmel_set_wap, /* SIOCSIWAP */
++ atmel_get_wap, /* SIOCGIWAP */
++ NULL, /* -- hole -- */
++ NULL, /* SIOCGIWAPLIST */
++ atmel_set_scan, /* SIOCSIWSCAN */
++ atmel_get_scan, /* SIOCGIWSCAN */
++ atmel_set_essid, /* SIOCSIWESSID */
++ atmel_get_essid, /* SIOCGIWESSID */
++ NULL, /* SIOCSIWNICKN */
++ NULL, /* SIOCGIWNICKN */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ atmel_set_rate, /* SIOCSIWRATE */
++ atmel_get_rate, /* SIOCGIWRATE */
++ atmel_set_rts, /* SIOCSIWRTS */
++ atmel_get_rts, /* SIOCGIWRTS */
++ atmel_set_frag, /* SIOCSIWFRAG */
++ atmel_get_frag, /* SIOCGIWFRAG */
++ NULL, /* SIOCSIWTXPOW */
++ NULL, /* SIOCGIWTXPOW */
++ atmel_set_retry, /* SIOCSIWRETRY */
++ atmel_get_retry, /* SIOCGIWRETRY */
++ atmel_set_encode, /* SIOCSIWENCODE */
++ atmel_get_encode, /* SIOCGIWENCODE */
++ atmel_set_power, /* SIOCSIWPOWER */
++ atmel_get_power, /* SIOCGIWPOWER */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ NULL, /* SIOCSIWGENIE */
++ NULL, /* SIOCGIWGENIE */
++ atmel_set_auth, /* SIOCSIWAUTH */
++ atmel_get_auth, /* SIOCGIWAUTH */
++ atmel_set_encodeext, /* SIOCSIWENCODEEXT */
++ atmel_get_encodeext, /* SIOCGIWENCODEEXT */
++ NULL, /* SIOCSIWPMKSA */
+ };
+
+ static const iw_handler atmel_private_handler[] =
+diff --git a/drivers/net/wireless/broadcom/b43/phy_lp.c b/drivers/net/wireless/broadcom/b43/phy_lp.c
index 058a9f2..d5cb1ba 100644
---- a/drivers/net/wireless/b43/phy_lp.c
-+++ b/drivers/net/wireless/b43/phy_lp.c
+--- a/drivers/net/wireless/broadcom/b43/phy_lp.c
++++ b/drivers/net/wireless/broadcom/b43/phy_lp.c
@@ -2502,7 +2502,7 @@ static int lpphy_b2063_tune(struct b43_wldev *dev,
{
struct ssb_bus *bus = dev->dev->sdev->bus;
@@ -54468,11 +62043,684 @@ index 058a9f2..d5cb1ba 100644
u32 crystal_freq = bus->chipco.pmu.crystalfreq * 1000;
u32 freqref, vco_freq, val1, val2, val3, timeout, timeoutref, count;
u16 old_comm15, scale;
-diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
-index af1b3e6..d5d82713 100644
---- a/drivers/net/wireless/iwlegacy/3945-mac.c
-+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
-@@ -3633,7 +3633,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
+index afc1fb3..79698d1 100644
+--- a/drivers/net/wireless/broadcom/b43legacy/main.c
++++ b/drivers/net/wireless/broadcom/b43legacy/main.c
+@@ -1304,8 +1304,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev)
+ }
+
+ /* Interrupt handler bottom-half */
+-static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev)
++static void b43legacy_interrupt_tasklet(unsigned long _dev)
+ {
++ struct b43legacy_wldev *dev = (struct b43legacy_wldev *)_dev;
+ u32 reason;
+ u32 dma_reason[ARRAY_SIZE(dev->dma_reason)];
+ u32 merged_dma_reason = 0;
+@@ -3775,7 +3776,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev,
+ b43legacy_set_status(wldev, B43legacy_STAT_UNINIT);
+ wldev->bad_frames_preempt = modparam_bad_frames_preempt;
+ tasklet_init(&wldev->isr_tasklet,
+- (void (*)(unsigned long))b43legacy_interrupt_tasklet,
++ b43legacy_interrupt_tasklet,
+ (unsigned long)wldev);
+ if (modparam_pio)
+ wldev->__using_pio = true;
+diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
+index 1c4e9dd..a6388e7 100644
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
+@@ -394,8 +394,9 @@ struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp)
+ return sh;
+ }
+
+-static void wlc_phy_timercb_phycal(struct brcms_phy *pi)
++static void wlc_phy_timercb_phycal(void *_pi)
+ {
++ struct brcms_phy *pi = _pi;
+ uint delay = 5;
+
+ if (PHY_PERICAL_MPHASE_PENDING(pi)) {
+diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c
+index a0de5db..b723817 100644
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.c
+@@ -57,12 +57,11 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim)
+ }
+
+ struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
+- void (*fn)(struct brcms_phy *pi),
++ void (*fn)(void *pi),
+ void *arg, const char *name)
+ {
+ return (struct wlapi_timer *)
+- brcms_init_timer(physhim->wl, (void (*)(void *))fn,
+- arg, name);
++ brcms_init_timer(physhim->wl, fn, arg, name);
+ }
+
+ void wlapi_free_timer(struct wlapi_timer *t)
+diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h
+index dd87747..27d0934 100644
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy_shim.h
+@@ -131,7 +131,7 @@ void wlc_phy_shim_detach(struct phy_shim_info *physhim);
+
+ /* PHY to WL utility functions */
+ struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
+- void (*fn)(struct brcms_phy *pi),
++ void (*fn)(void *pi),
+ void *arg, const char *name);
+ void wlapi_free_timer(struct wlapi_timer *t);
+ void wlapi_add_timer(struct wlapi_timer *t, uint ms, int periodic);
+diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c
+index d2353f6..03379d9 100644
+--- a/drivers/net/wireless/cisco/airo.c
++++ b/drivers/net/wireless/cisco/airo.c
+@@ -4779,7 +4779,7 @@ static int get_dec_u16( char *buffer, int *start, int limit ) {
+ }
+
+ static int airo_config_commit(struct net_device *dev,
+- struct iw_request_info *info, void *zwrq,
++ struct iw_request_info *info, union iwreq_data *zwrq,
+ char *extra);
+
+ static inline int sniffing_mode(struct airo_info *ai)
+@@ -5766,9 +5766,11 @@ static int airo_get_quality (StatusRid *status_rid, CapabilityRid *cap_rid)
+ */
+ static int airo_get_name(struct net_device *dev,
+ struct iw_request_info *info,
+- char *cwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ char *cwrq = wrqu->name;
++
+ strcpy(cwrq, "IEEE 802.11-DS");
+ return 0;
+ }
+@@ -5779,9 +5781,10 @@ static int airo_get_name(struct net_device *dev,
+ */
+ static int airo_set_freq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *fwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_freq *fwrq = &wrqu->freq;
+ struct airo_info *local = dev->ml_priv;
+ int rc = -EINPROGRESS; /* Call commit handler */
+
+@@ -5820,9 +5823,10 @@ static int airo_set_freq(struct net_device *dev,
+ */
+ static int airo_get_freq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *fwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_freq *fwrq = &wrqu->freq;
+ struct airo_info *local = dev->ml_priv;
+ StatusRid status_rid; /* Card status info */
+ int ch;
+@@ -5852,9 +5856,10 @@ static int airo_get_freq(struct net_device *dev,
+ */
+ static int airo_set_essid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->essid;
+ struct airo_info *local = dev->ml_priv;
+ SsidRid SSID_rid; /* SSIDs */
+
+@@ -5897,9 +5902,10 @@ static int airo_set_essid(struct net_device *dev,
+ */
+ static int airo_get_essid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->essid;
+ struct airo_info *local = dev->ml_priv;
+ StatusRid status_rid; /* Card status info */
+
+@@ -5925,9 +5931,10 @@ static int airo_get_essid(struct net_device *dev,
+ */
+ static int airo_set_wap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *awrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct sockaddr *awrq = &wrqu->ap_addr;
+ struct airo_info *local = dev->ml_priv;
+ Cmd cmd;
+ Resp rsp;
+@@ -5960,9 +5967,10 @@ static int airo_set_wap(struct net_device *dev,
+ */
+ static int airo_get_wap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *awrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct sockaddr *awrq = &wrqu->ap_addr;
+ struct airo_info *local = dev->ml_priv;
+ StatusRid status_rid; /* Card status info */
+
+@@ -5981,9 +5989,10 @@ static int airo_get_wap(struct net_device *dev,
+ */
+ static int airo_set_nick(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct airo_info *local = dev->ml_priv;
+
+ /* Check the size of the string */
+@@ -6004,9 +6013,10 @@ static int airo_set_nick(struct net_device *dev,
+ */
+ static int airo_get_nick(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -6023,9 +6033,10 @@ static int airo_get_nick(struct net_device *dev,
+ */
+ static int airo_set_rate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->bitrate;
+ struct airo_info *local = dev->ml_priv;
+ CapabilityRid cap_rid; /* Card capability info */
+ u8 brate = 0;
+@@ -6093,9 +6104,10 @@ static int airo_set_rate(struct net_device *dev,
+ */
+ static int airo_get_rate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->bitrate;
+ struct airo_info *local = dev->ml_priv;
+ StatusRid status_rid; /* Card status info */
+
+@@ -6115,9 +6127,10 @@ static int airo_get_rate(struct net_device *dev,
+ */
+ static int airo_set_rts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->rts;
+ struct airo_info *local = dev->ml_priv;
+ int rthr = vwrq->value;
+
+@@ -6139,9 +6152,10 @@ static int airo_set_rts(struct net_device *dev,
+ */
+ static int airo_get_rts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->rts;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -6158,9 +6172,10 @@ static int airo_get_rts(struct net_device *dev,
+ */
+ static int airo_set_frag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->frag;
+ struct airo_info *local = dev->ml_priv;
+ int fthr = vwrq->value;
+
+@@ -6183,9 +6198,10 @@ static int airo_set_frag(struct net_device *dev,
+ */
+ static int airo_get_frag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->frag;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -6202,9 +6218,10 @@ static int airo_get_frag(struct net_device *dev,
+ */
+ static int airo_set_mode(struct net_device *dev,
+ struct iw_request_info *info,
+- __u32 *uwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ __u32 *uwrq = &wrqu->mode;
+ struct airo_info *local = dev->ml_priv;
+ int reset = 0;
+
+@@ -6265,9 +6282,10 @@ static int airo_set_mode(struct net_device *dev,
+ */
+ static int airo_get_mode(struct net_device *dev,
+ struct iw_request_info *info,
+- __u32 *uwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ __u32 *uwrq = &wrqu->mode;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -6300,9 +6318,10 @@ static inline int valid_index(struct airo_info *ai, int index)
+ */
+ static int airo_set_encode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->encoding;
+ struct airo_info *local = dev->ml_priv;
+ int perm = (dwrq->flags & IW_ENCODE_TEMP ? 0 : 1);
+ __le16 currentAuthType = local->config.authType;
+@@ -6399,9 +6418,10 @@ static int airo_set_encode(struct net_device *dev,
+ */
+ static int airo_get_encode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->encoding;
+ struct airo_info *local = dev->ml_priv;
+ int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
+ int wep_key_len;
+@@ -6746,9 +6766,10 @@ static int airo_get_auth(struct net_device *dev,
+ */
+ static int airo_set_txpow(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->txpower;
+ struct airo_info *local = dev->ml_priv;
+ CapabilityRid cap_rid; /* Card capability info */
+ int i;
+@@ -6783,9 +6804,10 @@ static int airo_set_txpow(struct net_device *dev,
+ */
+ static int airo_get_txpow(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->txpower;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -6803,9 +6825,10 @@ static int airo_get_txpow(struct net_device *dev,
+ */
+ static int airo_set_retry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->retry;
+ struct airo_info *local = dev->ml_priv;
+ int rc = -EINVAL;
+
+@@ -6841,9 +6864,10 @@ static int airo_set_retry(struct net_device *dev,
+ */
+ static int airo_get_retry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->retry;
+ struct airo_info *local = dev->ml_priv;
+
+ vwrq->disabled = 0; /* Can't be disabled */
+@@ -6872,9 +6896,10 @@ static int airo_get_retry(struct net_device *dev,
+ */
+ static int airo_get_range(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct airo_info *local = dev->ml_priv;
+ struct iw_range *range = (struct iw_range *) extra;
+ CapabilityRid cap_rid; /* Card capability info */
+@@ -6998,9 +7023,10 @@ static int airo_get_range(struct net_device *dev,
+ */
+ static int airo_set_power(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->power;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -7055,9 +7081,10 @@ static int airo_set_power(struct net_device *dev,
+ */
+ static int airo_get_power(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->power;
+ struct airo_info *local = dev->ml_priv;
+ __le16 mode;
+
+@@ -7086,9 +7113,10 @@ static int airo_get_power(struct net_device *dev,
+ */
+ static int airo_set_sens(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->sens;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -7105,9 +7133,10 @@ static int airo_set_sens(struct net_device *dev,
+ */
+ static int airo_get_sens(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->sens;
+ struct airo_info *local = dev->ml_priv;
+
+ readConfigRid(local, 1);
+@@ -7125,9 +7154,10 @@ static int airo_get_sens(struct net_device *dev,
+ */
+ static int airo_get_aplist(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct airo_info *local = dev->ml_priv;
+ struct sockaddr *address = (struct sockaddr *) extra;
+ struct iw_quality *qual;
+@@ -7203,7 +7233,7 @@ static int airo_get_aplist(struct net_device *dev,
+ */
+ static int airo_set_scan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *dwrq,
+ char *extra)
+ {
+ struct airo_info *ai = dev->ml_priv;
+@@ -7434,9 +7464,10 @@ static inline char *airo_translate_scan(struct net_device *dev,
+ */
+ static int airo_get_scan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *dwrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct airo_info *ai = dev->ml_priv;
+ BSSListElement *net;
+ int err = 0;
+@@ -7478,7 +7509,7 @@ out:
+ */
+ static int airo_config_commit(struct net_device *dev,
+ struct iw_request_info *info, /* NULL */
+- void *zwrq, /* NULL */
++ union iwreq_data *zwrq, /* NULL */
+ char *extra) /* NULL */
+ {
+ struct airo_info *local = dev->ml_priv;
+@@ -7528,61 +7559,61 @@ static const struct iw_priv_args airo_private_args[] = {
+
+ static const iw_handler airo_handler[] =
+ {
+- (iw_handler) airo_config_commit, /* SIOCSIWCOMMIT */
+- (iw_handler) airo_get_name, /* SIOCGIWNAME */
+- (iw_handler) NULL, /* SIOCSIWNWID */
+- (iw_handler) NULL, /* SIOCGIWNWID */
+- (iw_handler) airo_set_freq, /* SIOCSIWFREQ */
+- (iw_handler) airo_get_freq, /* SIOCGIWFREQ */
+- (iw_handler) airo_set_mode, /* SIOCSIWMODE */
+- (iw_handler) airo_get_mode, /* SIOCGIWMODE */
+- (iw_handler) airo_set_sens, /* SIOCSIWSENS */
+- (iw_handler) airo_get_sens, /* SIOCGIWSENS */
+- (iw_handler) NULL, /* SIOCSIWRANGE */
+- (iw_handler) airo_get_range, /* SIOCGIWRANGE */
+- (iw_handler) NULL, /* SIOCSIWPRIV */
+- (iw_handler) NULL, /* SIOCGIWPRIV */
+- (iw_handler) NULL, /* SIOCSIWSTATS */
+- (iw_handler) NULL, /* SIOCGIWSTATS */
++ airo_config_commit, /* SIOCSIWCOMMIT */
++ airo_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ airo_set_freq, /* SIOCSIWFREQ */
++ airo_get_freq, /* SIOCGIWFREQ */
++ airo_set_mode, /* SIOCSIWMODE */
++ airo_get_mode, /* SIOCGIWMODE */
++ airo_set_sens, /* SIOCSIWSENS */
++ airo_get_sens, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ airo_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
+ iw_handler_set_spy, /* SIOCSIWSPY */
+ iw_handler_get_spy, /* SIOCGIWSPY */
+ iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
+ iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
+- (iw_handler) airo_set_wap, /* SIOCSIWAP */
+- (iw_handler) airo_get_wap, /* SIOCGIWAP */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) airo_get_aplist, /* SIOCGIWAPLIST */
+- (iw_handler) airo_set_scan, /* SIOCSIWSCAN */
+- (iw_handler) airo_get_scan, /* SIOCGIWSCAN */
+- (iw_handler) airo_set_essid, /* SIOCSIWESSID */
+- (iw_handler) airo_get_essid, /* SIOCGIWESSID */
+- (iw_handler) airo_set_nick, /* SIOCSIWNICKN */
+- (iw_handler) airo_get_nick, /* SIOCGIWNICKN */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) airo_set_rate, /* SIOCSIWRATE */
+- (iw_handler) airo_get_rate, /* SIOCGIWRATE */
+- (iw_handler) airo_set_rts, /* SIOCSIWRTS */
+- (iw_handler) airo_get_rts, /* SIOCGIWRTS */
+- (iw_handler) airo_set_frag, /* SIOCSIWFRAG */
+- (iw_handler) airo_get_frag, /* SIOCGIWFRAG */
+- (iw_handler) airo_set_txpow, /* SIOCSIWTXPOW */
+- (iw_handler) airo_get_txpow, /* SIOCGIWTXPOW */
+- (iw_handler) airo_set_retry, /* SIOCSIWRETRY */
+- (iw_handler) airo_get_retry, /* SIOCGIWRETRY */
+- (iw_handler) airo_set_encode, /* SIOCSIWENCODE */
+- (iw_handler) airo_get_encode, /* SIOCGIWENCODE */
+- (iw_handler) airo_set_power, /* SIOCSIWPOWER */
+- (iw_handler) airo_get_power, /* SIOCGIWPOWER */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* SIOCSIWGENIE */
+- (iw_handler) NULL, /* SIOCGIWGENIE */
+- (iw_handler) airo_set_auth, /* SIOCSIWAUTH */
+- (iw_handler) airo_get_auth, /* SIOCGIWAUTH */
+- (iw_handler) airo_set_encodeext, /* SIOCSIWENCODEEXT */
+- (iw_handler) airo_get_encodeext, /* SIOCGIWENCODEEXT */
+- (iw_handler) NULL, /* SIOCSIWPMKSA */
++ airo_set_wap, /* SIOCSIWAP */
++ airo_get_wap, /* SIOCGIWAP */
++ NULL, /* -- hole -- */
++ airo_get_aplist, /* SIOCGIWAPLIST */
++ airo_set_scan, /* SIOCSIWSCAN */
++ airo_get_scan, /* SIOCGIWSCAN */
++ airo_set_essid, /* SIOCSIWESSID */
++ airo_get_essid, /* SIOCGIWESSID */
++ airo_set_nick, /* SIOCSIWNICKN */
++ airo_get_nick, /* SIOCGIWNICKN */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ airo_set_rate, /* SIOCSIWRATE */
++ airo_get_rate, /* SIOCGIWRATE */
++ airo_set_rts, /* SIOCSIWRTS */
++ airo_get_rts, /* SIOCGIWRTS */
++ airo_set_frag, /* SIOCSIWFRAG */
++ airo_get_frag, /* SIOCGIWFRAG */
++ airo_set_txpow, /* SIOCSIWTXPOW */
++ airo_get_txpow, /* SIOCGIWTXPOW */
++ airo_set_retry, /* SIOCSIWRETRY */
++ airo_get_retry, /* SIOCGIWRETRY */
++ airo_set_encode, /* SIOCSIWENCODE */
++ airo_get_encode, /* SIOCGIWENCODE */
++ airo_set_power, /* SIOCSIWPOWER */
++ airo_get_power, /* SIOCGIWPOWER */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ NULL, /* SIOCSIWGENIE */
++ NULL, /* SIOCGIWGENIE */
++ airo_set_auth, /* SIOCSIWAUTH */
++ airo_get_auth, /* SIOCGIWAUTH */
++ airo_set_encodeext, /* SIOCSIWENCODEEXT */
++ airo_get_encodeext, /* SIOCGIWENCODEEXT */
++ NULL, /* SIOCSIWPMKSA */
+ };
+
+ /* Note : don't describe AIROIDIFC and AIROOLDIDIFC in here.
+@@ -7845,7 +7876,7 @@ static int writerids(struct net_device *dev, aironet_ioctl *comp) {
+ struct airo_info *ai = dev->ml_priv;
+ int ridcode;
+ int enabled;
+- static int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
++ int (* writer)(struct airo_info *, u16 rid, const void *, int, int);
+ unsigned char *iobuf;
+
+ /* Only super-user can write RIDs */
+diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+index f93a7f7..eb25e2b 100644
+--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
++++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+@@ -3220,8 +3220,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv)
+ }
+ }
+
+-static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
++static void ipw2100_irq_tasklet(unsigned long _priv)
+ {
++ struct ipw2100_priv *priv = (struct ipw2100_priv *)_priv;
+ struct net_device *dev = priv->net_dev;
+ unsigned long flags;
+ u32 inta, tmp;
+@@ -6029,7 +6030,7 @@ static void ipw2100_rf_kill(struct work_struct *work)
+ spin_unlock_irqrestore(&priv->low_lock, flags);
+ }
+
+-static void ipw2100_irq_tasklet(struct ipw2100_priv *priv);
++static void ipw2100_irq_tasklet(unsigned long _priv);
+
+ static const struct net_device_ops ipw2100_netdev_ops = {
+ .ndo_open = ipw2100_open,
+@@ -6158,8 +6159,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
+ INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
+ INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event);
+
+- tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
+- ipw2100_irq_tasklet, (unsigned long)priv);
++ tasklet_init(&priv->irq_tasklet, ipw2100_irq_tasklet, (unsigned long)priv);
+
+ /* NOTE: We do not start the deferred work for status checks yet */
+ priv->stop_rf_kill = 1;
+diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+index ed0adaf..4bb4f53 100644
+--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
++++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+@@ -1968,8 +1968,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv)
+ wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL);
+ }
+
+-static void ipw_irq_tasklet(struct ipw_priv *priv)
++static void ipw_irq_tasklet(unsigned long _priv)
+ {
++ struct ipw_priv *priv = (struct ipw_priv *)_priv;
+ u32 inta, inta_mask, handled = 0;
+ unsigned long flags;
+ int rc = 0;
+@@ -10705,8 +10706,7 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv)
+ INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate);
+ #endif /* CONFIG_IPW2200_QOS */
+
+- tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
+- ipw_irq_tasklet, (unsigned long)priv);
++ tasklet_init(&priv->irq_tasklet, ipw_irq_tasklet, (unsigned long)priv);
+
+ return ret;
+ }
+diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+index af1b3e6..9bc08d3 100644
+--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
++++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+@@ -1399,8 +1399,9 @@ il3945_dump_nic_error_log(struct il_priv *il)
+ }
+
+ static void
+-il3945_irq_tasklet(struct il_priv *il)
++il3945_irq_tasklet(unsigned long _il)
+ {
++ struct il_priv *il = (struct il_priv *)_il;
+ u32 inta, handled = 0;
+ u32 inta_fh;
+ unsigned long flags;
+@@ -3432,7 +3433,7 @@ il3945_setup_deferred_work(struct il_priv *il)
+ setup_timer(&il->watchdog, il_bg_watchdog, (unsigned long)il);
+
+ tasklet_init(&il->irq_tasklet,
+- (void (*)(unsigned long))il3945_irq_tasklet,
++ il3945_irq_tasklet,
+ (unsigned long)il);
+ }
+
+@@ -3469,7 +3470,7 @@ static struct attribute_group il3945_attribute_group = {
+ .attrs = il3945_sysfs_entries,
+ };
+
+-static struct ieee80211_ops il3945_mac_ops __read_mostly = {
++static struct ieee80211_ops il3945_mac_ops = {
+ .tx = il3945_mac_tx,
+ .start = il3945_mac_start,
+ .stop = il3945_mac_stop,
+@@ -3633,7 +3634,9 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
if (il3945_mod_params.disable_hw_scan) {
D_INFO("Disabling hw_scan\n");
@@ -54483,11 +62731,37 @@ index af1b3e6..d5d82713 100644
}
D_INFO("*** LOAD DRIVER ***\n");
-diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
-index b15e44f..8658af2 100644
---- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c
-+++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c
-@@ -188,7 +188,7 @@ static ssize_t iwl_dbgfs_sram_write(struct file *file,
+diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+index fd38aa0..4db38f7 100644
+--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
++++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+@@ -4361,8 +4361,9 @@ il4965_synchronize_irq(struct il_priv *il)
+ }
+
+ static void
+-il4965_irq_tasklet(struct il_priv *il)
++il4965_irq_tasklet(unsigned long _il)
+ {
++ struct il_priv *il = (struct il_priv *)_il;
+ u32 inta, handled = 0;
+ u32 inta_fh;
+ unsigned long flags;
+@@ -6254,9 +6255,7 @@ il4965_setup_deferred_work(struct il_priv *il)
+
+ setup_timer(&il->watchdog, il_bg_watchdog, (unsigned long)il);
+
+- tasklet_init(&il->irq_tasklet,
+- (void (*)(unsigned long))il4965_irq_tasklet,
+- (unsigned long)il);
++ tasklet_init(&il->irq_tasklet, il4965_irq_tasklet, (unsigned long)il);
+ }
+
+ static void
+diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
+index 74c5161..f0a52a5 100644
+--- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
++++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
+@@ -190,7 +190,7 @@ static ssize_t iwl_dbgfs_sram_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[64];
@@ -54496,7 +62770,7 @@ index b15e44f..8658af2 100644
u32 offset, len;
memset(buf, 0, sizeof(buf));
-@@ -454,7 +454,7 @@ static ssize_t iwl_dbgfs_rx_handlers_write(struct file *file,
+@@ -456,7 +456,7 @@ static ssize_t iwl_dbgfs_rx_handlers_write(struct file *file,
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54505,7 +62779,7 @@ index b15e44f..8658af2 100644
u32 reset_flag;
memset(buf, 0, sizeof(buf));
-@@ -535,7 +535,7 @@ static ssize_t iwl_dbgfs_disable_ht40_write(struct file *file,
+@@ -537,7 +537,7 @@ static ssize_t iwl_dbgfs_disable_ht40_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54514,7 +62788,7 @@ index b15e44f..8658af2 100644
int ht40;
memset(buf, 0, sizeof(buf));
-@@ -587,7 +587,7 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file,
+@@ -589,7 +589,7 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54523,7 +62797,7 @@ index b15e44f..8658af2 100644
int value;
memset(buf, 0, sizeof(buf));
-@@ -679,10 +679,10 @@ DEBUGFS_READ_FILE_OPS(temperature);
+@@ -681,10 +681,10 @@ DEBUGFS_READ_FILE_OPS(temperature);
DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override);
DEBUGFS_READ_FILE_OPS(current_sleep_command);
@@ -54538,7 +62812,7 @@ index b15e44f..8658af2 100644
"%-32s current cumulative delta max\n";
static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
-@@ -1852,7 +1852,7 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file,
+@@ -1854,7 +1854,7 @@ static ssize_t iwl_dbgfs_clear_ucode_statistics_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54547,7 +62821,7 @@ index b15e44f..8658af2 100644
int clear;
memset(buf, 0, sizeof(buf));
-@@ -1897,7 +1897,7 @@ static ssize_t iwl_dbgfs_ucode_tracing_write(struct file *file,
+@@ -1899,7 +1899,7 @@ static ssize_t iwl_dbgfs_ucode_tracing_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54556,7 +62830,7 @@ index b15e44f..8658af2 100644
int trace;
memset(buf, 0, sizeof(buf));
-@@ -1968,7 +1968,7 @@ static ssize_t iwl_dbgfs_missed_beacon_write(struct file *file,
+@@ -1970,7 +1970,7 @@ static ssize_t iwl_dbgfs_missed_beacon_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54565,7 +62839,7 @@ index b15e44f..8658af2 100644
int missed;
memset(buf, 0, sizeof(buf));
-@@ -2009,7 +2009,7 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file,
+@@ -2011,7 +2011,7 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file,
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54574,7 +62848,7 @@ index b15e44f..8658af2 100644
int plcp;
memset(buf, 0, sizeof(buf));
-@@ -2069,7 +2069,7 @@ static ssize_t iwl_dbgfs_txfifo_flush_write(struct file *file,
+@@ -2071,7 +2071,7 @@ static ssize_t iwl_dbgfs_txfifo_flush_write(struct file *file,
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54583,7 +62857,7 @@ index b15e44f..8658af2 100644
int flush;
memset(buf, 0, sizeof(buf));
-@@ -2159,7 +2159,7 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
+@@ -2161,7 +2161,7 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54592,7 +62866,7 @@ index b15e44f..8658af2 100644
int rts;
if (!priv->cfg->ht_params)
-@@ -2200,7 +2200,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
+@@ -2202,7 +2202,7 @@ static ssize_t iwl_dbgfs_echo_test_write(struct file *file,
{
struct iwl_priv *priv = file->private_data;
char buf[8];
@@ -54601,7 +62875,7 @@ index b15e44f..8658af2 100644
memset(buf, 0, sizeof(buf));
buf_size = min(count, sizeof(buf) - 1);
-@@ -2234,7 +2234,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
+@@ -2236,7 +2236,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
struct iwl_priv *priv = file->private_data;
u32 event_log_flag;
char buf[8];
@@ -54610,7 +62884,7 @@ index b15e44f..8658af2 100644
/* check that the interface is up */
if (!iwl_is_ready(priv))
-@@ -2288,7 +2288,7 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file,
+@@ -2290,7 +2290,7 @@ static ssize_t iwl_dbgfs_calib_disabled_write(struct file *file,
struct iwl_priv *priv = file->private_data;
char buf[8];
u32 calib_disabled;
@@ -54619,11 +62893,11 @@ index b15e44f..8658af2 100644
memset(buf, 0, sizeof(buf));
buf_size = min(count, sizeof(buf) - 1);
-diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
-index 29ae58e..305baa0 100644
---- a/drivers/net/wireless/iwlwifi/mvm/d3.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
-@@ -279,7 +279,7 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
+diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+index d3e21d9..5f07571 100644
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+@@ -308,7 +308,7 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
aes_sc = data->rsc_tsc->all_tsc_rsc.aes.unicast_rsc;
aes_tx_sc = &data->rsc_tsc->all_tsc_rsc.aes.tsc;
@@ -54632,20 +62906,20 @@ index 29ae58e..305baa0 100644
aes_tx_sc->pn = cpu_to_le64(pn64);
} else {
aes_sc = data->rsc_tsc->all_tsc_rsc.aes.multicast_rsc;
-@@ -1448,7 +1448,7 @@ static void iwl_mvm_d3_update_gtks(struct ieee80211_hw *hw,
- switch (key->cipher) {
+@@ -1596,7 +1596,7 @@ static void iwl_mvm_d3_update_keys(struct ieee80211_hw *hw,
case WLAN_CIPHER_SUITE_CCMP:
- iwl_mvm_set_aes_rx_seq(sc->aes.unicast_rsc, key);
+ iwl_mvm_set_aes_rx_seq(data->mvm, sc->aes.unicast_rsc,
+ sta, key);
- atomic64_set(&key->tx_pn, le64_to_cpu(sc->aes.tsc.pn));
+ atomic64_set_unchecked(&key->tx_pn, le64_to_cpu(sc->aes.tsc.pn));
break;
case WLAN_CIPHER_SUITE_TKIP:
iwl_mvm_tkip_sc_to_seq(&sc->tkip.tsc, &seq);
-diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
-index 6743edf..22a86c5 100644
---- a/drivers/net/wireless/iwlwifi/mvm/tx.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
-@@ -284,7 +284,7 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
+diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+index a040edc..4ea3fa7 100644
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+@@ -286,7 +286,7 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
case WLAN_CIPHER_SUITE_CCMP:
case WLAN_CIPHER_SUITE_CCMP_256:
iwl_mvm_set_tx_cmd_ccmp(info, tx_cmd);
@@ -54654,11 +62928,11 @@ index 6743edf..22a86c5 100644
crypto_hdr[0] = pn;
crypto_hdr[2] = 0;
crypto_hdr[3] = 0x20 | (keyconf->keyidx << 6);
-diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
-index 8c72047..e54deaa 100644
---- a/drivers/net/wireless/iwlwifi/pcie/trans.c
-+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
-@@ -2058,7 +2058,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
+diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+index 5a854c6..8871801 100644
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+@@ -2123,7 +2123,7 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file,
struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
char buf[8];
@@ -54667,7 +62941,7 @@ index 8c72047..e54deaa 100644
u32 reset_flag;
memset(buf, 0, sizeof(buf));
-@@ -2079,7 +2079,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
+@@ -2144,7 +2144,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
{
struct iwl_trans *trans = file->private_data;
char buf[8];
@@ -54676,11 +62950,1569 @@ index 8c72047..e54deaa 100644
int csr;
memset(buf, 0, sizeof(buf));
+diff --git a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
+index 3e5fa78..ca2e051 100644
+--- a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
++++ b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
+@@ -101,8 +101,9 @@ static int prism2_get_datarates(struct net_device *dev, u8 *rates)
+
+ static int prism2_get_name(struct net_device *dev,
+ struct iw_request_info *info,
+- char *name, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ char *name = wrqu->name;
+ u8 rates[10];
+ int len, i, over2 = 0;
+
+@@ -123,8 +124,9 @@ static int prism2_get_name(struct net_device *dev,
+
+ static int prism2_ioctl_siwencode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *keybuf)
++ union iwreq_data *wrqu, char *keybuf)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ int i;
+@@ -225,8 +227,9 @@ static int prism2_ioctl_siwencode(struct net_device *dev,
+
+ static int prism2_ioctl_giwencode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *key)
++ union iwreq_data *wrqu, char *key)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ int i, len;
+@@ -331,8 +334,9 @@ static int hostap_set_rate(struct net_device *dev)
+
+ static int prism2_ioctl_siwrate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -391,8 +395,9 @@ static int prism2_ioctl_siwrate(struct net_device *dev,
+
+ static int prism2_ioctl_giwrate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ u16 val;
+ struct hostap_interface *iface;
+ local_info_t *local;
+@@ -450,8 +455,9 @@ static int prism2_ioctl_giwrate(struct net_device *dev,
+
+ static int prism2_ioctl_siwsens(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *sens, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *sens = &wrqu->sens;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -471,8 +477,9 @@ static int prism2_ioctl_siwsens(struct net_device *dev,
+
+ static int prism2_ioctl_giwsens(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *sens, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *sens = &wrqu->sens;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 val;
+@@ -495,8 +502,9 @@ static int prism2_ioctl_giwsens(struct net_device *dev,
+ /* Deprecated in new wireless extension API */
+ static int prism2_ioctl_giwaplist(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ struct sockaddr *addr;
+@@ -536,8 +544,9 @@ static int prism2_ioctl_giwaplist(struct net_device *dev,
+
+ static int prism2_ioctl_siwrts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 val;
+@@ -563,8 +572,9 @@ static int prism2_ioctl_siwrts(struct net_device *dev,
+
+ static int prism2_ioctl_giwrts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 val;
+@@ -586,8 +596,9 @@ static int prism2_ioctl_giwrts(struct net_device *dev,
+
+ static int prism2_ioctl_siwfrag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 val;
+@@ -613,8 +624,9 @@ static int prism2_ioctl_siwfrag(struct net_device *dev,
+
+ static int prism2_ioctl_giwfrag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 val;
+@@ -679,11 +691,12 @@ static int hostap_join_ap(struct net_device *dev)
+
+ static int prism2_ioctl_siwap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *ap_addr, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ #ifdef PRISM2_NO_STATION_MODES
+ return -EOPNOTSUPP;
+ #else /* PRISM2_NO_STATION_MODES */
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -719,8 +732,9 @@ static int prism2_ioctl_siwap(struct net_device *dev,
+
+ static int prism2_ioctl_giwap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *ap_addr, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -755,8 +769,9 @@ static int prism2_ioctl_giwap(struct net_device *dev,
+
+ static int prism2_ioctl_siwnickn(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *nickname)
++ union iwreq_data *wrqu, char *nickname)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -776,8 +791,9 @@ static int prism2_ioctl_siwnickn(struct net_device *dev,
+
+ static int prism2_ioctl_giwnickn(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *nickname)
++ union iwreq_data *wrqu, char *nickname)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ int len;
+@@ -803,8 +819,9 @@ static int prism2_ioctl_giwnickn(struct net_device *dev,
+
+ static int prism2_ioctl_siwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *freq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *freq = &wrqu->freq;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -840,8 +857,9 @@ static int prism2_ioctl_siwfreq(struct net_device *dev,
+
+ static int prism2_ioctl_giwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *freq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *freq = &wrqu->freq;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ u16 val;
+@@ -884,8 +902,9 @@ static void hostap_monitor_set_type(local_info_t *local)
+
+ static int prism2_ioctl_siwessid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *ssid)
++ union iwreq_data *wrqu, char *ssid)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -920,8 +939,9 @@ static int prism2_ioctl_siwessid(struct net_device *dev,
+
+ static int prism2_ioctl_giwessid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *essid)
++ union iwreq_data *wrqu, char *essid)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ u16 val;
+@@ -956,8 +976,9 @@ static int prism2_ioctl_giwessid(struct net_device *dev,
+
+ static int prism2_ioctl_giwrange(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ struct iw_range *range = (struct iw_range *) extra;
+@@ -1131,8 +1152,9 @@ static int hostap_monitor_mode_disable(local_info_t *local)
+
+ static int prism2_ioctl_siwmode(struct net_device *dev,
+ struct iw_request_info *info,
+- __u32 *mode, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 *mode = &wrqu->mode;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ int double_reset = 0;
+@@ -1207,8 +1229,9 @@ static int prism2_ioctl_siwmode(struct net_device *dev,
+
+ static int prism2_ioctl_giwmode(struct net_device *dev,
+ struct iw_request_info *info,
+- __u32 *mode, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 *mode = &wrqu->mode;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -1232,11 +1255,12 @@ static int prism2_ioctl_giwmode(struct net_device *dev,
+
+ static int prism2_ioctl_siwpower(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *wrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ #ifdef PRISM2_NO_STATION_MODES
+ return -EOPNOTSUPP;
+ #else /* PRISM2_NO_STATION_MODES */
++ struct iw_param *wrq = &wrqu->power;
+ int ret = 0;
+
+ if (wrq->disabled)
+@@ -1291,11 +1315,12 @@ static int prism2_ioctl_siwpower(struct net_device *dev,
+
+ static int prism2_ioctl_giwpower(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ #ifdef PRISM2_NO_STATION_MODES
+ return -EOPNOTSUPP;
+ #else /* PRISM2_NO_STATION_MODES */
++ struct iw_param *rrq = &wrqu->power;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 enable, mcast;
+@@ -1349,8 +1374,9 @@ static int prism2_ioctl_giwpower(struct net_device *dev,
+
+ static int prism2_ioctl_siwretry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct hostap_interface *iface;
+ local_info_t *local;
+
+@@ -1410,8 +1436,9 @@ static int prism2_ioctl_siwretry(struct net_device *dev,
+
+ static int prism2_ioctl_giwretry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ __le16 shortretry, longretry, lifetime, altretry;
+@@ -1504,8 +1531,9 @@ static u16 prism2_txpower_dBm_to_hfa386x(int val)
+
+ static int prism2_ioctl_siwtxpow(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ #ifdef RAW_TXPOWER_SETTING
+@@ -1585,9 +1613,10 @@ static int prism2_ioctl_siwtxpow(struct net_device *dev,
+
+ static int prism2_ioctl_giwtxpow(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ #ifdef RAW_TXPOWER_SETTING
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ u16 resp0;
+@@ -1720,8 +1749,9 @@ static inline int prism2_request_scan(struct net_device *dev)
+
+ static int prism2_ioctl_siwscan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ int ret;
+@@ -2068,8 +2098,9 @@ static inline int prism2_ioctl_giwscan_sta(struct net_device *dev,
+
+ static int prism2_ioctl_giwscan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface;
+ local_info_t *local;
+ int res;
+@@ -2314,7 +2345,7 @@ static int prism2_ioctl_priv_inquire(struct net_device *dev, int *i)
+
+ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ struct hostap_interface *iface;
+ local_info_t *local;
+@@ -2665,7 +2696,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
+
+ static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ struct hostap_interface *iface;
+ local_info_t *local;
+@@ -2852,7 +2883,7 @@ static int prism2_ioctl_priv_get_prism2_param(struct net_device *dev,
+
+ static int prism2_ioctl_priv_readmif(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ struct hostap_interface *iface;
+ local_info_t *local;
+@@ -2873,7 +2904,7 @@ static int prism2_ioctl_priv_readmif(struct net_device *dev,
+
+ static int prism2_ioctl_priv_writemif(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ struct hostap_interface *iface;
+ local_info_t *local;
+@@ -2911,7 +2942,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
+ /* Disable monitor mode - old mode was not saved, so go to
+ * Master mode */
+ mode = IW_MODE_MASTER;
+- ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
++ ret = prism2_ioctl_siwmode(dev, NULL, (union iwreq_data *)&mode, NULL);
+ } else if (*i == 1) {
+ /* netlink socket mode is not supported anymore since it did
+ * not separate different devices from each other and was not
+@@ -2928,7 +2959,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i)
+ break;
+ }
+ mode = IW_MODE_MONITOR;
+- ret = prism2_ioctl_siwmode(dev, NULL, &mode, NULL);
++ ret = prism2_ioctl_siwmode(dev, NULL, (union iwreq_data *)&mode, NULL);
+ hostap_monitor_mode_enable(local);
+ } else
+ ret = -EINVAL;
+@@ -3094,8 +3125,9 @@ static int prism2_set_genericelement(struct net_device *dev, u8 *elem,
+
+ static int prism2_ioctl_siwauth(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *data = &wrqu->param;
+ struct hostap_interface *iface = netdev_priv(dev);
+ local_info_t *local = iface->local;
+
+@@ -3160,8 +3192,9 @@ static int prism2_ioctl_siwauth(struct net_device *dev,
+
+ static int prism2_ioctl_giwauth(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *data = &wrqu->param;
+ struct hostap_interface *iface = netdev_priv(dev);
+ local_info_t *local = iface->local;
+
+@@ -3199,8 +3232,9 @@ static int prism2_ioctl_giwauth(struct net_device *dev,
+
+ static int prism2_ioctl_siwencodeext(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct hostap_interface *iface = netdev_priv(dev);
+ local_info_t *local = iface->local;
+ struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
+@@ -3373,8 +3407,9 @@ static int prism2_ioctl_siwencodeext(struct net_device *dev,
+
+ static int prism2_ioctl_giwencodeext(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct hostap_interface *iface = netdev_priv(dev);
+ local_info_t *local = iface->local;
+ struct lib80211_crypt_data **crypt;
+@@ -3681,16 +3716,19 @@ static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local,
+
+ static int prism2_ioctl_siwgenie(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
++
+ return prism2_set_genericelement(dev, extra, data->length);
+ }
+
+
+ static int prism2_ioctl_giwgenie(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct hostap_interface *iface = netdev_priv(dev);
+ local_info_t *local = iface->local;
+ int len = local->generic_elem_len - 2;
+@@ -3728,7 +3766,7 @@ static int prism2_ioctl_set_generic_element(local_info_t *local,
+
+ static int prism2_ioctl_siwmlme(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *data, char *extra)
+ {
+ struct hostap_interface *iface = netdev_priv(dev);
+ local_info_t *local = iface->local;
+@@ -3943,10 +3981,10 @@ static const iw_handler prism2_handler[] =
+
+ static const iw_handler prism2_private_handler[] =
+ { /* SIOCIWFIRSTPRIV + */
+- (iw_handler) prism2_ioctl_priv_prism2_param, /* 0 */
+- (iw_handler) prism2_ioctl_priv_get_prism2_param, /* 1 */
+- (iw_handler) prism2_ioctl_priv_writemif, /* 2 */
+- (iw_handler) prism2_ioctl_priv_readmif, /* 3 */
++ prism2_ioctl_priv_prism2_param, /* 0 */
++ prism2_ioctl_priv_get_prism2_param, /* 1 */
++ prism2_ioctl_priv_writemif, /* 2 */
++ prism2_ioctl_priv_readmif, /* 3 */
+ };
+
+ const struct iw_handler_def hostap_iw_handler_def =
+diff --git a/drivers/net/wireless/intersil/orinoco/wext.c b/drivers/net/wireless/intersil/orinoco/wext.c
+index 1d4dae4..0508fc1 100644
+--- a/drivers/net/wireless/intersil/orinoco/wext.c
++++ b/drivers/net/wireless/intersil/orinoco/wext.c
+@@ -154,9 +154,10 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
+
+ static int orinoco_ioctl_setwap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *ap_addr,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int err = -EINPROGRESS; /* Call commit handler */
+ unsigned long flags;
+@@ -213,9 +214,10 @@ static int orinoco_ioctl_setwap(struct net_device *dev,
+
+ static int orinoco_ioctl_getwap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *ap_addr,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct orinoco_private *priv = ndev_priv(dev);
+
+ int err = 0;
+@@ -234,9 +236,10 @@ static int orinoco_ioctl_getwap(struct net_device *dev,
+
+ static int orinoco_ioctl_setiwencode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq,
++ union iwreq_data *wrqu,
+ char *keybuf)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int index = (erq->flags & IW_ENCODE_INDEX) - 1;
+ int setindex = priv->tx_key;
+@@ -325,9 +328,10 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
+
+ static int orinoco_ioctl_getiwencode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq,
++ union iwreq_data *wrqu,
+ char *keybuf)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int index = (erq->flags & IW_ENCODE_INDEX) - 1;
+ unsigned long flags;
+@@ -361,9 +365,10 @@ static int orinoco_ioctl_getiwencode(struct net_device *dev,
+
+ static int orinoco_ioctl_setessid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq,
++ union iwreq_data *wrqu,
+ char *essidbuf)
+ {
++ struct iw_point *erq = &wrqu->essid;
+ struct orinoco_private *priv = ndev_priv(dev);
+ unsigned long flags;
+
+@@ -392,9 +397,10 @@ static int orinoco_ioctl_setessid(struct net_device *dev,
+
+ static int orinoco_ioctl_getessid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq,
++ union iwreq_data *wrqu,
+ char *essidbuf)
+ {
++ struct iw_point *erq = &wrqu->essid;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int active;
+ int err = 0;
+@@ -420,9 +426,10 @@ static int orinoco_ioctl_getessid(struct net_device *dev,
+
+ static int orinoco_ioctl_setfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *frq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_freq *frq = &wrqu->freq;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int chan = -1;
+ unsigned long flags;
+@@ -469,9 +476,10 @@ static int orinoco_ioctl_setfreq(struct net_device *dev,
+
+ static int orinoco_ioctl_getfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *frq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_freq *frq = &wrqu->freq;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int tmp;
+
+@@ -488,9 +496,10 @@ static int orinoco_ioctl_getfreq(struct net_device *dev,
+
+ static int orinoco_ioctl_getsens(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *srq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *srq = &wrqu->sens;
+ struct orinoco_private *priv = ndev_priv(dev);
+ struct hermes *hw = &priv->hw;
+ u16 val;
+@@ -517,9 +526,10 @@ static int orinoco_ioctl_getsens(struct net_device *dev,
+
+ static int orinoco_ioctl_setsens(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *srq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *srq = &wrqu->sens;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int val = srq->value;
+ unsigned long flags;
+@@ -540,9 +550,10 @@ static int orinoco_ioctl_setsens(struct net_device *dev,
+
+ static int orinoco_ioctl_setrate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int ratemode;
+ int bitrate; /* 100s of kilobits */
+@@ -574,9 +585,10 @@ static int orinoco_ioctl_setrate(struct net_device *dev,
+
+ static int orinoco_ioctl_getrate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rrq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int err = 0;
+ int bitrate, automatic;
+@@ -610,9 +622,10 @@ static int orinoco_ioctl_getrate(struct net_device *dev,
+
+ static int orinoco_ioctl_setpower(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *prq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *prq = &wrqu->power;
+ struct orinoco_private *priv = ndev_priv(dev);
+ int err = -EINPROGRESS; /* Call commit handler */
+ unsigned long flags;
+@@ -664,9 +677,10 @@ static int orinoco_ioctl_setpower(struct net_device *dev,
+
+ static int orinoco_ioctl_getpower(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *prq,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_param *prq = &wrqu->power;
+ struct orinoco_private *priv = ndev_priv(dev);
+ struct hermes *hw = &priv->hw;
+ int err = 0;
+@@ -1097,7 +1111,7 @@ static int orinoco_ioctl_set_mlme(struct net_device *dev,
+
+ static int orinoco_ioctl_reset(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1121,7 +1135,7 @@ static int orinoco_ioctl_reset(struct net_device *dev,
+
+ static int orinoco_ioctl_setibssport(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+
+ {
+@@ -1143,7 +1157,7 @@ static int orinoco_ioctl_setibssport(struct net_device *dev,
+
+ static int orinoco_ioctl_getibssport(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1155,7 +1169,7 @@ static int orinoco_ioctl_getibssport(struct net_device *dev,
+
+ static int orinoco_ioctl_setport3(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1201,7 +1215,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
+
+ static int orinoco_ioctl_getport3(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1213,7 +1227,7 @@ static int orinoco_ioctl_getport3(struct net_device *dev,
+
+ static int orinoco_ioctl_setpreamble(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1245,7 +1259,7 @@ static int orinoco_ioctl_setpreamble(struct net_device *dev,
+
+ static int orinoco_ioctl_getpreamble(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1265,9 +1279,10 @@ static int orinoco_ioctl_getpreamble(struct net_device *dev,
+ * For Wireless Tools 25 and 26 append "dummy" are the end. */
+ static int orinoco_ioctl_getrid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct orinoco_private *priv = ndev_priv(dev);
+ struct hermes *hw = &priv->hw;
+ int rid = data->flags;
+@@ -1303,7 +1318,7 @@ static int orinoco_ioctl_getrid(struct net_device *dev,
+ /* Commit handler, called after set operations */
+ static int orinoco_ioctl_commit(struct net_device *dev,
+ struct iw_request_info *info,
+- void *wrqu,
++ union iwreq_data *wrqu,
+ char *extra)
+ {
+ struct orinoco_private *priv = ndev_priv(dev);
+@@ -1347,36 +1362,36 @@ static const struct iw_priv_args orinoco_privtab[] = {
+ */
+
+ static const iw_handler orinoco_handler[] = {
+- IW_HANDLER(SIOCSIWCOMMIT, (iw_handler)orinoco_ioctl_commit),
+- IW_HANDLER(SIOCGIWNAME, (iw_handler)cfg80211_wext_giwname),
+- IW_HANDLER(SIOCSIWFREQ, (iw_handler)orinoco_ioctl_setfreq),
+- IW_HANDLER(SIOCGIWFREQ, (iw_handler)orinoco_ioctl_getfreq),
+- IW_HANDLER(SIOCSIWMODE, (iw_handler)cfg80211_wext_siwmode),
+- IW_HANDLER(SIOCGIWMODE, (iw_handler)cfg80211_wext_giwmode),
+- IW_HANDLER(SIOCSIWSENS, (iw_handler)orinoco_ioctl_setsens),
+- IW_HANDLER(SIOCGIWSENS, (iw_handler)orinoco_ioctl_getsens),
+- IW_HANDLER(SIOCGIWRANGE, (iw_handler)cfg80211_wext_giwrange),
++ IW_HANDLER(SIOCSIWCOMMIT, orinoco_ioctl_commit),
++ IW_HANDLER(SIOCGIWNAME, cfg80211_wext_giwname),
++ IW_HANDLER(SIOCSIWFREQ, orinoco_ioctl_setfreq),
++ IW_HANDLER(SIOCGIWFREQ, orinoco_ioctl_getfreq),
++ IW_HANDLER(SIOCSIWMODE, cfg80211_wext_siwmode),
++ IW_HANDLER(SIOCGIWMODE, cfg80211_wext_giwmode),
++ IW_HANDLER(SIOCSIWSENS, orinoco_ioctl_setsens),
++ IW_HANDLER(SIOCGIWSENS, orinoco_ioctl_getsens),
++ IW_HANDLER(SIOCGIWRANGE, cfg80211_wext_giwrange),
+ IW_HANDLER(SIOCSIWSPY, iw_handler_set_spy),
+ IW_HANDLER(SIOCGIWSPY, iw_handler_get_spy),
+ IW_HANDLER(SIOCSIWTHRSPY, iw_handler_set_thrspy),
+ IW_HANDLER(SIOCGIWTHRSPY, iw_handler_get_thrspy),
+- IW_HANDLER(SIOCSIWAP, (iw_handler)orinoco_ioctl_setwap),
+- IW_HANDLER(SIOCGIWAP, (iw_handler)orinoco_ioctl_getwap),
+- IW_HANDLER(SIOCSIWSCAN, (iw_handler)cfg80211_wext_siwscan),
+- IW_HANDLER(SIOCGIWSCAN, (iw_handler)cfg80211_wext_giwscan),
+- IW_HANDLER(SIOCSIWESSID, (iw_handler)orinoco_ioctl_setessid),
+- IW_HANDLER(SIOCGIWESSID, (iw_handler)orinoco_ioctl_getessid),
+- IW_HANDLER(SIOCSIWRATE, (iw_handler)orinoco_ioctl_setrate),
+- IW_HANDLER(SIOCGIWRATE, (iw_handler)orinoco_ioctl_getrate),
+- IW_HANDLER(SIOCSIWRTS, (iw_handler)cfg80211_wext_siwrts),
+- IW_HANDLER(SIOCGIWRTS, (iw_handler)cfg80211_wext_giwrts),
+- IW_HANDLER(SIOCSIWFRAG, (iw_handler)cfg80211_wext_siwfrag),
+- IW_HANDLER(SIOCGIWFRAG, (iw_handler)cfg80211_wext_giwfrag),
+- IW_HANDLER(SIOCGIWRETRY, (iw_handler)cfg80211_wext_giwretry),
+- IW_HANDLER(SIOCSIWENCODE, (iw_handler)orinoco_ioctl_setiwencode),
+- IW_HANDLER(SIOCGIWENCODE, (iw_handler)orinoco_ioctl_getiwencode),
+- IW_HANDLER(SIOCSIWPOWER, (iw_handler)orinoco_ioctl_setpower),
+- IW_HANDLER(SIOCGIWPOWER, (iw_handler)orinoco_ioctl_getpower),
++ IW_HANDLER(SIOCSIWAP, orinoco_ioctl_setwap),
++ IW_HANDLER(SIOCGIWAP, orinoco_ioctl_getwap),
++ IW_HANDLER(SIOCSIWSCAN, cfg80211_wext_siwscan),
++ IW_HANDLER(SIOCGIWSCAN, cfg80211_wext_giwscan),
++ IW_HANDLER(SIOCSIWESSID, orinoco_ioctl_setessid),
++ IW_HANDLER(SIOCGIWESSID, orinoco_ioctl_getessid),
++ IW_HANDLER(SIOCSIWRATE, orinoco_ioctl_setrate),
++ IW_HANDLER(SIOCGIWRATE, orinoco_ioctl_getrate),
++ IW_HANDLER(SIOCSIWRTS, cfg80211_wext_siwrts),
++ IW_HANDLER(SIOCGIWRTS, cfg80211_wext_giwrts),
++ IW_HANDLER(SIOCSIWFRAG, cfg80211_wext_siwfrag),
++ IW_HANDLER(SIOCGIWFRAG, cfg80211_wext_giwfrag),
++ IW_HANDLER(SIOCGIWRETRY, cfg80211_wext_giwretry),
++ IW_HANDLER(SIOCSIWENCODE, orinoco_ioctl_setiwencode),
++ IW_HANDLER(SIOCGIWENCODE, orinoco_ioctl_getiwencode),
++ IW_HANDLER(SIOCSIWPOWER, orinoco_ioctl_setpower),
++ IW_HANDLER(SIOCGIWPOWER, orinoco_ioctl_getpower),
+ IW_HANDLER(SIOCSIWGENIE, orinoco_ioctl_set_genie),
+ IW_HANDLER(SIOCGIWGENIE, orinoco_ioctl_get_genie),
+ IW_HANDLER(SIOCSIWMLME, orinoco_ioctl_set_mlme),
+@@ -1391,15 +1406,15 @@ static const iw_handler orinoco_handler[] = {
+ Added typecasting since we no longer use iwreq_data -- Moustafa
+ */
+ static const iw_handler orinoco_private_handler[] = {
+- [0] = (iw_handler)orinoco_ioctl_reset,
+- [1] = (iw_handler)orinoco_ioctl_reset,
+- [2] = (iw_handler)orinoco_ioctl_setport3,
+- [3] = (iw_handler)orinoco_ioctl_getport3,
+- [4] = (iw_handler)orinoco_ioctl_setpreamble,
+- [5] = (iw_handler)orinoco_ioctl_getpreamble,
+- [6] = (iw_handler)orinoco_ioctl_setibssport,
+- [7] = (iw_handler)orinoco_ioctl_getibssport,
+- [9] = (iw_handler)orinoco_ioctl_getrid,
++ [0] = orinoco_ioctl_reset,
++ [1] = orinoco_ioctl_reset,
++ [2] = orinoco_ioctl_setport3,
++ [3] = orinoco_ioctl_getport3,
++ [4] = orinoco_ioctl_setpreamble,
++ [5] = orinoco_ioctl_getpreamble,
++ [6] = orinoco_ioctl_setibssport,
++ [7] = orinoco_ioctl_getibssport,
++ [9] = orinoco_ioctl_getrid,
+ };
+
+ const struct iw_handler_def orinoco_handler_def = {
+diff --git a/drivers/net/wireless/intersil/prism54/isl_ioctl.c b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
+index 48e8a97..3499ec8 100644
+--- a/drivers/net/wireless/intersil/prism54/isl_ioctl.c
++++ b/drivers/net/wireless/intersil/prism54/isl_ioctl.c
+@@ -45,7 +45,7 @@ static void prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
+ u8 *wpa_ie, size_t wpa_ie_len);
+ static size_t prism54_wpa_bss_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie);
+ static int prism54_set_wpa(struct net_device *, struct iw_request_info *,
+- __u32 *, char *);
++ union iwreq_data *, char *);
+
+ /* In 500 kbps */
+ static const unsigned char scan_rate_list[] = { 2, 4, 11, 22,
+@@ -240,7 +240,7 @@ prism54_get_wireless_stats(struct net_device *ndev)
+
+ static int
+ prism54_commit(struct net_device *ndev, struct iw_request_info *info,
+- char *cwrq, char *extra)
++ union iwreq_data *cwrq, char *extra)
+ {
+ islpci_private *priv = netdev_priv(ndev);
+
+@@ -256,8 +256,9 @@ prism54_commit(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_name(struct net_device *ndev, struct iw_request_info *info,
+- char *cwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ char *cwrq = wrqu->name;
+ islpci_private *priv = netdev_priv(ndev);
+ char *capabilities;
+ union oid_res_t r;
+@@ -287,8 +288,9 @@ prism54_get_name(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_freq(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_freq *fwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *fwrq = &wrqu->freq;
+ islpci_private *priv = netdev_priv(ndev);
+ int rvalue;
+ u32 c;
+@@ -307,8 +309,9 @@ prism54_set_freq(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_freq(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_freq *fwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *fwrq = &wrqu->freq;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue;
+@@ -324,8 +327,9 @@ prism54_get_freq(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_mode(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 *uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ u32 mlmeautolevel = CARD_DEFAULT_MLME_MODE;
+
+@@ -368,8 +372,9 @@ prism54_set_mode(struct net_device *ndev, struct iw_request_info *info,
+ /* Use mib cache */
+ static int
+ prism54_get_mode(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 *uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+
+ BUG_ON((priv->iw_mode < IW_MODE_AUTO) || (priv->iw_mode >
+@@ -386,8 +391,9 @@ prism54_get_mode(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_sens(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->sens;
+ islpci_private *priv = netdev_priv(ndev);
+ u32 sens;
+
+@@ -399,8 +405,9 @@ prism54_set_sens(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_sens(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->sens;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue;
+@@ -416,8 +423,9 @@ prism54_get_sens(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_range(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ struct iw_range *range = (struct iw_range *) extra;
+ islpci_private *priv = netdev_priv(ndev);
+ u8 *data;
+@@ -521,8 +529,9 @@ prism54_get_range(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_wap(struct net_device *ndev, struct iw_request_info *info,
+- struct sockaddr *awrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *awrq = &wrqu->ap_addr;
+ islpci_private *priv = netdev_priv(ndev);
+ char bssid[6];
+ int rvalue;
+@@ -543,8 +552,9 @@ prism54_set_wap(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_wap(struct net_device *ndev, struct iw_request_info *info,
+- struct sockaddr *awrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *awrq = &wrqu->ap_addr;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue;
+@@ -559,7 +569,7 @@ prism54_get_wap(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_scan(struct net_device *dev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *vwrq, char *extra)
+ {
+ /* hehe the device does this automagicaly */
+ return 0;
+@@ -679,8 +689,9 @@ prism54_translate_bss(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ int i, rvalue;
+ struct obj_bsslist *bsslist;
+@@ -733,8 +744,9 @@ prism54_get_scan(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_essid(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ struct obj_ssid essid;
+
+@@ -760,8 +772,9 @@ prism54_set_essid(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ struct obj_ssid *essid;
+ union oid_res_t r;
+@@ -790,8 +803,9 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
+ */
+ static int
+ prism54_set_nick(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+
+ if (dwrq->length > IW_ESSID_MAX_SIZE)
+@@ -807,8 +821,9 @@ prism54_set_nick(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_nick(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+
+ dwrq->length = 0;
+@@ -826,9 +841,9 @@ prism54_get_nick(struct net_device *ndev, struct iw_request_info *info,
+ static int
+ prism54_set_rate(struct net_device *ndev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+-
++ struct iw_param *vwrq = &wrqu->bitrate;
+ islpci_private *priv = netdev_priv(ndev);
+ u32 rate, profile;
+ char *data;
+@@ -899,8 +914,9 @@ prism54_set_rate(struct net_device *ndev,
+ static int
+ prism54_get_rate(struct net_device *ndev,
+ struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->bitrate;
+ islpci_private *priv = netdev_priv(ndev);
+ int rvalue;
+ char *data;
+@@ -926,8 +942,9 @@ prism54_get_rate(struct net_device *ndev,
+
+ static int
+ prism54_set_rts(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->rts;
+ islpci_private *priv = netdev_priv(ndev);
+
+ return mgt_set_request(priv, DOT11_OID_RTSTHRESH, 0, &vwrq->value);
+@@ -935,8 +952,9 @@ prism54_set_rts(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_rts(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->rts;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue;
+@@ -950,8 +968,9 @@ prism54_get_rts(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_frag(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->frag;
+ islpci_private *priv = netdev_priv(ndev);
+
+ return mgt_set_request(priv, DOT11_OID_FRAGTHRESH, 0, &vwrq->value);
+@@ -959,8 +978,9 @@ prism54_set_frag(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_frag(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->frag;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue;
+@@ -980,8 +1000,9 @@ prism54_get_frag(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_retry(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->retry;
+ islpci_private *priv = netdev_priv(ndev);
+ u32 slimit = 0, llimit = 0; /* short and long limit */
+ u32 lifetime = 0;
+@@ -1022,8 +1043,9 @@ prism54_set_retry(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_retry(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->retry;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue = 0;
+@@ -1054,8 +1076,9 @@ prism54_get_retry(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ int rvalue = 0, force = 0;
+ int authen = DOT11_AUTH_OS, invoke = 0, exunencrypt = 0;
+@@ -1155,8 +1178,9 @@ prism54_set_encode(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ struct obj_key *key;
+ u32 devindex, index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
+@@ -1203,8 +1227,9 @@ prism54_get_encode(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->txpower;
+ islpci_private *priv = netdev_priv(ndev);
+ union oid_res_t r;
+ int rvalue;
+@@ -1223,8 +1248,9 @@ prism54_get_txpower(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_param *vwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->txpower;
+ islpci_private *priv = netdev_priv(ndev);
+ s32 u = vwrq->value;
+
+@@ -1249,8 +1275,9 @@ prism54_set_txpower(struct net_device *ndev, struct iw_request_info *info,
+
+ static int prism54_set_genie(struct net_device *ndev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ int alen, ret = 0;
+ struct obj_attachment *attach;
+@@ -1298,8 +1325,9 @@ static int prism54_set_genie(struct net_device *ndev,
+
+ static int prism54_get_genie(struct net_device *ndev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ int len = priv->wpa_ie_len;
+
+@@ -1739,7 +1767,7 @@ out:
+
+ static int
+ prism54_reset(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data * uwrq, char *extra)
+ {
+ islpci_reset(netdev_priv(ndev), 0);
+
+@@ -1748,8 +1776,9 @@ prism54_reset(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ union oid_res_t r;
+ int rvalue;
+ enum oid_num_t n = dwrq->flags;
+@@ -1763,8 +1792,9 @@ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ u32 oid = uwrq[0], u = uwrq[1];
+
+ return mgt_set_request(netdev_priv(ndev), oid, 0, &u);
+@@ -1772,8 +1802,9 @@ prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_raw(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ u32 oid = dwrq->flags;
+
+ return mgt_set_request(netdev_priv(ndev), oid, 0, extra);
+@@ -1819,7 +1850,7 @@ prism54_acl_clean(struct islpci_acl *acl)
+
+ static int
+ prism54_add_mac(struct net_device *ndev, struct iw_request_info *info,
+- struct sockaddr *awrq, char *extra)
++ union iwreq_data *awrq, char *extra)
+ {
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_acl *acl = &priv->acl;
+@@ -1848,7 +1879,7 @@ prism54_add_mac(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
+- struct sockaddr *awrq, char *extra)
++ union iwreq_data *awrq, char *extra)
+ {
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_acl *acl = &priv->acl;
+@@ -1875,8 +1906,9 @@ prism54_del_mac(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *dwrq = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_acl *acl = &priv->acl;
+ struct mac_entry *entry;
+@@ -1903,8 +1935,9 @@ prism54_get_mac(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_policy(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_acl *acl = &priv->acl;
+ u32 mlmeautolevel;
+@@ -1939,8 +1972,9 @@ prism54_set_policy(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_policy(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_acl *acl = &priv->acl;
+
+@@ -1979,7 +2013,7 @@ prism54_mac_accept(struct islpci_acl *acl, char *mac)
+
+ static int
+ prism54_kick_all(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *dwrq, char *extra)
++ union iwreq_data *dwrq, char *extra)
+ {
+ struct obj_mlme *mlme;
+ int rvalue;
+@@ -1999,7 +2033,7 @@ prism54_kick_all(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_kick_mac(struct net_device *ndev, struct iw_request_info *info,
+- struct sockaddr *awrq, char *extra)
++ union iwreq_data *awrq, char *extra)
+ {
+ struct obj_mlme *mlme;
+ struct sockaddr *addr = (struct sockaddr *) extra;
+@@ -2085,8 +2119,7 @@ link_changed(struct net_device *ndev, u32 bitrate)
+ netif_carrier_on(ndev);
+ if (priv->iw_mode == IW_MODE_INFRA) {
+ union iwreq_data uwrq;
+- prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq,
+- NULL);
++ prism54_get_wap(ndev, NULL, &uwrq, NULL);
+ wireless_send_event(ndev, SIOCGIWAP, &uwrq, NULL);
+ } else
+ send_simple_event(netdev_priv(ndev),
+@@ -2498,8 +2531,9 @@ prism54_set_mac_address(struct net_device *ndev, void *addr)
+
+ static int
+ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ u32 mlme, authen, dot1x, filter, wep;
+
+@@ -2542,8 +2576,9 @@ prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ *uwrq = priv->wpa;
+ return 0;
+@@ -2551,8 +2586,9 @@ prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_set_prismhdr(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ priv->monitor_type =
+ (*uwrq ? ARPHRD_IEEE80211_PRISM : ARPHRD_IEEE80211);
+@@ -2564,8 +2600,9 @@ prism54_set_prismhdr(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_get_prismhdr(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+ *uwrq = (priv->monitor_type == ARPHRD_IEEE80211_PRISM);
+ return 0;
+@@ -2573,8 +2610,9 @@ prism54_get_prismhdr(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
+- __u32 * uwrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ __u32 * uwrq = &wrqu->mode;
+ islpci_private *priv = netdev_priv(ndev);
+
+ priv->priv_oid = *uwrq;
+@@ -2585,8 +2623,9 @@ prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_mgmtframe *response;
+ int ret = -EIO;
+@@ -2621,8 +2660,9 @@ prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info,
+
+ static int
+ prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ islpci_private *priv = netdev_priv(ndev);
+ struct islpci_mgmtframe *response;
+ int ret = 0, response_op = PIMFOR_OP_ERROR;
+@@ -2682,60 +2722,60 @@ prism54_set_spy(struct net_device *ndev,
+ }
+
+ static const iw_handler prism54_handler[] = {
+- (iw_handler) prism54_commit, /* SIOCSIWCOMMIT */
+- (iw_handler) prism54_get_name, /* SIOCGIWNAME */
+- (iw_handler) NULL, /* SIOCSIWNWID */
+- (iw_handler) NULL, /* SIOCGIWNWID */
+- (iw_handler) prism54_set_freq, /* SIOCSIWFREQ */
+- (iw_handler) prism54_get_freq, /* SIOCGIWFREQ */
+- (iw_handler) prism54_set_mode, /* SIOCSIWMODE */
+- (iw_handler) prism54_get_mode, /* SIOCGIWMODE */
+- (iw_handler) prism54_set_sens, /* SIOCSIWSENS */
+- (iw_handler) prism54_get_sens, /* SIOCGIWSENS */
+- (iw_handler) NULL, /* SIOCSIWRANGE */
+- (iw_handler) prism54_get_range, /* SIOCGIWRANGE */
+- (iw_handler) NULL, /* SIOCSIWPRIV */
+- (iw_handler) NULL, /* SIOCGIWPRIV */
+- (iw_handler) NULL, /* SIOCSIWSTATS */
+- (iw_handler) NULL, /* SIOCGIWSTATS */
++ prism54_commit, /* SIOCSIWCOMMIT */
++ prism54_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ prism54_set_freq, /* SIOCSIWFREQ */
++ prism54_get_freq, /* SIOCGIWFREQ */
++ prism54_set_mode, /* SIOCSIWMODE */
++ prism54_get_mode, /* SIOCGIWMODE */
++ prism54_set_sens, /* SIOCSIWSENS */
++ prism54_get_sens, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ prism54_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
+ prism54_set_spy, /* SIOCSIWSPY */
+ iw_handler_get_spy, /* SIOCGIWSPY */
+ iw_handler_set_thrspy, /* SIOCSIWTHRSPY */
+ iw_handler_get_thrspy, /* SIOCGIWTHRSPY */
+- (iw_handler) prism54_set_wap, /* SIOCSIWAP */
+- (iw_handler) prism54_get_wap, /* SIOCGIWAP */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* SIOCGIWAPLIST deprecated */
+- (iw_handler) prism54_set_scan, /* SIOCSIWSCAN */
+- (iw_handler) prism54_get_scan, /* SIOCGIWSCAN */
+- (iw_handler) prism54_set_essid, /* SIOCSIWESSID */
+- (iw_handler) prism54_get_essid, /* SIOCGIWESSID */
+- (iw_handler) prism54_set_nick, /* SIOCSIWNICKN */
+- (iw_handler) prism54_get_nick, /* SIOCGIWNICKN */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) prism54_set_rate, /* SIOCSIWRATE */
+- (iw_handler) prism54_get_rate, /* SIOCGIWRATE */
+- (iw_handler) prism54_set_rts, /* SIOCSIWRTS */
+- (iw_handler) prism54_get_rts, /* SIOCGIWRTS */
+- (iw_handler) prism54_set_frag, /* SIOCSIWFRAG */
+- (iw_handler) prism54_get_frag, /* SIOCGIWFRAG */
+- (iw_handler) prism54_set_txpower, /* SIOCSIWTXPOW */
+- (iw_handler) prism54_get_txpower, /* SIOCGIWTXPOW */
+- (iw_handler) prism54_set_retry, /* SIOCSIWRETRY */
+- (iw_handler) prism54_get_retry, /* SIOCGIWRETRY */
+- (iw_handler) prism54_set_encode, /* SIOCSIWENCODE */
+- (iw_handler) prism54_get_encode, /* SIOCGIWENCODE */
+- (iw_handler) NULL, /* SIOCSIWPOWER */
+- (iw_handler) NULL, /* SIOCGIWPOWER */
++ prism54_set_wap, /* SIOCSIWAP */
++ prism54_get_wap, /* SIOCGIWAP */
++ NULL, /* -- hole -- */
++ NULL, /* SIOCGIWAPLIST deprecated */
++ prism54_set_scan, /* SIOCSIWSCAN */
++ prism54_get_scan, /* SIOCGIWSCAN */
++ prism54_set_essid, /* SIOCSIWESSID */
++ prism54_get_essid, /* SIOCGIWESSID */
++ prism54_set_nick, /* SIOCSIWNICKN */
++ prism54_get_nick, /* SIOCGIWNICKN */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ prism54_set_rate, /* SIOCSIWRATE */
++ prism54_get_rate, /* SIOCGIWRATE */
++ prism54_set_rts, /* SIOCSIWRTS */
++ prism54_get_rts, /* SIOCGIWRTS */
++ prism54_set_frag, /* SIOCSIWFRAG */
++ prism54_get_frag, /* SIOCGIWFRAG */
++ prism54_set_txpower, /* SIOCSIWTXPOW */
++ prism54_get_txpower, /* SIOCGIWTXPOW */
++ prism54_set_retry, /* SIOCSIWRETRY */
++ prism54_get_retry, /* SIOCGIWRETRY */
++ prism54_set_encode, /* SIOCSIWENCODE */
++ prism54_get_encode, /* SIOCGIWENCODE */
++ NULL, /* SIOCSIWPOWER */
++ NULL, /* SIOCGIWPOWER */
+ NULL, /* -- hole -- */
+ NULL, /* -- hole -- */
+- (iw_handler) prism54_set_genie, /* SIOCSIWGENIE */
+- (iw_handler) prism54_get_genie, /* SIOCGIWGENIE */
+- (iw_handler) prism54_set_auth, /* SIOCSIWAUTH */
+- (iw_handler) prism54_get_auth, /* SIOCGIWAUTH */
+- (iw_handler) prism54_set_encodeext, /* SIOCSIWENCODEEXT */
+- (iw_handler) prism54_get_encodeext, /* SIOCGIWENCODEEXT */
++ prism54_set_genie, /* SIOCSIWGENIE */
++ prism54_get_genie, /* SIOCGIWGENIE */
++ prism54_set_auth, /* SIOCSIWAUTH */
++ prism54_get_auth, /* SIOCGIWAUTH */
++ prism54_set_encodeext, /* SIOCSIWENCODEEXT */
++ prism54_get_encodeext, /* SIOCGIWENCODEEXT */
+ NULL, /* SIOCSIWPMKSA */
+ };
+
+@@ -2872,31 +2912,31 @@ static const struct iw_priv_args prism54_private_args[] = {
+ };
+
+ static const iw_handler prism54_private_handler[] = {
+- (iw_handler) prism54_reset,
+- (iw_handler) prism54_get_policy,
+- (iw_handler) prism54_set_policy,
+- (iw_handler) prism54_get_mac,
+- (iw_handler) prism54_add_mac,
+- (iw_handler) NULL,
+- (iw_handler) prism54_del_mac,
+- (iw_handler) NULL,
+- (iw_handler) prism54_kick_mac,
+- (iw_handler) NULL,
+- (iw_handler) prism54_kick_all,
+- (iw_handler) prism54_get_wpa,
+- (iw_handler) prism54_set_wpa,
+- (iw_handler) NULL,
+- (iw_handler) prism54_debug_oid,
+- (iw_handler) prism54_debug_get_oid,
+- (iw_handler) prism54_debug_set_oid,
+- (iw_handler) prism54_get_oid,
+- (iw_handler) prism54_set_u32,
+- (iw_handler) NULL,
+- (iw_handler) prism54_set_raw,
+- (iw_handler) NULL,
+- (iw_handler) prism54_set_raw,
+- (iw_handler) prism54_get_prismhdr,
+- (iw_handler) prism54_set_prismhdr,
++ prism54_reset,
++ prism54_get_policy,
++ prism54_set_policy,
++ prism54_get_mac,
++ prism54_add_mac,
++ NULL,
++ prism54_del_mac,
++ NULL,
++ prism54_kick_mac,
++ NULL,
++ prism54_kick_all,
++ prism54_get_wpa,
++ prism54_set_wpa,
++ NULL,
++ prism54_debug_oid,
++ prism54_debug_get_oid,
++ prism54_debug_set_oid,
++ prism54_get_oid,
++ prism54_set_u32,
++ NULL,
++ prism54_set_raw,
++ NULL,
++ prism54_set_raw,
++ prism54_get_prismhdr,
++ prism54_set_prismhdr,
+ };
+
+ const struct iw_handler_def prism54_handler_def = {
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
-index c00a7daaa..4f9ed30 100644
+index a28414c..26c8768 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -3150,20 +3150,20 @@ static int __init init_mac80211_hwsim(void)
+@@ -3218,20 +3218,20 @@ static int __init init_mac80211_hwsim(void)
if (channels < 1)
return -EINVAL;
@@ -54715,10 +64547,120 @@ index c00a7daaa..4f9ed30 100644
spin_lock_init(&hwsim_radio_lock);
INIT_LIST_HEAD(&hwsim_radios);
-diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
-index 3282ddb..26aabb5 100644
---- a/drivers/net/wireless/rt2x00/rt2x00.h
-+++ b/drivers/net/wireless/rt2x00/rt2x00.h
+diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
+index 79c16de..efdebed 100644
+--- a/drivers/net/wireless/marvell/mwifiex/main.c
++++ b/drivers/net/wireless/marvell/mwifiex/main.c
+@@ -794,7 +794,7 @@ mwifiex_clone_skb_for_tx_status(struct mwifiex_private *priv,
+ /*
+ * CFG802.11 network device handler for data transmission.
+ */
+-static int
++static netdev_tx_t
+ mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
+index 155f343..5db43e7 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
+@@ -54,7 +54,7 @@
+ rt2x00mmio_regbusy_read((__dev), RFCSR, RFCSR_BUSY, (__reg))
+
+ static void rt2400pci_bbp_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u32 reg;
+
+@@ -109,7 +109,7 @@ static void rt2400pci_bbp_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt2400pci_rf_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u32 value)
++ const unsigned int word, u32 value)
+ {
+ u32 reg;
+
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
+index 2553cdd..6a60ef9 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
+@@ -54,7 +54,7 @@
+ rt2x00mmio_regbusy_read((__dev), RFCSR, RFCSR_BUSY, (__reg))
+
+ static void rt2500pci_bbp_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u32 reg;
+
+@@ -109,7 +109,7 @@ static void rt2500pci_bbp_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt2500pci_rf_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u32 value)
++ const unsigned int word, u32 value)
+ {
+ u32 reg;
+
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
+index 2d64611..66754f4 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
+@@ -142,7 +142,7 @@ static int rt2500usb_regbusy_read(struct rt2x00_dev *rt2x00dev,
+ rt2500usb_regbusy_read((__dev), PHY_CSR10, PHY_CSR10_RF_BUSY, (__reg))
+
+ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u16 reg;
+
+@@ -196,7 +196,7 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u32 value)
++ const unsigned int word, u32 value)
+ {
+ u16 reg;
+
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+index a26afca..156b152 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -83,7 +83,7 @@ static inline bool rt2800_is_305x_soc(struct rt2x00_dev *rt2x00dev)
+ }
+
+ static void rt2800_bbp_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u32 reg;
+
+@@ -140,7 +140,7 @@ static void rt2800_bbp_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt2800_rfcsr_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u32 reg;
+
+@@ -195,7 +195,7 @@ static void rt2800_rfcsr_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt2800_rf_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u32 value)
++ const unsigned int word, u32 value)
+ {
+ u32 reg;
+
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+index 2642714..d79a7e9 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -377,7 +377,7 @@ struct rt2x00_intf {
* for hardware which doesn't support hardware
* sequence counting.
@@ -54728,10 +64670,10 @@ index 3282ddb..26aabb5 100644
};
static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif)
-diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
index 68b620b..92ecd9e 100644
---- a/drivers/net/wireless/rt2x00/rt2x00queue.c
-+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
+--- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
@@ -224,9 +224,9 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
* sequence counter given by mac80211.
*/
@@ -54744,6 +64686,200 @@ index 68b620b..92ecd9e 100644
hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
hdr->seq_ctrl |= cpu_to_le16(seqno);
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
+index 24a3436..b74d6b7 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
+@@ -63,7 +63,7 @@ MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
+ H2M_MAILBOX_CSR_OWNER, (__reg))
+
+ static void rt61pci_bbp_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u32 reg;
+
+@@ -118,7 +118,7 @@ static void rt61pci_bbp_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt61pci_rf_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u32 value)
++ const unsigned int word, u32 value)
+ {
+ u32 reg;
+
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
+index 7bbc869..d69e243 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
+@@ -61,7 +61,7 @@ MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
+ rt2x00usb_regbusy_read((__dev), PHY_CSR4, PHY_CSR4_BUSY, (__reg))
+
+ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u8 value)
++ const unsigned int word, u8 value)
+ {
+ u32 reg;
+
+@@ -116,7 +116,7 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
+ }
+
+ static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
+- const unsigned int word, const u32 value)
++ const unsigned int word, u32 value)
+ {
+ u32 reg;
+
+diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
+index 0517a4f..cac8e6b 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/base.c
++++ b/drivers/net/wireless/realtek/rtlwifi/base.c
+@@ -467,15 +467,15 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
+ rtlpriv->works.hw = hw;
+ rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
+ INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
+- (void *)rtl_watchdog_wq_callback);
++ rtl_watchdog_wq_callback);
+ INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq,
+- (void *)rtl_ips_nic_off_wq_callback);
++ rtl_ips_nic_off_wq_callback);
+ INIT_DELAYED_WORK(&rtlpriv->works.ps_work,
+- (void *)rtl_swlps_wq_callback);
++ rtl_swlps_wq_callback);
+ INIT_DELAYED_WORK(&rtlpriv->works.ps_rfon_wq,
+- (void *)rtl_swlps_rfon_wq_callback);
++ rtl_swlps_rfon_wq_callback);
+ INIT_DELAYED_WORK(&rtlpriv->works.fwevt_wq,
+- (void *)rtl_fwevt_wq_callback);
++ rtl_fwevt_wq_callback);
+
+ }
+
+@@ -1559,7 +1559,7 @@ void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
+ }
+ EXPORT_SYMBOL_GPL(rtl_beacon_statistic);
+
+-void rtl_watchdog_wq_callback(void *data)
++void rtl_watchdog_wq_callback(struct work_struct *data)
+ {
+ struct rtl_works *rtlworks = container_of_dwork_rtl(data,
+ struct rtl_works,
+@@ -1722,7 +1722,7 @@ void rtl_watch_dog_timer_callback(unsigned long data)
+ mod_timer(&rtlpriv->works.watchdog_timer,
+ jiffies + MSECS(RTL_WATCH_DOG_TIME));
+ }
+-void rtl_fwevt_wq_callback(void *data)
++void rtl_fwevt_wq_callback(struct work_struct *data)
+ {
+ struct rtl_works *rtlworks =
+ container_of_dwork_rtl(data, struct rtl_works, fwevt_wq);
+diff --git a/drivers/net/wireless/realtek/rtlwifi/base.h b/drivers/net/wireless/realtek/rtlwifi/base.h
+index 74233d6..482e495 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/base.h
++++ b/drivers/net/wireless/realtek/rtlwifi/base.h
+@@ -134,8 +134,8 @@ int rtl_rx_agg_start(struct ieee80211_hw *hw,
+ struct ieee80211_sta *sta, u16 tid);
+ int rtl_rx_agg_stop(struct ieee80211_hw *hw,
+ struct ieee80211_sta *sta, u16 tid);
+-void rtl_watchdog_wq_callback(void *data);
+-void rtl_fwevt_wq_callback(void *data);
++void rtl_watchdog_wq_callback(struct work_struct *data);
++void rtl_fwevt_wq_callback(struct work_struct *data);
+
+ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
+ struct ieee80211_tx_info *info,
+diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
+index 7f471bf..de826f0 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
++++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
+@@ -1100,13 +1100,16 @@ done:
+ return ret;
+ }
+
+-static void _rtl_pci_irq_tasklet(struct ieee80211_hw *hw)
++static void _rtl_pci_irq_tasklet(unsigned long _hw)
+ {
++ struct ieee80211_hw *hw = (struct ieee80211_hw *)_hw;
++
+ _rtl_pci_tx_chk_waitq(hw);
+ }
+
+-static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
++static void _rtl_pci_prepare_bcn_tasklet(unsigned long _hw)
+ {
++ struct ieee80211_hw *hw = (struct ieee80211_hw *)_hw;
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
+ struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
+@@ -1226,12 +1229,8 @@ static void _rtl_pci_init_struct(struct ieee80211_hw *hw,
+ rtlpci->acm_method = EACMWAY2_SW;
+
+ /*task */
+- tasklet_init(&rtlpriv->works.irq_tasklet,
+- (void (*)(unsigned long))_rtl_pci_irq_tasklet,
+- (unsigned long)hw);
+- tasklet_init(&rtlpriv->works.irq_prepare_bcn_tasklet,
+- (void (*)(unsigned long))_rtl_pci_prepare_bcn_tasklet,
+- (unsigned long)hw);
++ tasklet_init(&rtlpriv->works.irq_tasklet, _rtl_pci_irq_tasklet, (unsigned long)hw);
++ tasklet_init(&rtlpriv->works.irq_prepare_bcn_tasklet, _rtl_pci_prepare_bcn_tasklet, (unsigned long)hw);
+ INIT_WORK(&rtlpriv->works.lps_change_work,
+ rtl_lps_change_work_callback);
+ }
+diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
+index b69321d..ee3a01c 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/ps.c
++++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
+@@ -205,7 +205,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw)
+ ppsc->swrf_processing = false;
+ }
+
+-void rtl_ips_nic_off_wq_callback(void *data)
++void rtl_ips_nic_off_wq_callback(struct work_struct *data)
+ {
+ struct rtl_works *rtlworks =
+ container_of_dwork_rtl(data, struct rtl_works, ips_nic_off_wq);
+@@ -595,7 +595,7 @@ void rtl_swlps_rf_awake(struct ieee80211_hw *hw)
+ spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag);
+ }
+
+-void rtl_swlps_rfon_wq_callback(void *data)
++void rtl_swlps_rfon_wq_callback(struct work_struct *data)
+ {
+ struct rtl_works *rtlworks =
+ container_of_dwork_rtl(data, struct rtl_works, ps_rfon_wq);
+@@ -687,7 +687,7 @@ void rtl_lps_change_work_callback(struct work_struct *work)
+ }
+ EXPORT_SYMBOL_GPL(rtl_lps_change_work_callback);
+
+-void rtl_swlps_wq_callback(void *data)
++void rtl_swlps_wq_callback(struct work_struct *data)
+ {
+ struct rtl_works *rtlworks = container_of_dwork_rtl(data,
+ struct rtl_works,
+diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.h b/drivers/net/wireless/realtek/rtlwifi/ps.h
+index 29dfc51..8297755 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/ps.h
++++ b/drivers/net/wireless/realtek/rtlwifi/ps.h
+@@ -35,15 +35,15 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw);
+ bool rtl_ps_disable_nic(struct ieee80211_hw *hw);
+ void rtl_ips_nic_off(struct ieee80211_hw *hw);
+ void rtl_ips_nic_on(struct ieee80211_hw *hw);
+-void rtl_ips_nic_off_wq_callback(void *data);
++void rtl_ips_nic_off_wq_callback(struct work_struct *data);
+ void rtl_lps_enter(struct ieee80211_hw *hw);
+ void rtl_lps_leave(struct ieee80211_hw *hw);
+
+ void rtl_lps_set_psmode(struct ieee80211_hw *hw, u8 rt_psmode);
+
+ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len);
+-void rtl_swlps_wq_callback(void *data);
+-void rtl_swlps_rfon_wq_callback(void *data);
++void rtl_swlps_wq_callback(struct work_struct *data);
++void rtl_swlps_rfon_wq_callback(struct work_struct *data);
+ void rtl_swlps_rf_awake(struct ieee80211_hw *hw);
+ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw);
+ void rtl_p2p_ps_cmd(struct ieee80211_hw *hw , u8 p2p_ps_state);
diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
index b661f896..ddf7d2b 100644
--- a/drivers/net/wireless/ti/wl1251/sdio.c
@@ -54771,10 +64907,10 @@ index b661f896..ddf7d2b 100644
wl1251_info("using SDIO interrupt");
}
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
-index af0fe2e..d04986b 100644
+index a0d6ccc..93d9ac5 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
-@@ -655,7 +655,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
+@@ -656,7 +656,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
sizeof(wl->conf.mem));
/* read data preparation is only needed by wl127x */
@@ -54785,7 +64921,7 @@ index af0fe2e..d04986b 100644
wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER,
WL127X_IFTYPE_SR_VER, WL127X_MAJOR_SR_VER,
-@@ -680,7 +682,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
+@@ -681,7 +683,9 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
sizeof(wl->conf.mem));
/* read data preparation is only needed by wl127x */
@@ -54797,10 +64933,10 @@ index af0fe2e..d04986b 100644
wlcore_set_min_fw_ver(wl, WL127X_CHIP_VER,
WL127X_IFTYPE_SR_VER, WL127X_MAJOR_SR_VER,
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
-index 50cce42..f40cfd3 100644
+index 1bf26cc..3b15c02 100644
--- a/drivers/net/wireless/ti/wl18xx/main.c
+++ b/drivers/net/wireless/ti/wl18xx/main.c
-@@ -2005,8 +2005,10 @@ static int wl18xx_setup(struct wl1271 *wl)
+@@ -2018,8 +2018,10 @@ static int wl18xx_setup(struct wl1271 *wl)
}
if (!checksum_param) {
@@ -54813,10 +64949,445 @@ index 50cce42..f40cfd3 100644
}
/* Enable 11a Band only if we have 5G antennas */
-diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
+diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zydas/zd1201.c
+index 6f5c793..42f0dde 100644
+--- a/drivers/net/wireless/zydas/zd1201.c
++++ b/drivers/net/wireless/zydas/zd1201.c
+@@ -891,7 +891,7 @@ static void zd1201_set_multicast(struct net_device *dev)
+ }
+
+ static int zd1201_config_commit(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *data, char *essid)
++ struct iw_request_info *info, union iwreq_data *data, char *essid)
+ {
+ struct zd1201 *zd = netdev_priv(dev);
+
+@@ -899,15 +899,18 @@ static int zd1201_config_commit(struct net_device *dev,
+ }
+
+ static int zd1201_get_name(struct net_device *dev,
+- struct iw_request_info *info, char *name, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ char *name = wrqu->name;
++
+ strcpy(name, "IEEE 802.11b");
+ return 0;
+ }
+
+ static int zd1201_set_freq(struct net_device *dev,
+- struct iw_request_info *info, struct iw_freq *freq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *freq = &wrqu->freq;
+ struct zd1201 *zd = netdev_priv(dev);
+ short channel = 0;
+ int err;
+@@ -927,8 +930,9 @@ static int zd1201_set_freq(struct net_device *dev,
+ }
+
+ static int zd1201_get_freq(struct net_device *dev,
+- struct iw_request_info *info, struct iw_freq *freq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *freq = &wrqu->freq;
+ struct zd1201 *zd = netdev_priv(dev);
+ short channel;
+ int err;
+@@ -943,8 +947,9 @@ static int zd1201_get_freq(struct net_device *dev,
+ }
+
+ static int zd1201_set_mode(struct net_device *dev,
+- struct iw_request_info *info, __u32 *mode, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ __u32 *mode = &wrqu->mode;
+ struct zd1201 *zd = netdev_priv(dev);
+ short porttype, monitor = 0;
+ unsigned char buffer[IW_ESSID_MAX_SIZE+2];
+@@ -1005,8 +1010,9 @@ static int zd1201_set_mode(struct net_device *dev,
+ }
+
+ static int zd1201_get_mode(struct net_device *dev,
+- struct iw_request_info *info, __u32 *mode, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ __u32 *mode = &wrqu->mode;
+ struct zd1201 *zd = netdev_priv(dev);
+ short porttype;
+ int err;
+@@ -1042,8 +1048,9 @@ static int zd1201_get_mode(struct net_device *dev,
+ }
+
+ static int zd1201_get_range(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *wrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *wrq = &wrqu->data;
+ struct iw_range *range = (struct iw_range *)extra;
+
+ wrq->length = sizeof(struct iw_range);
+@@ -1081,8 +1088,9 @@ static int zd1201_get_range(struct net_device *dev,
+ * the stats after asking the bssid.
+ */
+ static int zd1201_get_wap(struct net_device *dev,
+- struct iw_request_info *info, struct sockaddr *ap_addr, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct zd1201 *zd = netdev_priv(dev);
+ unsigned char buffer[6];
+
+@@ -1102,15 +1110,16 @@ static int zd1201_get_wap(struct net_device *dev,
+ }
+
+ static int zd1201_set_scan(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *srq, char *extra)
++ struct iw_request_info *info, union iwreq_data *srq, char *extra)
+ {
+ /* We do everything in get_scan */
+ return 0;
+ }
+
+ static int zd1201_get_scan(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *srq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *srq = &wrqu->data;
+ struct zd1201 *zd = netdev_priv(dev);
+ int err, i, j, enabled_save;
+ struct iw_event iwe;
+@@ -1201,8 +1210,9 @@ static int zd1201_get_scan(struct net_device *dev,
+ }
+
+ static int zd1201_set_essid(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *data, char *essid)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *essid)
+ {
++ struct iw_point *data = &wrqu->essid;
+ struct zd1201 *zd = netdev_priv(dev);
+
+ if (data->length > IW_ESSID_MAX_SIZE)
+@@ -1216,8 +1226,9 @@ static int zd1201_set_essid(struct net_device *dev,
+ }
+
+ static int zd1201_get_essid(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *data, char *essid)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *essid)
+ {
++ struct iw_point *data = &wrqu->essid;
+ struct zd1201 *zd = netdev_priv(dev);
+
+ memcpy(essid, zd->essid, zd->essidlen);
+@@ -1228,8 +1239,10 @@ static int zd1201_get_essid(struct net_device *dev,
+ }
+
+ static int zd1201_get_nick(struct net_device *dev, struct iw_request_info *info,
+- struct iw_point *data, char *nick)
++ union iwreq_data *wrqu, char *nick)
+ {
++ struct iw_point *data = &wrqu->data;
++
+ strcpy(nick, "zd1201");
+ data->flags = 1;
+ data->length = strlen(nick);
+@@ -1237,8 +1250,9 @@ static int zd1201_get_nick(struct net_device *dev, struct iw_request_info *info,
+ }
+
+ static int zd1201_set_rate(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct zd1201 *zd = netdev_priv(dev);
+ short rate;
+ int err;
+@@ -1270,8 +1284,9 @@ static int zd1201_set_rate(struct net_device *dev,
+ }
+
+ static int zd1201_get_rate(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->bitrate;
+ struct zd1201 *zd = netdev_priv(dev);
+ short rate;
+ int err;
+@@ -1303,8 +1318,9 @@ static int zd1201_get_rate(struct net_device *dev,
+ }
+
+ static int zd1201_set_rts(struct net_device *dev, struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct zd1201 *zd = netdev_priv(dev);
+ int err;
+ short val = rts->value;
+@@ -1323,8 +1339,9 @@ static int zd1201_set_rts(struct net_device *dev, struct iw_request_info *info,
+ }
+
+ static int zd1201_get_rts(struct net_device *dev, struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct zd1201 *zd = netdev_priv(dev);
+ short rtst;
+ int err;
+@@ -1340,8 +1357,9 @@ static int zd1201_get_rts(struct net_device *dev, struct iw_request_info *info,
+ }
+
+ static int zd1201_set_frag(struct net_device *dev, struct iw_request_info *info,
+- struct iw_param *frag, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *frag = &wrqu->frag;
+ struct zd1201 *zd = netdev_priv(dev);
+ int err;
+ short val = frag->value;
+@@ -1361,8 +1379,9 @@ static int zd1201_set_frag(struct net_device *dev, struct iw_request_info *info,
+ }
+
+ static int zd1201_get_frag(struct net_device *dev, struct iw_request_info *info,
+- struct iw_param *frag, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *frag = &wrqu->frag;
+ struct zd1201 *zd = netdev_priv(dev);
+ short fragt;
+ int err;
+@@ -1378,20 +1397,21 @@ static int zd1201_get_frag(struct net_device *dev, struct iw_request_info *info,
+ }
+
+ static int zd1201_set_retry(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *rrq, char *extra)
+ {
+ return 0;
+ }
+
+ static int zd1201_get_retry(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *rrq, char *extra)
+ {
+ return 0;
+ }
+
+ static int zd1201_set_encode(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *erq, char *key)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *key)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct zd1201 *zd = netdev_priv(dev);
+ short i;
+ int err, rid;
+@@ -1447,8 +1467,9 @@ static int zd1201_set_encode(struct net_device *dev,
+ }
+
+ static int zd1201_get_encode(struct net_device *dev,
+- struct iw_request_info *info, struct iw_point *erq, char *key)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *key)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct zd1201 *zd = netdev_priv(dev);
+ short i;
+ int err;
+@@ -1480,8 +1501,9 @@ static int zd1201_get_encode(struct net_device *dev,
+ }
+
+ static int zd1201_set_power(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *vwrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->power;
+ struct zd1201 *zd = netdev_priv(dev);
+ short enabled, duration, level;
+ int err;
+@@ -1519,8 +1541,9 @@ out:
+ }
+
+ static int zd1201_get_power(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *vwrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *vwrq = &wrqu->power;
+ struct zd1201 *zd = netdev_priv(dev);
+ short enabled, level, duration;
+ int err;
+@@ -1557,57 +1580,58 @@ static int zd1201_get_power(struct net_device *dev,
+
+ static const iw_handler zd1201_iw_handler[] =
+ {
+- (iw_handler) zd1201_config_commit, /* SIOCSIWCOMMIT */
+- (iw_handler) zd1201_get_name, /* SIOCGIWNAME */
+- (iw_handler) NULL, /* SIOCSIWNWID */
+- (iw_handler) NULL, /* SIOCGIWNWID */
+- (iw_handler) zd1201_set_freq, /* SIOCSIWFREQ */
+- (iw_handler) zd1201_get_freq, /* SIOCGIWFREQ */
+- (iw_handler) zd1201_set_mode, /* SIOCSIWMODE */
+- (iw_handler) zd1201_get_mode, /* SIOCGIWMODE */
+- (iw_handler) NULL, /* SIOCSIWSENS */
+- (iw_handler) NULL, /* SIOCGIWSENS */
+- (iw_handler) NULL, /* SIOCSIWRANGE */
+- (iw_handler) zd1201_get_range, /* SIOCGIWRANGE */
+- (iw_handler) NULL, /* SIOCSIWPRIV */
+- (iw_handler) NULL, /* SIOCGIWPRIV */
+- (iw_handler) NULL, /* SIOCSIWSTATS */
+- (iw_handler) NULL, /* SIOCGIWSTATS */
+- (iw_handler) NULL, /* SIOCSIWSPY */
+- (iw_handler) NULL, /* SIOCGIWSPY */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL/*zd1201_set_wap*/, /* SIOCSIWAP */
+- (iw_handler) zd1201_get_wap, /* SIOCGIWAP */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* SIOCGIWAPLIST */
+- (iw_handler) zd1201_set_scan, /* SIOCSIWSCAN */
+- (iw_handler) zd1201_get_scan, /* SIOCGIWSCAN */
+- (iw_handler) zd1201_set_essid, /* SIOCSIWESSID */
+- (iw_handler) zd1201_get_essid, /* SIOCGIWESSID */
+- (iw_handler) NULL, /* SIOCSIWNICKN */
+- (iw_handler) zd1201_get_nick, /* SIOCGIWNICKN */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) NULL, /* -- hole -- */
+- (iw_handler) zd1201_set_rate, /* SIOCSIWRATE */
+- (iw_handler) zd1201_get_rate, /* SIOCGIWRATE */
+- (iw_handler) zd1201_set_rts, /* SIOCSIWRTS */
+- (iw_handler) zd1201_get_rts, /* SIOCGIWRTS */
+- (iw_handler) zd1201_set_frag, /* SIOCSIWFRAG */
+- (iw_handler) zd1201_get_frag, /* SIOCGIWFRAG */
+- (iw_handler) NULL, /* SIOCSIWTXPOW */
+- (iw_handler) NULL, /* SIOCGIWTXPOW */
+- (iw_handler) zd1201_set_retry, /* SIOCSIWRETRY */
+- (iw_handler) zd1201_get_retry, /* SIOCGIWRETRY */
+- (iw_handler) zd1201_set_encode, /* SIOCSIWENCODE */
+- (iw_handler) zd1201_get_encode, /* SIOCGIWENCODE */
+- (iw_handler) zd1201_set_power, /* SIOCSIWPOWER */
+- (iw_handler) zd1201_get_power, /* SIOCGIWPOWER */
++ zd1201_config_commit, /* SIOCSIWCOMMIT */
++ zd1201_get_name, /* SIOCGIWNAME */
++ NULL, /* SIOCSIWNWID */
++ NULL, /* SIOCGIWNWID */
++ zd1201_set_freq, /* SIOCSIWFREQ */
++ zd1201_get_freq, /* SIOCGIWFREQ */
++ zd1201_set_mode, /* SIOCSIWMODE */
++ zd1201_get_mode, /* SIOCGIWMODE */
++ NULL, /* SIOCSIWSENS */
++ NULL, /* SIOCGIWSENS */
++ NULL, /* SIOCSIWRANGE */
++ zd1201_get_range, /* SIOCGIWRANGE */
++ NULL, /* SIOCSIWPRIV */
++ NULL, /* SIOCGIWPRIV */
++ NULL, /* SIOCSIWSTATS */
++ NULL, /* SIOCGIWSTATS */
++ NULL, /* SIOCSIWSPY */
++ NULL, /* SIOCGIWSPY */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ NULL/*zd1201_set_wap*/, /* SIOCSIWAP */
++ zd1201_get_wap, /* SIOCGIWAP */
++ NULL, /* -- hole -- */
++ NULL, /* SIOCGIWAPLIST */
++ zd1201_set_scan, /* SIOCSIWSCAN */
++ zd1201_get_scan, /* SIOCGIWSCAN */
++ zd1201_set_essid, /* SIOCSIWESSID */
++ zd1201_get_essid, /* SIOCGIWESSID */
++ NULL, /* SIOCSIWNICKN */
++ zd1201_get_nick, /* SIOCGIWNICKN */
++ NULL, /* -- hole -- */
++ NULL, /* -- hole -- */
++ zd1201_set_rate, /* SIOCSIWRATE */
++ zd1201_get_rate, /* SIOCGIWRATE */
++ zd1201_set_rts, /* SIOCSIWRTS */
++ zd1201_get_rts, /* SIOCGIWRTS */
++ zd1201_set_frag, /* SIOCSIWFRAG */
++ zd1201_get_frag, /* SIOCGIWFRAG */
++ NULL, /* SIOCSIWTXPOW */
++ NULL, /* SIOCGIWTXPOW */
++ zd1201_set_retry, /* SIOCSIWRETRY */
++ zd1201_get_retry, /* SIOCGIWRETRY */
++ zd1201_set_encode, /* SIOCSIWENCODE */
++ zd1201_get_encode, /* SIOCGIWENCODE */
++ zd1201_set_power, /* SIOCSIWPOWER */
++ zd1201_get_power, /* SIOCGIWPOWER */
+ };
+
+ static int zd1201_set_hostauth(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->param;
+ struct zd1201 *zd = netdev_priv(dev);
+
+ if (!zd->ap)
+@@ -1617,8 +1641,9 @@ static int zd1201_set_hostauth(struct net_device *dev,
+ }
+
+ static int zd1201_get_hostauth(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->param;
+ struct zd1201 *zd = netdev_priv(dev);
+ short hostauth;
+ int err;
+@@ -1636,8 +1661,9 @@ static int zd1201_get_hostauth(struct net_device *dev,
+ }
+
+ static int zd1201_auth_sta(struct net_device *dev,
+- struct iw_request_info *info, struct sockaddr *sta, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *sta = &wrqu->addr;
+ struct zd1201 *zd = netdev_priv(dev);
+ unsigned char buffer[10];
+
+@@ -1652,8 +1678,9 @@ static int zd1201_auth_sta(struct net_device *dev,
+ }
+
+ static int zd1201_set_maxassoc(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->param;
+ struct zd1201 *zd = netdev_priv(dev);
+ int err;
+
+@@ -1667,8 +1694,9 @@ static int zd1201_set_maxassoc(struct net_device *dev,
+ }
+
+ static int zd1201_get_maxassoc(struct net_device *dev,
+- struct iw_request_info *info, struct iw_param *rrq, char *extra)
++ struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rrq = &wrqu->param;
+ struct zd1201 *zd = netdev_priv(dev);
+ short maxassoc;
+ int err;
+@@ -1686,12 +1714,12 @@ static int zd1201_get_maxassoc(struct net_device *dev,
+ }
+
+ static const iw_handler zd1201_private_handler[] = {
+- (iw_handler) zd1201_set_hostauth, /* ZD1201SIWHOSTAUTH */
+- (iw_handler) zd1201_get_hostauth, /* ZD1201GIWHOSTAUTH */
+- (iw_handler) zd1201_auth_sta, /* ZD1201SIWAUTHSTA */
+- (iw_handler) NULL, /* nothing to get */
+- (iw_handler) zd1201_set_maxassoc, /* ZD1201SIMAXASSOC */
+- (iw_handler) zd1201_get_maxassoc, /* ZD1201GIMAXASSOC */
++ zd1201_set_hostauth, /* ZD1201SIWHOSTAUTH */
++ zd1201_get_hostauth, /* ZD1201GIWHOSTAUTH */
++ zd1201_auth_sta, /* ZD1201SIWAUTHSTA */
++ NULL, /* nothing to get */
++ zd1201_set_maxassoc, /* ZD1201SIMAXASSOC */
++ zd1201_get_maxassoc, /* ZD1201GIMAXASSOC */
+ };
+
+ static const struct iw_priv_args zd1201_private_args[] = {
+diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
index a912dc0..a8225ba 100644
---- a/drivers/net/wireless/zd1211rw/zd_usb.c
-+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
+--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
++++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
@@ -385,7 +385,7 @@ static inline void handle_regs_int(struct urb *urb)
{
struct zd_usb *usb = urb->context;
@@ -54826,6 +65397,19 @@ index a912dc0..a8225ba 100644
u16 int_num;
ZD_ASSERT(in_interrupt());
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 680f578..cf80097 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -2183,7 +2183,7 @@ static int nvme_resume(struct device *dev)
+ static SIMPLE_DEV_PM_OPS(nvme_dev_pm_ops, nvme_suspend, nvme_resume);
+
+ static pci_ers_result_t nvme_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct nvme_dev *dev = pci_get_drvdata(pdev);
+
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 655f79d..509e3cd 100644
--- a/drivers/of/fdt.c
@@ -54949,20 +65533,9 @@ index 1fc622b..8c48fc3 100644
extern struct oprofile_stat_struct oprofile_stats;
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
-index dd92c5e..dfc04b5 100644
+index b48ac630..df1b012 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
-@@ -176,8 +176,8 @@ int oprofilefs_create_ro_ulong(struct dentry *root,
-
- static ssize_t atomic_read_file(struct file *file, char __user *buf, size_t count, loff_t *offset)
- {
-- atomic_t *val = file->private_data;
-- return oprofilefs_ulong_to_user(atomic_read(val), buf, count, offset);
-+ atomic_unchecked_t *val = file->private_data;
-+ return oprofilefs_ulong_to_user(atomic_read_unchecked(val), buf, count, offset);
- }
-
-
@@ -189,7 +189,7 @@ static const struct file_operations atomic_ro_fops = {
@@ -55008,7 +65581,7 @@ index c776333..aa6b325 100644
#endif /* IEEE1284.3 support. */
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
-index 5434c90..c7f4ead 100644
+index 1652bc7..4f999c4 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -28,7 +28,7 @@
@@ -55021,10 +65594,10 @@ index 5434c90..c7f4ead 100644
struct gen_pci_cfg_windows {
struct resource res;
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
-index 6ca2399..68d866b 100644
+index 2f6d3a1..5bc1bf1 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
-@@ -452,7 +452,9 @@ static int __init ibm_acpiphp_init(void)
+@@ -463,7 +463,9 @@ static int __init ibm_acpiphp_init(void)
goto init_cleanup;
}
@@ -55036,7 +65609,7 @@ index 6ca2399..68d866b 100644
return retval;
diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
-index 66b7bbe..26bee78 100644
+index 88a44a7..de358ce 100644
--- a/drivers/pci/hotplug/cpcihp_generic.c
+++ b/drivers/pci/hotplug/cpcihp_generic.c
@@ -73,7 +73,6 @@ static u16 port;
@@ -55061,13 +65634,13 @@ index 66b7bbe..26bee78 100644
@@ -165,7 +168,6 @@ static int __init cpcihp_generic_init(void)
pci_dev_put(dev);
- memset(&generic_hpc, 0, sizeof (struct cpci_hp_controller));
+ memset(&generic_hpc, 0, sizeof(struct cpci_hp_controller));
- generic_hpc_ops.query_enum = query_enum;
generic_hpc.ops = &generic_hpc_ops;
status = cpci_hp_register_controller(&generic_hpc);
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
-index 7ecf34e..effed62 100644
+index 5f49c3f..989cd41 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -59,7 +59,6 @@
@@ -55086,13 +65659,13 @@ index 7ecf34e..effed62 100644
+ .query_enum = zt5550_hc_query_enum,
+};
+
- static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
+ static int zt5550_hc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int status;
-@@ -215,16 +218,17 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
+@@ -215,16 +218,17 @@ static int zt5550_hc_init_one(struct pci_dev *pdev, const struct pci_device_id *
dbg("returned from zt5550_hc_config");
- memset(&zt5550_hpc, 0, sizeof (struct cpci_hp_controller));
+ memset(&zt5550_hpc, 0, sizeof(struct cpci_hp_controller));
- zt5550_hpc_ops.query_enum = zt5550_hc_query_enum;
zt5550_hpc.ops = &zt5550_hpc_ops;
if (!poll) {
@@ -55112,12 +65685,12 @@ index 7ecf34e..effed62 100644
info("using ENUM# polling mode");
}
diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
-index 1e08ff8c..3cd145f 100644
+index c25fc90..b054774 100644
--- a/drivers/pci/hotplug/cpqphp_nvram.c
+++ b/drivers/pci/hotplug/cpqphp_nvram.c
-@@ -425,8 +425,10 @@ static u32 store_HRT (void __iomem *rom_start)
+@@ -425,8 +425,10 @@ static u32 store_HRT(void __iomem *rom_start)
- void compaq_nvram_init (void __iomem *rom_start)
+ void compaq_nvram_init(void __iomem *rom_start)
{
+#ifndef CONFIG_PAX_KERNEXEC
if (rom_start)
@@ -55127,10 +65700,10 @@ index 1e08ff8c..3cd145f 100644
dbg("int15 entry = %p\n", compaq_int15_entry_point);
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
-index d1fab97..71d04bf 100644
+index 9acd199..0645a09 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
-@@ -436,8 +436,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
+@@ -434,8 +434,10 @@ int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *bus,
return -EINVAL;
}
@@ -55144,7 +65717,7 @@ index d1fab97..71d04bf 100644
mutex_lock(&pci_hp_mutex);
/*
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
-index 612b21a..9494a5e 100644
+index ac531e6..716d058 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -87,7 +87,7 @@ static int init_slot(struct controller *ctrl)
@@ -55157,10 +65730,10 @@ index 612b21a..9494a5e 100644
int retval = -ENOMEM;
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
-index 7eaa4c8..b858f21 100644
+index a080f44..9ff42d9 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
-@@ -472,8 +472,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
+@@ -474,8 +474,8 @@ static int populate_msi_sysfs(struct pci_dev *pdev)
{
struct attribute **msi_attrs;
struct attribute *msi_attr;
@@ -55171,7 +65744,7 @@ index 7eaa4c8..b858f21 100644
const struct attribute_group **msi_irq_groups;
struct msi_desc *entry;
int ret = -ENOMEM;
-@@ -535,7 +535,7 @@ error_attrs:
+@@ -537,7 +537,7 @@ error_attrs:
count = 0;
msi_attr = msi_attrs[count];
while (msi_attr) {
@@ -55180,7 +65753,7 @@ index 7eaa4c8..b858f21 100644
kfree(msi_attr->name);
kfree(msi_dev_attr);
++count;
-@@ -1234,12 +1234,14 @@ static void pci_msi_domain_update_dom_ops(struct msi_domain_info *info)
+@@ -1233,12 +1233,14 @@ static void pci_msi_domain_update_dom_ops(struct msi_domain_info *info)
if (ops == NULL) {
info->ops = &pci_msi_domain_ops_default;
} else {
@@ -55198,7 +65771,7 @@ index 7eaa4c8..b858f21 100644
}
}
-@@ -1248,12 +1250,14 @@ static void pci_msi_domain_update_chip_ops(struct msi_domain_info *info)
+@@ -1247,12 +1249,14 @@ static void pci_msi_domain_update_chip_ops(struct msi_domain_info *info)
struct irq_chip *chip = info->chip;
BUG_ON(!chip);
@@ -55217,10 +65790,10 @@ index 7eaa4c8..b858f21 100644
/**
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
-index eead54c..a611b6c 100644
+index 95d9e7b..f0ad49e 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
-@@ -1143,7 +1143,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
+@@ -1133,7 +1133,7 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
{
/* allocate attribute structure, piggyback attribute name */
int name_len = write_combine ? 13 : 10;
@@ -55229,7 +65802,7 @@ index eead54c..a611b6c 100644
int retval;
res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
-@@ -1320,7 +1320,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor
+@@ -1310,7 +1310,7 @@ static struct device_attribute reset_attr = __ATTR(reset, 0200, NULL, reset_stor
static int pci_create_capabilities_sysfs(struct pci_dev *dev)
{
int retval;
@@ -55238,7 +65811,7 @@ index eead54c..a611b6c 100644
/* If the device has VPD, try to expose it in sysfs. */
if (dev->vpd) {
-@@ -1367,7 +1367,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
+@@ -1357,7 +1357,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev)
{
int retval;
int rom_size = 0;
@@ -55248,7 +65821,7 @@ index eead54c..a611b6c 100644
if (!sysfs_initialized)
return -EACCES;
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
-index d390fc1..d410fda 100644
+index 9a1660f..278d340 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -103,7 +103,7 @@ struct pci_vpd_ops {
@@ -55260,8 +65833,17 @@ index d390fc1..d410fda 100644
};
int pci_vpd_pci22_init(struct pci_dev *dev);
+@@ -302,7 +302,7 @@ static inline int pci_iov_bus_range(struct pci_bus *bus)
+
+ #endif /* CONFIG_PCI_IOV */
+
+-unsigned long pci_cardbus_resource_alignment(struct resource *);
++unsigned long pci_cardbus_resource_alignment(const struct resource *);
+
+ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev,
+ struct resource *res)
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
-index 317e355..21f7b91 100644
+index 2dfe7fd..61f8677 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -27,9 +27,9 @@
@@ -55277,6 +65859,24 @@ index 317e355..21f7b91 100644
#define ASPM_STATE_L0S (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW)
#define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1)
+@@ -775,7 +775,7 @@ void pci_disable_link_state(struct pci_dev *pdev, int state)
+ }
+ EXPORT_SYMBOL(pci_disable_link_state);
+
+-static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
++static int pcie_aspm_set_policy(const char *val, const struct kernel_param *kp)
+ {
+ int i;
+ struct pcie_link_state *link;
+@@ -802,7 +802,7 @@ static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp)
+ return 0;
+ }
+
+-static int pcie_aspm_get_policy(char *buffer, struct kernel_param *kp)
++static int pcie_aspm_get_policy(char *buffer, const struct kernel_param *kp)
+ {
+ int i, cnt = 0;
+ for (i = 0; i < ARRAY_SIZE(policy_str); i++)
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index be35da2..ec16cdb 100644
--- a/drivers/pci/pcie/portdrv_pci.c
@@ -55291,7 +65891,7 @@ index be35da2..ec16cdb 100644
* Boxes that should not use MSI for PCIe PME signaling.
*/
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
-index 7aafb5f..8fbfd44 100644
+index 6b0056e..c8105d5 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -182,7 +182,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
@@ -55324,11 +65924,24 @@ index 3f155e7..0f4b1f0 100644
proc_create("devices", 0, proc_bus_pci_dir,
&proc_bus_pci_dev_operations);
proc_initialized = 1;
+diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
+index 7796d0a..c83b0ae 100644
+--- a/drivers/pci/setup-bus.c
++++ b/drivers/pci/setup-bus.c
+@@ -1115,7 +1115,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
+ return 0;
+ }
+
+-unsigned long pci_cardbus_resource_alignment(struct resource *res)
++unsigned long pci_cardbus_resource_alignment(const struct resource *res)
+ {
+ if (res->flags & IORESOURCE_IO)
+ return pci_cardbus_io_size;
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
-index f844b4a..5e43134 100644
+index c8969dd..4764267 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
-@@ -1212,7 +1212,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
+@@ -1207,7 +1207,7 @@ static int nmk_gpio_probe(struct platform_device *dev)
struct device_node *np = dev->dev.of_node;
struct nmk_gpio_chip *nmk_chip;
struct gpio_chip *chip;
@@ -55338,7 +65951,7 @@ index f844b4a..5e43134 100644
bool supports_sleepmode;
int irq;
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
-index 0d2fc0c..6f9ff62 100644
+index 523b6b7..e9aa88d 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -24,6 +24,7 @@
@@ -55349,7 +65962,7 @@ index 0d2fc0c..6f9ff62 100644
#include "pinctrl-at91.h"
#include "core.h"
-@@ -1613,7 +1614,9 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
+@@ -1609,7 +1610,9 @@ static int at91_gpio_of_irq_setup(struct platform_device *pdev,
at91_gpio->pioc_hwirq = irqd_to_hwirq(d);
/* Setup proper .irq_set_type function */
@@ -55395,11 +66008,24 @@ index 1e1e594..8fe59c5 100644
.name = "rgb_zones",
};
+diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
+index f236250..6b4d0a9 100644
+--- a/drivers/platform/x86/apple-gmux.c
++++ b/drivers/platform/x86/apple-gmux.c
+@@ -425,7 +425,7 @@ static int gmux_set_power_state(enum vga_switcheroo_client_id id,
+ return gmux_set_discrete_state(apple_gmux_data, state);
+ }
+
+-static int gmux_get_client_id(struct pci_dev *pdev)
++static enum vga_switcheroo_client_id gmux_get_client_id(struct pci_dev *pdev)
+ {
+ /*
+ * Early Macbook Pros with switchable graphics use nvidia
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
-index f96f7b8..2d17b99 100644
+index a96630d..0fe8410 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
-@@ -1870,6 +1870,10 @@ static int show_dsts(struct seq_file *m, void *data)
+@@ -1867,6 +1867,10 @@ static int show_dsts(struct seq_file *m, void *data)
int err;
u32 retval = -1;
@@ -55410,7 +66036,7 @@ index f96f7b8..2d17b99 100644
err = asus_wmi_get_devstate(asus, asus->debug.dev_id, &retval);
if (err < 0)
-@@ -1886,6 +1890,10 @@ static int show_devs(struct seq_file *m, void *data)
+@@ -1883,6 +1887,10 @@ static int show_devs(struct seq_file *m, void *data)
int err;
u32 retval = -1;
@@ -55421,7 +66047,7 @@ index f96f7b8..2d17b99 100644
err = asus_wmi_set_devstate(asus->debug.dev_id, asus->debug.ctrl_param,
&retval);
-@@ -1910,6 +1918,10 @@ static int show_call(struct seq_file *m, void *data)
+@@ -1907,6 +1915,10 @@ static int show_call(struct seq_file *m, void *data)
union acpi_object *obj;
acpi_status status;
@@ -55558,10 +66184,10 @@ index e6aac72..e11ff24 100644
.ident = "Samsung Q10",
.matches = {
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
-index f73c295..711e2f4 100644
+index e9caa34..72ed655 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
-@@ -2528,7 +2528,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd)
+@@ -2553,7 +2553,7 @@ static void sony_nc_gfx_switch_cleanup(struct platform_device *pd)
}
/* High speed charging function */
@@ -55570,7 +66196,7 @@ index f73c295..711e2f4 100644
static ssize_t sony_nc_highspeed_charging_store(struct device *dev,
struct device_attribute *attr,
-@@ -2602,7 +2602,7 @@ static void sony_nc_highspeed_charging_cleanup(struct platform_device *pd)
+@@ -2627,7 +2627,7 @@ static void sony_nc_highspeed_charging_cleanup(struct platform_device *pd)
}
/* low battery function */
@@ -55579,7 +66205,7 @@ index f73c295..711e2f4 100644
static ssize_t sony_nc_lowbatt_store(struct device *dev,
struct device_attribute *attr,
-@@ -2668,7 +2668,7 @@ static void sony_nc_lowbatt_cleanup(struct platform_device *pd)
+@@ -2693,7 +2693,7 @@ static void sony_nc_lowbatt_cleanup(struct platform_device *pd)
}
/* fan speed function */
@@ -55588,7 +66214,7 @@ index f73c295..711e2f4 100644
static ssize_t sony_nc_hsfan_store(struct device *dev,
struct device_attribute *attr,
-@@ -2775,7 +2775,7 @@ static void sony_nc_fanspeed_cleanup(struct platform_device *pd)
+@@ -2800,7 +2800,7 @@ static void sony_nc_fanspeed_cleanup(struct platform_device *pd)
}
/* USB charge function */
@@ -55597,7 +66223,7 @@ index f73c295..711e2f4 100644
static ssize_t sony_nc_usb_charge_store(struct device *dev,
struct device_attribute *attr,
-@@ -2849,7 +2849,7 @@ static void sony_nc_usb_charge_cleanup(struct platform_device *pd)
+@@ -2874,7 +2874,7 @@ static void sony_nc_usb_charge_cleanup(struct platform_device *pd)
}
/* Panel ID function */
@@ -55606,7 +66232,7 @@ index f73c295..711e2f4 100644
static ssize_t sony_nc_panelid_show(struct device *dev,
struct device_attribute *attr, char *buffer)
-@@ -2896,7 +2896,7 @@ static void sony_nc_panelid_cleanup(struct platform_device *pd)
+@@ -2921,7 +2921,7 @@ static void sony_nc_panelid_cleanup(struct platform_device *pd)
}
/* smart connect function */
@@ -55615,7 +66241,7 @@ index f73c295..711e2f4 100644
static ssize_t sony_nc_smart_conn_store(struct device *dev,
struct device_attribute *attr,
-@@ -4852,7 +4852,7 @@ static struct acpi_driver sony_pic_driver = {
+@@ -4877,7 +4877,7 @@ static struct acpi_driver sony_pic_driver = {
.drv.pm = &sony_pic_pm,
};
@@ -55625,10 +66251,10 @@ index f73c295..711e2f4 100644
.ident = "Sony Vaio",
.matches = {
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
-index 0bed473..c867ae2 100644
+index a268a7a..67a0be4 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
-@@ -2460,10 +2460,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
+@@ -2461,10 +2461,10 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
&& !tp_features.bright_unkfw)
TPACPI_MAY_SEND_KEY(TP_ACPI_HOTKEYSCAN_FNHOME);
}
@@ -55640,6 +66266,50 @@ index 0bed473..c867ae2 100644
/*
* Polling driver
+@@ -4164,7 +4164,7 @@ static int bluetooth_get_status(void)
+ TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
+ }
+
+-static int bluetooth_set_status(enum tpacpi_rfkill_state state)
++static int bluetooth_set_status(const enum tpacpi_rfkill_state state)
+ {
+ int status;
+
+@@ -4221,6 +4221,7 @@ static const struct attribute_group bluetooth_attr_group = {
+ .attrs = bluetooth_attributes,
+ };
+
++const struct tpacpi_rfk_ops bluetooth_tprfk_ops_;
+ static const struct tpacpi_rfk_ops bluetooth_tprfk_ops = {
+ .get_status = bluetooth_get_status,
+ .set_status = bluetooth_set_status,
+@@ -4352,7 +4353,7 @@ static int wan_get_status(void)
+ TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
+ }
+
+-static int wan_set_status(enum tpacpi_rfkill_state state)
++static int wan_set_status(const enum tpacpi_rfkill_state state)
+ {
+ int status;
+
+@@ -4538,7 +4539,7 @@ static int uwb_get_status(void)
+ TPACPI_RFK_RADIO_ON : TPACPI_RFK_RADIO_OFF;
+ }
+
+-static int uwb_set_status(enum tpacpi_rfkill_state state)
++static int uwb_set_status(const enum tpacpi_rfkill_state state)
+ {
+ int status;
+
+@@ -9450,7 +9451,7 @@ static struct ibm_init_struct ibms_init[] __initdata = {
+ },
+ };
+
+-static int __init set_ibm_param(const char *val, struct kernel_param *kp)
++static int __init set_ibm_param(const char *val, const struct kernel_param *kp)
+ {
+ unsigned int i;
+ struct ibm_struct *ibm;
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
index 438d4c7..ca8a2fb 100644
--- a/drivers/pnp/pnpbios/bioscalls.c
@@ -55807,7 +66477,7 @@ index ed2d7fd..266b28f 100644
__power_supply_attrs[i] = &power_supply_attrs[i].attr;
}
diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
-index 3f6b5dd..02c9986 100644
+index 1b5d450..3257054 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -17,6 +17,7 @@
@@ -55818,7 +66488,7 @@ index 3f6b5dd..02c9986 100644
#include <soc/at91/at91sam9_ddrsdr.h>
#include <soc/at91/at91sam9_sdramc.h>
-@@ -205,7 +206,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
+@@ -206,7 +207,9 @@ static int __init at91_reset_probe(struct platform_device *pdev)
}
match = of_match_node(at91_reset_of_match, pdev->dev.of_node);
@@ -55830,7 +66500,7 @@ index 3f6b5dd..02c9986 100644
sclk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(sclk))
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
-index 84419af..268ede8 100644
+index 14bde0d..89f2669 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -154,8 +154,77 @@ struct powercap_constraint_attr {
@@ -56045,10 +66715,10 @@ index 302e626..12579af 100644
da->attr.name = info->pin_config[i].name;
da->attr.mode = 0644;
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
-index 7b94b8e..1b35017 100644
+index 744c988..a269ffb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
-@@ -3842,7 +3842,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
+@@ -3839,7 +3839,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
const struct regulation_constraints *constraints = NULL;
const struct regulator_init_data *init_data;
struct regulator_config *config = NULL;
@@ -56057,7 +66727,7 @@ index 7b94b8e..1b35017 100644
struct regulator_dev *rdev;
struct device *dev;
int ret, i;
-@@ -3925,7 +3925,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
+@@ -3922,7 +3922,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
rdev->dev.class = &regulator_class;
rdev->dev.parent = dev;
dev_set_name(&rdev->dev, "regulator.%lu",
@@ -56137,6 +66807,96 @@ index 0d17c92..a29f627 100644
mc13892_regulators[MC13892_VCAM].desc.ops = &mc13892_vcam_ops;
mc13xxx_data = mc13xxx_parse_regulators_dt(pdev, mc13892_regulators,
+diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
+index 9e03d15..36e341c 100644
+--- a/drivers/remoteproc/remoteproc_core.c
++++ b/drivers/remoteproc/remoteproc_core.c
+@@ -327,9 +327,10 @@ void rproc_free_vring(struct rproc_vring *rvring)
+ *
+ * Returns 0 on success, or an appropriate error code otherwise
+ */
+-static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
++static int rproc_handle_vdev(struct rproc *rproc, void *_rsc,
+ int offset, int avail)
+ {
++ struct fw_rsc_vdev *rsc = _rsc;
+ struct device *dev = &rproc->dev;
+ struct rproc_vdev *rvdev;
+ int i, ret;
+@@ -404,9 +405,10 @@ free_rvdev:
+ *
+ * Returns 0 on success, or an appropriate error code otherwise
+ */
+-static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
++static int rproc_handle_trace(struct rproc *rproc, void *_rsc,
+ int offset, int avail)
+ {
++ struct fw_rsc_trace *rsc = _rsc;
+ struct rproc_mem_entry *trace;
+ struct device *dev = &rproc->dev;
+ void *ptr;
+@@ -484,9 +486,10 @@ static int rproc_handle_trace(struct rproc *rproc, struct fw_rsc_trace *rsc,
+ * and not allow firmwares to request access to physical addresses that
+ * are outside those ranges.
+ */
+-static int rproc_handle_devmem(struct rproc *rproc, struct fw_rsc_devmem *rsc,
++static int rproc_handle_devmem(struct rproc *rproc, void *_rsc,
+ int offset, int avail)
+ {
++ struct fw_rsc_devmem *rsc = _rsc;
+ struct rproc_mem_entry *mapping;
+ struct device *dev = &rproc->dev;
+ int ret;
+@@ -556,10 +559,11 @@ out:
+ * pressure is important; it may have a substantial impact on performance.
+ */
+ static int rproc_handle_carveout(struct rproc *rproc,
+- struct fw_rsc_carveout *rsc,
++ void *_rsc,
+ int offset, int avail)
+
+ {
++ struct fw_rsc_carveout *rsc = _rsc;
+ struct rproc_mem_entry *carveout, *mapping;
+ struct device *dev = &rproc->dev;
+ dma_addr_t dma;
+@@ -678,9 +682,11 @@ free_carv:
+ return ret;
+ }
+
+-static int rproc_count_vrings(struct rproc *rproc, struct fw_rsc_vdev *rsc,
++static int rproc_count_vrings(struct rproc *rproc, void *_rsc,
+ int offset, int avail)
+ {
++ struct fw_rsc_vdev *rsc = _rsc;
++
+ /* Summarize the number of notification IDs */
+ rproc->max_notifyid += rsc->num_of_vrings;
+
+@@ -692,18 +698,18 @@ static int rproc_count_vrings(struct rproc *rproc, struct fw_rsc_vdev *rsc,
+ * enum fw_resource_type.
+ */
+ static rproc_handle_resource_t rproc_loading_handlers[RSC_LAST] = {
+- [RSC_CARVEOUT] = (rproc_handle_resource_t)rproc_handle_carveout,
+- [RSC_DEVMEM] = (rproc_handle_resource_t)rproc_handle_devmem,
+- [RSC_TRACE] = (rproc_handle_resource_t)rproc_handle_trace,
++ [RSC_CARVEOUT] = rproc_handle_carveout,
++ [RSC_DEVMEM] = rproc_handle_devmem,
++ [RSC_TRACE] = rproc_handle_trace,
+ [RSC_VDEV] = NULL, /* VDEVs were handled upon registrarion */
+ };
+
+ static rproc_handle_resource_t rproc_vdev_handler[RSC_LAST] = {
+- [RSC_VDEV] = (rproc_handle_resource_t)rproc_handle_vdev,
++ [RSC_VDEV] = rproc_handle_vdev,
+ };
+
+ static rproc_handle_resource_t rproc_count_vrings_handler[RSC_LAST] = {
+- [RSC_VDEV] = (rproc_handle_resource_t)rproc_count_vrings,
++ [RSC_VDEV] = rproc_count_vrings,
+ };
+
+ /* handle firmware resource entries before booting the remote processor */
diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
index 9a3f2a6..604f463 100644
--- a/drivers/rtc/rtc-armada38x.c
@@ -56163,7 +66923,7 @@ index 9a3f2a6..604f463 100644
platform_set_drvdata(pdev, rtc);
if (rtc->irq != -1)
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
-index 8f7034b..2ddd4b3 100644
+index 84fb541..fee0421a 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -735,7 +735,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
@@ -56199,7 +66959,7 @@ index a6d9434..dc26b71 100644
case RTC_PIE_ON:
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
-index aa705bb..629dbb4 100644
+index cf685f6..2311b8f 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -107,7 +107,7 @@ struct ds1307 {
@@ -56227,7 +66987,7 @@ index d99a705..f8ebd79 100644
ret = sysfs_create_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr);
if (ret)
diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
-index e7329e2..6160c59 100644
+index 7155c08..10ba718 100644
--- a/drivers/rtc/rtc-rv8803.c
+++ b/drivers/rtc/rtc-rv8803.c
@@ -423,6 +423,15 @@ static struct rtc_class_ops rv8803_rtc_ops = {
@@ -56263,6 +67023,25 @@ index e7329e2..6160c59 100644
if (IS_ERR(rv8803->rtc)) {
dev_err(&client->dev, "unable to register the class device\n");
return PTR_ERR(rv8803->rtc);
+diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c
+index 772d221..60e31aa 100644
+--- a/drivers/rtc/rtc-rx8010.c
++++ b/drivers/rtc/rtc-rx8010.c
+@@ -489,9 +489,11 @@ static int rx8010_probe(struct i2c_client *client,
+ dev_err(&client->dev, "unable to request IRQ\n");
+ client->irq = 0;
+ } else {
+- rx8010_rtc_ops.read_alarm = rx8010_read_alarm;
+- rx8010_rtc_ops.set_alarm = rx8010_set_alarm;
+- rx8010_rtc_ops.alarm_irq_enable = rx8010_alarm_irq_enable;
++ pax_open_kernel();
++ *(void **)&rx8010_rtc_ops.read_alarm = rx8010_read_alarm;
++ *(void **)&rx8010_rtc_ops.set_alarm = rx8010_set_alarm;
++ *(void **)&rx8010_rtc_ops.alarm_irq_enable = rx8010_alarm_irq_enable;
++ pax_close_kernel();
+ }
+ }
+
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 3a2da4c..e88493c 100644
--- a/drivers/rtc/rtc-test.c
@@ -56280,11 +67059,328 @@ index 3a2da4c..e88493c 100644
}
rtc = devm_rtc_device_register(&plat_dev->dev, "test",
+diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
+index e4c2437..2297164 100644
+--- a/drivers/scsi/aacraid/aachba.c
++++ b/drivers/scsi/aacraid/aachba.c
+@@ -647,7 +647,7 @@ static void _aac_probe_container2(void * context, struct fib * fibptr)
+ }
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
+- callback = (int (*)(struct scsi_cmnd *))(scsicmd->SCp.ptr);
++ callback = scsicmd->SCp.ptr;
+ scsicmd->SCp.ptr = NULL;
+ (*callback)(scsicmd);
+ return;
+@@ -726,7 +726,7 @@ static int _aac_probe_container(struct scsi_cmnd * scsicmd, int (*callback)(stru
+
+ dinfo->count = cpu_to_le32(scmd_id(scsicmd));
+ dinfo->type = cpu_to_le32(FT_FILESYS);
+- scsicmd->SCp.ptr = (char *)callback;
++ scsicmd->SCp.ptr = callback;
+
+ status = aac_fib_send(ContainerCommand,
+ fibptr,
+@@ -775,6 +775,11 @@ static int aac_probe_container_callback1(struct scsi_cmnd * scsicmd)
+ return 0;
+ }
+
++static void aac_probe_container_scsi_done(struct scsi_cmnd * scsicmd)
++{
++ scsicmd->device = NULL;
++}
++
+ int aac_probe_container(struct aac_dev *dev, int cid)
+ {
+ struct scsi_cmnd *scsicmd = kmalloc(sizeof(*scsicmd), GFP_KERNEL);
+@@ -787,7 +792,7 @@ int aac_probe_container(struct aac_dev *dev, int cid)
+ return -ENOMEM;
+ }
+ scsicmd->list.next = NULL;
+- scsicmd->scsi_done = (void (*)(struct scsi_cmnd*))aac_probe_container_callback1;
++ scsicmd->scsi_done = aac_probe_container_scsi_done;
+
+ scsicmd->device = scsidev;
+ scsidev->sdev_state = 0;
+diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h
+index d47b527..f2c4a89 100644
+--- a/drivers/scsi/aic7xxx/aic79xx.h
++++ b/drivers/scsi/aic7xxx/aic79xx.h
+@@ -1046,7 +1046,7 @@ typedef enum {
+
+ typedef uint8_t ahd_mode_state;
+
+-typedef void ahd_callback_t (void *);
++typedef void ahd_linux_callback_t (u_long);
+
+ struct ahd_completion
+ {
+diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
+index 109e2c9..7d3c9b5 100644
+--- a/drivers/scsi/aic7xxx/aic79xx_core.c
++++ b/drivers/scsi/aic7xxx/aic79xx_core.c
+@@ -207,7 +207,7 @@ static void ahd_add_scb_to_free_list(struct ahd_softc *ahd,
+ static u_int ahd_rem_wscb(struct ahd_softc *ahd, u_int scbid,
+ u_int prev, u_int next, u_int tid);
+ static void ahd_reset_current_bus(struct ahd_softc *ahd);
+-static ahd_callback_t ahd_stat_timer;
++static ahd_linux_callback_t ahd_stat_timer;
+ #ifdef AHD_DUMP_SEQ
+ static void ahd_dumpseq(struct ahd_softc *ahd);
+ #endif
+@@ -7041,10 +7041,9 @@ static const char *termstat_strings[] = {
+ /***************************** Timer Facilities *******************************/
+ #define ahd_timer_init init_timer
+ #define ahd_timer_stop del_timer_sync
+-typedef void ahd_linux_callback_t (u_long);
+
+ static void
+-ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg)
++ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_linux_callback_t *func, void *arg)
+ {
+ struct ahd_softc *ahd;
+
+@@ -7052,7 +7051,7 @@ ahd_timer_reset(ahd_timer_t *timer, int usec, ahd_callback_t *func, void *arg)
+ del_timer(timer);
+ timer->data = (u_long)arg;
+ timer->expires = jiffies + (usec * HZ)/1000000;
+- timer->function = (ahd_linux_callback_t*)func;
++ timer->function = func;
+ add_timer(timer);
+ }
+
+@@ -8878,9 +8877,9 @@ ahd_reset_channel(struct ahd_softc *ahd, char channel, int initiate_reset)
+
+ /**************************** Statistics Processing ***************************/
+ static void
+-ahd_stat_timer(void *arg)
++ahd_stat_timer(unsigned long arg)
+ {
+- struct ahd_softc *ahd = arg;
++ struct ahd_softc *ahd = (struct ahd_softc *)arg;
+ u_long s;
+ int enint_coal;
+
+diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
+index 069e5c5..f67b786 100644
+--- a/drivers/scsi/be2iscsi/be_main.c
++++ b/drivers/scsi/be2iscsi/be_main.c
+@@ -5460,7 +5460,7 @@ beiscsi_hw_health_check(struct work_struct *work)
+
+
+ static pci_ers_result_t beiscsi_eeh_err_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct beiscsi_hba *phba = NULL;
+
+diff --git a/drivers/scsi/bfa/bfa.h b/drivers/scsi/bfa/bfa.h
+index 0e119d8..1bf8a49 100644
+--- a/drivers/scsi/bfa/bfa.h
++++ b/drivers/scsi/bfa/bfa.h
+@@ -225,8 +225,10 @@ struct bfa_faa_args_s {
+ bfa_boolean_t busy;
+ };
+
++enum iocfc_event;
++
+ struct bfa_iocfc_s {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bfa_iocfc_s *, enum iocfc_event);
+ struct bfa_s *bfa;
+ struct bfa_iocfc_cfg_s cfg;
+ u32 req_cq_pi[BFI_IOC_MAX_CQS];
+diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c
+index 2ea0db4..82ea057 100644
+--- a/drivers/scsi/bfa/bfa_core.c
++++ b/drivers/scsi/bfa/bfa_core.c
+@@ -1900,15 +1900,13 @@ bfa_comp_process(struct bfa_s *bfa, struct list_head *comp_q)
+ struct list_head *qe;
+ struct list_head *qen;
+ struct bfa_cb_qe_s *hcb_qe;
+- bfa_cb_cbfn_status_t cbfn;
+
+ list_for_each_safe(qe, qen, comp_q) {
+ hcb_qe = (struct bfa_cb_qe_s *) qe;
+ if (hcb_qe->pre_rmv) {
+ /* qe is invalid after return, dequeue before cbfn() */
+ list_del(qe);
+- cbfn = (bfa_cb_cbfn_status_t)(hcb_qe->cbfn);
+- cbfn(hcb_qe->cbarg, hcb_qe->fw_status);
++ hcb_qe->cbfn(hcb_qe->cbarg, hcb_qe->fw_status);
+ } else
+ hcb_qe->cbfn(hcb_qe->cbarg, BFA_TRUE);
+ }
+diff --git a/drivers/scsi/bfa/bfa_cs.h b/drivers/scsi/bfa/bfa_cs.h
+index da9cf65..8cbfcff 100644
+--- a/drivers/scsi/bfa/bfa_cs.h
++++ b/drivers/scsi/bfa/bfa_cs.h
+@@ -217,8 +217,6 @@ bfa_q_is_on_q_func(struct list_head *q, struct list_head *qe)
+ * @ BFA state machine interfaces
+ */
+
+-typedef void (*bfa_sm_t)(void *sm, int event);
+-
+ /*
+ * oc - object class eg. bfa_ioc
+ * st - state, eg. reset
+@@ -228,20 +226,75 @@ typedef void (*bfa_sm_t)(void *sm, int event);
+ #define bfa_sm_state_decl(oc, st, otype, etype) \
+ static void oc ## _sm_ ## st(otype * fsm, etype event)
+
+-#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (bfa_sm_t)(_state))
++#define bfa_sm_set_state(_sm, _state) ((_sm)->sm = (_state))
+ #define bfa_sm_send_event(_sm, _event) ((_sm)->sm((_sm), (_event)))
+ #define bfa_sm_get_state(_sm) ((_sm)->sm)
+-#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (bfa_sm_t)(_state))
++#define bfa_sm_cmp_state(_sm, _state) ((_sm)->sm == (_state))
+
+ /*
+ * For converting from state machine function to state encoding.
+ */
+-struct bfa_sm_table_s {
+- bfa_sm_t sm; /* state machine function */
++struct bfa_iocpf_s;
++enum iocpf_event;
++typedef void (*bfa_fsm_iocpf_t)(struct bfa_iocpf_s *, enum iocpf_event);
++
++struct iocpf_sm_table_s {
++ bfa_fsm_iocpf_t sm; /* state machine function */
+ int state; /* state machine encoding */
+ char *name; /* state name for display */
+ };
+-#define BFA_SM(_sm) ((bfa_sm_t)(_sm))
++
++struct bfa_ioc_s;
++enum ioc_event;
++typedef void (*bfa_fsm_ioc_t)(struct bfa_ioc_s *, enum ioc_event);
++
++struct ioc_sm_table_s {
++ bfa_fsm_ioc_t sm; /* state machine function */
++ int state; /* state machine encoding */
++ char *name; /* state name for display */
++};
++
++struct bfa_fcs_rport_s;
++enum rport_event;
++typedef void(*bfa_fcs_rport_t)(struct bfa_fcs_rport_s *, enum rport_event);
++
++struct rport_sm_table_s {
++ bfa_fcs_rport_t sm; /* state machine function */
++ int state; /* state machine encoding */
++ char *name; /* state name for display */
++};
++
++struct bfa_fcs_vport_s;
++enum bfa_fcs_vport_event;
++typedef void(*bfa_fcs_vport_t)(struct bfa_fcs_vport_s *, enum bfa_fcs_vport_event);
++
++struct vport_sm_table_s {
++ bfa_fcs_vport_t sm; /* state machine function */
++ int state; /* state machine encoding */
++ char *name; /* state name for display */
++};
++
++struct bfa_fcs_itnim_s;
++enum bfa_fcs_itnim_event;
++typedef void(*bfa_fcs_itnim_t)(struct bfa_fcs_itnim_s *, enum bfa_fcs_itnim_event);
++
++struct itnim_sm_table_s {
++ bfa_fcs_itnim_t sm; /* state machine function */
++ int state; /* state machine encoding */
++ char *name; /* state name for display */
++};
++
++struct bfa_fcport_s;
++enum bfa_fcport_sm_event;
++typedef void(*bfa_fcport_t)(struct bfa_fcport_s *, enum bfa_fcport_sm_event);
++
++struct fcport_sm_table_s {
++ bfa_fcport_t sm; /* state machine function */
++ int state; /* state machine encoding */
++ char *name; /* state name for display */
++};
++
++#define BFA_SM(_sm) (_sm)
+
+ /*
+ * State machine with entry actions.
+@@ -259,17 +312,66 @@ typedef void (*bfa_fsm_t)(void *fsm, int event);
+ static void oc ## _sm_ ## st ## _entry(otype * fsm)
+
+ #define bfa_fsm_set_state(_fsm, _state) do { \
+- (_fsm)->fsm = (bfa_fsm_t)(_state); \
++ (_fsm)->fsm = (_state); \
+ _state ## _entry(_fsm); \
+ } while (0)
+
+ #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
+ #define bfa_fsm_get_state(_fsm) ((_fsm)->fsm)
+-#define bfa_fsm_cmp_state(_fsm, _state) \
+- ((_fsm)->fsm == (bfa_fsm_t)(_state))
++#define bfa_fsm_cmp_state(_fsm, _state) ((_fsm)->fsm == (_state))
+
+ static inline int
+-bfa_sm_to_state(struct bfa_sm_table_s *smt, bfa_sm_t sm)
++iocpf_sm_to_state(struct iocpf_sm_table_s *smt, bfa_fsm_iocpf_t sm)
++{
++ int i = 0;
++
++ while (smt[i].sm && smt[i].sm != sm)
++ i++;
++ return smt[i].state;
++}
++
++static inline int
++ioc_sm_to_state(struct ioc_sm_table_s *smt, bfa_fsm_ioc_t sm)
++{
++ int i = 0;
++
++ while (smt[i].sm && smt[i].sm != sm)
++ i++;
++ return smt[i].state;
++}
++
++static inline int
++rport_sm_to_state(struct rport_sm_table_s *smt, bfa_fcs_rport_t sm)
++{
++ int i = 0;
++
++ while (smt[i].sm && smt[i].sm != sm)
++ i++;
++ return smt[i].state;
++}
++
++static inline int
++vport_sm_to_state(struct vport_sm_table_s *smt, bfa_fcs_vport_t sm)
++{
++ int i = 0;
++
++ while (smt[i].sm && smt[i].sm != sm)
++ i++;
++ return smt[i].state;
++}
++
++static inline int
++itnim_sm_to_state(struct itnim_sm_table_s *smt, bfa_fcs_itnim_t sm)
++{
++ int i = 0;
++
++ while (smt[i].sm && smt[i].sm != sm)
++ i++;
++ return smt[i].state;
++}
++
++static inline int
++fcport_sm_to_state(struct fcport_sm_table_s *smt, bfa_fcport_t sm)
+ {
+ int i = 0;
+
diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h
-index e693af6..2e525b6 100644
+index e93921d..ee6b4c0 100644
--- a/drivers/scsi/bfa/bfa_fcpim.h
+++ b/drivers/scsi/bfa/bfa_fcpim.h
-@@ -36,7 +36,7 @@ struct bfa_iotag_s {
+@@ -37,7 +37,7 @@ struct bfa_iotag_s {
struct bfa_itn_s {
bfa_isr_func_t isr;
@@ -56293,11 +67389,50 @@ index e693af6..2e525b6 100644
void bfa_itn_create(struct bfa_s *bfa, struct bfa_rport_s *rport,
void (*isr)(struct bfa_s *bfa, struct bfi_msg_s *m));
+@@ -165,9 +165,11 @@ struct bfa_fcp_mod_s {
+ /*
+ * BFA IO (initiator mode)
+ */
++enum bfa_ioim_event;
++
+ struct bfa_ioim_s {
+ struct list_head qe; /* queue elememt */
+- bfa_sm_t sm; /* BFA ioim state machine */
++ void (*sm)(struct bfa_ioim_s *, enum bfa_ioim_event);/* BFA ioim state machine */
+ struct bfa_s *bfa; /* BFA module */
+ struct bfa_fcpim_s *fcpim; /* parent fcpim module */
+ struct bfa_itnim_s *itnim; /* i-t-n nexus for this IO */
+@@ -197,9 +199,11 @@ struct bfa_ioim_sp_s {
+ /*
+ * BFA Task management command (initiator mode)
+ */
++enum bfa_tskim_event;
++
+ struct bfa_tskim_s {
+ struct list_head qe;
+- bfa_sm_t sm;
++ void (*sm)(struct bfa_tskim_s *, enum bfa_tskim_event);
+ struct bfa_s *bfa; /* BFA module */
+ struct bfa_fcpim_s *fcpim; /* parent fcpim module */
+ struct bfa_itnim_s *itnim; /* i-t-n nexus for this IO */
+@@ -219,9 +223,11 @@ struct bfa_tskim_s {
+ /*
+ * BFA i-t-n (initiator mode)
+ */
++enum bfa_itnim_event;
++
+ struct bfa_itnim_s {
+ struct list_head qe; /* queue element */
+- bfa_sm_t sm; /* i-t-n im BFA state machine */
++ void (*sm)(struct bfa_itnim_s *, enum bfa_itnim_event);/* i-t-n im BFA state machine */
+ struct bfa_s *bfa; /* bfa instance */
+ struct bfa_rport_s *rport; /* bfa rport */
+ void *ditn; /* driver i-t-n structure */
diff --git a/drivers/scsi/bfa/bfa_fcs.c b/drivers/scsi/bfa/bfa_fcs.c
-index 0f19455..ef7adb5 100644
+index 1e7e139..c2031dd 100644
--- a/drivers/scsi/bfa/bfa_fcs.c
+++ b/drivers/scsi/bfa/bfa_fcs.c
-@@ -38,10 +38,21 @@ struct bfa_fcs_mod_s {
+@@ -39,10 +39,21 @@ struct bfa_fcs_mod_s {
#define BFA_FCS_MODULE(_mod) { _mod ## _modinit, _mod ## _modexit }
static struct bfa_fcs_mod_s fcs_modules[] = {
@@ -56323,11 +67458,174 @@ index 0f19455..ef7adb5 100644
};
/*
+diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h
+index 06dc215..543c5aa 100644
+--- a/drivers/scsi/bfa/bfa_fcs.h
++++ b/drivers/scsi/bfa/bfa_fcs.h
+@@ -67,8 +67,10 @@ struct bfa_fcs_s;
+ #define BFA_FCS_PID_IS_WKA(pid) ((bfa_ntoh3b(pid) > 0xFFF000) ? 1 : 0)
+ #define BFA_FCS_MAX_RPORT_LOGINS 1024
+
++enum vport_ns_event;
++
+ struct bfa_fcs_lport_ns_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_lport_ns_s *, enum vport_ns_event);/* state machine */
+ struct bfa_timer_s timer;
+ struct bfa_fcs_lport_s *port; /* parent port */
+ struct bfa_fcxp_s *fcxp;
+@@ -77,18 +79,20 @@ struct bfa_fcs_lport_ns_s {
+ u8 num_rsnn_nn_retries;
+ };
+
++enum port_scn_event;
+
+ struct bfa_fcs_lport_scn_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_lport_scn_s *, enum port_scn_event);/* state machine */
+ struct bfa_timer_s timer;
+ struct bfa_fcs_lport_s *port; /* parent port */
+ struct bfa_fcxp_s *fcxp;
+ struct bfa_fcxp_wqe_s fcxp_wqe;
+ };
+
++enum port_fdmi_event;
+
+ struct bfa_fcs_lport_fdmi_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_lport_fdmi_s *, enum port_fdmi_event);/* state machine */
+ struct bfa_timer_s timer;
+ struct bfa_fcs_lport_ms_s *ms; /* parent ms */
+ struct bfa_fcxp_s *fcxp;
+@@ -97,9 +101,10 @@ struct bfa_fcs_lport_fdmi_s {
+ u8 rsvd[3];
+ };
+
++enum port_ms_event;
+
+ struct bfa_fcs_lport_ms_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_lport_ms_s *, enum port_ms_event);/* state machine */
+ struct bfa_timer_s timer;
+ struct bfa_fcs_lport_s *port; /* parent port */
+ struct bfa_fcxp_s *fcxp;
+@@ -139,10 +144,11 @@ union bfa_fcs_lport_topo_u {
+ struct bfa_fcs_lport_n2n_s pn2n;
+ };
+
++enum bfa_fcs_lport_event;
+
+ struct bfa_fcs_lport_s {
+ struct list_head qe; /* used by port/vport */
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_lport_s *, enum bfa_fcs_lport_event); /* state machine */
+ struct bfa_fcs_fabric_s *fabric; /* parent fabric */
+ struct bfa_lport_cfg_s port_cfg; /* port configuration */
+ struct bfa_timer_s link_timer; /* timer for link offline */
+@@ -179,10 +185,11 @@ enum bfa_fcs_fabric_type {
+ BFA_FCS_FABRIC_LOOP = 3,
+ };
+
++enum bfa_fcs_fabric_event;
+
+ struct bfa_fcs_fabric_s {
+ struct list_head qe; /* queue element */
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_fabric_s *, enum bfa_fcs_fabric_event); /* state machine */
+ struct bfa_fcs_s *fcs; /* FCS instance */
+ struct bfa_fcs_lport_s bport; /* base logical port */
+ enum bfa_fcs_fabric_type fab_type; /* fabric type */
+@@ -355,9 +362,11 @@ void bfa_fcs_lport_scn_process_rscn(struct bfa_fcs_lport_s *port,
+ struct fchs_s *rx_frame, u32 len);
+ void bfa_fcs_lport_lip_scn_online(bfa_fcs_lport_t *port);
+
++enum bfa_fcs_vport_event;
++
+ struct bfa_fcs_vport_s {
+ struct list_head qe; /* queue elem */
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_vport_s *, enum bfa_fcs_vport_event);/* state machine */
+ bfa_fcs_lport_t lport; /* logical port */
+ struct bfa_timer_s timer;
+ struct bfad_vport_s *vport_drv; /* Driver private */
+@@ -409,8 +418,10 @@ struct bfa_fcs_tin_s;
+ struct bfa_fcs_iprp_s;
+
+ /* Rport Features (RPF) */
++enum rpf_event;
++
+ struct bfa_fcs_rpf_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_rpf_s *, enum rpf_event); /* state machine */
+ struct bfa_fcs_rport_s *rport; /* parent rport */
+ struct bfa_timer_s timer; /* general purpose timer */
+ struct bfa_fcxp_s *fcxp; /* FCXP needed for discarding */
+@@ -425,6 +436,8 @@ struct bfa_fcs_rpf_s {
+ */
+ };
+
++enum rport_event;
++
+ struct bfa_fcs_rport_s {
+ struct list_head qe; /* used by port/vport */
+ struct bfa_fcs_lport_s *port; /* parent FCS port */
+@@ -441,7 +454,7 @@ struct bfa_fcs_rport_s {
+ wwn_t pwwn; /* port wwn of rport */
+ wwn_t nwwn; /* node wwn of rport */
+ struct bfa_rport_symname_s psym_name; /* port symbolic name */
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_rport_s *, enum rport_event); /* state machine */
+ struct bfa_timer_s timer; /* general purpose timer */
+ struct bfa_fcs_itnim_s *itnim; /* ITN initiator mode role */
+ struct bfa_fcs_tin_s *tin; /* ITN initiator mode role */
+@@ -502,9 +515,10 @@ void bfa_fcs_rpf_rport_offline(struct bfa_fcs_rport_s *rport);
+ * forward declarations
+ */
+ struct bfad_itnim_s;
++enum bfa_fcs_itnim_event;
+
+ struct bfa_fcs_itnim_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_fcs_itnim_s *, enum bfa_fcs_itnim_event);/* state machine */
+ struct bfa_fcs_rport_s *rport; /* parent remote rport */
+ struct bfad_itnim_s *itnim_drv; /* driver peer instance */
+ struct bfa_fcs_s *fcs; /* fcs instance */
+diff --git a/drivers/scsi/bfa/bfa_fcs_fcpim.c b/drivers/scsi/bfa/bfa_fcs_fcpim.c
+index 4f089d7..89b3d8e 100644
+--- a/drivers/scsi/bfa/bfa_fcs_fcpim.c
++++ b/drivers/scsi/bfa/bfa_fcs_fcpim.c
+@@ -60,7 +60,7 @@ static void bfa_fcs_itnim_sm_hcb_offline(struct bfa_fcs_itnim_s *itnim,
+ static void bfa_fcs_itnim_sm_initiator(struct bfa_fcs_itnim_s *itnim,
+ enum bfa_fcs_itnim_event event);
+
+-static struct bfa_sm_table_s itnim_sm_table[] = {
++static struct itnim_sm_table_s itnim_sm_table[] = {
+ {BFA_SM(bfa_fcs_itnim_sm_offline), BFA_ITNIM_OFFLINE},
+ {BFA_SM(bfa_fcs_itnim_sm_prli_send), BFA_ITNIM_PRLI_SEND},
+ {BFA_SM(bfa_fcs_itnim_sm_prli), BFA_ITNIM_PRLI_SENT},
+@@ -672,7 +672,7 @@ bfa_status_t
+ bfa_fcs_itnim_get_online_state(struct bfa_fcs_itnim_s *itnim)
+ {
+ bfa_trc(itnim->fcs, itnim->rport->pid);
+- switch (bfa_sm_to_state(itnim_sm_table, itnim->sm)) {
++ switch (itnim_sm_to_state(itnim_sm_table, itnim->sm)) {
+ case BFA_ITNIM_ONLINE:
+ case BFA_ITNIM_INITIATIOR:
+ return BFA_STATUS_OK;
+@@ -772,7 +772,7 @@ bfa_fcs_itnim_attr_get(struct bfa_fcs_lport_s *port, wwn_t rpwwn,
+ if (itnim == NULL)
+ return BFA_STATUS_NO_FCPIM_NEXUS;
+
+- attr->state = bfa_sm_to_state(itnim_sm_table, itnim->sm);
++ attr->state = itnim_sm_to_state(itnim_sm_table, itnim->sm);
+ attr->retry = itnim->seq_rec;
+ attr->rec_support = itnim->rec_support;
+ attr->conf_comp = itnim->conf_comp;
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c
-index ff75ef8..2dfe00a 100644
+index 7733ad5..11f32d1 100644
--- a/drivers/scsi/bfa/bfa_fcs_lport.c
+++ b/drivers/scsi/bfa/bfa_fcs_lport.c
-@@ -89,15 +89,26 @@ static struct {
+@@ -90,15 +90,26 @@ static struct {
void (*offline) (struct bfa_fcs_lport_s *port);
} __port_action[] = {
{
@@ -56363,11 +67661,88 @@ index ff75ef8..2dfe00a 100644
/*
* fcs_port_sm FCS logical port state machine
+@@ -6040,7 +6051,7 @@ static void bfa_fcs_vport_sm_stopping(struct bfa_fcs_vport_s *vport,
+ static void bfa_fcs_vport_sm_logo_for_stop(struct bfa_fcs_vport_s *vport,
+ enum bfa_fcs_vport_event event);
+
+-static struct bfa_sm_table_s vport_sm_table[] = {
++static struct vport_sm_table_s vport_sm_table[] = {
+ {BFA_SM(bfa_fcs_vport_sm_uninit), BFA_FCS_VPORT_UNINIT},
+ {BFA_SM(bfa_fcs_vport_sm_created), BFA_FCS_VPORT_CREATED},
+ {BFA_SM(bfa_fcs_vport_sm_offline), BFA_FCS_VPORT_OFFLINE},
+@@ -6871,7 +6882,7 @@ bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport,
+ memset(attr, 0, sizeof(struct bfa_vport_attr_s));
+
+ bfa_fcs_lport_get_attr(&vport->lport, &attr->port_attr);
+- attr->vport_state = bfa_sm_to_state(vport_sm_table, vport->sm);
++ attr->vport_state = vport_sm_to_state(vport_sm_table, vport->sm);
+ }
+
+
+diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
+index de50349..6d676be 100644
+--- a/drivers/scsi/bfa/bfa_fcs_rport.c
++++ b/drivers/scsi/bfa/bfa_fcs_rport.c
+@@ -144,7 +144,7 @@ static void bfa_fcs_rport_sm_fc4_off_delete(struct bfa_fcs_rport_s *rport,
+ static void bfa_fcs_rport_sm_delete_pending(struct bfa_fcs_rport_s *rport,
+ enum rport_event event);
+
+-static struct bfa_sm_table_s rport_sm_table[] = {
++static struct rport_sm_table_s rport_sm_table[] = {
+ {BFA_SM(bfa_fcs_rport_sm_uninit), BFA_RPORT_UNINIT},
+ {BFA_SM(bfa_fcs_rport_sm_plogi_sending), BFA_RPORT_PLOGI},
+ {BFA_SM(bfa_fcs_rport_sm_plogiacc_sending), BFA_RPORT_ONLINE},
+@@ -2980,7 +2980,7 @@ bfa_fcs_rport_send_ls_rjt(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs,
+ int
+ bfa_fcs_rport_get_state(struct bfa_fcs_rport_s *rport)
+ {
+- return bfa_sm_to_state(rport_sm_table, rport->sm);
++ return rport_sm_to_state(rport_sm_table, rport->sm);
+ }
+
+
+diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
+index 251e2ff..cef239a 100644
+--- a/drivers/scsi/bfa/bfa_ioc.c
++++ b/drivers/scsi/bfa/bfa_ioc.c
+@@ -148,7 +148,7 @@ bfa_fsm_state_decl(bfa_ioc, disabling, struct bfa_ioc_s, enum ioc_event);
+ bfa_fsm_state_decl(bfa_ioc, disabled, struct bfa_ioc_s, enum ioc_event);
+ bfa_fsm_state_decl(bfa_ioc, hwfail, struct bfa_ioc_s, enum ioc_event);
+
+-static struct bfa_sm_table_s ioc_sm_table[] = {
++static struct ioc_sm_table_s ioc_sm_table[] = {
+ {BFA_SM(bfa_ioc_sm_uninit), BFA_IOC_UNINIT},
+ {BFA_SM(bfa_ioc_sm_reset), BFA_IOC_RESET},
+ {BFA_SM(bfa_ioc_sm_enabling), BFA_IOC_ENABLING},
+@@ -236,7 +236,7 @@ bfa_fsm_state_decl(bfa_iocpf, disabling_sync, struct bfa_iocpf_s,
+ enum iocpf_event);
+ bfa_fsm_state_decl(bfa_iocpf, disabled, struct bfa_iocpf_s, enum iocpf_event);
+
+-static struct bfa_sm_table_s iocpf_sm_table[] = {
++static struct iocpf_sm_table_s iocpf_sm_table[] = {
+ {BFA_SM(bfa_iocpf_sm_reset), BFA_IOCPF_RESET},
+ {BFA_SM(bfa_iocpf_sm_fwcheck), BFA_IOCPF_FWMISMATCH},
+ {BFA_SM(bfa_iocpf_sm_mismatch), BFA_IOCPF_FWMISMATCH},
+@@ -2830,12 +2830,12 @@ enum bfa_ioc_state
+ bfa_ioc_get_state(struct bfa_ioc_s *ioc)
+ {
+ enum bfa_iocpf_state iocpf_st;
+- enum bfa_ioc_state ioc_st = bfa_sm_to_state(ioc_sm_table, ioc->fsm);
++ enum bfa_ioc_state ioc_st = ioc_sm_to_state(ioc_sm_table, ioc->fsm);
+
+ if (ioc_st == BFA_IOC_ENABLING ||
+ ioc_st == BFA_IOC_FAIL || ioc_st == BFA_IOC_INITFAIL) {
+
+- iocpf_st = bfa_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
++ iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
+
+ switch (iocpf_st) {
+ case BFA_IOCPF_SEMWAIT:
diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h
-index a38aafa0..fe8f03b 100644
+index 713745d..78b9671 100644
--- a/drivers/scsi/bfa/bfa_ioc.h
+++ b/drivers/scsi/bfa/bfa_ioc.h
-@@ -258,7 +258,7 @@ struct bfa_ioc_cbfn_s {
+@@ -259,7 +259,7 @@ struct bfa_ioc_cbfn_s {
bfa_ioc_disable_cbfn_t disable_cbfn;
bfa_ioc_hbfail_cbfn_t hbfail_cbfn;
bfa_ioc_reset_cbfn_t reset_cbfn;
@@ -56376,7 +67751,30 @@ index a38aafa0..fe8f03b 100644
/*
* IOC event notification mechanism.
-@@ -352,7 +352,7 @@ struct bfa_ioc_hwif_s {
+@@ -286,16 +286,20 @@ struct bfa_ioc_notify_s {
+ (__notify)->cbarg = (__cbarg); \
+ } while (0)
+
++enum iocpf_event;
++
+ struct bfa_iocpf_s {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bfa_iocpf_s *, enum iocpf_event);
+ struct bfa_ioc_s *ioc;
+ bfa_boolean_t fw_mismatch_notified;
+ bfa_boolean_t auto_recover;
+ u32 poll_time;
+ };
+
++enum ioc_event;
++
+ struct bfa_ioc_s {
+- bfa_fsm_t fsm;
++ void (*fsm)(struct bfa_ioc_s *, enum ioc_event);
+ struct bfa_s *bfa;
+ struct bfa_pcidev_s pcidev;
+ struct bfa_timer_mod_s *timer_mod;
+@@ -353,7 +357,7 @@ struct bfa_ioc_hwif_s {
void (*ioc_set_alt_fwstate) (struct bfa_ioc_s *ioc,
enum bfi_ioc_state fwstate);
enum bfi_ioc_state (*ioc_get_alt_fwstate) (struct bfa_ioc_s *ioc);
@@ -56385,11 +67783,23 @@ index a38aafa0..fe8f03b 100644
/*
* Queue element to wait for room in request queue. FIFO order is
+@@ -779,8 +783,10 @@ struct bfa_dconf_s {
+ };
+ #pragma pack()
+
++enum bfa_dconf_event;
++
+ struct bfa_dconf_mod_s {
+- bfa_sm_t sm;
++ void (*sm)(struct bfa_dconf_mod_s *, enum bfa_dconf_event);
+ u8 instance;
+ bfa_boolean_t read_data_valid;
+ bfa_boolean_t min_cfg;
diff --git a/drivers/scsi/bfa/bfa_modules.h b/drivers/scsi/bfa/bfa_modules.h
-index a14c784..6de6790 100644
+index 53135f2..640621b 100644
--- a/drivers/scsi/bfa/bfa_modules.h
+++ b/drivers/scsi/bfa/bfa_modules.h
-@@ -78,12 +78,12 @@ enum {
+@@ -79,12 +79,12 @@ enum {
\
extern struct bfa_module_s hal_mod_ ## __mod; \
struct bfa_module_s hal_mod_ ## __mod = { \
@@ -56408,6 +67818,735 @@ index a14c784..6de6790 100644
}
#define BFA_CACHELINE_SZ (256)
+diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
+index 12de292..ec9f0ab 100644
+--- a/drivers/scsi/bfa/bfa_svc.c
++++ b/drivers/scsi/bfa/bfa_svc.c
+@@ -225,7 +225,7 @@ static void bfa_fcport_ln_sm_up_dn_nf(struct bfa_fcport_ln_s *ln,
+ static void bfa_fcport_ln_sm_up_dn_up_nf(struct bfa_fcport_ln_s *ln,
+ enum bfa_fcport_ln_sm_event event);
+
+-static struct bfa_sm_table_s hal_port_sm_table[] = {
++static struct fcport_sm_table_s hal_port_sm_table[] = {
+ {BFA_SM(bfa_fcport_sm_uninit), BFA_PORT_ST_UNINIT},
+ {BFA_SM(bfa_fcport_sm_enabling_qwait), BFA_PORT_ST_ENABLING_QWAIT},
+ {BFA_SM(bfa_fcport_sm_enabling), BFA_PORT_ST_ENABLING},
+@@ -3642,7 +3642,7 @@ bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
+ fcport->event_arg.i2hmsg = i2hmsg;
+
+ bfa_trc(bfa, msg->mhdr.msg_id);
+- bfa_trc(bfa, bfa_sm_to_state(hal_port_sm_table, fcport->sm));
++ bfa_trc(bfa, fcport_sm_to_state(hal_port_sm_table, fcport->sm));
+
+ switch (msg->mhdr.msg_id) {
+ case BFI_FCPORT_I2H_ENABLE_RSP:
+@@ -4077,7 +4077,7 @@ bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr)
+
+ attr->pport_cfg.path_tov = bfa_fcpim_path_tov_get(bfa);
+ attr->pport_cfg.q_depth = bfa_fcpim_qdepth_get(bfa);
+- attr->port_state = bfa_sm_to_state(hal_port_sm_table, fcport->sm);
++ attr->port_state = fcport_sm_to_state(hal_port_sm_table, fcport->sm);
+
+ attr->fec_state = fcport->fec_state;
+
+@@ -4159,7 +4159,7 @@ bfa_fcport_is_disabled(struct bfa_s *bfa)
+ {
+ struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
+
+- return bfa_sm_to_state(hal_port_sm_table, fcport->sm) ==
++ return fcport_sm_to_state(hal_port_sm_table, fcport->sm) ==
+ BFA_PORT_ST_DISABLED;
+
+ }
+@@ -4169,7 +4169,7 @@ bfa_fcport_is_dport(struct bfa_s *bfa)
+ {
+ struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
+
+- return (bfa_sm_to_state(hal_port_sm_table, fcport->sm) ==
++ return (fcport_sm_to_state(hal_port_sm_table, fcport->sm) ==
+ BFA_PORT_ST_DPORT);
+ }
+
+@@ -4178,7 +4178,7 @@ bfa_fcport_is_ddport(struct bfa_s *bfa)
+ {
+ struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
+
+- return (bfa_sm_to_state(hal_port_sm_table, fcport->sm) ==
++ return (fcport_sm_to_state(hal_port_sm_table, fcport->sm) ==
+ BFA_PORT_ST_DDPORT);
+ }
+
+diff --git a/drivers/scsi/bfa/bfa_svc.h b/drivers/scsi/bfa/bfa_svc.h
+index ea2278b..6f51a73 100644
+--- a/drivers/scsi/bfa/bfa_svc.h
++++ b/drivers/scsi/bfa/bfa_svc.h
+@@ -160,6 +160,8 @@ struct bfa_fcxp_rsp_info_s {
+ u32 rsp_maxlen; /* max response length expected */
+ };
+
++typedef void (*bfa_sm_t)(void *sm, int event);
++
+ struct bfa_fcxp_s {
+ struct list_head qe; /* fcxp queue element */
+ bfa_sm_t sm; /* state machine */
+@@ -295,9 +297,11 @@ struct bfa_rport_info_s {
+ /*
+ * BFA rport data structure
+ */
++enum bfa_rport_event;
++
+ struct bfa_rport_s {
+ struct list_head qe; /* queue element */
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfa_rport_s *, enum bfa_rport_event);/* state machine */
+ struct bfa_s *bfa; /* backpointer to BFA */
+ void *rport_drv; /* fcs/driver rport object */
+ u16 fw_handle; /* firmware rport handle */
+@@ -388,10 +392,12 @@ void bfa_uf_res_recfg(struct bfa_s *bfa, u16 num_uf_fw);
+ /*
+ * LPS - bfa lport login/logout service interface
+ */
++enum bfa_lps_event;
++
+ struct bfa_lps_s {
+ struct list_head qe; /* queue element */
+ struct bfa_s *bfa; /* parent bfa instance */
+- bfa_sm_t sm; /* finite state machine */
++ void (*sm)(struct bfa_lps_s *, enum bfa_lps_event);/* finite state machine */
+ u8 bfa_tag; /* lport tag */
+ u8 fw_tag; /* lport fw tag */
+ u8 reqq; /* lport request queue */
+@@ -450,9 +456,11 @@ void bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *msg);
+ /*
+ * Link notification data structure
+ */
++enum bfa_fcport_ln_sm_event;
++
+ struct bfa_fcport_ln_s {
+ struct bfa_fcport_s *fcport;
+- bfa_sm_t sm;
++ void (*sm)(struct bfa_fcport_ln_s *, enum bfa_fcport_ln_sm_event);
+ struct bfa_cb_qe_s ln_qe; /* BFA callback queue elem for ln */
+ enum bfa_port_linkstate ln_event; /* ln event for callback */
+ };
+@@ -466,7 +474,7 @@ struct bfa_fcport_trunk_s {
+ */
+ struct bfa_fcport_s {
+ struct bfa_s *bfa; /* parent BFA instance */
+- bfa_sm_t sm; /* port state machine */
++ void (*sm)(struct bfa_fcport_s *, enum bfa_fcport_sm_event); /* port state machine */
+ wwn_t nwwn; /* node wwn of physical port */
+ wwn_t pwwn; /* port wwn of physical oprt */
+ enum bfa_port_speed speed_sup;
+@@ -714,9 +722,11 @@ struct bfa_fcdiag_lb_s {
+ u32 status;
+ };
+
++enum bfa_dport_sm_event;
++
+ struct bfa_dport_s {
+ struct bfa_s *bfa; /* Back pointer to BFA */
+- bfa_sm_t sm; /* finite state machine */
++ void (*sm)(struct bfa_dport_s *, enum bfa_dport_sm_event);/* finite state machine */
+ struct bfa_reqq_wait_s reqq_wait;
+ bfa_cb_diag_t cbfn;
+ void *cbarg;
+diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
+index 9d253cb..bb533ea 100644
+--- a/drivers/scsi/bfa/bfad.c
++++ b/drivers/scsi/bfa/bfad.c
+@@ -408,6 +408,16 @@ bfad_hcb_comp(void *arg, bfa_status_t status)
+ complete(&fcomp->comp);
+ }
+
++void
++bfad_stats_comp(void *arg, bfa_boolean_t _status)
++{
++ struct bfad_hal_comp *fcomp = (struct bfad_hal_comp *)arg;
++ bfa_status_t status = (bfa_status_t)_status;
++
++ fcomp->status = status;
++ complete(&fcomp->comp);
++}
++
+ /*
+ * bfa_init callback
+ */
+@@ -1442,7 +1452,7 @@ bfad_pci_remove(struct pci_dev *pdev)
+ * PCI Error Recovery entry, error detected.
+ */
+ static pci_ers_result_t
+-bfad_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++bfad_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct bfad_s *bfad = pci_get_drvdata(pdev);
+ unsigned long flags;
+diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
+index d1ad020..661c0f9 100644
+--- a/drivers/scsi/bfa/bfad_bsg.c
++++ b/drivers/scsi/bfa/bfad_bsg.c
+@@ -2145,7 +2145,7 @@ bfad_iocmd_fcport_get_stats(struct bfad_s *bfad, void *cmd)
+ struct bfa_cb_pending_q_s cb_qe;
+
+ init_completion(&fcomp.comp);
+- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp,
++ bfa_pending_q_init(&cb_qe, bfad_stats_comp,
+ &fcomp, &iocmd->stats);
+ spin_lock_irqsave(&bfad->bfad_lock, flags);
+ iocmd->status = bfa_fcport_get_stats(&bfad->bfa, &cb_qe);
+@@ -2169,7 +2169,7 @@ bfad_iocmd_fcport_reset_stats(struct bfad_s *bfad, void *cmd)
+ struct bfa_cb_pending_q_s cb_qe;
+
+ init_completion(&fcomp.comp);
+- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp, &fcomp, NULL);
++ bfa_pending_q_init(&cb_qe, bfad_stats_comp, &fcomp, NULL);
+
+ spin_lock_irqsave(&bfad->bfad_lock, flags);
+ iocmd->status = bfa_fcport_clear_stats(&bfad->bfa, &cb_qe);
+@@ -2453,7 +2453,7 @@ bfad_iocmd_qos_get_stats(struct bfad_s *bfad, void *cmd)
+ struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
+
+ init_completion(&fcomp.comp);
+- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp,
++ bfa_pending_q_init(&cb_qe, bfad_stats_comp,
+ &fcomp, &iocmd->stats);
+
+ spin_lock_irqsave(&bfad->bfad_lock, flags);
+@@ -2484,7 +2484,7 @@ bfad_iocmd_qos_reset_stats(struct bfad_s *bfad, void *cmd)
+ struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(&bfad->bfa);
+
+ init_completion(&fcomp.comp);
+- bfa_pending_q_init(&cb_qe, (bfa_cb_cbfn_t)bfad_hcb_comp,
++ bfa_pending_q_init(&cb_qe, bfad_stats_comp,
+ &fcomp, NULL);
+
+ spin_lock_irqsave(&bfad->bfad_lock, flags);
+diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h
+index f9e8620..807a983 100644
+--- a/drivers/scsi/bfa/bfad_drv.h
++++ b/drivers/scsi/bfa/bfad_drv.h
+@@ -187,8 +187,10 @@ union bfad_tmp_buf {
+ /*
+ * BFAD (PCI function) data structure
+ */
++enum bfad_sm_event;
++
+ struct bfad_s {
+- bfa_sm_t sm; /* state machine */
++ void (*sm)(struct bfad_s *, enum bfad_sm_event); /* state machine */
+ struct list_head list_entry;
+ struct bfa_s bfa;
+ struct bfa_fcs_s bfa_fcs;
+@@ -309,6 +311,7 @@ void bfad_fcs_stop(struct bfad_s *bfad);
+ void bfad_remove_intr(struct bfad_s *bfad);
+ void bfad_hal_mem_release(struct bfad_s *bfad);
+ void bfad_hcb_comp(void *arg, bfa_status_t status);
++void bfad_stats_comp(void *arg, bfa_boolean_t _status);
+
+ int bfad_setup_intr(struct bfad_s *bfad);
+ void bfad_remove_intr(struct bfad_s *bfad);
+diff --git a/drivers/scsi/csiostor/csio_defs.h b/drivers/scsi/csiostor/csio_defs.h
+index c38017b..3268e62 100644
+--- a/drivers/scsi/csiostor/csio_defs.h
++++ b/drivers/scsi/csiostor/csio_defs.h
+@@ -73,7 +73,8 @@ csio_list_deleted(struct list_head *list)
+ #define csio_list_prev(elem) (((struct list_head *)(elem))->prev)
+
+ /* State machine */
+-typedef void (*csio_sm_state_t)(void *, uint32_t);
++struct csio_sm;
++typedef void (*csio_sm_state_t)(struct csio_sm *, uint32_t);
+
+ struct csio_sm {
+ struct list_head sm_list;
+@@ -81,9 +82,9 @@ struct csio_sm {
+ };
+
+ static inline void
+-csio_set_state(void *smp, void *state)
++csio_set_state(struct csio_sm *smp, csio_sm_state_t state)
+ {
+- ((struct csio_sm *)smp)->sm_state = (csio_sm_state_t)state;
++ smp->sm_state = state;
+ }
+
+ static inline void
+@@ -93,21 +94,21 @@ csio_init_state(struct csio_sm *smp, void *state)
+ }
+
+ static inline void
+-csio_post_event(void *smp, uint32_t evt)
++csio_post_event(struct csio_sm *smp, uint32_t evt)
+ {
+- ((struct csio_sm *)smp)->sm_state(smp, evt);
++ smp->sm_state(smp, evt);
+ }
+
+ static inline csio_sm_state_t
+-csio_get_state(void *smp)
++csio_get_state(struct csio_sm *smp)
+ {
+- return ((struct csio_sm *)smp)->sm_state;
++ return smp->sm_state;
+ }
+
+ static inline bool
+-csio_match_state(void *smp, void *state)
++csio_match_state(struct csio_sm *smp, csio_sm_state_t state)
+ {
+- return (csio_get_state(smp) == (csio_sm_state_t)state);
++ return (csio_get_state(smp) == state);
+ }
+
+ #define CSIO_ASSERT(cond) BUG_ON(!(cond))
+diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
+index 622bdab..1a31d41 100644
+--- a/drivers/scsi/csiostor/csio_hw.c
++++ b/drivers/scsi/csiostor/csio_hw.c
+@@ -89,15 +89,15 @@ static void csio_mgmtm_cleanup(struct csio_mgmtm *);
+ static void csio_hw_mbm_cleanup(struct csio_hw *);
+
+ /* State machine forward declarations */
+-static void csio_hws_uninit(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_configuring(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_initializing(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_ready(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_quiescing(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_quiesced(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_resetting(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_removing(struct csio_hw *, enum csio_hw_ev);
+-static void csio_hws_pcierr(struct csio_hw *, enum csio_hw_ev);
++static void csio_hws_uninit(struct csio_sm *, uint32_t);
++static void csio_hws_configuring(struct csio_sm *, uint32_t);
++static void csio_hws_initializing(struct csio_sm *, uint32_t);
++static void csio_hws_ready(struct csio_sm *, uint32_t);
++static void csio_hws_quiescing(struct csio_sm *, uint32_t);
++static void csio_hws_quiesced(struct csio_sm *, uint32_t);
++static void csio_hws_resetting(struct csio_sm *, uint32_t);
++static void csio_hws_removing(struct csio_sm *, uint32_t);
++static void csio_hws_pcierr(struct csio_sm *, uint32_t);
+
+ static void csio_hw_initialize(struct csio_hw *hw);
+ static void csio_evtq_stop(struct csio_hw *hw);
+@@ -105,12 +105,12 @@ static void csio_evtq_start(struct csio_hw *hw);
+
+ int csio_is_hw_ready(struct csio_hw *hw)
+ {
+- return csio_match_state(hw, csio_hws_ready);
++ return csio_match_state(&hw->sm, csio_hws_ready);
+ }
+
+ int csio_is_hw_removing(struct csio_hw *hw)
+ {
+- return csio_match_state(hw, csio_hws_removing);
++ return csio_match_state(&hw->sm, csio_hws_removing);
+ }
+
+
+@@ -2326,8 +2326,11 @@ csio_hw_fatal_err(struct csio_hw *hw)
+ *
+ */
+ static void
+-csio_hws_uninit(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_uninit(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2351,8 +2354,11 @@ csio_hws_uninit(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_configuring(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_configuring(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2389,8 +2395,11 @@ csio_hws_configuring(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_initializing(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_initializing(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2427,8 +2436,11 @@ csio_hws_initializing(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_ready(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ /* Remember the event */
+ hw->evtflag = evt;
+
+@@ -2476,8 +2488,11 @@ csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_quiescing(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_quiescing(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2536,8 +2551,11 @@ csio_hws_quiescing(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_quiesced(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_quiesced(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2561,8 +2579,11 @@ csio_hws_quiesced(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_resetting(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_resetting(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2587,8 +2608,11 @@ csio_hws_resetting(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_removing(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_removing(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+@@ -2622,8 +2646,11 @@ csio_hws_removing(struct csio_hw *hw, enum csio_hw_ev evt)
+ *
+ */
+ static void
+-csio_hws_pcierr(struct csio_hw *hw, enum csio_hw_ev evt)
++csio_hws_pcierr(struct csio_sm *_hw, uint32_t _evt)
+ {
++ struct csio_hw *hw = container_of(_hw, struct csio_hw, sm);
++ enum csio_hw_ev evt = _evt;
++
+ hw->prev_evt = hw->cur_evt;
+ hw->cur_evt = evt;
+ CSIO_INC_STATS(hw, n_evt_sm[evt]);
+diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
+index dbe416f..25a9a5b 100644
+--- a/drivers/scsi/csiostor/csio_init.c
++++ b/drivers/scsi/csiostor/csio_init.c
+@@ -1053,7 +1053,7 @@ static void csio_remove_one(struct pci_dev *pdev)
+ *
+ */
+ static pci_ers_result_t
+-csio_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++csio_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct csio_hw *hw = pci_get_drvdata(pdev);
+
+diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
+index c00b2ff..da72dbc 100644
+--- a/drivers/scsi/csiostor/csio_lnode.c
++++ b/drivers/scsi/csiostor/csio_lnode.c
+@@ -55,10 +55,10 @@ int csio_fdmi_enable = 1;
+ #define PORT_ID_PTR(_x) ((uint8_t *)(&_x) + 1)
+
+ /* Lnode SM declarations */
+-static void csio_lns_uninit(struct csio_lnode *, enum csio_ln_ev);
+-static void csio_lns_online(struct csio_lnode *, enum csio_ln_ev);
+-static void csio_lns_ready(struct csio_lnode *, enum csio_ln_ev);
+-static void csio_lns_offline(struct csio_lnode *, enum csio_ln_ev);
++static void csio_lns_uninit(struct csio_sm *, uint32_t);
++static void csio_lns_online(struct csio_sm *, uint32_t);
++static void csio_lns_ready(struct csio_sm *, uint32_t);
++static void csio_lns_offline(struct csio_sm *, uint32_t);
+
+ static int csio_ln_mgmt_submit_req(struct csio_ioreq *,
+ void (*io_cbfn) (struct csio_hw *, struct csio_ioreq *),
+@@ -1077,7 +1077,7 @@ csio_handle_link_down(struct csio_hw *hw, uint8_t portid, uint32_t fcfi,
+ int
+ csio_is_lnode_ready(struct csio_lnode *ln)
+ {
+- return (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_ready));
++ return (csio_get_state(&ln->sm) == csio_lns_ready);
+ }
+
+ /*****************************************************************************/
+@@ -1093,8 +1093,10 @@ csio_is_lnode_ready(struct csio_lnode *ln)
+ * Return - none.
+ */
+ static void
+-csio_lns_uninit(struct csio_lnode *ln, enum csio_ln_ev evt)
++csio_lns_uninit(struct csio_sm *_ln, uint32_t _evt)
+ {
++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
++ enum csio_ln_ev evt = _evt;
+ struct csio_hw *hw = csio_lnode_to_hw(ln);
+ struct csio_lnode *rln = hw->rln;
+ int rv;
+@@ -1146,8 +1148,10 @@ csio_lns_uninit(struct csio_lnode *ln, enum csio_ln_ev evt)
+ * Return - none.
+ */
+ static void
+-csio_lns_online(struct csio_lnode *ln, enum csio_ln_ev evt)
++csio_lns_online(struct csio_sm *_ln, uint32_t _evt)
+ {
++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
++ enum csio_ln_ev evt = _evt;
+ struct csio_hw *hw = csio_lnode_to_hw(ln);
+
+ CSIO_INC_STATS(ln, n_evt_sm[evt]);
+@@ -1198,8 +1202,10 @@ csio_lns_online(struct csio_lnode *ln, enum csio_ln_ev evt)
+ * Return - none.
+ */
+ static void
+-csio_lns_ready(struct csio_lnode *ln, enum csio_ln_ev evt)
++csio_lns_ready(struct csio_sm *_ln, uint32_t _evt)
+ {
++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
++ enum csio_ln_ev evt = _evt;
+ struct csio_hw *hw = csio_lnode_to_hw(ln);
+
+ CSIO_INC_STATS(ln, n_evt_sm[evt]);
+@@ -1272,8 +1278,10 @@ csio_lns_ready(struct csio_lnode *ln, enum csio_ln_ev evt)
+ * Return - none.
+ */
+ static void
+-csio_lns_offline(struct csio_lnode *ln, enum csio_ln_ev evt)
++csio_lns_offline(struct csio_sm *_ln, uint32_t _evt)
+ {
++ struct csio_lnode *ln = container_of(_ln, struct csio_lnode, sm);
++ enum csio_ln_ev evt = _evt;
+ struct csio_hw *hw = csio_lnode_to_hw(ln);
+ struct csio_lnode *rln = hw->rln;
+ int rv;
+@@ -1349,15 +1357,15 @@ csio_free_fcfinfo(struct kref *kref)
+ void
+ csio_lnode_state_to_str(struct csio_lnode *ln, int8_t *str)
+ {
+- if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_uninit)) {
++ if (csio_get_state(&ln->sm) == csio_lns_uninit) {
+ strcpy(str, "UNINIT");
+ return;
+ }
+- if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_ready)) {
++ if (csio_get_state(&ln->sm) == csio_lns_ready) {
+ strcpy(str, "READY");
+ return;
+ }
+- if (csio_get_state(ln) == ((csio_sm_state_t)csio_lns_offline)) {
++ if (csio_get_state(&ln->sm) == csio_lns_offline) {
+ strcpy(str, "OFFLINE");
+ return;
+ }
+diff --git a/drivers/scsi/csiostor/csio_rnode.c b/drivers/scsi/csiostor/csio_rnode.c
+index e9c3b04..4ba3a59 100644
+--- a/drivers/scsi/csiostor/csio_rnode.c
++++ b/drivers/scsi/csiostor/csio_rnode.c
+@@ -46,10 +46,10 @@ static int csio_rnode_init(struct csio_rnode *, struct csio_lnode *);
+ static void csio_rnode_exit(struct csio_rnode *);
+
+ /* Static machine forward declarations */
+-static void csio_rns_uninit(struct csio_rnode *, enum csio_rn_ev);
+-static void csio_rns_ready(struct csio_rnode *, enum csio_rn_ev);
+-static void csio_rns_offline(struct csio_rnode *, enum csio_rn_ev);
+-static void csio_rns_disappeared(struct csio_rnode *, enum csio_rn_ev);
++static void csio_rns_uninit(struct csio_sm *, uint32_t);
++static void csio_rns_ready(struct csio_sm *, uint32_t);
++static void csio_rns_offline(struct csio_sm *, uint32_t);
++static void csio_rns_disappeared(struct csio_sm *, uint32_t);
+
+ /* RNF event mapping */
+ static enum csio_rn_ev fwevt_to_rnevt[] = {
+@@ -88,13 +88,13 @@ static enum csio_rn_ev fwevt_to_rnevt[] = {
+ int
+ csio_is_rnode_ready(struct csio_rnode *rn)
+ {
+- return csio_match_state(rn, csio_rns_ready);
++ return csio_match_state(&rn->sm, csio_rns_ready);
+ }
+
+ static int
+ csio_is_rnode_uninit(struct csio_rnode *rn)
+ {
+- return csio_match_state(rn, csio_rns_uninit);
++ return csio_match_state(&rn->sm, csio_rns_uninit);
+ }
+
+ static int
+@@ -601,8 +601,10 @@ __csio_unreg_rnode(struct csio_rnode *rn)
+ *
+ */
+ static void
+-csio_rns_uninit(struct csio_rnode *rn, enum csio_rn_ev evt)
++csio_rns_uninit(struct csio_sm *_rn, uint32_t _evt)
+ {
++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
++ enum csio_rn_ev evt = _evt;
+ struct csio_lnode *ln = csio_rnode_to_lnode(rn);
+ int ret = 0;
+
+@@ -641,8 +643,10 @@ csio_rns_uninit(struct csio_rnode *rn, enum csio_rn_ev evt)
+ *
+ */
+ static void
+-csio_rns_ready(struct csio_rnode *rn, enum csio_rn_ev evt)
++csio_rns_ready(struct csio_sm *_rn, uint32_t _evt)
+ {
++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
++ enum csio_rn_ev evt = _evt;
+ struct csio_lnode *ln = csio_rnode_to_lnode(rn);
+ int ret = 0;
+
+@@ -726,8 +730,10 @@ csio_rns_ready(struct csio_rnode *rn, enum csio_rn_ev evt)
+ *
+ */
+ static void
+-csio_rns_offline(struct csio_rnode *rn, enum csio_rn_ev evt)
++csio_rns_offline(struct csio_sm *_rn, uint32_t _evt)
+ {
++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
++ enum csio_rn_ev evt = _evt;
+ struct csio_lnode *ln = csio_rnode_to_lnode(rn);
+ int ret = 0;
+
+@@ -785,8 +791,10 @@ csio_rns_offline(struct csio_rnode *rn, enum csio_rn_ev evt)
+ *
+ */
+ static void
+-csio_rns_disappeared(struct csio_rnode *rn, enum csio_rn_ev evt)
++csio_rns_disappeared(struct csio_sm *_rn, uint32_t _evt)
+ {
++ struct csio_rnode *rn = container_of(_rn, struct csio_rnode, sm);
++ enum csio_rn_ev evt = _evt;
+ struct csio_lnode *ln = csio_rnode_to_lnode(rn);
+ int ret = 0;
+
+diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
+index c2a6f9f..5a37cc4 100644
+--- a/drivers/scsi/csiostor/csio_scsi.c
++++ b/drivers/scsi/csiostor/csio_scsi.c
+@@ -65,12 +65,12 @@ static int csio_ddp_descs = 128;
+ static int csio_do_abrt_cls(struct csio_hw *,
+ struct csio_ioreq *, bool);
+
+-static void csio_scsis_uninit(struct csio_ioreq *, enum csio_scsi_ev);
+-static void csio_scsis_io_active(struct csio_ioreq *, enum csio_scsi_ev);
+-static void csio_scsis_tm_active(struct csio_ioreq *, enum csio_scsi_ev);
+-static void csio_scsis_aborting(struct csio_ioreq *, enum csio_scsi_ev);
+-static void csio_scsis_closing(struct csio_ioreq *, enum csio_scsi_ev);
+-static void csio_scsis_shost_cmpl_await(struct csio_ioreq *, enum csio_scsi_ev);
++static void csio_scsis_uninit(struct csio_sm *, uint32_t);
++static void csio_scsis_io_active(struct csio_sm *, uint32_t);
++static void csio_scsis_tm_active(struct csio_sm *, uint32_t);
++static void csio_scsis_aborting(struct csio_sm *, uint32_t);
++static void csio_scsis_closing(struct csio_sm *, uint32_t);
++static void csio_scsis_shost_cmpl_await(struct csio_sm *, uint32_t);
+
+ /*
+ * csio_scsi_match_io - Match an ioreq with the given SCSI level data.
+@@ -700,8 +700,10 @@ csio_scsi_abrt_cls(struct csio_ioreq *req, bool abort)
+ /* START: SCSI SM */
+ /*****************************************************************************/
+ static void
+-csio_scsis_uninit(struct csio_ioreq *req, enum csio_scsi_ev evt)
++csio_scsis_uninit(struct csio_sm *_req, uint32_t _evt)
+ {
++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
++ enum csio_scsi_ev evt = _evt;
+ struct csio_hw *hw = req->lnode->hwp;
+ struct csio_scsim *scsim = csio_hw_to_scsim(hw);
+
+@@ -770,8 +772,10 @@ csio_scsis_uninit(struct csio_ioreq *req, enum csio_scsi_ev evt)
+ }
+
+ static void
+-csio_scsis_io_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
++csio_scsis_io_active(struct csio_sm *_req, uint32_t _evt)
+ {
++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
++ enum csio_scsi_ev evt = _evt;
+ struct csio_hw *hw = req->lnode->hwp;
+ struct csio_scsim *scm = csio_hw_to_scsim(hw);
+ struct csio_rnode *rn;
+@@ -842,8 +846,10 @@ csio_scsis_io_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
+ }
+
+ static void
+-csio_scsis_tm_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
++csio_scsis_tm_active(struct csio_sm *_req, uint32_t _evt)
+ {
++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
++ enum csio_scsi_ev evt = _evt;
+ struct csio_hw *hw = req->lnode->hwp;
+ struct csio_scsim *scm = csio_hw_to_scsim(hw);
+
+@@ -885,8 +891,10 @@ csio_scsis_tm_active(struct csio_ioreq *req, enum csio_scsi_ev evt)
+ }
+
+ static void
+-csio_scsis_aborting(struct csio_ioreq *req, enum csio_scsi_ev evt)
++csio_scsis_aborting(struct csio_sm *_req, uint32_t _evt)
+ {
++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
++ enum csio_scsi_ev evt = _evt;
+ struct csio_hw *hw = req->lnode->hwp;
+ struct csio_scsim *scm = csio_hw_to_scsim(hw);
+
+@@ -982,8 +990,10 @@ csio_scsis_aborting(struct csio_ioreq *req, enum csio_scsi_ev evt)
+ }
+
+ static void
+-csio_scsis_closing(struct csio_ioreq *req, enum csio_scsi_ev evt)
++csio_scsis_closing(struct csio_sm *_req, uint32_t _evt)
+ {
++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
++ enum csio_scsi_ev evt = _evt;
+ struct csio_hw *hw = req->lnode->hwp;
+ struct csio_scsim *scm = csio_hw_to_scsim(hw);
+
+@@ -1046,8 +1056,11 @@ csio_scsis_closing(struct csio_ioreq *req, enum csio_scsi_ev evt)
+ }
+
+ static void
+-csio_scsis_shost_cmpl_await(struct csio_ioreq *req, enum csio_scsi_ev evt)
++csio_scsis_shost_cmpl_await(struct csio_sm *_req, uint32_t _evt)
+ {
++ struct csio_ioreq *req = container_of(_req, struct csio_ioreq, sm);
++ enum csio_scsi_ev evt = _evt;
++
+ switch (evt) {
+ case CSIO_SCSIE_ABORT:
+ case CSIO_SCSIE_CLOSE:
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index f3bb7af..ead83a2 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
@@ -56464,6 +68603,64 @@ index 045c4e1..13de803 100644
error = bus_register(&fcoe_bus_type);
if (error)
+diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
+index d7597c0..fa26730 100644
+--- a/drivers/scsi/fcoe/fcoe_transport.c
++++ b/drivers/scsi/fcoe/fcoe_transport.c
+@@ -32,13 +32,13 @@ MODULE_AUTHOR("Open-FCoE.org");
+ MODULE_DESCRIPTION("FIP discovery protocol and FCoE transport for FCoE HBAs");
+ MODULE_LICENSE("GPL v2");
+
+-static int fcoe_transport_create(const char *, struct kernel_param *);
+-static int fcoe_transport_destroy(const char *, struct kernel_param *);
++static int fcoe_transport_create(const char *, const struct kernel_param *);
++static int fcoe_transport_destroy(const char *, const struct kernel_param *);
+ static int fcoe_transport_show(char *buffer, const struct kernel_param *kp);
+ static struct fcoe_transport *fcoe_transport_lookup(struct net_device *device);
+ static struct fcoe_transport *fcoe_netdev_map_lookup(struct net_device *device);
+-static int fcoe_transport_enable(const char *, struct kernel_param *);
+-static int fcoe_transport_disable(const char *, struct kernel_param *);
++static int fcoe_transport_enable(const char *, const struct kernel_param *);
++static int fcoe_transport_disable(const char *, const struct kernel_param *);
+ static int libfcoe_device_notification(struct notifier_block *notifier,
+ ulong event, void *ptr);
+
+@@ -842,7 +842,7 @@ EXPORT_SYMBOL(fcoe_ctlr_destroy_store);
+ *
+ * Returns: 0 for success
+ */
+-static int fcoe_transport_create(const char *buffer, struct kernel_param *kp)
++static int fcoe_transport_create(const char *buffer, const struct kernel_param *kp)
+ {
+ int rc = -ENODEV;
+ struct net_device *netdev = NULL;
+@@ -907,7 +907,7 @@ out_nodev:
+ *
+ * Returns: 0 for success
+ */
+-static int fcoe_transport_destroy(const char *buffer, struct kernel_param *kp)
++static int fcoe_transport_destroy(const char *buffer, const struct kernel_param *kp)
+ {
+ int rc = -ENODEV;
+ struct net_device *netdev = NULL;
+@@ -951,7 +951,7 @@ out_nodev:
+ *
+ * Returns: 0 for success
+ */
+-static int fcoe_transport_disable(const char *buffer, struct kernel_param *kp)
++static int fcoe_transport_disable(const char *buffer, const struct kernel_param *kp)
+ {
+ int rc = -ENODEV;
+ struct net_device *netdev = NULL;
+@@ -985,7 +985,7 @@ out_nodev:
+ *
+ * Returns: 0 for success
+ */
+-static int fcoe_transport_enable(const char *buffer, struct kernel_param *kp)
++static int fcoe_transport_enable(const char *buffer, const struct kernel_param *kp)
+ {
+ int rc = -ENODEV;
+ struct net_device *netdev = NULL;
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 82ac1cd..aeee84c 100644
--- a/drivers/scsi/hosts.c
@@ -56487,10 +68684,10 @@ index 82ac1cd..aeee84c 100644
/* These three are default values which can be overridden */
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
-index a386036..03dff12 100644
+index 38ce0e3..f74fc2a 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
-@@ -916,10 +916,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q)
+@@ -912,10 +912,10 @@ static inline u32 next_command(struct ctlr_info *h, u8 q)
struct reply_queue_buffer *rq = &h->reply_queue[q];
if (h->transMethod & CFGTBL_Trans_io_accel1)
@@ -56503,7 +68700,7 @@ index a386036..03dff12 100644
if ((rq->head[rq->current_entry] & 1) == rq->wraparound) {
a = rq->head[rq->current_entry];
-@@ -1101,7 +1101,7 @@ static void __enqueue_cmd_and_start_io(struct ctlr_info *h,
+@@ -1097,7 +1097,7 @@ static void __enqueue_cmd_and_start_io(struct ctlr_info *h,
break;
default:
set_performant_mode(h, c, reply_queue);
@@ -56512,7 +68709,7 @@ index a386036..03dff12 100644
}
}
-@@ -6746,17 +6746,17 @@ static void __iomem *remap_pci_mem(ulong base, ulong size)
+@@ -6839,17 +6839,17 @@ static void __iomem *remap_pci_mem(ulong base, ulong size)
static inline unsigned long get_next_completion(struct ctlr_info *h, u8 q)
{
@@ -56533,7 +68730,7 @@ index a386036..03dff12 100644
(h->interrupts_enabled == 0);
}
-@@ -7684,7 +7684,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
+@@ -7777,7 +7777,7 @@ static int hpsa_pci_init(struct ctlr_info *h)
if (prod_index < 0)
return prod_index;
h->product_name = products[prod_index].product_name;
@@ -56542,7 +68739,7 @@ index a386036..03dff12 100644
h->needs_abort_tags_swizzled =
ctlr_needs_abort_tags_swizzled(h->board_id);
-@@ -8083,7 +8083,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
+@@ -8176,7 +8176,7 @@ static void controller_lockup_detected(struct ctlr_info *h)
unsigned long flags;
u32 lockup_detected;
@@ -56551,7 +68748,7 @@ index a386036..03dff12 100644
spin_lock_irqsave(&h->lock, flags);
lockup_detected = readl(h->vaddr + SA5_SCRATCHPAD_OFFSET);
if (!lockup_detected) {
-@@ -8419,7 +8419,7 @@ reinit_after_soft_reset:
+@@ -8512,7 +8512,7 @@ reinit_after_soft_reset:
}
/* make sure the board interrupts are off */
@@ -56560,7 +68757,7 @@ index a386036..03dff12 100644
rc = hpsa_request_irqs(h, do_hpsa_intr_msi, do_hpsa_intr_intx);
if (rc)
-@@ -8477,7 +8477,7 @@ reinit_after_soft_reset:
+@@ -8570,7 +8570,7 @@ reinit_after_soft_reset:
* fake ones to scoop up any residual completions.
*/
spin_lock_irqsave(&h->lock, flags);
@@ -56569,7 +68766,7 @@ index a386036..03dff12 100644
spin_unlock_irqrestore(&h->lock, flags);
hpsa_free_irqs(h);
rc = hpsa_request_irqs(h, hpsa_msix_discard_completions,
-@@ -8507,9 +8507,9 @@ reinit_after_soft_reset:
+@@ -8600,9 +8600,9 @@ reinit_after_soft_reset:
dev_info(&h->pdev->dev, "Board READY.\n");
dev_info(&h->pdev->dev,
"Waiting for stale completions to drain.\n");
@@ -56581,7 +68778,7 @@ index a386036..03dff12 100644
rc = controller_reset_failed(h->cfgtable);
if (rc)
-@@ -8536,7 +8536,7 @@ reinit_after_soft_reset:
+@@ -8629,7 +8629,7 @@ reinit_after_soft_reset:
/* Turn the interrupts on so we can service requests */
@@ -56590,7 +68787,7 @@ index a386036..03dff12 100644
hpsa_hba_inquiry(h);
-@@ -8557,7 +8557,7 @@ reinit_after_soft_reset:
+@@ -8650,7 +8650,7 @@ reinit_after_soft_reset:
clean7: /* perf, sg, cmd, irq, shost, pci, lu, aer/h */
hpsa_free_performant_mode(h);
@@ -56599,7 +68796,7 @@ index a386036..03dff12 100644
clean6: /* sg, cmd, irq, pci, lockup, wq/aer/h */
hpsa_free_sg_chain_blocks(h);
clean5: /* cmd, irq, shost, pci, lu, aer/h */
-@@ -8692,7 +8692,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
+@@ -8785,7 +8785,7 @@ static void hpsa_shutdown(struct pci_dev *pdev)
* To write all data in the battery backed cache to disks
*/
hpsa_flush_cache(h);
@@ -56608,7 +68805,7 @@ index a386036..03dff12 100644
hpsa_free_irqs(h); /* init_one 4 */
hpsa_disable_interrupt_mode(h); /* pci_init 2 */
}
-@@ -8834,7 +8834,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
+@@ -8927,7 +8927,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
CFGTBL_Trans_enable_directed_msix |
(trans_support & (CFGTBL_Trans_io_accel1 |
CFGTBL_Trans_io_accel2));
@@ -56617,7 +68814,7 @@ index a386036..03dff12 100644
/* This is a bit complicated. There are 8 registers on
* the controller which we write to to tell it 8 different
-@@ -8876,7 +8876,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
+@@ -8969,7 +8969,7 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
* perform the superfluous readl() after each command submission.
*/
if (trans_support & (CFGTBL_Trans_io_accel1 | CFGTBL_Trans_io_accel2))
@@ -56626,7 +68823,7 @@ index a386036..03dff12 100644
/* Controller spec: zero out this buffer. */
for (i = 0; i < h->nreply_queues; i++)
-@@ -8906,12 +8906,12 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
+@@ -8999,12 +8999,12 @@ static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
* enable outbound interrupt coalescing in accelerator mode;
*/
if (trans_support & CFGTBL_Trans_io_accel1) {
@@ -56642,7 +68839,7 @@ index a386036..03dff12 100644
writel(4, &h->cfgtable->HostWrite.CoalIntCount);
}
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
-index ae5beda..59e7332 100644
+index fdd39fc..a2176e0 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -177,7 +177,7 @@ struct ctlr_info {
@@ -56746,9 +68943,36 @@ index 4d1c511..d5744cb 100644
wait_queue_head_t reset_wq;
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
-index 43ac626..1bf014e9 100644
+index d6a691e..59e3128 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
+@@ -947,7 +947,7 @@ static void ipr_send_command(struct ipr_cmnd *ipr_cmd)
+ **/
+ static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
+ void (*done) (struct ipr_cmnd *),
+- void (*timeout_func) (struct ipr_cmnd *), u32 timeout)
++ void (*timeout_func) (unsigned long), u32 timeout)
+ {
+ list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
+
+@@ -955,7 +955,7 @@ static void ipr_do_req(struct ipr_cmnd *ipr_cmd,
+
+ ipr_cmd->timer.data = (unsigned long) ipr_cmd;
+ ipr_cmd->timer.expires = jiffies + timeout;
+- ipr_cmd->timer.function = (void (*)(unsigned long))timeout_func;
++ ipr_cmd->timer.function = timeout_func;
+
+ add_timer(&ipr_cmd->timer);
+
+@@ -1037,7 +1037,7 @@ static void ipr_init_ioadl(struct ipr_cmnd *ipr_cmd, dma_addr_t dma_addr,
+ * none
+ **/
+ static void ipr_send_blocking_cmd(struct ipr_cmnd *ipr_cmd,
+- void (*timeout_func) (struct ipr_cmnd *ipr_cmd),
++ void (*timeout_func) (unsigned long ipr_cmd),
+ u32 timeout)
+ {
+ struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
@@ -1057,7 +1057,7 @@ static int ipr_get_hrrq_index(struct ipr_ioa_cfg *ioa_cfg)
if (ioa_cfg->hrrq_num == 1)
hrrq = 0;
@@ -56758,7 +68982,60 @@ index 43ac626..1bf014e9 100644
hrrq = (hrrq % (ioa_cfg->hrrq_num - 1)) + 1;
}
return hrrq;
-@@ -8107,9 +8107,9 @@ static void ipr_init_ioa_mem(struct ipr_ioa_cfg *ioa_cfg)
+@@ -2600,8 +2600,9 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
+ * Return value:
+ * none
+ **/
+-static void ipr_timeout(struct ipr_cmnd *ipr_cmd)
++static void ipr_timeout(unsigned long _ipr_cmd)
+ {
++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
+ unsigned long lock_flags = 0;
+ struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
+
+@@ -2632,8 +2633,9 @@ static void ipr_timeout(struct ipr_cmnd *ipr_cmd)
+ * Return value:
+ * none
+ **/
+-static void ipr_oper_timeout(struct ipr_cmnd *ipr_cmd)
++static void ipr_oper_timeout(unsigned long _ipr_cmd)
+ {
++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
+ unsigned long lock_flags = 0;
+ struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
+
+@@ -5263,8 +5265,9 @@ static void ipr_bus_reset_done(struct ipr_cmnd *ipr_cmd)
+ * Return value:
+ * none
+ **/
+-static void ipr_abort_timeout(struct ipr_cmnd *ipr_cmd)
++static void ipr_abort_timeout(unsigned long _ipr_cmd)
+ {
++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
+ struct ipr_cmnd *reset_cmd;
+ struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
+ struct ipr_cmd_pkt *cmd_pkt;
+@@ -8036,8 +8039,9 @@ static int ipr_ioafp_identify_hrrq(struct ipr_cmnd *ipr_cmd)
+ * Return value:
+ * none
+ **/
+-static void ipr_reset_timer_done(struct ipr_cmnd *ipr_cmd)
++static void ipr_reset_timer_done(unsigned long _ipr_cmd)
+ {
++ struct ipr_cmnd *ipr_cmd = (struct ipr_cmnd *)_ipr_cmd;
+ struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
+ unsigned long lock_flags = 0;
+
+@@ -8075,7 +8079,7 @@ static void ipr_reset_start_timer(struct ipr_cmnd *ipr_cmd,
+
+ ipr_cmd->timer.data = (unsigned long) ipr_cmd;
+ ipr_cmd->timer.expires = jiffies + timeout;
+- ipr_cmd->timer.function = (void (*)(unsigned long))ipr_reset_timer_done;
++ ipr_cmd->timer.function = ipr_reset_timer_done;
+ add_timer(&ipr_cmd->timer);
+ }
+
+@@ -8105,9 +8109,9 @@ static void ipr_init_ioa_mem(struct ipr_ioa_cfg *ioa_cfg)
ioa_cfg->identify_hrrq_index = 0;
if (ioa_cfg->hrrq_num == 1)
@@ -56770,8 +69047,35 @@ index 43ac626..1bf014e9 100644
/* Zero out config table */
memset(ioa_cfg->u.cfg_table, 0, ioa_cfg->cfg_table_size);
+@@ -8161,7 +8165,7 @@ static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd)
+
+ ipr_cmd->timer.data = (unsigned long) ipr_cmd;
+ ipr_cmd->timer.expires = jiffies + stage_time * HZ;
+- ipr_cmd->timer.function = (void (*)(unsigned long))ipr_oper_timeout;
++ ipr_cmd->timer.function = ipr_oper_timeout;
+ ipr_cmd->done = ipr_reset_ioa_job;
+ add_timer(&ipr_cmd->timer);
+
+@@ -8233,7 +8237,7 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
+
+ ipr_cmd->timer.data = (unsigned long) ipr_cmd;
+ ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ);
+- ipr_cmd->timer.function = (void (*)(unsigned long))ipr_oper_timeout;
++ ipr_cmd->timer.function = ipr_oper_timeout;
+ ipr_cmd->done = ipr_reset_ioa_job;
+ add_timer(&ipr_cmd->timer);
+ list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q);
+@@ -9221,7 +9225,7 @@ static void ipr_pci_perm_failure(struct pci_dev *pdev)
+ * PCI_ERS_RESULT_NEED_RESET or PCI_ERS_RESULT_DISCONNECT
+ */
+ static pci_ers_result_t ipr_pci_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ switch (state) {
+ case pci_channel_io_frozen:
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
-index a34c7a5..797901a 100644
+index 56c5706..209ec50 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1535,7 +1535,7 @@ struct ipr_ioa_cfg {
@@ -56942,10 +69246,10 @@ index 9c706d8..d3e3ed2 100644
.qc_issue = sas_ata_qc_issue,
.qc_fill_rtf = sas_ata_qc_fill_rtf,
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
-index ceee9a3..59939c5 100644
+index 90a3ca5..a68c8cd 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
-@@ -435,7 +435,7 @@ struct lpfc_vport {
+@@ -430,7 +430,7 @@ struct lpfc_vport {
struct dentry *debug_nodelist;
struct dentry *vport_debugfs_root;
struct lpfc_debugfs_trc *disc_trc;
@@ -56954,7 +69258,7 @@ index ceee9a3..59939c5 100644
#endif
uint8_t stat_data_enabled;
uint8_t stat_data_blocked;
-@@ -887,8 +887,8 @@ struct lpfc_hba {
+@@ -891,8 +891,8 @@ struct lpfc_hba {
struct timer_list fabric_block_timer;
unsigned long bit_flags;
#define FABRIC_COMANDS_BLOCKED 0
@@ -56965,7 +69269,7 @@ index ceee9a3..59939c5 100644
unsigned long last_rsrc_error_time;
unsigned long last_ramp_down_time;
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
-@@ -923,7 +923,7 @@ struct lpfc_hba {
+@@ -927,7 +927,7 @@ struct lpfc_hba {
struct dentry *debug_slow_ring_trc;
struct lpfc_debugfs_trc *slow_ring_trc;
@@ -57058,10 +69362,19 @@ index 25aa9b9..d700a65 100644
snprintf(name, sizeof(name), "discovery_trace");
vport->debug_disc_trc =
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
-index db9446c..627edd4 100644
+index a544366..311a655 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
-@@ -11425,8 +11425,10 @@ lpfc_init(void)
+@@ -11027,7 +11027,7 @@ lpfc_pci_resume_one(struct pci_dev *pdev)
+ * PCI_ERS_RESULT_DISCONNECT - device could not be recovered
+ **/
+ static pci_ers_result_t
+-lpfc_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++lpfc_io_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct Scsi_Host *shost = pci_get_drvdata(pdev);
+ struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba;
+@@ -11435,8 +11435,10 @@ lpfc_init(void)
"misc_register returned with status %d", error);
if (lpfc_enable_npiv) {
@@ -57075,7 +69388,7 @@ index db9446c..627edd4 100644
lpfc_transport_template =
fc_attach_transport(&lpfc_transport_functions);
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
-index 4679ed4..4ddcfea 100644
+index 152b3c8..cfb6a1d 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -261,7 +261,7 @@ lpfc_rampdown_queue_depth(struct lpfc_hba *phba)
@@ -57122,8 +69435,43 @@ index c0f7c8c..2903f29 100644
u16 max_mfi_cmds;
u16 max_scsi_cmds;
u32 max_sectors_per_req;
+diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
+index 83658ac..4269881 100644
+--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
++++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
+@@ -100,7 +100,7 @@ _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc, int sleep_flag);
+ *
+ */
+ static int
+-_scsih_set_fwfault_debug(const char *val, struct kernel_param *kp)
++_scsih_set_fwfault_debug(const char *val, const struct kernel_param *kp)
+ {
+ int ret = param_set_int(val, kp);
+ struct MPT3SAS_ADAPTER *ioc;
+diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+index 9ab77b0..3cc9611 100644
+--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
++++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+@@ -282,7 +282,7 @@ struct _scsi_io_transfer {
+ * Note: The logging levels are defined in mpt3sas_debug.h.
+ */
+ static int
+-_scsih_set_debug_level(const char *val, struct kernel_param *kp)
++_scsih_set_debug_level(const char *val, const struct kernel_param *kp)
+ {
+ int ret = param_set_int(val, kp);
+ struct MPT3SAS_ADAPTER *ioc;
+@@ -8702,7 +8702,7 @@ scsih_resume(struct pci_dev *pdev)
+ * PCI_ERS_RESULT_NEED_RESET or PCI_ERS_RESULT_DISCONNECT
+ */
+ pci_ers_result_t
+-scsih_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++scsih_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct Scsi_Host *shost = pci_get_drvdata(pdev);
+ struct MPT3SAS_ADAPTER *ioc = shost_priv(shost);
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
-index b2a88200..f469ddd 100644
+index b2a88200..d66f0cc 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -201,8 +201,8 @@ static int pmcraid_slave_alloc(struct scsi_device *scsi_dev)
@@ -57137,6 +69485,105 @@ index b2a88200..f469ddd 100644
rc = 0;
}
spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags);
+@@ -557,8 +557,9 @@ static void pmcraid_reset_type(struct pmcraid_instance *pinstance)
+
+ static void pmcraid_ioa_reset(struct pmcraid_cmd *);
+
+-static void pmcraid_bist_done(struct pmcraid_cmd *cmd)
++static void pmcraid_bist_done(unsigned long _cmd)
+ {
++ struct pmcraid_cmd *cmd = (struct pmcraid_cmd *)_cmd;
+ struct pmcraid_instance *pinstance = cmd->drv_inst;
+ unsigned long lock_flags;
+ int rc;
+@@ -573,8 +574,7 @@ static void pmcraid_bist_done(struct pmcraid_cmd *cmd)
+ cmd->timer.expires = jiffies + cmd->time_left;
+ cmd->time_left = 0;
+ cmd->timer.data = (unsigned long)cmd;
+- cmd->timer.function =
+- (void (*)(unsigned long))pmcraid_bist_done;
++ cmd->timer.function = pmcraid_bist_done;
+ add_timer(&cmd->timer);
+ } else {
+ cmd->time_left = 0;
+@@ -607,7 +607,7 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd)
+ cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT);
+ cmd->timer.data = (unsigned long)cmd;
+ cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT);
+- cmd->timer.function = (void (*)(unsigned long))pmcraid_bist_done;
++ cmd->timer.function = pmcraid_bist_done;
+ add_timer(&cmd->timer);
+ }
+
+@@ -617,8 +617,9 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd)
+ * Return value
+ * None
+ */
+-static void pmcraid_reset_alert_done(struct pmcraid_cmd *cmd)
++static void pmcraid_reset_alert_done(unsigned long _cmd)
+ {
++ struct pmcraid_cmd *cmd = (struct pmcraid_cmd *)_cmd;
+ struct pmcraid_instance *pinstance = cmd->drv_inst;
+ u32 status = ioread32(pinstance->ioa_status);
+ unsigned long lock_flags;
+@@ -639,8 +640,7 @@ static void pmcraid_reset_alert_done(struct pmcraid_cmd *cmd)
+ cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT;
+ cmd->timer.data = (unsigned long)cmd;
+ cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT;
+- cmd->timer.function =
+- (void (*)(unsigned long))pmcraid_reset_alert_done;
++ cmd->timer.function = pmcraid_reset_alert_done;
+ add_timer(&cmd->timer);
+ }
+ }
+@@ -678,8 +678,7 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
+ cmd->time_left = PMCRAID_RESET_TIMEOUT;
+ cmd->timer.data = (unsigned long)cmd;
+ cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT;
+- cmd->timer.function =
+- (void (*)(unsigned long))pmcraid_reset_alert_done;
++ cmd->timer.function = pmcraid_reset_alert_done;
+ add_timer(&cmd->timer);
+
+ iowrite32(DOORBELL_IOA_RESET_ALERT,
+@@ -704,8 +703,9 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd)
+ * Return value:
+ * None
+ */
+-static void pmcraid_timeout_handler(struct pmcraid_cmd *cmd)
++static void pmcraid_timeout_handler(unsigned long _cmd)
+ {
++ struct pmcraid_cmd *cmd = (struct pmcraid_cmd *)_cmd;
+ struct pmcraid_instance *pinstance = cmd->drv_inst;
+ unsigned long lock_flags;
+
+@@ -920,7 +920,7 @@ static void pmcraid_send_cmd(
+ struct pmcraid_cmd *cmd,
+ void (*cmd_done) (struct pmcraid_cmd *),
+ unsigned long timeout,
+- void (*timeout_func) (struct pmcraid_cmd *)
++ void (*timeout_func) (unsigned long)
+ )
+ {
+ /* initialize done function */
+@@ -930,7 +930,7 @@ static void pmcraid_send_cmd(
+ /* setup timeout handler */
+ cmd->timer.data = (unsigned long)cmd;
+ cmd->timer.expires = jiffies + timeout;
+- cmd->timer.function = (void (*)(unsigned long))timeout_func;
++ cmd->timer.function = timeout_func;
+ add_timer(&cmd->timer);
+ }
+
+@@ -1968,7 +1968,7 @@ static void pmcraid_soft_reset(struct pmcraid_cmd *cmd)
+ cmd->timer.data = (unsigned long)cmd;
+ cmd->timer.expires = jiffies +
+ msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT);
+- cmd->timer.function = (void (*)(unsigned long))pmcraid_timeout_handler;
++ cmd->timer.function = pmcraid_timeout_handler;
+
+ if (!timer_pending(&cmd->timer))
+ add_timer(&cmd->timer);
@@ -2641,9 +2641,9 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd)
/* If this was a SCSI read/write command keep count of errors */
@@ -57230,10 +69677,10 @@ index e1d150f..6c6df44 100644
/* To indicate add/delete/modify during CCN */
u8 change_detected;
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
-index 6b942d9..cd44452 100644
+index 6992ebc..30d7691 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
-@@ -2206,7 +2206,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
+@@ -2242,7 +2242,7 @@ qla24xx_vport_disable(struct fc_vport *fc_vport, bool disable)
return 0;
}
@@ -57242,7 +69689,7 @@ index 6b942d9..cd44452 100644
.show_host_node_name = 1,
.show_host_port_name = 1,
-@@ -2254,7 +2254,7 @@ struct fc_function_template qla2xxx_transport_functions = {
+@@ -2290,7 +2290,7 @@ struct fc_function_template qla2xxx_transport_functions = {
.bsg_timeout = qla24xx_bsg_timeout,
};
@@ -57252,10 +69699,21 @@ index 6b942d9..cd44452 100644
.show_host_node_name = 1,
.show_host_port_name = 1,
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
-index 7686bfe..4710893 100644
+index 0103e46..6220a84 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
-@@ -571,8 +571,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
+@@ -176,8 +176,8 @@ extern void qla2x00_disable_board_on_pci_error(struct work_struct *);
+ */
+ extern struct scsi_host_template qla2xxx_driver_template;
+ extern struct scsi_transport_template *qla2xxx_transport_vport_template;
+-extern void qla2x00_timer(scsi_qla_host_t *);
+-extern void qla2x00_start_timer(scsi_qla_host_t *, void *, unsigned long);
++extern void qla2x00_timer(unsigned long);
++extern void qla2x00_start_timer(scsi_qla_host_t *, void (*)(unsigned long), unsigned long);
+ extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
+ extern int qla24xx_disable_vp (scsi_qla_host_t *);
+ extern int qla24xx_enable_vp (scsi_qla_host_t *);
+@@ -578,8 +578,8 @@ extern void qla2x00_get_sym_node_name(scsi_qla_host_t *, uint8_t *, size_t);
struct device_attribute;
extern struct device_attribute *qla2x00_host_attrs[];
struct fc_function_template;
@@ -57267,10 +69725,25 @@ index 7686bfe..4710893 100644
extern void qla2x00_free_sysfs_attr(scsi_qla_host_t *, bool);
extern void qla2x00_init_host_attr(scsi_qla_host_t *);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
-index fc6674d..8f3aa03 100644
+index f6c7ce3..2dd675b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
-@@ -1429,8 +1429,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
+@@ -291,12 +291,12 @@ struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
+ */
+
+ __inline__ void
+-qla2x00_start_timer(scsi_qla_host_t *vha, void *func, unsigned long interval)
++qla2x00_start_timer(scsi_qla_host_t *vha, void (*func)(unsigned long), unsigned long interval)
+ {
+ init_timer(&vha->timer);
+ vha->timer.expires = jiffies + interval * HZ;
+ vha->timer.data = (unsigned long)vha;
+- vha->timer.function = (void (*)(unsigned long))func;
++ vha->timer.function = func;
+ add_timer(&vha->timer);
+ vha->timer_active = 1;
+ }
+@@ -1441,8 +1441,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
!pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
/* Ok, a 64bit DMA mask is applicable. */
ha->flags.enable_64bit_addressing = 1;
@@ -57283,20 +69756,51 @@ index fc6674d..8f3aa03 100644
return;
}
}
+@@ -5290,8 +5292,9 @@ qla2x00_rst_aen(scsi_qla_host_t *vha)
+ * Context: Interrupt
+ ***************************************************************************/
+ void
+-qla2x00_timer(scsi_qla_host_t *vha)
++qla2x00_timer(unsigned long _vha)
+ {
++ scsi_qla_host_t *vha = (scsi_qla_host_t *)_vha;
+ unsigned long cpu_flags = 0;
+ int start_dpc = 0;
+ int index;
+@@ -5553,7 +5556,7 @@ qla2x00_release_firmware(void)
+ }
+
+ static pci_ers_result_t
+-qla2xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++qla2xxx_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ scsi_qla_host_t *vha = pci_get_drvdata(pdev);
+ struct qla_hw_data *ha = vha->hw;
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
-index 75514a1..8526741 100644
+index ee967be..7fcb8c0 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
-@@ -506,7 +506,7 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)
+@@ -667,7 +667,7 @@ static int qlt_reset(struct scsi_qla_host *vha, void *iocb, int mcmd)
loop_id = le16_to_cpu(n->u.isp24.nport_handle);
if (loop_id == 0xFFFF) {
/* Global event */
- atomic_inc(&vha->vha_tgt.qla_tgt->tgt_global_resets_count);
+ atomic_inc_unchecked(&vha->vha_tgt.qla_tgt->tgt_global_resets_count);
+ spin_lock_irqsave(&ha->tgt.sess_lock, flags);
qlt_clear_tgt_db(vha->vha_tgt.qla_tgt);
- #if 0 /* FIXME: do we need to choose a session here? */
- if (!list_empty(&ha->tgt.qla_tgt->sess_list)) {
-@@ -5536,7 +5536,7 @@ static struct qla_tgt_sess *qlt_make_local_sess(struct scsi_qla_host *vha,
+ spin_unlock_irqrestore(&ha->tgt.sess_lock, flags);
+@@ -834,8 +834,9 @@ static void qlt_undelete_sess(struct qla_tgt_sess *sess)
+ sess->deleted = 0;
+ }
+
+-static void qlt_del_sess_work_fn(struct delayed_work *work)
++static void qlt_del_sess_work_fn(struct work_struct *_work)
+ {
++ struct delayed_work *work = container_of(_work, struct delayed_work, work);
+ struct qla_tgt *tgt = container_of(work, struct qla_tgt,
+ sess_del_work);
+ struct scsi_qla_host *vha = tgt->vha;
+@@ -5806,7 +5807,7 @@ static struct qla_tgt_sess *qlt_make_local_sess(struct scsi_qla_host *vha,
retry:
global_resets =
@@ -57305,8 +69809,8 @@ index 75514a1..8526741 100644
rc = qla24xx_get_loop_id(vha, s_id, &loop_id);
if (rc != 0) {
-@@ -5563,12 +5563,12 @@ retry:
- return NULL;
+@@ -5845,12 +5846,12 @@ retry:
+ }
if (global_resets !=
- atomic_read(&vha->vha_tgt.qla_tgt->tgt_global_resets_count)) {
@@ -57320,7 +69824,17 @@ index 75514a1..8526741 100644
qla_tgt->tgt_global_resets_count));
goto retry;
}
-@@ -5784,7 +5784,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
+@@ -6063,8 +6064,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
+ init_waitqueue_head(&tgt->waitQ);
+ INIT_LIST_HEAD(&tgt->sess_list);
+ INIT_LIST_HEAD(&tgt->del_sess_list);
+- INIT_DELAYED_WORK(&tgt->sess_del_work,
+- (void (*)(struct work_struct *))qlt_del_sess_work_fn);
++ INIT_DELAYED_WORK(&tgt->sess_del_work, qlt_del_sess_work_fn);
+ spin_lock_init(&tgt->sess_work_lock);
+ INIT_WORK(&tgt->sess_work, qlt_sess_work_fn);
+ INIT_LIST_HEAD(&tgt->sess_works_list);
+@@ -6072,7 +6072,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)
INIT_LIST_HEAD(&tgt->srr_ctio_list);
INIT_LIST_HEAD(&tgt->srr_imm_list);
INIT_WORK(&tgt->srr_work, qlt_handle_srr_work);
@@ -57330,10 +69844,10 @@ index 75514a1..8526741 100644
base_vha->vha_tgt.qla_tgt = tgt;
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
-index bca584a..9cb3ed9 100644
+index 22a6a76..7f73de1 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
-@@ -876,7 +876,7 @@ struct qla_tgt {
+@@ -877,7 +877,7 @@ struct qla_tgt {
struct list_head srr_imm_list;
struct work_struct srr_work;
@@ -57356,9 +69870,27 @@ index a7cfc27..151f483 100644
uint32_t default_time2wait; /* Default Min time between
* relogins (+aens) */
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
-index 01c3610..3e92008 100644
+index 01c3610..f287da9 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
+@@ -3956,7 +3956,7 @@ exit_session_conn_param:
+ * Timer routines
+ */
+
+-static void qla4xxx_start_timer(struct scsi_qla_host *ha, void *func,
++static void qla4xxx_start_timer(struct scsi_qla_host *ha, void (*func)(unsigned long),
+ unsigned long interval)
+ {
+ DEBUG(printk("scsi: %s: Starting timer thread for adapter %d\n",
+@@ -3964,7 +3964,7 @@ static void qla4xxx_start_timer(struct scsi_qla_host *ha, void *func,
+ init_timer(&ha->timer);
+ ha->timer.expires = jiffies + interval * HZ;
+ ha->timer.data = (unsigned long)ha;
+- ha->timer.function = (void (*)(unsigned long))func;
++ ha->timer.function = func;
+ add_timer(&ha->timer);
+ ha->timer_active = 1;
+ }
@@ -4490,12 +4490,12 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess)
*/
if (!iscsi_is_session_online(cls_sess)) {
@@ -57374,7 +69906,18 @@ index 01c3610..3e92008 100644
ddb_entry->default_time2wait + 4));
set_bit(DPC_RELOGIN_DEVICE, &ha->dpc_flags);
atomic_set(&ddb_entry->retry_relogin_timer,
-@@ -6603,7 +6603,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
+@@ -4508,8 +4508,9 @@ static void qla4xxx_check_relogin_flash_ddb(struct iscsi_cls_session *cls_sess)
+ * qla4xxx_timer - checks every second for work to do.
+ * @ha: Pointer to host adapter structure.
+ **/
+-static void qla4xxx_timer(struct scsi_qla_host *ha)
++static void qla4xxx_timer(unsigned long _ha)
+ {
++ struct scsi_qla_host *ha = (struct scsi_qla_host *)_ha;
+ int start_dpc = 0;
+ uint16_t w;
+
+@@ -6603,7 +6604,7 @@ static void qla4xxx_setup_flash_ddb_entry(struct scsi_qla_host *ha,
atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY);
atomic_set(&ddb_entry->relogin_timer, 0);
@@ -57383,8 +69926,17 @@ index 01c3610..3e92008 100644
def_timeout = le16_to_cpu(ddb_entry->fw_ddb_entry.def_timeout);
ddb_entry->default_relogin_timeout =
(def_timeout > LOGIN_TOV) && (def_timeout < LOGIN_TOV * 10) ?
+@@ -9557,7 +9558,7 @@ exit_host_reset:
+ * RECOVERED - driver's pci_resume()
+ */
+ static pci_ers_result_t
+-qla4xxx_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++qla4xxx_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct scsi_qla_host *ha = pci_get_drvdata(pdev);
+
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
-index d07fb65..4a162c0 100644
+index 1deb6ad..3057db5 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -591,7 +591,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
@@ -57397,10 +69949,10 @@ index d07fb65..4a162c0 100644
if (drv->done)
good_bytes = drv->done(cmd);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
-index dd8ad2a..5c5a30c 100644
+index 8c6e318..1c58581 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
-@@ -1597,7 +1597,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
+@@ -1599,7 +1599,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
shost = sdev->host;
scsi_init_cmd_errh(cmd);
cmd->result = DID_NO_CONNECT << 16;
@@ -57409,7 +69961,7 @@ index dd8ad2a..5c5a30c 100644
/*
* SCSI request completion path will do scsi_device_unbusy(),
-@@ -1620,9 +1620,9 @@ static void scsi_softirq_done(struct request *rq)
+@@ -1622,9 +1622,9 @@ static void scsi_softirq_done(struct request *rq)
INIT_LIST_HEAD(&cmd->eh_entry);
@@ -57421,7 +69973,7 @@ index dd8ad2a..5c5a30c 100644
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
-@@ -1663,7 +1663,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
+@@ -1665,7 +1665,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
struct Scsi_Host *host = cmd->device->host;
int rtn = 0;
@@ -57431,10 +69983,10 @@ index dd8ad2a..5c5a30c 100644
/* check if the device is still usable */
if (unlikely(cmd->device->sdev_state == SDEV_DEL)) {
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
-index c8115b4..c31cd19 100644
+index 00bc721..7a16d8a 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
-@@ -813,7 +813,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
+@@ -818,7 +818,7 @@ show_iostat_##field(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
struct scsi_device *sdev = to_scsi_device(dev); \
@@ -57444,7 +69996,7 @@ index c8115b4..c31cd19 100644
} \
static DEVICE_ATTR(field, S_IRUGO, show_iostat_##field, NULL)
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
-index 24eaaf6..de30ec9 100644
+index 8a88226..0d26fd1 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -502,7 +502,7 @@ static DECLARE_TRANSPORT_CLASS(fc_vport_class,
@@ -57514,8 +70066,21 @@ index e4b3d8f..3ab4dad 100644
err = class_register(&iscsi_transport_class);
if (err)
+diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
+index 319868f..a00cda5 100644
+--- a/drivers/scsi/scsi_transport_spi.c
++++ b/drivers/scsi/scsi_transport_spi.c
+@@ -758,7 +758,7 @@ spi_dv_device_compare_inquiry(struct scsi_device *sdev, u8 *buffer,
+ static enum spi_compare_returns
+ spi_dv_retrain(struct scsi_device *sdev, u8 *buffer, u8 *ptr,
+ enum spi_compare_returns
+- (*compare_fn)(struct scsi_device *, u8 *, u8 *, int))
++ (*compare_fn)(struct scsi_device *, u8 *, u8 *, const int))
+ {
+ struct spi_internal *i = to_spi_internal(sdev->host->transportt);
+ struct scsi_target *starget = sdev->sdev_target;
diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c
-index e3cd3ec..00560ec 100644
+index e3cd3ec..97ab643 100644
--- a/drivers/scsi/scsi_transport_srp.c
+++ b/drivers/scsi/scsi_transport_srp.c
@@ -35,7 +35,7 @@
@@ -57536,6 +70101,15 @@ index e3cd3ec..00560ec 100644
return 0;
}
+@@ -226,7 +226,7 @@ static ssize_t show_reconnect_delay(struct device *dev,
+
+ static ssize_t store_reconnect_delay(struct device *dev,
+ struct device_attribute *attr,
+- const char *buf, const size_t count)
++ const char *buf, size_t count)
+ {
+ struct srp_rport *rport = transport_class_to_srp_rport(dev);
+ int res, delay;
@@ -752,7 +752,7 @@ struct srp_rport *srp_rport_add(struct Scsi_Host *shost,
rport_fast_io_fail_timedout);
INIT_DELAYED_WORK(&rport->dev_loss_work, rport_dev_loss_timedout);
@@ -57546,7 +70120,7 @@ index e3cd3ec..00560ec 100644
transport_setup_device(&rport->dev);
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
-index 0d7c6e8..288e969 100644
+index 974ca5b..f42903f 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -112,7 +112,7 @@ static int sd_resume(struct device *);
@@ -57567,7 +70141,7 @@ index 0d7c6e8..288e969 100644
{
int result = SCpnt->result;
unsigned int good_bytes = result ? 0 : scsi_bufflen(SCpnt);
-@@ -3088,7 +3088,7 @@ static int sd_probe(struct device *dev)
+@@ -3071,7 +3071,7 @@ static int sd_probe(struct device *dev)
sdkp->disk = gd;
sdkp->index = index;
atomic_set(&sdkp->openers, 0);
@@ -57651,10 +70225,10 @@ index de2c1bf..60b8563 100644
.read = fuse_read,
};
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
-index dee1cb8..3626295 100644
+index 47eff80..415be5a 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
-@@ -2506,7 +2506,7 @@ int spi_bus_unlock(struct spi_master *master)
+@@ -2528,7 +2528,7 @@ int spi_bus_unlock(struct spi_master *master)
EXPORT_SYMBOL_GPL(spi_bus_unlock);
/* portable code must never pass more than 32 bytes */
@@ -57695,7 +70269,7 @@ index aff9cdb..a2f1a81 100644
MKDEV(0, tdev->index), NULL, "%s", tdev->name);
if (IS_ERR(tdev->dev))
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
-index 7b4af51..63d4c51 100644
+index d57fade..106a0f7 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -311,8 +311,8 @@ static void comedi_file_reset(struct file *file)
@@ -57753,8 +70327,21 @@ index 3ccdec9..fcd4277 100644
/**
* struct fbtft_display - Describes the display properties
+diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c
+index 17d148f..68f3b55 100644
+--- a/drivers/staging/gdm724x/gdm_lte.c
++++ b/drivers/staging/gdm724x/gdm_lte.c
+@@ -410,7 +410,7 @@ static s32 gdm_lte_tx_nic_type(struct net_device *dev, struct sk_buff *skb)
+ return nic_type;
+ }
+
+-static int gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct nic *nic = netdev_priv(dev);
+ u32 nic_type;
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
-index e2c0f22..72fe9cc 100644
+index eb7e252..b7bd5e5 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -44,7 +44,7 @@
@@ -57766,6 +70353,19 @@ index e2c0f22..72fe9cc 100644
static struct tty_driver *gdm_driver[TTY_MAX_COUNT];
static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
+diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
+index ba03f93..842d70c 100644
+--- a/drivers/staging/gdm72xx/gdm_wimax.c
++++ b/drivers/staging/gdm72xx/gdm_wimax.c
+@@ -250,7 +250,7 @@ int gdm_wimax_send_tx(struct sk_buff *skb, struct net_device *dev)
+ return ret;
+ }
+
+-static int gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev)
+ {
+ int ret = 0;
+
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index 50c162e..b5d8b7e 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -57780,7 +70380,7 @@ index 50c162e..b5d8b7e 100644
return -ENOMEM;
ret = lis3l02dq_read_all(indio_dev, rx_array);
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
-index 35acb1a..055b04d 100644
+index f45ebed..490e439 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -547,8 +547,8 @@ static int ad7280_attr_init(struct ad7280_state *st)
@@ -57794,8 +70394,25 @@ index 35acb1a..055b04d 100644
GFP_KERNEL);
if (!st->iio_attr)
return -ENOMEM;
+diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+index f4fa725..e68e0ac 100644
+--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
++++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+@@ -307,10 +307,8 @@ typedef struct ksock_conn {
+ struct ksock_route *ksnc_route; /* owning route */
+ struct list_head ksnc_list; /* stash on peer's conn list */
+ struct socket *ksnc_sock; /* actual socket */
+- void *ksnc_saved_data_ready; /* socket's original
+- * data_ready() callback */
+- void *ksnc_saved_write_space; /* socket's original
+- * write_space() callback */
++ void (*ksnc_saved_data_ready)(struct sock *sk); /* socket's original data_ready() callback */
++ void (*ksnc_saved_write_space)(struct sock *sk); /* socket's original write_space() callback */
+ atomic_t ksnc_conn_refcount;/* conn refcount */
+ atomic_t ksnc_sock_refcount;/* sock refcount */
+ ksock_sched_t *ksnc_scheduler; /* who schedules this connection
diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c
-index 0605c65..d722199 100644
+index 1f04cc1..038e003 100644
--- a/drivers/staging/lustre/lnet/selftest/brw_test.c
+++ b/drivers/staging/lustre/lnet/selftest/brw_test.c
@@ -487,13 +487,11 @@ brw_server_handle(struct srpc_server_rpc *rpc)
@@ -57818,7 +70435,7 @@ index 0605c65..d722199 100644
srpc_service_t brw_test_service;
diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
-index f18e500..77fef26 100644
+index 1a2da74..6cc62b9 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -1624,12 +1624,10 @@ static srpc_service_t sfw_services[] = {
@@ -57872,11 +70489,327 @@ index d426536..92f0086 100644
srpc_service_t ping_test_service;
void ping_init_test_service(void)
+diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+index b064b58..8af38df 100644
+--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
++++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+@@ -751,7 +751,7 @@ static inline ino_t lu_igif_ino(const struct lu_fid *fid)
+ return fid_seq(fid);
+ }
+
+-void lustre_swab_ost_id(struct ost_id *oid);
++void lustre_swab_ost_id(void *oid);
+
+ /**
+ * Get inode generation from a igif.
+@@ -818,8 +818,8 @@ static inline int fid_is_zero(const struct lu_fid *fid)
+ return fid_seq(fid) == 0 && fid_oid(fid) == 0;
+ }
+
+-void lustre_swab_lu_fid(struct lu_fid *fid);
+-void lustre_swab_lu_seq_range(struct lu_seq_range *range);
++void lustre_swab_lu_fid(void *fid);
++void lustre_swab_lu_seq_range(void *range);
+
+ static inline int lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1)
+ {
+@@ -1137,7 +1137,7 @@ struct ptlrpc_body_v2 {
+ __u64 pb_padding[4];
+ };
+
+-void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
++void lustre_swab_ptlrpc_body(void *pb);
+
+ /* message body offset for lustre_msg_v2 */
+ /* ptlrpc body offset in all request/reply messages */
+@@ -1400,7 +1400,7 @@ struct obd_connect_data {
+ * the matching OBD_CONNECT flag, so that can be approved and landed easily to
+ * reserve the flag for future use. */
+
+-void lustre_swab_connect(struct obd_connect_data *ocd);
++void lustre_swab_connect(void *ocd);
+
+ /*
+ * Supported checksum algorithms. Up to 32 checksum types are supported.
+@@ -1742,10 +1742,10 @@ struct hsm_state_set {
+ __u64 hss_clearmask;
+ };
+
+-void lustre_swab_hsm_user_state(struct hsm_user_state *hus);
+-void lustre_swab_hsm_state_set(struct hsm_state_set *hss);
++void lustre_swab_hsm_user_state(void *hus);
++void lustre_swab_hsm_state_set(void *hss);
+
+-void lustre_swab_obd_statfs(struct obd_statfs *os);
++void lustre_swab_obd_statfs(void *os);
+
+ /* ost_body.data values for OST_BRW */
+
+@@ -1785,7 +1785,7 @@ struct obd_ioobj {
+ #define ioobj_max_brw_set(ioo, num) \
+ do { (ioo)->ioo_max_brw = ((num) - 1) << IOOBJ_MAX_BRW_BITS; } while (0)
+
+-void lustre_swab_obd_ioobj(struct obd_ioobj *ioo);
++void lustre_swab_obd_ioobj(void *ioo);
+
+ /* multiple of 8 bytes => can array */
+ struct niobuf_remote {
+@@ -1794,7 +1794,7 @@ struct niobuf_remote {
+ __u32 flags;
+ };
+
+-void lustre_swab_niobuf_remote(struct niobuf_remote *nbr);
++void lustre_swab_niobuf_remote(void *nbr);
+
+ /* lock value block communicated between the filter and llite */
+
+@@ -1869,7 +1869,7 @@ struct obd_quotactl {
+ struct obd_dqblk qc_dqblk;
+ };
+
+-void lustre_swab_obd_quotactl(struct obd_quotactl *q);
++void lustre_swab_obd_quotactl(void *q);
+
+ #define Q_QUOTACHECK 0x800100 /* deprecated as of 2.4 */
+ #define Q_INITQUOTA 0x800101 /* deprecated as of 2.4 */
+@@ -1918,7 +1918,7 @@ struct quota_body {
+ #define QUOTA_DQACQ_FL_REL 0x4 /* release quota */
+ #define QUOTA_DQACQ_FL_REPORT 0x8 /* report usage */
+
+-void lustre_swab_quota_body(struct quota_body *b);
++void lustre_swab_quota_body(void *b);
+
+ /* Quota types currently supported */
+ enum {
+@@ -2078,7 +2078,7 @@ typedef enum {
+ REINT_MAX
+ } mds_reint_t, mdt_reint_t;
+
+-void lustre_swab_generic_32s(__u32 *val);
++void lustre_swab_generic_32s(void *val);
+
+ /* the disposition of the intent outlines what was executed */
+ #define DISP_IT_EXECD 0x00000001
+@@ -2235,7 +2235,7 @@ struct mdt_body {
+ __u64 padding_10;
+ }; /* 216 */
+
+-void lustre_swab_mdt_body(struct mdt_body *b);
++void lustre_swab_mdt_body(void *b);
+
+ struct mdt_ioepoch {
+ struct lustre_handle handle;
+@@ -2244,7 +2244,7 @@ struct mdt_ioepoch {
+ __u32 padding;
+ };
+
+-void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b);
++void lustre_swab_mdt_ioepoch(void *b);
+
+ /* permissions for md_perm.mp_perm */
+ enum {
+@@ -2571,7 +2571,7 @@ struct mdt_rec_reint {
+ __u32 rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */
+ };
+
+-void lustre_swab_mdt_rec_reint(struct mdt_rec_reint *rr);
++void lustre_swab_mdt_rec_reint(void *rr);
+
+ struct lmv_desc {
+ __u32 ld_tgt_count; /* how many MDS's */
+@@ -2759,13 +2759,13 @@ union ldlm_gl_desc {
+ struct ldlm_gl_lquota_desc lquota_desc;
+ };
+
+-void lustre_swab_gl_desc(union ldlm_gl_desc *);
++void lustre_swab_gl_desc(void *);
+
+ struct ldlm_intent {
+ __u64 opc;
+ };
+
+-void lustre_swab_ldlm_intent(struct ldlm_intent *i);
++void lustre_swab_ldlm_intent(void *i);
+
+ struct ldlm_resource_desc {
+ ldlm_type_t lr_type;
+@@ -2790,7 +2790,7 @@ struct ldlm_request {
+ struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES];
+ };
+
+-void lustre_swab_ldlm_request(struct ldlm_request *rq);
++void lustre_swab_ldlm_request(void *rq);
+
+ /* If LDLM_ENQUEUE, 1 slot is already occupied, 1 is available.
+ * Otherwise, 2 are available. */
+@@ -2812,7 +2812,7 @@ struct ldlm_reply {
+ __u64 lock_policy_res2;
+ };
+
+-void lustre_swab_ldlm_reply(struct ldlm_reply *r);
++void lustre_swab_ldlm_reply(void *r);
+
+ #define ldlm_flags_to_wire(flags) ((__u32)(flags))
+ #define ldlm_flags_from_wire(flags) ((__u64)(flags))
+@@ -2857,7 +2857,7 @@ struct mgs_target_info {
+ char mti_params[MTI_PARAM_MAXLEN];
+ };
+
+-void lustre_swab_mgs_target_info(struct mgs_target_info *oinfo);
++void lustre_swab_mgs_target_info(void *oinfo);
+
+ struct mgs_nidtbl_entry {
+ __u64 mne_version; /* table version of this entry */
+@@ -2884,14 +2884,14 @@ struct mgs_config_body {
+ __u32 mcb_units; /* # of units for bulk transfer */
+ };
+
+-void lustre_swab_mgs_config_body(struct mgs_config_body *body);
++void lustre_swab_mgs_config_body(void *body);
+
+ struct mgs_config_res {
+ __u64 mcr_offset; /* index of last config log */
+ __u64 mcr_size; /* size of the log */
+ };
+
+-void lustre_swab_mgs_config_res(struct mgs_config_res *body);
++void lustre_swab_mgs_config_res(void *body);
+
+ /* Config marker flags (in config log) */
+ #define CM_START 0x01
+@@ -3324,9 +3324,9 @@ struct ll_fiemap_info_key {
+ struct ll_user_fiemap fiemap;
+ };
+
+-void lustre_swab_ost_body(struct ost_body *b);
+-void lustre_swab_ost_last_id(__u64 *id);
+-void lustre_swab_fiemap(struct ll_user_fiemap *fiemap);
++void lustre_swab_ost_body(void *b);
++void lustre_swab_ost_last_id(void *id);
++void lustre_swab_fiemap(void *fiemap);
+
+ void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum);
+ void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum);
+@@ -3335,19 +3335,19 @@ void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod,
+ void lustre_swab_lov_mds_md(struct lov_mds_md *lmm);
+
+ /* llog_swab.c */
+-void lustre_swab_llogd_body(struct llogd_body *d);
+-void lustre_swab_llog_hdr(struct llog_log_hdr *h);
+-void lustre_swab_llogd_conn_body(struct llogd_conn_body *d);
++void lustre_swab_llogd_body(void *d);
++void lustre_swab_llog_hdr(void *h);
++void lustre_swab_llogd_conn_body(void *d);
+ void lustre_swab_llog_rec(struct llog_rec_hdr *rec);
+
+ struct lustre_cfg;
+ void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg);
+
+ /* Functions for dumping PTLRPC fields */
+-void dump_rniobuf(struct niobuf_remote *rnb);
+-void dump_ioo(struct obd_ioobj *nb);
+-void dump_ost_body(struct ost_body *ob);
+-void dump_rcs(__u32 *rc);
++void dump_rniobuf(void *rnb);
++void dump_ioo(void *nb);
++void dump_ost_body(void *ob);
++void dump_rcs(void *rc);
+
+ #define IDX_INFO_MAGIC 0x3D37CC37
+
+@@ -3393,7 +3393,7 @@ struct idx_info {
+ __u64 ii_pad3;
+ };
+
+-void lustre_swab_idx_info(struct idx_info *ii);
++void lustre_swab_idx_info(void *ii);
+
+ #define II_END_OFF MDS_DIR_END_OFF /* all entries have been read */
+
+@@ -3465,7 +3465,7 @@ struct lustre_capa {
+ __u8 lc_hmac[CAPA_HMAC_MAX_LEN]; /** HMAC */
+ } __attribute__((packed));
+
+-void lustre_swab_lustre_capa(struct lustre_capa *c);
++void lustre_swab_lustre_capa(void *c);
+
+ /** lustre_capa::lc_opc */
+ enum {
+@@ -3549,7 +3549,7 @@ struct layout_intent {
+ __u64 li_end;
+ };
+
+-void lustre_swab_layout_intent(struct layout_intent *li);
++void lustre_swab_layout_intent(void *li);
+
+ /**
+ * On the wire version of hsm_progress structure.
+@@ -3569,12 +3569,12 @@ struct hsm_progress_kernel {
+ __u64 hpk_padding2;
+ } __attribute__((packed));
+
+-void lustre_swab_hsm_user_state(struct hsm_user_state *hus);
+-void lustre_swab_hsm_current_action(struct hsm_current_action *action);
+-void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk);
+-void lustre_swab_hsm_user_state(struct hsm_user_state *hus);
+-void lustre_swab_hsm_user_item(struct hsm_user_item *hui);
+-void lustre_swab_hsm_request(struct hsm_request *hr);
++void lustre_swab_hsm_user_state(void *hus);
++void lustre_swab_hsm_current_action(void *action);
++void lustre_swab_hsm_progress_kernel(void *hpk);
++void lustre_swab_hsm_user_state(void *hus);
++void lustre_swab_hsm_user_item(void *hui);
++void lustre_swab_hsm_request(void *hr);
+
+ /**
+ * These are object update opcode under UPDATE_OBJ, which is currently
+@@ -3659,8 +3659,8 @@ struct update_reply {
+ __u32 ur_lens[0];
+ };
+
+-void lustre_swab_update_buf(struct update_buf *ub);
+-void lustre_swab_update_reply_buf(struct update_reply *ur);
++void lustre_swab_update_buf(void *ub);
++void lustre_swab_update_reply_buf(void *ur);
+
+ /** layout swap request structure
+ * fid1 and fid2 are in mdt_body
+@@ -3669,7 +3669,7 @@ struct mdc_swap_layouts {
+ __u64 msl_flags;
+ } __packed;
+
+-void lustre_swab_swap_layouts(struct mdc_swap_layouts *msl);
++void lustre_swab_swap_layouts(void *msl);
+
+ struct close_data {
+ struct lustre_handle cd_handle;
+@@ -3678,7 +3678,7 @@ struct close_data {
+ __u64 cd_reserved[8];
+ };
+
+-void lustre_swab_close_data(struct close_data *data);
++void lustre_swab_close_data(void *data);
+
+ #endif
+ /** @} lustreidl */
diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h
-index 0e75a15..7290f30 100644
+index 9b319f1..42e8150 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
-@@ -1061,7 +1061,7 @@ struct ldlm_callback_suite {
+@@ -964,9 +964,9 @@ struct ldlm_ast_work {
+ struct ldlm_enqueue_info {
+ __u32 ei_type; /** Type of the lock being enqueued. */
+ __u32 ei_mode; /** Mode of the lock being enqueued. */
+- void *ei_cb_bl; /** blocking lock callback */
+- void *ei_cb_cp; /** lock completion callback */
+- void *ei_cb_gl; /** lock glimpse callback */
++ ldlm_blocking_callback ei_cb_bl; /** blocking lock callback */
++ ldlm_completion_callback ei_cb_cp; /** lock completion callback */
++ ldlm_glimpse_callback ei_cb_gl; /** lock glimpse callback */
+ void *ei_cbdata; /** Data to be passed into callbacks. */
+ };
+
+@@ -1059,7 +1059,7 @@ struct ldlm_callback_suite {
ldlm_completion_callback lcs_completion;
ldlm_blocking_callback lcs_blocking;
ldlm_glimpse_callback lcs_glimpse;
@@ -57885,8 +70818,21 @@ index 0e75a15..7290f30 100644
/* ldlm_lockd.c */
int ldlm_get_ref(void);
+diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
+index d834ddd..a650f2a 100644
+--- a/drivers/staging/lustre/lustre/include/lustre_net.h
++++ b/drivers/staging/lustre/lustre/include/lustre_net.h
+@@ -2564,7 +2564,7 @@ void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, int n, int min_size);
+ void *lustre_msg_buf(struct lustre_msg *m, int n, int minlen);
+ int lustre_msg_buflen(struct lustre_msg *m, int n);
+ int lustre_msg_bufcount(struct lustre_msg *m);
+-char *lustre_msg_string(struct lustre_msg *m, int n, int max_len);
++void *lustre_msg_string(struct lustre_msg *m, int n, int max_len);
+ __u32 lustre_msghdr_get_flags(struct lustre_msg *msg);
+ void lustre_msghdr_set_flags(struct lustre_msg *msg, __u32 flags);
+ __u32 lustre_msg_get_flags(struct lustre_msg *msg);
diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
-index 5e93afc..4fd41bf 100644
+index bcbe613..fed09d3 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -1213,7 +1213,7 @@ struct md_ops {
@@ -57911,8 +70857,32 @@ index 4310154..605d035 100644
CDEBUG(D_DLMTRACE,
"flags %#llx owner %llu pid %u mode %u start %llu end %llu\n",
+diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+index b9eb377..eadc037 100644
+--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
++++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+@@ -1785,8 +1785,9 @@ static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure)
+
+ static int replay_lock_interpret(const struct lu_env *env,
+ struct ptlrpc_request *req,
+- struct ldlm_async_args *aa, int rc)
++ void *_aa, int rc)
+ {
++ struct ldlm_async_args *aa = _aa;
+ struct ldlm_lock *lock;
+ struct ldlm_reply *reply;
+ struct obd_export *exp;
+@@ -1910,7 +1911,7 @@ static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock)
+ CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
+ aa = ptlrpc_req_async_args(req);
+ aa->lock_handle = body->lock_handle[0];
+- req->rq_interpret_reply = (ptlrpc_interpterer_t)replay_lock_interpret;
++ req->rq_interpret_reply = replay_lock_interpret;
+ ptlrpcd_add_req(req);
+
+ return 0;
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
-index e7c2b26..29a29f1 100644
+index 329d78c..9756f9e 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -322,11 +322,11 @@ out:
@@ -57932,8 +70902,762 @@ index e7c2b26..29a29f1 100644
};
static int proc_call_handler(void *data, int write, loff_t *ppos,
+diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
+index 8982f7d..c04fda5 100644
+--- a/drivers/staging/lustre/lustre/llite/dir.c
++++ b/drivers/staging/lustre/lustre/llite/dir.c
+@@ -140,7 +140,7 @@
+ */
+
+ /* returns the page unlocked, but with a reference */
+-static int ll_dir_filler(void *_hash, struct page *page0)
++static int ll_dir_filler(struct file *_hash, struct page *page0)
+ {
+ struct inode *inode = page0->mapping->host;
+ int hash64 = ll_i2sbi(inode)->ll_flags & LL_SBI_64BIT_HASH;
+diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c
+index 93fe69e..af92b7a 100644
+--- a/drivers/staging/lustre/lustre/lov/lov_io.c
++++ b/drivers/staging/lustre/lustre/lov/lov_io.c
+@@ -833,12 +833,32 @@ static void lov_empty_io_fini(const struct lu_env *env,
+ }
+
+ static void lov_empty_impossible(const struct lu_env *env,
+- struct cl_io_slice *ios)
++ const struct cl_io_slice *ios)
+ {
+ LBUG();
+ }
+
+-#define LOV_EMPTY_IMPOSSIBLE ((void *)lov_empty_impossible)
++static int lov_empty_impossible2(const struct lu_env *env,
++ const struct cl_io_slice *ios)
++{
++ LBUG();
++}
++
++static int lov_empty_impossible3(const struct lu_env *env,
++ const struct cl_io_slice *slice,
++ enum cl_req_type crt,
++ struct cl_2queue *queue)
++{
++ LBUG();
++}
++
++static int lov_empty_impossible4(const struct lu_env *env,
++ const struct cl_io_slice *slice,
++ const struct cl_page_slice *page,
++ unsigned from, unsigned to)
++{
++ LBUG();
++}
+
+ /**
+ * An io operation vector for files without stripes.
+@@ -848,32 +868,32 @@ static const struct cl_io_operations lov_empty_io_ops = {
+ [CIT_READ] = {
+ .cio_fini = lov_empty_io_fini,
+ #if 0
+- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
+- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
+- .cio_start = LOV_EMPTY_IMPOSSIBLE,
+- .cio_end = LOV_EMPTY_IMPOSSIBLE
++ .cio_iter_init = lov_empty_impossible2,
++ .cio_lock = lov_empty_impossible2,
++ .cio_start = lov_empty_impossible2,
++ .cio_end = lov_empty_impossible
+ #endif
+ },
+ [CIT_WRITE] = {
+ .cio_fini = lov_empty_io_fini,
+- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
+- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
+- .cio_start = LOV_EMPTY_IMPOSSIBLE,
+- .cio_end = LOV_EMPTY_IMPOSSIBLE
++ .cio_iter_init = lov_empty_impossible2,
++ .cio_lock = lov_empty_impossible2,
++ .cio_start = lov_empty_impossible2,
++ .cio_end = lov_empty_impossible
+ },
+ [CIT_SETATTR] = {
+ .cio_fini = lov_empty_io_fini,
+- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
+- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
+- .cio_start = LOV_EMPTY_IMPOSSIBLE,
+- .cio_end = LOV_EMPTY_IMPOSSIBLE
++ .cio_iter_init = lov_empty_impossible2,
++ .cio_lock = lov_empty_impossible2,
++ .cio_start = lov_empty_impossible2,
++ .cio_end = lov_empty_impossible
+ },
+ [CIT_FAULT] = {
+ .cio_fini = lov_empty_io_fini,
+- .cio_iter_init = LOV_EMPTY_IMPOSSIBLE,
+- .cio_lock = LOV_EMPTY_IMPOSSIBLE,
+- .cio_start = LOV_EMPTY_IMPOSSIBLE,
+- .cio_end = LOV_EMPTY_IMPOSSIBLE
++ .cio_iter_init = lov_empty_impossible2,
++ .cio_lock = lov_empty_impossible2,
++ .cio_start = lov_empty_impossible2,
++ .cio_end = lov_empty_impossible
+ },
+ [CIT_FSYNC] = {
+ .cio_fini = lov_empty_io_fini
+@@ -884,13 +904,13 @@ static const struct cl_io_operations lov_empty_io_ops = {
+ },
+ .req_op = {
+ [CRT_READ] = {
+- .cio_submit = LOV_EMPTY_IMPOSSIBLE
++ .cio_submit = lov_empty_impossible3
+ },
+ [CRT_WRITE] = {
+- .cio_submit = LOV_EMPTY_IMPOSSIBLE
++ .cio_submit = lov_empty_impossible3
+ }
+ },
+- .cio_commit_write = LOV_EMPTY_IMPOSSIBLE
++ .cio_commit_write = lov_empty_impossible4
+ };
+
+ int lov_io_init_raid0(const struct lu_env *env, struct cl_object *obj,
+diff --git a/drivers/staging/lustre/lustre/obdclass/llog_swab.c b/drivers/staging/lustre/lustre/obdclass/llog_swab.c
+index 3aa7393..10619c9 100644
+--- a/drivers/staging/lustre/lustre/obdclass/llog_swab.c
++++ b/drivers/staging/lustre/lustre/obdclass/llog_swab.c
+@@ -58,16 +58,20 @@ static void print_llogd_body(struct llogd_body *d)
+ CDEBUG(D_OTHER, "\tlgd_cur_offset: %#llx\n", d->lgd_cur_offset);
+ }
+
+-void lustre_swab_lu_fid(struct lu_fid *fid)
++void lustre_swab_lu_fid(void *_fid)
+ {
++ struct lu_fid *fid = _fid;
++
+ __swab64s(&fid->f_seq);
+ __swab32s(&fid->f_oid);
+ __swab32s(&fid->f_ver);
+ }
+ EXPORT_SYMBOL(lustre_swab_lu_fid);
+
+-void lustre_swab_ost_id(struct ost_id *oid)
++void lustre_swab_ost_id(void *_oid)
+ {
++ struct ost_id *oid = _oid;
++
+ if (fid_seq_is_mdt0(oid->oi.oi_seq)) {
+ __swab64s(&oid->oi.oi_id);
+ __swab64s(&oid->oi.oi_seq);
+@@ -84,8 +88,10 @@ static void lustre_swab_llog_id(struct llog_logid *log_id)
+ __swab32s(&log_id->lgl_ogen);
+ }
+
+-void lustre_swab_llogd_body(struct llogd_body *d)
++void lustre_swab_llogd_body(void *_d)
+ {
++ struct llogd_body *d = _d;
++
+ print_llogd_body(d);
+ lustre_swab_llog_id(&d->lgd_logid);
+ __swab32s(&d->lgd_ctxt_idx);
+@@ -98,8 +104,10 @@ void lustre_swab_llogd_body(struct llogd_body *d)
+ }
+ EXPORT_SYMBOL(lustre_swab_llogd_body);
+
+-void lustre_swab_llogd_conn_body(struct llogd_conn_body *d)
++void lustre_swab_llogd_conn_body(void *_d)
+ {
++ struct llogd_conn_body *d = _d;
++
+ __swab64s(&d->lgdc_gen.mnt_cnt);
+ __swab64s(&d->lgdc_gen.conn_cnt);
+ lustre_swab_llog_id(&d->lgdc_logid);
+@@ -114,8 +122,10 @@ static void lustre_swab_ll_fid(struct ll_fid *fid)
+ __swab32s(&fid->f_type);
+ }
+
+-void lustre_swab_lu_seq_range(struct lu_seq_range *range)
++void lustre_swab_lu_seq_range(void *_range)
+ {
++ struct lu_seq_range *range = _range;
++
+ __swab64s(&range->lsr_start);
+ __swab64s(&range->lsr_end);
+ __swab32s(&range->lsr_index);
+@@ -294,8 +304,10 @@ static void print_llog_hdr(struct llog_log_hdr *h)
+ CDEBUG(D_OTHER, "\tllh_tail.lrt_len: %#x\n", h->llh_tail.lrt_len);
+ }
+
+-void lustre_swab_llog_hdr(struct llog_log_hdr *h)
++void lustre_swab_llog_hdr(void *_h)
+ {
++ struct llog_log_hdr *h = _h;
++
+ print_llog_hdr(h);
+
+ lustre_swab_llog_rec(&h->llh_hdr);
+diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
+index 7034f0a..427966a 100644
+--- a/drivers/staging/lustre/lustre/osc/osc_request.c
++++ b/drivers/staging/lustre/lustre/osc/osc_request.c
+@@ -212,8 +212,9 @@ static inline void osc_pack_req_body(struct ptlrpc_request *req,
+
+ static int osc_getattr_interpret(const struct lu_env *env,
+ struct ptlrpc_request *req,
+- struct osc_async_args *aa, int rc)
++ void *_aa, int rc)
+ {
++ struct osc_async_args *aa = _aa;
+ struct ost_body *body;
+
+ if (rc != 0)
+@@ -258,7 +259,7 @@ static int osc_getattr_async(struct obd_export *exp, struct obd_info *oinfo,
+ osc_pack_req_body(req, oinfo);
+
+ ptlrpc_request_set_replen(req);
+- req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_getattr_interpret;
++ req->rq_interpret_reply = osc_getattr_interpret;
+
+ CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
+ aa = ptlrpc_req_async_args(req);
+@@ -354,8 +355,9 @@ out:
+
+ static int osc_setattr_interpret(const struct lu_env *env,
+ struct ptlrpc_request *req,
+- struct osc_setattr_args *sa, int rc)
++ void *_sa, int rc)
+ {
++ struct osc_setattr_args *sa = _sa;
+ struct ost_body *body;
+
+ if (rc != 0)
+@@ -405,8 +407,7 @@ int osc_setattr_async_base(struct obd_export *exp, struct obd_info *oinfo,
+ /* Do not wait for response. */
+ ptlrpcd_add_req(req);
+ } else {
+- req->rq_interpret_reply =
+- (ptlrpc_interpterer_t)osc_setattr_interpret;
++ req->rq_interpret_reply = osc_setattr_interpret;
+
+ CLASSERT(sizeof(*sa) <= sizeof(req->rq_async_args));
+ sa = ptlrpc_req_async_args(req);
+@@ -548,7 +549,7 @@ int osc_punch_base(struct obd_export *exp, struct obd_info *oinfo,
+
+ ptlrpc_request_set_replen(req);
+
+- req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_setattr_interpret;
++ req->rq_interpret_reply = osc_setattr_interpret;
+ CLASSERT(sizeof(*sa) <= sizeof(req->rq_async_args));
+ sa = ptlrpc_req_async_args(req);
+ sa->sa_oa = oinfo->oi_oa;
+@@ -2117,8 +2118,9 @@ static int osc_enqueue_fini(struct ptlrpc_request *req, struct ost_lvb *lvb,
+
+ static int osc_enqueue_interpret(const struct lu_env *env,
+ struct ptlrpc_request *req,
+- struct osc_enqueue_args *aa, int rc)
++ void *_aa, int rc)
+ {
++ struct osc_enqueue_args *aa = _aa;
+ struct ldlm_lock *lock;
+ struct lustre_handle handle;
+ __u32 mode;
+@@ -2315,8 +2317,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
+ aa->oa_lockh = lockh;
+ aa->oa_agl = !!agl;
+
+- req->rq_interpret_reply =
+- (ptlrpc_interpterer_t)osc_enqueue_interpret;
++ req->rq_interpret_reply = osc_enqueue_interpret;
+ if (rqset == PTLRPCD_SET)
+ ptlrpcd_add_req(req);
+ else
+@@ -2389,8 +2390,9 @@ int osc_cancel_base(struct lustre_handle *lockh, __u32 mode)
+
+ static int osc_statfs_interpret(const struct lu_env *env,
+ struct ptlrpc_request *req,
+- struct osc_async_args *aa, int rc)
++ void *_aa, int rc)
+ {
++ struct osc_async_args *aa = _aa;
+ struct obd_statfs *msfs;
+
+ if (rc == -EBADR)
+@@ -2456,7 +2458,7 @@ static int osc_statfs_async(struct obd_export *exp,
+ req->rq_no_delay = 1;
+ }
+
+- req->rq_interpret_reply = (ptlrpc_interpterer_t)osc_statfs_interpret;
++ req->rq_interpret_reply = osc_statfs_interpret;
+ CLASSERT (sizeof(*aa) <= sizeof(req->rq_async_args));
+ aa = ptlrpc_req_async_args(req);
+ aa->aa_oi = oinfo;
+diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
+index c0e613c..aff501f 100644
+--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
++++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
+@@ -811,8 +811,8 @@ struct req_capsule;
+ .rmf_name = (name), \
+ .rmf_flags = (flags), \
+ .rmf_size = (size), \
+- .rmf_swabber = (void (*)(void *))(swabber), \
+- .rmf_dumper = (void (*)(void *))(dumper) \
++ .rmf_swabber = (swabber), \
++ .rmf_dumper = (dumper) \
+ }
+
+ struct req_msg_field RMF_GENERIC_DATA =
+@@ -1959,8 +1959,7 @@ static void *__req_capsule_get(struct req_capsule *pill,
+ msg = __req_msg(pill, loc);
+ LASSERT(msg != NULL);
+
+- getter = (field->rmf_flags & RMF_F_STRING) ?
+- (typeof(getter))lustre_msg_string : lustre_msg_buf;
++ getter = (field->rmf_flags & RMF_F_STRING) ? lustre_msg_string : lustre_msg_buf;
+
+ if (field->rmf_flags & RMF_F_STRUCT_ARRAY) {
+ /*
+diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+index f3cb518..ed6f36b 100644
+--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
++++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+@@ -690,7 +690,7 @@ int lustre_msg_bufcount(struct lustre_msg *m)
+ }
+ EXPORT_SYMBOL(lustre_msg_bufcount);
+
+-char *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
++void *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
+ {
+ /* max_len == 0 means the string should fill the buffer */
+ char *str;
+@@ -1462,8 +1462,10 @@ EXPORT_SYMBOL(do_set_info_async);
+ /* byte flipping routines for all wire types declared in
+ * lustre_idl.h implemented here.
+ */
+-void lustre_swab_ptlrpc_body(struct ptlrpc_body *b)
++void lustre_swab_ptlrpc_body(void *_b)
+ {
++ struct ptlrpc_body *b = _b;
++
+ __swab32s(&b->pb_type);
+ __swab32s(&b->pb_version);
+ __swab32s(&b->pb_opc);
+@@ -1493,8 +1495,10 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *b)
+ }
+ EXPORT_SYMBOL(lustre_swab_ptlrpc_body);
+
+-void lustre_swab_connect(struct obd_connect_data *ocd)
++void lustre_swab_connect(void *_ocd)
+ {
++ struct obd_connect_data *ocd = _ocd;
++
+ __swab64s(&ocd->ocd_connect_flags);
+ __swab32s(&ocd->ocd_version);
+ __swab32s(&ocd->ocd_grant);
+@@ -1567,8 +1571,10 @@ static void lustre_swab_obdo(struct obdo *o)
+
+ }
+
+-void lustre_swab_obd_statfs(struct obd_statfs *os)
++void lustre_swab_obd_statfs(void *_os)
+ {
++ struct obd_statfs *os = _os;
++
+ __swab64s(&os->os_type);
+ __swab64s(&os->os_blocks);
+ __swab64s(&os->os_bfree);
+@@ -1592,42 +1598,54 @@ void lustre_swab_obd_statfs(struct obd_statfs *os)
+ }
+ EXPORT_SYMBOL(lustre_swab_obd_statfs);
+
+-void lustre_swab_obd_ioobj(struct obd_ioobj *ioo)
++void lustre_swab_obd_ioobj(void *_ioo)
+ {
++ struct obd_ioobj *ioo = _ioo;
++
+ lustre_swab_ost_id(&ioo->ioo_oid);
+ __swab32s(&ioo->ioo_max_brw);
+ __swab32s(&ioo->ioo_bufcnt);
+ }
+ EXPORT_SYMBOL(lustre_swab_obd_ioobj);
+
+-void lustre_swab_niobuf_remote(struct niobuf_remote *nbr)
++void lustre_swab_niobuf_remote(void *_nbr)
+ {
++ struct niobuf_remote *nbr = _nbr;
++
+ __swab64s(&nbr->offset);
+ __swab32s(&nbr->len);
+ __swab32s(&nbr->flags);
+ }
+ EXPORT_SYMBOL(lustre_swab_niobuf_remote);
+
+-void lustre_swab_ost_body(struct ost_body *b)
++void lustre_swab_ost_body(void *_b)
+ {
++ struct ost_body *b = _b;
++
+ lustre_swab_obdo(&b->oa);
+ }
+ EXPORT_SYMBOL(lustre_swab_ost_body);
+
+-void lustre_swab_ost_last_id(u64 *id)
++void lustre_swab_ost_last_id(void *_id)
+ {
++ u64 *id = _id;
++
+ __swab64s(id);
+ }
+ EXPORT_SYMBOL(lustre_swab_ost_last_id);
+
+-void lustre_swab_generic_32s(__u32 *val)
++void lustre_swab_generic_32s(void *_val)
+ {
++ __u32 *val = _val;
++
+ __swab32s(val);
+ }
+ EXPORT_SYMBOL(lustre_swab_generic_32s);
+
+-void lustre_swab_gl_desc(union ldlm_gl_desc *desc)
++void lustre_swab_gl_desc(void *_desc)
+ {
++ union ldlm_gl_desc *desc = _desc;
++
+ lustre_swab_lu_fid(&desc->lquota_desc.gl_id.qid_fid);
+ __swab64s(&desc->lquota_desc.gl_flags);
+ __swab64s(&desc->lquota_desc.gl_ver);
+@@ -1671,8 +1689,10 @@ void lustre_swab_lquota_lvb(struct lquota_lvb *lvb)
+ }
+ EXPORT_SYMBOL(lustre_swab_lquota_lvb);
+
+-void lustre_swab_mdt_body(struct mdt_body *b)
++void lustre_swab_mdt_body(void *_b)
+ {
++ struct mdt_body *b = _b;
++
+ lustre_swab_lu_fid(&b->fid1);
+ lustre_swab_lu_fid(&b->fid2);
+ /* handle is opaque */
+@@ -1705,8 +1725,10 @@ void lustre_swab_mdt_body(struct mdt_body *b)
+ }
+ EXPORT_SYMBOL(lustre_swab_mdt_body);
+
+-void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b)
++void lustre_swab_mdt_ioepoch(void *_b)
+ {
++ struct mdt_ioepoch *b = _b;
++
+ /* handle is opaque */
+ __swab64s(&b->ioepoch);
+ __swab32s(&b->flags);
+@@ -1714,8 +1736,9 @@ void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b)
+ }
+ EXPORT_SYMBOL(lustre_swab_mdt_ioepoch);
+
+-void lustre_swab_mgs_target_info(struct mgs_target_info *mti)
++void lustre_swab_mgs_target_info(void *_mti)
+ {
++ struct mgs_target_info *mti = _mti;
+ int i;
+
+ __swab32s(&mti->mti_lustre_ver);
+@@ -1753,16 +1776,20 @@ void lustre_swab_mgs_nidtbl_entry(struct mgs_nidtbl_entry *entry)
+ }
+ EXPORT_SYMBOL(lustre_swab_mgs_nidtbl_entry);
+
+-void lustre_swab_mgs_config_body(struct mgs_config_body *body)
++void lustre_swab_mgs_config_body(void *_body)
+ {
++ struct mgs_config_body *body = _body;
++
+ __swab64s(&body->mcb_offset);
+ __swab32s(&body->mcb_units);
+ __swab16s(&body->mcb_type);
+ }
+ EXPORT_SYMBOL(lustre_swab_mgs_config_body);
+
+-void lustre_swab_mgs_config_res(struct mgs_config_res *body)
++void lustre_swab_mgs_config_res(void *_body)
+ {
++ struct mgs_config_res *body = _body;
++
+ __swab64s(&body->mcr_offset);
+ __swab64s(&body->mcr_size);
+ }
+@@ -1790,8 +1817,10 @@ static void lustre_swab_obd_dqblk(struct obd_dqblk *b)
+ CLASSERT(offsetof(typeof(*b), dqb_padding) != 0);
+ }
+
+-void lustre_swab_obd_quotactl(struct obd_quotactl *q)
++void lustre_swab_obd_quotactl(void *_q)
+ {
++ struct obd_quotactl *q = _q;
++
+ __swab32s(&q->qc_cmd);
+ __swab32s(&q->qc_type);
+ __swab32s(&q->qc_id);
+@@ -1832,8 +1861,9 @@ static void lustre_swab_fiemap_extent(struct ll_fiemap_extent *fm_extent)
+ __swab32s(&fm_extent->fe_device);
+ }
+
+-void lustre_swab_fiemap(struct ll_user_fiemap *fiemap)
++void lustre_swab_fiemap(void *_fiemap)
+ {
++ struct ll_user_fiemap *fiemap = _fiemap;
+ int i;
+
+ __swab64s(&fiemap->fm_start);
+@@ -1848,8 +1878,10 @@ void lustre_swab_fiemap(struct ll_user_fiemap *fiemap)
+ }
+ EXPORT_SYMBOL(lustre_swab_fiemap);
+
+-void lustre_swab_idx_info(struct idx_info *ii)
++void lustre_swab_idx_info(void *_ii)
+ {
++ struct idx_info *ii = _ii;
++
+ __swab32s(&ii->ii_magic);
+ __swab32s(&ii->ii_flags);
+ __swab16s(&ii->ii_count);
+@@ -1862,8 +1894,10 @@ void lustre_swab_idx_info(struct idx_info *ii)
+ __swab16s(&ii->ii_recsize);
+ }
+
+-void lustre_swab_mdt_rec_reint (struct mdt_rec_reint *rr)
++void lustre_swab_mdt_rec_reint (void *_rr)
+ {
++ struct mdt_rec_reint *rr = _rr;
++
+ __swab32s(&rr->rr_opcode);
+ __swab32s(&rr->rr_cap);
+ __swab32s(&rr->rr_fsuid);
+@@ -1994,8 +2028,10 @@ static void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d)
+ __swab32s(&d->l_flock.lfw_pid);
+ }
+
+-void lustre_swab_ldlm_intent(struct ldlm_intent *i)
++void lustre_swab_ldlm_intent(void *_i)
+ {
++ struct ldlm_intent *i = _i;
++
+ __swab64s(&i->opc);
+ }
+ EXPORT_SYMBOL(lustre_swab_ldlm_intent);
+@@ -2015,8 +2051,10 @@ static void lustre_swab_ldlm_lock_desc(struct ldlm_lock_desc *l)
+ lustre_swab_ldlm_policy_data(&l->l_policy_data);
+ }
+
+-void lustre_swab_ldlm_request(struct ldlm_request *rq)
++void lustre_swab_ldlm_request(void *_rq)
+ {
++ struct ldlm_request *rq = _rq;
++
+ __swab32s(&rq->lock_flags);
+ lustre_swab_ldlm_lock_desc(&rq->lock_desc);
+ __swab32s(&rq->lock_count);
+@@ -2024,8 +2062,10 @@ void lustre_swab_ldlm_request(struct ldlm_request *rq)
+ }
+ EXPORT_SYMBOL(lustre_swab_ldlm_request);
+
+-void lustre_swab_ldlm_reply(struct ldlm_reply *r)
++void lustre_swab_ldlm_reply(void *_r)
+ {
++ struct ldlm_reply *r = _r;
++
+ __swab32s(&r->lock_flags);
+ CLASSERT(offsetof(typeof(*r), lock_padding) != 0);
+ lustre_swab_ldlm_lock_desc(&r->lock_desc);
+@@ -2035,8 +2075,10 @@ void lustre_swab_ldlm_reply(struct ldlm_reply *r)
+ }
+ EXPORT_SYMBOL(lustre_swab_ldlm_reply);
+
+-void lustre_swab_quota_body(struct quota_body *b)
++void lustre_swab_quota_body(void *_b)
+ {
++ struct quota_body *b = _b;
++
+ lustre_swab_lu_fid(&b->qb_fid);
+ lustre_swab_lu_fid((struct lu_fid *)&b->qb_id);
+ __swab32s(&b->qb_flags);
+@@ -2046,8 +2088,10 @@ void lustre_swab_quota_body(struct quota_body *b)
+ }
+
+ /* Dump functions */
+-void dump_ioo(struct obd_ioobj *ioo)
++void dump_ioo(void *_ioo)
+ {
++ struct obd_ioobj *ioo = _ioo;
++
+ CDEBUG(D_RPCTRACE,
+ "obd_ioobj: ioo_oid=" DOSTID ", ioo_max_brw=%#x, ioo_bufct=%d\n",
+ POSTID(&ioo->ioo_oid), ioo->ioo_max_brw,
+@@ -2055,8 +2099,10 @@ void dump_ioo(struct obd_ioobj *ioo)
+ }
+ EXPORT_SYMBOL(dump_ioo);
+
+-void dump_rniobuf(struct niobuf_remote *nb)
++void dump_rniobuf(void *_nb)
+ {
++ struct niobuf_remote *nb = _nb;
++
+ CDEBUG(D_RPCTRACE, "niobuf_remote: offset=%llu, len=%d, flags=%x\n",
+ nb->offset, nb->len, nb->flags);
+ }
+@@ -2124,14 +2170,18 @@ static void dump_obdo(struct obdo *oa)
+ CDEBUG(D_RPCTRACE, "obdo: o_lcookie = (llog_cookie dumping not yet implemented)\n");
+ }
+
+-void dump_ost_body(struct ost_body *ob)
++void dump_ost_body(void *_ob)
+ {
++ struct ost_body *ob = _ob;
++
+ dump_obdo(&ob->oa);
+ }
+ EXPORT_SYMBOL(dump_ost_body);
+
+-void dump_rcs(__u32 *rc)
++void dump_rcs(void *_rc)
+ {
++ __u32 *rc = _rc;
++
+ CDEBUG(D_RPCTRACE, "rmf_rcs: %d\n", *rc);
+ }
+ EXPORT_SYMBOL(dump_rcs);
+@@ -2208,8 +2258,10 @@ void _debug_req(struct ptlrpc_request *req,
+ }
+ EXPORT_SYMBOL(_debug_req);
+
+-void lustre_swab_lustre_capa(struct lustre_capa *c)
++void lustre_swab_lustre_capa(void *_c)
+ {
++ struct lustre_capa *c = _c;
++
+ lustre_swab_lu_fid(&c->lc_fid);
+ __swab64s(&c->lc_opc);
+ __swab64s(&c->lc_uid);
+@@ -2221,15 +2273,19 @@ void lustre_swab_lustre_capa(struct lustre_capa *c)
+ }
+ EXPORT_SYMBOL(lustre_swab_lustre_capa);
+
+-void lustre_swab_hsm_user_state(struct hsm_user_state *state)
++void lustre_swab_hsm_user_state(void *_state)
+ {
++ struct hsm_user_state *state = _state;
++
+ __swab32s(&state->hus_states);
+ __swab32s(&state->hus_archive_id);
+ }
+ EXPORT_SYMBOL(lustre_swab_hsm_user_state);
+
+-void lustre_swab_hsm_state_set(struct hsm_state_set *hss)
++void lustre_swab_hsm_state_set(void *_hss)
+ {
++ struct hsm_state_set *hss = _hss;
++
+ __swab32s(&hss->hss_valid);
+ __swab64s(&hss->hss_setmask);
+ __swab64s(&hss->hss_clearmask);
+@@ -2243,23 +2299,29 @@ static void lustre_swab_hsm_extent(struct hsm_extent *extent)
+ __swab64s(&extent->length);
+ }
+
+-void lustre_swab_hsm_current_action(struct hsm_current_action *action)
++void lustre_swab_hsm_current_action(void *_action)
+ {
++ struct hsm_current_action *action = _action;
++
+ __swab32s(&action->hca_state);
+ __swab32s(&action->hca_action);
+ lustre_swab_hsm_extent(&action->hca_location);
+ }
+ EXPORT_SYMBOL(lustre_swab_hsm_current_action);
+
+-void lustre_swab_hsm_user_item(struct hsm_user_item *hui)
++void lustre_swab_hsm_user_item(void *_hui)
+ {
++ struct hsm_user_item *hui = _hui;
++
+ lustre_swab_lu_fid(&hui->hui_fid);
+ lustre_swab_hsm_extent(&hui->hui_extent);
+ }
+ EXPORT_SYMBOL(lustre_swab_hsm_user_item);
+
+-void lustre_swab_layout_intent(struct layout_intent *li)
++void lustre_swab_layout_intent(void *_li)
+ {
++ struct layout_intent *li = _li;
++
+ __swab32s(&li->li_opc);
+ __swab32s(&li->li_flags);
+ __swab64s(&li->li_start);
+@@ -2267,8 +2329,10 @@ void lustre_swab_layout_intent(struct layout_intent *li)
+ }
+ EXPORT_SYMBOL(lustre_swab_layout_intent);
+
+-void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk)
++void lustre_swab_hsm_progress_kernel(void *_hpk)
+ {
++ struct hsm_progress_kernel *hpk = _hpk;
++
+ lustre_swab_lu_fid(&hpk->hpk_fid);
+ __swab64s(&hpk->hpk_cookie);
+ __swab64s(&hpk->hpk_extent.offset);
+@@ -2278,8 +2342,10 @@ void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk)
+ }
+ EXPORT_SYMBOL(lustre_swab_hsm_progress_kernel);
+
+-void lustre_swab_hsm_request(struct hsm_request *hr)
++void lustre_swab_hsm_request(void *_hr)
+ {
++ struct hsm_request *hr = _hr;
++
+ __swab32s(&hr->hr_action);
+ __swab32s(&hr->hr_archive_id);
+ __swab64s(&hr->hr_flags);
+@@ -2288,15 +2354,18 @@ void lustre_swab_hsm_request(struct hsm_request *hr)
+ }
+ EXPORT_SYMBOL(lustre_swab_hsm_request);
+
+-void lustre_swab_update_buf(struct update_buf *ub)
++void lustre_swab_update_buf(void *_ub)
+ {
++ struct update_buf *ub = _ub;
++
+ __swab32s(&ub->ub_magic);
+ __swab32s(&ub->ub_count);
+ }
+ EXPORT_SYMBOL(lustre_swab_update_buf);
+
+-void lustre_swab_update_reply_buf(struct update_reply *ur)
++void lustre_swab_update_reply_buf(void *_ur)
+ {
++ struct update_reply *ur = _ur;
+ int i;
+
+ __swab32s(&ur->ur_version);
+@@ -2306,14 +2375,18 @@ void lustre_swab_update_reply_buf(struct update_reply *ur)
+ }
+ EXPORT_SYMBOL(lustre_swab_update_reply_buf);
+
+-void lustre_swab_swap_layouts(struct mdc_swap_layouts *msl)
++void lustre_swab_swap_layouts(void *_msl)
+ {
++ struct mdc_swap_layouts *msl = _msl;
++
+ __swab64s(&msl->msl_flags);
+ }
+ EXPORT_SYMBOL(lustre_swab_swap_layouts);
+
+-void lustre_swab_close_data(struct close_data *cd)
++void lustre_swab_close_data(void *_cd)
+ {
++ struct close_data *cd = _cd;
++
+ lustre_swab_lu_fid(&cd->cd_fid);
+ __swab64s(&cd->cd_data_version);
+ }
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
-index 6aed3cf..3cdcb89 100644
+index 6aed3cf..f4a36a8 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -365,15 +365,15 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
@@ -57960,19 +71684,22 @@ index 6aed3cf..3cdcb89 100644
#endif
}
netif_receive_skb(skb);
-@@ -384,10 +384,10 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
+@@ -384,11 +384,11 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
dev->name);
*/
#ifdef CONFIG_64BIT
- atomic64_add(1,
+- (atomic64_t *)&priv->stats.rx_dropped);
+ atomic64_add_unchecked(1,
- (atomic64_t *)&priv->stats.rx_dropped);
++ (atomic64_unchecked_t *)&priv->stats.rx_dropped);
#else
- atomic_add(1,
+- (atomic_t *)&priv->stats.rx_dropped);
+ atomic_add_unchecked(1,
- (atomic_t *)&priv->stats.rx_dropped);
++ (atomic_unchecked_t *)&priv->stats.rx_dropped);
#endif
dev_kfree_skb_irq(skb);
+ }
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index f69fb5c..be5da97 100644
--- a/drivers/staging/octeon/ethernet.c
@@ -57993,78 +71720,46 @@ index f69fb5c..be5da97 100644
#endif
}
-diff --git a/drivers/staging/rdma/ehca/ehca_irq.c b/drivers/staging/rdma/ehca/ehca_irq.c
-index 8615d7c..1396623 100644
---- a/drivers/staging/rdma/ehca/ehca_irq.c
-+++ b/drivers/staging/rdma/ehca/ehca_irq.c
-@@ -802,7 +802,7 @@ static void comp_task(unsigned int cpu)
- spin_unlock_irq(&cct->task_lock);
- }
-
--static struct smp_hotplug_thread comp_pool_threads = {
-+static struct smp_hotplug_thread comp_pool_threads __read_only = {
- .thread_should_run = comp_task_should_run,
- .thread_fn = comp_task,
- .thread_comm = "ehca_comp/%u",
-diff --git a/drivers/staging/rdma/ipath/ipath_rc.c b/drivers/staging/rdma/ipath/ipath_rc.c
-index d4aa535..022fa57 100644
---- a/drivers/staging/rdma/ipath/ipath_rc.c
-+++ b/drivers/staging/rdma/ipath/ipath_rc.c
-@@ -1868,7 +1868,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
- struct ib_atomic_eth *ateth;
- struct ipath_ack_entry *e;
- u64 vaddr;
-- atomic64_t *maddr;
-+ atomic64_unchecked_t *maddr;
- u64 sdata;
- u32 rkey;
- u8 next;
-@@ -1903,11 +1903,11 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
- IB_ACCESS_REMOTE_ATOMIC)))
- goto nack_acc_unlck;
- /* Perform atomic OP and save result. */
-- maddr = (atomic64_t *) qp->r_sge.sge.vaddr;
-+ maddr = (atomic64_unchecked_t *) qp->r_sge.sge.vaddr;
- sdata = be64_to_cpu(ateth->swap_data);
- e = &qp->s_ack_queue[qp->r_head_ack_queue];
- e->atomic_data = (opcode == OP(FETCH_ADD)) ?
-- (u64) atomic64_add_return(sdata, maddr) - sdata :
-+ (u64) atomic64_add_return_unchecked(sdata, maddr) - sdata :
- (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr,
- be64_to_cpu(ateth->compare_data),
- sdata);
-diff --git a/drivers/staging/rdma/ipath/ipath_ruc.c b/drivers/staging/rdma/ipath/ipath_ruc.c
-index e541a01..a41777d 100644
---- a/drivers/staging/rdma/ipath/ipath_ruc.c
-+++ b/drivers/staging/rdma/ipath/ipath_ruc.c
-@@ -265,7 +265,7 @@ static void ipath_ruc_loopback(struct ipath_qp *sqp)
- unsigned long flags;
- struct ib_wc wc;
- u64 sdata;
-- atomic64_t *maddr;
-+ atomic64_unchecked_t *maddr;
- enum ib_wc_status send_status;
+diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
+index 70b8f4f..6b477e9 100644
+--- a/drivers/staging/panel/panel.c
++++ b/drivers/staging/panel/panel.c
+@@ -1991,7 +1991,7 @@ static void panel_process_inputs(void)
+ }
+ }
- /*
-@@ -381,11 +381,11 @@ again:
- IB_ACCESS_REMOTE_ATOMIC)))
- goto acc_err;
- /* Perform atomic OP and save result. */
-- maddr = (atomic64_t *) qp->r_sge.sge.vaddr;
-+ maddr = (atomic64_unchecked_t *) qp->r_sge.sge.vaddr;
- sdata = wqe->atomic_wr.compare_add;
- *(u64 *) sqp->s_sge.sge.vaddr =
- (wqe->wr.opcode == IB_WR_ATOMIC_FETCH_AND_ADD) ?
-- (u64) atomic64_add_return(sdata, maddr) - sdata :
-+ (u64) atomic64_add_return_unchecked(sdata, maddr) - sdata :
- (u64) cmpxchg((u64 *) qp->r_sge.sge.vaddr,
- sdata, wqe->atomic_wr.swap);
- goto send_comp;
+-static void panel_scan_timer(void)
++static void panel_scan_timer(unsigned long data)
+ {
+ if (keypad.enabled && keypad_initialized) {
+ if (spin_trylock_irq(&pprt_lock)) {
+@@ -2027,7 +2027,7 @@ static void init_scan_timer(void)
+ if (scan_timer.function)
+ return; /* already started */
+
+- setup_timer(&scan_timer, (void *)&panel_scan_timer, 0);
++ setup_timer(&scan_timer, &panel_scan_timer, 0);
+ scan_timer.expires = jiffies + INPUT_POLL_TIME;
+ add_timer(&scan_timer);
+ }
+diff --git a/drivers/staging/rdma/hfi1/pcie.c b/drivers/staging/rdma/hfi1/pcie.c
+index 8317b07..99824f2 100644
+--- a/drivers/staging/rdma/hfi1/pcie.c
++++ b/drivers/staging/rdma/hfi1/pcie.c
+@@ -541,7 +541,7 @@ static void tune_pcie_caps(struct hfi1_devdata *dd)
+ * PCI error infrastructure, registered via pci
+ */
+ static pci_ers_result_t
+-pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
++pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
+ {
+ struct hfi1_devdata *dd = pci_get_drvdata(pdev);
+ pci_ers_result_t ret = PCI_ERS_RESULT_RECOVERED;
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
-index d900546..266edcf 100644
+index 3eca687..247c0b8 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
-@@ -3983,7 +3983,7 @@ static void init_mlme_ext_priv_value(struct adapter *padapter)
+@@ -3992,7 +3992,7 @@ static void init_mlme_ext_priv_value(struct adapter *padapter)
_12M_RATE_, _24M_RATE_, 0xff,
};
@@ -58073,7 +71768,34 @@ index d900546..266edcf 100644
pmlmeext->mgnt_seq = 0;/* reset to zero when disconnect at client mode */
pmlmeext->cur_channel = padapter->registrypriv.channel;
-@@ -4310,7 +4310,7 @@ void report_survey_event(struct adapter *padapter,
+@@ -4185,7 +4185,7 @@ void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
+
+ static void _mgt_dispatcher(struct adapter *padapter, struct mlme_handler *ptable, struct recv_frame *precv_frame)
+ {
+- u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
++ static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ u8 *pframe = precv_frame->rx_data;
+
+ if (ptable->func) {
+@@ -4204,7 +4204,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
+ #ifdef CONFIG_88EU_AP_MODE
+ struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+ #endif /* CONFIG_88EU_AP_MODE */
+- u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
++ static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ u8 *pframe = precv_frame->rx_data;
+ struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe));
+
+@@ -4229,7 +4229,7 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
+
+ index = GetFrameSubType(pframe) >> 4;
+
+- if (index > 13) {
++ if (index > ARRAY_SIZE(mlme_sta_tbl)) {
+ RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Currently we do not support reserved sub-fr-type=%d\n", index));
+ return;
+ }
+@@ -4319,7 +4319,7 @@ void report_survey_event(struct adapter *padapter,
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct survey_event);
pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey);
@@ -58082,7 +71804,7 @@ index d900546..266edcf 100644
psurvey_evt = (struct survey_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
-@@ -4362,7 +4362,7 @@ void report_surveydone_event(struct adapter *padapter)
+@@ -4371,7 +4371,7 @@ void report_surveydone_event(struct adapter *padapter)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct surveydone_event);
pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone);
@@ -58091,7 +71813,7 @@ index d900546..266edcf 100644
psurveydone_evt = (struct surveydone_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
psurveydone_evt->bss_cnt = pmlmeext->sitesurvey_res.bss_cnt;
-@@ -4408,7 +4408,7 @@ void report_join_res(struct adapter *padapter, int res)
+@@ -4417,7 +4417,7 @@ void report_join_res(struct adapter *padapter, int res)
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct joinbss_event);
pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss);
@@ -58100,7 +71822,7 @@ index d900546..266edcf 100644
pjoinbss_evt = (struct joinbss_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex));
-@@ -4461,7 +4461,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
+@@ -4470,7 +4470,7 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct stadel_event);
pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA);
@@ -58109,7 +71831,7 @@ index d900546..266edcf 100644
pdel_sta_evt = (struct stadel_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN);
-@@ -4516,7 +4516,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
+@@ -4525,7 +4525,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd);
pc2h_evt_hdr->len = sizeof(struct stassoc_event);
pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA);
@@ -58118,8 +71840,56 @@ index d900546..266edcf 100644
padd_sta_evt = (struct stassoc_event *)(pevtcmd + sizeof(struct C2HEvent_Header));
memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN);
+diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+index d6d009a..c21609e 100644
+--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
++++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
+@@ -35,7 +35,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
+ struct recv_buf *precvbuf;
+
+ tasklet_init(&precvpriv->recv_tasklet,
+- (void(*)(unsigned long))rtl8188eu_recv_tasklet,
++ rtl8188eu_recv_tasklet,
+ (unsigned long)padapter);
+
+ /* init recv_buf */
+diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+index e04303c..6861369 100644
+--- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
++++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
+@@ -31,7 +31,7 @@ s32 rtl8188eu_init_xmit_priv(struct adapter *adapt)
+ struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
+
+ tasklet_init(&pxmitpriv->xmit_tasklet,
+- (void(*)(unsigned long))rtl8188eu_xmit_tasklet,
++ rtl8188eu_xmit_tasklet,
+ (unsigned long)adapt);
+ return _SUCCESS;
+ }
+diff --git a/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h b/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
+index e058162..28d8a63 100644
+--- a/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
++++ b/drivers/staging/rtl8188eu/include/Hal8188EPhyCfg.h
+@@ -207,17 +207,9 @@ void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
+
+ void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
+
+-/* Call after initialization */
+-void ChkFwCmdIoDone(struct adapter *adapter);
+-
+ /* BB/MAC/RF other monitor API */
+ void PHY_SetRFPathSwitch_8188E(struct adapter *adapter, bool main);
+
+-void PHY_SwitchEphyParameter(struct adapter *adapter);
+-
+-void PHY_EnableHostClkReq(struct adapter *adapter);
+-
+-bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
+
+ /*--------------------------Exported Function prototype---------------------*/
+
diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h
-index 1b1c102..375e471 100644
+index 1b1c102..4f76875 100644
--- a/drivers/staging/rtl8188eu/include/hal_intf.h
+++ b/drivers/staging/rtl8188eu/include/hal_intf.h
@@ -217,7 +217,7 @@ struct hal_ops {
@@ -58131,8 +71901,121 @@ index 1b1c102..375e471 100644
enum rt_eeprom_type {
EEPROM_93C46,
+@@ -251,7 +251,6 @@ void rtw_hal_sw_led_deinit(struct adapter *padapter);
+ u32 rtw_hal_power_on(struct adapter *padapter);
+ uint rtw_hal_init(struct adapter *padapter);
+ uint rtw_hal_deinit(struct adapter *padapter);
+-void rtw_hal_stop(struct adapter *padapter);
+ void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
+ void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);
+
+@@ -280,8 +279,6 @@ void rtw_hal_free_recv_priv(struct adapter *padapter);
+
+ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
+ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
+-void rtw_hal_clone_data(struct adapter *dst_adapt,
+- struct adapter *src_adapt);
+
+ void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
+
+diff --git a/drivers/staging/rtl8188eu/include/odm_precomp.h b/drivers/staging/rtl8188eu/include/odm_precomp.h
+index 0f236da..d2507aa 100644
+--- a/drivers/staging/rtl8188eu/include/odm_precomp.h
++++ b/drivers/staging/rtl8188eu/include/odm_precomp.h
+@@ -75,7 +75,7 @@ void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm);
+ void odm_TXPowerTrackingThermalMeterInit(struct odm_dm_struct *pDM_Odm);
+ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm);
+ void odm_TXPowerTrackingCheckCE(struct odm_dm_struct *pDM_Odm);
+-void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext);
++void odm_SwAntDivChkAntSwitchCallback(unsigned long FunctionContext);
+ void odm_InitHybridAntDiv(struct odm_dm_struct *pDM_Odm);
+ void odm_HwAntDiv(struct odm_dm_struct *pDM_Odm);
+
+diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h b/drivers/staging/rtl8188eu/include/recv_osdep.h
+index fdeb603..3db91e6 100644
+--- a/drivers/staging/rtl8188eu/include/recv_osdep.h
++++ b/drivers/staging/rtl8188eu/include/recv_osdep.h
+@@ -35,7 +35,6 @@ void rtw_recv_returnpacket(struct net_device *cnxt, struct sk_buff *retpkt);
+
+ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup);
+
+-int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter);
+ void rtw_free_recv_priv(struct recv_priv *precvpriv);
+
+ void rtw_os_recv_resource_alloc(struct recv_frame *recvfr);
+diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
+index 5fed30d..efd81d5 100644
+--- a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
++++ b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h
+@@ -59,7 +59,7 @@ enum rx_packet_type {
+ s32 rtl8188eu_init_recv_priv(struct adapter *padapter);
+ void rtl8188eu_free_recv_priv(struct adapter *padapter);
+ void rtl8188eu_recv_hdl(struct adapter *padapter, struct recv_buf *precvbuf);
+-void rtl8188eu_recv_tasklet(void *priv);
++void rtl8188eu_recv_tasklet(unsigned long _priv);
+ void rtl8188e_query_rx_phy_status(struct recv_frame *fr, struct phy_stat *phy);
+ void rtl8188e_process_phy_info(struct adapter *padapter, void *prframe);
+ void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy);
+diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
+index 0b96d42..117d0b5 100644
+--- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
++++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
+@@ -163,7 +163,7 @@ s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame);
+ s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
+ s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
+ #define hal_xmit_handler rtl8188eu_xmit_buf_handler
+-void rtl8188eu_xmit_tasklet(void *priv);
++void rtl8188eu_xmit_tasklet(unsigned long _priv);
+ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter,
+ struct xmit_priv *pxmitpriv,
+ struct xmit_buf *pxmitbuf);
+diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h
+index 9e9f5f4..eff152f 100644
+--- a/drivers/staging/rtl8188eu/include/rtw_cmd.h
++++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h
+@@ -373,7 +373,6 @@ void rtw_readtssi_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
+
+ void rtw_setstaKey_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
+ void rtw_setassocsta_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cm);
+-void rtw_getrttbl_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
+
+ struct _cmd_callback {
+ u32 cmd_code;
+diff --git a/drivers/staging/rtl8188eu/include/rtw_eeprom.h b/drivers/staging/rtl8188eu/include/rtw_eeprom.h
+index 904fea1..008aa74 100644
+--- a/drivers/staging/rtl8188eu/include/rtw_eeprom.h
++++ b/drivers/staging/rtl8188eu/include/rtw_eeprom.h
+@@ -121,10 +121,4 @@ struct eeprom_priv {
+ u8 efuse_eeprom_data[HWSET_MAX_SIZE_512];
+ };
+
+-void eeprom_write16(struct adapter *padapter, u16 reg, u16 data);
+-u16 eeprom_read16(struct adapter *padapter, u16 reg);
+-void read_eeprom_content(struct adapter *padapter);
+-void eeprom_read_sz(struct adapter *adapt, u16 reg, u8 *data, u32 sz);
+-void read_eeprom_content_by_attrib(struct adapter *padapter);
+-
+ #endif /* __RTL871X_EEPROM_H__ */
+diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
+index ee2cb54..03dc80b 100644
+--- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h
++++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h
+@@ -108,13 +108,4 @@ static int oid_null_function(struct oid_par_priv *poid_par_priv) {
+
+ extern struct iw_handler_def rtw_handlers_def;
+
+-int drv_query_info(struct net_device *miniportadaptercontext, NDIS_OID oid,
+- void *informationbuffer, u32 informationbufferlength,
+- u32 *byteswritten, u32 *bytesneeded);
+-
+-int drv_set_info(struct net_device *MiniportAdapterContext,
+- NDIS_OID oid, void *informationbuffer,
+- u32 informationbufferlength, u32 *bytesread,
+- u32 *bytesneeded);
+-
+ #endif /* #ifndef __INC_CEINFO_ */
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
-index 9093a5f..5863f9b 100644
+index 9093a5f..eb007cd 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
@@ -409,7 +409,7 @@ struct p2p_oper_class_map {
@@ -58144,6 +72027,690 @@ index 9093a5f..5863f9b 100644
u16 mgnt_seq;
unsigned char cur_channel;
+@@ -555,8 +555,6 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *addr,
+
+ void beacon_timing_control(struct adapter *padapter);
+ u8 set_tx_beacon_cmd(struct adapter *padapter);
+-unsigned int setup_beacon_frame(struct adapter *padapter,
+- unsigned char *beacon_frame);
+ void update_mgnt_tx_rate(struct adapter *padapter, u8 rate);
+ void update_mgntframe_attrib(struct adapter *padapter,
+ struct pkt_attrib *pattrib);
+@@ -604,12 +602,6 @@ struct cmd_hdl {
+ u8 (*h2cfuns)(struct adapter *padapter, u8 *pbuf);
+ };
+
+-u8 read_macreg_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 write_macreg_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 read_bbreg_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 write_bbreg_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 read_rfreg_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 write_rfreg_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 disconnect_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf);
+@@ -618,8 +610,6 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 setauth_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 setkey_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 set_stakey_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 set_assocsta_hdl(struct adapter *padapter, u8 *pbuf);
+-u8 del_assocsta_hdl(struct adapter *padapter, u8 *pbuf);
+ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf);
+
+ u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf);
+diff --git a/drivers/staging/rtl8188eu/include/xmit_osdep.h b/drivers/staging/rtl8188eu/include/xmit_osdep.h
+index 13965f2..0ea64d0 100644
+--- a/drivers/staging/rtl8188eu/include/xmit_osdep.h
++++ b/drivers/staging/rtl8188eu/include/xmit_osdep.h
+@@ -40,7 +40,7 @@ struct sta_xmit_priv;
+ struct xmit_frame;
+ struct xmit_buf;
+
+-int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
++netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
+
+ void rtw_os_xmit_schedule(struct adapter *padapter);
+
+diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+index 0fea338..e6f2263 100644
+--- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
++++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
+@@ -814,7 +814,7 @@ void usb_write_port_cancel(struct adapter *padapter)
+ }
+ }
+
+-void rtl8188eu_recv_tasklet(void *priv)
++void rtl8188eu_recv_tasklet(unsigned long priv)
+ {
+ struct sk_buff *pskb;
+ struct adapter *adapt = priv;
+@@ -833,7 +833,7 @@ void rtl8188eu_recv_tasklet(void *priv)
+ }
+ }
+
+-void rtl8188eu_xmit_tasklet(void *priv)
++void rtl8188eu_xmit_tasklet(unsigned long priv)
+ {
+ int ret = false;
+ struct adapter *adapt = priv;
+diff --git a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c b/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
+index 1593e28..a4345f9 100644
+--- a/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
++++ b/drivers/staging/rtl8188eu/os_dep/xmit_linux.c
+@@ -213,7 +213,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
+ }
+
+
+-int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
++netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
+ {
+ struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
+ struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+index 8f989a9..781fed8 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+@@ -84,7 +84,7 @@ static struct pci_driver rtl8192_pci_driver = {
+ };
+
+ static short _rtl92e_is_tx_queue_empty(struct net_device *dev);
+-static void _rtl92e_watchdog_wq_cb(void *data);
++static void _rtl92e_watchdog_wq_cb(struct work_struct *data);
+ static void _rtl92e_watchdog_timer_cb(unsigned long data);
+ static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
+ int rate);
+@@ -92,13 +92,13 @@ static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
+ static void _rtl92e_tx_cmd(struct net_device *dev, struct sk_buff *skb);
+ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb);
+ static short _rtl92e_pci_initdescring(struct net_device *dev);
+-static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv);
+-static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv);
++static void _rtl92e_irq_tx_tasklet(unsigned long priv);
++static void _rtl92e_irq_rx_tasklet(unsigned long priv);
+ static void _rtl92e_cancel_deferred_work(struct r8192_priv *priv);
+ static int _rtl92e_up(struct net_device *dev, bool is_silent_reset);
+ static int _rtl92e_try_up(struct net_device *dev);
+ static int _rtl92e_down(struct net_device *dev, bool shutdownrf);
+-static void _rtl92e_restart(void *data);
++static void _rtl92e_restart(struct work_struct *data);
+
+ /****************************************************************************
+ -----------------------------IO STUFF-------------------------
+@@ -375,7 +375,7 @@ static struct rtllib_qos_parameters def_qos_parameters = {
+ {0, 0, 0, 0}
+ };
+
+-static void _rtl92e_update_beacon(void *data)
++static void _rtl92e_update_beacon(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
+ update_beacon_wq.work);
+@@ -391,7 +391,7 @@ static void _rtl92e_update_beacon(void *data)
+ _rtl92e_update_cap(dev, net->capability);
+ }
+
+-static void _rtl92e_qos_activate(void *data)
++static void _rtl92e_qos_activate(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
+ qos_activate);
+@@ -527,8 +527,9 @@ static int _rtl92e_handle_assoc_response(struct net_device *dev,
+ return 0;
+ }
+
+-static void _rtl92e_prepare_beacon(struct r8192_priv *priv)
++static void _rtl92e_prepare_beacon(unsigned long _priv)
+ {
++ struct r8192_priv *priv = (struct r8192_priv *)_priv;
+ struct net_device *dev = priv->rtllib->dev;
+ struct sk_buff *pskb = NULL, *pnewskb = NULL;
+ struct cb_desc *tcb_desc = NULL;
+@@ -1003,30 +1004,30 @@ static void _rtl92e_init_priv_task(struct net_device *dev)
+ struct r8192_priv *priv = rtllib_priv(dev);
+
+ priv->priv_wq = create_workqueue(DRV_NAME);
+- INIT_WORK_RSL(&priv->reset_wq, (void *)_rtl92e_restart, dev);
+- INIT_WORK_RSL(&priv->rtllib->ips_leave_wq, (void *)rtl92e_ips_leave_wq,
++ INIT_WORK_RSL(&priv->reset_wq, _rtl92e_restart, dev);
++ INIT_WORK_RSL(&priv->rtllib->ips_leave_wq, rtl92e_ips_leave_wq,
+ dev);
+ INIT_DELAYED_WORK_RSL(&priv->watch_dog_wq,
+- (void *)_rtl92e_watchdog_wq_cb, dev);
++ _rtl92e_watchdog_wq_cb, dev);
+ INIT_DELAYED_WORK_RSL(&priv->txpower_tracking_wq,
+- (void *)rtl92e_dm_txpower_tracking_wq, dev);
++ rtl92e_dm_txpower_tracking_wq, dev);
+ INIT_DELAYED_WORK_RSL(&priv->rfpath_check_wq,
+- (void *)rtl92e_dm_rf_pathcheck_wq, dev);
++ rtl92e_dm_rf_pathcheck_wq, dev);
+ INIT_DELAYED_WORK_RSL(&priv->update_beacon_wq,
+- (void *)_rtl92e_update_beacon, dev);
+- INIT_WORK_RSL(&priv->qos_activate, (void *)_rtl92e_qos_activate, dev);
++ _rtl92e_update_beacon, dev);
++ INIT_WORK_RSL(&priv->qos_activate, _rtl92e_qos_activate, dev);
+ INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_wakeup_wq,
+- (void *) rtl92e_hw_wakeup_wq, dev);
++ rtl92e_hw_wakeup_wq, dev);
+ INIT_DELAYED_WORK_RSL(&priv->rtllib->hw_sleep_wq,
+- (void *) rtl92e_hw_sleep_wq, dev);
++ rtl92e_hw_sleep_wq, dev);
+ tasklet_init(&priv->irq_rx_tasklet,
+- (void(*)(unsigned long))_rtl92e_irq_rx_tasklet,
++ _rtl92e_irq_rx_tasklet,
+ (unsigned long)priv);
+ tasklet_init(&priv->irq_tx_tasklet,
+- (void(*)(unsigned long))_rtl92e_irq_tx_tasklet,
++ _rtl92e_irq_tx_tasklet,
+ (unsigned long)priv);
+ tasklet_init(&priv->irq_prepare_beacon_tasklet,
+- (void(*)(unsigned long))_rtl92e_prepare_beacon,
++ _rtl92e_prepare_beacon,
+ (unsigned long)priv);
+ }
+
+@@ -1378,7 +1379,7 @@ static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum,
+ }
+ }
+
+-static void _rtl92e_watchdog_wq_cb(void *data)
++static void _rtl92e_watchdog_wq_cb(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_dwork_rsl(data,
+ struct r8192_priv, watch_dog_wq);
+@@ -2143,13 +2144,15 @@ static void _rtl92e_tx_resume(struct net_device *dev)
+ }
+ }
+
+-static void _rtl92e_irq_tx_tasklet(struct r8192_priv *priv)
++static void _rtl92e_irq_tx_tasklet(unsigned long _priv)
+ {
++ struct r8192_priv *priv = (struct r8192_priv *)_priv;
+ _rtl92e_tx_resume(priv->rtllib->dev);
+ }
+
+-static void _rtl92e_irq_rx_tasklet(struct r8192_priv *priv)
++static void _rtl92e_irq_rx_tasklet(unsigned long _priv)
+ {
++ struct r8192_priv *priv= (struct r8192_priv *)_priv;
+ _rtl92e_rx_normal(priv->rtllib->dev);
+
+ rtl92e_writel(priv->rtllib->dev, INTA_MASK,
+@@ -2237,7 +2240,7 @@ void rtl92e_commit(struct net_device *dev)
+ _rtl92e_up(dev, false);
+ }
+
+-static void _rtl92e_restart(void *data)
++static void _rtl92e_restart(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv,
+ reset_wq);
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+index a7777a3..8e28a32 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+@@ -588,12 +588,12 @@ void force_pci_posting(struct net_device *dev);
+ void rtl92e_rx_enable(struct net_device *);
+ void rtl92e_tx_enable(struct net_device *);
+
+-void rtl92e_hw_sleep_wq(void *data);
++void rtl92e_hw_sleep_wq(struct work_struct *data);
+ void rtl92e_commit(struct net_device *dev);
+
+ void rtl92e_check_rfctrl_gpio_timer(unsigned long data);
+
+-void rtl92e_hw_wakeup_wq(void *data);
++void rtl92e_hw_wakeup_wq(struct work_struct *data);
+
+ void rtl92e_reset_desc_ring(struct net_device *dev);
+ void rtl92e_set_wireless_mode(struct net_device *dev, u8 wireless_mode);
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+index ef03242..eef2177 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+@@ -195,7 +195,7 @@ static void _rtl92e_dm_deinit_fsync(struct net_device *dev);
+ static void _rtl92e_dm_check_txrateandretrycount(struct net_device *dev);
+ static void _rtl92e_dm_check_ac_dc_power(struct net_device *dev);
+ static void _rtl92e_dm_check_fsync(struct net_device *dev);
+-static void _rtl92e_dm_check_rf_ctrl_gpio(void *data);
++static void _rtl92e_dm_check_rf_ctrl_gpio(struct work_struct *data);
+ static void _rtl92e_dm_fsync_timer_callback(unsigned long data);
+
+ /*---------------------Define local function prototype-----------------------*/
+@@ -229,7 +229,7 @@ void rtl92e_dm_init(struct net_device *dev)
+ _rtl92e_dm_init_wa_broadcom_iot(dev);
+
+ INIT_DELAYED_WORK_RSL(&priv->gpio_change_rf_wq,
+- (void *)_rtl92e_dm_check_rf_ctrl_gpio, dev);
++ _rtl92e_dm_check_rf_ctrl_gpio, dev);
+ }
+
+ void rtl92e_dm_deinit(struct net_device *dev)
+@@ -932,7 +932,7 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
+ priv->txpower_count = 0;
+ }
+
+-void rtl92e_dm_txpower_tracking_wq(void *data)
++void rtl92e_dm_txpower_tracking_wq(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_dwork_rsl(data,
+ struct r8192_priv, txpower_tracking_wq);
+@@ -1815,7 +1815,7 @@ static void _rtl92e_dm_init_wa_broadcom_iot(struct net_device *dev)
+ pHTInfo->WAIotTH = WAIotTHVal;
+ }
+
+-static void _rtl92e_dm_check_rf_ctrl_gpio(void *data)
++static void _rtl92e_dm_check_rf_ctrl_gpio(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_dwork_rsl(data,
+ struct r8192_priv, gpio_change_rf_wq);
+@@ -1869,7 +1869,7 @@ static void _rtl92e_dm_check_rf_ctrl_gpio(void *data)
+ }
+ }
+
+-void rtl92e_dm_rf_pathcheck_wq(void *data)
++void rtl92e_dm_rf_pathcheck_wq(struct work_struct *data)
+ {
+ struct r8192_priv *priv = container_of_dwork_rsl(data,
+ struct r8192_priv,
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+index 756a0dd..d2de5e8 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+@@ -191,13 +191,13 @@ void rtl92e_dm_watchdog(struct net_device *dev);
+
+
+ void rtl92e_init_adaptive_rate(struct net_device *dev);
+-void rtl92e_dm_txpower_tracking_wq(void *data);
++void rtl92e_dm_txpower_tracking_wq(struct work_struct *data);
+
+ void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14);
+
+ void rtl92e_dm_restore_state(struct net_device *dev);
+ void rtl92e_dm_backup_state(struct net_device *dev);
+ void rtl92e_dm_init_edca_turbo(struct net_device *dev);
+-void rtl92e_dm_rf_pathcheck_wq(void *data);
++void rtl92e_dm_rf_pathcheck_wq(struct work_struct *data);
+ void rtl92e_dm_init_txpower_tracking(struct net_device *dev);
+ #endif /*__R8192UDM_H__ */
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+index 9a4d1bc..3add233 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+@@ -44,7 +44,7 @@ static void _rtl92e_hw_sleep(struct net_device *dev)
+ rtl92e_set_rf_state(dev, eRfSleep, RF_CHANGE_BY_PS);
+ }
+
+-void rtl92e_hw_sleep_wq(void *data)
++void rtl92e_hw_sleep_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device, hw_sleep_wq);
+@@ -73,7 +73,7 @@ void rtl92e_hw_wakeup(struct net_device *dev)
+ rtl92e_set_rf_state(dev, eRfOn, RF_CHANGE_BY_PS);
+ }
+
+-void rtl92e_hw_wakeup_wq(void *data)
++void rtl92e_hw_wakeup_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device, hw_wakeup_wq);
+@@ -175,7 +175,7 @@ void rtl92e_ips_leave(struct net_device *dev)
+ }
+ }
+
+-void rtl92e_ips_leave_wq(void *data)
++void rtl92e_ips_leave_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_work_rsl(data,
+ struct rtllib_device, ips_leave_wq);
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h
+index a46f4cf..8f46fda 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.h
+@@ -24,6 +24,7 @@
+ #include <linux/types.h>
+
+ struct net_device;
++struct work_struct;
+
+ #define RT_CHECK_FOR_HANG_PERIOD 2
+
+@@ -31,7 +32,7 @@ void rtl92e_hw_wakeup(struct net_device *dev);
+ void rtl92e_enter_sleep(struct net_device *dev, u64 time);
+ void rtl92e_rtllib_ips_leave_wq(struct net_device *dev);
+ void rtl92e_rtllib_ips_leave(struct net_device *dev);
+-void rtl92e_ips_leave_wq(void *data);
++void rtl92e_ips_leave_wq(struct work_struct *data);
+
+ void rtl92e_ips_enter(struct net_device *dev);
+ void rtl92e_ips_leave(struct net_device *dev);
+diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+index 70df6a1..21c9f2e 100644
+--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
++++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+@@ -1187,30 +1187,30 @@ static const struct iw_priv_args r8192_private_args[] = {
+ };
+
+ static iw_handler r8192_private_handler[] = {
+- (iw_handler)_rtl92e_wx_set_debug, /*SIOCIWSECONDPRIV*/
+- (iw_handler)_rtl92e_wx_set_scan_type,
+- (iw_handler)_rtl92e_wx_set_rawtx,
+- (iw_handler)_rtl92e_wx_force_reset,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)_rtl92e_wx_adapter_power_status,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)_rtl92e_wx_set_lps_awake_interval,
+- (iw_handler)_rtl92e_wx_set_force_lps,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)NULL,
+- (iw_handler)_rtl92e_wx_set_promisc_mode,
+- (iw_handler)_rtl92e_wx_get_promisc_mode,
++ _rtl92e_wx_set_debug, /*SIOCIWSECONDPRIV*/
++ _rtl92e_wx_set_scan_type,
++ _rtl92e_wx_set_rawtx,
++ _rtl92e_wx_force_reset,
++ NULL,
++ NULL,
++ _rtl92e_wx_adapter_power_status,
++ NULL,
++ NULL,
++ NULL,
++ _rtl92e_wx_set_lps_awake_interval,
++ _rtl92e_wx_set_force_lps,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ NULL,
++ _rtl92e_wx_set_promisc_mode,
++ _rtl92e_wx_get_promisc_mode,
+ };
+
+ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
+diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
+index 563ac12..2ba2482 100644
+--- a/drivers/staging/rtl8192e/rtllib.h
++++ b/drivers/staging/rtl8192e/rtllib.h
+@@ -1994,7 +1994,7 @@ int rtllib_encrypt_fragment(
+ struct sk_buff *frag,
+ int hdr_len);
+
+-int rtllib_xmit(struct sk_buff *skb, struct net_device *dev);
++netdev_tx_t rtllib_xmit(struct sk_buff *skb, struct net_device *dev);
+ void rtllib_txb_free(struct rtllib_txb *);
+
+ /* rtllib_rx.c */
+@@ -2108,7 +2108,7 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
+
+ int rtllib_wx_get_freq(struct rtllib_device *ieee, struct iw_request_info *a,
+ union iwreq_data *wrqu, char *b);
+-void rtllib_wx_sync_scan_wq(void *data);
++void rtllib_wx_sync_scan_wq(struct work_struct *data);
+
+ int rtllib_wx_set_rawtx(struct rtllib_device *ieee,
+ struct iw_request_info *info,
+diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
+index d0fedb0..59293cc 100644
+--- a/drivers/staging/rtl8192e/rtllib_softmac.c
++++ b/drivers/staging/rtl8192e/rtllib_softmac.c
+@@ -574,7 +574,7 @@ out:
+ wireless_send_event(ieee->dev, SIOCGIWSCAN, &wrqu, NULL);
+ }
+
+-static void rtllib_softmac_scan_wq(void *data)
++static void rtllib_softmac_scan_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device, softmac_scan_wq);
+@@ -1514,7 +1514,7 @@ static void rtllib_associate_step2(struct rtllib_device *ieee)
+ }
+ }
+
+-static void rtllib_associate_complete_wq(void *data)
++static void rtllib_associate_complete_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = (struct rtllib_device *)
+ container_of_work_rsl(data,
+@@ -1583,7 +1583,7 @@ static void rtllib_associate_complete(struct rtllib_device *ieee)
+ queue_work_rsl(ieee->wq, &ieee->associate_complete_wq);
+ }
+
+-static void rtllib_associate_procedure_wq(void *data)
++static void rtllib_associate_procedure_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device,
+@@ -2055,8 +2055,9 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
+
+ }
+
+-static inline void rtllib_sta_ps(struct rtllib_device *ieee)
++static inline void rtllib_sta_ps(unsigned long _ieee)
+ {
++ struct rtllib_device *ieee = (struct rtllib_device *)_ieee;
+ u64 time;
+ short sleep;
+ unsigned long flags, flags2;
+@@ -2583,7 +2584,7 @@ static void rtllib_start_monitor_mode(struct rtllib_device *ieee)
+ }
+ }
+
+-static void rtllib_start_ibss_wq(void *data)
++static void rtllib_start_ibss_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device, start_ibss_wq);
+@@ -2749,7 +2750,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee)
+ spin_unlock_irqrestore(&ieee->lock, flags);
+ }
+
+-static void rtllib_link_change_wq(void *data)
++static void rtllib_link_change_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device, link_change_wq);
+@@ -2775,7 +2776,7 @@ void rtllib_disassociate(struct rtllib_device *ieee)
+ notify_wx_assoc_event(ieee);
+ }
+
+-static void rtllib_associate_retry_wq(void *data)
++static void rtllib_associate_retry_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_dwork_rsl(data,
+ struct rtllib_device, associate_retry_wq);
+@@ -3031,19 +3032,18 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
+ ieee->wq = create_workqueue(DRV_NAME);
+
+ INIT_DELAYED_WORK_RSL(&ieee->link_change_wq,
+- (void *)rtllib_link_change_wq, ieee);
++ rtllib_link_change_wq, ieee);
+ INIT_DELAYED_WORK_RSL(&ieee->start_ibss_wq,
+- (void *)rtllib_start_ibss_wq, ieee);
++ rtllib_start_ibss_wq, ieee);
+ INIT_WORK_RSL(&ieee->associate_complete_wq,
+- (void *)rtllib_associate_complete_wq, ieee);
++ rtllib_associate_complete_wq, ieee);
+ INIT_DELAYED_WORK_RSL(&ieee->associate_procedure_wq,
+- (void *)rtllib_associate_procedure_wq, ieee);
++ rtllib_associate_procedure_wq, ieee);
+ INIT_DELAYED_WORK_RSL(&ieee->softmac_scan_wq,
+- (void *)rtllib_softmac_scan_wq, ieee);
++ rtllib_softmac_scan_wq, ieee);
+ INIT_DELAYED_WORK_RSL(&ieee->associate_retry_wq,
+- (void *)rtllib_associate_retry_wq, ieee);
+- INIT_WORK_RSL(&ieee->wx_sync_scan_wq, (void *)rtllib_wx_sync_scan_wq,
+- ieee);
++ rtllib_associate_retry_wq, ieee);
++ INIT_WORK_RSL(&ieee->wx_sync_scan_wq, rtllib_wx_sync_scan_wq, ieee);
+
+ sema_init(&ieee->wx_sem, 1);
+ sema_init(&ieee->scan_sem, 1);
+@@ -3053,7 +3053,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
+ spin_lock_init(&ieee->beacon_lock);
+
+ tasklet_init(&ieee->ps_task,
+- (void(*)(unsigned long)) rtllib_sta_ps,
++ rtllib_sta_ps,
+ (unsigned long)ieee);
+
+ }
+diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+index 86f52ac7..0d95442 100644
+--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
++++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+@@ -327,7 +327,7 @@ out:
+ }
+ EXPORT_SYMBOL(rtllib_wx_set_mode);
+
+-void rtllib_wx_sync_scan_wq(void *data)
++void rtllib_wx_sync_scan_wq(struct work_struct *data)
+ {
+ struct rtllib_device *ieee = container_of_work_rsl(data,
+ struct rtllib_device, wx_sync_scan_wq);
+diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
+index 58fc70e..3fe041e 100644
+--- a/drivers/staging/rtl8192e/rtllib_tx.c
++++ b/drivers/staging/rtl8192e/rtllib_tx.c
+@@ -981,7 +981,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
+ return 1;
+
+ }
+-int rtllib_xmit(struct sk_buff *skb, struct net_device *dev)
++netdev_tx_t rtllib_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ memset(skb->cb, 0, sizeof(skb->cb));
+ return rtllib_xmit_inter(skb, dev);
+diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+index 967ef9a..5038be8 100644
+--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+@@ -2179,7 +2179,7 @@ int ieee80211_set_encryption(struct ieee80211_device *ieee);
+ int ieee80211_encrypt_fragment(struct ieee80211_device *ieee,
+ struct sk_buff *frag, int hdr_len);
+
+-int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
++netdev_tx_t ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
+ void ieee80211_txb_free(struct ieee80211_txb *);
+
+
+diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+index 38c3eb7..fa242a7 100644
+--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+@@ -1762,9 +1762,9 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
+
+ }
+
+-static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
++static inline void ieee80211_sta_ps(unsigned long _ieee)
+ {
+-
++ struct ieee80211_device *ieee = (struct ieee80211_device *)_ieee;
+ u32 th, tl;
+ short sleep;
+
+@@ -2739,7 +2739,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
+ spin_lock_init(&ieee->beacon_lock);
+
+ tasklet_init(&ieee->ps_task,
+- (void(*)(unsigned long)) ieee80211_sta_ps,
++ ieee80211_sta_ps,
+ (unsigned long)ieee);
+
+ }
+diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+index 1ab0aea..41de55c 100644
+--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
++++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+@@ -594,7 +594,7 @@ static void ieee80211_query_seqnum(struct ieee80211_device *ieee,
+ }
+ }
+
+-int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
++netdev_tx_t ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct ieee80211_device *ieee = netdev_priv(dev);
+ struct ieee80211_txb *txb = NULL;
+diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
+index f4a4eae..2f3eb39 100644
+--- a/drivers/staging/rtl8192u/r8192U_core.c
++++ b/drivers/staging/rtl8192u/r8192U_core.c
+@@ -2375,7 +2375,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv)
+
+ static void rtl819x_watchdog_wqcallback(struct work_struct *work);
+
+-static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv);
++static void rtl8192_irq_rx_tasklet(unsigned long priv);
+ /* init tasklet and wait_queue here. only 2.6 above kernel is considered */
+ #define DRV_NAME "wlan0"
+ static void rtl8192_init_priv_task(struct net_device *dev)
+@@ -2399,7 +2399,7 @@ static void rtl8192_init_priv_task(struct net_device *dev)
+ INIT_WORK(&priv->qos_activate, rtl8192_qos_activate);
+
+ tasklet_init(&priv->irq_rx_tasklet,
+- (void(*)(unsigned long))rtl8192_irq_rx_tasklet,
++ rtl8192_irq_rx_tasklet,
+ (unsigned long)priv);
+ }
+
+@@ -4907,8 +4907,9 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)
+ }
+ }
+
+-static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)
++static void rtl8192_irq_rx_tasklet(unsigned long _priv)
+ {
++ struct r8192_priv *priv = (struct r8192_priv *)_priv;
+ struct sk_buff *skb;
+ struct rtl8192_rx_info *info;
+
+diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c
+index d187508..a2e3800 100644
+--- a/drivers/staging/rtl8712/rtl8712_recv.c
++++ b/drivers/staging/rtl8712/rtl8712_recv.c
+@@ -45,7 +45,7 @@ static u8 bridge_tunnel_header[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8};
+ /* Ethernet-II snap header (RFC1042 for most EtherTypes) */
+ static u8 rfc1042_header[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
+
+-static void recv_tasklet(void *priv);
++static void recv_tasklet(unsigned long _priv);
+
+ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
+ {
+@@ -79,7 +79,7 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
+ }
+ precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
+ tasklet_init(&precvpriv->recv_tasklet,
+- (void(*)(unsigned long))recv_tasklet,
++ recv_tasklet,
+ (unsigned long)padapter);
+ skb_queue_head_init(&precvpriv->rx_skb_queue);
+
+@@ -1103,7 +1103,7 @@ _exit_recvbuf2recvframe:
+ return _SUCCESS;
+ }
+
+-static void recv_tasklet(void *priv)
++static void recv_tasklet(unsigned long priv)
+ {
+ struct sk_buff *pskb;
+ struct _adapter *padapter = (struct _adapter *)priv;
diff --git a/drivers/staging/rtl8712/rtl871x_io.h b/drivers/staging/rtl8712/rtl871x_io.h
index 26dd24c..2eb37c9 100644
--- a/drivers/staging/rtl8712/rtl871x_io.h
@@ -58157,6 +72724,94 @@ index 26dd24c..2eb37c9 100644
struct io_req {
struct list_head list;
+diff --git a/drivers/staging/rtl8712/rtl871x_ioctl.h b/drivers/staging/rtl8712/rtl871x_ioctl.h
+index c9218be..ecda3f6 100644
+--- a/drivers/staging/rtl8712/rtl871x_ioctl.h
++++ b/drivers/staging/rtl8712/rtl871x_ioctl.h
+@@ -76,18 +76,4 @@ uint oid_null_function(struct oid_par_priv *poid_par_priv);
+
+ extern struct iw_handler_def r871x_handlers_def;
+
+-uint drv_query_info(struct net_device *MiniportAdapterContext,
+- uint Oid,
+- void *InformationBuffer,
+- u32 InformationBufferLength,
+- u32 *BytesWritten,
+- u32 *BytesNeeded);
+-
+-uint drv_set_info(struct net_device *MiniportAdapterContext,
+- uint Oid,
+- void *InformationBuffer,
+- u32 InformationBufferLength,
+- u32 *BytesRead,
+- u32 *BytesNeeded);
+-
+ #endif
+diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
+index 68d65d2..060b3a3 100644
+--- a/drivers/staging/rtl8712/rtl871x_xmit.c
++++ b/drivers/staging/rtl8712/rtl871x_xmit.c
+@@ -152,7 +152,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
+ alloc_hwxmits(padapter);
+ init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
+ tasklet_init(&pxmitpriv->xmit_tasklet,
+- (void(*)(unsigned long))r8712_xmit_bh,
++ r8712_xmit_bh,
+ (unsigned long)padapter);
+ return _SUCCESS;
+ }
+diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h
+index a9633c3..77b0c85 100644
+--- a/drivers/staging/rtl8712/rtl871x_xmit.h
++++ b/drivers/staging/rtl8712/rtl871x_xmit.h
+@@ -291,7 +291,7 @@ int r8712_pre_xmit(struct _adapter *padapter, struct xmit_frame *pxmitframe);
+ int r8712_xmit_enqueue(struct _adapter *padapter,
+ struct xmit_frame *pxmitframe);
+ int r8712_xmit_direct(struct _adapter *padapter, struct xmit_frame *pxmitframe);
+-void r8712_xmit_bh(void *priv);
++void r8712_xmit_bh(unsigned long priv);
+
+ void xmitframe_xmitbuf_attach(struct xmit_frame *pxmitframe,
+ struct xmit_buf *pxmitbuf);
+diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
+index 489a9e6..6dd73de 100644
+--- a/drivers/staging/rtl8712/usb_ops_linux.c
++++ b/drivers/staging/rtl8712/usb_ops_linux.c
+@@ -326,7 +326,7 @@ void r8712_usb_read_port_cancel(struct _adapter *padapter)
+ }
+ }
+
+-void r8712_xmit_bh(void *priv)
++void r8712_xmit_bh(unsigned long priv)
+ {
+ int ret = false;
+ struct _adapter *padapter = (struct _adapter *)priv;
+diff --git a/drivers/staging/rtl8712/xmit_linux.c b/drivers/staging/rtl8712/xmit_linux.c
+index d398183..0ceb8ad 100644
+--- a/drivers/staging/rtl8712/xmit_linux.c
++++ b/drivers/staging/rtl8712/xmit_linux.c
+@@ -159,7 +159,7 @@ void r8712_xmit_complete(struct _adapter *padapter, struct xmit_frame *pxframe)
+ pxframe->pkt = NULL;
+ }
+
+-int r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev)
++netdev_tx_t r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev)
+ {
+ struct xmit_frame *pxmitframe = NULL;
+ struct _adapter *padapter = netdev_priv(pnetdev);
+diff --git a/drivers/staging/rtl8712/xmit_osdep.h b/drivers/staging/rtl8712/xmit_osdep.h
+index 8eba7ca..6c4ce81 100644
+--- a/drivers/staging/rtl8712/xmit_osdep.h
++++ b/drivers/staging/rtl8712/xmit_osdep.h
+@@ -46,7 +46,7 @@ struct sta_xmit_priv;
+ struct xmit_frame;
+ struct xmit_buf;
+
+-int r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev);
++netdev_tx_t r8712_xmit_entry(_pkt *pkt, struct net_device *pnetdev);
+ void r8712_SetFilter(struct work_struct *work);
+ int r8712_xmit_resource_alloc(struct _adapter *padapter,
+ struct xmit_buf *pxmitbuf);
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
index d28f29a..e3d2f19 100644
--- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c
@@ -58215,6 +72870,80 @@ index d28f29a..e3d2f19 100644
padd_sta_evt = (struct stassoc_event*)(pevtcmd + sizeof(struct C2HEvent_Header));
ether_addr_copy((unsigned char *)&padd_sta_evt->macaddr, MacAddr);
+diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c
+index a4b6bb6..b22a6be 100644
+--- a/drivers/staging/rtl8723au/core/rtw_xmit.c
++++ b/drivers/staging/rtl8723au/core/rtw_xmit.c
+@@ -183,7 +183,7 @@ int _rtw_init_xmit_priv23a(struct xmit_priv *pxmitpriv,
+ mutex_init(&pxmitpriv->ack_tx_mutex);
+ rtw_sctx_init23a(&pxmitpriv->ack_tx_ops, 0);
+ tasklet_init(&padapter->xmitpriv.xmit_tasklet,
+- (void(*)(unsigned long))rtl8723au_xmit_tasklet,
++ rtl8723au_xmit_tasklet,
+ (unsigned long)padapter);
+
+ exit:
+diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
+index 0fec84b..298d283 100644
+--- a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
++++ b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c
+@@ -33,7 +33,7 @@ int rtl8723au_init_recv_priv(struct rtw_adapter *padapter)
+ struct sk_buff *pskb;
+
+ tasklet_init(&precvpriv->recv_tasklet,
+- (void(*)(unsigned long))rtl8723au_recv_tasklet,
++ rtl8723au_recv_tasklet,
+ (unsigned long)padapter);
+
+ precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
+diff --git a/drivers/staging/rtl8723au/hal/usb_ops_linux.c b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
+index 371e6b3..ab5f50b 100644
+--- a/drivers/staging/rtl8723au/hal/usb_ops_linux.c
++++ b/drivers/staging/rtl8723au/hal/usb_ops_linux.c
+@@ -487,7 +487,7 @@ _exit_recvbuf2recvframe:
+ return _SUCCESS;
+ }
+
+-void rtl8723au_recv_tasklet(void *priv)
++void rtl8723au_recv_tasklet(unsigned long priv)
+ {
+ struct sk_buff *pskb;
+ struct rtw_adapter *padapter = (struct rtw_adapter *)priv;
+@@ -662,7 +662,7 @@ int rtl8723au_read_port(struct rtw_adapter *adapter, u32 cnt,
+ return ret;
+ }
+
+-void rtl8723au_xmit_tasklet(void *priv)
++void rtl8723au_xmit_tasklet(unsigned long priv)
+ {
+ int ret;
+ struct rtw_adapter *padapter = (struct rtw_adapter *)priv;
+diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
+index bcf3657..74d4742 100644
+--- a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
++++ b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
+@@ -135,7 +135,6 @@ void PHY_SetBWMode23a8723A(struct rtw_adapter *pAdapter,
+ /* */
+ void PHY_SwChnl8723A(struct rtw_adapter *pAdapter, u8 channel);
+ /* Call after initialization */
+-void ChkFwCmdIoDone(struct rtw_adapter *Adapter);
+
+ /* */
+ /* Modify the value of the hw register when beacon interval be changed. */
+@@ -144,13 +143,6 @@ void
+ rtl8192c_PHY_SetBeaconHwReg(struct rtw_adapter *Adapter, u16 BeaconInterval);
+
+
+-void PHY_SwitchEphyParameter(struct rtw_adapter *Adapter);
+-
+-void PHY_EnableHostClkReq(struct rtw_adapter *Adapter);
+-
+-bool
+-SetAntennaConfig92C(struct rtw_adapter *Adapter, u8 DefaultAnt);
+-
+ /*--------------------------Exported Function prototype---------------------*/
+
+ #define PHY_SetMacReg PHY_SetBBReg
diff --git a/drivers/staging/rtl8723au/include/drv_types.h b/drivers/staging/rtl8723au/include/drv_types.h
index e83463a..84230f3 100644
--- a/drivers/staging/rtl8723au/include/drv_types.h
@@ -58228,8 +72957,76 @@ index e83463a..84230f3 100644
/*-------- below is for PCIE INTERFACE --------*/
+diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h
+index b924d47..1e3e51c 100644
+--- a/drivers/staging/rtl8723au/include/hal_intf.h
++++ b/drivers/staging/rtl8723au/include/hal_intf.h
+@@ -97,10 +97,8 @@ int pm_netdev_open23a(struct net_device *pnetdev, u8 bnormal);
+
+ int rtl8723au_hal_init(struct rtw_adapter *padapter);
+ int rtl8723au_hal_deinit(struct rtw_adapter *padapter);
+-void rtw_hal_stop(struct rtw_adapter *padapter);
+
+ void rtw_hal_update_ra_mask23a(struct sta_info *psta, u8 rssi_level);
+-void rtw_hal_clone_data(struct rtw_adapter *dst_padapter, struct rtw_adapter *src_padapter);
+
+ void hw_var_set_correct_tsf(struct rtw_adapter *padapter);
+ void hw_var_set_mlme_disconnect(struct rtw_adapter *padapter);
+diff --git a/drivers/staging/rtl8723au/include/recv_osdep.h b/drivers/staging/rtl8723au/include/recv_osdep.h
+index c2d3f1b..bb0dc02 100644
+--- a/drivers/staging/rtl8723au/include/recv_osdep.h
++++ b/drivers/staging/rtl8723au/include/recv_osdep.h
+@@ -26,7 +26,6 @@ int rtw_recv_indicatepkt23a(struct rtw_adapter *adapter, struct recv_frame *prec
+
+ void rtw_handle_tkip_mic_err23a(struct rtw_adapter *padapter, u8 bgroup);
+
+-int rtw_init_recv_priv(struct recv_priv *precvpriv, struct rtw_adapter *padapter);
+ void rtw_free_recv_priv (struct recv_priv *precvpriv);
+
+ int rtw_os_recv_resource_init(struct recv_priv *precvpriv, struct rtw_adapter *padapter);
+diff --git a/drivers/staging/rtl8723au/include/rtw_ap.h b/drivers/staging/rtl8723au/include/rtw_ap.h
+index 9f8d235..a642aac 100644
+--- a/drivers/staging/rtl8723au/include/rtw_ap.h
++++ b/drivers/staging/rtl8723au/include/rtw_ap.h
+@@ -26,8 +26,6 @@
+ void init_mlme_ap_info23a(struct rtw_adapter *padapter);
+ void free_mlme_ap_info23a(struct rtw_adapter *padapter);
+ /* void update_BCNTIM(struct rtw_adapter *padapter); */
+-void rtw_add_bcn_ie(struct rtw_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index, u8 *data, u8 len);
+-void rtw_remove_bcn_ie(struct rtw_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index);
+ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
+ void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_level);
+ void expire_timeout_chk23a(struct rtw_adapter *padapter);
+diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h
+index d1fa95d..338b933 100644
+--- a/drivers/staging/rtl8723au/include/rtw_cmd.h
++++ b/drivers/staging/rtl8723au/include/rtw_cmd.h
+@@ -712,7 +712,6 @@ int rtw_ps_cmd23a(struct rtw_adapter*padapter);
+ int rtw_chk_hi_queue_cmd23a(struct rtw_adapter*padapter);
+ #endif
+
+-int rtw_set_chplan_cmd(struct rtw_adapter*padapter, u8 chplan, u8 enqueue);
+ int rtw_led_blink_cmd(struct rtw_adapter*padapter, struct led_8723a *pLed);
+ int rtw_set_csa_cmd(struct rtw_adapter*padapter, u8 new_ch_no);
+
+diff --git a/drivers/staging/rtl8723au/include/rtw_eeprom.h b/drivers/staging/rtl8723au/include/rtw_eeprom.h
+index a86f36e..8addfe7 100644
+--- a/drivers/staging/rtl8723au/include/rtw_eeprom.h
++++ b/drivers/staging/rtl8723au/include/rtw_eeprom.h
+@@ -125,11 +125,4 @@ struct eeprom_priv {
+ u8 efuse_eeprom_data[HWSET_MAX_SIZE_512]; /* 92C:256bytes, 88E:512bytes, we use union set (512bytes) */
+ };
+
+-void eeprom_write16(struct rtw_adapter *padapter, u16 reg, u16 data);
+-u16 eeprom_read16(struct rtw_adapter *padapter, u16 reg);
+-void read_eeprom_content(struct rtw_adapter *padapter);
+-void eeprom_read_sz(struct rtw_adapter *padapter, u16 reg, u8 *data, u32 sz);
+-
+-void read_eeprom_content_by_attrib(struct rtw_adapter *padapter);
+-
+ #endif /* __RTL871X_EEPROM_H__ */
diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
-index ea2a6c9..91d10ea 100644
+index ea2a6c9..7348e18 100644
--- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h
@@ -406,7 +406,7 @@ struct p2p_oper_class_map {
@@ -58241,10 +73038,55 @@ index ea2a6c9..91d10ea 100644
u16 mgnt_seq;
/* struct fw_priv fwpriv; */
+@@ -543,8 +543,6 @@ void report_add_sta_event23a(struct rtw_adapter *padapter,
+ unsigned char *MacAddr, int cam_idx);
+
+ int set_tx_beacon_cmd23a(struct rtw_adapter*padapter);
+-unsigned int setup_beacon_frame(struct rtw_adapter *padapter,
+- unsigned char *beacon_frame);
+ void update_mgnt_tx_rate23a(struct rtw_adapter *padapter, u8 rate);
+ void update_mgntframe_attrib23a(struct rtw_adapter *padapter,
+ struct pkt_attrib *pattrib);
+@@ -597,14 +595,6 @@ struct cmd_hdl {
+ };
+
+
+-int read_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
+-int write_macreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
+-int read_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
+-int write_bbreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
+-int read_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
+-int write_rfreg_hdl(struct rtw_adapter *padapter, u8 *pbuf);
+-
+-
+ int NULL_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+ int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+ int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+@@ -614,8 +604,6 @@ int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+ int setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+ int setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+ int set_stakey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+-int set_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf);
+-int del_assocsta_hdl(struct rtw_adapter *padapter, const u8 *pbuf);
+ int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
+
+ int mlme_evt_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf);
diff --git a/drivers/staging/rtl8723au/include/usb_ops.h b/drivers/staging/rtl8723au/include/usb_ops.h
-index ff11e13..69680d1 100644
+index ff11e13..22a13ac 100644
--- a/drivers/staging/rtl8723au/include/usb_ops.h
+++ b/drivers/staging/rtl8723au/include/usb_ops.h
+@@ -36,9 +36,9 @@ enum {
+
+ void rtl8723au_set_hw_type(struct rtw_adapter *padapter);
+
+-void rtl8723au_recv_tasklet(void *priv);
++void rtl8723au_recv_tasklet(unsigned long priv);
+
+-void rtl8723au_xmit_tasklet(void *priv);
++void rtl8723au_xmit_tasklet(unsigned long priv);
+
+ /* Increase and check if the continual_urb_error of this @param dvobjprive is
+ * larger than MAX_CONTINUAL_URB_ERR. Return result
@@ -48,7 +48,7 @@ static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
int ret = false;
int value;
@@ -58263,11 +73105,50 @@ index ff11e13..69680d1 100644
}
bool rtl8723au_chip_configure(struct rtw_adapter *padapter);
+diff --git a/drivers/staging/rtl8723au/include/xmit_osdep.h b/drivers/staging/rtl8723au/include/xmit_osdep.h
+index 2be04c48..a494e09 100644
+--- a/drivers/staging/rtl8723au/include/xmit_osdep.h
++++ b/drivers/staging/rtl8723au/include/xmit_osdep.h
+@@ -21,7 +21,7 @@
+
+ #define NR_XMITFRAME 256
+
+-int rtw_xmit23a_entry23a(struct sk_buff *pkt, struct net_device *pnetdev);
++netdev_tx_t rtw_xmit23a_entry23a(struct sk_buff *pkt, struct net_device *pnetdev);
+
+ void rtw_os_xmit_schedule23a(struct rtw_adapter *padapter);
+
+diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
+index 0ae2180..cb7945c 100644
+--- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
++++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
+@@ -2435,7 +2435,7 @@ static int rtw_cfg80211_monitor_if_close(struct net_device *ndev)
+ return 0;
+ }
+
+-static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
++static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
+ struct net_device *ndev)
+ {
+ int ret = 0;
+diff --git a/drivers/staging/rtl8723au/os_dep/xmit_linux.c b/drivers/staging/rtl8723au/os_dep/xmit_linux.c
+index 9a14074..3d02410 100644
+--- a/drivers/staging/rtl8723au/os_dep/xmit_linux.c
++++ b/drivers/staging/rtl8723au/os_dep/xmit_linux.c
+@@ -117,7 +117,7 @@ static void rtw_check_xmit_resource(struct rtw_adapter *padapter,
+ }
+ }
+
+-int rtw_xmit23a_entry23a(struct sk_buff *skb, struct net_device *pnetdev)
++netdev_tx_t rtw_xmit23a_entry23a(struct sk_buff *skb, struct net_device *pnetdev)
+ {
+ struct rtw_adapter *padapter = netdev_priv(pnetdev);
+ struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
-index 860e1c2..609ee2a 100644
+index c78421b..f75c4c4 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
-@@ -722,6 +722,7 @@ static struct fb_ops lynxfb_ops = {
+@@ -720,6 +720,7 @@ static struct fb_ops lynxfb_ops = {
.fb_set_par = lynxfb_ops_set_par,
.fb_setcolreg = lynxfb_ops_setcolreg,
.fb_blank = lynxfb_ops_blank,
@@ -58275,7 +73156,7 @@ index 860e1c2..609ee2a 100644
.fb_fillrect = cfb_fillrect,
.fb_imageblit = cfb_imageblit,
.fb_copyarea = cfb_copyarea,
-@@ -767,7 +768,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
+@@ -765,7 +766,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
par->index = index;
output->channel = &crtc->channel;
sm750fb_set_drv(par);
@@ -58283,7 +73164,7 @@ index 860e1c2..609ee2a 100644
/*
* set current cursor variable and proc pointer,
-@@ -784,16 +784,20 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
+@@ -782,16 +782,20 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
if (!g_hwcursor) {
@@ -58330,11 +73211,24 @@ index 39edd20..d860d0c 100644
/** Register functions (in the bus driver) to get called by visorchipset
* whenever a bus or device appears for which this guest is to be the
+diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
+index 0519470..14d4074 100644
+--- a/drivers/staging/unisys/visornic/visornic_main.c
++++ b/drivers/staging/unisys/visornic/visornic_main.c
+@@ -809,7 +809,7 @@ static inline bool vnic_hit_low_watermark(struct visornic_devdata *devdata,
+ * can be called again.
+ * Returns NETDEV_TX_OK.
+ */
+-static int
++static netdev_tx_t
+ visornic_xmit(struct sk_buff *skb, struct net_device *netdev)
+ {
+ struct visornic_devdata *devdata;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
-index b854db5..4c721d5 100644
+index 8faac27..ed87447 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
-@@ -10,6 +10,7 @@
+@@ -1,6 +1,7 @@
#ifndef HOST_INT_H
#define HOST_INT_H
@@ -58342,108 +73236,71 @@ index b854db5..4c721d5 100644
#include "coreconfigurator.h"
#define IP_ALEN 4
-diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c
-index 300c571..a39d663 100644
---- a/drivers/staging/wilc1000/wilc_sdio.c
-+++ b/drivers/staging/wilc1000/wilc_sdio.c
-@@ -993,22 +993,22 @@ static int sdio_sync_ext(int nint /* how mant interrupts to enable. */)
- ********************************************/
-
- wilc_hif_func_t hif_sdio = {
-- sdio_init,
-- sdio_deinit,
-- sdio_read_reg,
-- sdio_write_reg,
-- sdio_read,
-- sdio_write,
-- sdio_sync,
-- sdio_clear_int,
-- sdio_read_int,
-- sdio_clear_int_ext,
-- sdio_read_size,
-- sdio_write,
-- sdio_read,
-- sdio_sync_ext,
-+ .hif_init = sdio_init,
-+ .hif_deinit = sdio_deinit,
-+ .hif_read_reg = sdio_read_reg,
-+ .hif_write_reg = sdio_write_reg,
-+ .hif_block_rx = sdio_read,
-+ .hif_block_tx = sdio_write,
-+ .hif_sync = sdio_sync,
-+ .hif_clear_int = sdio_clear_int,
-+ .hif_read_int = sdio_read_int,
-+ .hif_clear_int_ext = sdio_clear_int_ext,
-+ .hif_read_size = sdio_read_size,
-+ .hif_block_tx_ext = sdio_write,
-+ .hif_block_rx_ext = sdio_read,
-+ .hif_sync_ext = sdio_sync_ext,
-
-- sdio_set_max_speed,
-- sdio_set_default_speed,
-+ .hif_set_max_bus_speed = sdio_set_max_speed,
-+ .hif_set_default_bus_speed = sdio_set_default_speed,
- };
+diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
+index 54fe9d7..47110ad 100644
+--- a/drivers/staging/wilc1000/linux_wlan.c
++++ b/drivers/staging/wilc1000/linux_wlan.c
+@@ -1135,7 +1135,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
+ kfree(pv_data);
+ }
+-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
++netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
+ {
+ struct wilc_vif *vif;
+ struct tx_complete_data *tx_data = NULL;
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
-index 599508b..fc69923 100644
+index 86de50c..812eb42 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
-@@ -1257,20 +1257,20 @@ static int spi_sync_ext(int nint /* how mant interrupts to enable. */)
- *
- ********************************************/
- wilc_hif_func_t hif_spi = {
-- spi_init,
-- spi_deinit,
-- spi_read_reg,
-- spi_write_reg,
-- spi_read,
-- spi_write,
-- spi_sync,
-- spi_clear_int,
-- spi_read_int,
-- spi_clear_int_ext,
-- spi_read_size,
-- spi_write,
-- spi_read,
-- spi_sync_ext,
-- spi_max_bus_speed,
-- spi_default_bus_speed,
-+ .hif_init = spi_init,
-+ .hif_deinit = spi_deinit,
-+ .hif_read_reg = spi_read_reg,
-+ .hif_write_reg = spi_write_reg,
-+ .hif_block_rx = spi_read,
-+ .hif_block_tx = spi_write,
-+ .hif_sync = spi_sync,
-+ .hif_clear_int = spi_clear_int,
-+ .hif_read_int = spi_read_int,
-+ .hif_clear_int_ext = spi_clear_int_ext,
-+ .hif_read_size = spi_read_size,
-+ .hif_block_tx_ext = spi_write,
-+ .hif_block_rx_ext = spi_read,
-+ .hif_sync_ext = spi_sync_ext,
-+ .hif_set_max_bus_speed = spi_max_bus_speed,
-+ .hif_set_default_bus_speed = spi_default_bus_speed,
- };
-diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
-index 57e1d51..b922b75 100644
---- a/drivers/staging/wilc1000/wilc_wlan.h
-+++ b/drivers/staging/wilc1000/wilc_wlan.h
-@@ -1,7 +1,7 @@
- #ifndef WILC_WLAN_H
- #define WILC_WLAN_H
+@@ -20,6 +20,7 @@
--
+ #include "linux_wlan_common.h"
+ #include <linux/string.h>
+#include <linux/netdevice.h>
+ #include "wilc_wlan_if.h"
+ #include "wilc_wlan.h"
+ #include "wilc_wfi_netdevice.h"
+@@ -120,8 +121,6 @@ static u8 crc7(u8 crc, const u8 *buffer, u32 len)
- #define ISWILC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
+ #define USE_SPI_DMA 0
+-static const struct wilc1000_ops wilc1000_spi_ops;
+-
+ static int wilc_bus_probe(struct spi_device *spi)
+ {
+ int ret, gpio;
+diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
+index 2edd744..908a222 100644
+--- a/drivers/staging/wilc1000/wilc_wlan.h
++++ b/drivers/staging/wilc1000/wilc_wlan.h
+@@ -287,7 +287,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
+
+ void wilc_enable_tcp_ack_filter(bool value);
+ int wilc_wlan_get_num_conn_ifcs(struct wilc *);
+-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
++netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
+
+ int wilc_mac_open(struct net_device *ndev);
+ int wilc_mac_close(struct net_device *ndev);
+diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
+index a9c1e0b..5e513c6 100644
+--- a/drivers/staging/wlan-ng/p80211netdev.c
++++ b/drivers/staging/wlan-ng/p80211netdev.c
+@@ -317,7 +317,7 @@ static void p80211netdev_rx_bh(unsigned long arg)
+ * Returns:
+ * zero on success, non-zero on failure.
+ ----------------------------------------------------------------*/
+-static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
++static netdev_tx_t p80211knetdev_hard_start_xmit(struct sk_buff *skb,
+ netdevice_t *netdev)
+ {
+ int result = 0;
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
-index 35f7d31..a9928a7 100644
+index 3072f1a..1071742 100644
--- a/drivers/target/sbp/sbp_target.c
+++ b/drivers/target/sbp/sbp_target.c
-@@ -58,7 +58,7 @@ static const u32 sbp_unit_directory_template[] = {
+@@ -56,7 +56,7 @@ static const u32 sbp_unit_directory_template[] = {
#define SESSION_MAINTENANCE_INTERVAL HZ
@@ -58452,7 +73309,7 @@ index 35f7d31..a9928a7 100644
static void session_maintenance_work(struct work_struct *);
static int sbp_run_transaction(struct fw_card *, int, int, int, int,
-@@ -439,7 +439,7 @@ static void sbp_management_request_login(
+@@ -437,7 +437,7 @@ static void sbp_management_request_login(
login->login_lun = unpacked_lun;
login->status_fifo_addr = sbp2_pointer_to_addr(&req->orb.status_fifo);
login->exclusive = LOGIN_ORB_EXCLUSIVE(be32_to_cpu(req->orb.misc));
@@ -58545,7 +73402,7 @@ index 5836e55..740ab89 100644
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
priv, &int3400_thermal_ops,
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
-index be4eedc..96aaf2f 100644
+index 9043f8f..ab0f354 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -31,6 +31,7 @@
@@ -58571,7 +73428,7 @@ index be4eedc..96aaf2f 100644
mutex_unlock(&tzd->lock);
return tzd;
-@@ -549,9 +552,11 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
+@@ -545,9 +548,11 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
return;
mutex_lock(&tzd->lock);
@@ -58600,7 +73457,7 @@ index 7fc919f..5521ec1 100644
};
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
-index d4a1331..dc8fe71 100644
+index abbed20..acf0737 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -1570,10 +1570,10 @@ static int cy_open(struct tty_struct *tty, struct file *filp)
@@ -59017,10 +73874,10 @@ index 345cebb..d5a1e9e 100644
ipwireless_disassociate_network_ttys(network,
ttyj->channel_idx);
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
-index 14c54e0..1efd4f2 100644
+index 92982d7..758ecfe 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
-@@ -1189,7 +1189,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
+@@ -1188,7 +1188,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
}
ch = &brd->ports[port % MAX_PORTS_PER_BOARD];
@@ -59030,7 +73887,7 @@ index 14c54e0..1efd4f2 100644
tty_port_tty_set(&ch->port, tty);
mutex_lock(&ch->port.mutex);
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
-index c3fe026..9cfe421 100644
+index c3fe026..66cd166 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1644,7 +1644,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
@@ -59042,6 +73899,15 @@ index c3fe026..9cfe421 100644
kfree(dlci);
return NULL;
}
+@@ -2665,7 +2665,7 @@ static inline void muxnet_put(struct gsm_mux_net *mux_net)
+ kref_put(&mux_net->ref, net_free);
+ }
+
+-static int gsm_mux_net_start_xmit(struct sk_buff *skb,
++static netdev_tx_t gsm_mux_net_start_xmit(struct sk_buff *skb,
+ struct net_device *net)
+ {
+ struct gsm_mux_net *mux_net = netdev_priv(net);
@@ -2957,7 +2957,7 @@ static int gsmtty_open(struct tty_struct *tty, struct file *filp)
struct gsm_dlci *dlci = tty->driver_data;
struct tty_port *port = &dlci->port;
@@ -59052,10 +73918,10 @@ index c3fe026..9cfe421 100644
dlci->modem_rx = 0;
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
-index cf000b3..a399250 100644
+index b280abaa..3ccd7d1 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
-@@ -1507,7 +1507,7 @@ n_tty_receive_char_lnext(struct tty_struct *tty, unsigned char c, char flag)
+@@ -1515,7 +1515,7 @@ n_tty_receive_char_lnext(struct tty_struct *tty, unsigned char c, char flag)
static void
n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
@@ -59064,7 +73930,7 @@ index cf000b3..a399250 100644
{
struct n_tty_data *ldata = tty->disc_data;
size_t n, head;
-@@ -1527,7 +1527,7 @@ n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
+@@ -1535,7 +1535,7 @@ n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp,
static void
n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
@@ -59073,7 +73939,7 @@ index cf000b3..a399250 100644
{
struct n_tty_data *ldata = tty->disc_data;
char flag = TTY_NORMAL;
-@@ -1544,7 +1544,7 @@ n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
+@@ -1552,7 +1552,7 @@ n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
static void
n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
@@ -59082,7 +73948,7 @@ index cf000b3..a399250 100644
{
char flag = TTY_NORMAL;
-@@ -1560,7 +1560,7 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
+@@ -1568,7 +1568,7 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
static void
n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp,
@@ -59091,7 +73957,7 @@ index cf000b3..a399250 100644
{
struct n_tty_data *ldata = tty->disc_data;
char flag = TTY_NORMAL;
-@@ -1594,7 +1594,7 @@ n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp,
+@@ -1602,7 +1602,7 @@ n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp,
static void
n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp,
@@ -59100,7 +73966,7 @@ index cf000b3..a399250 100644
{
struct n_tty_data *ldata = tty->disc_data;
char flag = TTY_NORMAL;
-@@ -1619,7 +1619,7 @@ n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp,
+@@ -1627,7 +1627,7 @@ n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp,
}
static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
@@ -59109,7 +73975,7 @@ index cf000b3..a399250 100644
{
struct n_tty_data *ldata = tty->disc_data;
bool preops = I_ISTRIP(tty) || (I_IUCLC(tty) && L_IEXTEN(tty));
-@@ -1697,10 +1697,10 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
+@@ -1705,10 +1705,10 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
*/
static int
n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
@@ -59122,7 +73988,7 @@ index cf000b3..a399250 100644
down_read(&tty->termios_rwsem);
-@@ -1723,15 +1723,16 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
+@@ -1731,15 +1731,16 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
room = N_TTY_BUF_SIZE - (ldata->read_head - tail);
if (I_PARMRK(tty))
room = (room + 2) / 3;
@@ -59143,7 +74009,7 @@ index cf000b3..a399250 100644
n = min(count, room);
if (!n)
-@@ -2550,6 +2551,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
+@@ -2549,6 +2550,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
{
*ops = tty_ldisc_N_TTY;
ops->owner = NULL;
@@ -59153,7 +74019,7 @@ index cf000b3..a399250 100644
}
EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
-index 78e9836..021d40e 100644
+index 2348fa6..14894f4 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -879,8 +879,10 @@ static void __init unix98_pty_init(void)
@@ -59200,7 +74066,7 @@ index 802eac7..f5dcf07 100644
clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
spin_unlock_irqrestore(&info->port.lock, flags);
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
-index 3912646..9a324e9 100644
+index c9720a9..f6c9276 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -488,9 +488,9 @@ static void univ8250_release_port(struct uart_port *port)
@@ -59228,6 +74094,19 @@ index 3912646..9a324e9 100644
if (share_irqs)
irqflag = IRQF_SHARED;
+diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
+index 7cd6f9a..d13ac0a 100644
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -5656,7 +5656,7 @@ static struct pci_device_id serial_pci_tbl[] = {
+ };
+
+ static pci_ers_result_t serial8250_io_error_detected(struct pci_dev *dev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct serial_private *priv = pci_get_drvdata(dev);
+
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 88246f7..9036604 100644
--- a/drivers/tty/serial/ifx6x60.c
@@ -59272,6 +74151,19 @@ index e5c42fe..f091b02 100644
&soft->is_intr_type[intr_type].is_num_intrs);
this_mir = this_ir = pending_intrs(soft, intr_type);
+diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c
+index a119f11..120444e 100644
+--- a/drivers/tty/serial/jsm/jsm_driver.c
++++ b/drivers/tty/serial/jsm/jsm_driver.c
+@@ -336,7 +336,7 @@ static struct pci_driver jsm_driver = {
+ };
+
+ static pci_ers_result_t jsm_io_error_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct jsm_board *brd = pci_get_drvdata(pdev);
+
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 117df15..2f7dfcf 100644
--- a/drivers/tty/serial/kgdb_nmi.c
@@ -59288,7 +74180,7 @@ index 117df15..2f7dfcf 100644
return 0;
}
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
-index a260cde..6b2b5ce 100644
+index a260cde..604fce9 100644
--- a/drivers/tty/serial/kgdboc.c
+++ b/drivers/tty/serial/kgdboc.c
@@ -24,8 +24,9 @@
@@ -59368,6 +74260,15 @@ index a260cde..6b2b5ce 100644
return 0;
return configure_kgdboc();
+@@ -245,7 +252,7 @@ static void kgdboc_put_char(u8 chr)
+ kgdb_tty_line, chr);
+ }
+
+-static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
++static int param_set_kgdboc_var(const char *kmessage, const struct kernel_param *kp)
+ {
+ int len = strlen(kmessage);
+
@@ -272,7 +279,7 @@ static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp)
if (config[len - 1] == '\n')
config[len - 1] = '\0';
@@ -59448,7 +74349,7 @@ index d72cd73..aac0435 100644
if (cfg->uart_flags & UPF_CONS_FLOW) {
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
-index def5199..34857ea 100644
+index b1f54ab..de9edc3 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1384,7 +1384,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
@@ -59638,7 +74539,7 @@ index 6188059..24bff50 100644
if (cmd != SIOCWANDEV)
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
-index 6fc39fb..bb25ac4 100644
+index 5505ea8..d92b90e 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -670,7 +670,7 @@ static int open(struct tty_struct *tty, struct file *filp)
@@ -59893,10 +74794,10 @@ index fb00a06..bb80abd 100644
if (!retval)
port->flags |= ASYNC_NORMAL_ACTIVE;
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
-index 5381a72..ad8c38f 100644
+index e513940..fb19436 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
-@@ -1083,7 +1083,7 @@ EXPORT_SYMBOL(unregister_sysrq_key);
+@@ -1089,7 +1089,7 @@ EXPORT_SYMBOL(unregister_sysrq_key);
static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
@@ -59906,7 +74807,7 @@ index 5381a72..ad8c38f 100644
if (get_user(c, buf))
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
-index 7cef543..d58dc7d 100644
+index a7eacef..7aea89e 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -105,6 +105,8 @@
@@ -59918,7 +74819,7 @@ index 7cef543..d58dc7d 100644
#undef TTY_DEBUG_HANGUP
#ifdef TTY_DEBUG_HANGUP
# define tty_debug_hangup(tty, f, args...) tty_debug(tty, f, ##args)
-@@ -2281,6 +2283,8 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
+@@ -2276,6 +2278,8 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
char ch, mbz = 0;
struct tty_ldisc *ld;
@@ -59927,7 +74828,7 @@ index 7cef543..d58dc7d 100644
if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))
return -EPERM;
if (get_user(ch, p))
-@@ -3564,7 +3568,7 @@ EXPORT_SYMBOL(tty_devnum);
+@@ -3555,7 +3559,7 @@ EXPORT_SYMBOL(tty_devnum);
void tty_default_fops(struct file_operations *fops)
{
@@ -59937,7 +74838,7 @@ index 7cef543..d58dc7d 100644
/*
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
-index 629e3c8..ff89802 100644
+index a054d03..c007e888 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -68,7 +68,7 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
@@ -59977,7 +74878,7 @@ index 629e3c8..ff89802 100644
raw_spin_unlock_irqrestore(&tty_ldiscs_lock, flags);
}
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
-index 482f33f..a90921e 100644
+index 846ed48..ffb3cbc 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -235,7 +235,7 @@ void tty_port_hangup(struct tty_port *port)
@@ -60007,25 +74908,24 @@ index 482f33f..a90921e 100644
port->blocked_open--;
if (retval == 0)
port->flags |= ASYNC_NORMAL_ACTIVE;
-@@ -461,19 +461,19 @@ int tty_port_close_start(struct tty_port *port,
+@@ -461,18 +461,18 @@ int tty_port_close_start(struct tty_port *port,
return 0;
spin_lock_irqsave(&port->lock, flags);
- if (tty->count == 1 && port->count != 1) {
+ if (tty->count == 1 && atomic_read(&port->count) != 1) {
- printk(KERN_WARNING
- "tty_port_close_start: tty->count = 1 port count = %d.\n",
-- port->count);
+ tty_warn(tty, "%s: tty->count = 1 port count = %d\n", __func__,
+- port->count);
- port->count = 1;
-+ atomic_read(&port->count));
++ atomic_read(&port->count));
+ atomic_set(&port->count, 1);
}
- if (--port->count < 0) {
+ if (atomic_dec_return(&port->count) < 0) {
- printk(KERN_WARNING "tty_port_close_start: count = %d\n",
-- port->count);
+ tty_warn(tty, "%s: bad port count (%d)\n", __func__,
+- port->count);
- port->count = 0;
-+ atomic_read(&port->count));
++ atomic_read(&port->count));
+ atomic_set(&port->count, 0);
}
@@ -60034,7 +74934,7 @@ index 482f33f..a90921e 100644
spin_unlock_irqrestore(&port->lock, flags);
return 0;
}
-@@ -570,7 +570,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty,
+@@ -569,7 +569,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty,
struct file *filp)
{
spin_lock_irq(&port->lock);
@@ -60295,7 +75195,7 @@ index ccfaba9..523f476 100644
int write_used; /* number of non-empty write buffers */
int transmitting;
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
-index 2a3bbdf..91d72cf 100644
+index cffa0a0..1758349 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -126,7 +126,7 @@ static const char format_endpt[] =
@@ -60326,10 +75226,10 @@ index 2a3bbdf..91d72cf 100644
file->f_version = event_count;
return POLLIN | POLLRDNORM;
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
-index 38ae877c..9bf9e7d 100644
+index 59e7a33..86f0d9a 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
-@@ -187,7 +187,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
+@@ -168,7 +168,7 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
struct usb_dev_state *ps = file->private_data;
struct usb_device *dev = ps->dev;
ssize_t ret = 0;
@@ -60338,7 +75238,7 @@ index 38ae877c..9bf9e7d 100644
loff_t pos;
int i;
-@@ -229,22 +229,22 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
+@@ -210,22 +210,22 @@ static ssize_t usbdev_read(struct file *file, char __user *buf, size_t nbytes,
for (i = 0; nbytes && i < dev->descriptor.bNumConfigurations; i++) {
struct usb_config_descriptor *config =
(struct usb_config_descriptor *)dev->rawdescriptors[i];
@@ -60365,7 +75265,7 @@ index 38ae877c..9bf9e7d 100644
if (copy_to_user(buf,
dev->rawdescriptors[i] + (*ppos - pos),
min(len, alloclen))) {
-@@ -1502,7 +1502,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
+@@ -1485,7 +1485,7 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
}
}
as->urb->dev = ps->dev;
@@ -60375,7 +75275,7 @@ index 38ae877c..9bf9e7d 100644
(uurb->endpoint & USB_DIR_IN);
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
-index 1c102d6..d15688e 100644
+index df0e3b9..5d9abce 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1605,7 +1605,7 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)
@@ -60397,7 +75297,7 @@ index 1c102d6..d15688e 100644
wake_up(&usb_kill_urb_queue);
usb_put_urb(urb);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
-index 84df093..f2238d4 100644
+index 84f6574..036bf7c 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -26,6 +26,7 @@
@@ -60408,7 +75308,7 @@ index 84df093..f2238d4 100644
#include <asm/uaccess.h>
#include <asm/byteorder.h>
-@@ -4717,6 +4718,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
+@@ -4732,6 +4733,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
goto done;
return;
}
@@ -60433,10 +75333,10 @@ index 65b6e6b..c0afa90 100644
static DEVICE_ATTR_RO(urbnum);
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
-index f8bbd0b..85b2e6a 100644
+index ebb29ca..8ef33ed 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
-@@ -447,7 +447,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
+@@ -448,7 +448,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
set_dev_node(&dev->dev, dev_to_node(bus->controller));
dev->state = USB_STATE_ATTACHED;
dev->lpm_disable_count = 1;
@@ -60486,6 +75386,19 @@ index 8cfc319..4868255 100644
return 0;
}
+diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c
+index 157441d..c0825d6 100644
+--- a/drivers/usb/gadget/function/f_phonet.c
++++ b/drivers/usb/gadget/function/f_phonet.c
+@@ -223,7 +223,7 @@ static void pn_tx_complete(struct usb_ep *ep, struct usb_request *req)
+ netif_wake_queue(dev);
+ }
+
+-static int pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t pn_net_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct phonet_port *port = netdev_priv(dev);
+ struct f_phonet *fp;
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 6a2346b..22dd790 100644
--- a/drivers/usb/gadget/function/f_uac1.c
@@ -60499,10 +75412,10 @@ index 6a2346b..22dd790 100644
#include "u_uac1.h"
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
-index f7771d8..5942693 100644
+index 6af145f..17d4bf2 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
-@@ -733,9 +733,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
+@@ -747,9 +747,9 @@ static int gs_open(struct tty_struct *tty, struct file *file)
spin_lock_irq(&port->port_lock);
/* already open? Great. */
@@ -60514,7 +75427,7 @@ index f7771d8..5942693 100644
/* currently opening/closing? wait ... */
} else if (port->openclose) {
-@@ -794,7 +794,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
+@@ -808,7 +808,7 @@ static int gs_open(struct tty_struct *tty, struct file *file)
tty->driver_data = port;
port->port.tty = tty;
@@ -60523,7 +75436,7 @@ index f7771d8..5942693 100644
port->openclose = false;
/* if connected, start the I/O stream */
-@@ -836,11 +836,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
+@@ -850,11 +850,11 @@ static void gs_close(struct tty_struct *tty, struct file *file)
spin_lock_irq(&port->port_lock);
@@ -60538,7 +75451,7 @@ index f7771d8..5942693 100644
goto exit;
}
-@@ -850,7 +850,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
+@@ -864,7 +864,7 @@ static void gs_close(struct tty_struct *tty, struct file *file)
* and sleep if necessary
*/
port->openclose = true;
@@ -60547,7 +75460,7 @@ index f7771d8..5942693 100644
gser = port->port_usb;
if (gser && gser->disconnect)
-@@ -1066,7 +1066,7 @@ static int gs_closed(struct gs_port *port)
+@@ -1320,7 +1320,7 @@ static int gs_closed(struct gs_port *port)
int cond;
spin_lock_irq(&port->port_lock);
@@ -60556,7 +75469,7 @@ index f7771d8..5942693 100644
spin_unlock_irq(&port->port_lock);
return cond;
}
-@@ -1209,7 +1209,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
+@@ -1465,7 +1465,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
/* if it's already open, start I/O ... and notify the serial
* protocol about open/close status (connect/disconnect).
*/
@@ -60565,7 +75478,7 @@ index f7771d8..5942693 100644
pr_debug("gserial_connect: start ttyGS%d\n", port->port_num);
gs_start_io(port);
if (gser->connect)
-@@ -1255,7 +1255,7 @@ void gserial_disconnect(struct gserial *gser)
+@@ -1512,7 +1512,7 @@ void gserial_disconnect(struct gserial *gser)
port->port_usb = NULL;
gser->ioport = NULL;
@@ -60574,7 +75487,7 @@ index f7771d8..5942693 100644
wake_up_interruptible(&port->drain_wait);
if (port->port.tty)
tty_hangup(port->port.tty);
-@@ -1268,7 +1268,7 @@ void gserial_disconnect(struct gserial *gser)
+@@ -1525,7 +1525,7 @@ void gserial_disconnect(struct gserial *gser)
/* finally, free any unused/unusable I/O buffers */
spin_lock_irqsave(&port->port_lock, flags);
@@ -60595,6 +75508,28 @@ index c78c841..48fd281 100644
#include "u_uac1.h"
+diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
+index 87fb0fd..d2be0ad 100644
+--- a/drivers/usb/gadget/legacy/inode.c
++++ b/drivers/usb/gadget/legacy/inode.c
+@@ -1702,6 +1702,8 @@ static struct usb_gadget_driver gadgetfs_driver = {
+
+ static void gadgetfs_nop(struct usb_gadget *arg) { }
+
++static int gadgetfs_nop2(struct usb_gadget *arg, const struct usb_ctrlrequest *req) { }
++
+ static int gadgetfs_probe(struct usb_gadget *gadget,
+ struct usb_gadget_driver *driver)
+ {
+@@ -1713,7 +1715,7 @@ static struct usb_gadget_driver probe_driver = {
+ .max_speed = USB_SPEED_HIGH,
+ .bind = gadgetfs_probe,
+ .unbind = gadgetfs_nop,
+- .setup = (void *)gadgetfs_nop,
++ .setup = gadgetfs_nop2,
+ .disconnect = gadgetfs_nop,
+ .driver = {
+ .name = "nop",
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index dde4445..f51cd5a 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
@@ -60609,7 +75544,7 @@ index dde4445..f51cd5a 100644
dum->hs_hcd = hcd_to_dummy_hcd(hcd);
dum->hs_hcd->dum = dum;
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
-index 48c92bf..3f30f77 100644
+index 14178bb..34d20c3 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -564,7 +564,7 @@ static int ehci_init(struct usb_hcd *hcd)
@@ -60644,7 +75579,7 @@ index 086a711..1caf013 100644
if (!retval && !wait_for_completion_timeout(&done,
msecs_to_jiffies(2000))) {
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
-index 54f5332..8b8335c 100644
+index aad0777..19cc70f 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -44,9 +44,9 @@
@@ -60712,7 +75647,7 @@ index 1db0626..2e9f5ea 100644
hwahc = container_of(wusbhc, struct hwahc, wusbhc);
hwahc_init(hwahc);
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
-index 760cb57..fc7f8ad 100644
+index 04dcedf..de1615b 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -444,7 +444,7 @@ static int ohci_init (struct ohci_hcd *ohci)
@@ -60751,7 +75686,7 @@ index a7de8e8..e1ef134 100644
spin_lock_init(&uhci->lock);
setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout,
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
-index c2d6520..04853a9 100644
+index f0640b7..f87a6f9 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -32,7 +32,7 @@
@@ -60764,10 +75699,10 @@ index c2d6520..04853a9 100644
/* Device for a quirk */
#define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
-index 776d59c..ae87b88 100644
+index 0c8087d..0f5a685 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -4853,7 +4853,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
+@@ -4870,7 +4870,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
int retval;
/* Accept arbitrarily long scatter-gather lists */
@@ -60798,6 +75733,123 @@ index a0a3827..d7ec10b 100644
memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_RAW;
props.max_brightness = 0xff;
+diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c
+index ace3430..7536bac 100644
+--- a/drivers/usb/misc/sisusbvga/sisusb_con.c
++++ b/drivers/usb/misc/sisusbvga/sisusb_con.c
+@@ -1416,32 +1416,94 @@ static void sisusbdummycon_init(struct vc_data *vc, int init)
+ vc_resize(vc, 80, 25);
+ }
+
+-static int sisusbdummycon_dummy(void)
++static void sisusb_con_deinit(struct vc_data *a)
+ {
+- return 0;
+ }
+
+-#define SISUSBCONDUMMY (void *)sisusbdummycon_dummy
++static void sisusb_con_clear(struct vc_data *a, int b, int c, int d, int e)
++{
++}
++
++static void sisusb_con_putc(struct vc_data *a, int b, int c, int d)
++{
++}
++
++static void sisusb_con_putcs(struct vc_data *a, const unsigned short *b, int c, int d, int e)
++{
++}
++
++static void sisusb_con_cursor(struct vc_data *a, int b)
++{
++}
++
++static int sisusb_con_scroll(struct vc_data *a, int b, int c, int d, int e)
++{
++ return 0;
++}
++
++static void sisusb_con_bmove(struct vc_data *a, int b, int c, int d, int e, int f, int g)
++{
++}
++
++static int sisusb_con_switch(struct vc_data *a)
++{
++ return 0;
++}
++
++static int sisusb_con_blank(struct vc_data *a, int b, int c)
++{
++ return 0;
++}
++
++static int sisusb_con_font_set(struct vc_data *a, struct console_font *b, unsigned c)
++{
++ return 0;
++}
++
++static int sisusb_con_font_get(struct vc_data *a, struct console_font *b)
++{
++ return 0;
++}
++
++static int sisusb_con_font_default(struct vc_data *a, struct console_font *b, char *c)
++{
++ return 0;
++}
++
++static int sisusb_con_font_copy(struct vc_data *a, int b)
++{
++ return 0;
++}
++
++static int sisusb_con_set_palette(struct vc_data *a, unsigned char *b)
++{
++ return 0;
++}
++
++static int sisusb_con_scrolldelta(struct vc_data *a, int b)
++{
++ return 0;
++}
+
+ static const struct consw sisusb_dummy_con = {
+ .owner = THIS_MODULE,
+ .con_startup = sisusbdummycon_startup,
+ .con_init = sisusbdummycon_init,
+- .con_deinit = SISUSBCONDUMMY,
+- .con_clear = SISUSBCONDUMMY,
+- .con_putc = SISUSBCONDUMMY,
+- .con_putcs = SISUSBCONDUMMY,
+- .con_cursor = SISUSBCONDUMMY,
+- .con_scroll = SISUSBCONDUMMY,
+- .con_bmove = SISUSBCONDUMMY,
+- .con_switch = SISUSBCONDUMMY,
+- .con_blank = SISUSBCONDUMMY,
+- .con_font_set = SISUSBCONDUMMY,
+- .con_font_get = SISUSBCONDUMMY,
+- .con_font_default = SISUSBCONDUMMY,
+- .con_font_copy = SISUSBCONDUMMY,
+- .con_set_palette = SISUSBCONDUMMY,
+- .con_scrolldelta = SISUSBCONDUMMY,
++ .con_deinit = sisusb_con_deinit,
++ .con_clear = sisusb_con_clear,
++ .con_putc = sisusb_con_putc,
++ .con_putcs = sisusb_con_putcs,
++ .con_cursor = sisusb_con_cursor,
++ .con_scroll = sisusb_con_scroll,
++ .con_bmove = sisusb_con_bmove,
++ .con_switch = sisusb_con_switch,
++ .con_blank = sisusb_con_blank,
++ .con_font_set = sisusb_con_font_set,
++ .con_font_get = sisusb_con_font_get,
++ .con_font_default = sisusb_con_font_default,
++ .con_font_copy = sisusb_con_font_copy,
++ .con_set_palette = sisusb_con_set_palette,
++ .con_scrolldelta = sisusb_con_scrolldelta,
+ };
+
+ int
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index 3806e70..55c508b 100644
--- a/drivers/usb/serial/console.c
@@ -61004,6 +76056,19 @@ index 69af4fd..da390d7 100644
}
/* Return the xfer's ID. */
+diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
+index 8c80a48..8a205a9 100644
+--- a/drivers/vfio/pci/vfio_pci.c
++++ b/drivers/vfio/pci/vfio_pci.c
+@@ -1011,7 +1011,7 @@ static void vfio_pci_remove(struct pci_dev *pdev)
+ }
+
+ static pci_ers_result_t vfio_pci_aer_err_detected(struct pci_dev *pdev,
+- pci_channel_state_t state)
++ enum pci_channel_state state)
+ {
+ struct vfio_pci_device *vdev;
+ struct vfio_device *device;
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 3bb02c6..a01ff38 100644
--- a/drivers/vhost/vringh.c
@@ -61090,6 +76155,123 @@ index 84a110a..96312c3 100644
{
.ident = "Sahara Touch-iT",
.matches = {
+diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
+index 0efc52f..4e72706 100644
+--- a/drivers/video/console/dummycon.c
++++ b/drivers/video/console/dummycon.c
+@@ -41,12 +41,74 @@ static void dummycon_init(struct vc_data *vc, int init)
+ vc_resize(vc, DUMMY_COLUMNS, DUMMY_ROWS);
+ }
+
+-static int dummycon_dummy(void)
++static void dummycon_deinit(struct vc_data *a)
++{
++}
++
++static void dummycon_clear(struct vc_data *a, int b, int c, int d, int e)
++{
++}
++
++static void dummycon_putc(struct vc_data *a, int b, int c, int d)
++{
++}
++
++static void dummycon_putcs(struct vc_data *a, const unsigned short *b, int c, int d, int e)
++{
++}
++
++static void dummycon_cursor(struct vc_data *a, int b)
++{
++}
++
++static int dummycon_scroll(struct vc_data *a, int b, int c, int d, int e)
++{
++ return 0;
++}
++
++static void dummycon_bmove(struct vc_data *a, int b, int c, int d, int e, int f, int g)
++{
++}
++
++static int dummycon_switch(struct vc_data *a)
+ {
+ return 0;
+ }
+
+-#define DUMMY (void *)dummycon_dummy
++static int dummycon_blank(struct vc_data *a, int b, int c)
++{
++ return 0;
++}
++
++static int dummycon_font_set(struct vc_data *a, struct console_font *b, unsigned c)
++{
++ return 0;
++}
++
++static int dummycon_font_get(struct vc_data *a, struct console_font *b)
++{
++ return 0;
++}
++
++static int dummycon_font_default(struct vc_data *a, struct console_font *b , char *c)
++{
++ return 0;
++}
++
++static int dummycon_font_copy(struct vc_data *a, int b)
++{
++ return 0;
++}
++
++static int dummycon_set_palette(struct vc_data *a, unsigned char *b)
++{
++ return 0;
++}
++
++static int dummycon_scrolldelta(struct vc_data *a, int b)
++{
++ return 0;
++}
+
+ /*
+ * The console `switch' structure for the dummy console
+@@ -58,20 +120,20 @@ const struct consw dummy_con = {
+ .owner = THIS_MODULE,
+ .con_startup = dummycon_startup,
+ .con_init = dummycon_init,
+- .con_deinit = DUMMY,
+- .con_clear = DUMMY,
+- .con_putc = DUMMY,
+- .con_putcs = DUMMY,
+- .con_cursor = DUMMY,
+- .con_scroll = DUMMY,
+- .con_bmove = DUMMY,
+- .con_switch = DUMMY,
+- .con_blank = DUMMY,
+- .con_font_set = DUMMY,
+- .con_font_get = DUMMY,
+- .con_font_default = DUMMY,
+- .con_font_copy = DUMMY,
+- .con_set_palette = DUMMY,
+- .con_scrolldelta = DUMMY,
++ .con_deinit = dummycon_deinit,
++ .con_clear = dummycon_clear,
++ .con_putc = dummycon_putc,
++ .con_putcs = dummycon_putcs,
++ .con_cursor = dummycon_cursor,
++ .con_scroll = dummycon_scroll,
++ .con_bmove = dummycon_bmove,
++ .con_switch = dummycon_switch,
++ .con_blank = dummycon_blank,
++ .con_font_set = dummycon_font_set,
++ .con_font_get = dummycon_font_get,
++ .con_font_default = dummycon_font_default,
++ .con_font_copy = dummycon_font_copy,
++ .con_set_palette = dummycon_set_palette,
++ .con_scrolldelta = dummycon_scrolldelta,
+ };
+ EXPORT_SYMBOL_GPL(dummy_con);
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 6e92917..2f3dbad 100644
--- a/drivers/video/console/fbcon.c
@@ -61103,6 +76285,51 @@ index 6e92917..2f3dbad 100644
/* console mappings */
static int first_fb_vc;
static int last_fb_vc = MAX_NR_CONSOLES - 1;
+diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
+index 517f565..a0a8f49 100644
+--- a/drivers/video/console/vgacon.c
++++ b/drivers/video/console/vgacon.c
+@@ -1411,24 +1411,33 @@ static int vgacon_scroll(struct vc_data *c, int t, int b, int dir,
+ * The console `switch' structure for the VGA based console
+ */
+
+-static int vgacon_dummy(struct vc_data *c)
++static void vgacon_clear(struct vc_data *vc, int a, int b, int c, int d)
+ {
+- return 0;
+ }
+
+-#define DUMMY (void *) vgacon_dummy
++static void vgacon_putc(struct vc_data *vc, int a, int b, int c)
++{
++}
++
++static void vgacon_putcs(struct vc_data *vc, const unsigned short *a, int b, int c, int d)
++{
++}
++
++static void vgacon_bmove(struct vc_data *vc, int a, int b, int c, int d, int e, int f)
++{
++}
+
+ const struct consw vga_con = {
+ .owner = THIS_MODULE,
+ .con_startup = vgacon_startup,
+ .con_init = vgacon_init,
+ .con_deinit = vgacon_deinit,
+- .con_clear = DUMMY,
+- .con_putc = DUMMY,
+- .con_putcs = DUMMY,
++ .con_clear = vgacon_clear,
++ .con_putc = vgacon_putc,
++ .con_putcs = vgacon_putcs,
+ .con_cursor = vgacon_cursor,
+ .con_scroll = vgacon_scroll,
+- .con_bmove = DUMMY,
++ .con_bmove = vgacon_bmove,
+ .con_switch = vgacon_switch,
+ .con_blank = vgacon_blank,
+ .con_font_set = vgacon_font_set,
diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c
index 1b0b233..6f34c2c 100644
--- a/drivers/video/fbdev/arcfb.c
@@ -61150,6 +76377,27 @@ index f34ed47f..026367f 100644
info->flags |= FBINFO_HWACCEL_DISABLED;
}
+diff --git a/drivers/video/fbdev/aty/mach64_ct.c b/drivers/video/fbdev/aty/mach64_ct.c
+index 51f29d6..2c15339 100644
+--- a/drivers/video/fbdev/aty/mach64_ct.c
++++ b/drivers/video/fbdev/aty/mach64_ct.c
+@@ -630,13 +630,14 @@ static void aty_resume_pll_ct(const struct fb_info *info,
+ aty_st_pll_ct(EXT_VPLL_CNTL, pll->ct.ext_vpll_cntl, par);
+ }
+
+-static int dummy(void)
++static int aty_set_dac(const struct fb_info * info,
++ const union aty_pll * pll, u32 bpp, u32 accel)
+ {
+ return 0;
+ }
+
+ const struct aty_dac_ops aty_dac_ct = {
+- .set_dac = (void *) dummy,
++ .set_dac = aty_set_dac
+ };
+
+ const struct aty_pll_ops aty_pll_ct = {
diff --git a/drivers/video/fbdev/aty/mach64_cursor.c b/drivers/video/fbdev/aty/mach64_cursor.c
index 2fa0317..4983f2a 100644
--- a/drivers/video/fbdev/aty/mach64_cursor.c
@@ -61173,8 +76421,43 @@ index 2fa0317..4983f2a 100644
return 0;
}
+diff --git a/drivers/video/fbdev/aty/mach64_gx.c b/drivers/video/fbdev/aty/mach64_gx.c
+index 10c988a..f7d9299 100644
+--- a/drivers/video/fbdev/aty/mach64_gx.c
++++ b/drivers/video/fbdev/aty/mach64_gx.c
+@@ -894,17 +894,26 @@ static int aty_set_dac_unsupported(const struct fb_info *info,
+ return 0;
+ }
+
+-static int dummy(void)
++static int aty_var_to_pll(const struct fb_info * info, u32 vclk_per, u32 bpp, union aty_pll * pll)
+ {
+ return 0;
+ }
+
++static u32 aty_pll_to_var(const struct fb_info * info, const union aty_pll * pll)
++{
++ return 0;
++}
++
++static void aty_set_pll(const struct fb_info * info, const union aty_pll * pll)
++{
++}
++
+ const struct aty_dac_ops aty_dac_unsupported = {
+ .set_dac = aty_set_dac_unsupported,
+ };
+
+ const struct aty_pll_ops aty_pll_unsupported = {
+- .var_to_pll = (void *) dummy,
+- .pll_to_var = (void *) dummy,
+- .set_pll = (void *) dummy,
++ .var_to_pll = aty_var_to_pll,
++ .pll_to_var = aty_pll_to_var,
++ .set_pll = aty_set_pll,
+ };
diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c
-index 3fc63c2..eec5e49 100644
+index 57721c7..55142ed 100644
--- a/drivers/video/fbdev/core/fb_defio.c
+++ b/drivers/video/fbdev/core/fb_defio.c
@@ -207,7 +207,9 @@ void fb_deferred_io_init(struct fb_info *info)
@@ -61198,7 +76481,7 @@ index 3fc63c2..eec5e49 100644
}
EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup);
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
-index 0705d88..0e17c07 100644
+index 4e73b6f..69a6b87 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1301,7 +1301,7 @@ static int do_fscreeninfo_to_user(struct fb_fix_screeninfo *fix,
@@ -61403,10 +76686,10 @@ index ce7dab7..a87baf8 100644
info->var.accel_flags = (!noaccel);
-diff --git a/drivers/video/fbdev/omap2/dss/display.c b/drivers/video/fbdev/omap2/dss/display.c
+diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display.c b/drivers/video/fbdev/omap2/omapfb/dss/display.c
index ef5b902..47cf7f5 100644
---- a/drivers/video/fbdev/omap2/dss/display.c
-+++ b/drivers/video/fbdev/omap2/dss/display.c
+--- a/drivers/video/fbdev/omap2/omapfb/dss/display.c
++++ b/drivers/video/fbdev/omap2/omapfb/dss/display.c
@@ -161,12 +161,14 @@ int omapdss_register_display(struct omap_dss_device *dssdev)
if (dssdev->name == NULL)
dssdev->name = dssdev->alias;
@@ -61459,6 +76742,19 @@ index 82c0a8c..42499a1 100644
};
static int sh_mobile_lcdc_sginit(struct fb_info *info,
+diff --git a/drivers/video/fbdev/sis/sis_main.h b/drivers/video/fbdev/sis/sis_main.h
+index 32e23c2..7b73082 100644
+--- a/drivers/video/fbdev/sis/sis_main.h
++++ b/drivers/video/fbdev/sis/sis_main.h
+@@ -763,7 +763,7 @@ extern void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsig
+ extern unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg);
+ extern void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
+ extern void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
+- unsigned char myor, unsigned char myand);
++ unsigned char myor, unsigned short myand);
+ extern void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime);
+ extern void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
+ extern unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, int VGAEngine,
diff --git a/drivers/video/fbdev/smscufx.c b/drivers/video/fbdev/smscufx.c
index 9279e5f..d5f5276 100644
--- a/drivers/video/fbdev/smscufx.c
@@ -64578,6 +79874,19 @@ index 4436778..bfcd027 100644
.name = "xen-percpu",
.irq_disable = disable_dynirq,
+diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
+index 258b7c3..6aad74a 100644
+--- a/drivers/xen/xen-pciback/pci_stub.c
++++ b/drivers/xen/xen-pciback/pci_stub.c
+@@ -831,7 +831,7 @@ end:
+ */
+
+ static pci_ers_result_t xen_pcibk_error_detected(struct pci_dev *dev,
+- pci_channel_state_t error)
++ enum pci_channel_state error)
+ {
+ struct pcistub_device *psdev;
+ pci_ers_result_t result;
diff --git a/drivers/xen/xenfs/xenstored.c b/drivers/xen/xenfs/xenstored.c
index fef20db..d28b1ab 100644
--- a/drivers/xen/xenfs/xenstored.c
@@ -64612,7 +79921,7 @@ index e297e1b..aeb0982 100644
fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
diff --git a/firmware/WHENCE b/firmware/WHENCE
-index 0c4d96d..b17700f 100644
+index de6f22e..51fbae7 100644
--- a/firmware/WHENCE
+++ b/firmware/WHENCE
@@ -653,21 +653,23 @@ Found in hex form in kernel source.
@@ -76960,6 +92269,41 @@ index 0000000..43d7c4f
+:1095C00080080000800E00008008008080080000F5
+:1095D00080000A8080000A00800009808000090065
+:00000001FF
+diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
+index e9e0437..a442193 100644
+--- a/fs/9p/vfs_addr.c
++++ b/fs/9p/vfs_addr.c
+@@ -121,7 +121,7 @@ static int v9fs_vfs_readpages(struct file *filp, struct address_space *mapping,
+ if (ret == 0)
+ return ret;
+
+- ret = read_cache_pages(mapping, pages, (void *)v9fs_vfs_readpage, filp);
++ ret = read_cache_pages(mapping, pages, v9fs_vfs_readpage, filp);
+ p9_debug(P9_DEBUG_VFS, " = %d\n", ret);
+ return ret;
+ }
+diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
+index a34702c..ff71f79 100644
+--- a/fs/9p/vfs_inode_dotl.c
++++ b/fs/9p/vfs_inode_dotl.c
+@@ -179,7 +179,7 @@ static int v9fs_mapped_dotl_flags(int flags)
+ {
+ int i;
+ int rflags = 0;
+- struct dotl_openflag_map dotl_oflag_map[] = {
++ static const struct dotl_openflag_map dotl_oflag_map[] = {
+ { O_CREAT, P9_DOTL_CREATE },
+ { O_EXCL, P9_DOTL_EXCL },
+ { O_NOCTTY, P9_DOTL_NOCTTY },
+@@ -526,7 +526,7 @@ static int v9fs_mapped_iattr_valid(int iattr_valid)
+ {
+ int i;
+ int p9_iattr_valid = 0;
+- struct dotl_iattr_map dotl_iattr_map[] = {
++ static const struct dotl_iattr_map dotl_iattr_map[] = {
+ { ATTR_MODE, P9_ATTR_MODE },
+ { ATTR_UID, P9_ATTR_UID },
+ { ATTR_GID, P9_ATTR_GID },
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index 2d0cbbd..a6d61492 100644
--- a/fs/Kconfig.binfmt
@@ -76973,11 +92317,46 @@ index 2d0cbbd..a6d61492 100644
---help---
A.out (Assembler.OUTput) is a set of formats for libraries and
executables used in the earliest versions of UNIX. Linux used
+diff --git a/fs/afs/file.c b/fs/afs/file.c
+index 999bc3c..3926949 100644
+--- a/fs/afs/file.c
++++ b/fs/afs/file.c
+@@ -122,11 +122,11 @@ static void afs_file_readpage_read_complete(struct page *page,
+ /*
+ * read page from file, directory or symlink, given a key to use
+ */
+-int afs_page_filler(void *data, struct page *page)
++int afs_page_filler(struct file *data, struct page *page)
+ {
+ struct inode *inode = page->mapping->host;
+ struct afs_vnode *vnode = AFS_FS_I(inode);
+- struct key *key = data;
++ struct key *key = (struct key *)data;
+ size_t len;
+ off_t offset;
+ int ret;
+@@ -220,14 +220,14 @@ static int afs_readpage(struct file *file, struct page *page)
+ if (file) {
+ key = file->private_data;
+ ASSERT(key != NULL);
+- ret = afs_page_filler(key, page);
++ ret = afs_page_filler((struct file *)key, page);
+ } else {
+ struct inode *inode = page->mapping->host;
+ key = afs_request_key(AFS_FS_S(inode->i_sb)->volume->cell);
+ if (IS_ERR(key)) {
+ ret = PTR_ERR(key);
+ } else {
+- ret = afs_page_filler(key, page);
++ ret = afs_page_filler((struct file *)key, page);
+ key_put(key);
+ }
+ }
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
-index e06f5a2..81d07ac 100644
+index 86cc726..b9b7f73 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
-@@ -141,7 +141,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
+@@ -142,7 +142,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
struct afs_vnode *vnode;
struct super_block *sb;
struct inode *inode;
@@ -76986,7 +92365,7 @@ index e06f5a2..81d07ac 100644
_enter("{%x:%u},%*.*s,",
AFS_FS_I(dir)->fid.vid, AFS_FS_I(dir)->fid.vnode,
-@@ -154,7 +154,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
+@@ -155,7 +155,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name,
data.fid.unique = 0;
data.fid.vnode = 0;
@@ -76995,6 +92374,28 @@ index e06f5a2..81d07ac 100644
afs_iget5_autocell_test, afs_iget5_set,
&data);
if (!inode) {
+diff --git a/fs/afs/internal.h b/fs/afs/internal.h
+index 71d5982..3112bf6 100644
+--- a/fs/afs/internal.h
++++ b/fs/afs/internal.h
+@@ -15,7 +15,7 @@
+ #include <linux/pagemap.h>
+ #include <linux/skbuff.h>
+ #include <linux/rxrpc.h>
+-#include <linux/key.h>
++#include <linux/key-type.h>
+ #include <linux/workqueue.h>
+ #include <linux/sched.h>
+ #include <linux/fscache.h>
+@@ -498,7 +498,7 @@ extern const struct file_operations afs_file_operations;
+
+ extern int afs_open(struct inode *, struct file *);
+ extern int afs_release(struct inode *, struct file *);
+-extern int afs_page_filler(void *, struct page *);
++extern int afs_page_filler(struct file *, struct page *);
+
+ /*
+ * flock.c
diff --git a/fs/aio.c b/fs/aio.c
index 155f842..89922d8 100644
--- a/fs/aio.c
@@ -77009,7 +92410,7 @@ index 155f842..89922d8 100644
file = aio_private_file(ctx, nr_pages);
diff --git a/fs/attr.c b/fs/attr.c
-index 6530ced..559e5e6 100644
+index 25b24d0..85550fc 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -102,6 +102,10 @@ int inode_newsize_ok(const struct inode *inode, loff_t offset)
@@ -77172,7 +92573,7 @@ index 4c55668..eeae150 100644
fd_offset + ex.a_text);
if (error != N_DATADDR(ex))
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
-index 3a93755..daf2ccc 100644
+index 7d914c6..a86ce2a 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -36,6 +36,7 @@
@@ -77275,7 +92676,7 @@ index 3a93755..daf2ccc 100644
return -EFAULT;
return 0;
}
-@@ -516,14 +543,14 @@ static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp,
+@@ -518,14 +545,14 @@ static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp,
an ELF header */
static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
@@ -77293,7 +92694,7 @@ index 3a93755..daf2ccc 100644
unsigned long total_size;
int i;
-@@ -543,6 +570,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -545,6 +572,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
goto out;
}
@@ -77305,7 +92706,7 @@ index 3a93755..daf2ccc 100644
eppnt = interp_elf_phdata;
for (i = 0; i < interp_elf_ex->e_phnum; i++, eppnt++) {
if (eppnt->p_type == PT_LOAD) {
-@@ -566,8 +598,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -568,8 +600,6 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
map_addr = elf_map(interpreter, load_addr + vaddr,
eppnt, elf_prot, elf_type, total_size);
total_size = 0;
@@ -77314,7 +92715,7 @@ index 3a93755..daf2ccc 100644
error = map_addr;
if (BAD_ADDR(map_addr))
goto out;
-@@ -586,8 +616,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -588,8 +618,8 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
k = load_addr + eppnt->p_vaddr;
if (BAD_ADDR(k) ||
eppnt->p_filesz > eppnt->p_memsz ||
@@ -77325,7 +92726,7 @@ index 3a93755..daf2ccc 100644
error = -ENOMEM;
goto out;
}
-@@ -626,9 +656,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
+@@ -628,9 +658,11 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1);
/* Map the last of the bss segment */
@@ -77340,7 +92741,7 @@ index 3a93755..daf2ccc 100644
}
error = load_addr;
-@@ -636,6 +668,336 @@ out:
+@@ -638,6 +670,336 @@ out:
return error;
}
@@ -77677,7 +93078,7 @@ index 3a93755..daf2ccc 100644
/*
* These are the functions used to load ELF style executables and shared
* libraries. There is no binary dependent code anywhere else.
-@@ -649,6 +1011,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
+@@ -651,6 +1013,11 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
{
unsigned long random_variable = 0;
@@ -77688,8 +93089,8 @@ index 3a93755..daf2ccc 100644
+
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
- random_variable = (unsigned long) get_random_int();
-@@ -668,7 +1035,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
+ random_variable = get_random_long();
+@@ -670,7 +1037,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
@@ -77698,7 +93099,7 @@ index 3a93755..daf2ccc 100644
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf_bss, elf_brk;
int retval, i;
-@@ -683,6 +1050,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -685,6 +1052,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
struct elfhdr interp_elf_ex;
} *loc;
struct arch_elf_state arch_state = INIT_ARCH_ELF_STATE;
@@ -77706,7 +93107,7 @@ index 3a93755..daf2ccc 100644
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
-@@ -841,6 +1209,77 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -845,6 +1213,77 @@ static int load_elf_binary(struct linux_binprm *bprm)
/* Do this immediately, since STACK_TOP as used in setup_arg_pages
may depend on the personality. */
SET_PERSONALITY2(loc->elf_ex, &arch_state);
@@ -77784,7 +93185,7 @@ index 3a93755..daf2ccc 100644
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
-@@ -916,8 +1355,21 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -920,8 +1359,21 @@ static int load_elf_binary(struct linux_binprm *bprm)
if (current->flags & PF_RANDOMIZE)
load_bias += arch_mmap_rnd();
load_bias = ELF_PAGESTART(load_bias);
@@ -77808,7 +93209,7 @@ index 3a93755..daf2ccc 100644
if (!total_size) {
retval = -EINVAL;
goto out_free_dentry;
-@@ -953,9 +1405,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -957,9 +1409,9 @@ static int load_elf_binary(struct linux_binprm *bprm)
* allowed task size. Note that p_filesz must always be
* <= p_memsz so it is only necessary to check p_memsz.
*/
@@ -77821,7 +93222,7 @@ index 3a93755..daf2ccc 100644
/* set_brk can never work. Avoid overflows. */
retval = -EINVAL;
goto out_free_dentry;
-@@ -991,16 +1443,43 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -995,16 +1447,43 @@ static int load_elf_binary(struct linux_binprm *bprm)
if (retval)
goto out_free_dentry;
if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) {
@@ -77870,7 +93271,7 @@ index 3a93755..daf2ccc 100644
load_bias, interp_elf_phdata);
if (!IS_ERR((void *)elf_entry)) {
/*
-@@ -1051,6 +1530,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -1055,6 +1534,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
current->mm->end_data = end_data;
current->mm->start_stack = bprm->p;
@@ -77878,7 +93279,7 @@ index 3a93755..daf2ccc 100644
if ((current->flags & PF_RANDOMIZE) && (randomize_va_space > 1)) {
current->mm->brk = current->mm->start_brk =
arch_randomize_brk(current->mm);
-@@ -1058,6 +1538,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
+@@ -1062,6 +1542,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
current->brk_randomized = 1;
#endif
}
@@ -77886,7 +93287,7 @@ index 3a93755..daf2ccc 100644
if (current->personality & MMAP_PAGE_ZERO) {
/* Why this, you ask??? Well SVr4 maps page 0 as read-only,
-@@ -1226,7 +1707,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
+@@ -1230,7 +1711,7 @@ static bool always_dump_vma(struct vm_area_struct *vma)
* Decide what to dump of a segment, part, all or none.
*/
static unsigned long vma_dump_size(struct vm_area_struct *vma,
@@ -77895,7 +93296,7 @@ index 3a93755..daf2ccc 100644
{
#define FILTER(type) (mm_flags & (1UL << MMF_DUMP_##type))
-@@ -1273,7 +1754,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
+@@ -1277,7 +1758,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma,
if (vma->vm_file == NULL)
return 0;
@@ -77904,7 +93305,7 @@ index 3a93755..daf2ccc 100644
goto whole;
/*
-@@ -1373,7 +1854,7 @@ static void fill_elf_header(struct elfhdr *elf, int segs,
+@@ -1377,7 +1858,7 @@ static void fill_elf_header(struct elfhdr *elf, int segs,
return;
}
@@ -77913,7 +93314,7 @@ index 3a93755..daf2ccc 100644
{
phdr->p_type = PT_NOTE;
phdr->p_offset = offset;
-@@ -1480,9 +1961,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
+@@ -1484,9 +1965,9 @@ static void fill_auxv_note(struct memelfnote *note, struct mm_struct *mm)
{
elf_addr_t *auxv = (elf_addr_t *) mm->saved_auxv;
int i = 0;
@@ -77925,7 +93326,7 @@ index 3a93755..daf2ccc 100644
fill_note(note, "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv);
}
-@@ -1491,7 +1972,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata,
+@@ -1495,7 +1976,7 @@ static void fill_siginfo_note(struct memelfnote *note, user_siginfo_t *csigdata,
{
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -77934,7 +93335,7 @@ index 3a93755..daf2ccc 100644
set_fs(old_fs);
fill_note(note, "CORE", NT_SIGINFO, sizeof(*csigdata), csigdata);
}
-@@ -2211,7 +2692,7 @@ static int elf_core_dump(struct coredump_params *cprm)
+@@ -2215,7 +2696,7 @@ static int elf_core_dump(struct coredump_params *cprm)
vma = next_vma(vma, gate_vma)) {
unsigned long dump_size;
@@ -77943,7 +93344,7 @@ index 3a93755..daf2ccc 100644
vma_filesz[i++] = dump_size;
vma_data_size += dump_size;
}
-@@ -2319,6 +2800,167 @@ out:
+@@ -2323,6 +2804,167 @@ out:
#endif /* CONFIG_ELF_CORE */
@@ -78134,10 +93535,10 @@ index b1adb92..81d396b 100644
for (i = 0; i < numnote; i++)
sz += notesize(notes + i);
diff --git a/fs/block_dev.c b/fs/block_dev.c
-index 44d4a1e..99df269 100644
+index 826b164..690322d 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
-@@ -762,7 +762,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
+@@ -766,7 +766,7 @@ static bool bd_may_claim(struct block_device *bdev, struct block_device *whole,
else if (bdev->bd_contains == bdev)
return true; /* is a whole device which isn't held */
@@ -78147,7 +93548,7 @@ index 44d4a1e..99df269 100644
else if (whole->bd_holder != NULL)
return false; /* is a partition of a held device */
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
-index 5b8e235..33d31fc 100644
+index 769e0ff..0f57508 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -357,7 +357,7 @@ static inline void tree_mod_log_write_unlock(struct btrfs_fs_info *fs_info)
@@ -78176,10 +93577,10 @@ index 5b8e235..33d31fc 100644
WARN_ON(trans->transid != btrfs_header_generation(parent));
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
-index 385b449..289f2c4 100644
+index bfe4a33..1bd2b22 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
-@@ -1576,7 +1576,7 @@ struct btrfs_fs_info {
+@@ -1618,7 +1618,7 @@ struct btrfs_fs_info {
/* this protects tree_mod_seq_list */
spinlock_t tree_mod_seq_lock;
@@ -78188,7 +93589,7 @@ index 385b449..289f2c4 100644
struct list_head tree_mod_seq_list;
/* this protects tree_mod_log */
-@@ -1881,7 +1881,7 @@ struct btrfs_root {
+@@ -1925,7 +1925,7 @@ struct btrfs_root {
struct list_head log_ctxs[2];
atomic_t log_writers;
atomic_t log_commit[2];
@@ -78198,10 +93599,10 @@ index 385b449..289f2c4 100644
/* No matter the commit succeeds or not*/
int log_transid_committed;
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
-index 02b934d..a8126a4 100644
+index b57daa8..45ab28e 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
-@@ -462,7 +462,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node,
+@@ -457,7 +457,7 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node,
static void finish_one_item(struct btrfs_delayed_root *delayed_root)
{
@@ -78210,7 +93611,7 @@ index 02b934d..a8126a4 100644
/*
* atomic_dec_return implies a barrier for waitqueue_active
-@@ -1416,7 +1416,7 @@ void btrfs_assert_delayed_root_empty(struct btrfs_root *root)
+@@ -1411,7 +1411,7 @@ void btrfs_assert_delayed_root_empty(struct btrfs_root *root)
static int could_end_wait(struct btrfs_delayed_root *delayed_root, int seq)
{
@@ -78219,7 +93620,7 @@ index 02b934d..a8126a4 100644
if (val < seq || val >= seq + BTRFS_DELAYED_BATCH)
return 1;
-@@ -1441,7 +1441,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root)
+@@ -1436,7 +1436,7 @@ void btrfs_balance_delayed_items(struct btrfs_root *root)
int seq;
int ret;
@@ -78251,7 +93652,7 @@ index 0167853c..b7d2bb4 100644
spin_lock_init(&delayed_root->lock);
init_waitqueue_head(&delayed_root->wait);
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
-index e06dd75a..22221aa 100644
+index 914ac13..6a872f7 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -660,7 +660,7 @@ add_delayed_tree_ref(struct btrfs_fs_info *fs_info,
@@ -78273,10 +93674,10 @@ index e06dd75a..22221aa 100644
/* first set the basic ref node struct up */
atomic_set(&ref->refs, 1);
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
-index 41fb431..9b5ad63 100644
+index 4545e2e..4a2c0a9 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
-@@ -1263,7 +1263,7 @@ static void __setup_root(u32 nodesize, u32 sectorsize, u32 stripesize,
+@@ -1271,7 +1271,7 @@ static void __setup_root(u32 nodesize, u32 sectorsize, u32 stripesize,
atomic_set(&root->log_commit[0], 0);
atomic_set(&root->log_commit[1], 0);
atomic_set(&root->log_writers, 0);
@@ -78285,7 +93686,7 @@ index 41fb431..9b5ad63 100644
atomic_set(&root->orphan_inodes, 0);
atomic_set(&root->refs, 1);
atomic_set(&root->will_be_snapshoted, 0);
-@@ -2582,7 +2582,7 @@ int open_ctree(struct super_block *sb,
+@@ -2603,7 +2603,7 @@ int open_ctree(struct super_block *sb,
atomic_set(&fs_info->nr_async_bios, 0);
atomic_set(&fs_info->defrag_running, 0);
atomic_set(&fs_info->qgroup_op_seq, 0);
@@ -78295,7 +93696,7 @@ index 41fb431..9b5ad63 100644
fs_info->max_inline = BTRFS_DEFAULT_MAX_INLINE;
fs_info->metadata_ratio = 0;
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
-index 6a98bdd..fed3da6 100644
+index 84fb56d..ee0fe69 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -235,7 +235,9 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em)
@@ -78321,20 +93722,20 @@ index 6a98bdd..fed3da6 100644
RB_CLEAR_NODE(&merge->rb_node);
em->mod_len = (merge->mod_start + merge->mod_len) - em->mod_start;
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
-index 5e5db36..b5ac5d4 100644
+index 9a30ca6..830e945 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
-@@ -1912,7 +1912,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
+@@ -1910,7 +1910,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
return ret;
- mutex_lock(&inode->i_mutex);
+ inode_lock(inode);
- atomic_inc(&root->log_batch);
+ atomic_inc_unchecked(&root->log_batch);
full_sync = test_bit(BTRFS_INODE_NEEDS_FULL_SYNC,
&BTRFS_I(inode)->runtime_flags);
/*
-@@ -1966,7 +1966,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
- mutex_unlock(&inode->i_mutex);
+@@ -1964,7 +1964,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
+ inode_unlock(inode);
goto out;
}
- atomic_inc(&root->log_batch);
@@ -78342,8 +93743,20 @@ index 5e5db36..b5ac5d4 100644
/*
* If the last transaction that changed this file was before the current
+diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
+index 33178c4..ff2e4ad 100644
+--- a/fs/btrfs/free-space-cache.h
++++ b/fs/btrfs/free-space-cache.h
+@@ -48,6 +48,7 @@ struct btrfs_free_space_op {
+ bool (*use_bitmap)(struct btrfs_free_space_ctl *ctl,
+ struct btrfs_free_space *info);
+ };
++typedef struct btrfs_free_space_op __no_const btrfs_free_space_op_no_const;
+
+ struct btrfs_io_ctl;
+
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
-index 1a33d3e..4830234 100644
+index 5516136..8480a2f 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -153,7 +153,7 @@ struct btrfs_raid_bio {
@@ -78355,16 +93768,16 @@ index 1a33d3e..4830234 100644
/*
* these are two arrays of pointers. We allocate the
* rbio big enough to hold them both and setup their
-@@ -902,7 +902,7 @@ static void raid_write_end_io(struct bio *bio)
- err = 0;
-
+@@ -916,7 +916,7 @@ static void raid_write_end_io(struct bio *bio)
/* OK, we have read all the stripes we need to. */
-- if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
-+ if (atomic_read_unchecked(&rbio->error) > rbio->bbio->max_errors)
+ max_errors = (rbio->operation == BTRFS_RBIO_PARITY_SCRUB) ?
+ 0 : rbio->bbio->max_errors;
+- if (atomic_read(&rbio->error) > max_errors)
++ if (atomic_read_unchecked(&rbio->error) > max_errors)
err = -EIO;
rbio_orig_end_io(rbio, err);
-@@ -987,7 +987,7 @@ static struct btrfs_raid_bio *alloc_rbio(struct btrfs_root *root,
+@@ -999,7 +999,7 @@ static struct btrfs_raid_bio *alloc_rbio(struct btrfs_root *root,
rbio->faila = -1;
rbio->failb = -1;
atomic_set(&rbio->refs, 1);
@@ -78373,7 +93786,7 @@ index 1a33d3e..4830234 100644
atomic_set(&rbio->stripes_pending, 0);
/*
-@@ -1211,7 +1211,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio)
+@@ -1208,7 +1208,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio)
set_bit(RBIO_RMW_LOCKED_BIT, &rbio->flags);
spin_unlock_irq(&rbio->bio_list_lock);
@@ -78382,7 +93795,7 @@ index 1a33d3e..4830234 100644
/*
* now that we've set rmw_locked, run through the
-@@ -1399,11 +1399,11 @@ static int fail_rbio_index(struct btrfs_raid_bio *rbio, int failed)
+@@ -1396,11 +1396,11 @@ static int fail_rbio_index(struct btrfs_raid_bio *rbio, int failed)
if (rbio->faila == -1) {
/* first failure on this rbio */
rbio->faila = failed;
@@ -78396,7 +93809,7 @@ index 1a33d3e..4830234 100644
} else {
ret = -EIO;
}
-@@ -1465,7 +1465,7 @@ static void raid_rmw_end_io(struct bio *bio)
+@@ -1462,7 +1462,7 @@ static void raid_rmw_end_io(struct bio *bio)
if (!atomic_dec_and_test(&rbio->stripes_pending))
return;
@@ -78405,7 +93818,7 @@ index 1a33d3e..4830234 100644
goto cleanup;
/*
-@@ -1521,7 +1521,7 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
+@@ -1517,7 +1517,7 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
index_rbio_pages(rbio);
@@ -78414,7 +93827,7 @@ index 1a33d3e..4830234 100644
/*
* build a list of bios to read all the missing parts of this
* stripe
-@@ -2014,7 +2014,7 @@ static void raid_recover_end_io(struct bio *bio)
+@@ -2009,7 +2009,7 @@ static void raid_recover_end_io(struct bio *bio)
if (!atomic_dec_and_test(&rbio->stripes_pending))
return;
@@ -78423,7 +93836,7 @@ index 1a33d3e..4830234 100644
rbio_orig_end_io(rbio, -EIO);
else
__raid_recover_end_io(rbio);
-@@ -2044,7 +2044,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
+@@ -2038,7 +2038,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
if (ret)
goto cleanup;
@@ -78432,7 +93845,7 @@ index 1a33d3e..4830234 100644
/*
* read everything that hasn't failed. Thanks to the
-@@ -2053,7 +2053,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
+@@ -2047,7 +2047,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
*/
for (stripe = 0; stripe < rbio->real_stripes; stripe++) {
if (rbio->faila == stripe || rbio->failb == stripe) {
@@ -78441,7 +93854,7 @@ index 1a33d3e..4830234 100644
continue;
}
-@@ -2083,7 +2083,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
+@@ -2077,7 +2077,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
* were up to date, or we might have no bios to read because
* the devices were gone.
*/
@@ -78450,16 +93863,7 @@ index 1a33d3e..4830234 100644
__raid_recover_end_io(rbio);
goto out;
} else {
-@@ -2306,7 +2306,7 @@ static void raid_write_parity_end_io(struct bio *bio)
-
- err = 0;
-
-- if (atomic_read(&rbio->error))
-+ if (atomic_read_unchecked(&rbio->error))
- err = -EIO;
-
- rbio_orig_end_io(rbio, err);
-@@ -2370,7 +2370,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
+@@ -2338,7 +2338,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
SetPageUptodate(q_page);
}
@@ -78468,7 +93872,7 @@ index 1a33d3e..4830234 100644
for_each_set_bit(pagenr, rbio->dbitmap, rbio->stripe_npages) {
struct page *p;
-@@ -2489,7 +2489,7 @@ static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe)
+@@ -2457,7 +2457,7 @@ static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe)
*/
static void validate_rbio_for_parity_scrub(struct btrfs_raid_bio *rbio)
{
@@ -78477,7 +93881,7 @@ index 1a33d3e..4830234 100644
goto cleanup;
if (rbio->faila >= 0 || rbio->failb >= 0) {
-@@ -2586,7 +2586,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
+@@ -2554,7 +2554,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
bio_list_init(&bio_list);
@@ -78487,7 +93891,7 @@ index 1a33d3e..4830234 100644
* build a list of bios to read all the missing parts of this
* stripe
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
-index fe609b8..6475fee 100644
+index d41e09fe..0a20548 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -248,7 +248,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
@@ -78500,10 +93904,10 @@ index fe609b8..6475fee 100644
wake_up(&root->fs_info->transaction_wait);
wake_up(&root->fs_info->transaction_blocked_wait);
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
-index e0ac859..dc1657f 100644
+index 539e7b5..9de4167 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
-@@ -481,7 +481,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
+@@ -483,7 +483,7 @@ static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
for (set = 0; set < FEAT_MAX; set++) {
int i;
struct attribute *attrs[2];
@@ -78513,10 +93917,10 @@ index e0ac859..dc1657f 100644
.attrs = attrs,
};
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
-index 9626252..e130203 100644
+index 0e1e61a..227b156 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
-@@ -116,7 +116,7 @@ struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(void)
+@@ -119,7 +119,7 @@ struct btrfs_fs_info *btrfs_alloc_dummy_fs_info(void)
fs_info->running_transaction = NULL;
fs_info->qgroup_tree = RB_ROOT;
fs_info->qgroup_ulist = NULL;
@@ -78526,36 +93930,23 @@ index 9626252..e130203 100644
INIT_LIST_HEAD(&fs_info->dead_roots);
INIT_LIST_HEAD(&fs_info->tree_mod_seq_list);
diff --git a/fs/btrfs/tests/free-space-tests.c b/fs/btrfs/tests/free-space-tests.c
-index 8b72b00..6c30bdc 100644
+index c9ad97b..006bc77 100644
--- a/fs/btrfs/tests/free-space-tests.c
+++ b/fs/btrfs/tests/free-space-tests.c
-@@ -470,7 +470,9 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
- * extent entry.
- */
- use_bitmap_op = cache->free_space_ctl->op->use_bitmap;
-- cache->free_space_ctl->op->use_bitmap = test_use_bitmap;
-+ pax_open_kernel();
-+ *(void **)&cache->free_space_ctl->op->use_bitmap = test_use_bitmap;
-+ pax_close_kernel();
-
- /*
- * Extent entry covering free space range [128Mb - 256Kb, 128Mb - 128Kb[
-@@ -877,7 +879,9 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
- if (ret)
- return ret;
-
-- cache->free_space_ctl->op->use_bitmap = use_bitmap_op;
-+ pax_open_kernel();
-+ *(void **)&cache->free_space_ctl->op->use_bitmap = use_bitmap_op;
-+ pax_close_kernel();
- __btrfs_remove_free_space_cache(cache->free_space_ctl);
-
- return 0;
+@@ -405,7 +405,7 @@ test_steal_space_from_bitmap_to_extent(struct btrfs_block_group_cache *cache)
+ int ret;
+ u64 offset;
+ u64 max_extent_size;
+- const struct btrfs_free_space_op test_free_space_ops = {
++ const btrfs_free_space_op_no_const test_free_space_ops = {
+ .recalc_thresholds = cache->free_space_ctl->op->recalc_thresholds,
+ .use_bitmap = test_use_bitmap,
+ };
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
-index be8eae8..f884717 100644
+index b6031ce..5d53523 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
-@@ -260,7 +260,7 @@ loop:
+@@ -277,7 +277,7 @@ loop:
if (!RB_EMPTY_ROOT(&fs_info->tree_mod_log))
WARN(1, KERN_ERR "BTRFS: tree_mod_log rb tree not empty when "
"creating a fresh transaction\n");
@@ -78565,7 +93956,7 @@ index be8eae8..f884717 100644
spin_lock_init(&cur_trans->delayed_refs.lock);
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
-index 0e044d7..21ad436 100644
+index 849a30a..f7563af 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -172,7 +172,7 @@ static int start_log_trans(struct btrfs_trans_handle *trans,
@@ -78618,10 +94009,10 @@ index 6916a78..4598936 100644
static inline int btrfs_need_log_full_commit(struct btrfs_fs_info *fs_info,
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
-index 9c62a6f..3c7df72 100644
+index 366b335..54dba62 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
-@@ -231,7 +231,7 @@ static struct btrfs_device *__alloc_device(void)
+@@ -232,7 +232,7 @@ static struct btrfs_device *__alloc_device(void)
spin_lock_init(&dev->reada_lock);
atomic_set(&dev->reada_in_flight, 0);
@@ -78630,7 +94021,7 @@ index 9c62a6f..3c7df72 100644
btrfs_device_data_ordered_init(dev);
INIT_RADIX_TREE(&dev->reada_zones, GFP_NOFS & ~__GFP_DIRECT_RECLAIM);
INIT_RADIX_TREE(&dev->reada_extents, GFP_NOFS & ~__GFP_DIRECT_RECLAIM);
-@@ -5185,7 +5185,7 @@ static struct btrfs_bio *alloc_btrfs_bio(int total_stripes, int real_stripes)
+@@ -5197,7 +5197,7 @@ static struct btrfs_bio *alloc_btrfs_bio(int total_stripes, int real_stripes)
sizeof(u64) * (total_stripes),
GFP_NOFS|__GFP_NOFAIL);
@@ -78639,7 +94030,7 @@ index 9c62a6f..3c7df72 100644
atomic_set(&bbio->refs, 1);
return bbio;
-@@ -5866,7 +5866,7 @@ static void btrfs_end_bio(struct bio *bio)
+@@ -5876,7 +5876,7 @@ static void btrfs_end_bio(struct bio *bio)
int is_orig_bio = 0;
if (bio->bi_error) {
@@ -78648,7 +94039,7 @@ index 9c62a6f..3c7df72 100644
if (bio->bi_error == -EIO || bio->bi_error == -EREMOTEIO) {
unsigned int stripe_index =
btrfs_io_bio(bio)->stripe_index;
-@@ -5904,7 +5904,7 @@ static void btrfs_end_bio(struct bio *bio)
+@@ -5914,7 +5914,7 @@ static void btrfs_end_bio(struct bio *bio)
/* only send an error to the higher layers if it is
* beyond the tolerance of the btrfs bio
*/
@@ -78657,7 +94048,7 @@ index 9c62a6f..3c7df72 100644
bio->bi_error = -EIO;
} else {
/*
-@@ -6015,7 +6015,7 @@ static void submit_stripe_bio(struct btrfs_root *root, struct btrfs_bio *bbio,
+@@ -6025,7 +6025,7 @@ static void submit_stripe_bio(struct btrfs_root *root, struct btrfs_bio *bbio,
static void bbio_error(struct btrfs_bio *bbio, struct bio *bio, u64 logical)
{
@@ -78666,7 +94057,7 @@ index 9c62a6f..3c7df72 100644
if (atomic_dec_and_test(&bbio->stripes_pending)) {
/* Shoud be the original bio. */
WARN_ON(bio != bbio->orig_bio);
-@@ -6777,10 +6777,10 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans,
+@@ -6822,10 +6822,10 @@ int btrfs_run_dev_stats(struct btrfs_trans_handle *trans,
if (!device->dev_stats_valid || !btrfs_dev_stats_dirty(device))
continue;
@@ -78680,7 +94071,7 @@ index 9c62a6f..3c7df72 100644
mutex_unlock(&fs_devices->device_list_mutex);
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
-index d5c84f6..0badba4 100644
+index 1939ebd..2330751 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -148,8 +148,8 @@ struct btrfs_device {
@@ -78753,10 +94144,10 @@ index d5c84f6..0badba4 100644
static inline void btrfs_dev_stat_reset(struct btrfs_device *dev,
diff --git a/fs/buffer.c b/fs/buffer.c
-index 4f4cd95..f19e4ab 100644
+index e1632ab..f6ffc2d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
-@@ -3417,7 +3417,7 @@ void __init buffer_init(void)
+@@ -3408,7 +3408,7 @@ void __init buffer_init(void)
bh_cachep = kmem_cache_create("buffer_head",
sizeof(struct buffer_head), 0,
(SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
@@ -78786,7 +94177,7 @@ index 6af790f..ec4c1e6 100644
cache->brun_percent < 100);
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
-index f601def..b2cf704 100644
+index 452e98d..8af9de3 100644
--- a/fs/cachefiles/daemon.c
+++ b/fs/cachefiles/daemon.c
@@ -196,7 +196,7 @@ static ssize_t cachefiles_daemon_read(struct file *file, char __user *_buffer,
@@ -78807,7 +94198,7 @@ index f601def..b2cf704 100644
return -EOPNOTSUPP;
/* drag the command string into the kernel so we can parse it */
-@@ -385,7 +385,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
+@@ -379,7 +379,7 @@ static int cachefiles_daemon_fstop(struct cachefiles_cache *cache, char *args)
if (args[0] != '%' || args[1] != '\0')
return -EINVAL;
@@ -78816,7 +94207,7 @@ index f601def..b2cf704 100644
return cachefiles_daemon_range_error(cache, args);
cache->fstop_percent = fstop;
-@@ -457,7 +457,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
+@@ -451,7 +451,7 @@ static int cachefiles_daemon_bstop(struct cachefiles_cache *cache, char *args)
if (args[0] != '%' || args[1] != '\0')
return -EINVAL;
@@ -78864,7 +94255,7 @@ index 9c4b737..0bc3fd18 100644
#else
diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c
-index c4b8934..8c9b05c 100644
+index 1c2334c..0595c5f 100644
--- a/fs/cachefiles/namei.c
+++ b/fs/cachefiles/namei.c
@@ -312,7 +312,7 @@ try_again:
@@ -78907,7 +94298,7 @@ index eccd339..4c1d995 100644
return 0;
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
-index 9314b4e..4a1f602 100644
+index fd11fb2..cdc7627 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -214,10 +214,18 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx,
@@ -78940,7 +94331,7 @@ index 9314b4e..4a1f602 100644
u32 ftype;
struct ceph_mds_reply_info_parsed *rinfo;
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
-index f446afa..0ad3b8e 100644
+index ca4d5e8..16ec9c0 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -907,7 +907,7 @@ static int ceph_compare_super(struct super_block *sb, void *data)
@@ -79006,10 +94397,10 @@ index 50b2684..aa33a91 100644
server->ops->print_stats(m, tcon);
}
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
-index cbc0f4b..230e61a 100644
+index 2eea403..61eb375 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
-@@ -1077,7 +1077,7 @@ cifs_init_request_bufs(void)
+@@ -1153,7 +1153,7 @@ cifs_init_request_bufs(void)
*/
cifs_req_cachep = kmem_cache_create("cifs_request",
CIFSMaxBufSize + max_hdr_size, 0,
@@ -79018,7 +94409,7 @@ index cbc0f4b..230e61a 100644
if (cifs_req_cachep == NULL)
return -ENOMEM;
-@@ -1104,7 +1104,7 @@ cifs_init_request_bufs(void)
+@@ -1180,7 +1180,7 @@ cifs_init_request_bufs(void)
efficient to alloc 1 per page off the slab compared to 17K (5page)
alloc of large cifs buffers even when page debugging is on */
cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
@@ -79027,7 +94418,7 @@ index cbc0f4b..230e61a 100644
NULL);
if (cifs_sm_req_cachep == NULL) {
mempool_destroy(cifs_req_poolp);
-@@ -1189,8 +1189,8 @@ init_cifs(void)
+@@ -1265,8 +1265,8 @@ init_cifs(void)
atomic_set(&bufAllocCount, 0);
atomic_set(&smBufAllocCount, 0);
#ifdef CONFIG_CIFS_STATS2
@@ -79039,10 +94430,10 @@ index cbc0f4b..230e61a 100644
atomic_set(&midCount, 0);
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
-index 2b510c5..8962775 100644
+index a25b251..b56d8c7 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
-@@ -835,35 +835,35 @@ struct cifs_tcon {
+@@ -843,35 +843,35 @@ struct cifs_tcon {
__u16 Flags; /* optional support bits */
enum statusEnum tidStatus;
#ifdef CONFIG_CIFS_STATS
@@ -79102,7 +94493,7 @@ index 2b510c5..8962775 100644
} smb2_stats;
#endif /* CONFIG_CIFS_SMB2 */
} stats;
-@@ -1213,7 +1213,7 @@ convert_delimiter(char *path, char delim)
+@@ -1221,7 +1221,7 @@ convert_delimiter(char *path, char delim)
}
#ifdef CONFIG_CIFS_STATS
@@ -79111,7 +94502,7 @@ index 2b510c5..8962775 100644
static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
unsigned int bytes)
-@@ -1580,8 +1580,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
+@@ -1588,8 +1588,8 @@ GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
/* Various Debug counters */
GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */
#ifdef CONFIG_CIFS_STATS2
@@ -79123,9 +94514,18 @@ index 2b510c5..8962775 100644
GLOBAL_EXTERN atomic_t smBufAllocCount;
GLOBAL_EXTERN atomic_t midCount;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
-index 0068e82..5ee5c2c 100644
+index ff882ae..6a5c8e5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
+@@ -1372,7 +1372,7 @@ cifs_free_llist(struct list_head *llist)
+
+ int
+ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
+- unsigned int xid)
++ const unsigned int xid)
+ {
+ int rc = 0, stored_rc;
+ int types[] = {LOCKING_ANDX_LARGE_FILES,
@@ -2054,10 +2054,14 @@ static int cifs_writepages(struct address_space *mapping,
index = mapping->writeback_index; /* Start from prev offset */
end = -1;
@@ -79154,7 +94554,7 @@ index 0068e82..5ee5c2c 100644
if (!wdata->cfile->invalidHandle ||
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
-index 8442b8b..ea6986f 100644
+index 813fe13..eac10c6 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -170,7 +170,7 @@ cifs_buf_get(void)
@@ -79285,10 +94685,10 @@ index fc537c2..47d654c 100644
}
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
-index 53ccdde..3debfe6 100644
+index 3525ed7..ac8afb7 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
-@@ -422,8 +422,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
+@@ -427,8 +427,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
#ifdef CONFIG_CIFS_STATS
int i;
for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
@@ -79299,7 +94699,7 @@ index 53ccdde..3debfe6 100644
}
#endif
}
-@@ -463,65 +463,65 @@ static void
+@@ -468,65 +468,65 @@ static void
smb2_print_stats(struct seq_file *m, struct cifs_tcon *tcon)
{
#ifdef CONFIG_CIFS_STATS
@@ -79406,10 +94806,10 @@ index 53ccdde..3debfe6 100644
}
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
-index 373b5cd..b231fe6 100644
+index 42e1f44..017e7f6 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
-@@ -2390,8 +2390,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
+@@ -2388,8 +2388,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
default:
cifs_dbg(VFS, "info level %u isn't supported\n",
srch_inf->info_level);
@@ -79467,8 +94867,34 @@ index 5bb630a..043dc70 100644
spin_unlock(&cii->c_lock);
return hit;
+diff --git a/fs/coda/dir.c b/fs/coda/dir.c
+index 42e731b..2f87bc5 100644
+--- a/fs/coda/dir.c
++++ b/fs/coda/dir.c
+@@ -29,11 +29,10 @@
+ #include "coda_int.h"
+
+ /* same as fs/bad_inode.c */
+-static int coda_return_EIO(void)
++static int coda_mknod(struct inode *inode, struct dentry *dentry, umode_t mode, dev_t dev)
+ {
+ return -EIO;
+ }
+-#define CODA_EIO_ERROR ((void *) (coda_return_EIO))
+
+ /* inode operations for directories */
+ /* access routines: lookup, readlink, permission */
+@@ -562,7 +561,7 @@ const struct inode_operations coda_dir_inode_operations = {
+ .symlink = coda_symlink,
+ .mkdir = coda_mkdir,
+ .rmdir = coda_rmdir,
+- .mknod = CODA_EIO_ERROR,
++ .mknod = coda_mknod,
+ .rename = coda_rename,
+ .permission = coda_permission,
+ .getattr = coda_getattr,
diff --git a/fs/compat.c b/fs/compat.c
-index 6fd272d..39582b6 100644
+index a71936a..1659c19 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -54,7 +54,7 @@
@@ -79498,7 +94924,7 @@ index 6fd272d..39582b6 100644
goto out;
if (nr_segs > fast_segs) {
ret = -ENOMEM;
-@@ -844,6 +844,7 @@ struct compat_old_linux_dirent {
+@@ -843,6 +843,7 @@ struct compat_old_linux_dirent {
struct compat_readdir_callback {
struct dir_context ctx;
struct compat_old_linux_dirent __user *dirent;
@@ -79506,7 +94932,7 @@ index 6fd272d..39582b6 100644
int result;
};
-@@ -863,6 +864,10 @@ static int compat_fillonedir(struct dir_context *ctx, const char *name,
+@@ -862,6 +863,10 @@ static int compat_fillonedir(struct dir_context *ctx, const char *name,
buf->result = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -79517,7 +94943,7 @@ index 6fd272d..39582b6 100644
buf->result++;
dirent = buf->dirent;
if (!access_ok(VERIFY_WRITE, dirent,
-@@ -894,6 +899,7 @@ COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
+@@ -893,6 +898,7 @@ COMPAT_SYSCALL_DEFINE3(old_readdir, unsigned int, fd,
if (!f.file)
return -EBADF;
@@ -79525,7 +94951,7 @@ index 6fd272d..39582b6 100644
error = iterate_dir(f.file, &buf.ctx);
if (buf.result)
error = buf.result;
-@@ -913,6 +919,7 @@ struct compat_getdents_callback {
+@@ -912,6 +918,7 @@ struct compat_getdents_callback {
struct dir_context ctx;
struct compat_linux_dirent __user *current_dir;
struct compat_linux_dirent __user *previous;
@@ -79533,7 +94959,7 @@ index 6fd272d..39582b6 100644
int count;
int error;
};
-@@ -935,6 +942,10 @@ static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
+@@ -934,6 +941,10 @@ static int compat_filldir(struct dir_context *ctx, const char *name, int namlen,
buf->error = -EOVERFLOW;
return -EOVERFLOW;
}
@@ -79544,7 +94970,7 @@ index 6fd272d..39582b6 100644
dirent = buf->previous;
if (dirent) {
if (__put_user(offset, &dirent->d_off))
-@@ -980,6 +991,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
+@@ -979,6 +990,7 @@ COMPAT_SYSCALL_DEFINE3(getdents, unsigned int, fd,
if (!f.file)
return -EBADF;
@@ -79552,7 +94978,7 @@ index 6fd272d..39582b6 100644
error = iterate_dir(f.file, &buf.ctx);
if (error >= 0)
error = buf.error;
-@@ -1000,6 +1012,7 @@ struct compat_getdents_callback64 {
+@@ -999,6 +1011,7 @@ struct compat_getdents_callback64 {
struct dir_context ctx;
struct linux_dirent64 __user *current_dir;
struct linux_dirent64 __user *previous;
@@ -79560,7 +94986,7 @@ index 6fd272d..39582b6 100644
int count;
int error;
};
-@@ -1018,6 +1031,10 @@ static int compat_filldir64(struct dir_context *ctx, const char *name,
+@@ -1017,6 +1030,10 @@ static int compat_filldir64(struct dir_context *ctx, const char *name,
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
return -EINVAL;
@@ -79571,7 +94997,7 @@ index 6fd272d..39582b6 100644
dirent = buf->previous;
if (dirent) {
-@@ -1067,13 +1084,13 @@ COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
+@@ -1066,13 +1083,13 @@ COMPAT_SYSCALL_DEFINE3(getdents64, unsigned int, fd,
if (!f.file)
return -EBADF;
@@ -79587,7 +95013,7 @@ index 6fd272d..39582b6 100644
error = -EFAULT;
else
error = count - buf.count;
-@@ -1328,7 +1345,7 @@ COMPAT_SYSCALL_DEFINE5(select, int, n, compat_ulong_t __user *, inp,
+@@ -1327,7 +1344,7 @@ COMPAT_SYSCALL_DEFINE5(select, int, n, compat_ulong_t __user *, inp,
}
struct compat_sel_arg_struct {
@@ -79615,386 +95041,19 @@ index 4d24d17..4f8c09e 100644
/*
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
-index dcf2653..3b9fb0c 100644
+index 6402eaf..113b3f7 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
-@@ -58,6 +58,8 @@
- #include <linux/atalk.h>
- #include <linux/gfp.h>
-
-+#include "internal.h"
-+
- #include <net/bluetooth/bluetooth.h>
- #include <net/bluetooth/hci_sock.h>
- #include <net/bluetooth/rfcomm.h>
-@@ -115,19 +117,38 @@
- #include <asm/fbio.h>
- #endif
-
--static int w_long(unsigned int fd, unsigned int cmd,
-- compat_ulong_t __user *argp)
-+#define convert_in_user(srcptr, dstptr) \
-+({ \
-+ typeof(*srcptr) val; \
-+ \
-+ get_user(val, srcptr) || put_user(val, dstptr); \
-+})
-+
-+static int do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
- {
-- mm_segment_t old_fs = get_fs();
- int err;
-- unsigned long val;
-
-- set_fs (KERNEL_DS);
-- err = sys_ioctl(fd, cmd, (unsigned long)&val);
-- set_fs (old_fs);
-- if (!err && put_user(val, argp))
-+ err = security_file_ioctl(file, cmd, arg);
-+ if (err)
-+ return err;
-+
-+ return vfs_ioctl(file, cmd, arg);
-+}
-+
-+static int w_long(struct file *file,
-+ unsigned int cmd, compat_ulong_t __user *argp)
-+{
-+ int err;
-+ unsigned long __user *valp = compat_alloc_user_space(sizeof(*valp));
-+
-+ if (valp == NULL)
-+ return -EFAULT;
-+ err = do_ioctl(file, cmd, (unsigned long)valp);
-+ if (err)
-+ return err;
-+ if (convert_in_user(valp, argp))
- return -EFAULT;
-- return err;
-+ return 0;
- }
-
- struct compat_video_event {
-@@ -139,23 +160,23 @@ struct compat_video_event {
- } u;
- };
-
--static int do_video_get_event(unsigned int fd, unsigned int cmd,
-- struct compat_video_event __user *up)
-+static int do_video_get_event(struct file *file,
-+ unsigned int cmd, struct compat_video_event __user *up)
- {
-- struct video_event kevent;
-- mm_segment_t old_fs = get_fs();
-+ struct video_event __user *kevent =
-+ compat_alloc_user_space(sizeof(*kevent));
- int err;
-
-- set_fs(KERNEL_DS);
-- err = sys_ioctl(fd, cmd, (unsigned long) &kevent);
-- set_fs(old_fs);
-+ if (kevent == NULL)
-+ return -EFAULT;
-
-+ err = do_ioctl(file, cmd, (unsigned long)kevent);
- if (!err) {
-- err = put_user(kevent.type, &up->type);
-- err |= put_user(kevent.timestamp, &up->timestamp);
-- err |= put_user(kevent.u.size.w, &up->u.size.w);
-- err |= put_user(kevent.u.size.h, &up->u.size.h);
-- err |= put_user(kevent.u.size.aspect_ratio,
-+ err = convert_in_user(&kevent->type, &up->type);
-+ err |= convert_in_user(&kevent->timestamp, &up->timestamp);
-+ err |= convert_in_user(&kevent->u.size.w, &up->u.size.w);
-+ err |= convert_in_user(&kevent->u.size.h, &up->u.size.h);
-+ err |= convert_in_user(&kevent->u.size.aspect_ratio,
- &up->u.size.aspect_ratio);
- if (err)
- err = -EFAULT;
-@@ -169,8 +190,8 @@ struct compat_video_still_picture {
- int32_t size;
- };
-
--static int do_video_stillpicture(unsigned int fd, unsigned int cmd,
-- struct compat_video_still_picture __user *up)
-+static int do_video_stillpicture(struct file *file,
-+ unsigned int cmd, struct compat_video_still_picture __user *up)
- {
- struct video_still_picture __user *up_native;
- compat_uptr_t fp;
-@@ -190,7 +211,7 @@ static int do_video_stillpicture(unsigned int fd, unsigned int cmd,
- if (err)
- return -EFAULT;
-
-- err = sys_ioctl(fd, cmd, (unsigned long) up_native);
-+ err = do_ioctl(file, cmd, (unsigned long) up_native);
-
- return err;
- }
-@@ -200,8 +221,8 @@ struct compat_video_spu_palette {
- compat_uptr_t palette;
- };
-
--static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd,
-- struct compat_video_spu_palette __user *up)
-+static int do_video_set_spu_palette(struct file *file,
-+ unsigned int cmd, struct compat_video_spu_palette __user *up)
- {
- struct video_spu_palette __user *up_native;
- compat_uptr_t palp;
-@@ -218,7 +239,7 @@ static int do_video_set_spu_palette(unsigned int fd, unsigned int cmd,
- if (err)
- return -EFAULT;
-
-- err = sys_ioctl(fd, cmd, (unsigned long) up_native);
-+ err = do_ioctl(file, cmd, (unsigned long) up_native);
-
- return err;
- }
-@@ -276,7 +297,7 @@ static int sg_build_iovec(sg_io_hdr_t __user *sgio, void __user *dxferp, u16 iov
- return 0;
- }
-
--static int sg_ioctl_trans(unsigned int fd, unsigned int cmd,
-+static int sg_ioctl_trans(struct file *file, unsigned int cmd,
- sg_io_hdr32_t __user *sgio32)
- {
- sg_io_hdr_t __user *sgio;
-@@ -289,7 +310,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd,
- if (get_user(interface_id, &sgio32->interface_id))
- return -EFAULT;
- if (interface_id != 'S')
-- return sys_ioctl(fd, cmd, (unsigned long)sgio32);
-+ return do_ioctl(file, cmd, (unsigned long)sgio32);
-
- if (get_user(iovec_count, &sgio32->iovec_count))
- return -EFAULT;
-@@ -349,7 +370,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd,
- if (put_user(compat_ptr(data), &sgio->usr_ptr))
- return -EFAULT;
-
-- err = sys_ioctl(fd, cmd, (unsigned long) sgio);
-+ err = do_ioctl(file, cmd, (unsigned long) sgio);
-
- if (err >= 0) {
- void __user *datap;
-@@ -380,13 +401,13 @@ struct compat_sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
- int unused;
- };
-
--static int sg_grt_trans(unsigned int fd, unsigned int cmd, struct
-- compat_sg_req_info __user *o)
-+static int sg_grt_trans(struct file *file,
-+ unsigned int cmd, struct compat_sg_req_info __user *o)
- {
- int err, i;
- sg_req_info_t __user *r;
- r = compat_alloc_user_space(sizeof(sg_req_info_t)*SG_MAX_QUEUE);
-- err = sys_ioctl(fd,cmd,(unsigned long)r);
-+ err = do_ioctl(file, cmd, (unsigned long)r);
- if (err < 0)
- return err;
- for (i = 0; i < SG_MAX_QUEUE; i++) {
-@@ -412,8 +433,8 @@ struct sock_fprog32 {
- #define PPPIOCSPASS32 _IOW('t', 71, struct sock_fprog32)
- #define PPPIOCSACTIVE32 _IOW('t', 70, struct sock_fprog32)
-
--static int ppp_sock_fprog_ioctl_trans(unsigned int fd, unsigned int cmd,
-- struct sock_fprog32 __user *u_fprog32)
-+static int ppp_sock_fprog_ioctl_trans(struct file *file,
-+ unsigned int cmd, struct sock_fprog32 __user *u_fprog32)
- {
- struct sock_fprog __user *u_fprog64 = compat_alloc_user_space(sizeof(struct sock_fprog));
- void __user *fptr64;
-@@ -435,7 +456,7 @@ static int ppp_sock_fprog_ioctl_trans(unsigned int fd, unsigned int cmd,
- else
- cmd = PPPIOCSACTIVE;
-
-- return sys_ioctl(fd, cmd, (unsigned long) u_fprog64);
-+ return do_ioctl(file, cmd, (unsigned long) u_fprog64);
- }
-
- struct ppp_option_data32 {
-@@ -451,7 +472,7 @@ struct ppp_idle32 {
- };
- #define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32)
-
--static int ppp_gidle(unsigned int fd, unsigned int cmd,
-+static int ppp_gidle(struct file *file, unsigned int cmd,
- struct ppp_idle32 __user *idle32)
- {
- struct ppp_idle __user *idle;
-@@ -460,7 +481,7 @@ static int ppp_gidle(unsigned int fd, unsigned int cmd,
-
- idle = compat_alloc_user_space(sizeof(*idle));
-
-- err = sys_ioctl(fd, PPPIOCGIDLE, (unsigned long) idle);
-+ err = do_ioctl(file, PPPIOCGIDLE, (unsigned long) idle);
-
- if (!err) {
- if (get_user(xmit, &idle->xmit_idle) ||
-@@ -472,7 +493,7 @@ static int ppp_gidle(unsigned int fd, unsigned int cmd,
- return err;
- }
-
--static int ppp_scompress(unsigned int fd, unsigned int cmd,
-+static int ppp_scompress(struct file *file, unsigned int cmd,
- struct ppp_option_data32 __user *odata32)
- {
- struct ppp_option_data __user *odata;
-@@ -492,7 +513,7 @@ static int ppp_scompress(unsigned int fd, unsigned int cmd,
- sizeof(__u32) + sizeof(int)))
- return -EFAULT;
-
-- return sys_ioctl(fd, PPPIOCSCOMPRESS, (unsigned long) odata);
-+ return do_ioctl(file, PPPIOCSCOMPRESS, (unsigned long) odata);
- }
-
- #ifdef CONFIG_BLOCK
-@@ -512,12 +533,13 @@ struct mtpos32 {
- };
- #define MTIOCPOS32 _IOR('m', 3, struct mtpos32)
-
--static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, void __user *argp)
-+static int mt_ioctl_trans(struct file *file,
-+ unsigned int cmd, void __user *argp)
- {
-- mm_segment_t old_fs = get_fs();
-- struct mtget get;
-+ /* NULL initialization to make gcc shut up */
-+ struct mtget __user *get = NULL;
- struct mtget32 __user *umget32;
-- struct mtpos pos;
-+ struct mtpos __user *pos = NULL;
- struct mtpos32 __user *upos32;
- unsigned long kcmd;
- void *karg;
-@@ -526,32 +548,34 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, void __user *argp)
- switch(cmd) {
- case MTIOCPOS32:
- kcmd = MTIOCPOS;
-- karg = &pos;
-+ pos = compat_alloc_user_space(sizeof(*pos));
-+ karg = pos;
- break;
- default: /* MTIOCGET32 */
- kcmd = MTIOCGET;
-- karg = &get;
-+ get = compat_alloc_user_space(sizeof(*get));
-+ karg = get;
- break;
- }
-- set_fs (KERNEL_DS);
-- err = sys_ioctl (fd, kcmd, (unsigned long)karg);
-- set_fs (old_fs);
-+ if (karg == NULL)
-+ return -EFAULT;
-+ err = do_ioctl(file, kcmd, (unsigned long)karg);
- if (err)
- return err;
- switch (cmd) {
- case MTIOCPOS32:
- upos32 = argp;
-- err = __put_user(pos.mt_blkno, &upos32->mt_blkno);
-+ err = convert_in_user(&pos->mt_blkno, &upos32->mt_blkno);
- break;
- case MTIOCGET32:
- umget32 = argp;
-- err = __put_user(get.mt_type, &umget32->mt_type);
-- err |= __put_user(get.mt_resid, &umget32->mt_resid);
-- err |= __put_user(get.mt_dsreg, &umget32->mt_dsreg);
-- err |= __put_user(get.mt_gstat, &umget32->mt_gstat);
-- err |= __put_user(get.mt_erreg, &umget32->mt_erreg);
-- err |= __put_user(get.mt_fileno, &umget32->mt_fileno);
-- err |= __put_user(get.mt_blkno, &umget32->mt_blkno);
-+ err = convert_in_user(&get->mt_type, &umget32->mt_type);
-+ err |= convert_in_user(&get->mt_resid, &umget32->mt_resid);
-+ err |= convert_in_user(&get->mt_dsreg, &umget32->mt_dsreg);
-+ err |= convert_in_user(&get->mt_gstat, &umget32->mt_gstat);
-+ err |= convert_in_user(&get->mt_erreg, &umget32->mt_erreg);
-+ err |= convert_in_user(&get->mt_fileno, &umget32->mt_fileno);
-+ err |= convert_in_user(&get->mt_blkno, &umget32->mt_blkno);
- break;
- }
- return err ? -EFAULT: 0;
-@@ -605,42 +629,41 @@ struct serial_struct32 {
- compat_int_t reserved[1];
- };
-
--static int serial_struct_ioctl(unsigned fd, unsigned cmd,
-- struct serial_struct32 __user *ss32)
-+static int serial_struct_ioctl(struct file *file,
-+ unsigned cmd, struct serial_struct32 __user *ss32)
- {
- typedef struct serial_struct32 SS32;
- int err;
-- struct serial_struct ss;
-- mm_segment_t oldseg = get_fs();
-+ struct serial_struct __user *ss = compat_alloc_user_space(sizeof(*ss));
- __u32 udata;
- unsigned int base;
-+ unsigned char *iomem_base;
-
-+ if (ss == NULL)
-+ return -EFAULT;
- if (cmd == TIOCSSERIAL) {
-- if (!access_ok(VERIFY_READ, ss32, sizeof(SS32)))
-- return -EFAULT;
-- if (__copy_from_user(&ss, ss32, offsetof(SS32, iomem_base)))
-+ if (copy_in_user(ss, ss32, offsetof(SS32, iomem_base)) ||
-+ get_user(udata, &ss32->iomem_base))
- return -EFAULT;
-- if (__get_user(udata, &ss32->iomem_base))
-+ iomem_base = compat_ptr(udata);
-+ if (put_user(iomem_base, &ss->iomem_base) ||
-+ convert_in_user(&ss32->iomem_reg_shift,
-+ &ss->iomem_reg_shift) ||
-+ convert_in_user(&ss32->port_high, &ss->port_high) ||
-+ put_user(0UL, &ss->iomap_base))
- return -EFAULT;
-- ss.iomem_base = compat_ptr(udata);
-- if (__get_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift) ||
-- __get_user(ss.port_high, &ss32->port_high))
-- return -EFAULT;
-- ss.iomap_base = 0UL;
- }
-- set_fs(KERNEL_DS);
-- err = sys_ioctl(fd,cmd,(unsigned long)(&ss));
-- set_fs(oldseg);
-+ err = do_ioctl(file, cmd, (unsigned long)ss);
- if (cmd == TIOCGSERIAL && err >= 0) {
-- if (!access_ok(VERIFY_WRITE, ss32, sizeof(SS32)))
-- return -EFAULT;
-- if (__copy_to_user(ss32,&ss,offsetof(SS32,iomem_base)))
-+ if (copy_in_user(ss32, ss, offsetof(SS32, iomem_base)) ||
-+ get_user(iomem_base, &ss->iomem_base))
- return -EFAULT;
-- base = (unsigned long)ss.iomem_base >> 32 ?
-- 0xffffffff : (unsigned)(unsigned long)ss.iomem_base;
-- if (__put_user(base, &ss32->iomem_base) ||
-- __put_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift) ||
-- __put_user(ss.port_high, &ss32->port_high))
-+ base = (unsigned long)iomem_base >> 32 ?
-+ 0xffffffff : (unsigned)(unsigned long)iomem_base;
-+ if (put_user(base, &ss32->iomem_base) ||
-+ convert_in_user(&ss->iomem_reg_shift,
-+ &ss32->iomem_reg_shift) ||
-+ convert_in_user(&ss->port_high, &ss32->port_high))
+@@ -645,7 +645,7 @@ static int serial_struct_ioctl(struct file *file,
+ if (copy_in_user(ss, ss32, offsetof(SS32, iomem_base)) ||
+ get_user(udata, &ss32->iomem_base))
return -EFAULT;
- }
- return err;
-@@ -674,8 +697,8 @@ struct i2c_rdwr_aligned {
- struct i2c_msg msgs[0];
- };
-
--static int do_i2c_rdwr_ioctl(unsigned int fd, unsigned int cmd,
-- struct i2c_rdwr_ioctl_data32 __user *udata)
-+static int do_i2c_rdwr_ioctl(struct file *file,
-+ unsigned int cmd, struct i2c_rdwr_ioctl_data32 __user *udata)
- {
- struct i2c_rdwr_aligned __user *tdata;
- struct i2c_msg __user *tmsgs;
-@@ -704,15 +727,15 @@ static int do_i2c_rdwr_ioctl(unsigned int fd, unsigned int cmd,
+- iomem_base = compat_ptr(udata);
++ iomem_base = (unsigned char __force_kernel *)compat_ptr(udata);
+ if (put_user(iomem_base, &ss->iomem_base) ||
+ convert_in_user(&ss32->iomem_reg_shift,
+ &ss->iomem_reg_shift) ||
+@@ -727,8 +727,8 @@ static int do_i2c_rdwr_ioctl(struct file *file,
for (i = 0; i < nmsgs; i++) {
if (copy_in_user(&tmsgs[i].addr, &umsgs[i].addr, 3*sizeof(u16)))
return -EFAULT;
@@ -80004,67 +95063,8 @@ index dcf2653..3b9fb0c 100644
+ put_user(compat_ptr(datap), (u8 __user * __user *)&tmsgs[i].buf))
return -EFAULT;
}
-- return sys_ioctl(fd, cmd, (unsigned long)tdata);
-+ return do_ioctl(file, cmd, (unsigned long)tdata);
- }
-
--static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd,
-- struct i2c_smbus_ioctl_data32 __user *udata)
-+static int do_i2c_smbus_ioctl(struct file *file,
-+ unsigned int cmd, struct i2c_smbus_ioctl_data32 __user *udata)
- {
- struct i2c_smbus_ioctl_data __user *tdata;
- compat_caddr_t datap;
-@@ -734,7 +757,7 @@ static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd,
- __put_user(compat_ptr(datap), &tdata->data))
- return -EFAULT;
-
-- return sys_ioctl(fd, cmd, (unsigned long)tdata);
-+ return do_ioctl(file, cmd, (unsigned long)tdata);
- }
-
- #define RTC_IRQP_READ32 _IOR('p', 0x0b, compat_ulong_t)
-@@ -742,29 +765,27 @@ static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd,
- #define RTC_EPOCH_READ32 _IOR('p', 0x0d, compat_ulong_t)
- #define RTC_EPOCH_SET32 _IOW('p', 0x0e, compat_ulong_t)
-
--static int rtc_ioctl(unsigned fd, unsigned cmd, void __user *argp)
-+static int rtc_ioctl(struct file *file,
-+ unsigned cmd, void __user *argp)
- {
-- mm_segment_t oldfs = get_fs();
-- compat_ulong_t val32;
-- unsigned long kval;
-+ unsigned long __user *valp = compat_alloc_user_space(sizeof(*valp));
- int ret;
-
-+ if (valp == NULL)
-+ return -EFAULT;
- switch (cmd) {
- case RTC_IRQP_READ32:
- case RTC_EPOCH_READ32:
-- set_fs(KERNEL_DS);
-- ret = sys_ioctl(fd, (cmd == RTC_IRQP_READ32) ?
-+ ret = do_ioctl(file, (cmd == RTC_IRQP_READ32) ?
- RTC_IRQP_READ : RTC_EPOCH_READ,
-- (unsigned long)&kval);
-- set_fs(oldfs);
-+ (unsigned long)valp);
- if (ret)
- return ret;
-- val32 = kval;
-- return put_user(val32, (unsigned int __user *)argp);
-+ return convert_in_user(valp, (unsigned int __user *)argp);
- case RTC_IRQP_SET32:
-- return sys_ioctl(fd, RTC_IRQP_SET, (unsigned long)argp);
-+ return do_ioctl(file, RTC_IRQP_SET, (unsigned long)argp);
- case RTC_EPOCH_SET32:
-- return sys_ioctl(fd, RTC_EPOCH_SET, (unsigned long)argp);
-+ return do_ioctl(file, RTC_EPOCH_SET, (unsigned long)argp);
- }
-
- return -ENOIOCTLCMD;
-@@ -798,7 +819,7 @@ static int compat_ioctl_preallocate(struct file *file,
+ return do_ioctl(file, cmd, (unsigned long)tdata);
+@@ -819,7 +819,7 @@ static int compat_ioctl_preallocate(struct file *file,
copy_in_user(&p->l_len, &p32->l_len, sizeof(s64)) ||
copy_in_user(&p->l_sysid, &p32->l_sysid, sizeof(s32)) ||
copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) ||
@@ -80073,94 +95073,7 @@ index dcf2653..3b9fb0c 100644
return -EFAULT;
return ioctl_preallocate(file, p);
-@@ -1436,53 +1457,53 @@ IGNORE_IOCTL(FBIOGCURSOR32)
- * a compat_ioctl operation in the place that handleѕ the
- * ioctl for the native case.
- */
--static long do_ioctl_trans(int fd, unsigned int cmd,
-+static long do_ioctl_trans(unsigned int cmd,
- unsigned long arg, struct file *file)
- {
- void __user *argp = compat_ptr(arg);
-
- switch (cmd) {
- case PPPIOCGIDLE32:
-- return ppp_gidle(fd, cmd, argp);
-+ return ppp_gidle(file, cmd, argp);
- case PPPIOCSCOMPRESS32:
-- return ppp_scompress(fd, cmd, argp);
-+ return ppp_scompress(file, cmd, argp);
- case PPPIOCSPASS32:
- case PPPIOCSACTIVE32:
-- return ppp_sock_fprog_ioctl_trans(fd, cmd, argp);
-+ return ppp_sock_fprog_ioctl_trans(file, cmd, argp);
- #ifdef CONFIG_BLOCK
- case SG_IO:
-- return sg_ioctl_trans(fd, cmd, argp);
-+ return sg_ioctl_trans(file, cmd, argp);
- case SG_GET_REQUEST_TABLE:
-- return sg_grt_trans(fd, cmd, argp);
-+ return sg_grt_trans(file, cmd, argp);
- case MTIOCGET32:
- case MTIOCPOS32:
-- return mt_ioctl_trans(fd, cmd, argp);
-+ return mt_ioctl_trans(file, cmd, argp);
- #endif
- /* Serial */
- case TIOCGSERIAL:
- case TIOCSSERIAL:
-- return serial_struct_ioctl(fd, cmd, argp);
-+ return serial_struct_ioctl(file, cmd, argp);
- /* i2c */
- case I2C_FUNCS:
-- return w_long(fd, cmd, argp);
-+ return w_long(file, cmd, argp);
- case I2C_RDWR:
-- return do_i2c_rdwr_ioctl(fd, cmd, argp);
-+ return do_i2c_rdwr_ioctl(file, cmd, argp);
- case I2C_SMBUS:
-- return do_i2c_smbus_ioctl(fd, cmd, argp);
-+ return do_i2c_smbus_ioctl(file, cmd, argp);
- /* Not implemented in the native kernel */
- case RTC_IRQP_READ32:
- case RTC_IRQP_SET32:
- case RTC_EPOCH_READ32:
- case RTC_EPOCH_SET32:
-- return rtc_ioctl(fd, cmd, argp);
-+ return rtc_ioctl(file, cmd, argp);
-
- /* dvb */
- case VIDEO_GET_EVENT:
-- return do_video_get_event(fd, cmd, argp);
-+ return do_video_get_event(file, cmd, argp);
- case VIDEO_STILLPICTURE:
-- return do_video_stillpicture(fd, cmd, argp);
-+ return do_video_stillpicture(file, cmd, argp);
- case VIDEO_SET_SPU_PALETTE:
-- return do_video_set_spu_palette(fd, cmd, argp);
-+ return do_video_set_spu_palette(file, cmd, argp);
- }
-
- /*
-@@ -1513,7 +1534,7 @@ static long do_ioctl_trans(int fd, unsigned int cmd,
- case NBD_SET_BLKSIZE:
- case NBD_SET_SIZE:
- case NBD_SET_SIZE_BLOCKS:
-- return do_vfs_ioctl(file, fd, cmd, arg);
-+ return vfs_ioctl(file, cmd, arg);
- }
-
- return -ENOIOCTLCMD;
-@@ -1602,7 +1623,7 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
- if (compat_ioctl_check_table(XFORM(cmd)))
- goto found_handler;
-
-- error = do_ioctl_trans(fd, cmd, arg, f.file);
-+ error = do_ioctl_trans(cmd, arg, f.file);
- if (error == -ENOIOCTLCMD)
- error = -ENOTTY;
-
-@@ -1621,8 +1642,8 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
+@@ -1639,8 +1639,8 @@ COMPAT_SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd,
static int __init init_sys32_ioctl_cmp(const void *p, const void *q)
{
unsigned int a, b;
@@ -80172,10 +95085,10 @@ index dcf2653..3b9fb0c 100644
return 1;
if (a < b)
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
-index a7a1b21..023d87a 100644
+index f419519..c00b5b1 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
-@@ -1540,7 +1540,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
+@@ -1648,7 +1648,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
}
for (p = q->next; p != &parent_sd->s_children; p = p->next) {
struct configfs_dirent *next;
@@ -80185,7 +95098,7 @@ index a7a1b21..023d87a 100644
int len;
struct inode *inode = NULL;
-@@ -1549,7 +1550,12 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
+@@ -1657,7 +1658,12 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx)
continue;
name = configfs_get_name(next);
@@ -80200,10 +95113,10 @@ index a7a1b21..023d87a 100644
/*
* We'll have a dentry and an inode for
diff --git a/fs/coredump.c b/fs/coredump.c
-index dfc87c5..9e773ba 100644
+index 47c32c3..dc0e594 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
-@@ -459,8 +459,8 @@ static void wait_for_dump_helpers(struct file *file)
+@@ -481,8 +481,8 @@ static void wait_for_dump_helpers(struct file *file)
struct pipe_inode_info *pipe = file->private_data;
pipe_lock(pipe);
@@ -80214,7 +95127,7 @@ index dfc87c5..9e773ba 100644
wake_up_interruptible_sync(&pipe->wait);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
pipe_unlock(pipe);
-@@ -469,11 +469,11 @@ static void wait_for_dump_helpers(struct file *file)
+@@ -491,11 +491,11 @@ static void wait_for_dump_helpers(struct file *file)
* We actually want wait_event_freezable() but then we need
* to clear TIF_SIGPENDING and improve dump_interrupted().
*/
@@ -80229,7 +95142,7 @@ index dfc87c5..9e773ba 100644
pipe_unlock(pipe);
}
-@@ -520,7 +520,9 @@ void do_coredump(const siginfo_t *siginfo)
+@@ -542,7 +542,9 @@ void do_coredump(const siginfo_t *siginfo)
/* require nonrelative corefile path and be extra careful */
bool need_suid_safe = false;
bool core_dumped = false;
@@ -80240,7 +95153,7 @@ index dfc87c5..9e773ba 100644
struct coredump_params cprm = {
.siginfo = siginfo,
.regs = signal_pt_regs(),
-@@ -533,12 +535,17 @@ void do_coredump(const siginfo_t *siginfo)
+@@ -555,12 +557,17 @@ void do_coredump(const siginfo_t *siginfo)
.mm_flags = mm->flags,
};
@@ -80260,7 +95173,7 @@ index dfc87c5..9e773ba 100644
goto fail;
cred = prepare_creds();
-@@ -556,7 +563,7 @@ void do_coredump(const siginfo_t *siginfo)
+@@ -578,7 +585,7 @@ void do_coredump(const siginfo_t *siginfo)
need_suid_safe = true;
}
@@ -80269,7 +95182,7 @@ index dfc87c5..9e773ba 100644
if (retval < 0)
goto fail_creds;
-@@ -599,7 +606,7 @@ void do_coredump(const siginfo_t *siginfo)
+@@ -621,7 +628,7 @@ void do_coredump(const siginfo_t *siginfo)
}
cprm.limit = RLIM_INFINITY;
@@ -80278,7 +95191,7 @@ index dfc87c5..9e773ba 100644
if (core_pipe_limit && (core_pipe_limit < dump_count)) {
printk(KERN_WARNING "Pid %d(%s) over core_pipe_limit\n",
task_tgid_vnr(current), current->comm);
-@@ -633,6 +640,8 @@ void do_coredump(const siginfo_t *siginfo)
+@@ -655,6 +662,8 @@ void do_coredump(const siginfo_t *siginfo)
int open_flags = O_CREAT | O_RDWR | O_NOFOLLOW |
O_LARGEFILE | O_EXCL;
@@ -80287,7 +95200,7 @@ index dfc87c5..9e773ba 100644
if (cprm.limit < binfmt->min_coredump)
goto fail_unlock;
-@@ -658,7 +667,7 @@ void do_coredump(const siginfo_t *siginfo)
+@@ -680,7 +689,7 @@ void do_coredump(const siginfo_t *siginfo)
* If it doesn't exist, that's fine. If there's some
* other problem, we'll catch it at the filp_open().
*/
@@ -80296,7 +95209,7 @@ index dfc87c5..9e773ba 100644
set_fs(old_fs);
}
-@@ -739,7 +748,7 @@ close_fail:
+@@ -761,7 +770,7 @@ close_fail:
filp_close(cprm.file, NULL);
fail_dropcount:
if (ispipe)
@@ -80305,7 +95218,7 @@ index dfc87c5..9e773ba 100644
fail_unlock:
kfree(cn.corename);
coredump_finish(mm, core_dumped);
-@@ -760,6 +769,8 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
+@@ -782,6 +791,8 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
struct file *file = cprm->file;
loff_t pos = file->f_pos;
ssize_t n;
@@ -80315,7 +95228,7 @@ index dfc87c5..9e773ba 100644
return 0;
while (nr) {
diff --git a/fs/dcache.c b/fs/dcache.c
-index 18effa3..58ad60d 100644
+index 7566b26..660a3cc 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -328,8 +328,9 @@ static inline void dentry_rcuwalk_invalidate(struct dentry *dentry)
@@ -80500,12 +95413,12 @@ index 18effa3..58ad60d 100644
dentry->d_iname[DNAME_INLINE_LEN-1] = 0;
if (name->len > DNAME_INLINE_LEN-1) {
size_t size = offsetof(struct external_name, name[1]);
-- struct external_name *p = kmalloc(size + name->len, GFP_KERNEL);
-+ struct external_name *p = kmalloc(round_up(size + name->len, sizeof(unsigned long)), GFP_KERNEL);
+- struct external_name *p = kmalloc(size + name->len,
++ struct external_name *p = kmalloc(round_up(size + name->len, sizeof(unsigned long)),
+ GFP_KERNEL_ACCOUNT);
if (!p) {
kmem_cache_free(dentry_cache, dentry);
- return NULL;
-@@ -1583,7 +1586,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
+@@ -1584,7 +1587,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
smp_wmb();
dentry->d_name.name = dname;
@@ -80514,7 +95427,7 @@ index 18effa3..58ad60d 100644
dentry->d_flags = 0;
spin_lock_init(&dentry->d_lock);
seqcount_init(&dentry->d_seq);
-@@ -1592,6 +1595,9 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
+@@ -1593,6 +1596,9 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
dentry->d_sb = sb;
dentry->d_op = NULL;
dentry->d_fsdata = NULL;
@@ -80524,7 +95437,7 @@ index 18effa3..58ad60d 100644
INIT_HLIST_BL_NODE(&dentry->d_hash);
INIT_LIST_HEAD(&dentry->d_lru);
INIT_LIST_HEAD(&dentry->d_subdirs);
-@@ -2320,7 +2326,7 @@ struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
+@@ -2321,7 +2327,7 @@ struct dentry *__d_lookup(const struct dentry *parent, const struct qstr *name)
goto next;
}
@@ -80533,7 +95446,7 @@ index 18effa3..58ad60d 100644
found = dentry;
spin_unlock(&dentry->d_lock);
break;
-@@ -2388,7 +2394,7 @@ again:
+@@ -2389,7 +2395,7 @@ again:
spin_lock(&dentry->d_lock);
inode = dentry->d_inode;
isdir = S_ISDIR(inode->i_mode);
@@ -80542,7 +95455,7 @@ index 18effa3..58ad60d 100644
if (!spin_trylock(&inode->i_lock)) {
spin_unlock(&dentry->d_lock);
cpu_relax();
-@@ -3336,7 +3342,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
+@@ -3337,7 +3343,7 @@ static enum d_walk_ret d_genocide_kill(void *data, struct dentry *dentry)
if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
dentry->d_flags |= DCACHE_GENOCIDE;
@@ -80551,7 +95464,7 @@ index 18effa3..58ad60d 100644
}
}
return D_WALK_CONTINUE;
-@@ -3444,7 +3450,8 @@ void __init vfs_caches_init_early(void)
+@@ -3445,7 +3451,8 @@ void __init vfs_caches_init_early(void)
void __init vfs_caches_init(void)
{
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
@@ -80562,10 +95475,21 @@ index 18effa3..58ad60d 100644
dcache_init();
inode_init();
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
-index b7fcc0d..5da55c8 100644
+index bece948..e657aeb 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
-@@ -406,6 +406,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_file_size);
+@@ -247,6 +247,10 @@ static struct dentry *start_creating(const char *name, struct dentry *parent)
+ struct dentry *dentry;
+ int error;
+
++#ifdef CONFIG_GRKERNSEC_KMEM
++ return ERR_PTR(-ENODEV);
++#endif
++
+ pr_debug("debugfs: creating file '%s'\n",name);
+
+ if (IS_ERR(parent))
+@@ -406,6 +410,10 @@ EXPORT_SYMBOL_GPL(debugfs_create_file_size);
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
* returned.
*/
@@ -80576,7 +95500,7 @@ index b7fcc0d..5da55c8 100644
struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
{
struct dentry *dentry = start_creating(name, parent);
-@@ -418,7 +422,12 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
+@@ -418,7 +426,12 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
if (unlikely(!inode))
return failed_creating(dentry);
@@ -80590,11 +95514,22 @@ index b7fcc0d..5da55c8 100644
inode->i_op = &simple_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
+@@ -721,6 +734,10 @@ static int __init debugfs_init(void)
+ {
+ int retval;
+
++#ifdef CONFIG_GRKERNSEC_KMEM
++ return -ENOSYS;
++#endif
++
+ retval = sysfs_create_mount_point(kernel_kobj, "debug");
+ if (retval)
+ return retval;
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
-index e2e47ba..221b0a3 100644
+index 4e685ac..462fc20 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
-@@ -662,7 +662,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
+@@ -660,7 +660,7 @@ static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
old_fs = get_fs();
set_fs(get_ds());
rc = d_inode(lower_dentry)->i_op->readlink(lower_dentry,
@@ -80641,7 +95576,7 @@ index e4141f2..d8263e8 100644
i += packet_length_size;
if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
diff --git a/fs/exec.c b/fs/exec.c
-index b06623a..d1a8125 100644
+index dcd4ac7..b1bb7fa 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -56,8 +56,20 @@
@@ -80939,7 +95874,7 @@ index b06623a..d1a8125 100644
+ int unsafe_flags = 0;
struct open_flags open_exec_flags = {
.open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
- .acc_mode = MAY_EXEC | MAY_OPEN,
+ .acc_mode = MAY_EXEC,
@@ -786,12 +863,22 @@ static struct file *do_open_execat(int fd, struct filename *name, int flags)
if (path_noexec(&file->f_path))
goto exit;
@@ -81471,6 +96406,31 @@ index b06623a..d1a8125 100644
+}
+EXPORT_SYMBOL(report_size_overflow);
+#endif
+diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
+index 9eaf595..46a4777a 100644
+--- a/fs/exofs/inode.c
++++ b/fs/exofs/inode.c
+@@ -470,6 +470,11 @@ fail:
+ return ret;
+ }
+
++static int readpage_filler(struct file *data, struct page *page)
++{
++ return readpage_strip(data, page);
++}
++
+ static int exofs_readpages(struct file *file, struct address_space *mapping,
+ struct list_head *pages, unsigned nr_pages)
+ {
+@@ -478,7 +483,7 @@ static int exofs_readpages(struct file *file, struct address_space *mapping,
+
+ _pcol_init(&pcol, nr_pages, mapping->host);
+
+- ret = read_cache_pages(mapping, pages, readpage_strip, &pcol);
++ ret = read_cache_pages(mapping, pages, readpage_filler, &pcol);
+ if (ret) {
+ EXOFS_ERR("read_cache_pages => %d\n", ret);
+ return ret;
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 9f9992b..8b59411 100644
--- a/fs/ext2/balloc.c
@@ -81489,7 +96449,7 @@ index 9f9992b..8b59411 100644
}
return 1;
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
-index 748d35a..87114f0 100644
+index 2a18841..d2398be 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -270,10 +270,8 @@ static int ext2_show_options(struct seq_file *seq, struct dentry *root)
@@ -81516,10 +96476,10 @@ index 748d35a..87114f0 100644
#ifdef CONFIG_EXT2_FS_POSIX_ACL
if (def_mount_opts & EXT2_DEFM_ACL)
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
-index fa70848..57b36d2 100644
+index f57a7ab..b41d596 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
-@@ -247,7 +247,7 @@ ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
+@@ -245,7 +245,7 @@ ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
struct buffer_head *bh = NULL;
struct ext2_xattr_entry *entry;
char *end;
@@ -81528,8 +96488,8 @@ index fa70848..57b36d2 100644
int error;
ea_idebug(inode, "buffer=%p, buffer_size=%ld",
-@@ -304,9 +304,10 @@ bad_block: ext2_error(inode->i_sb, "ext2_xattr_list",
- buffer += size;
+@@ -307,9 +307,10 @@ bad_block: ext2_error(inode->i_sb, "ext2_xattr_list",
+ *buffer++ = 0;
}
rest -= size;
+ total_size += size;
@@ -81556,26 +96516,10 @@ index fe1f50f..3f4c870 100644
if (free_clusters >= (nclusters + dirty_clusters +
resv_clusters))
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
-index d4156e1..968858a 100644
+index b213449..39f6a05 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
-@@ -933,6 +933,15 @@ struct ext4_inode_info {
- * by other means, so we have i_data_sem.
- */
- struct rw_semaphore i_data_sem;
-+ /*
-+ * i_mmap_sem is for serializing page faults with truncate / punch hole
-+ * operations. We have to make sure that new page cannot be faulted in
-+ * a section of the inode that is being punched. We cannot easily use
-+ * i_data_sem for this since we need protection for the whole punch
-+ * operation and i_data_sem ranks below transaction start so we have
-+ * to occasionally drop it.
-+ */
-+ struct rw_semaphore i_mmap_sem;
- struct inode vfs_inode;
- struct jbd2_inode *jinode;
-
-@@ -1374,19 +1383,19 @@ struct ext4_sb_info {
+@@ -1434,19 +1434,19 @@ struct ext4_sb_info {
unsigned long s_mb_last_start;
/* stats for buddy allocator */
@@ -81605,26 +96549,8 @@ index d4156e1..968858a 100644
atomic_t s_lock_busy;
/* locality groups */
-@@ -2507,6 +2516,7 @@ extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
- extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,
- loff_t lstart, loff_t lend);
- extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf);
-+extern int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
- extern qsize_t *ext4_get_reserved_space(struct inode *inode);
- extern void ext4_da_update_reserve_space(struct inode *inode,
- int used, int quota_claim);
-@@ -2871,6 +2881,9 @@ static inline int ext4_update_inode_size(struct inode *inode, loff_t newsize)
- return changed;
- }
-
-+int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
-+ loff_t len);
-+
- struct ext4_group_info {
- unsigned long bb_state;
- struct rb_root bb_free_root;
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
-index 551353b..1c45aae 100644
+index 3753ceb..bddcd49 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -863,7 +863,7 @@ ext4_find_extent(struct inode *inode, ext4_lblk_t block,
@@ -81636,527 +96562,8 @@ index 551353b..1c45aae 100644
int ret;
eh = ext_inode_hdr(inode);
-@@ -4685,10 +4685,6 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
- if (len <= EXT_UNWRITTEN_MAX_LEN)
- flags |= EXT4_GET_BLOCKS_NO_NORMALIZE;
-
-- /* Wait all existing dio workers, newcomers will block on i_mutex */
-- ext4_inode_block_unlocked_dio(inode);
-- inode_dio_wait(inode);
--
- /*
- * credits to insert 1 extent into extent tree
- */
-@@ -4752,8 +4748,6 @@ retry:
- goto retry;
- }
-
-- ext4_inode_resume_unlocked_dio(inode);
--
- return ret > 0 ? ret2 : ret;
- }
-
-@@ -4770,7 +4764,6 @@ static long ext4_zero_range(struct file *file, loff_t offset,
- int partial_begin, partial_end;
- loff_t start, end;
- ext4_lblk_t lblk;
-- struct address_space *mapping = inode->i_mapping;
- unsigned int blkbits = inode->i_blkbits;
-
- trace_ext4_zero_range(inode, offset, len, mode);
-@@ -4786,17 +4779,6 @@ static long ext4_zero_range(struct file *file, loff_t offset,
- }
-
- /*
-- * Write out all dirty pages to avoid race conditions
-- * Then release them.
-- */
-- if (mapping->nrpages && mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
-- ret = filemap_write_and_wait_range(mapping, offset,
-- offset + len - 1);
-- if (ret)
-- return ret;
-- }
--
-- /*
- * Round up offset. This is not fallocate, we neet to zero out
- * blocks, so convert interior block aligned part of the range to
- * unwritten and possibly manually zero out unaligned parts of the
-@@ -4839,6 +4821,10 @@ static long ext4_zero_range(struct file *file, loff_t offset,
- if (mode & FALLOC_FL_KEEP_SIZE)
- flags |= EXT4_GET_BLOCKS_KEEP_SIZE;
-
-+ /* Wait all existing dio workers, newcomers will block on i_mutex */
-+ ext4_inode_block_unlocked_dio(inode);
-+ inode_dio_wait(inode);
-+
- /* Preallocate the range including the unaligned edges */
- if (partial_begin || partial_end) {
- ret = ext4_alloc_file_blocks(file,
-@@ -4847,7 +4833,7 @@ static long ext4_zero_range(struct file *file, loff_t offset,
- round_down(offset, 1 << blkbits)) >> blkbits,
- new_size, flags, mode);
- if (ret)
-- goto out_mutex;
-+ goto out_dio;
-
- }
-
-@@ -4856,16 +4842,23 @@ static long ext4_zero_range(struct file *file, loff_t offset,
- flags |= (EXT4_GET_BLOCKS_CONVERT_UNWRITTEN |
- EXT4_EX_NOCACHE);
-
-- /* Now release the pages and zero block aligned part of pages*/
-+ /*
-+ * Prevent page faults from reinstantiating pages we have
-+ * released from page cache.
-+ */
-+ down_write(&EXT4_I(inode)->i_mmap_sem);
-+ ret = ext4_update_disksize_before_punch(inode, offset, len);
-+ if (ret) {
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
-+ goto out_dio;
-+ }
-+ /* Now release the pages and zero block aligned part of pages */
- truncate_pagecache_range(inode, start, end - 1);
- inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
-
-- /* Wait all existing dio workers, newcomers will block on i_mutex */
-- ext4_inode_block_unlocked_dio(inode);
-- inode_dio_wait(inode);
--
- ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size,
- flags, mode);
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
- if (ret)
- goto out_dio;
- }
-@@ -4998,8 +4991,13 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
- goto out;
- }
-
-+ /* Wait all existing dio workers, newcomers will block on i_mutex */
-+ ext4_inode_block_unlocked_dio(inode);
-+ inode_dio_wait(inode);
-+
- ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size,
- flags, mode);
-+ ext4_inode_resume_unlocked_dio(inode);
- if (ret)
- goto out;
-
-@@ -5494,21 +5492,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
- return ret;
- }
-
-- /*
-- * Need to round down offset to be aligned with page size boundary
-- * for page size > block size.
-- */
-- ioffset = round_down(offset, PAGE_SIZE);
--
-- /* Write out all dirty pages */
-- ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
-- LLONG_MAX);
-- if (ret)
-- return ret;
--
-- /* Take mutex lock */
- mutex_lock(&inode->i_mutex);
--
- /*
- * There is no need to overlap collapse range with EOF, in which case
- * it is effectively a truncate operation
-@@ -5524,17 +5508,43 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
- goto out_mutex;
- }
-
-- truncate_pagecache(inode, ioffset);
--
- /* Wait for existing dio to complete */
- ext4_inode_block_unlocked_dio(inode);
- inode_dio_wait(inode);
-
-+ /*
-+ * Prevent page faults from reinstantiating pages we have released from
-+ * page cache.
-+ */
-+ down_write(&EXT4_I(inode)->i_mmap_sem);
-+ /*
-+ * Need to round down offset to be aligned with page size boundary
-+ * for page size > block size.
-+ */
-+ ioffset = round_down(offset, PAGE_SIZE);
-+ /*
-+ * Write tail of the last page before removed range since it will get
-+ * removed from the page cache below.
-+ */
-+ ret = filemap_write_and_wait_range(inode->i_mapping, ioffset, offset);
-+ if (ret)
-+ goto out_mmap;
-+ /*
-+ * Write data that will be shifted to preserve them when discarding
-+ * page cache below. We are also protected from pages becoming dirty
-+ * by i_mmap_sem.
-+ */
-+ ret = filemap_write_and_wait_range(inode->i_mapping, offset + len,
-+ LLONG_MAX);
-+ if (ret)
-+ goto out_mmap;
-+ truncate_pagecache(inode, ioffset);
-+
- credits = ext4_writepage_trans_blocks(inode);
- handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, credits);
- if (IS_ERR(handle)) {
- ret = PTR_ERR(handle);
-- goto out_dio;
-+ goto out_mmap;
- }
-
- down_write(&EXT4_I(inode)->i_data_sem);
-@@ -5573,7 +5583,8 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
-
- out_stop:
- ext4_journal_stop(handle);
--out_dio:
-+out_mmap:
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
- ext4_inode_resume_unlocked_dio(inode);
- out_mutex:
- mutex_unlock(&inode->i_mutex);
-@@ -5627,21 +5638,7 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
- return ret;
- }
-
-- /*
-- * Need to round down to align start offset to page size boundary
-- * for page size > block size.
-- */
-- ioffset = round_down(offset, PAGE_SIZE);
--
-- /* Write out all dirty pages */
-- ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
-- LLONG_MAX);
-- if (ret)
-- return ret;
--
-- /* Take mutex lock */
- mutex_lock(&inode->i_mutex);
--
- /* Currently just for extent based files */
- if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) {
- ret = -EOPNOTSUPP;
-@@ -5660,17 +5657,32 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
- goto out_mutex;
- }
-
-- truncate_pagecache(inode, ioffset);
--
- /* Wait for existing dio to complete */
- ext4_inode_block_unlocked_dio(inode);
- inode_dio_wait(inode);
-
-+ /*
-+ * Prevent page faults from reinstantiating pages we have released from
-+ * page cache.
-+ */
-+ down_write(&EXT4_I(inode)->i_mmap_sem);
-+ /*
-+ * Need to round down to align start offset to page size boundary
-+ * for page size > block size.
-+ */
-+ ioffset = round_down(offset, PAGE_SIZE);
-+ /* Write out all dirty pages */
-+ ret = filemap_write_and_wait_range(inode->i_mapping, ioffset,
-+ LLONG_MAX);
-+ if (ret)
-+ goto out_mmap;
-+ truncate_pagecache(inode, ioffset);
-+
- credits = ext4_writepage_trans_blocks(inode);
- handle = ext4_journal_start(inode, EXT4_HT_TRUNCATE, credits);
- if (IS_ERR(handle)) {
- ret = PTR_ERR(handle);
-- goto out_dio;
-+ goto out_mmap;
- }
-
- /* Expand file to avoid data loss if there is error while shifting */
-@@ -5741,7 +5753,8 @@ int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
-
- out_stop:
- ext4_journal_stop(handle);
--out_dio:
-+out_mmap:
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
- ext4_inode_resume_unlocked_dio(inode);
- out_mutex:
- mutex_unlock(&inode->i_mutex);
-diff --git a/fs/ext4/file.c b/fs/ext4/file.c
-index 113837e..0d24ebc 100644
---- a/fs/ext4/file.c
-+++ b/fs/ext4/file.c
-@@ -209,15 +209,18 @@ static int ext4_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
- {
- int result;
- handle_t *handle = NULL;
-- struct super_block *sb = file_inode(vma->vm_file)->i_sb;
-+ struct inode *inode = file_inode(vma->vm_file);
-+ struct super_block *sb = inode->i_sb;
- bool write = vmf->flags & FAULT_FLAG_WRITE;
-
- if (write) {
- sb_start_pagefault(sb);
- file_update_time(vma->vm_file);
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
- handle = ext4_journal_start_sb(sb, EXT4_HT_WRITE_PAGE,
- EXT4_DATA_TRANS_BLOCKS(sb));
-- }
-+ } else
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
-
- if (IS_ERR(handle))
- result = VM_FAULT_SIGBUS;
-@@ -228,8 +231,10 @@ static int ext4_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
- if (write) {
- if (!IS_ERR(handle))
- ext4_journal_stop(handle);
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
- sb_end_pagefault(sb);
-- }
-+ } else
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
-
- return result;
- }
-@@ -246,10 +251,12 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,
- if (write) {
- sb_start_pagefault(sb);
- file_update_time(vma->vm_file);
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
- handle = ext4_journal_start_sb(sb, EXT4_HT_WRITE_PAGE,
- ext4_chunk_trans_blocks(inode,
- PMD_SIZE / PAGE_SIZE));
-- }
-+ } else
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
-
- if (IS_ERR(handle))
- result = VM_FAULT_SIGBUS;
-@@ -260,30 +267,71 @@ static int ext4_dax_pmd_fault(struct vm_area_struct *vma, unsigned long addr,
- if (write) {
- if (!IS_ERR(handle))
- ext4_journal_stop(handle);
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
- sb_end_pagefault(sb);
-- }
-+ } else
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
-
- return result;
- }
-
- static int ext4_dax_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
- {
-- return dax_mkwrite(vma, vmf, ext4_get_block_dax,
-- ext4_end_io_unwritten);
-+ int err;
-+ struct inode *inode = file_inode(vma->vm_file);
-+
-+ sb_start_pagefault(inode->i_sb);
-+ file_update_time(vma->vm_file);
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
-+ err = __dax_mkwrite(vma, vmf, ext4_get_block_dax,
-+ ext4_end_io_unwritten);
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
-+ sb_end_pagefault(inode->i_sb);
-+
-+ return err;
-+}
-+
-+/*
-+ * Handle write fault for VM_MIXEDMAP mappings. Similarly to ext4_dax_mkwrite()
-+ * handler we check for races agaist truncate. Note that since we cycle through
-+ * i_mmap_sem, we are sure that also any hole punching that began before we
-+ * were called is finished by now and so if it included part of the file we
-+ * are working on, our pte will get unmapped and the check for pte_same() in
-+ * wp_pfn_shared() fails. Thus fault gets retried and things work out as
-+ * desired.
-+ */
-+static int ext4_dax_pfn_mkwrite(struct vm_area_struct *vma,
-+ struct vm_fault *vmf)
-+{
-+ struct inode *inode = file_inode(vma->vm_file);
-+ struct super_block *sb = inode->i_sb;
-+ int ret = VM_FAULT_NOPAGE;
-+ loff_t size;
-+
-+ sb_start_pagefault(sb);
-+ file_update_time(vma->vm_file);
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
-+ size = (i_size_read(inode) + PAGE_SIZE - 1) >> PAGE_SHIFT;
-+ if (vmf->pgoff >= size)
-+ ret = VM_FAULT_SIGBUS;
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
-+ sb_end_pagefault(sb);
-+
-+ return ret;
- }
-
- static const struct vm_operations_struct ext4_dax_vm_ops = {
- .fault = ext4_dax_fault,
- .pmd_fault = ext4_dax_pmd_fault,
- .page_mkwrite = ext4_dax_mkwrite,
-- .pfn_mkwrite = dax_pfn_mkwrite,
-+ .pfn_mkwrite = ext4_dax_pfn_mkwrite,
- };
- #else
- #define ext4_dax_vm_ops ext4_file_vm_ops
- #endif
-
- static const struct vm_operations_struct ext4_file_vm_ops = {
-- .fault = filemap_fault,
-+ .fault = ext4_filemap_fault,
- .map_pages = filemap_map_pages,
- .page_mkwrite = ext4_page_mkwrite,
- };
-diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
-index 06bda03..e573d11 100644
---- a/fs/ext4/inode.c
-+++ b/fs/ext4/inode.c
-@@ -3587,6 +3587,35 @@ int ext4_can_truncate(struct inode *inode)
- }
-
- /*
-+ * We have to make sure i_disksize gets properly updated before we truncate
-+ * page cache due to hole punching or zero range. Otherwise i_disksize update
-+ * can get lost as it may have been postponed to submission of writeback but
-+ * that will never happen after we truncate page cache.
-+ */
-+int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
-+ loff_t len)
-+{
-+ handle_t *handle;
-+ loff_t size = i_size_read(inode);
-+
-+ WARN_ON(!mutex_is_locked(&inode->i_mutex));
-+ if (offset > size || offset + len < size)
-+ return 0;
-+
-+ if (EXT4_I(inode)->i_disksize >= size)
-+ return 0;
-+
-+ handle = ext4_journal_start(inode, EXT4_HT_MISC, 1);
-+ if (IS_ERR(handle))
-+ return PTR_ERR(handle);
-+ ext4_update_i_disksize(inode, size);
-+ ext4_mark_inode_dirty(handle, inode);
-+ ext4_journal_stop(handle);
-+
-+ return 0;
-+}
-+
-+/*
- * ext4_punch_hole: punches a hole in a file by releaseing the blocks
- * associated with the given offset and length
- *
-@@ -3651,17 +3680,26 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
-
- }
-
-+ /* Wait all existing dio workers, newcomers will block on i_mutex */
-+ ext4_inode_block_unlocked_dio(inode);
-+ inode_dio_wait(inode);
-+
-+ /*
-+ * Prevent page faults from reinstantiating pages we have released from
-+ * page cache.
-+ */
-+ down_write(&EXT4_I(inode)->i_mmap_sem);
- first_block_offset = round_up(offset, sb->s_blocksize);
- last_block_offset = round_down((offset + length), sb->s_blocksize) - 1;
-
- /* Now release the pages and zero block aligned part of pages*/
-- if (last_block_offset > first_block_offset)
-+ if (last_block_offset > first_block_offset) {
-+ ret = ext4_update_disksize_before_punch(inode, offset, length);
-+ if (ret)
-+ goto out_dio;
- truncate_pagecache_range(inode, first_block_offset,
- last_block_offset);
--
-- /* Wait all existing dio workers, newcomers will block on i_mutex */
-- ext4_inode_block_unlocked_dio(inode);
-- inode_dio_wait(inode);
-+ }
-
- if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
- credits = ext4_writepage_trans_blocks(inode);
-@@ -3708,16 +3746,12 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
- if (IS_SYNC(inode))
- ext4_handle_sync(handle);
-
-- /* Now release the pages again to reduce race window */
-- if (last_block_offset > first_block_offset)
-- truncate_pagecache_range(inode, first_block_offset,
-- last_block_offset);
--
- inode->i_mtime = inode->i_ctime = ext4_current_time(inode);
- ext4_mark_inode_dirty(handle, inode);
- out_stop:
- ext4_journal_stop(handle);
- out_dio:
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
- ext4_inode_resume_unlocked_dio(inode);
- out_mutex:
- mutex_unlock(&inode->i_mutex);
-@@ -4851,6 +4885,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
- } else
- ext4_wait_for_tail_page_commit(inode);
- }
-+ down_write(&EXT4_I(inode)->i_mmap_sem);
- /*
- * Truncate pagecache after we've waited for commit
- * in data=journal mode to make pages freeable.
-@@ -4858,6 +4893,7 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
- truncate_pagecache(inode, inode->i_size);
- if (shrink)
- ext4_truncate(inode);
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
- }
-
- if (!rc) {
-@@ -5306,6 +5342,8 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
-
- sb_start_pagefault(inode->i_sb);
- file_update_time(vma->vm_file);
-+
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
- /* Delalloc case is easy... */
- if (test_opt(inode->i_sb, DELALLOC) &&
- !ext4_should_journal_data(inode) &&
-@@ -5375,6 +5413,19 @@ retry_alloc:
- out_ret:
- ret = block_page_mkwrite_return(ret);
- out:
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
- sb_end_pagefault(inode->i_sb);
- return ret;
- }
-+
-+int ext4_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-+{
-+ struct inode *inode = file_inode(vma->vm_file);
-+ int err;
-+
-+ down_read(&EXT4_I(inode)->i_mmap_sem);
-+ err = filemap_fault(vma, vmf);
-+ up_read(&EXT4_I(inode)->i_mmap_sem);
-+
-+ return err;
-+}
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
-index 61eaf74..01a829b 100644
+index 4424b7b..c47c8ff 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1912,7 +1912,7 @@ void ext4_mb_simple_scan_group(struct ext4_allocation_context *ac,
@@ -82315,18 +96722,10 @@ index 34038e3..322fe62 100644
err = ext4_handle_dirty_metadata(handle, NULL, bh);
if (unlikely(err))
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
-index ba1cf0b..375d641 100644
+index a76ca67..adbf949 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
-@@ -958,6 +958,7 @@ static void init_once(void *foo)
- INIT_LIST_HEAD(&ei->i_orphan);
- init_rwsem(&ei->xattr_sem);
- init_rwsem(&ei->i_data_sem);
-+ init_rwsem(&ei->i_mmap_sem);
- inode_init_once(&ei->vfs_inode);
- }
-
-@@ -1274,7 +1275,7 @@ static ext4_fsblk_t get_sb_block(void **data)
+@@ -1306,7 +1306,7 @@ static ext4_fsblk_t get_sb_block(void **data)
}
#define DEFAULT_JOURNAL_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 3))
@@ -82348,26 +96747,11 @@ index 1420a3c..e87523c 100644
static ssize_t session_write_kbytes_show(struct ext4_attr *a,
struct ext4_sb_info *sbi, char *buf)
-diff --git a/fs/ext4/truncate.h b/fs/ext4/truncate.h
-index 011ba66..c70d06a 100644
---- a/fs/ext4/truncate.h
-+++ b/fs/ext4/truncate.h
-@@ -10,8 +10,10 @@
- */
- static inline void ext4_truncate_failed_write(struct inode *inode)
- {
-+ down_write(&EXT4_I(inode)->i_mmap_sem);
- truncate_inode_pages(inode->i_mapping, inode->i_size);
- ext4_truncate(inode);
-+ up_write(&EXT4_I(inode)->i_mmap_sem);
- }
-
- /*
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
-index 6b6b3e7..0cbeeb9 100644
+index a95151e..ba59ee9 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
-@@ -398,7 +398,7 @@ static int
+@@ -396,7 +396,7 @@ static int
ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
char *buffer, size_t buffer_size)
{
@@ -82376,23 +96760,23 @@ index 6b6b3e7..0cbeeb9 100644
for (; !IS_LAST_ENTRY(entry); entry = EXT4_XATTR_NEXT(entry)) {
const struct xattr_handler *handler =
-@@ -414,9 +414,10 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
- buffer += size;
+@@ -417,9 +417,10 @@ ext4_xattr_list_entries(struct dentry *dentry, struct ext4_xattr_entry *entry,
+ *buffer++ = 0;
}
rest -= size;
+ total_size += size;
}
}
-- return buffer_size - rest;
+- return buffer_size - rest; /* total size */
+ return total_size;
}
static int
diff --git a/fs/fcntl.c b/fs/fcntl.c
-index ee85cd4..9dd0d20 100644
+index 350a2c8..9fb9bf7 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
-@@ -102,6 +102,10 @@ void __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
+@@ -103,6 +103,10 @@ void __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
{
security_file_set_fowner(filp);
@@ -82444,7 +96828,7 @@ index ca3c3dd..0c5456e 100644
retval = -EFAULT;
goto out_handle;
diff --git a/fs/file.c b/fs/file.c
-index 39f8f15..898d887 100644
+index 1fbc5c0..7cfb36d 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -16,6 +16,7 @@
@@ -82455,7 +96839,7 @@ index 39f8f15..898d887 100644
#include <linux/fdtable.h>
#include <linux/bitops.h>
#include <linux/interrupt.h>
-@@ -162,9 +163,10 @@ out:
+@@ -163,9 +164,10 @@ out:
* Return <0 error code on error; 1 on successful completion.
* The files->file_lock should be held on entry, and will be held on exit.
*/
@@ -82469,7 +96853,7 @@ index 39f8f15..898d887 100644
{
struct fdtable *new_fdt, *cur_fdt;
-@@ -207,9 +209,10 @@ static int expand_fdtable(struct files_struct *files, int nr)
+@@ -208,9 +210,10 @@ static int expand_fdtable(struct files_struct *files, int nr)
* expanded and execution may have blocked.
* The files->file_lock should be held on entry, and will be held on exit.
*/
@@ -82483,7 +96867,7 @@ index 39f8f15..898d887 100644
{
struct fdtable *fdt;
int expanded = 0;
-@@ -816,7 +819,9 @@ bool get_close_on_exec(unsigned int fd)
+@@ -817,7 +820,9 @@ bool get_close_on_exec(unsigned int fd)
static int do_dup2(struct files_struct *files,
struct file *file, unsigned fd, unsigned flags)
@@ -82494,7 +96878,7 @@ index 39f8f15..898d887 100644
{
struct file *tofree;
struct fdtable *fdt;
-@@ -866,6 +871,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
+@@ -867,6 +872,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
if (!file)
return __close_fd(files, fd);
@@ -82502,7 +96886,7 @@ index 39f8f15..898d887 100644
if (fd >= rlimit(RLIMIT_NOFILE))
return -EBADF;
-@@ -892,6 +898,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
+@@ -893,6 +899,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
if (unlikely(oldfd == newfd))
return -EINVAL;
@@ -82510,7 +96894,7 @@ index 39f8f15..898d887 100644
if (newfd >= rlimit(RLIMIT_NOFILE))
return -EBADF;
-@@ -947,6 +954,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
+@@ -948,6 +955,7 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
int f_dupfd(unsigned int from, struct file *file, unsigned flags)
{
int err;
@@ -82519,7 +96903,7 @@ index 39f8f15..898d887 100644
return -EINVAL;
err = alloc_fd(from, flags);
diff --git a/fs/filesystems.c b/fs/filesystems.c
-index 5797d45..7d7d79a 100644
+index c5618db..50c38f4 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -275,7 +275,11 @@ struct file_system_type *get_fs_type(const char *name)
@@ -82534,11 +96918,66 @@ index 5797d45..7d7d79a 100644
fs = __get_fs_type(name, len);
if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {
+diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c
+index 3e2ccad..9d5d23e 100644
+--- a/fs/freevxfs/vxfs_inode.c
++++ b/fs/freevxfs/vxfs_inode.c
+@@ -97,11 +97,11 @@ vxfs_blkiget(struct super_block *sbp, u_long extent, ino_t ino)
+
+ if (bp && buffer_mapped(bp)) {
+ struct vxfs_inode_info *vip;
+- struct vxfs_dinode *dip;
++ struct vxfs_inode_info *dip;
+
+ if (!(vip = kmem_cache_alloc(vxfs_inode_cachep, GFP_KERNEL)))
+ goto fail;
+- dip = (struct vxfs_dinode *)(bp->b_data + offset);
++ dip = (struct vxfs_inode_info *)(bp->b_data + offset);
+ memcpy(vip, dip, sizeof(*vip));
+ #ifdef DIAGNOSTIC
+ vxfs_dumpi(vip, ino);
+@@ -138,12 +138,12 @@ __vxfs_iget(ino_t ino, struct inode *ilistp)
+
+ if (!IS_ERR(pp)) {
+ struct vxfs_inode_info *vip;
+- struct vxfs_dinode *dip;
++ struct vxfs_inode_info *dip;
+ caddr_t kaddr = (char *)page_address(pp);
+
+ if (!(vip = kmem_cache_alloc(vxfs_inode_cachep, GFP_KERNEL)))
+ goto fail;
+- dip = (struct vxfs_dinode *)(kaddr + offset);
++ dip = (struct vxfs_inode_info *)(kaddr + offset);
+ memcpy(vip, dip, sizeof(*vip));
+ #ifdef DIAGNOSTIC
+ vxfs_dumpi(vip, ino);
+diff --git a/fs/freevxfs/vxfs_inode.h b/fs/freevxfs/vxfs_inode.h
+index 240aeb1..b7dad4f 100644
+--- a/fs/freevxfs/vxfs_inode.h
++++ b/fs/freevxfs/vxfs_inode.h
+@@ -96,7 +96,7 @@ struct vxfs_typed_dev4 {
+ /*
+ * The inode as contained on the physical device.
+ */
+-struct vxfs_dinode {
++struct vxfs_inode_info {
+ int32_t vdi_mode;
+ u_int32_t vdi_nlink; /* Link count */
+ u_int32_t vdi_uid; /* UID */
+@@ -152,7 +152,7 @@ struct vxfs_dinode {
+ *
+ * TBD: This should become a separate structure...
+ */
+-#define vxfs_inode_info vxfs_dinode
++//#define vxfs_inode_info vxfs_dinode
+
+ #define vii_mode vdi_mode
+ #define vii_uid vdi_uid
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
-index 60d6fc2..dffa2ca 100644
+index fee81e8..bfeb3ca 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
-@@ -882,9 +882,9 @@ fs_initcall(cgroup_writeback_init);
+@@ -880,9 +880,9 @@ fs_initcall(cgroup_writeback_init);
#else /* CONFIG_CGROUP_WRITEBACK */
static struct bdi_writeback *
@@ -82550,7 +96989,7 @@ index 60d6fc2..dffa2ca 100644
{
struct bdi_writeback *wb = inode_to_wb(inode);
-@@ -893,8 +893,8 @@ locked_inode_to_wb_and_lock_list(struct inode *inode)
+@@ -891,8 +891,8 @@ locked_inode_to_wb_and_lock_list(struct inode *inode)
return wb;
}
@@ -82560,7 +96999,7 @@ index 60d6fc2..dffa2ca 100644
{
struct bdi_writeback *wb = inode_to_wb(inode);
-@@ -1138,9 +1138,8 @@ static int write_inode(struct inode *inode, struct writeback_control *wbc)
+@@ -1136,9 +1136,8 @@ static int write_inode(struct inode *inode, struct writeback_control *wbc)
* Wait for writeback on an inode to complete. Called with i_lock held.
* Caller must make sure inode cannot go away when we drop i_lock.
*/
@@ -82571,7 +97010,7 @@ index 60d6fc2..dffa2ca 100644
{
DEFINE_WAIT_BIT(wq, &inode->i_state, __I_SYNC);
wait_queue_head_t *wqh;
-@@ -1169,8 +1168,8 @@ void inode_wait_for_writeback(struct inode *inode)
+@@ -1167,8 +1166,8 @@ void inode_wait_for_writeback(struct inode *inode)
* held and drops it. It is aimed for callers not holding any inode reference
* so once i_lock is dropped, inode can go away.
*/
@@ -84165,11 +98604,62 @@ index ebb5e37..beae05b 100644
do_wakeup = 1;
}
+diff --git a/fs/fuse/file.c b/fs/fuse/file.c
+index 416108b..c4b3802 100644
+--- a/fs/fuse/file.c
++++ b/fs/fuse/file.c
+@@ -825,9 +825,9 @@ struct fuse_fill_data {
+ unsigned nr_pages;
+ };
+
+-static int fuse_readpages_fill(void *_data, struct page *page)
++static int fuse_readpages_fill(struct file *_data, struct page *page)
+ {
+- struct fuse_fill_data *data = _data;
++ struct fuse_fill_data *data = (struct fuse_fill_data *)_data;
+ struct fuse_req *req = data->req;
+ struct inode *inode = data->inode;
+ struct fuse_conn *fc = get_fuse_conn(inode);
+diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
+index 4d69d5c..3093c70 100644
+--- a/fs/fuse/inode.c
++++ b/fs/fuse/inode.c
+@@ -29,7 +29,7 @@ static struct kmem_cache *fuse_inode_cachep;
+ struct list_head fuse_conn_list;
+ DEFINE_MUTEX(fuse_mutex);
+
+-static int set_global_limit(const char *val, struct kernel_param *kp);
++static int set_global_limit(const char *val, const struct kernel_param *kp);
+
+ unsigned max_user_bgreq;
+ module_param_call(max_user_bgreq, set_global_limit, param_get_uint,
+@@ -814,7 +814,7 @@ static void sanitize_global_limit(unsigned *limit)
+ *limit = (1 << 16) - 1;
+ }
+
+-static int set_global_limit(const char *val, struct kernel_param *kp)
++static int set_global_limit(const char *val, const struct kernel_param *kp)
+ {
+ int rv;
+
+diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
+index 93f0746..16e462a 100644
+--- a/fs/gfs2/aops.c
++++ b/fs/gfs2/aops.c
+@@ -492,7 +492,7 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
+ *
+ */
+
+-static int __gfs2_readpage(void *file, struct page *page)
++static int __gfs2_readpage(struct file *file, struct page *page)
+ {
+ struct gfs2_inode *ip = GFS2_I(page->mapping->host);
+ struct gfs2_sbd *sdp = GFS2_SB(page->mapping->host);
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
-index 5e42546..ea321c8 100644
+index c9384f9..b89afe1 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
-@@ -781,7 +781,7 @@ static void calc_max_reserv(struct gfs2_inode *ip, loff_t *len,
+@@ -775,7 +775,7 @@ static void calc_max_reserv(struct gfs2_inode *ip, loff_t *len,
{
loff_t max = *len;
const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
@@ -84179,7 +98669,7 @@ index 5e42546..ea321c8 100644
for (tmp = max_data; tmp > sdp->sd_diptrs;) {
tmp = DIV_ROUND_UP(tmp, sdp->sd_inptrs);
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
-index 32e7471..ffc6973 100644
+index a4ff7b5..3bdde1a 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -324,9 +324,9 @@ static void state_change(struct gfs2_glock *gl, unsigned int new_state)
@@ -84251,7 +98741,7 @@ index 32e7471..ffc6973 100644
spin_unlock(&gl->gl_lockref.lock);
cond_resched_lock(&lru_lock);
}
-@@ -1667,7 +1667,7 @@ void gfs2_dump_glock(struct seq_file *seq, const struct gfs2_glock *gl)
+@@ -1669,7 +1669,7 @@ void gfs2_dump_glock(struct seq_file *seq, const struct gfs2_glock *gl)
state2str(gl->gl_demote_state), dtime,
atomic_read(&gl->gl_ail_count),
atomic_read(&gl->gl_revokes),
@@ -84261,10 +98751,10 @@ index 32e7471..ffc6973 100644
list_for_each_entry(gh, &gl->gl_holders, gh_list)
dump_holder(seq, gh);
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
-index f348cfb..e4274b2 100644
+index 437fd73..4f85148 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
-@@ -554,9 +554,9 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
+@@ -556,9 +556,9 @@ static void iopen_go_callback(struct gfs2_glock *gl, bool remote)
if (gl->gl_demote_state == LM_ST_UNLOCKED &&
gl->gl_state == LM_ST_SHARED && ip) {
@@ -84277,7 +98767,7 @@ index f348cfb..e4274b2 100644
}
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
-index 3a31226..2fffbe9 100644
+index a398913..9034327 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -154,7 +154,7 @@ static enum lru_status gfs2_qd_isolate(struct list_head *item,
@@ -84308,7 +98798,7 @@ index 3a31226..2fffbe9 100644
spin_unlock(&qd->qd_lockref.lock);
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
-index 595ebdb..1264061 100644
+index e1f465a..ba6b5b8 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -174,6 +174,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
@@ -84348,9 +98838,9 @@ index 595ebdb..1264061 100644
info.high_limit = TASK_SIZE;
info.align_mask = PAGE_MASK & ~huge_page_mask(h);
info.align_offset = 0;
-@@ -1206,7 +1216,7 @@ static struct file_system_type hugetlbfs_fs_type = {
+@@ -1212,7 +1222,7 @@ static struct file_system_type hugetlbfs_fs_type = {
+ .kill_sb = kill_litter_super,
};
- MODULE_ALIAS_FS("hugetlbfs");
-static struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
+struct vfsmount *hugetlbfs_vfsmount[HUGE_MAX_HSTATE];
@@ -84358,10 +98848,10 @@ index 595ebdb..1264061 100644
static int can_do_hugetlb_shm(void)
{
diff --git a/fs/inode.c b/fs/inode.c
-index 1be5f90..55702b0 100644
+index 69b8b52..9b58c2d 100644
--- a/fs/inode.c
+++ b/fs/inode.c
-@@ -844,19 +844,19 @@ unsigned int get_next_ino(void)
+@@ -850,19 +850,19 @@ unsigned int get_next_ino(void)
unsigned int *p = &get_cpu_var(last_ino);
unsigned int res = *p;
@@ -84387,43 +98877,6 @@ index 1be5f90..55702b0 100644
*p = res;
put_cpu_var(last_ino);
return res;
-diff --git a/fs/internal.h b/fs/internal.h
-index 71859c4d..e38c08c 100644
---- a/fs/internal.h
-+++ b/fs/internal.h
-@@ -151,3 +151,10 @@ extern void mnt_pin_kill(struct mount *m);
- * fs/nsfs.c
- */
- extern struct dentry_operations ns_dentry_operations;
-+
-+/*
-+ * fs/ioctl.c
-+ */
-+extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd,
-+ unsigned long arg);
-+extern long vfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
-diff --git a/fs/ioctl.c b/fs/ioctl.c
-index 5d01d26..41c352e 100644
---- a/fs/ioctl.c
-+++ b/fs/ioctl.c
-@@ -15,6 +15,7 @@
- #include <linux/writeback.h>
- #include <linux/buffer_head.h>
- #include <linux/falloc.h>
-+#include "internal.h"
-
- #include <asm/ioctls.h>
-
-@@ -32,8 +33,7 @@
- *
- * Returns 0 on success, -errno on error.
- */
--static long vfs_ioctl(struct file *filp, unsigned int cmd,
-- unsigned long arg)
-+long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
- {
- int error = -ENOTTY;
-
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 36345fe..f2d7dac 100644
--- a/fs/jbd2/commit.c
@@ -84438,7 +98891,7 @@ index 36345fe..f2d7dac 100644
commit_transaction->t_tid, &stats.run);
stats.ts_requested = (commit_transaction->t_requested) ? 1 : 0;
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
-index ca181e8..8262e59 100644
+index 081dff0..9f91ee0 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -91,7 +91,7 @@ jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
@@ -84473,8 +98926,49 @@ index 4a6cf28..d3a29d3 100644
};
jffs2_prealloc_raw_node_refs(c, jeb, 1);
+diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
+index cad86ba..a0bfc33 100644
+--- a/fs/jffs2/file.c
++++ b/fs/jffs2/file.c
+@@ -111,8 +111,9 @@ static int jffs2_do_readpage_nolock (struct inode *inode, struct page *pg)
+ return ret;
+ }
+
+-int jffs2_do_readpage_unlock(struct inode *inode, struct page *pg)
++int jffs2_do_readpage_unlock(struct file *_inode, struct page *pg)
+ {
++ struct inode *inode = (struct inode *)_inode;
+ int ret = jffs2_do_readpage_nolock(inode, pg);
+ unlock_page(pg);
+ return ret;
+diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
+index bead25a..5186b1c 100644
+--- a/fs/jffs2/fs.c
++++ b/fs/jffs2/fs.c
+@@ -686,7 +686,7 @@ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c,
+ struct page *pg;
+
+ pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
+- (void *)jffs2_do_readpage_unlock, inode);
++ jffs2_do_readpage_unlock, inode);
+ if (IS_ERR(pg))
+ return (void *)pg;
+
+diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
+index 824e61e..2d686a6 100644
+--- a/fs/jffs2/os-linux.h
++++ b/fs/jffs2/os-linux.h
+@@ -154,7 +154,7 @@ extern const struct file_operations jffs2_file_operations;
+ extern const struct inode_operations jffs2_file_inode_operations;
+ extern const struct address_space_operations jffs2_file_address_operations;
+ int jffs2_fsync(struct file *, loff_t, loff_t, int);
+-int jffs2_do_readpage_unlock (struct inode *inode, struct page *pg);
++int jffs2_do_readpage_unlock (struct file *_inode, struct page *pg);
+
+ /* ioctl.c */
+ long jffs2_ioctl(struct file *, unsigned int, unsigned long);
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
-index f3a4857..2542b7a 100644
+index 5a3da3f..de40276 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1023,7 +1023,8 @@ static const struct jffs2_unknown_node oob_cleanmarker =
@@ -84488,20 +98982,20 @@ index f3a4857..2542b7a 100644
/*
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
-index 8f9176c..6f2b910 100644
+index 4f5d85b..de5d4d8 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -898,7 +898,7 @@ static int __init init_jfs_fs(void)
jfs_inode_cachep =
kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0,
-- SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
-+ SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_USERCOPY,
+- SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_ACCOUNT,
++ SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD|SLAB_ACCOUNT|SLAB_USERCOPY,
init_once);
if (jfs_inode_cachep == NULL)
return -ENOMEM;
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
-index 91e0045..a654935 100644
+index 996b774..8358861 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -205,7 +205,7 @@ struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn)
@@ -84513,7 +99007,7 @@ index 91e0045..a654935 100644
{
unsigned long hash = init_name_hash();
unsigned int len = strlen(name);
-@@ -896,6 +896,12 @@ static int kernfs_iop_mkdir(struct inode *dir, struct dentry *dentry,
+@@ -935,6 +935,12 @@ static int kernfs_iop_mkdir(struct inode *dir, struct dentry *dentry,
ret = scops->mkdir(parent, dentry->d_name.name, mode);
kernfs_put_active(parent);
@@ -84610,7 +99104,7 @@ index 7247252..c73808e 100644
}
diff --git a/fs/libfs.c b/fs/libfs.c
-index c7cbfb0..fc3636d4 100644
+index 0ca80b2..4001920 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -155,6 +155,9 @@ int dcache_readdir(struct file *file, struct dir_context *ctx)
@@ -84637,6 +99131,135 @@ index c7cbfb0..fc3636d4 100644
d_inode(next)->i_ino, dt_type(d_inode(next))))
return 0;
spin_lock(&dentry->d_lock);
+diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
+index d3e40db..a300f9c 100644
+--- a/fs/lockd/clnt4xdr.c
++++ b/fs/lockd/clnt4xdr.c
+@@ -379,10 +379,11 @@ static void encode_nlm4_lock(struct xdr_stream *xdr,
+ * struct nlm4_lock alock;
+ * };
+ */
+-static void nlm4_xdr_enc_testargs(struct rpc_rqst *req,
++static void nlm4_xdr_enc_testargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -400,10 +401,11 @@ static void nlm4_xdr_enc_testargs(struct rpc_rqst *req,
+ * int state;
+ * };
+ */
+-static void nlm4_xdr_enc_lockargs(struct rpc_rqst *req,
++static void nlm4_xdr_enc_lockargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -422,10 +424,11 @@ static void nlm4_xdr_enc_lockargs(struct rpc_rqst *req,
+ * struct nlm4_lock alock;
+ * };
+ */
+-static void nlm4_xdr_enc_cancargs(struct rpc_rqst *req,
++static void nlm4_xdr_enc_cancargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -440,10 +443,11 @@ static void nlm4_xdr_enc_cancargs(struct rpc_rqst *req,
+ * struct nlm4_lock alock;
+ * };
+ */
+-static void nlm4_xdr_enc_unlockargs(struct rpc_rqst *req,
++static void nlm4_xdr_enc_unlockargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -456,10 +460,12 @@ static void nlm4_xdr_enc_unlockargs(struct rpc_rqst *req,
+ * nlm4_stat stat;
+ * };
+ */
+-static void nlm4_xdr_enc_res(struct rpc_rqst *req,
++static void nlm4_xdr_enc_res(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_res *result)
++ void *_result)
+ {
++ const struct nlm_res *result = _result;
++
+ encode_cookie(xdr, &result->cookie);
+ encode_nlm4_stat(xdr, result->status);
+ }
+@@ -477,10 +483,12 @@ static void nlm4_xdr_enc_res(struct rpc_rqst *req,
+ * nlm4_testrply test_stat;
+ * };
+ */
+-static void nlm4_xdr_enc_testres(struct rpc_rqst *req,
++static void nlm4_xdr_enc_testres(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_res *result)
++ void *_result)
+ {
++ const struct nlm_res *result = _result;
++
+ encode_cookie(xdr, &result->cookie);
+ encode_nlm4_stat(xdr, result->status);
+ if (result->status == nlm_lck_denied)
+@@ -523,10 +531,11 @@ out:
+ return error;
+ }
+
+-static int nlm4_xdr_dec_testres(struct rpc_rqst *req,
++static int nlm4_xdr_dec_testres(void *req,
+ struct xdr_stream *xdr,
+- struct nlm_res *result)
++ void *_result)
+ {
++ struct nlm_res *result = _result;
+ int error;
+
+ error = decode_cookie(xdr, &result->cookie);
+@@ -543,10 +552,11 @@ out:
+ * nlm4_stat stat;
+ * };
+ */
+-static int nlm4_xdr_dec_res(struct rpc_rqst *req,
++static int nlm4_xdr_dec_res(void *req,
+ struct xdr_stream *xdr,
+- struct nlm_res *result)
++ void *_result)
+ {
++ struct nlm_res *result = _result;
+ int error;
+
+ error = decode_cookie(xdr, &result->cookie);
+@@ -566,8 +576,8 @@ out:
+ #define PROC(proc, argtype, restype) \
+ [NLMPROC_##proc] = { \
+ .p_proc = NLMPROC_##proc, \
+- .p_encode = (kxdreproc_t)nlm4_xdr_enc_##argtype, \
+- .p_decode = (kxdrdproc_t)nlm4_xdr_dec_##restype, \
++ .p_encode = nlm4_xdr_enc_##argtype, \
++ .p_decode = nlm4_xdr_dec_##restype, \
+ .p_arglen = NLM4_##argtype##_sz, \
+ .p_replen = NLM4_##restype##_sz, \
+ .p_statidx = NLMPROC_##proc, \
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 1129520..356aeca 100644
--- a/fs/lockd/clntproc.c
@@ -84655,6 +99278,1165 @@ index 1129520..356aeca 100644
memcpy(c->data, &cookie, 4);
c->len=4;
+diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
+index 3e9f787..c2177b8 100644
+--- a/fs/lockd/clntxdr.c
++++ b/fs/lockd/clntxdr.c
+@@ -372,10 +372,11 @@ static void encode_nlm_lock(struct xdr_stream *xdr,
+ * struct nlm_lock alock;
+ * };
+ */
+-static void nlm_xdr_enc_testargs(struct rpc_rqst *req,
++static void nlm_xdr_enc_testargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -393,10 +394,11 @@ static void nlm_xdr_enc_testargs(struct rpc_rqst *req,
+ * int state;
+ * };
+ */
+-static void nlm_xdr_enc_lockargs(struct rpc_rqst *req,
++static void nlm_xdr_enc_lockargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -415,10 +417,11 @@ static void nlm_xdr_enc_lockargs(struct rpc_rqst *req,
+ * struct nlm_lock alock;
+ * };
+ */
+-static void nlm_xdr_enc_cancargs(struct rpc_rqst *req,
++static void nlm_xdr_enc_cancargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -433,10 +436,11 @@ static void nlm_xdr_enc_cancargs(struct rpc_rqst *req,
+ * struct nlm_lock alock;
+ * };
+ */
+-static void nlm_xdr_enc_unlockargs(struct rpc_rqst *req,
++static void nlm_xdr_enc_unlockargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_args *args)
++ void *_args)
+ {
++ const struct nlm_args *args = _args;
+ const struct nlm_lock *lock = &args->lock;
+
+ encode_cookie(xdr, &args->cookie);
+@@ -449,10 +453,11 @@ static void nlm_xdr_enc_unlockargs(struct rpc_rqst *req,
+ * nlm_stat stat;
+ * };
+ */
+-static void nlm_xdr_enc_res(struct rpc_rqst *req,
++static void nlm_xdr_enc_res(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_res *result)
++ void *_result)
+ {
++ const struct nlm_res *result = _result;
+ encode_cookie(xdr, &result->cookie);
+ encode_nlm_stat(xdr, result->status);
+ }
+@@ -477,10 +482,11 @@ static void encode_nlm_testrply(struct xdr_stream *xdr,
+ encode_nlm_holder(xdr, result);
+ }
+
+-static void nlm_xdr_enc_testres(struct rpc_rqst *req,
++static void nlm_xdr_enc_testres(void *req,
+ struct xdr_stream *xdr,
+- const struct nlm_res *result)
++ void *_result)
+ {
++ const struct nlm_res *result = _result;
+ encode_cookie(xdr, &result->cookie);
+ encode_nlm_stat(xdr, result->status);
+ encode_nlm_testrply(xdr, result);
+@@ -521,11 +527,12 @@ out:
+ return error;
+ }
+
+-static int nlm_xdr_dec_testres(struct rpc_rqst *req,
++static int nlm_xdr_dec_testres(void *req,
+ struct xdr_stream *xdr,
+- struct nlm_res *result)
++ void *_result)
+ {
+ int error;
++ struct nlm_res *result = _result;
+
+ error = decode_cookie(xdr, &result->cookie);
+ if (unlikely(error))
+@@ -541,11 +548,12 @@ out:
+ * nlm_stat stat;
+ * };
+ */
+-static int nlm_xdr_dec_res(struct rpc_rqst *req,
++static int nlm_xdr_dec_res(void *req,
+ struct xdr_stream *xdr,
+- struct nlm_res *result)
++ void *_result)
+ {
+ int error;
++ struct nlm_res *result = _result;
+
+ error = decode_cookie(xdr, &result->cookie);
+ if (unlikely(error))
+@@ -564,8 +572,8 @@ out:
+ #define PROC(proc, argtype, restype) \
+ [NLMPROC_##proc] = { \
+ .p_proc = NLMPROC_##proc, \
+- .p_encode = (kxdreproc_t)nlm_xdr_enc_##argtype, \
+- .p_decode = (kxdrdproc_t)nlm_xdr_dec_##restype, \
++ .p_encode = nlm_xdr_enc_##argtype, \
++ .p_decode = nlm_xdr_dec_##restype, \
+ .p_arglen = NLM_##argtype##_sz, \
+ .p_replen = NLM_##restype##_sz, \
+ .p_statidx = NLMPROC_##proc, \
+diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
+index 19166d4..c841d52 100644
+--- a/fs/lockd/mon.c
++++ b/fs/lockd/mon.c
+@@ -475,23 +475,22 @@ static void encode_priv(struct xdr_stream *xdr, const struct nsm_args *argp)
+ xdr_encode_opaque_fixed(p, argp->priv->data, SM_PRIV_SIZE);
+ }
+
+-static void nsm_xdr_enc_mon(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nsm_args *argp)
++static void nsm_xdr_enc_mon(void *req, struct xdr_stream *xdr, void *argp)
+ {
+ encode_mon_id(xdr, argp);
+ encode_priv(xdr, argp);
+ }
+
+-static void nsm_xdr_enc_unmon(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nsm_args *argp)
++static void nsm_xdr_enc_unmon(void *req, struct xdr_stream *xdr, void *argp)
+ {
+ encode_mon_id(xdr, argp);
+ }
+
+-static int nsm_xdr_dec_stat_res(struct rpc_rqst *rqstp,
++static int nsm_xdr_dec_stat_res(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nsm_res *resp)
++ void *_resp)
+ {
++ struct nsm_res *resp = _resp;
+ __be32 *p;
+
+ p = xdr_inline_decode(xdr, 4 + 4);
+@@ -505,10 +504,11 @@ static int nsm_xdr_dec_stat_res(struct rpc_rqst *rqstp,
+ return 0;
+ }
+
+-static int nsm_xdr_dec_stat(struct rpc_rqst *rqstp,
++static int nsm_xdr_dec_stat(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nsm_res *resp)
++ void *_resp)
+ {
++ struct nsm_res *resp = _resp;
+ __be32 *p;
+
+ p = xdr_inline_decode(xdr, 4);
+@@ -532,8 +532,8 @@ static int nsm_xdr_dec_stat(struct rpc_rqst *rqstp,
+ static struct rpc_procinfo nsm_procedures[] = {
+ [NSMPROC_MON] = {
+ .p_proc = NSMPROC_MON,
+- .p_encode = (kxdreproc_t)nsm_xdr_enc_mon,
+- .p_decode = (kxdrdproc_t)nsm_xdr_dec_stat_res,
++ .p_encode = nsm_xdr_enc_mon,
++ .p_decode = nsm_xdr_dec_stat_res,
+ .p_arglen = SM_mon_sz,
+ .p_replen = SM_monres_sz,
+ .p_statidx = NSMPROC_MON,
+@@ -541,8 +541,8 @@ static struct rpc_procinfo nsm_procedures[] = {
+ },
+ [NSMPROC_UNMON] = {
+ .p_proc = NSMPROC_UNMON,
+- .p_encode = (kxdreproc_t)nsm_xdr_enc_unmon,
+- .p_decode = (kxdrdproc_t)nsm_xdr_dec_stat,
++ .p_encode = nsm_xdr_enc_unmon,
++ .p_decode = nsm_xdr_dec_stat,
+ .p_arglen = SM_mon_id_sz,
+ .p_replen = SM_unmonres_sz,
+ .p_statidx = NSMPROC_UNMON,
+diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
+index 154a107..7b77da4 100644
+--- a/fs/lockd/svc.c
++++ b/fs/lockd/svc.c
+@@ -591,7 +591,7 @@ static struct ctl_table nlm_sysctl_root[] = {
+ */
+
+ #define param_set_min_max(name, type, which_strtol, min, max) \
+-static int param_set_##name(const char *val, struct kernel_param *kp) \
++static int param_set_##name(const char *val, const struct kernel_param *kp)\
+ { \
+ char *endp; \
+ __typeof__(type) num = which_strtol(val, &endp, 0); \
+diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
+index 09c576f..89b4d3d 100644
+--- a/fs/lockd/svc4proc.c
++++ b/fs/lockd/svc4proc.c
+@@ -72,9 +72,10 @@ nlm4svc_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
+ * TEST: Check for conflicting lock
+ */
+ static __be32
+-nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_test(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+ __be32 rc = rpc_success;
+@@ -99,9 +100,10 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
+ }
+
+ static __be32
+-nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_lock(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+ __be32 rc = rpc_success;
+@@ -141,9 +143,10 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+ }
+
+ static __be32
+-nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_cancel(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+
+@@ -174,9 +177,10 @@ nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * UNLOCK: release a lock
+ */
+ static __be32
+-nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_unlock(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+
+@@ -208,9 +212,11 @@ nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * was granted
+ */
+ static __be32
+-nlm4svc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_granted(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
++
+ resp->cookie = argp->cookie;
+
+ dprintk("lockd: GRANTED called\n");
+@@ -244,7 +250,7 @@ static const struct rpc_call_ops nlm4svc_callback_ops = {
+ * doesn't break any clients.
+ */
+ static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *argp,
+- __be32 (*func)(struct svc_rqst *, struct nlm_args *, struct nlm_res *))
++ __be32 (*func)(struct svc_rqst *, void *, void *))
+ {
+ struct nlm_host *host;
+ struct nlm_rqst *call;
+@@ -273,35 +279,35 @@ static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args
+ return rpc_success;
+ }
+
+-static __be32 nlm4svc_proc_test_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
++static __be32 nlm4svc_proc_test_msg(struct svc_rqst *rqstp, void *argp,
+ void *resp)
+ {
+ dprintk("lockd: TEST_MSG called\n");
+ return nlm4svc_callback(rqstp, NLMPROC_TEST_RES, argp, nlm4svc_proc_test);
+ }
+
+-static __be32 nlm4svc_proc_lock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
++static __be32 nlm4svc_proc_lock_msg(struct svc_rqst *rqstp, void *argp,
+ void *resp)
+ {
+ dprintk("lockd: LOCK_MSG called\n");
+ return nlm4svc_callback(rqstp, NLMPROC_LOCK_RES, argp, nlm4svc_proc_lock);
+ }
+
+-static __be32 nlm4svc_proc_cancel_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
++static __be32 nlm4svc_proc_cancel_msg(struct svc_rqst *rqstp, void *argp,
+ void *resp)
+ {
+ dprintk("lockd: CANCEL_MSG called\n");
+ return nlm4svc_callback(rqstp, NLMPROC_CANCEL_RES, argp, nlm4svc_proc_cancel);
+ }
+
+-static __be32 nlm4svc_proc_unlock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
++static __be32 nlm4svc_proc_unlock_msg(struct svc_rqst *rqstp, void *argp,
+ void *resp)
+ {
+ dprintk("lockd: UNLOCK_MSG called\n");
+ return nlm4svc_callback(rqstp, NLMPROC_UNLOCK_RES, argp, nlm4svc_proc_unlock);
+ }
+
+-static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
++static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, void *argp,
+ void *resp)
+ {
+ dprintk("lockd: GRANTED_MSG called\n");
+@@ -312,9 +318,10 @@ static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *
+ * SHARE: create a DOS share or alter existing share.
+ */
+ static __be32
+-nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_share(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+
+@@ -345,9 +352,10 @@ nlm4svc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * UNSHARE: Release a DOS share.
+ */
+ static __be32
+-nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_unshare(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+
+@@ -378,9 +386,10 @@ nlm4svc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * NM_LOCK: Create an unmonitored lock
+ */
+ static __be32
+-nlm4svc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlm4svc_proc_nm_lock(struct svc_rqst *rqstp, void *_argp, void *resp)
+ {
++ struct nlm_args *argp = _argp;
++
+ dprintk("lockd: NM_LOCK called\n");
+
+ argp->monitor = 0; /* just clean the monitor flag */
+@@ -391,8 +400,7 @@ nlm4svc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * FREE_ALL: Release all locks and shares held by client
+ */
+ static __be32
+-nlm4svc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++nlm4svc_proc_free_all(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ struct nlm_host *host;
+
+@@ -409,7 +417,7 @@ nlm4svc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * SM_NOTIFY: private callback from statd (not part of official NLM proto)
+ */
+ static __be32
+-nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
++nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, void *argp,
+ void *resp)
+ {
+ dprintk("lockd: SM_NOTIFY called\n");
+@@ -429,9 +437,10 @@ nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
+ * client sent a GRANTED_RES, let's remove the associated block
+ */
+ static __be32
+-nlm4svc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
+- void *resp)
++nlm4svc_proc_granted_res(struct svc_rqst *rqstp, void *_argp, void *resp)
+ {
++ struct nlm_res *argp = _argp;
++
+ if (!nlmsvc_ops)
+ return rpc_success;
+
+@@ -463,9 +472,9 @@ nlm4svc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
+ struct nlm_void { int dummy; };
+
+ #define PROC(name, xargt, xrest, argt, rest, respsize) \
+- { .pc_func = (svc_procfunc) nlm4svc_proc_##name, \
+- .pc_decode = (kxdrproc_t) nlm4svc_decode_##xargt, \
+- .pc_encode = (kxdrproc_t) nlm4svc_encode_##xrest, \
++ { .pc_func = nlm4svc_proc_##name, \
++ .pc_decode = nlm4svc_decode_##xargt, \
++ .pc_encode = nlm4svc_encode_##xrest, \
+ .pc_release = NULL, \
+ .pc_argsize = sizeof(struct nlm_##argt), \
+ .pc_ressize = sizeof(struct nlm_##rest), \
+diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
+index fb26b9f..a6d5582 100644
+--- a/fs/lockd/svcproc.c
++++ b/fs/lockd/svcproc.c
+@@ -102,9 +102,10 @@ nlmsvc_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
+ * TEST: Check for conflicting lock
+ */
+ static __be32
+-nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_test(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+ __be32 rc = rpc_success;
+@@ -130,9 +131,10 @@ nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp,
+ }
+
+ static __be32
+-nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_lock(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+ __be32 rc = rpc_success;
+@@ -172,9 +174,10 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+ }
+
+ static __be32
+-nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_cancel(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+ struct net *net = SVC_NET(rqstp);
+@@ -206,9 +209,10 @@ nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * UNLOCK: release a lock
+ */
+ static __be32
+-nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_unlock(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+ struct net *net = SVC_NET(rqstp);
+@@ -241,9 +245,11 @@ nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * was granted
+ */
+ static __be32
+-nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_granted(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
++
+ resp->cookie = argp->cookie;
+
+ dprintk("lockd: GRANTED called\n");
+@@ -285,7 +291,7 @@ static const struct rpc_call_ops nlmsvc_callback_ops = {
+ * doesn't break any clients.
+ */
+ static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *argp,
+- __be32 (*func)(struct svc_rqst *, struct nlm_args *, struct nlm_res *))
++ __be32 (*func)(struct svc_rqst *, void *, void *))
+ {
+ struct nlm_host *host;
+ struct nlm_rqst *call;
+@@ -314,38 +320,33 @@ static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args
+ return rpc_success;
+ }
+
+-static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp,void *argp, void *resp)
+ {
+ dprintk("lockd: TEST_MSG called\n");
+ return nlmsvc_callback(rqstp, NLMPROC_TEST_RES, argp, nlmsvc_proc_test);
+ }
+
+-static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ dprintk("lockd: LOCK_MSG called\n");
+ return nlmsvc_callback(rqstp, NLMPROC_LOCK_RES, argp, nlmsvc_proc_lock);
+ }
+
+-static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ dprintk("lockd: CANCEL_MSG called\n");
+ return nlmsvc_callback(rqstp, NLMPROC_CANCEL_RES, argp, nlmsvc_proc_cancel);
+ }
+
+ static __be32
+-nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ dprintk("lockd: UNLOCK_MSG called\n");
+ return nlmsvc_callback(rqstp, NLMPROC_UNLOCK_RES, argp, nlmsvc_proc_unlock);
+ }
+
+ static __be32
+-nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ dprintk("lockd: GRANTED_MSG called\n");
+ return nlmsvc_callback(rqstp, NLMPROC_GRANTED_RES, argp, nlmsvc_proc_granted);
+@@ -355,9 +356,10 @@ nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * SHARE: create a DOS share or alter existing share.
+ */
+ static __be32
+-nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_share(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+
+@@ -388,9 +390,10 @@ nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * UNSHARE: Release a DOS share.
+ */
+ static __be32
+-nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_unshare(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nlm_args *argp = _argp;
++ struct nlm_res *resp = _resp;
+ struct nlm_host *host;
+ struct nlm_file *file;
+
+@@ -421,9 +424,10 @@ nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * NM_LOCK: Create an unmonitored lock
+ */
+ static __be32
+-nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+- struct nlm_res *resp)
++nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, void *_argp, void *resp)
+ {
++ struct nlm_args *argp = _argp;
++
+ dprintk("lockd: NM_LOCK called\n");
+
+ argp->monitor = 0; /* just clean the monitor flag */
+@@ -434,8 +438,7 @@ nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * FREE_ALL: Release all locks and shares held by client
+ */
+ static __be32
+-nlmsvc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
+- void *resp)
++nlmsvc_proc_free_all(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ struct nlm_host *host;
+
+@@ -452,8 +455,7 @@ nlmsvc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp,
+ * SM_NOTIFY: private callback from statd (not part of official NLM proto)
+ */
+ static __be32
+-nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
+- void *resp)
++nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, void *argp, void *resp)
+ {
+ dprintk("lockd: SM_NOTIFY called\n");
+
+@@ -472,9 +474,10 @@ nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
+ * client sent a GRANTED_RES, let's remove the associated block
+ */
+ static __be32
+-nlmsvc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
+- void *resp)
++nlmsvc_proc_granted_res(struct svc_rqst *rqstp, void *_argp, void *resp)
+ {
++ struct nlm_res *argp = _argp;
++
+ if (!nlmsvc_ops)
+ return rpc_success;
+
+@@ -505,9 +508,9 @@ nlmsvc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp,
+ struct nlm_void { int dummy; };
+
+ #define PROC(name, xargt, xrest, argt, rest, respsize) \
+- { .pc_func = (svc_procfunc) nlmsvc_proc_##name, \
+- .pc_decode = (kxdrproc_t) nlmsvc_decode_##xargt, \
+- .pc_encode = (kxdrproc_t) nlmsvc_encode_##xrest, \
++ { .pc_func = nlmsvc_proc_##name, \
++ .pc_decode = nlmsvc_decode_##xargt, \
++ .pc_encode = nlmsvc_encode_##xrest, \
+ .pc_release = NULL, \
+ .pc_argsize = sizeof(struct nlm_##argt), \
+ .pc_ressize = sizeof(struct nlm_##rest), \
+diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c
+index 5b651da..cfe0944 100644
+--- a/fs/lockd/xdr.c
++++ b/fs/lockd/xdr.c
+@@ -182,8 +182,9 @@ nlm_encode_testres(__be32 *p, struct nlm_res *resp)
+ * First, the server side XDR functions
+ */
+ int
+-nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlmsvc_decode_testargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ u32 exclusive;
+
+ if (!(p = nlm_decode_cookie(p, &argp->cookie)))
+@@ -199,16 +200,19 @@ nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlmsvc_encode_testres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm_encode_testres(p, resp)))
+ return 0;
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ int
+-nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlmsvc_decode_lockargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ u32 exclusive;
+
+ if (!(p = nlm_decode_cookie(p, &argp->cookie)))
+@@ -227,8 +231,9 @@ nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlmsvc_decode_cancargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ u32 exclusive;
+
+ if (!(p = nlm_decode_cookie(p, &argp->cookie)))
+@@ -243,8 +248,10 @@ nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlmsvc_decode_unlockargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
++
+ if (!(p = nlm_decode_cookie(p, &argp->cookie))
+ || !(p = nlm_decode_lock(p, &argp->lock)))
+ return 0;
+@@ -253,8 +260,10 @@ nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlmsvc_decode_shareargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
++
+ struct nlm_lock *lock = &argp->lock;
+
+ memset(lock, 0, sizeof(*lock));
+@@ -274,8 +283,10 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlmsvc_encode_shareres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm_encode_cookie(p, &resp->cookie)))
+ return 0;
+ *p++ = resp->status;
+@@ -284,8 +295,10 @@ nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlmsvc_encode_res(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm_encode_cookie(p, &resp->cookie)))
+ return 0;
+ *p++ = resp->status;
+@@ -293,8 +306,9 @@ nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
++nlmsvc_decode_notify(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nlm_args *argp = _argp;
+ struct nlm_lock *lock = &argp->lock;
+
+ if (!(p = xdr_decode_string_inplace(p, &lock->caller,
+@@ -305,8 +319,10 @@ nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
+ }
+
+ int
+-nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
++nlmsvc_decode_reboot(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nlm_reboot *argp = _argp;
++
+ if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
+ return 0;
+ argp->state = ntohl(*p++);
+@@ -316,8 +332,10 @@ nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
+ }
+
+ int
+-nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlmsvc_decode_res(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm_decode_cookie(p, &resp->cookie)))
+ return 0;
+ resp->status = *p++;
+@@ -325,13 +343,13 @@ nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlmsvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nlmsvc_decode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_argsize_check(rqstp, p);
+ }
+
+ int
+-nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nlmsvc_encode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_ressize_check(rqstp, p);
+ }
+diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c
+index dfa4789..be443bd 100644
+--- a/fs/lockd/xdr4.c
++++ b/fs/lockd/xdr4.c
+@@ -179,8 +179,9 @@ nlm4_encode_testres(__be32 *p, struct nlm_res *resp)
+ * First, the server side XDR functions
+ */
+ int
+-nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlm4svc_decode_testargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ u32 exclusive;
+
+ if (!(p = nlm4_decode_cookie(p, &argp->cookie)))
+@@ -196,7 +197,7 @@ nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlm4svc_encode_testres(void *rqstp, __be32 *p, void *resp)
+ {
+ if (!(p = nlm4_encode_testres(p, resp)))
+ return 0;
+@@ -204,8 +205,9 @@ nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlm4svc_decode_lockargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ u32 exclusive;
+
+ if (!(p = nlm4_decode_cookie(p, &argp->cookie)))
+@@ -224,8 +226,9 @@ nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlm4svc_decode_cancargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ u32 exclusive;
+
+ if (!(p = nlm4_decode_cookie(p, &argp->cookie)))
+@@ -240,8 +243,10 @@ nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlm4svc_decode_unlockargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
++
+ if (!(p = nlm4_decode_cookie(p, &argp->cookie))
+ || !(p = nlm4_decode_lock(p, &argp->lock)))
+ return 0;
+@@ -250,8 +255,9 @@ nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
++nlm4svc_decode_shareargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ nlm_args *argp = _argp;
+ struct nlm_lock *lock = &argp->lock;
+
+ memset(lock, 0, sizeof(*lock));
+@@ -271,8 +277,10 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp)
+ }
+
+ int
+-nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlm4svc_encode_shareres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
+ return 0;
+ *p++ = resp->status;
+@@ -281,8 +289,10 @@ nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlm4svc_encode_res(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm4_encode_cookie(p, &resp->cookie)))
+ return 0;
+ *p++ = resp->status;
+@@ -290,8 +300,9 @@ nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
++nlm4svc_decode_notify(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nlm_args *argp = _argp;
+ struct nlm_lock *lock = &argp->lock;
+
+ if (!(p = xdr_decode_string_inplace(p, &lock->caller,
+@@ -302,8 +313,10 @@ nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp)
+ }
+
+ int
+-nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp)
++nlm4svc_decode_reboot(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nlm_reboot *argp = _argp;
++
+ if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
+ return 0;
+ argp->state = ntohl(*p++);
+@@ -313,8 +326,10 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp
+ }
+
+ int
+-nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
++nlm4svc_decode_res(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nlm_res *resp = _resp;
++
+ if (!(p = nlm4_decode_cookie(p, &resp->cookie)))
+ return 0;
+ resp->status = *p++;
+@@ -322,13 +337,13 @@ nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp)
+ }
+
+ int
+-nlm4svc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nlm4svc_decode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_argsize_check(rqstp, p);
+ }
+
+ int
+-nlm4svc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nlm4svc_encode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_ressize_check(rqstp, p);
+ }
+diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c
+index a709d80..17ab4e7 100644
+--- a/fs/logfs/dev_bdev.c
++++ b/fs/logfs/dev_bdev.c
+@@ -33,9 +33,8 @@ static int sync_request(struct page *page, struct block_device *bdev, int rw)
+ return submit_bio_wait(rw, &bio);
+ }
+
+-static int bdev_readpage(void *_sb, struct page *page)
++static int bdev_readpage(struct super_block *sb, struct page *page)
+ {
+- struct super_block *sb = _sb;
+ struct block_device *bdev = logfs_super(sb)->s_bdev;
+ int err;
+
+@@ -51,6 +50,11 @@ static int bdev_readpage(void *_sb, struct page *page)
+ return err;
+ }
+
++static int bdev_filler(struct file *file, struct page *page)
++{
++ return bdev_readpage((struct super_block *)file, page);
++}
++
+ static DECLARE_WAIT_QUEUE_HEAD(wq);
+
+ static void writeseg_end_io(struct bio *bio)
+@@ -246,7 +250,7 @@ static struct page *bdev_find_first_sb(struct super_block *sb, u64 *ofs)
+ {
+ struct logfs_super *super = logfs_super(sb);
+ struct address_space *mapping = super->s_mapping_inode->i_mapping;
+- filler_t *filler = bdev_readpage;
++ filler_t *filler = bdev_filler;
+
+ *ofs = 0;
+ return read_cache_page(mapping, 0, filler, sb);
+@@ -256,7 +260,7 @@ static struct page *bdev_find_last_sb(struct super_block *sb, u64 *ofs)
+ {
+ struct logfs_super *super = logfs_super(sb);
+ struct address_space *mapping = super->s_mapping_inode->i_mapping;
+- filler_t *filler = bdev_readpage;
++ filler_t *filler = bdev_filler;
+ u64 pos = (super->s_bdev->bd_inode->i_size & ~0xfffULL) - 0x1000;
+ pgoff_t index = pos >> PAGE_SHIFT;
+
+@@ -287,6 +291,7 @@ static const struct logfs_device_ops bd_devops = {
+ .find_last_sb = bdev_find_last_sb,
+ .write_sb = bdev_write_sb,
+ .readpage = bdev_readpage,
++ .filler = bdev_filler,
+ .writeseg = bdev_writeseg,
+ .erase = bdev_erase,
+ .can_write_buf = bdev_can_write_buf,
+diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c
+index 9c50144..c3740b7 100644
+--- a/fs/logfs/dev_mtd.c
++++ b/fs/logfs/dev_mtd.c
+@@ -122,9 +122,8 @@ static void logfs_mtd_sync(struct super_block *sb)
+ mtd_sync(mtd);
+ }
+
+-static int logfs_mtd_readpage(void *_sb, struct page *page)
++static int logfs_mtd_readpage(struct super_block *sb, struct page *page)
+ {
+- struct super_block *sb = _sb;
+ int err;
+
+ err = logfs_mtd_read(sb, page->index << PAGE_SHIFT, PAGE_SIZE,
+@@ -145,11 +144,16 @@ static int logfs_mtd_readpage(void *_sb, struct page *page)
+ return err;
+ }
+
++static int logfs_mtd_filler(struct file *file, struct page *page)
++{
++ return logfs_mtd_readpage((struct super_block *)file, page);
++}
++
+ static struct page *logfs_mtd_find_first_sb(struct super_block *sb, u64 *ofs)
+ {
+ struct logfs_super *super = logfs_super(sb);
+ struct address_space *mapping = super->s_mapping_inode->i_mapping;
+- filler_t *filler = logfs_mtd_readpage;
++ filler_t *filler = logfs_mtd_filler;
+ struct mtd_info *mtd = super->s_mtd;
+
+ *ofs = 0;
+@@ -166,7 +170,7 @@ static struct page *logfs_mtd_find_last_sb(struct super_block *sb, u64 *ofs)
+ {
+ struct logfs_super *super = logfs_super(sb);
+ struct address_space *mapping = super->s_mapping_inode->i_mapping;
+- filler_t *filler = logfs_mtd_readpage;
++ filler_t *filler = logfs_mtd_filler;
+ struct mtd_info *mtd = super->s_mtd;
+
+ *ofs = mtd->size - mtd->erasesize;
+@@ -254,6 +258,7 @@ static const struct logfs_device_ops mtd_devops = {
+ .find_first_sb = logfs_mtd_find_first_sb,
+ .find_last_sb = logfs_mtd_find_last_sb,
+ .readpage = logfs_mtd_readpage,
++ .filler = logfs_mtd_filler,
+ .writeseg = logfs_mtd_writeseg,
+ .erase = logfs_mtd_erase,
+ .can_write_buf = logfs_mtd_can_write_buf,
+diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c
+index 542468e..8b1e52a 100644
+--- a/fs/logfs/dir.c
++++ b/fs/logfs/dir.c
+@@ -174,7 +174,7 @@ static struct page *logfs_get_dd_page(struct inode *dir, struct dentry *dentry)
+ if (!logfs_exist_block(dir, index))
+ continue;
+ page = read_cache_page(dir->i_mapping, index,
+- (filler_t *)logfs_readpage, NULL);
++ logfs_readpage, NULL);
+ if (IS_ERR(page))
+ return page;
+ dd = kmap_atomic(page);
+@@ -306,7 +306,7 @@ static int logfs_readdir(struct file *file, struct dir_context *ctx)
+ continue;
+ }
+ page = read_cache_page(dir->i_mapping, pos,
+- (filler_t *)logfs_readpage, NULL);
++ logfs_readpage, NULL);
+ if (IS_ERR(page))
+ return PTR_ERR(page);
+ dd = kmap(page);
+diff --git a/fs/logfs/logfs.h b/fs/logfs/logfs.h
+index 27d040e..8959149 100644
+--- a/fs/logfs/logfs.h
++++ b/fs/logfs/logfs.h
+@@ -151,7 +151,8 @@ struct logfs_device_ops {
+ struct page *(*find_first_sb)(struct super_block *sb, u64 *ofs);
+ struct page *(*find_last_sb)(struct super_block *sb, u64 *ofs);
+ int (*write_sb)(struct super_block *sb, struct page *page);
+- int (*readpage)(void *_sb, struct page *page);
++ int (*readpage)(struct super_block *sb, struct page *page);
++ int (*filler)(struct file *file, struct page *page);
+ void (*writeseg)(struct super_block *sb, u64 ofs, size_t len);
+ int (*erase)(struct super_block *sb, loff_t ofs, size_t len,
+ int ensure_write);
+@@ -617,8 +618,6 @@ static inline int logfs_buf_recover(struct logfs_area *area, u64 ofs,
+ }
+
+ /* super.c */
+-struct page *emergency_read_begin(struct address_space *mapping, pgoff_t index);
+-void emergency_read_end(struct page *page);
+ void logfs_crash_dump(struct super_block *sb);
+ int logfs_statfs(struct dentry *dentry, struct kstatfs *stats);
+ int logfs_check_ds(struct logfs_disk_super *ds);
+diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
+index 20973c9..9ee7c57 100644
+--- a/fs/logfs/readwrite.c
++++ b/fs/logfs/readwrite.c
+@@ -1963,7 +1963,7 @@ int logfs_read_inode(struct inode *inode)
+ return -ENODATA;
+
+ page = read_cache_page(master_inode->i_mapping, ino,
+- (filler_t *)logfs_readpage, NULL);
++ logfs_readpage, NULL);
+ if (IS_ERR(page))
+ return PTR_ERR(page);
+
+diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c
+index d270e4b..aa1fb41 100644
+--- a/fs/logfs/segment.c
++++ b/fs/logfs/segment.c
+@@ -54,7 +54,7 @@ static struct page *get_mapping_page(struct super_block *sb, pgoff_t index,
+ {
+ struct logfs_super *super = logfs_super(sb);
+ struct address_space *mapping = super->s_mapping_inode->i_mapping;
+- filler_t *filler = super->s_devops->readpage;
++ filler_t *filler = super->s_devops->filler;
+ struct page *page;
+
+ BUG_ON(mapping_gfp_constraint(mapping, __GFP_FS));
+diff --git a/fs/logfs/super.c b/fs/logfs/super.c
+index 5436029..4597ec8 100644
+--- a/fs/logfs/super.c
++++ b/fs/logfs/super.c
+@@ -18,39 +18,6 @@
+ #include <linux/statfs.h>
+ #include <linux/buffer_head.h>
+
+-static DEFINE_MUTEX(emergency_mutex);
+-static struct page *emergency_page;
+-
+-struct page *emergency_read_begin(struct address_space *mapping, pgoff_t index)
+-{
+- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
+- struct page *page;
+- int err;
+-
+- page = read_cache_page(mapping, index, filler, NULL);
+- if (page)
+- return page;
+-
+- /* No more pages available, switch to emergency page */
+- printk(KERN_INFO"Logfs: Using emergency page\n");
+- mutex_lock(&emergency_mutex);
+- err = filler(NULL, emergency_page);
+- if (err) {
+- mutex_unlock(&emergency_mutex);
+- printk(KERN_EMERG"Logfs: Error reading emergency page\n");
+- return ERR_PTR(err);
+- }
+- return emergency_page;
+-}
+-
+-void emergency_read_end(struct page *page)
+-{
+- if (page == emergency_page)
+- mutex_unlock(&emergency_mutex);
+- else
+- page_cache_release(page);
+-}
+-
+ static void dump_segfile(struct super_block *sb)
+ {
+ struct logfs_super *super = logfs_super(sb);
+@@ -614,10 +581,6 @@ static int __init logfs_init(void)
+ {
+ int ret;
+
+- emergency_page = alloc_pages(GFP_KERNEL, 0);
+- if (!emergency_page)
+- return -ENOMEM;
+-
+ ret = logfs_compr_init();
+ if (ret)
+ goto out1;
+@@ -633,7 +596,6 @@ static int __init logfs_init(void)
+ out2:
+ logfs_compr_exit();
+ out1:
+- __free_pages(emergency_page, 0);
+ return ret;
+ }
+
+@@ -642,7 +604,6 @@ static void __exit logfs_exit(void)
+ unregister_filesystem(&logfs_fs_type);
+ logfs_destroy_inode_cache();
+ logfs_compr_exit();
+- __free_pages(emergency_page, 0);
+ }
+
+ module_init(logfs_init);
diff --git a/fs/mount.h b/fs/mount.h
index 14db05d..687f6d8 100644
--- a/fs/mount.h
@@ -84678,7 +100460,7 @@ index 14db05d..687f6d8 100644
#define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
diff --git a/fs/namei.c b/fs/namei.c
-index d8ee4da..d6bf55e 100644
+index 9c590e0..654baa99 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -336,17 +336,32 @@ int generic_permission(struct inode *inode, int mask)
@@ -84734,7 +100516,7 @@ index d8ee4da..d6bf55e 100644
}
EXPORT_SYMBOL(generic_permission);
@@ -514,12 +521,35 @@ struct nameidata {
- struct nameidata *saved;
+ struct inode *link_inode;
unsigned root_seq;
int dfd;
-};
@@ -84770,20 +100552,18 @@ index d8ee4da..d6bf55e 100644
p->dfd = dfd;
p->name = name;
p->total_link_count = old ? old->total_link_count : 0;
-@@ -538,6 +568,12 @@ static void restore_nameidata(void)
+@@ -536,6 +566,10 @@ static void restore_nameidata(void)
+ old->total_link_count = now->total_link_count;
+ if (now->stack != now->internal)
kfree(now->stack);
- now->stack = now->internal;
- }
+#ifdef CONFIG_GRKERNSEC_SYMLINKOWN
-+ if (now->symlinkown_stack != now->symlinkown_internal) {
++ if (now->symlinkown_stack != now->symlinkown_internal)
+ kfree(now->symlinkown_stack);
-+ now->symlinkown_stack = now->symlinkown_internal;
-+ }
+#endif
}
static int __nd_alloc_stack(struct nameidata *nd)
-@@ -557,6 +593,7 @@ static int __nd_alloc_stack(struct nameidata *nd)
+@@ -555,6 +589,7 @@ static int __nd_alloc_stack(struct nameidata *nd)
}
memcpy(p, nd->internal, sizeof(nd->internal));
nd->stack = p;
@@ -84791,7 +100571,7 @@ index d8ee4da..d6bf55e 100644
return 0;
}
-@@ -578,8 +615,32 @@ static bool path_connected(const struct path *path)
+@@ -576,8 +611,32 @@ static bool path_connected(const struct path *path)
return is_subdir(path->dentry, mnt->mnt_root);
}
@@ -84824,7 +100604,7 @@ index d8ee4da..d6bf55e 100644
if (likely(nd->depth != EMBEDDED_LEVELS))
return 0;
if (likely(nd->stack != nd->internal))
-@@ -608,6 +669,14 @@ static void terminate_walk(struct nameidata *nd)
+@@ -603,6 +662,14 @@ static void terminate_walk(struct nameidata *nd)
path_put(&nd->path);
for (i = 0; i < nd->depth; i++)
path_put(&nd->stack[i].link);
@@ -84839,7 +100619,7 @@ index d8ee4da..d6bf55e 100644
if (nd->root.mnt && !(nd->flags & LOOKUP_ROOT)) {
path_put(&nd->root);
nd->root.mnt = NULL;
-@@ -1001,6 +1070,9 @@ const char *get_link(struct nameidata *nd)
+@@ -1014,6 +1081,9 @@ const char *get_link(struct nameidata *nd)
if (unlikely(error))
return ERR_PTR(error);
@@ -84849,7 +100629,7 @@ index d8ee4da..d6bf55e 100644
nd->last_type = LAST_BIND;
res = inode->i_link;
if (!res) {
-@@ -1689,6 +1761,23 @@ static int pick_link(struct nameidata *nd, struct path *link,
+@@ -1690,6 +1760,23 @@ static int pick_link(struct nameidata *nd, struct path *link,
}
}
@@ -84872,8 +100652,8 @@ index d8ee4da..d6bf55e 100644
+
last = nd->stack + nd->depth++;
last->link = *link;
- last->cookie = NULL;
-@@ -1833,7 +1922,7 @@ EXPORT_SYMBOL(full_name_hash);
+ clear_delayed_call(&last->done);
+@@ -1834,7 +1921,7 @@ EXPORT_SYMBOL(full_name_hash);
static inline u64 hash_name(const char *name)
{
unsigned long a, b, adata, bdata, mask, hash, len;
@@ -84882,7 +100662,7 @@ index d8ee4da..d6bf55e 100644
hash = a = 0;
len = -sizeof(unsigned long);
-@@ -2001,6 +2090,10 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
+@@ -2002,6 +2089,10 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
nd->last_type = LAST_ROOT; /* if there are only slashes... */
nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
nd->depth = 0;
@@ -84893,7 +100673,7 @@ index d8ee4da..d6bf55e 100644
if (flags & LOOKUP_ROOT) {
struct dentry *root = nd->root.dentry;
struct inode *inode = root->d_inode;
-@@ -2138,6 +2231,14 @@ static int path_lookupat(struct nameidata *nd, unsigned flags, struct path *path
+@@ -2133,6 +2224,14 @@ static int path_lookupat(struct nameidata *nd, unsigned flags, struct path *path
if (!err)
err = complete_walk(nd);
@@ -84908,7 +100688,7 @@ index d8ee4da..d6bf55e 100644
if (!err && nd->flags & LOOKUP_DIRECTORY)
if (!d_can_lookup(nd->path.dentry))
err = -ENOTDIR;
-@@ -2186,6 +2287,14 @@ static int path_parentat(struct nameidata *nd, unsigned flags,
+@@ -2181,6 +2280,14 @@ static int path_parentat(struct nameidata *nd, unsigned flags,
err = link_path_walk(s, nd);
if (!err)
err = complete_walk(nd);
@@ -84923,7 +100703,7 @@ index d8ee4da..d6bf55e 100644
if (!err) {
*parent = nd->path;
nd->path.mnt = NULL;
-@@ -2717,6 +2826,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
+@@ -2779,6 +2886,13 @@ static int may_open(struct path *path, int acc_mode, int flag)
if (flag & O_NOATIME && !inode_owner_or_capable(inode))
return -EPERM;
@@ -84937,7 +100717,7 @@ index d8ee4da..d6bf55e 100644
return 0;
}
-@@ -2983,6 +3099,21 @@ static int lookup_open(struct nameidata *nd, struct path *path,
+@@ -3045,6 +3159,21 @@ static int lookup_open(struct nameidata *nd, struct path *path,
/* Negative dentry, just create the file */
if (!dentry->d_inode && (op->open_flag & O_CREAT)) {
umode_t mode = op->mode;
@@ -84959,7 +100739,7 @@ index d8ee4da..d6bf55e 100644
if (!IS_POSIXACL(dir->d_inode))
mode &= ~current_umask();
/*
-@@ -3004,6 +3135,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
+@@ -3066,6 +3195,8 @@ static int lookup_open(struct nameidata *nd, struct path *path,
nd->flags & LOOKUP_EXCL);
if (error)
goto out_dput;
@@ -84968,7 +100748,7 @@ index d8ee4da..d6bf55e 100644
}
out_no_open:
path->dentry = dentry;
-@@ -3109,11 +3242,24 @@ retry_lookup:
+@@ -3171,11 +3302,24 @@ retry_lookup:
goto finish_open_created;
}
@@ -84994,7 +100774,7 @@ index d8ee4da..d6bf55e 100644
/*
* If atomic_open() acquired write access it is dropped now due to
-@@ -3166,6 +3312,21 @@ finish_open:
+@@ -3228,6 +3372,21 @@ finish_open:
path_put(&save_parent);
return error;
}
@@ -85008,7 +100788,7 @@ index d8ee4da..d6bf55e 100644
+ if (error)
+ goto out;
+
-+ if (gr_handle_nameidata_symlinkowner(nd, inode)) {
++ if (gr_handle_nameidata_symlinkowner(nd, nd->inode)) {
+ error = -EACCES;
+ goto out;
+ }
@@ -85016,7 +100796,7 @@ index d8ee4da..d6bf55e 100644
audit_inode(nd->name, nd->path.dentry, 0);
if (unlikely(d_is_symlink(nd->path.dentry)) && !(open_flag & O_PATH)) {
error = -ELOOP;
-@@ -3440,9 +3601,11 @@ static struct dentry *filename_create(int dfd, struct filename *name,
+@@ -3503,9 +3662,11 @@ static struct dentry *filename_create(int dfd, struct filename *name,
goto unlock;
error = -EEXIST;
@@ -85030,7 +100810,7 @@ index d8ee4da..d6bf55e 100644
/*
* Special case - lookup gave negative, but... we had foo/bar/
* From the vfs_mknod() POV we just have a negative dentry -
-@@ -3496,6 +3659,20 @@ inline struct dentry *user_path_create(int dfd, const char __user *pathname,
+@@ -3559,6 +3720,20 @@ inline struct dentry *user_path_create(int dfd, const char __user *pathname,
}
EXPORT_SYMBOL(user_path_create);
@@ -85051,7 +100831,7 @@ index d8ee4da..d6bf55e 100644
int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
{
int error = may_create(dir, dentry);
-@@ -3559,6 +3736,17 @@ retry:
+@@ -3622,6 +3797,17 @@ retry:
if (!IS_POSIXACL(path.dentry->d_inode))
mode &= ~current_umask();
@@ -85069,7 +100849,7 @@ index d8ee4da..d6bf55e 100644
error = security_path_mknod(&path, dentry, mode, dev);
if (error)
goto out;
-@@ -3574,6 +3762,8 @@ retry:
+@@ -3637,6 +3823,8 @@ retry:
error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
break;
}
@@ -85078,7 +100858,7 @@ index d8ee4da..d6bf55e 100644
out:
done_path_create(&path, dentry);
if (retry_estale(error, lookup_flags)) {
-@@ -3628,9 +3818,16 @@ retry:
+@@ -3691,9 +3879,16 @@ retry:
if (!IS_POSIXACL(path.dentry->d_inode))
mode &= ~current_umask();
@@ -85095,7 +100875,7 @@ index d8ee4da..d6bf55e 100644
done_path_create(&path, dentry);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
-@@ -3663,7 +3860,7 @@ void dentry_unhash(struct dentry *dentry)
+@@ -3726,7 +3921,7 @@ void dentry_unhash(struct dentry *dentry)
{
shrink_dcache_parent(dentry);
spin_lock(&dentry->d_lock);
@@ -85104,7 +100884,7 @@ index d8ee4da..d6bf55e 100644
__d_drop(dentry);
spin_unlock(&dentry->d_lock);
}
-@@ -3716,6 +3913,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
+@@ -3779,6 +3974,8 @@ static long do_rmdir(int dfd, const char __user *pathname)
struct path path;
struct qstr last;
int type;
@@ -85113,7 +100893,7 @@ index d8ee4da..d6bf55e 100644
unsigned int lookup_flags = 0;
retry:
name = user_path_parent(dfd, pathname,
-@@ -3748,10 +3947,20 @@ retry:
+@@ -3811,10 +4008,20 @@ retry:
error = -ENOENT;
goto exit3;
}
@@ -85134,7 +100914,7 @@ index d8ee4da..d6bf55e 100644
exit3:
dput(dentry);
exit2:
-@@ -3846,6 +4055,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
+@@ -3909,6 +4116,8 @@ static long do_unlinkat(int dfd, const char __user *pathname)
int type;
struct inode *inode = NULL;
struct inode *delegated_inode = NULL;
@@ -85143,7 +100923,7 @@ index d8ee4da..d6bf55e 100644
unsigned int lookup_flags = 0;
retry:
name = user_path_parent(dfd, pathname,
-@@ -3872,10 +4083,21 @@ retry_deleg:
+@@ -3935,10 +4144,21 @@ retry_deleg:
if (d_is_negative(dentry))
goto slashes;
ihold(inode);
@@ -85165,7 +100945,7 @@ index d8ee4da..d6bf55e 100644
exit2:
dput(dentry);
}
-@@ -3964,9 +4186,17 @@ retry:
+@@ -4027,9 +4247,17 @@ retry:
if (IS_ERR(dentry))
goto out_putname;
@@ -85183,7 +100963,7 @@ index d8ee4da..d6bf55e 100644
done_path_create(&path, dentry);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
-@@ -4070,6 +4300,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
+@@ -4133,6 +4361,7 @@ SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname,
struct dentry *new_dentry;
struct path old_path, new_path;
struct inode *delegated_inode = NULL;
@@ -85191,7 +100971,7 @@ index d8ee4da..d6bf55e 100644
int how = 0;
int error;
-@@ -4093,7 +4324,7 @@ retry:
+@@ -4156,7 +4385,7 @@ retry:
if (error)
return error;
@@ -85200,7 +100980,7 @@ index d8ee4da..d6bf55e 100644
(how & LOOKUP_REVAL));
error = PTR_ERR(new_dentry);
if (IS_ERR(new_dentry))
-@@ -4105,11 +4336,26 @@ retry:
+@@ -4168,11 +4397,26 @@ retry:
error = may_linkat(&old_path);
if (unlikely(error))
goto out_dput;
@@ -85227,7 +101007,7 @@ index d8ee4da..d6bf55e 100644
done_path_create(&new_path, new_dentry);
if (delegated_inode) {
error = break_deleg_wait(&delegated_inode);
-@@ -4424,6 +4670,20 @@ retry_deleg:
+@@ -4487,6 +4731,20 @@ retry_deleg:
if (new_dentry == trap)
goto exit5;
@@ -85248,7 +101028,7 @@ index d8ee4da..d6bf55e 100644
error = security_path_rename(&old_path, old_dentry,
&new_path, new_dentry, flags);
if (error)
-@@ -4431,6 +4691,9 @@ retry_deleg:
+@@ -4494,6 +4752,9 @@ retry_deleg:
error = vfs_rename(old_path.dentry->d_inode, old_dentry,
new_path.dentry->d_inode, new_dentry,
&delegated_inode, flags);
@@ -85258,7 +101038,7 @@ index d8ee4da..d6bf55e 100644
exit5:
dput(new_dentry);
exit4:
-@@ -4487,14 +4750,24 @@ EXPORT_SYMBOL(vfs_whiteout);
+@@ -4550,14 +4811,24 @@ EXPORT_SYMBOL(vfs_whiteout);
int readlink_copy(char __user *buffer, int buflen, const char *link)
{
@@ -85285,7 +101065,7 @@ index d8ee4da..d6bf55e 100644
out:
return len;
diff --git a/fs/namespace.c b/fs/namespace.c
-index 0570729..9de781d 100644
+index 4fb1691..a518f2e0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1516,6 +1516,9 @@ static int do_umount(struct mount *mnt, int flags)
@@ -85308,7 +101088,7 @@ index 0570729..9de781d 100644
return retval;
}
-@@ -1592,7 +1598,7 @@ static inline bool may_mount(void)
+@@ -1600,7 +1606,7 @@ static inline bool may_mandlock(void)
* unixes. Our API is identical to OSF/1 to avoid making a mess of AMD
*/
@@ -85317,7 +101097,7 @@ index 0570729..9de781d 100644
{
struct path path;
struct mount *mnt;
-@@ -1637,7 +1643,7 @@ out:
+@@ -1645,7 +1651,7 @@ out:
/*
* The 2.0 compatible umount. No flags.
*/
@@ -85326,7 +101106,7 @@ index 0570729..9de781d 100644
{
return sys_umount(name, 0);
}
-@@ -2712,6 +2718,16 @@ long do_mount(const char *dev_name, const char __user *dir_name,
+@@ -2721,6 +2727,16 @@ long do_mount(const char *dev_name, const char __user *dir_name,
MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
MS_STRICTATIME);
@@ -85343,7 +101123,7 @@ index 0570729..9de781d 100644
if (flags & MS_REMOUNT)
retval = do_remount(&path, flags & ~MS_REMOUNT, mnt_flags,
data_page);
-@@ -2725,7 +2741,10 @@ long do_mount(const char *dev_name, const char __user *dir_name,
+@@ -2734,7 +2750,10 @@ long do_mount(const char *dev_name, const char __user *dir_name,
retval = do_new_mount(&path, type_page, flags, mnt_flags,
dev_name, data_page);
dput_out:
@@ -85354,7 +101134,7 @@ index 0570729..9de781d 100644
return retval;
}
-@@ -2743,7 +2762,7 @@ static void free_mnt_ns(struct mnt_namespace *ns)
+@@ -2752,7 +2771,7 @@ static void free_mnt_ns(struct mnt_namespace *ns)
* number incrementing at 10Ghz will take 12,427 years to wrap which
* is effectively never, so we can ignore the possibility.
*/
@@ -85363,7 +101143,7 @@ index 0570729..9de781d 100644
static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
{
-@@ -2759,7 +2778,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
+@@ -2768,7 +2787,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
return ERR_PTR(ret);
}
new_ns->ns.ops = &mntns_operations;
@@ -85372,7 +101152,7 @@ index 0570729..9de781d 100644
atomic_set(&new_ns->count, 1);
new_ns->root = NULL;
INIT_LIST_HEAD(&new_ns->list);
-@@ -2769,7 +2788,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
+@@ -2778,7 +2797,7 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns)
return new_ns;
}
@@ -85381,7 +101161,7 @@ index 0570729..9de781d 100644
struct user_namespace *user_ns, struct fs_struct *new_fs)
{
struct mnt_namespace *new_ns;
-@@ -2890,8 +2909,8 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
+@@ -2899,8 +2918,8 @@ struct dentry *mount_subtree(struct vfsmount *mnt, const char *name)
}
EXPORT_SYMBOL(mount_subtree);
@@ -85392,7 +101172,7 @@ index 0570729..9de781d 100644
{
int ret;
char *kernel_type;
-@@ -2997,6 +3016,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
+@@ -3006,6 +3025,11 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
if (error)
goto out2;
@@ -85404,7 +101184,7 @@ index 0570729..9de781d 100644
get_fs_root(current->fs, &root);
old_mp = lock_mount(&old);
error = PTR_ERR(old_mp);
-@@ -3315,7 +3339,7 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
+@@ -3324,7 +3348,7 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
!ns_capable(current_user_ns(), CAP_SYS_ADMIN))
return -EPERM;
@@ -85413,8 +101193,160 @@ index 0570729..9de781d 100644
return -EINVAL;
get_mnt_ns(mnt_ns);
+diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h
+index ff8195b..d82456d 100644
+--- a/fs/nfs/callback.h
++++ b/fs/nfs/callback.h
+@@ -113,8 +113,8 @@ struct cb_sequenceres {
+ uint32_t csr_target_highestslotid;
+ };
+
+-extern __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
+- struct cb_sequenceres *res,
++extern __be32 nfs4_callback_sequence(void *_args,
++ void *_res,
+ struct cb_process_state *cps);
+
+ #define RCA4_TYPE_MASK_RDATA_DLG 0
+@@ -133,14 +133,14 @@ struct cb_recallanyargs {
+ uint32_t craa_type_mask;
+ };
+
+-extern __be32 nfs4_callback_recallany(struct cb_recallanyargs *args,
++extern __be32 nfs4_callback_recallany(void *_args,
+ void *dummy,
+ struct cb_process_state *cps);
+
+ struct cb_recallslotargs {
+ uint32_t crsa_target_highest_slotid;
+ };
+-extern __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args,
++extern __be32 nfs4_callback_recallslot(void *_args,
+ void *dummy,
+ struct cb_process_state *cps);
+
+@@ -159,7 +159,7 @@ struct cb_layoutrecallargs {
+ };
+
+ extern __be32 nfs4_callback_layoutrecall(
+- struct cb_layoutrecallargs *args,
++ void *_args,
+ void *dummy, struct cb_process_state *cps);
+
+ struct cb_devicenotifyitem {
+@@ -175,15 +175,15 @@ struct cb_devicenotifyargs {
+ };
+
+ extern __be32 nfs4_callback_devicenotify(
+- struct cb_devicenotifyargs *args,
++ void *_args,
+ void *dummy, struct cb_process_state *cps);
+
+ #endif /* CONFIG_NFS_V4_1 */
+ extern int check_gss_callback_principal(struct nfs_client *, struct svc_rqst *);
+-extern __be32 nfs4_callback_getattr(struct cb_getattrargs *args,
+- struct cb_getattrres *res,
++extern __be32 nfs4_callback_getattr(void *args,
++ void *res,
+ struct cb_process_state *cps);
+-extern __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy,
++extern __be32 nfs4_callback_recall(void *args, void *dummy,
+ struct cb_process_state *cps);
+ #if IS_ENABLED(CONFIG_NFS_V4)
+ extern int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt);
+diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
+index f0939d0..fc277c6 100644
+--- a/fs/nfs/callback_proc.c
++++ b/fs/nfs/callback_proc.c
+@@ -19,10 +19,12 @@
+
+ #define NFSDBG_FACILITY NFSDBG_CALLBACK
+
+-__be32 nfs4_callback_getattr(struct cb_getattrargs *args,
+- struct cb_getattrres *res,
++__be32 nfs4_callback_getattr(void *_args,
++ void *_res,
+ struct cb_process_state *cps)
+ {
++ struct cb_getattrargs *args = _args;
++ struct cb_getattrres *res = _res;
+ struct nfs_delegation *delegation;
+ struct nfs_inode *nfsi;
+ struct inode *inode;
+@@ -68,9 +70,10 @@ out:
+ return res->status;
+ }
+
+-__be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy,
++__be32 nfs4_callback_recall(void *_args, void *dummy,
+ struct cb_process_state *cps)
+ {
++ struct cb_recallargs *args = _args;
+ struct inode *inode;
+ __be32 res;
+
+@@ -269,7 +272,7 @@ static u32 do_callback_layoutrecall(struct nfs_client *clp,
+
+ }
+
+-__be32 nfs4_callback_layoutrecall(struct cb_layoutrecallargs *args,
++__be32 nfs4_callback_layoutrecall(void *args,
+ void *dummy, struct cb_process_state *cps)
+ {
+ u32 res;
+@@ -296,9 +299,10 @@ static void pnfs_recall_all_layouts(struct nfs_client *clp)
+ do_callback_layoutrecall(clp, &args);
+ }
+
+-__be32 nfs4_callback_devicenotify(struct cb_devicenotifyargs *args,
++__be32 nfs4_callback_devicenotify(void *_args,
+ void *dummy, struct cb_process_state *cps)
+ {
++ struct cb_devicenotifyargs *args = _args;
+ int i;
+ __be32 res = 0;
+ struct nfs_client *clp = cps->clp;
+@@ -452,10 +456,12 @@ out:
+ return status;
+ }
+
+-__be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
+- struct cb_sequenceres *res,
++__be32 nfs4_callback_sequence(void *_args,
++ void *_res,
+ struct cb_process_state *cps)
+ {
++ struct cb_sequenceargs *args = _args;
++ struct cb_sequenceres *res = _res;
+ struct nfs4_slot_table *tbl;
+ struct nfs4_slot *slot;
+ struct nfs_client *clp;
+@@ -541,9 +547,10 @@ validate_bitmap_values(unsigned long mask)
+ return (mask & ~RCA4_TYPE_MASK_ALL) == 0;
+ }
+
+-__be32 nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy,
++__be32 nfs4_callback_recallany(void *_args, void *dummy,
+ struct cb_process_state *cps)
+ {
++ struct cb_recallanyargs *args = _args;
+ __be32 status;
+ fmode_t flags = 0;
+
+@@ -576,9 +583,10 @@ out:
+ }
+
+ /* Reduce the fore channel's max_slots to the target value */
+-__be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
++__be32 nfs4_callback_recallslot(void *_args, void *dummy,
+ struct cb_process_state *cps)
+ {
++ struct cb_recallslotargs *args = _args;
+ struct nfs4_slot_table *fc_tbl;
+ __be32 status;
+
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
-index 646cdac..cdfa595 100644
+index 646cdac..9cb55a2 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -53,7 +53,7 @@ struct callback_op {
@@ -85426,11 +101358,226 @@ index 646cdac..cdfa595 100644
static struct callback_op callback_ops[];
+@@ -62,12 +62,12 @@ static __be32 nfs4_callback_null(struct svc_rqst *rqstp, void *argp, void *resp)
+ return htonl(NFS4_OK);
+ }
+
+-static int nfs4_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++static int nfs4_decode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_argsize_check(rqstp, p);
+ }
+
+-static int nfs4_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++static int nfs4_encode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_ressize_check(rqstp, p);
+ }
+@@ -193,8 +193,9 @@ static __be32 decode_op_hdr(struct xdr_stream *xdr, unsigned int *op)
+ return 0;
+ }
+
+-static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_getattrargs *args)
++static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, void *_args)
+ {
++ struct cb_getattrargs *args = _args;
+ __be32 status;
+
+ status = decode_fh(xdr, &args->fh);
+@@ -206,8 +207,9 @@ out:
+ return status;
+ }
+
+-static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, struct cb_recallargs *args)
++static __be32 decode_recall_args(struct svc_rqst *rqstp, struct xdr_stream *xdr, void *_args)
+ {
++ struct cb_recallargs *args = _args;
+ __be32 *p;
+ __be32 status;
+
+@@ -230,8 +232,9 @@ out:
+
+ static __be32 decode_layoutrecall_args(struct svc_rqst *rqstp,
+ struct xdr_stream *xdr,
+- struct cb_layoutrecallargs *args)
++ void *_args)
+ {
++ struct cb_layoutrecallargs *args = _args;
+ __be32 *p;
+ __be32 status = 0;
+ uint32_t iomode;
+@@ -290,8 +293,9 @@ out:
+ static
+ __be32 decode_devicenotify_args(struct svc_rqst *rqstp,
+ struct xdr_stream *xdr,
+- struct cb_devicenotifyargs *args)
++ void *_args)
+ {
++ struct cb_devicenotifyargs *args = _args;
+ __be32 *p;
+ __be32 status = 0;
+ u32 tmp;
+@@ -431,8 +435,9 @@ out:
+
+ static __be32 decode_cb_sequence_args(struct svc_rqst *rqstp,
+ struct xdr_stream *xdr,
+- struct cb_sequenceargs *args)
++ void *_args)
+ {
++ struct cb_sequenceargs *args = _args;
+ __be32 *p;
+ int i;
+ __be32 status;
+@@ -493,8 +498,9 @@ out_free:
+
+ static __be32 decode_recallany_args(struct svc_rqst *rqstp,
+ struct xdr_stream *xdr,
+- struct cb_recallanyargs *args)
++ void *_args)
+ {
++ struct cb_recallanyargs *args = _args;
+ uint32_t bitmap[2];
+ __be32 *p, status;
+
+@@ -512,8 +518,9 @@ static __be32 decode_recallany_args(struct svc_rqst *rqstp,
+
+ static __be32 decode_recallslot_args(struct svc_rqst *rqstp,
+ struct xdr_stream *xdr,
+- struct cb_recallslotargs *args)
++ void *_args)
+ {
++ struct cb_recallslotargs *args = _args;
+ __be32 *p;
+
+ p = read_buf(xdr, 4);
+@@ -648,8 +655,9 @@ static __be32 encode_op_hdr(struct xdr_stream *xdr, uint32_t op, __be32 res)
+ return 0;
+ }
+
+-static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, const struct cb_getattrres *res)
++static __be32 encode_getattr_res(struct svc_rqst *rqstp, struct xdr_stream *xdr, void *_res)
+ {
++ const struct cb_getattrres *res = _res;
+ __be32 *savep = NULL;
+ __be32 status = res->status;
+
+@@ -691,8 +699,9 @@ static __be32 encode_sessionid(struct xdr_stream *xdr,
+
+ static __be32 encode_cb_sequence_res(struct svc_rqst *rqstp,
+ struct xdr_stream *xdr,
+- const struct cb_sequenceres *res)
++ void *_res)
+ {
++ const struct cb_sequenceres *res = _res;
+ __be32 *p;
+ __be32 status = res->csr_status;
+
+@@ -950,43 +959,41 @@ static struct callback_op callback_ops[] = {
+ .res_maxsize = CB_OP_HDR_RES_MAXSZ,
+ },
+ [OP_CB_GETATTR] = {
+- .process_op = (callback_process_op_t)nfs4_callback_getattr,
+- .decode_args = (callback_decode_arg_t)decode_getattr_args,
+- .encode_res = (callback_encode_res_t)encode_getattr_res,
++ .process_op = nfs4_callback_getattr,
++ .decode_args = decode_getattr_args,
++ .encode_res = encode_getattr_res,
+ .res_maxsize = CB_OP_GETATTR_RES_MAXSZ,
+ },
+ [OP_CB_RECALL] = {
+- .process_op = (callback_process_op_t)nfs4_callback_recall,
+- .decode_args = (callback_decode_arg_t)decode_recall_args,
++ .process_op = nfs4_callback_recall,
++ .decode_args = decode_recall_args,
+ .res_maxsize = CB_OP_RECALL_RES_MAXSZ,
+ },
+ #if defined(CONFIG_NFS_V4_1)
+ [OP_CB_LAYOUTRECALL] = {
+- .process_op = (callback_process_op_t)nfs4_callback_layoutrecall,
+- .decode_args =
+- (callback_decode_arg_t)decode_layoutrecall_args,
++ .process_op = nfs4_callback_layoutrecall,
++ .decode_args = decode_layoutrecall_args,
+ .res_maxsize = CB_OP_LAYOUTRECALL_RES_MAXSZ,
+ },
+ [OP_CB_NOTIFY_DEVICEID] = {
+- .process_op = (callback_process_op_t)nfs4_callback_devicenotify,
+- .decode_args =
+- (callback_decode_arg_t)decode_devicenotify_args,
++ .process_op = nfs4_callback_devicenotify,
++ .decode_args = decode_devicenotify_args,
+ .res_maxsize = CB_OP_DEVICENOTIFY_RES_MAXSZ,
+ },
+ [OP_CB_SEQUENCE] = {
+- .process_op = (callback_process_op_t)nfs4_callback_sequence,
+- .decode_args = (callback_decode_arg_t)decode_cb_sequence_args,
+- .encode_res = (callback_encode_res_t)encode_cb_sequence_res,
++ .process_op = nfs4_callback_sequence,
++ .decode_args = decode_cb_sequence_args,
++ .encode_res = encode_cb_sequence_res,
+ .res_maxsize = CB_OP_SEQUENCE_RES_MAXSZ,
+ },
+ [OP_CB_RECALL_ANY] = {
+- .process_op = (callback_process_op_t)nfs4_callback_recallany,
+- .decode_args = (callback_decode_arg_t)decode_recallany_args,
++ .process_op = nfs4_callback_recallany,
++ .decode_args = decode_recallany_args,
+ .res_maxsize = CB_OP_RECALLANY_RES_MAXSZ,
+ },
+ [OP_CB_RECALL_SLOT] = {
+- .process_op = (callback_process_op_t)nfs4_callback_recallslot,
+- .decode_args = (callback_decode_arg_t)decode_recallslot_args,
++ .process_op = nfs4_callback_recallslot,
++ .decode_args = decode_recallslot_args,
+ .res_maxsize = CB_OP_RECALLSLOT_RES_MAXSZ,
+ },
+ #endif /* CONFIG_NFS_V4_1 */
+@@ -998,13 +1005,13 @@ static struct callback_op callback_ops[] = {
+ static struct svc_procedure nfs4_callback_procedures1[] = {
+ [CB_NULL] = {
+ .pc_func = nfs4_callback_null,
+- .pc_decode = (kxdrproc_t)nfs4_decode_void,
+- .pc_encode = (kxdrproc_t)nfs4_encode_void,
++ .pc_decode = nfs4_decode_void,
++ .pc_encode = nfs4_encode_void,
+ .pc_xdrressize = 1,
+ },
+ [CB_COMPOUND] = {
+ .pc_func = nfs4_callback_compound,
+- .pc_encode = (kxdrproc_t)nfs4_encode_void,
++ .pc_encode = nfs4_encode_void,
+ .pc_argsize = 256,
+ .pc_ressize = 256,
+ .pc_xdrressize = NFS4_CALLBACK_BUFSIZE,
+diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
+index 7ded177..593782f 100644
+--- a/fs/nfs/dir.c
++++ b/fs/nfs/dir.c
+@@ -681,8 +681,9 @@ out:
+ * We only need to convert from xdr once so future lookups are much simpler
+ */
+ static
+-int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page* page)
++int nfs_readdir_filler(struct file *_desc, struct page* page)
+ {
++ nfs_readdir_descriptor_t *desc = (nfs_readdir_descriptor_t *)_desc;
+ struct inode *inode = file_inode(desc->file);
+ int ret;
+
+@@ -715,7 +716,7 @@ static
+ struct page *get_cache_page(nfs_readdir_descriptor_t *desc)
+ {
+ return read_cache_page(file_inode(desc->file)->i_mapping,
+- desc->page_index, (filler_t *)nfs_readdir_filler, desc);
++ desc->page_index, nfs_readdir_filler, desc);
+ }
+
+ /*
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
-index f714b98..352e5f8 100644
+index 847b678..bd0b3e7 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
-@@ -1284,16 +1284,16 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
+@@ -1318,16 +1318,16 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
return 0;
}
@@ -85451,7 +101598,7 @@ index f714b98..352e5f8 100644
EXPORT_SYMBOL_GPL(nfs_inc_attr_generation_counter);
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
-index 9dea85f..ceb98c9 100644
+index 9a547aa..898fa60 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -612,9 +612,10 @@ unsigned long nfs_block_size(unsigned long bsize, unsigned char *nrbitsp)
@@ -85467,11 +101614,4269 @@ index 9dea85f..ceb98c9 100644
}
/*
+diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
+index 09b1900..344f4c2 100644
+--- a/fs/nfs/mount_clnt.c
++++ b/fs/nfs/mount_clnt.c
+@@ -303,8 +303,8 @@ static void encode_mntdirpath(struct xdr_stream *xdr, const char *pathname)
+ xdr_encode_opaque(p, pathname, pathname_len);
+ }
+
+-static void mnt_xdr_enc_dirpath(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const char *dirpath)
++static void mnt_xdr_enc_dirpath(void *req, struct xdr_stream *xdr,
++ void *dirpath)
+ {
+ encode_mntdirpath(xdr, dirpath);
+ }
+@@ -355,10 +355,11 @@ static int decode_fhandle(struct xdr_stream *xdr, struct mountres *res)
+ return 0;
+ }
+
+-static int mnt_xdr_dec_mountres(struct rpc_rqst *req,
++static int mnt_xdr_dec_mountres(void *req,
+ struct xdr_stream *xdr,
+- struct mountres *res)
++ void *_res)
+ {
++ struct mountres *res = _res;
+ int status;
+
+ status = decode_status(xdr, res);
+@@ -447,10 +448,11 @@ static int decode_auth_flavors(struct xdr_stream *xdr, struct mountres *res)
+ return 0;
+ }
+
+-static int mnt_xdr_dec_mountres3(struct rpc_rqst *req,
++static int mnt_xdr_dec_mountres3(void *req,
+ struct xdr_stream *xdr,
+- struct mountres *res)
++ void *_res)
+ {
++ struct mountres *res = _res;
+ int status;
+
+ status = decode_fhs_status(xdr, res);
+@@ -467,8 +469,8 @@ static int mnt_xdr_dec_mountres3(struct rpc_rqst *req,
+ static struct rpc_procinfo mnt_procedures[] = {
+ [MOUNTPROC_MNT] = {
+ .p_proc = MOUNTPROC_MNT,
+- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
+- .p_decode = (kxdrdproc_t)mnt_xdr_dec_mountres,
++ .p_encode = mnt_xdr_enc_dirpath,
++ .p_decode = mnt_xdr_dec_mountres,
+ .p_arglen = MNT_enc_dirpath_sz,
+ .p_replen = MNT_dec_mountres_sz,
+ .p_statidx = MOUNTPROC_MNT,
+@@ -476,7 +478,7 @@ static struct rpc_procinfo mnt_procedures[] = {
+ },
+ [MOUNTPROC_UMNT] = {
+ .p_proc = MOUNTPROC_UMNT,
+- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
++ .p_encode = mnt_xdr_enc_dirpath,
+ .p_arglen = MNT_enc_dirpath_sz,
+ .p_statidx = MOUNTPROC_UMNT,
+ .p_name = "UMOUNT",
+@@ -486,8 +488,8 @@ static struct rpc_procinfo mnt_procedures[] = {
+ static struct rpc_procinfo mnt3_procedures[] = {
+ [MOUNTPROC3_MNT] = {
+ .p_proc = MOUNTPROC3_MNT,
+- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
+- .p_decode = (kxdrdproc_t)mnt_xdr_dec_mountres3,
++ .p_encode = mnt_xdr_enc_dirpath,
++ .p_decode = mnt_xdr_dec_mountres3,
+ .p_arglen = MNT_enc_dirpath_sz,
+ .p_replen = MNT_dec_mountres3_sz,
+ .p_statidx = MOUNTPROC3_MNT,
+@@ -495,7 +497,7 @@ static struct rpc_procinfo mnt3_procedures[] = {
+ },
+ [MOUNTPROC3_UMNT] = {
+ .p_proc = MOUNTPROC3_UMNT,
+- .p_encode = (kxdreproc_t)mnt_xdr_enc_dirpath,
++ .p_encode = mnt_xdr_enc_dirpath,
+ .p_arglen = MNT_enc_dirpath_sz,
+ .p_statidx = MOUNTPROC3_UMNT,
+ .p_name = "UMOUNT",
+diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
+index b4e03ed..6907eb4 100644
+--- a/fs/nfs/nfs2xdr.c
++++ b/fs/nfs/nfs2xdr.c
+@@ -566,9 +566,9 @@ out_default:
+ * "NFS: Network File System Protocol Specification".
+ */
+
+-static void nfs2_xdr_enc_fhandle(struct rpc_rqst *req,
++static void nfs2_xdr_enc_fhandle(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_fh *fh)
++ void *fh)
+ {
+ encode_fhandle(xdr, fh);
+ }
+@@ -581,25 +581,31 @@ static void nfs2_xdr_enc_fhandle(struct rpc_rqst *req,
+ * sattr attributes;
+ * };
+ */
+-static void nfs2_xdr_enc_sattrargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_sattrargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_sattrargs *args)
++ void *_args)
+ {
++ const struct nfs_sattrargs *args = _args;
++
+ encode_fhandle(xdr, args->fh);
+ encode_sattr(xdr, args->sattr);
+ }
+
+-static void nfs2_xdr_enc_diropargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_diropargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_diropargs *args)
++ void *_args)
+ {
++ const struct nfs_diropargs *args = _args;
++
+ encode_diropargs(xdr, args->fh, args->name, args->len);
+ }
+
+-static void nfs2_xdr_enc_readlinkargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_readlinkargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_readlinkargs *args)
++ void *_args)
+ {
++ const struct nfs_readlinkargs *args = _args;
++
+ encode_fhandle(xdr, args->fh);
+ prepare_reply_buffer(req, args->pages, args->pgbase,
+ args->pglen, NFS_readlinkres_sz);
+@@ -630,10 +636,13 @@ static void encode_readargs(struct xdr_stream *xdr,
+ *p = cpu_to_be32(count);
+ }
+
+-static void nfs2_xdr_enc_readargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_readargs(void *_req,
+ struct xdr_stream *xdr,
+- const struct nfs_pgio_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ const struct nfs_pgio_args *args = _args;
++
+ encode_readargs(xdr, args);
+ prepare_reply_buffer(req, args->pages, args->pgbase,
+ args->count, NFS_readres_sz);
+@@ -670,9 +679,9 @@ static void encode_writeargs(struct xdr_stream *xdr,
+ xdr_write_pages(xdr, args->pages, args->pgbase, count);
+ }
+
+-static void nfs2_xdr_enc_writeargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_writeargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_pgio_args *args)
++ void *args)
+ {
+ encode_writeargs(xdr, args);
+ xdr->buf->flags |= XDRBUF_WRITE;
+@@ -686,18 +695,22 @@ static void nfs2_xdr_enc_writeargs(struct rpc_rqst *req,
+ * sattr attributes;
+ * };
+ */
+-static void nfs2_xdr_enc_createargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_createargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_createargs *args)
++ void *_args)
+ {
++ const struct nfs_createargs *args = _args;
++
+ encode_diropargs(xdr, args->fh, args->name, args->len);
+ encode_sattr(xdr, args->sattr);
+ }
+
+-static void nfs2_xdr_enc_removeargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_removeargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_removeargs *args)
++ void *_args)
+ {
++ const struct nfs_removeargs *args = _args;
++
+ encode_diropargs(xdr, args->fh, args->name.name, args->name.len);
+ }
+
+@@ -709,10 +722,11 @@ static void nfs2_xdr_enc_removeargs(struct rpc_rqst *req,
+ * diropargs to;
+ * };
+ */
+-static void nfs2_xdr_enc_renameargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_renameargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_renameargs *args)
++ void *_args)
+ {
++ const struct nfs_renameargs *args = _args;
+ const struct qstr *old = args->old_name;
+ const struct qstr *new = args->new_name;
+
+@@ -728,10 +742,12 @@ static void nfs2_xdr_enc_renameargs(struct rpc_rqst *req,
+ * diropargs to;
+ * };
+ */
+-static void nfs2_xdr_enc_linkargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_linkargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_linkargs *args)
++ void *_args)
+ {
++ const struct nfs_linkargs *args = _args;
++
+ encode_fhandle(xdr, args->fromfh);
+ encode_diropargs(xdr, args->tofh, args->toname, args->tolen);
+ }
+@@ -745,10 +761,12 @@ static void nfs2_xdr_enc_linkargs(struct rpc_rqst *req,
+ * sattr attributes;
+ * };
+ */
+-static void nfs2_xdr_enc_symlinkargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_symlinkargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_symlinkargs *args)
++ void *_args)
+ {
++ const struct nfs_symlinkargs *args = _args;
++
+ encode_diropargs(xdr, args->fromfh, args->fromname, args->fromlen);
+ encode_path(xdr, args->pages, args->pathlen);
+ encode_sattr(xdr, args->sattr);
+@@ -775,10 +793,12 @@ static void encode_readdirargs(struct xdr_stream *xdr,
+ *p = cpu_to_be32(args->count);
+ }
+
+-static void nfs2_xdr_enc_readdirargs(struct rpc_rqst *req,
++static void nfs2_xdr_enc_readdirargs(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_readdirargs *args)
++ void *_args)
+ {
++ const struct nfs_readdirargs *args = _args;
++
+ encode_readdirargs(xdr, args);
+ prepare_reply_buffer(req, args->pages, 0,
+ args->count, NFS_readdirres_sz);
+@@ -791,7 +811,7 @@ static void nfs2_xdr_enc_readdirargs(struct rpc_rqst *req,
+ * "NFS: Network File System Protocol Specification".
+ */
+
+-static int nfs2_xdr_dec_stat(struct rpc_rqst *req, struct xdr_stream *xdr,
++static int nfs2_xdr_dec_stat(void *req, struct xdr_stream *xdr,
+ void *__unused)
+ {
+ enum nfs_stat status;
+@@ -808,14 +828,14 @@ out_default:
+ return nfs_stat_to_errno(status);
+ }
+
+-static int nfs2_xdr_dec_attrstat(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_fattr *result)
++static int nfs2_xdr_dec_attrstat(void *req, struct xdr_stream *xdr,
++ void *result)
+ {
+ return decode_attrstat(xdr, result, NULL);
+ }
+
+-static int nfs2_xdr_dec_diropres(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_diropok *result)
++static int nfs2_xdr_dec_diropres(void *req, struct xdr_stream *xdr,
++ void *result)
+ {
+ return decode_diropres(xdr, result);
+ }
+@@ -830,7 +850,7 @@ static int nfs2_xdr_dec_diropres(struct rpc_rqst *req, struct xdr_stream *xdr,
+ * void;
+ * };
+ */
+-static int nfs2_xdr_dec_readlinkres(struct rpc_rqst *req,
++static int nfs2_xdr_dec_readlinkres(void *req,
+ struct xdr_stream *xdr, void *__unused)
+ {
+ enum nfs_stat status;
+@@ -859,9 +879,10 @@ out_default:
+ * void;
+ * };
+ */
+-static int nfs2_xdr_dec_readres(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_pgio_res *result)
++static int nfs2_xdr_dec_readres(void *req, struct xdr_stream *xdr,
++ void *_result)
+ {
++ struct nfs_pgio_res *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -881,9 +902,11 @@ out_default:
+ return nfs_stat_to_errno(status);
+ }
+
+-static int nfs2_xdr_dec_writeres(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_pgio_res *result)
++static int nfs2_xdr_dec_writeres(void *req, struct xdr_stream *xdr,
++ void *_result)
+ {
++ struct nfs_pgio_res *result = _result;
++
+ /* All NFSv2 writes are "file sync" writes */
+ result->verf->committed = NFS_FILE_SYNC;
+ return decode_attrstat(xdr, result->fattr, &result->op_status);
+@@ -981,7 +1004,7 @@ static int decode_readdirok(struct xdr_stream *xdr)
+ return xdr_read_pages(xdr, xdr->buf->page_len);
+ }
+
+-static int nfs2_xdr_dec_readdirres(struct rpc_rqst *req,
++static int nfs2_xdr_dec_readdirres(void *req,
+ struct xdr_stream *xdr, void *__unused)
+ {
+ enum nfs_stat status;
+@@ -1033,8 +1056,8 @@ out_overflow:
+ return -EIO;
+ }
+
+-static int nfs2_xdr_dec_statfsres(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs2_fsstat *result)
++static int nfs2_xdr_dec_statfsres(void *req, struct xdr_stream *xdr,
++ void *result)
+ {
+ enum nfs_stat status;
+ int error;
+@@ -1118,8 +1141,8 @@ static int nfs_stat_to_errno(enum nfs_stat status)
+ #define PROC(proc, argtype, restype, timer) \
+ [NFSPROC_##proc] = { \
+ .p_proc = NFSPROC_##proc, \
+- .p_encode = (kxdreproc_t)nfs2_xdr_enc_##argtype, \
+- .p_decode = (kxdrdproc_t)nfs2_xdr_dec_##restype, \
++ .p_encode = nfs2_xdr_enc_##argtype, \
++ .p_decode = nfs2_xdr_dec_##restype, \
+ .p_arglen = NFS_##argtype##_sz, \
+ .p_replen = NFS_##restype##_sz, \
+ .p_timer = timer, \
+diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
+index 267126d..19c97b8 100644
+--- a/fs/nfs/nfs3xdr.c
++++ b/fs/nfs/nfs3xdr.c
+@@ -844,9 +844,9 @@ static void encode_diropargs3(struct xdr_stream *xdr, const struct nfs_fh *fh,
+ * nfs_fh3 object;
+ * };
+ */
+-static void nfs3_xdr_enc_getattr3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_getattr3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_fh *fh)
++ void *fh)
+ {
+ encode_nfs_fh3(xdr, fh);
+ }
+@@ -882,10 +882,12 @@ static void encode_sattrguard3(struct xdr_stream *xdr,
+ }
+ }
+
+-static void nfs3_xdr_enc_setattr3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_setattr3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_sattrargs *args)
++ void *_args)
+ {
++ const struct nfs3_sattrargs *args = _args;
++
+ encode_nfs_fh3(xdr, args->fh);
+ encode_sattr3(xdr, args->sattr);
+ encode_sattrguard3(xdr, args);
+@@ -898,10 +900,12 @@ static void nfs3_xdr_enc_setattr3args(struct rpc_rqst *req,
+ * diropargs3 what;
+ * };
+ */
+-static void nfs3_xdr_enc_lookup3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_lookup3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_diropargs *args)
++ void *_args)
+ {
++ const struct nfs3_diropargs *args = _args;
++
+ encode_diropargs3(xdr, args->fh, args->name, args->len);
+ }
+
+@@ -920,9 +924,9 @@ static void encode_access3args(struct xdr_stream *xdr,
+ encode_uint32(xdr, args->access);
+ }
+
+-static void nfs3_xdr_enc_access3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_access3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_accessargs *args)
++ void *args)
+ {
+ encode_access3args(xdr, args);
+ }
+@@ -934,10 +938,11 @@ static void nfs3_xdr_enc_access3args(struct rpc_rqst *req,
+ * nfs_fh3 symlink;
+ * };
+ */
+-static void nfs3_xdr_enc_readlink3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_readlink3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_readlinkargs *args)
++ void *_args)
+ {
++ const struct nfs3_readlinkargs *args = _args;
+ encode_nfs_fh3(xdr, args->fh);
+ prepare_reply_buffer(req, args->pages, args->pgbase,
+ args->pglen, NFS3_readlinkres_sz);
+@@ -964,10 +969,12 @@ static void encode_read3args(struct xdr_stream *xdr,
+ *p = cpu_to_be32(args->count);
+ }
+
+-static void nfs3_xdr_enc_read3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_read3args(void *_req,
+ struct xdr_stream *xdr,
+- const struct nfs_pgio_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ const struct nfs_pgio_args *args = _args;
+ encode_read3args(xdr, args);
+ prepare_reply_buffer(req, args->pages, args->pgbase,
+ args->count, NFS3_readres_sz);
+@@ -1006,9 +1013,9 @@ static void encode_write3args(struct xdr_stream *xdr,
+ xdr_write_pages(xdr, args->pages, args->pgbase, args->count);
+ }
+
+-static void nfs3_xdr_enc_write3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_write3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_pgio_args *args)
++ void *args)
+ {
+ encode_write3args(xdr, args);
+ xdr->buf->flags |= XDRBUF_WRITE;
+@@ -1053,10 +1060,12 @@ static void encode_createhow3(struct xdr_stream *xdr,
+ }
+ }
+
+-static void nfs3_xdr_enc_create3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_create3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_createargs *args)
++ void *_args)
+ {
++ const struct nfs3_createargs *args = _args;
++
+ encode_diropargs3(xdr, args->fh, args->name, args->len);
+ encode_createhow3(xdr, args);
+ }
+@@ -1069,10 +1078,12 @@ static void nfs3_xdr_enc_create3args(struct rpc_rqst *req,
+ * sattr3 attributes;
+ * };
+ */
+-static void nfs3_xdr_enc_mkdir3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_mkdir3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_mkdirargs *args)
++ void *_args)
+ {
++ const struct nfs3_mkdirargs *args = _args;
++
+ encode_diropargs3(xdr, args->fh, args->name, args->len);
+ encode_sattr3(xdr, args->sattr);
+ }
+@@ -1097,10 +1108,12 @@ static void encode_symlinkdata3(struct xdr_stream *xdr,
+ encode_nfspath3(xdr, args->pages, args->pathlen);
+ }
+
+-static void nfs3_xdr_enc_symlink3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_symlink3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_symlinkargs *args)
++ void *_args)
+ {
++ const struct nfs3_symlinkargs *args = _args;
++
+ encode_diropargs3(xdr, args->fromfh, args->fromname, args->fromlen);
+ encode_symlinkdata3(xdr, args);
+ xdr->buf->flags |= XDRBUF_WRITE;
+@@ -1158,10 +1171,12 @@ static void encode_mknoddata3(struct xdr_stream *xdr,
+ }
+ }
+
+-static void nfs3_xdr_enc_mknod3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_mknod3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_mknodargs *args)
++ void *_args)
+ {
++ const struct nfs3_mknodargs *args = _args;
++
+ encode_diropargs3(xdr, args->fh, args->name, args->len);
+ encode_mknoddata3(xdr, args);
+ }
+@@ -1173,10 +1188,12 @@ static void nfs3_xdr_enc_mknod3args(struct rpc_rqst *req,
+ * diropargs3 object;
+ * };
+ */
+-static void nfs3_xdr_enc_remove3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_remove3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_removeargs *args)
++ void *_args)
+ {
++ const struct nfs_removeargs *args = _args;
++
+ encode_diropargs3(xdr, args->fh, args->name.name, args->name.len);
+ }
+
+@@ -1188,10 +1205,11 @@ static void nfs3_xdr_enc_remove3args(struct rpc_rqst *req,
+ * diropargs3 to;
+ * };
+ */
+-static void nfs3_xdr_enc_rename3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_rename3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_renameargs *args)
++ void *_args)
+ {
++ const struct nfs_renameargs *args = _args;
+ const struct qstr *old = args->old_name;
+ const struct qstr *new = args->new_name;
+
+@@ -1207,10 +1225,12 @@ static void nfs3_xdr_enc_rename3args(struct rpc_rqst *req,
+ * diropargs3 link;
+ * };
+ */
+-static void nfs3_xdr_enc_link3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_link3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_linkargs *args)
++ void *_args)
+ {
++ const struct nfs3_linkargs *args = _args;
++
+ encode_nfs_fh3(xdr, args->fromfh);
+ encode_diropargs3(xdr, args->tofh, args->toname, args->tolen);
+ }
+@@ -1238,10 +1258,12 @@ static void encode_readdir3args(struct xdr_stream *xdr,
+ *p = cpu_to_be32(args->count);
+ }
+
+-static void nfs3_xdr_enc_readdir3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_readdir3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_readdirargs *args)
++ void *_args)
+ {
++ const struct nfs3_readdirargs *args = _args;
++
+ encode_readdir3args(xdr, args);
+ prepare_reply_buffer(req, args->pages, 0,
+ args->count, NFS3_readdirres_sz);
+@@ -1278,10 +1300,12 @@ static void encode_readdirplus3args(struct xdr_stream *xdr,
+ *p = cpu_to_be32(args->count);
+ }
+
+-static void nfs3_xdr_enc_readdirplus3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_readdirplus3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_readdirargs *args)
++ void *_args)
+ {
++ const struct nfs3_readdirargs *args = _args;
++
+ encode_readdirplus3args(xdr, args);
+ prepare_reply_buffer(req, args->pages, 0,
+ args->count, NFS3_readdirres_sz);
+@@ -1308,19 +1332,21 @@ static void encode_commit3args(struct xdr_stream *xdr,
+ *p = cpu_to_be32(args->count);
+ }
+
+-static void nfs3_xdr_enc_commit3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_commit3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs_commitargs *args)
++ void *args)
+ {
+ encode_commit3args(xdr, args);
+ }
+
+ #ifdef CONFIG_NFS_V3_ACL
+
+-static void nfs3_xdr_enc_getacl3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_getacl3args(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs3_getaclargs *args)
++ void *_args)
+ {
++ const struct nfs3_getaclargs *args = _args;
++
+ encode_nfs_fh3(xdr, args->fh);
+ encode_uint32(xdr, args->mask);
+ if (args->mask & (NFS_ACL | NFS_DFACL))
+@@ -1329,10 +1355,12 @@ static void nfs3_xdr_enc_getacl3args(struct rpc_rqst *req,
+ ACL3_getaclres_sz);
+ }
+
+-static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req,
++static void nfs3_xdr_enc_setacl3args(void *_req,
+ struct xdr_stream *xdr,
+- const struct nfs3_setaclargs *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ const struct nfs3_setaclargs *args = _args;
+ unsigned int base;
+ int error;
+
+@@ -1380,9 +1408,9 @@ static void nfs3_xdr_enc_setacl3args(struct rpc_rqst *req,
+ * void;
+ * };
+ */
+-static int nfs3_xdr_dec_getattr3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_getattr3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_fattr *result)
++ void *result)
+ {
+ enum nfs_stat status;
+ int error;
+@@ -1417,9 +1445,9 @@ out_default:
+ * SETATTR3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_setattr3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_setattr3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_fattr *result)
++ void *result)
+ {
+ enum nfs_stat status;
+ int error;
+@@ -1458,10 +1486,11 @@ out_status:
+ * LOOKUP3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_lookup3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_lookup3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs3_diropres *result)
++ void *_result)
+ {
++ struct nfs3_diropres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1505,10 +1534,11 @@ out_default:
+ * ACCESS3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_access3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_access3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs3_accessres *result)
++ void *_result)
+ {
++ struct nfs3_accessres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1546,9 +1576,9 @@ out_default:
+ * READLINK3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_readlink3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_readlink3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_fattr *result)
++ void *result)
+ {
+ enum nfs_stat status;
+ int error;
+@@ -1625,9 +1655,10 @@ out_overflow:
+ return -EIO;
+ }
+
+-static int nfs3_xdr_dec_read3res(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_pgio_res *result)
++static int nfs3_xdr_dec_read3res(void *req, struct xdr_stream *xdr,
++ void *_result)
+ {
++ struct nfs_pgio_res *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1698,9 +1729,10 @@ out_eio:
+ return -EIO;
+ }
+
+-static int nfs3_xdr_dec_write3res(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_pgio_res *result)
++static int nfs3_xdr_dec_write3res(void *req, struct xdr_stream *xdr,
++ void *_result)
+ {
++ struct nfs_pgio_res *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1762,10 +1794,11 @@ out:
+ return error;
+ }
+
+-static int nfs3_xdr_dec_create3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_create3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs3_diropres *result)
++ void *_result)
+ {
++ struct nfs3_diropres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1802,10 +1835,11 @@ out_default:
+ * REMOVE3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_remove3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_remove3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_removeres *result)
++ void *_result)
+ {
++ struct nfs_removeres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1843,10 +1877,11 @@ out_status:
+ * RENAME3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_rename3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_rename3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_renameres *result)
++ void *_result)
+ {
++ struct nfs_renameres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -1887,9 +1922,10 @@ out_status:
+ * LINK3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_link3res(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs3_linkres *result)
++static int nfs3_xdr_dec_link3res(void *req, struct xdr_stream *xdr,
++ void *_result)
+ {
++ struct nfs3_linkres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -2070,10 +2106,11 @@ out:
+ return error;
+ }
+
+-static int nfs3_xdr_dec_readdir3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_readdir3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs3_readdirres *result)
++ void *_result)
+ {
++ struct nfs3_readdirres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -2138,10 +2175,11 @@ out_overflow:
+ return -EIO;
+ }
+
+-static int nfs3_xdr_dec_fsstat3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_fsstat3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_fsstat *result)
++ void *_result)
+ {
++ struct nfs_fsstat *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -2214,10 +2252,11 @@ out_overflow:
+ return -EIO;
+ }
+
+-static int nfs3_xdr_dec_fsinfo3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_fsinfo3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_fsinfo *result)
++ void *_result)
+ {
++ struct nfs_fsinfo *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -2277,10 +2316,11 @@ out_overflow:
+ return -EIO;
+ }
+
+-static int nfs3_xdr_dec_pathconf3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_pathconf3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_pathconf *result)
++ void *_result)
+ {
++ struct nfs_pathconf *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -2318,10 +2358,11 @@ out_status:
+ * COMMIT3resfail resfail;
+ * };
+ */
+-static int nfs3_xdr_dec_commit3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_commit3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_commitres *result)
++ void *_result)
+ {
++ struct nfs_commitres *result = _result;
+ enum nfs_stat status;
+ int error;
+
+@@ -2387,9 +2428,9 @@ out:
+ return error;
+ }
+
+-static int nfs3_xdr_dec_getacl3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_getacl3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs3_getaclres *result)
++ void *result)
+ {
+ enum nfs_stat status;
+ int error;
+@@ -2406,9 +2447,9 @@ out_default:
+ return nfs3_stat_to_errno(status);
+ }
+
+-static int nfs3_xdr_dec_setacl3res(struct rpc_rqst *req,
++static int nfs3_xdr_dec_setacl3res(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_fattr *result)
++ void *result)
+ {
+ enum nfs_stat status;
+ int error;
+@@ -2495,8 +2536,8 @@ static int nfs3_stat_to_errno(enum nfs_stat status)
+ #define PROC(proc, argtype, restype, timer) \
+ [NFS3PROC_##proc] = { \
+ .p_proc = NFS3PROC_##proc, \
+- .p_encode = (kxdreproc_t)nfs3_xdr_enc_##argtype##3args, \
+- .p_decode = (kxdrdproc_t)nfs3_xdr_dec_##restype##3res, \
++ .p_encode = nfs3_xdr_enc_##argtype##3args, \
++ .p_decode = nfs3_xdr_dec_##restype##3res, \
+ .p_arglen = NFS3_##argtype##args_sz, \
+ .p_replen = NFS3_##restype##res_sz, \
+ .p_timer = timer, \
+@@ -2538,8 +2579,8 @@ const struct rpc_version nfs_version3 = {
+ static struct rpc_procinfo nfs3_acl_procedures[] = {
+ [ACLPROC3_GETACL] = {
+ .p_proc = ACLPROC3_GETACL,
+- .p_encode = (kxdreproc_t)nfs3_xdr_enc_getacl3args,
+- .p_decode = (kxdrdproc_t)nfs3_xdr_dec_getacl3res,
++ .p_encode = nfs3_xdr_enc_getacl3args,
++ .p_decode = nfs3_xdr_dec_getacl3res,
+ .p_arglen = ACL3_getaclargs_sz,
+ .p_replen = ACL3_getaclres_sz,
+ .p_timer = 1,
+@@ -2547,8 +2588,8 @@ static struct rpc_procinfo nfs3_acl_procedures[] = {
+ },
+ [ACLPROC3_SETACL] = {
+ .p_proc = ACLPROC3_SETACL,
+- .p_encode = (kxdreproc_t)nfs3_xdr_enc_setacl3args,
+- .p_decode = (kxdrdproc_t)nfs3_xdr_dec_setacl3res,
++ .p_encode = nfs3_xdr_enc_setacl3args,
++ .p_decode = nfs3_xdr_dec_setacl3res,
+ .p_arglen = ACL3_setaclargs_sz,
+ .p_replen = ACL3_setaclres_sz,
+ .p_timer = 0,
+diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
+index 0ca482a..5df90f3 100644
+--- a/fs/nfs/nfs42xdr.c
++++ b/fs/nfs/nfs42xdr.c
+@@ -165,10 +165,12 @@ static void encode_clone(struct xdr_stream *xdr,
+ /*
+ * Encode ALLOCATE request
+ */
+-static void nfs4_xdr_enc_allocate(struct rpc_rqst *req,
++static void nfs4_xdr_enc_allocate(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs42_falloc_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs42_falloc_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -184,10 +186,12 @@ static void nfs4_xdr_enc_allocate(struct rpc_rqst *req,
+ /*
+ * Encode DEALLOCATE request
+ */
+-static void nfs4_xdr_enc_deallocate(struct rpc_rqst *req,
++static void nfs4_xdr_enc_deallocate(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs42_falloc_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs42_falloc_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -203,10 +207,12 @@ static void nfs4_xdr_enc_deallocate(struct rpc_rqst *req,
+ /*
+ * Encode SEEK request
+ */
+-static void nfs4_xdr_enc_seek(struct rpc_rqst *req,
++static void nfs4_xdr_enc_seek(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs42_seek_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs42_seek_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -221,10 +227,12 @@ static void nfs4_xdr_enc_seek(struct rpc_rqst *req,
+ /*
+ * Encode LAYOUTSTATS request
+ */
+-static void nfs4_xdr_enc_layoutstats(struct rpc_rqst *req,
++static void nfs4_xdr_enc_layoutstats(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs42_layoutstat_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs42_layoutstat_args *args = _args;
+ int i;
+
+ struct compound_hdr hdr = {
+@@ -243,10 +251,12 @@ static void nfs4_xdr_enc_layoutstats(struct rpc_rqst *req,
+ /*
+ * Encode CLONE request
+ */
+-static void nfs4_xdr_enc_clone(struct rpc_rqst *req,
++static void nfs4_xdr_enc_clone(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs42_clone_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs42_clone_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -306,10 +316,12 @@ static int decode_clone(struct xdr_stream *xdr)
+ /*
+ * Decode ALLOCATE request
+ */
+-static int nfs4_xdr_dec_allocate(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_allocate(void *_rqstp,
+ struct xdr_stream *xdr,
+- struct nfs42_falloc_res *res)
++ void *_res)
+ {
++ struct rpc_rqst *rqstp = _rqstp;
++ struct nfs42_falloc_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -333,10 +345,12 @@ out:
+ /*
+ * Decode DEALLOCATE request
+ */
+-static int nfs4_xdr_dec_deallocate(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_deallocate(void *_rqstp,
+ struct xdr_stream *xdr,
+- struct nfs42_falloc_res *res)
++ void *_res)
+ {
++ struct rpc_rqst *rqstp = _rqstp;
++ struct nfs42_falloc_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -360,10 +374,12 @@ out:
+ /*
+ * Decode SEEK request
+ */
+-static int nfs4_xdr_dec_seek(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_seek(void *_rqstp,
+ struct xdr_stream *xdr,
+- struct nfs42_seek_res *res)
++ void *_res)
+ {
++ struct rpc_rqst *rqstp = _rqstp;
++ struct nfs42_seek_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -384,10 +400,12 @@ out:
+ /*
+ * Decode LAYOUTSTATS request
+ */
+-static int nfs4_xdr_dec_layoutstats(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_layoutstats(void *_rqstp,
+ struct xdr_stream *xdr,
+- struct nfs42_layoutstat_res *res)
++ void *_res)
+ {
++ struct rpc_rqst *rqstp = _rqstp;
++ struct nfs42_layoutstat_res *res = _res;
+ struct compound_hdr hdr;
+ int status, i;
+
+@@ -414,10 +432,12 @@ out:
+ /*
+ * Decode CLONE request
+ */
+-static int nfs4_xdr_dec_clone(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_clone(void *_rqstp,
+ struct xdr_stream *xdr,
+- struct nfs42_clone_res *res)
++ void *_res)
+ {
++ struct rpc_rqst *rqstp = _rqstp;
++ struct nfs42_clone_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
+index 4e44412..69ead07 100644
+--- a/fs/nfs/nfs4xdr.c
++++ b/fs/nfs/nfs4xdr.c
+@@ -2076,9 +2076,10 @@ static u32 nfs4_xdr_minorversion(const struct nfs4_sequence_args *args)
+ /*
+ * Encode an ACCESS request
+ */
+-static void nfs4_xdr_enc_access(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_accessargs *args)
++static void nfs4_xdr_enc_access(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_accessargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2094,9 +2095,10 @@ static void nfs4_xdr_enc_access(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode LOOKUP request
+ */
+-static void nfs4_xdr_enc_lookup(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_lookup_arg *args)
++static void nfs4_xdr_enc_lookup(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_lookup_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2113,10 +2115,11 @@ static void nfs4_xdr_enc_lookup(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode LOOKUP_ROOT request
+ */
+-static void nfs4_xdr_enc_lookup_root(struct rpc_rqst *req,
++static void nfs4_xdr_enc_lookup_root(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs4_lookup_root_arg *args)
++ void *_args)
+ {
++ const struct nfs4_lookup_root_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2132,9 +2135,10 @@ static void nfs4_xdr_enc_lookup_root(struct rpc_rqst *req,
+ /*
+ * Encode REMOVE request
+ */
+-static void nfs4_xdr_enc_remove(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs_removeargs *args)
++static void nfs4_xdr_enc_remove(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs_removeargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2149,9 +2153,10 @@ static void nfs4_xdr_enc_remove(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode RENAME request
+ */
+-static void nfs4_xdr_enc_rename(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs_renameargs *args)
++static void nfs4_xdr_enc_rename(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs_renameargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2168,9 +2173,10 @@ static void nfs4_xdr_enc_rename(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode LINK request
+ */
+-static void nfs4_xdr_enc_link(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_link_arg *args)
++static void nfs4_xdr_enc_link(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_link_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2189,9 +2195,10 @@ static void nfs4_xdr_enc_link(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode CREATE request
+ */
+-static void nfs4_xdr_enc_create(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_create_arg *args)
++static void nfs4_xdr_enc_create(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_create_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2208,8 +2215,8 @@ static void nfs4_xdr_enc_create(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode SYMLINK request
+ */
+-static void nfs4_xdr_enc_symlink(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_create_arg *args)
++static void nfs4_xdr_enc_symlink(void *req, struct xdr_stream *xdr,
++ void *args)
+ {
+ nfs4_xdr_enc_create(req, xdr, args);
+ }
+@@ -2217,9 +2224,10 @@ static void nfs4_xdr_enc_symlink(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode GETATTR request
+ */
+-static void nfs4_xdr_enc_getattr(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_getattr_arg *args)
++static void nfs4_xdr_enc_getattr(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_getattr_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2234,9 +2242,10 @@ static void nfs4_xdr_enc_getattr(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a CLOSE request
+ */
+-static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_closeargs *args)
++static void nfs4_xdr_enc_close(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_closeargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2252,9 +2261,10 @@ static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode an OPEN request
+ */
+-static void nfs4_xdr_enc_open(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_openargs *args)
++static void nfs4_xdr_enc_open(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_openargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2273,10 +2283,11 @@ static void nfs4_xdr_enc_open(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode an OPEN_CONFIRM request
+ */
+-static void nfs4_xdr_enc_open_confirm(struct rpc_rqst *req,
++static void nfs4_xdr_enc_open_confirm(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_open_confirmargs *args)
++ void *_args)
+ {
++ struct nfs_open_confirmargs *args = _args;
+ struct compound_hdr hdr = {
+ .nops = 0,
+ };
+@@ -2290,10 +2301,11 @@ static void nfs4_xdr_enc_open_confirm(struct rpc_rqst *req,
+ /*
+ * Encode an OPEN request with no attributes.
+ */
+-static void nfs4_xdr_enc_open_noattr(struct rpc_rqst *req,
++static void nfs4_xdr_enc_open_noattr(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_openargs *args)
++ void *_args)
+ {
++ struct nfs_openargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2311,10 +2323,11 @@ static void nfs4_xdr_enc_open_noattr(struct rpc_rqst *req,
+ /*
+ * Encode an OPEN_DOWNGRADE request
+ */
+-static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
++static void nfs4_xdr_enc_open_downgrade(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_closeargs *args)
++ void *_args)
+ {
++ struct nfs_closeargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2330,9 +2343,10 @@ static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
+ /*
+ * Encode a LOCK request
+ */
+-static void nfs4_xdr_enc_lock(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_lock_args *args)
++static void nfs4_xdr_enc_lock(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_lock_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2347,9 +2361,10 @@ static void nfs4_xdr_enc_lock(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a LOCKT request
+ */
+-static void nfs4_xdr_enc_lockt(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_lockt_args *args)
++static void nfs4_xdr_enc_lockt(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_lockt_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2364,9 +2379,10 @@ static void nfs4_xdr_enc_lockt(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a LOCKU request
+ */
+-static void nfs4_xdr_enc_locku(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_locku_args *args)
++static void nfs4_xdr_enc_locku(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_locku_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2378,10 +2394,11 @@ static void nfs4_xdr_enc_locku(struct rpc_rqst *req, struct xdr_stream *xdr,
+ encode_nops(&hdr);
+ }
+
+-static void nfs4_xdr_enc_release_lockowner(struct rpc_rqst *req,
++static void nfs4_xdr_enc_release_lockowner(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_release_lockowner_args *args)
++ void *_args)
+ {
++ struct nfs_release_lockowner_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = 0,
+ };
+@@ -2394,9 +2411,11 @@ static void nfs4_xdr_enc_release_lockowner(struct rpc_rqst *req,
+ /*
+ * Encode a READLINK request
+ */
+-static void nfs4_xdr_enc_readlink(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_readlink *args)
++static void nfs4_xdr_enc_readlink(void *_req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ const struct nfs4_readlink *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2414,9 +2433,11 @@ static void nfs4_xdr_enc_readlink(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a READDIR request
+ */
+-static void nfs4_xdr_enc_readdir(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_readdir_arg *args)
++static void nfs4_xdr_enc_readdir(void *_req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ const struct nfs4_readdir_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2437,9 +2458,11 @@ static void nfs4_xdr_enc_readdir(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a READ request
+ */
+-static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_pgio_args *args)
++static void nfs4_xdr_enc_read(void *_req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs_pgio_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2458,9 +2481,11 @@ static void nfs4_xdr_enc_read(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode an SETATTR request
+ */
+-static void nfs4_xdr_enc_setattr(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_setattrargs *args)
++static void nfs4_xdr_enc_setattr(void *_req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs_setattrargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2476,9 +2501,11 @@ static void nfs4_xdr_enc_setattr(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a GETACL request
+ */
+-static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_getaclargs *args)
++static void nfs4_xdr_enc_getacl(void *_req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs_getaclargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2499,9 +2526,11 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Encode a WRITE request
+ */
+-static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_pgio_args *args)
++static void nfs4_xdr_enc_write(void *_req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs_pgio_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2519,9 +2548,10 @@ static void nfs4_xdr_enc_write(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * a COMMIT request
+ */
+-static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_commitargs *args)
++static void nfs4_xdr_enc_commit(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_commitargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2536,9 +2566,10 @@ static void nfs4_xdr_enc_commit(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * FSINFO request
+ */
+-static void nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs4_fsinfo_arg *args)
++static void nfs4_xdr_enc_fsinfo(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs4_fsinfo_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2553,9 +2584,10 @@ static void nfs4_xdr_enc_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * a PATHCONF request
+ */
+-static void nfs4_xdr_enc_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_pathconf_arg *args)
++static void nfs4_xdr_enc_pathconf(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_pathconf_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2571,9 +2603,10 @@ static void nfs4_xdr_enc_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * a STATFS request
+ */
+-static void nfs4_xdr_enc_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfs4_statfs_arg *args)
++static void nfs4_xdr_enc_statfs(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ const struct nfs4_statfs_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2589,10 +2622,11 @@ static void nfs4_xdr_enc_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * GETATTR_BITMAP request
+ */
+-static void nfs4_xdr_enc_server_caps(struct rpc_rqst *req,
++static void nfs4_xdr_enc_server_caps(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_server_caps_arg *args)
++ void *_args)
+ {
++ struct nfs4_server_caps_arg *args = _args;
+ const u32 *bitmask = args->bitmask;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+@@ -2608,9 +2642,10 @@ static void nfs4_xdr_enc_server_caps(struct rpc_rqst *req,
+ /*
+ * a RENEW request
+ */
+-static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_client *clp)
++static void nfs4_xdr_enc_renew(void *req, struct xdr_stream *xdr,
++ void *_clp)
+ {
++ struct nfs_client *clp = _clp;
+ struct compound_hdr hdr = {
+ .nops = 0,
+ };
+@@ -2623,9 +2658,9 @@ static void nfs4_xdr_enc_renew(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * a SETCLIENTID request
+ */
+-static void nfs4_xdr_enc_setclientid(struct rpc_rqst *req,
++static void nfs4_xdr_enc_setclientid(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_setclientid *sc)
++ void *sc)
+ {
+ struct compound_hdr hdr = {
+ .nops = 0,
+@@ -2639,9 +2674,9 @@ static void nfs4_xdr_enc_setclientid(struct rpc_rqst *req,
+ /*
+ * a SETCLIENTID_CONFIRM request
+ */
+-static void nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req,
++static void nfs4_xdr_enc_setclientid_confirm(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_setclientid_res *arg)
++ void *arg)
+ {
+ struct compound_hdr hdr = {
+ .nops = 0,
+@@ -2655,10 +2690,11 @@ static void nfs4_xdr_enc_setclientid_confirm(struct rpc_rqst *req,
+ /*
+ * DELEGRETURN request
+ */
+-static void nfs4_xdr_enc_delegreturn(struct rpc_rqst *req,
++static void nfs4_xdr_enc_delegreturn(void *req,
+ struct xdr_stream *xdr,
+- const struct nfs4_delegreturnargs *args)
++ void *_args)
+ {
++ const struct nfs4_delegreturnargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2674,10 +2710,12 @@ static void nfs4_xdr_enc_delegreturn(struct rpc_rqst *req,
+ /*
+ * Encode FS_LOCATIONS request
+ */
+-static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
++static void nfs4_xdr_enc_fs_locations(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs4_fs_locations_arg *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs4_fs_locations_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2707,10 +2745,11 @@ static void nfs4_xdr_enc_fs_locations(struct rpc_rqst *req,
+ /*
+ * Encode SECINFO request
+ */
+-static void nfs4_xdr_enc_secinfo(struct rpc_rqst *req,
++static void nfs4_xdr_enc_secinfo(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_secinfo_arg *args)
++ void *_args)
+ {
++ struct nfs4_secinfo_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2725,10 +2764,11 @@ static void nfs4_xdr_enc_secinfo(struct rpc_rqst *req,
+ /*
+ * Encode FSID_PRESENT request
+ */
+-static void nfs4_xdr_enc_fsid_present(struct rpc_rqst *req,
++static void nfs4_xdr_enc_fsid_present(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_fsid_present_arg *args)
++ void *_args)
+ {
++ struct nfs4_fsid_present_arg *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2746,10 +2786,11 @@ static void nfs4_xdr_enc_fsid_present(struct rpc_rqst *req,
+ /*
+ * BIND_CONN_TO_SESSION request
+ */
+-static void nfs4_xdr_enc_bind_conn_to_session(struct rpc_rqst *req,
++static void nfs4_xdr_enc_bind_conn_to_session(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_bind_conn_to_session_args *args)
++ void *_args)
+ {
++ struct nfs41_bind_conn_to_session_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = args->client->cl_mvops->minor_version,
+ };
+@@ -2762,10 +2803,11 @@ static void nfs4_xdr_enc_bind_conn_to_session(struct rpc_rqst *req,
+ /*
+ * EXCHANGE_ID request
+ */
+-static void nfs4_xdr_enc_exchange_id(struct rpc_rqst *req,
++static void nfs4_xdr_enc_exchange_id(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_exchange_id_args *args)
++ void *_args)
+ {
++ struct nfs41_exchange_id_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = args->client->cl_mvops->minor_version,
+ };
+@@ -2778,10 +2820,11 @@ static void nfs4_xdr_enc_exchange_id(struct rpc_rqst *req,
+ /*
+ * a CREATE_SESSION request
+ */
+-static void nfs4_xdr_enc_create_session(struct rpc_rqst *req,
++static void nfs4_xdr_enc_create_session(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_create_session_args *args)
++ void *_args)
+ {
++ struct nfs41_create_session_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = args->client->cl_mvops->minor_version,
+ };
+@@ -2794,10 +2837,11 @@ static void nfs4_xdr_enc_create_session(struct rpc_rqst *req,
+ /*
+ * a DESTROY_SESSION request
+ */
+-static void nfs4_xdr_enc_destroy_session(struct rpc_rqst *req,
++static void nfs4_xdr_enc_destroy_session(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_session *session)
++ void *_session)
+ {
++ struct nfs4_session *session = _session;
+ struct compound_hdr hdr = {
+ .minorversion = session->clp->cl_mvops->minor_version,
+ };
+@@ -2810,10 +2854,11 @@ static void nfs4_xdr_enc_destroy_session(struct rpc_rqst *req,
+ /*
+ * a DESTROY_CLIENTID request
+ */
+-static void nfs4_xdr_enc_destroy_clientid(struct rpc_rqst *req,
++static void nfs4_xdr_enc_destroy_clientid(void *req,
+ struct xdr_stream *xdr,
+- struct nfs_client *clp)
++ void *_clp)
+ {
++ struct nfs_client *clp = _clp;
+ struct compound_hdr hdr = {
+ .minorversion = clp->cl_mvops->minor_version,
+ };
+@@ -2826,8 +2871,8 @@ static void nfs4_xdr_enc_destroy_clientid(struct rpc_rqst *req,
+ /*
+ * a SEQUENCE request
+ */
+-static void nfs4_xdr_enc_sequence(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs4_sequence_args *args)
++static void nfs4_xdr_enc_sequence(void *req, struct xdr_stream *xdr,
++ void *args)
+ {
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(args),
+@@ -2841,10 +2886,11 @@ static void nfs4_xdr_enc_sequence(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * a GET_LEASE_TIME request
+ */
+-static void nfs4_xdr_enc_get_lease_time(struct rpc_rqst *req,
++static void nfs4_xdr_enc_get_lease_time(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_get_lease_time_args *args)
++ void *_args)
+ {
++ struct nfs4_get_lease_time_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->la_seq_args),
+ };
+@@ -2860,10 +2906,11 @@ static void nfs4_xdr_enc_get_lease_time(struct rpc_rqst *req,
+ /*
+ * a RECLAIM_COMPLETE request
+ */
+-static void nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req,
++static void nfs4_xdr_enc_reclaim_complete(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_reclaim_complete_args *args)
++ void *_args)
+ {
++ struct nfs41_reclaim_complete_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args)
+ };
+@@ -2877,10 +2924,12 @@ static void nfs4_xdr_enc_reclaim_complete(struct rpc_rqst *req,
+ /*
+ * Encode GETDEVICEINFO request
+ */
+-static void nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req,
++static void nfs4_xdr_enc_getdeviceinfo(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs4_getdeviceinfo_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs4_getdeviceinfo_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2901,10 +2950,12 @@ static void nfs4_xdr_enc_getdeviceinfo(struct rpc_rqst *req,
+ /*
+ * Encode LAYOUTGET request
+ */
+-static void nfs4_xdr_enc_layoutget(struct rpc_rqst *req,
++static void nfs4_xdr_enc_layoutget(void *_req,
+ struct xdr_stream *xdr,
+- struct nfs4_layoutget_args *args)
++ void *_args)
+ {
++ struct rpc_rqst *req = _req;
++ struct nfs4_layoutget_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2923,10 +2974,11 @@ static void nfs4_xdr_enc_layoutget(struct rpc_rqst *req,
+ /*
+ * Encode LAYOUTCOMMIT request
+ */
+-static void nfs4_xdr_enc_layoutcommit(struct rpc_rqst *req,
++static void nfs4_xdr_enc_layoutcommit(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_layoutcommit_args *args)
++ void *_args)
+ {
++ struct nfs4_layoutcommit_args *args = _args;
+ struct nfs4_layoutcommit_data *data =
+ container_of(args, struct nfs4_layoutcommit_data, args);
+ struct compound_hdr hdr = {
+@@ -2944,10 +2996,11 @@ static void nfs4_xdr_enc_layoutcommit(struct rpc_rqst *req,
+ /*
+ * Encode LAYOUTRETURN request
+ */
+-static void nfs4_xdr_enc_layoutreturn(struct rpc_rqst *req,
++static void nfs4_xdr_enc_layoutreturn(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_layoutreturn_args *args)
++ void *_args)
+ {
++ struct nfs4_layoutreturn_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2962,10 +3015,11 @@ static void nfs4_xdr_enc_layoutreturn(struct rpc_rqst *req,
+ /*
+ * Encode SECINFO_NO_NAME request
+ */
+-static int nfs4_xdr_enc_secinfo_no_name(struct rpc_rqst *req,
++static void nfs4_xdr_enc_secinfo_no_name(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_secinfo_no_name_args *args)
++ void *_args)
+ {
++ struct nfs41_secinfo_no_name_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2975,16 +3029,16 @@ static int nfs4_xdr_enc_secinfo_no_name(struct rpc_rqst *req,
+ encode_putrootfh(xdr, &hdr);
+ encode_secinfo_no_name(xdr, args, &hdr);
+ encode_nops(&hdr);
+- return 0;
+ }
+
+ /*
+ * Encode TEST_STATEID request
+ */
+-static void nfs4_xdr_enc_test_stateid(struct rpc_rqst *req,
++static void nfs4_xdr_enc_test_stateid(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_test_stateid_args *args)
++ void *_args)
+ {
++ struct nfs41_test_stateid_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -2998,10 +3052,11 @@ static void nfs4_xdr_enc_test_stateid(struct rpc_rqst *req,
+ /*
+ * Encode FREE_STATEID request
+ */
+-static void nfs4_xdr_enc_free_stateid(struct rpc_rqst *req,
++static void nfs4_xdr_enc_free_stateid(void *req,
+ struct xdr_stream *xdr,
+- struct nfs41_free_stateid_args *args)
++ void *_args)
+ {
++ struct nfs41_free_stateid_args *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -6067,10 +6122,11 @@ static int decode_free_stateid(struct xdr_stream *xdr,
+ /*
+ * Decode OPEN_DOWNGRADE response
+ */
+-static int nfs4_xdr_dec_open_downgrade(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_open_downgrade(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs_closeres *res)
++ void *_res)
+ {
++ struct nfs_closeres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6094,9 +6150,10 @@ out:
+ /*
+ * Decode ACCESS response
+ */
+-static int nfs4_xdr_dec_access(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_accessres *res)
++static int nfs4_xdr_dec_access(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_accessres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6120,9 +6177,10 @@ out:
+ /*
+ * Decode LOOKUP response
+ */
+-static int nfs4_xdr_dec_lookup(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_lookup_res *res)
++static int nfs4_xdr_dec_lookup(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_lookup_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6149,10 +6207,11 @@ out:
+ /*
+ * Decode LOOKUP_ROOT response
+ */
+-static int nfs4_xdr_dec_lookup_root(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_lookup_root(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_lookup_res *res)
++ void *_res)
+ {
++ struct nfs4_lookup_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6176,9 +6235,10 @@ out:
+ /*
+ * Decode REMOVE response
+ */
+-static int nfs4_xdr_dec_remove(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_removeres *res)
++static int nfs4_xdr_dec_remove(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_removeres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6199,9 +6259,10 @@ out:
+ /*
+ * Decode RENAME response
+ */
+-static int nfs4_xdr_dec_rename(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_renameres *res)
++static int nfs4_xdr_dec_rename(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_renameres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6228,9 +6289,10 @@ out:
+ /*
+ * Decode LINK response
+ */
+-static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_link_res *res)
++static int nfs4_xdr_dec_link(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_link_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6267,9 +6329,10 @@ out:
+ /*
+ * Decode CREATE response
+ */
+-static int nfs4_xdr_dec_create(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_create_res *res)
++static int nfs4_xdr_dec_create(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_create_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6296,8 +6359,8 @@ out:
+ /*
+ * Decode SYMLINK response
+ */
+-static int nfs4_xdr_dec_symlink(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_create_res *res)
++static int nfs4_xdr_dec_symlink(void *rqstp, struct xdr_stream *xdr,
++ void *res)
+ {
+ return nfs4_xdr_dec_create(rqstp, xdr, res);
+ }
+@@ -6305,9 +6368,10 @@ static int nfs4_xdr_dec_symlink(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+ /*
+ * Decode GETATTR response
+ */
+-static int nfs4_xdr_dec_getattr(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_getattr_res *res)
++static int nfs4_xdr_dec_getattr(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_getattr_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6328,9 +6392,10 @@ out:
+ /*
+ * Encode an SETACL request
+ */
+-static void nfs4_xdr_enc_setacl(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs_setaclargs *args)
++static void nfs4_xdr_enc_setacl(void *req, struct xdr_stream *xdr,
++ void *_args)
+ {
++ struct nfs_setaclargs *args = _args;
+ struct compound_hdr hdr = {
+ .minorversion = nfs4_xdr_minorversion(&args->seq_args),
+ };
+@@ -6346,9 +6411,10 @@ static void nfs4_xdr_enc_setacl(struct rpc_rqst *req, struct xdr_stream *xdr,
+ * Decode SETACL response
+ */
+ static int
+-nfs4_xdr_dec_setacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_setaclres *res)
++nfs4_xdr_dec_setacl(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_setaclres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6370,9 +6436,10 @@ out:
+ * Decode GETACL response
+ */
+ static int
+-nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_getaclres *res)
++nfs4_xdr_dec_getacl(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_getaclres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6398,9 +6465,10 @@ out:
+ /*
+ * Decode CLOSE response
+ */
+-static int nfs4_xdr_dec_close(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_closeres *res)
++static int nfs4_xdr_dec_close(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_closeres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6430,9 +6498,10 @@ out:
+ /*
+ * Decode OPEN response
+ */
+-static int nfs4_xdr_dec_open(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_openres *res)
++static int nfs4_xdr_dec_open(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_openres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6461,9 +6530,9 @@ out:
+ /*
+ * Decode OPEN_CONFIRM response
+ */
+-static int nfs4_xdr_dec_open_confirm(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_open_confirm(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs_open_confirmres *res)
++ void *res)
+ {
+ struct compound_hdr hdr;
+ int status;
+@@ -6482,10 +6551,11 @@ out:
+ /*
+ * Decode OPEN response
+ */
+-static int nfs4_xdr_dec_open_noattr(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_open_noattr(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs_openres *res)
++ void *_res)
+ {
++ struct nfs_openres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6511,10 +6581,11 @@ out:
+ /*
+ * Decode SETATTR response
+ */
+-static int nfs4_xdr_dec_setattr(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_setattr(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs_setattrres *res)
++ void *_res)
+ {
++ struct nfs_setattrres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6538,9 +6609,10 @@ out:
+ /*
+ * Decode LOCK response
+ */
+-static int nfs4_xdr_dec_lock(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_lock_res *res)
++static int nfs4_xdr_dec_lock(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_lock_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6561,9 +6633,10 @@ out:
+ /*
+ * Decode LOCKT response
+ */
+-static int nfs4_xdr_dec_lockt(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_lockt_res *res)
++static int nfs4_xdr_dec_lockt(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_lockt_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6584,9 +6657,10 @@ out:
+ /*
+ * Decode LOCKU response
+ */
+-static int nfs4_xdr_dec_locku(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_locku_res *res)
++static int nfs4_xdr_dec_locku(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_locku_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6604,7 +6678,7 @@ out:
+ return status;
+ }
+
+-static int nfs4_xdr_dec_release_lockowner(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_release_lockowner(void *rqstp,
+ struct xdr_stream *xdr, void *dummy)
+ {
+ struct compound_hdr hdr;
+@@ -6619,10 +6693,11 @@ static int nfs4_xdr_dec_release_lockowner(struct rpc_rqst *rqstp,
+ /*
+ * Decode READLINK response
+ */
+-static int nfs4_xdr_dec_readlink(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_readlink(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_readlink_res *res)
++ void *_res)
+ {
++ struct nfs4_readlink_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6643,9 +6718,10 @@ out:
+ /*
+ * Decode READDIR response
+ */
+-static int nfs4_xdr_dec_readdir(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs4_readdir_res *res)
++static int nfs4_xdr_dec_readdir(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_readdir_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6666,9 +6742,10 @@ out:
+ /*
+ * Decode Read response
+ */
+-static int nfs4_xdr_dec_read(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_pgio_res *res)
++static int nfs4_xdr_dec_read(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_pgio_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6692,9 +6769,10 @@ out:
+ /*
+ * Decode WRITE response
+ */
+-static int nfs4_xdr_dec_write(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_pgio_res *res)
++static int nfs4_xdr_dec_write(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_pgio_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6722,9 +6800,10 @@ out:
+ /*
+ * Decode COMMIT response
+ */
+-static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+- struct nfs_commitres *res)
++static int nfs4_xdr_dec_commit(void *rqstp, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs_commitres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6746,9 +6825,10 @@ out:
+ /*
+ * Decode FSINFO response
+ */
+-static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs4_fsinfo_res *res)
++static int nfs4_xdr_dec_fsinfo(void *req, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_fsinfo_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6765,9 +6845,10 @@ static int nfs4_xdr_dec_fsinfo(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Decode PATHCONF response
+ */
+-static int nfs4_xdr_dec_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs4_pathconf_res *res)
++static int nfs4_xdr_dec_pathconf(void *req, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_pathconf_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6784,9 +6865,10 @@ static int nfs4_xdr_dec_pathconf(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Decode STATFS response
+ */
+-static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct nfs4_statfs_res *res)
++static int nfs4_xdr_dec_statfs(void *req, struct xdr_stream *xdr,
++ void *_res)
+ {
++ struct nfs4_statfs_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6803,10 +6885,11 @@ static int nfs4_xdr_dec_statfs(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * Decode GETATTR_BITMAP response
+ */
+-static int nfs4_xdr_dec_server_caps(struct rpc_rqst *req,
++static int nfs4_xdr_dec_server_caps(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_server_caps_res *res)
++ void *_res)
+ {
++ struct nfs4_server_caps_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6827,7 +6910,7 @@ out:
+ /*
+ * Decode RENEW response
+ */
+-static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
++static int nfs4_xdr_dec_renew(void *rqstp, struct xdr_stream *xdr,
+ void *__unused)
+ {
+ struct compound_hdr hdr;
+@@ -6842,9 +6925,9 @@ static int nfs4_xdr_dec_renew(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
+ /*
+ * Decode SETCLIENTID response
+ */
+-static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req,
++static int nfs4_xdr_dec_setclientid(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_setclientid_res *res)
++ void *res)
+ {
+ struct compound_hdr hdr;
+ int status;
+@@ -6858,8 +6941,9 @@ static int nfs4_xdr_dec_setclientid(struct rpc_rqst *req,
+ /*
+ * Decode SETCLIENTID_CONFIRM response
+ */
+-static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req,
+- struct xdr_stream *xdr)
++static int nfs4_xdr_dec_setclientid_confirm(void *req,
++ struct xdr_stream *xdr,
++ void *res)
+ {
+ struct compound_hdr hdr;
+ int status;
+@@ -6873,10 +6957,11 @@ static int nfs4_xdr_dec_setclientid_confirm(struct rpc_rqst *req,
+ /*
+ * Decode DELEGRETURN response
+ */
+-static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_delegreturn(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_delegreturnres *res)
++ void *_res)
+ {
++ struct nfs4_delegreturnres *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6900,10 +6985,11 @@ out:
+ /*
+ * Decode FS_LOCATIONS response
+ */
+-static int nfs4_xdr_dec_fs_locations(struct rpc_rqst *req,
++static int nfs4_xdr_dec_fs_locations(void *req,
+ struct xdr_stream *xdr,
+- struct nfs4_fs_locations_res *res)
++ void *_res)
+ {
++ struct nfs4_fs_locations_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6943,10 +7029,11 @@ out:
+ /*
+ * Decode SECINFO response
+ */
+-static int nfs4_xdr_dec_secinfo(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_secinfo(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_secinfo_res *res)
++ void *_res)
+ {
++ struct nfs4_secinfo_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6967,10 +7054,11 @@ out:
+ /*
+ * Decode FSID_PRESENT response
+ */
+-static int nfs4_xdr_dec_fsid_present(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_fsid_present(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_fsid_present_res *res)
++ void *_res)
+ {
++ struct nfs4_fsid_present_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -6996,7 +7084,7 @@ out:
+ /*
+ * Decode BIND_CONN_TO_SESSION response
+ */
+-static int nfs4_xdr_dec_bind_conn_to_session(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_bind_conn_to_session(void *rqstp,
+ struct xdr_stream *xdr,
+ void *res)
+ {
+@@ -7012,7 +7100,7 @@ static int nfs4_xdr_dec_bind_conn_to_session(struct rpc_rqst *rqstp,
+ /*
+ * Decode EXCHANGE_ID response
+ */
+-static int nfs4_xdr_dec_exchange_id(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_exchange_id(void *rqstp,
+ struct xdr_stream *xdr,
+ void *res)
+ {
+@@ -7028,9 +7116,9 @@ static int nfs4_xdr_dec_exchange_id(struct rpc_rqst *rqstp,
+ /*
+ * Decode CREATE_SESSION response
+ */
+-static int nfs4_xdr_dec_create_session(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_create_session(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs41_create_session_res *res)
++ void *res)
+ {
+ struct compound_hdr hdr;
+ int status;
+@@ -7044,7 +7132,7 @@ static int nfs4_xdr_dec_create_session(struct rpc_rqst *rqstp,
+ /*
+ * Decode DESTROY_SESSION response
+ */
+-static int nfs4_xdr_dec_destroy_session(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_destroy_session(void *rqstp,
+ struct xdr_stream *xdr,
+ void *res)
+ {
+@@ -7060,7 +7148,7 @@ static int nfs4_xdr_dec_destroy_session(struct rpc_rqst *rqstp,
+ /*
+ * Decode DESTROY_CLIENTID response
+ */
+-static int nfs4_xdr_dec_destroy_clientid(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_destroy_clientid(void *rqstp,
+ struct xdr_stream *xdr,
+ void *res)
+ {
+@@ -7076,9 +7164,9 @@ static int nfs4_xdr_dec_destroy_clientid(struct rpc_rqst *rqstp,
+ /*
+ * Decode SEQUENCE response
+ */
+-static int nfs4_xdr_dec_sequence(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_sequence(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_sequence_res *res)
++ void *res)
+ {
+ struct compound_hdr hdr;
+ int status;
+@@ -7092,10 +7180,11 @@ static int nfs4_xdr_dec_sequence(struct rpc_rqst *rqstp,
+ /*
+ * Decode GET_LEASE_TIME response
+ */
+-static int nfs4_xdr_dec_get_lease_time(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_get_lease_time(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_get_lease_time_res *res)
++ void *_res)
+ {
++ struct nfs4_get_lease_time_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7112,10 +7201,11 @@ static int nfs4_xdr_dec_get_lease_time(struct rpc_rqst *rqstp,
+ /*
+ * Decode RECLAIM_COMPLETE response
+ */
+-static int nfs4_xdr_dec_reclaim_complete(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_reclaim_complete(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs41_reclaim_complete_res *res)
++ void *_res)
+ {
++ struct nfs41_reclaim_complete_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7130,10 +7220,11 @@ static int nfs4_xdr_dec_reclaim_complete(struct rpc_rqst *rqstp,
+ /*
+ * Decode GETDEVINFO response
+ */
+-static int nfs4_xdr_dec_getdeviceinfo(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_getdeviceinfo(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_getdeviceinfo_res *res)
++ void *_res)
+ {
++ struct nfs4_getdeviceinfo_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7151,10 +7242,11 @@ out:
+ /*
+ * Decode LAYOUTGET response
+ */
+-static int nfs4_xdr_dec_layoutget(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_layoutget(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_layoutget_res *res)
++ void *_res)
+ {
++ struct nfs4_layoutget_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7175,10 +7267,11 @@ out:
+ /*
+ * Decode LAYOUTRETURN response
+ */
+-static int nfs4_xdr_dec_layoutreturn(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_layoutreturn(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_layoutreturn_res *res)
++ void *_res)
+ {
++ struct nfs4_layoutreturn_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7199,10 +7292,11 @@ out:
+ /*
+ * Decode LAYOUTCOMMIT response
+ */
+-static int nfs4_xdr_dec_layoutcommit(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_layoutcommit(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_layoutcommit_res *res)
++ void *_res)
+ {
++ struct nfs4_layoutcommit_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7226,10 +7320,11 @@ out:
+ /*
+ * Decode SECINFO_NO_NAME response
+ */
+-static int nfs4_xdr_dec_secinfo_no_name(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_secinfo_no_name(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs4_secinfo_res *res)
++ void *_res)
+ {
++ struct nfs4_secinfo_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7250,10 +7345,11 @@ out:
+ /*
+ * Decode TEST_STATEID response
+ */
+-static int nfs4_xdr_dec_test_stateid(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_test_stateid(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs41_test_stateid_res *res)
++ void *_res)
+ {
++ struct nfs41_test_stateid_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7271,10 +7367,11 @@ out:
+ /*
+ * Decode FREE_STATEID response
+ */
+-static int nfs4_xdr_dec_free_stateid(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_free_stateid(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfs41_free_stateid_res *res)
++ void *_res)
+ {
++ struct nfs41_free_stateid_res *res = _res;
+ struct compound_hdr hdr;
+ int status;
+
+@@ -7439,8 +7536,8 @@ nfs4_stat_to_errno(int stat)
+ #define PROC(proc, argtype, restype) \
+ [NFSPROC4_CLNT_##proc] = { \
+ .p_proc = NFSPROC4_COMPOUND, \
+- .p_encode = (kxdreproc_t)nfs4_xdr_##argtype, \
+- .p_decode = (kxdrdproc_t)nfs4_xdr_##restype, \
++ .p_encode = nfs4_xdr_##argtype, \
++ .p_decode = nfs4_xdr_##restype, \
+ .p_arglen = NFS4_##argtype##_sz, \
+ .p_replen = NFS4_##restype##_sz, \
+ .p_statidx = NFSPROC4_CLNT_##proc, \
+diff --git a/fs/nfs/read.c b/fs/nfs/read.c
+index eb31e23..e3d68b7 100644
+--- a/fs/nfs/read.c
++++ b/fs/nfs/read.c
+@@ -346,7 +346,7 @@ struct nfs_readdesc {
+ };
+
+ static int
+-readpage_async_filler(void *data, struct page *page)
++readpage_async_filler(struct file *data, struct page *page)
+ {
+ struct nfs_readdesc *desc = (struct nfs_readdesc *)data;
+ struct nfs_page *new;
+diff --git a/fs/nfs/symlink.c b/fs/nfs/symlink.c
+index 4fe3eea..8922b2b 100644
+--- a/fs/nfs/symlink.c
++++ b/fs/nfs/symlink.c
+@@ -25,9 +25,10 @@
+ * and straight-forward than readdir caching.
+ */
+
+-static int nfs_symlink_filler(struct inode *inode, struct page *page)
++static int nfs_symlink_filler(struct file *_inode, struct page *page)
+ {
+ int error;
++ struct inode *inode = (struct inode *)_inode;
+
+ error = NFS_PROTO(inode)->readlink(inode, page, 0, PAGE_SIZE);
+ if (error < 0)
+@@ -64,8 +65,7 @@ static const char *nfs_get_link(struct dentry *dentry,
+ err = ERR_PTR(nfs_revalidate_mapping(inode, inode->i_mapping));
+ if (err)
+ return err;
+- page = read_cache_page(&inode->i_data, 0,
+- (filler_t *)nfs_symlink_filler, inode);
++ page = read_cache_page(&inode->i_data, 0, nfs_symlink_filler, inode);
+ if (IS_ERR(page))
+ return ERR_CAST(page);
+ }
+diff --git a/fs/nfsd/current_stateid.h b/fs/nfsd/current_stateid.h
+index 4123551..813b403 100644
+--- a/fs/nfsd/current_stateid.h
++++ b/fs/nfsd/current_stateid.h
+@@ -8,21 +8,21 @@ extern void clear_current_stateid(struct nfsd4_compound_state *cstate);
+ /*
+ * functions to set current state id
+ */
+-extern void nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *);
+-extern void nfsd4_set_openstateid(struct nfsd4_compound_state *, struct nfsd4_open *);
+-extern void nfsd4_set_lockstateid(struct nfsd4_compound_state *, struct nfsd4_lock *);
+-extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *);
++extern void nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, void *);
++extern void nfsd4_set_openstateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_set_lockstateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_set_closestateid(struct nfsd4_compound_state *, void *);
+
+ /*
+ * functions to consume current state id
+ */
+-extern void nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *);
+-extern void nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *, struct nfsd4_delegreturn *);
+-extern void nfsd4_get_freestateid(struct nfsd4_compound_state *, struct nfsd4_free_stateid *);
+-extern void nfsd4_get_setattrstateid(struct nfsd4_compound_state *, struct nfsd4_setattr *);
+-extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, struct nfsd4_close *);
+-extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, struct nfsd4_locku *);
+-extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, struct nfsd4_read *);
+-extern void nfsd4_get_writestateid(struct nfsd4_compound_state *, struct nfsd4_write *);
++extern void nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, void *);
++extern void nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_get_freestateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_get_setattrstateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_get_closestateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_get_lockustateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_get_readstateid(struct nfsd4_compound_state *, void *);
++extern void nfsd4_get_writestateid(struct nfsd4_compound_state *, void *);
+
+ #endif /* _NFSD4_CURRENT_STATE_H */
+diff --git a/fs/nfsd/nfs2acl.c b/fs/nfsd/nfs2acl.c
+index 1580ea6..9c7f44f 100644
+--- a/fs/nfsd/nfs2acl.c
++++ b/fs/nfsd/nfs2acl.c
+@@ -27,9 +27,10 @@ nfsacld_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
+ /*
+ * Get the Access and/or Default ACL of a file.
+ */
+-static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp,
+- struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp)
++static __be32 nfsacld_proc_getacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_getaclargs *argp = _argp;
++ struct nfsd3_getaclres *resp = _resp;
+ struct posix_acl *acl;
+ struct inode *inode;
+ svc_fh *fh;
+@@ -87,10 +88,10 @@ fail:
+ /*
+ * Set the Access and/or Default ACL of a file.
+ */
+-static __be32 nfsacld_proc_setacl(struct svc_rqst * rqstp,
+- struct nfsd3_setaclargs *argp,
+- struct nfsd_attrstat *resp)
++static __be32 nfsacld_proc_setacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_setaclargs *argp = _argp;
++ struct nfsd_attrstat *resp = _resp;
+ struct inode *inode;
+ svc_fh *fh;
+ __be32 nfserr = 0;
+@@ -141,9 +142,10 @@ out_errno:
+ /*
+ * Check file attributes
+ */
+-static __be32 nfsacld_proc_getattr(struct svc_rqst * rqstp,
+- struct nfsd_fhandle *argp, struct nfsd_attrstat *resp)
++static __be32 nfsacld_proc_getattr(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd_attrstat *resp = _resp;
+ __be32 nfserr;
+ dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh));
+
+@@ -158,9 +160,10 @@ static __be32 nfsacld_proc_getattr(struct svc_rqst * rqstp,
+ /*
+ * Check file access
+ */
+-static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
+- struct nfsd3_accessres *resp)
++static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_accessargs *argp = _argp;
++ struct nfsd3_accessres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: ACCESS(2acl) %s 0x%x\n",
+@@ -179,9 +182,10 @@ static __be32 nfsacld_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessarg
+ /*
+ * XDR decode functions
+ */
+-static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_getaclargs *argp)
++static int nfsaclsvc_decode_getaclargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nfsd3_getaclargs *argp = _argp;
++
+ p = nfs2svc_decode_fh(p, &argp->fh);
+ if (!p)
+ return 0;
+@@ -191,9 +195,10 @@ static int nfsaclsvc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+
+-static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_setaclargs *argp)
++static int nfsaclsvc_decode_setaclargs(void *_rqstp, __be32 *p, void *_argp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_setaclargs *argp = _argp;
+ struct kvec *head = rqstp->rq_arg.head;
+ unsigned int base;
+ int n;
+@@ -217,18 +222,20 @@ static int nfsaclsvc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
+ return (n > 0);
+ }
+
+-static int nfsaclsvc_decode_fhandleargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_fhandle *argp)
++static int nfsaclsvc_decode_fhandleargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++
+ p = nfs2svc_decode_fh(p, &argp->fh);
+ if (!p)
+ return 0;
+ return xdr_argsize_check(rqstp, p);
+ }
+
+-static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_accessargs *argp)
++static int nfsaclsvc_decode_accessargs(void *rqstp, __be32 *p, void *_argp)
+ {
++ struct nfsd3_accessargs *argp = _argp;
++
+ p = nfs2svc_decode_fh(p, &argp->fh);
+ if (!p)
+ return 0;
+@@ -245,15 +252,16 @@ static int nfsaclsvc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
+ * There must be an encoding function for void results so svc_process
+ * will work properly.
+ */
+-static int nfsaclsvc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++static int nfsaclsvc_encode_voidres(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ /* GETACL */
+-static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_getaclres *resp)
++static int nfsaclsvc_encode_getaclres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_getaclres *resp = _resp;
+ struct dentry *dentry = resp->fh.fh_dentry;
+ struct inode *inode;
+ struct kvec *head = rqstp->rq_res.head;
+@@ -296,17 +304,19 @@ static int nfsaclsvc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
+ return (n > 0);
+ }
+
+-static int nfsaclsvc_encode_attrstatres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_attrstat *resp)
++static int nfsaclsvc_encode_attrstatres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd_attrstat *resp = _resp;
++
+ p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ /* ACCESS */
+-static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_accessres *resp)
++static int nfsaclsvc_encode_accessres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_accessres *resp = _resp;
++
+ p = nfs2svc_encode_fattr(rqstp, p, &resp->fh, &resp->stat);
+ *p++ = htonl(resp->access);
+ return xdr_ressize_check(rqstp, p);
+@@ -315,27 +325,30 @@ static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
+ /*
+ * XDR release functions
+ */
+-static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_getaclres *resp)
++static int nfsaclsvc_release_getacl(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_getaclres *resp = _resp;
++
+ fh_put(&resp->fh);
+ posix_acl_release(resp->acl_access);
+ posix_acl_release(resp->acl_default);
+ return 1;
+ }
+
+-static int nfsaclsvc_release_attrstat(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_attrstat *resp)
++static int nfsaclsvc_release_attrstat(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd_attrstat *resp = _resp;
++
+ fh_put(&resp->fh);
+ return 1;
+ }
+
+-static int nfsaclsvc_release_access(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_accessres *resp)
++static int nfsaclsvc_release_access(void *rqstp, __be32 *p, void *_resp)
+ {
+- fh_put(&resp->fh);
+- return 1;
++ struct nfsd3_accessres *resp = _resp;
++
++ fh_put(&resp->fh);
++ return 1;
+ }
+
+ #define nfsaclsvc_decode_voidargs NULL
+@@ -346,10 +359,10 @@ static int nfsaclsvc_release_access(struct svc_rqst *rqstp, __be32 *p,
+ struct nfsd3_voidargs { int dummy; };
+
+ #define PROC(name, argt, rest, relt, cache, respsize) \
+- { (svc_procfunc) nfsacld_proc_##name, \
+- (kxdrproc_t) nfsaclsvc_decode_##argt##args, \
+- (kxdrproc_t) nfsaclsvc_encode_##rest##res, \
+- (kxdrproc_t) nfsaclsvc_release_##relt, \
++ { nfsacld_proc_##name, \
++ nfsaclsvc_decode_##argt##args, \
++ nfsaclsvc_encode_##rest##res, \
++ nfsaclsvc_release_##relt, \
+ sizeof(struct nfsd3_##argt##args), \
+ sizeof(struct nfsd3_##rest##res), \
+ 0, \
+diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
+index 01df4cd..f11e111 100644
+--- a/fs/nfsd/nfs3acl.c
++++ b/fs/nfsd/nfs3acl.c
+@@ -26,9 +26,10 @@ nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
+ /*
+ * Get the Access and/or Default ACL of a file.
+ */
+-static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp,
+- struct nfsd3_getaclargs *argp, struct nfsd3_getaclres *resp)
++static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_getaclargs *argp = _argp;
++ struct nfsd3_getaclres *resp = _resp;
+ struct posix_acl *acl;
+ struct inode *inode;
+ svc_fh *fh;
+@@ -80,10 +81,10 @@ fail:
+ /*
+ * Set the Access and/or Default ACL of a file.
+ */
+-static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp,
+- struct nfsd3_setaclargs *argp,
+- struct nfsd3_attrstat *resp)
++static __be32 nfsd3_proc_setacl(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_setaclargs *argp = _argp;
++ struct nfsd3_attrstat *resp = _resp;
+ struct inode *inode;
+ svc_fh *fh;
+ __be32 nfserr = 0;
+@@ -125,9 +126,10 @@ out:
+ /*
+ * XDR decode functions
+ */
+-static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_getaclargs *args)
++static int nfs3svc_decode_getaclargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_getaclargs *args = _args;
++
+ p = nfs3svc_decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -137,9 +139,10 @@ static int nfs3svc_decode_getaclargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+
+-static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_setaclargs *args)
++static int nfs3svc_decode_setaclargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_setaclargs *args = _args;
+ struct kvec *head = rqstp->rq_arg.head;
+ unsigned int base;
+ int n;
+@@ -168,9 +171,10 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p,
+ */
+
+ /* GETACL */
+-static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_getaclres *resp)
++static int nfs3svc_encode_getaclres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_getaclres *resp = _resp;
+ struct dentry *dentry = resp->fh.fh_dentry;
+
+ p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
+@@ -213,9 +217,10 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ /* SETACL */
+-static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_attrstat *resp)
++static int nfs3svc_encode_setaclres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_attrstat *resp = _resp;
++
+ p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
+
+ return xdr_ressize_check(rqstp, p);
+@@ -224,9 +229,10 @@ static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p,
+ /*
+ * XDR release functions
+ */
+-static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_getaclres *resp)
++static int nfs3svc_release_getacl(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_getaclres *resp = _resp;
++
+ fh_put(&resp->fh);
+ posix_acl_release(resp->acl_access);
+ posix_acl_release(resp->acl_default);
+@@ -240,10 +246,10 @@ static int nfs3svc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
+ struct nfsd3_voidargs { int dummy; };
+
+ #define PROC(name, argt, rest, relt, cache, respsize) \
+- { (svc_procfunc) nfsd3_proc_##name, \
+- (kxdrproc_t) nfs3svc_decode_##argt##args, \
+- (kxdrproc_t) nfs3svc_encode_##rest##res, \
+- (kxdrproc_t) nfs3svc_release_##relt, \
++ { nfsd3_proc_##name, \
++ nfs3svc_decode_##argt##args, \
++ nfs3svc_encode_##rest##res, \
++ nfs3svc_release_##relt, \
+ sizeof(struct nfsd3_##argt##args), \
+ sizeof(struct nfsd3_##rest##res), \
+ 0, \
+diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
+index 7b755b7..910495b 100644
+--- a/fs/nfsd/nfs3proc.c
++++ b/fs/nfsd/nfs3proc.c
+@@ -40,9 +40,10 @@ nfsd3_proc_null(struct svc_rqst *rqstp, void *argp, void *resp)
+ * Get a file's attributes
+ */
+ static __be32
+-nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
+- struct nfsd3_attrstat *resp)
++nfsd3_proc_getattr(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd3_attrstat *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: GETATTR(3) %s\n",
+@@ -63,9 +64,10 @@ nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
+ * Set a file's attributes
+ */
+ static __be32
+-nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp,
+- struct nfsd3_attrstat *resp)
++nfsd3_proc_setattr(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_sattrargs *argp = _argp;
++ struct nfsd3_attrstat *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: SETATTR(3) %s\n",
+@@ -81,9 +83,10 @@ nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp,
+ * Look up a path name component
+ */
+ static __be32
+-nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
+- struct nfsd3_diropres *resp)
++nfsd3_proc_lookup(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_diropargs *argp = _argp;
++ struct nfsd3_diropres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: LOOKUP(3) %s %.*s\n",
+@@ -105,9 +108,10 @@ nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
+ * Check file access
+ */
+ static __be32
+-nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
+- struct nfsd3_accessres *resp)
++nfsd3_proc_access(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_accessargs *argp = _argp;
++ struct nfsd3_accessres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: ACCESS(3) %s 0x%x\n",
+@@ -124,9 +128,10 @@ nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
+ * Read a symlink.
+ */
+ static __be32
+-nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp,
+- struct nfsd3_readlinkres *resp)
++nfsd3_proc_readlink(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_readlinkargs *argp = _argp;
++ struct nfsd3_readlinkres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: READLINK(3) %s\n", SVCFH_fmt(&argp->fh));
+@@ -142,9 +147,10 @@ nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd3_readlinkargs *argp,
+ * Read a portion of a file.
+ */
+ static __be32
+-nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
+- struct nfsd3_readres *resp)
++nfsd3_proc_read(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_readargs *argp = _argp;
++ struct nfsd3_readres *resp = _resp;
+ __be32 nfserr;
+ u32 max_blocksize = svc_max_payload(rqstp);
+
+@@ -178,9 +184,10 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
+ * Write data to a file
+ */
+ static __be32
+-nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
+- struct nfsd3_writeres *resp)
++nfsd3_proc_write(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_writeargs *argp = _argp;
++ struct nfsd3_writeres *resp = _resp;
+ __be32 nfserr;
+ unsigned long cnt = argp->len;
+
+@@ -207,9 +214,10 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
+ * first reports about SunOS compatibility problems start to pour in...
+ */
+ static __be32
+-nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
+- struct nfsd3_diropres *resp)
++nfsd3_proc_create(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_createargs *argp = _argp;
++ struct nfsd3_diropres *resp = _resp;
+ svc_fh *dirfhp, *newfhp = NULL;
+ struct iattr *attr;
+ __be32 nfserr;
+@@ -244,9 +252,10 @@ nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
+ * Make directory. This operation is not idempotent.
+ */
+ static __be32
+-nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
+- struct nfsd3_diropres *resp)
++nfsd3_proc_mkdir(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_createargs *argp = _argp;
++ struct nfsd3_diropres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: MKDIR(3) %s %.*s\n",
+@@ -264,9 +273,10 @@ nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
+ }
+
+ static __be32
+-nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp,
+- struct nfsd3_diropres *resp)
++nfsd3_proc_symlink(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_symlinkargs *argp = _argp;
++ struct nfsd3_diropres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: SYMLINK(3) %s %.*s -> %.*s\n",
+@@ -285,9 +295,10 @@ nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp,
+ * Make socket/fifo/device.
+ */
+ static __be32
+-nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
+- struct nfsd3_diropres *resp)
++nfsd3_proc_mknod(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_mknodargs *argp = _argp;
++ struct nfsd3_diropres *resp = _resp;
+ __be32 nfserr;
+ int type;
+ dev_t rdev = 0;
+@@ -322,9 +333,10 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
+ * Remove file/fifo/socket etc.
+ */
+ static __be32
+-nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
+- struct nfsd3_attrstat *resp)
++nfsd3_proc_remove(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_diropargs *argp = _argp;
++ struct nfsd3_attrstat *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: REMOVE(3) %s %.*s\n",
+@@ -343,9 +355,10 @@ nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
+ * Remove a directory
+ */
+ static __be32
+-nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
+- struct nfsd3_attrstat *resp)
++nfsd3_proc_rmdir(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_diropargs *argp = _argp;
++ struct nfsd3_attrstat *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: RMDIR(3) %s %.*s\n",
+@@ -360,9 +373,10 @@ nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
+ }
+
+ static __be32
+-nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp,
+- struct nfsd3_renameres *resp)
++nfsd3_proc_rename(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_renameargs *argp = _argp;
++ struct nfsd3_renameres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: RENAME(3) %s %.*s ->\n",
+@@ -382,9 +396,10 @@ nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp,
+ }
+
+ static __be32
+-nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp,
+- struct nfsd3_linkres *resp)
++nfsd3_proc_link(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_linkargs *argp = _argp;
++ struct nfsd3_linkres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: LINK(3) %s ->\n",
+@@ -405,9 +420,10 @@ nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp,
+ * Read a portion of a directory.
+ */
+ static __be32
+-nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
+- struct nfsd3_readdirres *resp)
++nfsd3_proc_readdir(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_readdirargs *argp = _argp;
++ struct nfsd3_readdirres *resp = _resp;
+ __be32 nfserr;
+ int count;
+
+@@ -441,9 +457,10 @@ nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
+ * For now, we choose to ignore the dircount parameter.
+ */
+ static __be32
+-nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
+- struct nfsd3_readdirres *resp)
++nfsd3_proc_readdirplus(struct svc_rqst *rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_readdirargs *argp = _argp;
++ struct nfsd3_readdirres *resp = _resp;
+ __be32 nfserr;
+ int count = 0;
+ loff_t offset;
+@@ -508,9 +525,10 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
+ * Get file system stats
+ */
+ static __be32
+-nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+- struct nfsd3_fsstatres *resp)
++nfsd3_proc_fsstat(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd3_fsstatres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: FSSTAT(3) %s\n",
+@@ -525,9 +543,10 @@ nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+ * Get file system info
+ */
+ static __be32
+-nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+- struct nfsd3_fsinfores *resp)
++nfsd3_proc_fsinfo(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd3_fsinfores *resp = _resp;
+ __be32 nfserr;
+ u32 max_blocksize = svc_max_payload(rqstp);
+
+@@ -568,9 +587,10 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+ * Get pathconf info for the specified file
+ */
+ static __be32
+-nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+- struct nfsd3_pathconfres *resp)
++nfsd3_proc_pathconf(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd3_pathconfres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: PATHCONF(3) %s\n",
+@@ -611,9 +631,10 @@ nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+ * Commit a file (range) to stable storage.
+ */
+ static __be32
+-nfsd3_proc_commit(struct svc_rqst * rqstp, struct nfsd3_commitargs *argp,
+- struct nfsd3_commitres *resp)
++nfsd3_proc_commit(struct svc_rqst * rqstp, void *_argp, void *_resp)
+ {
++ struct nfsd3_commitargs *argp = _argp;
++ struct nfsd3_commitres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: COMMIT(3) %s %u@%Lu\n",
+@@ -668,213 +689,213 @@ struct nfsd3_voidargs { int dummy; };
+
+ static struct svc_procedure nfsd_procedures3[22] = {
+ [NFS3PROC_NULL] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_null,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_voidres,
++ .pc_func = nfsd3_proc_null,
++ .pc_encode = nfs3svc_encode_voidres,
+ .pc_argsize = sizeof(struct nfsd3_voidargs),
+ .pc_ressize = sizeof(struct nfsd3_voidres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST,
+ },
+ [NFS3PROC_GETATTR] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_getattr,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_attrstatres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_getattr,
++ .pc_decode = nfs3svc_decode_fhandleargs,
++ .pc_encode = nfs3svc_encode_attrstatres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+ .pc_ressize = sizeof(struct nfsd3_attrstatres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+AT,
+ },
+ [NFS3PROC_SETATTR] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_setattr,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_sattrargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_wccstatres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_setattr,
++ .pc_decode = nfs3svc_decode_sattrargs,
++ .pc_encode = nfs3svc_encode_wccstatres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_sattrargs),
+ .pc_ressize = sizeof(struct nfsd3_wccstatres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+WC,
+ },
+ [NFS3PROC_LOOKUP] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_lookup,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_diropargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_diropres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_lookup,
++ .pc_decode = nfs3svc_decode_diropargs,
++ .pc_encode = nfs3svc_encode_diropres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_diropargs),
+ .pc_ressize = sizeof(struct nfsd3_diropres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+FH+pAT+pAT,
+ },
+ [NFS3PROC_ACCESS] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_access,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_accessargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_accessres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_access,
++ .pc_decode = nfs3svc_decode_accessargs,
++ .pc_encode = nfs3svc_encode_accessres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_accessargs),
+ .pc_ressize = sizeof(struct nfsd3_accessres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+pAT+1,
+ },
+ [NFS3PROC_READLINK] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_readlink,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_readlinkargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_readlinkres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_readlink,
++ .pc_decode = nfs3svc_decode_readlinkargs,
++ .pc_encode = nfs3svc_encode_readlinkres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_readlinkargs),
+ .pc_ressize = sizeof(struct nfsd3_readlinkres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+pAT+1+NFS3_MAXPATHLEN/4,
+ },
+ [NFS3PROC_READ] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_read,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_readargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_readres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_read,
++ .pc_decode = nfs3svc_decode_readargs,
++ .pc_encode = nfs3svc_encode_readres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_readargs),
+ .pc_ressize = sizeof(struct nfsd3_readres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+pAT+4+NFSSVC_MAXBLKSIZE/4,
+ },
+ [NFS3PROC_WRITE] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_write,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_writeargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_writeres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_write,
++ .pc_decode = nfs3svc_decode_writeargs,
++ .pc_encode = nfs3svc_encode_writeres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_writeargs),
+ .pc_ressize = sizeof(struct nfsd3_writeres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+WC+4,
+ },
+ [NFS3PROC_CREATE] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_create,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_createargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_create,
++ .pc_decode = nfs3svc_decode_createargs,
++ .pc_encode = nfs3svc_encode_createres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_createargs),
+ .pc_ressize = sizeof(struct nfsd3_createres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+(1+FH+pAT)+WC,
+ },
+ [NFS3PROC_MKDIR] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_mkdir,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_mkdirargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_mkdir,
++ .pc_decode = nfs3svc_decode_mkdirargs,
++ .pc_encode = nfs3svc_encode_createres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_mkdirargs),
+ .pc_ressize = sizeof(struct nfsd3_createres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+(1+FH+pAT)+WC,
+ },
+ [NFS3PROC_SYMLINK] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_symlink,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_symlinkargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_symlink,
++ .pc_decode = nfs3svc_decode_symlinkargs,
++ .pc_encode = nfs3svc_encode_createres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_symlinkargs),
+ .pc_ressize = sizeof(struct nfsd3_createres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+(1+FH+pAT)+WC,
+ },
+ [NFS3PROC_MKNOD] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_mknod,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_mknodargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_createres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_mknod,
++ .pc_decode = nfs3svc_decode_mknodargs,
++ .pc_encode = nfs3svc_encode_createres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_mknodargs),
+ .pc_ressize = sizeof(struct nfsd3_createres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+(1+FH+pAT)+WC,
+ },
+ [NFS3PROC_REMOVE] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_remove,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_diropargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_wccstatres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_remove,
++ .pc_decode = nfs3svc_decode_diropargs,
++ .pc_encode = nfs3svc_encode_wccstatres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_diropargs),
+ .pc_ressize = sizeof(struct nfsd3_wccstatres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+WC,
+ },
+ [NFS3PROC_RMDIR] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_rmdir,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_diropargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_wccstatres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_rmdir,
++ .pc_decode = nfs3svc_decode_diropargs,
++ .pc_encode = nfs3svc_encode_wccstatres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_diropargs),
+ .pc_ressize = sizeof(struct nfsd3_wccstatres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+WC,
+ },
+ [NFS3PROC_RENAME] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_rename,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_renameargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_renameres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_rename,
++ .pc_decode = nfs3svc_decode_renameargs,
++ .pc_encode = nfs3svc_encode_renameres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_renameargs),
+ .pc_ressize = sizeof(struct nfsd3_renameres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+WC+WC,
+ },
+ [NFS3PROC_LINK] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_link,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_linkargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_linkres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle2,
++ .pc_func = nfsd3_proc_link,
++ .pc_decode = nfs3svc_decode_linkargs,
++ .pc_encode = nfs3svc_encode_linkres,
++ .pc_release = nfs3svc_release_fhandle2,
+ .pc_argsize = sizeof(struct nfsd3_linkargs),
+ .pc_ressize = sizeof(struct nfsd3_linkres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+pAT+WC,
+ },
+ [NFS3PROC_READDIR] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_readdir,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_readdirargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_readdirres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_readdir,
++ .pc_decode = nfs3svc_decode_readdirargs,
++ .pc_encode = nfs3svc_encode_readdirres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_readdirargs),
+ .pc_ressize = sizeof(struct nfsd3_readdirres),
+ .pc_cachetype = RC_NOCACHE,
+ },
+ [NFS3PROC_READDIRPLUS] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_readdirplus,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_readdirplusargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_readdirres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_readdirplus,
++ .pc_decode = nfs3svc_decode_readdirplusargs,
++ .pc_encode = nfs3svc_encode_readdirres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_readdirplusargs),
+ .pc_ressize = sizeof(struct nfsd3_readdirres),
+ .pc_cachetype = RC_NOCACHE,
+ },
+ [NFS3PROC_FSSTAT] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_fsstat,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_fsstatres,
++ .pc_func = nfsd3_proc_fsstat,
++ .pc_decode = nfs3svc_decode_fhandleargs,
++ .pc_encode = nfs3svc_encode_fsstatres,
+ .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+ .pc_ressize = sizeof(struct nfsd3_fsstatres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+pAT+2*6+1,
+ },
+ [NFS3PROC_FSINFO] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_fsinfo,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_fsinfores,
++ .pc_func = nfsd3_proc_fsinfo,
++ .pc_decode = nfs3svc_decode_fhandleargs,
++ .pc_encode = nfs3svc_encode_fsinfores,
+ .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+ .pc_ressize = sizeof(struct nfsd3_fsinfores),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+pAT+12,
+ },
+ [NFS3PROC_PATHCONF] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_pathconf,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_fhandleargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_pathconfres,
++ .pc_func = nfsd3_proc_pathconf,
++ .pc_decode = nfs3svc_decode_fhandleargs,
++ .pc_encode = nfs3svc_encode_pathconfres,
+ .pc_argsize = sizeof(struct nfsd3_fhandleargs),
+ .pc_ressize = sizeof(struct nfsd3_pathconfres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+pAT+6,
+ },
+ [NFS3PROC_COMMIT] = {
+- .pc_func = (svc_procfunc) nfsd3_proc_commit,
+- .pc_decode = (kxdrproc_t) nfs3svc_decode_commitargs,
+- .pc_encode = (kxdrproc_t) nfs3svc_encode_commitres,
+- .pc_release = (kxdrproc_t) nfs3svc_release_fhandle,
++ .pc_func = nfsd3_proc_commit,
++ .pc_decode = nfs3svc_decode_commitargs,
++ .pc_encode = nfs3svc_encode_commitres,
++ .pc_release = nfs3svc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd3_commitargs),
+ .pc_ressize = sizeof(struct nfsd3_commitres),
+ .pc_cachetype = RC_NOCACHE,
+diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
+index 2246454..b866de8 100644
+--- a/fs/nfsd/nfs3xdr.c
++++ b/fs/nfsd/nfs3xdr.c
+@@ -273,8 +273,10 @@ void fill_post_wcc(struct svc_fh *fhp)
+ * XDR decode functions
+ */
+ int
+-nfs3svc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *args)
++nfs3svc_decode_fhandle(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_fhandle *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -282,9 +284,10 @@ nfs3svc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *a
+ }
+
+ int
+-nfs3svc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_sattrargs *args)
++nfs3svc_decode_sattrargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_sattrargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -300,9 +303,10 @@ nfs3svc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_diropargs *args)
++nfs3svc_decode_diropargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_diropargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->fh))
+ || !(p = decode_filename(p, &args->name, &args->len)))
+ return 0;
+@@ -311,9 +315,10 @@ nfs3svc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_accessargs *args)
++nfs3svc_decode_accessargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_accessargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -323,9 +328,10 @@ nfs3svc_decode_accessargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readargs *args)
++nfs3svc_decode_readargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readargs *args = _args;
+ unsigned int len;
+ int v;
+ u32 max_blocksize = svc_max_payload(rqstp);
+@@ -353,9 +359,10 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_writeargs *args)
++nfs3svc_decode_writeargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_writeargs *args = _args;
+ unsigned int len, v, hdr, dlen;
+ u32 max_blocksize = svc_max_payload(rqstp);
+
+@@ -410,9 +417,11 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_createargs *args)
++nfs3svc_decode_createargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_createargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->fh))
+ || !(p = decode_filename(p, &args->name, &args->len)))
+ return 0;
+@@ -433,9 +442,10 @@ nfs3svc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
+ return xdr_argsize_check(rqstp, p);
+ }
+ int
+-nfs3svc_decode_mkdirargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_createargs *args)
++nfs3svc_decode_mkdirargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_createargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->fh)) ||
+ !(p = decode_filename(p, &args->name, &args->len)))
+ return 0;
+@@ -445,9 +455,10 @@ nfs3svc_decode_mkdirargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_symlinkargs *args)
++nfs3svc_decode_symlinkargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_symlinkargs *args = _args;
+ unsigned int len, avail;
+ char *old, *new;
+ struct kvec *vec;
+@@ -495,9 +506,10 @@ nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_mknodargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_mknodargs *args)
++nfs3svc_decode_mknodargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_mknodargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->fh))
+ || !(p = decode_filename(p, &args->name, &args->len)))
+ return 0;
+@@ -517,9 +529,10 @@ nfs3svc_decode_mknodargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_renameargs *args)
++nfs3svc_decode_renameargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_renameargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->ffh))
+ || !(p = decode_filename(p, &args->fname, &args->flen))
+ || !(p = decode_fh(p, &args->tfh))
+@@ -530,9 +543,11 @@ nfs3svc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readlinkargs *args)
++nfs3svc_decode_readlinkargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readlinkargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -542,9 +557,10 @@ nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_linkargs *args)
++nfs3svc_decode_linkargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_linkargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->ffh))
+ || !(p = decode_fh(p, &args->tfh))
+ || !(p = decode_filename(p, &args->tname, &args->tlen)))
+@@ -554,9 +570,11 @@ nfs3svc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readdirargs *args)
++nfs3svc_decode_readdirargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readdirargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -571,9 +589,10 @@ nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readdirargs *args)
++nfs3svc_decode_readdirplusargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readdirargs *args = _args;
+ int len;
+ u32 max_blocksize = svc_max_payload(rqstp);
+
+@@ -597,9 +616,10 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfs3svc_decode_commitargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_commitargs *args)
++nfs3svc_decode_commitargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd3_commitargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -617,16 +637,17 @@ nfs3svc_decode_commitargs(struct svc_rqst *rqstp, __be32 *p,
+ * will work properly.
+ */
+ int
+-nfs3svc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nfs3svc_encode_voidres(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ /* GETATTR */
+ int
+-nfs3svc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_attrstat *resp)
++nfs3svc_encode_attrstat(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_attrstat *resp = _resp;
++
+ if (resp->status == 0) {
+ lease_get_mtime(d_inode(resp->fh.fh_dentry),
+ &resp->stat.mtime);
+@@ -637,18 +658,20 @@ nfs3svc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
+
+ /* SETATTR, REMOVE, RMDIR */
+ int
+-nfs3svc_encode_wccstat(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_attrstat *resp)
++nfs3svc_encode_wccstat(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_attrstat *resp = _resp;
++
+ p = encode_wcc_data(rqstp, p, &resp->fh);
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ /* LOOKUP */
+ int
+-nfs3svc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_diropres *resp)
++nfs3svc_encode_diropres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_diropres *resp = _resp;
++
+ if (resp->status == 0) {
+ p = encode_fh(p, &resp->fh);
+ p = encode_post_op_attr(rqstp, p, &resp->fh);
+@@ -659,9 +682,10 @@ nfs3svc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* ACCESS */
+ int
+-nfs3svc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_accessres *resp)
++nfs3svc_encode_accessres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_accessres *resp = _resp;
++
+ p = encode_post_op_attr(rqstp, p, &resp->fh);
+ if (resp->status == 0)
+ *p++ = htonl(resp->access);
+@@ -670,9 +694,11 @@ nfs3svc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* READLINK */
+ int
+-nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readlinkres *resp)
++nfs3svc_encode_readlinkres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readlinkres *resp = _resp;
++
+ p = encode_post_op_attr(rqstp, p, &resp->fh);
+ if (resp->status == 0) {
+ *p++ = htonl(resp->len);
+@@ -691,9 +717,11 @@ nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* READ */
+ int
+-nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readres *resp)
++nfs3svc_encode_readres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readres *resp = _resp;
++
+ p = encode_post_op_attr(rqstp, p, &resp->fh);
+ if (resp->status == 0) {
+ *p++ = htonl(resp->count);
+@@ -715,9 +743,10 @@ nfs3svc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* WRITE */
+ int
+-nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_writeres *resp)
++nfs3svc_encode_writeres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_writeres *resp = _resp;
+ struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+
+ p = encode_wcc_data(rqstp, p, &resp->fh);
+@@ -732,9 +761,10 @@ nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* CREATE, MKDIR, SYMLINK, MKNOD */
+ int
+-nfs3svc_encode_createres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_diropres *resp)
++nfs3svc_encode_createres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_diropres *resp = _resp;
++
+ if (resp->status == 0) {
+ *p++ = xdr_one;
+ p = encode_fh(p, &resp->fh);
+@@ -746,9 +776,10 @@ nfs3svc_encode_createres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* RENAME */
+ int
+-nfs3svc_encode_renameres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_renameres *resp)
++nfs3svc_encode_renameres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_renameres *resp = _resp;
++
+ p = encode_wcc_data(rqstp, p, &resp->ffh);
+ p = encode_wcc_data(rqstp, p, &resp->tfh);
+ return xdr_ressize_check(rqstp, p);
+@@ -756,9 +787,10 @@ nfs3svc_encode_renameres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* LINK */
+ int
+-nfs3svc_encode_linkres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_linkres *resp)
++nfs3svc_encode_linkres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_linkres *resp = _resp;
++
+ p = encode_post_op_attr(rqstp, p, &resp->fh);
+ p = encode_wcc_data(rqstp, p, &resp->tfh);
+ return xdr_ressize_check(rqstp, p);
+@@ -766,9 +798,11 @@ nfs3svc_encode_linkres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* READDIR */
+ int
+-nfs3svc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_readdirres *resp)
++nfs3svc_encode_readdirres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_readdirres *resp = _resp;
++
+ p = encode_post_op_attr(rqstp, p, &resp->fh);
+
+ if (resp->status == 0) {
+@@ -1016,9 +1050,9 @@ nfs3svc_encode_entry_plus(void *cd, const char *name,
+
+ /* FSSTAT */
+ int
+-nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_fsstatres *resp)
++nfs3svc_encode_fsstatres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_fsstatres *resp = _resp;
+ struct kstatfs *s = &resp->stats;
+ u64 bs = s->f_bsize;
+
+@@ -1038,9 +1072,10 @@ nfs3svc_encode_fsstatres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* FSINFO */
+ int
+-nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_fsinfores *resp)
++nfs3svc_encode_fsinfores(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_fsinfores *resp = _resp;
++
+ *p++ = xdr_zero; /* no post_op_attr */
+
+ if (resp->status == 0) {
+@@ -1062,9 +1097,10 @@ nfs3svc_encode_fsinfores(struct svc_rqst *rqstp, __be32 *p,
+
+ /* PATHCONF */
+ int
+-nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_pathconfres *resp)
++nfs3svc_encode_pathconfres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_pathconfres *resp = _resp;
++
+ *p++ = xdr_zero; /* no post_op_attr */
+
+ if (resp->status == 0) {
+@@ -1081,9 +1117,10 @@ nfs3svc_encode_pathconfres(struct svc_rqst *rqstp, __be32 *p,
+
+ /* COMMIT */
+ int
+-nfs3svc_encode_commitres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_commitres *resp)
++nfs3svc_encode_commitres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd3_commitres *resp = _resp;
+ struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+
+ p = encode_wcc_data(rqstp, p, &resp->fh);
+@@ -1099,17 +1136,19 @@ nfs3svc_encode_commitres(struct svc_rqst *rqstp, __be32 *p,
+ * XDR release functions
+ */
+ int
+-nfs3svc_release_fhandle(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_attrstat *resp)
++nfs3svc_release_fhandle(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_attrstat *resp = _resp;
++
+ fh_put(&resp->fh);
+ return 1;
+ }
+
+ int
+-nfs3svc_release_fhandle2(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd3_fhandle_pair *resp)
++nfs3svc_release_fhandle2(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd3_fhandle_pair *resp = _resp;
++
+ fh_put(&resp->fh1);
+ fh_put(&resp->fh2);
+ return 1;
+diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
+index 7389cb1..e031e30d 100644
+--- a/fs/nfsd/nfs4callback.c
++++ b/fs/nfsd/nfs4callback.c
+@@ -470,8 +470,7 @@ static int decode_cb_sequence4res(struct xdr_stream *xdr,
+ /*
+ * NB: Without this zero space reservation, callbacks over krb5p fail
+ */
+-static void nfs4_xdr_enc_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
+- void *__unused)
++static void nfs4_xdr_enc_cb_null(void *req, struct xdr_stream *xdr, void *__unused)
+ {
+ xdr_reserve_space(xdr, 0);
+ }
+@@ -479,9 +478,9 @@ static void nfs4_xdr_enc_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * 20.2. Operation 4: CB_RECALL - Recall a Delegation
+ */
+-static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct nfsd4_callback *cb)
++static void nfs4_xdr_enc_cb_recall(void *req, struct xdr_stream *xdr, void *_cb)
+ {
++ const struct nfsd4_callback *cb = _cb;
+ const struct nfs4_delegation *dp = cb_to_delegation(cb);
+ struct nfs4_cb_compound_hdr hdr = {
+ .ident = cb->cb_clp->cl_cb_ident,
+@@ -504,8 +503,7 @@ static void nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, struct xdr_stream *xdr,
+ * Protocol".
+ */
+
+-static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
+- void *__unused)
++static int nfs4_xdr_dec_cb_null(void *req, struct xdr_stream *xdr, void *__unused)
+ {
+ return 0;
+ }
+@@ -513,10 +511,11 @@ static int nfs4_xdr_dec_cb_null(struct rpc_rqst *req, struct xdr_stream *xdr,
+ /*
+ * 20.2. Operation 4: CB_RECALL - Recall a Delegation
+ */
+-static int nfs4_xdr_dec_cb_recall(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_cb_recall(void *rqstp,
+ struct xdr_stream *xdr,
+- struct nfsd4_callback *cb)
++ void *_cb)
+ {
++ struct nfsd4_callback *cb = _cb;
+ struct nfs4_cb_compound_hdr hdr;
+ int status;
+
+@@ -586,10 +585,12 @@ static void encode_cb_layout4args(struct xdr_stream *xdr,
+ hdr->nops++;
+ }
+
+-static void nfs4_xdr_enc_cb_layout(struct rpc_rqst *req,
++static void nfs4_xdr_enc_cb_layout(void *_req,
+ struct xdr_stream *xdr,
+- const struct nfsd4_callback *cb)
++ void *_cb)
+ {
++ struct rpc_rqst *req = _req;
++ const struct nfsd4_callback *cb = _cb;
+ const struct nfs4_layout_stateid *ls =
+ container_of(cb, struct nfs4_layout_stateid, ls_recall);
+ struct nfs4_cb_compound_hdr hdr = {
+@@ -603,10 +604,12 @@ static void nfs4_xdr_enc_cb_layout(struct rpc_rqst *req,
+ encode_cb_nops(&hdr);
+ }
+
+-static int nfs4_xdr_dec_cb_layout(struct rpc_rqst *rqstp,
++static int nfs4_xdr_dec_cb_layout(void *_rqstp,
+ struct xdr_stream *xdr,
+- struct nfsd4_callback *cb)
++ void *_cb)
+ {
++ struct rpc_rqst *rqstp = _rqstp;
++ struct nfsd4_callback *cb = _cb;
+ struct nfs4_cb_compound_hdr hdr;
+ int status;
+
+@@ -629,8 +632,8 @@ static int nfs4_xdr_dec_cb_layout(struct rpc_rqst *rqstp,
+ #define PROC(proc, call, argtype, restype) \
+ [NFSPROC4_CLNT_##proc] = { \
+ .p_proc = NFSPROC4_CB_##call, \
+- .p_encode = (kxdreproc_t)nfs4_xdr_enc_##argtype, \
+- .p_decode = (kxdrdproc_t)nfs4_xdr_dec_##restype, \
++ .p_encode = nfs4_xdr_enc_##argtype, \
++ .p_decode = nfs4_xdr_dec_##restype, \
+ .p_arglen = NFS4_enc_##argtype##_sz, \
+ .p_replen = NFS4_dec_##restype##_sz, \
+ .p_statidx = NFSPROC4_CB_##call, \
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
-index 7d5351c..144fc32 100644
+index f8082c7..ded62562 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
-@@ -1486,7 +1486,7 @@ struct nfsd4_operation {
+@@ -358,8 +358,9 @@ copy_clientid(clientid_t *clid, struct nfsd4_session *session)
+
+ static __be32
+ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_open *open)
++ void *_open)
+ {
++ struct nfsd4_open *open = _open;
+ __be32 status;
+ struct svc_fh *resfh = NULL;
+ struct net *net = SVC_NET(rqstp);
+@@ -496,8 +497,10 @@ static __be32 nfsd4_open_omfg(struct svc_rqst *rqstp, struct nfsd4_compound_stat
+ */
+ static __be32
+ nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct svc_fh **getfh)
++ void *_getfh)
+ {
++ struct svc_fh **getfh = (struct svc_fh **)_getfh;
++
+ if (!cstate->current_fh.fh_dentry)
+ return nfserr_nofilehandle;
+
+@@ -507,8 +510,10 @@ nfsd4_getfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_putfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_putfh *putfh)
++ void *_putfh)
+ {
++ struct nfsd4_putfh *putfh = _putfh;
++
+ fh_put(&cstate->current_fh);
+ cstate->current_fh.fh_handle.fh_size = putfh->pf_fhlen;
+ memcpy(&cstate->current_fh.fh_handle.fh_base, putfh->pf_fhval,
+@@ -562,8 +567,10 @@ nfsd4_savefh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+ */
+ static __be32
+ nfsd4_access(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_access *access)
++ void *_access)
+ {
++ struct nfsd4_access *access = _access;
++
+ if (access->ac_req_access & ~NFS3_ACCESS_FULL)
+ return nfserr_inval;
+
+@@ -588,8 +595,10 @@ static void gen_boot_verifier(nfs4_verifier *verifier, struct net *net)
+
+ static __be32
+ nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_commit *commit)
++ void *_commit)
+ {
++ struct nfsd4_commit *commit = _commit;
++
+ gen_boot_verifier(&commit->co_verf, SVC_NET(rqstp));
+ return nfsd_commit(rqstp, &cstate->current_fh, commit->co_offset,
+ commit->co_count);
+@@ -597,8 +606,9 @@ nfsd4_commit(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_create(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_create *create)
++ void *_create)
+ {
++ struct nfsd4_create *create = _create;
+ struct svc_fh resfh;
+ __be32 status;
+ dev_t rdev;
+@@ -685,8 +695,9 @@ out:
+
+ static __be32
+ nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_getattr *getattr)
++ void *_getattr)
+ {
++ struct nfsd4_getattr *getattr = _getattr;
+ __be32 status;
+
+ status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
+@@ -706,8 +717,9 @@ nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_link *link)
++ void *_link)
+ {
++ struct nfsd4_link *link = _link;
+ __be32 status = nfserr_nofilehandle;
+
+ if (!cstate->save_fh.fh_dentry)
+@@ -745,8 +757,9 @@ nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_lookup *lookup)
++ void *_lookup)
+ {
++ struct nfsd4_lookup *lookup = _lookup;
+ return nfsd_lookup(rqstp, &cstate->current_fh,
+ lookup->lo_name, lookup->lo_len,
+ &cstate->current_fh);
+@@ -754,8 +767,9 @@ nfsd4_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_read *read)
++ void *_read)
+ {
++ struct nfsd4_read *read = _read;
+ __be32 status;
+
+ read->rd_filp = NULL;
+@@ -790,8 +804,9 @@ out:
+
+ static __be32
+ nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_readdir *readdir)
++ void *_readdir)
+ {
++ struct nfsd4_readdir *readdir = _readdir;
+ u64 cookie = readdir->rd_cookie;
+ static const nfs4_verifier zeroverf;
+
+@@ -815,8 +830,10 @@ nfsd4_readdir(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_readlink *readlink)
++ void *_readlink)
+ {
++ struct nfsd4_readlink *readlink = _readlink;
++
+ readlink->rl_rqstp = rqstp;
+ readlink->rl_fhp = &cstate->current_fh;
+ return nfs_ok;
+@@ -824,8 +841,9 @@ nfsd4_readlink(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_remove *remove)
++ void *_remove)
+ {
++ struct nfsd4_remove *remove = _remove;
+ __be32 status;
+
+ if (opens_in_grace(SVC_NET(rqstp)))
+@@ -841,8 +859,9 @@ nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_rename *rename)
++ void *_rename)
+ {
++ struct nfsd4_rename *rename = _rename;
+ __be32 status = nfserr_nofilehandle;
+
+ if (!cstate->save_fh.fh_dentry)
+@@ -862,8 +881,9 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_secinfo *secinfo)
++ void *_secinfo)
+ {
++ struct nfsd4_secinfo *secinfo = _secinfo;
+ struct svc_fh resfh;
+ struct svc_export *exp;
+ struct dentry *dentry;
+@@ -893,8 +913,9 @@ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_secinfo_no_name *sin)
++ void *_sin)
+ {
++ struct nfsd4_secinfo_no_name *sin = _sin;
+ __be32 err;
+
+ switch (sin->sin_style) {
+@@ -916,8 +937,9 @@ nfsd4_secinfo_no_name(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstat
+
+ static __be32
+ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_setattr *setattr)
++ void *_setattr)
+ {
++ struct nfsd4_setattr *setattr = _setattr;
+ __be32 status = nfs_ok;
+ int err;
+
+@@ -977,8 +999,9 @@ static int fill_in_write_vector(struct kvec *vec, struct nfsd4_write *write)
+
+ static __be32
+ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_write *write)
++ void *_write)
+ {
++ struct nfsd4_write *write = _write;
+ stateid_t *stateid = &write->wr_stateid;
+ struct file *filp = NULL;
+ __be32 status = nfs_ok;
+@@ -1014,8 +1037,9 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_clone(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_clone *clone)
++ void *_clone)
+ {
++ struct nfsd4_clone *clone = _clone;
+ struct file *src, *dst;
+ __be32 status;
+
+@@ -1078,23 +1102,28 @@ nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_allocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_fallocate *fallocate)
++ void *_fallocate)
+ {
++ struct nfsd4_fallocate *fallocate = _fallocate;
++
+ return nfsd4_fallocate(rqstp, cstate, fallocate, 0);
+ }
+
+ static __be32
+ nfsd4_deallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_fallocate *fallocate)
++ void *_fallocate)
+ {
++ struct nfsd4_fallocate *fallocate = _fallocate;
++
+ return nfsd4_fallocate(rqstp, cstate, fallocate,
+ FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE);
+ }
+
+ static __be32
+ nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_seek *seek)
++ void *_seek)
+ {
++ struct nfsd4_seek *seek = (struct nfsd4_seek *)_seek;
+ int whence;
+ __be32 status;
+ struct file *file;
+@@ -1141,8 +1170,9 @@ out:
+ */
+ static __be32
+ _nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_verify *verify)
++ void *_verify)
+ {
++ struct nfsd4_verify *verify = _verify;
+ __be32 *buf, *p;
+ int count;
+ __be32 status;
+@@ -1199,8 +1229,9 @@ out_kfree:
+
+ static __be32
+ nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_verify *verify)
++ void *_verify)
+ {
++ struct nfsd4_verify *verify = _verify;
+ __be32 status;
+
+ status = _nfsd4_verify(rqstp, cstate, verify);
+@@ -1209,8 +1240,9 @@ nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ static __be32
+ nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_verify *verify)
++ void *_verify)
+ {
++ struct nfsd4_verify *verify = _verify;
+ __be32 status;
+
+ status = _nfsd4_verify(rqstp, cstate, verify);
+@@ -1238,8 +1270,9 @@ nfsd4_layout_verify(struct svc_export *exp, unsigned int layout_type)
+ static __be32
+ nfsd4_getdeviceinfo(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_getdeviceinfo *gdp)
++ void *_gdp)
+ {
++ struct nfsd4_getdeviceinfo *gdp = _gdp;
+ const struct nfsd4_layout_ops *ops;
+ struct nfsd4_deviceid_map *map;
+ struct svc_export *exp;
+@@ -1282,8 +1315,9 @@ out:
+ static __be32
+ nfsd4_layoutget(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_layoutget *lgp)
++ void *_lgp)
+ {
++ struct nfsd4_layoutget *lgp = _lgp;
+ struct svc_fh *current_fh = &cstate->current_fh;
+ const struct nfsd4_layout_ops *ops;
+ struct nfs4_layout_stateid *ls;
+@@ -1362,8 +1396,9 @@ out:
+ static __be32
+ nfsd4_layoutcommit(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_layoutcommit *lcp)
++ void *_lcp)
+ {
++ struct nfsd4_layoutcommit *lcp = _lcp;
+ const struct nfsd4_layout_seg *seg = &lcp->lc_seg;
+ struct svc_fh *current_fh = &cstate->current_fh;
+ const struct nfsd4_layout_ops *ops;
+@@ -1426,8 +1461,9 @@ out:
+ static __be32
+ nfsd4_layoutreturn(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_layoutreturn *lrp)
++ void *_lrp)
+ {
++ struct nfsd4_layoutreturn *lrp = _lrp;
+ struct svc_fh *current_fh = &cstate->current_fh;
+ __be32 nfserr;
+
+@@ -1529,7 +1565,7 @@ struct nfsd4_operation {
nfsd4op_rsize op_rsize_bop;
stateid_getter op_get_currentstateid;
stateid_setter op_set_currentstateid;
@@ -85480,19 +105885,2098 @@ index 7d5351c..144fc32 100644
static struct nfsd4_operation nfsd4_ops[];
+@@ -1637,10 +1673,10 @@ static void svcxdr_init_encode(struct svc_rqst *rqstp,
+ * COMPOUND call.
+ */
+ static __be32
+-nfsd4_proc_compound(struct svc_rqst *rqstp,
+- struct nfsd4_compoundargs *args,
+- struct nfsd4_compoundres *resp)
++nfsd4_proc_compound(struct svc_rqst *rqstp, void *_args, void *_resp)
+ {
++ struct nfsd4_compoundargs *args = _args;
++ struct nfsd4_compoundres *resp = _resp;
+ struct nfsd4_op *op;
+ struct nfsd4_operation *opdesc;
+ struct nfsd4_compound_state *cstate = &resp->cstate;
+@@ -1999,338 +2035,338 @@ static inline u32 nfsd4_layoutreturn_rsize(struct svc_rqst *rqstp, struct nfsd4_
+
+ static struct nfsd4_operation nfsd4_ops[] = {
+ [OP_ACCESS] = {
+- .op_func = (nfsd4op_func)nfsd4_access,
++ .op_func = nfsd4_access,
+ .op_name = "OP_ACCESS",
+ },
+ [OP_CLOSE] = {
+- .op_func = (nfsd4op_func)nfsd4_close,
++ .op_func = nfsd4_close,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_CLOSE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_closestateid,
+- .op_set_currentstateid = (stateid_setter)nfsd4_set_closestateid,
++ .op_rsize_bop = nfsd4_status_stateid_rsize,
++ .op_get_currentstateid = nfsd4_get_closestateid,
++ .op_set_currentstateid = nfsd4_set_closestateid,
+ },
+ [OP_COMMIT] = {
+- .op_func = (nfsd4op_func)nfsd4_commit,
++ .op_func = nfsd4_commit,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_COMMIT",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_commit_rsize,
++ .op_rsize_bop = nfsd4_commit_rsize,
+ },
+ [OP_CREATE] = {
+- .op_func = (nfsd4op_func)nfsd4_create,
++ .op_func = nfsd4_create,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME | OP_CLEAR_STATEID,
+ .op_name = "OP_CREATE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_create_rsize,
++ .op_rsize_bop = nfsd4_create_rsize,
+ },
+ [OP_DELEGRETURN] = {
+- .op_func = (nfsd4op_func)nfsd4_delegreturn,
++ .op_func = nfsd4_delegreturn,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_DELEGRETURN",
+ .op_rsize_bop = nfsd4_only_status_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_delegreturnstateid,
++ .op_get_currentstateid = nfsd4_get_delegreturnstateid,
+ },
+ [OP_GETATTR] = {
+- .op_func = (nfsd4op_func)nfsd4_getattr,
++ .op_func = nfsd4_getattr,
+ .op_flags = ALLOWED_ON_ABSENT_FS,
+ .op_rsize_bop = nfsd4_getattr_rsize,
+ .op_name = "OP_GETATTR",
+ },
+ [OP_GETFH] = {
+- .op_func = (nfsd4op_func)nfsd4_getfh,
++ .op_func = nfsd4_getfh,
+ .op_name = "OP_GETFH",
+ },
+ [OP_LINK] = {
+- .op_func = (nfsd4op_func)nfsd4_link,
++ .op_func = nfsd4_link,
+ .op_flags = ALLOWED_ON_ABSENT_FS | OP_MODIFIES_SOMETHING
+ | OP_CACHEME,
+ .op_name = "OP_LINK",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_link_rsize,
++ .op_rsize_bop = nfsd4_link_rsize,
+ },
+ [OP_LOCK] = {
+- .op_func = (nfsd4op_func)nfsd4_lock,
++ .op_func = nfsd4_lock,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_LOCK",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_lock_rsize,
+- .op_set_currentstateid = (stateid_setter)nfsd4_set_lockstateid,
++ .op_rsize_bop = nfsd4_lock_rsize,
++ .op_set_currentstateid = nfsd4_set_lockstateid,
+ },
+ [OP_LOCKT] = {
+- .op_func = (nfsd4op_func)nfsd4_lockt,
++ .op_func = nfsd4_lockt,
+ .op_name = "OP_LOCKT",
+ },
+ [OP_LOCKU] = {
+- .op_func = (nfsd4op_func)nfsd4_locku,
++ .op_func = nfsd4_locku,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_LOCKU",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_lockustateid,
++ .op_rsize_bop = nfsd4_status_stateid_rsize,
++ .op_get_currentstateid = nfsd4_get_lockustateid,
+ },
+ [OP_LOOKUP] = {
+- .op_func = (nfsd4op_func)nfsd4_lookup,
++ .op_func = nfsd4_lookup,
+ .op_flags = OP_HANDLES_WRONGSEC | OP_CLEAR_STATEID,
+ .op_name = "OP_LOOKUP",
+ },
+ [OP_LOOKUPP] = {
+- .op_func = (nfsd4op_func)nfsd4_lookupp,
++ .op_func = nfsd4_lookupp,
+ .op_flags = OP_HANDLES_WRONGSEC | OP_CLEAR_STATEID,
+ .op_name = "OP_LOOKUPP",
+ },
+ [OP_NVERIFY] = {
+- .op_func = (nfsd4op_func)nfsd4_nverify,
++ .op_func = nfsd4_nverify,
+ .op_name = "OP_NVERIFY",
+ },
+ [OP_OPEN] = {
+- .op_func = (nfsd4op_func)nfsd4_open,
++ .op_func = nfsd4_open,
+ .op_flags = OP_HANDLES_WRONGSEC | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_OPEN",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_open_rsize,
+- .op_set_currentstateid = (stateid_setter)nfsd4_set_openstateid,
++ .op_rsize_bop = nfsd4_open_rsize,
++ .op_set_currentstateid = nfsd4_set_openstateid,
+ },
+ [OP_OPEN_CONFIRM] = {
+- .op_func = (nfsd4op_func)nfsd4_open_confirm,
++ .op_func = nfsd4_open_confirm,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_OPEN_CONFIRM",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
++ .op_rsize_bop = nfsd4_status_stateid_rsize,
+ },
+ [OP_OPEN_DOWNGRADE] = {
+- .op_func = (nfsd4op_func)nfsd4_open_downgrade,
++ .op_func = nfsd4_open_downgrade,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_OPEN_DOWNGRADE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_status_stateid_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_opendowngradestateid,
+- .op_set_currentstateid = (stateid_setter)nfsd4_set_opendowngradestateid,
++ .op_rsize_bop = nfsd4_status_stateid_rsize,
++ .op_get_currentstateid = nfsd4_get_opendowngradestateid,
++ .op_set_currentstateid = nfsd4_set_opendowngradestateid,
+ },
+ [OP_PUTFH] = {
+- .op_func = (nfsd4op_func)nfsd4_putfh,
++ .op_func = nfsd4_putfh,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_IS_PUTFH_LIKE | OP_CLEAR_STATEID,
+ .op_name = "OP_PUTFH",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_PUTPUBFH] = {
+- .op_func = (nfsd4op_func)nfsd4_putrootfh,
++ .op_func = nfsd4_putrootfh,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_IS_PUTFH_LIKE | OP_CLEAR_STATEID,
+ .op_name = "OP_PUTPUBFH",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_PUTROOTFH] = {
+- .op_func = (nfsd4op_func)nfsd4_putrootfh,
++ .op_func = nfsd4_putrootfh,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_IS_PUTFH_LIKE | OP_CLEAR_STATEID,
+ .op_name = "OP_PUTROOTFH",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_READ] = {
+- .op_func = (nfsd4op_func)nfsd4_read,
++ .op_func = nfsd4_read,
+ .op_name = "OP_READ",
+ .op_rsize_bop = (nfsd4op_rsize)nfsd4_read_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_readstateid,
++ .op_get_currentstateid = nfsd4_get_readstateid,
+ },
+ [OP_READDIR] = {
+- .op_func = (nfsd4op_func)nfsd4_readdir,
++ .op_func = nfsd4_readdir,
+ .op_name = "OP_READDIR",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_readdir_rsize,
++ .op_rsize_bop = nfsd4_readdir_rsize,
+ },
+ [OP_READLINK] = {
+- .op_func = (nfsd4op_func)nfsd4_readlink,
++ .op_func = nfsd4_readlink,
+ .op_name = "OP_READLINK",
+ },
+ [OP_REMOVE] = {
+- .op_func = (nfsd4op_func)nfsd4_remove,
++ .op_func = nfsd4_remove,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_REMOVE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_remove_rsize,
++ .op_rsize_bop = nfsd4_remove_rsize,
+ },
+ [OP_RENAME] = {
+- .op_func = (nfsd4op_func)nfsd4_rename,
++ .op_func = nfsd4_rename,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_RENAME",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_rename_rsize,
++ .op_rsize_bop = nfsd4_rename_rsize,
+ },
+ [OP_RENEW] = {
+- .op_func = (nfsd4op_func)nfsd4_renew,
++ .op_func = nfsd4_renew,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_RENEW",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+
+ },
+ [OP_RESTOREFH] = {
+- .op_func = (nfsd4op_func)nfsd4_restorefh,
++ .op_func = nfsd4_restorefh,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_IS_PUTFH_LIKE | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_RESTOREFH",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_SAVEFH] = {
+- .op_func = (nfsd4op_func)nfsd4_savefh,
++ .op_func = nfsd4_savefh,
+ .op_flags = OP_HANDLES_WRONGSEC | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_SAVEFH",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_SECINFO] = {
+- .op_func = (nfsd4op_func)nfsd4_secinfo,
++ .op_func = nfsd4_secinfo,
+ .op_flags = OP_HANDLES_WRONGSEC,
+ .op_name = "OP_SECINFO",
+ },
+ [OP_SETATTR] = {
+- .op_func = (nfsd4op_func)nfsd4_setattr,
++ .op_func = nfsd4_setattr,
+ .op_name = "OP_SETATTR",
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_setattr_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_setattrstateid,
++ .op_rsize_bop = nfsd4_setattr_rsize,
++ .op_get_currentstateid = nfsd4_get_setattrstateid,
+ },
+ [OP_SETCLIENTID] = {
+- .op_func = (nfsd4op_func)nfsd4_setclientid,
++ .op_func = nfsd4_setclientid,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_SETCLIENTID",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_setclientid_rsize,
++ .op_rsize_bop = nfsd4_setclientid_rsize,
+ },
+ [OP_SETCLIENTID_CONFIRM] = {
+- .op_func = (nfsd4op_func)nfsd4_setclientid_confirm,
++ .op_func = nfsd4_setclientid_confirm,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_SETCLIENTID_CONFIRM",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_VERIFY] = {
+- .op_func = (nfsd4op_func)nfsd4_verify,
++ .op_func = nfsd4_verify,
+ .op_name = "OP_VERIFY",
+ },
+ [OP_WRITE] = {
+- .op_func = (nfsd4op_func)nfsd4_write,
++ .op_func = nfsd4_write,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_WRITE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_writestateid,
++ .op_rsize_bop = nfsd4_write_rsize,
++ .op_get_currentstateid = nfsd4_get_writestateid,
+ },
+ [OP_RELEASE_LOCKOWNER] = {
+- .op_func = (nfsd4op_func)nfsd4_release_lockowner,
++ .op_func = nfsd4_release_lockowner,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_RELEASE_LOCKOWNER",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+
+ /* NFSv4.1 operations */
+ [OP_EXCHANGE_ID] = {
+- .op_func = (nfsd4op_func)nfsd4_exchange_id,
++ .op_func = nfsd4_exchange_id,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_EXCHANGE_ID",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_exchange_id_rsize,
++ .op_rsize_bop = nfsd4_exchange_id_rsize,
+ },
+ [OP_BACKCHANNEL_CTL] = {
+- .op_func = (nfsd4op_func)nfsd4_backchannel_ctl,
++ .op_func = nfsd4_backchannel_ctl,
+ .op_flags = ALLOWED_WITHOUT_FH | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_BACKCHANNEL_CTL",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_BIND_CONN_TO_SESSION] = {
+- .op_func = (nfsd4op_func)nfsd4_bind_conn_to_session,
++ .op_func = nfsd4_bind_conn_to_session,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_BIND_CONN_TO_SESSION",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_bind_conn_to_session_rsize,
++ .op_rsize_bop = nfsd4_bind_conn_to_session_rsize,
+ },
+ [OP_CREATE_SESSION] = {
+- .op_func = (nfsd4op_func)nfsd4_create_session,
++ .op_func = nfsd4_create_session,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_CREATE_SESSION",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_create_session_rsize,
++ .op_rsize_bop = nfsd4_create_session_rsize,
+ },
+ [OP_DESTROY_SESSION] = {
+- .op_func = (nfsd4op_func)nfsd4_destroy_session,
++ .op_func = nfsd4_destroy_session,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_DESTROY_SESSION",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_SEQUENCE] = {
+- .op_func = (nfsd4op_func)nfsd4_sequence,
++ .op_func = nfsd4_sequence,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP,
+ .op_name = "OP_SEQUENCE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_sequence_rsize,
++ .op_rsize_bop = nfsd4_sequence_rsize,
+ },
+ [OP_DESTROY_CLIENTID] = {
+- .op_func = (nfsd4op_func)nfsd4_destroy_clientid,
++ .op_func = nfsd4_destroy_clientid,
+ .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_AS_FIRST_OP
+ | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_DESTROY_CLIENTID",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_RECLAIM_COMPLETE] = {
+- .op_func = (nfsd4op_func)nfsd4_reclaim_complete,
++ .op_func = nfsd4_reclaim_complete,
+ .op_flags = ALLOWED_WITHOUT_FH | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_RECLAIM_COMPLETE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_SECINFO_NO_NAME] = {
+- .op_func = (nfsd4op_func)nfsd4_secinfo_no_name,
++ .op_func = nfsd4_secinfo_no_name,
+ .op_flags = OP_HANDLES_WRONGSEC,
+ .op_name = "OP_SECINFO_NO_NAME",
+ },
+ [OP_TEST_STATEID] = {
+- .op_func = (nfsd4op_func)nfsd4_test_stateid,
++ .op_func = nfsd4_test_stateid,
+ .op_flags = ALLOWED_WITHOUT_FH,
+ .op_name = "OP_TEST_STATEID",
+ },
+ [OP_FREE_STATEID] = {
+- .op_func = (nfsd4op_func)nfsd4_free_stateid,
++ .op_func = nfsd4_free_stateid,
+ .op_flags = ALLOWED_WITHOUT_FH | OP_MODIFIES_SOMETHING,
+ .op_name = "OP_FREE_STATEID",
+- .op_get_currentstateid = (stateid_getter)nfsd4_get_freestateid,
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_get_currentstateid = nfsd4_get_freestateid,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ #ifdef CONFIG_NFSD_PNFS
+ [OP_GETDEVICEINFO] = {
+- .op_func = (nfsd4op_func)nfsd4_getdeviceinfo,
++ .op_func = nfsd4_getdeviceinfo,
+ .op_flags = ALLOWED_WITHOUT_FH,
+ .op_name = "OP_GETDEVICEINFO",
+ },
+ [OP_LAYOUTGET] = {
+- .op_func = (nfsd4op_func)nfsd4_layoutget,
++ .op_func = nfsd4_layoutget,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_LAYOUTGET",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_layoutget_rsize,
++ .op_rsize_bop = nfsd4_layoutget_rsize,
+ },
+ [OP_LAYOUTCOMMIT] = {
+- .op_func = (nfsd4op_func)nfsd4_layoutcommit,
++ .op_func = nfsd4_layoutcommit,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_LAYOUTCOMMIT",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_layoutcommit_rsize,
++ .op_rsize_bop = nfsd4_layoutcommit_rsize,
+ },
+ [OP_LAYOUTRETURN] = {
+- .op_func = (nfsd4op_func)nfsd4_layoutreturn,
++ .op_func = nfsd4_layoutreturn,
+ .op_flags = OP_MODIFIES_SOMETHING,
+ .op_name = "OP_LAYOUTRETURN",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_layoutreturn_rsize,
++ .op_rsize_bop = nfsd4_layoutreturn_rsize,
+ },
+ #endif /* CONFIG_NFSD_PNFS */
+
+ /* NFSv4.2 operations */
+ [OP_ALLOCATE] = {
+- .op_func = (nfsd4op_func)nfsd4_allocate,
++ .op_func = nfsd4_allocate,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_ALLOCATE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_DEALLOCATE] = {
+- .op_func = (nfsd4op_func)nfsd4_deallocate,
++ .op_func = nfsd4_deallocate,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_DEALLOCATE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_CLONE] = {
+- .op_func = (nfsd4op_func)nfsd4_clone,
++ .op_func = nfsd4_clone,
+ .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
+ .op_name = "OP_CLONE",
+- .op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
++ .op_rsize_bop = nfsd4_only_status_rsize,
+ },
+ [OP_SEEK] = {
+- .op_func = (nfsd4op_func)nfsd4_seek,
++ .op_func = nfsd4_seek,
+ .op_name = "OP_SEEK",
+ },
+ };
+@@ -2368,17 +2404,17 @@ struct nfsd4_voidargs { int dummy; };
+
+ static struct svc_procedure nfsd_procedures4[2] = {
+ [NFSPROC4_NULL] = {
+- .pc_func = (svc_procfunc) nfsd4_proc_null,
+- .pc_encode = (kxdrproc_t) nfs4svc_encode_voidres,
++ .pc_func = nfsd4_proc_null,
++ .pc_encode = nfs4svc_encode_voidres,
+ .pc_argsize = sizeof(struct nfsd4_voidargs),
+ .pc_ressize = sizeof(struct nfsd4_voidres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = 1,
+ },
+ [NFSPROC4_COMPOUND] = {
+- .pc_func = (svc_procfunc) nfsd4_proc_compound,
+- .pc_decode = (kxdrproc_t) nfs4svc_decode_compoundargs,
+- .pc_encode = (kxdrproc_t) nfs4svc_encode_compoundres,
++ .pc_func = nfsd4_proc_compound,
++ .pc_decode = nfs4svc_decode_compoundargs,
++ .pc_encode = nfs4svc_encode_compoundres,
+ .pc_argsize = sizeof(struct nfsd4_compoundargs),
+ .pc_ressize = sizeof(struct nfsd4_compoundres),
+ .pc_release = nfsd4_release_compoundargs,
+diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
+index c484a2b6..a1e3dd7 100644
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -2362,8 +2362,9 @@ static bool client_has_state(struct nfs4_client *clp)
+ __be32
+ nfsd4_exchange_id(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_exchange_id *exid)
++ void *_exid)
+ {
++ struct nfsd4_exchange_id *exid = _exid;
+ struct nfs4_client *conf, *new;
+ struct nfs4_client *unconf = NULL;
+ __be32 status;
+@@ -2633,8 +2634,9 @@ static __be32 nfsd4_check_cb_sec(struct nfsd4_cb_sec *cbs)
+ __be32
+ nfsd4_create_session(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_create_session *cr_ses)
++ void *_cr_ses)
+ {
++ struct nfsd4_create_session *cr_ses = _cr_ses;
+ struct sockaddr *sa = svc_addr(rqstp);
+ struct nfs4_client *conf, *unconf;
+ struct nfs4_client *old = NULL;
+@@ -2759,8 +2761,9 @@ static __be32 nfsd4_map_bcts_dir(u32 *dir)
+ return nfserr_inval;
+ }
+
+-__be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_backchannel_ctl *bc)
++__be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *_bc)
+ {
++ struct nfsd4_backchannel_ctl *bc = _bc;
+ struct nfsd4_session *session = cstate->session;
+ struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+ __be32 status;
+@@ -2780,8 +2783,9 @@ __be32 nfsd4_backchannel_ctl(struct svc_rqst *rqstp, struct nfsd4_compound_state
+
+ __be32 nfsd4_bind_conn_to_session(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_bind_conn_to_session *bcts)
++ void *_bcts)
+ {
++ struct nfsd4_bind_conn_to_session *bcts = _bcts;
+ __be32 status;
+ struct nfsd4_conn *conn;
+ struct nfsd4_session *session;
+@@ -2823,8 +2827,9 @@ static bool nfsd4_compound_in_session(struct nfsd4_session *session, struct nfs4
+ __be32
+ nfsd4_destroy_session(struct svc_rqst *r,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_destroy_session *sessionid)
++ void *_sessionid)
+ {
++ struct nfsd4_destroy_session *sessionid = _sessionid;
+ struct nfsd4_session *ses;
+ __be32 status;
+ int ref_held_by_me = 0;
+@@ -2920,8 +2925,9 @@ static bool nfsd4_request_too_big(struct svc_rqst *rqstp,
+ __be32
+ nfsd4_sequence(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_sequence *seq)
++ void *_seq)
+ {
++ struct nfsd4_sequence *seq = _seq;
+ struct nfsd4_compoundres *resp = rqstp->rq_resp;
+ struct xdr_stream *xdr = &resp->xdr;
+ struct nfsd4_session *session;
+@@ -3055,8 +3061,9 @@ nfsd4_sequence_done(struct nfsd4_compoundres *resp)
+ }
+
+ __be32
+-nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_destroy_clientid *dc)
++nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *_dc)
+ {
++ struct nfsd4_destroy_clientid *dc = _dc;
+ struct nfs4_client *conf, *unconf;
+ struct nfs4_client *clp = NULL;
+ __be32 status = 0;
+@@ -3096,8 +3103,9 @@ out:
+ }
+
+ __be32
+-nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_reclaim_complete *rc)
++nfsd4_reclaim_complete(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, void *_rc)
+ {
++ struct nfsd4_reclaim_complete *rc = _rc;
+ __be32 status = 0;
+
+ if (rc->rca_one_fs) {
+@@ -3134,8 +3142,9 @@ out:
+
+ __be32
+ nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_setclientid *setclid)
++ void *_setclid)
+ {
++ struct nfsd4_setclientid *setclid = _setclid;
+ struct xdr_netobj clname = setclid->se_name;
+ nfs4_verifier clverifier = setclid->se_verf;
+ struct nfs4_client *conf, *new;
+@@ -3193,8 +3202,9 @@ out:
+ __be32
+ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_setclientid_confirm *setclientid_confirm)
++ void *_setclientid_confirm)
+ {
++ struct nfsd4_setclientid_confirm *setclientid_confirm = _setclientid_confirm;
+ struct nfs4_client *conf, *unconf;
+ struct nfs4_client *old = NULL;
+ nfs4_verifier confirm = setclientid_confirm->sc_confirm;
+@@ -4431,8 +4441,9 @@ void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate,
+
+ __be32
+ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- clientid_t *clid)
++ void *_clid)
+ {
++ clientid_t *clid = _clid;
+ struct nfs4_client *clp;
+ __be32 status;
+ struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+@@ -4888,8 +4899,9 @@ out:
+ */
+ __be32
+ nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_test_stateid *test_stateid)
++ void *_test_stateid)
+ {
++ struct nfsd4_test_stateid *test_stateid = _test_stateid;
+ struct nfsd4_test_stateid_id *stateid;
+ struct nfs4_client *cl = cstate->session->se_client;
+
+@@ -4902,8 +4914,9 @@ nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+
+ __be32
+ nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_free_stateid *free_stateid)
++ void *_free_stateid)
+ {
++ struct nfsd4_free_stateid *free_stateid = _free_stateid;
+ stateid_t *stateid = &free_stateid->fr_stateid;
+ struct nfs4_stid *s;
+ struct nfs4_delegation *dp;
+@@ -5041,8 +5054,9 @@ static __be32 nfs4_preprocess_confirmed_seqid_op(struct nfsd4_compound_state *cs
+
+ __be32
+ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_open_confirm *oc)
++ void *_oc)
+ {
++ struct nfsd4_open_confirm *oc = _oc;
+ __be32 status;
+ struct nfs4_openowner *oo;
+ struct nfs4_ol_stateid *stp;
+@@ -5110,8 +5124,9 @@ static inline void nfs4_stateid_downgrade(struct nfs4_ol_stateid *stp, u32 to_ac
+ __be32
+ nfsd4_open_downgrade(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_open_downgrade *od)
++ void *_od)
+ {
++ struct nfsd4_open_downgrade *od = _od;
+ __be32 status;
+ struct nfs4_ol_stateid *stp;
+ struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
+@@ -5179,8 +5194,9 @@ static void nfsd4_close_open_stateid(struct nfs4_ol_stateid *s)
+ */
+ __be32
+ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_close *close)
++ void *_close)
+ {
++ struct nfsd4_close *close = _close;
+ __be32 status;
+ struct nfs4_ol_stateid *stp;
+ struct net *net = SVC_NET(rqstp);
+@@ -5209,8 +5225,9 @@ out:
+
+ __be32
+ nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_delegreturn *dr)
++ void *_dr)
+ {
++ struct nfsd4_delegreturn *dr = _dr;
+ struct nfs4_delegation *dp;
+ stateid_t *stateid = &dr->dr_stateid;
+ struct nfs4_stid *s;
+@@ -5544,8 +5561,9 @@ out:
+ */
+ __be32
+ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_lock *lock)
++ void *_lock)
+ {
++ struct nfsd4_lock *lock = _lock;
+ struct nfs4_openowner *open_sop = NULL;
+ struct nfs4_lockowner *lock_sop = NULL;
+ struct nfs4_ol_stateid *lock_stp = NULL;
+@@ -5748,8 +5766,9 @@ static __be32 nfsd_test_lock(struct svc_rqst *rqstp, struct svc_fh *fhp, struct
+ */
+ __be32
+ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_lockt *lockt)
++ void *_lockt)
+ {
++ struct nfsd4_lockt *lockt = _lockt;
+ struct file_lock *file_lock = NULL;
+ struct nfs4_lockowner *lo = NULL;
+ __be32 status;
+@@ -5821,8 +5840,9 @@ out:
+
+ __be32
+ nfsd4_locku(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+- struct nfsd4_locku *locku)
++ void *_locku)
+ {
++ struct nfsd4_locku *locku = _locku;
+ struct nfs4_ol_stateid *stp;
+ struct file *filp = NULL;
+ struct file_lock *file_lock = NULL;
+@@ -5928,8 +5948,9 @@ check_for_locks(struct nfs4_file *fp, struct nfs4_lockowner *lowner)
+ __be32
+ nfsd4_release_lockowner(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *cstate,
+- struct nfsd4_release_lockowner *rlockowner)
++ void *_rlockowner)
+ {
++ struct nfsd4_release_lockowner *rlockowner = _rlockowner;
+ clientid_t *clid = &rlockowner->rl_clientid;
+ struct nfs4_stateowner *sop;
+ struct nfs4_lockowner *lo = NULL;
+@@ -6873,26 +6894,34 @@ clear_current_stateid(struct nfsd4_compound_state *cstate)
+ * functions to set current state id
+ */
+ void
+-nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *odp)
++nfsd4_set_opendowngradestateid(struct nfsd4_compound_state *cstate, void *_odp)
+ {
++ struct nfsd4_open_downgrade *odp = _odp;
++
+ put_stateid(cstate, &odp->od_stateid);
+ }
+
+ void
+-nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, struct nfsd4_open *open)
++nfsd4_set_openstateid(struct nfsd4_compound_state *cstate, void *_open)
+ {
++ struct nfsd4_open *open = _open;
++
+ put_stateid(cstate, &open->op_stateid);
+ }
+
+ void
+-nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
++nfsd4_set_closestateid(struct nfsd4_compound_state *cstate, void *_close)
+ {
++ struct nfsd4_close *close = _close;
++
+ put_stateid(cstate, &close->cl_stateid);
+ }
+
+ void
+-nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lock)
++nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, void *_lock)
+ {
++ struct nfsd4_lock *lock = _lock;
++
+ put_stateid(cstate, &lock->lk_resp_stateid);
+ }
+
+@@ -6901,49 +6930,65 @@ nfsd4_set_lockstateid(struct nfsd4_compound_state *cstate, struct nfsd4_lock *lo
+ */
+
+ void
+-nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, struct nfsd4_open_downgrade *odp)
++nfsd4_get_opendowngradestateid(struct nfsd4_compound_state *cstate, void *_odp)
+ {
++ struct nfsd4_open_downgrade *odp = _odp;
++
+ get_stateid(cstate, &odp->od_stateid);
+ }
+
+ void
+-nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, struct nfsd4_delegreturn *drp)
++nfsd4_get_delegreturnstateid(struct nfsd4_compound_state *cstate, void *_drp)
+ {
++ struct nfsd4_delegreturn *drp = _drp;
++
+ get_stateid(cstate, &drp->dr_stateid);
+ }
+
+ void
+-nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, struct nfsd4_free_stateid *fsp)
++nfsd4_get_freestateid(struct nfsd4_compound_state *cstate, void *_fsp)
+ {
++ struct nfsd4_free_stateid *fsp = _fsp;
++
+ get_stateid(cstate, &fsp->fr_stateid);
+ }
+
+ void
+-nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, struct nfsd4_setattr *setattr)
++nfsd4_get_setattrstateid(struct nfsd4_compound_state *cstate, void *_setattr)
+ {
++ struct nfsd4_setattr *setattr = _setattr;
++
+ get_stateid(cstate, &setattr->sa_stateid);
+ }
+
+ void
+-nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, struct nfsd4_close *close)
++nfsd4_get_closestateid(struct nfsd4_compound_state *cstate, void *_close)
+ {
++ struct nfsd4_close *close = _close;
++
+ get_stateid(cstate, &close->cl_stateid);
+ }
+
+ void
+-nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, struct nfsd4_locku *locku)
++nfsd4_get_lockustateid(struct nfsd4_compound_state *cstate, void *_locku)
+ {
++ struct nfsd4_locku *locku = _locku;
++
+ get_stateid(cstate, &locku->lu_stateid);
+ }
+
+ void
+-nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, struct nfsd4_read *read)
++nfsd4_get_readstateid(struct nfsd4_compound_state *cstate, void *_read)
+ {
++ struct nfsd4_read *read = _read;
++
+ get_stateid(cstate, &read->rd_stateid);
+ }
+
+ void
+-nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, struct nfsd4_write *write)
++nfsd4_get_writestateid(struct nfsd4_compound_state *cstate, void *_write)
+ {
++ struct nfsd4_write *write = _write;
++
+ get_stateid(cstate, &write->wr_stateid);
+ }
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
-index 1293520..4cc2062 100644
+index 1600ec4..2c62d8d 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
-@@ -1706,7 +1706,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
+@@ -447,8 +447,9 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
+ }
+
+ static __be32
+-nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, stateid_t *sid)
++nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, void *_sid)
+ {
++ stateid_t *sid = _sid;
+ DECODE_HEAD;
+
+ READ_BUF(sizeof(stateid_t));
+@@ -459,8 +460,9 @@ nfsd4_decode_stateid(struct nfsd4_compoundargs *argp, stateid_t *sid)
+ }
+
+ static __be32
+-nfsd4_decode_access(struct nfsd4_compoundargs *argp, struct nfsd4_access *access)
++nfsd4_decode_access(struct nfsd4_compoundargs *argp, void *_access)
+ {
++ struct nfsd4_access *access = _access;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -469,8 +471,9 @@ nfsd4_decode_access(struct nfsd4_compoundargs *argp, struct nfsd4_access *access
+ DECODE_TAIL;
+ }
+
+-static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_cb_sec *cbs)
++static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, void *_cbs)
+ {
++ struct nfsd4_cb_sec *cbs = _cbs;
+ DECODE_HEAD;
+ u32 dummy, uid, gid;
+ char *machine_name;
+@@ -549,8 +552,9 @@ static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_
+ DECODE_TAIL;
+ }
+
+-static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, struct nfsd4_backchannel_ctl *bc)
++static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, void *_bc)
+ {
++ struct nfsd4_backchannel_ctl *bc = _bc;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -560,8 +564,9 @@ static __be32 nfsd4_decode_backchannel_ctl(struct nfsd4_compoundargs *argp, stru
+ DECODE_TAIL;
+ }
+
+-static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, struct nfsd4_bind_conn_to_session *bcts)
++static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp, void *_bcts)
+ {
++ struct nfsd4_bind_conn_to_session *bcts = _bcts;
+ DECODE_HEAD;
+
+ READ_BUF(NFS4_MAX_SESSIONID_LEN + 8);
+@@ -573,8 +578,9 @@ static __be32 nfsd4_decode_bind_conn_to_session(struct nfsd4_compoundargs *argp,
+ }
+
+ static __be32
+-nfsd4_decode_close(struct nfsd4_compoundargs *argp, struct nfsd4_close *close)
++nfsd4_decode_close(struct nfsd4_compoundargs *argp, void *_close)
+ {
++ struct nfsd4_close *close = _close;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -586,8 +592,9 @@ nfsd4_decode_close(struct nfsd4_compoundargs *argp, struct nfsd4_close *close)
+
+
+ static __be32
+-nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit)
++nfsd4_decode_commit(struct nfsd4_compoundargs *argp, void *_commit)
+ {
++ struct nfsd4_commit *commit = _commit;
+ DECODE_HEAD;
+
+ READ_BUF(12);
+@@ -598,8 +605,9 @@ nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit
+ }
+
+ static __be32
+-nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create)
++nfsd4_decode_create(struct nfsd4_compoundargs *argp, void *_create)
+ {
++ struct nfsd4_create *create = _create;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -642,20 +650,25 @@ nfsd4_decode_create(struct nfsd4_compoundargs *argp, struct nfsd4_create *create
+ }
+
+ static inline __be32
+-nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, struct nfsd4_delegreturn *dr)
++nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, void *_dr)
+ {
++ struct nfsd4_delegreturn *dr = _dr;
++
+ return nfsd4_decode_stateid(argp, &dr->dr_stateid);
+ }
+
+ static inline __be32
+-nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, struct nfsd4_getattr *getattr)
++nfsd4_decode_getattr(struct nfsd4_compoundargs *argp, void *_getattr)
+ {
++ struct nfsd4_getattr *getattr = _getattr;
++
+ return nfsd4_decode_bitmap(argp, getattr->ga_bmval);
+ }
+
+ static __be32
+-nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link)
++nfsd4_decode_link(struct nfsd4_compoundargs *argp, void *_link)
+ {
++ struct nfsd4_link *link = _link;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -669,8 +682,9 @@ nfsd4_decode_link(struct nfsd4_compoundargs *argp, struct nfsd4_link *link)
+ }
+
+ static __be32
+-nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
++nfsd4_decode_lock(struct nfsd4_compoundargs *argp, void *_lock)
+ {
++ struct nfsd4_lock *lock = _lock;
+ DECODE_HEAD;
+
+ /*
+@@ -709,8 +723,9 @@ nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
+ }
+
+ static __be32
+-nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt)
++nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, void *_lockt)
+ {
++ struct nfsd4_lockt *lockt = _lockt;
+ DECODE_HEAD;
+
+ READ_BUF(32);
+@@ -728,8 +743,9 @@ nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt)
+ }
+
+ static __be32
+-nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
++nfsd4_decode_locku(struct nfsd4_compoundargs *argp, void *_locku)
+ {
++ struct nfsd4_locku *locku = _locku;
+ DECODE_HEAD;
+
+ READ_BUF(8);
+@@ -748,8 +764,9 @@ nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
+ }
+
+ static __be32
+-nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, struct nfsd4_lookup *lookup)
++nfsd4_decode_lookup(struct nfsd4_compoundargs *argp, void *_lookup)
+ {
++ struct nfsd4_lookup *lookup = _lookup;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -847,8 +864,9 @@ xdr_error:
+ }
+
+ static __be32
+-nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
++nfsd4_decode_open(struct nfsd4_compoundargs *argp, void *_open)
+ {
++ struct nfsd4_open *open = _open;
+ DECODE_HEAD;
+ u32 dummy;
+
+@@ -960,8 +978,9 @@ nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
+ }
+
+ static __be32
+-nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_open_confirm *open_conf)
++nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, void *_open_conf)
+ {
++ struct nfsd4_open_confirm *open_conf = _open_conf;
+ DECODE_HEAD;
+
+ if (argp->minorversion >= 1)
+@@ -977,8 +996,9 @@ nfsd4_decode_open_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_open_con
+ }
+
+ static __be32
+-nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, struct nfsd4_open_downgrade *open_down)
++nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, void *_open_down)
+ {
++ struct nfsd4_open_downgrade *open_down = _open_down;
+ DECODE_HEAD;
+
+ status = nfsd4_decode_stateid(argp, &open_down->od_stateid);
+@@ -997,8 +1017,9 @@ nfsd4_decode_open_downgrade(struct nfsd4_compoundargs *argp, struct nfsd4_open_d
+ }
+
+ static __be32
+-nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, struct nfsd4_putfh *putfh)
++nfsd4_decode_putfh(struct nfsd4_compoundargs *argp, void *_putfh)
+ {
++ struct nfsd4_putfh *putfh = _putfh;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -1020,8 +1041,9 @@ nfsd4_decode_putpubfh(struct nfsd4_compoundargs *argp, void *p)
+ }
+
+ static __be32
+-nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
++nfsd4_decode_read(struct nfsd4_compoundargs *argp, void *_read)
+ {
++ struct nfsd4_read *read = _read;
+ DECODE_HEAD;
+
+ status = nfsd4_decode_stateid(argp, &read->rd_stateid);
+@@ -1035,8 +1057,9 @@ nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
+ }
+
+ static __be32
+-nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *readdir)
++nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, void *_readdir)
+ {
++ struct nfsd4_readdir *readdir = _readdir;
+ DECODE_HEAD;
+
+ READ_BUF(24);
+@@ -1051,8 +1074,9 @@ nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *read
+ }
+
+ static __be32
+-nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove)
++nfsd4_decode_remove(struct nfsd4_compoundargs *argp, void *_remove)
+ {
++ struct nfsd4_remove *remove = _remove;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -1066,8 +1090,9 @@ nfsd4_decode_remove(struct nfsd4_compoundargs *argp, struct nfsd4_remove *remove
+ }
+
+ static __be32
+-nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename)
++nfsd4_decode_rename(struct nfsd4_compoundargs *argp, void *_rename)
+ {
++ struct nfsd4_rename *rename = _rename;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -1087,7 +1112,7 @@ nfsd4_decode_rename(struct nfsd4_compoundargs *argp, struct nfsd4_rename *rename
+ }
+
+ static __be32
+-nfsd4_decode_renew(struct nfsd4_compoundargs *argp, clientid_t *clientid)
++nfsd4_decode_renew(struct nfsd4_compoundargs *argp, void *clientid)
+ {
+ DECODE_HEAD;
+
+@@ -1102,8 +1127,9 @@ nfsd4_decode_renew(struct nfsd4_compoundargs *argp, clientid_t *clientid)
+
+ static __be32
+ nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp,
+- struct nfsd4_secinfo *secinfo)
++ void *_secinfo)
+ {
++ struct nfsd4_secinfo *secinfo = _secinfo;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -1118,8 +1144,9 @@ nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
+- struct nfsd4_secinfo_no_name *sin)
++ void *_sin)
+ {
++ struct nfsd4_secinfo_no_name *sin = _sin;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -1128,8 +1155,9 @@ nfsd4_decode_secinfo_no_name(struct nfsd4_compoundargs *argp,
+ }
+
+ static __be32
+-nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *setattr)
++nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, void *_setattr)
+ {
++ struct nfsd4_setattr *setattr = _setattr;
+ __be32 status;
+
+ status = nfsd4_decode_stateid(argp, &setattr->sa_stateid);
+@@ -1140,8 +1168,9 @@ nfsd4_decode_setattr(struct nfsd4_compoundargs *argp, struct nfsd4_setattr *seta
+ }
+
+ static __be32
+-nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid *setclientid)
++nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, void *_setclientid)
+ {
++ struct nfsd4_setclientid *setclientid = _setclientid;
+ DECODE_HEAD;
+
+ if (argp->minorversion >= 1)
+@@ -1170,8 +1199,9 @@ nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclient
+ }
+
+ static __be32
+-nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid_confirm *scd_c)
++nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, void *_scd_c)
+ {
++ struct nfsd4_setclientid_confirm *scd_c = _scd_c;
+ DECODE_HEAD;
+
+ if (argp->minorversion >= 1)
+@@ -1186,8 +1216,9 @@ nfsd4_decode_setclientid_confirm(struct nfsd4_compoundargs *argp, struct nfsd4_s
+
+ /* Also used for NVERIFY */
+ static __be32
+-nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify)
++nfsd4_decode_verify(struct nfsd4_compoundargs *argp, void *_verify)
+ {
++ struct nfsd4_verify *verify = _verify;
+ DECODE_HEAD;
+
+ if ((status = nfsd4_decode_bitmap(argp, verify->ve_bmval)))
+@@ -1205,8 +1236,9 @@ nfsd4_decode_verify(struct nfsd4_compoundargs *argp, struct nfsd4_verify *verify
+ }
+
+ static __be32
+-nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
++nfsd4_decode_write(struct nfsd4_compoundargs *argp, void *_write)
+ {
++ struct nfsd4_write *write = _write;
+ int avail;
+ int len;
+ DECODE_HEAD;
+@@ -1256,8 +1288,9 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
+ }
+
+ static __be32
+-nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_release_lockowner *rlockowner)
++nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, void *_rlockowner)
+ {
++ struct nfsd4_release_lockowner *rlockowner = _rlockowner;
+ DECODE_HEAD;
+
+ if (argp->minorversion >= 1)
+@@ -1276,8 +1309,9 @@ nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_rel
+
+ static __be32
+ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp,
+- struct nfsd4_exchange_id *exid)
++ void *_exid)
+ {
++ struct nfsd4_exchange_id *exid = _exid;
+ int dummy, tmp;
+ DECODE_HEAD;
+
+@@ -1380,8 +1414,9 @@ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
+- struct nfsd4_create_session *sess)
++ void *_sess)
+ {
++ struct nfsd4_create_session *sess = _sess;
+ DECODE_HEAD;
+ u32 dummy;
+
+@@ -1432,8 +1467,9 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
+- struct nfsd4_destroy_session *destroy_session)
++ void *_destroy_session)
+ {
++ struct nfsd4_destroy_session *destroy_session = _destroy_session;
+ DECODE_HEAD;
+ READ_BUF(NFS4_MAX_SESSIONID_LEN);
+ COPYMEM(destroy_session->sessionid.data, NFS4_MAX_SESSIONID_LEN);
+@@ -1443,8 +1479,9 @@ nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
+- struct nfsd4_free_stateid *free_stateid)
++ void *_free_stateid)
+ {
++ struct nfsd4_free_stateid *free_stateid = _free_stateid;
+ DECODE_HEAD;
+
+ READ_BUF(sizeof(stateid_t));
+@@ -1456,8 +1493,9 @@ nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
+- struct nfsd4_sequence *seq)
++ void *_seq)
+ {
++ struct nfsd4_sequence *seq = _seq;
+ DECODE_HEAD;
+
+ READ_BUF(NFS4_MAX_SESSIONID_LEN + 16);
+@@ -1471,8 +1509,9 @@ nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
+ }
+
+ static __be32
+-nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid)
++nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, void *_test_stateid)
+ {
++ struct nfsd4_test_stateid *test_stateid = _test_stateid;
+ int i;
+ __be32 *p, status;
+ struct nfsd4_test_stateid_id *stateid;
+@@ -1506,8 +1545,9 @@ xdr_error:
+ goto out;
+ }
+
+-static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, struct nfsd4_destroy_clientid *dc)
++static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, void *_dc)
+ {
++ struct nfsd4_destroy_clientid *dc = _dc;
+ DECODE_HEAD;
+
+ READ_BUF(8);
+@@ -1516,8 +1556,9 @@ static __be32 nfsd4_decode_destroy_clientid(struct nfsd4_compoundargs *argp, str
+ DECODE_TAIL;
+ }
+
+-static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, struct nfsd4_reclaim_complete *rc)
++static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, void *_rc)
+ {
++ struct nfsd4_reclaim_complete *rc = _rc;
+ DECODE_HEAD;
+
+ READ_BUF(4);
+@@ -1529,8 +1570,9 @@ static __be32 nfsd4_decode_reclaim_complete(struct nfsd4_compoundargs *argp, str
+ #ifdef CONFIG_NFSD_PNFS
+ static __be32
+ nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp,
+- struct nfsd4_getdeviceinfo *gdev)
++ void *_gdev)
+ {
++ struct nfsd4_getdeviceinfo *gdev = _gdev;
+ DECODE_HEAD;
+ u32 num, i;
+
+@@ -1554,8 +1596,9 @@ nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
+- struct nfsd4_layoutget *lgp)
++ void *_lgp)
+ {
++ struct nfsd4_layoutget *lgp = _lgp;
+ DECODE_HEAD;
+
+ READ_BUF(36);
+@@ -1578,8 +1621,9 @@ nfsd4_decode_layoutget(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
+- struct nfsd4_layoutcommit *lcp)
++ void *_lcp)
+ {
++ struct nfsd4_layoutcommit *lcp = _lcp;
+ DECODE_HEAD;
+ u32 timechange;
+
+@@ -1626,8 +1670,9 @@ nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp,
+- struct nfsd4_layoutreturn *lrp)
++ void *_lrp)
+ {
++ struct nfsd4_layoutreturn *lrp = _lrp;
+ DECODE_HEAD;
+
+ READ_BUF(16);
+@@ -1661,8 +1706,9 @@ nfsd4_decode_layoutreturn(struct nfsd4_compoundargs *argp,
+
+ static __be32
+ nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
+- struct nfsd4_fallocate *fallocate)
++ void *_fallocate)
+ {
++ struct nfsd4_fallocate *fallocate = _fallocate;
+ DECODE_HEAD;
+
+ status = nfsd4_decode_stateid(argp, &fallocate->falloc_stateid);
+@@ -1677,8 +1723,9 @@ nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp,
+ }
+
+ static __be32
+-nfsd4_decode_clone(struct nfsd4_compoundargs *argp, struct nfsd4_clone *clone)
++nfsd4_decode_clone(struct nfsd4_compoundargs *argp, void *_clone)
+ {
++ struct nfsd4_clone *clone = _clone;
+ DECODE_HEAD;
+
+ status = nfsd4_decode_stateid(argp, &clone->cl_src_stateid);
+@@ -1696,8 +1743,9 @@ nfsd4_decode_clone(struct nfsd4_compoundargs *argp, struct nfsd4_clone *clone)
+ }
+
+ static __be32
+-nfsd4_decode_seek(struct nfsd4_compoundargs *argp, struct nfsd4_seek *seek)
++nfsd4_decode_seek(struct nfsd4_compoundargs *argp, void *_seek)
+ {
++ struct nfsd4_seek *seek = _seek;
+ DECODE_HEAD;
+
+ status = nfsd4_decode_stateid(argp, &seek->seek_stateid);
+@@ -1725,88 +1773,88 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p)
typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *);
-static nfsd4_dec nfsd4_dec_ops[] = {
+- [OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access,
+- [OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close,
+- [OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit,
+- [OP_CREATE] = (nfsd4_dec)nfsd4_decode_create,
+- [OP_DELEGPURGE] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_DELEGRETURN] = (nfsd4_dec)nfsd4_decode_delegreturn,
+- [OP_GETATTR] = (nfsd4_dec)nfsd4_decode_getattr,
+- [OP_GETFH] = (nfsd4_dec)nfsd4_decode_noop,
+- [OP_LINK] = (nfsd4_dec)nfsd4_decode_link,
+- [OP_LOCK] = (nfsd4_dec)nfsd4_decode_lock,
+- [OP_LOCKT] = (nfsd4_dec)nfsd4_decode_lockt,
+- [OP_LOCKU] = (nfsd4_dec)nfsd4_decode_locku,
+- [OP_LOOKUP] = (nfsd4_dec)nfsd4_decode_lookup,
+- [OP_LOOKUPP] = (nfsd4_dec)nfsd4_decode_noop,
+- [OP_NVERIFY] = (nfsd4_dec)nfsd4_decode_verify,
+- [OP_OPEN] = (nfsd4_dec)nfsd4_decode_open,
+- [OP_OPENATTR] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_OPEN_CONFIRM] = (nfsd4_dec)nfsd4_decode_open_confirm,
+- [OP_OPEN_DOWNGRADE] = (nfsd4_dec)nfsd4_decode_open_downgrade,
+- [OP_PUTFH] = (nfsd4_dec)nfsd4_decode_putfh,
+- [OP_PUTPUBFH] = (nfsd4_dec)nfsd4_decode_putpubfh,
+- [OP_PUTROOTFH] = (nfsd4_dec)nfsd4_decode_noop,
+- [OP_READ] = (nfsd4_dec)nfsd4_decode_read,
+- [OP_READDIR] = (nfsd4_dec)nfsd4_decode_readdir,
+- [OP_READLINK] = (nfsd4_dec)nfsd4_decode_noop,
+- [OP_REMOVE] = (nfsd4_dec)nfsd4_decode_remove,
+- [OP_RENAME] = (nfsd4_dec)nfsd4_decode_rename,
+- [OP_RENEW] = (nfsd4_dec)nfsd4_decode_renew,
+- [OP_RESTOREFH] = (nfsd4_dec)nfsd4_decode_noop,
+- [OP_SAVEFH] = (nfsd4_dec)nfsd4_decode_noop,
+- [OP_SECINFO] = (nfsd4_dec)nfsd4_decode_secinfo,
+- [OP_SETATTR] = (nfsd4_dec)nfsd4_decode_setattr,
+- [OP_SETCLIENTID] = (nfsd4_dec)nfsd4_decode_setclientid,
+- [OP_SETCLIENTID_CONFIRM] = (nfsd4_dec)nfsd4_decode_setclientid_confirm,
+- [OP_VERIFY] = (nfsd4_dec)nfsd4_decode_verify,
+- [OP_WRITE] = (nfsd4_dec)nfsd4_decode_write,
+- [OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_release_lockowner,
+static const nfsd4_dec nfsd4_dec_ops[] = {
- [OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access,
- [OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close,
- [OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit,
++ [OP_ACCESS] = nfsd4_decode_access,
++ [OP_CLOSE] = nfsd4_decode_close,
++ [OP_COMMIT] = nfsd4_decode_commit,
++ [OP_CREATE] = nfsd4_decode_create,
++ [OP_DELEGPURGE] = nfsd4_decode_notsupp,
++ [OP_DELEGRETURN] = nfsd4_decode_delegreturn,
++ [OP_GETATTR] = nfsd4_decode_getattr,
++ [OP_GETFH] = nfsd4_decode_noop,
++ [OP_LINK] = nfsd4_decode_link,
++ [OP_LOCK] = nfsd4_decode_lock,
++ [OP_LOCKT] = nfsd4_decode_lockt,
++ [OP_LOCKU] = nfsd4_decode_locku,
++ [OP_LOOKUP] = nfsd4_decode_lookup,
++ [OP_LOOKUPP] = nfsd4_decode_noop,
++ [OP_NVERIFY] = nfsd4_decode_verify,
++ [OP_OPEN] = nfsd4_decode_open,
++ [OP_OPENATTR] = nfsd4_decode_notsupp,
++ [OP_OPEN_CONFIRM] = nfsd4_decode_open_confirm,
++ [OP_OPEN_DOWNGRADE] = nfsd4_decode_open_downgrade,
++ [OP_PUTFH] = nfsd4_decode_putfh,
++ [OP_PUTPUBFH] = nfsd4_decode_putpubfh,
++ [OP_PUTROOTFH] = nfsd4_decode_noop,
++ [OP_READ] = nfsd4_decode_read,
++ [OP_READDIR] = nfsd4_decode_readdir,
++ [OP_READLINK] = nfsd4_decode_noop,
++ [OP_REMOVE] = nfsd4_decode_remove,
++ [OP_RENAME] = nfsd4_decode_rename,
++ [OP_RENEW] = nfsd4_decode_renew,
++ [OP_RESTOREFH] = nfsd4_decode_noop,
++ [OP_SAVEFH] = nfsd4_decode_noop,
++ [OP_SECINFO] = nfsd4_decode_secinfo,
++ [OP_SETATTR] = nfsd4_decode_setattr,
++ [OP_SETCLIENTID] = nfsd4_decode_setclientid,
++ [OP_SETCLIENTID_CONFIRM] = nfsd4_decode_setclientid_confirm,
++ [OP_VERIFY] = nfsd4_decode_verify,
++ [OP_WRITE] = nfsd4_decode_write,
++ [OP_RELEASE_LOCKOWNER] = nfsd4_decode_release_lockowner,
+
+ /* new operations for NFSv4.1 */
+- [OP_BACKCHANNEL_CTL] = (nfsd4_dec)nfsd4_decode_backchannel_ctl,
+- [OP_BIND_CONN_TO_SESSION]= (nfsd4_dec)nfsd4_decode_bind_conn_to_session,
+- [OP_EXCHANGE_ID] = (nfsd4_dec)nfsd4_decode_exchange_id,
+- [OP_CREATE_SESSION] = (nfsd4_dec)nfsd4_decode_create_session,
+- [OP_DESTROY_SESSION] = (nfsd4_dec)nfsd4_decode_destroy_session,
+- [OP_FREE_STATEID] = (nfsd4_dec)nfsd4_decode_free_stateid,
+- [OP_GET_DIR_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
++ [OP_BACKCHANNEL_CTL] = nfsd4_decode_backchannel_ctl,
++ [OP_BIND_CONN_TO_SESSION]= nfsd4_decode_bind_conn_to_session,
++ [OP_EXCHANGE_ID] = nfsd4_decode_exchange_id,
++ [OP_CREATE_SESSION] = nfsd4_decode_create_session,
++ [OP_DESTROY_SESSION] = nfsd4_decode_destroy_session,
++ [OP_FREE_STATEID] = nfsd4_decode_free_stateid,
++ [OP_GET_DIR_DELEGATION] = nfsd4_decode_notsupp,
+ #ifdef CONFIG_NFSD_PNFS
+- [OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_getdeviceinfo,
+- [OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_layoutcommit,
+- [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_layoutget,
+- [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_layoutreturn,
++ [OP_GETDEVICEINFO] = nfsd4_decode_getdeviceinfo,
++ [OP_GETDEVICELIST] = nfsd4_decode_notsupp,
++ [OP_LAYOUTCOMMIT] = nfsd4_decode_layoutcommit,
++ [OP_LAYOUTGET] = nfsd4_decode_layoutget,
++ [OP_LAYOUTRETURN] = nfsd4_decode_layoutreturn,
+ #else
+- [OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_notsupp,
++ [OP_GETDEVICEINFO] = nfsd4_decode_notsupp,
++ [OP_GETDEVICELIST] = nfsd4_decode_notsupp,
++ [OP_LAYOUTCOMMIT] = nfsd4_decode_notsupp,
++ [OP_LAYOUTGET] = nfsd4_decode_notsupp,
++ [OP_LAYOUTRETURN] = nfsd4_decode_notsupp,
+ #endif
+- [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_secinfo_no_name,
+- [OP_SEQUENCE] = (nfsd4_dec)nfsd4_decode_sequence,
+- [OP_SET_SSV] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_TEST_STATEID] = (nfsd4_dec)nfsd4_decode_test_stateid,
+- [OP_WANT_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_DESTROY_CLIENTID] = (nfsd4_dec)nfsd4_decode_destroy_clientid,
+- [OP_RECLAIM_COMPLETE] = (nfsd4_dec)nfsd4_decode_reclaim_complete,
++ [OP_SECINFO_NO_NAME] = nfsd4_decode_secinfo_no_name,
++ [OP_SEQUENCE] = nfsd4_decode_sequence,
++ [OP_SET_SSV] = nfsd4_decode_notsupp,
++ [OP_TEST_STATEID] = nfsd4_decode_test_stateid,
++ [OP_WANT_DELEGATION] = nfsd4_decode_notsupp,
++ [OP_DESTROY_CLIENTID] = nfsd4_decode_destroy_clientid,
++ [OP_RECLAIM_COMPLETE] = nfsd4_decode_reclaim_complete,
+
+ /* new operations for NFSv4.2 */
+- [OP_ALLOCATE] = (nfsd4_dec)nfsd4_decode_fallocate,
+- [OP_COPY] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_COPY_NOTIFY] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_DEALLOCATE] = (nfsd4_dec)nfsd4_decode_fallocate,
+- [OP_IO_ADVISE] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_LAYOUTERROR] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_LAYOUTSTATS] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_OFFLOAD_CANCEL] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_OFFLOAD_STATUS] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_READ_PLUS] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_SEEK] = (nfsd4_dec)nfsd4_decode_seek,
+- [OP_WRITE_SAME] = (nfsd4_dec)nfsd4_decode_notsupp,
+- [OP_CLONE] = (nfsd4_dec)nfsd4_decode_clone,
++ [OP_ALLOCATE] = nfsd4_decode_fallocate,
++ [OP_COPY] = nfsd4_decode_notsupp,
++ [OP_COPY_NOTIFY] = nfsd4_decode_notsupp,
++ [OP_DEALLOCATE] = nfsd4_decode_fallocate,
++ [OP_IO_ADVISE] = nfsd4_decode_notsupp,
++ [OP_LAYOUTERROR] = nfsd4_decode_notsupp,
++ [OP_LAYOUTSTATS] = nfsd4_decode_notsupp,
++ [OP_OFFLOAD_CANCEL] = nfsd4_decode_notsupp,
++ [OP_OFFLOAD_STATUS] = nfsd4_decode_notsupp,
++ [OP_READ_PLUS] = nfsd4_decode_notsupp,
++ [OP_SEEK] = nfsd4_decode_seek,
++ [OP_WRITE_SAME] = nfsd4_decode_notsupp,
++ [OP_CLONE] = nfsd4_decode_clone,
+ };
+
+ static inline bool
+@@ -3036,8 +3084,9 @@ nfsd4_encode_stateid(struct xdr_stream *xdr, stateid_t *sid)
+ }
+
+ static __be32
+-nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_access *access)
++nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, void *_access)
+ {
++ struct nfsd4_access *access = _access;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3051,8 +3100,9 @@ nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
+ return nfserr;
+ }
+
+-static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_bind_conn_to_session *bcts)
++static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp, __be32 nfserr, void *_bcts)
+ {
++ struct nfsd4_bind_conn_to_session *bcts = _bcts;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3070,8 +3120,10 @@ static __be32 nfsd4_encode_bind_conn_to_session(struct nfsd4_compoundres *resp,
+ }
+
+ static __be32
+-nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_close *close)
++nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr, void *_close)
+ {
++ struct nfsd4_close *close = _close;
++
+ struct xdr_stream *xdr = &resp->xdr;
+
+ if (!nfserr)
+@@ -3082,8 +3134,9 @@ nfsd4_encode_close(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_c
+
+
+ static __be32
+-nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_commit *commit)
++nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, void *_commit)
+ {
++ struct nfsd4_commit *commit = _commit;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3098,8 +3151,9 @@ nfsd4_encode_commit(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
+ }
+
+ static __be32
+-nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_create *create)
++nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr, void *_create)
+ {
++ struct nfsd4_create *create = _create;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3115,8 +3169,9 @@ nfsd4_encode_create(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
+ }
+
+ static __be32
+-nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_getattr *getattr)
++nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, void *_getattr)
+ {
++ struct nfsd4_getattr *getattr = _getattr;
+ struct svc_fh *fhp = getattr->ga_fhp;
+ struct xdr_stream *xdr = &resp->xdr;
+
+@@ -3130,8 +3185,9 @@ nfsd4_encode_getattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4
+ }
+
+ static __be32
+-nfsd4_encode_getfh(struct nfsd4_compoundres *resp, __be32 nfserr, struct svc_fh **fhpp)
++nfsd4_encode_getfh(struct nfsd4_compoundres *resp, __be32 nfserr, void *_fhpp)
+ {
++ struct svc_fh **fhpp = (struct svc_fh **)_fhpp;
+ struct xdr_stream *xdr = &resp->xdr;
+ struct svc_fh *fhp = *fhpp;
+ unsigned int len;
+@@ -3187,8 +3243,10 @@ again:
+ }
+
+ static __be32
+-nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lock *lock)
++nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lock)
+ {
++ struct nfsd4_lock *lock = _lock;
++
+ struct xdr_stream *xdr = &resp->xdr;
+
+ if (!nfserr)
+@@ -3200,8 +3258,9 @@ nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lo
+ }
+
+ static __be32
+-nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lockt *lockt)
++nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lockt)
+ {
++ struct nfsd4_lockt *lockt = _lockt;
+ struct xdr_stream *xdr = &resp->xdr;
+
+ if (nfserr == nfserr_denied)
+@@ -3210,8 +3269,9 @@ nfsd4_encode_lockt(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_l
+ }
+
+ static __be32
+-nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_locku *locku)
++nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr, void *_locku)
+ {
++ struct nfsd4_locku *locku = _locku;
+ struct xdr_stream *xdr = &resp->xdr;
+
+ if (!nfserr)
+@@ -3222,8 +3282,9 @@ nfsd4_encode_locku(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_l
+
+
+ static __be32
+-nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_link *link)
++nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr, void *_link)
+ {
++ struct nfsd4_link *link = _link;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3238,8 +3299,9 @@ nfsd4_encode_link(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_li
+
+
+ static __be32
+-nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open *open)
++nfsd4_encode_open(struct nfsd4_compoundres *resp, __be32 nfserr, void *_open)
+ {
++ struct nfsd4_open *open = _open;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3336,8 +3398,10 @@ out:
+ }
+
+ static __be32
+-nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open_confirm *oc)
++nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr, void *_oc)
+ {
++ struct nfsd4_open_confirm *oc = _oc;
++
+ struct xdr_stream *xdr = &resp->xdr;
+
+ if (!nfserr)
+@@ -3347,8 +3411,10 @@ nfsd4_encode_open_confirm(struct nfsd4_compoundres *resp, __be32 nfserr, struct
+ }
+
+ static __be32
+-nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_open_downgrade *od)
++nfsd4_encode_open_downgrade(struct nfsd4_compoundres *resp, __be32 nfserr, void *_od)
+ {
++ struct nfsd4_open_downgrade *od = _od;
++
+ struct xdr_stream *xdr = &resp->xdr;
+
+ if (!nfserr)
+@@ -3478,9 +3544,9 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp,
+ }
+
+ static __be32
+-nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_read *read)
++nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, void *_read)
+ {
++ struct nfsd4_read *read = _read;
+ unsigned long maxcount;
+ struct xdr_stream *xdr = &resp->xdr;
+ struct file *file = read->rd_filp;
+@@ -3532,8 +3598,9 @@ out:
+ }
+
+ static __be32
+-nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_readlink *readlink)
++nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, void *_readlink)
+ {
++ struct nfsd4_readlink *readlink = _readlink;
+ int maxcount;
+ __be32 wire_count;
+ int zero = 0;
+@@ -3577,8 +3644,9 @@ nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd
+ }
+
+ static __be32
+-nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_readdir *readdir)
++nfsd4_encode_readdir(struct nfsd4_compoundres *resp, __be32 nfserr, void *_readdir)
+ {
++ struct nfsd4_readdir *readdir = _readdir;
+ int maxcount;
+ int bytes_left;
+ loff_t offset;
+@@ -3670,8 +3738,9 @@ err_no_verf:
+ }
+
+ static __be32
+-nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_remove *remove)
++nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr, void *_remove)
+ {
++ struct nfsd4_remove *remove = _remove;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3685,8 +3754,9 @@ nfsd4_encode_remove(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
+ }
+
+ static __be32
+-nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_rename *rename)
++nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, void *_rename)
+ {
++ struct nfsd4_rename *rename = _rename;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3702,8 +3772,9 @@ nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_
+
+ static __be32
+ nfsd4_do_encode_secinfo(struct xdr_stream *xdr,
+- __be32 nfserr, struct svc_export *exp)
++ __be32 nfserr, void *_exp)
+ {
++ struct svc_export *exp = _exp;
+ u32 i, nflavs, supported;
+ struct exp_flavor_info *flavs;
+ struct exp_flavor_info def_flavs[2];
+@@ -3778,8 +3849,9 @@ out:
+
+ static __be32
+ nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_secinfo *secinfo)
++ void *_secinfo)
+ {
++ struct nfsd4_secinfo *secinfo = _secinfo;
+ struct xdr_stream *xdr = &resp->xdr;
+
+ return nfsd4_do_encode_secinfo(xdr, nfserr, secinfo->si_exp);
+@@ -3787,8 +3859,9 @@ nfsd4_encode_secinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
+
+ static __be32
+ nfsd4_encode_secinfo_no_name(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_secinfo_no_name *secinfo)
++ void *_secinfo)
+ {
++ struct nfsd4_secinfo_no_name *secinfo = _secinfo;
+ struct xdr_stream *xdr = &resp->xdr;
+
+ return nfsd4_do_encode_secinfo(xdr, nfserr, secinfo->sin_exp);
+@@ -3799,8 +3872,9 @@ nfsd4_encode_secinfo_no_name(struct nfsd4_compoundres *resp, __be32 nfserr,
+ * regardless of the error status.
+ */
+ static __be32
+-nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_setattr *setattr)
++nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr, void *_setattr)
+ {
++ struct nfsd4_setattr *setattr = _setattr;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3823,8 +3897,9 @@ nfsd4_encode_setattr(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4
+ }
+
+ static __be32
+-nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_setclientid *scd)
++nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr, void *_scd)
+ {
++ struct nfsd4_setclientid *scd = _scd;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3847,8 +3922,9 @@ nfsd4_encode_setclientid(struct nfsd4_compoundres *resp, __be32 nfserr, struct n
+ }
+
+ static __be32
+-nfsd4_encode_write(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_write *write)
++nfsd4_encode_write(struct nfsd4_compoundres *resp, __be32 nfserr, void *_write)
+ {
++ struct nfsd4_write *write = _write;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -3874,8 +3950,9 @@ static const u32 nfs4_minimal_spo_must_enforce[2] = {
+
+ static __be32
+ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_exchange_id *exid)
++ void *_exid)
+ {
++ struct nfsd4_exchange_id *exid = _exid;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+ char *major_id;
+@@ -3952,8 +4029,9 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
+
+ static __be32
+ nfsd4_encode_create_session(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_create_session *sess)
++ void *_sess)
+ {
++ struct nfsd4_create_session *sess = _sess;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -4008,8 +4086,9 @@ nfsd4_encode_create_session(struct nfsd4_compoundres *resp, __be32 nfserr,
+
+ static __be32
+ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_sequence *seq)
++ void *_seq)
+ {
++ struct nfsd4_sequence *seq = _seq;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -4034,8 +4113,9 @@ nfsd4_encode_sequence(struct nfsd4_compoundres *resp, __be32 nfserr,
+
+ static __be32
+ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_test_stateid *test_stateid)
++ void *_test_stateid)
+ {
++ struct nfsd4_test_stateid *test_stateid = _test_stateid;
+ struct xdr_stream *xdr = &resp->xdr;
+ struct nfsd4_test_stateid_id *stateid, *next;
+ __be32 *p;
+@@ -4057,9 +4137,9 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,
+
+ #ifdef CONFIG_NFSD_PNFS
+ static __be32
+-nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_getdeviceinfo *gdev)
++nfsd4_encode_getdeviceinfo(struct nfsd4_compoundres *resp, __be32 nfserr, void *_gdev)
+ {
++ struct nfsd4_getdeviceinfo *gdev = _gdev;
+ struct xdr_stream *xdr = &resp->xdr;
+ const struct nfsd4_layout_ops *ops =
+ nfsd4_layout_ops[gdev->gd_layout_type];
+@@ -4127,9 +4207,9 @@ toosmall:
+ }
+
+ static __be32
+-nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_layoutget *lgp)
++nfsd4_encode_layoutget(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lgp)
+ {
++ struct nfsd4_layoutget *lgp = _lgp;
+ struct xdr_stream *xdr = &resp->xdr;
+ const struct nfsd4_layout_ops *ops =
+ nfsd4_layout_ops[lgp->lg_layout_type];
+@@ -4162,9 +4242,9 @@ out:
+ }
+
+ static __be32
+-nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_layoutcommit *lcp)
++nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lcp)
+ {
++ struct nfsd4_layoutcommit *lcp = _lcp;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -4186,9 +4266,9 @@ nfsd4_encode_layoutcommit(struct nfsd4_compoundres *resp, __be32 nfserr,
+ }
+
+ static __be32
+-nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_layoutreturn *lrp)
++nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr, void *_lrp)
+ {
++ struct nfsd4_layoutreturn *lrp = _lrp;
+ struct xdr_stream *xdr = &resp->xdr;
+ __be32 *p;
+
+@@ -4207,8 +4287,9 @@ nfsd4_encode_layoutreturn(struct nfsd4_compoundres *resp, __be32 nfserr,
+
+ static __be32
+ nfsd4_encode_seek(struct nfsd4_compoundres *resp, __be32 nfserr,
+- struct nfsd4_seek *seek)
++ void *_seek)
+ {
++ struct nfsd4_seek *seek= (struct nfsd4_seek *)_seek;
+ __be32 *p;
+
+ if (nfserr)
+@@ -4235,87 +4316,87 @@ typedef __be32(* nfsd4_enc)(struct nfsd4_compoundres *, __be32, void *);
+ * done in the decoding phase.
+ */
+ static nfsd4_enc nfsd4_enc_ops[] = {
+- [OP_ACCESS] = (nfsd4_enc)nfsd4_encode_access,
+- [OP_CLOSE] = (nfsd4_enc)nfsd4_encode_close,
+- [OP_COMMIT] = (nfsd4_enc)nfsd4_encode_commit,
+- [OP_CREATE] = (nfsd4_enc)nfsd4_encode_create,
+- [OP_DELEGPURGE] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_DELEGRETURN] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_GETATTR] = (nfsd4_enc)nfsd4_encode_getattr,
+- [OP_GETFH] = (nfsd4_enc)nfsd4_encode_getfh,
+- [OP_LINK] = (nfsd4_enc)nfsd4_encode_link,
+- [OP_LOCK] = (nfsd4_enc)nfsd4_encode_lock,
+- [OP_LOCKT] = (nfsd4_enc)nfsd4_encode_lockt,
+- [OP_LOCKU] = (nfsd4_enc)nfsd4_encode_locku,
+- [OP_LOOKUP] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_OPEN] = (nfsd4_enc)nfsd4_encode_open,
+- [OP_OPENATTR] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm,
+- [OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade,
+- [OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_PUTPUBFH] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_PUTROOTFH] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_READ] = (nfsd4_enc)nfsd4_encode_read,
+- [OP_READDIR] = (nfsd4_enc)nfsd4_encode_readdir,
+- [OP_READLINK] = (nfsd4_enc)nfsd4_encode_readlink,
+- [OP_REMOVE] = (nfsd4_enc)nfsd4_encode_remove,
+- [OP_RENAME] = (nfsd4_enc)nfsd4_encode_rename,
+- [OP_RENEW] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_RESTOREFH] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_SAVEFH] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_SECINFO] = (nfsd4_enc)nfsd4_encode_secinfo,
+- [OP_SETATTR] = (nfsd4_enc)nfsd4_encode_setattr,
+- [OP_SETCLIENTID] = (nfsd4_enc)nfsd4_encode_setclientid,
+- [OP_SETCLIENTID_CONFIRM] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_VERIFY] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_WRITE] = (nfsd4_enc)nfsd4_encode_write,
+- [OP_RELEASE_LOCKOWNER] = (nfsd4_enc)nfsd4_encode_noop,
++ [OP_ACCESS] = nfsd4_encode_access,
++ [OP_CLOSE] = nfsd4_encode_close,
++ [OP_COMMIT] = nfsd4_encode_commit,
++ [OP_CREATE] = nfsd4_encode_create,
++ [OP_DELEGPURGE] = nfsd4_encode_noop,
++ [OP_DELEGRETURN] = nfsd4_encode_noop,
++ [OP_GETATTR] = nfsd4_encode_getattr,
++ [OP_GETFH] = nfsd4_encode_getfh,
++ [OP_LINK] = nfsd4_encode_link,
++ [OP_LOCK] = nfsd4_encode_lock,
++ [OP_LOCKT] = nfsd4_encode_lockt,
++ [OP_LOCKU] = nfsd4_encode_locku,
++ [OP_LOOKUP] = nfsd4_encode_noop,
++ [OP_LOOKUPP] = nfsd4_encode_noop,
++ [OP_NVERIFY] = nfsd4_encode_noop,
++ [OP_OPEN] = nfsd4_encode_open,
++ [OP_OPENATTR] = nfsd4_encode_noop,
++ [OP_OPEN_CONFIRM] = nfsd4_encode_open_confirm,
++ [OP_OPEN_DOWNGRADE] = nfsd4_encode_open_downgrade,
++ [OP_PUTFH] = nfsd4_encode_noop,
++ [OP_PUTPUBFH] = nfsd4_encode_noop,
++ [OP_PUTROOTFH] = nfsd4_encode_noop,
++ [OP_READ] = nfsd4_encode_read,
++ [OP_READDIR] = nfsd4_encode_readdir,
++ [OP_READLINK] = nfsd4_encode_readlink,
++ [OP_REMOVE] = nfsd4_encode_remove,
++ [OP_RENAME] = nfsd4_encode_rename,
++ [OP_RENEW] = nfsd4_encode_noop,
++ [OP_RESTOREFH] = nfsd4_encode_noop,
++ [OP_SAVEFH] = nfsd4_encode_noop,
++ [OP_SECINFO] = nfsd4_encode_secinfo,
++ [OP_SETATTR] = nfsd4_encode_setattr,
++ [OP_SETCLIENTID] = nfsd4_encode_setclientid,
++ [OP_SETCLIENTID_CONFIRM] = nfsd4_encode_noop,
++ [OP_VERIFY] = nfsd4_encode_noop,
++ [OP_WRITE] = nfsd4_encode_write,
++ [OP_RELEASE_LOCKOWNER] = nfsd4_encode_noop,
+
+ /* NFSv4.1 operations */
+- [OP_BACKCHANNEL_CTL] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_BIND_CONN_TO_SESSION] = (nfsd4_enc)nfsd4_encode_bind_conn_to_session,
+- [OP_EXCHANGE_ID] = (nfsd4_enc)nfsd4_encode_exchange_id,
+- [OP_CREATE_SESSION] = (nfsd4_enc)nfsd4_encode_create_session,
+- [OP_DESTROY_SESSION] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_GET_DIR_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
++ [OP_BACKCHANNEL_CTL] = nfsd4_encode_noop,
++ [OP_BIND_CONN_TO_SESSION] = nfsd4_encode_bind_conn_to_session,
++ [OP_EXCHANGE_ID] = nfsd4_encode_exchange_id,
++ [OP_CREATE_SESSION] = nfsd4_encode_create_session,
++ [OP_DESTROY_SESSION] = nfsd4_encode_noop,
++ [OP_FREE_STATEID] = nfsd4_encode_noop,
++ [OP_GET_DIR_DELEGATION] = nfsd4_encode_noop,
+ #ifdef CONFIG_NFSD_PNFS
+- [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_getdeviceinfo,
+- [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_layoutcommit,
+- [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_layoutget,
+- [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_layoutreturn,
++ [OP_GETDEVICEINFO] = nfsd4_encode_getdeviceinfo,
++ [OP_GETDEVICELIST] = nfsd4_encode_noop,
++ [OP_LAYOUTCOMMIT] = nfsd4_encode_layoutcommit,
++ [OP_LAYOUTGET] = nfsd4_encode_layoutget,
++ [OP_LAYOUTRETURN] = nfsd4_encode_layoutreturn,
+ #else
+- [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop,
++ [OP_GETDEVICEINFO] = nfsd4_encode_noop,
++ [OP_GETDEVICELIST] = nfsd4_encode_noop,
++ [OP_LAYOUTCOMMIT] = nfsd4_encode_noop,
++ [OP_LAYOUTGET] = nfsd4_encode_noop,
++ [OP_LAYOUTRETURN] = nfsd4_encode_noop,
+ #endif
+- [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo_no_name,
+- [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence,
+- [OP_SET_SSV] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_TEST_STATEID] = (nfsd4_enc)nfsd4_encode_test_stateid,
+- [OP_WANT_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_DESTROY_CLIENTID] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_RECLAIM_COMPLETE] = (nfsd4_enc)nfsd4_encode_noop,
++ [OP_SECINFO_NO_NAME] = nfsd4_encode_secinfo_no_name,
++ [OP_SEQUENCE] = nfsd4_encode_sequence,
++ [OP_SET_SSV] = nfsd4_encode_noop,
++ [OP_TEST_STATEID] = nfsd4_encode_test_stateid,
++ [OP_WANT_DELEGATION] = nfsd4_encode_noop,
++ [OP_DESTROY_CLIENTID] = nfsd4_encode_noop,
++ [OP_RECLAIM_COMPLETE] = nfsd4_encode_noop,
+
+ /* NFSv4.2 operations */
+- [OP_ALLOCATE] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_COPY] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_COPY_NOTIFY] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_DEALLOCATE] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_IO_ADVISE] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LAYOUTERROR] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_LAYOUTSTATS] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_OFFLOAD_CANCEL] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_OFFLOAD_STATUS] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_READ_PLUS] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_SEEK] = (nfsd4_enc)nfsd4_encode_seek,
+- [OP_WRITE_SAME] = (nfsd4_enc)nfsd4_encode_noop,
+- [OP_CLONE] = (nfsd4_enc)nfsd4_encode_noop,
++ [OP_ALLOCATE] = nfsd4_encode_noop,
++ [OP_COPY] = nfsd4_encode_noop,
++ [OP_COPY_NOTIFY] = nfsd4_encode_noop,
++ [OP_DEALLOCATE] = nfsd4_encode_noop,
++ [OP_IO_ADVISE] = nfsd4_encode_noop,
++ [OP_LAYOUTERROR] = nfsd4_encode_noop,
++ [OP_LAYOUTSTATS] = nfsd4_encode_noop,
++ [OP_OFFLOAD_CANCEL] = nfsd4_encode_noop,
++ [OP_OFFLOAD_STATUS] = nfsd4_encode_noop,
++ [OP_READ_PLUS] = nfsd4_encode_noop,
++ [OP_SEEK] = nfsd4_encode_seek,
++ [OP_WRITE_SAME] = nfsd4_encode_noop,
++ [OP_CLONE] = nfsd4_encode_noop,
+ };
+
+ /*
+@@ -4440,9 +4521,9 @@ nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op)
+ }
+
+ int
+-nfs4svc_encode_voidres(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nfs4svc_encode_voidres(void *rqstp, __be32 *p, void *dummy)
+ {
+- return xdr_ressize_check(rqstp, p);
++ return xdr_ressize_check(rqstp, p);
+ }
+
+ int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp)
+@@ -4465,8 +4546,11 @@ int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp)
+ }
+
+ int
+-nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundargs *args)
++nfs4svc_decode_compoundargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd4_compoundargs *args = _args;
++
+ if (rqstp->rq_arg.head[0].iov_len % 4) {
+ /* client is nuts */
+ dprintk("%s: compound not properly padded! (peeraddr=%pISc xid=0x%x)",
+@@ -4486,11 +4570,13 @@ nfs4svc_decode_compoundargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_comp
+ }
+
+ int
+-nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundres *resp)
++nfs4svc_encode_compoundres(void *_rqstp, __be32 *p, void *_resp)
+ {
+ /*
+ * All that remains is to write the tag and operation count...
+ */
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd4_compoundres *resp = _resp;
+ struct xdr_buf *buf = resp->xdr.buf;
+
+ WARN_ON_ONCE(buf->len != buf->head[0].iov_len + buf->page_len +
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c
index 54cde9a..ff5756c 100644
--- a/fs/nfsd/nfscache.c
@@ -85533,11 +108017,692 @@ index 54cde9a..ff5756c 100644
rp->c_replstat = *statp;
break;
case RC_REPLBUFF:
+diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
+index 4cd78ef..eefe944 100644
+--- a/fs/nfsd/nfsproc.c
++++ b/fs/nfsd/nfsproc.c
+@@ -39,9 +39,11 @@ nfsd_return_dirop(__be32 err, struct nfsd_diropres *resp)
+ * N.B. After this call resp->fh needs an fh_put
+ */
+ static __be32
+-nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
+- struct nfsd_attrstat *resp)
++nfsd_proc_getattr(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd_attrstat *resp = _resp;
+ __be32 nfserr;
+ dprintk("nfsd: GETATTR %s\n", SVCFH_fmt(&argp->fh));
+
+@@ -56,9 +58,11 @@ nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle *argp,
+ * N.B. After this call resp->fh needs an fh_put
+ */
+ static __be32
+-nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp,
+- struct nfsd_attrstat *resp)
++nfsd_proc_setattr(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_sattrargs *argp = _argp;
++ struct nfsd_attrstat *resp = _resp;
+ struct iattr *iap = &argp->attrs;
+ struct svc_fh *fhp;
+ __be32 nfserr;
+@@ -124,9 +128,11 @@ done:
+ * N.B. After this call resp->fh needs an fh_put
+ */
+ static __be32
+-nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
+- struct nfsd_diropres *resp)
++nfsd_proc_lookup(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_diropargs *argp = _argp;
++ struct nfsd_diropres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: LOOKUP %s %.*s\n",
+@@ -144,9 +150,11 @@ nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
+ * Read a symlink.
+ */
+ static __be32
+-nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp,
+- struct nfsd_readlinkres *resp)
++nfsd_proc_readlink(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_readlinkargs *argp = _argp;
++ struct nfsd_readlinkres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh));
+@@ -164,9 +172,11 @@ nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_readlinkargs *argp,
+ * N.B. After this call resp->fh needs an fh_put
+ */
+ static __be32
+-nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
+- struct nfsd_readres *resp)
++nfsd_proc_read(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_readargs *argp = argp;
++ struct nfsd_readres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: READ %s %d bytes at %d\n",
+@@ -202,9 +212,11 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
+ * N.B. After this call resp->fh needs an fh_put
+ */
+ static __be32
+-nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
+- struct nfsd_attrstat *resp)
++nfsd_proc_write(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_writeargs *argp = _argp;
++ struct nfsd_attrstat *resp = _resp;
+ __be32 nfserr;
+ int stable = 1;
+ unsigned long cnt = argp->len;
+@@ -228,9 +240,11 @@ nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
+ * N.B. After this call _both_ argp->fh and resp->fh need an fh_put
+ */
+ static __be32
+-nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
+- struct nfsd_diropres *resp)
++nfsd_proc_create(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_createargs *argp = _argp;
++ struct nfsd_diropres *resp = _resp;
+ svc_fh *dirfhp = &argp->fh;
+ svc_fh *newfhp = &resp->fh;
+ struct iattr *attr = &argp->attrs;
+@@ -386,9 +400,10 @@ done:
+ }
+
+ static __be32
+-nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
++nfsd_proc_remove(struct svc_rqst *rqstp, void *_argp,
+ void *resp)
+ {
++ struct nfsd_diropargs *argp = _argp;
+ __be32 nfserr;
+
+ dprintk("nfsd: REMOVE %s %.*s\n", SVCFH_fmt(&argp->fh),
+@@ -401,9 +416,10 @@ nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
+ }
+
+ static __be32
+-nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp,
++nfsd_proc_rename(struct svc_rqst *rqstp, void *_argp,
+ void *resp)
+ {
++ struct nfsd_renameargs *argp = _argp;
+ __be32 nfserr;
+
+ dprintk("nfsd: RENAME %s %.*s -> \n",
+@@ -419,9 +435,10 @@ nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp,
+ }
+
+ static __be32
+-nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp,
++nfsd_proc_link(struct svc_rqst *rqstp, void *_argp,
+ void *resp)
+ {
++ struct nfsd_linkargs *argp = _argp;
+ __be32 nfserr;
+
+ dprintk("nfsd: LINK %s ->\n",
+@@ -439,9 +456,10 @@ nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp,
+ }
+
+ static __be32
+-nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
++nfsd_proc_symlink(struct svc_rqst *rqstp, void *_argp,
+ void *resp)
+ {
++ struct nfsd_symlinkargs *argp = _argp;
+ struct svc_fh newfh;
+ __be32 nfserr;
+
+@@ -469,9 +487,11 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
+ * N.B. After this call resp->fh needs an fh_put
+ */
+ static __be32
+-nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
+- struct nfsd_diropres *resp)
++nfsd_proc_mkdir(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_createargs *argp = _argp;
++ struct nfsd_diropres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: MKDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name);
+@@ -493,9 +513,10 @@ nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
+ * Remove a directory
+ */
+ static __be32
+-nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
++nfsd_proc_rmdir(struct svc_rqst *rqstp, void *_argp,
+ void *resp)
+ {
++ struct nfsd_diropargs *argp = _argp;
+ __be32 nfserr;
+
+ dprintk("nfsd: RMDIR %s %.*s\n", SVCFH_fmt(&argp->fh), argp->len, argp->name);
+@@ -509,9 +530,11 @@ nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
+ * Read a portion of a directory.
+ */
+ static __be32
+-nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
+- struct nfsd_readdirres *resp)
++nfsd_proc_readdir(struct svc_rqst *rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_readdirargs *argp = _argp;
++ struct nfsd_readdirres *resp = _resp;
+ int count;
+ __be32 nfserr;
+ loff_t offset;
+@@ -549,9 +572,11 @@ nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
+ * Get file system info
+ */
+ static __be32
+-nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle *argp,
+- struct nfsd_statfsres *resp)
++nfsd_proc_statfs(struct svc_rqst * rqstp, void *_argp,
++ void *_resp)
+ {
++ struct nfsd_fhandle *argp = _argp;
++ struct nfsd_statfsres *resp = _resp;
+ __be32 nfserr;
+
+ dprintk("nfsd: STATFS %s\n", SVCFH_fmt(&argp->fh));
+@@ -574,166 +599,166 @@ struct nfsd_void { int dummy; };
+
+ static struct svc_procedure nfsd_procedures2[18] = {
+ [NFSPROC_NULL] = {
+- .pc_func = (svc_procfunc) nfsd_proc_null,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_void,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_func = nfsd_proc_null,
++ .pc_decode = nfssvc_decode_void,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_void),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_GETATTR] = {
+- .pc_func = (svc_procfunc) nfsd_proc_getattr,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_fhandle,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_attrstat,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_getattr,
++ .pc_decode = nfssvc_decode_fhandle,
++ .pc_encode = nfssvc_encode_attrstat,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_fhandle),
+ .pc_ressize = sizeof(struct nfsd_attrstat),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+AT,
+ },
+ [NFSPROC_SETATTR] = {
+- .pc_func = (svc_procfunc) nfsd_proc_setattr,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_sattrargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_attrstat,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_setattr,
++ .pc_decode = nfssvc_decode_sattrargs,
++ .pc_encode = nfssvc_encode_attrstat,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_sattrargs),
+ .pc_ressize = sizeof(struct nfsd_attrstat),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+AT,
+ },
+ [NFSPROC_ROOT] = {
+- .pc_decode = (kxdrproc_t) nfssvc_decode_void,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_decode = nfssvc_decode_void,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_void),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_LOOKUP] = {
+- .pc_func = (svc_procfunc) nfsd_proc_lookup,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_diropargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_diropres,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_lookup,
++ .pc_decode = nfssvc_decode_diropargs,
++ .pc_encode = nfssvc_encode_diropres,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_diropargs),
+ .pc_ressize = sizeof(struct nfsd_diropres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+FH+AT,
+ },
+ [NFSPROC_READLINK] = {
+- .pc_func = (svc_procfunc) nfsd_proc_readlink,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_readlinkargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_readlinkres,
++ .pc_func = nfsd_proc_readlink,
++ .pc_decode = nfssvc_decode_readlinkargs,
++ .pc_encode = nfssvc_encode_readlinkres,
+ .pc_argsize = sizeof(struct nfsd_readlinkargs),
+ .pc_ressize = sizeof(struct nfsd_readlinkres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+1+NFS_MAXPATHLEN/4,
+ },
+ [NFSPROC_READ] = {
+- .pc_func = (svc_procfunc) nfsd_proc_read,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_readargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_readres,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_read,
++ .pc_decode = nfssvc_decode_readargs,
++ .pc_encode = nfssvc_encode_readres,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_readargs),
+ .pc_ressize = sizeof(struct nfsd_readres),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST+AT+1+NFSSVC_MAXBLKSIZE_V2/4,
+ },
+ [NFSPROC_WRITECACHE] = {
+- .pc_decode = (kxdrproc_t) nfssvc_decode_void,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_decode = nfssvc_decode_void,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_void),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_NOCACHE,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_WRITE] = {
+- .pc_func = (svc_procfunc) nfsd_proc_write,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_writeargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_attrstat,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_write,
++ .pc_decode = nfssvc_decode_writeargs,
++ .pc_encode = nfssvc_encode_attrstat,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_writeargs),
+ .pc_ressize = sizeof(struct nfsd_attrstat),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+AT,
+ },
+ [NFSPROC_CREATE] = {
+- .pc_func = (svc_procfunc) nfsd_proc_create,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_createargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_diropres,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_create,
++ .pc_decode = nfssvc_decode_createargs,
++ .pc_encode = nfssvc_encode_diropres,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_createargs),
+ .pc_ressize = sizeof(struct nfsd_diropres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+FH+AT,
+ },
+ [NFSPROC_REMOVE] = {
+- .pc_func = (svc_procfunc) nfsd_proc_remove,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_diropargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_func = nfsd_proc_remove,
++ .pc_decode = nfssvc_decode_diropargs,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_diropargs),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_REPLSTAT,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_RENAME] = {
+- .pc_func = (svc_procfunc) nfsd_proc_rename,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_renameargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_func = nfsd_proc_rename,
++ .pc_decode = nfssvc_decode_renameargs,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_renameargs),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_REPLSTAT,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_LINK] = {
+- .pc_func = (svc_procfunc) nfsd_proc_link,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_linkargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_func = nfsd_proc_link,
++ .pc_decode = nfssvc_decode_linkargs,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_linkargs),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_REPLSTAT,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_SYMLINK] = {
+- .pc_func = (svc_procfunc) nfsd_proc_symlink,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_symlinkargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_func = nfsd_proc_symlink,
++ .pc_decode = nfssvc_decode_symlinkargs,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_symlinkargs),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_REPLSTAT,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_MKDIR] = {
+- .pc_func = (svc_procfunc) nfsd_proc_mkdir,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_createargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_diropres,
+- .pc_release = (kxdrproc_t) nfssvc_release_fhandle,
++ .pc_func = nfsd_proc_mkdir,
++ .pc_decode = nfssvc_decode_createargs,
++ .pc_encode = nfssvc_encode_diropres,
++ .pc_release = nfssvc_release_fhandle,
+ .pc_argsize = sizeof(struct nfsd_createargs),
+ .pc_ressize = sizeof(struct nfsd_diropres),
+ .pc_cachetype = RC_REPLBUFF,
+ .pc_xdrressize = ST+FH+AT,
+ },
+ [NFSPROC_RMDIR] = {
+- .pc_func = (svc_procfunc) nfsd_proc_rmdir,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_diropargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_void,
++ .pc_func = nfsd_proc_rmdir,
++ .pc_decode = nfssvc_decode_diropargs,
++ .pc_encode = nfssvc_encode_void,
+ .pc_argsize = sizeof(struct nfsd_diropargs),
+ .pc_ressize = sizeof(struct nfsd_void),
+ .pc_cachetype = RC_REPLSTAT,
+ .pc_xdrressize = ST,
+ },
+ [NFSPROC_READDIR] = {
+- .pc_func = (svc_procfunc) nfsd_proc_readdir,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_readdirargs,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_readdirres,
++ .pc_func = nfsd_proc_readdir,
++ .pc_decode = nfssvc_decode_readdirargs,
++ .pc_encode = nfssvc_encode_readdirres,
+ .pc_argsize = sizeof(struct nfsd_readdirargs),
+ .pc_ressize = sizeof(struct nfsd_readdirres),
+ .pc_cachetype = RC_NOCACHE,
+ },
+ [NFSPROC_STATFS] = {
+- .pc_func = (svc_procfunc) nfsd_proc_statfs,
+- .pc_decode = (kxdrproc_t) nfssvc_decode_fhandle,
+- .pc_encode = (kxdrproc_t) nfssvc_encode_statfsres,
++ .pc_func = nfsd_proc_statfs,
++ .pc_decode = nfssvc_decode_fhandle,
++ .pc_encode = nfssvc_encode_statfsres,
+ .pc_argsize = sizeof(struct nfsd_fhandle),
+ .pc_ressize = sizeof(struct nfsd_statfsres),
+ .pc_cachetype = RC_NOCACHE,
+diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
+index 79d964a..bbf050b 100644
+--- a/fs/nfsd/nfsxdr.c
++++ b/fs/nfsd/nfsxdr.c
+@@ -206,14 +206,16 @@ __be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *f
+ * XDR decode functions
+ */
+ int
+-nfssvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nfssvc_decode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_argsize_check(rqstp, p);
+ }
+
+ int
+-nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *args)
++nfssvc_decode_fhandle(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_fhandle *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -221,9 +223,10 @@ nfssvc_decode_fhandle(struct svc_rqst *rqstp, __be32 *p, struct nfsd_fhandle *ar
+ }
+
+ int
+-nfssvc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_sattrargs *args)
++nfssvc_decode_sattrargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_sattrargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -233,9 +236,10 @@ nfssvc_decode_sattrargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_diropargs *args)
++nfssvc_decode_diropargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_diropargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->fh))
+ || !(p = decode_filename(p, &args->name, &args->len)))
+ return 0;
+@@ -244,9 +248,10 @@ nfssvc_decode_diropargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_readargs *args)
++nfssvc_decode_readargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd_readargs *args = _args;
+ unsigned int len;
+ int v;
+ p = decode_fh(p, &args->fh);
+@@ -276,9 +281,10 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_writeargs *args)
++nfssvc_decode_writeargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd_writeargs *args = _args;
+ unsigned int len, hdr, dlen;
+ int v;
+
+@@ -330,9 +336,10 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_createargs *args)
++nfssvc_decode_createargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_createargs *args = _args;
++
+ if ( !(p = decode_fh(p, &args->fh))
+ || !(p = decode_filename(p, &args->name, &args->len)))
+ return 0;
+@@ -342,9 +349,10 @@ nfssvc_decode_createargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_renameargs *args)
++nfssvc_decode_renameargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_renameargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->ffh))
+ || !(p = decode_filename(p, &args->fname, &args->flen))
+ || !(p = decode_fh(p, &args->tfh))
+@@ -355,8 +363,11 @@ nfssvc_decode_renameargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readlinkargs *args)
++nfssvc_decode_readlinkargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd_readlinkargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -366,9 +377,10 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readli
+ }
+
+ int
+-nfssvc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_linkargs *args)
++nfssvc_decode_linkargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_linkargs *args = _args;
++
+ if (!(p = decode_fh(p, &args->ffh))
+ || !(p = decode_fh(p, &args->tfh))
+ || !(p = decode_filename(p, &args->tname, &args->tlen)))
+@@ -378,9 +390,10 @@ nfssvc_decode_linkargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_symlinkargs *args)
++nfssvc_decode_symlinkargs(void *rqstp, __be32 *p, void *_args)
+ {
++ struct nfsd_symlinkargs *args = _args;
++
+ if ( !(p = decode_fh(p, &args->ffh))
+ || !(p = decode_filename(p, &args->fname, &args->flen))
+ || !(p = decode_pathname(p, &args->tname, &args->tlen)))
+@@ -391,9 +404,11 @@ nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_readdirargs *args)
++nfssvc_decode_readdirargs(void *_rqstp, __be32 *p, void *_args)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd_readdirargs *args = _args;
++
+ p = decode_fh(p, &args->fh);
+ if (!p)
+ return 0;
+@@ -409,32 +424,36 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
+ * XDR encode functions
+ */
+ int
+-nfssvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
++nfssvc_encode_void(void *rqstp, __be32 *p, void *dummy)
+ {
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ int
+-nfssvc_encode_attrstat(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_attrstat *resp)
++nfssvc_encode_attrstat(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd_diropres *resp = _resp;
++
+ p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ int
+-nfssvc_encode_diropres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_diropres *resp)
++nfssvc_encode_diropres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd_diropres *resp = _resp;
++
+ p = encode_fh(p, &resp->fh);
+ p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
+ return xdr_ressize_check(rqstp, p);
+ }
+
+ int
+-nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_readlinkres *resp)
++nfssvc_encode_readlinkres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp= _rqstp;
++ struct nfsd_readlinkres *resp = _resp;
++
+ *p++ = htonl(resp->len);
+ xdr_ressize_check(rqstp, p);
+ rqstp->rq_res.page_len = resp->len;
+@@ -448,9 +467,11 @@ nfssvc_encode_readlinkres(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_readres *resp)
++nfssvc_encode_readres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd_readres *resp = _resp;
++
+ p = encode_fattr(rqstp, p, &resp->fh, &resp->stat);
+ *p++ = htonl(resp->count);
+ xdr_ressize_check(rqstp, p);
+@@ -467,9 +488,11 @@ nfssvc_encode_readres(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_readdirres *resp)
++nfssvc_encode_readdirres(void *_rqstp, __be32 *p, void *_resp)
+ {
++ struct svc_rqst *rqstp = _rqstp;
++ struct nfsd_readdirres *resp = _resp;
++
+ xdr_ressize_check(rqstp, p);
+ p = resp->buffer;
+ *p++ = 0; /* no more entries */
+@@ -480,9 +503,9 @@ nfssvc_encode_readdirres(struct svc_rqst *rqstp, __be32 *p,
+ }
+
+ int
+-nfssvc_encode_statfsres(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_statfsres *resp)
++nfssvc_encode_statfsres(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd_statfsres *resp = _resp;
+ struct kstatfs *stat = &resp->stats;
+
+ *p++ = htonl(NFSSVC_MAXBLKSIZE_V2); /* max transfer size */
+@@ -542,9 +565,10 @@ nfssvc_encode_entry(void *ccdv, const char *name,
+ * XDR release functions
+ */
+ int
+-nfssvc_release_fhandle(struct svc_rqst *rqstp, __be32 *p,
+- struct nfsd_fhandle *resp)
++nfssvc_release_fhandle(void *rqstp, __be32 *p, void *_resp)
+ {
++ struct nfsd_fhandle *resp = _resp;
++
+ fh_put(&resp->fh);
+ return 1;
+ }
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
-index 994d66f..a963779 100644
+index 5d2a57e..86c17842 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
-@@ -855,7 +855,7 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
+@@ -870,7 +870,7 @@ __be32 nfsd_readv(struct file *file, loff_t offset, struct kvec *vec, int vlen,
oldfs = get_fs();
set_fs(KERNEL_DS);
@@ -85546,7 +108711,7 @@ index 994d66f..a963779 100644
set_fs(oldfs);
return nfsd_finish_read(file, count, host_err);
}
-@@ -942,7 +942,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
+@@ -957,7 +957,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -85555,7 +108720,7 @@ index 994d66f..a963779 100644
set_fs(oldfs);
if (host_err < 0)
goto out_nfserr;
-@@ -1449,7 +1449,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
+@@ -1478,7 +1478,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
*/
oldfs = get_fs(); set_fs(KERNEL_DS);
@@ -85564,6 +108729,283 @@ index 994d66f..a963779 100644
set_fs(oldfs);
if (host_err < 0)
+diff --git a/fs/nfsd/xdr.h b/fs/nfsd/xdr.h
+index 4f0481d..193c8e7 100644
+--- a/fs/nfsd/xdr.h
++++ b/fs/nfsd/xdr.h
+@@ -131,40 +131,30 @@ union nfsd_xdrstore {
+ #define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
+
+
+-int nfssvc_decode_void(struct svc_rqst *, __be32 *, void *);
+-int nfssvc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
+-int nfssvc_decode_sattrargs(struct svc_rqst *, __be32 *,
+- struct nfsd_sattrargs *);
+-int nfssvc_decode_diropargs(struct svc_rqst *, __be32 *,
+- struct nfsd_diropargs *);
+-int nfssvc_decode_readargs(struct svc_rqst *, __be32 *,
+- struct nfsd_readargs *);
+-int nfssvc_decode_writeargs(struct svc_rqst *, __be32 *,
+- struct nfsd_writeargs *);
+-int nfssvc_decode_createargs(struct svc_rqst *, __be32 *,
+- struct nfsd_createargs *);
+-int nfssvc_decode_renameargs(struct svc_rqst *, __be32 *,
+- struct nfsd_renameargs *);
+-int nfssvc_decode_readlinkargs(struct svc_rqst *, __be32 *,
+- struct nfsd_readlinkargs *);
+-int nfssvc_decode_linkargs(struct svc_rqst *, __be32 *,
+- struct nfsd_linkargs *);
+-int nfssvc_decode_symlinkargs(struct svc_rqst *, __be32 *,
+- struct nfsd_symlinkargs *);
+-int nfssvc_decode_readdirargs(struct svc_rqst *, __be32 *,
+- struct nfsd_readdirargs *);
+-int nfssvc_encode_void(struct svc_rqst *, __be32 *, void *);
+-int nfssvc_encode_attrstat(struct svc_rqst *, __be32 *, struct nfsd_attrstat *);
+-int nfssvc_encode_diropres(struct svc_rqst *, __be32 *, struct nfsd_diropres *);
+-int nfssvc_encode_readlinkres(struct svc_rqst *, __be32 *, struct nfsd_readlinkres *);
+-int nfssvc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd_readres *);
+-int nfssvc_encode_statfsres(struct svc_rqst *, __be32 *, struct nfsd_statfsres *);
+-int nfssvc_encode_readdirres(struct svc_rqst *, __be32 *, struct nfsd_readdirres *);
++int nfssvc_decode_void(void *, __be32 *, void *);
++int nfssvc_decode_fhandle(void *, __be32 *, void *);
++int nfssvc_decode_sattrargs(void *, __be32 *, void *);
++int nfssvc_decode_diropargs(void *, __be32 *, void *);
++int nfssvc_decode_readargs(void *, __be32 *, void *);
++int nfssvc_decode_writeargs(void *, __be32 *, void *);
++int nfssvc_decode_createargs(void *, __be32 *, void *);
++int nfssvc_decode_renameargs(void *, __be32 *, void *);
++int nfssvc_decode_readlinkargs(void *, __be32 *, void *);
++int nfssvc_decode_linkargs(void *, __be32 *, void *);
++int nfssvc_decode_symlinkargs(void *, __be32 *, void *);
++int nfssvc_decode_readdirargs(void *, __be32 *, void *);
++int nfssvc_encode_void(void *, __be32 *, void *);
++int nfssvc_encode_attrstat(void *, __be32 *, void *);
++int nfssvc_encode_diropres(void *, __be32 *, void *);
++int nfssvc_encode_readlinkres(void *, __be32 *, void *);
++int nfssvc_encode_readres(void *, __be32 *, void *);
++int nfssvc_encode_statfsres(void *, __be32 *, void *);
++int nfssvc_encode_readdirres(void *, __be32 *, void *);
+
+ int nfssvc_encode_entry(void *, const char *name,
+ int namlen, loff_t offset, u64 ino, unsigned int);
+
+-int nfssvc_release_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
++int nfssvc_release_fhandle(void *, __be32 *, void *);
+
+ /* Helper functions for NFSv2 ACL code */
+ __be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *stat);
+diff --git a/fs/nfsd/xdr3.h b/fs/nfsd/xdr3.h
+index 335e04a..d77a9c9 100644
+--- a/fs/nfsd/xdr3.h
++++ b/fs/nfsd/xdr3.h
+@@ -269,71 +269,41 @@ union nfsd3_xdrstore {
+
+ #define NFS3_SVC_XDRSIZE sizeof(union nfsd3_xdrstore)
+
+-int nfs3svc_decode_fhandle(struct svc_rqst *, __be32 *, struct nfsd_fhandle *);
+-int nfs3svc_decode_sattrargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_sattrargs *);
+-int nfs3svc_decode_diropargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_diropargs *);
+-int nfs3svc_decode_accessargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_accessargs *);
+-int nfs3svc_decode_readargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_readargs *);
+-int nfs3svc_decode_writeargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_writeargs *);
+-int nfs3svc_decode_createargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_createargs *);
+-int nfs3svc_decode_mkdirargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_createargs *);
+-int nfs3svc_decode_mknodargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_mknodargs *);
+-int nfs3svc_decode_renameargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_renameargs *);
+-int nfs3svc_decode_readlinkargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_readlinkargs *);
+-int nfs3svc_decode_linkargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_linkargs *);
+-int nfs3svc_decode_symlinkargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_symlinkargs *);
+-int nfs3svc_decode_readdirargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_readdirargs *);
+-int nfs3svc_decode_readdirplusargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_readdirargs *);
+-int nfs3svc_decode_commitargs(struct svc_rqst *, __be32 *,
+- struct nfsd3_commitargs *);
+-int nfs3svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
+-int nfs3svc_encode_attrstat(struct svc_rqst *, __be32 *,
+- struct nfsd3_attrstat *);
+-int nfs3svc_encode_wccstat(struct svc_rqst *, __be32 *,
+- struct nfsd3_attrstat *);
+-int nfs3svc_encode_diropres(struct svc_rqst *, __be32 *,
+- struct nfsd3_diropres *);
+-int nfs3svc_encode_accessres(struct svc_rqst *, __be32 *,
+- struct nfsd3_accessres *);
+-int nfs3svc_encode_readlinkres(struct svc_rqst *, __be32 *,
+- struct nfsd3_readlinkres *);
+-int nfs3svc_encode_readres(struct svc_rqst *, __be32 *, struct nfsd3_readres *);
+-int nfs3svc_encode_writeres(struct svc_rqst *, __be32 *, struct nfsd3_writeres *);
+-int nfs3svc_encode_createres(struct svc_rqst *, __be32 *,
+- struct nfsd3_diropres *);
+-int nfs3svc_encode_renameres(struct svc_rqst *, __be32 *,
+- struct nfsd3_renameres *);
+-int nfs3svc_encode_linkres(struct svc_rqst *, __be32 *,
+- struct nfsd3_linkres *);
+-int nfs3svc_encode_readdirres(struct svc_rqst *, __be32 *,
+- struct nfsd3_readdirres *);
+-int nfs3svc_encode_fsstatres(struct svc_rqst *, __be32 *,
+- struct nfsd3_fsstatres *);
+-int nfs3svc_encode_fsinfores(struct svc_rqst *, __be32 *,
+- struct nfsd3_fsinfores *);
+-int nfs3svc_encode_pathconfres(struct svc_rqst *, __be32 *,
+- struct nfsd3_pathconfres *);
+-int nfs3svc_encode_commitres(struct svc_rqst *, __be32 *,
+- struct nfsd3_commitres *);
++int nfs3svc_decode_fhandle(void *, __be32 *, void *);
++int nfs3svc_decode_sattrargs(void *, __be32 *, void *);
++int nfs3svc_decode_diropargs(void *, __be32 *, void *);
++int nfs3svc_decode_accessargs(void *, __be32 *, void *);
++int nfs3svc_decode_readargs(void *, __be32 *, void *);
++int nfs3svc_decode_writeargs(void *, __be32 *, void *);
++int nfs3svc_decode_createargs(void *, __be32 *, void *);
++int nfs3svc_decode_mkdirargs(void *, __be32 *, void *);
++int nfs3svc_decode_mknodargs(void *, __be32 *, void *);
++int nfs3svc_decode_renameargs(void *, __be32 *, void *);
++int nfs3svc_decode_readlinkargs(void *, __be32 *, void *);
++int nfs3svc_decode_linkargs(void *, __be32 *, void *);
++int nfs3svc_decode_symlinkargs(void *, __be32 *, void *);
++int nfs3svc_decode_readdirargs(void *, __be32 *, void *);
++int nfs3svc_decode_readdirplusargs(void *, __be32 *, void *);
++int nfs3svc_decode_commitargs(void *, __be32 *, void *);
++int nfs3svc_encode_voidres(void *, __be32 *, void *);
++int nfs3svc_encode_attrstat(void *, __be32 *, void *);
++int nfs3svc_encode_wccstat(void *, __be32 *, void *);
++int nfs3svc_encode_diropres(void *, __be32 *, void *);
++int nfs3svc_encode_accessres(void *, __be32 *, void *);
++int nfs3svc_encode_readlinkres(void *, __be32 *, void *);
++int nfs3svc_encode_readres(void *, __be32 *, void *);
++int nfs3svc_encode_writeres(void *, __be32 *, void *);
++int nfs3svc_encode_createres(void *, __be32 *, void *);
++int nfs3svc_encode_renameres(void *, __be32 *, void *);
++int nfs3svc_encode_linkres(void *, __be32 *, void *);
++int nfs3svc_encode_readdirres(void *, __be32 *, void *);
++int nfs3svc_encode_fsstatres(void *, __be32 *, void *);
++int nfs3svc_encode_fsinfores(void *, __be32 *, void *);
++int nfs3svc_encode_pathconfres(void *, __be32 *, void *);
++int nfs3svc_encode_commitres(void *, __be32 *, void *);
+
+-int nfs3svc_release_fhandle(struct svc_rqst *, __be32 *,
+- struct nfsd3_attrstat *);
+-int nfs3svc_release_fhandle2(struct svc_rqst *, __be32 *,
+- struct nfsd3_fhandle_pair *);
++int nfs3svc_release_fhandle(void *, __be32 *, void *);
++int nfs3svc_release_fhandle2(void *, __be32 *, void *);
+ int nfs3svc_encode_entry(void *, const char *name,
+ int namlen, loff_t offset, u64 ino,
+ unsigned int);
+diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
+index d955481..a985dc41 100644
+--- a/fs/nfsd/xdr4.h
++++ b/fs/nfsd/xdr4.h
+@@ -654,11 +654,9 @@ set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp)
+
+ }
+
+-int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *);
+-int nfs4svc_decode_compoundargs(struct svc_rqst *, __be32 *,
+- struct nfsd4_compoundargs *);
+-int nfs4svc_encode_compoundres(struct svc_rqst *, __be32 *,
+- struct nfsd4_compoundres *);
++int nfs4svc_encode_voidres(void *, __be32 *, void *);
++int nfs4svc_decode_compoundargs(void *, __be32 *, void *);
++int nfs4svc_encode_compoundres(void *, __be32 *, void *);
+ __be32 nfsd4_check_resp_size(struct nfsd4_compoundres *, u32);
+ void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *);
+ void nfsd4_encode_replay(struct xdr_stream *xdr, struct nfsd4_op *op);
+@@ -668,26 +666,26 @@ __be32 nfsd4_encode_fattr_to_buf(__be32 **p, int words,
+ u32 *bmval, struct svc_rqst *, int ignore_crossmnt);
+ extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_setclientid *setclid);
++ void *setclid);
+ extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_setclientid_confirm *setclientid_confirm);
++ void *setclientid_confirm);
+ extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
+- struct nfsd4_compound_state *, struct nfsd4_exchange_id *);
+-extern __be32 nfsd4_backchannel_ctl(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_backchannel_ctl *);
+-extern __be32 nfsd4_bind_conn_to_session(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_bind_conn_to_session *);
++ struct nfsd4_compound_state *, void *);
++extern __be32 nfsd4_backchannel_ctl(struct svc_rqst *, struct nfsd4_compound_state *, void *);
++extern __be32 nfsd4_bind_conn_to_session(struct svc_rqst *, struct nfsd4_compound_state *, void *);
+ extern __be32 nfsd4_create_session(struct svc_rqst *,
+ struct nfsd4_compound_state *,
+- struct nfsd4_create_session *);
++ void *);
+ extern __be32 nfsd4_sequence(struct svc_rqst *,
+ struct nfsd4_compound_state *,
+- struct nfsd4_sequence *);
++ void *);
+ extern void nfsd4_sequence_done(struct nfsd4_compoundres *resp);
+ extern __be32 nfsd4_destroy_session(struct svc_rqst *,
+ struct nfsd4_compound_state *,
+- struct nfsd4_destroy_session *);
+-extern __be32 nfsd4_destroy_clientid(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_destroy_clientid *);
+-__be32 nfsd4_reclaim_complete(struct svc_rqst *, struct nfsd4_compound_state *, struct nfsd4_reclaim_complete *);
++ void *);
++extern __be32 nfsd4_destroy_clientid(struct svc_rqst *, struct nfsd4_compound_state *, void *);
++__be32 nfsd4_reclaim_complete(struct svc_rqst *, struct nfsd4_compound_state *, void *);
+ extern __be32 nfsd4_process_open1(struct nfsd4_compound_state *,
+ struct nfsd4_open *open, struct nfsd_net *nn);
+ extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp,
+@@ -696,34 +694,34 @@ extern void nfsd4_cstate_clear_replay(struct nfsd4_compound_state *cstate);
+ extern void nfsd4_cleanup_open_state(struct nfsd4_compound_state *cstate,
+ struct nfsd4_open *open);
+ extern __be32 nfsd4_open_confirm(struct svc_rqst *rqstp,
+- struct nfsd4_compound_state *, struct nfsd4_open_confirm *oc);
++ struct nfsd4_compound_state *, void *oc);
+ extern __be32 nfsd4_close(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_close *close);
++ void *close);
+ extern __be32 nfsd4_open_downgrade(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_open_downgrade *od);
++ void *od);
+ extern __be32 nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *,
+- struct nfsd4_lock *lock);
++ void *lock);
+ extern __be32 nfsd4_lockt(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_lockt *lockt);
++ void *lockt);
+ extern __be32 nfsd4_locku(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_locku *locku);
++ void *locku);
+ extern __be32
+ nfsd4_release_lockowner(struct svc_rqst *rqstp,
+ struct nfsd4_compound_state *,
+- struct nfsd4_release_lockowner *rlockowner);
++ void *rlockowner);
+ extern int nfsd4_release_compoundargs(void *rq, __be32 *p, void *resp);
+ extern __be32 nfsd4_delegreturn(struct svc_rqst *rqstp,
+- struct nfsd4_compound_state *, struct nfsd4_delegreturn *dr);
++ struct nfsd4_compound_state *, void *dr);
+ extern __be32 nfsd4_renew(struct svc_rqst *rqstp,
+- struct nfsd4_compound_state *, clientid_t *clid);
++ struct nfsd4_compound_state *, void *clid);
+ extern __be32 nfsd4_test_stateid(struct svc_rqst *rqstp,
+- struct nfsd4_compound_state *, struct nfsd4_test_stateid *test_stateid);
++ struct nfsd4_compound_state *, void *test_stateid);
+ extern __be32 nfsd4_free_stateid(struct svc_rqst *rqstp,
+- struct nfsd4_compound_state *, struct nfsd4_free_stateid *free_stateid);
++ struct nfsd4_compound_state *, void *free_stateid);
+ extern void nfsd4_bump_seqid(struct nfsd4_compound_state *, __be32 nfserr);
+
+ #endif
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index 52ccd34..7a6b202 100644
--- a/fs/nls/nls_base.c
@@ -85635,10 +109077,71 @@ index 52ccd34..7a6b202 100644
{
return try_then_request_module(find_nls(charset), "nls_%s", charset);
}
+diff --git a/fs/nls/nls_cp932.c b/fs/nls/nls_cp932.c
+index 67b7398..38622e8 100644
+--- a/fs/nls/nls_cp932.c
++++ b/fs/nls/nls_cp932.c
+@@ -7834,7 +7834,7 @@ static const unsigned char charset2upper[256] = {
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
+ };
+
+-static int uni2char(const wchar_t uni,
++static int uni2char(wchar_t uni,
+ unsigned char *out, int boundlen)
+ {
+ const unsigned char *uni2charset;
+diff --git a/fs/nls/nls_cp936.c b/fs/nls/nls_cp936.c
+index c96546c..d5dfe94 100644
+--- a/fs/nls/nls_cp936.c
++++ b/fs/nls/nls_cp936.c
+@@ -10997,7 +10997,7 @@ static const unsigned char charset2upper[256] = {
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
+ };
+
+-static int uni2char(const wchar_t uni,
++static int uni2char(wchar_t uni,
+ unsigned char *out, int boundlen)
+ {
+ const unsigned char *uni2charset;
+diff --git a/fs/nls/nls_cp949.c b/fs/nls/nls_cp949.c
+index 199171e..709af9a 100644
+--- a/fs/nls/nls_cp949.c
++++ b/fs/nls/nls_cp949.c
+@@ -13858,7 +13858,7 @@ static const unsigned char charset2upper[256] = {
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
+ };
+
+-static int uni2char(const wchar_t uni,
++static int uni2char(wchar_t uni,
+ unsigned char *out, int boundlen)
+ {
+ const unsigned char *uni2charset;
+diff --git a/fs/nls/nls_cp950.c b/fs/nls/nls_cp950.c
+index 8e14187..d9cec2f 100644
+--- a/fs/nls/nls_cp950.c
++++ b/fs/nls/nls_cp950.c
+@@ -9394,7 +9394,7 @@ static const unsigned char charset2upper[256] = {
+ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */
+ };
+
+-static int uni2char(const wchar_t uni,
++static int uni2char(wchar_t uni,
+ unsigned char *out, int boundlen)
+ {
+ const unsigned char *uni2charset;
diff --git a/fs/nls/nls_euc-jp.c b/fs/nls/nls_euc-jp.c
-index 162b3f1..6076a7c 100644
+index 162b3f1..2cb932a 100644
--- a/fs/nls/nls_euc-jp.c
+++ b/fs/nls/nls_euc-jp.c
+@@ -406,7 +406,7 @@ static inline int sjisnec2sjisibm(unsigned char *sjisibm,
+ return 2;
+ }
+
+-static int uni2char(const wchar_t uni,
++static int uni2char(wchar_t uni,
+ unsigned char *out, int boundlen)
+ {
+ int n;
@@ -560,8 +560,10 @@ static int __init init_nls_euc_jp(void)
p_nls = load_nls("cp932");
@@ -85653,9 +109156,18 @@ index 162b3f1..6076a7c 100644
}
diff --git a/fs/nls/nls_koi8-ru.c b/fs/nls/nls_koi8-ru.c
-index a80a741..7b96e1b 100644
+index a80a741..13030f7 100644
--- a/fs/nls/nls_koi8-ru.c
+++ b/fs/nls/nls_koi8-ru.c
+@@ -13,7 +13,7 @@
+
+ static struct nls_table *p_nls;
+
+-static int uni2char(const wchar_t uni,
++static int uni2char(wchar_t uni,
+ unsigned char *out, int boundlen)
+ {
+ if (boundlen <= 0)
@@ -62,8 +62,10 @@ static int __init init_nls_koi8_ru(void)
p_nls = load_nls("koi8-u");
@@ -85707,7 +109219,7 @@ index a95d8e0..a91a5fd 100644
EXPORT_SYMBOL_GPL(fsnotify_get_cookie);
diff --git a/fs/ntfs/dir.c b/fs/ntfs/dir.c
-index 9e38daf..5727cae 100644
+index b2eff58..a779b81 100644
--- a/fs/ntfs/dir.c
+++ b/fs/ntfs/dir.c
@@ -1310,7 +1310,7 @@ find_next_index_buffer:
@@ -85719,8 +109231,121 @@ index 9e38daf..5727cae 100644
ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
"inode 0x%lx or driver bug.", vdir->i_ino);
goto err_out;
+@@ -1517,7 +1517,7 @@ static int ntfs_dir_fsync(struct file *filp, loff_t start, loff_t end,
+ na.type = AT_BITMAP;
+ na.name = I30;
+ na.name_len = 4;
+- bmp_vi = ilookup5(vi->i_sb, vi->i_ino, (test_t)ntfs_test_inode, &na);
++ bmp_vi = ilookup5(vi->i_sb, vi->i_ino, ntfs_test_inode, &na);
+ if (bmp_vi) {
+ write_inode_now(bmp_vi, !datasync);
+ iput(bmp_vi);
+diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
+index d284f07..06984d4 100644
+--- a/fs/ntfs/inode.c
++++ b/fs/ntfs/inode.c
+@@ -57,8 +57,9 @@
+ * NOTE: This function runs with the inode_hash_lock spin lock held so it is not
+ * allowed to sleep.
+ */
+-int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
++int ntfs_test_inode(struct inode *vi, void *_na)
+ {
++ ntfs_attr *na = _na;
+ ntfs_inode *ni;
+
+ if (vi->i_ino != na->mft_no)
+@@ -101,8 +102,9 @@ int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
+ * NOTE: This function runs with the inode->i_lock spin lock held so it is not
+ * allowed to sleep. (Hence the GFP_ATOMIC allocation.)
+ */
+-static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
++static int ntfs_init_locked_inode(struct inode *vi, void *_na)
+ {
++ ntfs_attr *na = _na;
+ ntfs_inode *ni = NTFS_I(vi);
+
+ vi->i_ino = na->mft_no;
+@@ -145,7 +147,6 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
+ return 0;
+ }
+
+-typedef int (*set_t)(struct inode *, void *);
+ static int ntfs_read_locked_inode(struct inode *vi);
+ static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi);
+ static int ntfs_read_locked_index_inode(struct inode *base_vi,
+@@ -178,8 +179,8 @@ struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no)
+ na.name = NULL;
+ na.name_len = 0;
+
+- vi = iget5_locked(sb, mft_no, (test_t)ntfs_test_inode,
+- (set_t)ntfs_init_locked_inode, &na);
++ vi = iget5_locked(sb, mft_no, ntfs_test_inode,
++ ntfs_init_locked_inode, &na);
+ if (unlikely(!vi))
+ return ERR_PTR(-ENOMEM);
+
+@@ -239,8 +240,8 @@ struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPE type,
+ na.name = name;
+ na.name_len = name_len;
+
+- vi = iget5_locked(base_vi->i_sb, na.mft_no, (test_t)ntfs_test_inode,
+- (set_t)ntfs_init_locked_inode, &na);
++ vi = iget5_locked(base_vi->i_sb, na.mft_no, ntfs_test_inode,
++ ntfs_init_locked_inode, &na);
+ if (unlikely(!vi))
+ return ERR_PTR(-ENOMEM);
+
+@@ -294,8 +295,8 @@ struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
+ na.name = name;
+ na.name_len = name_len;
+
+- vi = iget5_locked(base_vi->i_sb, na.mft_no, (test_t)ntfs_test_inode,
+- (set_t)ntfs_init_locked_inode, &na);
++ vi = iget5_locked(base_vi->i_sb, na.mft_no, ntfs_test_inode,
++ ntfs_init_locked_inode, &na);
+ if (unlikely(!vi))
+ return ERR_PTR(-ENOMEM);
+
+diff --git a/fs/ntfs/inode.h b/fs/ntfs/inode.h
+index b3c3469..17208ad 100644
+--- a/fs/ntfs/inode.h
++++ b/fs/ntfs/inode.h
+@@ -267,9 +267,7 @@ typedef struct {
+ ATTR_TYPE type;
+ } ntfs_attr;
+
+-typedef int (*test_t)(struct inode *, void *);
+-
+-extern int ntfs_test_inode(struct inode *vi, ntfs_attr *na);
++extern int ntfs_test_inode(struct inode *vi, void *_na);
+
+ extern struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no);
+ extern struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPE type,
+diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
+index 3014a36..9fa26af 100644
+--- a/fs/ntfs/mft.c
++++ b/fs/ntfs/mft.c
+@@ -963,7 +963,7 @@ bool ntfs_may_write_mft_record(ntfs_volume *vol, const unsigned long mft_no,
+ * dirty code path of the inode dirty code path when writing
+ * $MFT occurs.
+ */
+- vi = ilookup5_nowait(sb, mft_no, (test_t)ntfs_test_inode, &na);
++ vi = ilookup5_nowait(sb, mft_no, ntfs_test_inode, &na);
+ }
+ if (vi) {
+ ntfs_debug("Base inode 0x%lx is in icache.", mft_no);
+@@ -1024,7 +1024,7 @@ bool ntfs_may_write_mft_record(ntfs_volume *vol, const unsigned long mft_no,
+ vi = igrab(mft_vi);
+ BUG_ON(vi != mft_vi);
+ } else
+- vi = ilookup5_nowait(sb, na.mft_no, (test_t)ntfs_test_inode,
++ vi = ilookup5_nowait(sb, na.mft_no, ntfs_test_inode,
+ &na);
+ if (!vi) {
+ /*
diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c
-index d1a8535..1cfa4a9 100644
+index 1b38abd..33913db 100644
--- a/fs/ntfs/super.c
+++ b/fs/ntfs/super.c
@@ -688,7 +688,7 @@ static struct buffer_head *read_ntfs_boot_sector(struct super_block *sb,
@@ -85750,8 +109375,17 @@ index d1a8535..1cfa4a9 100644
/* We failed. Cleanup and return. */
if (bh_primary)
brelse(bh_primary);
+@@ -2711,7 +2711,7 @@ static const struct super_operations ntfs_sops = {
+ *
+ * NOTE: @sb->s_flags contains the mount options flags.
+ */
+-static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
++static int ntfs_fill_super(struct super_block *sb, void *opt, int silent)
+ {
+ ntfs_volume *vol;
+ struct buffer_head *bh;
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h
-index e88ccf8..716dfce 100644
+index 68c607e..095cc08 100644
--- a/fs/ocfs2/dlm/dlmcommon.h
+++ b/fs/ocfs2/dlm/dlmcommon.h
@@ -151,9 +151,9 @@ struct dlm_ctxt
@@ -85824,7 +109458,7 @@ index 2ee7fe7..9cff42d 100644
}
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
-index 4e2162b..06d7446 100644
+index 9477d6e..69ffbb2 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -303,7 +303,7 @@ static void dlm_init_mle(struct dlm_master_list_entry *mle,
@@ -85845,11 +109479,31 @@ index 4e2162b..06d7446 100644
atomic_inc(&dlm->res_cur_count);
/* just for consistency */
+diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
+index 03768bb..e92ce05 100644
+--- a/fs/ocfs2/dlmfs/dlmfs.c
++++ b/fs/ocfs2/dlmfs/dlmfs.c
+@@ -88,13 +88,13 @@ struct workqueue_struct *user_dlm_worker;
+ */
+ #define DLMFS_CAPABILITIES "bast stackglue"
+ static int param_set_dlmfs_capabilities(const char *val,
+- struct kernel_param *kp)
++ const struct kernel_param *kp)
+ {
+ printk(KERN_ERR "%s: readonly parameter\n", kp->name);
+ return -EINVAL;
+ }
+ static int param_get_dlmfs_capabilities(char *buffer,
+- struct kernel_param *kp)
++ const struct kernel_param *kp)
+ {
+ return strlcpy(buffer, DLMFS_CAPABILITIES,
+ strlen(DLMFS_CAPABILITIES) + 1);
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
-index 0a4457f..67ddb4f 100644
+index 7d62c43..e325680 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
-@@ -1319,7 +1319,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
+@@ -1317,7 +1317,7 @@ static int ocfs2_local_alloc_slide_window(struct ocfs2_super *osb,
goto bail;
}
@@ -85880,7 +109534,7 @@ index 7a01262..23667d1 100644
enum ocfs2_local_alloc_state
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
-index fc6d25f..7b72242 100644
+index 2f19aee..26ac57f 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -851,7 +851,7 @@ static int ocfs2_reserve_suballoc_bits(struct ocfs2_super *osb,
@@ -85938,7 +109592,7 @@ index fc6d25f..7b72242 100644
}
}
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
-index 2de4c8a..a106a0d 100644
+index faa1365..ded3cff 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -310,11 +310,11 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
@@ -85958,7 +109612,7 @@ index 2de4c8a..a106a0d 100644
out += snprintf(buf + out, len - out,
"%10s => State: %u Descriptor: %llu Size: %u bits "
-@@ -2106,11 +2106,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
+@@ -2101,11 +2101,11 @@ static int ocfs2_initialize_super(struct super_block *sb,
mutex_init(&osb->system_file_mutex);
@@ -85976,7 +109630,7 @@ index 2de4c8a..a106a0d 100644
/* Copy the blockcheck stats from the superblock probe */
osb->osb_ecc_stats = *stats;
diff --git a/fs/open.c b/fs/open.c
-index 6a24f98..c16baf7 100644
+index 17cb6b1..d64c63e 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -32,6 +32,8 @@
@@ -86056,7 +109710,7 @@ index 6a24f98..c16baf7 100644
@@ -511,6 +535,16 @@ static int chmod_common(struct path *path, umode_t mode)
return error;
retry_deleg:
- mutex_lock(&inode->i_mutex);
+ inode_lock(inode);
+
+ if (!gr_acl_handle_chmod(path->dentry, path->mnt, &mode)) {
+ error = -EACCES;
@@ -86080,7 +109734,7 @@ index 6a24f98..c16baf7 100644
retry_deleg:
newattrs.ia_valid = ATTR_CTIME;
if (user != (uid_t) -1) {
-@@ -1027,6 +1064,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
+@@ -1024,6 +1061,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode)
} else {
fsnotify_open(f);
fd_install(fd, f);
@@ -86089,7 +109743,7 @@ index 6a24f98..c16baf7 100644
}
putname(tmp);
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
-index eff6319..d8a12987 100644
+index d894e7c..8fa99559 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -153,7 +153,7 @@ static char *ovl_read_symlink(struct dentry *realdentry)
@@ -86102,10 +109756,10 @@ index eff6319..d8a12987 100644
if (res < 0) {
free_page((unsigned long) buf);
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
-index 05ac9a9..c60faca 100644
+index a4ff5d0..6034cb5 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
-@@ -358,6 +358,9 @@ struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)
+@@ -347,6 +347,9 @@ struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)
if (d_is_dir(dentry))
return d_backing_inode(dentry);
@@ -86116,10 +109770,10 @@ index 05ac9a9..c60faca 100644
if (ovl_open_need_copy_up(file_flags, type, realpath.dentry)) {
err = ovl_want_write(dentry);
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-index a1acc60..52c2657 100644
+index 4399ea8..4915433 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
-@@ -175,7 +175,7 @@ void ovl_path_lower(struct dentry *dentry, struct path *path)
+@@ -194,7 +194,7 @@ void ovl_path_lower(struct dentry *dentry, struct path *path)
{
struct ovl_entry *oe = dentry->d_fsdata;
@@ -86128,7 +109782,7 @@ index a1acc60..52c2657 100644
}
int ovl_want_write(struct dentry *dentry)
-@@ -917,8 +917,8 @@ static unsigned int ovl_split_lowerdirs(char *str)
+@@ -944,8 +944,8 @@ static unsigned int ovl_split_lowerdirs(char *str)
static int ovl_fill_super(struct super_block *sb, void *data, int silent)
{
@@ -86140,25 +109794,19 @@ index a1acc60..52c2657 100644
struct ovl_entry *oe;
struct ovl_fs *ufs;
diff --git a/fs/pipe.c b/fs/pipe.c
-index 42cf8dd..932cb27 100644
+index ab8dad3..932cb27 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
-@@ -36,7 +36,13 @@ unsigned int pipe_max_size = 1048576;
+@@ -36,7 +36,7 @@ unsigned int pipe_max_size = 1048576;
/*
* Minimum pipe size, as required by POSIX
*/
-unsigned int pipe_min_size = PAGE_SIZE;
+unsigned int pipe_min_size __read_only = PAGE_SIZE;
-+
-+/* Maximum allocatable pages per user. Hard limit is unset by default, soft
-+ * matches default values.
-+ */
-+unsigned long pipe_user_pages_hard;
-+unsigned long pipe_user_pages_soft = PIPE_DEF_BUFFERS * INR_OPEN_CUR;
- /*
- * We use a start+len construction, which provides full use of the
-@@ -55,7 +61,7 @@ unsigned int pipe_min_size = PAGE_SIZE;
+ /* Maximum allocatable pages per user. Hard limit is unset by default, soft
+ * matches default values.
+@@ -61,7 +61,7 @@ unsigned long pipe_user_pages_soft = PIPE_DEF_BUFFERS * INR_OPEN_CUR;
static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass)
{
@@ -86167,7 +109815,7 @@ index 42cf8dd..932cb27 100644
mutex_lock_nested(&pipe->mutex, subclass);
}
-@@ -70,7 +76,7 @@ EXPORT_SYMBOL(pipe_lock);
+@@ -76,7 +76,7 @@ EXPORT_SYMBOL(pipe_lock);
void pipe_unlock(struct pipe_inode_info *pipe)
{
@@ -86176,7 +109824,7 @@ index 42cf8dd..932cb27 100644
mutex_unlock(&pipe->mutex);
}
EXPORT_SYMBOL(pipe_unlock);
-@@ -291,9 +297,9 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
+@@ -297,9 +297,9 @@ pipe_read(struct kiocb *iocb, struct iov_iter *to)
}
if (bufs) /* More to do? */
continue;
@@ -86188,7 +109836,7 @@ index 42cf8dd..932cb27 100644
/* syscall merging: Usually we must not sleep
* if O_NONBLOCK is set, or if we got some data.
* But if a writer sleeps in kernel space, then
-@@ -350,7 +356,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
+@@ -356,7 +356,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
__pipe_lock(pipe);
@@ -86197,7 +109845,7 @@ index 42cf8dd..932cb27 100644
send_sig(SIGPIPE, current, 0);
ret = -EPIPE;
goto out;
-@@ -385,7 +391,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
+@@ -391,7 +391,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
for (;;) {
int bufs;
@@ -86206,7 +109854,7 @@ index 42cf8dd..932cb27 100644
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -453,9 +459,9 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
+@@ -459,9 +459,9 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from)
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
do_wakeup = 0;
}
@@ -86218,7 +109866,7 @@ index 42cf8dd..932cb27 100644
}
out:
__pipe_unlock(pipe);
-@@ -510,7 +516,7 @@ pipe_poll(struct file *filp, poll_table *wait)
+@@ -516,7 +516,7 @@ pipe_poll(struct file *filp, poll_table *wait)
mask = 0;
if (filp->f_mode & FMODE_READ) {
mask = (nrbufs > 0) ? POLLIN | POLLRDNORM : 0;
@@ -86227,7 +109875,7 @@ index 42cf8dd..932cb27 100644
mask |= POLLHUP;
}
-@@ -520,7 +526,7 @@ pipe_poll(struct file *filp, poll_table *wait)
+@@ -526,7 +526,7 @@ pipe_poll(struct file *filp, poll_table *wait)
* Most Unices do not set POLLERR for FIFOs but on Linux they
* behave exactly like pipes for poll().
*/
@@ -86236,7 +109884,7 @@ index 42cf8dd..932cb27 100644
mask |= POLLERR;
}
-@@ -532,7 +538,7 @@ static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe)
+@@ -538,7 +538,7 @@ static void put_pipe_info(struct inode *inode, struct pipe_inode_info *pipe)
int kill = 0;
spin_lock(&inode->i_lock);
@@ -86245,7 +109893,7 @@ index 42cf8dd..932cb27 100644
inode->i_pipe = NULL;
kill = 1;
}
-@@ -549,11 +555,11 @@ pipe_release(struct inode *inode, struct file *file)
+@@ -555,11 +555,11 @@ pipe_release(struct inode *inode, struct file *file)
__pipe_lock(pipe);
if (file->f_mode & FMODE_READ)
@@ -86260,68 +109908,7 @@ index 42cf8dd..932cb27 100644
wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP);
kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
-@@ -583,20 +589,49 @@ pipe_fasync(int fd, struct file *filp, int on)
- return retval;
- }
-
-+static void account_pipe_buffers(struct pipe_inode_info *pipe,
-+ unsigned long old, unsigned long new)
-+{
-+ atomic_long_add(new - old, &pipe->user->pipe_bufs);
-+}
-+
-+static bool too_many_pipe_buffers_soft(struct user_struct *user)
-+{
-+ return pipe_user_pages_soft &&
-+ atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_soft;
-+}
-+
-+static bool too_many_pipe_buffers_hard(struct user_struct *user)
-+{
-+ return pipe_user_pages_hard &&
-+ atomic_long_read(&user->pipe_bufs) >= pipe_user_pages_hard;
-+}
-+
- struct pipe_inode_info *alloc_pipe_info(void)
- {
- struct pipe_inode_info *pipe;
-
- pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
- if (pipe) {
-- pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
-+ unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
-+ struct user_struct *user = get_current_user();
-+
-+ if (!too_many_pipe_buffers_hard(user)) {
-+ if (too_many_pipe_buffers_soft(user))
-+ pipe_bufs = 1;
-+ pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * pipe_bufs, GFP_KERNEL);
-+ }
-+
- if (pipe->bufs) {
- init_waitqueue_head(&pipe->wait);
- pipe->r_counter = pipe->w_counter = 1;
-- pipe->buffers = PIPE_DEF_BUFFERS;
-+ pipe->buffers = pipe_bufs;
-+ pipe->user = user;
-+ account_pipe_buffers(pipe, 0, pipe_bufs);
- mutex_init(&pipe->mutex);
- return pipe;
- }
-+ free_uid(user);
- kfree(pipe);
- }
-
-@@ -607,6 +642,8 @@ void free_pipe_info(struct pipe_inode_info *pipe)
- {
- int i;
-
-+ account_pipe_buffers(pipe, pipe->buffers, 0);
-+ free_uid(pipe->user);
- for (i = 0; i < pipe->buffers; i++) {
- struct pipe_buffer *buf = pipe->bufs + i;
- if (buf->ops)
-@@ -618,7 +655,7 @@ void free_pipe_info(struct pipe_inode_info *pipe)
+@@ -655,7 +655,7 @@ void free_pipe_info(struct pipe_inode_info *pipe)
kfree(pipe);
}
@@ -86330,7 +109917,7 @@ index 42cf8dd..932cb27 100644
/*
* pipefs_dname() is called from d_path().
-@@ -648,8 +685,9 @@ static struct inode * get_pipe_inode(void)
+@@ -685,8 +685,9 @@ static struct inode * get_pipe_inode(void)
goto fail_iput;
inode->i_pipe = pipe;
@@ -86342,7 +109929,7 @@ index 42cf8dd..932cb27 100644
inode->i_fop = &pipefifo_fops;
/*
-@@ -831,17 +869,17 @@ static int fifo_open(struct inode *inode, struct file *filp)
+@@ -868,17 +869,17 @@ static int fifo_open(struct inode *inode, struct file *filp)
spin_lock(&inode->i_lock);
if (inode->i_pipe) {
pipe = inode->i_pipe;
@@ -86363,7 +109950,7 @@ index 42cf8dd..932cb27 100644
spin_unlock(&inode->i_lock);
free_pipe_info(pipe);
pipe = inode->i_pipe;
-@@ -866,10 +904,10 @@ static int fifo_open(struct inode *inode, struct file *filp)
+@@ -903,10 +904,10 @@ static int fifo_open(struct inode *inode, struct file *filp)
* opened, even when there is no process writing the FIFO.
*/
pipe->r_counter++;
@@ -86376,7 +109963,7 @@ index 42cf8dd..932cb27 100644
if ((filp->f_flags & O_NONBLOCK)) {
/* suppress POLLHUP until we have
* seen a writer */
-@@ -888,14 +926,14 @@ static int fifo_open(struct inode *inode, struct file *filp)
+@@ -925,14 +926,14 @@ static int fifo_open(struct inode *inode, struct file *filp)
* errno=ENXIO when there is no process reading the FIFO.
*/
ret = -ENXIO;
@@ -86394,7 +109981,7 @@ index 42cf8dd..932cb27 100644
if (wait_for_partner(pipe, &pipe->r_counter))
goto err_wr;
}
-@@ -909,11 +947,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
+@@ -946,11 +947,11 @@ static int fifo_open(struct inode *inode, struct file *filp)
* the process can at least talk to itself.
*/
@@ -86409,7 +109996,7 @@ index 42cf8dd..932cb27 100644
wake_up_partner(pipe);
break;
-@@ -927,13 +965,13 @@ static int fifo_open(struct inode *inode, struct file *filp)
+@@ -964,13 +965,13 @@ static int fifo_open(struct inode *inode, struct file *filp)
return 0;
err_rd:
@@ -86425,15 +110012,7 @@ index 42cf8dd..932cb27 100644
wake_up_interruptible(&pipe->wait);
ret = -ERESTARTSYS;
goto err;
-@@ -998,6 +1036,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
- memcpy(bufs + head, pipe->bufs, tail * sizeof(struct pipe_buffer));
- }
-
-+ account_pipe_buffers(pipe, pipe->buffers, nr_pages);
- pipe->curbuf = 0;
- kfree(pipe->bufs);
- pipe->bufs = bufs;
-@@ -1009,7 +1048,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
+@@ -1047,7 +1048,7 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages)
* Currently we rely on the pipe array holding a power-of-2 number
* of pages.
*/
@@ -86442,7 +110021,7 @@ index 42cf8dd..932cb27 100644
{
unsigned long nr_pages;
-@@ -1057,18 +1096,26 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
+@@ -1095,13 +1096,16 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
switch (cmd) {
case F_SETPIPE_SZ: {
@@ -86462,18 +110041,8 @@ index 42cf8dd..932cb27 100644
goto out;
if (!capable(CAP_SYS_RESOURCE) && size > pipe_max_size) {
- ret = -EPERM;
- goto out;
-+ } else if ((too_many_pipe_buffers_hard(pipe->user) ||
-+ too_many_pipe_buffers_soft(pipe->user)) &&
-+ !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN)) {
-+ ret = -EPERM;
-+ goto out;
- }
- ret = pipe_set_size(pipe, nr_pages);
- break;
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
-index 4adde1e..9311892 100644
+index 711dd51..e55fd79 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -20,6 +20,7 @@
@@ -86750,7 +110319,7 @@ index b6c00ce..ab37ad1 100644
static struct pid *
get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
diff --git a/fs/proc/base.c b/fs/proc/base.c
-index b7de324..c1235e2 100644
+index 4f764c2..d16e8b1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -113,6 +113,14 @@ struct pid_entry {
@@ -86961,9 +110530,9 @@ index b7de324..c1235e2 100644
if (write && copy_from_user(page, buf, this_len)) {
copied = -EFAULT;
-@@ -954,9 +1034,16 @@ static ssize_t environ_read(struct file *file, char __user *buf,
- int ret = 0;
+@@ -955,9 +1035,16 @@ static ssize_t environ_read(struct file *file, char __user *buf,
struct mm_struct *mm = file->private_data;
+ unsigned long env_start, env_end;
- if (!mm)
+ if (!mm || !mm->env_end)
@@ -86979,17 +110548,22 @@ index b7de324..c1235e2 100644
page = (char *)__get_free_page(GFP_TEMPORARY);
if (!page)
return -ENOMEM;
-@@ -966,7 +1053,7 @@ static ssize_t environ_read(struct file *file, char __user *buf,
- goto free;
+@@ -971,9 +1058,12 @@ static ssize_t environ_read(struct file *file, char __user *buf,
+ env_end = mm->env_end;
+ up_read(&mm->mmap_sem);
+
++ if (!env_end)
++ goto free;
++
while (count > 0) {
size_t this_len, max_len;
- int retval;
+ ssize_t retval;
- if (src >= (mm->env_end - mm->env_start))
+ if (src >= (env_end - env_start))
break;
-@@ -1572,7 +1659,7 @@ static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie)
- int error = -EACCES;
+@@ -1583,7 +1673,7 @@ static const char *proc_pid_get_link(struct dentry *dentry,
+ return ERR_PTR(-ECHILD);
/* Are we allowed to snoop on the tasks file descriptors? */
- if (!proc_fd_access_allowed(inode))
@@ -86997,7 +110571,7 @@ index b7de324..c1235e2 100644
goto out;
error = PROC_I(inode)->op.proc_get_link(dentry, &path);
-@@ -1616,8 +1703,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
+@@ -1627,8 +1717,18 @@ static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int b
struct path path;
/* Are we allowed to snoop on the tasks file descriptors? */
@@ -87018,7 +110592,7 @@ index b7de324..c1235e2 100644
error = PROC_I(inode)->op.proc_get_link(dentry, &path);
if (error)
-@@ -1667,7 +1764,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
+@@ -1678,7 +1778,11 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
rcu_read_lock();
cred = __task_cred(task);
inode->i_uid = cred->euid;
@@ -87030,7 +110604,7 @@ index b7de324..c1235e2 100644
rcu_read_unlock();
}
security_task_to_inode(task, inode);
-@@ -1703,10 +1804,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+@@ -1714,10 +1818,19 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
return -ENOENT;
}
if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -87050,7 +110624,7 @@ index b7de324..c1235e2 100644
}
}
rcu_read_unlock();
-@@ -1744,11 +1854,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
+@@ -1755,11 +1868,20 @@ int pid_revalidate(struct dentry *dentry, unsigned int flags)
if (task) {
if ((inode->i_mode == (S_IFDIR|S_IRUGO|S_IXUGO)) ||
@@ -87071,7 +110645,7 @@ index b7de324..c1235e2 100644
rcu_read_unlock();
} else {
inode->i_uid = GLOBAL_ROOT_UID;
-@@ -2287,6 +2406,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
+@@ -2300,6 +2422,9 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
if (!task)
goto out_no_task;
@@ -87081,7 +110655,7 @@ index b7de324..c1235e2 100644
/*
* Yes, it does not scale. And it should not. Don't add
* new entries into /proc/<tgid>/ without very good reasons.
-@@ -2317,6 +2439,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
+@@ -2330,6 +2455,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
if (!task)
return -ENOENT;
@@ -87091,7 +110665,7 @@ index b7de324..c1235e2 100644
if (!dir_emit_dots(file, ctx))
goto out;
-@@ -2732,7 +2857,9 @@ static const struct inode_operations proc_task_inode_operations;
+@@ -2742,7 +2870,9 @@ static const struct inode_operations proc_task_inode_operations;
static const struct pid_entry tgid_base_stuff[] = {
DIR("task", S_IRUGO|S_IXUGO, proc_task_inode_operations, proc_task_operations),
DIR("fd", S_IRUSR|S_IXUSR, proc_fd_inode_operations, proc_fd_operations),
@@ -87101,7 +110675,7 @@ index b7de324..c1235e2 100644
DIR("fdinfo", S_IRUSR|S_IXUSR, proc_fdinfo_inode_operations, proc_fdinfo_operations),
DIR("ns", S_IRUSR|S_IXUGO, proc_ns_dir_inode_operations, proc_ns_dir_operations),
#ifdef CONFIG_NET
-@@ -2750,7 +2877,7 @@ static const struct pid_entry tgid_base_stuff[] = {
+@@ -2760,7 +2890,7 @@ static const struct pid_entry tgid_base_stuff[] = {
REG("autogroup", S_IRUGO|S_IWUSR, proc_pid_sched_autogroup_operations),
#endif
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
@@ -87110,7 +110684,7 @@ index b7de324..c1235e2 100644
ONE("syscall", S_IRUSR, proc_pid_syscall),
#endif
REG("cmdline", S_IRUGO, proc_pid_cmdline_ops),
-@@ -2775,10 +2902,10 @@ static const struct pid_entry tgid_base_stuff[] = {
+@@ -2785,10 +2915,10 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
@@ -87123,7 +110697,7 @@ index b7de324..c1235e2 100644
ONE("stack", S_IRUSR, proc_pid_stack),
#endif
#ifdef CONFIG_SCHED_INFO
-@@ -2812,6 +2939,9 @@ static const struct pid_entry tgid_base_stuff[] = {
+@@ -2822,6 +2952,9 @@ static const struct pid_entry tgid_base_stuff[] = {
#ifdef CONFIG_HARDWALL
ONE("hardwall", S_IRUGO, proc_pid_hardwall),
#endif
@@ -87133,7 +110707,7 @@ index b7de324..c1235e2 100644
#ifdef CONFIG_USER_NS
REG("uid_map", S_IRUGO|S_IWUSR, proc_uid_map_operations),
REG("gid_map", S_IRUGO|S_IWUSR, proc_gid_map_operations),
-@@ -2944,7 +3074,14 @@ static int proc_pid_instantiate(struct inode *dir,
+@@ -2954,7 +3087,14 @@ static int proc_pid_instantiate(struct inode *dir,
if (!inode)
goto out;
@@ -87148,7 +110722,7 @@ index b7de324..c1235e2 100644
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
inode->i_flags|=S_IMMUTABLE;
-@@ -2982,7 +3119,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
+@@ -2992,7 +3132,11 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsign
if (!task)
goto out;
@@ -87160,7 +110734,7 @@ index b7de324..c1235e2 100644
put_task_struct(task);
out:
return ERR_PTR(result);
-@@ -3096,7 +3237,7 @@ static const struct pid_entry tid_base_stuff[] = {
+@@ -3106,7 +3250,7 @@ static const struct pid_entry tid_base_stuff[] = {
REG("sched", S_IRUGO|S_IWUSR, proc_pid_sched_operations),
#endif
REG("comm", S_IRUGO|S_IWUSR, proc_pid_set_comm_operations),
@@ -87169,7 +110743,7 @@ index b7de324..c1235e2 100644
ONE("syscall", S_IRUSR, proc_pid_syscall),
#endif
REG("cmdline", S_IRUGO, proc_pid_cmdline_ops),
-@@ -3123,10 +3264,10 @@ static const struct pid_entry tid_base_stuff[] = {
+@@ -3133,10 +3277,10 @@ static const struct pid_entry tid_base_stuff[] = {
#ifdef CONFIG_SECURITY
DIR("attr", S_IRUGO|S_IXUGO, proc_attr_dir_inode_operations, proc_attr_dir_operations),
#endif
@@ -87215,7 +110789,7 @@ index 50493ed..248166b 100644
}
fs_initcall(proc_devices_init);
diff --git a/fs/proc/fd.c b/fs/proc/fd.c
-index 3c2a915..cb7934e 100644
+index 56afa5e..cb7934e 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -27,7 +27,8 @@ static int seq_show(struct seq_file *m, void *v)
@@ -87228,15 +110802,7 @@ index 3c2a915..cb7934e 100644
put_task_struct(task);
if (files) {
-@@ -258,6 +259,7 @@ static int proc_readfd_common(struct file *file, struct dir_context *ctx,
- name, len, instantiate, p,
- (void *)(unsigned long)fd))
- goto out_fd_loop;
-+ cond_resched();
- rcu_read_lock();
- }
- rcu_read_unlock();
-@@ -295,13 +297,15 @@ int proc_fd_permission(struct inode *inode, int mask)
+@@ -296,13 +297,15 @@ int proc_fd_permission(struct inode *inode, int mask)
int rv;
rv = generic_permission(inode, mask);
@@ -87374,7 +110940,7 @@ index ff3ffc7..1aec0a3 100644
{
umode_t mode = S_IFDIR | S_IRUGO | S_IXUGO;
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
-index bd95b9f..a64a773 100644
+index 42305dd..968caba 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -23,11 +23,17 @@
@@ -87409,7 +110975,7 @@ index bd95b9f..a64a773 100644
}
static struct kmem_cache * proc_inode_cachep;
-@@ -429,7 +442,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
+@@ -431,7 +444,11 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
if (de->mode) {
inode->i_mode = de->mode;
inode->i_uid = de->uid;
@@ -87486,7 +111052,7 @@ index a352d57..cb94a5c 100644
}
fs_initcall(proc_interrupts_init);
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
-index 92e6726..47a8d4c 100644
+index a939f5e..0de6e70 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -316,7 +316,7 @@ static char *storenote(struct memelfnote *men, char *bufp)
@@ -87564,10 +111130,10 @@ index 92e6726..47a8d4c 100644
.priority = 0,
};
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
-index 9155a5a..abe1823 100644
+index df4661a..03c3e5e 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
-@@ -191,7 +191,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
+@@ -188,7 +188,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
0ul, // used to be vmalloc 'used'
0ul // used to be vmalloc 'largest_chunk'
#ifdef CONFIG_MEMORY_FAILURE
@@ -88011,13 +111577,13 @@ index 510413eb..34d9a8c 100644
seq_printf(p, "softirq %llu", (unsigned long long)sum_softirq);
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 09cd3ed..862cbb3 100644
+index fa95ab2..7ab502b 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
-@@ -14,12 +14,19 @@
- #include <linux/swapops.h>
+@@ -15,12 +15,19 @@
#include <linux/mmu_notifier.h>
#include <linux/page_idle.h>
+ #include <linux/shmem_fs.h>
+#include <linux/grsecurity.h>
#include <asm/elf.h>
@@ -88033,8 +111599,8 @@ index 09cd3ed..862cbb3 100644
+
void task_mem(struct seq_file *m, struct mm_struct *mm)
{
- unsigned long data, text, lib, swap, ptes, pmds;
-@@ -58,8 +65,13 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
+ unsigned long text, lib, swap, ptes, pmds, anon, file, shmem;
+@@ -65,8 +72,13 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
"VmLib:\t%8lu kB\n"
"VmPTE:\t%8lu kB\n"
"VmPMD:\t%8lu kB\n"
@@ -88050,7 +111616,7 @@ index 09cd3ed..862cbb3 100644
total_vm << (PAGE_SHIFT-10),
mm->locked_vm << (PAGE_SHIFT-10),
mm->pinned_vm << (PAGE_SHIFT-10),
-@@ -69,7 +81,19 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
+@@ -79,7 +91,19 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
mm->stack_vm << (PAGE_SHIFT-10), text, lib,
ptes >> 10,
pmds >> 10,
@@ -88071,7 +111637,16 @@ index 09cd3ed..862cbb3 100644
hugetlb_report_usage(m, mm);
}
-@@ -287,13 +311,13 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
+@@ -281,7 +305,7 @@ static int is_stack(struct proc_maps_private *priv,
+ stack = vma_is_stack_for_task(vma, task);
+ rcu_read_unlock();
+ }
+- return stack;
++ return stack || (vma->vm_flags & (VM_GROWSDOWN | VM_GROWSUP));
+ }
+
+ static void
+@@ -304,13 +328,13 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
}
@@ -88090,7 +111665,7 @@ index 09cd3ed..862cbb3 100644
seq_setwidth(m, 25 + sizeof(void *) * 6 - 1);
seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu ",
-@@ -303,7 +327,11 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
+@@ -320,7 +344,11 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
flags & VM_WRITE ? 'w' : '-',
flags & VM_EXEC ? 'x' : '-',
flags & VM_MAYSHARE ? 's' : 'p',
@@ -88102,7 +111677,7 @@ index 09cd3ed..862cbb3 100644
MAJOR(dev), MINOR(dev), ino);
/*
-@@ -312,7 +340,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
+@@ -329,7 +357,7 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
*/
if (file) {
seq_pad(m, ' ');
@@ -88111,19 +111686,7 @@ index 09cd3ed..862cbb3 100644
goto done;
}
-@@ -343,8 +371,9 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
- * Thread stack in /proc/PID/task/TID/maps or
- * the main process stack.
- */
-- if (!is_pid || (vma->vm_start <= mm->start_stack &&
-- vma->vm_end >= mm->start_stack)) {
-+ if (!is_pid || (vma->vm_flags & (VM_GROWSDOWN | VM_GROWSUP)) ||
-+ (vma->vm_start <= mm->start_stack &&
-+ vma->vm_end >= mm->start_stack)) {
- name = "[stack]";
- } else {
- /* Thread stack in /proc/PID/maps */
-@@ -364,6 +393,12 @@ done:
+@@ -366,6 +394,12 @@ done:
static int show_map(struct seq_file *m, void *v, int is_pid)
{
@@ -88136,7 +111699,7 @@ index 09cd3ed..862cbb3 100644
show_map_vma(m, v, is_pid);
m_cache_vma(m, v);
return 0;
-@@ -601,6 +636,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
+@@ -646,6 +680,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
[ilog2(VM_RAND_READ)] = "rr",
[ilog2(VM_DONTCOPY)] = "dc",
[ilog2(VM_DONTEXPAND)] = "de",
@@ -88146,7 +111709,7 @@ index 09cd3ed..862cbb3 100644
[ilog2(VM_ACCOUNT)] = "ac",
[ilog2(VM_NORESERVE)] = "nr",
[ilog2(VM_HUGETLB)] = "ht",
-@@ -670,9 +708,18 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
+@@ -715,6 +752,12 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
.private = &mss,
};
@@ -88157,6 +111720,12 @@ index 09cd3ed..862cbb3 100644
+ }
+#endif
memset(&mss, 0, sizeof mss);
+
+ #ifdef CONFIG_SHMEM
+@@ -741,8 +784,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
+ }
+ #endif
+
- /* mmap_sem is held in m_start */
- walk_page_vma(vma, &smaps_walk);
+#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
@@ -88167,7 +111736,7 @@ index 09cd3ed..862cbb3 100644
show_map_vma(m, vma, is_pid);
-@@ -694,7 +741,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
+@@ -764,7 +810,11 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
"KernelPageSize: %8lu kB\n"
"MMUPageSize: %8lu kB\n"
"Locked: %8lu kB\n",
@@ -88179,7 +111748,7 @@ index 09cd3ed..862cbb3 100644
mss.resident >> 10,
(unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
mss.shared_clean >> 10,
-@@ -1518,6 +1569,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
+@@ -1588,6 +1638,13 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
char buffer[64];
int nid;
@@ -88193,7 +111762,7 @@ index 09cd3ed..862cbb3 100644
if (!mm)
return 0;
-@@ -1532,11 +1590,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
+@@ -1602,11 +1659,15 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
mpol_to_str(buffer, sizeof(buffer), proc_priv->task_mempolicy);
}
@@ -88209,9 +111778,9 @@ index 09cd3ed..862cbb3 100644
+ seq_file_path(m, file, "\n\t\\= ");
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
seq_puts(m, " heap");
- } else {
+ } else if (is_stack(proc_priv, vma, is_pid)) {
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index e0d64c9..c44c96e 100644
+index faacb0c..ce736cd 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -51,7 +51,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)
@@ -88223,15 +111792,24 @@ index e0d64c9..c44c96e 100644
sbytes += kobjsize(current->fs);
else
bytes += kobjsize(current->fs);
-@@ -180,7 +180,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
+@@ -142,7 +142,7 @@ static int is_stack(struct proc_maps_private *priv,
+ stack = vma_is_stack_for_task(vma, task);
+ rcu_read_unlock();
+ }
+- return stack;
++ return stack || (vma->vm_flags & (VM_GROWSDOWN | VM_GROWSUP));
+ }
+
+ /*
+@@ -183,7 +183,7 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
if (file) {
seq_pad(m, ' ');
- seq_file_path(m, file, "");
+ seq_file_path(m, file, "\n\\");
- } else if (mm) {
- pid_t tid = pid_of_stack(priv, vma, is_pid);
-
+ } else if (mm && is_stack(priv, vma, is_pid)) {
+ seq_pad(m, ' ');
+ seq_printf(m, "[stack]");
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 4e61388..1a2523d 100644
--- a/fs/proc/vmcore.c
@@ -88303,10 +111881,10 @@ index d3fb2b6..43a8140 100644
if (sbi->s_bytesex == BYTESEX_LE)
return le32_to_cpu((__force __le32)n);
diff --git a/fs/quota/netlink.c b/fs/quota/netlink.c
-index bb2869f..d34ada8 100644
+index d07a2f9..380906a 100644
--- a/fs/quota/netlink.c
+++ b/fs/quota/netlink.c
-@@ -44,7 +44,7 @@ static struct genl_family quota_genl_family = {
+@@ -42,7 +42,7 @@ static struct genl_family quota_genl_family = {
void quota_send_warning(struct kqid qid, dev_t dev,
const char warntype)
{
@@ -88315,7 +111893,7 @@ index bb2869f..d34ada8 100644
struct sk_buff *skb;
void *msg_head;
int ret;
-@@ -60,7 +60,7 @@ void quota_send_warning(struct kqid qid, dev_t dev,
+@@ -58,7 +58,7 @@ void quota_send_warning(struct kqid qid, dev_t dev,
"VFS: Not enough memory to send quota warning.\n");
return;
}
@@ -88325,10 +111903,20 @@ index bb2869f..d34ada8 100644
if (!msg_head) {
printk(KERN_ERR
diff --git a/fs/read_write.c b/fs/read_write.c
-index 819ef3f..f07222d 100644
+index dadf24e..f8ca660 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
-@@ -505,7 +505,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t
+@@ -23,7 +23,8 @@
+ #include <asm/uaccess.h>
+ #include <asm/unistd.h>
+
+-typedef ssize_t (*io_fn_t)(struct file *, char __user *, size_t, loff_t *);
++typedef ssize_t (*io_fnr_t)(struct file *, char __user *, size_t, loff_t *);
++typedef ssize_t (*io_fnw_t)(struct file *, const char __user *, size_t, loff_t *);
+ typedef ssize_t (*iter_fn_t)(struct kiocb *, struct iov_iter *);
+
+ const struct file_operations generic_ro_fops = {
+@@ -545,7 +546,7 @@ ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t
old_fs = get_fs();
set_fs(get_ds());
@@ -88337,8 +111925,97 @@ index 819ef3f..f07222d 100644
if (count > MAX_RW_COUNT)
count = MAX_RW_COUNT;
ret = __vfs_write(file, p, count, pos);
+@@ -709,7 +710,7 @@ static ssize_t do_iter_readv_writev(struct file *filp, struct iov_iter *iter,
+
+ /* Do it by hand, with file-ops */
+ static ssize_t do_loop_readv_writev(struct file *filp, struct iov_iter *iter,
+- loff_t *ppos, io_fn_t fn)
++ loff_t *ppos, io_fnr_t fnr, io_fnw_t fnw)
+ {
+ ssize_t ret = 0;
+
+@@ -717,7 +718,10 @@ static ssize_t do_loop_readv_writev(struct file *filp, struct iov_iter *iter,
+ struct iovec iovec = iov_iter_iovec(iter);
+ ssize_t nr;
+
+- nr = fn(filp, iovec.iov_base, iovec.iov_len, ppos);
++ if (fnr)
++ nr = fnr(filp, iovec.iov_base, iovec.iov_len, ppos);
++ else
++ nr = fnw(filp, iovec.iov_base, iovec.iov_len, ppos);
+
+ if (nr < 0) {
+ if (!ret)
+@@ -820,7 +824,8 @@ static ssize_t do_readv_writev(int type, struct file *file,
+ struct iovec *iov = iovstack;
+ struct iov_iter iter;
+ ssize_t ret;
+- io_fn_t fn;
++ io_fnr_t fnr;
++ io_fnw_t fnw;
+ iter_fn_t iter_fn;
+
+ ret = import_iovec(type, uvector, nr_segs,
+@@ -836,10 +841,12 @@ static ssize_t do_readv_writev(int type, struct file *file,
+ goto out;
+
+ if (type == READ) {
+- fn = file->f_op->read;
++ fnr = file->f_op->read;
++ fnw = NULL;
+ iter_fn = file->f_op->read_iter;
+ } else {
+- fn = (io_fn_t)file->f_op->write;
++ fnr = NULL;
++ fnw = file->f_op->write;
+ iter_fn = file->f_op->write_iter;
+ file_start_write(file);
+ }
+@@ -847,7 +854,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
+ if (iter_fn)
+ ret = do_iter_readv_writev(file, &iter, pos, iter_fn);
+ else
+- ret = do_loop_readv_writev(file, &iter, pos, fn);
++ ret = do_loop_readv_writev(file, &iter, pos, fnr, fnw);
+
+ if (type != READ)
+ file_end_write(file);
+@@ -994,7 +1001,8 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
+ struct iovec *iov = iovstack;
+ struct iov_iter iter;
+ ssize_t ret;
+- io_fn_t fn;
++ io_fnr_t fnr;
++ io_fnw_t fnw;
+ iter_fn_t iter_fn;
+
+ ret = compat_import_iovec(type, uvector, nr_segs,
+@@ -1010,10 +1018,12 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
+ goto out;
+
+ if (type == READ) {
+- fn = file->f_op->read;
++ fnr = file->f_op->read;
++ fnw = NULL;
+ iter_fn = file->f_op->read_iter;
+ } else {
+- fn = (io_fn_t)file->f_op->write;
++ fnr = NULL;
++ fnw = file->f_op->write;
+ iter_fn = file->f_op->write_iter;
+ file_start_write(file);
+ }
+@@ -1021,7 +1031,7 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
+ if (iter_fn)
+ ret = do_iter_readv_writev(file, &iter, pos, iter_fn);
+ else
+- ret = do_loop_readv_writev(file, &iter, pos, fn);
++ ret = do_loop_readv_writev(file, &iter, pos, fnr, fnw);
+
+ if (type != READ)
+ file_end_write(file);
diff --git a/fs/readdir.c b/fs/readdir.c
-index ced6791..e0500c1 100644
+index e69ef3b..ffb5456 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -18,6 +18,7 @@
@@ -88486,7 +112163,7 @@ index aca73dd..e3c558d 100644
#if ! (TYPE_STAT_DATA == 0 && TYPE_INDIRECT == 1 && TYPE_DIRECT == 2 && TYPE_DIRENTRY == 3)
diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
-index 621b9f3..af527fd 100644
+index fe99915..24fd9bd 100644
--- a/fs/reiserfs/procfs.c
+++ b/fs/reiserfs/procfs.c
@@ -114,7 +114,7 @@ static int show_super(struct seq_file *m, void *unused)
@@ -88521,10 +112198,10 @@ index 2adcde1..7d27bc8 100644
#define __fs_changed(gen,s) (gen != get_generation (s))
#define fs_changed(gen,s) \
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
-index 4a62fe8..5dc2f5f 100644
+index c0306ec..4083bee 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
-@@ -1870,6 +1870,10 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
+@@ -1871,6 +1871,10 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
sbi->s_mount_opt |= (1 << REISERFS_SMALLTAIL);
sbi->s_mount_opt |= (1 << REISERFS_ERROR_RO);
sbi->s_mount_opt |= (1 << REISERFS_BARRIER_FLUSH);
@@ -88536,7 +112213,7 @@ index 4a62fe8..5dc2f5f 100644
sbi->s_alloc_options.preallocmin = 0;
/* Preallocate by 16 blocks (17-1) at once */
diff --git a/fs/select.c b/fs/select.c
-index 0155473..da772c4 100644
+index 79d0d49..9203954 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -20,6 +20,7 @@
@@ -88659,7 +112336,7 @@ index e85664b..ad62e5f 100644
{
const struct seq_operations *op = ((struct seq_file *)file->private_data)->op;
diff --git a/fs/splice.c b/fs/splice.c
-index 0f77e96..9dce13e 100644
+index 19e0b10..288f7e0 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -195,7 +195,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
@@ -88692,7 +112369,7 @@ index 0f77e96..9dce13e 100644
}
pipe_unlock(pipe);
-@@ -582,7 +582,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
+@@ -580,7 +580,7 @@ static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -88701,7 +112378,7 @@ index 0f77e96..9dce13e 100644
set_fs(old_fs);
return res;
-@@ -597,7 +597,7 @@ ssize_t kernel_write(struct file *file, const char *buf, size_t count,
+@@ -595,7 +595,7 @@ ssize_t kernel_write(struct file *file, const char *buf, size_t count,
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -88710,7 +112387,7 @@ index 0f77e96..9dce13e 100644
set_fs(old_fs);
return res;
-@@ -650,7 +650,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
+@@ -648,7 +648,7 @@ ssize_t default_file_splice_read(struct file *in, loff_t *ppos,
goto err;
this_len = min_t(size_t, len, PAGE_CACHE_SIZE - offset);
@@ -88719,7 +112396,7 @@ index 0f77e96..9dce13e 100644
vec[i].iov_len = this_len;
spd.pages[i] = page;
spd.nr_pages++;
-@@ -789,7 +789,7 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des
+@@ -787,7 +787,7 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des
ops->release(pipe, buf);
pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1);
pipe->nrbufs--;
@@ -88728,7 +112405,7 @@ index 0f77e96..9dce13e 100644
sd->need_wakeup = true;
}
-@@ -820,10 +820,10 @@ static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_des
+@@ -818,10 +818,10 @@ static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_des
return -ERESTARTSYS;
while (!pipe->nrbufs) {
@@ -88741,7 +112418,7 @@ index 0f77e96..9dce13e 100644
return 0;
if (sd->flags & SPLICE_F_NONBLOCK)
-@@ -1039,7 +1039,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
+@@ -1037,7 +1037,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
ops->release(pipe, buf);
pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1);
pipe->nrbufs--;
@@ -88750,7 +112427,7 @@ index 0f77e96..9dce13e 100644
sd.need_wakeup = true;
} else {
buf->offset += ret;
-@@ -1199,7 +1199,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+@@ -1197,7 +1197,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
* out of the pipe right after the splice_to_pipe(). So set
* PIPE_READERS appropriately.
*/
@@ -88759,7 +112436,7 @@ index 0f77e96..9dce13e 100644
current->splice_pipe = pipe;
}
-@@ -1506,6 +1506,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
+@@ -1504,6 +1504,7 @@ static int get_iovec_page_array(const struct iovec __user *iov,
partial[buffers].offset = off;
partial[buffers].len = plen;
@@ -88767,7 +112444,7 @@ index 0f77e96..9dce13e 100644
off = 0;
len -= plen;
-@@ -1737,9 +1738,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+@@ -1735,9 +1736,9 @@ static int ipipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
ret = -ERESTARTSYS;
break;
}
@@ -88779,7 +112456,7 @@ index 0f77e96..9dce13e 100644
if (flags & SPLICE_F_NONBLOCK) {
ret = -EAGAIN;
break;
-@@ -1771,7 +1772,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+@@ -1769,7 +1770,7 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
pipe_lock(pipe);
while (pipe->nrbufs >= pipe->buffers) {
@@ -88788,7 +112465,7 @@ index 0f77e96..9dce13e 100644
send_sig(SIGPIPE, current, 0);
ret = -EPIPE;
break;
-@@ -1784,9 +1785,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
+@@ -1782,9 +1783,9 @@ static int opipe_prep(struct pipe_inode_info *pipe, unsigned int flags)
ret = -ERESTARTSYS;
break;
}
@@ -88800,7 +112477,7 @@ index 0f77e96..9dce13e 100644
}
pipe_unlock(pipe);
-@@ -1822,14 +1823,14 @@ retry:
+@@ -1820,14 +1821,14 @@ retry:
pipe_double_lock(ipipe, opipe);
do {
@@ -88817,7 +112494,7 @@ index 0f77e96..9dce13e 100644
break;
/*
-@@ -1926,7 +1927,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
+@@ -1924,7 +1925,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
pipe_double_lock(ipipe, opipe);
do {
@@ -88826,7 +112503,7 @@ index 0f77e96..9dce13e 100644
send_sig(SIGPIPE, current, 0);
if (!ret)
ret = -EPIPE;
-@@ -1971,7 +1972,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
+@@ -1969,7 +1970,7 @@ static int link_pipe(struct pipe_inode_info *ipipe,
* return EAGAIN if we have the potential of some data in the
* future, otherwise just return 0
*/
@@ -88836,7 +112513,7 @@ index 0f77e96..9dce13e 100644
pipe_unlock(ipipe);
diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c
-index 6a4cc34..acc9eef 100644
+index 1e9de96..a77cc8c 100644
--- a/fs/squashfs/xattr.c
+++ b/fs/squashfs/xattr.c
@@ -46,8 +46,8 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
@@ -88850,21 +112527,16 @@ index 6a4cc34..acc9eef 100644
/* check that the file system has xattrs */
if (msblk->xattr_id_table == NULL)
-@@ -68,11 +68,11 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
- name_size = le16_to_cpu(entry.size);
- handler = squashfs_xattr_handler(le16_to_cpu(entry.type));
- if (handler)
-- prefix_size = handler->list(handler, d, buffer, rest,
-+ prefix_size = handler->list(handler, d, buffer, buffer ? buffer_size - used : 0,
- NULL, name_size);
- if (prefix_size) {
+@@ -72,7 +72,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
+ size_t prefix_size = strlen(prefix);
+
if (buffer) {
- if (prefix_size + name_size + 1 > rest) {
+ if (prefix_size + name_size + 1 > buffer_size - used) {
err = -ERANGE;
goto failed;
}
-@@ -86,7 +86,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
+@@ -87,7 +87,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
buffer[name_size] = '\0';
buffer += name_size + 1;
}
@@ -88873,7 +112545,7 @@ index 6a4cc34..acc9eef 100644
} else {
/* no handler or insuffficient privileges, so skip */
err = squashfs_read_metadata(sb, NULL, &start,
-@@ -107,7 +107,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
+@@ -108,7 +108,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
if (err < 0)
goto failed;
}
@@ -88883,7 +112555,7 @@ index 6a4cc34..acc9eef 100644
failed:
return err;
diff --git a/fs/stat.c b/fs/stat.c
-index d4a61d8..87dbeb3 100644
+index bc045c7..68725c1 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -28,8 +28,13 @@ void generic_fillattr(struct inode *inode, struct kstat *stat)
@@ -88922,7 +112594,7 @@ index d4a61d8..87dbeb3 100644
generic_fillattr(inode, stat);
return 0;
diff --git a/fs/super.c b/fs/super.c
-index f5f4b32..f6bedd2 100644
+index 74914b1..c570339 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -348,7 +348,8 @@ EXPORT_SYMBOL(deactivate_super);
@@ -89009,7 +112681,7 @@ index 6c21228..9afd5fe 100644
if (sbi->s_bytesex == BYTESEX_PDP)
return PDP_swab((__force __u32)n);
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
-index c66f242..2e8701a 100644
+index 4a0e48f..ca5b016 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -53,7 +53,7 @@ static const struct file_operations tracefs_file_operations = {
@@ -89034,6 +112706,150 @@ index c66f242..2e8701a 100644
return dentry;
}
+diff --git a/fs/ubifs/find.c b/fs/ubifs/find.c
+index 2dcf3d4..fa1e496 100644
+--- a/fs/ubifs/find.c
++++ b/fs/ubifs/find.c
+@@ -94,8 +94,9 @@ static int valuable(struct ubifs_info *c, const struct ubifs_lprops *lprops)
+ */
+ static int scan_for_dirty_cb(struct ubifs_info *c,
+ const struct ubifs_lprops *lprops, int in_tree,
+- struct scan_data *data)
++ void *_data)
+ {
++ struct scan_data *data = _data;
+ int ret = LPT_SCAN_CONTINUE;
+
+ /* Exclude LEBs that are currently in use */
+@@ -179,7 +180,7 @@ static const struct ubifs_lprops *scan_for_dirty(struct ubifs_info *c,
+ data.lnum = -1;
+ data.exclude_index = exclude_index;
+ err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
+- (ubifs_lpt_scan_callback)scan_for_dirty_cb,
++ scan_for_dirty_cb,
+ &data);
+ if (err)
+ return ERR_PTR(err);
+@@ -361,8 +362,9 @@ out:
+ */
+ static int scan_for_free_cb(struct ubifs_info *c,
+ const struct ubifs_lprops *lprops, int in_tree,
+- struct scan_data *data)
++ void *_data)
+ {
++ struct scan_data *data = _data;
+ int ret = LPT_SCAN_CONTINUE;
+
+ /* Exclude LEBs that are currently in use */
+@@ -458,7 +460,7 @@ const struct ubifs_lprops *do_find_free_space(struct ubifs_info *c,
+ data.pick_free = pick_free;
+ data.lnum = -1;
+ err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
+- (ubifs_lpt_scan_callback)scan_for_free_cb,
++ scan_for_free_cb,
+ &data);
+ if (err)
+ return ERR_PTR(err);
+@@ -601,8 +603,9 @@ out:
+ */
+ static int scan_for_idx_cb(struct ubifs_info *c,
+ const struct ubifs_lprops *lprops, int in_tree,
+- struct scan_data *data)
++ void *_data)
+ {
++ struct scan_data *data = _data;
+ int ret = LPT_SCAN_CONTINUE;
+
+ /* Exclude LEBs that are currently in use */
+@@ -638,7 +641,7 @@ static const struct ubifs_lprops *scan_for_leb_for_idx(struct ubifs_info *c)
+
+ data.lnum = -1;
+ err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
+- (ubifs_lpt_scan_callback)scan_for_idx_cb,
++ scan_for_idx_cb,
+ &data);
+ if (err)
+ return ERR_PTR(err);
+@@ -738,18 +741,21 @@ out:
+ return err;
+ }
+
+-static int cmp_dirty_idx(const struct ubifs_lprops **a,
+- const struct ubifs_lprops **b)
++static int cmp_dirty_idx(const void *_a,
++ const void *_b)
+ {
++ const struct ubifs_lprops **a = (const struct ubifs_lprops **)_a;
++ const struct ubifs_lprops **b = (const struct ubifs_lprops **)_b;
+ const struct ubifs_lprops *lpa = *a;
+ const struct ubifs_lprops *lpb = *b;
+
+ return lpa->dirty + lpa->free - lpb->dirty - lpb->free;
+ }
+
+-static void swap_dirty_idx(struct ubifs_lprops **a, struct ubifs_lprops **b,
+- int size)
++static void swap_dirty_idx(void *_a, void *_b, int size)
+ {
++ struct ubifs_lprops **a = (struct ubifs_lprops **)_a;
++ struct ubifs_lprops **b = (struct ubifs_lprops **)_b;
+ struct ubifs_lprops *t = *a;
+
+ *a = *b;
+@@ -775,8 +781,7 @@ int ubifs_save_dirty_idx_lnums(struct ubifs_info *c)
+ sizeof(void *) * c->dirty_idx.cnt);
+ /* Sort it so that the dirtiest is now at the end */
+ sort(c->dirty_idx.arr, c->dirty_idx.cnt, sizeof(void *),
+- (int (*)(const void *, const void *))cmp_dirty_idx,
+- (void (*)(void *, void *, int))swap_dirty_idx);
++ cmp_dirty_idx, swap_dirty_idx);
+ dbg_find("found %d dirty index LEBs", c->dirty_idx.cnt);
+ if (c->dirty_idx.cnt)
+ dbg_find("dirtiest index LEB is %d with dirty %d and free %d",
+@@ -804,8 +809,9 @@ int ubifs_save_dirty_idx_lnums(struct ubifs_info *c)
+ */
+ static int scan_dirty_idx_cb(struct ubifs_info *c,
+ const struct ubifs_lprops *lprops, int in_tree,
+- struct scan_data *data)
++ void *_data)
+ {
++ struct scan_data *data = _data;
+ int ret = LPT_SCAN_CONTINUE;
+
+ /* Exclude LEBs that are currently in use */
+@@ -865,7 +871,7 @@ static int find_dirty_idx_leb(struct ubifs_info *c)
+ /* All pnodes are in memory, so skip scan */
+ return -ENOSPC;
+ err = ubifs_lpt_scan_nolock(c, -1, c->lscan_lnum,
+- (ubifs_lpt_scan_callback)scan_dirty_idx_cb,
++ scan_dirty_idx_cb,
+ &data);
+ if (err)
+ return err;
+diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
+index a0011aa..c8cf709 100644
+--- a/fs/ubifs/lprops.c
++++ b/fs/ubifs/lprops.c
+@@ -1028,8 +1028,9 @@ out:
+ */
+ static int scan_check_cb(struct ubifs_info *c,
+ const struct ubifs_lprops *lp, int in_tree,
+- struct ubifs_lp_stats *lst)
++ void *_lst)
+ {
++ struct ubifs_lp_stats *lst = _lst;
+ struct ubifs_scan_leb *sleb;
+ struct ubifs_scan_node *snod;
+ int cat, lnum = lp->lnum, is_idx = 0, used = 0, free, dirty, ret;
+@@ -1283,7 +1284,7 @@ int dbg_check_lprops(struct ubifs_info *c)
+
+ memset(&lst, 0, sizeof(struct ubifs_lp_stats));
+ err = ubifs_lpt_scan_nolock(c, c->main_first, c->leb_cnt - 1,
+- (ubifs_lpt_scan_callback)scan_check_cb,
++ scan_check_cb,
+ &lst);
+ if (err && err != -ENOSPC)
+ goto out;
diff --git a/fs/udf/misc.c b/fs/udf/misc.c
index 71d1c25..084e2ad 100644
--- a/fs/udf/misc.c
@@ -89083,7 +112899,7 @@ index 66cdb44..2eb05e1 100644
/*
* Flush page faults out of all CPUs. NOTE: all page faults
diff --git a/fs/utimes.c b/fs/utimes.c
-index aa138d6..5f3a811 100644
+index 85c40f4..52fcd23 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -1,6 +1,7 @@
@@ -89104,15 +112920,15 @@ index aa138d6..5f3a811 100644
+ goto mnt_drop_write_and_out;
+ }
+
- mutex_lock(&inode->i_mutex);
+ inode_lock(inode);
error = notify_change(path->dentry, &newattrs, &delegated_inode);
- mutex_unlock(&inode->i_mutex);
+ inode_unlock(inode);
diff --git a/fs/xattr.c b/fs/xattr.c
-index 9b932b9..31cdeb7 100644
+index 4861322..205ea1d 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
-@@ -227,6 +227,27 @@ int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
- return rc;
+@@ -208,6 +208,27 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
+ return error;
}
+#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
@@ -89139,7 +112955,7 @@ index 9b932b9..31cdeb7 100644
ssize_t
vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
{
-@@ -319,7 +340,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
+@@ -300,7 +321,7 @@ EXPORT_SYMBOL_GPL(vfs_removexattr);
* Extended attribute SET operations
*/
static long
@@ -89148,7 +112964,7 @@ index 9b932b9..31cdeb7 100644
size_t size, int flags)
{
int error;
-@@ -355,7 +376,12 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
+@@ -334,7 +355,12 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
posix_acl_fix_xattr_from_user(kvalue, size);
}
@@ -89160,9 +112976,9 @@ index 9b932b9..31cdeb7 100644
+
+ error = vfs_setxattr(path->dentry, kname, kvalue, size, flags);
out:
- if (vvalue)
- vfree(vvalue);
-@@ -376,7 +402,7 @@ retry:
+ kvfree(kvalue);
+
+@@ -353,7 +379,7 @@ retry:
return error;
error = mnt_want_write(path.mnt);
if (!error) {
@@ -89171,7 +112987,7 @@ index 9b932b9..31cdeb7 100644
mnt_drop_write(path.mnt);
}
path_put(&path);
-@@ -412,7 +438,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
+@@ -389,7 +415,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
audit_file(f.file);
error = mnt_want_write_file(f.file);
if (!error) {
@@ -89180,7 +112996,7 @@ index 9b932b9..31cdeb7 100644
mnt_drop_write_file(f.file);
}
fdput(f);
-@@ -598,7 +624,7 @@ SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
+@@ -569,7 +595,7 @@ SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
* Extended attribute REMOVE operations
*/
static long
@@ -89189,7 +113005,7 @@ index 9b932b9..31cdeb7 100644
{
int error;
char kname[XATTR_NAME_MAX + 1];
-@@ -609,7 +635,10 @@ removexattr(struct dentry *d, const char __user *name)
+@@ -580,7 +606,10 @@ removexattr(struct dentry *d, const char __user *name)
if (error < 0)
return error;
@@ -89201,7 +113017,7 @@ index 9b932b9..31cdeb7 100644
}
static int path_removexattr(const char __user *pathname,
-@@ -623,7 +652,7 @@ retry:
+@@ -594,7 +623,7 @@ retry:
return error;
error = mnt_want_write(path.mnt);
if (!error) {
@@ -89210,7 +113026,7 @@ index 9b932b9..31cdeb7 100644
mnt_drop_write(path.mnt);
}
path_put(&path);
-@@ -649,14 +678,16 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
+@@ -620,14 +649,16 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)
{
struct fd f = fdget(fd);
@@ -89229,10 +113045,10 @@ index 9b932b9..31cdeb7 100644
}
fdput(f);
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
-index 119c242..a02e8da 100644
+index ef00156..931d812 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
-@@ -554,7 +554,7 @@ xfs_bmap_validate_ret(
+@@ -560,7 +560,7 @@ xfs_bmap_validate_ret(
#else
#define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0)
@@ -89242,10 +113058,10 @@ index 119c242..a02e8da 100644
/*
diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
-index e89a0f8f..3165b4a 100644
+index 097bf77..ffe3cb3 100644
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
-@@ -2011,6 +2011,7 @@ xfs_da_grow_inode_int(
+@@ -2012,6 +2012,7 @@ xfs_da_grow_inode_int(
struct xfs_inode *dp = args->dp;
int w = args->whichfork;
xfs_rfsblock_t nblks = dp->i_d.di_nblocks;
@@ -89253,7 +113069,7 @@ index e89a0f8f..3165b4a 100644
struct xfs_bmbt_irec map, *mapp;
int nmap, error, got, i, mapi;
-@@ -2079,7 +2080,8 @@ xfs_da_grow_inode_int(
+@@ -2080,7 +2081,8 @@ xfs_da_grow_inode_int(
}
/* account for newly allocated blocks in reserved blocks total */
@@ -89282,7 +113098,7 @@ index 642d55d..d8ccf82 100644
return 0;
sfep = dp->d_ops->sf_nextentry(sfp, sfep);
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
-index d42738d..7175979 100644
+index 478d04e..3d6a86b 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -121,7 +121,7 @@ xfs_find_handle(
@@ -94930,10 +118746,10 @@ index 0000000..25f54ef
+};
diff --git a/grsecurity/gracl_policy.c b/grsecurity/gracl_policy.c
new file mode 100644
-index 0000000..0773423
+index 0000000..302bda8
--- /dev/null
+++ b/grsecurity/gracl_policy.c
-@@ -0,0 +1,1786 @@
+@@ -0,0 +1,1784 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
@@ -95001,11 +118817,10 @@ index 0000000..0773423
+
+extern int gr_init_uidset(void);
+extern void gr_free_uidset(void);
-+extern void gr_remove_uid(uid_t uid);
-+extern int gr_find_uid(uid_t uid);
++extern int gr_find_and_remove_uid(uid_t uid);
+
+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);
-+extern void __gr_apply_subject_to_task(struct gr_policy_state *state, struct task_struct *task, struct acl_subject_label *subj);
++extern void __gr_apply_subject_to_task(const struct gr_policy_state *state, struct task_struct *task, struct acl_subject_label *subj);
+extern int gr_streq(const char *a, const char *b, const unsigned int lena, const unsigned int lenb);
+extern void __insert_inodev_entry(const struct gr_policy_state *state, struct inodev_entry *entry);
+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);
@@ -96572,9 +120387,8 @@ index 0000000..0773423
+ segvacl->crashes = 0;
+ segvacl->expires = 0;
+ }
-+ } else if (gr_find_uid(gr_usermode->segv_uid) >= 0) {
-+ gr_remove_uid(gr_usermode->segv_uid);
-+ }
++ } else
++ gr_find_and_remove_uid(gr_usermode->segv_uid);
+ } else {
+ gr_log_noargs(GR_DONT_AUDIT, GR_SEGVMODF_ACL_MSG);
+ error = -EPERM;
@@ -96796,10 +120610,10 @@ index 0000000..39645c9
+}
diff --git a/grsecurity/gracl_segv.c b/grsecurity/gracl_segv.c
new file mode 100644
-index 0000000..9c6684d
+index 0000000..10f1617
--- /dev/null
+++ b/grsecurity/gracl_segv.c
-@@ -0,0 +1,291 @@
+@@ -0,0 +1,304 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <asm/uaccess.h>
@@ -96831,7 +120645,7 @@ index 0000000..9c6684d
+extern rwlock_t gr_inode_lock;
+extern struct acl_subject_label *
+ lookup_acl_subj_label(const u64 inode, const dev_t dev,
-+ struct acl_role_label *role);
++ const struct acl_role_label *role);
+
+int
+gr_init_uidset(void)
@@ -96938,6 +120752,19 @@ index 0000000..9c6684d
+ return;
+}
+
++int gr_find_and_remove_uid(uid_t uid)
++{
++ int loc;
++
++ spin_lock(&gr_uid_lock);
++ loc = gr_find_uid(uid);
++ if (loc >= 0)
++ gr_remove_uid(loc);
++ spin_unlock(&gr_uid_lock);
++
++ return loc >= 0 ? 1 : 0;
++}
++
+int
+gr_check_crash_uid(const kuid_t kuid)
+{
@@ -97676,7 +121503,7 @@ index 0000000..1964ab1c
+}
diff --git a/grsecurity/grsec_disabled.c b/grsecurity/grsec_disabled.c
new file mode 100644
-index 0000000..e723c08
+index 0000000..0589fe2
--- /dev/null
+++ b/grsecurity/grsec_disabled.c
@@ -0,0 +1,445 @@
@@ -98078,13 +121905,13 @@ index 0000000..e723c08
+}
+
+int
-+gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb)
++gr_search_udp_recvmsg(struct sock *sk, const struct sk_buff *skb)
+{
+ return 0;
+}
+
+int
-+gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr)
++gr_search_udp_sendmsg(struct sock *sk, struct sockaddr_in *addr)
+{
+ return 0;
+}
@@ -99645,7 +123472,7 @@ index 0000000..a2b8b8f
+}
diff --git a/grsecurity/grsec_sock.c b/grsecurity/grsec_sock.c
new file mode 100644
-index 0000000..a523bd2
+index 0000000..3cdd946
--- /dev/null
+++ b/grsecurity/grsec_sock.c
@@ -0,0 +1,244 @@
@@ -99662,8 +123489,8 @@ index 0000000..a523bd2
+#include <linux/grinternal.h>
+#include <linux/gracl.h>
+
-+extern int gr_search_udp_recvmsg(const struct sock *sk, const struct sk_buff *skb);
-+extern int gr_search_udp_sendmsg(const struct sock *sk, const struct sockaddr_in *addr);
++extern int gr_search_udp_recvmsg(struct sock *sk, const struct sk_buff *skb);
++extern int gr_search_udp_sendmsg(struct sock *sk, struct sockaddr_in *addr);
+
+EXPORT_SYMBOL_GPL(gr_search_udp_recvmsg);
+EXPORT_SYMBOL_GPL(gr_search_udp_sendmsg);
@@ -101150,10 +124977,10 @@ index 810431d..0ec4804f 100644
* (puds are folded into pgds so this doesn't get actually called,
* but the define is needed for a generic inline function.)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
-index 14b0ff32..f3993a4 100644
+index c370b26..24a0dae 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
-@@ -748,6 +748,22 @@ static inline int pmd_protnone(pmd_t pmd)
+@@ -757,6 +757,22 @@ static inline int pmd_protnone(pmd_t pmd)
}
#endif /* CONFIG_NUMA_BALANCING */
@@ -101177,10 +125004,10 @@ index 14b0ff32..f3993a4 100644
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
-index b58fd66..6cfae67 100644
+index af0254c..a4e4da3 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
-@@ -30,6 +30,7 @@ extern char _data[], _sdata[], _edata[];
+@@ -31,6 +31,7 @@ extern char _data[], _sdata[], _edata[];
extern char __bss_start[], __bss_stop[];
extern char __init_begin[], __init_end[];
extern char _sinittext[], _einittext[];
@@ -101293,8 +125120,49 @@ index c9fe145..9fb2337 100644
struct crypto_instance {
struct crypto_alg alg;
+diff --git a/include/crypto/cast6.h b/include/crypto/cast6.h
+index 32b60eb..1a592df 100644
+--- a/include/crypto/cast6.h
++++ b/include/crypto/cast6.h
+@@ -18,7 +18,7 @@ int __cast6_setkey(struct cast6_ctx *ctx, const u8 *key,
+ unsigned int keylen, u32 *flags);
+ int cast6_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
+
+-void __cast6_encrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
+-void __cast6_decrypt(struct cast6_ctx *ctx, u8 *dst, const u8 *src);
++void __cast6_encrypt(void *ctx, u8 *dst, const u8 *src);
++void __cast6_decrypt(void *ctx, u8 *dst, const u8 *src);
+
+ #endif
+diff --git a/include/crypto/serpent.h b/include/crypto/serpent.h
+index b7e0941..1a1f67f 100644
+--- a/include/crypto/serpent.h
++++ b/include/crypto/serpent.h
+@@ -21,7 +21,7 @@ int __serpent_setkey(struct serpent_ctx *ctx, const u8 *key,
+ unsigned int keylen);
+ int serpent_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen);
+
+-void __serpent_encrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src);
+-void __serpent_decrypt(struct serpent_ctx *ctx, u8 *dst, const u8 *src);
++void __serpent_encrypt(void *ctx, u8 *dst, const u8 *src);
++void __serpent_decrypt(void *ctx, u8 *dst, const u8 *src);
+
+ #endif
+diff --git a/include/crypto/xts.h b/include/crypto/xts.h
+index 72c09eb..c5c3a06 100644
+--- a/include/crypto/xts.h
++++ b/include/crypto/xts.h
+@@ -18,7 +18,7 @@ struct xts_crypt_req {
+ void (*crypt_fn)(void *ctx, u8 *blks, unsigned int nbytes);
+ };
+
+-#define XTS_TWEAK_CAST(x) ((void (*)(void *, u8*, const u8*))(x))
++#define XTS_TWEAK_CAST(x) (x)
+
+ int xts_crypt(struct blkcipher_desc *desc, struct scatterlist *dst,
+ struct scatterlist *src, unsigned int nbytes,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index 0a271ca..0e14d3d 100644
+index d7162cf..709bbda 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -59,6 +59,7 @@
@@ -101332,7 +125200,7 @@ index 0a271ca..0e14d3d 100644
/**
* Creates a driver or general drm_ioctl_desc array entry for the given
-@@ -645,7 +648,8 @@ struct drm_driver {
+@@ -654,7 +657,8 @@ struct drm_driver {
/* List of devices hanging off this driver with stealth attach. */
struct list_head legacy_dev_list;
@@ -101342,7 +125210,7 @@ index 0a271ca..0e14d3d 100644
enum drm_minor_type {
DRM_MINOR_LEGACY,
-@@ -663,7 +667,8 @@ struct drm_info_list {
+@@ -672,7 +676,8 @@ struct drm_info_list {
int (*show)(struct seq_file*, void*); /** show callback */
u32 driver_features; /**< Required driver features for this entry */
void *data;
@@ -101352,7 +125220,7 @@ index 0a271ca..0e14d3d 100644
/**
* debugfs node structure. This structure represents a debugfs file.
-@@ -752,7 +757,7 @@ struct drm_device {
+@@ -761,7 +766,7 @@ struct drm_device {
/** \name Usage Counters */
/*@{ */
@@ -101361,24 +125229,11 @@ index 0a271ca..0e14d3d 100644
spinlock_t buf_lock; /**< For drm_device::buf_use and a few other things. */
int buf_use; /**< Buffers in use -- cannot alloc */
atomic_t buf_alloc; /**< Buffer allocation in progress */
-diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
-index 3febb4b..afc5199 100644
---- a/include/drm/drm_crtc_helper.h
-+++ b/include/drm/drm_crtc_helper.h
-@@ -163,7 +163,7 @@ struct drm_encoder_helper_funcs {
- int (*atomic_check)(struct drm_encoder *encoder,
- struct drm_crtc_state *crtc_state,
- struct drm_connector_state *conn_state);
--};
-+} __no_const;
-
- /**
- * struct drm_connector_helper_funcs - helper operations for connectors
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
-index 0de6290..2a2c125 100644
+index fc65118..7d80068 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
-@@ -297,7 +297,7 @@ void drm_mm_remove_node(struct drm_mm_node *node);
+@@ -291,7 +291,7 @@ void drm_mm_remove_node(struct drm_mm_node *node);
void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new);
void drm_mm_init(struct drm_mm *mm,
u64 start,
@@ -101387,8 +125242,21 @@ index 0de6290..2a2c125 100644
void drm_mm_takedown(struct drm_mm *mm);
bool drm_mm_clean(struct drm_mm *mm);
+diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
+index a126a0d..8ad2332 100644
+--- a/include/drm/drm_modeset_helper_vtables.h
++++ b/include/drm/drm_modeset_helper_vtables.h
+@@ -638,7 +638,7 @@ struct drm_encoder_helper_funcs {
+ int (*atomic_check)(struct drm_encoder *encoder,
+ struct drm_crtc_state *crtc_state,
+ struct drm_connector_state *conn_state);
+-};
++} __no_const;
+
+ /**
+ * drm_encoder_helper_add - sets the helper vtable for an encoder
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
-index 17c4456..da0c5eb 100644
+index f970209..77a4901 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -37,7 +37,7 @@
@@ -101453,6 +125321,45 @@ index 4915d40..8b913c0 100644
/**
* asymmetric_key_subtype - Get the subtype from an asymmetric key
+diff --git a/include/keys/encrypted-type.h b/include/keys/encrypted-type.h
+index 1d45413..377bc27 100644
+--- a/include/keys/encrypted-type.h
++++ b/include/keys/encrypted-type.h
+@@ -15,7 +15,7 @@
+ #ifndef _KEYS_ENCRYPTED_TYPE_H
+ #define _KEYS_ENCRYPTED_TYPE_H
+
+-#include <linux/key.h>
++#include <linux/key-type.h>
+ #include <linux/rcupdate.h>
+
+ struct encrypted_key_payload {
+diff --git a/include/keys/rxrpc-type.h b/include/keys/rxrpc-type.h
+index fc48754..ea15d5c 100644
+--- a/include/keys/rxrpc-type.h
++++ b/include/keys/rxrpc-type.h
+@@ -12,7 +12,7 @@
+ #ifndef _KEYS_RXRPC_TYPE_H
+ #define _KEYS_RXRPC_TYPE_H
+
+-#include <linux/key.h>
++#include <linux/key-type.h>
+
+ /*
+ * key type for AF_RXRPC keys
+diff --git a/include/keys/user-type.h b/include/keys/user-type.h
+index c56fef4..c9ebdc7 100644
+--- a/include/keys/user-type.h
++++ b/include/keys/user-type.h
+@@ -12,7 +12,7 @@
+ #ifndef _KEYS_USER_TYPE_H
+ #define _KEYS_USER_TYPE_H
+
+-#include <linux/key.h>
++#include <linux/key-type.h>
+ #include <linux/rcupdate.h>
+
+ #ifdef CONFIG_KEYS
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index c1da539..1dcec55 100644
--- a/include/linux/atmdev.h
@@ -101513,10 +125420,10 @@ index 301de78..f5f8e42 100644
return __atomic_add_unless(v, a, u) != u;
}
diff --git a/include/linux/audit.h b/include/linux/audit.h
-index 20eba1e..40b479d 100644
+index b40ed5d..16411f5 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
-@@ -227,7 +227,7 @@ static inline void audit_ptrace(struct task_struct *t)
+@@ -331,7 +331,7 @@ static inline void audit_ptrace(struct task_struct *t)
extern unsigned int audit_serial(void);
extern int auditsc_get_stamp(struct audit_context *ctx,
struct timespec *t, unsigned int *serial);
@@ -101712,10 +125619,10 @@ index c02e669..439bd4b 100644
}
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
-index 1687557..3a013dd 100644
+index 413c84f..f526678 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
-@@ -1647,7 +1647,7 @@ struct block_device_operations {
+@@ -1666,7 +1666,7 @@ struct block_device_operations {
void (*swap_slot_free_notify) (struct block_device *, unsigned long);
struct module *owner;
const struct pr_ops *pr_ops;
@@ -101757,10 +125664,10 @@ index 17e7e82..1d7da26 100644
#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
#endif
diff --git a/include/linux/capability.h b/include/linux/capability.h
-index af9f0b9..71a5e5c 100644
+index f314275..96c8185 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
-@@ -237,15 +237,28 @@ static inline bool capable(int cap)
+@@ -231,15 +231,28 @@ static inline bool capable(int cap)
{
return true;
}
@@ -101802,10 +125709,10 @@ index 8609d57..86e4d79 100644
int (*generic_packet) (struct cdrom_device_info *,
struct packet_command *);
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
-index a7c7f74..0f1870f 100644
+index 89d944b..1d98ada 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
-@@ -416,7 +416,7 @@ struct cftype {
+@@ -424,7 +424,7 @@ struct cftype {
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lock_class_key lockdep_key;
#endif
@@ -101815,7 +125722,7 @@ index a7c7f74..0f1870f 100644
/*
* Control Group subsystem type.
diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h
-index bda5ec0b4..51d8ea1 100644
+index fccf7f4..1d5925e 100644
--- a/include/linux/cleancache.h
+++ b/include/linux/cleancache.h
@@ -35,7 +35,7 @@ struct cleancache_ops {
@@ -101825,13 +125732,13 @@ index bda5ec0b4..51d8ea1 100644
-};
+} __no_const;
- extern int cleancache_register_ops(struct cleancache_ops *ops);
+ extern int cleancache_register_ops(const struct cleancache_ops *ops);
extern void __cleancache_init_fs(struct super_block *);
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
-index c56988a..ea6c518 100644
+index 1143e38..3a0056a 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
-@@ -214,6 +214,7 @@ struct clk_ops {
+@@ -215,6 +215,7 @@ struct clk_ops {
void (*init)(struct clk_hw *hw);
int (*debug_init)(struct clk_hw *hw, struct dentry *dentry);
};
@@ -101840,10 +125747,30 @@ index c56988a..ea6c518 100644
/**
* struct clk_init_data - holds init data that's common to all clocks and is
diff --git a/include/linux/compat.h b/include/linux/compat.h
-index a76c917..63b52db 100644
+index a76c917..75d6aeb 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
-@@ -316,7 +316,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
+@@ -45,14 +45,15 @@
+ COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
+
+ #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
+- asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
+- __attribute__((alias(__stringify(compat_SyS##name)))); \
+ static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
+- asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__));\
+- asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
++ static inline asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
+ { \
+ return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \
+ } \
++ asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
++ { \
++ return compat_SyS##name(__MAP(x,__SC_ARGS,__VA_ARGS__));\
++ } \
+ static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
+
+ #ifndef compat_user_stack_pointer
+@@ -316,7 +317,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
compat_size_t __user *len_ptr);
asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32);
@@ -101852,7 +125779,7 @@ index a76c917..63b52db 100644
asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg);
asmlinkage long compat_sys_msgsnd(int msqid, compat_uptr_t msgp,
compat_ssize_t msgsz, int msgflg);
-@@ -325,7 +325,7 @@ asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp,
+@@ -325,7 +326,7 @@ asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp,
long compat_sys_msgctl(int first, int second, void __user *uptr);
long compat_sys_shmctl(int first, int second, void __user *uptr);
long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
@@ -101861,7 +125788,7 @@ index a76c917..63b52db 100644
asmlinkage long compat_sys_keyctl(u32 option,
u32 arg2, u32 arg3, u32 arg4, u32 arg5);
asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
-@@ -439,7 +439,7 @@ extern int compat_ptrace_request(struct task_struct *child,
+@@ -439,7 +440,7 @@ extern int compat_ptrace_request(struct task_struct *child,
extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
compat_ulong_t addr, compat_ulong_t data);
asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
@@ -101871,20 +125798,22 @@ index a76c917..63b52db 100644
asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t);
/*
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
-index eeae401..4bf36c1 100644
+index eeae401..a2a9f48 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
-@@ -116,8 +116,8 @@
+@@ -116,9 +116,9 @@
*/
#define __pure __attribute__((pure))
#define __aligned(x) __attribute__((aligned(x)))
-#define __printf(a, b) __attribute__((format(printf, a, b)))
-#define __scanf(a, b) __attribute__((format(scanf, a, b)))
+-#define __attribute_const__ __attribute__((__const__))
+#define __printf(a, b) __attribute__((format(printf, a, b))) __nocapture(a, b)
+#define __scanf(a, b) __attribute__((format(scanf, a, b))) __nocapture(a, b)
- #define __attribute_const__ __attribute__((__const__))
++#define __attribute_const__ __attribute__((const))
#define __maybe_unused __attribute__((unused))
#define __always_unused __attribute__((unused))
+
@@ -184,9 +184,38 @@
# define __compiletime_warning(message) __attribute__((warning(message)))
# define __compiletime_error(message) __attribute__((error(message)))
@@ -101925,7 +125854,7 @@ index eeae401..4bf36c1 100644
* Mark a position in code as unreachable. This can be used to
* suppress control flow warnings after asm blocks that transfer
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
-index 6fc9a6d..8ad4c2b 100644
+index 48f5aab..2d1c52f 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -5,11 +5,14 @@
@@ -102146,8 +126075,8 @@ index 6fc9a6d..8ad4c2b 100644
+ __val; \
})
- #endif /* __KERNEL__ */
-@@ -399,6 +415,38 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
+ /**
+@@ -416,6 +432,38 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
# define __attribute_const__ /* unimplemented */
#endif
@@ -102186,7 +126115,7 @@ index 6fc9a6d..8ad4c2b 100644
/*
* Tell gcc if a function is cold. The compiler will assume any path
* directly leading to the call is unlikely.
-@@ -408,6 +456,22 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
+@@ -425,6 +473,22 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
#define __cold
#endif
@@ -102209,7 +126138,7 @@ index 6fc9a6d..8ad4c2b 100644
/* Simple shorthand for a section definition */
#ifndef __section
# define __section(S) __attribute__ ((__section__(#S)))
-@@ -430,6 +494,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
+@@ -447,6 +511,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
#endif
@@ -102218,7 +126147,7 @@ index 6fc9a6d..8ad4c2b 100644
/* Is this type a native word size -- useful for atomic operations */
#ifndef __native_word
# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
-@@ -509,8 +575,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
+@@ -526,8 +592,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
*/
#define __ACCESS_ONCE(x) ({ \
__maybe_unused typeof(x) __var = (__force typeof(x)) 0; \
@@ -102230,10 +126159,10 @@ index 6fc9a6d..8ad4c2b 100644
/**
* lockless_dereference() - safely load a pointer for later dereference
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
-index 758a029..77c9e59 100644
+index f8165c1..4a757b2 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
-@@ -127,7 +127,7 @@ struct configfs_attribute {
+@@ -129,7 +129,7 @@ struct configfs_attribute {
umode_t ca_mode;
ssize_t (*show)(struct config_item *, char *);
ssize_t (*store)(struct config_item *, const char *, size_t);
@@ -102243,19 +126172,25 @@ index 758a029..77c9e59 100644
#define CONFIGFS_ATTR(_pfx, _name) \
static struct configfs_attribute _pfx##attr_##_name = { \
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
-index 177c768..663bdfb 100644
+index 88a4215..3ef686f 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
-@@ -210,6 +210,7 @@ struct global_attr {
- ssize_t (*store)(struct kobject *a, struct attribute *b,
+@@ -206,10 +206,11 @@ __ATTR(_name, 0644, show_##_name, store_##_name)
+ struct global_attr {
+ struct attribute attr;
+ ssize_t (*show)(struct kobject *kobj,
+- struct attribute *attr, char *buf);
+- ssize_t (*store)(struct kobject *a, struct attribute *b,
++ struct kobj_attribute *attr, char *buf);
++ ssize_t (*store)(struct kobject *a, struct kobj_attribute *b,
const char *c, size_t count);
};
+typedef struct global_attr __no_const global_attr_no_const;
#define define_one_global_ro(_name) \
static struct global_attr _name = \
-@@ -281,7 +282,7 @@ struct cpufreq_driver {
- bool boost_supported;
+@@ -280,7 +281,7 @@ struct cpufreq_driver {
+ /* platform specific boost support code */
bool boost_enabled;
int (*set_boost)(int state);
-};
@@ -102287,10 +126222,10 @@ index 786ad32..09d1fb1 100644
#ifdef CONFIG_CPU_IDLE
extern int cpuidle_register_governor(struct cpuidle_governor *gov);
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
-index 59915ea..81ebec0 100644
+index fc14275..8e1074d 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
-@@ -127,17 +127,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
+@@ -131,17 +131,17 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
}
/* Valid inputs for n are -1 and 0. */
@@ -102311,7 +126246,7 @@ index 59915ea..81ebec0 100644
const struct cpumask *srcp,
const struct cpumask *andp)
{
-@@ -181,7 +181,7 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
+@@ -185,7 +185,7 @@ static inline unsigned int cpumask_first(const struct cpumask *srcp)
*
* Returns >= nr_cpu_ids if no further cpus set.
*/
@@ -102320,7 +126255,7 @@ index 59915ea..81ebec0 100644
{
/* -1 is a legal arg here. */
if (n != -1)
-@@ -196,7 +196,7 @@ static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
+@@ -200,7 +200,7 @@ static inline unsigned int cpumask_next(int n, const struct cpumask *srcp)
*
* Returns >= nr_cpu_ids if no further cpus unset.
*/
@@ -102329,7 +126264,7 @@ index 59915ea..81ebec0 100644
{
/* -1 is a legal arg here. */
if (n != -1)
-@@ -204,7 +204,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
+@@ -208,7 +208,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1);
}
@@ -102338,7 +126273,7 @@ index 59915ea..81ebec0 100644
int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
unsigned int cpumask_local_spread(unsigned int i, int node);
-@@ -471,7 +471,7 @@ static inline bool cpumask_full(const struct cpumask *srcp)
+@@ -475,7 +475,7 @@ static inline bool cpumask_full(const struct cpumask *srcp)
* cpumask_weight - Count of bits in *srcp
* @srcp: the cpumask to count bits (< nr_cpu_ids) in.
*/
@@ -102423,7 +126358,7 @@ index 653589e..4ef254a 100644
return c | 0x20;
}
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
-index f513dd8..b264e06 100644
+index 03dda7b..430d42c 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -123,6 +123,9 @@ struct dentry {
@@ -102477,7 +126412,7 @@ index 7925bf0..d5143d2 100644
#define large_malloc(a) vmalloc(a)
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
-index 68030e2..c55bb73 100644
+index 6fa02a2..aac3093 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -117,7 +117,7 @@ struct devfreq_governor {
@@ -102490,10 +126425,10 @@ index 68030e2..c55bb73 100644
/**
* struct devfreq - Device devfreq structure
diff --git a/include/linux/device.h b/include/linux/device.h
-index b8f411b..49052b0 100644
+index 6d6f1fe..148f294 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
-@@ -342,7 +342,7 @@ struct subsys_interface {
+@@ -343,7 +343,7 @@ struct subsys_interface {
struct list_head node;
int (*add_dev)(struct device *dev, struct subsys_interface *sif);
void (*remove_dev)(struct device *dev, struct subsys_interface *sif);
@@ -102502,7 +126437,7 @@ index b8f411b..49052b0 100644
int subsys_interface_register(struct subsys_interface *sif);
void subsys_interface_unregister(struct subsys_interface *sif);
-@@ -538,7 +538,7 @@ struct device_type {
+@@ -539,7 +539,7 @@ struct device_type {
void (*release)(struct device *dev);
const struct dev_pm_ops *pm;
@@ -102511,7 +126446,7 @@ index b8f411b..49052b0 100644
/* interface for exporting device attributes */
struct device_attribute {
-@@ -548,11 +548,12 @@ struct device_attribute {
+@@ -549,11 +549,12 @@ struct device_attribute {
ssize_t (*store)(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count);
};
@@ -102526,10 +126461,10 @@ index b8f411b..49052b0 100644
ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
char *buf);
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
-index 2e551e2..8ea30b5 100644
+index 728ef07..8a9e7f5 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
-@@ -65,7 +65,7 @@ struct dma_map_ops {
+@@ -68,7 +68,7 @@ struct dma_map_ops {
u64 (*get_required_mask)(struct device *dev);
#endif
int is_phys;
@@ -102571,7 +126506,7 @@ index 20fa8d8..3d0dd18 100644
#endif
diff --git a/include/linux/err.h b/include/linux/err.h
-index a729120..6ede2c9 100644
+index 56762ab..bc4a3e3 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -20,12 +20,12 @@
@@ -102603,10 +126538,10 @@ index 7abf674..c0a73a0 100644
/**
diff --git a/include/linux/fb.h b/include/linux/fb.h
-index 3d00380..ce2dbdf9 100644
+index 55433f8..37437b8 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
-@@ -305,7 +305,8 @@ struct fb_ops {
+@@ -323,7 +323,8 @@ struct fb_ops {
/* called at KDB enter and leave time to prepare the console */
int (*fb_debug_enter)(struct fb_info *info);
int (*fb_debug_leave)(struct fb_info *info);
@@ -102629,11 +126564,24 @@ index 5295535..9852c7e 100644
void do_close_on_exec(struct files_struct *);
int iterate_fd(struct files_struct *, unsigned,
int (*)(const void *, struct file *, unsigned),
+diff --git a/include/linux/firewire.h b/include/linux/firewire.h
+index d4b7683..9feb066 100644
+--- a/include/linux/firewire.h
++++ b/include/linux/firewire.h
+@@ -451,7 +451,7 @@ struct fw_iso_context {
+
+ struct fw_iso_context *fw_iso_context_create(struct fw_card *card,
+ int type, int channel, int speed, size_t header_size,
+- fw_iso_callback_t callback, void *callback_data);
++ void *callback, void *callback_data);
+ int fw_iso_context_set_channels(struct fw_iso_context *ctx, u64 *channels);
+ int fw_iso_context_queue(struct fw_iso_context *ctx,
+ struct fw_iso_packet *packet,
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index ab3d8d9..7e062a6 100644
+index 83c77b0..b0421bd 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -439,7 +439,7 @@ struct address_space {
+@@ -441,7 +441,7 @@ struct address_space {
spinlock_t private_lock; /* for use by the address_space */
struct list_head private_list; /* ditto */
void *private_data; /* ditto */
@@ -102642,7 +126590,7 @@ index ab3d8d9..7e062a6 100644
/*
* On most architectures that alignment is already the case; but
* must be enforced here for CRIS, to let the least significant bit
-@@ -482,7 +482,7 @@ struct block_device {
+@@ -484,7 +484,7 @@ struct block_device {
int bd_fsfreeze_count;
/* Mutex for freeze */
struct mutex bd_fsfreeze_mutex;
@@ -102651,7 +126599,7 @@ index ab3d8d9..7e062a6 100644
/*
* Radix-tree tags, for tagging dirty and writeback pages within the pagecache
-@@ -677,7 +677,7 @@ struct inode {
+@@ -679,7 +679,7 @@ struct inode {
#endif
void *i_private; /* fs or device private pointer */
@@ -102660,7 +126608,7 @@ index ab3d8d9..7e062a6 100644
static inline int inode_unhashed(struct inode *inode)
{
-@@ -872,7 +872,7 @@ struct file {
+@@ -899,7 +899,7 @@ struct file {
struct list_head f_tfile_llink;
#endif /* #ifdef CONFIG_EPOLL */
struct address_space *f_mapping;
@@ -102669,7 +126617,7 @@ index ab3d8d9..7e062a6 100644
struct file_handle {
__u32 handle_bytes;
-@@ -1007,7 +1007,7 @@ struct file_lock {
+@@ -1034,7 +1034,7 @@ struct file_lock {
int state; /* state of grant or error if -ve */
} afs;
} fl_u;
@@ -102678,7 +126626,7 @@ index ab3d8d9..7e062a6 100644
struct file_lock_context {
spinlock_t flc_lock;
-@@ -1383,7 +1383,7 @@ struct super_block {
+@@ -1410,7 +1410,7 @@ struct super_block {
/* s_inode_list_lock protects s_inodes */
spinlock_t s_inode_list_lock ____cacheline_aligned_in_smp;
struct list_head s_inodes; /* all inodes */
@@ -102687,17 +126635,17 @@ index ab3d8d9..7e062a6 100644
extern struct timespec current_fs_time(struct super_block *sb);
-@@ -1639,7 +1639,8 @@ struct file_operations {
- #ifndef CONFIG_MMU
- unsigned (*mmap_capabilities)(struct file *);
- #endif
+@@ -1672,7 +1672,8 @@ struct file_operations {
+ u64);
+ ssize_t (*dedupe_file_range)(struct file *, u64, u64, struct file *,
+ u64);
-};
+} __do_const __randomize_layout;
+typedef struct file_operations __no_const file_operations_no_const;
struct inode_operations {
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
-@@ -2346,7 +2347,7 @@ extern int register_chrdev_region(dev_t, unsigned, const char *);
+@@ -2396,7 +2397,7 @@ extern int register_chrdev_region(dev_t, unsigned, const char *);
extern int __register_chrdev(unsigned int major, unsigned int baseminor,
unsigned int count, const char *name,
const struct file_operations *fops);
@@ -102706,18 +126654,9 @@ index ab3d8d9..7e062a6 100644
unsigned int count, const char *name);
extern void unregister_chrdev_region(dev_t, unsigned);
extern void chrdev_show(struct seq_file *,off_t);
-@@ -2774,8 +2775,6 @@ extern int vfs_lstat(const char __user *, struct kstat *);
- extern int vfs_fstat(unsigned int, struct kstat *);
- extern int vfs_fstatat(int , const char __user *, struct kstat *, int);
-
--extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
-- unsigned long arg);
- extern int __generic_block_fiemap(struct inode *inode,
- struct fiemap_extent_info *fieinfo,
- loff_t start, loff_t len,
-@@ -3036,4 +3035,14 @@ static inline bool dir_relax(struct inode *inode)
-
+@@ -3088,4 +3089,14 @@ static inline bool dir_relax(struct inode *inode)
extern bool path_noexec(const struct path *path);
+ extern void inode_nohighmem(struct inode *inode);
+static inline bool is_sidechannel_device(const struct inode *inode)
+{
@@ -102810,10 +126749,10 @@ index 7ee1774..72505b8 100644
/*
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
-index 847cc1d..2d2699a 100644
+index 5c70676..0109dd5 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
-@@ -207,7 +207,7 @@ struct gendisk {
+@@ -208,7 +208,7 @@ struct gendisk {
struct kobject *slave_dir;
struct timer_rand_state *random;
@@ -102822,7 +126761,7 @@ index 847cc1d..2d2699a 100644
struct disk_events *ev;
#ifdef CONFIG_BLK_DEV_INTEGRITY
struct kobject integrity_kobj;
-@@ -448,7 +448,7 @@ extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
+@@ -450,7 +450,7 @@ extern void disk_flush_events(struct gendisk *disk, unsigned int mask);
extern unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask);
/* drivers/char/random.c */
@@ -102860,7 +126799,7 @@ index eecd19b..391d1957 100644
__field(attr_nr, attr_flag, name, NLA_U64, __u64, \
nla_get_u64, nla_put_u64, false)
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
-index 8942af0..2c247c14 100644
+index af1f2b2..8fe7455 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -36,6 +36,13 @@ struct vm_area_struct;
@@ -102877,15 +126816,15 @@ index 8942af0..2c247c14 100644
/* If the above are modified, __GFP_BITS_SHIFT may need updating */
/*
-@@ -78,6 +85,7 @@ struct vm_area_struct;
- #define __GFP_WRITE ((__force gfp_t)___GFP_WRITE)
+@@ -82,6 +89,7 @@ struct vm_area_struct;
#define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL)
#define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)
+ #define __GFP_ACCOUNT ((__force gfp_t)___GFP_ACCOUNT)
+#define __GFP_USERCOPY ((__force gfp_t)___GFP_USERCOPY)/* Allocator intends to copy page to/from userland */
/*
* Watermark modifiers -- controls access to emergency reserves
-@@ -183,7 +191,7 @@ struct vm_area_struct;
+@@ -186,7 +194,7 @@ struct vm_area_struct;
#define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE)
/* Room for N __GFP_FOO bits */
@@ -102894,7 +126833,7 @@ index 8942af0..2c247c14 100644
#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
/*
-@@ -250,6 +258,8 @@ struct vm_area_struct;
+@@ -257,6 +265,8 @@ struct vm_area_struct;
__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN) & \
~__GFP_KSWAPD_RECLAIM)
@@ -102903,6 +126842,15 @@ index 8942af0..2c247c14 100644
/* Convert GFP flags to their corresponding migrate type */
#define GFP_MOVABLE_MASK (__GFP_RECLAIMABLE|__GFP_MOVABLE)
#define GFP_MOVABLE_SHIFT 3
+@@ -513,7 +523,7 @@ extern void free_kmem_pages(unsigned long addr, unsigned int order);
+ void page_alloc_init(void);
+ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
+ void drain_all_pages(struct zone *zone);
+-void drain_local_pages(struct zone *zone);
++void drain_local_pages(void *zone);
+
+ #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
+ void page_alloc_init_late(void);
diff --git a/include/linux/gracl.h b/include/linux/gracl.h
new file mode 100644
index 0000000..91858e4
@@ -104251,10 +128199,10 @@ index bb3f329..9daed55 100644
unsigned start1, unsigned end1,
unsigned start2, unsigned end2)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
-index 685c262..5d42d36 100644
+index 7d953c2..f511887 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
-@@ -317,7 +317,7 @@ struct hstate {
+@@ -314,7 +314,7 @@ struct hstate {
unsigned int surplus_huge_pages_node[MAX_NUMNODES];
#ifdef CONFIG_CGROUP_HUGETLB
/* cgroup control files */
@@ -104317,7 +128265,7 @@ index 1c7b89a..7dda400 100644
container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
-index 768063b..62ef5be 100644
+index 200cf13b..2a82cb4 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -412,6 +412,7 @@ struct i2c_algorithm {
@@ -104327,9 +128275,9 @@ index 768063b..62ef5be 100644
+typedef struct i2c_algorithm __no_const i2c_algorithm_no_const;
/**
- * struct i2c_bus_recovery_info - I2C bus recovery information
+ * struct i2c_timings - I2C timing information
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
-index b49cf92..0c29072 100644
+index ba7a9b0..33a0237 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -78,7 +78,7 @@ struct pppox_proto {
@@ -104374,7 +128322,7 @@ index b449f37..61005b3 100644
#define __meminitconst __constsection(.meminit.rodata)
#define __memexit __section(.memexit.text) __exitused __cold notrace
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
-index 1c1ff7e..97a439f 100644
+index f2cb8d4..2f0363e 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -159,6 +159,12 @@ extern struct task_group root_task_group;
@@ -104399,10 +128347,10 @@ index 1c1ff7e..97a439f 100644
.files = &init_files, \
.signal = &init_signals, \
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
-index ad16809..516b54d 100644
+index 0e95fcc..0694bbf 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
-@@ -435,8 +435,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS];
+@@ -436,8 +436,8 @@ extern const char * const softirq_to_name[NR_SOFTIRQS];
struct softirq_action
{
@@ -104413,7 +128361,7 @@ index ad16809..516b54d 100644
asmlinkage void do_softirq(void);
asmlinkage void __do_softirq(void);
-@@ -450,7 +450,7 @@ static inline void do_softirq_own_stack(void)
+@@ -451,7 +451,7 @@ static inline void do_softirq_own_stack(void)
}
#endif
@@ -104423,10 +128371,10 @@ index ad16809..516b54d 100644
extern void __raise_softirq_irqoff(unsigned int nr);
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
-index f28dff3..2f6c413 100644
+index a5c539f..07d576c 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
-@@ -193,7 +193,7 @@ struct iommu_ops {
+@@ -201,7 +201,7 @@ struct iommu_ops {
unsigned long pgsize_bitmap;
void *priv;
@@ -104493,10 +128441,10 @@ index 3c1c967..ca8abc6 100644
/*
* irq_chip specific flags
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
-index a587a33..0ff712d 100644
+index dcca77c..8503b4f 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
-@@ -59,7 +59,7 @@ struct irq_desc {
+@@ -62,7 +62,7 @@ struct irq_desc {
unsigned int irq_count; /* For detecting broken IRQs */
unsigned long last_unhandled; /* Aging timer for unhandled count */
unsigned int irqs_unhandled;
@@ -104506,7 +128454,7 @@ index a587a33..0ff712d 100644
raw_spinlock_t lock;
struct cpumask *percpu_enabled;
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
-index d5e5c5b..0e779bd 100644
+index 04579d9..b1278d4 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -38,6 +38,9 @@ struct device_node;
@@ -104596,7 +128544,7 @@ index 5fdc553..766e169 100644
return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32)
>> USEC_TO_HZ_SHR32;
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
-index 6883e19..e854fcb 100644
+index 6883e19..d2c7746 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -15,7 +15,8 @@
@@ -104609,14 +128557,26 @@ index 6883e19..e854fcb 100644
/* Lookup the address for a symbol. Returns 0 if not found. */
unsigned long kallsyms_lookup_name(const char *name);
-@@ -106,6 +107,21 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
+@@ -40,7 +41,7 @@ extern int sprint_symbol_no_offset(char *buffer, unsigned long address);
+ extern int sprint_backtrace(char *buffer, unsigned long address);
+
+ /* Look up a kernel symbol and print it to the kernel messages. */
+-extern void __print_symbol(const char *fmt, unsigned long address);
++extern __printf(1, 3) void __print_symbol(const char *fmt, unsigned long address, ...);
+
+ int lookup_symbol_name(unsigned long addr, char *symname);
+ int lookup_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name);
+@@ -104,21 +105,26 @@ static inline int lookup_symbol_attrs(unsigned long addr, unsigned long *size, u
+ }
+
/* Stupid that this does nothing, but I didn't create this mess. */
- #define __print_symbol(fmt, addr)
+-#define __print_symbol(fmt, addr)
++#define __print_symbol(fmt, addr, args...)
#endif /*CONFIG_KALLSYMS*/
+#else /* when included by kallsyms.c, vsnprintf.c, kprobes.c, or
+ arch/x86/kernel/dumpstack.c, with HIDESYM enabled */
+extern unsigned long kallsyms_lookup_name(const char *name);
-+extern void __print_symbol(const char *fmt, unsigned long address);
++extern __printf(1, 3) void __print_symbol(const char *fmt, unsigned long address, ...);
+extern int sprint_backtrace(char *buffer, unsigned long address);
+extern int sprint_symbol(char *buffer, unsigned long address);
+extern int sprint_symbol_no_offset(char *buffer, unsigned long address);
@@ -104629,8 +128589,23 @@ index 6883e19..e854fcb 100644
+ unsigned long *offset);
+#endif
- /* This macro allows us to keep printk typechecking */
- static __printf(1, 2)
+-/* This macro allows us to keep printk typechecking */
+-static __printf(1, 2)
+-void __check_printsym_format(const char *fmt, ...)
+-{
+-}
+-
+-static inline void print_symbol(const char *fmt, unsigned long addr)
+-{
+- __check_printsym_format(fmt, "");
+- __print_symbol(fmt, (unsigned long)
+- __builtin_extract_return_addr((void *)addr));
+-}
++#define print_symbol(fmt, addr) \
++ __print_symbol(fmt, addr, "")
+
+ static inline void print_ip_sym(unsigned long ip)
+ {
diff --git a/include/linux/key-type.h b/include/linux/key-type.h
index 7463355..30de32e 100644
--- a/include/linux/key-type.h
@@ -104786,10 +128761,10 @@ index e15828f..531fd0a 100644
if (atomic_sub_and_test((int) count, &kref->refcount)) {
release(kref);
diff --git a/include/linux/libata.h b/include/linux/libata.h
-index b20a275..4aff061 100644
+index 2c4ebef..f452c4d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
-@@ -992,7 +992,7 @@ struct ata_port_operations {
+@@ -994,7 +994,7 @@ struct ata_port_operations {
* fields must be pointers.
*/
const struct ata_port_operations *inherits;
@@ -104799,7 +128774,7 @@ index b20a275..4aff061 100644
struct ata_port_info {
unsigned long flags;
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
-index a6a42dd..6c5ebce 100644
+index a6a42dd..6408042 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -36,6 +36,7 @@
@@ -104810,8 +128785,26 @@ index a6a42dd..6c5ebce 100644
#define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE)
/*
+@@ -84,6 +85,17 @@
+ ALIGN ASM_NL \
+ name:
+ #endif
++
++#ifdef CONFIG_PAX_RAP
++#define RAP_ENTRY(name) \
++ .globl name; \
++ ALIGN; \
++ .quad __rap_hash_##name; \
++ name:
++#else
++#define RAP_ENTRY(name) ENTRY(name)
++#endif
++
+ #endif /* LINKER_SCRIPT */
+
+ #ifndef WEAK
diff --git a/include/linux/list.h b/include/linux/list.h
-index 993395a..b481018 100644
+index 5356f4d..c99970b 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -113,6 +113,19 @@ extern void __list_del_entry(struct list_head *entry);
@@ -104843,6 +128836,98 @@ index 993395a..b481018 100644
/**
* list_move - delete from one list and add as another's head
* @list: the entry to move
+diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h
+index d39ed1c..8b5d98f 100644
+--- a/include/linux/lockd/xdr.h
++++ b/include/linux/lockd/xdr.h
+@@ -95,24 +95,24 @@ struct nlm_reboot {
+ */
+ #define NLMSVC_XDRSIZE sizeof(struct nlm_args)
+
+-int nlmsvc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlmsvc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlmsvc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlmsvc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlmsvc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlmsvc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlmsvc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlmsvc_encode_void(struct svc_rqst *, __be32 *, void *);
+-int nlmsvc_decode_void(struct svc_rqst *, __be32 *, void *);
+-int nlmsvc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlmsvc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlmsvc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlmsvc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
++int nlmsvc_decode_testargs(void *, __be32 *, void *);
++int nlmsvc_encode_testres(void *, __be32 *, void *);
++int nlmsvc_decode_lockargs(void *, __be32 *, void *);
++int nlmsvc_decode_cancargs(void *, __be32 *, void *);
++int nlmsvc_decode_unlockargs(void *, __be32 *, void *);
++int nlmsvc_encode_res(void *, __be32 *, void *);
++int nlmsvc_decode_res(void *, __be32 *, void *);
++int nlmsvc_encode_void(void *, __be32 *p, void *);
++int nlmsvc_decode_void(void *, __be32 *, void *);
++int nlmsvc_decode_shareargs(void *, __be32 *, void *);
++int nlmsvc_encode_shareres(void *, __be32 *, void *);
++int nlmsvc_decode_notify(void *, __be32 *, void *);
++int nlmsvc_decode_reboot(void *, __be32 *, void *);
+ /*
+-int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
+-int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
+-int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
+-int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
++int nlmclt_encode_testargs(void *, u32 *, void *);
++int nlmclt_encode_lockargs(void *, u32 *, void *);
++int nlmclt_encode_cancargs(void *, u32 *, void *);
++int nlmclt_encode_unlockargs(void *, u32 *, void *);
+ */
+
+ #endif /* LOCKD_XDR_H */
+diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h
+index e58c88b..759ca71 100644
+--- a/include/linux/lockd/xdr4.h
++++ b/include/linux/lockd/xdr4.h
+@@ -23,24 +23,24 @@
+
+
+
+-int nlm4svc_decode_testargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlm4svc_encode_testres(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlm4svc_decode_lockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlm4svc_decode_cancargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlm4svc_decode_unlockargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlm4svc_encode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlm4svc_decode_res(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlm4svc_encode_void(struct svc_rqst *, __be32 *, void *);
+-int nlm4svc_decode_void(struct svc_rqst *, __be32 *, void *);
+-int nlm4svc_decode_shareargs(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlm4svc_encode_shareres(struct svc_rqst *, __be32 *, struct nlm_res *);
+-int nlm4svc_decode_notify(struct svc_rqst *, __be32 *, struct nlm_args *);
+-int nlm4svc_decode_reboot(struct svc_rqst *, __be32 *, struct nlm_reboot *);
++int nlm4svc_decode_testargs(void *, __be32 *, void *);
++int nlm4svc_encode_testres(void *, __be32 *, void *);
++int nlm4svc_decode_lockargs(void *, __be32 *, void *);
++int nlm4svc_decode_cancargs(void *, __be32 *, void *);
++int nlm4svc_decode_unlockargs(void *, __be32 *, void *);
++int nlm4svc_encode_res(void *, __be32 *, void *);
++int nlm4svc_decode_res(void *, __be32 *, void *);
++int nlm4svc_encode_void(void *, __be32 *, void *);
++int nlm4svc_decode_void(void *, __be32 *, void *);
++int nlm4svc_decode_shareargs(void *, __be32 *, void *);
++int nlm4svc_encode_shareres(void *, __be32 *, void *);
++int nlm4svc_decode_notify(void *, __be32 *, void *);
++int nlm4svc_decode_reboot(void *, __be32 *, void *);
+ /*
+-int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
+-int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
+-int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
+-int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
++int nlmclt_encode_testargs(void *, u32 *, void *);
++int nlmclt_encode_lockargs(void *, u32 *, void *);
++int nlmclt_encode_cancargs(void *, u32 *, void *);
++int nlmclt_encode_unlockargs(void *, u32 *, void *);
+ */
+ extern const struct rpc_version nlm_version4;
+
diff --git a/include/linux/lockref.h b/include/linux/lockref.h
index b10b122..d37b3de 100644
--- a/include/linux/lockref.h
@@ -104889,10 +128974,10 @@ index b10b122..d37b3de 100644
#endif /* __LINUX_LOCKREF_H */
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
-index ec3a6ba..72c79d4 100644
+index 71969de..6257abb 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
-@@ -1824,7 +1824,7 @@ struct security_hook_heads {
+@@ -1830,7 +1830,7 @@ struct security_hook_heads {
struct list_head audit_rule_match;
struct list_head audit_rule_free;
#endif /* CONFIG_AUDIT */
@@ -104901,7 +128986,7 @@ index ec3a6ba..72c79d4 100644
/*
* Security module hook list structure.
-@@ -1834,7 +1834,7 @@ struct security_hook_list {
+@@ -1840,7 +1840,7 @@ struct security_hook_list {
struct list_head list;
struct list_head *head;
union security_list_options hook;
@@ -104960,10 +129045,10 @@ index 6e8b5b2..8e8a37d 100644
u32 remainder;
return div_u64_rem(dividend, divisor, &remainder);
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
-index cd0e241..ea80891 100644
+index 792c898..3f045d6 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
-@@ -259,7 +259,7 @@ struct mem_cgroup {
+@@ -246,7 +246,7 @@ struct mem_cgroup {
int last_scanned_node;
#if MAX_NUMNODES > 1
nodemask_t scan_nodes;
@@ -104973,7 +129058,7 @@ index cd0e241..ea80891 100644
#endif
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
-index 3d385c8..deacb6a 100644
+index 2696c1f..9320d41 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -91,6 +91,10 @@ static inline struct mempolicy *mpol_dup(struct mempolicy *pol)
@@ -104998,10 +129083,10 @@ index 3d385c8..deacb6a 100644
static inline int
vma_dup_policy(struct vm_area_struct *src, struct vm_area_struct *dst)
diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 00bad77..356be09 100644
+index 516e149..93b0b57 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
-@@ -143,6 +143,11 @@ extern unsigned int kobjsize(const void *objp);
+@@ -155,6 +155,11 @@ extern unsigned int kobjsize(const void *objp);
#define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
#define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */
#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
@@ -105013,7 +129098,7 @@ index 00bad77..356be09 100644
#define VM_ARCH_1 0x01000000 /* Architecture-specific flag */
#define VM_ARCH_2 0x02000000
#define VM_DONTDUMP 0x04000000 /* Do not include in the core dump */
-@@ -268,8 +273,8 @@ struct vm_operations_struct {
+@@ -286,8 +291,8 @@ struct vm_operations_struct {
/* called by access_process_vm when get_user_pages() fails, typically
* for use by special VMAs that can switch between memory and hardware
*/
@@ -105024,7 +129109,7 @@ index 00bad77..356be09 100644
/* Called by the /proc/PID/maps code to ask the vma whether it
* has a special name. Returning non-NULL will also cause this
-@@ -307,6 +312,7 @@ struct vm_operations_struct {
+@@ -325,6 +330,7 @@ struct vm_operations_struct {
struct page *(*find_special_page)(struct vm_area_struct *vma,
unsigned long addr);
};
@@ -105032,7 +129117,7 @@ index 00bad77..356be09 100644
struct mmu_gather;
struct inode;
-@@ -1142,8 +1148,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
+@@ -1175,8 +1181,8 @@ int follow_pfn(struct vm_area_struct *vma, unsigned long address,
unsigned long *pfn);
int follow_phys(struct vm_area_struct *vma, unsigned long address,
unsigned int flags, unsigned long *prot, resource_size_t *phys);
@@ -105043,7 +129128,7 @@ index 00bad77..356be09 100644
static inline void unmap_shared_mapping_range(struct address_space *mapping,
loff_t const holebegin, loff_t const holelen)
-@@ -1183,9 +1189,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
+@@ -1217,9 +1223,9 @@ static inline int fixup_user_fault(struct task_struct *tsk,
}
#endif
@@ -105056,7 +129141,7 @@ index 00bad77..356be09 100644
long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, unsigned long nr_pages,
-@@ -1276,39 +1282,11 @@ int clear_page_dirty_for_io(struct page *page);
+@@ -1310,39 +1316,11 @@ int clear_page_dirty_for_io(struct page *page);
int get_cmdline(struct task_struct *task, char *buffer, int buflen);
@@ -105093,10 +129178,10 @@ index 00bad77..356be09 100644
- !vma_growsup(vma->vm_next, addr);
-}
-
- extern struct task_struct *task_of_stack(struct task_struct *task,
- struct vm_area_struct *vma, bool in_group);
+ int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t);
-@@ -1431,8 +1409,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
+ extern unsigned long move_page_tables(struct vm_area_struct *vma,
+@@ -1487,8 +1465,15 @@ static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
{
return 0;
}
@@ -105112,7 +129197,7 @@ index 00bad77..356be09 100644
#endif
#if defined(__PAGETABLE_PMD_FOLDED) || !defined(CONFIG_MMU)
-@@ -1442,6 +1427,12 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
+@@ -1498,6 +1483,12 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
return 0;
}
@@ -105125,7 +129210,7 @@ index 00bad77..356be09 100644
static inline void mm_nr_pmds_init(struct mm_struct *mm) {}
static inline unsigned long mm_nr_pmds(struct mm_struct *mm)
-@@ -1454,6 +1445,7 @@ static inline void mm_dec_nr_pmds(struct mm_struct *mm) {}
+@@ -1510,6 +1501,7 @@ static inline void mm_dec_nr_pmds(struct mm_struct *mm) {}
#else
int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
@@ -105133,7 +129218,7 @@ index 00bad77..356be09 100644
static inline void mm_nr_pmds_init(struct mm_struct *mm)
{
-@@ -1491,11 +1483,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
+@@ -1547,11 +1539,23 @@ static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long a
NULL: pud_offset(pgd, address);
}
@@ -105157,7 +129242,7 @@ index 00bad77..356be09 100644
#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
#if USE_SPLIT_PTE_PTLOCKS
-@@ -1878,12 +1882,23 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
+@@ -1934,12 +1938,23 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
bool *need_rmap_locks);
extern void exit_mmap(struct mm_struct *);
@@ -105181,7 +129266,7 @@ index 00bad77..356be09 100644
if (rlim < RLIM_INFINITY) {
if (((new - start) + (end_data - start_data)) > rlim)
return -ENOSPC;
-@@ -1916,6 +1931,7 @@ extern unsigned long do_mmap(struct file *file, unsigned long addr,
+@@ -1974,6 +1989,7 @@ extern unsigned long do_mmap(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot, unsigned long flags,
vm_flags_t vm_flags, unsigned long pgoff, unsigned long *populate);
extern int do_munmap(struct mm_struct *, unsigned long, size_t);
@@ -105189,7 +129274,7 @@ index 00bad77..356be09 100644
static inline unsigned long
do_mmap_pgoff(struct file *file, unsigned long addr,
-@@ -1952,10 +1968,11 @@ struct vm_unmapped_area_info {
+@@ -2010,10 +2026,11 @@ struct vm_unmapped_area_info {
unsigned long high_limit;
unsigned long align_mask;
unsigned long align_offset;
@@ -105203,7 +129288,7 @@ index 00bad77..356be09 100644
/*
* Search for an unmapped address range.
-@@ -1967,7 +1984,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
+@@ -2025,7 +2042,7 @@ extern unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info);
* - satisfies (begin_addr & align_mask) == (align_offset & align_mask)
*/
static inline unsigned long
@@ -105212,7 +129297,7 @@ index 00bad77..356be09 100644
{
if (info->flags & VM_UNMAPPED_AREA_TOPDOWN)
return unmapped_area_topdown(info);
-@@ -2027,6 +2044,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
+@@ -2085,6 +2102,10 @@ extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long add
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
struct vm_area_struct **pprev);
@@ -105223,7 +129308,7 @@ index 00bad77..356be09 100644
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */
static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
-@@ -2056,10 +2077,10 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
+@@ -2114,10 +2135,10 @@ static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
}
#ifdef CONFIG_MMU
@@ -105236,19 +129321,7 @@ index 00bad77..356be09 100644
{
return __pgprot(0);
}
-@@ -2122,6 +2143,11 @@ void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
- static inline void vm_stat_account(struct mm_struct *mm,
- unsigned long flags, struct file *file, long pages)
- {
-+
-+#ifdef CONFIG_PAX_RANDMMAP
-+ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
-+#endif
-+
- mm->total_vm += pages;
- }
- #endif /* CONFIG_PROC_FS */
-@@ -2226,7 +2252,7 @@ extern void put_hwpoison_page(struct page *page);
+@@ -2282,7 +2303,7 @@ extern int get_hwpoison_page(struct page *page);
extern int sysctl_memory_failure_early_kill;
extern int sysctl_memory_failure_recovery;
extern void shake_page(struct page *p, int access);
@@ -105257,7 +129330,7 @@ index 00bad77..356be09 100644
extern int soft_offline_page(struct page *page, int flags);
-@@ -2311,5 +2337,11 @@ void __init setup_nr_node_ids(void);
+@@ -2367,5 +2388,11 @@ void __init setup_nr_node_ids(void);
static inline void setup_nr_node_ids(void) {}
#endif
@@ -105270,10 +129343,10 @@ index 00bad77..356be09 100644
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index f8d1492..a6dfed0 100644
+index 624b78b..47715c9 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
-@@ -355,7 +355,9 @@ struct vm_area_struct {
+@@ -352,7 +352,9 @@ struct vm_area_struct {
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
#endif
struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
@@ -105284,7 +129357,7 @@ index f8d1492..a6dfed0 100644
struct core_thread {
struct task_struct *task;
-@@ -511,7 +513,25 @@ struct mm_struct {
+@@ -509,7 +511,25 @@ struct mm_struct {
#ifdef CONFIG_HUGETLB_PAGE
atomic_long_t hugetlb_usage;
#endif
@@ -105334,10 +129407,10 @@ index 3ba327a..85cd5ce 100644
}
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
-index e23a9e7..75994f3 100644
+index 7b6c2cf..7bce238 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
-@@ -527,7 +527,7 @@ struct zone {
+@@ -522,7 +522,7 @@ struct zone {
ZONE_PADDING(_pad3_)
/* Zone statistics */
@@ -105347,7 +129420,7 @@ index e23a9e7..75994f3 100644
enum zone_flags {
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
-index 64f36e0..fa7f0d8 100644
+index 6e4c645..3633f7b 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -139,7 +139,7 @@ struct usb_device_id {
@@ -105369,7 +129442,7 @@ index 64f36e0..fa7f0d8 100644
* struct dmi_device_id appears during expansion of
* "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
diff --git a/include/linux/module.h b/include/linux/module.h
-index b229a99..37a70e1 100644
+index 2bb0c30..dc42cbc 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -19,9 +19,11 @@
@@ -105408,7 +129481,35 @@ index b229a99..37a70e1 100644
extern ssize_t __modver_version_show(struct module_attribute *,
struct module_kobject *, char *);
-@@ -319,7 +322,7 @@ struct module {
+@@ -303,17 +306,18 @@ struct mod_tree_node {
+ };
+
+ struct module_layout {
+- /* The actual code + data. */
+- void *base;
+- /* Total size. */
+- unsigned int size;
+- /* The size of the executable code. */
+- unsigned int text_size;
+- /* Size of RO section of the module (text+rodata) */
+- unsigned int ro_size;
++ /* The actual code. */
++ void *base_rx;
++ /* The actual data. */
++ void *base_rw;
++ /* Code size. */
++ unsigned int size_rx;
++ /* Data size. */
++ unsigned int size_rw;
+
+ #ifdef CONFIG_MODULES_TREE_LOOKUP
+- struct mod_tree_node mtn;
++ struct mod_tree_node mtn_rx;
++ struct mod_tree_node mtn_rw;
+ #endif
+ };
+
+@@ -341,7 +345,7 @@ struct module {
/* Sysfs stuff. */
struct module_kobject mkobj;
@@ -105417,52 +129518,7 @@ index b229a99..37a70e1 100644
const char *version;
const char *srcversion;
struct kobject *holders_dir;
-@@ -376,20 +379,21 @@ struct module {
- * If this is non-NULL, vfree() after init() returns.
- *
- * Cacheline align here, such that:
-- * module_init, module_core, init_size, core_size,
-+ * module_init_*, module_core_*, init_size_*, core_size_*,
- * init_text_size, core_text_size and mtn_core::{mod,node[0]}
- * are on the same cacheline.
- */
-- void *module_init ____cacheline_aligned;
-+ void *module_init_rw ____cacheline_aligned;
-+ void *module_init_rx;
-
- /* Here is the actual code + data, vfree'd on unload. */
-- void *module_core;
-+ void *module_core_rx, *module_core_rw;
-
- /* Here are the sizes of the init and core sections */
-- unsigned int init_size, core_size;
-+ unsigned int init_size_rw, core_size_rw;
-
- /* The size of the executable code in each section. */
-- unsigned int init_text_size, core_text_size;
-+ unsigned int init_size_rx, core_size_rx;
-
- #ifdef CONFIG_MODULES_TREE_LOOKUP
- /*
-@@ -397,13 +401,12 @@ struct module {
- * above entries such that a regular lookup will only touch one
- * cacheline.
- */
-- struct mod_tree_node mtn_core;
-- struct mod_tree_node mtn_init;
-+ struct mod_tree_node mtn_core_rw;
-+ struct mod_tree_node mtn_core_rx;
-+ struct mod_tree_node mtn_init_rw;
-+ struct mod_tree_node mtn_init_rx;
- #endif
-
-- /* Size of RO sections of the module (text+rodata) */
-- unsigned int init_ro_size, core_ro_size;
--
- /* Arch-specific module values */
- struct mod_arch_specific arch;
-
-@@ -455,6 +458,10 @@ struct module {
+@@ -449,6 +453,10 @@ struct module {
unsigned int num_trace_events;
struct trace_enum_map **trace_enums;
unsigned int num_trace_enums;
@@ -105473,7 +129529,7 @@ index b229a99..37a70e1 100644
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
unsigned int num_ftrace_callsites;
-@@ -482,7 +489,8 @@ struct module {
+@@ -476,7 +484,8 @@ struct module {
ctor_fn_t *ctors;
unsigned int num_ctors;
#endif
@@ -105483,7 +129539,7 @@ index b229a99..37a70e1 100644
#ifndef MODULE_ARCH_INIT
#define MODULE_ARCH_INIT {}
#endif
-@@ -503,18 +511,48 @@ bool is_module_address(unsigned long addr);
+@@ -497,18 +506,38 @@ bool is_module_address(unsigned long addr);
bool is_module_percpu_address(unsigned long addr);
bool is_module_text_address(unsigned long addr);
@@ -105499,40 +129555,30 @@ index b229a99..37a70e1 100644
+ return ((void *)addr >= start && (void *)addr < start + size);
+}
+
-+static inline int within_module_core_rx(unsigned long addr, const struct module *mod)
-+{
-+ return within_module_range(addr, mod->module_core_rx, mod->core_size_rx);
-+}
-+
-+static inline int within_module_core_rw(unsigned long addr, const struct module *mod)
-+{
-+ return within_module_range(addr, mod->module_core_rw, mod->core_size_rw);
-+}
-+
-+static inline int within_module_init_rx(unsigned long addr, const struct module *mod)
++static inline int within_module_rx(unsigned long addr, const struct module_layout *layout)
+{
-+ return within_module_range(addr, mod->module_init_rx, mod->init_size_rx);
++ return within_module_range(addr, layout->base_rx, layout->size_rx);
+}
+
-+static inline int within_module_init_rw(unsigned long addr, const struct module *mod)
++static inline int within_module_rw(unsigned long addr, const struct module_layout *layout)
+{
-+ return within_module_range(addr, mod->module_init_rw, mod->init_size_rw);
++ return within_module_range(addr, layout->base_rw, layout->size_rw);
+}
+
static inline bool within_module_core(unsigned long addr,
const struct module *mod)
{
-- return (unsigned long)mod->module_core <= addr &&
-- addr < (unsigned long)mod->module_core + mod->core_size;
-+ return within_module_core_rx(addr, mod) || within_module_core_rw(addr, mod);
+- return (unsigned long)mod->core_layout.base <= addr &&
+- addr < (unsigned long)mod->core_layout.base + mod->core_layout.size;
++ return within_module_rx(addr, &mod->core_layout) || within_module_rw(addr, &mod->core_layout);
}
static inline bool within_module_init(unsigned long addr,
const struct module *mod)
{
-- return (unsigned long)mod->module_init <= addr &&
-- addr < (unsigned long)mod->module_init + mod->init_size;
-+ return within_module_init_rx(addr, mod) || within_module_init_rw(addr, mod);
+- return (unsigned long)mod->init_layout.base <= addr &&
+- addr < (unsigned long)mod->init_layout.base + mod->init_layout.size;
++ return within_module_rx(addr, &mod->init_layout) || within_module_rw(addr, &mod->init_layout);
}
static inline bool within_module(unsigned long addr, const struct module *mod)
@@ -105585,9 +129631,37 @@ index 4d0cb9b..3169ac7 100644
}
#endif
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
-index 52666d9..9701f5e 100644
+index 52666d9..f10563b 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
+@@ -54,7 +54,7 @@ struct kernel_param_ops {
+ int (*get)(char *buffer, const struct kernel_param *kp);
+ /* Optional function to free kp->arg when module unloaded. */
+ void (*free)(void *arg);
+-};
++} __do_const;
+
+ /*
+ * Flags available for kernel_param
+@@ -226,15 +226,15 @@ struct kparam_array
+
+ /* Obsolete - use module_param_cb() */
+ #define module_param_call(name, set, get, arg, perm) \
+- static const struct kernel_param_ops __param_ops_##name = \
+- { .flags = 0, (void *)set, (void *)get }; \
++ static const struct kernel_param_ops __param_ops_##name = \
++ { .flags = 0, set, get }; \
+ __module_param_call(MODULE_PARAM_PREFIX, \
+ name, &__param_ops_##name, arg, \
+ (perm) + sizeof(__check_old_set_param(set))*0, -1, 0)
+
+ /* We don't get oldget: it's often a new-style param_get_uint, etc. */
+ static inline int
+-__check_old_set_param(int (*oldset)(const char *, struct kernel_param *))
++__check_old_set_param(int (*oldset)(const char *, const struct kernel_param *))
+ {
+ return 0;
+ }
@@ -289,7 +289,7 @@ static inline void kernel_param_unlock(struct module *mod)
* @len is usually just sizeof(string).
*/
@@ -105646,10 +129720,10 @@ index 0b4ac7d..d4dc945 100644
struct iovec;
struct kvec;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index 04c068e..828eebe 100644
+index 6d1d8f4..f1ed976 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -1238,6 +1238,7 @@ struct net_device_ops {
+@@ -1257,6 +1257,7 @@ struct net_device_ops {
int (*ndo_fill_metadata_dst)(struct net_device *dev,
struct sk_buff *skb);
};
@@ -105657,7 +129731,7 @@ index 04c068e..828eebe 100644
/**
* enum net_device_priv_flags - &struct net_device priv_flags
-@@ -1548,7 +1549,7 @@ struct net_device {
+@@ -1570,7 +1571,7 @@ struct net_device {
unsigned long base_addr;
int irq;
@@ -105666,7 +129740,7 @@ index 04c068e..828eebe 100644
/*
* Some hardware also needs these fields (state,dev_list,
-@@ -1587,8 +1588,8 @@ struct net_device {
+@@ -1609,8 +1610,8 @@ struct net_device {
struct net_device_stats stats;
@@ -105690,8 +129764,23 @@ index 0ad5567..79b35f5a 100644
/* Function to register/unregister hook points. */
int nf_register_net_hook(struct net *net, const struct nf_hook_ops *ops);
+diff --git a/include/linux/netfilter/ipset/ip_set_comment.h b/include/linux/netfilter/ipset/ip_set_comment.h
+index 8d02485..a1e1aa5 100644
+--- a/include/linux/netfilter/ipset/ip_set_comment.h
++++ b/include/linux/netfilter/ipset/ip_set_comment.h
+@@ -58,8 +58,9 @@ ip_set_put_comment(struct sk_buff *skb, struct ip_set_comment *comment)
+ * of the set data anymore.
+ */
+ static inline void
+-ip_set_comment_free(struct ip_set_comment *comment)
++ip_set_comment_free(void *_comment)
+ {
++ struct ip_set_comment *comment = _comment;
+ struct ip_set_comment_rcu *c;
+
+ c = rcu_dereference_protected(comment->c, 1);
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
-index 5646b24..707819e 100644
+index ba0d978..5a9c6f1 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -19,7 +19,7 @@ struct nfnl_callback {
@@ -105719,10 +129808,10 @@ index 0000000..33f4af8
+
+#endif
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
-index 639e9b8..b37c9be 100644
+index 0b41959..71c4eea 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
-@@ -158,19 +158,19 @@ struct netlink_dump_control {
+@@ -160,19 +160,19 @@ struct netlink_dump_control {
void *data;
struct module *module;
u16 min_dump_alloc;
@@ -105813,6 +129902,28 @@ index 4386946..f50c615 100644
struct padata_cpumask cpumask;
spinlock_t lock ____cacheline_aligned;
unsigned int processed;
+diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
+index 92395a0..5ca2827 100644
+--- a/include/linux/pagemap.h
++++ b/include/linux/pagemap.h
+@@ -243,7 +243,7 @@ static inline struct page *page_cache_alloc_readahead(struct address_space *x)
+ __GFP_COLD | __GFP_NORETRY | __GFP_NOWARN);
+ }
+
+-typedef int filler_t(void *, struct page *);
++typedef int filler_t(struct file *, struct page *);
+
+ pgoff_t page_cache_next_hole(struct address_space *mapping,
+ pgoff_t index, unsigned long max_scan);
+@@ -387,7 +387,7 @@ extern int read_cache_pages(struct address_space *mapping,
+ static inline struct page *read_mapping_page(struct address_space *mapping,
+ pgoff_t index, void *data)
+ {
+- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
++ filler_t *filler = mapping->a_ops->readpage;
+ return read_cache_page(mapping, index, filler, data);
+ }
+
diff --git a/include/linux/path.h b/include/linux/path.h
index d137218..be0c176 100644
--- a/include/linux/path.h
@@ -105849,10 +129960,10 @@ index 8c78950..0d74ed9 100644
/**
* struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
-index caebf2a..4c3ae9d 100644
+index 4bc6daf..6edaab0 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
-@@ -34,7 +34,7 @@
+@@ -28,7 +28,7 @@
* preallocate for this. Keep PERCPU_DYNAMIC_RESERVE equal to or
* larger than PERCPU_DYNAMIC_EARLY_SIZE.
*/
@@ -105862,10 +129973,10 @@ index caebf2a..4c3ae9d 100644
/*
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
-index f9828a4..d5a70ba 100644
+index f5c5a3f..1330851 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
-@@ -470,8 +470,8 @@ struct perf_event {
+@@ -471,8 +471,8 @@ struct perf_event {
enum perf_event_active_state state;
unsigned int attach_state;
@@ -105876,7 +129987,7 @@ index f9828a4..d5a70ba 100644
/*
* These are the total time in nanoseconds that the event
-@@ -522,8 +522,8 @@ struct perf_event {
+@@ -523,8 +523,8 @@ struct perf_event {
* These accumulate total time (in nanoseconds) that children
* events have been enabled and running, respectively.
*/
@@ -105887,7 +129998,7 @@ index f9828a4..d5a70ba 100644
/*
* Protect attach/detach and child_list:
-@@ -950,7 +950,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
+@@ -948,7 +948,7 @@ static inline void perf_event_task_sched_out(struct task_struct *prev,
static inline u64 __perf_event_count(struct perf_event *event)
{
@@ -105896,7 +130007,7 @@ index f9828a4..d5a70ba 100644
}
extern void perf_event_mmap(struct vm_area_struct *vma);
-@@ -974,7 +974,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
+@@ -972,7 +972,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64
entry->ip[entry->nr++] = ip;
}
@@ -105905,7 +130016,7 @@ index f9828a4..d5a70ba 100644
extern int sysctl_perf_event_mlock;
extern int sysctl_perf_event_sample_rate;
extern int sysctl_perf_cpu_time_max_percent;
-@@ -989,19 +989,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
+@@ -987,19 +987,24 @@ extern int perf_cpu_time_max_percent_handler(struct ctl_table *table, int write,
loff_t *ppos);
@@ -105933,7 +130044,7 @@ index f9828a4..d5a70ba 100644
}
extern void perf_event_init(void);
-@@ -1164,7 +1169,7 @@ struct perf_pmu_events_attr {
+@@ -1162,7 +1167,7 @@ struct perf_pmu_events_attr {
struct device_attribute attr;
u64 id;
const char *event_str;
@@ -105942,6 +130053,21 @@ index f9828a4..d5a70ba 100644
ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr,
char *page);
+diff --git a/include/linux/pid.h b/include/linux/pid.h
+index 23705a5..af2bfb4 100644
+--- a/include/linux/pid.h
++++ b/include/linux/pid.h
+@@ -169,8 +169,8 @@ static inline pid_t pid_nr(struct pid *pid)
+ return nr;
+ }
+
+-pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns);
+-pid_t pid_vnr(struct pid *pid);
++pid_t pid_nr_ns(const struct pid *pid, const struct pid_namespace *ns);
++pid_t pid_vnr(const struct pid *pid);
+
+ #define do_each_pid_task(pid, type, task) \
+ do { \
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 918b117..7af374b7 100644
--- a/include/linux/pid_namespace.h
@@ -105956,16 +130082,10 @@ index 918b117..7af374b7 100644
extern struct pid_namespace init_pid_ns;
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
-index eb8b8ac..deb6089 100644
+index 24f5470..deb6089 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
-@@ -42,21 +42,23 @@ struct pipe_buffer {
- * @fasync_readers: reader side fasync
- * @fasync_writers: writer side fasync
- * @bufs: the circular array of pipe buffers
-+ * @user: the user who created this pipe
- **/
- struct pipe_inode_info {
+@@ -48,10 +48,10 @@ struct pipe_inode_info {
struct mutex mutex;
wait_queue_head_t wait;
unsigned int nrbufs, curbuf, buffers;
@@ -105980,27 +130100,11 @@ index eb8b8ac..deb6089 100644
unsigned int r_counter;
unsigned int w_counter;
struct page *tmp_page;
- struct fasync_struct *fasync_readers;
- struct fasync_struct *fasync_writers;
- struct pipe_buffer *bufs;
-+ struct user_struct *user;
- };
-
- /*
-@@ -123,6 +125,8 @@ void pipe_unlock(struct pipe_inode_info *);
- void pipe_double_lock(struct pipe_inode_info *, struct pipe_inode_info *);
-
- extern unsigned int pipe_max_size, pipe_min_size;
-+extern unsigned long pipe_user_pages_hard;
-+extern unsigned long pipe_user_pages_soft;
- int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *);
-
-
diff --git a/include/linux/pm.h b/include/linux/pm.h
-index 528be67..4643a08 100644
+index 6a5d654..1051ebc 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
-@@ -630,6 +630,7 @@ struct dev_pm_domain {
+@@ -631,6 +631,7 @@ struct dev_pm_domain {
void (*sync)(struct device *dev);
void (*dismiss)(struct device *dev);
};
@@ -106009,7 +130113,7 @@ index 528be67..4643a08 100644
/*
* The PM_EVENT_ messages are also used by drivers implementing the legacy
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
-index ba4ced3..7ce2a56 100644
+index db21d39..39a6aaa 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -35,7 +35,7 @@ struct gpd_dev_ops {
@@ -106022,10 +130126,10 @@ index ba4ced3..7ce2a56 100644
struct generic_pm_domain {
struct dev_pm_domain domain; /* PM domain operations */
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
-index 3bdbb41..2a6f56c 100644
+index 7af093d..122df16 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
-@@ -110,7 +110,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
+@@ -111,7 +111,7 @@ static inline bool pm_runtime_callbacks_present(struct device *dev)
static inline void pm_runtime_mark_last_busy(struct device *dev)
{
@@ -106048,10 +130152,10 @@ index 5df733b..d55f252 100644
/* config parameters */
#define PNP_CONFIG_NORMAL 0x0001
diff --git a/include/linux/poison.h b/include/linux/poison.h
-index 317e16d..ec214cb 100644
+index 4a27153..8106d5c 100644
--- a/include/linux/poison.h
+++ b/include/linux/poison.h
-@@ -19,15 +19,15 @@
+@@ -19,8 +19,8 @@
* under normal circumstances, used to verify that nobody uses
* non-initialized list entries.
*/
@@ -106062,14 +130166,6 @@ index 317e16d..ec214cb 100644
/********** include/linux/timer.h **********/
/*
- * Magic number "tsta" to indicate a static timer initializer
- * for the object debugging code.
- */
--#define TIMER_ENTRY_STATIC ((void *) 0x74737461)
-+#define TIMER_ENTRY_STATIC ((void *) 0x300 + POISON_POINTER_DELTA)
-
- /********** mm/debug-pagealloc.c **********/
- #define PAGE_POISON 0xaa
diff --git a/include/linux/power/smartreflex.h b/include/linux/power/smartreflex.h
index d8b187c3..9a9257a 100644
--- a/include/linux/power/smartreflex.h
@@ -106169,9 +130265,18 @@ index 75e4e30..fcfde15 100644
#define preempt_set_need_resched() \
do { \
diff --git a/include/linux/printk.h b/include/linux/printk.h
-index 9729565..e5e5255 100644
+index 9ccbdf2..9987ac2 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
+@@ -43,7 +43,7 @@ static inline const char *printk_skip_level(const char *buffer)
+ #define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
+ #define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
+
+-extern int console_printk[];
++extern int console_printk[4];
+
+ #define console_loglevel (console_printk[0])
+ #define default_message_loglevel (console_printk[1])
@@ -123,6 +123,7 @@ void early_printk(const char *s, ...) { }
#endif
@@ -106286,7 +130391,7 @@ index b2505ac..5f7ab55 100644
extern bool qid_valid(struct kqid qid);
diff --git a/include/linux/random.h b/include/linux/random.h
-index a75840c..e7c4305 100644
+index 9c29122..9112a5b9 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -18,9 +18,19 @@ struct random_ready_callback {
@@ -106311,7 +130416,7 @@ index a75840c..e7c4305 100644
extern void get_random_bytes(void *buf, int nbytes);
extern int add_random_ready_callback(struct random_ready_callback *rdy);
-@@ -52,6 +62,11 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
+@@ -53,6 +63,11 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
#define prandom_init_once(pcpu_state) \
DO_ONCE(prandom_seed_full_state, (pcpu_state))
@@ -106323,7 +130428,7 @@ index a75840c..e7c4305 100644
/**
* prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro)
* @ep_ro: right open interval endpoint
-@@ -64,7 +79,7 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
+@@ -65,7 +80,7 @@ void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
*
* Returns: pseudo-random number in interval [0, ep_ro)
*/
@@ -106348,7 +130453,7 @@ index 14d7b83..a1edf56 100644
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
-index 5ed5409..92c9f6a 100644
+index 14ec165..45c00c5 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -59,6 +59,9 @@ void __list_add_rcu(struct list_head *new,
@@ -106396,10 +130501,10 @@ index 5ed5409..92c9f6a 100644
* hlist_del_init_rcu - deletes entry from hash list with re-initialization
* @n: the element to delete from the hash list.
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
-index a0189ba..7e34269 100644
+index 14e6f47..0e6846b 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
-@@ -854,6 +854,7 @@ static inline void rcu_preempt_sleep_check(void)
+@@ -867,6 +867,7 @@ static inline void rcu_preempt_sleep_check(void)
* read-side critical sections may be preempted and they may also block, but
* only when acquiring spinlocks that are subject to priority inheritance.
*/
@@ -106407,7 +130512,7 @@ index a0189ba..7e34269 100644
static inline void rcu_read_lock(void)
{
__rcu_read_lock();
-@@ -908,6 +909,7 @@ static inline void rcu_read_lock(void)
+@@ -921,6 +922,7 @@ static inline void rcu_read_lock(void)
*
* See rcu_read_lock() for more information.
*/
@@ -106415,7 +130520,7 @@ index a0189ba..7e34269 100644
static inline void rcu_read_unlock(void)
{
RCU_LOCKDEP_WARN(!rcu_is_watching(),
-@@ -934,6 +936,7 @@ static inline void rcu_read_unlock(void)
+@@ -947,6 +949,7 @@ static inline void rcu_read_unlock(void)
* rcu_read_unlock_bh() from one task if the matching rcu_read_lock_bh()
* was invoked from some other task.
*/
@@ -106423,7 +130528,7 @@ index a0189ba..7e34269 100644
static inline void rcu_read_lock_bh(void)
{
local_bh_disable();
-@@ -948,6 +951,7 @@ static inline void rcu_read_lock_bh(void)
+@@ -961,6 +964,7 @@ static inline void rcu_read_lock_bh(void)
*
* See rcu_read_lock_bh() for more information.
*/
@@ -106431,7 +130536,7 @@ index a0189ba..7e34269 100644
static inline void rcu_read_unlock_bh(void)
{
RCU_LOCKDEP_WARN(!rcu_is_watching(),
-@@ -970,6 +974,7 @@ static inline void rcu_read_unlock_bh(void)
+@@ -983,6 +987,7 @@ static inline void rcu_read_unlock_bh(void)
* rcu_read_unlock_sched() from process context if the matching
* rcu_read_lock_sched() was invoked from an NMI handler.
*/
@@ -106439,7 +130544,7 @@ index a0189ba..7e34269 100644
static inline void rcu_read_lock_sched(void)
{
preempt_disable();
-@@ -980,6 +985,7 @@ static inline void rcu_read_lock_sched(void)
+@@ -993,6 +998,7 @@ static inline void rcu_read_lock_sched(void)
}
/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
@@ -106447,7 +130552,7 @@ index a0189ba..7e34269 100644
static inline notrace void rcu_read_lock_sched_notrace(void)
{
preempt_disable_notrace();
-@@ -991,6 +997,7 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
+@@ -1004,6 +1010,7 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
*
* See rcu_read_lock_sched for more information.
*/
@@ -106455,7 +130560,7 @@ index a0189ba..7e34269 100644
static inline void rcu_read_unlock_sched(void)
{
RCU_LOCKDEP_WARN(!rcu_is_watching(),
-@@ -1001,6 +1008,7 @@ static inline void rcu_read_unlock_sched(void)
+@@ -1014,6 +1021,7 @@ static inline void rcu_read_unlock_sched(void)
}
/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
@@ -106543,10 +130648,10 @@ index cde976e..ebd6033 100644
#define RIO_RESOURCE_MEM 0x00000100
#define RIO_RESOURCE_DOORBELL 0x00000200
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
-index ddda2ac..4c6b6e1 100644
+index a07f42b..6b04a8d 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
-@@ -135,8 +135,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma)
+@@ -136,8 +136,8 @@ static inline void anon_vma_unlock_read(struct anon_vma *anon_vma)
void anon_vma_init(void); /* create anon_vma_cachep */
int anon_vma_prepare(struct vm_area_struct *);
void unlink_anon_vmas(struct vm_area_struct *);
@@ -106590,7 +130695,7 @@ index 556ec1e..38c19c9 100644
/*
diff --git a/include/linux/sched.h b/include/linux/sched.h
-index 21a6e96..25820d8 100644
+index a10494a..2facd6d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -7,7 +7,7 @@
@@ -106610,7 +130715,7 @@ index 21a6e96..25820d8 100644
#define VMACACHE_BITS 2
#define VMACACHE_SIZE (1U << VMACACHE_BITS)
-@@ -437,6 +438,19 @@ struct nsproxy;
+@@ -441,6 +442,19 @@ struct nsproxy;
struct user_namespace;
#ifdef CONFIG_MMU
@@ -106630,7 +130735,7 @@ index 21a6e96..25820d8 100644
extern void arch_pick_mmap_layout(struct mm_struct *mm);
extern unsigned long
arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
-@@ -769,6 +783,17 @@ struct signal_struct {
+@@ -773,6 +787,17 @@ struct signal_struct {
#ifdef CONFIG_TASKSTATS
struct taskstats *stats;
#endif
@@ -106648,7 +130753,7 @@ index 21a6e96..25820d8 100644
#ifdef CONFIG_AUDIT
unsigned audit_tty;
unsigned audit_tty_log_passwd;
-@@ -783,7 +808,7 @@ struct signal_struct {
+@@ -787,7 +812,7 @@ struct signal_struct {
struct mutex cred_guard_mutex; /* guard against foreign influences on
* credential calculations
* (notably. ptrace) */
@@ -106657,14 +130762,7 @@ index 21a6e96..25820d8 100644
/*
* Bits in flags field of signal_struct.
-@@ -831,12 +856,21 @@ struct user_struct {
- #endif
- unsigned long locked_shm; /* How many pages of mlocked shm ? */
- unsigned long unix_inflight; /* How many files in flight in unix sockets */
-+ atomic_long_t pipe_bufs; /* how many pages are allocated in pipe buffers */
-
- #ifdef CONFIG_KEYS
- struct key *uid_keyring; /* UID specific keyring */
+@@ -842,6 +867,14 @@ struct user_struct {
struct key *session_keyring; /* UID's default session keyring */
#endif
@@ -106679,7 +130777,7 @@ index 21a6e96..25820d8 100644
/* Hash table maintenance information */
struct hlist_node uidhash_node;
kuid_t uid;
-@@ -844,7 +878,7 @@ struct user_struct {
+@@ -849,7 +882,7 @@ struct user_struct {
#if defined(CONFIG_PERF_EVENTS) || defined(CONFIG_BPF_SYSCALL)
atomic_long_t locked_vm;
#endif
@@ -106688,7 +130786,7 @@ index 21a6e96..25820d8 100644
extern int uids_sysfs_init(void);
-@@ -1379,6 +1413,9 @@ struct tlbflush_unmap_batch {
+@@ -1389,6 +1422,9 @@ struct tlbflush_unmap_batch {
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
void *stack;
@@ -106698,7 +130796,7 @@ index 21a6e96..25820d8 100644
atomic_t usage;
unsigned int flags; /* per process flags, defined below */
unsigned int ptrace;
-@@ -1514,8 +1551,8 @@ struct task_struct {
+@@ -1524,8 +1560,8 @@ struct task_struct {
struct list_head thread_node;
struct completion *vfork_done; /* for vfork() */
@@ -106709,7 +130807,7 @@ index 21a6e96..25820d8 100644
cputime_t utime, stime, utimescaled, stimescaled;
cputime_t gtime;
-@@ -1538,11 +1575,6 @@ struct task_struct {
+@@ -1551,11 +1587,6 @@ struct task_struct {
struct task_cputime cputime_expires;
struct list_head cpu_timers[3];
@@ -106721,7 +130819,7 @@ index 21a6e96..25820d8 100644
char comm[TASK_COMM_LEN]; /* executable name excluding path
- access with [gs]et_task_comm (which lock
it with task_lock())
-@@ -1558,6 +1590,8 @@ struct task_struct {
+@@ -1571,6 +1602,8 @@ struct task_struct {
/* hung task detection */
unsigned long last_switch_count;
#endif
@@ -106730,8 +130828,8 @@ index 21a6e96..25820d8 100644
/* filesystem information */
struct fs_struct *fs;
/* open file information */
-@@ -1632,6 +1666,10 @@ struct task_struct {
- gfp_t lockdep_reclaim_gfp;
+@@ -1648,6 +1681,10 @@ struct task_struct {
+ unsigned int in_ubsan;
#endif
+/* process credentials */
@@ -106741,7 +130839,7 @@ index 21a6e96..25820d8 100644
/* journalling filesystem info */
void *journal_info;
-@@ -1670,6 +1708,10 @@ struct task_struct {
+@@ -1686,6 +1723,10 @@ struct task_struct {
/* cg_list protected by css_set_lock and tsk->alloc_lock */
struct list_head cg_list;
#endif
@@ -106752,7 +130850,7 @@ index 21a6e96..25820d8 100644
#ifdef CONFIG_FUTEX
struct robust_list_head __user *robust_list;
#ifdef CONFIG_COMPAT
-@@ -1785,7 +1827,7 @@ struct task_struct {
+@@ -1801,7 +1842,7 @@ struct task_struct {
* Number of functions that haven't been traced
* because of depth overrun.
*/
@@ -106761,7 +130859,7 @@ index 21a6e96..25820d8 100644
/* Pause for the tracing */
atomic_t tracing_graph_pause;
#endif
-@@ -1814,22 +1856,89 @@ struct task_struct {
+@@ -1830,22 +1871,89 @@ struct task_struct {
unsigned long task_state_change;
#endif
int pagefault_disabled;
@@ -106861,7 +130959,7 @@ index 21a6e96..25820d8 100644
/* Future-safe accessor for struct task_struct's cpus_allowed. */
#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
-@@ -1911,7 +2020,7 @@ struct pid_namespace;
+@@ -1927,7 +2035,7 @@ struct pid_namespace;
pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
struct pid_namespace *ns);
@@ -106870,7 +130968,7 @@ index 21a6e96..25820d8 100644
{
return tsk->pid;
}
-@@ -2273,6 +2382,25 @@ extern u64 sched_clock_cpu(int cpu);
+@@ -2289,6 +2397,25 @@ extern u64 sched_clock_cpu(int cpu);
extern void sched_clock_init(void);
@@ -106896,7 +130994,7 @@ index 21a6e96..25820d8 100644
#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
static inline void sched_clock_tick(void)
{
-@@ -2401,7 +2529,9 @@ extern void set_curr_task(int cpu, struct task_struct *p);
+@@ -2417,7 +2544,9 @@ extern void set_curr_task(int cpu, struct task_struct *p);
void yield(void);
union thread_union {
@@ -106906,7 +131004,7 @@ index 21a6e96..25820d8 100644
unsigned long stack[THREAD_SIZE/sizeof(long)];
};
-@@ -2434,6 +2564,7 @@ extern struct pid_namespace init_pid_ns;
+@@ -2450,6 +2579,7 @@ extern struct pid_namespace init_pid_ns;
*/
extern struct task_struct *find_task_by_vpid(pid_t nr);
@@ -106914,7 +131012,7 @@ index 21a6e96..25820d8 100644
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
struct pid_namespace *ns);
-@@ -2465,7 +2596,7 @@ extern void proc_caches_init(void);
+@@ -2481,7 +2611,7 @@ extern void proc_caches_init(void);
extern void flush_signals(struct task_struct *);
extern void ignore_signals(struct task_struct *);
extern void flush_signal_handlers(struct task_struct *, int force_default);
@@ -106923,7 +131021,7 @@ index 21a6e96..25820d8 100644
static inline int kernel_dequeue_signal(siginfo_t *info)
{
-@@ -2619,7 +2750,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
+@@ -2635,7 +2765,7 @@ extern void __cleanup_sighand(struct sighand_struct *);
extern void exit_itimers(struct signal_struct *);
extern void flush_itimer_signals(void);
@@ -106932,7 +131030,7 @@ index 21a6e96..25820d8 100644
extern int do_execve(struct filename *,
const char __user * const __user *,
-@@ -2734,11 +2865,13 @@ static inline int thread_group_empty(struct task_struct *p)
+@@ -2750,11 +2880,13 @@ static inline int thread_group_empty(struct task_struct *p)
* It must not be nested with write_lock_irq(&tasklist_lock),
* neither inside nor outside.
*/
@@ -106946,7 +131044,7 @@ index 21a6e96..25820d8 100644
static inline void task_unlock(struct task_struct *p)
{
spin_unlock(&p->alloc_lock);
-@@ -2824,9 +2957,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
+@@ -2840,9 +2972,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
#define task_stack_end_corrupted(task) \
(*(end_of_stack(task)) != STACK_END_MAGIC)
@@ -106984,7 +131082,7 @@ index 49a35d6..c6209dd 100644
#define SCIF_OPEN_FAILED ((scif_epd_t)-1)
#define SCIF_REGISTER_FAILED ((off_t)-1)
diff --git a/include/linux/security.h b/include/linux/security.h
-index 2f4c1f7..5bc05d7 100644
+index 4824a4c..1fe498a 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -28,6 +28,7 @@
@@ -107136,7 +131234,7 @@ index e058210..386666a 100644
{
spin_unlock(&sl->lock);
diff --git a/include/linux/shm.h b/include/linux/shm.h
-index 6fb8016..2cf60e7 100644
+index 04e8818..af85805 100644
--- a/include/linux/shm.h
+++ b/include/linux/shm.h
@@ -22,7 +22,11 @@ struct shmid_kernel /* private to the kernel */
@@ -107166,10 +131264,10 @@ index 92557bb..53fa513 100644
static inline void disallow_signal(int sig)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 4fde618..6d6edb3 100644
+index d3fcd45..67f86da 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -809,7 +809,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
+@@ -889,7 +889,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
int node);
struct sk_buff *__build_skb(void *data, unsigned int frag_size);
struct sk_buff *build_skb(void *data, unsigned int frag_size);
@@ -107178,7 +131276,7 @@ index 4fde618..6d6edb3 100644
gfp_t priority)
{
return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
-@@ -2104,7 +2104,7 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb)
+@@ -2186,7 +2186,7 @@ static inline int skb_checksum_start_offset(const struct sk_buff *skb)
return skb->csum_start - skb_headroom(skb);
}
@@ -107187,7 +131285,7 @@ index 4fde618..6d6edb3 100644
{
return skb_transport_header(skb) - skb->data;
}
-@@ -2119,7 +2119,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
+@@ -2201,7 +2201,7 @@ static inline u32 skb_inner_network_header_len(const struct sk_buff *skb)
return skb->inner_transport_header - skb->inner_network_header;
}
@@ -107196,7 +131294,7 @@ index 4fde618..6d6edb3 100644
{
return skb_network_header(skb) - skb->data;
}
-@@ -2179,7 +2179,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
+@@ -2261,7 +2261,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD
@@ -107205,7 +131303,7 @@ index 4fde618..6d6edb3 100644
#endif
int ___pskb_trim(struct sk_buff *skb, unsigned int len);
-@@ -2836,9 +2836,9 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
+@@ -2924,9 +2924,9 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
int *err);
unsigned int datagram_poll(struct file *file, struct socket *sock,
struct poll_table_struct *wait);
@@ -107217,7 +131315,7 @@ index 4fde618..6d6edb3 100644
struct msghdr *msg, int size)
{
return skb_copy_datagram_iter(from, offset, &msg->msg_iter, size);
-@@ -3367,6 +3367,9 @@ static inline void nf_reset(struct sk_buff *skb)
+@@ -3455,6 +3455,9 @@ static inline void nf_reset(struct sk_buff *skb)
nf_bridge_put(skb->nf_bridge);
skb->nf_bridge = NULL;
#endif
@@ -107228,7 +131326,7 @@ index 4fde618..6d6edb3 100644
static inline void nf_reset_trace(struct sk_buff *skb)
diff --git a/include/linux/slab.h b/include/linux/slab.h
-index 2037a86..58fd323 100644
+index 3627d5c..f3bd455 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -15,14 +15,29 @@
@@ -107261,7 +131359,7 @@ index 2037a86..58fd323 100644
#define SLAB_HWCACHE_ALIGN 0x00002000UL /* Align objs on cache lines */
#define SLAB_CACHE_DMA 0x00004000UL /* Use GFP_DMA memory */
#define SLAB_STORE_USER 0x00010000UL /* DEBUG: Store the last owner for bug hunting */
-@@ -98,10 +113,13 @@
+@@ -103,10 +118,13 @@
* ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.
* Both make kfree a no-op.
*/
@@ -107278,7 +131376,7 @@ index 2037a86..58fd323 100644
#include <linux/kmemleak.h>
#include <linux/kasan.h>
-@@ -143,6 +161,8 @@ void * __must_check krealloc(const void *, size_t, gfp_t);
+@@ -148,6 +166,8 @@ void * __must_check krealloc(const void *, size_t, gfp_t);
void kfree(const void *);
void kzfree(const void *);
size_t ksize(const void *);
@@ -107287,7 +131385,7 @@ index 2037a86..58fd323 100644
/*
* Some archs want to perform DMA into kmalloc caches and need a guaranteed
-@@ -253,6 +273,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
+@@ -258,6 +278,10 @@ extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
#endif
@@ -107298,7 +131396,7 @@ index 2037a86..58fd323 100644
/*
* Figure out which kmalloc slab an allocation of a certain size
* belongs to.
-@@ -261,7 +285,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
+@@ -266,7 +290,7 @@ extern struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
* 2 = 129 .. 192 bytes
* n = 2^(n-1)+1 .. 2^n
*/
@@ -107307,7 +131405,7 @@ index 2037a86..58fd323 100644
{
if (!size)
return 0;
-@@ -304,7 +328,7 @@ static __always_inline int kmalloc_index(size_t size)
+@@ -309,7 +333,7 @@ static __always_inline int kmalloc_index(size_t size)
}
#endif /* !CONFIG_SLOB */
@@ -107316,7 +131414,7 @@ index 2037a86..58fd323 100644
void *kmem_cache_alloc(struct kmem_cache *, gfp_t flags) __assume_slab_alignment;
void kmem_cache_free(struct kmem_cache *, void *);
-@@ -319,10 +343,10 @@ void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **);
+@@ -324,10 +348,10 @@ void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **);
int kmem_cache_alloc_bulk(struct kmem_cache *, gfp_t, size_t, void **);
#ifdef CONFIG_NUMA
@@ -107330,7 +131428,7 @@ index 2037a86..58fd323 100644
return __kmalloc(size, flags);
}
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
-index 33d0490..70a6313 100644
+index cf139d3fa..b3b3358 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -40,7 +40,7 @@ struct kmem_cache {
@@ -107362,7 +131460,7 @@ index 33d0490..70a6313 100644
/*
* If debugging is enabled, then the allocator can add additional
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
-index 3388511..6252f90 100644
+index b7e57927..a8087e0 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -74,7 +74,7 @@ struct kmem_cache {
@@ -107389,13 +131487,13 @@ index c441407..f487b83 100644
/*
* Callback to arch code if there's nosmp or maxcpus=0 on the
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
-index fddebc6..6f0ae39 100644
+index 4018b48..68baf26 100644
--- a/include/linux/sock_diag.h
+++ b/include/linux/sock_diag.h
-@@ -15,7 +15,7 @@ struct sock_diag_handler {
- __u8 family;
+@@ -16,7 +16,7 @@ struct sock_diag_handler {
int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
int (*get_info)(struct sk_buff *skb, struct sock *sk);
+ int (*destroy)(struct sk_buff *skb, struct nlmsghdr *nlh);
-};
+} __do_const;
@@ -107581,11 +131679,11 @@ index cc0fc71..b70c6b1 100644
/*
* Mode for mapping cpus to pools.
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
-index f869807..6ab4834 100644
+index 5322fea..b8ca311 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
-@@ -53,15 +53,15 @@ extern unsigned int svcrdma_ord;
- extern unsigned int svcrdma_max_requests;
+@@ -54,15 +54,15 @@ extern unsigned int svcrdma_max_requests;
+ extern unsigned int svcrdma_max_bc_requests;
extern unsigned int svcrdma_max_req_size;
-extern atomic_t rdma_stat_recv;
@@ -107610,10 +131708,10 @@ index f869807..6ab4834 100644
/*
* Contexts are built when an RDMA request is created and are a
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
-index 8d71d65..f79586e 100644
+index c00f53a..8802c3b 100644
--- a/include/linux/sunrpc/svcauth.h
+++ b/include/linux/sunrpc/svcauth.h
-@@ -120,7 +120,7 @@ struct auth_ops {
+@@ -127,7 +127,7 @@ struct auth_ops {
int (*release)(struct svc_rqst *rq);
void (*domain_release)(struct auth_domain *);
int (*set_client)(struct svc_rqst *rq);
@@ -107663,10 +131761,10 @@ index 5c3a5f3..84a8bef 100644
#else
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
-index e7a018e..49f8b17 100644
+index 017fced..d4a9fc9 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
-@@ -60,7 +60,8 @@ extern void
+@@ -63,7 +63,8 @@ extern void
extern void
swiotlb_free_coherent(struct device *hwdev, size_t size,
@@ -107677,7 +131775,7 @@ index e7a018e..49f8b17 100644
extern dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size,
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
-index c2b66a2..888e225 100644
+index 185815c..9901529 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -102,7 +102,12 @@ union bpf_attr;
@@ -107694,7 +131792,30 @@ index c2b66a2..888e225 100644
#define __SC_CAST(t, a) (t) a
#define __SC_ARGS(t, a) a
#define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long))
-@@ -384,11 +389,11 @@ asmlinkage long sys_sync(void);
+@@ -192,17 +197,18 @@ extern struct trace_event_functions exit_syscall_print_funcs;
+
+ #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__)
+ #define __SYSCALL_DEFINEx(x, name, ...) \
+- asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
+- __attribute__((alias(__stringify(SyS##name)))); \
+ static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
+- asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
+- asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
++ static inline asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
+ { \
+ long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \
+ __MAP(x,__SC_TEST,__VA_ARGS__); \
+ __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
+ return ret; \
+ } \
++ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
++ { \
++ return SyS##name(__MAP(x,__SC_ARGS,__VA_ARGS__)); \
++ } \
+ static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))
+
+ asmlinkage long sys32_quotactl(unsigned int cmd, const char __user *special,
+@@ -384,11 +390,11 @@ asmlinkage long sys_sync(void);
asmlinkage long sys_fsync(unsigned int fd);
asmlinkage long sys_fdatasync(unsigned int fd);
asmlinkage long sys_bdflush(int func, long data);
@@ -107710,7 +131831,7 @@ index c2b66a2..888e225 100644
asmlinkage long sys_truncate(const char __user *path, long length);
asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length);
asmlinkage long sys_stat(const char __user *filename,
-@@ -604,7 +609,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
+@@ -604,7 +610,7 @@ asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
asmlinkage long sys_send(int, void __user *, size_t, unsigned);
asmlinkage long sys_sendto(int, void __user *, size_t, unsigned,
@@ -107719,7 +131840,7 @@ index c2b66a2..888e225 100644
asmlinkage long sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned flags);
asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg,
unsigned int vlen, unsigned flags);
-@@ -663,10 +668,10 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf);
+@@ -663,10 +669,10 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf);
asmlinkage long sys_semget(key_t key, int nsems, int semflg);
asmlinkage long sys_semop(int semid, struct sembuf __user *sops,
@@ -107732,7 +131853,16 @@ index c2b66a2..888e225 100644
const struct timespec __user *timeout);
asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
asmlinkage long sys_shmget(key_t key, size_t size, int flag);
-@@ -879,7 +884,7 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
+@@ -700,7 +706,7 @@ asmlinkage long sys_sysfs(int option,
+ unsigned long arg1, unsigned long arg2);
+ asmlinkage long sys_syslog(int type, char __user *buf, int len);
+ asmlinkage long sys_uselib(const char __user *library);
+-asmlinkage long sys_ni_syscall(void);
++asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
+ asmlinkage long sys_ptrace(long request, long pid, unsigned long addr,
+ unsigned long data);
+
+@@ -879,7 +885,7 @@ asmlinkage long sys_seccomp(unsigned int op, unsigned int flags,
const char __user *uargs);
asmlinkage long sys_getrandom(char __user *buf, size_t count,
unsigned int flags);
@@ -107890,10 +132020,10 @@ index b386361..cc87028 100644
unsigned int keepalive_intvl; /* time interval between keep alive probes */
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
-index ff307b5..f1a4468 100644
+index b4c2a48..0a13f65 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
-@@ -145,6 +145,13 @@ static inline bool test_and_clear_restore_sigmask(void)
+@@ -146,6 +146,13 @@ static inline bool test_and_clear_restore_sigmask(void)
#error "no set_restore_sigmask() provided and default one won't work"
#endif
@@ -107908,7 +132038,7 @@ index ff307b5..f1a4468 100644
#endif /* _LINUX_THREAD_INFO_H */
diff --git a/include/linux/tty.h b/include/linux/tty.h
-index 3bf03b6..340cab9 100644
+index 19199c2..e16a361 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -225,7 +225,7 @@ struct tty_port {
@@ -107929,7 +132059,7 @@ index 3bf03b6..340cab9 100644
/* Each of a tty's open files has private_data pointing to tty_file_private */
struct tty_file_private {
-@@ -575,7 +575,7 @@ extern int tty_port_open(struct tty_port *port,
+@@ -570,7 +570,7 @@ extern int tty_port_open(struct tty_port *port,
struct tty_struct *tty, struct file *filp);
static inline int tty_port_users(struct tty_port *port)
{
@@ -108005,17 +132135,18 @@ index 70dd3df..c61727f 100644
struct list_head {
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
-index 558129a..0c26e08 100644
+index 3495578..f479218 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
-@@ -109,6 +109,6 @@ extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count);
+@@ -109,7 +109,7 @@ extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count);
* Returns 0 on success, or -EFAULT.
*/
#define probe_kernel_address(addr, retval) \
- probe_kernel_read(&retval, addr, sizeof(retval))
+ probe_kernel_read(&(retval), addr, sizeof(retval))
- #endif /* __LINUX_UACCESS_H__ */
+ #ifndef user_access_begin
+ #define user_access_begin() do { } while (0)
diff --git a/include/linux/uidgid.h b/include/linux/uidgid.h
index 0383552..a0125dd 100644
--- a/include/linux/uidgid.h
@@ -108095,7 +132226,7 @@ index 99c1b4d..562e6f3 100644
static inline void put_unaligned_le16(u16 val, void *p)
diff --git a/include/linux/usb.h b/include/linux/usb.h
-index b79925d..67cf5d4 100644
+index 89533ba..78c419a 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -367,7 +367,7 @@ struct usb_bus {
@@ -108107,7 +132238,7 @@ index b79925d..67cf5d4 100644
int devnum_next; /* Next open device number in
* round-robin allocation */
-@@ -600,7 +600,7 @@ struct usb_device {
+@@ -598,7 +598,7 @@ struct usb_device {
int maxchild;
u32 quirks;
@@ -108116,7 +132247,7 @@ index b79925d..67cf5d4 100644
unsigned long active_duration;
-@@ -1793,10 +1793,10 @@ void usb_sg_wait(struct usb_sg_request *io);
+@@ -1791,10 +1791,10 @@ void usb_sg_wait(struct usb_sg_request *io);
/* NOTE: these are not the standard USB_ENDPOINT_XFER_* values!! */
/* (yet ... they're the values used by usbfs) */
@@ -108132,7 +132263,7 @@ index b79925d..67cf5d4 100644
#define usb_pipein(pipe) ((pipe) & USB_DIR_IN)
#define usb_pipeout(pipe) (!usb_pipein(pipe))
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
-index f89c24b..843dfb8 100644
+index 4dcf844..03630b4 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -23,6 +23,7 @@
@@ -108144,7 +132275,7 @@ index f89c24b..843dfb8 100644
#define MAX_TOPO_LEVEL 6
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
-index bfb7472..b308c8d 100644
+index 4db191f..188ca98 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -39,7 +39,7 @@ enum {
@@ -108259,10 +132390,10 @@ index 69e1d4a1..566fa52 100644
#endif
#endif /* _LINUX_VGA_SWITCHEROO_H_ */
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
-index 3bff87a..66d8171 100644
+index d1f1d33..10415f2 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
-@@ -18,6 +18,14 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
+@@ -17,6 +17,14 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
#define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */
#define VM_NO_GUARD 0x00000040 /* don't add guard page */
#define VM_KASAN 0x00000080 /* has allocated kasan shadow memory */
@@ -108277,7 +132408,7 @@ index 3bff87a..66d8171 100644
/* bits [20..32] reserved for arch specific ioremap internals */
/*
-@@ -67,6 +75,7 @@ static inline void vmalloc_init(void)
+@@ -66,6 +74,7 @@ static inline void vmalloc_init(void)
#endif
extern void *vmalloc(unsigned long size);
@@ -108285,7 +132416,7 @@ index 3bff87a..66d8171 100644
extern void *vzalloc(unsigned long size);
extern void *vmalloc_user(unsigned long size);
extern void *vmalloc_node(unsigned long size, int node);
-@@ -86,6 +95,10 @@ extern void *vmap(struct page **pages, unsigned int count,
+@@ -85,6 +94,10 @@ extern void *vmap(struct page **pages, unsigned int count,
unsigned long flags, pgprot_t prot);
extern void vunmap(const void *addr);
@@ -108296,7 +132427,7 @@ index 3bff87a..66d8171 100644
extern int remap_vmalloc_range_partial(struct vm_area_struct *vma,
unsigned long uaddr, void *kaddr,
unsigned long size);
-@@ -150,7 +163,7 @@ extern void free_vm_area(struct vm_struct *area);
+@@ -149,7 +162,7 @@ extern void free_vm_area(struct vm_struct *area);
/* for /dev/kmem */
extern long vread(char *buf, char *addr, unsigned long count);
@@ -108306,7 +132437,7 @@ index 3bff87a..66d8171 100644
/*
* Internals. Dont't use..
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
-index 3e5d907..037e86c 100644
+index 73fae8c..61f415d 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -108,18 +108,18 @@ static inline void vm_events_fold_cpu(int cpu)
@@ -108355,7 +132486,7 @@ index 3e5d907..037e86c 100644
#ifdef CONFIG_SMP
int cpu;
-@@ -212,14 +212,14 @@ static inline void __mod_zone_page_state(struct zone *zone,
+@@ -213,14 +213,14 @@ static inline void __mod_zone_page_state(struct zone *zone,
static inline void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
{
@@ -108390,10 +132521,10 @@ index d0b5ca5..c13529b 100644
spin_unlock(&inode->i_lock);
}
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
-index 89474b9..31b5dcb 100644
+index 4457541..cb0d355 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
-@@ -30,7 +30,7 @@ struct xattr_handler {
+@@ -34,7 +34,7 @@ struct xattr_handler {
int (*set)(const struct xattr_handler *, struct dentry *dentry,
const char *name, const void *buffer, size_t size,
int flags);
@@ -108402,7 +132533,7 @@ index 89474b9..31b5dcb 100644
const char *xattr_full_name(const struct xattr_handler *, const char *);
-@@ -41,6 +41,9 @@ struct xattr {
+@@ -45,6 +45,9 @@ struct xattr {
};
ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t);
@@ -108434,7 +132565,7 @@ index 92dbbd3..13ab0b3 100644
Returns the number of bytes that needs to be allocated for a per-
stream workspace with the specified parameters. A pointer to this
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
-index acbcd2f..c3abe84 100644
+index eeabf20..817154b 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -74,7 +74,7 @@ struct v4l2_file_operations {
@@ -108486,10 +132617,10 @@ index 9b4c418..f3ff431 100644
#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
-index 5289929..b4c41b3 100644
+index 5ee3c68..54f883a 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
-@@ -613,7 +613,7 @@ struct l2cap_ops {
+@@ -619,7 +619,7 @@ struct l2cap_ops {
struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
unsigned long hdr_len,
unsigned long len, int nb);
@@ -108499,10 +132630,10 @@ index 5289929..b4c41b3 100644
struct l2cap_conn {
struct hci_conn *hcon;
diff --git a/include/net/bonding.h b/include/net/bonding.h
-index 93abe5f..65b0405 100644
+index 791800d..db75e5f 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
-@@ -669,7 +669,7 @@ extern struct rtnl_link_ops bond_link_ops;
+@@ -702,7 +702,7 @@ extern struct rtnl_link_ops bond_link_ops;
static inline void bond_tx_drop(struct net_device *dev, struct sk_buff *skb)
{
@@ -108535,6 +132666,55 @@ index f2ae33d..c457cf0 100644
struct list_head list;
/* Protects from simultaneous access to first_req list */
spinlock_t info_list_lock;
+diff --git a/include/net/cfg80211-wext.h b/include/net/cfg80211-wext.h
+index 25baddc..f9a1374 100644
+--- a/include/net/cfg80211-wext.h
++++ b/include/net/cfg80211-wext.h
+@@ -22,34 +22,34 @@
+ */
+ int cfg80211_wext_giwname(struct net_device *dev,
+ struct iw_request_info *info,
+- char *name, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
+- u32 *mode, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
+- u32 *mode, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_siwscan(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_giwscan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_giwrange(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_siwrts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_giwrts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_siwfrag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *frag, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_giwfrag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *frag, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_giwretry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *retry, char *extra);
++ union iwreq_data *wrqu, char *extra);
+
+ #endif /* __NET_CFG80211_WEXT_H */
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 171cd76..15666d6 100644
--- a/include/net/cfg802154.h
@@ -108548,6 +132728,27 @@ index 171cd76..15666d6 100644
u8 min_be;
u8 max_be;
+diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
+index 59160de..f4dbdab 100644
+--- a/include/net/fib_rules.h
++++ b/include/net/fib_rules.h
+@@ -7,6 +7,7 @@
+ #include <linux/fib_rules.h>
+ #include <net/flow.h>
+ #include <net/rtnetlink.h>
++#include <net/ip6_fib.h>
+
+ struct fib_rule {
+ struct list_head list;
+@@ -33,7 +34,7 @@ struct fib_rule {
+ };
+
+ struct fib_lookup_arg {
+- void *lookup_ptr;
++ pol_lookup_t lookup_ptr;
+ void *result;
+ struct fib_rule *rule;
+ int flags;
diff --git a/include/net/flow.h b/include/net/flow.h
index 83969ee..ee0611d 100644
--- a/include/net/flow.h
@@ -108562,10 +132763,10 @@ index 83969ee..ee0611d 100644
__u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys);
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
-index 1b6b6dc..f6e691b 100644
+index 43c0e77..9f17774 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
-@@ -128,7 +128,7 @@ struct genl_ops {
+@@ -130,7 +130,7 @@ struct genl_ops {
u8 cmd;
u8 internal_flags;
u8 flags;
@@ -108601,10 +132802,10 @@ index 49dcad4..6d2c708 100644
/** inet_connection_sock - INET connection oriented sock
*
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
-index 625bdf9..5fd982c 100644
+index 012b1f9..6467f81 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
-@@ -43,7 +43,7 @@
+@@ -44,7 +44,7 @@
struct ip_options {
__be32 faddr;
__be32 nexthop;
@@ -108640,7 +132841,7 @@ index 1a98f1c..2a44de6 100644
static inline void ip_select_ident_segs(struct net *net, struct sk_buff *skb,
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
-index 3f98233..3d46645 100644
+index 4079fc1..cb82cad 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -174,7 +174,7 @@ __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh);
@@ -108689,10 +132890,10 @@ index 0816c87..b86fca5 100644
struct list_head est_list; /* estimator list */
spinlock_t est_lock;
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
-index 9a5c9f0..929c0e3 100644
+index 6570f379..91cd2cb 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
-@@ -756,7 +756,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
+@@ -771,7 +771,7 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
* to minimize possbility that any useful information to an
* attacker is leaked. Only lower 20 bits are relevant.
*/
@@ -108713,6 +132914,67 @@ index 8d4f588..2e37ad2 100644
#include <net/irda/irias_object.h>
#include <net/irda/ircomm_core.h>
+diff --git a/include/net/irda/irias_object.h b/include/net/irda/irias_object.h
+index 83f7808..a925cf8 100644
+--- a/include/net/irda/irias_object.h
++++ b/include/net/irda/irias_object.h
+@@ -83,7 +83,7 @@ void irias_insert_object(struct ias_object *obj);
+ int irias_delete_object(struct ias_object *obj);
+ int irias_delete_attrib(struct ias_object *obj, struct ias_attrib *attrib,
+ int cleanobject);
+-void __irias_delete_object(struct ias_object *obj);
++void __irias_delete_object(void *_obj);
+
+ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
+ int user);
+diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
+index f132924..f80b01d 100644
+--- a/include/net/irda/irlmp.h
++++ b/include/net/irda/irlmp.h
+@@ -194,6 +194,7 @@ struct irlmp_cb {
+ /* Prototype declarations */
+ int irlmp_init(void);
+ void irlmp_cleanup(void);
++void irlmp_kfree(void *arg);
+ struct lsap_cb *irlmp_open_lsap(__u8 slsap, notify_t *notify, __u8 pid);
+ void irlmp_close_lsap( struct lsap_cb *self);
+
+diff --git a/include/net/irda/irlmp_event.h b/include/net/irda/irlmp_event.h
+index 9e4ec17..c3247bb 100644
+--- a/include/net/irda/irlmp_event.h
++++ b/include/net/irda/irlmp_event.h
+@@ -82,9 +82,9 @@ typedef enum {
+ extern const char *const irlmp_state[];
+ extern const char *const irlsap_state[];
+
+-void irlmp_watchdog_timer_expired(void *data);
+-void irlmp_discovery_timer_expired(void *data);
+-void irlmp_idle_timer_expired(void *data);
++void irlmp_watchdog_timer_expired(unsigned long data);
++void irlmp_discovery_timer_expired(unsigned long data);
++void irlmp_idle_timer_expired(unsigned long data);
+
+ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
+ struct sk_buff *skb);
+diff --git a/include/net/irda/timer.h b/include/net/irda/timer.h
+index cb2615c..8223ae7 100644
+--- a/include/net/irda/timer.h
++++ b/include/net/irda/timer.h
+@@ -72,12 +72,10 @@ struct lap_cb;
+
+ #define WATCHDOG_TIMEOUT (20*HZ) /* 20 sec */
+
+-typedef void (*TIMER_CALLBACK)(void *);
+-
+ static inline void irda_start_timer(struct timer_list *ptimer, int timeout,
+- void* data, TIMER_CALLBACK callback)
++ void* data, void (*callback)(unsigned long))
+ {
+- ptimer->function = (void (*)(unsigned long)) callback;
++ ptimer->function = callback;
+ ptimer->data = (unsigned long) data;
+
+ /* Set new value for timer (update or add timer).
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h
index 714cc9a..ea05f3e 100644
--- a/include/net/iucv/af_iucv.h
@@ -108794,10 +133056,10 @@ index c4359e2..76dbc4a 100644
struct llc_sap_state {
u8 curr_state;
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
-index 760bc4d..84e4550 100644
+index 7c30faf..4c2d2d9 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1497,7 +1497,7 @@ enum ieee80211_key_flags {
+@@ -1501,7 +1501,7 @@ enum ieee80211_key_flags {
* @iv_len: The IV length for this key type
*/
struct ieee80211_key_conf {
@@ -108806,7 +133068,7 @@ index 760bc4d..84e4550 100644
u32 cipher;
u8 icv_len;
u8 iv_len;
-@@ -5142,7 +5142,7 @@ struct ieee80211_tx_rate_control {
+@@ -5198,7 +5198,7 @@ struct ieee80211_tx_rate_control {
struct sk_buff *skb;
struct ieee80211_tx_rate reported_rate;
bool rts, short_preamble;
@@ -108815,7 +133077,7 @@ index 760bc4d..84e4550 100644
u32 rate_idx_mask;
u8 *rate_idx_mcs_mask;
bool bss;
-@@ -5179,7 +5179,7 @@ struct rate_control_ops {
+@@ -5235,7 +5235,7 @@ struct rate_control_ops {
void (*remove_sta_debugfs)(void *priv, void *priv_sta);
u32 (*get_expected_throughput)(void *priv_sta);
@@ -108856,7 +133118,7 @@ index 8b68384..48fe40e 100644
enum {
NEIGH_ARP_TABLE = 0,
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
-index 2dcea63..31d53ba 100644
+index 4089abc..bf8084a 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -53,7 +53,7 @@ struct net {
@@ -108868,7 +133130,7 @@ index 2dcea63..31d53ba 100644
struct list_head list; /* list of network namespaces */
struct list_head cleanup_list; /* namespaces on death row */
-@@ -138,8 +138,8 @@ struct net {
+@@ -141,8 +141,8 @@ struct net {
struct netns_mpls mpls;
#endif
struct sock *diag_nlsk;
@@ -108879,7 +133141,7 @@ index 2dcea63..31d53ba 100644
#include <linux/seq_file_net.h>
-@@ -274,7 +274,11 @@ static inline struct net *read_pnet(const possible_net_t *pnet)
+@@ -277,7 +277,11 @@ static inline struct net *read_pnet(const possible_net_t *pnet)
#define __net_init __init
#define __net_exit __exit_refok
#define __net_initdata __initdata
@@ -108891,7 +133153,7 @@ index 2dcea63..31d53ba 100644
#endif
int peernet2id_alloc(struct net *net, struct net *peer);
-@@ -289,7 +293,7 @@ struct pernet_operations {
+@@ -292,7 +296,7 @@ struct pernet_operations {
void (*exit_batch)(struct list_head *net_exit_list);
int *id;
size_t size;
@@ -108900,7 +133162,7 @@ index 2dcea63..31d53ba 100644
/*
* Use these carefully. If you implement a network device and it
-@@ -337,12 +341,12 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
+@@ -340,12 +344,12 @@ static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
static inline int rt_genid_ipv4(struct net *net)
{
@@ -108915,7 +133177,7 @@ index 2dcea63..31d53ba 100644
}
extern void (*__fib6_flush_trees)(struct net *net);
-@@ -369,12 +373,12 @@ static inline void rt_genid_bump_all(struct net *net)
+@@ -372,12 +376,12 @@ static inline void rt_genid_bump_all(struct net *net)
static inline int fnhe_genid(struct net *net)
{
@@ -108930,26 +133192,19 @@ index 2dcea63..31d53ba 100644
}
#endif /* __NET_NET_NAMESPACE_H */
-diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
-index 788ef58..62e17d1 100644
---- a/include/net/netfilter/nf_conntrack_core.h
-+++ b/include/net/netfilter/nf_conntrack_core.h
-@@ -79,12 +79,10 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
- const struct nf_conntrack_l3proto *l3proto,
- const struct nf_conntrack_l4proto *proto);
-
--#ifdef CONFIG_LOCKDEP
--# define CONNTRACK_LOCKS 8
--#else
--# define CONNTRACK_LOCKS 1024
--#endif
-+#define CONNTRACK_LOCKS 1024
-+
- extern spinlock_t nf_conntrack_locks[CONNTRACK_LOCKS];
-+void nf_conntrack_lock(spinlock_t *lock);
-
- extern spinlock_t nf_conntrack_expect_lock;
-
+diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
+index fde4068..d11e09b 100644
+--- a/include/net/netfilter/nf_conntrack.h
++++ b/include/net/netfilter/nf_conntrack.h
+@@ -286,7 +286,7 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb)
+
+ struct kernel_param;
+
+-int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
++int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp);
+ extern unsigned int nf_conntrack_htable_size;
+ extern unsigned int nf_conntrack_max;
+ extern unsigned int nf_conntrack_hash_rnd;
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 0e31727..2f2b511 100644
--- a/include/net/netlink.h
@@ -108990,10 +133245,10 @@ index 723b61c..4386367 100644
};
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
-index c68926b..106c147 100644
+index 2b7907a..3de08ec 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
-@@ -93,7 +93,7 @@ struct netns_ipv4 {
+@@ -100,7 +100,7 @@ struct netns_ipv4 {
struct ping_group_range ping_group_range;
@@ -109002,7 +133257,7 @@ index c68926b..106c147 100644
#ifdef CONFIG_SYSCTL
unsigned long *sysctl_local_reserved_ports;
-@@ -107,6 +107,6 @@ struct netns_ipv4 {
+@@ -114,6 +114,6 @@ struct netns_ipv4 {
struct fib_rules_ops *mr_rules_ops;
#endif
#endif
@@ -109052,7 +133307,7 @@ index ac80cb4..ec1ed09 100644
struct pingfakehdr {
diff --git a/include/net/protocol.h b/include/net/protocol.h
-index d6fcc1f..ca277058 100644
+index da689f5..3b3d55b 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -49,7 +49,7 @@ struct net_protocol {
@@ -109124,10 +133379,10 @@ index 487ef34..d457f98 100644
/* Get the size of a DATA chunk payload. */
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
-index eea9bde..1d4ec5d 100644
+index 205630b..23a35dc 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
-@@ -513,7 +513,7 @@ struct sctp_pf {
+@@ -512,7 +512,7 @@ struct sctp_pf {
void (*to_sk_saddr)(union sctp_addr *, struct sock *sk);
void (*to_sk_daddr)(union sctp_addr *, struct sock *sk);
struct sctp_af *af;
@@ -109136,7 +133391,7 @@ index eea9bde..1d4ec5d 100644
/* Structure to track chunk fragments that have been acked, but peer
-@@ -1099,7 +1099,7 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
+@@ -1098,7 +1098,7 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
const struct sctp_bind_addr *src,
gfp_t gfp);
int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
@@ -109189,10 +133444,10 @@ index 35512ac..edbd85b 100644
#define SNMP_INC_STATS(mib, field) \
this_cpu_inc(mib->mibs[field])
diff --git a/include/net/sock.h b/include/net/sock.h
-index 14d3c07..c273ad8 100644
+index f5ea148..196f663 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
-@@ -202,7 +202,7 @@ struct sock_common {
+@@ -188,7 +188,7 @@ struct sock_common {
struct in6_addr skc_v6_rcv_saddr;
#endif
@@ -109201,7 +133456,7 @@ index 14d3c07..c273ad8 100644
/* following fields are padding to force
* offset(struct sock, sk_refcnt) == 128 on 64bit arches
-@@ -379,7 +379,7 @@ struct sock {
+@@ -364,7 +364,7 @@ struct sock {
unsigned int sk_napi_id;
unsigned int sk_ll_usec;
#endif
@@ -109210,25 +133465,25 @@ index 14d3c07..c273ad8 100644
int sk_rcvbuf;
struct sk_filter __rcu *sk_filter;
-@@ -1067,7 +1067,7 @@ struct proto {
- void (*destroy_cgroup)(struct mem_cgroup *memcg);
- struct cg_proto *(*proto_cgroup)(struct mem_cgroup *memcg);
+@@ -1037,7 +1037,7 @@ struct proto {
+ atomic_t socks;
#endif
+ int (*diag_destroy)(struct sock *sk, int err);
-};
+} __randomize_layout;
int proto_register(struct proto *prot, int alloc_slab);
void proto_unregister(struct proto *prot);
-@@ -1207,7 +1207,7 @@ static inline void memcg_memory_allocated_sub(struct cg_proto *prot,
- page_counter_uncharge(&prot->memory_allocated, amt);
+@@ -1124,7 +1124,7 @@ static inline long sk_prot_mem_limits(const struct sock *sk, int index)
+ return sk->sk_prot->sysctl_mem[index];
}
-static inline long
+static inline long __intentional_overflow(-1)
sk_memory_allocated(const struct sock *sk)
{
- struct proto *prot = sk->sk_prot;
-@@ -1799,7 +1799,7 @@ static inline void sk_nocaps_add(struct sock *sk, netdev_features_t flags)
+ return atomic_long_read(sk->sk_prot->memory_allocated);
+@@ -1683,7 +1683,7 @@ static inline bool sk_check_csum_caps(struct sock *sk)
}
static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
@@ -109237,7 +133492,7 @@ index 14d3c07..c273ad8 100644
int copy, int offset)
{
if (skb->ip_summed == CHECKSUM_NONE) {
-@@ -2050,7 +2050,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
+@@ -1928,7 +1928,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
}
}
@@ -109246,7 +133501,7 @@ index 14d3c07..c273ad8 100644
bool force_schedule);
/**
-@@ -2126,7 +2126,7 @@ struct sock_skb_cb {
+@@ -2004,7 +2004,7 @@ struct sock_skb_cb {
static inline void
sock_skb_set_dropcount(const struct sock *sk, struct sk_buff *skb)
{
@@ -109256,10 +133511,10 @@ index 14d3c07..c273ad8 100644
void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
diff --git a/include/net/tcp.h b/include/net/tcp.h
-index 414d822..f99ea64 100644
+index ae6468f..eaf0ae6 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
-@@ -550,7 +550,7 @@ void tcp_retransmit_timer(struct sock *sk);
+@@ -548,7 +548,7 @@ void tcp_retransmit_timer(struct sock *sk);
void tcp_xmit_retransmit_queue(struct sock *);
void tcp_simple_retransmit(struct sock *);
int tcp_trim_head(struct sock *, struct sk_buff *, u32);
@@ -109268,7 +133523,7 @@ index 414d822..f99ea64 100644
void tcp_send_probe0(struct sock *);
void tcp_send_partial(struct sock *);
-@@ -736,8 +736,8 @@ static inline u32 tcp_skb_timestamp(const struct sk_buff *skb)
+@@ -734,8 +734,8 @@ static inline u32 tcp_skb_timestamp(const struct sk_buff *skb)
* If this grows please adjust skbuff.h:skbuff->cb[xxx] size appropriately.
*/
struct tcp_skb_cb {
@@ -109279,7 +133534,7 @@ index 414d822..f99ea64 100644
union {
/* Note : tcp_tw_isn is used in input path only
* (isn chosen by tcp_timewait_state_process())
-@@ -765,7 +765,7 @@ struct tcp_skb_cb {
+@@ -763,7 +763,7 @@ struct tcp_skb_cb {
__u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */
/* 1 byte hole */
@@ -109363,6 +133618,32 @@ index d6f6e50..6fea29e 100644
#endif
static __inline__
+diff --git a/include/rdma/ib_cm.h b/include/rdma/ib_cm.h
+index 92a7d85..1779570 100644
+--- a/include/rdma/ib_cm.h
++++ b/include/rdma/ib_cm.h
+@@ -486,8 +486,8 @@ int ib_cm_notify(struct ib_cm_id *cm_id, enum ib_event_type event);
+ * @private_data_len: Size of the private data buffer, in bytes.
+ */
+ int ib_send_cm_rej(struct ib_cm_id *cm_id,
+- enum ib_cm_rej_reason reason,
+- void *ari,
++ int reason,
++ const void *ari,
+ u8 ari_length,
+ const void *private_data,
+ u8 private_data_len);
+@@ -558,8 +558,8 @@ int ib_cm_init_qp_attr(struct ib_cm_id *cm_id,
+ * @private_data_len: Size of the private data buffer, in bytes.
+ */
+ int ib_send_cm_apr(struct ib_cm_id *cm_id,
+- enum ib_cm_apr_status status,
+- void *info,
++ int status,
++ const void *info,
+ u8 info_length,
+ const void *private_data,
+ u8 private_data_len);
diff --git a/include/rdma/iw_cm.h b/include/rdma/iw_cm.h
index 036bd27..c0d7f17 100644
--- a/include/rdma/iw_cm.h
@@ -109398,10 +133679,10 @@ index 93d14da..734b3d8 100644
u8 qfull;
enum fc_lport_state state;
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
-index fe89d7c..cf05af3 100644
+index ba93c0f..90acd4d 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
-@@ -186,9 +186,9 @@ struct scsi_device {
+@@ -187,9 +187,9 @@ struct scsi_device {
unsigned int max_device_blocked; /* what device_blocked counts down from */
#define SCSI_DEFAULT_DEVICE_BLOCKED 3
@@ -109455,7 +133736,7 @@ index 3afec70..b196b43 100644
int pack_id; /* [i->o] unused internally (normally) */
void __user * usr_ptr; /* [i->o] unused internally */
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
-index fa1d055..3647940 100644
+index c0abcdc..1b07286 100644
--- a/include/sound/compress_driver.h
+++ b/include/sound/compress_driver.h
@@ -130,7 +130,7 @@ struct snd_compr_ops {
@@ -109467,11 +133748,67 @@ index fa1d055..3647940 100644
/**
* struct snd_compr: Compressed device
+diff --git a/include/sound/control.h b/include/sound/control.h
+index 21d047f..9573462 100644
+--- a/include/sound/control.h
++++ b/include/sound/control.h
+@@ -214,8 +214,10 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
+ * Return: Zero if successful or a negative error code.
+ */
+ static inline int
+-snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
++snd_ctl_add_slave(void *_master, struct snd_kcontrol *slave)
+ {
++ struct snd_kcontrol *master = _master;
++
+ return _snd_ctl_add_slave(master, slave, 0);
+ }
+
+diff --git a/include/sound/pcm.h b/include/sound/pcm.h
+index b0be092..0e82b4f 100644
+--- a/include/sound/pcm.h
++++ b/include/sound/pcm.h
+@@ -1075,7 +1075,7 @@ int snd_pcm_update_state(struct snd_pcm_substream *substream,
+ struct snd_pcm_runtime *runtime);
+ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream);
+ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_uframes_t new_hw_ptr);
+-void snd_pcm_period_elapsed(struct snd_pcm_substream *substream);
++void snd_pcm_period_elapsed(void *_substream);
+ snd_pcm_sframes_t snd_pcm_lib_write(struct snd_pcm_substream *substream,
+ const void __user *buf,
+ snd_pcm_uframes_t frames);
+diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
+index f730b91..0079544 100644
+--- a/include/sound/rawmidi.h
++++ b/include/sound/rawmidi.h
+@@ -159,8 +159,7 @@ void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream,
+
+ /* callbacks */
+
+-int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
+- const unsigned char *buffer, int count);
++int snd_rawmidi_receive(void *_substream, const void *_buffer, int count);
+ int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream);
+ int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream,
+ unsigned char *buffer, int count);
+diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
+index feb58d4..9ce81c1 100644
+--- a/include/sound/seq_kernel.h
++++ b/include/sound/seq_kernel.h
+@@ -80,7 +80,7 @@ int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
+ #define SNDRV_SEQ_EXT_USRPTR 0x80000000
+ #define SNDRV_SEQ_EXT_CHAINED 0x40000000
+
+-typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
++typedef int (*snd_seq_dump_func_t)(void *ptr, const void *buf, int count);
+ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
+ int in_kernel, int size_aligned);
+ int snd_seq_dump_var_event(const struct snd_seq_event *event,
diff --git a/include/sound/soc.h b/include/sound/soc.h
-index fb955e6..6ff0ea9 100644
+index 7afb72c..1e67bd7 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
-@@ -905,7 +905,7 @@ struct snd_soc_codec_driver {
+@@ -920,7 +920,7 @@ struct snd_soc_codec_driver {
enum snd_soc_dapm_type, int);
bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */
@@ -109480,7 +133817,7 @@ index fb955e6..6ff0ea9 100644
/* SoC platform interface */
struct snd_soc_platform_driver {
-@@ -932,7 +932,7 @@ struct snd_soc_platform_driver {
+@@ -947,7 +947,7 @@ struct snd_soc_platform_driver {
const struct snd_compr_ops *compr_ops;
int (*bespoke_trigger)(struct snd_pcm_substream *, int);
@@ -109549,7 +133886,7 @@ index 0000000..fb634b7
+/* This part must be outside protection */
+#include <trace/define_trace.h>
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
-index ff8f6c0..6b6bae3 100644
+index f95f25e..87ed448 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -51,7 +51,7 @@ SOFTIRQ_NAME_LIST
@@ -109857,20 +134194,19 @@ index 30f5362..8ed8ac9 100644
void *pmi_pal;
u8 *vbe_state_orig; /*
diff --git a/init/Kconfig b/init/Kconfig
-index 235c7a2..8dbf372 100644
+index 2232080..c5df76e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
-@@ -285,7 +285,8 @@ config FHANDLE
-
+@@ -286,6 +286,8 @@ config FHANDLE
config USELIB
bool "uselib syscall"
-- default y
+ def_bool ALPHA || M68K || SPARC || X86_32 || IA32_EMULATION
+ default n
+ depends on !GRKERNSEC
help
This option enables the uselib syscall, a system call used in the
dynamic linker from libc5 and earlier. glibc does not use this
-@@ -633,6 +634,7 @@ config RCU_FAST_NO_HZ
+@@ -628,6 +630,7 @@ config RCU_FAST_NO_HZ
config TREE_RCU_TRACE
def_bool RCU_TRACE && ( TREE_RCU || PREEMPT_RCU )
select DEBUG_FS
@@ -109878,7 +134214,7 @@ index 235c7a2..8dbf372 100644
help
This option provides tracing for the TREE_RCU and
PREEMPT_RCU implementations, permitting Makefile to
-@@ -1156,6 +1158,7 @@ endif # CGROUPS
+@@ -1132,6 +1135,7 @@ endif # CGROUPS
config CHECKPOINT_RESTORE
bool "Checkpoint/restore support" if EXPERT
select PROC_CHILDREN
@@ -109886,7 +134222,7 @@ index 235c7a2..8dbf372 100644
default n
help
Enables additional kernel features in a sake of checkpoint/restore.
-@@ -1701,7 +1704,7 @@ config SLUB_DEBUG
+@@ -1676,7 +1680,7 @@ config SLUB_DEBUG
config COMPAT_BRK
bool "Disable heap randomization"
@@ -109910,7 +134246,7 @@ index 7bc47ee..6da2dc7 100644
ifneq ($(CONFIG_BLK_DEV_INITRD),y)
obj-y += noinitramfs.o
diff --git a/init/do_mounts.c b/init/do_mounts.c
-index dea5de9..bbdbb5f 100644
+index dea5de9..497f996 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -363,11 +363,11 @@ static void __init get_fs_names(char *page)
@@ -109960,8 +134296,17 @@ index dea5de9..bbdbb5f 100644
}
static bool is_tmpfs;
+@@ -609,7 +609,7 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data)
+ {
+ static unsigned long once;
+- void *fill = ramfs_fill_super;
++ int (*fill)(struct super_block *, void *, int) = ramfs_fill_super;
+
+ if (test_and_set_bit(0, &once))
+ return ERR_PTR(-ENODEV);
diff --git a/init/do_mounts.h b/init/do_mounts.h
-index f5b978a..69dbfe8 100644
+index 067af1d..b535547 100644
--- a/init/do_mounts.h
+++ b/init/do_mounts.h
@@ -15,15 +15,15 @@ extern int root_mountflags;
@@ -109993,7 +134338,7 @@ index f5b978a..69dbfe8 100644
if (!S_ISBLK(stat.st_mode))
return 0;
diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
-index 3e0878e..8a9d7a0 100644
+index a1000ca..3137150 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -37,13 +37,13 @@ static int init_linuxrc(struct subprocess_info *info, struct cred *new)
@@ -110064,19 +134409,19 @@ index 3e0878e..8a9d7a0 100644
printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
if (fd < 0) {
error = fd;
-@@ -127,11 +127,11 @@ int __init initrd_load(void)
+@@ -127,11 +127,11 @@ bool __init initrd_load(void)
* mounted in the normal path.
*/
if (rd_load_image("/initrd.image") && ROOT_DEV != Root_RAM0) {
- sys_unlink("/initrd.image");
+ sys_unlink((const char __force_user *)"/initrd.image");
handle_initrd();
- return 1;
+ return true;
}
}
- sys_unlink("/initrd.image");
+ sys_unlink((const char __force_user *)"/initrd.image");
- return 0;
+ return false;
}
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 8cb6db5..d729f50 100644
@@ -110110,17 +134455,16 @@ index 8cb6db5..d729f50 100644
sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
sys_close(fd);
diff --git a/init/init_task.c b/init/init_task.c
-index ba0a7f36..2bcf1d5 100644
+index ba0a7f36..a7b3aaa 100644
--- a/init/init_task.c
+++ b/init/init_task.c
-@@ -22,5 +22,9 @@ EXPORT_SYMBOL(init_task);
- * Initial thread structure. Alignment of this is handled by a special
+@@ -23,4 +23,8 @@ EXPORT_SYMBOL(init_task);
* linker map entry.
*/
+ union thread_union init_thread_union __init_task_data =
+#ifdef CONFIG_X86
-+union thread_union init_thread_union __init_task_data;
++ { .stack[0] = ~0xabcd1234, };
+#else
- union thread_union init_thread_union __init_task_data =
{ INIT_THREAD_INFO(init_task) };
+#endif
diff --git a/init/initramfs.c b/init/initramfs.c
@@ -110235,7 +134579,7 @@ index b32ad7d..05f6420 100644
next_state = Reset;
return 0;
diff --git a/init/main.c b/init/main.c
-index 9e64d70..2f40cd9 100644
+index 58c9e37..6de8339 100644
--- a/init/main.c
+++ b/init/main.c
@@ -97,6 +97,8 @@ extern void radix_tree_init(void);
@@ -110359,7 +134703,7 @@ index 9e64d70..2f40cd9 100644
static noinline void __init kernel_init_freeable(void);
static int __ref kernel_init(void *unused)
-@@ -951,6 +998,11 @@ static int __ref kernel_init(void *unused)
+@@ -953,6 +1000,11 @@ static int __ref kernel_init(void *unused)
ramdisk_execute_command, ret);
}
@@ -110371,7 +134715,7 @@ index 9e64d70..2f40cd9 100644
/*
* We try each of these until one succeeds.
*
-@@ -1008,7 +1060,7 @@ static noinline void __init kernel_init_freeable(void)
+@@ -1010,7 +1062,7 @@ static noinline void __init kernel_init_freeable(void)
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
@@ -110380,7 +134724,7 @@ index 9e64d70..2f40cd9 100644
pr_err("Warning: unable to open an initial console.\n");
(void) sys_dup(0);
-@@ -1021,11 +1073,13 @@ static noinline void __init kernel_init_freeable(void)
+@@ -1023,11 +1075,13 @@ static noinline void __init kernel_init_freeable(void)
if (!ramdisk_execute_command)
ramdisk_execute_command = "/init";
@@ -110507,7 +134851,7 @@ index 68d4e95..1477ded 100644
mq_table.data = get_mq(table);
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
-index 161a180..be31d93 100644
+index 781c139..d5f1246 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -274,6 +274,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
@@ -110555,7 +134899,7 @@ index ed81aaf..4bb6792 100644
goto out_err;
*pseg = seg;
diff --git a/ipc/sem.c b/ipc/sem.c
-index b471e5a..cb0c603 100644
+index cddd5b5..f328fa7 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1790,7 +1790,7 @@ static int get_queue_result(struct sem_queue *q)
@@ -110587,7 +134931,7 @@ index b471e5a..cb0c603 100644
/*
diff --git a/ipc/shm.c b/ipc/shm.c
-index 3174634..215d679 100644
+index 331fc1b..ee0e110 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -72,9 +72,17 @@ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp);
@@ -110669,7 +135013,7 @@ index 3174634..215d679 100644
shm_add_rss_swap(shp, &rss, &swp);
diff --git a/ipc/util.c b/ipc/util.c
-index 0f401d9..049b0ff 100644
+index 798cad1..d6ffc17 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -71,6 +71,8 @@ struct ipc_proc_iface {
@@ -110681,7 +135025,7 @@ index 0f401d9..049b0ff 100644
/**
* ipc_init - initialise ipc subsystem
*
-@@ -494,6 +496,10 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
+@@ -489,6 +491,10 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
granted_mode >>= 6;
else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid))
granted_mode >>= 3;
@@ -110693,10 +135037,10 @@ index 0f401d9..049b0ff 100644
if ((requested_mode & ~granted_mode & 0007) &&
!ns_capable(ns->user_ns, CAP_IPC_OWNER))
diff --git a/kernel/audit.c b/kernel/audit.c
-index 5ffcbd3..166fa77 100644
+index 3a3e5de..3a2baad 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
-@@ -124,7 +124,7 @@ u32 audit_sig_sid = 0;
+@@ -123,7 +123,7 @@ u32 audit_sig_sid = 0;
3) suppressed due to audit_rate_limit
4) suppressed due to audit_backlog_limit
*/
@@ -110705,7 +135049,7 @@ index 5ffcbd3..166fa77 100644
/* The netlink socket. */
static struct sock *audit_sock;
-@@ -258,7 +258,7 @@ void audit_log_lost(const char *message)
+@@ -257,7 +257,7 @@ void audit_log_lost(const char *message)
unsigned long now;
int print;
@@ -110714,7 +135058,7 @@ index 5ffcbd3..166fa77 100644
print = (audit_failure == AUDIT_FAIL_PANIC || !audit_rate_limit);
-@@ -275,7 +275,7 @@ void audit_log_lost(const char *message)
+@@ -274,7 +274,7 @@ void audit_log_lost(const char *message)
if (print) {
if (printk_ratelimit())
pr_warn("audit_lost=%u audit_rate_limit=%u audit_backlog_limit=%u\n",
@@ -110723,7 +135067,7 @@ index 5ffcbd3..166fa77 100644
audit_rate_limit,
audit_backlog_limit);
audit_panic(message);
-@@ -847,7 +847,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
+@@ -846,7 +846,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
s.pid = audit_pid;
s.rate_limit = audit_rate_limit;
s.backlog_limit = audit_backlog_limit;
@@ -110733,7 +135077,7 @@ index 5ffcbd3..166fa77 100644
s.feature_bitmap = AUDIT_FEATURE_BITMAP_ALL;
s.backlog_wait_time = audit_backlog_wait_time_master;
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
-index b86cc04..dfbfd4e 100644
+index 195ffae..fb880f9 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1024,7 +1024,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
@@ -110764,10 +135108,19 @@ index b86cc04..dfbfd4e 100644
task->sessionid = sessionid;
task->loginuid = loginuid;
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
-index 334b1bd..67c97a2 100644
+index 972d9a8..367b6a1 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
-@@ -151,14 +151,17 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
+@@ -138,6 +138,8 @@ void __bpf_prog_free(struct bpf_prog *fp)
+ EXPORT_SYMBOL_GPL(__bpf_prog_free);
+
+ #ifdef CONFIG_BPF_JIT
++extern long __rap_hash___bpf_prog_run;
++
+ struct bpf_binary_header *
+ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
+ unsigned int alignment,
+@@ -151,27 +153,45 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
* random section of illegal instructions.
*/
size = round_up(proglen + sizeof(*hdr) + 128, PAGE_SIZE);
@@ -110785,8 +135138,28 @@ index 334b1bd..67c97a2 100644
+
hole = min_t(unsigned int, size - (proglen + sizeof(*hdr)),
PAGE_SIZE - sizeof(*hdr));
++
++#ifdef CONFIG_PAX_RAP
++ hole -= 8;
++#endif
++
start = (prandom_u32() % hole) & ~(alignment - 1);
-@@ -171,7 +174,7 @@ bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr,
+
++#ifdef CONFIG_PAX_RAP
++ start += 8;
++#endif
++
+ /* Leave a random number of instructions before BPF code. */
+ *image_ptr = &hdr->image[start];
+
++#ifdef CONFIG_PAX_RAP
++ pax_open_kernel();
++ *(long *)(*image_ptr - 8) = (long)&__rap_hash___bpf_prog_run;
++ pax_close_kernel();
++#endif
++
+ return hdr;
+ }
void bpf_jit_binary_free(struct bpf_binary_header *hdr)
{
@@ -110795,11 +135168,29 @@ index 334b1bd..67c97a2 100644
}
#endif /* CONFIG_BPF_JIT */
+@@ -192,7 +212,7 @@ EXPORT_SYMBOL_GPL(__bpf_call_base);
+ *
+ * Decode and execute eBPF instructions.
+ */
+-static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)
++unsigned int __bpf_prog_run(const struct sk_buff *ctx, const struct bpf_insn *insn)
+ {
+ u64 stack[MAX_BPF_STACK / sizeof(u64)];
+ u64 regs[MAX_BPF_REG], tmp;
+@@ -696,7 +716,7 @@ static int bpf_check_tail_call(const struct bpf_prog *fp)
+ */
+ int bpf_prog_select_runtime(struct bpf_prog *fp)
+ {
+- fp->bpf_func = (void *) __bpf_prog_run;
++ fp->bpf_func = __bpf_prog_run;
+
+ bpf_int_jit_compile(fp);
+ bpf_prog_lock_ro(fp);
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
-index 3b39550..e470527 100644
+index 6373970..a4e1c851 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
-@@ -711,8 +711,16 @@ SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, siz
+@@ -731,8 +731,16 @@ SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, siz
union bpf_attr attr = {};
int err;
@@ -110817,6 +135208,18 @@ index 3b39550..e470527 100644
if (!access_ok(VERIFY_READ, uattr, 1))
return -EFAULT;
+diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
+index 2e7f7ab..7520d73 100644
+--- a/kernel/bpf/verifier.c
++++ b/kernel/bpf/verifier.c
+@@ -2003,7 +2003,6 @@ static int replace_map_fd_with_map_ptr(struct verifier_env *env)
+ if (IS_ERR(map)) {
+ verbose("fd %d is not pointing to valid bpf_map\n",
+ insn->imm);
+- fdput(f);
+ return PTR_ERR(map);
+ }
+
diff --git a/kernel/capability.c b/kernel/capability.c
index 45432b5..988f1e4 100644
--- a/kernel/capability.c
@@ -110916,10 +135319,10 @@ index 45432b5..988f1e4 100644
+}
+EXPORT_SYMBOL(capable_wrt_inode_uidgid_nolog);
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
-index dc94f8b..ccd3aea 100644
+index 6a498da..19ed7eb 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
-@@ -3354,7 +3354,7 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
+@@ -3330,7 +3330,7 @@ static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp,
key = &cft->lockdep_key;
#endif
kn = __kernfs_create_file(cgrp->kn, cgroup_file_name(cgrp, cft, name),
@@ -110928,7 +135331,7 @@ index dc94f8b..ccd3aea 100644
NULL, key);
if (IS_ERR(kn))
return PTR_ERR(kn);
-@@ -3458,11 +3458,14 @@ static void cgroup_exit_cftypes(struct cftype *cfts)
+@@ -3434,11 +3434,14 @@ static void cgroup_exit_cftypes(struct cftype *cfts)
/* free copy for custom atomic_write_len, see init_cftypes() */
if (cft->max_write_len && cft->max_write_len != PAGE_SIZE)
kfree(cft->kf_ops);
@@ -110946,7 +135349,7 @@ index dc94f8b..ccd3aea 100644
}
}
-@@ -3493,8 +3496,10 @@ static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
+@@ -3469,8 +3472,10 @@ static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
kf_ops->atomic_write_len = cft->max_write_len;
}
@@ -110959,7 +135362,7 @@ index dc94f8b..ccd3aea 100644
}
return 0;
-@@ -3507,7 +3512,7 @@ static int cgroup_rm_cftypes_locked(struct cftype *cfts)
+@@ -3483,7 +3488,7 @@ static int cgroup_rm_cftypes_locked(struct cftype *cfts)
if (!cfts || !cfts[0].ss)
return -ENOENT;
@@ -110968,7 +135371,7 @@ index dc94f8b..ccd3aea 100644
cgroup_apply_cftypes(cfts, false);
cgroup_exit_cftypes(cfts);
return 0;
-@@ -3564,7 +3569,7 @@ static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
+@@ -3540,7 +3545,7 @@ static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
mutex_lock(&cgroup_mutex);
@@ -110977,7 +135380,7 @@ index dc94f8b..ccd3aea 100644
ret = cgroup_apply_cftypes(cfts, true);
if (ret)
cgroup_rm_cftypes_locked(cfts);
-@@ -3585,8 +3590,10 @@ int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
+@@ -3561,8 +3566,10 @@ int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
{
struct cftype *cft;
@@ -110989,7 +135392,7 @@ index dc94f8b..ccd3aea 100644
return cgroup_add_cftypes(ss, cfts);
}
-@@ -3602,8 +3609,10 @@ int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
+@@ -3578,8 +3585,10 @@ int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
{
struct cftype *cft;
@@ -111001,7 +135404,7 @@ index dc94f8b..ccd3aea 100644
return cgroup_add_cftypes(ss, cfts);
}
-@@ -5754,6 +5763,9 @@ static void cgroup_release_agent(struct work_struct *work)
+@@ -5722,6 +5731,9 @@ static void cgroup_release_agent(struct work_struct *work)
if (!pathbuf || !agentbuf)
goto out;
@@ -111011,7 +135414,7 @@ index dc94f8b..ccd3aea 100644
path = cgroup_path(cgrp, pathbuf, PATH_MAX);
if (!path)
goto out;
-@@ -5929,7 +5941,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
+@@ -5984,7 +5996,7 @@ static int cgroup_css_links_read(struct seq_file *seq, void *v)
struct task_struct *task;
int count = 0;
@@ -111200,7 +135603,7 @@ index c18b1f1..b9a0132 100644
return -ENOMEM;
diff --git a/kernel/cred.c b/kernel/cred.c
-index 71179a0..a72ab47 100644
+index 0c0cd8a..faf7245 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -172,6 +172,15 @@ void exit_creds(struct task_struct *tsk)
@@ -111408,15 +135811,15 @@ index 0874e2e..5b32cc9 100644
}
EXPORT_SYMBOL_GPL(kgdb_schedule_breakpoint);
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
-index 41213454..861e178 100644
+index 2a20c0d..3eb7d03 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -2021,7 +2021,7 @@ static int kdb_lsmod(int argc, const char **argv)
continue;
kdb_printf("%-20s%8u 0x%p ", mod->name,
-- mod->core_size, (void *)mod);
-+ mod->core_size_rx + mod->core_size_rw, (void *)mod);
+- mod->core_layout.size, (void *)mod);
++ mod->core_layout.size_rx + mod->core_layout.size_rw, (void *)mod);
#ifdef CONFIG_MODULE_UNLOAD
kdb_printf("%4d ", module_refcount(mod));
#endif
@@ -111424,16 +135827,16 @@ index 41213454..861e178 100644
kdb_printf(" (Loading)");
else
kdb_printf(" (Live)");
-- kdb_printf(" 0x%p", mod->module_core);
-+ kdb_printf(" 0x%p 0x%p", mod->module_core_rx, mod->module_core_rw);
+- kdb_printf(" 0x%p", mod->core_layout.base);
++ kdb_printf(" 0x%p 0x%p", mod->core_layout.base_rx, mod->core_layout.base_rw);
#ifdef CONFIG_MODULE_UNLOAD
{
diff --git a/kernel/events/core.c b/kernel/events/core.c
-index 1e889a0..78b25c2 100644
+index f0b4b32..390e9b9 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
-@@ -175,8 +175,15 @@ static struct srcu_struct pmus_srcu;
+@@ -350,8 +350,15 @@ static struct srcu_struct pmus_srcu;
* 0 - disallow raw tracepoint access for unpriv
* 1 - disallow cpu events for unpriv
* 2 - disallow kernel profiling for unpriv
@@ -111450,7 +135853,7 @@ index 1e889a0..78b25c2 100644
/* Minimum for 512 kiB + 1 user control page */
int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
-@@ -202,7 +209,7 @@ static void update_perf_cpu_limits(void)
+@@ -377,7 +384,7 @@ static void update_perf_cpu_limits(void)
tmp *= sysctl_perf_cpu_time_max_percent;
do_div(tmp, 100);
@@ -111459,7 +135862,7 @@ index 1e889a0..78b25c2 100644
}
static int perf_rotate_context(struct perf_cpu_context *cpuctx);
-@@ -308,7 +315,7 @@ void perf_sample_event_took(u64 sample_len_ns)
+@@ -483,7 +490,7 @@ void perf_sample_event_took(u64 sample_len_ns)
}
}
@@ -111468,7 +135871,27 @@ index 1e889a0..78b25c2 100644
static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
enum event_type_t event_type);
-@@ -3898,9 +3905,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
+@@ -949,8 +956,9 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
+ timer->function = perf_mux_hrtimer_handler;
+ }
+
+-static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)
++static int perf_mux_hrtimer_restart(void *_cpuctx)
+ {
++ struct perf_cpu_context *cpuctx = _cpuctx;
+ struct hrtimer *timer = &cpuctx->hrtimer;
+ struct pmu *pmu = cpuctx->ctx.pmu;
+ unsigned long flags;
+@@ -2883,7 +2891,7 @@ void __perf_event_task_sched_in(struct task_struct *prev,
+ perf_pmu_sched_task(prev, task, true);
+ }
+
+-static u64 perf_calculate_period(struct perf_event *event, u64 nsec, u64 count)
++static u64 perf_calculate_period(const struct perf_event *event, u64 nsec, u64 count)
+ {
+ u64 frequency = event->attr.sample_freq;
+ u64 sec = NSEC_PER_SEC;
+@@ -3934,9 +3942,9 @@ u64 perf_event_read_value(struct perf_event *event, u64 *enabled, u64 *running)
total += perf_event_count(event);
*enabled += event->total_time_enabled +
@@ -111480,7 +135903,7 @@ index 1e889a0..78b25c2 100644
list_for_each_entry(child, &event->child_list, child_list) {
(void)perf_event_read(child, false);
-@@ -3932,12 +3939,12 @@ static int __perf_read_group_add(struct perf_event *leader,
+@@ -3968,12 +3976,12 @@ static int __perf_read_group_add(struct perf_event *leader,
*/
if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
values[n++] += leader->total_time_enabled +
@@ -111495,7 +135918,7 @@ index 1e889a0..78b25c2 100644
}
/*
-@@ -4478,10 +4485,10 @@ void perf_event_update_userpage(struct perf_event *event)
+@@ -4475,10 +4483,10 @@ void perf_event_update_userpage(struct perf_event *event)
userpg->offset -= local64_read(&event->hw.prev_count);
userpg->time_enabled = enabled +
@@ -111508,7 +135931,7 @@ index 1e889a0..78b25c2 100644
arch_perf_update_userpage(event, userpg, now);
-@@ -5156,7 +5163,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
+@@ -5153,7 +5161,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
/* Data. */
sp = perf_user_stack_pointer(regs);
@@ -111517,7 +135940,7 @@ index 1e889a0..78b25c2 100644
dyn_size = dump_size - rem;
perf_output_skip(handle, rem);
-@@ -5247,11 +5254,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
+@@ -5244,11 +5252,11 @@ static void perf_output_read_one(struct perf_output_handle *handle,
values[n++] = perf_event_count(event);
if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED) {
values[n++] = enabled +
@@ -111531,7 +135954,17 @@ index 1e889a0..78b25c2 100644
}
if (read_format & PERF_FORMAT_ID)
values[n++] = primary_event_id(event);
-@@ -7906,7 +7913,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
+@@ -7558,8 +7566,7 @@ perf_event_mux_interval_ms_store(struct device *dev,
+ cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu);
+ cpuctx->hrtimer_interval = ns_to_ktime(NSEC_PER_MSEC * timer);
+
+- cpu_function_call(cpu,
+- (remote_function_f)perf_mux_hrtimer_restart, cpuctx);
++ cpu_function_call(cpu, perf_mux_hrtimer_restart, cpuctx);
+ }
+ put_online_cpus();
+ mutex_unlock(&mux_interval_mutex);
+@@ -7928,7 +7935,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
event->parent = parent_event;
event->ns = get_pid_ns(task_active_pid_ns(current));
@@ -111540,7 +135973,7 @@ index 1e889a0..78b25c2 100644
event->state = PERF_EVENT_STATE_INACTIVE;
-@@ -8268,6 +8275,11 @@ SYSCALL_DEFINE5(perf_event_open,
+@@ -8290,6 +8297,11 @@ SYSCALL_DEFINE5(perf_event_open,
if (flags & ~PERF_FLAG_ALL)
return -EINVAL;
@@ -111552,7 +135985,7 @@ index 1e889a0..78b25c2 100644
err = perf_copy_attr(attr_uptr, &attr);
if (err)
return err;
-@@ -8740,10 +8752,10 @@ static void sync_child_event(struct perf_event *child_event,
+@@ -8777,10 +8789,10 @@ static void sync_child_event(struct perf_event *child_event,
/*
* Add back the child's count to the parent's count:
*/
@@ -111564,8 +135997,8 @@ index 1e889a0..78b25c2 100644
- atomic64_add(child_event->total_time_running,
+ atomic64_add_unchecked(child_event->total_time_running,
&parent_event->child_total_time_running);
+ }
- /*
diff --git a/kernel/events/internal.h b/kernel/events/internal.h
index 2bbad9c..056f20c 100644
--- a/kernel/events/internal.h
@@ -111611,10 +136044,10 @@ index 2bbad9c..056f20c 100644
/* Callchain handling */
extern struct perf_callchain_entry *
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
-index 7dad849..d4eb8a5 100644
+index 0167679..f0336a8 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
-@@ -1689,7 +1689,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
+@@ -1690,7 +1690,7 @@ static int is_trap_at_addr(struct mm_struct *mm, unsigned long vaddr)
{
struct page *page;
uprobe_opcode_t opcode;
@@ -111624,10 +136057,10 @@ index 7dad849..d4eb8a5 100644
pagefault_disable();
result = __copy_from_user_inatomic(&opcode, (void __user*)vaddr,
diff --git a/kernel/exit.c b/kernel/exit.c
-index 07110c6..1125445 100644
+index 10e0882..afcc374 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
-@@ -171,6 +171,10 @@ void release_task(struct task_struct *p)
+@@ -169,6 +169,10 @@ void release_task(struct task_struct *p)
struct task_struct *leader;
int zap_leader;
repeat:
@@ -111638,7 +136071,7 @@ index 07110c6..1125445 100644
/* don't need to get the RCU readlock here - the process is dead and
* can't be modifying its own credentials. But shut RCU-lockdep up */
rcu_read_lock();
-@@ -450,9 +454,8 @@ static struct task_struct *find_alive_thread(struct task_struct *p)
+@@ -448,9 +452,8 @@ static struct task_struct *find_alive_thread(struct task_struct *p)
return NULL;
}
@@ -111649,7 +136082,7 @@ index 07110c6..1125445 100644
{
struct pid_namespace *pid_ns = task_active_pid_ns(father);
struct task_struct *reaper = pid_ns->child_reaper;
-@@ -549,6 +552,8 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
+@@ -547,6 +550,8 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void forget_original_parent(struct task_struct *father,
@@ -111658,7 +136091,7 @@ index 07110c6..1125445 100644
struct list_head *dead)
{
struct task_struct *p, *t, *reaper;
-@@ -656,6 +661,8 @@ void do_exit(long code)
+@@ -654,6 +659,8 @@ void do_exit(long code)
int group_dead;
TASKS_RCU(int tasks_rcu_i);
@@ -111667,7 +136100,7 @@ index 07110c6..1125445 100644
profile_task_exit(tsk);
WARN_ON(blk_needs_flush_plug(tsk));
-@@ -672,7 +679,6 @@ void do_exit(long code)
+@@ -670,7 +677,6 @@ void do_exit(long code)
* mm_release()->clear_child_tid() from writing to a user-controlled
* kernel address.
*/
@@ -111675,7 +136108,7 @@ index 07110c6..1125445 100644
ptrace_event(PTRACE_EVENT_EXIT, code);
-@@ -732,6 +738,9 @@ void do_exit(long code)
+@@ -730,6 +736,9 @@ void do_exit(long code)
tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
@@ -111685,7 +136118,7 @@ index 07110c6..1125445 100644
exit_mm(tsk);
if (group_dead)
-@@ -851,7 +860,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
+@@ -849,7 +858,7 @@ SYSCALL_DEFINE1(exit, int, error_code)
* Take down every thread in the group. This is called by fatal signals
* as well as by sys_exit_group (below).
*/
@@ -111694,7 +136127,7 @@ index 07110c6..1125445 100644
do_group_exit(int exit_code)
{
struct signal_struct *sig = current->signal;
-@@ -968,6 +977,7 @@ static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
+@@ -966,6 +975,7 @@ static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
@@ -111702,7 +136135,7 @@ index 07110c6..1125445 100644
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
{
int state, retval, status;
-@@ -984,6 +994,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
+@@ -982,6 +992,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
get_task_struct(p);
read_unlock(&tasklist_lock);
@@ -111710,7 +136143,7 @@ index 07110c6..1125445 100644
sched_annotate_sleep();
if ((exit_code & 0x7f) == 0) {
-@@ -1006,6 +1017,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
+@@ -1004,6 +1015,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
* We own this thread, nobody else can reap it.
*/
read_unlock(&tasklist_lock);
@@ -111718,7 +136151,7 @@ index 07110c6..1125445 100644
sched_annotate_sleep();
/*
-@@ -1149,6 +1161,8 @@ static int *task_stopped_code(struct task_struct *p, bool ptrace)
+@@ -1146,6 +1158,8 @@ static int *task_stopped_code(struct task_struct *p, bool ptrace)
* search should terminate.
*/
static int wait_task_stopped(struct wait_opts *wo,
@@ -111727,7 +136160,7 @@ index 07110c6..1125445 100644
int ptrace, struct task_struct *p)
{
struct siginfo __user *infop;
-@@ -1196,6 +1210,7 @@ unlock_sig:
+@@ -1193,6 +1207,7 @@ unlock_sig:
pid = task_pid_vnr(p);
why = ptrace ? CLD_TRAPPED : CLD_STOPPED;
read_unlock(&tasklist_lock);
@@ -111735,7 +136168,7 @@ index 07110c6..1125445 100644
sched_annotate_sleep();
if (unlikely(wo->wo_flags & WNOWAIT))
-@@ -1233,6 +1248,7 @@ unlock_sig:
+@@ -1230,6 +1245,7 @@ unlock_sig:
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
@@ -111743,7 +136176,7 @@ index 07110c6..1125445 100644
static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
{
int retval;
-@@ -1259,6 +1275,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
+@@ -1256,6 +1272,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
pid = task_pid_vnr(p);
get_task_struct(p);
read_unlock(&tasklist_lock);
@@ -111751,7 +136184,7 @@ index 07110c6..1125445 100644
sched_annotate_sleep();
if (!wo->wo_info) {
-@@ -1288,6 +1305,8 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
+@@ -1285,6 +1302,8 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
* or another error from security_task_wait(), or still -ECHILD.
*/
static int wait_consider_task(struct wait_opts *wo, int ptrace,
@@ -111760,7 +136193,7 @@ index 07110c6..1125445 100644
struct task_struct *p)
{
/*
-@@ -1413,6 +1432,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
+@@ -1410,6 +1429,7 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
* ->notask_error is 0 if there were any eligible children,
* or another error from security_task_wait(), or still -ECHILD.
*/
@@ -111768,7 +136201,7 @@ index 07110c6..1125445 100644
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
-@@ -1427,6 +1447,7 @@ static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
+@@ -1424,6 +1444,7 @@ static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
return 0;
}
@@ -111776,7 +136209,7 @@ index 07110c6..1125445 100644
static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
-@@ -1490,12 +1511,16 @@ repeat:
+@@ -1487,12 +1508,16 @@ repeat:
tsk = current;
do {
retval = do_wait_thread(wo, tsk);
@@ -111796,7 +136229,7 @@ index 07110c6..1125445 100644
if (wo->wo_flags & __WNOTHREAD)
break;
diff --git a/kernel/fork.c b/kernel/fork.c
-index 1155eac..0c9bd1f 100644
+index 2e391c7..555531a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -188,12 +188,54 @@ static void free_thread_info(struct thread_info *ti)
@@ -112021,15 +136454,14 @@ index 1155eac..0c9bd1f 100644
uprobe_start_dup_mmap();
down_write(&oldmm->mmap_sem);
-@@ -430,53 +546,15 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
+@@ -430,52 +546,14 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
prev = NULL;
for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
- struct file *file;
-
if (mpnt->vm_flags & VM_DONTCOPY) {
- vm_stat_account(mm, mpnt->vm_flags, mpnt->vm_file,
- -vma_pages(mpnt));
+ vm_stat_account(mm, mpnt->vm_flags, -vma_pages(mpnt));
continue;
}
- charge = 0;
@@ -112079,7 +136511,7 @@ index 1155eac..0c9bd1f 100644
}
/*
-@@ -508,6 +586,38 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
+@@ -507,6 +585,38 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
if (retval)
goto out;
}
@@ -112118,7 +136550,7 @@ index 1155eac..0c9bd1f 100644
/* a new mm has just been created */
arch_dup_mmap(oldmm, mm);
retval = 0;
-@@ -517,14 +627,6 @@ out:
+@@ -516,14 +626,6 @@ out:
up_write(&oldmm->mmap_sem);
uprobe_end_dup_mmap();
return retval;
@@ -112133,7 +136565,7 @@ index 1155eac..0c9bd1f 100644
}
static inline int mm_alloc_pgd(struct mm_struct *mm)
-@@ -799,8 +901,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
+@@ -798,8 +900,8 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
return ERR_PTR(err);
mm = get_task_mm(task);
@@ -112144,7 +136576,7 @@ index 1155eac..0c9bd1f 100644
mmput(mm);
mm = ERR_PTR(-EACCES);
}
-@@ -1001,13 +1103,20 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
+@@ -1000,13 +1102,20 @@ static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
spin_unlock(&fs->lock);
return -EAGAIN;
}
@@ -112166,7 +136598,7 @@ index 1155eac..0c9bd1f 100644
return 0;
}
-@@ -1240,7 +1349,7 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
+@@ -1239,7 +1348,7 @@ init_task_pid(struct task_struct *task, enum pid_type type, struct pid *pid)
* parts of the process environment (as per the clone
* flags). The actual kick-off is left to the caller.
*/
@@ -112175,7 +136607,7 @@ index 1155eac..0c9bd1f 100644
unsigned long stack_start,
unsigned long stack_size,
int __user *child_tidptr,
-@@ -1312,6 +1421,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
+@@ -1310,6 +1419,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
retval = -EAGAIN;
@@ -112185,7 +136617,7 @@ index 1155eac..0c9bd1f 100644
if (atomic_read(&p->real_cred->user->processes) >=
task_rlimit(p, RLIMIT_NPROC)) {
if (p->real_cred->user != INIT_USER &&
-@@ -1570,6 +1682,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
+@@ -1568,6 +1680,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
goto bad_fork_cancel_cgroup;
}
@@ -112197,7 +136629,7 @@ index 1155eac..0c9bd1f 100644
if (likely(p->pid)) {
ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace);
-@@ -1659,6 +1776,8 @@ bad_fork_cleanup_count:
+@@ -1657,6 +1774,8 @@ bad_fork_cleanup_count:
bad_fork_free:
free_task(p);
fork_out:
@@ -112206,7 +136638,7 @@ index 1155eac..0c9bd1f 100644
return ERR_PTR(retval);
}
-@@ -1721,6 +1840,7 @@ long _do_fork(unsigned long clone_flags,
+@@ -1719,6 +1838,7 @@ long _do_fork(unsigned long clone_flags,
p = copy_process(clone_flags, stack_start, stack_size,
child_tidptr, NULL, trace, tls);
@@ -112214,7 +136646,7 @@ index 1155eac..0c9bd1f 100644
/*
* Do this prior waking up the new thread - the thread pointer
* might get invalid after that point, if the thread exits quickly.
-@@ -1737,6 +1857,8 @@ long _do_fork(unsigned long clone_flags,
+@@ -1735,6 +1855,8 @@ long _do_fork(unsigned long clone_flags,
if (clone_flags & CLONE_PARENT_SETTID)
put_user(nr, parent_tidptr);
@@ -112223,16 +136655,16 @@ index 1155eac..0c9bd1f 100644
if (clone_flags & CLONE_VFORK) {
p->vfork_done = &vfork;
init_completion(&vfork);
-@@ -1869,7 +1991,7 @@ void __init proc_caches_init(void)
- mm_cachep = kmem_cache_create("mm_struct",
+@@ -1871,7 +1993,7 @@ void __init proc_caches_init(void)
sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
- SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK, NULL);
-- vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC);
-+ vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC | SLAB_NO_SANITIZE);
+ SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT,
+ NULL);
+- vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT);
++ vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE);
mmap_init();
nsproxy_cache_init();
}
-@@ -1917,7 +2039,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
+@@ -1919,7 +2041,7 @@ static int unshare_fs(unsigned long unshare_flags, struct fs_struct **new_fsp)
return 0;
/* don't need lock here; in the worst case we'll do useless copy */
@@ -112241,7 +136673,7 @@ index 1155eac..0c9bd1f 100644
return 0;
*new_fsp = copy_fs_struct(fs);
-@@ -2030,7 +2152,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
+@@ -2032,7 +2154,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
fs = current->fs;
spin_lock(&fs->lock);
current->fs = new_fs;
@@ -112251,7 +136683,7 @@ index 1155eac..0c9bd1f 100644
new_fs = NULL;
else
new_fs = fs;
-@@ -2094,7 +2217,7 @@ int unshare_files(struct files_struct **displaced)
+@@ -2096,7 +2219,7 @@ int unshare_files(struct files_struct **displaced)
int sysctl_max_threads(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -112261,7 +136693,7 @@ index 1155eac..0c9bd1f 100644
int threads = max_threads;
int min = MIN_THREADS;
diff --git a/kernel/futex.c b/kernel/futex.c
-index 461c72b..b4f4bd8 100644
+index 5d6ce64..3124491 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -202,7 +202,7 @@ struct futex_pi_state {
@@ -112282,8 +136714,8 @@ index 461c72b..b4f4bd8 100644
static const struct futex_q futex_q_init = {
/* list gets initialized in queue_me()*/
-@@ -472,6 +472,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
- struct page *page, *page_head;
+@@ -473,6 +473,11 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
+ struct address_space *mapping;
int err, ro = 0;
+#ifdef CONFIG_PAX_SEGMEXEC
@@ -112294,7 +136726,7 @@ index 461c72b..b4f4bd8 100644
/*
* The futex address must be "naturally" aligned.
*/
-@@ -678,7 +683,7 @@ static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr,
+@@ -643,7 +648,7 @@ static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr,
static int get_futex_value_locked(u32 *dest, u32 __user *from)
{
@@ -112303,7 +136735,7 @@ index 461c72b..b4f4bd8 100644
pagefault_disable();
ret = __copy_from_user_inatomic(dest, from, sizeof(u32));
-@@ -3136,6 +3141,7 @@ static void __init futex_detect_cmpxchg(void)
+@@ -3135,6 +3140,7 @@ static void __init futex_detect_cmpxchg(void)
{
#ifndef CONFIG_HAVE_FUTEX_CMPXCHG
u32 curval;
@@ -112311,7 +136743,7 @@ index 461c72b..b4f4bd8 100644
/*
* This will fail and we want it. Some arch implementations do
-@@ -3147,8 +3153,11 @@ static void __init futex_detect_cmpxchg(void)
+@@ -3146,8 +3152,11 @@ static void __init futex_detect_cmpxchg(void)
* implementation, the non-functional ones will return
* -ENOSYS.
*/
@@ -112336,33 +136768,8 @@ index 4ae3232..5adee02 100644
compat_long_t futex_offset)
{
compat_uptr_t base = ptr_to_compat(entry);
-diff --git a/kernel/gcov/base.c b/kernel/gcov/base.c
-index 7080ae1..c9b3761 100644
---- a/kernel/gcov/base.c
-+++ b/kernel/gcov/base.c
-@@ -123,11 +123,6 @@ void gcov_enable_events(void)
- }
-
- #ifdef CONFIG_MODULES
--static inline int within(void *addr, void *start, unsigned long size)
--{
-- return ((addr >= start) && (addr < start + size));
--}
--
- /* Update list and generate events when modules are unloaded. */
- static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
- void *data)
-@@ -142,7 +137,7 @@ static int gcov_module_notifier(struct notifier_block *nb, unsigned long event,
-
- /* Remove entries located in module from linked list. */
- while ((info = gcov_info_next(info))) {
-- if (within(info, mod->module_core, mod->core_size)) {
-+ if (within_module_core_rw((unsigned long)info, mod)) {
- gcov_info_unlink(prev, info);
- if (gcov_events_enabled)
- gcov_event(GCOV_REMOVE, info);
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
-index 6ead200..0cdeef1 100644
+index 84118723..317f7a5 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -958,7 +958,7 @@ static int irq_thread(void *data)
@@ -112375,10 +136782,10 @@ index 6ead200..0cdeef1 100644
irq_wake_secondary(desc, action);
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
-index 6b0c0b7..9314a9c 100644
+index 38e89ce..58960ac 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
-@@ -212,16 +212,18 @@ static void msi_domain_update_dom_ops(struct msi_domain_info *info)
+@@ -214,16 +214,18 @@ static void msi_domain_update_dom_ops(struct msi_domain_info *info)
return;
}
@@ -112402,7 +136809,7 @@ index 6b0c0b7..9314a9c 100644
}
static void msi_domain_update_chip_ops(struct msi_domain_info *info)
-@@ -229,8 +231,11 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info)
+@@ -231,8 +233,11 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info)
struct irq_chip *chip = info->chip;
BUG_ON(!chip || !chip->irq_mask || !chip->irq_unmask);
@@ -112465,7 +136872,7 @@ index 05254ee..a2e0725 100644
static int
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
-index 5c5987f..bc502b0 100644
+index 5c5987f..d59272e 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -11,6 +11,9 @@
@@ -112541,7 +136948,20 @@ index 5c5987f..bc502b0 100644
if (all_var)
return is_kernel(addr);
-@@ -481,7 +520,6 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter)
+@@ -434,10 +473,11 @@ int sprint_backtrace(char *buffer, unsigned long address)
+ }
+
+ /* Look up a kernel symbol and print it to the kernel messages. */
+-void __print_symbol(const char *fmt, unsigned long address)
++void __print_symbol(const char *fmt, unsigned long address, ...)
+ {
+ char buffer[KSYM_SYMBOL_LEN];
+
++ address = (unsigned long)__builtin_extract_return_addr((void *)address);
+ sprint_symbol(buffer, address);
+
+ printk(fmt, buffer);
+@@ -481,7 +521,6 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter)
static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
{
@@ -112549,7 +136969,7 @@ index 5c5987f..bc502b0 100644
iter->nameoff = get_symbol_offset(new_pos);
iter->pos = new_pos;
}
-@@ -529,6 +567,11 @@ static int s_show(struct seq_file *m, void *p)
+@@ -529,6 +568,11 @@ static int s_show(struct seq_file *m, void *p)
{
struct kallsym_iter *iter = m->private;
@@ -112561,7 +136981,7 @@ index 5c5987f..bc502b0 100644
/* Some debugging symbols have no name. Ignore them. */
if (!iter->name[0])
return 0;
-@@ -542,6 +585,7 @@ static int s_show(struct seq_file *m, void *p)
+@@ -542,6 +586,7 @@ static int s_show(struct seq_file *m, void *p)
*/
type = iter->exported ? toupper(iter->type) :
tolower(iter->type);
@@ -112585,7 +137005,7 @@ index 3a47fa9..bcb17e3 100644
/*
diff --git a/kernel/kexec.c b/kernel/kexec.c
-index d873b64..61f7c59 100644
+index ee70aef..55095dd 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -224,7 +224,8 @@ COMPAT_SYSCALL_DEFINE4(kexec_load, compat_ulong_t, entry,
@@ -112599,18 +137019,18 @@ index d873b64..61f7c59 100644
/* Don't allow clients that don't understand the native
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
-index 11b64a6..d011095 100644
+index 8dc6591..508a794 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
-@@ -851,7 +851,7 @@ int kimage_load_segment(struct kimage *image,
+@@ -848,7 +848,7 @@ int kimage_load_segment(struct kimage *image,
struct kimage *kexec_image;
struct kimage *kexec_crash_image;
-int kexec_load_disabled;
+int kexec_load_disabled __read_only;
- void crash_kexec(struct pt_regs *regs)
- {
+ /*
+ * No panic_cpu check version of crash_kexec(). This function is called
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 0277d12..2d2899c 100644
--- a/kernel/kmod.c
@@ -112867,7 +137287,7 @@ index d10ab6b..1725fbd 100644
return 0;
}
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
-index e83b264..d09fae1 100644
+index 152da4a..4ab2150 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -50,6 +50,8 @@ static ssize_t uevent_helper_store(struct kobject *kobj,
@@ -112879,7 +137299,7 @@ index e83b264..d09fae1 100644
memcpy(uevent_helper, buf, count);
uevent_helper[count] = '\0';
if (count && uevent_helper[count-1] == '\n')
-@@ -176,7 +178,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj,
+@@ -195,7 +197,7 @@ static ssize_t notes_read(struct file *filp, struct kobject *kobj,
return count;
}
@@ -112889,7 +137309,7 @@ index e83b264..d09fae1 100644
.name = "notes",
.mode = S_IRUGO,
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
-index 60ace56..8392836 100644
+index 716547f..91e3067 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -613,6 +613,10 @@ static int static_obj(void *obj)
@@ -112911,7 +137331,7 @@ index 60ace56..8392836 100644
printk("the code is fine but needs lockdep annotation.\n");
printk("turning off the locking correctness validator.\n");
dump_stack();
-@@ -3102,7 +3107,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
+@@ -3106,7 +3111,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
if (!class)
return 0;
}
@@ -113049,7 +137469,7 @@ index 0551c21..f753f95 100644
debug_mutex_free_waiter(&waiter);
mutex_release(&lock->dep_map, 1, ip);
diff --git a/kernel/module.c b/kernel/module.c
-index 0e5c711..940c5c0 100644
+index 794ebe8..70e7897 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -59,6 +59,7 @@
@@ -113060,52 +137480,44 @@ index 0e5c711..940c5c0 100644
#include <uapi/linux/module.h>
#include "module-internal.h"
-@@ -108,7 +109,7 @@ static LIST_HEAD(modules);
- * Use a latched RB-tree for __module_address(); this allows us to use
- * RCU-sched lookups of the address from any context.
- *
-- * Because modules have two address ranges: init and core, we need two
-+ * Because modules have four address ranges: init_{rw,rx} and core_{rw,rx}, we need four
- * latch_tree_nodes entries. Therefore we need the back-pointer from
- * mod_tree_node.
- *
-@@ -125,10 +126,14 @@ static __always_inline unsigned long __mod_tree_val(struct latch_tree_node *n)
- struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
- struct module *mod = mtn->mod;
+@@ -106,16 +107,32 @@ static LIST_HEAD(modules);
-- if (unlikely(mtn == &mod->mtn_init))
-- return (unsigned long)mod->module_init;
-+ if (unlikely(mtn == &mod->mtn_init_rw))
-+ return (unsigned long)mod->module_init_rw;
-+ if (unlikely(mtn == &mod->mtn_init_rx))
-+ return (unsigned long)mod->module_init_rx;
+ static __always_inline unsigned long __mod_tree_val(struct latch_tree_node *n)
+ {
+- struct module_layout *layout = container_of(n, struct module_layout, mtn.node);
++ struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
++ struct module *mod = mtn->mod;
-- return (unsigned long)mod->module_core;
-+ if (unlikely(mtn == &mod->mtn_core_rw))
-+ return (unsigned long)mod->module_core_rw;
-+ return (unsigned long)mod->module_core_rx;
+- return (unsigned long)layout->base;
++ if (unlikely(mtn == &mod->init_layout.mtn_rw))
++ return (unsigned long)mod->init_layout.base_rw;
++ if (unlikely(mtn == &mod->init_layout.mtn_rx))
++ return (unsigned long)mod->init_layout.base_rx;
++
++ if (unlikely(mtn == &mod->core_layout.mtn_rw))
++ return (unsigned long)mod->core_layout.base_rw;
++ return (unsigned long)mod->core_layout.base_rx;
}
static __always_inline unsigned long __mod_tree_size(struct latch_tree_node *n)
-@@ -136,10 +141,14 @@ static __always_inline unsigned long __mod_tree_size(struct latch_tree_node *n)
- struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
- struct module *mod = mtn->mod;
-
-- if (unlikely(mtn == &mod->mtn_init))
-- return (unsigned long)mod->init_size;
-+ if (unlikely(mtn == &mod->mtn_init_rw))
-+ return (unsigned long)mod->init_size_rw;
-+ if (unlikely(mtn == &mod->mtn_init_rx))
-+ return (unsigned long)mod->init_size_rx;
+ {
+- struct module_layout *layout = container_of(n, struct module_layout, mtn.node);
++ struct mod_tree_node *mtn = container_of(n, struct mod_tree_node, node);
++ struct module *mod = mtn->mod;
-- return (unsigned long)mod->core_size;
-+ if (unlikely(mtn == &mod->mtn_core_rw))
-+ return (unsigned long)mod->core_size_rw;
-+ return (unsigned long)mod->core_size_rx;
+- return (unsigned long)layout->size;
++ if (unlikely(mtn == &mod->init_layout.mtn_rw))
++ return (unsigned long)mod->init_layout.size_rw;
++ if (unlikely(mtn == &mod->init_layout.mtn_rx))
++ return (unsigned long)mod->init_layout.size_rx;
++
++ if (unlikely(mtn == &mod->core_layout.mtn_rw))
++ return (unsigned long)mod->core_layout.size_rw;
++ return (unsigned long)mod->core_layout.size_rx;
}
static __always_inline bool
-@@ -172,14 +181,19 @@ static const struct latch_tree_ops mod_tree_ops = {
+@@ -148,14 +165,19 @@ static const struct latch_tree_ops mod_tree_ops = {
static struct mod_tree_root {
struct latch_tree_root root;
@@ -113130,47 +137542,47 @@ index 0e5c711..940c5c0 100644
static noinline void __mod_tree_insert(struct mod_tree_node *node)
{
-@@ -197,23 +211,31 @@ static void __mod_tree_remove(struct mod_tree_node *node)
+@@ -173,23 +195,31 @@ static void __mod_tree_remove(struct mod_tree_node *node)
*/
static void mod_tree_insert(struct module *mod)
{
-- mod->mtn_core.mod = mod;
-- mod->mtn_init.mod = mod;
-+ mod->mtn_core_rw.mod = mod;
-+ mod->mtn_core_rx.mod = mod;
-+ mod->mtn_init_rw.mod = mod;
-+ mod->mtn_init_rx.mod = mod;
+- mod->core_layout.mtn.mod = mod;
+- mod->init_layout.mtn.mod = mod;
++ mod->core_layout.mtn_rx.mod = mod;
++ mod->core_layout.mtn_rw.mod = mod;
++ mod->init_layout.mtn_rx.mod = mod;
++ mod->init_layout.mtn_rw.mod = mod;
-- __mod_tree_insert(&mod->mtn_core);
-- if (mod->init_size)
-- __mod_tree_insert(&mod->mtn_init);
-+ __mod_tree_insert(&mod->mtn_core_rw);
-+ __mod_tree_insert(&mod->mtn_core_rx);
-+ if (mod->init_size_rw)
-+ __mod_tree_insert(&mod->mtn_init_rw);
-+ if (mod->init_size_rx)
-+ __mod_tree_insert(&mod->mtn_init_rx);
+- __mod_tree_insert(&mod->core_layout.mtn);
+- if (mod->init_layout.size)
+- __mod_tree_insert(&mod->init_layout.mtn);
++ __mod_tree_insert(&mod->core_layout.mtn_rx);
++ __mod_tree_insert(&mod->core_layout.mtn_rw);
++ if (mod->init_layout.size_rx)
++ __mod_tree_insert(&mod->init_layout.mtn_rx);
++ if (mod->init_layout.size_rw)
++ __mod_tree_insert(&mod->init_layout.mtn_rw);
}
static void mod_tree_remove_init(struct module *mod)
{
-- if (mod->init_size)
-- __mod_tree_remove(&mod->mtn_init);
-+ if (mod->init_size_rw)
-+ __mod_tree_remove(&mod->mtn_init_rw);
-+ if (mod->init_size_rx)
-+ __mod_tree_remove(&mod->mtn_init_rx);
+- if (mod->init_layout.size)
+- __mod_tree_remove(&mod->init_layout.mtn);
++ if (mod->init_layout.size_rx)
++ __mod_tree_remove(&mod->init_layout.mtn_rx);
++ if (mod->init_layout.size_rw)
++ __mod_tree_remove(&mod->init_layout.mtn_rw);
}
static void mod_tree_remove(struct module *mod)
{
-- __mod_tree_remove(&mod->mtn_core);
-+ __mod_tree_remove(&mod->mtn_core_rw);
-+ __mod_tree_remove(&mod->mtn_core_rx);
+- __mod_tree_remove(&mod->core_layout.mtn);
++ __mod_tree_remove(&mod->core_layout.mtn_rx);
++ __mod_tree_remove(&mod->core_layout.mtn_rw);
mod_tree_remove_init(mod);
}
-@@ -230,7 +252,8 @@ static struct module *mod_find(unsigned long addr)
+@@ -206,7 +236,8 @@ static struct module *mod_find(unsigned long addr)
#else /* MODULES_TREE_LOOKUP */
@@ -113180,12 +137592,12 @@ index 0e5c711..940c5c0 100644
static void mod_tree_insert(struct module *mod) { }
static void mod_tree_remove_init(struct module *mod) { }
-@@ -254,22 +277,36 @@ static struct module *mod_find(unsigned long addr)
+@@ -230,22 +261,36 @@ static struct module *mod_find(unsigned long addr)
* Bounds of module text, for speeding up __module_address.
* Protected by module_mutex.
*/
-static void __mod_update_bounds(void *base, unsigned int size)
-+static void __mod_update_bounds_rw(void *base, unsigned int size)
++static void __mod_update_bounds_rx(void *base, unsigned int size)
{
unsigned long min = (unsigned long)base;
unsigned long max = min + size;
@@ -113194,38 +137606,38 @@ index 0e5c711..940c5c0 100644
- module_addr_min = min;
- if (max > module_addr_max)
- module_addr_max = max;
-+ if (min < module_addr_min_rw)
-+ module_addr_min_rw = min;
-+ if (max > module_addr_max_rw)
-+ module_addr_max_rw = max;
++ if (min < module_addr_min_rx)
++ module_addr_min_rx = min;
++ if (max > module_addr_max_rx)
++ module_addr_max_rx = max;
+}
+
-+static void __mod_update_bounds_rx(void *base, unsigned int size)
++static void __mod_update_bounds_rw(void *base, unsigned int size)
+{
+ unsigned long min = (unsigned long)base;
+ unsigned long max = min + size;
+
-+ if (min < module_addr_min_rx)
-+ module_addr_min_rx = min;
-+ if (max > module_addr_max_rx)
-+ module_addr_max_rx = max;
++ if (min < module_addr_min_rw)
++ module_addr_min_rw = min;
++ if (max > module_addr_max_rw)
++ module_addr_max_rw = max;
}
static void mod_update_bounds(struct module *mod)
{
-- __mod_update_bounds(mod->module_core, mod->core_size);
-- if (mod->init_size)
-- __mod_update_bounds(mod->module_init, mod->init_size);
-+ __mod_update_bounds_rw(mod->module_core_rw, mod->core_size_rw);
-+ __mod_update_bounds_rx(mod->module_core_rx, mod->core_size_rx);
-+ if (mod->init_size_rw)
-+ __mod_update_bounds_rw(mod->module_init_rw, mod->init_size_rw);
-+ if (mod->init_size_rx)
-+ __mod_update_bounds_rx(mod->module_init_rx, mod->init_size_rx);
+- __mod_update_bounds(mod->core_layout.base, mod->core_layout.size);
+- if (mod->init_layout.size)
+- __mod_update_bounds(mod->init_layout.base, mod->init_layout.size);
++ __mod_update_bounds_rx(mod->core_layout.base_rx, mod->core_layout.size_rx);
++ __mod_update_bounds_rw(mod->core_layout.base_rw, mod->core_layout.size_rw);
++ if (mod->init_layout.size_rx)
++ __mod_update_bounds_rw(mod->init_layout.base_rx, mod->init_layout.size_rx);
++ if (mod->init_layout.size_rw)
++ __mod_update_bounds_rw(mod->init_layout.base_rw, mod->init_layout.size_rw);
}
#ifdef CONFIG_KGDB_KDB
-@@ -298,7 +335,7 @@ module_param(sig_enforce, bool_enable_only, 0644);
+@@ -274,7 +319,7 @@ module_param(sig_enforce, bool_enable_only, 0644);
#endif /* !CONFIG_MODULE_SIG_FORCE */
/* Block module loading/unloading? */
@@ -113234,7 +137646,7 @@ index 0e5c711..940c5c0 100644
core_param(nomodule, modules_disabled, bint, 0);
/* Waiting for a module to finish initializing? */
-@@ -476,7 +513,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+@@ -452,7 +497,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
return true;
list_for_each_entry_rcu(mod, &modules, list) {
@@ -113243,7 +137655,7 @@ index 0e5c711..940c5c0 100644
{ mod->syms, mod->syms + mod->num_syms, mod->crcs,
NOT_GPL_ONLY, false },
{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
-@@ -501,7 +538,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
+@@ -477,7 +522,7 @@ bool each_symbol_section(bool (*fn)(const struct symsearch *arr,
if (mod->state == MODULE_STATE_UNFORMED)
continue;
@@ -113252,7 +137664,7 @@ index 0e5c711..940c5c0 100644
return true;
}
return false;
-@@ -647,7 +684,7 @@ static int percpu_modalloc(struct module *mod, struct load_info *info)
+@@ -623,7 +668,7 @@ static int percpu_modalloc(struct module *mod, struct load_info *info)
if (!pcpusec->sh_size)
return 0;
@@ -113261,25 +137673,25 @@ index 0e5c711..940c5c0 100644
pr_warn("%s: per-cpu alignment %li > %li\n",
mod->name, align, PAGE_SIZE);
align = PAGE_SIZE;
-@@ -1217,7 +1254,7 @@ struct module_attribute module_uevent =
+@@ -1195,7 +1240,7 @@ struct module_attribute module_uevent =
static ssize_t show_coresize(struct module_attribute *mattr,
struct module_kobject *mk, char *buffer)
{
-- return sprintf(buffer, "%u\n", mk->mod->core_size);
-+ return sprintf(buffer, "%u\n", mk->mod->core_size_rx + mk->mod->core_size_rw);
+- return sprintf(buffer, "%u\n", mk->mod->core_layout.size);
++ return sprintf(buffer, "%u\n", mk->mod->core_layout.size_rx + mk->mod->core_layout.size_rw);
}
static struct module_attribute modinfo_coresize =
-@@ -1226,7 +1263,7 @@ static struct module_attribute modinfo_coresize =
+@@ -1204,7 +1249,7 @@ static struct module_attribute modinfo_coresize =
static ssize_t show_initsize(struct module_attribute *mattr,
struct module_kobject *mk, char *buffer)
{
-- return sprintf(buffer, "%u\n", mk->mod->init_size);
-+ return sprintf(buffer, "%u\n", mk->mod->init_size_rx + mk->mod->init_size_rw);
+- return sprintf(buffer, "%u\n", mk->mod->init_layout.size);
++ return sprintf(buffer, "%u\n", mk->mod->init_layout.size_rx + mk->mod->init_layout.size_rw);
}
static struct module_attribute modinfo_initsize =
-@@ -1318,12 +1355,29 @@ static int check_version(Elf_Shdr *sechdrs,
+@@ -1296,12 +1341,29 @@ static int check_version(Elf_Shdr *sechdrs,
goto bad_version;
}
@@ -113309,7 +137721,7 @@ index 0e5c711..940c5c0 100644
return 0;
}
-@@ -1451,7 +1505,7 @@ resolve_symbol_wait(struct module *mod,
+@@ -1429,7 +1491,7 @@ resolve_symbol_wait(struct module *mod,
*/
#ifdef CONFIG_SYSFS
@@ -113318,7 +137730,7 @@ index 0e5c711..940c5c0 100644
static inline bool sect_empty(const Elf_Shdr *sect)
{
return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
-@@ -1589,7 +1643,7 @@ static void add_notes_attrs(struct module *mod, const struct load_info *info)
+@@ -1567,7 +1629,7 @@ static void add_notes_attrs(struct module *mod, const struct load_info *info)
{
unsigned int notes, loaded, i;
struct module_notes_attrs *notes_attrs;
@@ -113327,7 +137739,7 @@ index 0e5c711..940c5c0 100644
/* failed to create section attributes, so can't create notes */
if (!mod->sect_attrs)
-@@ -1701,7 +1755,7 @@ static void del_usage_links(struct module *mod)
+@@ -1679,7 +1741,7 @@ static void del_usage_links(struct module *mod)
static int module_add_modinfo_attrs(struct module *mod)
{
struct module_attribute *attr;
@@ -113336,119 +137748,90 @@ index 0e5c711..940c5c0 100644
int error = 0;
int i;
-@@ -1918,21 +1972,21 @@ static void set_section_ro_nx(void *base,
+@@ -1866,30 +1928,28 @@ static void mod_sysfs_teardown(struct module *mod)
+ static void frob_text(const struct module_layout *layout,
+ int (*set_memory)(unsigned long start, int num_pages))
+ {
+- BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
+- BUG_ON((unsigned long)layout->text_size & (PAGE_SIZE-1));
+- set_memory((unsigned long)layout->base,
+- layout->text_size >> PAGE_SHIFT);
++ BUG_ON((unsigned long)layout->base_rx & (PAGE_SIZE-1));
++ BUG_ON((unsigned long)layout->size_rx & (PAGE_SIZE-1));
++ set_memory((unsigned long)layout->base_rx,
++ layout->size_rx >> PAGE_SHIFT);
+ }
- static void unset_module_core_ro_nx(struct module *mod)
+ static void frob_rodata(const struct module_layout *layout,
+ int (*set_memory)(unsigned long start, int num_pages))
{
-- set_page_attributes(mod->module_core + mod->core_text_size,
-- mod->module_core + mod->core_size,
-+ set_page_attributes(mod->module_core_rw,
-+ mod->module_core_rw + mod->core_size_rw,
- set_memory_x);
-- set_page_attributes(mod->module_core,
-- mod->module_core + mod->core_ro_size,
-+ set_page_attributes(mod->module_core_rx,
-+ mod->module_core_rx + mod->core_size_rx,
- set_memory_rw);
+- BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
+- BUG_ON((unsigned long)layout->text_size & (PAGE_SIZE-1));
+- BUG_ON((unsigned long)layout->ro_size & (PAGE_SIZE-1));
+- set_memory((unsigned long)layout->base + layout->text_size,
+- (layout->ro_size - layout->text_size) >> PAGE_SHIFT);
++ BUG_ON((unsigned long)layout->base_rx & (PAGE_SIZE-1));
++ BUG_ON((unsigned long)layout->size_rx & (PAGE_SIZE-1));
++// BUG_ON((unsigned long)layout->size_ro & (PAGE_SIZE-1));
++// set_memory((unsigned long)layout->base_rx + layout->size_rx,
++// (layout->size_ro - layout->size_rx) >> PAGE_SHIFT);
}
- static void unset_module_init_ro_nx(struct module *mod)
+ static void frob_writable_data(const struct module_layout *layout,
+ int (*set_memory)(unsigned long start, int num_pages))
{
-- set_page_attributes(mod->module_init + mod->init_text_size,
-- mod->module_init + mod->init_size,
-+ set_page_attributes(mod->module_init_rw,
-+ mod->module_init_rw + mod->init_size_rw,
- set_memory_x);
-- set_page_attributes(mod->module_init,
-- mod->module_init + mod->init_ro_size,
-+ set_page_attributes(mod->module_init_rx,
-+ mod->module_init_rx + mod->init_size_rx,
- set_memory_rw);
+- BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
+- BUG_ON((unsigned long)layout->ro_size & (PAGE_SIZE-1));
+- BUG_ON((unsigned long)layout->size & (PAGE_SIZE-1));
+- set_memory((unsigned long)layout->base + layout->ro_size,
+- (layout->size - layout->ro_size) >> PAGE_SHIFT);
++ BUG_ON((unsigned long)layout->base_rw & (PAGE_SIZE-1));
++ BUG_ON((unsigned long)layout->size_rw & (PAGE_SIZE-1));
++ set_memory((unsigned long)layout->base_rw, layout->size_rw >> PAGE_SHIFT);
+ }
+
+ /* livepatching wants to disable read-only so it can frob module. */
+@@ -1966,7 +2026,15 @@ static void disable_ro_nx(const struct module_layout *layout)
}
-@@ -1945,14 +1999,14 @@ void set_all_modules_text_rw(void)
- list_for_each_entry_rcu(mod, &modules, list) {
- if (mod->state == MODULE_STATE_UNFORMED)
- continue;
-- if ((mod->module_core) && (mod->core_text_size)) {
-- set_page_attributes(mod->module_core,
-- mod->module_core + mod->core_text_size,
-+ if ((mod->module_core_rx) && (mod->core_size_rx)) {
-+ set_page_attributes(mod->module_core_rx,
-+ mod->module_core_rx + mod->core_size_rx,
- set_memory_rw);
- }
-- if ((mod->module_init) && (mod->init_text_size)) {
-- set_page_attributes(mod->module_init,
-- mod->module_init + mod->init_text_size,
-+ if ((mod->module_init_rx) && (mod->init_size_rx)) {
-+ set_page_attributes(mod->module_init_rx,
-+ mod->module_init_rx + mod->init_size_rx,
- set_memory_rw);
- }
- }
-@@ -1968,14 +2022,14 @@ void set_all_modules_text_ro(void)
- list_for_each_entry_rcu(mod, &modules, list) {
- if (mod->state == MODULE_STATE_UNFORMED)
- continue;
-- if ((mod->module_core) && (mod->core_text_size)) {
-- set_page_attributes(mod->module_core,
-- mod->module_core + mod->core_text_size,
-+ if ((mod->module_core_rx) && (mod->core_size_rx)) {
-+ set_page_attributes(mod->module_core_rx,
-+ mod->module_core_rx + mod->core_size_rx,
- set_memory_ro);
- }
-- if ((mod->module_init) && (mod->init_text_size)) {
-- set_page_attributes(mod->module_init,
-- mod->module_init + mod->init_text_size,
-+ if ((mod->module_init_rx) && (mod->init_size_rx)) {
-+ set_page_attributes(mod->module_init_rx,
-+ mod->module_init_rx + mod->init_size_rx,
- set_memory_ro);
- }
- }
-@@ -1984,7 +2038,15 @@ void set_all_modules_text_ro(void)
#else
- static inline void set_section_ro_nx(void *base, unsigned long text_size, unsigned long ro_size, unsigned long total_size) { }
- static void unset_module_core_ro_nx(struct module *mod) { }
--static void unset_module_init_ro_nx(struct module *mod) { }
-+static void unset_module_init_ro_nx(struct module *mod)
+-static void disable_ro_nx(const struct module_layout *layout) { }
++static void disable_ro_nx(const struct module_layout *layout)
+{
+
+#ifdef CONFIG_PAX_KERNEXEC
-+ set_memory_nx((unsigned long)mod->module_init_rx, PFN_UP(mod->init_size_rx));
-+ set_memory_rw((unsigned long)mod->module_init_rx, PFN_UP(mod->init_size_rx));
++ set_memory_nx((unsigned long)layout->base_rx, PFN_UP(layout->size_rx));
++ set_memory_rw((unsigned long)layout->base_rx, PFN_UP(layout->size_rx));
+#endif
+
+}
+ static void module_enable_nx(const struct module *mod) { }
+ static void module_disable_nx(const struct module *mod) { }
#endif
-
- void __weak module_memfree(void *module_region)
-@@ -2039,16 +2101,19 @@ static void free_module(struct module *mod)
- /* This may be NULL, but that's OK */
- unset_module_init_ro_nx(mod);
+@@ -2023,16 +2091,19 @@ static void free_module(struct module *mod)
+ /* This may be empty, but that's OK */
+ disable_ro_nx(&mod->init_layout);
module_arch_freeing_init(mod);
-- module_memfree(mod->module_init);
-+ module_memfree(mod->module_init_rw);
-+ module_memfree_exec(mod->module_init_rx);
+- module_memfree(mod->init_layout.base);
++ module_memfree(mod->init_layout.base_rw);
++ module_memfree_exec(mod->init_layout.base_rx);
kfree(mod->args);
percpu_modfree(mod);
/* Free lock-classes; relies on the preceding sync_rcu(). */
-- lockdep_free_key_range(mod->module_core, mod->core_size);
-+ lockdep_free_key_range(mod->module_core_rx, mod->core_size_rx);
-+ lockdep_free_key_range(mod->module_core_rw, mod->core_size_rw);
+- lockdep_free_key_range(mod->core_layout.base, mod->core_layout.size);
++ lockdep_free_key_range(mod->core_layout.base_rw, mod->core_layout.size_rw);
++ lockdep_free_key_range(mod->core_layout.base_rx, mod->core_layout.size_rx);
/* Finally, free the core (containing the module structure) */
- unset_module_core_ro_nx(mod);
-- module_memfree(mod->module_core);
-+ module_memfree_exec(mod->module_core_rx);
-+ module_memfree(mod->module_core_rw);
+ disable_ro_nx(&mod->core_layout);
+- module_memfree(mod->core_layout.base);
++ module_memfree_exec(mod->core_layout.base_rx);
++ module_memfree(mod->core_layout.base_rw);
#ifdef CONFIG_MPU
update_protections(current->mm);
-@@ -2117,9 +2182,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
+@@ -2101,9 +2172,31 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
int ret = 0;
const struct kernel_symbol *ksym;
@@ -113480,7 +137863,7 @@ index 0e5c711..940c5c0 100644
switch (sym[i].st_shndx) {
case SHN_COMMON:
/* Ignore common symbols */
-@@ -2144,7 +2231,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
+@@ -2128,7 +2221,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
ksym = resolve_symbol_wait(mod, info, name);
/* Ok if resolved. */
if (ksym && !IS_ERR(ksym)) {
@@ -113490,7 +137873,7 @@ index 0e5c711..940c5c0 100644
break;
}
-@@ -2163,11 +2252,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
+@@ -2147,11 +2242,20 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
secbase = (unsigned long)mod_percpu(mod);
else
secbase = info->sechdrs[sym[i].st_shndx].sh_addr;
@@ -113511,127 +137894,129 @@ index 0e5c711..940c5c0 100644
return ret;
}
-@@ -2251,22 +2349,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
+@@ -2235,22 +2339,12 @@ static void layout_sections(struct module *mod, struct load_info *info)
|| s->sh_entsize != ~0UL
|| strstarts(sname, ".init"))
continue;
-- s->sh_entsize = get_offset(mod, &mod->core_size, s, i);
+- s->sh_entsize = get_offset(mod, &mod->core_layout.size, s, i);
+ if ((s->sh_flags & SHF_WRITE) || !(s->sh_flags & SHF_ALLOC))
-+ s->sh_entsize = get_offset(mod, &mod->core_size_rw, s, i);
++ s->sh_entsize = get_offset(mod, &mod->core_layout.size_rw, s, i);
+ else
-+ s->sh_entsize = get_offset(mod, &mod->core_size_rx, s, i);
++ s->sh_entsize = get_offset(mod, &mod->core_layout.size_rx, s, i);
pr_debug("\t%s\n", sname);
}
- switch (m) {
- case 0: /* executable */
-- mod->core_size = debug_align(mod->core_size);
-- mod->core_text_size = mod->core_size;
+- mod->core_layout.size = debug_align(mod->core_layout.size);
+- mod->core_layout.text_size = mod->core_layout.size;
- break;
- case 1: /* RO: text and ro-data */
-- mod->core_size = debug_align(mod->core_size);
-- mod->core_ro_size = mod->core_size;
+- mod->core_layout.size = debug_align(mod->core_layout.size);
+- mod->core_layout.ro_size = mod->core_layout.size;
- break;
- case 3: /* whole core */
-- mod->core_size = debug_align(mod->core_size);
+- mod->core_layout.size = debug_align(mod->core_layout.size);
- break;
- }
}
pr_debug("Init section allocation order:\n");
-@@ -2280,23 +2368,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
+@@ -2264,23 +2358,13 @@ static void layout_sections(struct module *mod, struct load_info *info)
|| s->sh_entsize != ~0UL
|| !strstarts(sname, ".init"))
continue;
-- s->sh_entsize = (get_offset(mod, &mod->init_size, s, i)
+- s->sh_entsize = (get_offset(mod, &mod->init_layout.size, s, i)
- | INIT_OFFSET_MASK);
+ if ((s->sh_flags & SHF_WRITE) || !(s->sh_flags & SHF_ALLOC))
-+ s->sh_entsize = get_offset(mod, &mod->init_size_rw, s, i);
++ s->sh_entsize = get_offset(mod, &mod->init_layout.size_rw, s, i);
+ else
-+ s->sh_entsize = get_offset(mod, &mod->init_size_rx, s, i);
++ s->sh_entsize = get_offset(mod, &mod->init_layout.size_rx, s, i);
+ s->sh_entsize |= INIT_OFFSET_MASK;
pr_debug("\t%s\n", sname);
}
- switch (m) {
- case 0: /* executable */
-- mod->init_size = debug_align(mod->init_size);
-- mod->init_text_size = mod->init_size;
+- mod->init_layout.size = debug_align(mod->init_layout.size);
+- mod->init_layout.text_size = mod->init_layout.size;
- break;
- case 1: /* RO: text and ro-data */
-- mod->init_size = debug_align(mod->init_size);
-- mod->init_ro_size = mod->init_size;
+- mod->init_layout.size = debug_align(mod->init_layout.size);
+- mod->init_layout.ro_size = mod->init_layout.size;
- break;
- case 3: /* whole init */
-- mod->init_size = debug_align(mod->init_size);
+- mod->init_layout.size = debug_align(mod->init_layout.size);
- break;
- }
}
}
-@@ -2469,7 +2547,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
+@@ -2458,7 +2542,7 @@ static void layout_symtab(struct module *mod, struct load_info *info)
/* Put symbol section at end of init part of module. */
symsect->sh_flags |= SHF_ALLOC;
-- symsect->sh_entsize = get_offset(mod, &mod->init_size, symsect,
-+ symsect->sh_entsize = get_offset(mod, &mod->init_size_rx, symsect,
+- symsect->sh_entsize = get_offset(mod, &mod->init_layout.size, symsect,
++ symsect->sh_entsize = get_offset(mod, &mod->init_layout.size_rx, symsect,
info->index.sym) | INIT_OFFSET_MASK;
pr_debug("\t%s\n", info->secstrings + symsect->sh_name);
-@@ -2486,23 +2564,23 @@ static void layout_symtab(struct module *mod, struct load_info *info)
+@@ -2476,23 +2560,23 @@ static void layout_symtab(struct module *mod, struct load_info *info)
}
/* Append room for core symbols at end of core part. */
-- info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1);
-- info->stroffs = mod->core_size = info->symoffs + ndst * sizeof(Elf_Sym);
-- mod->core_size += strtab_size;
-- mod->core_size = debug_align(mod->core_size);
-+ info->symoffs = ALIGN(mod->core_size_rx, symsect->sh_addralign ?: 1);
-+ info->stroffs = mod->core_size_rx = info->symoffs + ndst * sizeof(Elf_Sym);
-+ mod->core_size_rx += strtab_size;
-+ mod->core_size_rx = debug_align(mod->core_size_rx);
+- info->symoffs = ALIGN(mod->core_layout.size, symsect->sh_addralign ?: 1);
+- info->stroffs = mod->core_layout.size = info->symoffs + ndst * sizeof(Elf_Sym);
+- mod->core_layout.size += strtab_size;
+- mod->core_layout.size = debug_align(mod->core_layout.size);
++ info->symoffs = ALIGN(mod->core_layout.size_rx, symsect->sh_addralign ?: 1);
++ info->stroffs = mod->core_layout.size_rx = info->symoffs + ndst * sizeof(Elf_Sym);
++ mod->core_layout.size_rx += strtab_size;
++ mod->core_layout.size_rx = debug_align(mod->core_layout.size_rx);
/* Put string table section at end of init part of module. */
strsect->sh_flags |= SHF_ALLOC;
-- strsect->sh_entsize = get_offset(mod, &mod->init_size, strsect,
-+ strsect->sh_entsize = get_offset(mod, &mod->init_size_rx, strsect,
+- strsect->sh_entsize = get_offset(mod, &mod->init_layout.size, strsect,
++ strsect->sh_entsize = get_offset(mod, &mod->init_layout.size_rx, strsect,
info->index.str) | INIT_OFFSET_MASK;
pr_debug("\t%s\n", info->secstrings + strsect->sh_name);
/* We'll tack temporary mod_kallsyms on the end. */
-- mod->init_size = ALIGN(mod->init_size,
-+ mod->init_size_rx = ALIGN(mod->init_size_rx,
- __alignof__(struct mod_kallsyms));
-- info->mod_kallsyms_init_off = mod->init_size;
-- mod->init_size += sizeof(struct mod_kallsyms);
-- mod->init_size = debug_align(mod->init_size);
-+ info->mod_kallsyms_init_off = mod->init_size_rx;
-+ mod->init_size_rx += sizeof(struct mod_kallsyms);
-+ mod->init_size_rx = debug_align(mod->init_size_rx);
+- mod->init_layout.size = ALIGN(mod->init_layout.size,
++ mod->init_layout.size_rx = ALIGN(mod->init_layout.size_rx,
+ __alignof__(struct mod_kallsyms));
+- info->mod_kallsyms_init_off = mod->init_layout.size;
+- mod->init_layout.size += sizeof(struct mod_kallsyms);
+- mod->init_layout.size = debug_align(mod->init_layout.size);
++ info->mod_kallsyms_init_off = mod->init_layout.size_rx;
++ mod->init_layout.size_rx += sizeof(struct mod_kallsyms);
++ mod->init_layout.size_rx = debug_align(mod->init_layout.size_rx);
}
/*
-@@ -2519,7 +2597,9 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
+@@ -2509,7 +2593,11 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
Elf_Shdr *symsec = &info->sechdrs[info->index.sym];
/* Set up to point into init section. */
-- mod->kallsyms = mod->module_init + info->mod_kallsyms_init_off;
-+ mod->kallsyms = mod->module_init_rx + info->mod_kallsyms_init_off;
+- mod->kallsyms = mod->init_layout.base + info->mod_kallsyms_init_off;
++ mod->kallsyms = mod->init_layout.base_rx + info->mod_kallsyms_init_off;
++
++ pax_open_kernel();
+
+ pax_open_kernel();
mod->kallsyms->symtab = (void *)symsec->sh_addr;
mod->kallsyms->num_symtab = symsec->sh_size / sizeof(Elf_Sym);
-@@ -2532,8 +2612,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
+@@ -2522,8 +2610,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
= elf_type(&mod->kallsyms->symtab[i], info);
/* Now populate the cut down core kallsyms for after init. */
-- mod->core_kallsyms.symtab = dst = mod->module_core + info->symoffs;
-- mod->core_kallsyms.strtab = s = mod->module_core + info->stroffs;
-+ mod->core_kallsyms.symtab = dst = mod->module_core_rx + info->symoffs;
-+ mod->core_kallsyms.strtab = s = mod->module_core_rx + info->stroffs;
+- mod->core_kallsyms.symtab = dst = mod->core_layout.base + info->symoffs;
+- mod->core_kallsyms.strtab = s = mod->core_layout.base + info->stroffs;
++ mod->core_kallsyms.symtab = dst = mod->core_layout.base_rx + info->symoffs;
++ mod->core_kallsyms.strtab = s = mod->core_layout.base_rx + info->stroffs;
src = mod->kallsyms->symtab;
for (ndst = i = 0; i < mod->kallsyms->num_symtab; i++) {
if (i == 0 ||
-@@ -2545,6 +2625,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
+@@ -2536,6 +2624,8 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
}
}
mod->core_kallsyms.num_symtab = ndst;
@@ -113640,7 +138025,7 @@ index 0e5c711..940c5c0 100644
}
#else
static inline void layout_symtab(struct module *mod, struct load_info *info)
-@@ -2844,7 +2926,15 @@ static struct module *setup_load_info(struct load_info *info, int flags)
+@@ -2835,7 +2925,15 @@ static struct module *setup_load_info(struct load_info *info, int flags)
mod = (void *)info->sechdrs[info->index.mod].sh_addr;
if (info->index.sym == 0) {
@@ -113656,14 +138041,14 @@ index 0e5c711..940c5c0 100644
return ERR_PTR(-ENOEXEC);
}
-@@ -2860,8 +2950,14 @@ static struct module *setup_load_info(struct load_info *info, int flags)
+@@ -2851,8 +2949,14 @@ static struct module *setup_load_info(struct load_info *info, int flags)
static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
const char *modmagic = get_modinfo(info, "vermagic");
+ const char *license = get_modinfo(info, "license");
int err;
-+#ifdef CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR
++#if defined(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_OR) || defined(CONFIG_PAX_RAP)
+ if (!license || !license_is_gpl_compatible(license))
+ return -ENOEXEC;
+#endif
@@ -113671,7 +138056,7 @@ index 0e5c711..940c5c0 100644
if (flags & MODULE_INIT_IGNORE_VERMAGIC)
modmagic = NULL;
-@@ -2886,7 +2982,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
+@@ -2877,7 +2981,7 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
}
/* Set up license info based on the info section */
@@ -113680,102 +138065,102 @@ index 0e5c711..940c5c0 100644
return 0;
}
-@@ -2983,7 +3079,7 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2974,7 +3078,7 @@ static int move_module(struct module *mod, struct load_info *info)
void *ptr;
/* Do the allocs. */
-- ptr = module_alloc(mod->core_size);
-+ ptr = module_alloc(mod->core_size_rw);
+- ptr = module_alloc(mod->core_layout.size);
++ ptr = module_alloc(mod->core_layout.size_rw);
/*
* The pointer to this block is stored in the module structure
* which is inside the block. Just mark it as not being a
-@@ -2993,11 +3089,11 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2984,11 +3088,11 @@ static int move_module(struct module *mod, struct load_info *info)
if (!ptr)
return -ENOMEM;
-- memset(ptr, 0, mod->core_size);
-- mod->module_core = ptr;
-+ memset(ptr, 0, mod->core_size_rw);
-+ mod->module_core_rw = ptr;
+- memset(ptr, 0, mod->core_layout.size);
+- mod->core_layout.base = ptr;
++ memset(ptr, 0, mod->core_layout.size_rw);
++ mod->core_layout.base_rw = ptr;
-- if (mod->init_size) {
-- ptr = module_alloc(mod->init_size);
-+ if (mod->init_size_rw) {
-+ ptr = module_alloc(mod->init_size_rw);
+- if (mod->init_layout.size) {
+- ptr = module_alloc(mod->init_layout.size);
++ if (mod->init_layout.size_rw) {
++ ptr = module_alloc(mod->init_layout.size_rw);
/*
* The pointer to this block is stored in the module structure
* which is inside the block. This block doesn't need to be
-@@ -3006,13 +3102,45 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -2997,13 +3101,45 @@ static int move_module(struct module *mod, struct load_info *info)
*/
kmemleak_ignore(ptr);
if (!ptr) {
-- module_memfree(mod->module_core);
-+ module_memfree(mod->module_core_rw);
+- module_memfree(mod->core_layout.base);
++ module_memfree(mod->core_layout.base_rw);
return -ENOMEM;
}
-- memset(ptr, 0, mod->init_size);
-- mod->module_init = ptr;
-+ memset(ptr, 0, mod->init_size_rw);
-+ mod->module_init_rw = ptr;
+- memset(ptr, 0, mod->init_layout.size);
+- mod->init_layout.base = ptr;
++ memset(ptr, 0, mod->init_layout.size_rw);
++ mod->init_layout.base_rw = ptr;
} else
-- mod->module_init = NULL;
-+ mod->module_init_rw = NULL;
+- mod->init_layout.base = NULL;
++ mod->init_layout.base_rw = NULL;
+
-+ ptr = module_alloc_exec(mod->core_size_rx);
++ ptr = module_alloc_exec(mod->core_layout.size_rx);
+ kmemleak_not_leak(ptr);
+ if (!ptr) {
-+ if (mod->module_init_rw)
-+ module_memfree(mod->module_init_rw);
-+ module_memfree(mod->module_core_rw);
++ if (mod->init_layout.base_rw)
++ module_memfree(mod->init_layout.base_rw);
++ module_memfree(mod->core_layout.base_rw);
+ return -ENOMEM;
+ }
+
+ pax_open_kernel();
-+ memset(ptr, 0, mod->core_size_rx);
++ memset(ptr, 0, mod->core_layout.size_rx);
+ pax_close_kernel();
-+ mod->module_core_rx = ptr;
++ mod->core_layout.base_rx = ptr;
+
-+ if (mod->init_size_rx) {
-+ ptr = module_alloc_exec(mod->init_size_rx);
++ if (mod->init_layout.size_rx) {
++ ptr = module_alloc_exec(mod->init_layout.size_rx);
+ kmemleak_ignore(ptr);
+ if (!ptr) {
-+ module_memfree_exec(mod->module_core_rx);
-+ if (mod->module_init_rw)
-+ module_memfree(mod->module_init_rw);
-+ module_memfree(mod->module_core_rw);
++ module_memfree(mod->core_layout.base_rx);
++ if (mod->init_layout.base_rw)
++ module_memfree(mod->init_layout.base_rw);
++ module_memfree(mod->core_layout.base_rw);
+ return -ENOMEM;
+ }
+
+ pax_open_kernel();
-+ memset(ptr, 0, mod->init_size_rx);
++ memset(ptr, 0, mod->init_layout.size_rx);
+ pax_close_kernel();
-+ mod->module_init_rx = ptr;
++ mod->init_layout.base_rx = ptr;
+ } else
-+ mod->module_init_rx = NULL;
++ mod->init_layout.base_rx = NULL;
/* Transfer each section which specifies SHF_ALLOC */
pr_debug("final section addresses:\n");
-@@ -3023,16 +3151,45 @@ static int move_module(struct module *mod, struct load_info *info)
+@@ -3014,16 +3150,45 @@ static int move_module(struct module *mod, struct load_info *info)
if (!(shdr->sh_flags & SHF_ALLOC))
continue;
- if (shdr->sh_entsize & INIT_OFFSET_MASK)
-- dest = mod->module_init
+- dest = mod->init_layout.base
- + (shdr->sh_entsize & ~INIT_OFFSET_MASK);
- else
-- dest = mod->module_core + shdr->sh_entsize;
+- dest = mod->core_layout.base + shdr->sh_entsize;
+ if (shdr->sh_entsize & INIT_OFFSET_MASK) {
+ if ((shdr->sh_flags & SHF_WRITE) || !(shdr->sh_flags & SHF_ALLOC))
-+ dest = mod->module_init_rw
++ dest = mod->init_layout.base_rw
+ + (shdr->sh_entsize & ~INIT_OFFSET_MASK);
+ else
-+ dest = mod->module_init_rx
++ dest = mod->init_layout.base_rx
+ + (shdr->sh_entsize & ~INIT_OFFSET_MASK);
+ } else {
+ if ((shdr->sh_flags & SHF_WRITE) || !(shdr->sh_flags & SHF_ALLOC))
-+ dest = mod->module_core_rw + shdr->sh_entsize;
++ dest = mod->core_layout.base_rw + shdr->sh_entsize;
+ else
-+ dest = mod->module_core_rx + shdr->sh_entsize;
++ dest = mod->core_layout.base_rx + shdr->sh_entsize;
+ }
+
+ if (shdr->sh_type != SHT_NOBITS) {
@@ -113808,39 +138193,39 @@ index 0e5c711..940c5c0 100644
pr_debug("\t0x%lx %s\n",
(long)shdr->sh_addr, info->secstrings + shdr->sh_name);
}
-@@ -3089,12 +3246,12 @@ static void flush_module_icache(const struct module *mod)
+@@ -3080,12 +3245,12 @@ static void flush_module_icache(const struct module *mod)
* Do it before processing of module parameters, so the module
* can provide parameter accessor functions of its own.
*/
-- if (mod->module_init)
-- flush_icache_range((unsigned long)mod->module_init,
-- (unsigned long)mod->module_init
-- + mod->init_size);
-- flush_icache_range((unsigned long)mod->module_core,
-- (unsigned long)mod->module_core + mod->core_size);
-+ if (mod->module_init_rx)
-+ flush_icache_range((unsigned long)mod->module_init_rx,
-+ (unsigned long)mod->module_init_rx
-+ + mod->init_size_rx);
-+ flush_icache_range((unsigned long)mod->module_core_rx,
-+ (unsigned long)mod->module_core_rx + mod->core_size_rx);
+- if (mod->init_layout.base)
+- flush_icache_range((unsigned long)mod->init_layout.base,
+- (unsigned long)mod->init_layout.base
+- + mod->init_layout.size);
+- flush_icache_range((unsigned long)mod->core_layout.base,
+- (unsigned long)mod->core_layout.base + mod->core_layout.size);
++ if (mod->init_layout.base_rx)
++ flush_icache_range((unsigned long)mod->init_layout.base_rx,
++ (unsigned long)mod->init_layout.base_rx
++ + mod->init_layout.size_rx);
++ flush_icache_range((unsigned long)mod->core_layout.base_rx,
++ (unsigned long)mod->core_layout.base_rx + mod->core_layout.size_rx);
set_fs(old_fs);
}
-@@ -3152,8 +3309,10 @@ static void module_deallocate(struct module *mod, struct load_info *info)
+@@ -3143,8 +3308,10 @@ static void module_deallocate(struct module *mod, struct load_info *info)
{
percpu_modfree(mod);
module_arch_freeing_init(mod);
-- module_memfree(mod->module_init);
-- module_memfree(mod->module_core);
-+ module_memfree_exec(mod->module_init_rx);
-+ module_memfree_exec(mod->module_core_rx);
-+ module_memfree(mod->module_init_rw);
-+ module_memfree(mod->module_core_rw);
+- module_memfree(mod->init_layout.base);
+- module_memfree(mod->core_layout.base);
++ module_memfree_exec(mod->init_layout.base_rx);
++ module_memfree_exec(mod->core_layout.base_rx);
++ module_memfree(mod->init_layout.base_rw);
++ module_memfree(mod->core_layout.base_rw);
}
int __weak module_finalize(const Elf_Ehdr *hdr,
-@@ -3166,7 +3325,9 @@ int __weak module_finalize(const Elf_Ehdr *hdr,
+@@ -3157,7 +3324,9 @@ int __weak module_finalize(const Elf_Ehdr *hdr,
static int post_relocation(struct module *mod, const struct load_info *info)
{
/* Sort exception table now relocations are done. */
@@ -113850,7 +138235,7 @@ index 0e5c711..940c5c0 100644
/* Copy relocated percpu area over. */
percpu_modcopy(mod, (void *)info->sechdrs[info->index.pcpu].sh_addr,
-@@ -3214,13 +3375,15 @@ static void do_mod_ctors(struct module *mod)
+@@ -3205,13 +3374,15 @@ static void do_mod_ctors(struct module *mod)
/* For freeing module_init on success, in case kallsyms traversing */
struct mod_initfree {
struct rcu_head rcu;
@@ -113868,57 +138253,32 @@ index 0e5c711..940c5c0 100644
kfree(m);
}
-@@ -3240,7 +3403,8 @@ static noinline int do_init_module(struct module *mod)
+@@ -3231,7 +3402,8 @@ static noinline int do_init_module(struct module *mod)
ret = -ENOMEM;
goto fail;
}
-- freeinit->module_init = mod->module_init;
-+ freeinit->module_init_rw = mod->module_init_rw;
-+ freeinit->module_init_rx = mod->module_init_rx;
+- freeinit->module_init = mod->init_layout.base;
++ freeinit->module_init_rx = mod->init_layout.base_rx;
++ freeinit->module_init_rw = mod->init_layout.base_rw;
/*
* We want to find out whether @mod uses async during init. Clear
-@@ -3299,10 +3463,10 @@ static noinline int do_init_module(struct module *mod)
+@@ -3290,10 +3462,10 @@ static noinline int do_init_module(struct module *mod)
mod_tree_remove_init(mod);
- unset_module_init_ro_nx(mod);
+ disable_ro_nx(&mod->init_layout);
module_arch_freeing_init(mod);
-- mod->module_init = NULL;
-- mod->init_size = 0;
-- mod->init_ro_size = 0;
-- mod->init_text_size = 0;
-+ mod->module_init_rw = NULL;
-+ mod->module_init_rx = NULL;
-+ mod->init_size_rw = 0;
-+ mod->init_size_rx = 0;
+- mod->init_layout.base = NULL;
+- mod->init_layout.size = 0;
+- mod->init_layout.ro_size = 0;
+- mod->init_layout.text_size = 0;
++ mod->init_layout.base_rx = NULL;
++ mod->init_layout.base_rw = NULL;
++ mod->init_layout.size_rx = 0;
++ mod->init_layout.size_rw = 0;
/*
* We want to free module_init, but be aware that kallsyms may be
* walking this with preempt disabled. In all the failure paths, we
-@@ -3392,16 +3556,16 @@ static int complete_formation(struct module *mod, struct load_info *info)
- module_bug_finalize(info->hdr, info->sechdrs, mod);
-
- /* Set RO and NX regions for core */
-- set_section_ro_nx(mod->module_core,
-- mod->core_text_size,
-- mod->core_ro_size,
-- mod->core_size);
-+ set_section_ro_nx(mod->module_core_rx,
-+ mod->core_size_rx,
-+ mod->core_size_rx,
-+ mod->core_size_rx);
-
- /* Set RO and NX regions for init */
-- set_section_ro_nx(mod->module_init,
-- mod->init_text_size,
-- mod->init_ro_size,
-- mod->init_size);
-+ set_section_ro_nx(mod->module_init_rx,
-+ mod->init_size_rx,
-+ mod->init_size_rx,
-+ mod->init_size_rx);
-
- /* Mark state as coming so strong_try_module_get() ignores us,
- * but kallsyms etc. can see us. */
-@@ -3496,9 +3660,38 @@ static int load_module(struct load_info *info, const char __user *uargs,
+@@ -3481,9 +3653,38 @@ static int load_module(struct load_info *info, const char __user *uargs,
if (err)
goto free_unload;
@@ -113957,7 +138317,7 @@ index 0e5c711..940c5c0 100644
/* Fix up syms, so that st_value is a pointer to location. */
err = simplify_symbols(mod, info);
if (err < 0)
-@@ -3514,13 +3707,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
+@@ -3499,13 +3700,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
flush_module_icache(mod);
@@ -113971,7 +138331,7 @@ index 0e5c711..940c5c0 100644
dynamic_debug_setup(info->debug, info->num_debug);
/* Ftrace init must be called in the MODULE_STATE_UNFORMED state */
-@@ -3572,11 +3758,10 @@ static int load_module(struct load_info *info, const char __user *uargs,
+@@ -3557,11 +3751,10 @@ static int load_module(struct load_info *info, const char __user *uargs,
ddebug_cleanup:
dynamic_debug_remove(info->debug);
synchronize_sched();
@@ -113984,55 +138344,55 @@ index 0e5c711..940c5c0 100644
free_unload:
module_unload_free(mod);
unlink_mod:
-@@ -3596,7 +3781,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
+@@ -3581,7 +3774,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
*/
ftrace_release_mod(mod);
/* Free lock-classes; relies on the preceding sync_rcu() */
-- lockdep_free_key_range(mod->module_core, mod->core_size);
-+ lockdep_free_key_range(mod->module_core_rx, mod->core_size_rx);
-+ lockdep_free_key_range(mod->module_core_rw, mod->core_size_rw);
+- lockdep_free_key_range(mod->core_layout.base, mod->core_layout.size);
++ lockdep_free_key_range(mod->core_layout.base_rw, mod->core_layout.size_rw);
++ lockdep_free_key_range(mod->core_layout.base_rx, mod->core_layout.size_rx);
module_deallocate(mod, info);
free_copy:
-@@ -3679,10 +3865,16 @@ static const char *get_ksymbol(struct module *mod,
+@@ -3664,10 +3858,16 @@ static const char *get_ksymbol(struct module *mod,
struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms);
/* At worse, next value is at end of module */
- if (within_module_init(addr, mod))
-- nextval = (unsigned long)mod->module_init+mod->init_text_size;
-+ if (within_module_init_rx(addr, mod))
-+ nextval = (unsigned long)mod->module_init_rx+mod->init_size_rx;
-+ else if (within_module_init_rw(addr, mod))
-+ nextval = (unsigned long)mod->module_init_rw+mod->init_size_rw;
-+ else if (within_module_core_rx(addr, mod))
-+ nextval = (unsigned long)mod->module_core_rx+mod->core_size_rx;
-+ else if (within_module_core_rw(addr, mod))
-+ nextval = (unsigned long)mod->module_core_rw+mod->core_size_rw;
+- nextval = (unsigned long)mod->init_layout.base+mod->init_layout.text_size;
++ if (within_module_rx(addr, &mod->init_layout))
++ nextval = (unsigned long)mod->init_layout.base_rx+mod->init_layout.size_rx;
++ else if (within_module_rw(addr, &mod->init_layout))
++ nextval = (unsigned long)mod->init_layout.base_rw+mod->init_layout.size_rw;
++ else if (within_module_rx(addr, &mod->core_layout))
++ nextval = (unsigned long)mod->core_layout.base_rx+mod->core_layout.size_rx;
++ else if (within_module_rw(addr, &mod->core_layout))
++ nextval = (unsigned long)mod->core_layout.base_rw+mod->core_layout.size_rw;
else
-- nextval = (unsigned long)mod->module_core+mod->core_text_size;
+- nextval = (unsigned long)mod->core_layout.base+mod->core_layout.text_size;
+ return NULL;
/* Scan for closest preceding symbol, and next symbol. (ELF
starts real symbols at 1). */
-@@ -3935,7 +4127,7 @@ static int m_show(struct seq_file *m, void *p)
+@@ -3920,7 +4120,7 @@ static int m_show(struct seq_file *m, void *p)
return 0;
seq_printf(m, "%s %u",
-- mod->name, mod->init_size + mod->core_size);
-+ mod->name, mod->init_size_rx + mod->init_size_rw + mod->core_size_rx + mod->core_size_rw);
+- mod->name, mod->init_layout.size + mod->core_layout.size);
++ mod->name, mod->init_layout.size_rx + mod->init_layout.size_rw + mod->core_layout.size_rx + mod->core_layout.size_rw);
print_unload_info(m, mod);
/* Informative for users. */
-@@ -3944,7 +4136,7 @@ static int m_show(struct seq_file *m, void *p)
+@@ -3929,7 +4129,7 @@ static int m_show(struct seq_file *m, void *p)
mod->state == MODULE_STATE_COMING ? "Loading" :
"Live");
/* Used by oprofile and other similar tools. */
-- seq_printf(m, " 0x%pK", mod->module_core);
-+ seq_printf(m, " 0x%pK 0x%pK", mod->module_core_rx, mod->module_core_rw);
+- seq_printf(m, " 0x%pK", mod->core_layout.base);
++ seq_printf(m, " 0x%pK 0x%pK", mod->core_layout.base_rx, mod->core_layout.base_rw);
/* Taints info */
if (mod->taints)
-@@ -3980,7 +4172,17 @@ static const struct file_operations proc_modules_operations = {
+@@ -3965,7 +4165,17 @@ static const struct file_operations proc_modules_operations = {
static int __init proc_modules_init(void)
{
@@ -114050,7 +138410,7 @@ index 0e5c711..940c5c0 100644
return 0;
}
module_init(proc_modules_init);
-@@ -4041,7 +4243,8 @@ struct module *__module_address(unsigned long addr)
+@@ -4026,7 +4236,8 @@ struct module *__module_address(unsigned long addr)
{
struct module *mod;
@@ -114060,7 +138420,7 @@ index 0e5c711..940c5c0 100644
return NULL;
module_assert_mutex_or_preempt();
-@@ -4084,11 +4287,20 @@ bool is_module_text_address(unsigned long addr)
+@@ -4069,11 +4280,21 @@ bool is_module_text_address(unsigned long addr)
*/
struct module *__module_text_address(unsigned long addr)
{
@@ -114078,9 +138438,10 @@ index 0e5c711..940c5c0 100644
+
if (mod) {
/* Make sure it's within the text section. */
-- if (!within(addr, mod->module_init, mod->init_text_size)
-- && !within(addr, mod->module_core, mod->core_text_size))
-+ if (!within_module_init_rx(addr, mod) && !within_module_core_rx(addr, mod))
+- if (!within(addr, mod->init_layout.base, mod->init_layout.text_size)
+- && !within(addr, mod->core_layout.base, mod->core_layout.text_size))
++ if (!within_module_rx(addr, &mod->init_layout)
++ && !within_module_rx(addr, &mod->core_layout))
mod = NULL;
}
return mod;
@@ -114163,7 +138524,7 @@ index b38bea9..91acfbe 100644
atomic_set(&pd->refcnt, 0);
pd->pinst = pinst;
diff --git a/kernel/panic.c b/kernel/panic.c
-index 41e2b54..5292098 100644
+index d96469d..81d6d28 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -55,7 +55,7 @@ EXPORT_SYMBOL(panic_blink);
@@ -114175,7 +138536,7 @@ index 41e2b54..5292098 100644
{
while (1)
cpu_relax();
-@@ -438,7 +438,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
+@@ -461,7 +461,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
disable_trace_on_warning();
pr_warn("------------[ cut here ]------------\n");
@@ -114184,7 +138545,34 @@ index 41e2b54..5292098 100644
raw_smp_processor_id(), current->pid, file, line, caller);
if (args)
-@@ -503,7 +503,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
+@@ -485,7 +485,7 @@ static void warn_slowpath_common(const char *file, int line, void *caller,
+ add_taint(taint, LOCKDEP_STILL_OK);
+ }
+
+-void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)
++void warn_slowpath_fmt(const char *file, const int line, const char *fmt, ...)
+ {
+ struct slowpath_args args;
+
+@@ -497,7 +497,7 @@ void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)
+ }
+ EXPORT_SYMBOL(warn_slowpath_fmt);
+
+-void warn_slowpath_fmt_taint(const char *file, int line,
++void warn_slowpath_fmt_taint(const char *file, const int line,
+ unsigned taint, const char *fmt, ...)
+ {
+ struct slowpath_args args;
+@@ -510,7 +510,7 @@ void warn_slowpath_fmt_taint(const char *file, int line,
+ }
+ EXPORT_SYMBOL(warn_slowpath_fmt_taint);
+
+-void warn_slowpath_null(const char *file, int line)
++void warn_slowpath_null(const char *file, const int line)
+ {
+ warn_slowpath_common(file, line, __builtin_return_address(0),
+ TAINT_WARN, NULL);
+@@ -526,7 +526,8 @@ EXPORT_SYMBOL(warn_slowpath_null);
*/
__visible void __stack_chk_fail(void)
{
@@ -114195,7 +138583,7 @@ index 41e2b54..5292098 100644
}
EXPORT_SYMBOL(__stack_chk_fail);
diff --git a/kernel/pid.c b/kernel/pid.c
-index 78b3d9f..1f368d5 100644
+index 4d73a83..4712357 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -33,6 +33,7 @@
@@ -114248,6 +138636,24 @@ index 78b3d9f..1f368d5 100644
struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
{
struct pid *pid;
+@@ -497,7 +513,7 @@ struct pid *find_get_pid(pid_t nr)
+ }
+ EXPORT_SYMBOL_GPL(find_get_pid);
+
+-pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns)
++pid_t pid_nr_ns(const struct pid *pid, const struct pid_namespace *ns)
+ {
+ struct upid *upid;
+ pid_t nr = 0;
+@@ -511,7 +527,7 @@ pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns)
+ }
+ EXPORT_SYMBOL_GPL(pid_nr_ns);
+
+-pid_t pid_vnr(struct pid *pid)
++pid_t pid_vnr(const struct pid *pid)
+ {
+ return pid_nr_ns(pid, task_active_pid_ns(current));
+ }
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index a65ba13..f600dbb 100644
--- a/kernel/pid_namespace.c
@@ -114262,7 +138668,7 @@ index a65ba13..f600dbb 100644
if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN))
return -EPERM;
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
-index 02e8dfa..8b4a8d3 100644
+index 68d3ebc..82bb833 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -34,6 +34,8 @@ config HIBERNATE_CALLBACKS
@@ -114318,10 +138724,10 @@ index 564f786..361a18e 100644
if (pm_wakeup_pending()) {
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
-index c048e34..8ef7f71 100644
+index c963ba5..8d51e8b 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
-@@ -478,7 +478,7 @@ static int log_store(int facility, int level,
+@@ -479,7 +479,7 @@ static int log_store(int facility, int level,
return msg->text_len;
}
@@ -114330,7 +138736,7 @@ index c048e34..8ef7f71 100644
static int syslog_action_restricted(int type)
{
-@@ -501,6 +501,11 @@ int check_syslog_permissions(int type, int source)
+@@ -502,6 +502,11 @@ int check_syslog_permissions(int type, int source)
if (source == SYSLOG_FROM_PROC && type != SYSLOG_ACTION_OPEN)
goto ok;
@@ -114404,7 +138810,7 @@ index 99513e1..0caa643 100644
}
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index 3189e51..fcc8509 100644
+index 2341efe..97ff52b 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -207,12 +207,32 @@ static int ptrace_check_attach(struct task_struct *child, bool ignore_state)
@@ -114470,7 +138876,7 @@ index 3189e51..fcc8509 100644
flags |= PT_PTRACE_CAP;
rcu_read_unlock();
task->ptrace = flags;
-@@ -537,7 +557,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
+@@ -543,7 +563,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
break;
return -EIO;
}
@@ -114479,7 +138885,7 @@ index 3189e51..fcc8509 100644
return -EFAULT;
copied += retval;
src += retval;
-@@ -838,7 +858,7 @@ int ptrace_request(struct task_struct *child, long request,
+@@ -844,7 +864,7 @@ int ptrace_request(struct task_struct *child, long request,
bool seized = child->ptrace & PT_SEIZED;
int ret = -EIO;
siginfo_t siginfo, *si;
@@ -114488,7 +138894,7 @@ index 3189e51..fcc8509 100644
unsigned long __user *datalp = datavp;
unsigned long flags;
-@@ -1089,14 +1109,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
+@@ -1095,14 +1115,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr,
goto out;
}
@@ -114511,7 +138917,7 @@ index 3189e51..fcc8509 100644
goto out_put_task_struct;
}
-@@ -1124,7 +1151,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
+@@ -1130,7 +1157,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
if (copied != sizeof(tmp))
return -EIO;
@@ -114520,7 +138926,7 @@ index 3189e51..fcc8509 100644
}
int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
-@@ -1217,7 +1244,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
+@@ -1223,7 +1250,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
}
COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid,
@@ -114529,7 +138935,7 @@ index 3189e51..fcc8509 100644
{
struct task_struct *child;
long ret;
-@@ -1233,14 +1260,21 @@ COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid,
+@@ -1239,14 +1266,21 @@ COMPAT_SYSCALL_DEFINE4(ptrace, compat_long_t, request, compat_long_t, pid,
goto out;
}
@@ -114553,7 +138959,7 @@ index 3189e51..fcc8509 100644
}
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
-index d89328e..a2c42e2 100644
+index d2988d0..36d0b79 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -134,12 +134,12 @@ static DEFINE_PER_CPU(long [RCU_TORTURE_PIPE_LEN + 1],
@@ -114584,7 +138990,7 @@ index d89328e..a2c42e2 100644
static struct list_head rcu_torture_removed;
static int rcu_torture_writer_state;
-@@ -211,11 +211,11 @@ rcu_torture_alloc(void)
+@@ -232,11 +232,11 @@ rcu_torture_alloc(void)
spin_lock_bh(&rcu_torture_lock);
if (list_empty(&rcu_torture_freelist)) {
@@ -114598,7 +139004,7 @@ index d89328e..a2c42e2 100644
p = rcu_torture_freelist.next;
list_del_init(p);
spin_unlock_bh(&rcu_torture_lock);
-@@ -228,7 +228,7 @@ rcu_torture_alloc(void)
+@@ -249,7 +249,7 @@ rcu_torture_alloc(void)
static void
rcu_torture_free(struct rcu_torture *p)
{
@@ -114607,7 +139013,7 @@ index d89328e..a2c42e2 100644
spin_lock_bh(&rcu_torture_lock);
list_add_tail(&p->rtort_free, &rcu_torture_freelist);
spin_unlock_bh(&rcu_torture_lock);
-@@ -309,7 +309,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
+@@ -330,7 +330,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
i = rp->rtort_pipe_count;
if (i > RCU_TORTURE_PIPE_LEN)
i = RCU_TORTURE_PIPE_LEN;
@@ -114616,7 +139022,7 @@ index d89328e..a2c42e2 100644
if (++rp->rtort_pipe_count >= RCU_TORTURE_PIPE_LEN) {
rp->rtort_mbtest = 0;
return true;
-@@ -839,7 +839,7 @@ rcu_torture_cbflood(void *arg)
+@@ -860,7 +860,7 @@ rcu_torture_cbflood(void *arg)
VERBOSE_TOROUT_STRING("rcu_torture_cbflood task started");
do {
schedule_timeout_interruptible(cbflood_inter_holdoff);
@@ -114625,7 +139031,7 @@ index d89328e..a2c42e2 100644
WARN_ON(signal_pending(current));
for (i = 0; i < cbflood_n_burst; i++) {
for (j = 0; j < cbflood_n_per_burst; j++) {
-@@ -967,7 +967,7 @@ rcu_torture_writer(void *arg)
+@@ -988,7 +988,7 @@ rcu_torture_writer(void *arg)
i = old_rp->rtort_pipe_count;
if (i > RCU_TORTURE_PIPE_LEN)
i = RCU_TORTURE_PIPE_LEN;
@@ -114634,7 +139040,7 @@ index d89328e..a2c42e2 100644
old_rp->rtort_pipe_count++;
switch (synctype[torture_random(&rand) % nsynctypes]) {
case RTWS_DEF_FREE:
-@@ -1106,7 +1106,7 @@ static void rcu_torture_timer(unsigned long unused)
+@@ -1127,7 +1127,7 @@ static void rcu_torture_timer(unsigned long unused)
return;
}
if (p->rtort_mbtest == 0)
@@ -114643,7 +139049,7 @@ index d89328e..a2c42e2 100644
spin_lock(&rand_lock);
cur_ops->read_delay(&rand);
n_rcu_torture_timers++;
-@@ -1182,7 +1182,7 @@ rcu_torture_reader(void *arg)
+@@ -1203,7 +1203,7 @@ rcu_torture_reader(void *arg)
continue;
}
if (p->rtort_mbtest == 0)
@@ -114652,7 +139058,7 @@ index d89328e..a2c42e2 100644
cur_ops->read_delay(&rand);
preempt_disable();
pipe_count = p->rtort_pipe_count;
-@@ -1250,11 +1250,11 @@ rcu_torture_stats_print(void)
+@@ -1271,11 +1271,11 @@ rcu_torture_stats_print(void)
rcu_torture_current,
rcu_torture_current_version,
list_empty(&rcu_torture_freelist),
@@ -114668,7 +139074,7 @@ index d89328e..a2c42e2 100644
n_rcu_torture_boost_ktrerror,
n_rcu_torture_boost_rterror);
pr_cont("rtbf: %ld rtb: %ld nt: %ld ",
-@@ -1266,17 +1266,17 @@ rcu_torture_stats_print(void)
+@@ -1287,17 +1287,17 @@ rcu_torture_stats_print(void)
n_barrier_successes,
n_barrier_attempts,
n_rcu_torture_barrier_error);
@@ -114689,7 +139095,7 @@ index d89328e..a2c42e2 100644
WARN_ON_ONCE(1);
}
pr_cont("Reader Pipe: ");
-@@ -1293,7 +1293,7 @@ rcu_torture_stats_print(void)
+@@ -1314,7 +1314,7 @@ rcu_torture_stats_print(void)
pr_alert("%s%s ", torture_type, TORTURE_FLAG);
pr_cont("Free-Block Circulation: ");
for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) {
@@ -114698,7 +139104,7 @@ index d89328e..a2c42e2 100644
}
pr_cont("\n");
-@@ -1647,7 +1647,7 @@ rcu_torture_cleanup(void)
+@@ -1669,7 +1669,7 @@ rcu_torture_cleanup(void)
rcu_torture_stats_print(); /* -After- the stats thread is stopped! */
@@ -114707,7 +139113,7 @@ index d89328e..a2c42e2 100644
rcu_torture_print_module_parms(cur_ops, "End of test: FAILURE");
else if (torture_onoff_failures())
rcu_torture_print_module_parms(cur_ops,
-@@ -1772,18 +1772,18 @@ rcu_torture_init(void)
+@@ -1794,18 +1794,18 @@ rcu_torture_init(void)
rcu_torture_current = NULL;
rcu_torture_current_version = 0;
@@ -114755,10 +139161,10 @@ index 944b1b4..45d1d75 100644
__rcu_process_callbacks(&rcu_sched_ctrlblk);
__rcu_process_callbacks(&rcu_bh_ctrlblk);
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
-index f07343b..5a4e86f5 100644
+index e41dd41..529179d 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
-@@ -336,7 +336,7 @@ static void rcu_momentary_dyntick_idle(void)
+@@ -324,7 +324,7 @@ static void rcu_momentary_dyntick_idle(void)
*/
rdtp = this_cpu_ptr(&rcu_dynticks);
smp_mb__before_atomic(); /* Earlier stuff before QS. */
@@ -114767,7 +139173,7 @@ index f07343b..5a4e86f5 100644
smp_mb__after_atomic(); /* Later stuff after QS. */
break;
}
-@@ -658,10 +658,10 @@ static void rcu_eqs_enter_common(long long oldval, bool user)
+@@ -650,10 +650,10 @@ static void rcu_eqs_enter_common(long long oldval, bool user)
rcu_prepare_for_idle();
/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
smp_mb__before_atomic(); /* See above. */
@@ -114780,7 +139186,7 @@ index f07343b..5a4e86f5 100644
rcu_dynticks_task_enter();
/*
-@@ -784,11 +784,11 @@ static void rcu_eqs_exit_common(long long oldval, int user)
+@@ -786,11 +786,11 @@ static void rcu_eqs_exit_common(long long oldval, int user)
rcu_dynticks_task_exit();
smp_mb__before_atomic(); /* Force ordering w/previous sojourn. */
@@ -114794,7 +139200,7 @@ index f07343b..5a4e86f5 100644
rcu_cleanup_after_idle();
trace_rcu_dyntick(TPS("End"), oldval, rdtp->dynticks_nesting);
if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
-@@ -924,12 +924,12 @@ void rcu_nmi_enter(void)
+@@ -936,12 +936,12 @@ void rcu_nmi_enter(void)
* to be in the outermost NMI handler that interrupted an RCU-idle
* period (observation due to Andy Lutomirski).
*/
@@ -114810,7 +139216,7 @@ index f07343b..5a4e86f5 100644
incby = 1;
}
rdtp->dynticks_nmi_nesting += incby;
-@@ -954,7 +954,7 @@ void rcu_nmi_exit(void)
+@@ -966,7 +966,7 @@ void rcu_nmi_exit(void)
* to us!)
*/
WARN_ON_ONCE(rdtp->dynticks_nmi_nesting <= 0);
@@ -114819,7 +139225,7 @@ index f07343b..5a4e86f5 100644
/*
* If the nesting level is not 1, the CPU wasn't RCU-idle, so
-@@ -969,9 +969,9 @@ void rcu_nmi_exit(void)
+@@ -981,9 +981,9 @@ void rcu_nmi_exit(void)
rdtp->dynticks_nmi_nesting = 0;
/* CPUs seeing atomic_inc() must see prior RCU read-side crit sects */
smp_mb__before_atomic(); /* See above. */
@@ -114831,7 +139237,7 @@ index f07343b..5a4e86f5 100644
}
/**
-@@ -984,7 +984,7 @@ void rcu_nmi_exit(void)
+@@ -996,7 +996,7 @@ void rcu_nmi_exit(void)
*/
bool notrace __rcu_is_watching(void)
{
@@ -114840,7 +139246,7 @@ index f07343b..5a4e86f5 100644
}
/**
-@@ -1067,7 +1067,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
+@@ -1079,7 +1079,7 @@ static int rcu_is_cpu_rrupt_from_idle(void)
static int dyntick_save_progress_counter(struct rcu_data *rdp,
bool *isidle, unsigned long *maxj)
{
@@ -114849,7 +139255,7 @@ index f07343b..5a4e86f5 100644
rcu_sysidle_check_cpu(rdp, isidle, maxj);
if ((rdp->dynticks_snap & 0x1) == 0) {
trace_rcu_fqs(rdp->rsp->name, rdp->gpnum, rdp->cpu, TPS("dti"));
-@@ -1093,7 +1093,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
+@@ -1105,7 +1105,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
int *rcrmp;
unsigned int snap;
@@ -114858,7 +139264,7 @@ index f07343b..5a4e86f5 100644
snap = (unsigned int)rdp->dynticks_snap;
/*
-@@ -2934,7 +2934,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
+@@ -2943,7 +2943,7 @@ __rcu_process_callbacks(struct rcu_state *rsp)
/*
* Do RCU core processing for the current CPU.
*/
@@ -114867,7 +139273,7 @@ index f07343b..5a4e86f5 100644
{
struct rcu_state *rsp;
-@@ -3587,7 +3587,7 @@ static void rcu_report_exp_rdp(struct rcu_state *rsp, struct rcu_data *rdp,
+@@ -3589,7 +3589,7 @@ static void rcu_report_exp_rdp(struct rcu_state *rsp, struct rcu_data *rdp,
/* Common code for synchronize_{rcu,sched}_expedited() work-done checking. */
static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
struct rcu_data *rdp,
@@ -114876,7 +139282,7 @@ index f07343b..5a4e86f5 100644
{
if (rcu_exp_gp_seq_done(rsp, s)) {
if (rnp)
-@@ -3596,7 +3596,7 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
+@@ -3598,7 +3598,7 @@ static bool sync_exp_work_done(struct rcu_state *rsp, struct rcu_node *rnp,
mutex_unlock(&rdp->exp_funnel_mutex);
/* Ensure test happens before caller kfree(). */
smp_mb__before_atomic(); /* ^^^ */
@@ -114894,7 +139300,7 @@ index f07343b..5a4e86f5 100644
mask_ofl_test |= rdp->grpmask;
}
mask_ofl_ipi = rnp->expmask & ~mask_ofl_test;
-@@ -4156,7 +4156,7 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
+@@ -4182,7 +4182,7 @@ rcu_boot_init_percpu_data(int cpu, struct rcu_state *rsp)
rdp->grpmask = 1UL << (cpu - rdp->mynode->grplo);
rdp->dynticks = &per_cpu(rcu_dynticks, cpu);
WARN_ON_ONCE(rdp->dynticks->dynticks_nesting != DYNTICK_TASK_EXIT_IDLE);
@@ -114903,7 +139309,7 @@ index f07343b..5a4e86f5 100644
rdp->cpu = cpu;
rdp->rsp = rsp;
mutex_init(&rdp->exp_funnel_mutex);
-@@ -4187,8 +4187,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
+@@ -4213,8 +4213,8 @@ rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
init_callback_list(rdp); /* Re-enable callbacks on this CPU. */
rdp->dynticks->dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
rcu_sysidle_init_percpu_data(rdp->dynticks);
@@ -114915,7 +139321,7 @@ index f07343b..5a4e86f5 100644
/*
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
-index 9fb4e23..e47417d 100644
+index 83360b4..84f45b0 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -114,11 +114,11 @@ struct rcu_dynticks {
@@ -114932,30 +139338,37 @@ index 9fb4e23..e47417d 100644
/* "Idle" excludes userspace execution. */
unsigned long dynticks_idle_jiffies;
/* End of last non-NMI non-idle period. */
-@@ -498,12 +498,12 @@ struct rcu_state {
- /* End of fields guarded by barrier_mutex. */
-
- unsigned long expedited_sequence; /* Take a ticket. */
+@@ -386,10 +386,10 @@ struct rcu_data {
+ struct rcu_head oom_head;
+ #endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
+ struct mutex exp_funnel_mutex;
- atomic_long_t expedited_workdone0; /* # done by others #0. */
- atomic_long_t expedited_workdone1; /* # done by others #1. */
- atomic_long_t expedited_workdone2; /* # done by others #2. */
- atomic_long_t expedited_workdone3; /* # done by others #3. */
-- atomic_long_t expedited_normal; /* # fallbacks to normal. */
-- atomic_t expedited_need_qs; /* # CPUs left to check in. */
+ atomic_long_unchecked_t expedited_workdone0; /* # done by others #0. */
+ atomic_long_unchecked_t expedited_workdone1; /* # done by others #1. */
+ atomic_long_unchecked_t expedited_workdone2; /* # done by others #2. */
+ atomic_long_unchecked_t expedited_workdone3; /* # done by others #3. */
-+ atomic_long_unchecked_t expedited_normal; /* # fallbacks to normal. */
-+ atomic_unchecked_t expedited_need_qs; /* # CPUs left to check in. */
+
+ /* 7) Callback offloading. */
+ #ifdef CONFIG_RCU_NOCB_CPU
+@@ -504,8 +504,8 @@ struct rcu_state {
+ /* End of fields guarded by barrier_mutex. */
+
+ unsigned long expedited_sequence; /* Take a ticket. */
+- atomic_long_t expedited_normal; /* # fallbacks to normal. */
+- atomic_t expedited_need_qs; /* # CPUs left to check in. */
++ atomic_long_unchecked_t expedited_normal;/* # fallbacks to normal. */
++ atomic_unchecked_t expedited_need_qs; /* # CPUs left to check in. */
wait_queue_head_t expedited_wq; /* Wait for check-ins. */
int ncpus_snap; /* # CPUs seen last time. */
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
-index 630c197..1db30ad 100644
+index 9467a8b..6b9809d 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
-@@ -1276,7 +1276,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
+@@ -1269,7 +1269,7 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu)
free_cpumask_var(cm);
}
@@ -114964,7 +139377,7 @@ index 630c197..1db30ad 100644
.store = &rcu_cpu_kthread_task,
.thread_should_run = rcu_cpu_kthread_should_run,
.thread_fn = rcu_cpu_kthread,
-@@ -1749,7 +1749,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
+@@ -1738,7 +1738,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
"o."[!!(rdp->grpmask & rdp->mynode->qsmaskinit)],
"N."[!!(rdp->grpmask & rdp->mynode->qsmaskinitnext)],
ticks_value, ticks_title,
@@ -114973,7 +139386,7 @@ index 630c197..1db30ad 100644
rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting,
rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu),
READ_ONCE(rsp->n_force_qs) - rsp->n_force_qs_gpstart,
-@@ -2279,8 +2279,8 @@ static int rcu_nocb_kthread(void *arg)
+@@ -2267,8 +2267,8 @@ static int rcu_nocb_kthread(void *arg)
}
trace_rcu_batch_end(rdp->rsp->name, c, !!list, 0, 0, 1);
smp_mb__before_atomic(); /* _add after CB invocation. */
@@ -114984,7 +139397,7 @@ index 630c197..1db30ad 100644
rdp->n_nocbs_invoked += c;
}
return 0;
-@@ -2630,9 +2630,9 @@ static void rcu_sysidle_enter(int irq)
+@@ -2618,9 +2618,9 @@ static void rcu_sysidle_enter(int irq)
j = jiffies;
WRITE_ONCE(rdtp->dynticks_idle_jiffies, j);
smp_mb__before_atomic();
@@ -114996,7 +139409,7 @@ index 630c197..1db30ad 100644
}
/*
-@@ -2703,9 +2703,9 @@ static void rcu_sysidle_exit(int irq)
+@@ -2691,9 +2691,9 @@ static void rcu_sysidle_exit(int irq)
/* Record end of idle period. */
smp_mb__before_atomic();
@@ -115008,7 +139421,7 @@ index 630c197..1db30ad 100644
/*
* If we are the timekeeping CPU, we are permitted to be non-idle
-@@ -2751,7 +2751,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle,
+@@ -2739,7 +2739,7 @@ static void rcu_sysidle_check_cpu(struct rcu_data *rdp, bool *isidle,
WARN_ON_ONCE(smp_processor_id() != tick_do_timer_cpu);
/* Pick up current idle and NMI-nesting counter and check. */
@@ -115018,10 +139431,10 @@ index 630c197..1db30ad 100644
*isidle = false; /* We are not idle! */
return;
diff --git a/kernel/rcu/tree_trace.c b/kernel/rcu/tree_trace.c
-index ef7093c..1cc3d0f 100644
+index 1088e64..d3b77f7 100644
--- a/kernel/rcu/tree_trace.c
+++ b/kernel/rcu/tree_trace.c
-@@ -125,7 +125,7 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
+@@ -124,7 +124,7 @@ static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
rdp->rcu_qs_ctr_snap == per_cpu(rcu_qs_ctr, rdp->cpu),
rdp->core_needs_qs);
seq_printf(m, " dt=%d/%llx/%d df=%lu",
@@ -115030,27 +139443,30 @@ index ef7093c..1cc3d0f 100644
rdp->dynticks->dynticks_nesting,
rdp->dynticks->dynticks_nmi_nesting,
rdp->dynticks_fqs);
-@@ -187,12 +187,12 @@ static int show_rcuexp(struct seq_file *m, void *v)
+@@ -189,15 +189,15 @@ static int show_rcuexp(struct seq_file *m, void *v)
+ for_each_possible_cpu(cpu) {
+ rdp = per_cpu_ptr(rsp->rda, cpu);
+- s0 += atomic_long_read(&rdp->expedited_workdone0);
+- s1 += atomic_long_read(&rdp->expedited_workdone1);
+- s2 += atomic_long_read(&rdp->expedited_workdone2);
+- s3 += atomic_long_read(&rdp->expedited_workdone3);
++ s0 += atomic_long_read_unchecked(&rdp->expedited_workdone0);
++ s1 += atomic_long_read_unchecked(&rdp->expedited_workdone1);
++ s2 += atomic_long_read_unchecked(&rdp->expedited_workdone2);
++ s3 += atomic_long_read_unchecked(&rdp->expedited_workdone3);
+ }
seq_printf(m, "s=%lu wd0=%lu wd1=%lu wd2=%lu wd3=%lu n=%lu enq=%d sc=%lu\n",
- rsp->expedited_sequence,
-- atomic_long_read(&rsp->expedited_workdone0),
-- atomic_long_read(&rsp->expedited_workdone1),
-- atomic_long_read(&rsp->expedited_workdone2),
-- atomic_long_read(&rsp->expedited_workdone3),
+ rsp->expedited_sequence, s0, s1, s2, s3,
- atomic_long_read(&rsp->expedited_normal),
- atomic_read(&rsp->expedited_need_qs),
-+ atomic_long_read_unchecked(&rsp->expedited_workdone0),
-+ atomic_long_read_unchecked(&rsp->expedited_workdone1),
-+ atomic_long_read_unchecked(&rsp->expedited_workdone2),
-+ atomic_long_read_unchecked(&rsp->expedited_workdone3),
+ atomic_long_read_unchecked(&rsp->expedited_normal),
+ atomic_read_unchecked(&rsp->expedited_need_qs),
rsp->expedited_sequence / 2);
return 0;
}
diff --git a/kernel/resource.c b/kernel/resource.c
-index 249b1eb..b3451db 100644
+index 3669d1b..7edf101 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -84,8 +84,8 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
@@ -115093,7 +139509,7 @@ index 249b1eb..b3451db 100644
}
__initcall(ioresources_init);
diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c
-index 750ed60..eb01466 100644
+index a5d966c..9c2d28b 100644
--- a/kernel/sched/auto_group.c
+++ b/kernel/sched/auto_group.c
@@ -9,7 +9,7 @@
@@ -115115,10 +139531,10 @@ index 750ed60..eb01466 100644
#ifdef CONFIG_RT_GROUP_SCHED
/*
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index 70e5e09..87f2797 100644
+index a74073f8..757e116 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
-@@ -2162,7 +2162,7 @@ void set_numabalancing_state(bool enabled)
+@@ -2263,7 +2263,7 @@ void set_numabalancing_state(bool enabled)
int sysctl_numa_balancing(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -115127,7 +139543,25 @@ index 70e5e09..87f2797 100644
int err;
int state = static_branch_likely(&sched_numa_balancing);
-@@ -2683,8 +2683,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
+@@ -2702,7 +2702,7 @@ static struct rq *finish_task_switch(struct task_struct *prev)
+ /* rq->lock is NOT held, but preemption is disabled */
+ static void __balance_callback(struct rq *rq)
+ {
+- struct callback_head *head, *next;
++ struct balance_callback *head, *next;
+ void (*func)(struct rq *rq);
+ unsigned long flags;
+
+@@ -2710,7 +2710,7 @@ static void __balance_callback(struct rq *rq)
+ head = rq->balance_callback;
+ rq->balance_callback = NULL;
+ while (head) {
+- func = (void (*)(struct rq *))head->func;
++ func = head->func;
+ next = head->next;
+ head->next = NULL;
+ head = next;
+@@ -2784,8 +2784,10 @@ context_switch(struct rq *rq, struct task_struct *prev,
next->active_mm = oldmm;
atomic_inc(&oldmm->mm_count);
enter_lazy_tlb(oldmm, next);
@@ -115139,7 +139573,7 @@ index 70e5e09..87f2797 100644
if (!prev->mm) {
prev->active_mm = NULL;
-@@ -3506,6 +3508,8 @@ int can_nice(const struct task_struct *p, const int nice)
+@@ -3609,6 +3611,8 @@ int can_nice(const struct task_struct *p, const int nice)
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = nice_to_rlimit(nice);
@@ -115148,7 +139582,7 @@ index 70e5e09..87f2797 100644
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
capable(CAP_SYS_NICE));
}
-@@ -3532,7 +3536,8 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -3635,7 +3639,8 @@ SYSCALL_DEFINE1(nice, int, increment)
nice = task_nice(current) + increment;
nice = clamp_val(nice, MIN_NICE, MAX_NICE);
@@ -115158,7 +139592,7 @@ index 70e5e09..87f2797 100644
return -EPERM;
retval = security_task_setnice(current, nice);
-@@ -3841,6 +3846,7 @@ recheck:
+@@ -3944,6 +3949,7 @@ recheck:
if (policy != p->policy && !rlim_rtprio)
return -EPERM;
@@ -115166,7 +139600,7 @@ index 70e5e09..87f2797 100644
/* can't increase priority */
if (attr->sched_priority > p->rt_priority &&
attr->sched_priority > rlim_rtprio)
-@@ -5180,6 +5186,7 @@ void idle_task_exit(void)
+@@ -5285,6 +5291,7 @@ void idle_task_exit(void)
if (mm != &init_mm) {
switch_mm(mm, &init_mm, current);
@@ -115174,7 +139608,7 @@ index 70e5e09..87f2797 100644
finish_arch_post_lock_switch();
}
mmdrop(mm);
-@@ -5305,7 +5312,7 @@ static void migrate_tasks(struct rq *dead_rq)
+@@ -5410,7 +5417,7 @@ static void migrate_tasks(struct rq *dead_rq)
#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
@@ -115183,7 +139617,7 @@ index 70e5e09..87f2797 100644
{
.procname = "sched_domain",
.mode = 0555,
-@@ -5322,17 +5329,17 @@ static struct ctl_table sd_ctl_root[] = {
+@@ -5427,17 +5434,17 @@ static struct ctl_table sd_ctl_root[] = {
{}
};
@@ -115205,7 +139639,7 @@ index 70e5e09..87f2797 100644
/*
* In the intermediate directories, both the child directory and
-@@ -5340,22 +5347,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
+@@ -5445,22 +5452,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
* will always be set. In the lowest directory the names are
* static strings and all have proc handlers.
*/
@@ -115237,7 +139671,7 @@ index 70e5e09..87f2797 100644
const char *procname, void *data, int maxlen,
umode_t mode, proc_handler *proc_handler,
bool load_idx)
-@@ -5375,7 +5385,7 @@ set_table_entry(struct ctl_table *entry,
+@@ -5480,7 +5490,7 @@ set_table_entry(struct ctl_table *entry,
static struct ctl_table *
sd_alloc_ctl_domain_table(struct sched_domain *sd)
{
@@ -115246,7 +139680,7 @@ index 70e5e09..87f2797 100644
if (table == NULL)
return NULL;
-@@ -5413,9 +5423,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
+@@ -5518,9 +5528,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
return table;
}
@@ -115258,7 +139692,7 @@ index 70e5e09..87f2797 100644
struct sched_domain *sd;
int domain_num = 0, i;
char buf[32];
-@@ -5442,11 +5452,13 @@ static struct ctl_table_header *sd_sysctl_header;
+@@ -5547,11 +5557,13 @@ static struct ctl_table_header *sd_sysctl_header;
static void register_sched_domain_sysctl(void)
{
int i, cpu_num = num_possible_cpus();
@@ -115273,7 +139707,7 @@ index 70e5e09..87f2797 100644
if (entry == NULL)
return;
-@@ -5468,8 +5480,12 @@ static void unregister_sched_domain_sysctl(void)
+@@ -5573,8 +5585,12 @@ static void unregister_sched_domain_sysctl(void)
{
unregister_sysctl_table(sd_sysctl_header);
sd_sysctl_header = NULL;
@@ -115288,6 +139722,21 @@ index 70e5e09..87f2797 100644
}
#else
static void register_sched_domain_sysctl(void)
+diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
+index 57b939c..cbedaf1 100644
+--- a/kernel/sched/deadline.c
++++ b/kernel/sched/deadline.c
+@@ -219,8 +219,8 @@ static inline bool need_pull_dl_task(struct rq *rq, struct task_struct *prev)
+ return dl_task(prev);
+ }
+
+-static DEFINE_PER_CPU(struct callback_head, dl_push_head);
+-static DEFINE_PER_CPU(struct callback_head, dl_pull_head);
++static DEFINE_PER_CPU(struct balance_callback, dl_push_head);
++static DEFINE_PER_CPU(struct balance_callback, dl_pull_head);
+
+ static void push_dl_tasks(struct rq *);
+ static void pull_dl_task(struct rq *);
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 6415117..7dc45dc 100644
--- a/kernel/sched/debug.c
@@ -115305,10 +139754,10 @@ index 6415117..7dc45dc 100644
return -ENOMEM;
return 0;
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
-index cfdc0e6..71f2abd 100644
+index adff850..4f219e5 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
-@@ -7817,7 +7817,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { }
+@@ -7961,7 +7961,7 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle) { }
* run_rebalance_domains is triggered when needed from the scheduler tick.
* Also triggered for nohz idle balancing (with nohz_balancing_kick set).
*/
@@ -115317,11 +139766,56 @@ index cfdc0e6..71f2abd 100644
{
struct rq *this_rq = this_rq();
enum cpu_idle_type idle = this_rq->idle_balance ?
+diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
+index 8ec86ab..2d88518 100644
+--- a/kernel/sched/rt.c
++++ b/kernel/sched/rt.c
+@@ -354,8 +354,8 @@ static inline int has_pushable_tasks(struct rq *rq)
+ return !plist_head_empty(&rq->rt.pushable_tasks);
+ }
+
+-static DEFINE_PER_CPU(struct callback_head, rt_push_head);
+-static DEFINE_PER_CPU(struct callback_head, rt_pull_head);
++static DEFINE_PER_CPU(struct balance_callback, rt_push_head);
++static DEFINE_PER_CPU(struct balance_callback, rt_pull_head);
+
+ static void push_rt_tasks(struct rq *);
+ static void pull_rt_task(struct rq *);
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
-index 0517abd..b185177 100644
+index ff87d88..818b3f5 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
-@@ -1228,7 +1228,7 @@ struct sched_class {
+@@ -631,7 +631,10 @@ struct rq {
+ unsigned long cpu_capacity;
+ unsigned long cpu_capacity_orig;
+
+- struct callback_head *balance_callback;
++ struct balance_callback {
++ struct balance_callback *next;
++ void (*func)(struct rq *rq);
++ } *balance_callback;
+
+ unsigned char idle_balance;
+ /* For active balancing */
+@@ -777,7 +780,7 @@ extern int migrate_swap(struct task_struct *, struct task_struct *);
+
+ static inline void
+ queue_balance_callback(struct rq *rq,
+- struct callback_head *head,
++ struct balance_callback *head,
+ void (*func)(struct rq *rq))
+ {
+ lockdep_assert_held(&rq->lock);
+@@ -785,7 +788,7 @@ queue_balance_callback(struct rq *rq,
+ if (unlikely(head->next))
+ return;
+
+- head->func = (void (*)(struct callback_head *))func;
++ head->func = func;
+ head->next = rq->balance_callback;
+ rq->balance_callback = head;
+ }
+@@ -1204,7 +1207,7 @@ struct sched_class {
#ifdef CONFIG_FAIR_GROUP_SCHED
void (*task_move_group) (struct task_struct *p);
#endif
@@ -115330,8 +139824,17 @@ index 0517abd..b185177 100644
static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
{
+@@ -1274,7 +1277,7 @@ extern struct dl_bandwidth def_dl_bandwidth;
+ extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime);
+ extern void init_dl_task_timer(struct sched_dl_entity *dl_se);
+
+-unsigned long to_ratio(u64 period, u64 runtime);
++unsigned long __attribute_const__ to_ratio(u64 period, u64 runtime);
+
+ extern void init_entity_runnable_average(struct sched_entity *se);
+
diff --git a/kernel/signal.c b/kernel/signal.c
-index f3f1f7a..d2e7863 100644
+index 0508544..a1106d5 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -53,12 +53,12 @@ static struct kmem_cache *sigqueue_cachep;
@@ -115525,6 +140028,37 @@ index f3f1f7a..d2e7863 100644
compat_user_stack_pointer());
set_fs(seg);
if (ret >= 0 && uoss_ptr) {
+@@ -3478,7 +3513,7 @@ SYSCALL_DEFINE1(ssetmask, int, newmask)
+ SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
+ {
+ struct k_sigaction new_sa, old_sa;
+- int ret;
++ long ret;
+
+ new_sa.sa.sa_handler = handler;
+ new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK;
+@@ -3486,7 +3521,7 @@ SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
+
+ ret = do_sigaction(sig, &new_sa, &old_sa);
+
+- return ret ? ret : (unsigned long)old_sa.sa.sa_handler;
++ return ret ? ret : (long)old_sa.sa.sa_handler;
+ }
+ #endif /* __ARCH_WANT_SYS_SIGNAL */
+
+diff --git a/kernel/smp.c b/kernel/smp.c
+index d903c02..c3efd35 100644
+--- a/kernel/smp.c
++++ b/kernel/smp.c
+@@ -588,7 +588,7 @@ void __init smp_init(void)
+ * early_boot_irqs_disabled is set. Use local_irq_save/restore() instead
+ * of local_irq_disable/enable().
+ */
+-int on_each_cpu(void (*func) (void *info), void *info, int wait)
++int on_each_cpu(smp_call_func_t func, void *info, int wait)
+ {
+ unsigned long flags;
+ int ret = 0;
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index d264f59..48b8da3 100644
--- a/kernel/smpboot.c
@@ -115606,10 +140140,10 @@ index 479e443..4072c49 100644
.thread_should_run = ksoftirqd_should_run,
.thread_fn = run_ksoftirqd,
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
-index a3bbaee..e8cd0bf 100644
+index a467e6c..7743481 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
-@@ -503,7 +503,7 @@ void stop_machine_unpark(int cpu)
+@@ -501,7 +501,7 @@ void stop_machine_unpark(int cpu)
kthread_unpark(stopper->thread);
}
@@ -115801,8 +140335,27 @@ index 78947de..cb182d1 100644
}
if (!retval) {
if (old_rlim)
+diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
+index 2c5e3a8..301fb1a 100644
+--- a/kernel/sys_ni.c
++++ b/kernel/sys_ni.c
+@@ -6,12 +6,12 @@
+
+ /* we can't #include <linux/syscalls.h> here,
+ but tell gcc to not warn with -Wmissing-prototypes */
+-asmlinkage long sys_ni_syscall(void);
++asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
+
+ /*
+ * Non-implemented system calls get redirected here.
+ */
+-asmlinkage long sys_ni_syscall(void)
++asmlinkage long sys_ni_syscall(unsigned long a, unsigned long b, unsigned long c, unsigned long d, unsigned long e, unsigned long f)
+ {
+ return -ENOSYS;
+ }
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
-index dc6858d..93aa01c 100644
+index 97715fd..bf1e10a 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -95,7 +95,6 @@
@@ -116020,28 +140573,7 @@ index dc6858d..93aa01c 100644
#else
{
.procname = "nr_trim_pages",
-@@ -1735,6 +1795,20 @@ static struct ctl_table fs_table[] = {
- .proc_handler = &pipe_proc_fn,
- .extra1 = &pipe_min_size,
- },
-+ {
-+ .procname = "pipe-user-pages-hard",
-+ .data = &pipe_user_pages_hard,
-+ .maxlen = sizeof(pipe_user_pages_hard),
-+ .mode = 0644,
-+ .proc_handler = proc_doulongvec_minmax,
-+ },
-+ {
-+ .procname = "pipe-user-pages-soft",
-+ .data = &pipe_user_pages_soft,
-+ .maxlen = sizeof(pipe_user_pages_soft),
-+ .mode = 0644,
-+ .proc_handler = proc_doulongvec_minmax,
-+ },
- { }
- };
-
-@@ -1885,6 +1959,16 @@ int proc_dostring(struct ctl_table *table, int write,
+@@ -1921,6 +1981,16 @@ int proc_dostring(struct ctl_table *table, int write,
(char __user *)buffer, lenp, ppos);
}
@@ -116058,7 +140590,7 @@ index dc6858d..93aa01c 100644
static size_t proc_skip_spaces(char **buf)
{
size_t ret;
-@@ -1990,6 +2074,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
+@@ -2026,6 +2096,8 @@ static int proc_put_long(void __user **buf, size_t *size, unsigned long val,
len = strlen(tmp);
if (len > *size)
len = *size;
@@ -116067,7 +140599,7 @@ index dc6858d..93aa01c 100644
if (copy_to_user(*buf, tmp, len))
return -EFAULT;
*size -= len;
-@@ -2168,6 +2254,44 @@ int proc_dointvec(struct ctl_table *table, int write,
+@@ -2196,6 +2268,44 @@ int proc_dointvec(struct ctl_table *table, int write,
NULL,NULL);
}
@@ -116112,7 +140644,7 @@ index dc6858d..93aa01c 100644
/*
* Taint values can only be increased
* This means we can safely use a temporary.
-@@ -2175,7 +2299,7 @@ int proc_dointvec(struct ctl_table *table, int write,
+@@ -2203,7 +2313,7 @@ int proc_dointvec(struct ctl_table *table, int write,
static int proc_taint(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -116121,7 +140653,7 @@ index dc6858d..93aa01c 100644
unsigned long tmptaint = get_taint();
int err;
-@@ -2203,16 +2327,14 @@ static int proc_taint(struct ctl_table *table, int write,
+@@ -2231,16 +2341,14 @@ static int proc_taint(struct ctl_table *table, int write,
return err;
}
@@ -116140,7 +140672,7 @@ index dc6858d..93aa01c 100644
struct do_proc_dointvec_minmax_conv_param {
int *min;
-@@ -2243,6 +2365,32 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp,
+@@ -2271,6 +2379,32 @@ static int do_proc_dointvec_minmax_conv(bool *negp, unsigned long *lvalp,
return 0;
}
@@ -116173,7 +140705,7 @@ index dc6858d..93aa01c 100644
/**
* proc_dointvec_minmax - read a vector of integers with min/max values
* @table: the sysctl table
-@@ -2270,6 +2418,17 @@ int proc_dointvec_minmax(struct ctl_table *table, int write,
+@@ -2298,6 +2432,17 @@ int proc_dointvec_minmax(struct ctl_table *table, int write,
do_proc_dointvec_minmax_conv, &param);
}
@@ -116191,7 +140723,7 @@ index dc6858d..93aa01c 100644
static void validate_coredump_safety(void)
{
#ifdef CONFIG_COREDUMP
-@@ -2772,6 +2931,12 @@ int proc_dostring(struct ctl_table *table, int write,
+@@ -2785,6 +2930,12 @@ int proc_dostring(struct ctl_table *table, int write,
return -ENOSYS;
}
@@ -116204,7 +140736,7 @@ index dc6858d..93aa01c 100644
int proc_dointvec(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
-@@ -2828,5 +2993,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
+@@ -2841,5 +2992,6 @@ EXPORT_SYMBOL(proc_dointvec_minmax);
EXPORT_SYMBOL(proc_dointvec_userhz_jiffies);
EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
EXPORT_SYMBOL(proc_dostring);
@@ -116239,10 +140771,19 @@ index 21f82c2..c1984e5 100644
return cmd_attr_register_cpumask(info);
else if (info->attrs[TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK])
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
-index 7fbba635..7cc64ae 100644
+index e840ed86..4a303b7 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
-@@ -820,7 +820,7 @@ static int __init alarmtimer_init(void)
+@@ -523,7 +523,7 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp)
+ *
+ * Provides the underlying alarm base time.
+ */
+-static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
++static int alarm_clock_get(const clockid_t which_clock, struct timespec *tp)
+ {
+ struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)];
+
+@@ -837,7 +837,7 @@ static int __init alarmtimer_init(void)
struct platform_device *pdev;
int error = 0;
int i;
@@ -116251,6 +140792,46 @@ index 7fbba635..7cc64ae 100644
.clock_getres = alarm_clock_getres,
.clock_get = alarm_clock_get,
.timer_create = alarm_timer_create,
+diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
+index 9cff0ab..0e69c94 100644
+--- a/kernel/time/posix-clock.c
++++ b/kernel/time/posix-clock.c
+@@ -273,7 +273,7 @@ static void put_clock_desc(struct posix_clock_desc *cd)
+ fput(cd->fp);
+ }
+
+-static int pc_clock_adjtime(clockid_t id, struct timex *tx)
++static int pc_clock_adjtime(const clockid_t id, struct timex *tx)
+ {
+ struct posix_clock_desc cd;
+ int err;
+@@ -297,7 +297,7 @@ out:
+ return err;
+ }
+
+-static int pc_clock_gettime(clockid_t id, struct timespec *ts)
++static int pc_clock_gettime(const clockid_t id, struct timespec *ts)
+ {
+ struct posix_clock_desc cd;
+ int err;
+@@ -316,7 +316,7 @@ static int pc_clock_gettime(clockid_t id, struct timespec *ts)
+ return err;
+ }
+
+-static int pc_clock_getres(clockid_t id, struct timespec *ts)
++static int pc_clock_getres(const clockid_t id, struct timespec *ts)
+ {
+ struct posix_clock_desc cd;
+ int err;
+@@ -335,7 +335,7 @@ static int pc_clock_getres(clockid_t id, struct timespec *ts)
+ return err;
+ }
+
+-static int pc_clock_settime(clockid_t id, const struct timespec *ts)
++static int pc_clock_settime(const clockid_t id, const struct timespec *ts)
+ {
+ struct posix_clock_desc cd;
+ int err;
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index f5e86d2..33a4099 100644
--- a/kernel/time/posix-cpu-timers.c
@@ -116273,7 +140854,7 @@ index f5e86d2..33a4099 100644
.clock_get = thread_cpu_clock_get,
.timer_create = thread_cpu_timer_create,
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
-index f2826c3..c8d9d80 100644
+index f2826c3..7e6663a 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -43,6 +43,7 @@
@@ -116293,6 +140874,57 @@ index f2826c3..c8d9d80 100644
/*
* These ones are defined below.
+@@ -203,7 +204,7 @@ static inline void unlock_timer(struct k_itimer *timr, unsigned long flags)
+ }
+
+ /* Get clock_realtime */
+-static int posix_clock_realtime_get(clockid_t which_clock, struct timespec *tp)
++static int posix_clock_realtime_get(const clockid_t which_clock, struct timespec *tp)
+ {
+ ktime_get_real_ts(tp);
+ return 0;
+@@ -225,7 +226,7 @@ static int posix_clock_realtime_adj(const clockid_t which_clock,
+ /*
+ * Get monotonic time for posix timers
+ */
+-static int posix_ktime_get_ts(clockid_t which_clock, struct timespec *tp)
++static int posix_ktime_get_ts(const clockid_t which_clock, struct timespec *tp)
+ {
+ ktime_get_ts(tp);
+ return 0;
+@@ -234,20 +235,20 @@ static int posix_ktime_get_ts(clockid_t which_clock, struct timespec *tp)
+ /*
+ * Get monotonic-raw time for posix timers
+ */
+-static int posix_get_monotonic_raw(clockid_t which_clock, struct timespec *tp)
++static int posix_get_monotonic_raw(const clockid_t which_clock, struct timespec *tp)
+ {
+ getrawmonotonic(tp);
+ return 0;
+ }
+
+
+-static int posix_get_realtime_coarse(clockid_t which_clock, struct timespec *tp)
++static int posix_get_realtime_coarse(const clockid_t which_clock, struct timespec *tp)
+ {
+ *tp = current_kernel_time();
+ return 0;
+ }
+
+-static int posix_get_monotonic_coarse(clockid_t which_clock,
++static int posix_get_monotonic_coarse(const clockid_t which_clock,
+ struct timespec *tp)
+ {
+ *tp = get_monotonic_coarse();
+@@ -266,7 +267,7 @@ static int posix_get_boottime(const clockid_t which_clock, struct timespec *tp)
+ return 0;
+ }
+
+-static int posix_get_tai(clockid_t which_clock, struct timespec *tp)
++static int posix_get_tai(const clockid_t which_clock, struct timespec *tp)
+ {
+ timekeeping_clocktai(tp);
+ return 0;
@@ -284,7 +285,7 @@ static int posix_get_hrtimer_res(clockid_t which_clock, struct timespec *tp)
*/
static __init int init_posix_timers(void)
@@ -116405,7 +141037,7 @@ index 86751c6..7875536 100644
update_vsyscall_tz();
if (firsttime) {
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
-index 99188ee..29f96f9 100644
+index 34b4ced..08d344f 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -15,6 +15,7 @@
@@ -116416,7 +141048,7 @@ index 99188ee..29f96f9 100644
#include <linux/syscore_ops.h>
#include <linux/clocksource.h>
#include <linux/jiffies.h>
-@@ -915,6 +916,8 @@ int do_settimeofday64(const struct timespec64 *ts)
+@@ -928,6 +929,8 @@ int do_settimeofday64(const struct timespec64 *ts)
if (!timespec64_valid_strict(ts))
return -EINVAL;
@@ -116580,7 +141212,7 @@ index e45db6b..1fb429b 100644
select GENERIC_TRACER
select STACKTRACE
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
-index a990824..9c8e7ad 100644
+index 2aeb6ff..640418a 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -328,7 +328,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer,
@@ -116592,7 +141224,7 @@ index a990824..9c8e7ad 100644
return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
}
-@@ -386,7 +386,7 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
+@@ -380,7 +380,7 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf,
return 1;
bt = buf->chan->private_data;
@@ -116601,7 +141233,7 @@ index a990824..9c8e7ad 100644
return 0;
}
-@@ -485,7 +485,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
+@@ -479,7 +479,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
bt->dir = dir;
bt->dev = dev;
@@ -116611,10 +141243,22 @@ index a990824..9c8e7ad 100644
ret = -EIO;
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
-index 3f743b1..a3e3588 100644
+index 57a6eea..168c21f 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
-@@ -2423,12 +2423,17 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
+@@ -120,8 +120,9 @@ static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
+ struct ftrace_ops *op, struct pt_regs *regs);
+ #else
+ /* See comment below, where ftrace_ops_list_func is defined */
+-static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip);
+-#define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
++static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip,
++ struct ftrace_ops *op, struct pt_regs *regs);
++#define ftrace_ops_list_func (ftrace_ops_no_ops)
+ #endif
+
+ /*
+@@ -2463,13 +2464,18 @@ ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec)
if (unlikely(ftrace_disabled))
return 0;
@@ -116626,6 +141270,7 @@ index 3f743b1..a3e3588 100644
ret = ftrace_make_nop(mod, rec, MCOUNT_ADDR);
+ FTRACE_WARN_ON(ftrace_arch_code_modify_post_process());
if (ret) {
+ ftrace_bug_type = FTRACE_BUG_INIT;
ftrace_bug(ret, rec);
- return 0;
}
@@ -116634,7 +141279,7 @@ index 3f743b1..a3e3588 100644
}
/*
-@@ -4813,8 +4818,10 @@ static int ftrace_process_locs(struct module *mod,
+@@ -4821,8 +4827,10 @@ static int ftrace_process_locs(struct module *mod,
if (!count)
return 0;
@@ -116645,7 +141290,32 @@ index 3f743b1..a3e3588 100644
start_pg = ftrace_allocate_pages(count);
if (!start_pg)
-@@ -5691,7 +5698,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
+@@ -5238,7 +5246,8 @@ static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
+ __ftrace_ops_list_func(ip, parent_ip, NULL, regs);
+ }
+ #else
+-static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip)
++static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip,
++ struct ftrace_ops *op, struct pt_regs *regs)
+ {
+ __ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
+ }
+@@ -5699,8 +5708,12 @@ int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace)
+ }
+
+ /* The callbacks that hook a function */
+-trace_func_graph_ret_t ftrace_graph_return =
+- (trace_func_graph_ret_t)ftrace_stub;
++static void ftrace_graph_return_stub(struct ftrace_graph_ret *trace)
++{
++ ftrace_stub(0, 0, NULL, NULL);
++}
++
++trace_func_graph_ret_t ftrace_graph_return = ftrace_graph_return_stub;
+ trace_func_graph_ent_t ftrace_graph_entry = ftrace_graph_entry_stub;
+ static trace_func_graph_ent_t __ftrace_graph_entry = ftrace_graph_entry_stub;
+
+@@ -5734,7 +5747,7 @@ static int alloc_retstack_tasklist(struct ftrace_ret_stack **ret_stack_list)
if (t->ret_stack == NULL) {
atomic_set(&t->tracing_graph_pause, 0);
@@ -116654,7 +141324,16 @@ index 3f743b1..a3e3588 100644
t->curr_ret_stack = -1;
/* Make sure the tasks see the -1 first: */
smp_wmb();
-@@ -5914,7 +5921,7 @@ static void
+@@ -5929,7 +5942,7 @@ void unregister_ftrace_graph(void)
+ goto out;
+
+ ftrace_graph_active--;
+- ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub;
++ ftrace_graph_return = ftrace_graph_return_stub;
+ ftrace_graph_entry = ftrace_graph_entry_stub;
+ __ftrace_graph_entry = ftrace_graph_entry_stub;
+ ftrace_shutdown(&graph_ops, FTRACE_STOP_FUNC_RET);
+@@ -5957,7 +5970,7 @@ static void
graph_init_task(struct task_struct *t, struct ftrace_ret_stack *ret_stack)
{
atomic_set(&t->tracing_graph_pause, 0);
@@ -116664,7 +141343,7 @@ index 3f743b1..a3e3588 100644
/* make curr_ret_stack visible before we add the ret_stack */
smp_wmb();
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
-index 9c6045a..927be25 100644
+index 95181e3..3b49321 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -296,9 +296,9 @@ struct buffer_data_page {
@@ -116695,7 +141374,7 @@ index 9c6045a..927be25 100644
unsigned long read;
unsigned long read_bytes;
u64 write_stamp;
-@@ -1022,8 +1022,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -1018,8 +1018,8 @@ static void rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
*
* We add a counter to the write field to denote this.
*/
@@ -116706,7 +141385,7 @@ index 9c6045a..927be25 100644
/*
* Just make sure we have seen our old_write and synchronize
-@@ -1051,8 +1051,8 @@ static int rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -1047,8 +1047,8 @@ static void rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer,
* cmpxchg to only update if an interrupt did not already
* do it for us. If the cmpxchg fails, we don't care.
*/
@@ -116717,7 +141396,7 @@ index 9c6045a..927be25 100644
/*
* No need to worry about races with clearing out the commit.
-@@ -1420,12 +1420,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer);
+@@ -1411,12 +1411,12 @@ static void rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer);
static inline unsigned long rb_page_entries(struct buffer_page *bpage)
{
@@ -116732,7 +141411,7 @@ index 9c6045a..927be25 100644
}
static int
-@@ -1520,7 +1520,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages)
+@@ -1511,7 +1511,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned int nr_pages)
* bytes consumed in ring buffer from here.
* Increment overrun to account for the lost events.
*/
@@ -116741,7 +141420,7 @@ index 9c6045a..927be25 100644
local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
}
-@@ -1951,7 +1951,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -1942,7 +1942,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,
* it is our responsibility to update
* the counters.
*/
@@ -116750,7 +141429,7 @@ index 9c6045a..927be25 100644
local_sub(BUF_PAGE_SIZE, &cpu_buffer->entries_bytes);
/*
-@@ -2085,7 +2085,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2079,7 +2079,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
if (tail == BUF_PAGE_SIZE)
tail_page->real_end = 0;
@@ -116759,7 +141438,7 @@ index 9c6045a..927be25 100644
return;
}
-@@ -2120,7 +2120,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2114,7 +2114,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
rb_event_set_padding(event);
/* Set the write back to the previous setting */
@@ -116768,7 +141447,7 @@ index 9c6045a..927be25 100644
return;
}
-@@ -2132,7 +2132,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2126,7 +2126,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer,
/* Set write to end of buffer */
length = (tail + length) - BUF_PAGE_SIZE;
@@ -116776,8 +141455,8 @@ index 9c6045a..927be25 100644
+ local_sub_unchecked(length, &tail_page->write);
}
- /*
-@@ -2159,7 +2159,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
+ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer);
+@@ -2154,7 +2154,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
* about it.
*/
if (unlikely(next_page == commit_page)) {
@@ -116786,7 +141465,7 @@ index 9c6045a..927be25 100644
goto out_reset;
}
-@@ -2189,7 +2189,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2184,7 +2184,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
* this is easy, just stop here.
*/
if (!(buffer->flags & RB_FL_OVERWRITE)) {
@@ -116795,7 +141474,7 @@ index 9c6045a..927be25 100644
goto out_reset;
}
-@@ -2215,7 +2215,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2210,7 +2210,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
cpu_buffer->tail_page) &&
(cpu_buffer->commit_page ==
cpu_buffer->reader_page))) {
@@ -116804,7 +141483,7 @@ index 9c6045a..927be25 100644
goto out_reset;
}
}
-@@ -2366,7 +2366,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2358,7 +2358,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
if (bpage->page == (void *)addr && rb_page_write(bpage) == old_index) {
unsigned long write_mask =
@@ -116813,7 +141492,7 @@ index 9c6045a..927be25 100644
unsigned long event_length = rb_event_length(event);
/*
* This is on the tail page. It is possible that
-@@ -2376,7 +2376,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2368,7 +2368,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
*/
old_index += write_mask;
new_index += write_mask;
@@ -116822,7 +141501,7 @@ index 9c6045a..927be25 100644
if (index == old_index) {
/* update counters */
local_sub(event_length, &cpu_buffer->entries_bytes);
-@@ -2391,7 +2391,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2383,7 +2383,7 @@ rb_try_to_discard(struct ring_buffer_per_cpu *cpu_buffer,
static void rb_start_commit(struct ring_buffer_per_cpu *cpu_buffer)
{
local_inc(&cpu_buffer->committing);
@@ -116831,7 +141510,7 @@ index 9c6045a..927be25 100644
}
static void
-@@ -2456,7 +2456,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -2450,7 +2450,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
return;
again:
@@ -116840,7 +141519,7 @@ index 9c6045a..927be25 100644
/* synchronize with interrupts */
barrier();
if (local_read(&cpu_buffer->committing) == 1)
-@@ -2472,7 +2472,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -2466,7 +2466,7 @@ static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
* updating of the commit page and the clearing of the
* committing counter.
*/
@@ -116849,16 +141528,16 @@ index 9c6045a..927be25 100644
!local_read(&cpu_buffer->committing)) {
local_inc(&cpu_buffer->committing);
goto again;
-@@ -2700,7 +2700,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
- info->length += RB_LEN_TIME_EXTEND;
+@@ -2695,7 +2695,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
- tail_page = info->tail_page = cpu_buffer->tail_page;
+ /* Don't let the compiler play games with cpu_buffer->tail_page */
+ tail_page = info->tail_page = READ_ONCE(cpu_buffer->tail_page);
- write = local_add_return(info->length, &tail_page->write);
+ write = local_add_return_unchecked(info->length, &tail_page->write);
/* set write to only the index of the write */
write &= RB_WRITE_MASK;
-@@ -2723,7 +2723,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2718,7 +2718,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
kmemcheck_annotate_bitfield(event, bitfield);
rb_update_event(cpu_buffer, event, info);
@@ -116867,7 +141546,7 @@ index 9c6045a..927be25 100644
/*
* If this is the first commit on the page, then update
-@@ -2760,7 +2760,7 @@ rb_reserve_next_event(struct ring_buffer *buffer,
+@@ -2755,7 +2755,7 @@ rb_reserve_next_event(struct ring_buffer *buffer,
barrier();
if (unlikely(ACCESS_ONCE(cpu_buffer->buffer) != buffer)) {
local_dec(&cpu_buffer->committing);
@@ -116876,7 +141555,7 @@ index 9c6045a..927be25 100644
return NULL;
}
#endif
-@@ -2889,7 +2889,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2884,7 +2884,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
/* Do the likely case first */
if (likely(bpage->page == (void *)addr)) {
@@ -116885,7 +141564,7 @@ index 9c6045a..927be25 100644
return;
}
-@@ -2901,7 +2901,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
+@@ -2896,7 +2896,7 @@ rb_decrement_entry(struct ring_buffer_per_cpu *cpu_buffer,
start = bpage;
do {
if (bpage->page == (void *)addr) {
@@ -116894,7 +141573,7 @@ index 9c6045a..927be25 100644
return;
}
rb_inc_page(cpu_buffer, &bpage);
-@@ -3189,7 +3189,7 @@ static inline unsigned long
+@@ -3184,7 +3184,7 @@ static inline unsigned long
rb_num_of_entries(struct ring_buffer_per_cpu *cpu_buffer)
{
return local_read(&cpu_buffer->entries) -
@@ -116903,7 +141582,7 @@ index 9c6045a..927be25 100644
}
/**
-@@ -3278,7 +3278,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
+@@ -3273,7 +3273,7 @@ unsigned long ring_buffer_overrun_cpu(struct ring_buffer *buffer, int cpu)
return 0;
cpu_buffer = buffer->buffers[cpu];
@@ -116912,7 +141591,7 @@ index 9c6045a..927be25 100644
return ret;
}
-@@ -3301,7 +3301,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
+@@ -3296,7 +3296,7 @@ ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
return 0;
cpu_buffer = buffer->buffers[cpu];
@@ -116921,7 +141600,7 @@ index 9c6045a..927be25 100644
return ret;
}
-@@ -3323,7 +3323,7 @@ ring_buffer_dropped_events_cpu(struct ring_buffer *buffer, int cpu)
+@@ -3318,7 +3318,7 @@ ring_buffer_dropped_events_cpu(struct ring_buffer *buffer, int cpu)
return 0;
cpu_buffer = buffer->buffers[cpu];
@@ -116930,7 +141609,7 @@ index 9c6045a..927be25 100644
return ret;
}
-@@ -3386,7 +3386,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer)
+@@ -3381,7 +3381,7 @@ unsigned long ring_buffer_overruns(struct ring_buffer *buffer)
/* if you care about this being correct, lock the buffer */
for_each_buffer_cpu(buffer, cpu) {
cpu_buffer = buffer->buffers[cpu];
@@ -116939,7 +141618,7 @@ index 9c6045a..927be25 100644
}
return overruns;
-@@ -3557,8 +3557,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -3552,8 +3552,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
/*
* Reset the reader page to size zero.
*/
@@ -116950,7 +141629,7 @@ index 9c6045a..927be25 100644
local_set(&cpu_buffer->reader_page->page->commit, 0);
cpu_buffer->reader_page->real_end = 0;
-@@ -3592,7 +3592,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -3587,7 +3587,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
* want to compare with the last_overrun.
*/
smp_mb();
@@ -116959,7 +141638,7 @@ index 9c6045a..927be25 100644
/*
* Here's the tricky part.
-@@ -4178,8 +4178,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -4173,8 +4173,8 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
cpu_buffer->head_page
= list_entry(cpu_buffer->pages, struct buffer_page, list);
@@ -116970,7 +141649,7 @@ index 9c6045a..927be25 100644
local_set(&cpu_buffer->head_page->page->commit, 0);
cpu_buffer->head_page->read = 0;
-@@ -4189,18 +4189,18 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
+@@ -4184,18 +4184,18 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)
INIT_LIST_HEAD(&cpu_buffer->reader_page->list);
INIT_LIST_HEAD(&cpu_buffer->new_pages);
@@ -116995,7 +141674,7 @@ index 9c6045a..927be25 100644
cpu_buffer->read = 0;
cpu_buffer->read_bytes = 0;
-@@ -4590,8 +4590,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
+@@ -4585,8 +4585,8 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
rb_init_page(bpage);
bpage = reader->page;
reader->page = *data_page;
@@ -117020,10 +141699,10 @@ index 8305cbb..c0d281a 100644
/* do nothing if flag is already set */
if (!!(tr->trace_flags & mask) == !!enabled)
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
-index 919d9d0..8db0243 100644
+index 8414fa4..27c2db4 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
-@@ -1335,7 +1335,7 @@ void trace_printk_control(bool enabled);
+@@ -1333,7 +1333,7 @@ void trace_printk_control(bool enabled);
void trace_printk_init_buffers(void);
void trace_printk_start_comm(void);
int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set);
@@ -117053,10 +141732,10 @@ index 0f06532..247c8e7 100644
+ return atomic64_inc_return_unchecked(&trace_counter);
}
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
-index d202d99..1bf816c 100644
+index 05ddc08..5df5f88 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
-@@ -2369,7 +2369,6 @@ __trace_early_add_new_event(struct trace_event_call *call,
+@@ -2357,7 +2357,6 @@ __trace_early_add_new_event(struct trace_event_call *call,
return 0;
}
@@ -117127,7 +141806,7 @@ index 2be8c4f..444ecfb 100644
}
entry = ring_buffer_event_data(event);
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
-index 2829821..a290dc8 100644
+index 2829821..a290dc89 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -713,14 +713,16 @@ int register_trace_event(struct trace_event *event)
@@ -117165,7 +141844,7 @@ index e694c9f..6775a38 100644
if (unlikely(seq_buf_has_overflowed(&s->seq))) {
s->seq.len = save_len;
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
-index 202df6c..58bab5d 100644
+index 2a1abba..2a81a78 100644
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -88,7 +88,7 @@ check_stack(unsigned long ip, unsigned long *stack)
@@ -117232,7 +141911,7 @@ index b069ccb..c59fe26 100644
uid_hash_remove(up);
spin_unlock_irqrestore(&uidhash_lock, flags);
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
-index 88fefa6..d1e2bd7 100644
+index 9bafc21..cafd6e0 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -84,6 +84,21 @@ int create_user_ns(struct cred *new)
@@ -117257,7 +141936,7 @@ index 88fefa6..d1e2bd7 100644
ns = kmem_cache_zalloc(user_ns_cachep, GFP_KERNEL);
if (!ns)
return -ENOMEM;
-@@ -981,7 +996,7 @@ static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)
+@@ -974,7 +989,7 @@ static int userns_install(struct nsproxy *nsproxy, struct ns_common *ns)
if (!thread_group_empty(current))
return -EINVAL;
@@ -117280,10 +141959,10 @@ index c8eac43..4b5f08f 100644
memcpy(&uts_table, table, sizeof(uts_table));
uts_table.data = get_uts(table, write);
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
-index 198137b..cde169b 100644
+index 9acb29f..6fe517c 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
-@@ -664,7 +664,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
+@@ -680,7 +680,7 @@ static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
static void watchdog_nmi_disable(unsigned int cpu) { return; }
#endif /* CONFIG_HARDLOCKUP_DETECTOR */
@@ -117293,10 +141972,46 @@ index 198137b..cde169b 100644
.thread_should_run = watchdog_should_run,
.thread_fn = watchdog,
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
-index 450c21f..16482d9 100644
+index 7ff5dc7..72c5756 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
-@@ -1866,9 +1866,8 @@ static void pool_mayday_timeout(unsigned long __pool)
+@@ -667,6 +667,35 @@ static void set_work_pool_and_clear_pending(struct work_struct *work,
+ */
+ smp_wmb();
+ set_work_data(work, (unsigned long)pool_id << WORK_OFFQ_POOL_SHIFT, 0);
++ /*
++ * The following mb guarantees that previous clear of a PENDING bit
++ * will not be reordered with any speculative LOADS or STORES from
++ * work->current_func, which is executed afterwards. This possible
++ * reordering can lead to a missed execution on attempt to qeueue
++ * the same @work. E.g. consider this case:
++ *
++ * CPU#0 CPU#1
++ * ---------------------------- --------------------------------
++ *
++ * 1 STORE event_indicated
++ * 2 queue_work_on() {
++ * 3 test_and_set_bit(PENDING)
++ * 4 } set_..._and_clear_pending() {
++ * 5 set_work_data() # clear bit
++ * 6 smp_mb()
++ * 7 work->current_func() {
++ * 8 LOAD event_indicated
++ * }
++ *
++ * Without an explicit full barrier speculative LOAD on line 8 can
++ * be executed before CPU#0 does STORE on line 1. If that happens,
++ * CPU#0 observes the PENDING bit is still set and new execution of
++ * a @work is not queued in a hope, that CPU#1 will eventually
++ * finish the queued @work. Meanwhile CPU#1 does not see
++ * event_indicated is set, because speculative LOAD was executed
++ * before actual STORE.
++ */
++ smp_mb();
+ }
+
+ static void clear_work_data(struct work_struct *work)
+@@ -1921,9 +1950,8 @@ static void pool_mayday_timeout(unsigned long __pool)
* multiple times. Does GFP_KERNEL allocations. Called only from
* manager.
*/
@@ -117307,7 +142022,7 @@ index 450c21f..16482d9 100644
{
restart:
spin_unlock_irq(&pool->lock);
-@@ -1958,9 +1957,8 @@ static bool manage_workers(struct worker *worker)
+@@ -2013,9 +2041,8 @@ static bool manage_workers(struct worker *worker)
* CONTEXT:
* spin_lock_irq(pool->lock) which is released and regrabbed.
*/
@@ -117318,7 +142033,7 @@ index 450c21f..16482d9 100644
{
struct pool_workqueue *pwq = get_work_pwq(work);
struct worker_pool *pool = worker->pool;
-@@ -4462,7 +4460,7 @@ static void rebind_workers(struct worker_pool *pool)
+@@ -4561,7 +4588,7 @@ static void rebind_workers(struct worker_pool *pool)
WARN_ON_ONCE(!(worker_flags & WORKER_UNBOUND));
worker_flags |= WORKER_REBOUND;
worker_flags &= ~WORKER_UNBOUND;
@@ -117328,7 +142043,7 @@ index 450c21f..16482d9 100644
spin_unlock_irq(&pool->lock);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
-index 8c15b29..fc52e8e 100644
+index 8bfd1ac..18fd274 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -243,6 +243,7 @@ config PAGE_OWNER
@@ -117355,7 +142070,7 @@ index 8c15b29..fc52e8e 100644
select STACKTRACE if STACKTRACE_SUPPORT
select KALLSYMS
select CRC32
-@@ -945,7 +948,7 @@ config DEBUG_MUTEXES
+@@ -964,7 +967,7 @@ config DEBUG_MUTEXES
config DEBUG_WW_MUTEX_SLOWPATH
bool "Wait/wound mutex debugging: Slowpath testing"
@@ -117364,7 +142079,7 @@ index 8c15b29..fc52e8e 100644
select DEBUG_LOCK_ALLOC
select DEBUG_SPINLOCK
select DEBUG_MUTEXES
-@@ -962,7 +965,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
+@@ -981,7 +984,7 @@ config DEBUG_WW_MUTEX_SLOWPATH
config DEBUG_LOCK_ALLOC
bool "Lock debugging: detect incorrect freeing of live locks"
@@ -117373,7 +142088,7 @@ index 8c15b29..fc52e8e 100644
select DEBUG_SPINLOCK
select DEBUG_MUTEXES
select LOCKDEP
-@@ -976,7 +979,7 @@ config DEBUG_LOCK_ALLOC
+@@ -995,7 +998,7 @@ config DEBUG_LOCK_ALLOC
config PROVE_LOCKING
bool "Lock debugging: prove locking correctness"
@@ -117382,7 +142097,7 @@ index 8c15b29..fc52e8e 100644
select LOCKDEP
select DEBUG_SPINLOCK
select DEBUG_MUTEXES
-@@ -1027,7 +1030,7 @@ config LOCKDEP
+@@ -1046,7 +1049,7 @@ config LOCKDEP
config LOCK_STAT
bool "Lock usage statistics"
@@ -117391,7 +142106,7 @@ index 8c15b29..fc52e8e 100644
select LOCKDEP
select DEBUG_SPINLOCK
select DEBUG_MUTEXES
-@@ -1412,6 +1415,7 @@ config NOTIFIER_ERROR_INJECTION
+@@ -1446,6 +1449,7 @@ config NOTIFIER_ERROR_INJECTION
tristate "Notifier error injection"
depends on DEBUG_KERNEL
select DEBUG_FS
@@ -117399,15 +142114,7 @@ index 8c15b29..fc52e8e 100644
help
This option provides the ability to inject artificial errors to
specified notifier chain callbacks. It is useful to test the error
-@@ -1524,6 +1528,7 @@ config FAIL_IO_TIMEOUT
- config FAIL_MMC_REQUEST
- bool "Fault-injection capability for MMC IO"
- select DEBUG_FS
-+ depends on !GRKERNSEC_KMEM
- depends on FAULT_INJECTION && MMC
- help
- Provide fault-injection capability for MMC IO.
-@@ -1535,6 +1540,7 @@ config FAIL_MMC_REQUEST
+@@ -1591,6 +1595,7 @@ config FAIL_MMC_REQUEST
config FAIL_FUTEX
bool "Fault-injection capability for futexes"
select DEBUG_FS
@@ -117415,7 +142122,7 @@ index 8c15b29..fc52e8e 100644
depends on FAULT_INJECTION && FUTEX
help
Provide fault-injection capability for futexes.
-@@ -1560,6 +1566,7 @@ config LATENCYTOP
+@@ -1615,6 +1620,7 @@ config LATENCYTOP
depends on DEBUG_KERNEL
depends on STACKTRACE_SUPPORT
depends on PROC_FS
@@ -117423,7 +142130,7 @@ index 8c15b29..fc52e8e 100644
select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC
select KALLSYMS
select KALLSYMS_ALL
-@@ -1576,7 +1583,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
+@@ -1631,7 +1637,7 @@ config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
config DEBUG_STRICT_USER_COPY_CHECKS
bool "Strict user copy size checks"
depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
@@ -117432,7 +142139,7 @@ index 8c15b29..fc52e8e 100644
help
Enabling this option turns a certain set of sanity checks for user
copy operations into compile time failures.
-@@ -1710,7 +1717,7 @@ endmenu # runtime tests
+@@ -1765,7 +1771,7 @@ endmenu # runtime tests
config PROVIDE_OHCI1394_DMA_INIT
bool "Remote debugging over FireWire early on boot"
@@ -117455,7 +142162,7 @@ index 0fee5ac..b2b159d 100644
help
Enables kernel address sanitizer - runtime memory debugger,
diff --git a/lib/Makefile b/lib/Makefile
-index 7f1de26..ab68f1a 100644
+index a7c26a4..6747b22 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -66,7 +66,7 @@ obj-$(CONFIG_BTREE) += btree.o
@@ -117521,7 +142228,7 @@ index cff145f..724a0b8 100644
file = NULL;
line = 0;
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
-index 547f7f9..a6d4ba0 100644
+index 519b5a1..4e58003 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -289,7 +289,7 @@ static void debug_object_is_on_stack(void *addr, int onstack)
@@ -117565,11 +142272,11 @@ index ed7a1fd..44a1a62 100644
for (i = 0; i < size; i++)
ret = (ret << 8) | ptr[size-i-1];
diff --git a/lib/div64.c b/lib/div64.c
-index 62a698a..32327d08 100644
+index 7f34525..c53be4b 100644
--- a/lib/div64.c
+++ b/lib/div64.c
-@@ -59,7 +59,7 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
- EXPORT_SYMBOL(__div64_32);
+@@ -61,7 +61,7 @@ EXPORT_SYMBOL(__div64_32);
+ #endif
#ifndef div_s64_rem
-s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
@@ -117577,7 +142284,7 @@ index 62a698a..32327d08 100644
{
u64 quotient;
-@@ -130,7 +130,7 @@ EXPORT_SYMBOL(div64_u64_rem);
+@@ -132,7 +132,7 @@ EXPORT_SYMBOL(div64_u64_rem);
* 'http://www.hackersdelight.org/hdcodetxt/divDouble.c.txt'
*/
#ifndef div64_u64
@@ -117643,6 +142350,19 @@ index 86c8911..f5bfc34 100644
if (!pud)
return -ENOMEM;
do {
+diff --git a/lib/irq_poll.c b/lib/irq_poll.c
+index 836f7db..44d9849 100644
+--- a/lib/irq_poll.c
++++ b/lib/irq_poll.c
+@@ -74,7 +74,7 @@ void irq_poll_complete(struct irq_poll *iop)
+ }
+ EXPORT_SYMBOL(irq_poll_complete);
+
+-static void irq_poll_softirq(struct softirq_action *h)
++static __latent_entropy void irq_poll_softirq(void)
+ {
+ struct list_head *list = this_cpu_ptr(&blk_cpu_iopoll);
+ int rearm = 0, budget = irq_poll_budget;
diff --git a/lib/is_single_threaded.c b/lib/is_single_threaded.c
index 391fd23..96e17b6 100644
--- a/lib/is_single_threaded.c
@@ -117674,7 +142394,7 @@ index 7cbccd2..37f089d 100644
enum kobj_ns_type type = ops->type;
int error;
diff --git a/lib/list_debug.c b/lib/list_debug.c
-index c24c2f7..f0296f4 100644
+index 3859bf6..818741d6 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -11,7 +11,9 @@
@@ -118094,10 +142814,10 @@ index 1356454..70ce6c6 100644
void rb_insert_color(struct rb_node *node, struct rb_root *root)
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
-index 51282f5..471b337 100644
+index cc80870..6378152 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
-@@ -558,8 +558,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
+@@ -555,8 +555,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_exit);
* will rewind back to the beginning and you may use it immediately
* by calling rhashtable_walk_next.
*/
@@ -118107,7 +142827,7 @@ index 51282f5..471b337 100644
{
struct rhashtable *ht = iter->ht;
-@@ -643,8 +643,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
+@@ -640,8 +640,8 @@ EXPORT_SYMBOL_GPL(rhashtable_walk_next);
*
* Finish a hash table walk.
*/
@@ -118130,7 +142850,7 @@ index 1feed6a..4ede1e9 100644
#endif
}
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c
-index e0af6ff..fcc9f15 100644
+index 3384032..e4389a1 100644
--- a/lib/strncpy_from_user.c
+++ b/lib/strncpy_from_user.c
@@ -22,7 +22,7 @@
@@ -118143,7 +142863,7 @@ index e0af6ff..fcc9f15 100644
/*
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
-index 3a5f2b3..102f1ff 100644
+index 2625943..1541382 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -26,7 +26,7 @@
@@ -118183,7 +142903,7 @@ index 4f5b1dd..7cab418 100644
+}
+EXPORT_SYMBOL(copy_to_user_overflow);
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
-index f9cee8e..f0ed0f1 100644
+index f44e178..e5856a5 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -16,6 +16,9 @@
@@ -118196,7 +142916,7 @@ index f9cee8e..f0ed0f1 100644
#include <stdarg.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
-@@ -629,7 +632,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
+@@ -677,7 +680,7 @@ char *symbol_string(char *buf, char *end, void *ptr,
#ifdef CONFIG_KALLSYMS
if (*fmt == 'B')
sprint_backtrace(sym, value);
@@ -118205,7 +142925,7 @@ index f9cee8e..f0ed0f1 100644
sprint_symbol(sym, value);
else
sprint_symbol_no_offset(sym, value);
-@@ -1361,7 +1364,11 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
+@@ -1407,7 +1410,11 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
}
}
@@ -118218,7 +142938,7 @@ index f9cee8e..f0ed0f1 100644
/*
* Show a '%p' thing. A kernel extension is that the '%p' is followed
-@@ -1372,8 +1379,10 @@ int kptr_restrict __read_mostly;
+@@ -1418,8 +1425,10 @@ int kptr_restrict __read_mostly;
*
* - 'F' For symbolic function descriptor pointers with offset
* - 'f' For simple symbolic function names without offset
@@ -118229,7 +142949,7 @@ index f9cee8e..f0ed0f1 100644
* - '[FfSs]R' as above with __builtin_extract_return_addr() translation
* - 'B' For backtraced symbolic direct pointers with offset
* - 'R' For decoded struct resource, e.g., [mem 0x0-0x1f 64bit pref]
-@@ -1463,12 +1472,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+@@ -1510,12 +1519,12 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
if (!ptr && *fmt != 'K') {
/*
@@ -118244,7 +142964,7 @@ index f9cee8e..f0ed0f1 100644
}
switch (*fmt) {
-@@ -1478,6 +1487,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+@@ -1525,6 +1534,14 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
/* Fallthrough */
case 'S':
case 's':
@@ -118259,18 +142979,18 @@ index f9cee8e..f0ed0f1 100644
case 'B':
return symbol_string(buf, end, ptr, spec, fmt);
case 'R':
-@@ -1542,6 +1559,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+@@ -1589,6 +1606,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
va_end(va);
return buf;
}
+ case 'P':
+ break;
case 'K':
- /*
- * %pK cannot be used in IRQ context because its test
-@@ -1601,6 +1620,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
- ((const struct file *)ptr)->f_path.dentry,
- spec, fmt);
+ switch (kptr_restrict) {
+ case 0:
+@@ -1649,6 +1668,22 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+ #endif
+
}
+
+#ifdef CONFIG_GRKERNSEC_HIDESYM
@@ -118291,7 +143011,7 @@ index f9cee8e..f0ed0f1 100644
spec.flags |= SMALL;
if (spec.field_width == -1) {
spec.field_width = default_width;
-@@ -2282,11 +2317,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
+@@ -2349,11 +2384,11 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
typeof(type) value; \
if (sizeof(type) == 8) { \
args = PTR_ALIGN(args, sizeof(u32)); \
@@ -118306,7 +143026,7 @@ index f9cee8e..f0ed0f1 100644
} \
args += sizeof(type); \
value; \
-@@ -2349,7 +2384,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
+@@ -2416,7 +2451,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
case FORMAT_TYPE_STR: {
const char *str_arg = args;
args += strlen(str_arg) + 1;
@@ -118323,7 +143043,7 @@ index 0000000..7cd6065
@@ -0,0 +1 @@
+-grsec
diff --git a/mm/Kconfig b/mm/Kconfig
-index 97a4e06..b20ba55 100644
+index 03cbfa0..5a6d8e6 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -324,10 +324,11 @@ config KSM
@@ -118381,7 +143101,7 @@ index 957d3da..1d34e20 100644
depends on !KMEMCHECK
select PAGE_EXTENSION
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
-index cbe6f0b..200caf3 100644
+index c554d17..9ddceb5 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -12,7 +12,7 @@
@@ -118403,7 +143123,7 @@ index cbe6f0b..200caf3 100644
bdi_destroy(bdi);
return err;
diff --git a/mm/debug.c b/mm/debug.c
-index 668aa35..1b35d47 100644
+index f05b2d5..0d6e01f 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -127,6 +127,9 @@ static const struct trace_print_flags vmaflags_names[] = {
@@ -118417,10 +143137,10 @@ index 668aa35..1b35d47 100644
{VM_NORESERVE, "noreserve" },
{VM_HUGETLB, "hugetlb" },
diff --git a/mm/filemap.c b/mm/filemap.c
-index 1bb0076..b1f8586 100644
+index da7a35d..d10518d 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
-@@ -1759,15 +1759,16 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
+@@ -1860,15 +1860,16 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
ssize_t retval = 0;
loff_t *ppos = &iocb->ki_pos;
loff_t pos = *ppos;
@@ -118440,7 +143160,7 @@ index 1bb0076..b1f8586 100644
size = i_size_read(inode);
retval = filemap_write_and_wait_range(mapping, pos,
pos + count - 1);
-@@ -2161,7 +2162,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
+@@ -2262,7 +2263,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
struct address_space *mapping = file->f_mapping;
if (!mapping->a_ops->readpage)
@@ -118449,7 +143169,43 @@ index 1bb0076..b1f8586 100644
file_accessed(file);
vma->vm_ops = &generic_file_vm_ops;
return 0;
-@@ -2342,6 +2343,7 @@ inline ssize_t generic_write_checks(struct kiocb *iocb, struct iov_iter *from)
+@@ -2305,7 +2306,7 @@ static struct page *wait_on_page_read(struct page *page)
+
+ static struct page *__read_cache_page(struct address_space *mapping,
+ pgoff_t index,
+- int (*filler)(void *, struct page *),
++ filler_t *filler,
+ void *data,
+ gfp_t gfp)
+ {
+@@ -2338,7 +2339,7 @@ repeat:
+
+ static struct page *do_read_cache_page(struct address_space *mapping,
+ pgoff_t index,
+- int (*filler)(void *, struct page *),
++ filler_t *filler,
+ void *data,
+ gfp_t gfp)
+
+@@ -2391,7 +2392,7 @@ out:
+ */
+ struct page *read_cache_page(struct address_space *mapping,
+ pgoff_t index,
+- int (*filler)(void *, struct page *),
++ filler_t *filler,
+ void *data)
+ {
+ return do_read_cache_page(mapping, index, filler, data, mapping_gfp_mask(mapping));
+@@ -2413,7 +2414,7 @@ struct page *read_cache_page_gfp(struct address_space *mapping,
+ pgoff_t index,
+ gfp_t gfp)
+ {
+- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
++ filler_t *filler = mapping->a_ops->readpage;
+
+ return do_read_cache_page(mapping, index, filler, NULL, gfp);
+ }
+@@ -2443,6 +2444,7 @@ inline ssize_t generic_write_checks(struct kiocb *iocb, struct iov_iter *from)
pos = iocb->ki_pos;
if (limit != RLIM_INFINITY) {
@@ -118458,10 +143214,10 @@ index 1bb0076..b1f8586 100644
send_sig(SIGXFSZ, current, 0);
return -EFBIG;
diff --git a/mm/gup.c b/mm/gup.c
-index deafa2c..1a4e46a 100644
+index 7bf19ff..c059128 100644
--- a/mm/gup.c
+++ b/mm/gup.c
-@@ -302,11 +302,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
+@@ -356,11 +356,6 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
/* mlock all present pages, but do not fault in new pages */
if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK)
return -ENOENT;
@@ -118473,7 +143229,7 @@ index deafa2c..1a4e46a 100644
if (*flags & FOLL_WRITE)
fault_flags |= FAULT_FLAG_WRITE;
if (nonblocking)
-@@ -472,14 +467,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+@@ -524,14 +519,14 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
if (!(gup_flags & FOLL_FORCE))
gup_flags |= FOLL_NUMA;
@@ -118490,7 +143246,7 @@ index deafa2c..1a4e46a 100644
if (!vma && in_gate_area(mm, start)) {
int ret;
ret = get_gate_page(mm, start & PAGE_MASK,
-@@ -491,7 +486,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
+@@ -543,7 +538,7 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
goto next_page;
}
@@ -118499,7 +143255,7 @@ index deafa2c..1a4e46a 100644
return i ? : -EFAULT;
if (is_vm_hugetlb_page(vma)) {
i = follow_hugetlb_page(mm, vma, pages, vmas,
-@@ -552,7 +547,7 @@ next_page:
+@@ -604,7 +599,7 @@ next_page:
i += page_increm;
start += page_increm * PAGE_SIZE;
nr_pages -= page_increm;
@@ -118536,10 +143292,10 @@ index 123bcd3..c2c85db 100644
pkmap_count[last_pkmap_nr] = 1;
set_page_address(page, (void *)vaddr);
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
-index ef6963b..09c45dc 100644
+index aefba5a..07b8545 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
-@@ -39,7 +39,60 @@ int hugepages_treat_as_movable;
+@@ -38,7 +38,60 @@ int hugepages_treat_as_movable;
int hugetlb_max_hstate __read_mostly;
unsigned int default_hstate_idx;
@@ -118601,7 +143357,7 @@ index ef6963b..09c45dc 100644
/*
* Minimum page order among possible hugepage sizes, set to a proper value
* at boot time.
-@@ -2780,6 +2833,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
+@@ -2746,6 +2799,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
struct ctl_table *table, int write,
void __user *buffer, size_t *length, loff_t *ppos)
{
@@ -118609,9 +143365,9 @@ index ef6963b..09c45dc 100644
struct hstate *h = &default_hstate;
unsigned long tmp = h->max_huge_pages;
int ret;
-@@ -2787,9 +2841,10 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
+@@ -2753,9 +2807,10 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
if (!hugepages_supported())
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
- table->data = &tmp;
- table->maxlen = sizeof(unsigned long);
@@ -118623,15 +143379,15 @@ index ef6963b..09c45dc 100644
if (ret)
goto out;
-@@ -2824,6 +2879,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
+@@ -2790,6 +2845,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
struct hstate *h = &default_hstate;
unsigned long tmp;
int ret;
+ ctl_table_no_const hugetlb_table;
if (!hugepages_supported())
- return -ENOTSUPP;
-@@ -2833,9 +2889,10 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
+ return -EOPNOTSUPP;
+@@ -2799,9 +2855,10 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,
if (write && hstate_is_gigantic(h))
return -EINVAL;
@@ -118645,7 +143401,7 @@ index ef6963b..09c45dc 100644
if (ret)
goto out;
-@@ -3341,6 +3398,27 @@ static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3307,6 +3364,27 @@ static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
i_mmap_unlock_write(mapping);
}
@@ -118673,9 +143429,9 @@ index ef6963b..09c45dc 100644
/*
* Hugetlb_cow() should be called with page lock of the original hugepage held.
* Called with hugetlb_instantiation_mutex held and pte_page locked so we
-@@ -3454,6 +3532,11 @@ retry_avoidcopy:
+@@ -3420,6 +3498,11 @@ retry_avoidcopy:
make_huge_pte(vma, new_page, 1));
- page_remove_rmap(old_page);
+ page_remove_rmap(old_page, true);
hugepage_add_new_anon_rmap(new_page, vma, address);
+
+#ifdef CONFIG_PAX_SEGMEXEC
@@ -118685,7 +143441,7 @@ index ef6963b..09c45dc 100644
/* Make the old page be freed below */
new_page = old_page;
}
-@@ -3627,6 +3710,10 @@ retry:
+@@ -3593,6 +3676,10 @@ retry:
&& (vma->vm_flags & VM_SHARED)));
set_huge_pte_at(mm, address, ptep, new_pte);
@@ -118696,7 +143452,7 @@ index ef6963b..09c45dc 100644
hugetlb_count_add(pages_per_huge_page(h), mm);
if ((flags & FAULT_FLAG_WRITE) && !(vma->vm_flags & VM_SHARED)) {
/* Optimization, do the COW without a second fault */
-@@ -3695,6 +3782,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3661,6 +3748,10 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
struct address_space *mapping;
int need_wait_lock = 0;
@@ -118707,7 +143463,7 @@ index ef6963b..09c45dc 100644
address &= huge_page_mask(h);
ptep = huge_pte_offset(mm, address);
-@@ -3712,6 +3803,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3678,6 +3769,26 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
return VM_FAULT_OOM;
}
@@ -118841,10 +143597,10 @@ index d8fb10d..1c74822 100644
void __init hugetlb_cgroup_file_init(void)
diff --git a/mm/internal.h b/mm/internal.h
-index 38e24b8..73ff43d 100644
+index a38a21e..8398316 100644
--- a/mm/internal.h
+++ b/mm/internal.h
-@@ -177,6 +177,7 @@ __find_buddy_index(unsigned long page_idx, unsigned int order)
+@@ -134,6 +134,7 @@ __find_buddy_index(unsigned long page_idx, unsigned int order)
extern int __isolate_free_page(struct page *page, unsigned int order);
extern void __free_pages_bootmem(struct page *page, unsigned long pfn,
unsigned int order);
@@ -118852,11 +143608,20 @@ index 38e24b8..73ff43d 100644
extern void prep_compound_page(struct page *page, unsigned int order);
#ifdef CONFIG_MEMORY_FAILURE
extern bool is_free_buddy_page(struct page *page);
+@@ -236,7 +237,7 @@ static inline bool is_exec_mapping(vm_flags_t flags)
+ */
+ static inline bool is_stack_mapping(vm_flags_t flags)
+ {
+- return (flags & VM_STACK) == VM_STACK;
++ return flags & (VM_GROWSUP | VM_GROWSDOWN);
+ }
+
+ /*
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
-index 19423a4..f591ad4 100644
+index 25c0ad3..1b474de 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
-@@ -366,7 +366,7 @@ static void print_unreferenced(struct seq_file *seq,
+@@ -365,7 +365,7 @@ static void print_unreferenced(struct seq_file *seq,
for (i = 0; i < object->trace_len; i++) {
void *ptr = (void *)object->trace[i];
@@ -118865,7 +143630,7 @@ index 19423a4..f591ad4 100644
}
}
-@@ -1958,7 +1958,7 @@ static int __init kmemleak_late_init(void)
+@@ -1957,7 +1957,7 @@ static int __init kmemleak_late_init(void)
return -ENOMEM;
}
@@ -118910,10 +143675,10 @@ index d159b1c..7655796 100644
return ret ? -EFAULT : 0;
}
diff --git a/mm/madvise.c b/mm/madvise.c
-index c889fcb..f181221 100644
+index f56825b..f86f118 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
-@@ -52,6 +52,10 @@ static long madvise_behavior(struct vm_area_struct *vma,
+@@ -56,6 +56,10 @@ static long madvise_behavior(struct vm_area_struct *vma,
pgoff_t pgoff;
unsigned long new_flags = vma->vm_flags;
@@ -118924,7 +143689,7 @@ index c889fcb..f181221 100644
switch (behavior) {
case MADV_NORMAL:
new_flags = new_flags & ~VM_RAND_READ & ~VM_SEQ_READ;
-@@ -128,6 +132,13 @@ success:
+@@ -132,6 +136,13 @@ success:
/*
* vm_flags is protected by the mmap_sem held in write mode.
*/
@@ -118938,7 +143703,7 @@ index c889fcb..f181221 100644
vma->vm_flags = new_flags;
out:
-@@ -279,11 +290,27 @@ static long madvise_dontneed(struct vm_area_struct *vma,
+@@ -471,11 +482,27 @@ static long madvise_dontneed(struct vm_area_struct *vma,
struct vm_area_struct **prev,
unsigned long start, unsigned long end)
{
@@ -118966,7 +143731,7 @@ index c889fcb..f181221 100644
return 0;
}
-@@ -486,6 +513,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
+@@ -687,6 +714,16 @@ SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior)
if (end < start)
return error;
@@ -118984,10 +143749,10 @@ index c889fcb..f181221 100644
if (end == start)
return error;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
-index fc0bcc4..2e9eabc 100644
+index caf3bf7..162b323 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
-@@ -809,7 +809,7 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
+@@ -748,7 +748,7 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page)
mem_cgroup_update_tree(memcg, page);
#if MAX_NUMNODES > 1
if (unlikely(do_numainfo))
@@ -118996,7 +143761,7 @@ index fc0bcc4..2e9eabc 100644
#endif
}
}
-@@ -1451,7 +1451,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
+@@ -1381,7 +1381,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
* numainfo_events > 0 means there was at least NUMAINFO_EVENTS_TARGET
* pagein/pageout changes since the last update.
*/
@@ -119005,7 +143770,7 @@ index fc0bcc4..2e9eabc 100644
return;
if (atomic_inc_return(&memcg->numainfo_updating) > 1)
return;
-@@ -1465,7 +1465,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
+@@ -1395,7 +1395,7 @@ static void mem_cgroup_may_update_nodemask(struct mem_cgroup *memcg)
node_clear(nid, memcg->scan_nodes);
}
@@ -119015,7 +143780,7 @@ index fc0bcc4..2e9eabc 100644
}
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
-index 750b789..b1b1b59 100644
+index ac595e7..78fa945 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -64,7 +64,7 @@ int sysctl_memory_failure_early_kill __read_mostly = 0;
@@ -119046,10 +143811,10 @@ index 750b789..b1b1b59 100644
/*
* free pages are specially detected outside this table:
diff --git a/mm/memory.c b/mm/memory.c
-index b80bf47..d3fd553 100644
+index 8132787..64b99d0 100644
--- a/mm/memory.c
+++ b/mm/memory.c
-@@ -415,6 +415,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
+@@ -416,6 +416,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
free_pte_range(tlb, pmd, addr);
} while (pmd++, addr = next, addr != end);
@@ -119057,7 +143822,7 @@ index b80bf47..d3fd553 100644
start &= PUD_MASK;
if (start < floor)
return;
-@@ -430,6 +431,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
+@@ -431,6 +432,7 @@ static inline void free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
pud_clear(pud);
pmd_free_tlb(tlb, pmd, start);
mm_dec_nr_pmds(tlb->mm);
@@ -119065,7 +143830,7 @@ index b80bf47..d3fd553 100644
}
static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
-@@ -449,6 +451,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
+@@ -450,6 +452,7 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
free_pmd_range(tlb, pud, addr, next, floor, ceiling);
} while (pud++, addr = next, addr != end);
@@ -119073,7 +143838,7 @@ index b80bf47..d3fd553 100644
start &= PGDIR_MASK;
if (start < floor)
return;
-@@ -463,6 +466,8 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
+@@ -464,6 +467,8 @@ static inline void free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
pud = pud_offset(pgd, start);
pgd_clear(pgd);
pud_free_tlb(tlb, pud, start);
@@ -119082,7 +143847,7 @@ index b80bf47..d3fd553 100644
}
/*
-@@ -691,7 +696,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
+@@ -686,7 +691,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
/*
* Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y
*/
@@ -119091,7 +143856,7 @@ index b80bf47..d3fd553 100644
vma->vm_file,
vma->vm_ops ? vma->vm_ops->fault : NULL,
vma->vm_file ? vma->vm_file->f_op->mmap : NULL,
-@@ -1464,6 +1469,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
+@@ -1448,6 +1453,10 @@ static int insert_page(struct vm_area_struct *vma, unsigned long addr,
page_add_file_rmap(page);
set_pte_at(mm, addr, pte, mk_pte(page, prot));
@@ -119102,7 +143867,7 @@ index b80bf47..d3fd553 100644
retval = 0;
pte_unmap_unlock(pte, ptl);
return retval;
-@@ -1508,9 +1517,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
+@@ -1492,9 +1501,21 @@ int vm_insert_page(struct vm_area_struct *vma, unsigned long addr,
if (!page_count(page))
return -EINVAL;
if (!(vma->vm_flags & VM_MIXEDMAP)) {
@@ -119124,15 +143889,15 @@ index b80bf47..d3fd553 100644
}
return insert_page(vma, addr, page, vma->vm_page_prot);
}
-@@ -1593,6 +1614,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
- unsigned long pfn)
+@@ -1580,6 +1601,7 @@ int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
+ pfn_t pfn)
{
BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
+ BUG_ON(vma->vm_mirror);
if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
-@@ -1840,7 +1862,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
+@@ -1832,7 +1854,9 @@ static int apply_to_pmd_range(struct mm_struct *mm, pud_t *pud,
BUG_ON(pud_huge(*pud));
@@ -119143,7 +143908,7 @@ index b80bf47..d3fd553 100644
if (!pmd)
return -ENOMEM;
do {
-@@ -1860,7 +1884,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
+@@ -1852,7 +1876,9 @@ static int apply_to_pud_range(struct mm_struct *mm, pgd_t *pgd,
unsigned long next;
int err;
@@ -119154,7 +143919,7 @@ index b80bf47..d3fd553 100644
if (!pud)
return -ENOMEM;
do {
-@@ -2041,6 +2067,196 @@ static inline int wp_page_reuse(struct mm_struct *mm,
+@@ -2048,6 +2074,196 @@ static inline int wp_page_reuse(struct mm_struct *mm,
return VM_FAULT_WRITE;
}
@@ -119196,7 +143961,7 @@ index b80bf47..d3fd553 100644
+ dec_mm_counter_fast(mm, MM_ANONPAGES);
+ else
+ dec_mm_counter_fast(mm, MM_FILEPAGES);
-+ page_remove_rmap(page);
++ page_remove_rmap(page, false);
+ page_cache_release(page);
+ }
+ }
@@ -119237,7 +144002,7 @@ index b80bf47..d3fd553 100644
+
+ entry_m = pfn_pte(page_to_pfn(page_m), vma_m->vm_page_prot);
+ page_cache_get(page_m);
-+ page_add_anon_rmap(page_m, vma_m, address_m);
++ page_add_anon_rmap(page_m, vma_m, address_m, false);
+ inc_mm_counter_fast(mm, MM_ANONPAGES);
+ set_pte_at(mm, address_m, pte_m, entry_m);
+ update_mmu_cache(vma_m, address_m, pte_m);
@@ -119351,7 +144116,7 @@ index b80bf47..d3fd553 100644
/*
* Handle the case of a page which we actually need to copy to a new page.
*
-@@ -2095,6 +2311,12 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2102,6 +2318,12 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
*/
page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
if (likely(pte_same(*page_table, orig_pte))) {
@@ -119363,9 +144128,9 @@ index b80bf47..d3fd553 100644
+
if (old_page) {
if (!PageAnon(old_page)) {
- dec_mm_counter_fast(mm, MM_FILEPAGES);
-@@ -2149,6 +2371,10 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
- page_remove_rmap(old_page);
+ dec_mm_counter_fast(mm,
+@@ -2157,6 +2379,10 @@ static int wp_page_copy(struct mm_struct *mm, struct vm_area_struct *vma,
+ page_remove_rmap(old_page, false);
}
+#ifdef CONFIG_PAX_SEGMEXEC
@@ -119375,9 +144140,9 @@ index b80bf47..d3fd553 100644
/* Free the old page.. */
new_page = old_page;
page_copied = 1;
-@@ -2580,6 +2806,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
- swap_free(entry);
- if (vm_swap_full() || (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
+@@ -2585,6 +2811,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
+ if (mem_cgroup_swap_full(page) ||
+ (vma->vm_flags & VM_LOCKED) || PageMlocked(page))
try_to_free_swap(page);
+
+#ifdef CONFIG_PAX_SEGMEXEC
@@ -119387,7 +144152,7 @@ index b80bf47..d3fd553 100644
unlock_page(page);
if (page != swapcache) {
/*
-@@ -2603,6 +2834,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2608,6 +2839,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, page_table);
@@ -119399,7 +144164,7 @@ index b80bf47..d3fd553 100644
unlock:
pte_unmap_unlock(page_table, ptl);
out:
-@@ -2622,40 +2858,6 @@ out_release:
+@@ -2627,40 +2863,6 @@ out_release:
}
/*
@@ -119440,7 +144205,7 @@ index b80bf47..d3fd553 100644
* We enter with non-exclusive mmap_sem (to exclude vma changes,
* but allow concurrent faults), and pte mapped but not yet locked.
* We return with mmap_sem still held, but pte unmapped and unlocked.
-@@ -2665,25 +2867,22 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2670,25 +2872,22 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned int flags)
{
struct mem_cgroup *memcg;
@@ -119472,7 +144237,7 @@ index b80bf47..d3fd553 100644
if (!pte_none(*page_table))
goto unlock;
/* Deliver the page fault to userland, check inside PT lock */
-@@ -2696,6 +2895,8 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2701,6 +2900,8 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
}
/* Allocate our own private page. */
@@ -119481,7 +144246,7 @@ index b80bf47..d3fd553 100644
if (unlikely(anon_vma_prepare(vma)))
goto oom;
page = alloc_zeroed_user_highpage_movable(vma, address);
-@@ -2729,6 +2930,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2734,6 +2935,11 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
VM_UFFD_MISSING);
}
@@ -119491,9 +144256,9 @@ index b80bf47..d3fd553 100644
+#endif
+
inc_mm_counter_fast(mm, MM_ANONPAGES);
- page_add_new_anon_rmap(page, vma, address);
- mem_cgroup_commit_charge(page, memcg, false);
-@@ -2738,6 +2944,12 @@ setpte:
+ page_add_new_anon_rmap(page, vma, address, false);
+ mem_cgroup_commit_charge(page, memcg, false, false);
+@@ -2743,6 +2949,12 @@ setpte:
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, page_table);
@@ -119506,7 +144271,7 @@ index b80bf47..d3fd553 100644
unlock:
pte_unmap_unlock(page_table, ptl);
return 0;
-@@ -2970,6 +3182,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2977,6 +3189,11 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
return ret;
}
do_set_pte(vma, address, fault_page, pte, false, false);
@@ -119518,7 +144283,7 @@ index b80bf47..d3fd553 100644
unlock_page(fault_page);
unlock_out:
pte_unmap_unlock(pte, ptl);
-@@ -3021,7 +3238,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3028,7 +3245,18 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma,
}
goto uncharge_out;
}
@@ -119534,10 +144299,10 @@ index b80bf47..d3fd553 100644
+ pax_mirror_anon_pte(vma, address, new_page, ptl);
+#endif
+
- mem_cgroup_commit_charge(new_page, memcg, false);
+ mem_cgroup_commit_charge(new_page, memcg, false, false);
lru_cache_add_active_or_unevictable(new_page, vma);
pte_unmap_unlock(pte, ptl);
-@@ -3079,6 +3307,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3086,6 +3314,11 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma,
return ret;
}
do_set_pte(vma, address, fault_page, pte, true, false);
@@ -119549,7 +144314,7 @@ index b80bf47..d3fd553 100644
pte_unmap_unlock(pte, ptl);
if (set_page_dirty(fault_page))
-@@ -3325,6 +3558,12 @@ static int handle_pte_fault(struct mm_struct *mm,
+@@ -3338,6 +3571,12 @@ static int handle_pte_fault(struct mm_struct *mm,
if (flags & FAULT_FLAG_WRITE)
flush_tlb_fix_spurious_fault(vma, address);
}
@@ -119562,7 +144327,7 @@ index b80bf47..d3fd553 100644
unlock:
pte_unmap_unlock(pte, ptl);
return 0;
-@@ -3344,9 +3583,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -3357,9 +3596,41 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
pmd_t *pmd;
pte_t *pte;
@@ -119604,7 +144369,7 @@ index b80bf47..d3fd553 100644
pgd = pgd_offset(mm, address);
pud = pud_alloc(mm, pgd, address);
if (!pud)
-@@ -3488,6 +3759,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+@@ -3493,6 +3764,23 @@ int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
spin_unlock(&mm->page_table_lock);
return 0;
}
@@ -119628,7 +144393,7 @@ index b80bf47..d3fd553 100644
#endif /* __PAGETABLE_PUD_FOLDED */
#ifndef __PAGETABLE_PMD_FOLDED
-@@ -3520,6 +3808,32 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
+@@ -3525,6 +3813,32 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
spin_unlock(&mm->page_table_lock);
return 0;
}
@@ -119661,7 +144426,7 @@ index b80bf47..d3fd553 100644
#endif /* __PAGETABLE_PMD_FOLDED */
static int __follow_pte(struct mm_struct *mm, unsigned long address,
-@@ -3629,8 +3943,8 @@ out:
+@@ -3634,8 +3948,8 @@ out:
return ret;
}
@@ -119672,7 +144437,7 @@ index b80bf47..d3fd553 100644
{
resource_size_t phys_addr;
unsigned long prot = 0;
-@@ -3656,8 +3970,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
+@@ -3661,8 +3975,8 @@ EXPORT_SYMBOL_GPL(generic_access_phys);
* Access another process' address space as given in mm. If non-NULL, use the
* given task for page fault accounting.
*/
@@ -119683,7 +144448,7 @@ index b80bf47..d3fd553 100644
{
struct vm_area_struct *vma;
void *old_buf = buf;
-@@ -3665,7 +3979,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
+@@ -3670,7 +3984,7 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
down_read(&mm->mmap_sem);
/* ignore errors, just check how much was successfully transferred */
while (len) {
@@ -119692,7 +144457,7 @@ index b80bf47..d3fd553 100644
void *maddr;
struct page *page = NULL;
-@@ -3726,8 +4040,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
+@@ -3731,8 +4045,8 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
*
* The caller must hold a reference on @mm.
*/
@@ -119703,7 +144468,7 @@ index b80bf47..d3fd553 100644
{
return __access_remote_vm(NULL, mm, addr, buf, len, write);
}
-@@ -3737,11 +4051,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
+@@ -3742,11 +4056,11 @@ int access_remote_vm(struct mm_struct *mm, unsigned long addr,
* Source/target buffer must be kernel space,
* Do not walk the page table directly, use get_user_pages
*/
@@ -119719,10 +144484,10 @@ index b80bf47..d3fd553 100644
mm = get_task_mm(tsk);
if (!mm)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
-index 87a1779..ebf95d4 100644
+index 9a3f6b9..b9af66c 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
-@@ -700,6 +700,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
+@@ -731,6 +731,10 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
unsigned long vmstart;
unsigned long vmend;
@@ -119733,7 +144498,7 @@ index 87a1779..ebf95d4 100644
vma = find_vma(mm, start);
if (!vma || vma->vm_start > start)
return -EFAULT;
-@@ -743,6 +747,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
+@@ -774,6 +778,16 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
err = vma_replace_policy(vma, new_pol);
if (err)
goto out;
@@ -119750,7 +144515,7 @@ index 87a1779..ebf95d4 100644
}
out:
-@@ -1158,6 +1172,17 @@ static long do_mbind(unsigned long start, unsigned long len,
+@@ -1189,6 +1203,17 @@ static long do_mbind(unsigned long start, unsigned long len,
if (end < start)
return -EINVAL;
@@ -119768,7 +144533,7 @@ index 87a1779..ebf95d4 100644
if (end == start)
return 0;
-@@ -1383,8 +1408,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
+@@ -1414,8 +1439,7 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
*/
tcred = __task_cred(task);
if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
@@ -119778,7 +144543,7 @@ index 87a1779..ebf95d4 100644
rcu_read_unlock();
err = -EPERM;
goto out_put;
-@@ -1415,6 +1439,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
+@@ -1446,6 +1470,15 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
goto out;
}
@@ -119795,10 +144560,10 @@ index 87a1779..ebf95d4 100644
capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
diff --git a/mm/migrate.c b/mm/migrate.c
-index 6d17e0a..64ef47b 100644
+index 3ad0fea..2b361a1 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
-@@ -1505,8 +1505,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
+@@ -1509,8 +1509,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
*/
tcred = __task_cred(task);
if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
@@ -119809,7 +144574,7 @@ index 6d17e0a..64ef47b 100644
err = -EPERM;
goto out;
diff --git a/mm/mlock.c b/mm/mlock.c
-index d6006b1..a72cbda 100644
+index 96f0010..21004da 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -14,6 +14,7 @@
@@ -119820,7 +144585,7 @@ index d6006b1..a72cbda 100644
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/rmap.h>
-@@ -560,7 +561,7 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
+@@ -573,7 +574,7 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
{
unsigned long nstart, end, tmp;
struct vm_area_struct * vma, * prev;
@@ -119829,7 +144594,7 @@ index d6006b1..a72cbda 100644
VM_BUG_ON(offset_in_page(start));
VM_BUG_ON(len != PAGE_ALIGN(len));
-@@ -569,6 +570,9 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
+@@ -582,6 +583,9 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
return -EINVAL;
if (end == start)
return 0;
@@ -119839,7 +144604,7 @@ index d6006b1..a72cbda 100644
vma = find_vma(current->mm, start);
if (!vma || vma->vm_start > start)
return -ENOMEM;
-@@ -578,8 +582,14 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
+@@ -591,8 +595,14 @@ static int apply_vma_lock_flags(unsigned long start, size_t len,
prev = vma;
for (nstart = start ; ; ) {
@@ -119855,7 +144620,7 @@ index d6006b1..a72cbda 100644
newflags |= flags;
/* Here we know that vma->vm_start <= nstart < vma->vm_end. */
-@@ -627,6 +637,10 @@ static int do_mlock(unsigned long start, size_t len, vm_flags_t flags)
+@@ -640,6 +650,10 @@ static int do_mlock(unsigned long start, size_t len, vm_flags_t flags)
locked += current->mm->locked_vm;
/* check against resource limits */
@@ -119866,7 +144631,7 @@ index d6006b1..a72cbda 100644
if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
error = apply_vma_lock_flags(start, len, flags);
-@@ -707,6 +721,11 @@ static int apply_mlockall_flags(int flags)
+@@ -720,6 +734,11 @@ static int apply_mlockall_flags(int flags)
for (vma = current->mm->mmap; vma ; vma = prev->vm_next) {
vm_flags_t newflags;
@@ -119878,7 +144643,7 @@ index d6006b1..a72cbda 100644
newflags = vma->vm_flags & VM_LOCKED_CLEAR_MASK;
newflags |= to_add;
-@@ -736,8 +755,12 @@ SYSCALL_DEFINE1(mlockall, int, flags)
+@@ -749,8 +768,12 @@ SYSCALL_DEFINE1(mlockall, int, flags)
lock_limit >>= PAGE_SHIFT;
ret = -ENOMEM;
@@ -119906,20 +144671,20 @@ index fdadf91..90c6bcc 100644
.priority = IPC_CALLBACK_PRI, /* use lowest priority */
};
diff --git a/mm/mmap.c b/mm/mmap.c
-index 455772a..5ce0964 100644
+index 76d1ec2..85ad30a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
-@@ -42,6 +42,7 @@
- #include <linux/memory.h>
+@@ -43,6 +43,7 @@
#include <linux/printk.h>
#include <linux/userfaultfd_k.h>
+ #include <linux/moduleparam.h>
+#include <linux/random.h>
#include <asm/uaccess.h>
#include <asm/cacheflush.h>
-@@ -58,6 +59,16 @@
- #define arch_rebalance_pgtables(addr, len) (addr)
- #endif
+@@ -73,6 +74,16 @@ int mmap_rnd_compat_bits __read_mostly = CONFIG_ARCH_MMAP_RND_COMPAT_BITS;
+ static bool ignore_rlimit_data = true;
+ core_param(ignore_rlimit_data, ignore_rlimit_data, bool, 0644);
+static inline void verify_mm_writelocked(struct mm_struct *mm)
+{
@@ -119934,7 +144699,7 @@ index 455772a..5ce0964 100644
static void unmap_region(struct mm_struct *mm,
struct vm_area_struct *vma, struct vm_area_struct *prev,
unsigned long start, unsigned long end);
-@@ -77,16 +88,25 @@ static void unmap_region(struct mm_struct *mm,
+@@ -92,16 +103,25 @@ static void unmap_region(struct mm_struct *mm,
* x: (no) no x: (no) yes x: (no) yes x: (yes) yes
*
*/
@@ -119963,7 +144728,7 @@ index 455772a..5ce0964 100644
}
EXPORT_SYMBOL(vm_get_page_prot);
-@@ -115,6 +135,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly;
+@@ -130,6 +150,7 @@ unsigned long sysctl_overcommit_kbytes __read_mostly;
int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */
unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */
@@ -119971,7 +144736,7 @@ index 455772a..5ce0964 100644
/*
* Make sure vm_committed_as in one cacheline and not cacheline shared with
* other variables. It can be updated by several CPUs frequently.
-@@ -272,6 +293,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
+@@ -287,6 +308,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
struct vm_area_struct *next = vma->vm_next;
might_sleep();
@@ -119979,7 +144744,7 @@ index 455772a..5ce0964 100644
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
-@@ -285,6 +307,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len);
+@@ -300,6 +322,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len);
SYSCALL_DEFINE1(brk, unsigned long, brk)
{
@@ -119987,7 +144752,7 @@ index 455772a..5ce0964 100644
unsigned long retval;
unsigned long newbrk, oldbrk;
struct mm_struct *mm = current->mm;
-@@ -315,7 +338,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
+@@ -330,7 +353,13 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
* segment grow beyond its set limit the in case where the limit is
* not page aligned -Ram Gupta
*/
@@ -120002,7 +144767,7 @@ index 455772a..5ce0964 100644
mm->end_data, mm->start_data))
goto out;
-@@ -977,6 +1006,12 @@ can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
+@@ -995,6 +1024,12 @@ can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
pgoff_t vm_pgoff,
struct vm_userfaultfd_ctx vm_userfaultfd_ctx)
{
@@ -120015,7 +144780,7 @@ index 455772a..5ce0964 100644
if (is_mergeable_vma(vma, file, vm_flags, vm_userfaultfd_ctx) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
if (vma->vm_pgoff == vm_pgoff)
-@@ -998,6 +1033,12 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
+@@ -1016,6 +1051,12 @@ can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
pgoff_t vm_pgoff,
struct vm_userfaultfd_ctx vm_userfaultfd_ctx)
{
@@ -120028,7 +144793,7 @@ index 455772a..5ce0964 100644
if (is_mergeable_vma(vma, file, vm_flags, vm_userfaultfd_ctx) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
pgoff_t vm_pglen;
-@@ -1048,6 +1089,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1066,6 +1107,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
struct vm_area_struct *area, *next;
int err;
@@ -120042,7 +144807,7 @@ index 455772a..5ce0964 100644
/*
* We later require that vma->vm_flags == vm_flags,
* so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -1063,6 +1111,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1081,6 +1129,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
if (next && next->vm_end == end) /* cases 6, 7, 8 */
next = next->vm_next;
@@ -120058,7 +144823,7 @@ index 455772a..5ce0964 100644
/*
* Can it merge with the predecessor?
*/
-@@ -1085,9 +1142,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1103,9 +1160,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
/* cases 1, 6 */
err = vma_adjust(prev, prev->vm_start,
next->vm_end, prev->vm_pgoff, NULL);
@@ -120084,7 +144849,7 @@ index 455772a..5ce0964 100644
if (err)
return NULL;
khugepaged_enter_vma_merge(prev, vm_flags);
-@@ -1102,12 +1174,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1120,12 +1192,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
can_vma_merge_before(next, vm_flags,
anon_vma, file, pgoff+pglen,
vm_userfaultfd_ctx)) {
@@ -120114,29 +144879,7 @@ index 455772a..5ce0964 100644
if (err)
return NULL;
khugepaged_enter_vma_merge(area, vm_flags);
-@@ -1216,8 +1303,10 @@ none:
- void vm_stat_account(struct mm_struct *mm, unsigned long flags,
- struct file *file, long pages)
- {
-- const unsigned long stack_flags
-- = VM_STACK_FLAGS & (VM_GROWSUP|VM_GROWSDOWN);
-+
-+#ifdef CONFIG_PAX_RANDMMAP
-+ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
-+#endif
-
- mm->total_vm += pages;
-
-@@ -1225,7 +1314,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
- mm->shared_vm += pages;
- if ((flags & (VM_EXEC|VM_WRITE)) == VM_EXEC)
- mm->exec_vm += pages;
-- } else if (flags & stack_flags)
-+ } else if (flags & (VM_GROWSUP|VM_GROWSDOWN))
- mm->stack_vm += pages;
- }
- #endif /* CONFIG_PROC_FS */
-@@ -1255,6 +1344,10 @@ static inline int mlock_future_check(struct mm_struct *mm,
+@@ -1255,6 +1342,10 @@ static inline int mlock_future_check(struct mm_struct *mm,
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= PAGE_SHIFT;
@@ -120147,7 +144890,7 @@ index 455772a..5ce0964 100644
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
}
-@@ -1282,7 +1375,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
+@@ -1282,7 +1373,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
* (the exception is when the underlying filesystem is noexec
* mounted, in which case we dont add PROT_EXEC.)
*/
@@ -120156,7 +144899,7 @@ index 455772a..5ce0964 100644
if (!(file && path_noexec(&file->f_path)))
prot |= PROT_EXEC;
-@@ -1305,7 +1398,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
+@@ -1305,7 +1396,7 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
/* Obtain the address to map to. we verify (or select) it and ensure
* that it represents a valid section of the address space.
*/
@@ -120165,7 +144908,7 @@ index 455772a..5ce0964 100644
if (offset_in_page(addr))
return addr;
-@@ -1316,6 +1409,43 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
+@@ -1316,6 +1407,43 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
vm_flags |= calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
@@ -120209,7 +144952,7 @@ index 455772a..5ce0964 100644
if (flags & MAP_LOCKED)
if (!can_do_mlock())
return -EPERM;
-@@ -1403,6 +1533,9 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
+@@ -1403,6 +1531,9 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
vm_flags |= VM_NORESERVE;
}
@@ -120219,7 +144962,7 @@ index 455772a..5ce0964 100644
addr = mmap_region(file, addr, len, vm_flags, pgoff);
if (!IS_ERR_VALUE(addr) &&
((vm_flags & VM_LOCKED) ||
-@@ -1496,7 +1629,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
+@@ -1496,7 +1627,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
const struct vm_operations_struct *vm_ops = vma->vm_ops;
/* If it was private or non-writable, the write bit is already clear */
@@ -120228,7 +144971,7 @@ index 455772a..5ce0964 100644
return 0;
/* The backer wishes to know when pages are first written to? */
-@@ -1547,7 +1680,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1547,7 +1678,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
struct rb_node **rb_link, *rb_parent;
unsigned long charged = 0;
@@ -120248,10 +144991,10 @@ index 455772a..5ce0964 100644
+ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (vm_flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
+#endif
+
- if (!may_expand_vm(mm, len >> PAGE_SHIFT)) {
+ if (!may_expand_vm(mm, vm_flags, len >> PAGE_SHIFT)) {
unsigned long nr_pages;
-@@ -1569,6 +1717,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1567,6 +1713,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
&rb_parent)) {
if (do_munmap(mm, addr, len))
return -ENOMEM;
@@ -120259,7 +145002,7 @@ index 455772a..5ce0964 100644
}
/*
-@@ -1600,6 +1749,16 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1598,6 +1745,16 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
goto unacct_error;
}
@@ -120276,7 +145019,7 @@ index 455772a..5ce0964 100644
vma->vm_mm = mm;
vma->vm_start = addr;
vma->vm_end = addr + len;
-@@ -1630,6 +1789,13 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1628,6 +1785,13 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
if (error)
goto unmap_and_free_vma;
@@ -120290,7 +145033,7 @@ index 455772a..5ce0964 100644
/* Can addr have changed??
*
* Answer: Yes, several device drivers can do it in their
-@@ -1648,6 +1814,12 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1646,6 +1810,12 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
}
vma_link(mm, vma, prev, rb_link, rb_parent);
@@ -120303,15 +145046,15 @@ index 455772a..5ce0964 100644
/* Once vma denies write, undo our temporary denial count */
if (file) {
if (vm_flags & VM_SHARED)
-@@ -1660,6 +1832,7 @@ out:
+@@ -1658,6 +1828,7 @@ out:
perf_event_mmap(vma);
- vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
+ vm_stat_account(mm, vm_flags, len >> PAGE_SHIFT);
+ track_exec_limit(mm, addr, addr + len, vm_flags);
if (vm_flags & VM_LOCKED) {
if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) ||
vma == get_gate_vma(current->mm)))
-@@ -1697,6 +1870,12 @@ allow_write_and_free_vma:
+@@ -1695,6 +1866,12 @@ allow_write_and_free_vma:
if (vm_flags & VM_DENYWRITE)
allow_write_access(file);
free_vma:
@@ -120324,7 +145067,7 @@ index 455772a..5ce0964 100644
kmem_cache_free(vm_area_cachep, vma);
unacct_error:
if (charged)
-@@ -1704,7 +1883,63 @@ unacct_error:
+@@ -1702,7 +1879,63 @@ unacct_error:
return error;
}
@@ -120389,7 +145132,7 @@ index 455772a..5ce0964 100644
{
/*
* We implement the search by looking for an rbtree node that
-@@ -1752,11 +1987,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
+@@ -1750,11 +1983,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
}
}
@@ -120420,7 +145163,7 @@ index 455772a..5ce0964 100644
if (gap_end >= low_limit && gap_end - gap_start >= length)
goto found;
-@@ -1806,7 +2059,7 @@ found:
+@@ -1804,7 +2055,7 @@ found:
return gap_start;
}
@@ -120429,7 +145172,7 @@ index 455772a..5ce0964 100644
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
-@@ -1860,6 +2113,24 @@ check_current:
+@@ -1858,6 +2109,24 @@ check_current:
gap_end = vma->vm_start;
if (gap_end < low_limit)
return -ENOMEM;
@@ -120454,7 +145197,7 @@ index 455772a..5ce0964 100644
if (gap_start <= high_limit && gap_end - gap_start >= length)
goto found;
-@@ -1923,6 +2194,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1921,6 +2190,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
struct vm_unmapped_area_info info;
@@ -120462,7 +145205,7 @@ index 455772a..5ce0964 100644
if (len > TASK_SIZE - mmap_min_addr)
return -ENOMEM;
-@@ -1930,11 +2202,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1928,11 +2198,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
@@ -120479,7 +145222,7 @@ index 455772a..5ce0964 100644
return addr;
}
-@@ -1943,6 +2219,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1941,6 +2215,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
info.low_limit = mm->mmap_base;
info.high_limit = TASK_SIZE;
info.align_mask = 0;
@@ -120487,7 +145230,7 @@ index 455772a..5ce0964 100644
return vm_unmapped_area(&info);
}
#endif
-@@ -1961,6 +2238,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1959,6 +2234,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
struct vm_unmapped_area_info info;
@@ -120495,7 +145238,7 @@ index 455772a..5ce0964 100644
/* requested length too big for entire address space */
if (len > TASK_SIZE - mmap_min_addr)
-@@ -1969,12 +2247,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1967,12 +2243,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (flags & MAP_FIXED)
return addr;
@@ -120513,7 +145256,7 @@ index 455772a..5ce0964 100644
return addr;
}
-@@ -1983,6 +2265,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1981,6 +2261,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
info.low_limit = max(PAGE_SIZE, mmap_min_addr);
info.high_limit = mm->mmap_base;
info.align_mask = 0;
@@ -120521,7 +145264,7 @@ index 455772a..5ce0964 100644
addr = vm_unmapped_area(&info);
/*
-@@ -1995,6 +2278,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1993,6 +2274,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
VM_BUG_ON(addr != -ENOMEM);
info.flags = 0;
info.low_limit = TASK_UNMAPPED_BASE;
@@ -120534,7 +145277,7 @@ index 455772a..5ce0964 100644
info.high_limit = TASK_SIZE;
addr = vm_unmapped_area(&info);
}
-@@ -2094,6 +2383,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
+@@ -2092,6 +2379,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
return vma;
}
@@ -120563,7 +145306,7 @@ index 455772a..5ce0964 100644
/*
* Verify that the stack growth is acceptable and
* update accounting. This is shared with both the
-@@ -2111,8 +2422,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2109,8 +2418,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
/* Stack limit test */
actual_size = size;
@@ -120573,7 +145316,7 @@ index 455772a..5ce0964 100644
if (actual_size > READ_ONCE(rlim[RLIMIT_STACK].rlim_cur))
return -ENOMEM;
-@@ -2123,6 +2433,10 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2121,6 +2429,10 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
locked = mm->locked_vm + grow;
limit = READ_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
limit >>= PAGE_SHIFT;
@@ -120584,7 +145327,7 @@ index 455772a..5ce0964 100644
if (locked > limit && !capable(CAP_IPC_LOCK))
return -ENOMEM;
}
-@@ -2148,17 +2462,21 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2146,17 +2458,21 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
* PA-RISC uses this for its stack; IA64 for its Register Backing Store.
* vma is the last one with address > vma->vm_end. Have to extend vma.
*/
@@ -120608,7 +145351,7 @@ index 455772a..5ce0964 100644
else
return -ENOMEM;
-@@ -2166,15 +2484,24 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
+@@ -2164,15 +2480,24 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
if (unlikely(anon_vma_prepare(vma)))
return -ENOMEM;
@@ -120635,7 +145378,7 @@ index 455772a..5ce0964 100644
unsigned long size, grow;
size = address - vma->vm_start;
-@@ -2213,6 +2540,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
+@@ -2210,6 +2535,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
}
}
}
@@ -120644,7 +145387,7 @@ index 455772a..5ce0964 100644
anon_vma_unlock_write(vma->anon_vma);
khugepaged_enter_vma_merge(vma, vma->vm_flags);
validate_mm(mm);
-@@ -2228,6 +2557,8 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2225,6 +2552,8 @@ int expand_downwards(struct vm_area_struct *vma,
{
struct mm_struct *mm = vma->vm_mm;
int error;
@@ -120653,7 +145396,7 @@ index 455772a..5ce0964 100644
address &= PAGE_MASK;
error = security_mmap_addr(address);
-@@ -2238,6 +2569,15 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2235,6 +2564,15 @@ int expand_downwards(struct vm_area_struct *vma,
if (unlikely(anon_vma_prepare(vma)))
return -ENOMEM;
@@ -120669,7 +145412,7 @@ index 455772a..5ce0964 100644
/*
* vma->vm_start/vm_end cannot change under us because the caller
* is required to hold the mmap_sem in read mode. We need the
-@@ -2246,9 +2586,17 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2243,9 +2581,17 @@ int expand_downwards(struct vm_area_struct *vma,
anon_vma_lock_write(vma->anon_vma);
/* Somebody else might have raced and expanded it already */
@@ -120688,7 +145431,7 @@ index 455772a..5ce0964 100644
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
-@@ -2277,13 +2625,27 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2273,13 +2619,27 @@ int expand_downwards(struct vm_area_struct *vma,
vma->vm_pgoff -= grow;
anon_vma_interval_tree_post_update_vma(vma);
vma_gap_update(vma);
@@ -120716,7 +145459,7 @@ index 455772a..5ce0964 100644
khugepaged_enter_vma_merge(vma, vma->vm_flags);
validate_mm(mm);
return error;
-@@ -2383,6 +2745,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2379,6 +2739,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
do {
long nrpages = vma_pages(vma);
@@ -120729,8 +145472,8 @@ index 455772a..5ce0964 100644
+
if (vma->vm_flags & VM_ACCOUNT)
nr_accounted += nrpages;
- vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
-@@ -2427,6 +2796,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
+ vm_stat_account(mm, vma->vm_flags, -nrpages);
+@@ -2423,6 +2790,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
insertion_point = (prev ? &prev->vm_next : &mm->mmap);
vma->vm_prev = NULL;
do {
@@ -120747,7 +145490,7 @@ index 455772a..5ce0964 100644
vma_rb_erase(vma, &mm->mm_rb);
mm->map_count--;
tail_vma = vma;
-@@ -2454,14 +2833,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2450,14 +2827,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
struct vm_area_struct *new;
int err;
@@ -120781,7 +145524,7 @@ index 455772a..5ce0964 100644
/* most fields are the same, copy all, and then fixup */
*new = *vma;
-@@ -2474,6 +2872,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2470,6 +2866,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
}
@@ -120804,7 +145547,7 @@ index 455772a..5ce0964 100644
err = vma_dup_policy(vma, new);
if (err)
goto out_free_vma;
-@@ -2494,6 +2908,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2490,6 +2902,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
else
err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
@@ -120843,7 +145586,7 @@ index 455772a..5ce0964 100644
/* Success. */
if (!err)
return 0;
-@@ -2503,10 +2949,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2499,10 +2943,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
new->vm_ops->close(new);
if (new->vm_file)
fput(new->vm_file);
@@ -120863,7 +145606,7 @@ index 455772a..5ce0964 100644
kmem_cache_free(vm_area_cachep, new);
return err;
}
-@@ -2518,6 +2972,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2514,6 +2966,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long addr, int new_below)
{
@@ -120879,7 +145622,7 @@ index 455772a..5ce0964 100644
if (mm->map_count >= sysctl_max_map_count)
return -ENOMEM;
-@@ -2529,11 +2992,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2525,11 +2986,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
* work. This now handles partial unmappings.
* Jeremy Fitzhardinge <jeremy@goop.org>
*/
@@ -120910,7 +145653,7 @@ index 455772a..5ce0964 100644
if ((offset_in_page(start)) || start > TASK_SIZE || len > TASK_SIZE-start)
return -EINVAL;
-@@ -2611,6 +3093,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+@@ -2607,6 +3087,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
/* Fix up all other VM information */
remove_vma_list(mm, vma);
@@ -120919,7 +145662,7 @@ index 455772a..5ce0964 100644
return 0;
}
-@@ -2619,6 +3103,13 @@ int vm_munmap(unsigned long start, size_t len)
+@@ -2615,6 +3097,13 @@ int vm_munmap(unsigned long start, size_t len)
int ret;
struct mm_struct *mm = current->mm;
@@ -120933,7 +145676,7 @@ index 455772a..5ce0964 100644
down_write(&mm->mmap_sem);
ret = do_munmap(mm, start, len);
up_write(&mm->mmap_sem);
-@@ -2665,6 +3156,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
+@@ -2661,6 +3150,11 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
down_write(&mm->mmap_sem);
vma = find_vma(mm, start);
@@ -120945,7 +145688,7 @@ index 455772a..5ce0964 100644
if (!vma || !(vma->vm_flags & VM_SHARED))
goto out;
-@@ -2725,16 +3221,6 @@ out:
+@@ -2721,16 +3215,6 @@ out:
return ret;
}
@@ -120962,7 +145705,7 @@ index 455772a..5ce0964 100644
/*
* this is really a simplified "do_mmap". it only handles
* anonymous maps. eventually we may be able to do some
-@@ -2748,6 +3234,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2744,6 +3228,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
struct rb_node **rb_link, *rb_parent;
pgoff_t pgoff = addr >> PAGE_SHIFT;
int error;
@@ -120970,7 +145713,7 @@ index 455772a..5ce0964 100644
len = PAGE_ALIGN(len);
if (!len)
-@@ -2755,10 +3242,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2751,10 +3236,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
@@ -120995,7 +145738,7 @@ index 455772a..5ce0964 100644
error = mlock_future_check(mm, mm->def_flags, len);
if (error)
return error;
-@@ -2776,16 +3277,17 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2772,16 +3271,17 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
&rb_parent)) {
if (do_munmap(mm, addr, len))
return -ENOMEM;
@@ -121003,8 +145746,8 @@ index 455772a..5ce0964 100644
}
/* Check against address space limits *after* clearing old maps... */
-- if (!may_expand_vm(mm, len >> PAGE_SHIFT))
-+ if (!may_expand_vm(mm, charged))
+- if (!may_expand_vm(mm, flags, len >> PAGE_SHIFT))
++ if (!may_expand_vm(mm, flags, charged))
return -ENOMEM;
if (mm->map_count > sysctl_max_map_count)
@@ -121015,7 +145758,7 @@ index 455772a..5ce0964 100644
return -ENOMEM;
/* Can we just expand an old private anonymous mapping? */
-@@ -2799,7 +3301,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2795,7 +3295,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
*/
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
if (!vma) {
@@ -121024,12 +145767,14 @@ index 455772a..5ce0964 100644
return -ENOMEM;
}
-@@ -2813,10 +3315,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2809,11 +3309,12 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
perf_event_mmap(vma);
- mm->total_vm += len >> PAGE_SHIFT;
+- mm->data_vm += len >> PAGE_SHIFT;
+ mm->total_vm += charged;
++ mm->data_vm += charged;
if (flags & VM_LOCKED)
- mm->locked_vm += (len >> PAGE_SHIFT);
+ mm->locked_vm += charged;
@@ -121038,7 +145783,7 @@ index 455772a..5ce0964 100644
return addr;
}
-@@ -2878,6 +3381,7 @@ void exit_mmap(struct mm_struct *mm)
+@@ -2875,6 +3376,7 @@ void exit_mmap(struct mm_struct *mm)
while (vma) {
if (vma->vm_flags & VM_ACCOUNT)
nr_accounted += vma_pages(vma);
@@ -121046,7 +145791,7 @@ index 455772a..5ce0964 100644
vma = remove_vma(vma);
}
vm_unacct_memory(nr_accounted);
-@@ -2892,6 +3396,10 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2889,6 +3391,10 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
struct vm_area_struct *prev;
struct rb_node **rb_link, *rb_parent;
@@ -121057,7 +145802,7 @@ index 455772a..5ce0964 100644
if (find_vma_links(mm, vma->vm_start, vma->vm_end,
&prev, &rb_link, &rb_parent))
return -ENOMEM;
-@@ -2899,6 +3407,9 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2896,6 +3402,9 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
security_vm_enough_memory_mm(mm, vma_pages(vma)))
return -ENOMEM;
@@ -121067,7 +145812,7 @@ index 455772a..5ce0964 100644
/*
* The vm_pgoff of a purely anonymous vma should be irrelevant
* until its first write fault, when page's anon_vma and index
-@@ -2916,7 +3427,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2913,7 +3422,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
vma->vm_pgoff = vma->vm_start >> PAGE_SHIFT;
}
@@ -121089,7 +145834,7 @@ index 455772a..5ce0964 100644
return 0;
}
-@@ -2935,6 +3460,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -2932,6 +3455,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
struct rb_node **rb_link, *rb_parent;
bool faulted_in_anon_vma = true;
@@ -121098,7 +145843,7 @@ index 455772a..5ce0964 100644
/*
* If anonymous vma has not yet been faulted, update new pgoff
* to match new location, to increase its chance of merging.
-@@ -3001,6 +3528,39 @@ out:
+@@ -2998,25 +3523,69 @@ out:
return NULL;
}
@@ -121138,19 +145883,58 @@ index 455772a..5ce0964 100644
/*
* Return true if the calling process may expand its vm space by the passed
* number of pages
-@@ -3012,6 +3572,11 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
-
- lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
-
-+ if ((cur + npages) > (ULONG_MAX >> PAGE_SHIFT))
+ */
+ bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
+ {
++ if ((mm->total_vm + npages) > (ULONG_MAX >> PAGE_SHIFT))
+ gr_learn_resource(current, RLIMIT_AS, ULONG_MAX, 1);
+ else
-+ gr_learn_resource(current, RLIMIT_AS, (cur + npages) << PAGE_SHIFT, 1);
++ gr_learn_resource(current, RLIMIT_AS, (mm->total_vm + npages) << PAGE_SHIFT, 1);
+
- if (cur + npages > lim)
- return 0;
- return 1;
-@@ -3086,6 +3651,22 @@ static struct vm_area_struct *__install_special_mapping(
+ if (mm->total_vm + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT)
+ return false;
+
+- if (is_data_mapping(flags) &&
+- mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT) {
+- if (ignore_rlimit_data)
+- pr_warn_once("%s (%d): VmData %lu exceed data ulimit "
+- "%lu. Will be forbidden soon.\n",
+- current->comm, current->pid,
+- (mm->data_vm + npages) << PAGE_SHIFT,
+- rlimit(RLIMIT_DATA));
++ if (is_data_mapping(flags)) {
++ if ((mm->data_vm + npages) > (ULONG_MAX >> PAGE_SHIFT))
++ gr_learn_resource(current, RLIMIT_DATA, ULONG_MAX, 1);
+ else
+- return false;
++ gr_learn_resource(current, RLIMIT_DATA, (mm->data_vm + npages) << PAGE_SHIFT, 1);
++
++ if (mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT) {
++ if (ignore_rlimit_data)
++ pr_warn_once("%s (%d): VmData %lu exceed data ulimit "
++ "%lu. Will be forbidden soon.\n",
++ current->comm, current->pid,
++ (mm->data_vm + npages) << PAGE_SHIFT,
++ rlimit(RLIMIT_DATA));
++ else
++ return false;
++ }
+ }
+
+ return true;
+@@ -3024,6 +3593,11 @@ bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
+
+ void vm_stat_account(struct mm_struct *mm, vm_flags_t flags, long npages)
+ {
++
++#ifdef CONFIG_PAX_RANDMMAP
++ if (!(mm->pax_flags & MF_PAX_RANDMMAP) || (flags & (VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)))
++#endif
++
+ mm->total_vm += npages;
+
+ if (is_exec_mapping(flags))
+@@ -3103,6 +3677,22 @@ static struct vm_area_struct *__install_special_mapping(
vma->vm_start = addr;
vma->vm_end = addr + len;
@@ -121174,7 +145958,7 @@ index 455772a..5ce0964 100644
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
diff --git a/mm/mprotect.c b/mm/mprotect.c
-index ef5be8e..811ccb0 100644
+index f7cb3d4..7db167a 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -24,10 +24,18 @@
@@ -121196,7 +145980,7 @@ index ef5be8e..811ccb0 100644
#include "internal.h"
-@@ -254,6 +262,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
+@@ -257,6 +265,48 @@ unsigned long change_protection(struct vm_area_struct *vma, unsigned long start,
return pages;
}
@@ -121245,7 +146029,7 @@ index ef5be8e..811ccb0 100644
int
mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
unsigned long start, unsigned long end, unsigned long newflags)
-@@ -266,11 +316,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
+@@ -269,11 +319,29 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
int error;
int dirty_accountable = 0;
@@ -121275,7 +146059,7 @@ index ef5be8e..811ccb0 100644
/*
* If we make a private mapping writable we increase our commit;
* but (without finer accounting) cannot reduce our commit if we
-@@ -287,6 +355,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
+@@ -294,6 +362,42 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev,
}
}
@@ -121318,7 +146102,7 @@ index ef5be8e..811ccb0 100644
/*
* First try to merge with previous and/or next vma.
*/
-@@ -318,7 +422,19 @@ success:
+@@ -325,7 +429,19 @@ success:
* vm_flags and vm_page_prot are protected by the mmap_sem
* held in write mode.
*/
@@ -121338,7 +146122,7 @@ index ef5be8e..811ccb0 100644
dirty_accountable = vma_wants_writenotify(vma);
vma_set_page_prot(vma);
-@@ -363,6 +479,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -370,6 +486,17 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
end = start + len;
if (end <= start)
return -ENOMEM;
@@ -121356,7 +146140,7 @@ index ef5be8e..811ccb0 100644
if (!arch_validate_prot(prot))
return -EINVAL;
-@@ -370,7 +497,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -377,7 +504,7 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
@@ -121365,7 +146149,7 @@ index ef5be8e..811ccb0 100644
prot |= PROT_EXEC;
vm_flags = calc_vm_prot_bits(prot);
-@@ -402,6 +529,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -409,6 +536,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
if (start > vma->vm_start)
prev = vma;
@@ -121377,7 +146161,7 @@ index ef5be8e..811ccb0 100644
for (nstart = start ; ; ) {
unsigned long newflags;
-@@ -412,6 +544,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -419,6 +551,14 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
/* newflags >> 4 shift VM_MAY% in place of VM_% */
if ((newflags & ~(newflags >> 4)) & (VM_READ | VM_WRITE | VM_EXEC)) {
@@ -121392,7 +146176,7 @@ index ef5be8e..811ccb0 100644
error = -EACCES;
goto out;
}
-@@ -426,6 +566,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
+@@ -433,6 +573,9 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
error = mprotect_fixup(vma, &prev, nstart, tmp, newflags);
if (error)
goto out;
@@ -121403,7 +146187,7 @@ index ef5be8e..811ccb0 100644
if (nstart < prev->vm_end)
diff --git a/mm/mremap.c b/mm/mremap.c
-index c25bc62..900ca7f 100644
+index 8eeba02..311391a 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -143,6 +143,12 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
@@ -121419,7 +146203,7 @@ index c25bc62..900ca7f 100644
pte = move_soft_dirty_pte(pte);
set_pte_at(mm, new_addr, new_pte, pte);
}
-@@ -354,6 +360,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
+@@ -359,6 +365,11 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
if (is_vm_hugetlb_page(vma))
return ERR_PTR(-EINVAL);
@@ -121431,7 +146215,7 @@ index c25bc62..900ca7f 100644
/* We can't remap across vm area boundaries */
if (old_len > vma->vm_end - addr)
return ERR_PTR(-EFAULT);
-@@ -400,11 +411,19 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
+@@ -406,11 +417,19 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
unsigned long ret = -EINVAL;
unsigned long charged = 0;
unsigned long map_flags;
@@ -121452,7 +146236,7 @@ index c25bc62..900ca7f 100644
goto out;
/* Ensure the old/new locations do not overlap */
-@@ -477,6 +496,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
+@@ -483,6 +502,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
unsigned long ret = -EINVAL;
unsigned long charged = 0;
bool locked = false;
@@ -121460,7 +146244,7 @@ index c25bc62..900ca7f 100644
if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
return ret;
-@@ -498,6 +518,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
+@@ -504,6 +524,17 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
if (!new_len)
return ret;
@@ -121478,7 +146262,7 @@ index c25bc62..900ca7f 100644
down_write(&current->mm->mmap_sem);
if (flags & MREMAP_FIXED) {
-@@ -548,6 +579,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
+@@ -554,6 +585,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
new_addr = addr;
}
ret = addr;
@@ -121486,7 +146270,7 @@ index c25bc62..900ca7f 100644
goto out;
}
}
-@@ -571,7 +603,12 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
+@@ -577,7 +609,12 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
goto out;
}
@@ -121500,7 +146284,7 @@ index c25bc62..900ca7f 100644
out:
if (offset_in_page(ret)) {
diff --git a/mm/nommu.c b/mm/nommu.c
-index 92be862..30dc573 100644
+index fbf6f0f1..1c2b246 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -56,7 +56,6 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
@@ -121567,10 +146351,10 @@ index 92be862..30dc573 100644
struct mm_struct *mm;
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
-index c126809..02f1d52 100644
+index dc490c0..5087a19 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
-@@ -613,6 +613,10 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
+@@ -614,6 +614,10 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p,
if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN)
continue;
@@ -121582,10 +146366,10 @@ index c126809..02f1d52 100644
}
rcu_read_unlock();
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
-index d15d88c..4316955 100644
+index 6fe7d15..60d7249 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
-@@ -860,7 +860,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
+@@ -870,7 +870,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
* card's wb_dirty may rush to many times higher than wb_setpoint.
* - the wb dirty thresh drops quickly due to change of JBOD workload
*/
@@ -121595,10 +146379,10 @@ index d15d88c..4316955 100644
struct bdi_writeback *wb = dtc->wb;
unsigned long write_bw = wb->avg_write_bandwidth;
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
-index c69531a..36ab4e3 100644
+index 9d9044e..3d5a891 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
-@@ -62,6 +62,7 @@
+@@ -63,6 +63,7 @@
#include <linux/sched/rt.h>
#include <linux/page_owner.h>
#include <linux/kthread.h>
@@ -121606,24 +146390,7 @@ index c69531a..36ab4e3 100644
#include <asm/sections.h>
#include <asm/tlbflush.h>
-@@ -229,7 +230,6 @@ static char * const zone_names[MAX_NR_ZONES] = {
- #endif
- };
-
--static void free_compound_page(struct page *page);
- compound_page_dtor * const compound_page_dtors[] = {
- NULL,
- free_compound_page,
-@@ -457,7 +457,7 @@ out:
- * This usage means that zero-order pages may not be compound.
- */
-
--static void free_compound_page(struct page *page)
-+void free_compound_page(struct page *page)
- {
- __free_pages_ok(page, compound_order(page));
- }
-@@ -563,7 +563,7 @@ static inline void clear_page_guard(struct zone *zone, struct page *page,
+@@ -561,7 +562,7 @@ static inline void clear_page_guard(struct zone *zone, struct page *page,
__mod_zone_freepage_state(zone, (1 << order), migratetype);
}
#else
@@ -121632,7 +146399,7 @@ index c69531a..36ab4e3 100644
static inline void set_page_guard(struct zone *zone, struct page *page,
unsigned int order, int migratetype) {}
static inline void clear_page_guard(struct zone *zone, struct page *page,
-@@ -975,6 +975,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
+@@ -995,6 +996,10 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
bool compound = PageCompound(page);
int i, bad = 0;
@@ -121643,7 +146410,7 @@ index c69531a..36ab4e3 100644
VM_BUG_ON_PAGE(PageTail(page), page);
VM_BUG_ON_PAGE(compound && compound_order(page) != order, page);
-@@ -1001,6 +1005,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
+@@ -1021,6 +1026,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
debug_check_no_obj_freed(page_address(page),
PAGE_SIZE << order);
}
@@ -121656,7 +146423,7 @@ index c69531a..36ab4e3 100644
arch_free_page(page, order);
kernel_map_pages(page, 1 << order, 0);
-@@ -1023,6 +1033,20 @@ static void __free_pages_ok(struct page *page, unsigned int order)
+@@ -1043,6 +1054,20 @@ static void __free_pages_ok(struct page *page, unsigned int order)
local_irq_restore(flags);
}
@@ -121677,7 +146444,7 @@ index c69531a..36ab4e3 100644
static void __init __free_pages_boot_core(struct page *page,
unsigned long pfn, unsigned int order)
{
-@@ -1039,6 +1063,19 @@ static void __init __free_pages_boot_core(struct page *page,
+@@ -1059,6 +1084,19 @@ static void __init __free_pages_boot_core(struct page *page,
__ClearPageReserved(p);
set_page_count(p, 0);
@@ -121697,7 +146464,7 @@ index c69531a..36ab4e3 100644
page_zone(page)->managed_pages += nr_pages;
set_page_refcounted(page);
__free_pages(page, order);
-@@ -1095,7 +1132,6 @@ static inline bool __meminit meminit_pfn_in_nid(unsigned long pfn, int node,
+@@ -1115,7 +1153,6 @@ static inline bool __meminit meminit_pfn_in_nid(unsigned long pfn, int node,
}
#endif
@@ -121705,7 +146472,7 @@ index c69531a..36ab4e3 100644
void __init __free_pages_bootmem(struct page *page, unsigned long pfn,
unsigned int order)
{
-@@ -1399,9 +1435,11 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags,
+@@ -1419,9 +1456,11 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags,
kernel_map_pages(page, 1 << order, 1);
kasan_alloc_pages(page, order);
@@ -121717,7 +146484,28 @@ index c69531a..36ab4e3 100644
if (order && (gfp_flags & __GFP_COMP))
prep_compound_page(page, order);
-@@ -2270,7 +2308,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
+@@ -1955,8 +1994,9 @@ static void drain_pages(unsigned int cpu)
+ * The CPU has to be pinned. When zone parameter is non-NULL, spill just
+ * the single zone's pages.
+ */
+-void drain_local_pages(struct zone *zone)
++void drain_local_pages(void *_zone)
+ {
++ struct zone *zone = _zone;
+ int cpu = smp_processor_id();
+
+ if (zone)
+@@ -2016,8 +2056,7 @@ void drain_all_pages(struct zone *zone)
+ else
+ cpumask_clear_cpu(cpu, &cpus_with_pcps);
+ }
+- on_each_cpu_mask(&cpus_with_pcps, (smp_call_func_t) drain_local_pages,
+- zone, 1);
++ on_each_cpu_mask(&cpus_with_pcps, drain_local_pages, zone, 1);
+ }
+
+ #ifdef CONFIG_HIBERNATION
+@@ -2289,7 +2328,7 @@ struct page *buffered_rmqueue(struct zone *preferred_zone,
}
__mod_zone_page_state(zone, NR_ALLOC_BATCH, -(1 << order));
@@ -121726,7 +146514,7 @@ index c69531a..36ab4e3 100644
!test_bit(ZONE_FAIR_DEPLETED, &zone->flags))
set_bit(ZONE_FAIR_DEPLETED, &zone->flags);
-@@ -2487,7 +2525,7 @@ static void reset_alloc_batches(struct zone *preferred_zone)
+@@ -2506,7 +2545,7 @@ static void reset_alloc_batches(struct zone *preferred_zone)
do {
mod_zone_page_state(zone, NR_ALLOC_BATCH,
high_wmark_pages(zone) - low_wmark_pages(zone) -
@@ -121735,7 +146523,7 @@ index c69531a..36ab4e3 100644
clear_bit(ZONE_FAIR_DEPLETED, &zone->flags);
} while (zone++ != preferred_zone);
}
-@@ -6079,7 +6117,7 @@ static void __setup_per_zone_wmarks(void)
+@@ -6100,7 +6139,7 @@ static void __setup_per_zone_wmarks(void)
__mod_zone_page_state(zone, NR_ALLOC_BATCH,
high_wmark_pages(zone) - low_wmark_pages(zone) -
@@ -121745,7 +146533,7 @@ index c69531a..36ab4e3 100644
spin_unlock_irqrestore(&zone->lock, flags);
}
diff --git a/mm/percpu.c b/mm/percpu.c
-index 8a943b9..29d8b8d 100644
+index 998607a..4854f93 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -131,7 +131,7 @@ static unsigned int pcpu_low_unit_cpu __read_mostly;
@@ -121808,11 +146596,24 @@ index 5d453e5..4043093 100644
mm = mm_access(task, PTRACE_MODE_ATTACH_REALCREDS);
if (!mm || IS_ERR(mm)) {
rc = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH;
+diff --git a/mm/readahead.c b/mm/readahead.c
+index 20e58e8..9045cb5 100644
+--- a/mm/readahead.c
++++ b/mm/readahead.c
+@@ -80,7 +80,7 @@ static void read_cache_pages_invalidate_pages(struct address_space *mapping,
+ * Hides the details of the LRU cache etc from the filesystems.
+ */
+ int read_cache_pages(struct address_space *mapping, struct list_head *pages,
+- int (*filler)(void *, struct page *), void *data)
++ filler_t *filler, void *data)
+ {
+ struct page *page;
+ int ret = 0;
diff --git a/mm/rmap.c b/mm/rmap.c
-index b577fbb..ccd4d4e 100644
+index 79f3bf0..92c8a7e 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
-@@ -171,6 +171,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
+@@ -172,6 +172,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
struct anon_vma *anon_vma = vma->anon_vma;
struct anon_vma_chain *avc;
@@ -121823,7 +146624,7 @@ index b577fbb..ccd4d4e 100644
might_sleep();
if (unlikely(!anon_vma)) {
struct mm_struct *mm = vma->vm_mm;
-@@ -180,6 +184,12 @@ int anon_vma_prepare(struct vm_area_struct *vma)
+@@ -181,6 +185,12 @@ int anon_vma_prepare(struct vm_area_struct *vma)
if (!avc)
goto out_enomem;
@@ -121836,7 +146637,7 @@ index b577fbb..ccd4d4e 100644
anon_vma = find_mergeable_anon_vma(vma);
allocated = NULL;
if (!anon_vma) {
-@@ -193,6 +203,19 @@ int anon_vma_prepare(struct vm_area_struct *vma)
+@@ -194,6 +204,19 @@ int anon_vma_prepare(struct vm_area_struct *vma)
/* page_table_lock to protect against threads */
spin_lock(&mm->page_table_lock);
if (likely(!vma->anon_vma)) {
@@ -121856,7 +146657,7 @@ index b577fbb..ccd4d4e 100644
vma->anon_vma = anon_vma;
anon_vma_chain_link(vma, avc, anon_vma);
/* vma reference or self-parent link for new root */
-@@ -205,12 +228,24 @@ int anon_vma_prepare(struct vm_area_struct *vma)
+@@ -206,12 +229,24 @@ int anon_vma_prepare(struct vm_area_struct *vma)
if (unlikely(allocated))
put_anon_vma(allocated);
@@ -121881,7 +146682,7 @@ index b577fbb..ccd4d4e 100644
anon_vma_chain_free(avc);
out_enomem:
return -ENOMEM;
-@@ -254,7 +289,7 @@ static inline void unlock_anon_vma_root(struct anon_vma *root)
+@@ -255,7 +290,7 @@ static inline void unlock_anon_vma_root(struct anon_vma *root)
* good chance of avoiding scanning the whole hierarchy when it searches where
* page is mapped.
*/
@@ -121890,7 +146691,7 @@ index b577fbb..ccd4d4e 100644
{
struct anon_vma_chain *avc, *pavc;
struct anon_vma *root = NULL;
-@@ -308,7 +343,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
+@@ -309,7 +344,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
* the corresponding VMA in the parent process is attached to.
* Returns 0 on success, non-zero on failure.
*/
@@ -121899,21 +146700,21 @@ index b577fbb..ccd4d4e 100644
{
struct anon_vma_chain *avc;
struct anon_vma *anon_vma;
-@@ -428,8 +463,10 @@ static void anon_vma_ctor(void *data)
+@@ -429,10 +464,10 @@ static void anon_vma_ctor(void *data)
void __init anon_vma_init(void)
{
anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma),
-- 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC, anon_vma_ctor);
-- anon_vma_chain_cachep = KMEM_CACHE(anon_vma_chain, SLAB_PANIC);
-+ 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC|SLAB_NO_SANITIZE,
-+ anon_vma_ctor);
-+ anon_vma_chain_cachep = KMEM_CACHE(anon_vma_chain,
-+ SLAB_PANIC|SLAB_NO_SANITIZE);
+- 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC|SLAB_ACCOUNT,
++ 0, SLAB_DESTROY_BY_RCU|SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE,
+ anon_vma_ctor);
+ anon_vma_chain_cachep = KMEM_CACHE(anon_vma_chain,
+- SLAB_PANIC|SLAB_ACCOUNT);
++ SLAB_PANIC|SLAB_ACCOUNT|SLAB_NO_SANITIZE);
}
/*
diff --git a/mm/shmem.c b/mm/shmem.c
-index ea5a70c..4b38523 100644
+index 440e2a7..8aeebaa 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -33,7 +33,7 @@
@@ -121934,35 +146735,60 @@ index ea5a70c..4b38523 100644
/*
* shmem_fallocate communicates with shmem_fault or shmem_writepage via
-@@ -2564,6 +2564,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
- static int shmem_xattr_validate(const char *name)
- {
- struct { const char *prefix; size_t len; } arr[] = {
+@@ -2670,6 +2670,25 @@ static int shmem_xattr_handler_set(const struct xattr_handler *handler,
+ return simple_xattr_set(&info->xattrs, name, value, size, flags);
+ }
+
++#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
++static int shmem_user_xattr_handler_set(const struct xattr_handler *handler,
++ struct dentry *dentry, const char *name,
++ const void *value, size_t size, int flags)
++{
++ struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
+
+#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
-+ { XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN},
++ if (strcmp(name, XATTR_NAME_PAX_FLAGS))
++ return -EOPNOTSUPP;
++ if (size > 8)
++ return -EINVAL;
+#endif
+
- { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
- { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
- };
-@@ -2619,6 +2624,15 @@ static int shmem_setxattr(struct dentry *dentry, const char *name,
- if (err)
- return err;
++ name = xattr_full_name(handler, name);
++ return simple_xattr_set(&info->xattrs, name, value, size, flags);
++}
++#endif
++
+ static const struct xattr_handler shmem_security_xattr_handler = {
+ .prefix = XATTR_SECURITY_PREFIX,
+ .get = shmem_xattr_handler_get,
+@@ -2682,6 +2701,14 @@ static const struct xattr_handler shmem_trusted_xattr_handler = {
+ .set = shmem_xattr_handler_set,
+ };
+#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
-+ if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) {
-+ if (strcmp(name, XATTR_NAME_PAX_FLAGS))
-+ return -EOPNOTSUPP;
-+ if (size > 8)
-+ return -EINVAL;
-+ }
++static const struct xattr_handler shmem_user_xattr_handler = {
++ .prefix = XATTR_USER_PREFIX,
++ .get = shmem_xattr_handler_get,
++ .set = shmem_user_xattr_handler_set,
++};
+#endif
+
- return simple_xattr_set(&info->xattrs, name, value, size, flags);
- }
+ static const struct xattr_handler *shmem_xattr_handlers[] = {
+ #ifdef CONFIG_TMPFS_POSIX_ACL
+ &posix_acl_access_xattr_handler,
+@@ -2689,6 +2716,11 @@ static const struct xattr_handler *shmem_xattr_handlers[] = {
+ #endif
+ &shmem_security_xattr_handler,
+ &shmem_trusted_xattr_handler,
++
++#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
++ &shmem_user_xattr_handler,
++#endif
++
+ NULL
+ };
-@@ -3002,8 +3016,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
+@@ -3051,8 +3083,7 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
int err = -ENOMEM;
/* Round up to L1_CACHE_BYTES to resist false sharing */
@@ -121973,7 +146799,7 @@ index ea5a70c..4b38523 100644
return -ENOMEM;
diff --git a/mm/slab.c b/mm/slab.c
-index 4765c97..26f5c11 100644
+index 621fbcb..272a1f3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -116,6 +116,7 @@
@@ -122046,7 +146872,7 @@ index 4765c97..26f5c11 100644
/*
* Adjust the object sizes so that we clear
-@@ -3369,6 +3374,20 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
+@@ -3367,6 +3372,20 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
struct array_cache *ac = cpu_cache_get(cachep);
check_irq_off();
@@ -122067,7 +146893,7 @@ index 4765c97..26f5c11 100644
kmemleak_free_recursive(objp, cachep->flags);
objp = cache_free_debugcheck(cachep, objp, caller);
-@@ -3494,7 +3513,7 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)
+@@ -3492,7 +3511,7 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, unsigned long caller)
return kmem_cache_alloc_node_trace(cachep, flags, node, size);
}
@@ -122076,7 +146902,7 @@ index 4765c97..26f5c11 100644
{
return __do_kmalloc_node(size, flags, node, _RET_IP_);
}
-@@ -3514,7 +3533,7 @@ EXPORT_SYMBOL(__kmalloc_node_track_caller);
+@@ -3512,7 +3531,7 @@ EXPORT_SYMBOL(__kmalloc_node_track_caller);
* @flags: the type of memory to allocate (see kmalloc).
* @caller: function caller for debug tracking of the caller
*/
@@ -122085,7 +146911,7 @@ index 4765c97..26f5c11 100644
unsigned long caller)
{
struct kmem_cache *cachep;
-@@ -3587,6 +3606,7 @@ void kfree(const void *objp)
+@@ -3585,6 +3604,7 @@ void kfree(const void *objp)
if (unlikely(ZERO_OR_NULL_PTR(objp)))
return;
@@ -122093,7 +146919,7 @@ index 4765c97..26f5c11 100644
local_irq_save(flags);
kfree_debugcheck(objp);
c = virt_to_cache(objp);
-@@ -4006,14 +4026,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
+@@ -4004,14 +4024,22 @@ void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *cachep)
}
/* cpu stats */
{
@@ -122120,7 +146946,7 @@ index 4765c97..26f5c11 100644
#endif
}
-@@ -4221,13 +4249,80 @@ static const struct file_operations proc_slabstats_operations = {
+@@ -4219,13 +4247,80 @@ static const struct file_operations proc_slabstats_operations = {
static int __init slab_proc_init(void)
{
#ifdef CONFIG_DEBUG_SLAB_LEAK
@@ -122203,7 +147029,7 @@ index 4765c97..26f5c11 100644
* ksize - get the actual amount of memory allocated for a given object
* @objp: Pointer to the object
diff --git a/mm/slab.h b/mm/slab.h
-index 7b60871..dd645ce1 100644
+index 2eedace..cd94091 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -22,7 +22,7 @@ struct kmem_cache {
@@ -122246,7 +147072,7 @@ index 7b60871..dd645ce1 100644
#if defined(CONFIG_DEBUG_SLAB)
#define SLAB_DEBUG_FLAGS (SLAB_RED_ZONE | SLAB_POISON | SLAB_STORE_USER)
-@@ -309,6 +324,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
+@@ -311,6 +326,9 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
return s;
page = virt_to_head_page(x);
@@ -122257,7 +147083,7 @@ index 7b60871..dd645ce1 100644
if (slab_equal_or_root(cachep, s))
return cachep;
diff --git a/mm/slab_common.c b/mm/slab_common.c
-index 3c6a86b..f143a66 100644
+index 065b7bd..3c2c410 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -25,11 +25,35 @@
@@ -122297,7 +147123,7 @@ index 3c6a86b..f143a66 100644
/*
* Set of flags that will prevent slab merging
*/
-@@ -43,7 +67,7 @@ struct kmem_cache *kmem_cache;
+@@ -44,7 +68,7 @@ struct kmem_cache *kmem_cache;
* Merge control. If this is set then no merging of slab caches will occur.
* (Could be removed. This was introduced to pacify the merge skeptics.)
*/
@@ -122306,7 +147132,7 @@ index 3c6a86b..f143a66 100644
static int __init setup_slab_nomerge(char *str)
{
-@@ -239,7 +263,7 @@ int slab_unmergeable(struct kmem_cache *s)
+@@ -240,7 +264,7 @@ int slab_unmergeable(struct kmem_cache *s)
/*
* We may have set a slab to be unmergeable during bootstrap.
*/
@@ -122315,7 +147141,7 @@ index 3c6a86b..f143a66 100644
return 1;
return 0;
-@@ -343,7 +367,7 @@ static struct kmem_cache *create_cache(const char *name,
+@@ -344,7 +368,7 @@ static struct kmem_cache *create_cache(const char *name,
if (err)
goto out_free_cache;
@@ -122324,7 +147150,7 @@ index 3c6a86b..f143a66 100644
list_add(&s->list, &slab_caches);
out:
if (err)
-@@ -407,6 +431,13 @@ kmem_cache_create(const char *name, size_t size, size_t align,
+@@ -408,6 +432,13 @@ kmem_cache_create(const char *name, size_t size, size_t align,
*/
flags &= CACHE_CREATE_MASK;
@@ -122338,7 +147164,7 @@ index 3c6a86b..f143a66 100644
s = __kmem_cache_alias(name, size, align, flags, ctor);
if (s)
goto out_unlock;
-@@ -468,7 +499,7 @@ static void release_caches(struct list_head *release, bool need_rcu_barrier)
+@@ -469,7 +500,7 @@ static void release_caches(struct list_head *release, bool need_rcu_barrier)
rcu_barrier();
list_for_each_entry_safe(s, s2, release, list) {
@@ -122347,7 +147173,7 @@ index 3c6a86b..f143a66 100644
sysfs_slab_remove(s);
#else
slab_kmem_cache_release(s);
-@@ -711,8 +742,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
+@@ -713,8 +744,7 @@ void kmem_cache_destroy(struct kmem_cache *s)
mutex_lock(&slab_mutex);
@@ -122357,7 +147183,7 @@ index 3c6a86b..f143a66 100644
goto out_unlock;
err = shutdown_memcg_caches(s, &release, &need_rcu_barrier);
-@@ -778,7 +808,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz
+@@ -780,7 +810,7 @@ void __init create_boot_cache(struct kmem_cache *s, const char *name, size_t siz
panic("Creation of kmalloc slab %s size=%zu failed. Reason %d\n",
name, size, err);
@@ -122366,7 +147192,7 @@ index 3c6a86b..f143a66 100644
}
struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
-@@ -791,7 +821,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
+@@ -793,7 +823,7 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, size_t size,
create_boot_cache(s, name, size, flags);
list_add(&s->list, &slab_caches);
@@ -122375,7 +147201,7 @@ index 3c6a86b..f143a66 100644
return s;
}
-@@ -803,6 +833,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
+@@ -805,6 +835,11 @@ struct kmem_cache *kmalloc_dma_caches[KMALLOC_SHIFT_HIGH + 1];
EXPORT_SYMBOL(kmalloc_dma_caches);
#endif
@@ -122387,7 +147213,7 @@ index 3c6a86b..f143a66 100644
/*
* Conversion table for small slabs sizes / 8 to the index in the
* kmalloc array. This is necessary for slabs < 192 since we have non power
-@@ -867,6 +902,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
+@@ -869,6 +904,13 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
return kmalloc_dma_caches[index];
#endif
@@ -122401,7 +147227,7 @@ index 3c6a86b..f143a66 100644
return kmalloc_caches[index];
}
-@@ -959,7 +1001,7 @@ void __init create_kmalloc_caches(unsigned long flags)
+@@ -961,7 +1003,7 @@ void __init create_kmalloc_caches(unsigned long flags)
for (i = KMALLOC_SHIFT_LOW; i <= KMALLOC_SHIFT_HIGH; i++) {
if (!kmalloc_caches[i])
@@ -122410,7 +147236,7 @@ index 3c6a86b..f143a66 100644
/*
* Caches that are not of the two-to-the-power-of size.
-@@ -967,9 +1009,9 @@ void __init create_kmalloc_caches(unsigned long flags)
+@@ -969,9 +1011,9 @@ void __init create_kmalloc_caches(unsigned long flags)
* earlier power of two caches
*/
if (KMALLOC_MIN_SIZE <= 32 && !kmalloc_caches[1] && i == 6)
@@ -122422,7 +147248,7 @@ index 3c6a86b..f143a66 100644
}
/* Kmalloc array is now usable */
-@@ -990,6 +1032,23 @@ void __init create_kmalloc_caches(unsigned long flags)
+@@ -992,6 +1034,23 @@ void __init create_kmalloc_caches(unsigned long flags)
}
}
#endif
@@ -122446,7 +147272,7 @@ index 3c6a86b..f143a66 100644
}
#endif /* !CONFIG_SLOB */
-@@ -1049,6 +1108,9 @@ static void print_slabinfo_header(struct seq_file *m)
+@@ -1051,6 +1110,9 @@ static void print_slabinfo_header(struct seq_file *m)
seq_puts(m, " : globalstat <listallocs> <maxobjs> <grown> <reaped> "
"<error> <maxfreeable> <nodeallocs> <remotefrees> <alienoverflow>");
seq_puts(m, " : cpustat <allochit> <allocmiss> <freehit> <freemiss>");
@@ -122456,7 +147282,7 @@ index 3c6a86b..f143a66 100644
#endif
seq_putc(m, '\n');
}
-@@ -1178,7 +1240,7 @@ static int __init slab_proc_init(void)
+@@ -1180,7 +1242,7 @@ static int __init slab_proc_init(void)
module_init(slab_proc_init);
#endif /* CONFIG_SLABINFO */
@@ -122466,7 +147292,7 @@ index 3c6a86b..f143a66 100644
{
void *ret;
diff --git a/mm/slob.c b/mm/slob.c
-index 17e8f8c..56d3370 100644
+index 5ec1580..017a002 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -67,6 +67,7 @@
@@ -122889,7 +147715,7 @@ index 17e8f8c..56d3370 100644
EXPORT_SYMBOL(kmem_cache_free);
diff --git a/mm/slub.c b/mm/slub.c
-index 4699751..bb1f0cf 100644
+index d8fbd4a..f864712 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -34,6 +34,7 @@
@@ -122909,7 +147735,7 @@ index 4699751..bb1f0cf 100644
static int sysfs_slab_add(struct kmem_cache *);
static int sysfs_slab_alias(struct kmem_cache *, const char *);
static void memcg_propagate_slab_attrs(struct kmem_cache *s);
-@@ -558,7 +559,7 @@ static void print_track(const char *s, struct track *t)
+@@ -560,7 +561,7 @@ static void print_track(const char *s, struct track *t)
if (!t->addr)
return;
@@ -122918,7 +147744,7 @@ index 4699751..bb1f0cf 100644
s, (void *)t->addr, jiffies - t->when, t->cpu, t->pid);
#ifdef CONFIG_STACKTRACE
{
-@@ -2771,6 +2772,21 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page,
+@@ -2767,6 +2768,21 @@ static __always_inline void slab_free(struct kmem_cache *s, struct page *page,
slab_free_freelist_hook(s, head, tail);
@@ -122940,7 +147766,7 @@ index 4699751..bb1f0cf 100644
redo:
/*
* Determine the currently cpus per cpu slab.
-@@ -3262,6 +3278,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
+@@ -3264,6 +3280,9 @@ static int calculate_sizes(struct kmem_cache *s, int forced_order)
s->inuse = size;
if (((flags & (SLAB_DESTROY_BY_RCU | SLAB_POISON)) ||
@@ -122950,7 +147776,7 @@ index 4699751..bb1f0cf 100644
s->ctor)) {
/*
* Relocate free pointer after the object if it is not
-@@ -3516,7 +3535,7 @@ static int __init setup_slub_min_objects(char *str)
+@@ -3514,7 +3533,7 @@ static int __init setup_slub_min_objects(char *str)
__setup("slub_min_objects=", setup_slub_min_objects);
@@ -122959,7 +147785,7 @@ index 4699751..bb1f0cf 100644
{
struct kmem_cache *s;
void *ret;
-@@ -3554,7 +3573,7 @@ static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
+@@ -3552,7 +3571,7 @@ static void *kmalloc_large_node(size_t size, gfp_t flags, int node)
return ptr;
}
@@ -122968,7 +147794,7 @@ index 4699751..bb1f0cf 100644
{
struct kmem_cache *s;
void *ret;
-@@ -3602,6 +3621,70 @@ static size_t __ksize(const void *object)
+@@ -3600,6 +3619,70 @@ static size_t __ksize(const void *object)
return slab_ksize(page->slab_cache);
}
@@ -123039,7 +147865,7 @@ index 4699751..bb1f0cf 100644
size_t ksize(const void *object)
{
size_t size = __ksize(object);
-@@ -3622,6 +3705,7 @@ void kfree(const void *x)
+@@ -3620,6 +3703,7 @@ void kfree(const void *x)
if (unlikely(ZERO_OR_NULL_PTR(x)))
return;
@@ -123047,7 +147873,7 @@ index 4699751..bb1f0cf 100644
page = virt_to_head_page(x);
if (unlikely(!PageSlab(page))) {
BUG_ON(!PageCompound(page));
-@@ -3939,7 +4023,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
+@@ -3937,7 +4021,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
s = find_mergeable(size, align, flags, name, ctor);
if (s) {
@@ -123056,7 +147882,7 @@ index 4699751..bb1f0cf 100644
/*
* Adjust the object sizes so that we clear
-@@ -3955,7 +4039,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
+@@ -3953,7 +4037,7 @@ __kmem_cache_alias(const char *name, size_t size, size_t align,
}
if (sysfs_slab_alias(s, name)) {
@@ -123065,7 +147891,7 @@ index 4699751..bb1f0cf 100644
s = NULL;
}
}
-@@ -4072,7 +4156,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
+@@ -4070,7 +4154,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
}
#endif
@@ -123074,7 +147900,7 @@ index 4699751..bb1f0cf 100644
static int count_inuse(struct page *page)
{
return page->inuse;
-@@ -4353,7 +4437,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
+@@ -4351,7 +4435,11 @@ static int list_locations(struct kmem_cache *s, char *buf,
len += sprintf(buf + len, "%7ld ", l->count);
if (l->addr)
@@ -123086,7 +147912,7 @@ index 4699751..bb1f0cf 100644
else
len += sprintf(buf + len, "<not-available>");
-@@ -4451,12 +4539,12 @@ static void __init resiliency_test(void)
+@@ -4449,12 +4537,12 @@ static void __init resiliency_test(void)
validate_slab_cache(kmalloc_caches[9]);
}
#else
@@ -123101,7 +147927,7 @@ index 4699751..bb1f0cf 100644
enum slab_stat_type {
SL_ALL, /* All slabs */
SL_PARTIAL, /* Only partially allocated slabs */
-@@ -4693,13 +4781,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
+@@ -4691,13 +4779,17 @@ static ssize_t ctor_show(struct kmem_cache *s, char *buf)
{
if (!s->ctor)
return 0;
@@ -123120,7 +147946,7 @@ index 4699751..bb1f0cf 100644
}
SLAB_ATTR_RO(aliases);
-@@ -4787,6 +4879,22 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
+@@ -4785,6 +4877,22 @@ static ssize_t cache_dma_show(struct kmem_cache *s, char *buf)
SLAB_ATTR_RO(cache_dma);
#endif
@@ -123143,7 +147969,7 @@ index 4699751..bb1f0cf 100644
static ssize_t destroy_by_rcu_show(struct kmem_cache *s, char *buf)
{
return sprintf(buf, "%d\n", !!(s->flags & SLAB_DESTROY_BY_RCU));
-@@ -4842,7 +4950,7 @@ static ssize_t trace_store(struct kmem_cache *s, const char *buf,
+@@ -4840,7 +4948,7 @@ static ssize_t trace_store(struct kmem_cache *s, const char *buf,
* as well as cause other issues like converting a mergeable
* cache into an umergeable one.
*/
@@ -123152,7 +147978,7 @@ index 4699751..bb1f0cf 100644
return -EINVAL;
s->flags &= ~SLAB_TRACE;
-@@ -4962,7 +5070,7 @@ static ssize_t failslab_show(struct kmem_cache *s, char *buf)
+@@ -4960,7 +5068,7 @@ static ssize_t failslab_show(struct kmem_cache *s, char *buf)
static ssize_t failslab_store(struct kmem_cache *s, const char *buf,
size_t length)
{
@@ -123161,7 +147987,7 @@ index 4699751..bb1f0cf 100644
return -EINVAL;
s->flags &= ~SLAB_FAILSLAB;
-@@ -5094,7 +5202,7 @@ STAT_ATTR(CPU_PARTIAL_NODE, cpu_partial_node);
+@@ -5092,7 +5200,7 @@ STAT_ATTR(CPU_PARTIAL_NODE, cpu_partial_node);
STAT_ATTR(CPU_PARTIAL_DRAIN, cpu_partial_drain);
#endif
@@ -123170,7 +147996,7 @@ index 4699751..bb1f0cf 100644
&slab_size_attr.attr,
&object_size_attr.attr,
&objs_per_slab_attr.attr,
-@@ -5129,6 +5237,12 @@ static struct attribute *slab_attrs[] = {
+@@ -5127,6 +5235,12 @@ static struct attribute *slab_attrs[] = {
#ifdef CONFIG_ZONE_DMA
&cache_dma_attr.attr,
#endif
@@ -123216,10 +148042,10 @@ index 4699751..bb1f0cf 100644
static int __init slab_sysfs_init(void)
{
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
-index 4cba9c2..b4f9fcc 100644
+index b60802b..0a05e3c 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
-@@ -131,7 +131,7 @@ pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node)
+@@ -203,7 +203,7 @@ pud_t * __meminit vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node)
void *p = vmemmap_alloc_block(PAGE_SIZE, node);
if (!p)
return NULL;
@@ -123228,7 +148054,7 @@ index 4cba9c2..b4f9fcc 100644
}
return pud;
}
-@@ -143,7 +143,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)
+@@ -215,7 +215,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)
void *p = vmemmap_alloc_block(PAGE_SIZE, node);
if (!p)
return NULL;
@@ -123238,12 +148064,12 @@ index 4cba9c2..b4f9fcc 100644
return pgd;
}
diff --git a/mm/sparse.c b/mm/sparse.c
-index d1b48b6..6e8590e 100644
+index 3717cee..7ee2c16 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -750,7 +750,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages)
- for (i = 0; i < PAGES_PER_SECTION; i++) {
+ for (i = 0; i < nr_pages; i++) {
if (PageHWPoison(&memmap[i])) {
- atomic_long_sub(1, &num_poisoned_pages);
+ atomic_long_sub_unchecked(1, &num_poisoned_pages);
@@ -123251,20 +148077,25 @@ index d1b48b6..6e8590e 100644
}
}
diff --git a/mm/swap.c b/mm/swap.c
-index 39395fb..addaf53 100644
+index 09fe5e9..be5ad5b 100644
--- a/mm/swap.c
+++ b/mm/swap.c
-@@ -86,6 +86,8 @@ static void __put_compound_page(struct page *page)
+@@ -88,6 +88,13 @@ static void __put_compound_page(struct page *page)
if (!PageHuge(page))
__page_cache_release(page);
dtor = get_compound_page_dtor(page);
+ if (!PageHuge(page))
-+ BUG_ON(dtor != free_compound_page);
++ BUG_ON(dtor != free_compound_page
++#ifdef CONFIG_TRANSPARENT_HUGEPAGE
++ && dtor != free_transhuge_page
++#endif
++ );
++
(*dtor)(page);
}
diff --git a/mm/swapfile.c b/mm/swapfile.c
-index 5887731..e23a30e 100644
+index d2c3736..bf79426 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -84,7 +84,7 @@ static DEFINE_MUTEX(swapon_mutex);
@@ -123276,7 +148107,7 @@ index 5887731..e23a30e 100644
static inline unsigned char swap_count(unsigned char ent)
{
-@@ -1986,7 +1986,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
+@@ -1972,7 +1972,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
spin_unlock(&swap_lock);
err = 0;
@@ -123285,7 +148116,7 @@ index 5887731..e23a30e 100644
wake_up_interruptible(&proc_poll_wait);
out_dput:
-@@ -2003,8 +2003,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
+@@ -1989,8 +1989,8 @@ static unsigned swaps_poll(struct file *file, poll_table *wait)
poll_wait(file, &proc_poll_wait, wait);
@@ -123296,7 +148127,7 @@ index 5887731..e23a30e 100644
return POLLIN | POLLRDNORM | POLLERR | POLLPRI;
}
-@@ -2102,7 +2102,7 @@ static int swaps_open(struct inode *inode, struct file *file)
+@@ -2088,7 +2088,7 @@ static int swaps_open(struct inode *inode, struct file *file)
return ret;
seq = file->private_data;
@@ -123305,7 +148136,7 @@ index 5887731..e23a30e 100644
return 0;
}
-@@ -2551,7 +2551,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
+@@ -2537,7 +2537,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
(frontswap_map) ? "FS" : "");
mutex_unlock(&swapon_mutex);
@@ -123315,10 +148146,10 @@ index 5887731..e23a30e 100644
if (S_ISREG(inode->i_mode))
diff --git a/mm/util.c b/mm/util.c
-index 9af1c12..d58f645 100644
+index 4fb14ca..bb377d3 100644
--- a/mm/util.c
+++ b/mm/util.c
-@@ -233,6 +233,12 @@ struct task_struct *task_of_stack(struct task_struct *task,
+@@ -239,6 +239,12 @@ int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t)
void arch_pick_mmap_layout(struct mm_struct *mm)
{
mm->mmap_base = TASK_UNMAPPED_BASE;
@@ -123331,18 +148162,18 @@ index 9af1c12..d58f645 100644
mm->get_unmapped_area = arch_get_unmapped_area;
}
#endif
-@@ -434,6 +440,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
+@@ -457,6 +463,9 @@ int get_cmdline(struct task_struct *task, char *buffer, int buflen)
if (!mm->arg_end)
goto out_mm; /* Shh! No looking before we're done */
+ if (gr_acl_handle_procpidmem(task))
+ goto out_mm;
+
- len = mm->arg_end - mm->arg_start;
-
- if (len > buflen)
+ down_read(&mm->mmap_sem);
+ arg_start = mm->arg_start;
+ arg_end = mm->arg_end;
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
-index 8e3c9c5..a4b63af 100644
+index fb42a5b..3f4666e 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -42,20 +42,65 @@ struct vfree_deferred {
@@ -123527,7 +148358,7 @@ index 8e3c9c5..a4b63af 100644
unsigned long align,
unsigned long vstart, unsigned long vend,
int node, gfp_t gfp_mask)
-@@ -1204,13 +1287,27 @@ void __init vmalloc_init(void)
+@@ -1203,13 +1286,27 @@ void __init vmalloc_init(void)
for_each_possible_cpu(i) {
struct vmap_block_queue *vbq;
struct vfree_deferred *p;
@@ -123556,7 +148387,7 @@ index 8e3c9c5..a4b63af 100644
}
/* Import existing vmlist entries. */
-@@ -1335,6 +1432,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
+@@ -1334,6 +1431,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
struct vm_struct *area;
BUG_ON(in_interrupt());
@@ -123573,7 +148404,7 @@ index 8e3c9c5..a4b63af 100644
if (flags & VM_IOREMAP)
align = 1ul << clamp_t(int, fls_long(size),
PAGE_SHIFT, IOREMAP_MAX_ORDER);
-@@ -1347,7 +1454,9 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
+@@ -1346,7 +1453,9 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
if (unlikely(!area))
return NULL;
@@ -123583,7 +148414,7 @@ index 8e3c9c5..a4b63af 100644
size += PAGE_SIZE;
va = alloc_vmap_area(size, align, start, end, node, gfp_mask);
-@@ -1532,13 +1641,36 @@ EXPORT_SYMBOL(vfree);
+@@ -1528,13 +1637,36 @@ EXPORT_SYMBOL(vfree);
*/
void vunmap(const void *addr)
{
@@ -123623,7 +148454,7 @@ index 8e3c9c5..a4b63af 100644
/**
* vmap - map an array of pages into virtually contiguous space
* @pages: array of page pointers
-@@ -1559,6 +1691,11 @@ void *vmap(struct page **pages, unsigned int count,
+@@ -1555,6 +1687,11 @@ void *vmap(struct page **pages, unsigned int count,
if (count > totalram_pages)
return NULL;
@@ -123635,7 +148466,7 @@ index 8e3c9c5..a4b63af 100644
area = get_vm_area_caller((count << PAGE_SHIFT), flags,
__builtin_return_address(0));
if (!area)
-@@ -1663,6 +1800,14 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
+@@ -1658,6 +1795,14 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
if (!size || (size >> PAGE_SHIFT) > totalram_pages)
goto fail;
@@ -123650,7 +148481,7 @@ index 8e3c9c5..a4b63af 100644
area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNINITIALIZED |
vm_flags, start, end, node, gfp_mask, caller);
if (!area)
-@@ -1716,6 +1861,14 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
+@@ -1711,6 +1856,14 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
gfp_mask, prot, 0, node, caller);
}
@@ -123665,7 +148496,7 @@ index 8e3c9c5..a4b63af 100644
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
{
return __vmalloc_node(size, 1, gfp_mask, prot, NUMA_NO_NODE,
-@@ -1839,10 +1992,9 @@ EXPORT_SYMBOL(vzalloc_node);
+@@ -1834,10 +1987,9 @@ EXPORT_SYMBOL(vzalloc_node);
* For tight control over page level allocator and protection flags
* use __vmalloc() instead.
*/
@@ -123677,7 +148508,7 @@ index 8e3c9c5..a4b63af 100644
NUMA_NO_NODE, __builtin_return_address(0));
}
-@@ -2149,6 +2301,8 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr,
+@@ -2144,6 +2296,8 @@ int remap_vmalloc_range_partial(struct vm_area_struct *vma, unsigned long uaddr,
{
struct vm_struct *area;
@@ -123686,7 +148517,16 @@ index 8e3c9c5..a4b63af 100644
size = PAGE_ALIGN(size);
if (!PAGE_ALIGNED(uaddr) || !PAGE_ALIGNED(kaddr))
-@@ -2631,7 +2785,11 @@ static int s_show(struct seq_file *m, void *p)
+@@ -2513,7 +2667,7 @@ found:
+ /* insert all vm's */
+ for (area = 0; area < nr_vms; area++)
+ setup_vmalloc_vm(vms[area], vas[area], VM_ALLOC,
+- pcpu_get_vm_areas);
++ __builtin_return_address(0));
+
+ kfree(vas);
+ return vms;
+@@ -2626,7 +2780,11 @@ static int s_show(struct seq_file *m, void *p)
v->addr, v->addr + v->size, v->size);
if (v->caller)
@@ -123699,7 +148539,7 @@ index 8e3c9c5..a4b63af 100644
if (v->nr_pages)
seq_printf(m, " pages=%d", v->nr_pages);
diff --git a/mm/vmstat.c b/mm/vmstat.c
-index c54fd29..c37890c 100644
+index 084c672..50f9c10 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -27,6 +27,7 @@
@@ -123728,7 +148568,7 @@ index c54fd29..c37890c 100644
changes++;
}
return changes;
-@@ -476,7 +477,7 @@ static int refresh_cpu_vm_stats(void)
+@@ -476,7 +477,7 @@ static int refresh_cpu_vm_stats(bool do_pagesets)
v = this_cpu_xchg(p->vm_stat_diff[i], 0);
if (v) {
@@ -123737,7 +148577,7 @@ index c54fd29..c37890c 100644
global_diff[i] += v;
#ifdef CONFIG_NUMA
/* 3 seconds idle till flush */
-@@ -540,7 +541,7 @@ void cpu_vm_stats_fold(int cpu)
+@@ -542,7 +543,7 @@ void cpu_vm_stats_fold(int cpu)
v = p->vm_stat_diff[i];
p->vm_stat_diff[i] = 0;
@@ -123746,7 +148586,7 @@ index c54fd29..c37890c 100644
global_diff[i] += v;
}
}
-@@ -560,8 +561,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
+@@ -562,8 +563,8 @@ void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
if (pset->vm_stat_diff[i]) {
int v = pset->vm_stat_diff[i];
pset->vm_stat_diff[i] = 0;
@@ -123757,7 +148597,7 @@ index c54fd29..c37890c 100644
}
}
#endif
-@@ -1315,10 +1316,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
+@@ -1320,10 +1321,22 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
stat_items_size += sizeof(struct vm_event_state);
#endif
@@ -123781,7 +148621,7 @@ index c54fd29..c37890c 100644
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
v[i] = global_page_state(i);
v += NR_VM_ZONE_STAT_ITEMS;
-@@ -1553,10 +1566,16 @@ static int __init setup_vmstat(void)
+@@ -1589,10 +1602,16 @@ static int __init setup_vmstat(void)
cpu_notifier_register_done();
#endif
#ifdef CONFIG_PROC_FS
@@ -123861,10 +148701,10 @@ index 6ab36ae..6f1841b 100644
}
EXPORT_SYMBOL(v9fs_unregister_trans);
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
-index bced8c0..ef253b7 100644
+index 7bc2208..79c8068 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
-@@ -428,7 +428,7 @@ static int p9_fd_write(struct p9_client *client, void *v, int len)
+@@ -432,7 +432,7 @@ static int p9_fd_write(struct p9_client *client, void *v, int len)
oldfs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
@@ -123957,13 +148797,13 @@ index 4149db1..f2ab682 100644
/*
* ATM LAN Emulation supports both LLC & Dix Ethernet EtherType
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
-index d1b2d9a..d549f7f 100644
+index 9e60e74..a89fdeb 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
-@@ -535,30 +535,30 @@ static void eg_destroy_cache(struct mpoa_client *mpc)
+@@ -535,33 +535,32 @@ static void eg_destroy_cache(struct mpoa_client *mpc)
- static struct in_cache_ops ingress_ops = {
+ static const struct in_cache_ops ingress_ops = {
- in_cache_add_entry, /* add_entry */
- in_cache_get, /* get */
- in_cache_get_with_mask, /* get_with_mask */
@@ -123988,7 +148828,7 @@ index d1b2d9a..d549f7f 100644
+ .destroy_cache = in_destroy_cache
};
- static struct eg_cache_ops egress_ops = {
+ static const struct eg_cache_ops egress_ops = {
- eg_cache_add_entry, /* add_entry */
- eg_cache_get_by_cache_id, /* get_by_cache_id */
- eg_cache_get_by_tag, /* get_by_tag */
@@ -124011,7 +148851,10 @@ index d1b2d9a..d549f7f 100644
+ .destroy_cache = eg_destroy_cache
};
-
+-
+ void atm_mpoa_init_cache(struct mpoa_client *mpc)
+ {
+ mpc->in_ops = &ingress_ops;
diff --git a/net/atm/proc.c b/net/atm/proc.c
index bbb6461..cf04016 100644
--- a/net/atm/proc.c
@@ -124065,10 +148908,10 @@ index 919a5ce..cc6b444 100644
table = kmemdup(ax25_param_table, sizeof(ax25_param_table), GFP_KERNEL);
if (!table)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
-index 912d9c3..2494d1e 100644
+index df625de..1ecaa3d 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
-@@ -316,7 +316,7 @@ static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface)
+@@ -318,7 +318,7 @@ static int batadv_iv_ogm_iface_enable(struct batadv_hard_iface *hard_iface)
/* randomize initial seqno to avoid collision */
get_random_bytes(&random_seqno, sizeof(random_seqno));
@@ -124077,7 +148920,7 @@ index 912d9c3..2494d1e 100644
hard_iface->bat_iv.ogm_buff_len = BATADV_OGM_HLEN;
ogm_buff = kmalloc(hard_iface->bat_iv.ogm_buff_len, GFP_ATOMIC);
-@@ -919,9 +919,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
+@@ -918,9 +918,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
batadv_ogm_packet->tvlv_len = htons(tvlv_len);
/* change sequence number to network order */
@@ -124089,7 +148932,7 @@ index 912d9c3..2494d1e 100644
batadv_iv_ogm_slide_own_bcast_window(hard_iface);
-@@ -1600,7 +1600,7 @@ static void batadv_iv_ogm_process(const struct sk_buff *skb, int ogm_offset,
+@@ -1609,7 +1609,7 @@ static void batadv_iv_ogm_process(const struct sk_buff *skb, int ogm_offset,
return;
/* could be changed by schedule_own_packet() */
@@ -124099,7 +148942,7 @@ index 912d9c3..2494d1e 100644
if (ogm_packet->flags & BATADV_DIRECTLINK)
has_directlink_flag = true;
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
-index 700c96c..637df49 100644
+index 20d9282..c575313 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -468,7 +468,7 @@ bool batadv_frag_send_packet(struct sk_buff *skb,
@@ -124112,7 +148955,7 @@ index 700c96c..637df49 100644
frag_header.no = 0;
frag_header.total_size = htons(skb->len);
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
-index 3207667..c281989 100644
+index e4f2646..68a6e61 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -665,7 +665,7 @@ batadv_reroute_unicast_packet(struct batadv_priv *bat_priv,
@@ -124134,9 +148977,18 @@ index 3207667..c281989 100644
orig_node = batadv_orig_hash_find(bat_priv,
unicast_packet->dest);
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
-index ac4d08d..76780fe 100644
+index ac4d08d..482d3a0 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
+@@ -178,7 +178,7 @@ static void batadv_interface_set_rx_mode(struct net_device *dev)
+ {
+ }
+
+-static int batadv_interface_tx(struct sk_buff *skb,
++static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
+ struct net_device *soft_iface)
+ {
+ struct ethhdr *ethhdr;
@@ -330,7 +330,7 @@ send:
primary_if->net_dev->dev_addr);
@@ -124175,11 +149027,206 @@ index ac4d08d..76780fe 100644
.kind = "batadv",
.priv_size = sizeof(struct batadv_priv),
.setup = batadv_softif_init_early,
+diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c
+index fe87777..d115a3a 100644
+--- a/net/batman-adv/sysfs.c
++++ b/net/batman-adv/sysfs.c
+@@ -141,7 +141,7 @@ struct batadv_attribute batadv_attr_##_name = { \
+
+ #define BATADV_ATTR_SIF_STORE_BOOL(_name, _post_func) \
+ ssize_t batadv_store_##_name(struct kobject *kobj, \
+- struct attribute *attr, char *buff, \
++ struct kobj_attribute *attr, char *buff, \
+ size_t count) \
+ { \
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
+@@ -153,7 +153,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \
+
+ #define BATADV_ATTR_SIF_SHOW_BOOL(_name) \
+ ssize_t batadv_show_##_name(struct kobject *kobj, \
+- struct attribute *attr, char *buff) \
++ struct kobj_attribute *attr, char *buff) \
+ { \
+ struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
+ \
+@@ -173,7 +173,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
+
+ #define BATADV_ATTR_SIF_STORE_UINT(_name, _var, _min, _max, _post_func) \
+ ssize_t batadv_store_##_name(struct kobject *kobj, \
+- struct attribute *attr, char *buff, \
++ struct kobj_attribute *attr, char *buff, \
+ size_t count) \
+ { \
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \
+@@ -186,7 +186,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \
+
+ #define BATADV_ATTR_SIF_SHOW_UINT(_name, _var) \
+ ssize_t batadv_show_##_name(struct kobject *kobj, \
+- struct attribute *attr, char *buff) \
++ struct kobj_attribute *attr, char *buff) \
+ { \
+ struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \
+ \
+@@ -204,7 +204,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \
+
+ #define BATADV_ATTR_VLAN_STORE_BOOL(_name, _post_func) \
+ ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \
+- struct attribute *attr, char *buff, \
++ struct kobj_attribute *attr, char *buff,\
+ size_t count) \
+ { \
+ struct batadv_priv *bat_priv = batadv_vlan_kobj_to_batpriv(kobj);\
+@@ -220,7 +220,7 @@ ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \
+
+ #define BATADV_ATTR_VLAN_SHOW_BOOL(_name) \
+ ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \
+- struct attribute *attr, char *buff) \
++ struct kobj_attribute *attr, char *buff)\
+ { \
+ struct batadv_priv *bat_priv = batadv_vlan_kobj_to_batpriv(kobj);\
+ struct batadv_softif_vlan *vlan = batadv_kobj_to_vlan(bat_priv, \
+@@ -284,13 +284,13 @@ static int batadv_store_bool_attr(char *buff, size_t count,
+ static inline ssize_t
+ __batadv_store_bool_attr(char *buff, size_t count,
+ void (*post_func)(struct net_device *),
+- struct attribute *attr,
++ struct kobj_attribute *attr,
+ atomic_t *attr_store, struct net_device *net_dev)
+ {
+ bool changed;
+ int ret;
+
+- ret = batadv_store_bool_attr(buff, count, net_dev, attr->name,
++ ret = batadv_store_bool_attr(buff, count, net_dev, attr->attr.name,
+ attr_store, &changed);
+ if (post_func && changed)
+ post_func(net_dev);
+@@ -340,12 +340,12 @@ static inline ssize_t
+ __batadv_store_uint_attr(const char *buff, size_t count,
+ int min, int max,
+ void (*post_func)(struct net_device *),
+- const struct attribute *attr,
++ const struct kobj_attribute *attr,
+ atomic_t *attr_store, struct net_device *net_dev)
+ {
+ int ret;
+
+- ret = batadv_store_uint_attr(buff, count, net_dev, attr->name, min, max,
++ ret = batadv_store_uint_attr(buff, count, net_dev, attr->attr.name, min, max,
+ attr_store);
+ if (post_func && ret)
+ post_func(net_dev);
+@@ -354,7 +354,7 @@ __batadv_store_uint_attr(const char *buff, size_t count,
+ }
+
+ static ssize_t batadv_show_bat_algo(struct kobject *kobj,
+- struct attribute *attr, char *buff)
++ struct kobj_attribute *attr, char *buff)
+ {
+ struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
+
+@@ -368,7 +368,7 @@ static void batadv_post_gw_reselect(struct net_device *net_dev)
+ batadv_gw_reselect(bat_priv);
+ }
+
+-static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct attribute *attr,
++static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct kobj_attribute *attr,
+ char *buff)
+ {
+ struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
+@@ -393,7 +393,7 @@ static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct attribute *attr,
+ }
+
+ static ssize_t batadv_store_gw_mode(struct kobject *kobj,
+- struct attribute *attr, char *buff,
++ struct kobj_attribute *attr, char *buff,
+ size_t count)
+ {
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
+@@ -461,7 +461,7 @@ static ssize_t batadv_store_gw_mode(struct kobject *kobj,
+ }
+
+ static ssize_t batadv_show_gw_bwidth(struct kobject *kobj,
+- struct attribute *attr, char *buff)
++ struct kobj_attribute *attr, char *buff)
+ {
+ struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
+ u32 down, up;
+@@ -474,7 +474,7 @@ static ssize_t batadv_show_gw_bwidth(struct kobject *kobj,
+ }
+
+ static ssize_t batadv_store_gw_bwidth(struct kobject *kobj,
+- struct attribute *attr, char *buff,
++ struct kobj_attribute *attr, char *buff,
+ size_t count)
+ {
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
+@@ -495,7 +495,7 @@ static ssize_t batadv_store_gw_bwidth(struct kobject *kobj,
+ * error code in case of failure
+ */
+ static ssize_t batadv_show_isolation_mark(struct kobject *kobj,
+- struct attribute *attr, char *buff)
++ struct kobj_attribute *attr, char *buff)
+ {
+ struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj);
+
+@@ -514,7 +514,7 @@ static ssize_t batadv_show_isolation_mark(struct kobject *kobj,
+ * Returns 'count' on success or a negative error code in case of failure
+ */
+ static ssize_t batadv_store_isolation_mark(struct kobject *kobj,
+- struct attribute *attr, char *buff,
++ struct kobj_attribute *attr, char *buff,
+ size_t count)
+ {
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
+@@ -753,7 +753,7 @@ void batadv_sysfs_del_vlan(struct batadv_priv *bat_priv,
+ }
+
+ static ssize_t batadv_show_mesh_iface(struct kobject *kobj,
+- struct attribute *attr, char *buff)
++ struct kobj_attribute *attr, char *buff)
+ {
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
+ struct batadv_hard_iface *hard_iface;
+@@ -777,7 +777,7 @@ static ssize_t batadv_show_mesh_iface(struct kobject *kobj,
+ }
+
+ static ssize_t batadv_store_mesh_iface(struct kobject *kobj,
+- struct attribute *attr, char *buff,
++ struct kobj_attribute *attr, char *buff,
+ size_t count)
+ {
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
+@@ -834,7 +834,7 @@ out:
+ }
+
+ static ssize_t batadv_show_iface_status(struct kobject *kobj,
+- struct attribute *attr, char *buff)
++ struct kobj_attribute *attr, char *buff)
+ {
+ struct net_device *net_dev = batadv_kobj_to_netdev(kobj);
+ struct batadv_hard_iface *hard_iface;
+diff --git a/net/batman-adv/sysfs.h b/net/batman-adv/sysfs.h
+index 6197442..d762dac 100644
+--- a/net/batman-adv/sysfs.h
++++ b/net/batman-adv/sysfs.h
+@@ -37,9 +37,9 @@ struct net_device;
+
+ struct batadv_attribute {
+ struct attribute attr;
+- ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
++ ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
+ char *buf);
+- ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
++ ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
+ char *buf, size_t count);
+ };
+
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
-index 83b0ca2..6ebbdf4 100644
+index 0e80fd1..65abb77 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
-@@ -607,7 +607,7 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
+@@ -609,7 +609,7 @@ bool batadv_tt_local_add(struct net_device *soft_iface, const u8 *addr,
batadv_dbg(BATADV_DBG_TT, bat_priv,
"Creating new local tt entry: %pM (vid: %d, ttvn: %d)\n",
addr, BATADV_PRINT_VID(vid),
@@ -124188,7 +149235,7 @@ index 83b0ca2..6ebbdf4 100644
ether_addr_copy(tt_local->common.addr, addr);
/* The local entry has to be marked as NEW to avoid to send it in
-@@ -837,7 +837,7 @@ batadv_tt_prepare_tvlv_local_data(struct batadv_priv *bat_priv,
+@@ -839,7 +839,7 @@ batadv_tt_prepare_tvlv_local_data(struct batadv_priv *bat_priv,
}
(*tt_data)->flags = BATADV_NO_FLAGS;
@@ -124197,7 +149244,7 @@ index 83b0ca2..6ebbdf4 100644
(*tt_data)->num_vlan = htons(num_vlan);
tt_vlan = (struct batadv_tvlv_tt_vlan_data *)(*tt_data + 1);
-@@ -956,7 +956,7 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset)
+@@ -958,7 +958,7 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset)
seq_printf(seq,
"Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n",
@@ -124206,7 +149253,7 @@ index 83b0ca2..6ebbdf4 100644
seq_printf(seq, " %-13s %s %-8s %-9s (%-10s)\n", "Client", "VID",
"Flags", "Last seen", "CRC");
-@@ -2733,7 +2733,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
+@@ -2747,7 +2747,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->tt.commit_lock);
@@ -124215,7 +149262,7 @@ index 83b0ca2..6ebbdf4 100644
req_ttvn = tt_data->ttvn;
orig_node = batadv_orig_hash_find(bat_priv, req_src);
-@@ -2772,7 +2772,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
+@@ -2786,7 +2786,7 @@ static bool batadv_send_my_tt_response(struct batadv_priv *bat_priv,
bat_priv->tt.last_changeset_len);
spin_unlock_bh(&bat_priv->tt.last_changeset_lock);
} else {
@@ -124224,7 +149271,7 @@ index 83b0ca2..6ebbdf4 100644
/* allocate the tvlv, put the tt_data and all the tt_vlan_data
* in the initial part
-@@ -3294,10 +3294,10 @@ static void batadv_tt_local_commit_changes_nolock(struct batadv_priv *bat_priv)
+@@ -3308,10 +3308,10 @@ static void batadv_tt_local_commit_changes_nolock(struct batadv_priv *bat_priv)
batadv_tt_local_update_crc(bat_priv);
/* Increment the TTVN only once per OGM interval */
@@ -124238,7 +149285,7 @@ index 83b0ca2..6ebbdf4 100644
/* reset the sending counter */
atomic_set(&bat_priv->tt.ogm_append_cnt, BATADV_TT_OGM_APPEND_MAX);
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
-index d260efd..1548fb3 100644
+index 3437b66..8fa5b54 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -81,7 +81,7 @@ enum batadv_dhcp_recipient {
@@ -124250,7 +149297,7 @@ index d260efd..1548fb3 100644
};
/**
-@@ -529,7 +529,7 @@ enum batadv_counters {
+@@ -551,7 +551,7 @@ enum batadv_counters {
* @work: work queue callback item for translation table purging
*/
struct batadv_priv_tt {
@@ -124259,7 +149306,7 @@ index d260efd..1548fb3 100644
atomic_t ogm_append_cnt;
atomic_t local_changes;
struct list_head changes_list;
-@@ -784,7 +784,7 @@ struct batadv_priv {
+@@ -809,7 +809,7 @@ struct batadv_priv {
atomic_t bonding;
atomic_t fragmentation;
atomic_t packet_size_max;
@@ -124268,7 +149315,7 @@ index d260efd..1548fb3 100644
#ifdef CONFIG_BATMAN_ADV_BLA
atomic_t bridge_loop_avoidance;
#endif
-@@ -803,7 +803,7 @@ struct batadv_priv {
+@@ -828,7 +828,7 @@ struct batadv_priv {
#endif
u32 isolation_mark;
u32 isolation_mark_mask;
@@ -124278,10 +149325,10 @@ index d260efd..1548fb3 100644
atomic_t batman_queue_left;
char num_ifaces;
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
-index b1eb8c0..266b4100 100644
+index 1298d72..423f410 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
-@@ -1332,7 +1332,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
+@@ -1477,7 +1477,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
uf.event_mask[1] = *((u32 *) f->event_mask + 1);
}
@@ -124291,10 +149338,10 @@ index b1eb8c0..266b4100 100644
err = -EFAULT;
break;
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
-index 66e8b6e..6b53602 100644
+index eb4f5f2..2cc4c50 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
-@@ -3537,8 +3537,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
+@@ -3547,8 +3547,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
break;
case L2CAP_CONF_RFC:
@@ -124308,7 +149355,7 @@ index 66e8b6e..6b53602 100644
if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) &&
rfc.mode != chan->mode)
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
-index 1bb5515..17f48c6 100644
+index e4cae72..95cc097ba 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -633,7 +633,8 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname,
@@ -124416,10 +149463,10 @@ index 40197ff..58633af 100644
.priv_size = sizeof(struct net_bridge),
.setup = br_dev_setup,
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
-index f46ca41..6e76045 100644
+index 67b2e27..07fb939 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
-@@ -1513,6 +1513,8 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
+@@ -1521,6 +1521,8 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
if (copy_from_user(&tmp, user, sizeof(tmp)))
return -EFAULT;
@@ -124428,7 +149475,7 @@ index f46ca41..6e76045 100644
t = find_table_lock(net, tmp.name, &ret, &ebt_mutex);
if (!t)
return ret;
-@@ -1535,7 +1537,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
+@@ -1543,7 +1545,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
tmp.valid_hooks = t->table->valid_hooks;
}
mutex_unlock(&ebt_mutex);
@@ -124437,7 +149484,7 @@ index f46ca41..6e76045 100644
BUGPRINT("c2u Didn't work\n");
ret = -EFAULT;
break;
-@@ -2328,6 +2330,8 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
+@@ -2332,6 +2334,8 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
if (copy_from_user(&tmp, user, sizeof(tmp)))
return -EFAULT;
@@ -124446,7 +149493,7 @@ index f46ca41..6e76045 100644
t = find_table_lock(net, tmp.name, &ret, &ebt_mutex);
if (!t)
return ret;
-@@ -2341,7 +2345,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
+@@ -2345,7 +2349,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
goto out;
tmp.valid_hooks = t->valid_hooks;
@@ -124455,7 +149502,7 @@ index f46ca41..6e76045 100644
ret = -EFAULT;
break;
}
-@@ -2352,7 +2356,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
+@@ -2356,7 +2360,7 @@ static int compat_do_ebt_get_ctl(struct sock *sk, int cmd,
tmp.entries_size = t->table->entries_size;
tmp.valid_hooks = t->table->valid_hooks;
@@ -124508,9 +149555,18 @@ index f5afda1..dcf770a 100644
list_del(&p->list);
goto out;
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
-index 67a4a36..8d28068 100644
+index 67a4a36..406eefc 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
+@@ -214,7 +214,7 @@ static void chnl_flowctrl_cb(struct cflayer *layr, enum caif_ctrlcmd flow,
+ }
+ }
+
+-static int chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t chnl_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct chnl_net *priv;
+ struct cfpkt *pkt = NULL;
@@ -515,7 +515,7 @@ static const struct nla_policy ipcaif_policy[IFLA_CAIF_MAX + 1] = {
};
@@ -124590,11 +149646,24 @@ index 1a19b98..df2b4ec 100644
if (!can_dir) {
printk(KERN_INFO "can: failed to create /proc/net/can . "
+diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
+index bcbec33..5a84f6f 100644
+--- a/net/ceph/ceph_common.c
++++ b/net/ceph/ceph_common.c
+@@ -5,7 +5,7 @@
+ #include <linux/fs.h>
+ #include <linux/inet.h>
+ #include <linux/in6.h>
+-#include <linux/key.h>
++#include <linux/key-type.h>
+ #include <keys/ceph-type.h>
+ #include <linux/module.h>
+ #include <linux/mount.h>
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
-index 63ae5dd..40e8dce 100644
+index 9382619..0a029e7 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
-@@ -190,7 +190,7 @@ static void con_fault(struct ceph_connection *con);
+@@ -187,7 +187,7 @@ static void con_fault(struct ceph_connection *con);
#define MAX_ADDR_STR_LEN 64 /* 54 is enough */
static char addr_str[ADDR_STR_COUNT][MAX_ADDR_STR_LEN];
@@ -124603,7 +149672,7 @@ index 63ae5dd..40e8dce 100644
static struct page *zero_page; /* used in certain error cases */
-@@ -201,7 +201,7 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss)
+@@ -198,7 +198,7 @@ const char *ceph_pr_addr(const struct sockaddr_storage *ss)
struct sockaddr_in *in4 = (struct sockaddr_in *) ss;
struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) ss;
@@ -124731,10 +149800,10 @@ index 5cfd26a..3c50cb0 100644
a0 = a[0];
a1 = a[1];
diff --git a/net/core/datagram.c b/net/core/datagram.c
-index d62af69..2e07b22 100644
+index fa9dc64..73dd85a 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
-@@ -338,7 +338,7 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
+@@ -357,7 +357,7 @@ int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags)
}
kfree_skb(skb);
@@ -124744,10 +149813,10 @@ index d62af69..2e07b22 100644
return err;
diff --git a/net/core/dev.c b/net/core/dev.c
-index 9efbdb3..16a834b 100644
+index 0ef061b..6d2375a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -1748,7 +1748,7 @@ int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
+@@ -1766,7 +1766,7 @@ int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
{
if (skb_orphan_frags(skb, GFP_ATOMIC) ||
unlikely(!is_skb_forwardable(dev, skb))) {
@@ -124756,7 +149825,7 @@ index 9efbdb3..16a834b 100644
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -3173,7 +3173,7 @@ recursion_alert:
+@@ -3379,7 +3379,7 @@ recursion_alert:
drop:
rcu_read_unlock_bh();
@@ -124765,7 +149834,7 @@ index 9efbdb3..16a834b 100644
kfree_skb_list(skb);
return rc;
out:
-@@ -3525,7 +3525,7 @@ drop:
+@@ -3731,7 +3731,7 @@ drop:
local_irq_restore(flags);
@@ -124774,7 +149843,7 @@ index 9efbdb3..16a834b 100644
kfree_skb(skb);
return NET_RX_DROP;
}
-@@ -3602,7 +3602,7 @@ int netif_rx_ni(struct sk_buff *skb)
+@@ -3808,7 +3808,7 @@ int netif_rx_ni(struct sk_buff *skb)
}
EXPORT_SYMBOL(netif_rx_ni);
@@ -124783,7 +149852,7 @@ index 9efbdb3..16a834b 100644
{
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
-@@ -3948,7 +3948,7 @@ ncls:
+@@ -4154,7 +4154,7 @@ ncls:
ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
} else {
drop:
@@ -124792,7 +149861,7 @@ index 9efbdb3..16a834b 100644
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
* me how you were going to use this. :-)
-@@ -4844,7 +4844,7 @@ out_unlock:
+@@ -5117,7 +5117,7 @@ out_unlock:
return work;
}
@@ -124801,7 +149870,7 @@ index 9efbdb3..16a834b 100644
{
struct softnet_data *sd = this_cpu_ptr(&softnet_data);
unsigned long time_limit = jiffies + 2;
-@@ -7004,8 +7004,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
+@@ -7298,8 +7298,8 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
} else {
netdev_stats_to_stats64(storage, &dev->stats);
}
@@ -124832,10 +149901,10 @@ index b94b1d2..da3ed7c 100644
EXPORT_SYMBOL(dev_load);
diff --git a/net/core/filter.c b/net/core/filter.c
-index f393a22..a106bc8 100644
+index fb2951c..27ce8a9 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
-@@ -580,7 +580,11 @@ do_pass:
+@@ -588,7 +588,11 @@ do_pass:
/* Unknown instruction. */
default:
@@ -124848,7 +149917,7 @@ index f393a22..a106bc8 100644
}
insn++;
-@@ -624,7 +628,7 @@ static int check_load_and_stores(const struct sock_filter *filter, int flen)
+@@ -632,7 +636,7 @@ static int check_load_and_stores(const struct sock_filter *filter, int flen)
u16 *masks, memvalid = 0; /* One bit per cell, 16 cells */
int pc, ret = 0;
@@ -124857,7 +149926,7 @@ index f393a22..a106bc8 100644
masks = kmalloc_array(flen, sizeof(*masks), GFP_KERNEL);
if (!masks)
-@@ -1058,7 +1062,7 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog)
+@@ -1066,7 +1070,7 @@ int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog)
if (!fp)
return -ENOMEM;
@@ -125034,7 +150103,7 @@ index 2bf8329..2eb1423 100644
return 0;
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
-index f88a62ab..ba29125 100644
+index b6c8a66..0da5ffc 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -287,7 +287,7 @@ static ssize_t carrier_changes_show(struct device *dev,
@@ -125109,7 +150178,7 @@ index 94acfc8..01545c0 100644
iph->ttl = 64;
iph->protocol = IPPROTO_UDP;
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
-index 4da4d51..ef1aa60 100644
+index 1474cfd..961bc9f 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3829,7 +3829,7 @@ static int __net_init pg_net_init(struct net *net)
@@ -125122,7 +150191,7 @@ index 4da4d51..ef1aa60 100644
pr_warn("cannot create /proc/net/%s\n", PG_PROC_DIR);
return -ENODEV;
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
-index ca966f7..34ad6fa 100644
+index 215e613..893522a 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -61,7 +61,7 @@ struct rtnl_link {
@@ -125160,7 +150229,7 @@ index ca966f7..34ad6fa 100644
}
EXPORT_SYMBOL_GPL(__rtnl_link_unregister);
-@@ -1234,7 +1237,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
+@@ -1235,7 +1238,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
(dev->ifalias &&
nla_put_string(skb, IFLA_IFALIAS, dev->ifalias)) ||
nla_put_u32(skb, IFLA_CARRIER_CHANGES,
@@ -125169,7 +150238,7 @@ index ca966f7..34ad6fa 100644
nla_put_u8(skb, IFLA_PROTO_DOWN, dev->proto_down))
goto nla_put_failure;
-@@ -3386,7 +3389,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
+@@ -3395,7 +3398,7 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
__rtnl_unlock();
rtnl = net->rtnl;
{
@@ -125179,7 +150248,7 @@ index ca966f7..34ad6fa 100644
.min_dump_alloc = min_dump_alloc,
};
diff --git a/net/core/scm.c b/net/core/scm.c
-index dce0acb..69f6cac 100644
+index 2696aef..dbd5807 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -215,9 +215,9 @@ EXPORT_SYMBOL(__scm_send);
@@ -125271,10 +150340,10 @@ index 8616d11..8b30348 100644
}
diff --git a/net/core/sock.c b/net/core/sock.c
-index 0d91f7d..47dcbc8 100644
+index 6c1c8bc..325316d 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -451,7 +451,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -409,7 +409,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
struct sk_buff_head *list = &sk->sk_receive_queue;
if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) {
@@ -125283,7 +150352,7 @@ index 0d91f7d..47dcbc8 100644
trace_sock_rcvqueue_full(sk, skb);
return -ENOMEM;
}
-@@ -461,7 +461,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
+@@ -419,7 +419,7 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
return err;
if (!sk_rmem_schedule(sk, skb, skb->truesize)) {
@@ -125292,7 +150361,7 @@ index 0d91f7d..47dcbc8 100644
return -ENOBUFS;
}
-@@ -494,7 +494,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
+@@ -452,7 +452,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
skb->dev = NULL;
if (sk_rcvqueues_full(sk, sk->sk_rcvbuf)) {
@@ -125301,7 +150370,7 @@ index 0d91f7d..47dcbc8 100644
goto discard_and_relse;
}
if (nested)
-@@ -512,7 +512,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
+@@ -470,7 +470,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
} else if (sk_add_backlog(sk, skb, sk->sk_rcvbuf)) {
bh_unlock_sock(sk);
@@ -125310,24 +150379,57 @@ index 0d91f7d..47dcbc8 100644
goto discard_and_relse;
}
-@@ -919,6 +919,7 @@ set_rcvbuf:
+@@ -877,19 +877,6 @@ set_rcvbuf:
+ }
+ break;
+
+- case SO_ATTACH_BPF:
+- ret = -EINVAL;
+- if (optlen == sizeof(u32)) {
+- u32 ufd;
+-
+- ret = -EFAULT;
+- if (copy_from_user(&ufd, optval, sizeof(ufd)))
+- break;
+-
+- ret = sk_attach_bpf(ufd, sk);
+- }
+- break;
+-
+ case SO_ATTACH_REUSEPORT_CBPF:
+ ret = -EINVAL;
+ if (optlen == sizeof(struct sock_fprog)) {
+@@ -903,6 +890,20 @@ set_rcvbuf:
}
break;
+#ifndef GRKERNSEC_BPF_HARDEN
- case SO_ATTACH_BPF:
++ case SO_ATTACH_BPF:
++ ret = -EINVAL;
++ if (optlen == sizeof(u32)) {
++ u32 ufd;
++
++ ret = -EFAULT;
++ if (copy_from_user(&ufd, optval, sizeof(ufd)))
++ break;
++
++ ret = sk_attach_bpf(ufd, sk);
++ }
++ break;
++
+ case SO_ATTACH_REUSEPORT_EBPF:
ret = -EINVAL;
if (optlen == sizeof(u32)) {
-@@ -931,7 +932,7 @@ set_rcvbuf:
- ret = sk_attach_bpf(ufd, sk);
+@@ -916,6 +917,8 @@ set_rcvbuf:
}
break;
--
+
+#endif
++
case SO_DETACH_FILTER:
ret = sk_detach_filter(sk);
break;
-@@ -1037,12 +1038,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
+@@ -1021,12 +1024,12 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
struct timeval tm;
} v;
@@ -125343,7 +150445,7 @@ index 0d91f7d..47dcbc8 100644
return -EINVAL;
memset(&v, 0, sizeof(v));
-@@ -1180,11 +1181,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
+@@ -1164,11 +1167,11 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
case SO_PEERNAME:
{
@@ -125357,7 +150459,7 @@ index 0d91f7d..47dcbc8 100644
return -EINVAL;
if (copy_to_user(optval, address, len))
return -EFAULT;
-@@ -1272,7 +1273,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
+@@ -1256,7 +1259,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
if (len > lv)
len = lv;
@@ -125366,7 +150468,7 @@ index 0d91f7d..47dcbc8 100644
return -EFAULT;
lenout:
if (put_user(len, optlen))
-@@ -1564,7 +1565,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
+@@ -1535,7 +1538,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
newsk->sk_err = 0;
newsk->sk_priority = 0;
newsk->sk_incoming_cpu = raw_smp_processor_id();
@@ -125375,7 +150477,7 @@ index 0d91f7d..47dcbc8 100644
/*
* Before updating sk_refcnt, we must commit prior changes to memory
* (Documentation/RCU/rculist_nulls.txt for details)
-@@ -2424,7 +2425,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
+@@ -2402,7 +2405,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
*/
smp_wmb();
atomic_set(&sk->sk_refcnt, 1);
@@ -125384,7 +150486,7 @@ index 0d91f7d..47dcbc8 100644
}
EXPORT_SYMBOL(sock_init_data);
-@@ -2553,6 +2554,7 @@ void sock_enable_timestamp(struct sock *sk, int flag)
+@@ -2531,6 +2534,7 @@ void sock_enable_timestamp(struct sock *sk, int flag)
int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
int level, int type)
{
@@ -125392,7 +150494,7 @@ index 0d91f7d..47dcbc8 100644
struct sock_exterr_skb *serr;
struct sk_buff *skb;
int copied, err;
-@@ -2574,7 +2576,8 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
+@@ -2552,7 +2556,8 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,
sock_recv_timestamp(msg, sk, skb);
serr = SKB_EXT_ERR(skb);
@@ -125403,7 +150505,7 @@ index 0d91f7d..47dcbc8 100644
msg->msg_flags |= MSG_ERRQUEUE;
err = copied;
diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
-index 0c1d58d..e6ad04f 100644
+index a996ce8..e0d5d3d 100644
--- a/net/core/sock_diag.c
+++ b/net/core/sock_diag.c
@@ -14,7 +14,7 @@
@@ -125589,10 +150691,10 @@ index 5325b54..a0d4d69 100644
*lenp = len;
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
-index 1eba07f..4859469 100644
+index d8fb47f..f0914ca 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
-@@ -999,7 +999,7 @@ static struct packet_type dsa_pack_type __read_mostly = {
+@@ -985,7 +985,7 @@ static struct packet_type dsa_pack_type __read_mostly = {
.func = dsa_switch_rcv,
};
@@ -125601,6 +150703,19 @@ index 1eba07f..4859469 100644
.notifier_call = dsa_slave_netdevice_event,
};
+diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
+index c7d1adc..e4d688b 100644
+--- a/net/hsr/hsr_device.c
++++ b/net/hsr/hsr_device.c
+@@ -232,7 +232,7 @@ static netdev_features_t hsr_fix_features(struct net_device *dev,
+ }
+
+
+-static int hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct hsr_priv *hsr = netdev_priv(dev);
+ struct hsr_port *master;
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
index a2c7e4c..3dc9f67 100644
--- a/net/hsr/hsr_netlink.c
@@ -125615,10 +150730,10 @@ index a2c7e4c..3dc9f67 100644
.maxtype = IFLA_HSR_MAX,
.policy = hsr_policy,
diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
-index 20c49c7..94377ab 100644
+index 737c87a..33f9fec 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
-@@ -184,7 +184,7 @@ static void lowpan_dellink(struct net_device *ldev, struct list_head *head)
+@@ -182,7 +182,7 @@ static void lowpan_dellink(struct net_device *ldev, struct list_head *head)
dev_put(wdev);
}
@@ -125628,7 +150743,7 @@ index 20c49c7..94377ab 100644
.priv_size = LOWPAN_PRIV_SIZE(sizeof(struct lowpan_dev_info)),
.setup = lowpan_setup,
diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
-index 6b437e8..47c6566 100644
+index 30d875d..760f4f1 100644
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -492,14 +492,13 @@ static struct ctl_table lowpan_frags_ctl_table[] = {
@@ -125671,18 +150786,6 @@ index 6b437e8..47c6566 100644
err_alloc:
return -ENOMEM;
}
-diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
-index 416dfa0..6e41f17 100644
---- a/net/ipv4/Kconfig
-+++ b/net/ipv4/Kconfig
-@@ -353,6 +353,7 @@ config INET_ESP
- select CRYPTO_CBC
- select CRYPTO_SHA1
- select CRYPTO_DES
-+ select CRYPTO_ECHAINIV
- ---help---
- Support for IPsec ESP.
-
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 5c5db66..c10a4a2 100644
--- a/net/ipv4/af_inet.c
@@ -125857,10 +150960,10 @@ index 6414891..30ec9bf 100644
newicsk->icsk_retransmits = 0;
newicsk->icsk_backoff = 0;
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
-index ab9f8a6..238aa59 100644
+index 6029157..92bcf89 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
-@@ -962,7 +962,7 @@ static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh)
+@@ -985,7 +985,7 @@ static int inet_diag_rcv_msg_compat(struct sk_buff *skb, struct nlmsghdr *nlh)
return -EINVAL;
}
{
@@ -125869,7 +150972,7 @@ index ab9f8a6..238aa59 100644
.dump = inet_diag_dump_compat,
};
return netlink_dump_start(net->diag_nlsk, skb, nlh, &c);
-@@ -992,7 +992,7 @@ static int inet_diag_handler_dump(struct sk_buff *skb, struct nlmsghdr *h)
+@@ -1016,7 +1016,7 @@ static int inet_diag_handler_cmd(struct sk_buff *skb, struct nlmsghdr *h)
return -EINVAL;
}
{
@@ -125934,7 +151037,7 @@ index 86fa458..5f601b9 100644
p->rate_tokens = 0;
/* 60*HZ is arbitrary, but chosen enough high so that the first
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
-index b8a0607d..0ef8880 100644
+index 187c6fc..f4a802c 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -284,7 +284,7 @@ static int ip_frag_too_far(struct ipq *qp)
@@ -125985,10 +151088,10 @@ index b8a0607d..0ef8880 100644
return -ENOMEM;
}
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
-index 6145214..77ebc63 100644
+index 41ba68d..599331a 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
-@@ -117,7 +117,7 @@ static bool log_ecn_error = true;
+@@ -116,7 +116,7 @@ static bool log_ecn_error = true;
module_param(log_ecn_error, bool, 0644);
MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
@@ -125997,7 +151100,7 @@ index 6145214..77ebc63 100644
static int ipgre_tunnel_init(struct net_device *dev);
static int ipgre_net_id __read_mostly;
-@@ -1190,7 +1190,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
+@@ -1189,7 +1189,7 @@ static const struct nla_policy ipgre_policy[IFLA_GRE_MAX + 1] = {
[IFLA_GRE_COLLECT_METADATA] = { .type = NLA_FLAG },
};
@@ -126006,7 +151109,7 @@ index 6145214..77ebc63 100644
.kind = "gre",
.maxtype = IFLA_GRE_MAX,
.policy = ipgre_policy,
-@@ -1205,7 +1205,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
+@@ -1204,7 +1204,7 @@ static struct rtnl_link_ops ipgre_link_ops __read_mostly = {
.get_link_net = ip_tunnel_get_link_net,
};
@@ -126016,7 +151119,7 @@ index 6145214..77ebc63 100644
.maxtype = IFLA_GRE_MAX,
.policy = ipgre_policy,
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
-index b1209b6..c2f63ba 100644
+index d77eb0c..4482235 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -148,6 +148,10 @@
@@ -126064,10 +151167,10 @@ index a501242..ea6b81d 100644
msg.msg_flags = flags;
diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
-index 4d8f0b6..a2c583b 100644
+index 5cf10b7..2e40e55 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
-@@ -45,7 +45,7 @@
+@@ -44,7 +44,7 @@
#include <net/net_namespace.h>
#include <net/netns/generic.h>
@@ -126076,7 +151179,7 @@ index 4d8f0b6..a2c583b 100644
static int vti_net_id __read_mostly;
static int vti_tunnel_init(struct net_device *dev);
-@@ -525,7 +525,7 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = {
+@@ -524,7 +524,7 @@ static const struct nla_policy vti_policy[IFLA_VTI_MAX + 1] = {
[IFLA_VTI_REMOTE] = { .len = FIELD_SIZEOF(struct iphdr, daddr) },
};
@@ -126086,10 +151189,10 @@ index 4d8f0b6..a2c583b 100644
.maxtype = IFLA_VTI_MAX,
.policy = vti_policy,
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
-index 0bc7412..9bf43d2 100644
+index 2ed9dd2..0682cfe 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
-@@ -337,7 +337,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
+@@ -332,7 +332,7 @@ static int __init ic_devinet_ioctl(unsigned int cmd, struct ifreq *arg)
mm_segment_t oldfs = get_fs();
set_fs(get_ds());
@@ -126098,7 +151201,7 @@ index 0bc7412..9bf43d2 100644
set_fs(oldfs);
return res;
}
-@@ -348,7 +348,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
+@@ -343,7 +343,7 @@ static int __init ic_dev_ioctl(unsigned int cmd, struct ifreq *arg)
mm_segment_t oldfs = get_fs();
set_fs(get_ds());
@@ -126107,7 +151210,7 @@ index 0bc7412..9bf43d2 100644
set_fs(oldfs);
return res;
}
-@@ -359,7 +359,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
+@@ -354,7 +354,7 @@ static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
mm_segment_t oldfs = get_fs();
set_fs(get_ds());
@@ -126117,10 +151220,10 @@ index 0bc7412..9bf43d2 100644
return res;
}
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
-index a09fb0d..24e19b2 100644
+index 4044da6..7e21175 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
-@@ -124,7 +124,7 @@ MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
+@@ -123,7 +123,7 @@ MODULE_PARM_DESC(log_ecn_error, "Log packets received with corrupted ECN");
static int ipip_net_id __read_mostly;
static int ipip_tunnel_init(struct net_device *dev);
@@ -126129,7 +151232,7 @@ index a09fb0d..24e19b2 100644
static int ipip_err(struct sk_buff *skb, u32 info)
{
-@@ -485,7 +485,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
+@@ -484,7 +484,7 @@ static const struct nla_policy ipip_policy[IFLA_IPTUN_MAX + 1] = {
[IFLA_IPTUN_ENCAP_DPORT] = { .type = NLA_U16 },
};
@@ -126139,7 +151242,7 @@ index a09fb0d..24e19b2 100644
.maxtype = IFLA_IPTUN_MAX,
.policy = ipip_policy,
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
-index 11dccba..db794f4 100644
+index b488cac..7955324 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -359,11 +359,12 @@ unsigned int arpt_do_table(struct sk_buff *skb,
@@ -126540,7 +151643,7 @@ index 4a9e6db..06174e1 100644
pr_err("Unable to proc dir entry\n");
return -ENOMEM;
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
-index aa67e0e..3c65672 100644
+index d3a2716..884331c 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -59,7 +59,7 @@ struct ping_table {
@@ -126592,7 +151695,7 @@ index aa67e0e..3c65672 100644
else if (skb->protocol == htons(ETH_P_IP) && isk->cmsg_flags)
ip_cmsg_recv(msg, skb);
#endif
-@@ -1119,7 +1119,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
+@@ -1121,7 +1121,7 @@ static void ping_v4_format_sock(struct sock *sp, struct seq_file *f,
from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
0, sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
@@ -126820,10 +151923,10 @@ index 02c6229..68cc2a6 100644
ip_tstamps = kcalloc(IP_IDENTS_SZ, sizeof(*ip_tstamps), GFP_KERNEL);
if (!ip_tstamps)
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
-index a0bd7a5..79fdbb9 100644
+index 4d367b4..84f04b1 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
-@@ -67,7 +67,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
+@@ -66,7 +66,7 @@ static int ipv4_local_port_range(struct ctl_table *table, int write,
container_of(table->data, struct net, ipv4.ip_local_ports.range);
int ret;
int range[2];
@@ -126832,7 +151935,7 @@ index a0bd7a5..79fdbb9 100644
.data = &range,
.maxlen = sizeof(range),
.mode = table->mode,
-@@ -125,7 +125,7 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write,
+@@ -124,7 +124,7 @@ static int ipv4_ping_group_range(struct ctl_table *table, int write,
int ret;
gid_t urange[2];
kgid_t low, high;
@@ -126841,7 +151944,7 @@ index a0bd7a5..79fdbb9 100644
.data = &urange,
.maxlen = sizeof(urange),
.mode = table->mode,
-@@ -156,7 +156,7 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
+@@ -155,7 +155,7 @@ static int proc_tcp_congestion_control(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
char val[TCP_CA_NAME_MAX];
@@ -126850,7 +151953,7 @@ index a0bd7a5..79fdbb9 100644
.data = val,
.maxlen = TCP_CA_NAME_MAX,
};
-@@ -175,7 +175,7 @@ static int proc_tcp_available_congestion_control(struct ctl_table *ctl,
+@@ -174,7 +174,7 @@ static int proc_tcp_available_congestion_control(struct ctl_table *ctl,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
@@ -126859,7 +151962,7 @@ index a0bd7a5..79fdbb9 100644
int ret;
tbl.data = kmalloc(tbl.maxlen, GFP_USER);
-@@ -192,7 +192,7 @@ static int proc_allowed_congestion_control(struct ctl_table *ctl,
+@@ -191,7 +191,7 @@ static int proc_allowed_congestion_control(struct ctl_table *ctl,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
@@ -126868,7 +151971,7 @@ index a0bd7a5..79fdbb9 100644
int ret;
tbl.data = kmalloc(tbl.maxlen, GFP_USER);
-@@ -211,7 +211,7 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write,
+@@ -210,7 +210,7 @@ static int proc_tcp_fastopen_key(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
@@ -126877,7 +151980,7 @@ index a0bd7a5..79fdbb9 100644
struct tcp_fastopen_context *ctxt;
int ret;
u32 user_key[4]; /* 16 bytes, matching TCP_FASTOPEN_KEY_LENGTH */
-@@ -955,13 +955,12 @@ static struct ctl_table ipv4_net_table[] = {
+@@ -965,13 +965,12 @@ static struct ctl_table ipv4_net_table[] = {
static __net_init int ipv4_sysctl_init_net(struct net *net)
{
@@ -126893,7 +151996,7 @@ index a0bd7a5..79fdbb9 100644
if (!table)
goto err_alloc;
-@@ -970,7 +969,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
+@@ -980,7 +979,10 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)
table[i].data += (void *)net - (void *)&init_net;
}
@@ -126906,7 +152009,7 @@ index a0bd7a5..79fdbb9 100644
goto err_reg;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
-index d4c5115..f949b08 100644
+index 3b2c8e9..601c090 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -266,11 +266,13 @@ static void tcp_ecn_rcv_synack(struct tcp_sock *tp, const struct tcphdr *th)
@@ -126932,7 +152035,7 @@ index d4c5115..f949b08 100644
sk->sk_max_pacing_rate);
}
-@@ -4674,7 +4676,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
+@@ -4675,7 +4677,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
* simplifies code)
*/
static void
@@ -126941,7 +152044,7 @@ index d4c5115..f949b08 100644
struct sk_buff *head, struct sk_buff *tail,
u32 start, u32 end)
{
-@@ -5669,6 +5671,7 @@ discard:
+@@ -5670,6 +5672,7 @@ discard:
tcp_paws_reject(&tp->rx_opt, 0))
goto discard_and_undo;
@@ -126949,7 +152052,7 @@ index d4c5115..f949b08 100644
if (th->syn) {
/* We see SYN without ACK. It is attempt of
* simultaneous connect with crossed SYNs.
-@@ -5720,6 +5723,7 @@ discard:
+@@ -5721,6 +5724,7 @@ discard:
goto discard;
#endif
}
@@ -126957,7 +152060,7 @@ index d4c5115..f949b08 100644
/* "fifth, if neither of the SYN or RST bits is set then
* drop the segment and return."
*/
-@@ -5765,7 +5769,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
+@@ -5766,7 +5770,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
goto discard;
if (th->syn) {
@@ -126966,7 +152069,7 @@ index d4c5115..f949b08 100644
goto discard;
if (icsk->icsk_af_ops->conn_request(sk, skb) < 0)
return 1;
-@@ -6097,7 +6101,7 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
+@@ -6098,7 +6102,7 @@ struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,
kmemcheck_annotate_bitfield(ireq, flags);
ireq->opt = NULL;
@@ -126976,10 +152079,10 @@ index d4c5115..f949b08 100644
write_pnet(&ireq->ireq_net, sock_net(sk_listener));
ireq->ireq_family = sk_listener->sk_family;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
-index 048418b..bb14e83 100644
+index a7b1a90..9f6c261 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
-@@ -89,6 +89,10 @@ int sysctl_tcp_tw_reuse __read_mostly;
+@@ -88,6 +88,10 @@ int sysctl_tcp_tw_reuse __read_mostly;
int sysctl_tcp_low_latency __read_mostly;
EXPORT_SYMBOL(sysctl_tcp_low_latency);
@@ -126990,7 +152093,7 @@ index 048418b..bb14e83 100644
#ifdef CONFIG_TCP_MD5SIG
static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key,
__be32 daddr, __be32 saddr, const struct tcphdr *th);
-@@ -1418,6 +1422,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
+@@ -1421,6 +1425,9 @@ int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
reset:
@@ -127000,7 +152103,7 @@ index 048418b..bb14e83 100644
tcp_v4_send_reset(rsk, skb);
discard:
kfree_skb(skb);
-@@ -1583,12 +1590,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
+@@ -1586,12 +1593,19 @@ int tcp_v4_rcv(struct sk_buff *skb)
lookup:
sk = __inet_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -127023,7 +152126,7 @@ index 048418b..bb14e83 100644
if (sk->sk_state == TCP_NEW_SYN_RECV) {
struct request_sock *req = inet_reqsk(sk);
-@@ -1673,6 +1687,10 @@ csum_error:
+@@ -1676,6 +1690,10 @@ csum_error:
bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
} else {
@@ -127035,7 +152138,7 @@ index 048418b..bb14e83 100644
}
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
-index 9475a27..8bc7bde 100644
+index 9b02af2..5b73e16 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -27,6 +27,10 @@
@@ -127049,7 +152152,7 @@ index 9475a27..8bc7bde 100644
int sysctl_tcp_syncookies __read_mostly = 1;
EXPORT_SYMBOL(sysctl_tcp_syncookies);
-@@ -787,7 +791,10 @@ embryonic_reset:
+@@ -784,7 +788,10 @@ embryonic_reset:
* avoid becoming vulnerable to outside attack aiming at
* resetting legit local connections.
*/
@@ -127075,7 +152178,7 @@ index ebf5ff5..4d1ff32 100644
cnt += width;
}
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
-index 193ba1f..aeda727 100644
+index a4730a2..1a92c3a 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -22,6 +22,10 @@
@@ -127088,8 +152191,8 @@ index 193ba1f..aeda727 100644
+
int sysctl_tcp_syn_retries __read_mostly = TCP_SYN_RETRIES;
int sysctl_tcp_synack_retries __read_mostly = TCP_SYNACK_RETRIES;
- int sysctl_tcp_keepalive_time __read_mostly = TCP_KEEPALIVE_TIME;
-@@ -207,6 +211,13 @@ static int tcp_write_timeout(struct sock *sk)
+ int sysctl_tcp_retries1 __read_mostly = TCP_RETR1;
+@@ -204,6 +208,13 @@ static int tcp_write_timeout(struct sock *sk)
}
}
@@ -127104,7 +152207,7 @@ index 193ba1f..aeda727 100644
syn_set ? 0 : icsk->icsk_user_timeout, syn_set)) {
/* Has it gone just too far? */
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
-index 21fbb54..45345d8 100644
+index eb8933b..21e9109 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -87,6 +87,7 @@
@@ -127115,9 +152218,9 @@ index 21fbb54..45345d8 100644
#include <linux/socket.h>
#include <linux/sockios.h>
#include <linux/igmp.h>
-@@ -114,6 +115,10 @@
- #include <net/busy_poll.h>
+@@ -115,6 +116,10 @@
#include "udp_impl.h"
+ #include <net/sock_reuseport.h>
+#ifdef CONFIG_GRKERNSEC_BLACKHOLE
+extern int grsec_enable_blackhole;
@@ -127126,7 +152229,7 @@ index 21fbb54..45345d8 100644
struct udp_table udp_table __read_mostly;
EXPORT_SYMBOL(udp_table);
-@@ -611,6 +616,9 @@ static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
+@@ -691,6 +696,9 @@ static inline bool __udp_is_mcast_sock(struct net *net, struct sock *sk,
return true;
}
@@ -127136,7 +152239,7 @@ index 21fbb54..45345d8 100644
/*
* This routine is called by the ICMP module when it gets some
* sort of error condition. If err < 0 then the socket should
-@@ -947,9 +955,18 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
+@@ -1029,9 +1037,18 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
dport = usin->sin_port;
if (dport == 0)
return -EINVAL;
@@ -127155,7 +152258,7 @@ index 21fbb54..45345d8 100644
daddr = inet->inet_daddr;
dport = inet->inet_dport;
/* Open fast path for connected socket.
-@@ -1206,7 +1223,7 @@ static unsigned int first_packet_length(struct sock *sk)
+@@ -1288,7 +1305,7 @@ static unsigned int first_packet_length(struct sock *sk)
IS_UDPLITE(sk));
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
IS_UDPLITE(sk));
@@ -127164,7 +152267,7 @@ index 21fbb54..45345d8 100644
__skb_unlink(skb, rcvq);
__skb_queue_tail(&list_kill, skb);
}
-@@ -1286,6 +1303,10 @@ try_again:
+@@ -1369,6 +1386,10 @@ try_again:
if (!skb)
goto out;
@@ -127175,7 +152278,7 @@ index 21fbb54..45345d8 100644
ulen = skb->len - sizeof(struct udphdr);
copied = len;
if (copied > ulen)
-@@ -1318,7 +1339,7 @@ try_again:
+@@ -1402,7 +1423,7 @@ try_again:
if (unlikely(err)) {
trace_kfree_skb(skb, udp_recvmsg);
if (!peeked) {
@@ -127184,7 +152287,7 @@ index 21fbb54..45345d8 100644
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS, is_udplite);
}
-@@ -1612,7 +1633,7 @@ csum_error:
+@@ -1704,7 +1725,7 @@ csum_error:
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
drop:
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
@@ -127193,7 +152296,7 @@ index 21fbb54..45345d8 100644
kfree_skb(skb);
return -1;
}
-@@ -1630,7 +1651,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
+@@ -1722,7 +1743,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
if (!skb1) {
@@ -127202,7 +152305,7 @@ index 21fbb54..45345d8 100644
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
IS_UDPLITE(sk));
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
-@@ -1836,6 +1857,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
+@@ -1928,6 +1949,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
goto csum_error;
UDP_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -127212,7 +152315,7 @@ index 21fbb54..45345d8 100644
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
/*
-@@ -2444,7 +2468,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
+@@ -2536,7 +2560,7 @@ static void udp4_format_sock(struct sock *sp, struct seq_file *f,
from_kuid_munged(seq_user_ns(f), sock_i_uid(sp)),
0, sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
@@ -127309,20 +152412,8 @@ index 542074c..648df74 100644
memset(XFRM_MODE_SKB_CB(skb)->flow_lbl, 0,
sizeof(XFRM_MODE_SKB_CB(skb)->flow_lbl));
-diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
-index 983bb99..ebc39e1 100644
---- a/net/ipv6/Kconfig
-+++ b/net/ipv6/Kconfig
-@@ -69,6 +69,7 @@ config INET6_ESP
- select CRYPTO_CBC
- select CRYPTO_SHA1
- select CRYPTO_DES
-+ select CRYPTO_ECHAINIV
- ---help---
- Support for IPsec ESP.
-
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
-index e8d3da0..c1ab725 100644
+index bdd7eac..5a18ee4 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -179,7 +179,7 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
@@ -127352,7 +152443,7 @@ index e8d3da0..c1ab725 100644
net->dev_base_seq;
hlist_for_each_entry_rcu(dev, head, index_hlist) {
if (idx < s_idx)
-@@ -2584,7 +2584,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
+@@ -2589,7 +2589,7 @@ int addrconf_set_dstaddr(struct net *net, void __user *arg)
p.iph.ihl = 5;
p.iph.protocol = IPPROTO_IPV6;
p.iph.ttl = 64;
@@ -127361,7 +152452,7 @@ index e8d3da0..c1ab725 100644
if (ops->ndo_do_ioctl) {
mm_segment_t oldfs = get_fs();
-@@ -3867,16 +3867,23 @@ static const struct file_operations if6_fops = {
+@@ -3899,16 +3899,23 @@ static const struct file_operations if6_fops = {
.release = seq_release_net,
};
@@ -127386,7 +152477,7 @@ index e8d3da0..c1ab725 100644
}
static struct pernet_operations if6_proc_net_ops = {
-@@ -4495,7 +4502,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
+@@ -4527,7 +4534,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
s_ip_idx = ip_idx = cb->args[2];
rcu_read_lock();
@@ -127395,7 +152486,7 @@ index e8d3da0..c1ab725 100644
for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
idx = 0;
head = &net->dev_index_head[h];
-@@ -4705,7 +4712,7 @@ static inline size_t inet6_if_nlmsg_size(void)
+@@ -4737,7 +4744,7 @@ static inline size_t inet6_if_nlmsg_size(void)
+ nla_total_size(inet6_ifla6_size()); /* IFLA_PROTINFO */
}
@@ -127404,7 +152495,7 @@ index e8d3da0..c1ab725 100644
int items, int bytes)
{
int i;
-@@ -4715,7 +4722,7 @@ static inline void __snmp6_fill_statsdev(u64 *stats, atomic_long_t *mib,
+@@ -4747,7 +4754,7 @@ static inline void __snmp6_fill_statsdev(u64 *stats, atomic_long_t *mib,
/* Use put_unaligned() because stats may not be aligned for u64. */
put_unaligned(items, &stats[0]);
for (i = 1; i < items; i++)
@@ -127413,7 +152504,7 @@ index e8d3da0..c1ab725 100644
memset(&stats[items], 0, pad);
}
-@@ -5169,7 +5176,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
+@@ -5202,7 +5209,7 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
rt_genid_bump_ipv6(net);
break;
}
@@ -127422,7 +152513,7 @@ index e8d3da0..c1ab725 100644
}
static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
-@@ -5189,7 +5196,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
+@@ -5222,7 +5229,7 @@ int addrconf_sysctl_forward(struct ctl_table *ctl, int write,
int *valp = ctl->data;
int val = *valp;
loff_t pos = *ppos;
@@ -127431,7 +152522,16 @@ index e8d3da0..c1ab725 100644
int ret;
/*
-@@ -5214,7 +5221,7 @@ int addrconf_sysctl_mtu(struct ctl_table *ctl, int write,
+@@ -5245,7 +5252,7 @@ static
+ int addrconf_sysctl_hop_limit(struct ctl_table *ctl, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos)
+ {
+- struct ctl_table lctl;
++ ctl_table_no_const lctl;
+ int min_hl = 1, max_hl = 255;
+
+ lctl = *ctl;
+@@ -5261,7 +5268,7 @@ int addrconf_sysctl_mtu(struct ctl_table *ctl, int write,
{
struct inet6_dev *idev = ctl->extra1;
int min_mtu = IPV6_MIN_MTU;
@@ -127440,7 +152540,7 @@ index e8d3da0..c1ab725 100644
lctl = *ctl;
lctl.extra1 = &min_mtu;
-@@ -5289,7 +5296,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
+@@ -5336,7 +5343,7 @@ int addrconf_sysctl_disable(struct ctl_table *ctl, int write,
int *valp = ctl->data;
int val = *valp;
loff_t pos = *ppos;
@@ -127449,7 +152549,7 @@ index e8d3da0..c1ab725 100644
int ret;
/*
-@@ -5354,7 +5361,7 @@ static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write,
+@@ -5401,7 +5408,7 @@ static int addrconf_sysctl_stable_secret(struct ctl_table *ctl, int write,
int err;
struct in6_addr addr;
char str[IPV6_MAX_STRLEN];
@@ -127458,7 +152558,7 @@ index e8d3da0..c1ab725 100644
struct net *net = ctl->extra2;
struct ipv6_stable_secret *secret = ctl->data;
-@@ -5423,7 +5430,7 @@ int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl,
+@@ -5470,7 +5477,7 @@ int addrconf_sysctl_ignore_routes_with_linkdown(struct ctl_table *ctl,
int *valp = ctl->data;
int val = *valp;
loff_t pos = *ppos;
@@ -127504,6 +152604,19 @@ index 0a37ddc..af81b1a 100644
table = kmemdup(ipv6_icmp_table_template,
sizeof(ipv6_icmp_table_template),
+diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
+index 21ace5a..270fb64 100644
+--- a/net/ipv6/inet6_hashtables.c
++++ b/net/ipv6/inet6_hashtables.c
+@@ -192,7 +192,7 @@ struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
+ EXPORT_SYMBOL_GPL(inet6_lookup);
+
+ static int __inet6_check_established(struct inet_timewait_death_row *death_row,
+- struct sock *sk, const __u16 lport,
++ struct sock *sk, __u16 lport,
+ struct inet_timewait_sock **twp)
+ {
+ struct inet_hashinfo *hinfo = death_row->hashinfo;
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 0c7e276..68d9b36 100644
--- a/net/ipv6/ip6_fib.c
@@ -127521,10 +152634,10 @@ index 0c7e276..68d9b36 100644
return new;
}
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
-index 4650c68..5b6762e 100644
+index c0d4dc1..96afdd9 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
-@@ -71,8 +71,8 @@ struct ip6gre_net {
+@@ -70,8 +70,8 @@ struct ip6gre_net {
struct net_device *fb_tunnel_dev;
};
@@ -127535,7 +152648,7 @@ index 4650c68..5b6762e 100644
static int ip6gre_tunnel_init(struct net_device *dev);
static void ip6gre_tunnel_setup(struct net_device *dev);
static void ip6gre_tunnel_link(struct ip6gre_net *ign, struct ip6_tnl *t);
-@@ -1304,7 +1304,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
+@@ -1303,7 +1303,7 @@ static void ip6gre_fb_tunnel_init(struct net_device *dev)
}
@@ -127834,10 +152947,10 @@ index 99425cf..cc99e7c 100644
case IP6T_SO_GET_ENTRIES:
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
-index bab4441..233aa7a 100644
+index e4347ae..c7654e7 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
-@@ -96,12 +96,11 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
+@@ -95,12 +95,11 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
static int nf_ct_frag6_sysctl_register(struct net *net)
{
@@ -127852,7 +152965,7 @@ index bab4441..233aa7a 100644
GFP_KERNEL);
if (table == NULL)
goto err_alloc;
-@@ -112,9 +111,9 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
+@@ -111,9 +110,9 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
table[2].data = &net->nf_frag.frags.high_thresh;
table[2].extra1 = &net->nf_frag.frags.low_thresh;
table[2].extra2 = &init_net.nf_frag.frags.high_thresh;
@@ -127865,7 +152978,7 @@ index bab4441..233aa7a 100644
if (hdr == NULL)
goto err_reg;
-@@ -122,8 +121,7 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
+@@ -121,8 +120,7 @@ static int nf_ct_frag6_sysctl_register(struct net *net)
return 0;
err_reg:
@@ -127993,7 +153106,7 @@ index 679253d0..d85dd97 100644
goto proc_dev_snmp6_fail;
return 0;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
-index 9914098..f3f8888 100644
+index fa59dd7..d9d9c9d 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -389,7 +389,7 @@ static inline int rawv6_rcv_skb(struct sock *sk, struct sk_buff *skb)
@@ -128068,7 +153181,7 @@ index 9914098..f3f8888 100644
return 0;
default:
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
-index 45f5ae5..1c57cbe 100644
+index 18f3498..74cbfc9 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -630,12 +630,11 @@ static struct ctl_table ip6_frags_ctl_table[] = {
@@ -128110,10 +153223,10 @@ index 45f5ae5..1c57cbe 100644
return -ENOMEM;
}
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
-index 3f164d3..cd507d9 100644
+index ed44663..fa4d1d9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
-@@ -3503,7 +3503,7 @@ struct ctl_table ipv6_route_table_template[] = {
+@@ -3523,7 +3523,7 @@ struct ctl_table ipv6_route_table_template[] = {
struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net)
{
@@ -128123,7 +153236,7 @@ index 3f164d3..cd507d9 100644
table = kmemdup(ipv6_route_table_template,
sizeof(ipv6_route_table_template),
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
-index dcccae8..33152e7 100644
+index 2066d1c..190a677 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -74,7 +74,7 @@ static void ipip6_tunnel_setup(struct net_device *dev);
@@ -128135,7 +153248,7 @@ index dcccae8..33152e7 100644
static int sit_net_id __read_mostly;
struct sit_net {
-@@ -1735,7 +1735,7 @@ static void ipip6_dellink(struct net_device *dev, struct list_head *head)
+@@ -1732,7 +1732,7 @@ static void ipip6_dellink(struct net_device *dev, struct list_head *head)
unregister_netdevice_queue(dev, head);
}
@@ -128158,10 +153271,10 @@ index 45243bb..cdb398e 100644
struct ctl_table *ipv6_icmp_table;
int err;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
-index b8d4056..9509e20 100644
+index 5c8c842..e67c742 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
-@@ -102,6 +102,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
+@@ -101,6 +101,10 @@ static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
}
}
@@ -128172,7 +153285,7 @@ index b8d4056..9509e20 100644
static __u32 tcp_v6_init_sequence(const struct sk_buff *skb)
{
return secure_tcpv6_sequence_number(ipv6_hdr(skb)->daddr.s6_addr32,
-@@ -1269,6 +1273,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
+@@ -1268,6 +1272,9 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
return 0;
reset:
@@ -128182,7 +153295,7 @@ index b8d4056..9509e20 100644
tcp_v6_send_reset(sk, skb);
discard:
if (opt_skb)
-@@ -1379,12 +1386,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
+@@ -1378,12 +1385,20 @@ static int tcp_v6_rcv(struct sk_buff *skb)
lookup:
sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest,
inet6_iif(skb));
@@ -128205,7 +153318,7 @@ index b8d4056..9509e20 100644
if (sk->sk_state == TCP_NEW_SYN_RECV) {
struct request_sock *req = inet_reqsk(sk);
-@@ -1472,6 +1487,10 @@ csum_error:
+@@ -1471,6 +1486,10 @@ csum_error:
bad_packet:
TCP_INC_STATS_BH(net, TCP_MIB_INERRS);
} else {
@@ -128217,10 +153330,10 @@ index b8d4056..9509e20 100644
}
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
-index 6665e1a..e84ef29 100644
+index 6794120..21d5fae 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
-@@ -76,6 +76,10 @@ static u32 udp6_ehashfn(const struct net *net,
+@@ -77,6 +77,10 @@ static u32 udp6_ehashfn(const struct net *net,
udp_ipv6_hash_secret + net_hash_mix(net));
}
@@ -128228,10 +153341,10 @@ index 6665e1a..e84ef29 100644
+extern int grsec_enable_blackhole;
+#endif
+
- int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2)
- {
- const struct in6_addr *sk2_rcv_saddr6 = inet6_rcv_saddr(sk2);
-@@ -448,7 +452,7 @@ try_again:
+ /* match_wildcard == true: IPV6_ADDR_ANY equals to any IPv6 addresses if IPv6
+ * only, and any IPv4 addresses if not IPv6 only
+ * match_wildcard == false: addresses must be exactly the same, i.e.
+@@ -494,7 +498,7 @@ try_again:
if (unlikely(err)) {
trace_kfree_skb(skb, udpv6_recvmsg);
if (!peeked) {
@@ -128240,7 +153353,7 @@ index 6665e1a..e84ef29 100644
if (is_udp4)
UDP_INC_STATS_USER(sock_net(sk),
UDP_MIB_INERRORS,
-@@ -712,7 +716,7 @@ csum_error:
+@@ -758,7 +762,7 @@ csum_error:
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
drop:
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
@@ -128249,7 +153362,7 @@ index 6665e1a..e84ef29 100644
kfree_skb(skb);
return -1;
}
-@@ -753,7 +757,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
+@@ -799,7 +803,7 @@ static void flush_stack(struct sock **stack, unsigned int count,
if (likely(!skb1))
skb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);
if (!skb1) {
@@ -128258,7 +153371,7 @@ index 6665e1a..e84ef29 100644
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
IS_UDPLITE(sk));
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_INERRORS,
-@@ -935,6 +939,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
+@@ -981,6 +985,9 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
goto csum_error;
UDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS, proto == IPPROTO_UDPLITE);
@@ -128347,11 +153460,98 @@ index c1d247e..9e5949d 100644
if (!ipx_proc_dir)
goto out;
+diff --git a/net/irda/discovery.c b/net/irda/discovery.c
+index 364d70a..c503f3f 100644
+--- a/net/irda/discovery.c
++++ b/net/irda/discovery.c
+@@ -136,7 +136,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
+ }
+
+ /* Delete the now empty log */
+- hashbin_delete(log, (FREE_FUNC) kfree);
++ hashbin_delete(log, irlmp_kfree);
+ }
+
+ /*
+diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
+index 3af2195..a38e804 100644
+--- a/net/irda/ircomm/ircomm_core.c
++++ b/net/irda/ircomm/ircomm_core.c
+@@ -46,7 +46,7 @@
+ #include <net/irda/ircomm_param.h>
+ #include <net/irda/ircomm_core.h>
+
+-static int __ircomm_close(struct ircomm_cb *self);
++static void __ircomm_close(void *_self);
+ static void ircomm_control_indication(struct ircomm_cb *self,
+ struct sk_buff *skb, int clen);
+
+@@ -91,7 +91,7 @@ static int __init ircomm_init(void)
+
+ static void __exit ircomm_cleanup(void)
+ {
+- hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
++ hashbin_delete(ircomm, __ircomm_close);
+
+ #ifdef CONFIG_PROC_FS
+ remove_proc_entry("ircomm", proc_irda);
+@@ -151,8 +151,10 @@ EXPORT_SYMBOL(ircomm_open);
+ * Remove IrCOMM instance
+ *
+ */
+-static int __ircomm_close(struct ircomm_cb *self)
++static void __ircomm_close(void *_self)
+ {
++ struct ircomm_cb *self = _self;
++
+ /* Disconnect link if any */
+ ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
+
+@@ -170,8 +172,6 @@ static int __ircomm_close(struct ircomm_cb *self)
+ self->magic = 0;
+
+ kfree(self);
+-
+- return 0;
+ }
+
+ /*
+@@ -191,7 +191,8 @@ int ircomm_close(struct ircomm_cb *self)
+
+ IRDA_ASSERT(entry == self, return -1;);
+
+- return __ircomm_close(self);
++ __ircomm_close(self);
++ return 0;
+ }
+
+ EXPORT_SYMBOL(ircomm_close);
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
-index a423770..a6e53a3 100644
+index a423770..e995a21 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
-@@ -310,10 +310,10 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
+@@ -172,8 +172,10 @@ static int __init ircomm_tty_init(void)
+ return 0;
+ }
+
+-static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
++static void __exit __ircomm_tty_cleanup(void *_self)
+ {
++ struct ircomm_tty_cb *self = _self;
++
+ IRDA_ASSERT(self != NULL, return;);
+ IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
+
+@@ -201,7 +203,7 @@ static void __exit ircomm_tty_cleanup(void)
+ return;
+ }
+
+- hashbin_delete(ircomm_tty, (FREE_FUNC) __ircomm_tty_cleanup);
++ hashbin_delete(ircomm_tty, __ircomm_tty_cleanup);
+ put_tty_driver(driver);
+ }
+
+@@ -310,10 +312,10 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
add_wait_queue(&port->open_wait, &wait);
pr_debug("%s(%d):block_til_ready before block on %s open_count=%d\n",
@@ -128364,7 +153564,7 @@ index a423770..a6e53a3 100644
port->blocked_open++;
spin_unlock_irqrestore(&port->lock, flags);
-@@ -347,7 +347,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
+@@ -347,7 +349,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
}
pr_debug("%s(%d):block_til_ready blocking on %s open_count=%d\n",
@@ -128373,7 +153573,7 @@ index a423770..a6e53a3 100644
schedule();
}
-@@ -357,12 +357,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
+@@ -357,12 +359,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
spin_lock_irqsave(&port->lock, flags);
if (!tty_hung_up_p(filp))
@@ -128388,7 +153588,7 @@ index a423770..a6e53a3 100644
if (!retval)
port->flags |= ASYNC_NORMAL_ACTIVE;
-@@ -432,12 +432,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
+@@ -432,12 +434,12 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
/* ++ is not atomic, so this should be protected - Jean II */
spin_lock_irqsave(&self->port.lock, flags);
@@ -128403,7 +153603,7 @@ index a423770..a6e53a3 100644
/* Not really used by us, but lets do it anyway */
self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
-@@ -932,7 +932,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
+@@ -932,7 +934,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
tty_kref_put(port->tty);
}
port->tty = NULL;
@@ -128412,7 +153612,7 @@ index a423770..a6e53a3 100644
spin_unlock_irqrestore(&port->lock, flags);
wake_up_interruptible(&port->open_wait);
-@@ -1279,7 +1279,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
+@@ -1279,7 +1281,7 @@ static void ircomm_tty_line_info(struct ircomm_tty_cb *self, struct seq_file *m)
seq_putc(m, '\n');
seq_printf(m, "Role: %s\n", self->client ? "client" : "server");
@@ -128421,6 +153621,375 @@ index a423770..a6e53a3 100644
seq_printf(m, "Max data size: %d\n", self->max_data_size);
seq_printf(m, "Max header size: %d\n", self->max_header_size);
+diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
+index 61137f8..465b9ea 100644
+--- a/net/irda/ircomm/ircomm_tty_attach.c
++++ b/net/irda/ircomm/ircomm_tty_attach.c
+@@ -52,7 +52,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
+ struct ias_value *value, void *priv);
+ static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self,
+ int timeout);
+-static void ircomm_tty_watchdog_timer_expired(void *data);
++static void ircomm_tty_watchdog_timer_expired(unsigned long data);
+
+ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
+ IRCOMM_TTY_EVENT event,
+@@ -597,7 +597,7 @@ static void ircomm_tty_start_watchdog_timer(struct ircomm_tty_cb *self,
+ * Called when the connect procedure have taken to much time.
+ *
+ */
+-static void ircomm_tty_watchdog_timer_expired(void *data)
++static void ircomm_tty_watchdog_timer_expired(unsigned long data)
+ {
+ struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
+
+diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
+index 8567366..7c8aa51 100644
+--- a/net/irda/irda_device.c
++++ b/net/irda/irda_device.c
+@@ -52,12 +52,12 @@
+ #include <net/irda/timer.h>
+ #include <net/irda/wrapper.h>
+
+-static void __irda_task_delete(struct irda_task *task);
++static void __irda_task_delete(void *_task);
+
+ static hashbin_t *dongles = NULL;
+ static hashbin_t *tasks = NULL;
+
+-static void irda_task_timer_expired(void *data);
++static void irda_task_timer_expired(unsigned long data);
+
+ int __init irda_device_init( void)
+ {
+@@ -90,7 +90,7 @@ static void leftover_dongle(void *arg)
+
+ void irda_device_cleanup(void)
+ {
+- hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
++ hashbin_delete(tasks, __irda_task_delete);
+
+ hashbin_delete(dongles, leftover_dongle);
+ }
+@@ -159,8 +159,10 @@ int irda_device_is_receiving(struct net_device *dev)
+ return req.ifr_receiving;
+ }
+
+-static void __irda_task_delete(struct irda_task *task)
++static void __irda_task_delete(void *_task)
+ {
++ struct irda_task *task = _task;
++
+ del_timer(&task->timer);
+
+ kfree(task);
+@@ -249,11 +251,11 @@ static int irda_task_kick(struct irda_task *task)
+ * Task time has expired. We now try to execute task (again), and restart
+ * the timer if the task has not finished yet
+ */
+-static void irda_task_timer_expired(void *data)
++static void irda_task_timer_expired(unsigned long data)
+ {
+ struct irda_task *task;
+
+- task = data;
++ task = (struct irda_task *)data;
+
+ irda_task_kick(task);
+ }
+diff --git a/net/irda/iriap.c b/net/irda/iriap.c
+index 4a7ae32a..bfe8e78 100644
+--- a/net/irda/iriap.c
++++ b/net/irda/iriap.c
+@@ -61,7 +61,7 @@ static const char *const ias_charset_types[] __maybe_unused = {
+ static hashbin_t *iriap = NULL;
+ static void *service_handle;
+
+-static void __iriap_close(struct iriap_cb *self);
++static void __iriap_close(void *_self);
+ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode);
+ static void iriap_disconnect_indication(void *instance, void *sap,
+ LM_REASON reason, struct sk_buff *skb);
+@@ -76,7 +76,7 @@ static void iriap_connect_confirm(void *instance, void *sap,
+ static int iriap_data_indication(void *instance, void *sap,
+ struct sk_buff *skb);
+
+-static void iriap_watchdog_timer_expired(void *data);
++static void iriap_watchdog_timer_expired(unsigned long data);
+
+ static inline void iriap_start_watchdog_timer(struct iriap_cb *self,
+ int timeout)
+@@ -161,8 +161,8 @@ void iriap_cleanup(void)
+ {
+ irlmp_unregister_service(service_handle);
+
+- hashbin_delete(iriap, (FREE_FUNC) __iriap_close);
+- hashbin_delete(irias_objects, (FREE_FUNC) __irias_delete_object);
++ hashbin_delete(iriap, __iriap_close);
++ hashbin_delete(irias_objects, __irias_delete_object);
+ }
+
+ /*
+@@ -215,8 +215,10 @@ EXPORT_SYMBOL(iriap_open);
+ * Removes (deallocates) the IrIAP instance
+ *
+ */
+-static void __iriap_close(struct iriap_cb *self)
++static void __iriap_close(void *_self)
+ {
++ struct iriap_cb *self = _self;
++
+ IRDA_ASSERT(self != NULL, return;);
+ IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
+
+@@ -942,7 +944,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
+ * Query has taken too long time, so abort
+ *
+ */
+-static void iriap_watchdog_timer_expired(void *data)
++static void iriap_watchdog_timer_expired(unsigned long data)
+ {
+ struct iriap_cb *self = (struct iriap_cb *) data;
+
+diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
+index 53b86d0..5b884f3 100644
+--- a/net/irda/irias_object.c
++++ b/net/irda/irias_object.c
+@@ -88,8 +88,10 @@ EXPORT_SYMBOL(irias_new_object);
+ * Delete given attribute and deallocate all its memory
+ *
+ */
+-static void __irias_delete_attrib(struct ias_attrib *attrib)
++static void __irias_delete_attrib(void *_attrib)
+ {
++ struct ias_attrib *attrib = _attrib;
++
+ IRDA_ASSERT(attrib != NULL, return;);
+ IRDA_ASSERT(attrib->magic == IAS_ATTRIB_MAGIC, return;);
+
+@@ -101,14 +103,16 @@ static void __irias_delete_attrib(struct ias_attrib *attrib)
+ kfree(attrib);
+ }
+
+-void __irias_delete_object(struct ias_object *obj)
++void __irias_delete_object(void *_obj)
+ {
++ struct ias_object *obj = _obj;
++
+ IRDA_ASSERT(obj != NULL, return;);
+ IRDA_ASSERT(obj->magic == IAS_OBJECT_MAGIC, return;);
+
+ kfree(obj->name);
+
+- hashbin_delete(obj->attribs, (FREE_FUNC) __irias_delete_attrib);
++ hashbin_delete(obj->attribs, __irias_delete_attrib);
+
+ obj->magic = ~IAS_OBJECT_MAGIC;
+
+diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
+index c5837a4..518b358 100644
+--- a/net/irda/irlan/irlan_client.c
++++ b/net/irda/irlan/irlan_client.c
+@@ -68,7 +68,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
+ char *value, int val_len);
+ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self);
+
+-static void irlan_client_kick_timer_expired(void *data)
++static void irlan_client_kick_timer_expired(unsigned long data)
+ {
+ struct irlan_cb *self = (struct irlan_cb *) data;
+
+diff --git a/net/irda/irlap.c b/net/irda/irlap.c
+index 1cde711..d05a5fb 100644
+--- a/net/irda/irlap.c
++++ b/net/irda/irlap.c
+@@ -56,7 +56,7 @@ int sysctl_slot_timeout = SLOT_TIMEOUT * 1000 / HZ;
+ int sysctl_warn_noreply_time = 3;
+
+ extern void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb);
+-static void __irlap_close(struct irlap_cb *self);
++static void __irlap_close(void *_self);
+ static void irlap_init_qos_capabilities(struct irlap_cb *self,
+ struct qos_info *qos_user);
+
+@@ -95,7 +95,7 @@ void irlap_cleanup(void)
+ {
+ IRDA_ASSERT(irlap != NULL, return;);
+
+- hashbin_delete(irlap, (FREE_FUNC) __irlap_close);
++ hashbin_delete(irlap, __irlap_close);
+ }
+
+ /*
+@@ -177,8 +177,10 @@ EXPORT_SYMBOL(irlap_open);
+ * Remove IrLAP and all allocated memory. Stop any pending timers.
+ *
+ */
+-static void __irlap_close(struct irlap_cb *self)
++static void __irlap_close(void *_self)
+ {
++ struct irlap_cb *self = _self;
++
+ IRDA_ASSERT(self != NULL, return;);
+ IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
+
+@@ -482,6 +484,11 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
+ * Start one single discovery operation.
+ *
+ */
++static void irlap_kfree(void *arg)
++{
++ kfree(arg);
++}
++
+ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
+ {
+ struct irlap_info info;
+@@ -513,7 +520,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
+ /* Check if last discovery request finished in time, or if
+ * it was aborted due to the media busy flag. */
+ if (self->discovery_log != NULL) {
+- hashbin_delete(self->discovery_log, (FREE_FUNC) kfree);
++ hashbin_delete(self->discovery_log, irlap_kfree);
+ self->discovery_log = NULL;
+ }
+
+diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
+index 0e1b4d7..7e39b12 100644
+--- a/net/irda/irlap_event.c
++++ b/net/irda/irlap_event.c
+@@ -163,7 +163,7 @@ static int (*state[])(struct irlap_cb *self, IRLAP_EVENT event,
+ * Poll timer has expired. Normally we must now send a RR frame to the
+ * remote device
+ */
+-static void irlap_poll_timer_expired(void *data)
++static void irlap_poll_timer_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
+diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
+index 4396459..cbf44c2 100644
+--- a/net/irda/irlmp.c
++++ b/net/irda/irlmp.c
+@@ -125,6 +125,11 @@ int __init irlmp_init(void)
+ * Remove IrLMP layer
+ *
+ */
++void irlmp_kfree(void *arg)
++{
++ kfree(arg);
++}
++
+ void irlmp_cleanup(void)
+ {
+ /* Check for main structure */
+@@ -133,11 +138,11 @@ void irlmp_cleanup(void)
+
+ del_timer(&irlmp->discovery_timer);
+
+- hashbin_delete(irlmp->links, (FREE_FUNC) kfree);
+- hashbin_delete(irlmp->unconnected_lsaps, (FREE_FUNC) kfree);
+- hashbin_delete(irlmp->clients, (FREE_FUNC) kfree);
+- hashbin_delete(irlmp->services, (FREE_FUNC) kfree);
+- hashbin_delete(irlmp->cachelog, (FREE_FUNC) kfree);
++ hashbin_delete(irlmp->links, irlmp_kfree);
++ hashbin_delete(irlmp->unconnected_lsaps, irlmp_kfree);
++ hashbin_delete(irlmp->clients, irlmp_kfree);
++ hashbin_delete(irlmp->services, irlmp_kfree);
++ hashbin_delete(irlmp->cachelog, irlmp_kfree);
+
+ /* De-allocate main structure */
+ kfree(irlmp);
+@@ -204,8 +209,10 @@ EXPORT_SYMBOL(irlmp_open_lsap);
+ *
+ * Remove an instance of LSAP
+ */
+-static void __irlmp_close_lsap(struct lsap_cb *self)
++static void __irlmp_close_lsap(void *_self)
+ {
++ struct lsap_cb *self = _self;
++
+ IRDA_ASSERT(self != NULL, return;);
+ IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
+
+@@ -354,7 +361,7 @@ void irlmp_unregister_link(__u32 saddr)
+ /* Final cleanup */
+ del_timer(&link->idle_timer);
+ link->magic = 0;
+- hashbin_delete(link->lsaps, (FREE_FUNC) __irlmp_close_lsap);
++ hashbin_delete(link->lsaps, __irlmp_close_lsap);
+ kfree(link);
+ }
+ }
+diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
+index e306cf2..e6e0e90 100644
+--- a/net/irda/irlmp_event.c
++++ b/net/irda/irlmp_event.c
+@@ -165,7 +165,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
+ (*lap_state[self->lap_state]) (self, event, skb);
+ }
+
+-void irlmp_discovery_timer_expired(void *data)
++void irlmp_discovery_timer_expired(unsigned long data)
+ {
+ /* We always cleanup the log (active & passive discovery) */
+ irlmp_do_expiry();
+@@ -176,7 +176,7 @@ void irlmp_discovery_timer_expired(void *data)
+ irlmp_start_discovery_timer(irlmp, sysctl_discovery_timeout * HZ);
+ }
+
+-void irlmp_watchdog_timer_expired(void *data)
++void irlmp_watchdog_timer_expired(unsigned long data)
+ {
+ struct lsap_cb *self = (struct lsap_cb *) data;
+
+@@ -186,7 +186,7 @@ void irlmp_watchdog_timer_expired(void *data)
+ irlmp_do_lsap_event(self, LM_WATCHDOG_TIMEOUT, NULL);
+ }
+
+-void irlmp_idle_timer_expired(void *data)
++void irlmp_idle_timer_expired(unsigned long data)
+ {
+ struct lap_cb *self = (struct lap_cb *) data;
+
+diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
+index 8d65bb9..677364b 100644
+--- a/net/irda/irnet/irnet.h
++++ b/net/irda/irnet/irnet.h
+@@ -511,7 +511,7 @@ typedef struct irnet_ctrl_channel
+ /* -------------------------- IRDA PART -------------------------- */
+ int irda_irnet_create(irnet_socket *); /* Initialise an IrNET socket */
+ int irda_irnet_connect(irnet_socket *); /* Try to connect over IrDA */
+-void irda_irnet_destroy(irnet_socket *); /* Teardown an IrNET socket */
++void irda_irnet_destroy(void *); /* Teardown an IrNET socket */
+ int irda_irnet_init(void); /* Initialise IrDA part of IrNET */
+ void irda_irnet_cleanup(void); /* Teardown IrDA part of IrNET */
+
+diff --git a/net/irda/irnet/irnet_irda.c b/net/irda/irnet/irnet_irda.c
+index 7f17a80..98575e1 100644
+--- a/net/irda/irnet/irnet_irda.c
++++ b/net/irda/irnet/irnet_irda.c
+@@ -613,8 +613,10 @@ irda_irnet_connect(irnet_socket * self)
+ * Note : this need to be called from a process context.
+ */
+ void
+-irda_irnet_destroy(irnet_socket * self)
++irda_irnet_destroy(void *_self)
+ {
++ irnet_socket *self = _self;
++
+ DENTER(IRDA_SOCK_TRACE, "(self=0x%p)\n", self);
+ if(self == NULL)
+ return;
+@@ -1879,7 +1881,7 @@ irda_irnet_cleanup(void)
+ irnet_destroy_server();
+
+ /* Remove all instances of IrNET socket still present */
+- hashbin_delete(irnet_server.list, (FREE_FUNC) irda_irnet_destroy);
++ hashbin_delete(irnet_server.list, irda_irnet_destroy);
+
+ DEXIT(MODULE_TRACE, "\n");
+ }
diff --git a/net/irda/irproc.c b/net/irda/irproc.c
index b9ac598..f88cc56 100644
--- a/net/irda/irproc.c
@@ -128434,8 +154003,119 @@ index b9ac598..f88cc56 100644
if (proc_irda == NULL)
return;
+diff --git a/net/irda/irttp.c b/net/irda/irttp.c
+index b6ab41d..e2263ce 100644
+--- a/net/irda/irttp.c
++++ b/net/irda/irttp.c
+@@ -42,7 +42,7 @@
+
+ static struct irttp_cb *irttp;
+
+-static void __irttp_close_tsap(struct tsap_cb *self);
++static void __irttp_close_tsap(void *_self);
+
+ static int irttp_data_indication(void *instance, void *sap,
+ struct sk_buff *skb);
+@@ -121,7 +121,7 @@ void irttp_cleanup(void)
+ /*
+ * Delete hashbin and close all TSAP instances in it
+ */
+- hashbin_delete(irttp->tsaps, (FREE_FUNC) __irttp_close_tsap);
++ hashbin_delete(irttp->tsaps, __irttp_close_tsap);
+
+ irttp->magic = 0;
+
+@@ -469,8 +469,10 @@ EXPORT_SYMBOL(irttp_open_tsap);
+ * deallocation of the TSAP, and resetting of the TSAPs values;
+ *
+ */
+-static void __irttp_close_tsap(struct tsap_cb *self)
++static void __irttp_close_tsap(void *_self)
+ {
++ struct tsap_cb *self = _self;
++
+ /* First make sure we're connected. */
+ IRDA_ASSERT(self != NULL, return;);
+ IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
+diff --git a/net/irda/timer.c b/net/irda/timer.c
+index f2280f7..c0a006f 100644
+--- a/net/irda/timer.c
++++ b/net/irda/timer.c
+@@ -34,12 +34,12 @@
+
+ extern int sysctl_slot_timeout;
+
+-static void irlap_slot_timer_expired(void* data);
+-static void irlap_query_timer_expired(void* data);
+-static void irlap_final_timer_expired(void* data);
+-static void irlap_wd_timer_expired(void* data);
+-static void irlap_backoff_timer_expired(void* data);
+-static void irlap_media_busy_expired(void* data);
++static void irlap_slot_timer_expired(unsigned long data);
++static void irlap_query_timer_expired(unsigned long data);
++static void irlap_final_timer_expired(unsigned long data);
++static void irlap_wd_timer_expired(unsigned long data);
++static void irlap_backoff_timer_expired(unsigned long data);
++static void irlap_media_busy_expired(unsigned long data);
+
+ void irlap_start_slot_timer(struct irlap_cb *self, int timeout)
+ {
+@@ -138,7 +138,7 @@ void irlmp_stop_idle_timer(struct lap_cb *self)
+ * IrLAP slot timer has expired
+ *
+ */
+-static void irlap_slot_timer_expired(void *data)
++static void irlap_slot_timer_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
+@@ -154,7 +154,7 @@ static void irlap_slot_timer_expired(void *data)
+ * IrLAP query timer has expired
+ *
+ */
+-static void irlap_query_timer_expired(void *data)
++static void irlap_query_timer_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
+@@ -170,7 +170,7 @@ static void irlap_query_timer_expired(void *data)
+ *
+ *
+ */
+-static void irlap_final_timer_expired(void *data)
++static void irlap_final_timer_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
+@@ -186,7 +186,7 @@ static void irlap_final_timer_expired(void *data)
+ *
+ *
+ */
+-static void irlap_wd_timer_expired(void *data)
++static void irlap_wd_timer_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
+@@ -202,7 +202,7 @@ static void irlap_wd_timer_expired(void *data)
+ *
+ *
+ */
+-static void irlap_backoff_timer_expired(void *data)
++static void irlap_backoff_timer_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
+@@ -218,7 +218,7 @@ static void irlap_backoff_timer_expired(void *data)
+ *
+ *
+ */
+-static void irlap_media_busy_expired(void *data)
++static void irlap_media_busy_expired(unsigned long data)
+ {
+ struct irlap_cb *self = (struct irlap_cb *) data;
+
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
-index 20ab7b2..1b7d8bb 100644
+index fc3598a..03a184e 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -685,10 +685,10 @@ static void __iucv_auto_name(struct iucv_sock *iucv)
@@ -128482,7 +154162,7 @@ index f9c9ecb..060751e 100644
return res;
}
diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
-index e253c26..609e848 100644
+index e253c26..eec4c65 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -42,12 +42,12 @@ struct l2tp_eth {
@@ -128504,6 +154184,15 @@ index e253c26..609e848 100644
};
/* via l2tp_session_priv() */
+@@ -90,7 +90,7 @@ static void l2tp_eth_dev_uninit(struct net_device *dev)
+ dev_put(dev);
+ }
+
+-static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
++static netdev_tx_t l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ struct l2tp_eth *priv = netdev_priv(dev);
+ struct l2tp_session *session = priv->session;
@@ -98,10 +98,10 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
int ret = l2tp_xmit_skb(session, skb, session->hdr_len);
@@ -128597,7 +154286,7 @@ index 1a3c7e0..80f8b0c 100644
goto out;
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
-index c12f348..adb3b48 100644
+index 166a29f..b9bec4b 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -378,7 +378,7 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev,
@@ -128618,7 +154307,7 @@ index c12f348..adb3b48 100644
local->_oper_chandef = *chandef;
ieee80211_hw_config(local, 0);
}
-@@ -3513,7 +3513,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
+@@ -3035,7 +3035,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
sdata->vif.probe_req_reg--;
}
@@ -128627,7 +154316,7 @@ index c12f348..adb3b48 100644
break;
if (sdata->vif.probe_req_reg == 1)
-@@ -3669,8 +3669,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
+@@ -3190,8 +3190,8 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
if (chanctx_conf) {
*chandef = sdata->vif.bss_conf.chandef;
ret = 0;
@@ -128638,6 +154327,19 @@ index c12f348..adb3b48 100644
sdata->vif.type == NL80211_IFTYPE_MONITOR) {
if (local->use_chanctx)
*chandef = local->monitor_chandef;
+diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
+index 3e24d0d..be640c0 100644
+--- a/net/mac80211/debugfs.c
++++ b/net/mac80211/debugfs.c
+@@ -91,7 +91,7 @@ static const struct file_operations reset_ops = {
+ };
+ #endif
+
+-static const char *hw_flag_names[] = {
++static const char * const hw_flag_names[] = {
+ #define FLAG(F) [IEEE80211_HW_##F] = #F
+ FLAG(HAS_RATE_CONTROL),
+ FLAG(RX_INCLUDES_FCS),
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index 7961e7d..eea148f 100644
--- a/net/mac80211/debugfs_key.c
@@ -128661,7 +154363,7 @@ index 7961e7d..eea148f 100644
(u8)(pn >> 40), (u8)(pn >> 32), (u8)(pn >> 24),
(u8)(pn >> 16), (u8)(pn >> 8), (u8)pn);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index 6837a46..f8aaf7d 100644
+index f006f4a..884f09e 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -30,6 +30,7 @@
@@ -128672,7 +154374,7 @@ index 6837a46..f8aaf7d 100644
#include "key.h"
#include "sta_info.h"
#include "debug.h"
-@@ -1111,7 +1112,7 @@ struct ieee80211_local {
+@@ -1107,7 +1108,7 @@ struct ieee80211_local {
/* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
spinlock_t queue_stop_reason_lock;
@@ -128769,10 +154471,10 @@ index 7a2b791..3297152 100644
mutex_lock(&local->iflist_mtx);
list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
-index 44388d6..a052880 100644
+index 5e5bc59..e033047 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
-@@ -914,7 +914,7 @@ void ieee80211_get_key_tx_seq(struct ieee80211_key_conf *keyconf,
+@@ -962,7 +962,7 @@ void ieee80211_get_key_tx_seq(struct ieee80211_key_conf *keyconf,
case WLAN_CIPHER_SUITE_GCMP_256:
BUILD_BUG_ON(offsetof(typeof(*seq), ccmp) !=
offsetof(typeof(*seq), gcmp));
@@ -128781,7 +154483,7 @@ index 44388d6..a052880 100644
seq->ccmp.pn[5] = pn64;
seq->ccmp.pn[4] = pn64 >> 8;
seq->ccmp.pn[3] = pn64 >> 16;
-@@ -1014,7 +1014,7 @@ void ieee80211_set_key_tx_seq(struct ieee80211_key_conf *keyconf,
+@@ -1062,7 +1062,7 @@ void ieee80211_set_key_tx_seq(struct ieee80211_key_conf *keyconf,
((u64)seq->ccmp.pn[2] << 24) |
((u64)seq->ccmp.pn[1] << 32) |
((u64)seq->ccmp.pn[0] << 40);
@@ -128791,7 +154493,7 @@ index 44388d6..a052880 100644
default:
WARN_ON(1);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
-index 175ffcf..2212fd2 100644
+index 8190bf27..a428476 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -170,7 +170,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
@@ -128839,10 +154541,10 @@ index a4e2f4e..02bfac1 100644
if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) {
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
-index 67066d0..9d015cc 100644
+index 23ed038..cd63e86 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -348,7 +348,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
+@@ -349,7 +349,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
int size = sizeof(struct txq_info) +
ALIGN(hw->txq_data_size, sizeof(void *));
@@ -128852,7 +154554,7 @@ index 67066d0..9d015cc 100644
goto free;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
-index bdc224d..11c229f 100644
+index 3311ce0..2b1323c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2825,7 +2825,7 @@ static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
@@ -128865,10 +154567,10 @@ index bdc224d..11c229f 100644
crypto_hdr[1] = pn >> 8;
crypto_hdr[4] = pn >> 16;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 33344f5..2e15b8f 100644
+index 58f58bd..8d39508 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
-@@ -1758,7 +1758,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
+@@ -1761,7 +1761,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
bool suspended = local->suspended;
/* nothing to do if HW shouldn't run */
@@ -128877,16 +154579,16 @@ index 33344f5..2e15b8f 100644
goto wake_up;
#ifdef CONFIG_PM
-@@ -2051,7 +2051,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
- local->in_reconfig = false;
- barrier();
+@@ -2064,7 +2064,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
+ mutex_unlock(&local->mtx);
+ }
- if (local->monitors == local->open_count && local->monitors > 0)
+ if (local->monitors == local_read(&local->open_count) && local->monitors > 0)
ieee80211_add_virtual_monitor(local);
/*
-@@ -2085,7 +2085,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
+@@ -2098,7 +2098,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
* If this is for hw restart things are still running.
* We may want to change that later, however.
*/
@@ -128895,7 +154597,7 @@ index 33344f5..2e15b8f 100644
drv_reconfig_complete(local, IEEE80211_RECONFIG_TYPE_RESTART);
if (!suspended)
-@@ -2099,7 +2099,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
+@@ -2112,7 +2112,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
ieee80211_flush_completed_scan(local, false);
@@ -128985,10 +154687,10 @@ index 7079cd3..c299f08 100644
/* defaults per 802.15.4-2011 */
wpan_dev->min_be = 3;
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
-index 881bc20..a01db58 100644
+index 0b80a71..8b0a639 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
-@@ -831,7 +831,7 @@ static int mpls_dev_sysctl_register(struct net_device *dev,
+@@ -871,7 +871,7 @@ static int mpls_dev_sysctl_register(struct net_device *dev,
struct mpls_dev *mdev)
{
char path[sizeof("net/mpls/conf/") + IFNAMSIZ];
@@ -128997,7 +154699,25 @@ index 881bc20..a01db58 100644
int i;
table = kmemdup(&mpls_dev_table, sizeof(mpls_dev_table), GFP_KERNEL);
-@@ -1492,7 +1492,7 @@ static int mpls_platform_labels(struct ctl_table *table, int write,
+@@ -954,7 +954,7 @@ static void mpls_ifdown(struct net_device *dev, int event)
+ /* fall through */
+ case NETDEV_CHANGE:
+ nh->nh_flags |= RTNH_F_LINKDOWN;
+- ACCESS_ONCE(rt->rt_nhn_alive) = rt->rt_nhn_alive - 1;
++ ACCESS_ONCE_RW(rt->rt_nhn_alive) = rt->rt_nhn_alive - 1;
+ break;
+ }
+ if (event == NETDEV_UNREGISTER)
+@@ -995,7 +995,7 @@ static void mpls_ifup(struct net_device *dev, unsigned int nh_flags)
+ nh->nh_flags &= ~nh_flags;
+ } endfor_nexthops(rt);
+
+- ACCESS_ONCE(rt->rt_nhn_alive) = alive;
++ ACCESS_ONCE_RW(rt->rt_nhn_alive) = alive;
+ }
+
+ return;
+@@ -1621,7 +1621,7 @@ static int mpls_platform_labels(struct ctl_table *table, int write,
struct net *net = table->data;
int platform_labels = net->mpls.platform_labels;
int ret;
@@ -129006,7 +154726,7 @@ index 881bc20..a01db58 100644
.procname = table->procname,
.data = &platform_labels,
.maxlen = sizeof(int),
-@@ -1522,7 +1522,7 @@ static const struct ctl_table mpls_table[] = {
+@@ -1651,7 +1651,7 @@ static const struct ctl_table mpls_table[] = {
static int mpls_net_init(struct net *net)
{
@@ -129016,10 +154736,10 @@ index 881bc20..a01db58 100644
net->mpls.platform_labels = 0;
net->mpls.platform_label = NULL;
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
-index 4692782..24f2db1 100644
+index 95e757c..30e3a16 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
-@@ -1128,6 +1128,16 @@ config NETFILTER_XT_MATCH_ESP
+@@ -1150,6 +1150,16 @@ config NETFILTER_XT_MATCH_ESP
To compile it as a module, choose M here. If unsure, say N.
@@ -129037,10 +154757,10 @@ index 4692782..24f2db1 100644
tristate '"hashlimit" match support'
depends on IP6_NF_IPTABLES || IP6_NF_IPTABLES=n
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
-index 7638c36..faf3ac2 100644
+index 6913454..43686aa 100644
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
-@@ -138,6 +138,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
+@@ -145,6 +145,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_DEVGROUP) += xt_devgroup.o
obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
obj-$(CONFIG_NETFILTER_XT_MATCH_ECN) += xt_ecn.o
obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
@@ -129049,10 +154769,27 @@ index 7638c36..faf3ac2 100644
obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
obj-$(CONFIG_NETFILTER_XT_MATCH_HL) += xt_hl.o
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
-index 54f3d7c..fba57f5 100644
+index 95db43f..ed368dc 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
-@@ -1422,7 +1422,7 @@ ip_set_dump(struct sock *ctnl, struct sk_buff *skb,
+@@ -324,7 +324,6 @@ ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr)
+ }
+ EXPORT_SYMBOL_GPL(ip_set_get_ipaddr6);
+
+-typedef void (*destroyer)(void *);
+ /* ipset data extension types, in size order */
+
+ const struct ip_set_ext_type ip_set_extensions[] = {
+@@ -350,7 +349,7 @@ const struct ip_set_ext_type ip_set_extensions[] = {
+ .flag = IPSET_FLAG_WITH_COMMENT,
+ .len = sizeof(struct ip_set_comment),
+ .align = __alignof__(struct ip_set_comment),
+- .destroy = (destroyer) ip_set_comment_free,
++ .destroy = ip_set_comment_free,
+ },
+ };
+ EXPORT_SYMBOL_GPL(ip_set_extensions);
+@@ -1414,7 +1413,7 @@ static int ip_set_dump(struct net *net, struct sock *ctnl, struct sk_buff *skb,
return -IPSET_ERR_PROTOCOL;
{
@@ -129061,7 +154798,7 @@ index 54f3d7c..fba57f5 100644
.dump = ip_set_dump_start,
.done = ip_set_dump_done,
};
-@@ -1997,7 +1997,7 @@ done:
+@@ -1983,7 +1982,7 @@ done:
return ret;
}
@@ -129283,93 +155020,19 @@ index 45da11a..ef3e5dc 100644
table = kmemdup(acct_sysctl_table, sizeof(acct_sysctl_table),
GFP_KERNEL);
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
-index 3cb3cb8..c9fcad80 100644
+index f60b4fd..739155b 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
-@@ -66,6 +66,21 @@ EXPORT_SYMBOL_GPL(nf_conntrack_locks);
- __cacheline_aligned_in_smp DEFINE_SPINLOCK(nf_conntrack_expect_lock);
- EXPORT_SYMBOL_GPL(nf_conntrack_expect_lock);
+@@ -1581,7 +1581,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
+ }
+ EXPORT_SYMBOL_GPL(nf_ct_alloc_hashtable);
-+static __read_mostly spinlock_t nf_conntrack_locks_all_lock;
-+static __read_mostly bool nf_conntrack_locks_all;
-+
-+void nf_conntrack_lock(spinlock_t *lock) __acquires(lock)
-+{
-+ spin_lock(lock);
-+ while (unlikely(nf_conntrack_locks_all)) {
-+ spin_unlock(lock);
-+ spin_lock(&nf_conntrack_locks_all_lock);
-+ spin_unlock(&nf_conntrack_locks_all_lock);
-+ spin_lock(lock);
-+ }
-+}
-+EXPORT_SYMBOL_GPL(nf_conntrack_lock);
-+
- static void nf_conntrack_double_unlock(unsigned int h1, unsigned int h2)
+-int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
++int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp)
{
- h1 %= CONNTRACK_LOCKS;
-@@ -82,12 +97,12 @@ static bool nf_conntrack_double_lock(struct net *net, unsigned int h1,
- h1 %= CONNTRACK_LOCKS;
- h2 %= CONNTRACK_LOCKS;
- if (h1 <= h2) {
-- spin_lock(&nf_conntrack_locks[h1]);
-+ nf_conntrack_lock(&nf_conntrack_locks[h1]);
- if (h1 != h2)
- spin_lock_nested(&nf_conntrack_locks[h2],
- SINGLE_DEPTH_NESTING);
- } else {
-- spin_lock(&nf_conntrack_locks[h2]);
-+ nf_conntrack_lock(&nf_conntrack_locks[h2]);
- spin_lock_nested(&nf_conntrack_locks[h1],
- SINGLE_DEPTH_NESTING);
- }
-@@ -102,16 +117,19 @@ static void nf_conntrack_all_lock(void)
- {
- int i;
-
-- for (i = 0; i < CONNTRACK_LOCKS; i++)
-- spin_lock_nested(&nf_conntrack_locks[i], i);
--}
-+ spin_lock(&nf_conntrack_locks_all_lock);
-+ nf_conntrack_locks_all = true;
-
--static void nf_conntrack_all_unlock(void)
--{
-- int i;
--
-- for (i = 0; i < CONNTRACK_LOCKS; i++)
-+ for (i = 0; i < CONNTRACK_LOCKS; i++) {
-+ spin_lock(&nf_conntrack_locks[i]);
- spin_unlock(&nf_conntrack_locks[i]);
-+ }
-+}
-+
-+static void nf_conntrack_all_unlock(void)
-+{
-+ nf_conntrack_locks_all = false;
-+ spin_unlock(&nf_conntrack_locks_all_lock);
- }
-
- unsigned int nf_conntrack_htable_size __read_mostly;
-@@ -757,7 +775,7 @@ restart:
- hash = hash_bucket(_hash, net);
- for (; i < net->ct.htable_size; i++) {
- lockp = &nf_conntrack_locks[hash % CONNTRACK_LOCKS];
-- spin_lock(lockp);
-+ nf_conntrack_lock(lockp);
- if (read_seqcount_retry(&net->ct.generation, sequence)) {
- spin_unlock(lockp);
- goto restart;
-@@ -1382,7 +1400,7 @@ get_next_corpse(struct net *net, int (*iter)(struct nf_conn *i, void *data),
- for (; *bucket < net->ct.htable_size; (*bucket)++) {
- lockp = &nf_conntrack_locks[*bucket % CONNTRACK_LOCKS];
- local_bh_disable();
-- spin_lock(lockp);
-+ nf_conntrack_lock(lockp);
- if (*bucket < net->ct.htable_size) {
- hlist_nulls_for_each_entry(h, n, &net->ct.hash[*bucket], hnnode) {
- if (NF_CT_DIRECTION(h) != IP_CT_DIR_ORIGINAL)
-@@ -1755,6 +1773,10 @@ void nf_conntrack_init_end(void)
+ int i, bucket, rc;
+ unsigned int hashsize, old_size;
+@@ -1778,6 +1778,10 @@ void nf_conntrack_init_end(void)
#define DYING_NULLS_VAL ((1<<30)+1)
#define TEMPLATE_NULLS_VAL ((1<<30)+2)
@@ -129380,7 +155043,7 @@ index 3cb3cb8..c9fcad80 100644
int nf_conntrack_init_net(struct net *net)
{
int ret = -ENOMEM;
-@@ -1779,7 +1801,11 @@ int nf_conntrack_init_net(struct net *net)
+@@ -1802,7 +1806,11 @@ int nf_conntrack_init_net(struct net *net)
if (!net->ct.stat)
goto err_pcpu_lists;
@@ -129406,7 +155069,7 @@ index 4e78c57..ec8fb74 100644
table = kmemdup(event_sysctl_table, sizeof(event_sysctl_table),
GFP_KERNEL);
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
-index bd9d315..fbd2fb7 100644
+index 3b40ec5..fbd2fb7 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -57,7 +57,7 @@ static struct ctl_table helper_sysctl_table[] = {
@@ -129418,29 +155081,11 @@ index bd9d315..fbd2fb7 100644
table = kmemdup(helper_sysctl_table, sizeof(helper_sysctl_table),
GFP_KERNEL);
-@@ -425,7 +425,7 @@ static void __nf_conntrack_helper_unregister(struct nf_conntrack_helper *me,
- }
- local_bh_disable();
- for (i = 0; i < net->ct.htable_size; i++) {
-- spin_lock(&nf_conntrack_locks[i % CONNTRACK_LOCKS]);
-+ nf_conntrack_lock(&nf_conntrack_locks[i % CONNTRACK_LOCKS]);
- if (i < net->ct.htable_size) {
- hlist_nulls_for_each_entry(h, nn, &net->ct.hash[i], hnnode)
- unhelp(h, me);
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
-index 9f52729..7e7a2c6 100644
+index 355e855..4973252 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
-@@ -840,7 +840,7 @@ ctnetlink_dump_table(struct sk_buff *skb, struct netlink_callback *cb)
- for (; cb->args[0] < net->ct.htable_size; cb->args[0]++) {
- restart:
- lockp = &nf_conntrack_locks[cb->args[0] % CONNTRACK_LOCKS];
-- spin_lock(lockp);
-+ nf_conntrack_lock(lockp);
- if (cb->args[0] >= net->ct.htable_size) {
- spin_unlock(lockp);
- goto out;
-@@ -1184,10 +1184,11 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
+@@ -1182,10 +1182,11 @@ static int ctnetlink_get_conntrack(struct net *net, struct sock *ctnl,
int err;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129453,7 +155098,7 @@ index 9f52729..7e7a2c6 100644
if (cda[CTA_MARK] && cda[CTA_MARK_MASK]) {
struct ctnetlink_filter *filter;
-@@ -1196,9 +1197,9 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
+@@ -1194,9 +1195,9 @@ static int ctnetlink_get_conntrack(struct net *net, struct sock *ctnl,
if (IS_ERR(filter))
return PTR_ERR(filter);
@@ -129465,8 +155110,8 @@ index 9f52729..7e7a2c6 100644
}
err = ctnetlink_parse_zone(cda[CTA_ZONE], &zone);
-@@ -1336,7 +1337,7 @@ ctnetlink_get_ct_dying(struct sock *ctnl, struct sk_buff *skb,
- const struct nlattr * const cda[])
+@@ -1334,7 +1335,7 @@ static int ctnetlink_get_ct_dying(struct net *net, struct sock *ctnl,
+ const struct nlattr * const cda[])
{
if (nlh->nlmsg_flags & NLM_F_DUMP) {
- struct netlink_dump_control c = {
@@ -129474,8 +155119,8 @@ index 9f52729..7e7a2c6 100644
.dump = ctnetlink_dump_dying,
.done = ctnetlink_done_list,
};
-@@ -1358,7 +1359,7 @@ ctnetlink_get_ct_unconfirmed(struct sock *ctnl, struct sk_buff *skb,
- const struct nlattr * const cda[])
+@@ -1356,7 +1357,7 @@ static int ctnetlink_get_ct_unconfirmed(struct net *net, struct sock *ctnl,
+ const struct nlattr * const cda[])
{
if (nlh->nlmsg_flags & NLM_F_DUMP) {
- struct netlink_dump_control c = {
@@ -129483,8 +155128,8 @@ index 9f52729..7e7a2c6 100644
.dump = ctnetlink_dump_unconfirmed,
.done = ctnetlink_done_list,
};
-@@ -2040,7 +2041,7 @@ ctnetlink_stat_ct_cpu(struct sock *ctnl, struct sk_buff *skb,
- const struct nlattr * const cda[])
+@@ -2037,7 +2038,7 @@ static int ctnetlink_stat_ct_cpu(struct net *net, struct sock *ctnl,
+ const struct nlattr * const cda[])
{
if (nlh->nlmsg_flags & NLM_F_DUMP) {
- struct netlink_dump_control c = {
@@ -129492,7 +155137,7 @@ index 9f52729..7e7a2c6 100644
.dump = ctnetlink_ct_stat_cpu_dump,
};
return netlink_dump_start(ctnl, skb, nlh, &c);
-@@ -2741,7 +2742,7 @@ static int ctnetlink_dump_exp_ct(struct sock *ctnl, struct sk_buff *skb,
+@@ -2737,7 +2738,7 @@ static int ctnetlink_dump_exp_ct(struct net *net, struct sock *ctnl,
struct nf_conntrack_tuple_hash *h;
struct nf_conn *ct;
struct nf_conntrack_zone zone;
@@ -129501,7 +155146,7 @@ index 9f52729..7e7a2c6 100644
.dump = ctnetlink_exp_ct_dump_table,
.done = ctnetlink_exp_done,
};
-@@ -2760,9 +2761,8 @@ static int ctnetlink_dump_exp_ct(struct sock *ctnl, struct sk_buff *skb,
+@@ -2756,9 +2757,8 @@ static int ctnetlink_dump_exp_ct(struct net *net, struct sock *ctnl,
return -ENOENT;
ct = nf_ct_tuplehash_to_ctrack(h);
@@ -129512,17 +155157,17 @@ index 9f52729..7e7a2c6 100644
nf_ct_put(ct);
return err;
-@@ -2786,7 +2786,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
+@@ -2780,7 +2780,7 @@ static int ctnetlink_get_expect(struct net *net, struct sock *ctnl,
if (cda[CTA_EXPECT_MASTER])
- return ctnetlink_dump_exp_ct(ctnl, skb, nlh, cda);
+ return ctnetlink_dump_exp_ct(net, ctnl, skb, nlh, cda);
else {
- struct netlink_dump_control c = {
+ static struct netlink_dump_control c = {
.dump = ctnetlink_exp_dump_table,
.done = ctnetlink_exp_done,
};
-@@ -3248,7 +3248,7 @@ ctnetlink_stat_exp_cpu(struct sock *ctnl, struct sk_buff *skb,
- const struct nlattr * const cda[])
+@@ -3238,7 +3238,7 @@ static int ctnetlink_stat_exp_cpu(struct net *net, struct sock *ctnl,
+ const struct nlattr * const cda[])
{
if (nlh->nlmsg_flags & NLM_F_DUMP) {
- struct netlink_dump_control c = {
@@ -129544,10 +155189,10 @@ index b65d586..beec902 100644
{
if (users > 0)
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
-index 1fb3cac..a35219b 100644
+index 0f1a45b..a6ce792 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
-@@ -497,7 +497,7 @@ static struct ctl_table nf_ct_netfilter_table[] = {
+@@ -504,7 +504,7 @@ static struct ctl_table nf_ct_netfilter_table[] = {
static int nf_conntrack_standalone_init_sysctl(struct net *net)
{
@@ -129601,6 +155246,32 @@ index a5d41df..1ff49be 100644
mutex_unlock(&nf_log_mutex);
}
+diff --git a/net/netfilter/nf_nat_ftp.c b/net/netfilter/nf_nat_ftp.c
+index e84a578..d76afaf 100644
+--- a/net/netfilter/nf_nat_ftp.c
++++ b/net/netfilter/nf_nat_ftp.c
+@@ -134,7 +134,7 @@ static int __init nf_nat_ftp_init(void)
+ }
+
+ /* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */
+-static int warn_set(const char *val, struct kernel_param *kp)
++static int warn_set(const char *val, const struct kernel_param *kp)
+ {
+ printk(KERN_INFO KBUILD_MODNAME
+ ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
+diff --git a/net/netfilter/nf_nat_irc.c b/net/netfilter/nf_nat_irc.c
+index 1fb2258..8039bcd 100644
+--- a/net/netfilter/nf_nat_irc.c
++++ b/net/netfilter/nf_nat_irc.c
+@@ -107,7 +107,7 @@ static int __init nf_nat_irc_init(void)
+ }
+
+ /* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */
+-static int warn_set(const char *val, struct kernel_param *kp)
++static int warn_set(const char *val, const struct kernel_param *kp)
+ {
+ printk(KERN_INFO KBUILD_MODNAME
+ ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
index c68c1e5..8b5d670 100644
--- a/net/netfilter/nf_sockopt.c
@@ -129624,10 +155295,10 @@ index c68c1e5..8b5d670 100644
}
EXPORT_SYMBOL(nf_unregister_sockopt);
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
-index 2cb429d..77adda0 100644
+index 2011977..ba46f29 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
-@@ -555,7 +555,7 @@ static int nf_tables_gettable(struct sock *nlsk, struct sk_buff *skb,
+@@ -555,7 +555,7 @@ static int nf_tables_gettable(struct net *net, struct sock *nlsk,
int err;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129636,7 +155307,7 @@ index 2cb429d..77adda0 100644
.dump = nf_tables_dump_tables,
};
return netlink_dump_start(nlsk, skb, nlh, &c);
-@@ -1112,7 +1112,7 @@ static int nf_tables_getchain(struct sock *nlsk, struct sk_buff *skb,
+@@ -1109,7 +1109,7 @@ static int nf_tables_getchain(struct net *net, struct sock *nlsk,
int err;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129645,7 +155316,7 @@ index 2cb429d..77adda0 100644
.dump = nf_tables_dump_chains,
};
return netlink_dump_start(nlsk, skb, nlh, &c);
-@@ -1943,7 +1943,7 @@ static int nf_tables_getrule(struct sock *nlsk, struct sk_buff *skb,
+@@ -1935,7 +1935,7 @@ static int nf_tables_getrule(struct net *net, struct sock *nlsk,
int err;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129654,7 +155325,7 @@ index 2cb429d..77adda0 100644
.dump = nf_tables_dump_rules,
};
return netlink_dump_start(nlsk, skb, nlh, &c);
-@@ -2630,7 +2630,7 @@ static int nf_tables_getset(struct sock *nlsk, struct sk_buff *skb,
+@@ -2622,7 +2622,7 @@ static int nf_tables_getset(struct net *net, struct sock *nlsk,
return err;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129663,7 +155334,7 @@ index 2cb429d..77adda0 100644
.dump = nf_tables_dump_sets,
.done = nf_tables_dump_sets_done,
};
-@@ -2641,9 +2641,8 @@ static int nf_tables_getset(struct sock *nlsk, struct sk_buff *skb,
+@@ -2633,9 +2633,8 @@ static int nf_tables_getset(struct net *net, struct sock *nlsk,
return -ENOMEM;
*ctx_dump = ctx;
@@ -129674,7 +155345,7 @@ index 2cb429d..77adda0 100644
}
/* Only accept unspec with dump */
-@@ -3222,7 +3221,7 @@ static int nf_tables_getsetelem(struct sock *nlsk, struct sk_buff *skb,
+@@ -3226,7 +3225,7 @@ static int nf_tables_getsetelem(struct net *net, struct sock *nlsk,
return -ENOENT;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129684,10 +155355,10 @@ index 2cb429d..77adda0 100644
};
return netlink_dump_start(nlsk, skb, nlh, &c);
diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c
-index fefbf5f..996b6ef 100644
+index 5274b04..12fded1 100644
--- a/net/netfilter/nfnetlink_acct.c
+++ b/net/netfilter/nfnetlink_acct.c
-@@ -263,10 +263,11 @@ nfnl_acct_get(struct sock *nfnl, struct sk_buff *skb,
+@@ -261,10 +261,11 @@ static int nfnl_acct_get(struct net *net, struct sock *nfnl,
char *acct_name;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129700,7 +155371,7 @@ index fefbf5f..996b6ef 100644
if (tb[NFACCT_FILTER]) {
struct nfacct_filter *filter;
-@@ -275,9 +276,9 @@ nfnl_acct_get(struct sock *nfnl, struct sk_buff *skb,
+@@ -273,9 +274,9 @@ static int nfnl_acct_get(struct net *net, struct sock *nfnl,
if (IS_ERR(filter))
return PTR_ERR(filter);
@@ -129713,10 +155384,10 @@ index fefbf5f..996b6ef 100644
if (!tb[NFACCT_NAME])
diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
-index 54330fb..77d3fb1 100644
+index e924e95..1e2e233 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
-@@ -510,7 +510,7 @@ nfnl_cthelper_get(struct sock *nfnl, struct sk_buff *skb,
+@@ -510,7 +510,7 @@ static int nfnl_cthelper_get(struct net *net, struct sock *nfnl,
bool tuple_set = false;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129726,10 +155397,10 @@ index 54330fb..77d3fb1 100644
};
return netlink_dump_start(nfnl, skb, nlh, &c);
diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c
-index c7a2d0e..272225e 100644
+index 2671b9d..e518410 100644
--- a/net/netfilter/nfnetlink_cttimeout.c
+++ b/net/netfilter/nfnetlink_cttimeout.c
-@@ -250,7 +250,7 @@ cttimeout_get_timeout(struct sock *ctnl, struct sk_buff *skb,
+@@ -248,7 +248,7 @@ static int cttimeout_get_timeout(struct net *net, struct sock *ctnl,
struct ctnl_timeout *cur;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
@@ -129739,7 +155410,7 @@ index c7a2d0e..272225e 100644
};
return netlink_dump_start(ctnl, skb, nlh, &c);
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
-index 740cce4..4672d73 100644
+index 8ca9320..e509290 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -85,7 +85,7 @@ static int nfnl_log_net_id __read_mostly;
@@ -129751,7 +155422,7 @@ index 740cce4..4672d73 100644
};
static struct nfnl_log_net *nfnl_log_pernet(struct net *net)
-@@ -575,7 +575,7 @@ __build_packet_message(struct nfnl_log_net *log,
+@@ -571,7 +571,7 @@ __build_packet_message(struct nfnl_log_net *log,
/* global sequence number */
if ((inst->flags & NFULNL_CFG_F_SEQ_GLOBAL) &&
nla_put_be32(inst->skb, NFULA_SEQ_GLOBAL,
@@ -129761,7 +155432,7 @@ index 740cce4..4672d73 100644
if (ct && nfnl_ct->build(inst->skb, ct, ctinfo,
diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
-index 9c8fab0..5080c7c 100644
+index 454841b..c8868616 100644
--- a/net/netfilter/nft_compat.c
+++ b/net/netfilter/nft_compat.c
@@ -322,14 +322,7 @@ static void nft_match_eval(const struct nft_expr *expr,
@@ -129780,6 +155451,49 @@ index 9c8fab0..5080c7c 100644
}
static const struct nla_policy nft_match_policy[NFTA_MATCH_MAX + 1] = {
+diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c
+index 29d2c31..bf2c6a0 100644
+--- a/net/netfilter/xt_IDLETIMER.c
++++ b/net/netfilter/xt_IDLETIMER.c
+@@ -41,19 +41,13 @@
+ #include <linux/workqueue.h>
+ #include <linux/sysfs.h>
+
+-struct idletimer_tg_attr {
+- struct attribute attr;
+- ssize_t (*show)(struct kobject *kobj,
+- struct attribute *attr, char *buf);
+-};
+-
+ struct idletimer_tg {
+ struct list_head entry;
+ struct timer_list timer;
+ struct work_struct work;
+
+ struct kobject *kobj;
+- struct idletimer_tg_attr attr;
++ struct device_attribute attr;
+
+ unsigned int refcnt;
+ };
+@@ -78,7 +72,7 @@ struct idletimer_tg *__idletimer_tg_find_by_label(const char *label)
+ return NULL;
+ }
+
+-static ssize_t idletimer_tg_show(struct kobject *kobj, struct attribute *attr,
++static ssize_t idletimer_tg_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+ {
+ struct idletimer_tg *timer;
+@@ -86,7 +80,7 @@ static ssize_t idletimer_tg_show(struct kobject *kobj, struct attribute *attr,
+
+ mutex_lock(&list_mutex);
+
+- timer = __idletimer_tg_find_by_label(attr->name);
++ timer = __idletimer_tg_find_by_label(attr->attr.name);
+ if (timer)
+ expires = timer->timer.expires;
+
diff --git a/net/netfilter/xt_gradm.c b/net/netfilter/xt_gradm.c
new file mode 100644
index 0000000..a7cb915
@@ -129903,7 +155617,7 @@ index 11de55e..f25e448 100644
return 0;
}
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
-index 59651af..45b9a6e 100644
+index f1ffb34..4e5a217 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -287,7 +287,7 @@ static void netlink_overrun(struct sock *sk)
@@ -129915,7 +155629,7 @@ index 59651af..45b9a6e 100644
}
static void netlink_rcv_wake(struct sock *sk)
-@@ -2876,7 +2876,9 @@ errout_skb:
+@@ -2877,7 +2877,9 @@ errout_skb:
int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
const struct nlmsghdr *nlh,
@@ -129926,7 +155640,7 @@ index 59651af..45b9a6e 100644
{
struct netlink_callback *cb;
struct sock *sk;
-@@ -2908,7 +2910,7 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
+@@ -2909,7 +2911,7 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
goto error_unlock;
}
/* add reference of module which cb->dump belongs to */
@@ -129935,7 +155649,7 @@ index 59651af..45b9a6e 100644
ret = -EPROTONOSUPPORT;
goto error_unlock;
}
-@@ -2918,8 +2920,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
+@@ -2920,8 +2922,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
cb->dump = control->dump;
cb->done = control->done;
cb->nlh = nlh;
@@ -129946,7 +155660,7 @@ index 59651af..45b9a6e 100644
cb->min_dump_alloc = control->min_dump_alloc;
cb->skb = skb;
-@@ -3183,7 +3185,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
+@@ -3188,7 +3190,7 @@ static int netlink_seq_show(struct seq_file *seq, void *v)
sk_wmem_alloc_get(s),
nlk->cb_running,
atomic_read(&s->sk_refcnt),
@@ -129969,10 +155683,10 @@ index 3ee63a3cf..d6df4d8 100644
};
return netlink_dump_start(net->diag_nlsk, skb, h, &c);
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
-index bc0e504..9a71c81 100644
+index f830326..162f6da 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
-@@ -573,26 +573,24 @@ static int genl_family_rcv_msg(struct genl_family *family,
+@@ -587,28 +587,26 @@ static int genl_family_rcv_msg(struct genl_family *family,
return -EOPNOTSUPP;
if (!family->parallel_ops) {
@@ -129981,6 +155695,7 @@ index bc0e504..9a71c81 100644
- /* we have const, but the netlink API doesn't */
- .data = (void *)ops,
+ static struct netlink_dump_control c = {
+ .start = genl_lock_start,
.dump = genl_lock_dumpit,
.done = genl_lock_done,
};
@@ -129996,6 +155711,7 @@ index bc0e504..9a71c81 100644
- struct netlink_dump_control c = {
- .module = family->module,
+ netlink_dump_control_no_const c = {
+ .start = ops->start,
.dump = ops->dumpit,
.done = ops->done,
};
@@ -130005,46 +155721,63 @@ index bc0e504..9a71c81 100644
}
return rc;
-diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
-index c88d0f2..2d59df5 100644
---- a/net/openvswitch/actions.c
-+++ b/net/openvswitch/actions.c
-@@ -1160,17 +1160,26 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
- const struct sw_flow_actions *acts,
- struct sw_flow_key *key)
- {
-- int level = this_cpu_read(exec_actions_level);
-- int err;
-+ static const int ovs_recursion_limit = 5;
-+ int err, level;
-+
-+ level = __this_cpu_inc_return(exec_actions_level);
-+ if (unlikely(level > ovs_recursion_limit)) {
-+ net_crit_ratelimited("ovs: recursion limit reached on datapath %s, probable configuration error\n",
-+ ovs_dp_name(dp));
-+ kfree_skb(skb);
-+ err = -ENETDOWN;
-+ goto out;
-+ }
-
-- this_cpu_inc(exec_actions_level);
- err = do_execute_actions(dp, skb, key,
- acts->actions, acts->actions_len);
+diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
+index 30ab8e1..00ff20a 100644
+--- a/net/openvswitch/vport-geneve.c
++++ b/net/openvswitch/vport-geneve.c
+@@ -111,12 +111,17 @@ static struct vport *geneve_create(const struct vport_parms *parms)
+ return ovs_netdev_link(vport, parms->name);
+ }
-- if (!level)
-+ if (level == 1)
- process_deferred_actions(dp);
++static netdev_tx_t geneve_send(struct sk_buff *skb)
++{
++ return dev_queue_xmit(skb);
++}
++
+ static struct vport_ops ovs_geneve_vport_ops = {
+ .type = OVS_VPORT_TYPE_GENEVE,
+ .create = geneve_create,
+ .destroy = ovs_netdev_tunnel_destroy,
+ .get_options = geneve_get_options,
+- .send = dev_queue_xmit,
++ .send = geneve_send,
+ };
-- this_cpu_dec(exec_actions_level);
-+out:
-+ __this_cpu_dec(exec_actions_level);
- return err;
+ static int __init ovs_geneve_tnl_init(void)
+diff --git a/net/openvswitch/vport-gre.c b/net/openvswitch/vport-gre.c
+index 7f8897f..15b61a2 100644
+--- a/net/openvswitch/vport-gre.c
++++ b/net/openvswitch/vport-gre.c
+@@ -84,10 +84,15 @@ static struct vport *gre_create(const struct vport_parms *parms)
+ return ovs_netdev_link(vport, parms->name);
}
++static netdev_tx_t gre_send(struct sk_buff *skb)
++{
++ return dev_queue_xmit(skb);
++}
++
+ static struct vport_ops ovs_gre_vport_ops = {
+ .type = OVS_VPORT_TYPE_GRE,
+ .create = gre_create,
+- .send = dev_queue_xmit,
++ .send = gre_send,
+ .destroy = ovs_netdev_tunnel_destroy,
+ };
+
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
-index ec76398..52091dd 100644
+index ec76398..81d562c 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
+@@ -44,7 +44,7 @@ static struct internal_dev *internal_dev_priv(struct net_device *netdev)
+ }
+
+ /* Called with rcu_read_lock_bh. */
+-static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
++static netdev_tx_t internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev)
+ {
+ int len, err;
+
@@ -147,7 +147,7 @@ static const struct net_device_ops internal_dev_netdev_ops = {
.ndo_get_stats64 = internal_get_stats,
};
@@ -130054,6 +155787,51 @@ index ec76398..52091dd 100644
.kind = "openvswitch",
};
+diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
+index 6a6adf3..055fe97 100644
+--- a/net/openvswitch/vport-netdev.c
++++ b/net/openvswitch/vport-netdev.c
+@@ -204,11 +204,16 @@ struct vport *ovs_netdev_get_vport(struct net_device *dev)
+ return NULL;
+ }
+
++static netdev_tx_t netdev_send(struct sk_buff *skb)
++{
++ return dev_queue_xmit(skb);
++}
++
+ static struct vport_ops ovs_netdev_vport_ops = {
+ .type = OVS_VPORT_TYPE_NETDEV,
+ .create = netdev_create,
+ .destroy = netdev_destroy,
+- .send = dev_queue_xmit,
++ .send = netdev_send,
+ };
+
+ int __init ovs_netdev_init(void)
+diff --git a/net/openvswitch/vport-vxlan.c b/net/openvswitch/vport-vxlan.c
+index 5eb7694..58d8f08 100644
+--- a/net/openvswitch/vport-vxlan.c
++++ b/net/openvswitch/vport-vxlan.c
+@@ -148,12 +148,17 @@ static struct vport *vxlan_create(const struct vport_parms *parms)
+ return ovs_netdev_link(vport, parms->name);
+ }
+
++static netdev_tx_t vxlan_send(struct sk_buff *skb)
++{
++ return dev_queue_xmit(skb);
++}
++
+ static struct vport_ops ovs_vxlan_netdev_vport_ops = {
+ .type = OVS_VPORT_TYPE_VXLAN,
+ .create = vxlan_create,
+ .destroy = ovs_netdev_tunnel_destroy,
+ .get_options = vxlan_get_options,
+- .send = dev_queue_xmit,
++ .send = vxlan_send,
+ };
+
+ static int __init ovs_vxlan_tnl_init(void)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index da1ae0e1..3eb11c3 100644
--- a/net/packet/af_packet.c
@@ -130389,6 +156167,23 @@ index 9d6ddba..da3cd96 100644
sizeof(val));
set_fs(oldfs);
}
+diff --git a/net/rds/tcp.h b/net/rds/tcp.h
+index 64f873c..a52c8aa 100644
+--- a/net/rds/tcp.h
++++ b/net/rds/tcp.h
+@@ -13,9 +13,9 @@ struct rds_tcp_connection {
+ struct list_head t_tcp_node;
+ struct rds_connection *conn;
+ struct socket *t_sock;
+- void *t_orig_write_space;
+- void *t_orig_data_ready;
+- void *t_orig_state_change;
++ void (*t_orig_write_space)(struct sock *sk);
++ void (*t_orig_data_ready)(struct sock *sk);
++ void (*t_orig_state_change)(struct sock *sk);
+
+ struct rds_tcp_incoming *t_tinc;
+ size_t t_tinc_hdr_rem;
diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
index 2894e60..f9c01ac 100644
--- a/net/rds/tcp_send.c
@@ -130403,7 +156198,7 @@ index 2894e60..f9c01ac 100644
set_fs(oldfs);
}
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
-index 1f8a144..2c93350 100644
+index 7e2d105..c060cb7 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -40,7 +40,7 @@ static const struct proto_ops rxrpc_rpc_ops;
@@ -130801,7 +156596,7 @@ index ce46f1c..47ef3e1 100644
/* Initialize IPv6 support and register with socket layer. */
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
-index 8b4ff31..9e73fb3 100644
+index 1099e99..e309828 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -216,6 +216,7 @@ int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,
@@ -130866,19 +156661,10 @@ index 5d6a03f..7fe971e 100644
retval->next_tsn = retval->c.initial_tsn;
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
-index 6098d4c..9920c54 100644
+index b5327bb..807f714 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
-@@ -63,7 +63,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
- static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
- sctp_state_t state,
- struct sctp_endpoint *ep,
-- struct sctp_association *asoc,
-+ struct sctp_association **asoc,
- void *event_arg,
- sctp_disposition_t status,
- sctp_cmd_seq_t *commands,
-@@ -443,7 +443,7 @@ static void sctp_generate_sack_event(unsigned long data)
+@@ -431,7 +431,7 @@ static void sctp_generate_sack_event(unsigned long data)
sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_SACK);
}
@@ -130887,130 +156673,17 @@ index 6098d4c..9920c54 100644
NULL,
sctp_generate_t1_cookie_event,
sctp_generate_t1_init_event,
-@@ -1123,7 +1123,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
- debug_post_sfn();
-
- error = sctp_side_effects(event_type, subtype, state,
-- ep, asoc, event_arg, status,
-+ ep, &asoc, event_arg, status,
- &commands, gfp);
- debug_post_sfx();
-
-@@ -1136,7 +1136,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
- static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
- sctp_state_t state,
- struct sctp_endpoint *ep,
-- struct sctp_association *asoc,
-+ struct sctp_association **asoc,
- void *event_arg,
- sctp_disposition_t status,
- sctp_cmd_seq_t *commands,
-@@ -1151,7 +1151,7 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
- * disposition SCTP_DISPOSITION_CONSUME.
- */
- if (0 != (error = sctp_cmd_interpreter(event_type, subtype, state,
-- ep, asoc,
-+ ep, *asoc,
- event_arg, status,
- commands, gfp)))
- goto bail;
-@@ -1174,11 +1174,12 @@ static int sctp_side_effects(sctp_event_t event_type, sctp_subtype_t subtype,
- break;
-
- case SCTP_DISPOSITION_DELETE_TCB:
-+ case SCTP_DISPOSITION_ABORT:
- /* This should now be a command. */
-+ *asoc = NULL;
- break;
-
- case SCTP_DISPOSITION_CONSUME:
-- case SCTP_DISPOSITION_ABORT:
- /*
- * We should no longer have much work to do here as the
- * real work has been done as explicit commands above.
-diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
-index 22c2bf3..f1f08c8 100644
---- a/net/sctp/sm_statefuns.c
-+++ b/net/sctp/sm_statefuns.c
-@@ -2976,7 +2976,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(struct net *net,
- SCTP_INC_STATS(net, SCTP_MIB_IN_DATA_CHUNK_DISCARDS);
- goto discard_force;
- case SCTP_IERROR_NO_DATA:
-- goto consume;
-+ return SCTP_DISPOSITION_ABORT;
- case SCTP_IERROR_PROTO_VIOLATION:
- return sctp_sf_abort_violation(net, ep, asoc, chunk, commands,
- (u8 *)chunk->subh.data_hdr, sizeof(sctp_datahdr_t));
-@@ -3043,9 +3043,6 @@ discard_noforce:
- sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, force);
-
- return SCTP_DISPOSITION_DISCARD;
--consume:
-- return SCTP_DISPOSITION_CONSUME;
--
- }
-
- /*
-@@ -3093,7 +3090,7 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
- case SCTP_IERROR_BAD_STREAM:
- break;
- case SCTP_IERROR_NO_DATA:
-- goto consume;
-+ return SCTP_DISPOSITION_ABORT;
- case SCTP_IERROR_PROTO_VIOLATION:
- return sctp_sf_abort_violation(net, ep, asoc, chunk, commands,
- (u8 *)chunk->subh.data_hdr, sizeof(sctp_datahdr_t));
-@@ -3119,7 +3116,6 @@ sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
- SCTP_TO(SCTP_EVENT_TIMEOUT_T2_SHUTDOWN));
- }
-
--consume:
- return SCTP_DISPOSITION_CONSUME;
- }
-
-@@ -4825,9 +4821,6 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
- * if necessary to fill gaps.
- */
- struct sctp_chunk *abort = arg;
-- sctp_disposition_t retval;
--
-- retval = SCTP_DISPOSITION_CONSUME;
-
- if (abort)
- sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
-@@ -4845,7 +4838,7 @@ sctp_disposition_t sctp_sf_do_9_1_prm_abort(
- SCTP_INC_STATS(net, SCTP_MIB_ABORTEDS);
- SCTP_DEC_STATS(net, SCTP_MIB_CURRESTAB);
-
-- return retval;
-+ return SCTP_DISPOSITION_ABORT;
- }
-
- /* We tried an illegal operation on an association which is closed. */
-@@ -4960,12 +4953,10 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort(
- sctp_cmd_seq_t *commands)
- {
- struct sctp_chunk *abort = arg;
-- sctp_disposition_t retval;
-
- /* Stop T1-init timer */
- sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP,
- SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT));
-- retval = SCTP_DISPOSITION_CONSUME;
-
- if (abort)
- sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
-@@ -4985,7 +4976,7 @@ sctp_disposition_t sctp_sf_cookie_wait_prm_abort(
- sctp_add_cmd_sf(commands, SCTP_CMD_INIT_FAILED,
- SCTP_PERR(SCTP_ERROR_USER_ABORT));
-
-- return retval;
-+ return SCTP_DISPOSITION_ABORT;
- }
-
- /*
+@@ -1095,7 +1095,7 @@ int sctp_do_sm(struct net *net, sctp_event_t event_type, sctp_subtype_t subtype,
+ const sctp_sm_table_entry_t *state_fn;
+ sctp_disposition_t status;
+ int error = 0;
+- typedef const char *(printfn_t)(sctp_subtype_t);
++ typedef const char *(printfn_t)(const sctp_subtype_t);
+ static printfn_t *table[] = {
+ NULL, sctp_cname, sctp_tname, sctp_oname, sctp_pname,
+ };
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
-index be1489f..9d8cbd9 100644
+index e878da0..f0f6b12 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -386,7 +386,8 @@ static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
@@ -131031,7 +156704,7 @@ index be1489f..9d8cbd9 100644
SCTP_ADDR_NEW, GFP_ATOMIC);
addr_buf += af->sockaddr_len;
}
-@@ -2192,11 +2194,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
+@@ -2188,11 +2190,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
{
struct sctp_association *asoc;
struct sctp_ulpevent *event;
@@ -131046,7 +156719,7 @@ index be1489f..9d8cbd9 100644
/* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
* if there is no data to be sent or retransmit, the stack will
-@@ -4371,13 +4375,16 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
+@@ -4367,13 +4371,16 @@ static int sctp_getsockopt_disable_fragments(struct sock *sk, int len,
static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
int __user *optlen)
{
@@ -131064,7 +156737,7 @@ index be1489f..9d8cbd9 100644
return -EFAULT;
return 0;
}
-@@ -4395,6 +4402,8 @@ static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
+@@ -4391,6 +4398,8 @@ static int sctp_getsockopt_events(struct sock *sk, int len, char __user *optval,
*/
static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optval, int __user *optlen)
{
@@ -131073,7 +156746,7 @@ index be1489f..9d8cbd9 100644
/* Applicable to UDP-style socket only */
if (sctp_style(sk, TCP))
return -EOPNOTSUPP;
-@@ -4403,7 +4412,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv
+@@ -4399,7 +4408,8 @@ static int sctp_getsockopt_autoclose(struct sock *sk, int len, char __user *optv
len = sizeof(int);
if (put_user(len, optlen))
return -EFAULT;
@@ -131083,7 +156756,7 @@ index be1489f..9d8cbd9 100644
return -EFAULT;
return 0;
}
-@@ -4777,12 +4787,15 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
+@@ -4773,12 +4783,15 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
*/
static int sctp_getsockopt_initmsg(struct sock *sk, int len, char __user *optval, int __user *optlen)
{
@@ -131100,7 +156773,7 @@ index be1489f..9d8cbd9 100644
return -EFAULT;
return 0;
}
-@@ -4823,6 +4836,8 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
+@@ -4819,6 +4832,8 @@ static int sctp_getsockopt_peer_addrs(struct sock *sk, int len,
->addr_to_user(sp, &temp);
if (space_left < addrlen)
return -ENOMEM;
@@ -131110,10 +156783,10 @@ index be1489f..9d8cbd9 100644
return -EFAULT;
to += addrlen;
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
-index 3e0fc51..289fe22 100644
+index daf8554..4ab495b 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
-@@ -317,7 +317,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,
+@@ -324,7 +324,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,
loff_t *ppos)
{
struct net *net = current->nsproxy->net_ns;
@@ -131122,7 +156795,7 @@ index 3e0fc51..289fe22 100644
bool changed = false;
char *none = "none";
char tmp[8] = {0};
-@@ -365,7 +365,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,
+@@ -372,7 +372,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,
struct net *net = current->nsproxy->net_ns;
unsigned int min = *(unsigned int *) ctl->extra1;
unsigned int max = *(unsigned int *) ctl->extra2;
@@ -131131,7 +156804,7 @@ index 3e0fc51..289fe22 100644
int ret, new_value;
memset(&tbl, 0, sizeof(struct ctl_table));
-@@ -394,7 +394,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write,
+@@ -401,7 +401,7 @@ static int proc_sctp_do_rto_max(struct ctl_table *ctl, int write,
struct net *net = current->nsproxy->net_ns;
unsigned int min = *(unsigned int *) ctl->extra1;
unsigned int max = *(unsigned int *) ctl->extra2;
@@ -131140,7 +156813,7 @@ index 3e0fc51..289fe22 100644
int ret, new_value;
memset(&tbl, 0, sizeof(struct ctl_table));
-@@ -432,7 +432,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
+@@ -439,7 +439,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
loff_t *ppos)
{
struct net *net = current->nsproxy->net_ns;
@@ -131149,7 +156822,7 @@ index 3e0fc51..289fe22 100644
int new_value, ret;
memset(&tbl, 0, sizeof(struct ctl_table));
-@@ -459,7 +459,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
+@@ -466,7 +466,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write,
int sctp_sysctl_net_register(struct net *net)
{
@@ -131159,7 +156832,7 @@ index 3e0fc51..289fe22 100644
table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
diff --git a/net/socket.c b/net/socket.c
-index 263b334..bcfd0d6 100644
+index db13ae8..dabfbea 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -89,6 +89,7 @@
@@ -131369,7 +157042,7 @@ index 263b334..bcfd0d6 100644
ctl_len))
goto out_freectl;
msg_sys->msg_control = ctl_buf;
-@@ -2072,7 +2137,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
+@@ -2073,7 +2138,7 @@ static int ___sys_recvmsg(struct socket *sock, struct user_msghdr __user *msg,
ssize_t err;
/* kernel mode address */
@@ -131378,7 +157051,7 @@ index 263b334..bcfd0d6 100644
/* user mode address pointers */
struct sockaddr __user *uaddr;
-@@ -2717,7 +2782,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
+@@ -2719,7 +2784,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
ifr = compat_alloc_user_space(buf_size);
rxnfc = (void __user *)ifr + ALIGN(sizeof(struct ifreq), 8);
@@ -131387,7 +157060,7 @@ index 263b334..bcfd0d6 100644
return -EFAULT;
if (put_user(convert_in ? rxnfc : compat_ptr(data),
-@@ -2828,7 +2893,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
+@@ -2830,7 +2895,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd,
old_fs = get_fs();
set_fs(KERNEL_DS);
err = dev_ioctl(net, cmd,
@@ -131396,7 +157069,7 @@ index 263b334..bcfd0d6 100644
set_fs(old_fs);
return err;
-@@ -2921,7 +2986,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
+@@ -2923,7 +2988,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd,
old_fs = get_fs();
set_fs(KERNEL_DS);
@@ -131405,7 +157078,7 @@ index 263b334..bcfd0d6 100644
set_fs(old_fs);
if (cmd == SIOCGIFMAP && !err) {
-@@ -3005,7 +3070,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
+@@ -3007,7 +3072,7 @@ static int routing_ioctl(struct net *net, struct socket *sock,
ret |= get_user(rtdev, &(ur4->rt_dev));
if (rtdev) {
ret |= copy_from_user(devname, compat_ptr(rtdev), 15);
@@ -131414,7 +157087,7 @@ index 263b334..bcfd0d6 100644
devname[15] = 0;
} else
r4.rt_dev = NULL;
-@@ -3232,8 +3297,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
+@@ -3234,8 +3299,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname,
int __user *uoptlen;
int err;
@@ -131425,7 +157098,7 @@ index 263b334..bcfd0d6 100644
set_fs(KERNEL_DS);
if (level == SOL_SOCKET)
-@@ -3253,7 +3318,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
+@@ -3255,7 +3320,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname,
char __user *uoptval;
int err;
@@ -131446,6 +157119,75 @@ index 04ce2c0..b1dd1bd 100644
help
This option enables a sysctl-based debugging interface
that is be used by the 'rpcdebug' utility to turn on or off
+diff --git a/net/sunrpc/auth_gss/gss_rpc_upcall.c b/net/sunrpc/auth_gss/gss_rpc_upcall.c
+index f0c6a8c..3acb459 100644
+--- a/net/sunrpc/auth_gss/gss_rpc_upcall.c
++++ b/net/sunrpc/auth_gss/gss_rpc_upcall.c
+@@ -55,8 +55,8 @@ enum {
+ #define PROC(proc, name) \
+ [GSSX_##proc] = { \
+ .p_proc = GSSX_##proc, \
+- .p_encode = (kxdreproc_t)gssx_enc_##name, \
+- .p_decode = (kxdrdproc_t)gssx_dec_##name, \
++ .p_encode = gssx_enc_##name, \
++ .p_decode = gssx_dec_##name, \
+ .p_arglen = GSSX_ARG_##name##_sz, \
+ .p_replen = GSSX_RES_##name##_sz, \
+ .p_statidx = GSSX_##proc, \
+diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
+index eeeba5a..c0d96a1 100644
+--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
++++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
+@@ -731,10 +731,12 @@ static int gssx_enc_cb(struct xdr_stream *xdr, struct gssx_cb *cb)
+ return err;
+ }
+
+-void gssx_enc_accept_sec_context(struct rpc_rqst *req,
++void gssx_enc_accept_sec_context(void *_req,
+ struct xdr_stream *xdr,
+- struct gssx_arg_accept_sec_context *arg)
++ void *_arg)
+ {
++ struct rpc_rqst *req = _req;
++ struct gssx_arg_accept_sec_context *arg = _arg;
+ int err;
+
+ err = gssx_enc_call_ctx(xdr, &arg->call_ctx);
+@@ -787,10 +789,11 @@ done:
+ dprintk("RPC: gssx_enc_accept_sec_context: %d\n", err);
+ }
+
+-int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
++int gssx_dec_accept_sec_context(void *rqstp,
+ struct xdr_stream *xdr,
+- struct gssx_res_accept_sec_context *res)
++ void *_res)
+ {
++ struct gssx_res_accept_sec_context *res = _res;
+ u32 value_follows;
+ int err;
+ struct page *scratch;
+diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.h b/net/sunrpc/auth_gss/gss_rpc_xdr.h
+index 9d88c62..53396b6 100644
+--- a/net/sunrpc/auth_gss/gss_rpc_xdr.h
++++ b/net/sunrpc/auth_gss/gss_rpc_xdr.h
+@@ -177,12 +177,12 @@ struct gssx_res_accept_sec_context {
+ #define gssx_dec_store_cred NULL
+ #define gssx_enc_init_sec_context NULL
+ #define gssx_dec_init_sec_context NULL
+-void gssx_enc_accept_sec_context(struct rpc_rqst *req,
++void gssx_enc_accept_sec_context(void *req,
+ struct xdr_stream *xdr,
+- struct gssx_arg_accept_sec_context *args);
+-int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
++ void *args);
++int gssx_dec_accept_sec_context(void *rqstp,
+ struct xdr_stream *xdr,
+- struct gssx_res_accept_sec_context *res);
++ void *res);
+ #define gssx_enc_release_handle NULL
+ #define gssx_dec_release_handle NULL
+ #define gssx_enc_get_mic NULL
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 1095be9..815d777 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
@@ -131469,7 +157211,7 @@ index 1095be9..815d777 100644
/* make a copy for the caller */
*handle = ctxh;
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
-index 21e2035..2e567b1 100644
+index 273bc3a..1a4b204 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1623,7 +1623,7 @@ static int create_cache_proc_entries(struct cache_detail *cd, struct net *net)
@@ -131482,10 +157224,10 @@ index 21e2035..2e567b1 100644
goto out_nomem;
cd->u.procfs.channel_ent = NULL;
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
-index 23608eb..f2b5208 100644
+index b7f2104..62e2195d 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
-@@ -1428,7 +1428,9 @@ call_start(struct rpc_task *task)
+@@ -1429,7 +1429,9 @@ call_start(struct rpc_task *task)
(RPC_IS_ASYNC(task) ? "async" : "sync"));
/* Increment call count */
@@ -131496,6 +157238,179 @@ index 23608eb..f2b5208 100644
clnt->cl_stats->rpccnt++;
task->tk_action = call_reserve;
}
+diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
+index cf5770d..6309968 100644
+--- a/net/sunrpc/rpcb_clnt.c
++++ b/net/sunrpc/rpcb_clnt.c
+@@ -844,9 +844,11 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
+ * XDR functions for rpcbind
+ */
+
+-static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct rpcbind_args *rpcb)
++static void rpcb_enc_mapping(void *_req, struct xdr_stream *xdr,
++ void *_rpcb)
+ {
++ struct rpc_rqst *req = _req;
++ const struct rpcbind_args *rpcb = _rpcb;
+ __be32 *p;
+
+ dprintk("RPC: %5u encoding PMAP_%s call (%u, %u, %d, %u)\n",
+@@ -861,9 +863,11 @@ static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr,
+ *p = cpu_to_be32(rpcb->r_port);
+ }
+
+-static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct rpcbind_args *rpcb)
++static int rpcb_dec_getport(void *_req, struct xdr_stream *xdr,
++ void *_rpcb)
+ {
++ struct rpc_rqst *req = _req;
++ struct rpcbind_args *rpcb = _rpcb;
+ unsigned long port;
+ __be32 *p;
+
+@@ -883,9 +887,11 @@ static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr,
+ return 0;
+ }
+
+-static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr,
+- unsigned int *boolp)
++static int rpcb_dec_set(void *_req, struct xdr_stream *xdr,
++ void *_boolp)
+ {
++ struct rpc_rqst *req = _req;
++ unsigned int *boolp = _boolp;
+ __be32 *p;
+
+ p = xdr_inline_decode(xdr, 4);
+@@ -918,9 +924,11 @@ static void encode_rpcb_string(struct xdr_stream *xdr, const char *string,
+ xdr_encode_opaque(p, string, len);
+ }
+
+-static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
+- const struct rpcbind_args *rpcb)
++static void rpcb_enc_getaddr(void *_req, struct xdr_stream *xdr,
++ void *_rpcb)
+ {
++ struct rpc_rqst *req = _req;
++ const struct rpcbind_args *rpcb = _rpcb;
+ __be32 *p;
+
+ dprintk("RPC: %5u encoding RPCB_%s call (%u, %u, '%s', '%s')\n",
+@@ -938,9 +946,11 @@ static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
+ encode_rpcb_string(xdr, rpcb->r_owner, RPCB_MAXOWNERLEN);
+ }
+
+-static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
+- struct rpcbind_args *rpcb)
++static int rpcb_dec_getaddr(void *_req, struct xdr_stream *xdr,
++ void *_rpcb)
+ {
++ struct rpc_rqst *req = _req;
++ struct rpcbind_args *rpcb = _rpcb;
+ struct sockaddr_storage address;
+ struct sockaddr *sap = (struct sockaddr *)&address;
+ __be32 *p;
+@@ -994,8 +1004,8 @@ out_fail:
+ static struct rpc_procinfo rpcb_procedures2[] = {
+ [RPCBPROC_SET] = {
+ .p_proc = RPCBPROC_SET,
+- .p_encode = (kxdreproc_t)rpcb_enc_mapping,
+- .p_decode = (kxdrdproc_t)rpcb_dec_set,
++ .p_encode = rpcb_enc_mapping,
++ .p_decode = rpcb_dec_set,
+ .p_arglen = RPCB_mappingargs_sz,
+ .p_replen = RPCB_setres_sz,
+ .p_statidx = RPCBPROC_SET,
+@@ -1004,8 +1014,8 @@ static struct rpc_procinfo rpcb_procedures2[] = {
+ },
+ [RPCBPROC_UNSET] = {
+ .p_proc = RPCBPROC_UNSET,
+- .p_encode = (kxdreproc_t)rpcb_enc_mapping,
+- .p_decode = (kxdrdproc_t)rpcb_dec_set,
++ .p_encode = rpcb_enc_mapping,
++ .p_decode = rpcb_dec_set,
+ .p_arglen = RPCB_mappingargs_sz,
+ .p_replen = RPCB_setres_sz,
+ .p_statidx = RPCBPROC_UNSET,
+@@ -1014,8 +1024,8 @@ static struct rpc_procinfo rpcb_procedures2[] = {
+ },
+ [RPCBPROC_GETPORT] = {
+ .p_proc = RPCBPROC_GETPORT,
+- .p_encode = (kxdreproc_t)rpcb_enc_mapping,
+- .p_decode = (kxdrdproc_t)rpcb_dec_getport,
++ .p_encode = rpcb_enc_mapping,
++ .p_decode = rpcb_dec_getport,
+ .p_arglen = RPCB_mappingargs_sz,
+ .p_replen = RPCB_getportres_sz,
+ .p_statidx = RPCBPROC_GETPORT,
+@@ -1027,8 +1037,8 @@ static struct rpc_procinfo rpcb_procedures2[] = {
+ static struct rpc_procinfo rpcb_procedures3[] = {
+ [RPCBPROC_SET] = {
+ .p_proc = RPCBPROC_SET,
+- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
+- .p_decode = (kxdrdproc_t)rpcb_dec_set,
++ .p_encode = rpcb_enc_getaddr,
++ .p_decode = rpcb_dec_set,
+ .p_arglen = RPCB_getaddrargs_sz,
+ .p_replen = RPCB_setres_sz,
+ .p_statidx = RPCBPROC_SET,
+@@ -1037,8 +1047,8 @@ static struct rpc_procinfo rpcb_procedures3[] = {
+ },
+ [RPCBPROC_UNSET] = {
+ .p_proc = RPCBPROC_UNSET,
+- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
+- .p_decode = (kxdrdproc_t)rpcb_dec_set,
++ .p_encode = rpcb_enc_getaddr,
++ .p_decode = rpcb_dec_set,
+ .p_arglen = RPCB_getaddrargs_sz,
+ .p_replen = RPCB_setres_sz,
+ .p_statidx = RPCBPROC_UNSET,
+@@ -1047,8 +1057,8 @@ static struct rpc_procinfo rpcb_procedures3[] = {
+ },
+ [RPCBPROC_GETADDR] = {
+ .p_proc = RPCBPROC_GETADDR,
+- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
+- .p_decode = (kxdrdproc_t)rpcb_dec_getaddr,
++ .p_encode = rpcb_enc_getaddr,
++ .p_decode = rpcb_dec_getaddr,
+ .p_arglen = RPCB_getaddrargs_sz,
+ .p_replen = RPCB_getaddrres_sz,
+ .p_statidx = RPCBPROC_GETADDR,
+@@ -1060,8 +1070,8 @@ static struct rpc_procinfo rpcb_procedures3[] = {
+ static struct rpc_procinfo rpcb_procedures4[] = {
+ [RPCBPROC_SET] = {
+ .p_proc = RPCBPROC_SET,
+- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
+- .p_decode = (kxdrdproc_t)rpcb_dec_set,
++ .p_encode = rpcb_enc_getaddr,
++ .p_decode = rpcb_dec_set,
+ .p_arglen = RPCB_getaddrargs_sz,
+ .p_replen = RPCB_setres_sz,
+ .p_statidx = RPCBPROC_SET,
+@@ -1070,8 +1080,8 @@ static struct rpc_procinfo rpcb_procedures4[] = {
+ },
+ [RPCBPROC_UNSET] = {
+ .p_proc = RPCBPROC_UNSET,
+- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
+- .p_decode = (kxdrdproc_t)rpcb_dec_set,
++ .p_encode = rpcb_enc_getaddr,
++ .p_decode = rpcb_dec_set,
+ .p_arglen = RPCB_getaddrargs_sz,
+ .p_replen = RPCB_setres_sz,
+ .p_statidx = RPCBPROC_UNSET,
+@@ -1080,8 +1090,8 @@ static struct rpc_procinfo rpcb_procedures4[] = {
+ },
+ [RPCBPROC_GETADDR] = {
+ .p_proc = RPCBPROC_GETADDR,
+- .p_encode = (kxdreproc_t)rpcb_enc_getaddr,
+- .p_decode = (kxdrdproc_t)rpcb_dec_getaddr,
++ .p_encode = rpcb_enc_getaddr,
++ .p_decode = rpcb_dec_getaddr,
+ .p_arglen = RPCB_getaddrargs_sz,
+ .p_replen = RPCB_getaddrres_sz,
+ .p_statidx = RPCBPROC_GETADDR,
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 73ad57a..d7a0c08 100644
--- a/net/sunrpc/sched.c
@@ -131526,9 +157441,27 @@ index 2ecb994..5afb49f 100644
return -ENOMEM;
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
-index cc98528..f427662 100644
+index cc98528..925844d 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
+@@ -50,7 +50,7 @@ EXPORT_SYMBOL_GPL(svc_pool_map);
+ static DEFINE_MUTEX(svc_pool_map_mutex);/* protects svc_pool_map.count only */
+
+ static int
+-param_set_pool_mode(const char *val, struct kernel_param *kp)
++param_set_pool_mode(const char *val, const struct kernel_param *kp)
+ {
+ int *ip = (int *)kp->arg;
+ struct svc_pool_map *m = &svc_pool_map;
+@@ -80,7 +80,7 @@ out:
+ }
+
+ static int
+-param_get_pool_mode(char *buf, struct kernel_param *kp)
++param_get_pool_mode(char *buf, const struct kernel_param *kp)
+ {
+ int *ip = (int *)kp->arg;
+
@@ -1166,7 +1166,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
svc_putnl(resv, RPC_SUCCESS);
@@ -131541,7 +157474,7 @@ index cc98528..f427662 100644
/* Initialize storage for argp and resp */
memset(rqstp->rq_argp, 0, procp->pc_argsize);
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
-index 621ca7b..78bf76b 100644
+index dfacdc9..3cb08de 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -470,7 +470,7 @@ static void unix_gid_request(struct cache_detail *cd,
@@ -131554,10 +157487,10 @@ index 621ca7b..78bf76b 100644
static int unix_gid_parse(struct cache_detail *cd,
char *mesg, int mlen)
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
-index 1b7051b..65b0d80 100644
+index c846ca9..d5968b4 100644
--- a/net/sunrpc/xprtrdma/svc_rdma.c
+++ b/net/sunrpc/xprtrdma/svc_rdma.c
-@@ -61,15 +61,15 @@ unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
+@@ -62,15 +62,15 @@ unsigned int svcrdma_max_req_size = RPCRDMA_MAX_REQ_SIZE;
static unsigned int min_max_inline = 4096;
static unsigned int max_max_inline = 65536;
@@ -131580,9 +157513,9 @@ index 1b7051b..65b0d80 100644
+atomic_unchecked_t rdma_stat_sq_poll;
+atomic_unchecked_t rdma_stat_sq_prod;
- /* Temporary NFS request map and context caches */
- struct kmem_cache *svc_rdma_map_cachep;
-@@ -87,17 +87,17 @@ static int read_reset_stat(struct ctl_table *table, int write,
+ struct workqueue_struct *svc_rdma_wq;
+
+@@ -84,17 +84,17 @@ static int read_reset_stat(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
@@ -131603,7 +157536,7 @@ index 1b7051b..65b0d80 100644
if (len >= 32)
return -EFAULT;
len = strlen(str_buf);
-@@ -109,7 +109,7 @@ static int read_reset_stat(struct ctl_table *table, int write,
+@@ -106,7 +106,7 @@ static int read_reset_stat(struct ctl_table *table, int write,
len -= *ppos;
if (len > *lenp)
len = *lenp;
@@ -131612,7 +157545,7 @@ index 1b7051b..65b0d80 100644
return -EFAULT;
*lenp = len;
*ppos += len;
-@@ -150,63 +150,63 @@ static struct ctl_table svcrdma_parm_table[] = {
+@@ -147,63 +147,63 @@ static struct ctl_table svcrdma_parm_table[] = {
{
.procname = "rdma_stat_read",
.data = &rdma_stat_read,
@@ -131686,7 +157619,7 @@ index 1b7051b..65b0d80 100644
.proc_handler = read_reset_stat,
},
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
-index ff4f01e..997f03d 100644
+index c8b8a8b..75b302c 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -200,7 +200,7 @@ int rdma_read_chunk_lcl(struct svcxprt_rdma *xprt,
@@ -131707,7 +157640,7 @@ index ff4f01e..997f03d 100644
return ret;
err:
ib_dma_unmap_sg(xprt->sc_cm_id->device,
-@@ -598,7 +598,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
+@@ -630,7 +630,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
dto_q);
list_del_init(&ctxt->dto_q);
} else {
@@ -131716,7 +157649,7 @@ index ff4f01e..997f03d 100644
clear_bit(XPT_DATA, &xprt->xpt_flags);
ctxt = NULL;
}
-@@ -616,7 +616,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
+@@ -648,7 +648,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
}
dprintk("svcrdma: processing ctxt=%p on xprt=%p, rqstp=%p, status=%d\n",
ctxt, rdma_xprt, rqstp, ctxt->wc_status);
@@ -131726,7 +157659,7 @@ index ff4f01e..997f03d 100644
/* Build up the XDR from the receive buffers. */
rdma_build_arg_xdr(rqstp, ctxt, ctxt->byte_len);
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
-index 969a1ab..ee9b382 100644
+index df57f3c..5febb1e 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -291,7 +291,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp,
@@ -131739,10 +157672,10 @@ index 969a1ab..ee9b382 100644
goto err;
return write_len - bc;
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
-index b348b4a..db45b20 100644
+index 5763825..6a73bd1 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
-@@ -346,7 +346,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
+@@ -477,7 +477,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
return;
ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP);
@@ -131751,7 +157684,7 @@ index b348b4a..db45b20 100644
while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) {
ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id;
-@@ -368,7 +368,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
+@@ -499,7 +499,7 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
}
if (ctxt)
@@ -131760,7 +157693,7 @@ index b348b4a..db45b20 100644
set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
/*
-@@ -447,7 +447,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
+@@ -576,7 +576,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
return;
ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP);
@@ -131769,7 +157702,7 @@ index b348b4a..db45b20 100644
while ((ret = ib_poll_cq(cq, ARRAY_SIZE(wc_a), wc_a)) > 0) {
int i;
-@@ -476,7 +476,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
+@@ -605,7 +605,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
}
if (ctxt)
@@ -131778,7 +157711,7 @@ index b348b4a..db45b20 100644
}
static void sq_comp_handler(struct ib_cq *cq, void *cq_context)
-@@ -1273,7 +1273,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
+@@ -1381,7 +1381,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
spin_lock_bh(&xprt->sc_lock);
if (xprt->sc_sq_depth < atomic_read(&xprt->sc_sq_count) + wr_count) {
spin_unlock_bh(&xprt->sc_lock);
@@ -131801,7 +157734,7 @@ index ed98c1f..f74b659 100644
int mode = (table->mode >> 6) & 7;
return (mode << 6) | (mode << 3) | mode;
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
-index 1eadc95..f6ccd08 100644
+index 2c016fd..68f02f3 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -65,13 +65,13 @@ struct tipc_nl_compat_cmd_dump {
@@ -131843,7 +157776,7 @@ index 1eadc95..f6ccd08 100644
kfree_skb(args);
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
-index 69ee2ee..3352a8d 100644
+index f9ff73a..2f69dd4 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -75,7 +75,7 @@ static void tipc_subscrp_send_event(struct tipc_subscription *sub,
@@ -131856,7 +157789,7 @@ index 69ee2ee..3352a8d 100644
sub->evt.event = htohl(event, sub->swap);
sub->evt.found_lower = htohl(found_lower, sub->swap);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
-index 898a53a..5a23004 100644
+index f75f847..3388f3a 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -919,6 +919,12 @@ static struct sock *unix_find_other(struct net *net,
@@ -131906,7 +157839,7 @@ index 898a53a..5a23004 100644
return err;
}
-@@ -2806,9 +2825,13 @@ static int unix_seq_show(struct seq_file *seq, void *v)
+@@ -2814,9 +2833,13 @@ static int unix_seq_show(struct seq_file *seq, void *v)
seq_puts(seq, "Num RefCount Protocol Flags Type St "
"Inode Path\n");
else {
@@ -131921,7 +157854,7 @@ index 898a53a..5a23004 100644
seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu",
s,
-@@ -2833,10 +2856,29 @@ static int unix_seq_show(struct seq_file *seq, void *v)
+@@ -2841,10 +2864,29 @@ static int unix_seq_show(struct seq_file *seq, void *v)
seq_putc(seq, '@');
i++;
}
@@ -131982,13 +157915,13 @@ index b3d5150..ff3a837 100644
table = kmemdup(unix_table, sizeof(unix_table), GFP_KERNEL);
if (table == NULL)
diff --git a/net/vmw_vsock/vmci_transport_notify.c b/net/vmw_vsock/vmci_transport_notify.c
-index 9b7f207..2596621 100644
+index fd8cf02..1406db4 100644
--- a/net/vmw_vsock/vmci_transport_notify.c
+++ b/net/vmw_vsock/vmci_transport_notify.c
@@ -662,19 +662,19 @@ static void vmci_transport_notify_pkt_process_negotiate(struct sock *sk)
/* Socket control packet based operations. */
- struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops = {
+ const struct vmci_transport_notify_ops vmci_transport_notify_pkt_ops = {
- vmci_transport_notify_pkt_socket_init,
- vmci_transport_notify_pkt_socket_destruct,
- vmci_transport_notify_pkt_poll_in,
@@ -132021,13 +157954,13 @@ index 9b7f207..2596621 100644
+ .process_negotiate = vmci_transport_notify_pkt_process_negotiate,
};
diff --git a/net/vmw_vsock/vmci_transport_notify_qstate.c b/net/vmw_vsock/vmci_transport_notify_qstate.c
-index dc9c792..3089de0 100644
+index 21e591d..f3a0afc 100644
--- a/net/vmw_vsock/vmci_transport_notify_qstate.c
+++ b/net/vmw_vsock/vmci_transport_notify_qstate.c
@@ -420,19 +420,19 @@ vmci_transport_notify_pkt_send_pre_enqueue(
/* Socket always on control packet based operations. */
- struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops = {
+ const struct vmci_transport_notify_ops vmci_transport_notify_pkt_q_state_ops = {
- vmci_transport_notify_pkt_socket_init,
- vmci_transport_notify_pkt_socket_destruct,
- vmci_transport_notify_pkt_poll_in,
@@ -132059,6 +157992,413 @@ index dc9c792..3089de0 100644
+ .process_request = vmci_transport_notify_pkt_process_request,
+ .process_negotiate = vmci_transport_notify_pkt_process_negotiate,
};
+diff --git a/net/wireless/scan.c b/net/wireless/scan.c
+index 14d5369..7142d8e 100644
+--- a/net/wireless/scan.c
++++ b/net/wireless/scan.c
+@@ -1651,8 +1651,9 @@ static int ieee80211_scan_results(struct cfg80211_registered_device *rdev,
+
+ int cfg80211_wext_giwscan(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct cfg80211_registered_device *rdev;
+ int res;
+
+diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
+index fd68283..0681bb2 100644
+--- a/net/wireless/wext-compat.c
++++ b/net/wireless/wext-compat.c
+@@ -23,8 +23,9 @@
+
+ int cfg80211_wext_giwname(struct net_device *dev,
+ struct iw_request_info *info,
+- char *name, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ char *name = wrqu->name;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct ieee80211_supported_band *sband;
+ bool is_ht = false, is_a = false, is_b = false, is_g = false;
+@@ -66,8 +67,9 @@ int cfg80211_wext_giwname(struct net_device *dev,
+ EXPORT_WEXT_HANDLER(cfg80211_wext_giwname);
+
+ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
+- u32 *mode, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ u32 *mode = &wrqu->mode;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev;
+ struct vif_params vifparams;
+@@ -102,8 +104,9 @@ int cfg80211_wext_siwmode(struct net_device *dev, struct iw_request_info *info,
+ EXPORT_WEXT_HANDLER(cfg80211_wext_siwmode);
+
+ int cfg80211_wext_giwmode(struct net_device *dev, struct iw_request_info *info,
+- u32 *mode, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ u32 *mode = &wrqu->mode;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ if (!wdev)
+@@ -139,8 +142,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_giwmode);
+
+ int cfg80211_wext_giwrange(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct iw_range *range = (struct iw_range *) extra;
+ enum ieee80211_band band;
+@@ -283,8 +287,9 @@ int cfg80211_wext_freq(struct iw_freq *freq)
+
+ int cfg80211_wext_siwrts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ u32 orts = wdev->wiphy->rts_threshold;
+@@ -307,8 +312,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_siwrts);
+
+ int cfg80211_wext_giwrts(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rts, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rts = &wrqu->rts;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ rts->value = wdev->wiphy->rts_threshold;
+@@ -321,8 +327,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_giwrts);
+
+ int cfg80211_wext_siwfrag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *frag, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *frag = &wrqu->frag;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ u32 ofrag = wdev->wiphy->frag_threshold;
+@@ -347,8 +354,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_siwfrag);
+
+ int cfg80211_wext_giwfrag(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *frag, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *frag = &wrqu->frag;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ frag->value = wdev->wiphy->frag_threshold;
+@@ -361,8 +369,9 @@ EXPORT_WEXT_HANDLER(cfg80211_wext_giwfrag);
+
+ static int cfg80211_wext_siwretry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *retry, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *retry = &wrqu->retry;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ u32 changed = 0;
+@@ -401,8 +410,9 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
+
+ int cfg80211_wext_giwretry(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *retry, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *retry = &wrqu->retry;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ retry->disabled = 0;
+@@ -586,8 +596,9 @@ static int cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
+
+ static int cfg80211_wext_siwencode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *keybuf)
++ union iwreq_data *wrqu, char *keybuf)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ int idx, err;
+@@ -646,8 +657,9 @@ static int cfg80211_wext_siwencode(struct net_device *dev,
+
+ static int cfg80211_wext_siwencodeext(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
+@@ -737,8 +749,9 @@ static int cfg80211_wext_siwencodeext(struct net_device *dev,
+
+ static int cfg80211_wext_giwencode(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *erq, char *keybuf)
++ union iwreq_data *wrqu, char *keybuf)
+ {
++ struct iw_point *erq = &wrqu->encoding;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ int idx;
+
+@@ -774,8 +787,9 @@ static int cfg80211_wext_giwencode(struct net_device *dev,
+
+ static int cfg80211_wext_siwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *wextfreq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *wextfreq = &wrqu->freq;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ struct cfg80211_chan_def chandef = {
+@@ -817,8 +831,9 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
+
+ static int cfg80211_wext_giwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *freq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_freq *freq = &wrqu->freq;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ struct cfg80211_chan_def chandef;
+@@ -1076,8 +1091,9 @@ static int cfg80211_set_key_mgt(struct wireless_dev *wdev, u32 key_mgt)
+
+ static int cfg80211_wext_siwauth(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *data = &wrqu->param;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ if (wdev->iftype != NL80211_IFTYPE_STATION)
+@@ -1109,7 +1125,7 @@ static int cfg80211_wext_siwauth(struct net_device *dev,
+
+ static int cfg80211_wext_giwauth(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ /* XXX: what do we need? */
+
+@@ -1118,8 +1134,9 @@ static int cfg80211_wext_giwauth(struct net_device *dev,
+
+ static int cfg80211_wext_siwpower(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *wrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *wrq = &wrqu->power;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ bool ps = wdev->ps;
+@@ -1165,8 +1182,9 @@ static int cfg80211_wext_siwpower(struct net_device *dev,
+
+ static int cfg80211_wext_giwpower(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *wrq, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *wrq = &wrqu->power;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ wrq->disabled = !wdev->ps;
+@@ -1220,8 +1238,9 @@ static int cfg80211_wds_wext_giwap(struct net_device *dev,
+
+ static int cfg80211_wext_siwrate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rate, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rate = &wrqu->bitrate;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ struct cfg80211_bitrate_mask mask;
+@@ -1271,8 +1290,9 @@ static int cfg80211_wext_siwrate(struct net_device *dev,
+
+ static int cfg80211_wext_giwrate(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_param *rate, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_param *rate = &wrqu->bitrate;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ /* we are under RTNL - globally locked - so can use a static struct */
+@@ -1379,8 +1399,9 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
+
+ static int cfg80211_wext_siwap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *ap_addr, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ switch (wdev->iftype) {
+@@ -1397,8 +1418,9 @@ static int cfg80211_wext_siwap(struct net_device *dev,
+
+ static int cfg80211_wext_giwap(struct net_device *dev,
+ struct iw_request_info *info,
+- struct sockaddr *ap_addr, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct sockaddr *ap_addr = &wrqu->ap_addr;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ switch (wdev->iftype) {
+@@ -1415,8 +1437,9 @@ static int cfg80211_wext_giwap(struct net_device *dev,
+
+ static int cfg80211_wext_siwessid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *ssid)
++ union iwreq_data *wrqu, char *ssid)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ switch (wdev->iftype) {
+@@ -1431,8 +1454,9 @@ static int cfg80211_wext_siwessid(struct net_device *dev,
+
+ static int cfg80211_wext_giwessid(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *ssid)
++ union iwreq_data *wrqu, char *ssid)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ data->flags = 0;
+@@ -1450,7 +1474,7 @@ static int cfg80211_wext_giwessid(struct net_device *dev,
+
+ static int cfg80211_wext_siwpmksa(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+@@ -1490,38 +1514,38 @@ static int cfg80211_wext_siwpmksa(struct net_device *dev,
+ }
+
+ static const iw_handler cfg80211_handlers[] = {
+- [IW_IOCTL_IDX(SIOCGIWNAME)] = (iw_handler) cfg80211_wext_giwname,
+- [IW_IOCTL_IDX(SIOCSIWFREQ)] = (iw_handler) cfg80211_wext_siwfreq,
+- [IW_IOCTL_IDX(SIOCGIWFREQ)] = (iw_handler) cfg80211_wext_giwfreq,
+- [IW_IOCTL_IDX(SIOCSIWMODE)] = (iw_handler) cfg80211_wext_siwmode,
+- [IW_IOCTL_IDX(SIOCGIWMODE)] = (iw_handler) cfg80211_wext_giwmode,
+- [IW_IOCTL_IDX(SIOCGIWRANGE)] = (iw_handler) cfg80211_wext_giwrange,
+- [IW_IOCTL_IDX(SIOCSIWAP)] = (iw_handler) cfg80211_wext_siwap,
+- [IW_IOCTL_IDX(SIOCGIWAP)] = (iw_handler) cfg80211_wext_giwap,
+- [IW_IOCTL_IDX(SIOCSIWMLME)] = (iw_handler) cfg80211_wext_siwmlme,
+- [IW_IOCTL_IDX(SIOCSIWSCAN)] = (iw_handler) cfg80211_wext_siwscan,
+- [IW_IOCTL_IDX(SIOCGIWSCAN)] = (iw_handler) cfg80211_wext_giwscan,
+- [IW_IOCTL_IDX(SIOCSIWESSID)] = (iw_handler) cfg80211_wext_siwessid,
+- [IW_IOCTL_IDX(SIOCGIWESSID)] = (iw_handler) cfg80211_wext_giwessid,
+- [IW_IOCTL_IDX(SIOCSIWRATE)] = (iw_handler) cfg80211_wext_siwrate,
+- [IW_IOCTL_IDX(SIOCGIWRATE)] = (iw_handler) cfg80211_wext_giwrate,
+- [IW_IOCTL_IDX(SIOCSIWRTS)] = (iw_handler) cfg80211_wext_siwrts,
+- [IW_IOCTL_IDX(SIOCGIWRTS)] = (iw_handler) cfg80211_wext_giwrts,
+- [IW_IOCTL_IDX(SIOCSIWFRAG)] = (iw_handler) cfg80211_wext_siwfrag,
+- [IW_IOCTL_IDX(SIOCGIWFRAG)] = (iw_handler) cfg80211_wext_giwfrag,
+- [IW_IOCTL_IDX(SIOCSIWTXPOW)] = (iw_handler) cfg80211_wext_siwtxpower,
+- [IW_IOCTL_IDX(SIOCGIWTXPOW)] = (iw_handler) cfg80211_wext_giwtxpower,
+- [IW_IOCTL_IDX(SIOCSIWRETRY)] = (iw_handler) cfg80211_wext_siwretry,
+- [IW_IOCTL_IDX(SIOCGIWRETRY)] = (iw_handler) cfg80211_wext_giwretry,
+- [IW_IOCTL_IDX(SIOCSIWENCODE)] = (iw_handler) cfg80211_wext_siwencode,
+- [IW_IOCTL_IDX(SIOCGIWENCODE)] = (iw_handler) cfg80211_wext_giwencode,
+- [IW_IOCTL_IDX(SIOCSIWPOWER)] = (iw_handler) cfg80211_wext_siwpower,
+- [IW_IOCTL_IDX(SIOCGIWPOWER)] = (iw_handler) cfg80211_wext_giwpower,
+- [IW_IOCTL_IDX(SIOCSIWGENIE)] = (iw_handler) cfg80211_wext_siwgenie,
+- [IW_IOCTL_IDX(SIOCSIWAUTH)] = (iw_handler) cfg80211_wext_siwauth,
+- [IW_IOCTL_IDX(SIOCGIWAUTH)] = (iw_handler) cfg80211_wext_giwauth,
+- [IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= (iw_handler) cfg80211_wext_siwencodeext,
+- [IW_IOCTL_IDX(SIOCSIWPMKSA)] = (iw_handler) cfg80211_wext_siwpmksa,
++ [IW_IOCTL_IDX(SIOCGIWNAME)] = cfg80211_wext_giwname,
++ [IW_IOCTL_IDX(SIOCSIWFREQ)] = cfg80211_wext_siwfreq,
++ [IW_IOCTL_IDX(SIOCGIWFREQ)] = cfg80211_wext_giwfreq,
++ [IW_IOCTL_IDX(SIOCSIWMODE)] = cfg80211_wext_siwmode,
++ [IW_IOCTL_IDX(SIOCGIWMODE)] = cfg80211_wext_giwmode,
++ [IW_IOCTL_IDX(SIOCGIWRANGE)] = cfg80211_wext_giwrange,
++ [IW_IOCTL_IDX(SIOCSIWAP)] = cfg80211_wext_siwap,
++ [IW_IOCTL_IDX(SIOCGIWAP)] = cfg80211_wext_giwap,
++ [IW_IOCTL_IDX(SIOCSIWMLME)] = cfg80211_wext_siwmlme,
++ [IW_IOCTL_IDX(SIOCSIWSCAN)] = cfg80211_wext_siwscan,
++ [IW_IOCTL_IDX(SIOCGIWSCAN)] = cfg80211_wext_giwscan,
++ [IW_IOCTL_IDX(SIOCSIWESSID)] = cfg80211_wext_siwessid,
++ [IW_IOCTL_IDX(SIOCGIWESSID)] = cfg80211_wext_giwessid,
++ [IW_IOCTL_IDX(SIOCSIWRATE)] = cfg80211_wext_siwrate,
++ [IW_IOCTL_IDX(SIOCGIWRATE)] = cfg80211_wext_giwrate,
++ [IW_IOCTL_IDX(SIOCSIWRTS)] = cfg80211_wext_siwrts,
++ [IW_IOCTL_IDX(SIOCGIWRTS)] = cfg80211_wext_giwrts,
++ [IW_IOCTL_IDX(SIOCSIWFRAG)] = cfg80211_wext_siwfrag,
++ [IW_IOCTL_IDX(SIOCGIWFRAG)] = cfg80211_wext_giwfrag,
++ [IW_IOCTL_IDX(SIOCSIWTXPOW)] = cfg80211_wext_siwtxpower,
++ [IW_IOCTL_IDX(SIOCGIWTXPOW)] = cfg80211_wext_giwtxpower,
++ [IW_IOCTL_IDX(SIOCSIWRETRY)] = cfg80211_wext_siwretry,
++ [IW_IOCTL_IDX(SIOCGIWRETRY)] = cfg80211_wext_giwretry,
++ [IW_IOCTL_IDX(SIOCSIWENCODE)] = cfg80211_wext_siwencode,
++ [IW_IOCTL_IDX(SIOCGIWENCODE)] = cfg80211_wext_giwencode,
++ [IW_IOCTL_IDX(SIOCSIWPOWER)] = cfg80211_wext_siwpower,
++ [IW_IOCTL_IDX(SIOCGIWPOWER)] = cfg80211_wext_giwpower,
++ [IW_IOCTL_IDX(SIOCSIWGENIE)] = cfg80211_wext_siwgenie,
++ [IW_IOCTL_IDX(SIOCSIWAUTH)] = cfg80211_wext_siwauth,
++ [IW_IOCTL_IDX(SIOCGIWAUTH)] = cfg80211_wext_giwauth,
++ [IW_IOCTL_IDX(SIOCSIWENCODEEXT)]= cfg80211_wext_siwencodeext,
++ [IW_IOCTL_IDX(SIOCSIWPMKSA)] = cfg80211_wext_siwpmksa,
+ };
+
+ const struct iw_handler_def cfg80211_wext_handler = {
+diff --git a/net/wireless/wext-compat.h b/net/wireless/wext-compat.h
+index 94c7405..499cca4 100644
+--- a/net/wireless/wext-compat.h
++++ b/net/wireless/wext-compat.h
+@@ -12,7 +12,7 @@
+
+ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *freq, char *extra);
++ struct iw_freq *wextfreq, char *extra);
+ int cfg80211_ibss_wext_giwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_freq *freq, char *extra);
+@@ -31,7 +31,7 @@ int cfg80211_ibss_wext_giwessid(struct net_device *dev,
+
+ int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_freq *freq, char *extra);
++ struct iw_freq *wextfreq, char *extra);
+ int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_freq *freq, char *extra);
+@@ -50,10 +50,10 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
+
+ int cfg80211_wext_siwmlme(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra);
++ union iwreq_data *wrqu, char *extra);
+ int cfg80211_wext_siwgenie(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra);
++ union iwreq_data *wrqu, char *extra);
+
+
+ int cfg80211_wext_freq(struct iw_freq *freq);
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
index b50ee5d..ccf70ab 100644
--- a/net/wireless/wext-core.c
@@ -132096,6 +158436,30 @@ index b50ee5d..ccf70ab 100644
err = handler(dev, info, (union iwreq_data *) iwp, extra);
iwp->length += essid_compat;
+diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
+index a4e8af3..f8c0e76 100644
+--- a/net/wireless/wext-sme.c
++++ b/net/wireless/wext-sme.c
+@@ -330,8 +330,9 @@ int cfg80211_mgd_wext_giwap(struct net_device *dev,
+
+ int cfg80211_wext_siwgenie(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
++ struct iw_point *data = &wrqu->data;
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ u8 *ie = extra;
+@@ -380,7 +381,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
+
+ int cfg80211_wext_siwmlme(struct net_device *dev,
+ struct iw_request_info *info,
+- struct iw_point *data, char *extra)
++ union iwreq_data *wrqu, char *extra)
+ {
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct iw_mlme *mlme = (struct iw_mlme *)extra;
diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
index 4323952..a06dfe1 100644
--- a/net/x25/sysctl_net_x25.c
@@ -132367,7 +158731,7 @@ index 1db6d73..0819042 100644
# ld-option
# Usage: LDFLAGS += $(call ld-option, -X)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
-index 01df30a..b687dbf 100644
+index 2c47f9c..9d46008 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -60,7 +60,7 @@ endif
@@ -132394,12 +158758,12 @@ index 55c96cb..e4e88ab 100644
__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
-index 4efedcb..0220ab2 100644
+index f9e47a7..b72022a 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
-@@ -26,6 +26,10 @@ warning-1 += $(call cc-option, -Wmissing-include-dirs)
- warning-1 += $(call cc-option, -Wunused-but-set-variable)
+@@ -27,6 +27,10 @@ warning-1 += $(call cc-option, -Wunused-but-set-variable)
warning-1 += $(call cc-disable-warning, missing-field-initializers)
+ warning-1 += $(call cc-disable-warning, sign-compare)
+#warning-1 += $(call cc-option, -Wnull-dereference)
+warning-1 += $(call cc-option, -Wduplicated-cond)
@@ -132410,11 +158774,10 @@ index 4efedcb..0220ab2 100644
warning-2 += -Wdisabled-optimization
diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins
new file mode 100644
-index 0000000..2972943
+index 0000000..02fd848
--- /dev/null
+++ b/scripts/Makefile.gcc-plugins
-@@ -0,0 +1,72 @@
-+ifndef DISABLE_PAX_PLUGINS
+@@ -0,0 +1,69 @@
+__PLUGINCC := $(call cc-ifversion, -ge, 0408, $(HOSTCXX), $(HOSTCC))
+PLUGINCC := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)")
+ifneq ($(PLUGINCC),)
@@ -132433,12 +158796,6 @@ index 0000000..2972943
+KERNEXEC_PLUGIN_CFLAGS += -fplugin-arg-kernexec_plugin-method=$(CONFIG_PAX_KERNEXEC_PLUGIN_METHOD) -DKERNEXEC_PLUGIN
+KERNEXEC_PLUGIN_AFLAGS := -DKERNEXEC_PLUGIN
+endif
-+ifdef CONFIG_GRKERNSEC_RANDSTRUCT
-+RANDSTRUCT_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/randomize_layout_plugin.so -DRANDSTRUCT_PLUGIN
-+ifdef CONFIG_GRKERNSEC_RANDSTRUCT_PERFORMANCE
-+RANDSTRUCT_PLUGIN_CFLAGS += -fplugin-arg-randomize_layout_plugin-performance-mode
-+endif
-+endif
+ifdef CONFIG_CHECKER_PLUGIN
+ifeq ($(call cc-ifversion, -ge, 0406, y), y)
+CHECKER_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/checker_plugin.so -DCHECKER_PLUGIN
@@ -132461,13 +158818,19 @@ index 0000000..2972943
+STRUCTLEAK_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/structleak_plugin.so -DSTRUCTLEAK_PLUGIN
+endif
+INITIFY_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/initify_plugin.so -DINITIFY_PLUGIN
++ifdef CONFIG_PAX_RAP
++RAP_PLUGIN_CFLAGS := -fplugin=$(objtree)/tools/gcc/rap_plugin/rap_plugin.so -fplugin-arg-rap_plugin-check=call -DRAP_PLUGIN
++#RAP_PLUGIN_CFLAGS += -fplugin-arg-rap_plugin-report=func,fptr,abs
++RAP_PLUGIN_ABS_CFLAGS := -fplugin-arg-rap_plugin-hash=abs-finish
++RAP_PLUGIN_AFLAGS := -DRAP_PLUGIN
++endif
+GCC_PLUGINS_CFLAGS := $(CONSTIFY_PLUGIN_CFLAGS) $(STACKLEAK_PLUGIN_CFLAGS) $(KALLOCSTAT_PLUGIN_CFLAGS)
+GCC_PLUGINS_CFLAGS += $(KERNEXEC_PLUGIN_CFLAGS) $(CHECKER_PLUGIN_CFLAGS) $(COLORIZE_PLUGIN_CFLAGS)
+GCC_PLUGINS_CFLAGS += $(SIZE_OVERFLOW_PLUGIN_CFLAGS) $(LATENT_ENTROPY_PLUGIN_CFLAGS) $(STRUCTLEAK_PLUGIN_CFLAGS)
+GCC_PLUGINS_CFLAGS += $(INITIFY_PLUGIN_CFLAGS)
-+GCC_PLUGINS_CFLAGS += $(RANDSTRUCT_PLUGIN_CFLAGS)
-+GCC_PLUGINS_AFLAGS := $(KERNEXEC_PLUGIN_AFLAGS)
-+export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS CONSTIFY_PLUGIN LATENT_ENTROPY_PLUGIN_CFLAGS
++GCC_PLUGINS_CFLAGS += $(RAP_PLUGIN_CFLAGS) $(RAP_PLUGIN_ABS_CFLAGS)
++GCC_PLUGINS_AFLAGS := $(KERNEXEC_PLUGIN_AFLAGS) $(RAP_PLUGIN_AFLAGS)
++export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGINS_AFLAGS CONSTIFY_PLUGIN LATENT_ENTROPY_PLUGIN_CFLAGS RAP_PLUGIN_CFLAGS RAP_PLUGIN_ABS_CFLAGS
+ifeq ($(KBUILD_EXTMOD),)
+gcc-plugins:
+ $(Q)$(MAKE) $(build)=tools/gcc
@@ -132477,15 +158840,13 @@ index 0000000..2972943
+else
+gcc-plugins:
+ifeq ($(call cc-ifversion, -ge, 0405, y), y)
-+ $(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.)
++ $(warning warning, your gcc installation does not support plugins, perhaps the necessary headers are missing?)
+ $(CONFIG_SHELL) -x $(srctree)/scripts/gcc-plugin.sh "$(__PLUGINCC)" "$(HOSTCXX)" "$(CC)"
+else
-+ $(warning Warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least.)
-+endif
-+ $(warning PAX_MEMORY_STACKLEAK, constification, PAX_LATENT_ENTROPY and other features will be less secure. PAX_SIZE_OVERFLOW will not be active.)
++ $(warning warning, your gcc version does not support plugins, you should upgrade it to gcc 4.5 at least)
+endif
++ $(warning PAX_MEMORY_STACKLEAK and other features will be less secure)
+endif
-+
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 133edfa..3cc6af2 100644
--- a/scripts/Makefile.host
@@ -132586,7 +158947,7 @@ index 133edfa..3cc6af2 100644
- $(host-cxxmulti) $(host-cxxobjs)
+ $(host-cxxmulti) $(host-cxxobjs) $(host-cshlib) $(host-cshobjs) $(host-cxxshlib) $(host-cxxshobjs)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
-index c68fd61..f9a3b74 100644
+index 5b327c6..f7bdbac 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -161,7 +161,7 @@ static unsigned int strhash(const char *str, unsigned int sz)
@@ -132902,7 +159263,7 @@ index 91ca126..5f7cad6 100644
struct gstr str_new(void);
void str_free(struct gstr *gs);
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
-index b05cc3d..72fb2a8 100644
+index aed678e..1a703de 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -109,7 +109,7 @@ void menu_add_dep(struct expr *dep)
@@ -132952,7 +159313,7 @@ index ba6c34e..ea10bce 100755
kallsymso=""
kallsyms_vmlinux=""
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
-index 5b96206..fc27edc 100644
+index 161dd0d..ca7a0f1 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -156,7 +156,7 @@ static void device_id_check(const char *modname, const char *device_id,
@@ -133009,7 +159370,7 @@ index 5b96206..fc27edc 100644
buf_printf(&mod->dev_table_buf,
"MODULE_ALIAS(\"pnp:d%s*\");\n", id);
-@@ -981,7 +981,7 @@ static void dmi_ascii_filter(char *d, const char *s)
+@@ -980,7 +980,7 @@ static void dmi_ascii_filter(char *d, const char *s)
static int do_dmi_entry(const char *filename, void *symval,
char *alias)
{
@@ -133019,7 +159380,7 @@ index 5b96206..fc27edc 100644
sprintf(alias, "dmi*");
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
-index e080746..73f4e65 100644
+index 48958d3..d5ccb52 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -37,6 +37,7 @@ static int vmlinux_section_warnings = 1;
@@ -133030,7 +159391,7 @@ index e080746..73f4e65 100644
static int sec_mismatch_verbose = 1;
static int sec_mismatch_fatal = 0;
/* ignore missing files */
-@@ -946,6 +947,7 @@ enum mismatch {
+@@ -947,6 +948,7 @@ enum mismatch {
ANY_EXIT_TO_ANY_INIT,
EXPORT_TO_INIT_EXIT,
EXTABLE_TO_NON_TEXT,
@@ -133038,7 +159399,7 @@ index e080746..73f4e65 100644
};
/**
-@@ -1072,6 +1074,12 @@ static const struct sectioncheck sectioncheck[] = {
+@@ -1073,6 +1075,12 @@ static const struct sectioncheck sectioncheck[] = {
.good_tosec = {ALL_TEXT_SECTIONS , NULL},
.mismatch = EXTABLE_TO_NON_TEXT,
.handler = extable_mismatch_handler,
@@ -133051,7 +159412,7 @@ index e080746..73f4e65 100644
}
};
-@@ -1221,10 +1229,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
+@@ -1222,10 +1230,10 @@ static Elf_Sym *find_elf_symbol(struct elf_info *elf, Elf64_Sword addr,
continue;
if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
continue;
@@ -133064,7 +159425,7 @@ index e080746..73f4e65 100644
if (d < 0)
d = addr - sym->st_value;
if (d < distance) {
-@@ -1383,7 +1391,11 @@ static void report_sec_mismatch(const char *modname,
+@@ -1384,7 +1392,11 @@ static void report_sec_mismatch(const char *modname,
char *prl_from;
char *prl_to;
@@ -133077,7 +159438,7 @@ index e080746..73f4e65 100644
if (!sec_mismatch_verbose)
return;
-@@ -1507,6 +1519,14 @@ static void report_sec_mismatch(const char *modname,
+@@ -1508,6 +1520,14 @@ static void report_sec_mismatch(const char *modname,
fatal("There's a special handler for this mismatch type, "
"we should never get here.");
break;
@@ -133092,7 +159453,7 @@ index e080746..73f4e65 100644
}
fprintf(stderr, "\n");
}
-@@ -1896,7 +1916,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
+@@ -1897,7 +1917,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
static void check_sec_ref(struct module *mod, const char *modname,
struct elf_info *elf)
{
@@ -133101,7 +159462,7 @@ index e080746..73f4e65 100644
Elf_Shdr *sechdrs = elf->sechdrs;
/* Walk through all sections */
-@@ -2027,7 +2047,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
+@@ -2028,7 +2048,7 @@ void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
va_end(ap);
}
@@ -133110,7 +159471,7 @@ index e080746..73f4e65 100644
{
if (buf->size - buf->pos < len) {
buf->size += len + SZ;
-@@ -2257,7 +2277,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
+@@ -2258,7 +2278,7 @@ static void write_if_changed(struct buffer *b, const char *fname)
if (fstat(fileno(file), &st) < 0)
goto close_write;
@@ -133119,7 +159480,7 @@ index e080746..73f4e65 100644
goto close_write;
tmp = NOFAIL(malloc(b->pos));
-@@ -2495,6 +2515,14 @@ int main(int argc, char **argv)
+@@ -2496,6 +2516,14 @@ int main(int argc, char **argv)
"Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.\n");
}
}
@@ -133186,7 +159547,7 @@ index 73a2c7d..df11b31 100644
__ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }
__ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
-index 1aca224..3c71eb0 100644
+index c2c7389..81b8117 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -40,7 +40,7 @@ if test "$(objtree)" != "$(srctree)"; then \
@@ -133329,7 +159690,7 @@ index ba87004..3f4852c 100644
unsigned int secindex_strings;
diff --git a/scripts/tags.sh b/scripts/tags.sh
-index 2628890..1c2f5c6 100755
+index 23ba1c6..cad2484 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -26,7 +26,7 @@ else
@@ -133342,10 +159703,10 @@ index 2628890..1c2f5c6 100755
# Find all available archs
find_all_archs()
diff --git a/security/Kconfig b/security/Kconfig
-index e452378..d8f5de9 100644
+index e452378..51e3107 100644
--- a/security/Kconfig
+++ b/security/Kconfig
-@@ -4,6 +4,974 @@
+@@ -4,6 +4,987 @@
menu "Security options"
@@ -134307,6 +160668,19 @@ index e452378..d8f5de9 100644
+ Note that entropy extracted this way is not cryptographically
+ secure!
+
++config PAX_RAP
++ bool "Prevent code reuse attacks"
++ depends on X86_64 && !PARAVIRT
++ default y if GRKERNSEC_CONFIG_AUTO
++ help
++ By saying Y here the kernel will check indirect control transfers
++ in order to detect and prevent attacks that try to hijack control
++ flow by overwriting code pointers.
++
++ Note that the implementation requires a gcc with plugin support,
++ i.e., gcc 4.5 or newer. You may need to install the supporting
++ headers explicitly in addition to the normal gcc package.
++
+endmenu
+
+endmenu
@@ -134320,7 +160694,7 @@ index e452378..d8f5de9 100644
source security/keys/Kconfig
config SECURITY_DMESG_RESTRICT
-@@ -104,7 +1072,7 @@ config INTEL_TXT
+@@ -104,7 +1085,7 @@ config INTEL_TXT
config LSM_MMAP_MIN_ADDR
int "Low address space for LSM to protect from user allocation"
depends on SECURITY && SECURITY_SELINUX
@@ -134358,7 +160732,7 @@ index c28b0f2..3b9fee0 100644
struct dentry *dents[AAFS_NS_SIZEOF];
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
-index dec607c..2f291ad9 100644
+index dec607c..37fe357 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -176,7 +176,7 @@ static int common_perm_dir_dentry(int op, struct path *dir,
@@ -134390,6 +160764,58 @@ index dec607c..2f291ad9 100644
struct path_cond cond = { d_backing_inode(old_dentry)->i_uid,
d_backing_inode(old_dentry)->i_mode
};
+@@ -677,11 +677,11 @@ static const struct kernel_param_ops param_ops_aalockpolicy = {
+ .get = param_get_aalockpolicy
+ };
+
+-static int param_set_audit(const char *val, struct kernel_param *kp);
+-static int param_get_audit(char *buffer, struct kernel_param *kp);
++static int param_set_audit(const char *val, const struct kernel_param *kp);
++static int param_get_audit(char *buffer, const struct kernel_param *kp);
+
+-static int param_set_mode(const char *val, struct kernel_param *kp);
+-static int param_get_mode(char *buffer, struct kernel_param *kp);
++static int param_set_mode(const char *val, const struct kernel_param *kp);
++static int param_get_mode(char *buffer, const struct kernel_param *kp);
+
+ /* Flag values, also controllable via /sys/module/apparmor/parameters
+ * We define special types as we want to do additional mediation.
+@@ -791,7 +791,7 @@ static int param_get_aauint(char *buffer, const struct kernel_param *kp)
+ return param_get_uint(buffer, kp);
+ }
+
+-static int param_get_audit(char *buffer, struct kernel_param *kp)
++static int param_get_audit(char *buffer, const struct kernel_param *kp)
+ {
+ if (!capable(CAP_MAC_ADMIN))
+ return -EPERM;
+@@ -802,7 +802,7 @@ static int param_get_audit(char *buffer, struct kernel_param *kp)
+ return sprintf(buffer, "%s", audit_mode_names[aa_g_audit]);
+ }
+
+-static int param_set_audit(const char *val, struct kernel_param *kp)
++static int param_set_audit(const char *val, const struct kernel_param *kp)
+ {
+ int i;
+ if (!capable(CAP_MAC_ADMIN))
+@@ -824,7 +824,7 @@ static int param_set_audit(const char *val, struct kernel_param *kp)
+ return -EINVAL;
+ }
+
+-static int param_get_mode(char *buffer, struct kernel_param *kp)
++static int param_get_mode(char *buffer, const struct kernel_param *kp)
+ {
+ if (!capable(CAP_MAC_ADMIN))
+ return -EPERM;
+@@ -835,7 +835,7 @@ static int param_get_mode(char *buffer, struct kernel_param *kp)
+ return sprintf(buffer, "%s", aa_profile_mode_names[aa_g_profile_mode]);
+ }
+
+-static int param_set_mode(const char *val, struct kernel_param *kp)
++static int param_set_mode(const char *val, const struct kernel_param *kp)
+ {
+ int i;
+ if (!capable(CAP_MAC_ADMIN))
diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index 705c287..81257f1 100644
--- a/security/apparmor/policy.c
@@ -134460,7 +160886,7 @@ index 48071ed..b805e0f 100644
if (bprm->cap_effective)
return 1;
diff --git a/security/integrity/ima/ima.h b/security/integrity/ima/ima.h
-index e2a60c3..2e41dd3 100644
+index 585af61..b7d35ff 100644
--- a/security/integrity/ima/ima.h
+++ b/security/integrity/ima/ima.h
@@ -125,8 +125,8 @@ int ima_init_template(void);
@@ -134488,10 +160914,10 @@ index 1d950fb..a8f4eab 100644
result = ima_alloc_init_template(&event_data, &entry);
if (result < 0) {
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
-index 816d175..20079ae 100644
+index f355231..c71f640 100644
--- a/security/integrity/ima/ima_fs.c
+++ b/security/integrity/ima/ima_fs.c
-@@ -28,12 +28,12 @@
+@@ -30,12 +30,12 @@ static DEFINE_MUTEX(ima_write_mutex);
static int valid_policy = 1;
#define TMPBUFLEN 12
static ssize_t ima_show_htable_value(char __user *buf, size_t count,
@@ -134552,7 +160978,7 @@ index 5105c2c..a5010e6 100644
extern struct key_type key_type_request_key_auth;
extern struct key *request_key_auth_new(struct key *target,
diff --git a/security/keys/key.c b/security/keys/key.c
-index ab7997d..adba677 100644
+index 09ef276..ab2894f 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -283,7 +283,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
@@ -134564,7 +160990,7 @@ index ab7997d..adba677 100644
key->index_key.type = type;
key->user = user;
key->quotalen = quotalen;
-@@ -1073,7 +1073,9 @@ int register_key_type(struct key_type *ktype)
+@@ -1077,7 +1077,9 @@ int register_key_type(struct key_type *ktype)
struct key_type *p;
int ret;
@@ -134575,7 +161001,7 @@ index ab7997d..adba677 100644
ret = -EEXIST;
down_write(&key_types_sem);
-@@ -1085,7 +1087,7 @@ int register_key_type(struct key_type *ktype)
+@@ -1089,7 +1091,7 @@ int register_key_type(struct key_type *ktype)
}
/* store the type */
@@ -134584,7 +161010,7 @@ index ab7997d..adba677 100644
pr_notice("Key type %s registered\n", ktype->name);
ret = 0;
-@@ -1107,7 +1109,7 @@ EXPORT_SYMBOL(register_key_type);
+@@ -1111,7 +1113,7 @@ EXPORT_SYMBOL(register_key_type);
void unregister_key_type(struct key_type *ktype)
{
down_write(&key_types_sem);
@@ -134593,7 +161019,7 @@ index ab7997d..adba677 100644
downgrade_write(&key_types_sem);
key_gc_keytype(ktype);
pr_notice("Key type %s unregistered\n", ktype->name);
-@@ -1125,10 +1127,10 @@ void __init key_init(void)
+@@ -1129,10 +1131,10 @@ void __init key_init(void)
0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
/* add the special key types */
@@ -134910,7 +161336,7 @@ index ffd2025..df062c9 100644
/* PCM3052 register definitions */
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
-index 33e72c8..2b72441 100644
+index ebc9fdf..61f491e 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1193,10 +1193,10 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
@@ -134997,8 +161423,23 @@ index 1f64ab0..26a7233 100644
snd_leave_user(fs);
if (err < 0)
return err;
+diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
+index 3a9b66c..2b38b21 100644
+--- a/sound/core/pcm_lib.c
++++ b/sound/core/pcm_lib.c
+@@ -1867,8 +1867,9 @@ EXPORT_SYMBOL(snd_pcm_lib_ioctl);
+ * Even if more than one periods have elapsed since the last call, you
+ * have to call this only once.
+ */
+-void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
++void snd_pcm_period_elapsed(void *_substream)
+ {
++ struct snd_pcm_substream *substream = _substream;
+ struct snd_pcm_runtime *runtime;
+ unsigned long flags;
+
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
-index 4ba64fd..49be507 100644
+index 9106d8e..e7e2e3c 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3014,11 +3014,11 @@ int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream,
@@ -135015,6 +161456,38 @@ index 4ba64fd..49be507 100644
break;
default:
result = -EINVAL;
+diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
+index 795437b..3650746 100644
+--- a/sound/core/rawmidi.c
++++ b/sound/core/rawmidi.c
+@@ -871,9 +871,10 @@ static int snd_rawmidi_control_ioctl(struct snd_card *card,
+ *
+ * Return: The size of read data, or a negative error code on failure.
+ */
+-int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
+- const unsigned char *buffer, int count)
++int snd_rawmidi_receive(void *_substream, const void *_buffer, int count)
+ {
++ struct snd_rawmidi_substream *substream = _substream;
++ const unsigned char *buffer = _buffer;
+ unsigned long flags;
+ int result = 0, count1;
+ struct snd_rawmidi_runtime *runtime = substream->runtime;
+diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
+index b16dbef04..8eb05a4 100644
+--- a/sound/core/seq/oss/seq_oss_synth.c
++++ b/sound/core/seq/oss/seq_oss_synth.c
+@@ -653,8 +653,8 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
+ rec->synth_type, rec->synth_subtype,
+ rec->nr_voices);
+ snd_iprintf(buf, " capabilities : ioctl %s / load_patch %s\n",
+- enabled_str((long)rec->oper.ioctl),
+- enabled_str((long)rec->oper.load_patch));
++ enabled_str(!!rec->oper.ioctl),
++ enabled_str(!!rec->oper.load_patch));
+ snd_use_lock_free(&rec->use_lock);
+ }
+ }
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 58e79e0..19751d1 100644
--- a/sound/core/seq/seq_clientmgr.c
@@ -135120,7 +161593,7 @@ index 062c446..a4b6f4c 100644
};
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
-index c850345..71c5fd4 100644
+index c850345..ec0a853 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -87,7 +87,7 @@ int snd_seq_dump_var_event(const struct snd_seq_event *event,
@@ -135132,7 +161605,29 @@ index c850345..71c5fd4 100644
while (len > 0) {
int size = sizeof(buf);
if (len < size)
-@@ -158,7 +158,7 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
+@@ -126,15 +126,19 @@ EXPORT_SYMBOL(snd_seq_dump_var_event);
+ * expand the variable length event to linear buffer space.
+ */
+
+-static int seq_copy_in_kernel(char **bufptr, const void *src, int size)
++static int seq_copy_in_kernel(void *_bufptr, const void *src, int size)
+ {
++ char **bufptr = (char **)_bufptr;
++
+ memcpy(*bufptr, src, size);
+ *bufptr += size;
+ return 0;
+ }
+
+-static int seq_copy_in_user(char __user **bufptr, const void *src, int size)
++static int seq_copy_in_user(void *_bufptr, const void *src, int size)
+ {
++ char __user **bufptr = (char __user **)_bufptr;
++
+ if (copy_to_user(*bufptr, src, size))
+ return -EFAULT;
+ *bufptr += size;
+@@ -158,13 +162,13 @@ int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char
if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) {
if (! in_kernel)
return -EINVAL;
@@ -135141,7 +161636,15 @@ index c850345..71c5fd4 100644
return -EFAULT;
return newlen;
}
-@@ -344,7 +344,7 @@ int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
+ err = snd_seq_dump_var_event(event,
+- in_kernel ? (snd_seq_dump_func_t)seq_copy_in_kernel :
+- (snd_seq_dump_func_t)seq_copy_in_user,
++ in_kernel ? seq_copy_in_kernel :
++ seq_copy_in_user,
+ &buf);
+ return err < 0 ? err : newlen;
+ }
+@@ -344,7 +348,7 @@ int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event,
tmp->event = src->event;
src = src->next;
} else if (is_usrptr) {
@@ -135150,6 +161653,43 @@ index c850345..71c5fd4 100644
err = -EFAULT;
goto __error;
}
+diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
+index 5dd0ee2..0208e35 100644
+--- a/sound/core/seq/seq_midi.c
++++ b/sound/core/seq/seq_midi.c
+@@ -111,8 +111,9 @@ static void snd_midi_input_event(struct snd_rawmidi_substream *substream)
+ }
+ }
+
+-static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, int count)
++static int dump_midi(void *_substream, const void *buf, int count)
+ {
++ struct snd_rawmidi_substream *substream = _substream;
+ struct snd_rawmidi_runtime *runtime;
+ int tmp;
+
+@@ -148,7 +149,7 @@ static int event_process_midi(struct snd_seq_event *ev, int direct,
+ pr_debug("ALSA: seq_midi: invalid sysex event flags = 0x%x\n", ev->flags);
+ return 0;
+ }
+- snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream);
++ snd_seq_dump_var_event(ev, dump_midi, substream);
+ snd_midi_event_reset_decode(msynth->parser);
+ } else {
+ if (msynth->parser == NULL)
+diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
+index c82ed3e..e11d039 100644
+--- a/sound/core/seq/seq_virmidi.c
++++ b/sound/core/seq/seq_virmidi.c
+@@ -90,7 +90,7 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev,
+ if (ev->type == SNDRV_SEQ_EVENT_SYSEX) {
+ if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
+ continue;
+- snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream);
++ snd_seq_dump_var_event(ev, snd_rawmidi_receive, vmidi->substream);
+ } else {
+ len = snd_midi_event_decode(vmidi->parser, msg, sizeof(msg), ev);
+ if (len > 0)
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 175f9e4..3518d31 100644
--- a/sound/core/sound.c
@@ -135306,7 +161846,7 @@ index 8775704..8fea566 100644
static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc)
diff --git a/sound/firewire/digi00x/amdtp-dot.c b/sound/firewire/digi00x/amdtp-dot.c
-index b02a5e8c..96ac8b5 100644
+index 0ac92ab..a2081aa 100644
--- a/sound/firewire/digi00x/amdtp-dot.c
+++ b/sound/firewire/digi00x/amdtp-dot.c
@@ -365,7 +365,7 @@ void amdtp_dot_midi_trigger(struct amdtp_stream *s, unsigned int port,
@@ -135362,39 +161902,35 @@ index 48d6dca..a0266c23 100644
break;
default:
return -EINVAL;
-diff --git a/sound/firewire/scs1x.c b/sound/firewire/scs1x.c
-index 2dba848..c682aef 100644
---- a/sound/firewire/scs1x.c
-+++ b/sound/firewire/scs1x.c
-@@ -74,7 +74,7 @@ static void scs_output_trigger(struct snd_rawmidi_substream *stream, int up)
- {
- struct scs *scs = stream->rmidi->private_data;
+diff --git a/sound/firewire/oxfw/oxfw-scs1x.c b/sound/firewire/oxfw/oxfw-scs1x.c
+index bb53eb3..670cd89 100644
+--- a/sound/firewire/oxfw/oxfw-scs1x.c
++++ b/sound/firewire/oxfw/oxfw-scs1x.c
+@@ -278,9 +278,9 @@ static void midi_capture_trigger(struct snd_rawmidi_substream *stream, int up)
-- ACCESS_ONCE(scs->output) = up ? stream : NULL;
-+ ACCESS_ONCE_RW(scs->output) = up ? stream : NULL;
if (up) {
- scs->output_idle = false;
- tasklet_schedule(&scs->tasklet);
-@@ -257,7 +257,7 @@ static void scs_input_trigger(struct snd_rawmidi_substream *stream, int up)
- {
- struct scs *scs = stream->rmidi->private_data;
-
-- ACCESS_ONCE(scs->input) = up ? stream : NULL;
-+ ACCESS_ONCE_RW(scs->input) = up ? stream : NULL;
+ scs->input_escape_count = 0;
+- ACCESS_ONCE(scs->input) = stream;
++ ACCESS_ONCE_RW(scs->input) = stream;
+ } else {
+- ACCESS_ONCE(scs->input) = NULL;
++ ACCESS_ONCE_RW(scs->input) = NULL;
+ }
}
- static void scs_input_escaped_byte(struct snd_rawmidi_substream *stream,
-@@ -473,8 +473,8 @@ static void scs_remove(struct fw_unit *unit)
-
- snd_card_disconnect(scs->card);
-
-- ACCESS_ONCE(scs->output) = NULL;
-- ACCESS_ONCE(scs->input) = NULL;
-+ ACCESS_ONCE_RW(scs->output) = NULL;
-+ ACCESS_ONCE_RW(scs->input) = NULL;
-
- wait_event(scs->idle_wait, scs->output_idle);
+@@ -310,10 +310,10 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *stream, int up)
+ scs->output_escaped = false;
+ scs->output_idle = false;
+- ACCESS_ONCE(scs->output) = stream;
++ ACCESS_ONCE_RW(scs->output) = stream;
+ tasklet_schedule(&scs->tasklet);
+ } else {
+- ACCESS_ONCE(scs->output) = NULL;
++ ACCESS_ONCE_RW(scs->output) = NULL;
+ }
+ }
+ static void midi_playback_drain(struct snd_rawmidi_substream *stream)
diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c
index dc91072..d85a10a 100644
--- a/sound/oss/sb_audio.c
@@ -135446,6 +161982,275 @@ index 213a416..aeab5c9 100644
list_add(&s->list, &cs4297a_devs);
+diff --git a/sound/pci/als300.c b/sound/pci/als300.c
+index add3176..c9394d9 100644
+--- a/sound/pci/als300.c
++++ b/sound/pci/als300.c
+@@ -647,7 +647,7 @@ static int snd_als300_create(struct snd_card *card,
+ struct snd_als300 **rchip)
+ {
+ struct snd_als300 *chip;
+- void *irq_handler;
++ irq_handler_t irq_handler;
+ int err;
+
+ static struct snd_device_ops ops = {
+diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
+index 1677143..85aca1d 100644
+--- a/sound/pci/aw2/aw2-alsa.c
++++ b/sound/pci/aw2/aw2-alsa.c
+@@ -458,7 +458,6 @@ static int snd_aw2_pcm_prepare_playback(struct snd_pcm_substream *substream)
+
+ /* Define Interrupt callback */
+ snd_aw2_saa7146_define_it_playback_callback(pcm_device->stream_number,
+- (snd_aw2_saa7146_it_cb)
+ snd_pcm_period_elapsed,
+ (void *)substream);
+
+@@ -487,7 +486,6 @@ static int snd_aw2_pcm_prepare_capture(struct snd_pcm_substream *substream)
+
+ /* Define Interrupt callback */
+ snd_aw2_saa7146_define_it_capture_callback(pcm_device->stream_number,
+- (snd_aw2_saa7146_it_cb)
+ snd_pcm_period_elapsed,
+ (void *)substream);
+
+diff --git a/sound/pci/aw2/aw2-saa7146.c b/sound/pci/aw2/aw2-saa7146.c
+index 1d78904..d9c1056 100644
+--- a/sound/pci/aw2/aw2-saa7146.c
++++ b/sound/pci/aw2/aw2-saa7146.c
+@@ -262,7 +262,7 @@ void snd_aw2_saa7146_define_it_playback_callback(unsigned int stream_number,
+ {
+ if (stream_number < NB_STREAM_PLAYBACK) {
+ arr_substream_it_playback_cb[stream_number].p_it_callback =
+- (snd_aw2_saa7146_it_cb) p_it_callback;
++ p_it_callback;
+ arr_substream_it_playback_cb[stream_number].p_callback_param =
+ (void *)p_callback_param;
+ }
+@@ -275,7 +275,7 @@ void snd_aw2_saa7146_define_it_capture_callback(unsigned int stream_number,
+ {
+ if (stream_number < NB_STREAM_CAPTURE) {
+ arr_substream_it_capture_cb[stream_number].p_it_callback =
+- (snd_aw2_saa7146_it_cb) p_it_callback;
++ p_it_callback;
+ arr_substream_it_capture_cb[stream_number].p_callback_param =
+ (void *)p_callback_param;
+ }
+diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c
+index 5fcbb06..f4b85df 100644
+--- a/sound/pci/ctxfi/ctamixer.c
++++ b/sound/pci/ctxfi/ctamixer.c
+@@ -297,8 +297,9 @@ static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer)
+ return 0;
+ }
+
+-int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr)
++int amixer_mgr_create(struct hw *hw, void **_ramixer_mgr)
+ {
++ struct amixer_mgr **ramixer_mgr = (struct amixer_mgr **)_ramixer_mgr;
+ int err;
+ struct amixer_mgr *amixer_mgr;
+
+@@ -326,8 +327,10 @@ error:
+ return err;
+ }
+
+-int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr)
++int amixer_mgr_destroy(void *_amixer_mgr)
+ {
++ struct amixer_mgr *amixer_mgr = _amixer_mgr;
++
+ rsc_mgr_uninit(&amixer_mgr->mgr);
+ kfree(amixer_mgr);
+ return 0;
+@@ -452,8 +455,9 @@ static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum)
+ return 0;
+ }
+
+-int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr)
++int sum_mgr_create(struct hw *hw, void **_rsum_mgr)
+ {
++ struct sum_mgr **rsum_mgr = (struct sum_mgr **)_rsum_mgr;
+ int err;
+ struct sum_mgr *sum_mgr;
+
+@@ -481,8 +485,10 @@ error:
+ return err;
+ }
+
+-int sum_mgr_destroy(struct sum_mgr *sum_mgr)
++int sum_mgr_destroy(void *_sum_mgr)
+ {
++ struct sum_mgr *sum_mgr = _sum_mgr;
++
+ rsc_mgr_uninit(&sum_mgr->mgr);
+ kfree(sum_mgr);
+ return 0;
+diff --git a/sound/pci/ctxfi/ctamixer.h b/sound/pci/ctxfi/ctamixer.h
+index 2de18aa..2fbd01b 100644
+--- a/sound/pci/ctxfi/ctamixer.h
++++ b/sound/pci/ctxfi/ctamixer.h
+@@ -47,8 +47,8 @@ struct sum_mgr {
+ };
+
+ /* Constructor and destructor of daio resource manager */
+-int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr);
+-int sum_mgr_destroy(struct sum_mgr *sum_mgr);
++int sum_mgr_create(struct hw *hw, void **rsum_mgr);
++int sum_mgr_destroy(void *sum_mgr);
+
+ /* Define the descriptor of a amixer resource */
+ struct amixer_rsc_ops;
+@@ -93,7 +93,7 @@ struct amixer_mgr {
+ };
+
+ /* Constructor and destructor of amixer resource manager */
+-int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr);
+-int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr);
++int amixer_mgr_create(struct hw *hw, void **ramixer_mgr);
++int amixer_mgr_destroy(void *amixer_mgr);
+
+ #endif /* CTAMIXER_H */
+diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
+index 977a598..a787004 100644
+--- a/sound/pci/ctxfi/ctatc.c
++++ b/sound/pci/ctxfi/ctatc.c
+@@ -113,16 +113,16 @@ static struct {
+ int (*create)(struct hw *hw, void **rmgr);
+ int (*destroy)(void *mgr);
+ } rsc_mgr_funcs[NUM_RSCTYP] = {
+- [SRC] = { .create = (create_t)src_mgr_create,
+- .destroy = (destroy_t)src_mgr_destroy },
+- [SRCIMP] = { .create = (create_t)srcimp_mgr_create,
+- .destroy = (destroy_t)srcimp_mgr_destroy },
+- [AMIXER] = { .create = (create_t)amixer_mgr_create,
+- .destroy = (destroy_t)amixer_mgr_destroy },
+- [SUM] = { .create = (create_t)sum_mgr_create,
+- .destroy = (destroy_t)sum_mgr_destroy },
+- [DAIO] = { .create = (create_t)daio_mgr_create,
+- .destroy = (destroy_t)daio_mgr_destroy }
++ [SRC] = { .create = src_mgr_create,
++ .destroy = src_mgr_destroy },
++ [SRCIMP] = { .create = srcimp_mgr_create,
++ .destroy = srcimp_mgr_destroy },
++ [AMIXER] = { .create = amixer_mgr_create,
++ .destroy = amixer_mgr_destroy },
++ [SUM] = { .create = sum_mgr_create,
++ .destroy = sum_mgr_destroy },
++ [DAIO] = { .create = daio_mgr_create,
++ .destroy = daio_mgr_destroy }
+ };
+
+ static int
+diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c
+index 7f089cb..6bea28e 100644
+--- a/sound/pci/ctxfi/ctdaio.c
++++ b/sound/pci/ctxfi/ctdaio.c
+@@ -687,8 +687,9 @@ static int daio_mgr_commit_write(struct daio_mgr *mgr)
+ return 0;
+ }
+
+-int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr)
++int daio_mgr_create(struct hw *hw, void **_rdaio_mgr)
+ {
++ struct daio_mgr **rdaio_mgr = (struct daio_mgr **)_rdaio_mgr;
+ int err, i;
+ struct daio_mgr *daio_mgr;
+ struct imapper *entry;
+@@ -741,8 +742,9 @@ error1:
+ return err;
+ }
+
+-int daio_mgr_destroy(struct daio_mgr *daio_mgr)
++int daio_mgr_destroy(void *_daio_mgr)
+ {
++ struct daio_mgr *daio_mgr = _daio_mgr;
+ unsigned long flags;
+
+ /* free daio input mapper list */
+diff --git a/sound/pci/ctxfi/ctdaio.h b/sound/pci/ctxfi/ctdaio.h
+index a30be73..91b8dbd 100644
+--- a/sound/pci/ctxfi/ctdaio.h
++++ b/sound/pci/ctxfi/ctdaio.h
+@@ -119,7 +119,7 @@ struct daio_mgr {
+ };
+
+ /* Constructor and destructor of daio resource manager */
+-int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr);
+-int daio_mgr_destroy(struct daio_mgr *daio_mgr);
++int daio_mgr_create(struct hw *hw, void **rdaio_mgr);
++int daio_mgr_destroy(void *daio_mgr);
+
+ #endif /* CTDAIO_H */
+diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c
+index a5a72df..f86edb8 100644
+--- a/sound/pci/ctxfi/ctsrc.c
++++ b/sound/pci/ctxfi/ctsrc.c
+@@ -544,8 +544,9 @@ static int src_mgr_commit_write(struct src_mgr *mgr)
+ return 0;
+ }
+
+-int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr)
++int src_mgr_create(struct hw *hw, void **_rsrc_mgr)
+ {
++ struct src_mgr **rsrc_mgr = (struct src_mgr **)_rsrc_mgr;
+ int err, i;
+ struct src_mgr *src_mgr;
+
+@@ -584,8 +585,10 @@ error1:
+ return err;
+ }
+
+-int src_mgr_destroy(struct src_mgr *src_mgr)
++int src_mgr_destroy(void *_src_mgr)
+ {
++ struct src_mgr *src_mgr = _src_mgr;
++
+ rsc_mgr_uninit(&src_mgr->mgr);
+ kfree(src_mgr);
+
+@@ -828,8 +831,9 @@ static int srcimp_imap_delete(struct srcimp_mgr *mgr, struct imapper *entry)
+ return err;
+ }
+
+-int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrcimp_mgr)
++int srcimp_mgr_create(struct hw *hw, void **_rsrcimp_mgr)
+ {
++ struct srcimp_mgr **rsrcimp_mgr = (struct srcimp_mgr **)_rsrcimp_mgr;
+ int err;
+ struct srcimp_mgr *srcimp_mgr;
+ struct imapper *entry;
+@@ -873,8 +877,9 @@ error1:
+ return err;
+ }
+
+-int srcimp_mgr_destroy(struct srcimp_mgr *srcimp_mgr)
++int srcimp_mgr_destroy(void *_srcimp_mgr)
+ {
++ struct srcimp_mgr *srcimp_mgr = _srcimp_mgr;
+ unsigned long flags;
+
+ /* free src input mapper list */
+diff --git a/sound/pci/ctxfi/ctsrc.h b/sound/pci/ctxfi/ctsrc.h
+index 92944a0..fc78ed4 100644
+--- a/sound/pci/ctxfi/ctsrc.h
++++ b/sound/pci/ctxfi/ctsrc.h
+@@ -143,10 +143,10 @@ struct srcimp_mgr {
+ };
+
+ /* Constructor and destructor of SRC resource manager */
+-int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr);
+-int src_mgr_destroy(struct src_mgr *src_mgr);
++int src_mgr_create(struct hw *hw, void **rsrc_mgr);
++int src_mgr_destroy(void *src_mgr);
+ /* Constructor and destructor of SRCIMP resource manager */
+-int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrc_mgr);
+-int srcimp_mgr_destroy(struct srcimp_mgr *srcimp_mgr);
++int srcimp_mgr_create(struct hw *hw, void **rsrc_mgr);
++int srcimp_mgr_destroy(void *srcimp_mgr);
+
+ #endif /* CTSRC_H */
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 8374188..f073778 100644
--- a/sound/pci/hda/hda_codec.c
@@ -135516,6 +162321,32 @@ index 4c26076..a13f370 100644
chip->card = card;
chip->pci = pci;
chip->irq = -1;
+diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
+index d6f4abb..5d59f0c 100644
+--- a/sound/soc/codecs/cx20442.c
++++ b/sound/soc/codecs/cx20442.c
+@@ -263,6 +263,12 @@ static int v253_hangup(struct tty_struct *tty)
+ return 0;
+ }
+
++static int v253_hw_write(void *client, const char *buf, int count)
++{
++ struct tty_struct *tty = client;
++ return tty->ops->write(client, buf, count);
++}
++
+ /* Line discipline .receive_buf() */
+ static void v253_receive(struct tty_struct *tty,
+ const unsigned char *cp, char *fp, int count)
+@@ -280,7 +286,7 @@ static void v253_receive(struct tty_struct *tty,
+
+ /* Set up codec driver access to modem controls */
+ cx20442->control_data = tty;
+- codec->hw_write = (hw_write_t)tty->ops->write;
++ codec->hw_write = v253_hw_write;
+ codec->component.card->pop_time = 1;
+ }
+ }
diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 160d61a..10bfd63 100644
--- a/sound/soc/codecs/sti-sas.c
@@ -135538,14 +162369,63 @@ index 160d61a..10bfd63 100644
/* Store context */
dev_set_drvdata(&pdev->dev, drvdata);
+diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
+index f7a6ce7..82310c8 100644
+--- a/sound/soc/codecs/tlv320dac33.c
++++ b/sound/soc/codecs/tlv320dac33.c
+@@ -1375,13 +1375,18 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai,
+ return 0;
+ }
+
++static int dac33_hw_write(void *client, const char *buf, int count)
++{
++ return i2c_master_send(client, buf, count);
++}
++
+ static int dac33_soc_probe(struct snd_soc_codec *codec)
+ {
+ struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
+ int ret = 0;
+
+ codec->control_data = dac33->control_data;
+- codec->hw_write = (hw_write_t) i2c_master_send;
++ codec->hw_write = dac33_hw_write;
+ dac33->codec = codec;
+
+ /* Read the tlv320dac33 ID registers */
+diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
+index 35f0469..7c25cd5 100644
+--- a/sound/soc/codecs/uda1380.c
++++ b/sound/soc/codecs/uda1380.c
+@@ -687,6 +687,11 @@ static struct snd_soc_dai_driver uda1380_dai[] = {
+ },
+ };
+
++static int uda1380_hw_write(void *client, const char *buf, int count)
++{
++ return i2c_master_send(client, buf, count);
++}
++
+ static int uda1380_probe(struct snd_soc_codec *codec)
+ {
+ struct uda1380_platform_data *pdata =codec->dev->platform_data;
+@@ -695,7 +700,7 @@ static int uda1380_probe(struct snd_soc_codec *codec)
+
+ uda1380->codec = codec;
+
+- codec->hw_write = (hw_write_t)i2c_master_send;
++ codec->hw_write = uda1380_hw_write;
+ codec->control_data = uda1380->control_data;
+
+ if (!pdata)
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.h b/sound/soc/intel/skylake/skl-sst-dsp.h
-index 6bfcef4..201ca47 100644
+index cbb4075..edda3dd 100644
--- a/sound/soc/intel/skylake/skl-sst-dsp.h
+++ b/sound/soc/intel/skylake/skl-sst-dsp.h
-@@ -114,14 +114,14 @@ struct skl_dsp_fw_ops {
- int (*set_state_D0)(struct sst_dsp *ctx);
- int (*set_state_D3)(struct sst_dsp *ctx);
- unsigned int (*get_fw_errcode)(struct sst_dsp *ctx);
+@@ -117,14 +117,14 @@ struct skl_dsp_fw_ops {
+ int (*load_mod)(struct sst_dsp *ctx, u16 mod_id, char *mod_name);
+ int (*unload_mod)(struct sst_dsp *ctx, u16 mod_id);
+
-};
+} __no_const;
@@ -135557,13 +162437,13 @@ index 6bfcef4..201ca47 100644
-};
+} __no_const;
- void skl_cldma_process_intr(struct sst_dsp *ctx);
- void skl_cldma_int_disable(struct sst_dsp *ctx);
+ struct skl_load_module_info {
+ u16 mod_id;
diff --git a/sound/soc/soc-ac97.c b/sound/soc/soc-ac97.c
-index d40efc9..4dbd571 100644
+index 7e0acd8..7fe0f65 100644
--- a/sound/soc/soc-ac97.c
+++ b/sound/soc/soc-ac97.c
-@@ -291,8 +291,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
+@@ -416,8 +416,10 @@ int snd_soc_set_ac97_ops_of_reset(struct snd_ac97_bus_ops *ops,
if (ret)
return ret;
@@ -135772,10 +162652,10 @@ index 0000000..de92ed9
+randomize_layout_seed.h
diff --git a/tools/gcc/Makefile b/tools/gcc/Makefile
new file mode 100644
-index 0000000..4945d82
+index 0000000..f1db084
--- /dev/null
+++ b/tools/gcc/Makefile
-@@ -0,0 +1,54 @@
+@@ -0,0 +1,58 @@
+#CC := gcc
+#PLUGIN_SOURCE_FILES := pax_plugin.c
+#PLUGIN_OBJECT_FILES := $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
@@ -135784,11 +162664,11 @@ index 0000000..4945d82
+
+ifeq ($(PLUGINCC),$(HOSTCC))
+HOSTLIBS := hostlibs
-+HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb
++HOST_EXTRACFLAGS += -I$(GCCPLUGINS_DIR)/include -I$(src) -std=gnu99 -ggdb -Wall -W
+export HOST_EXTRACFLAGS
+else
+HOSTLIBS := hostcxxlibs
-+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
++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
+export HOST_EXTRACXXFLAGS
+endif
+
@@ -135808,6 +162688,9 @@ index 0000000..4945d82
+subdir-$(CONFIG_PAX_SIZE_OVERFLOW) := size_overflow_plugin
+subdir- += size_overflow_plugin
+
++subdir-$(CONFIG_PAX_RAP) += rap_plugin
++subdir- += rap_plugin
++
+always := $($(HOSTLIBS)-y)
+
+constify_plugin-objs := constify_plugin.o
@@ -135819,6 +162702,7 @@ index 0000000..4945d82
+latent_entropy_plugin-objs := latent_entropy_plugin.o
+structleak_plugin-objs := structleak_plugin.o
+initify_plugin-objs := initify_plugin.o
++rap_plugin-objs := rap_plugin.o sip.o
+randomize_layout_plugin-objs := randomize_layout_plugin.o
+
+$(obj)/randomize_layout_plugin.o: $(objtree)/$(obj)/randomize_layout_seed.h
@@ -136334,7 +163218,7 @@ index 0000000..efaf576
+}
diff --git a/tools/gcc/colorize_plugin.c b/tools/gcc/colorize_plugin.c
new file mode 100644
-index 0000000..eec3fd1
+index 0000000..ffe60f6
--- /dev/null
+++ b/tools/gcc/colorize_plugin.c
@@ -0,0 +1,162 @@
@@ -136433,7 +163317,7 @@ index 0000000..eec3fd1
+
+#define PASS_NAME colorize_rearm
+#define NO_GATE
-+#include "gcc-generate-gimple-pass.h"
++#include "gcc-generate-simple_ipa-pass.h"
+
+static void colorize_start_unit(void *gcc_data, void *user_data)
+{
@@ -137029,10 +163913,10 @@ index 0000000..b52a700
+}
diff --git a/tools/gcc/gcc-common.h b/tools/gcc/gcc-common.h
new file mode 100644
-index 0000000..fbed673
+index 0000000..0c0b842
--- /dev/null
+++ b/tools/gcc/gcc-common.h
-@@ -0,0 +1,858 @@
+@@ -0,0 +1,879 @@
+#ifndef GCC_COMMON_H_INCLUDED
+#define GCC_COMMON_H_INCLUDED
+
@@ -137347,6 +164231,22 @@ index 0000000..fbed673
+ return NULL;
+}
+
++static inline bool cgraph_for_node_and_aliases(cgraph_node_ptr node, bool (*callback)(cgraph_node_ptr, void *), void *data, bool include_overwritable)
++{
++ cgraph_node_ptr alias;
++
++ if (callback(node, data))
++ return true;
++
++ for (alias = node->same_body; alias; alias = alias->next) {
++ if (include_overwritable || cgraph_function_body_availability(alias) > AVAIL_OVERWRITABLE)
++ if (cgraph_for_node_and_aliases(alias, callback, data, include_overwritable))
++ return true;
++ }
++
++ return false;
++}
++
+#define FOR_EACH_FUNCTION_WITH_GIMPLE_BODY(node) \
+ for ((node) = cgraph_first_function_with_gimple_body(); (node); \
+ (node) = cgraph_next_function_with_gimple_body(node))
@@ -137736,6 +164636,11 @@ index 0000000..fbed673
+ return node->get_alias_target();
+}
+
++static inline bool cgraph_for_node_and_aliases(cgraph_node_ptr node, bool (*callback)(cgraph_node_ptr, void *), void *data, bool include_overwritable)
++{
++ return node->call_for_symbol_thunks_and_aliases(callback, data, include_overwritable);
++}
++
+static inline struct cgraph_node_hook_list *cgraph_add_function_insertion_hook(cgraph_node_hook hook, void *data)
+{
+ return symtab->add_cgraph_insertion_hook(hook, data);
@@ -139428,7 +166333,7 @@ index 0000000..30ecc9a
+}
diff --git a/tools/gcc/kernexec_plugin.c b/tools/gcc/kernexec_plugin.c
new file mode 100644
-index 0000000..5598420
+index 0000000..e31e92f
--- /dev/null
+++ b/tools/gcc/kernexec_plugin.c
@@ -0,0 +1,407 @@
@@ -139816,10 +166721,10 @@ index 0000000..5598420
+ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
+ continue;
+ }
-+ if (!strcmp(argv[i].value, "bts")) {
++ if (!strcmp(argv[i].value, "bts") || !strcmp(argv[i].value, "\"bts\"")) {
+ kernexec_instrument_fptr = kernexec_instrument_fptr_bts;
+ kernexec_instrument_retaddr = kernexec_instrument_retaddr_bts;
-+ } else if (!strcmp(argv[i].value, "or")) {
++ } else if (!strcmp(argv[i].value, "or") || !strcmp(argv[i].value, "\"or\"")) {
+ kernexec_instrument_fptr = kernexec_instrument_fptr_or;
+ kernexec_instrument_retaddr = kernexec_instrument_retaddr_or;
+ fix_register("r12", 1, 1);
@@ -141208,6 +168113,1258 @@ index 0000000..c77d26d
+
+ return 0;
+}
+diff --git a/tools/gcc/rap_plugin/Makefile b/tools/gcc/rap_plugin/Makefile
+new file mode 100644
+index 0000000..8171be8
+--- /dev/null
++++ b/tools/gcc/rap_plugin/Makefile
+@@ -0,0 +1,4 @@
++$(HOSTLIBS)-$(CONFIG_PAX_RAP) += rap_plugin.so
++always := $($(HOSTLIBS)-y)
++
++rap_plugin-objs := $(patsubst $(srctree)/$(src)/%.c,%.o,$(wildcard $(srctree)/$(src)/*.c))
+diff --git a/tools/gcc/rap_plugin/rap.h b/tools/gcc/rap_plugin/rap.h
+new file mode 100644
+index 0000000..f6a284d
+--- /dev/null
++++ b/tools/gcc/rap_plugin/rap.h
+@@ -0,0 +1,36 @@
++#ifndef RAP_H_INCLUDED
++#define RAP_H_INCLUDED
++
++#include "gcc-common.h"
++
++typedef struct {
++ int hash; // will be sign extended to long in reality
++} rap_hash_t;
++
++typedef struct {
++ unsigned int qual_const:1;
++ unsigned int qual_volatile:1;
++} rap_hash_flags_t;
++extern rap_hash_flags_t imprecise_rap_hash_flags;
++
++extern bool report_fptr_hash;
++
++extern GTY(()) tree rap_hash_type_node;
++
++void siphash24fold(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k);
++void rap_calculate_func_hashes(void *event_data, void *data);
++rap_hash_t rap_hash_function_type(const_tree fntype, rap_hash_flags_t flags);
++rap_hash_t rap_hash_function_decl(const_tree fndecl, rap_hash_flags_t flags);
++rap_hash_t rap_hash_function_node_imprecise(cgraph_node_ptr node);
++const_tree type_name(const_tree type);
++tree create_new_var(tree type, const char *name);
++
++gimple barrier(tree var, bool full);
++
++#if BUILDING_GCC_VERSION >= 4009
++opt_pass *make_rap_fptr_pass(void);
++#else
++struct opt_pass *make_rap_fptr_pass(void);
++#endif
++
++#endif
+diff --git a/tools/gcc/rap_plugin/rap_fptr_pass.c b/tools/gcc/rap_plugin/rap_fptr_pass.c
+new file mode 100644
+index 0000000..7e377d7
+--- /dev/null
++++ b/tools/gcc/rap_plugin/rap_fptr_pass.c
+@@ -0,0 +1,220 @@
++/*
++ * Copyright 2012-2016 by PaX Team <pageexec@freemail.hu>
++ * Licensed under the GPL v2
++ *
++ * Homepage: http://pax.grsecurity.net/
++ */
++
++#include "rap.h"
++
++bool report_fptr_hash;
++
++static bool rap_fptr_gate(void)
++{
++#ifdef TARGET_386
++ tree section;
++
++ if (!TARGET_64BIT || ix86_cmodel != CM_KERNEL)
++ return true;
++
++ section = lookup_attribute("section", DECL_ATTRIBUTES(current_function_decl));
++ if (!section || !TREE_VALUE(section))
++ return true;
++
++ section = TREE_VALUE(TREE_VALUE(section));
++ return strncmp(TREE_STRING_POINTER(section), ".vsyscall_", 10);
++#else
++#error unsupported target
++#endif
++}
++
++static tree build_rap_hash(gimple call_stmt, tree fntype)
++{
++ rap_hash_t hash;
++
++ hash = rap_hash_function_type(fntype, imprecise_rap_hash_flags);
++ if (report_fptr_hash)
++ inform(gimple_location(call_stmt), "fptr rap_hash: %x", hash.hash);
++ return build_int_cst_type(rap_hash_type_node, hash.hash);
++}
++
++// check the function hash of the target of the fptr
++static basic_block rap_instrument_fptr(gimple_stmt_iterator *gsi)
++{
++ gimple assign_hash, check_hash, call_stmt, stmt;
++ location_t loc;
++ tree computed_hash, target_hash, fptr, fntype;
++#if BUILDING_GCC_VERSION == 4005
++ tree fptr2;
++#endif
++ basic_block cond_bb, join_bb, true_bb;
++ edge e;
++ const HOST_WIDE_INT rap_hash_offset = 2 * sizeof(rap_hash_t);
++
++ call_stmt = gsi_stmt(*gsi);
++ loc = gimple_location(call_stmt);
++ fptr = gimple_call_fn(call_stmt);
++ fntype = TREE_TYPE(TREE_TYPE(fptr));
++
++ if (TREE_CODE(fntype) == FUNCTION_TYPE) {
++ computed_hash = build_rap_hash(call_stmt, fntype);
++ } else {
++ debug_tree(fntype);
++ gcc_unreachable();
++ }
++
++ // target_hash = ((s64*)fptr)[-rap_hash_offset]
++ target_hash = create_tmp_var(rap_hash_type_node, "rap_hash");
++ add_referenced_var(target_hash);
++ target_hash = make_ssa_name(target_hash, NULL);
++#if BUILDING_GCC_VERSION == 4005
++ fptr2 = create_tmp_var(ptr_type_node, "rap_fptr2");
++ fptr2 = make_ssa_name(fptr2, NULL);
++ assign_hash = gimple_build_assign(fptr2, build2(POINTER_PLUS_EXPR, ptr_type_node, fptr, build_int_cst_type(sizetype, -rap_hash_offset)));
++ gimple_set_location(assign_hash, loc);
++ SSA_NAME_DEF_STMT(fptr2) = assign_hash;
++ gsi_insert_before(gsi, assign_hash, GSI_SAME_STMT);
++ update_stmt(assign_hash);
++ fptr = gimple_get_lhs(assign_hash);
++
++ fptr2 = create_tmp_var(build_pointer_type(rap_hash_type_node), "rap_fptr2");
++ fptr2 = make_ssa_name(fptr2, NULL);
++ assign_hash = gimple_build_assign(fptr2, fold_convert(build_pointer_type(TREE_TYPE(target_hash)), fptr));
++ gimple_set_location(assign_hash, loc);
++ SSA_NAME_DEF_STMT(fptr2) = assign_hash;
++ gsi_insert_before(gsi, assign_hash, GSI_SAME_STMT);
++ update_stmt(assign_hash);
++ fptr = gimple_get_lhs(assign_hash);
++
++ assign_hash = gimple_build_assign(target_hash, build1(INDIRECT_REF, rap_hash_type_node, fptr));
++#else
++ 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)));
++#endif
++ gimple_set_location(assign_hash, loc);
++ SSA_NAME_DEF_STMT(target_hash) = assign_hash;
++ gsi_insert_before(gsi, assign_hash, GSI_NEW_STMT);
++ update_stmt(assign_hash);
++
++ // compare target_hash against computed function hash
++ // bail out on mismatch
++ check_hash = gimple_build_cond(NE_EXPR, target_hash, computed_hash, NULL_TREE, NULL_TREE);
++ gimple_set_location(check_hash, loc);
++ gsi_insert_after(gsi, check_hash, GSI_NEW_STMT);
++
++ cond_bb = gimple_bb(gsi_stmt(*gsi));
++ gcc_assert(!gsi_end_p(*gsi));
++ gcc_assert(check_hash == gsi_stmt(*gsi));
++
++ e = split_block(cond_bb, gsi_stmt(*gsi));
++ cond_bb = e->src;
++ join_bb = e->dest;
++ e->flags = EDGE_FALSE_VALUE;
++ e->probability = REG_BR_PROB_BASE;
++
++ true_bb = create_empty_bb(EXIT_BLOCK_PTR_FOR_FN(cfun)->prev_bb);
++ make_edge(cond_bb, true_bb, EDGE_TRUE_VALUE | EDGE_PRESERVE);
++
++ gcc_assert(dom_info_available_p(CDI_DOMINATORS));
++ set_immediate_dominator(CDI_DOMINATORS, true_bb, cond_bb);
++ set_immediate_dominator(CDI_DOMINATORS, join_bb, cond_bb);
++
++ gcc_assert(cond_bb->loop_father == join_bb->loop_father);
++ add_bb_to_loop(true_bb, cond_bb->loop_father);
++
++ *gsi = gsi_start_bb(true_bb);
++
++ // this fake dependency is to prevent PRE from merging this BB with others of the same kind
++ stmt = barrier(fptr, false);
++ gimple_set_location(stmt, loc);
++ gsi_insert_after(gsi, stmt, GSI_CONTINUE_LINKING);
++
++ stmt = gimple_build_call(builtin_decl_implicit(BUILT_IN_TRAP), 0);
++ gimple_set_location(stmt, loc);
++ gsi_insert_after(gsi, stmt, GSI_CONTINUE_LINKING);
++
++ return join_bb;
++}
++
++// find all language level function pointer dereferences and verify the target function
++static unsigned int rap_fptr_execute(void)
++{
++ basic_block bb;
++
++ loop_optimizer_init(LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
++ gcc_assert(current_loops);
++
++ calculate_dominance_info(CDI_DOMINATORS);
++ calculate_dominance_info(CDI_POST_DOMINATORS);
++
++ // 1. loop through BBs and GIMPLE statements
++ FOR_EACH_BB_FN(bb, cfun) {
++ gimple_stmt_iterator gsi;
++
++ for (gsi = gsi_start_bb(bb); !gsi_end_p(gsi); gsi_next(&gsi)) {
++ // gimple match: h_1 = get_fptr (); D.2709_3 = h_1 (x_2(D));
++ tree fptr, fntype;
++ gimple call_stmt;
++
++ // is it a call ...
++ call_stmt = gsi_stmt(gsi);
++ if (!is_gimple_call(call_stmt))
++ continue;
++
++ fptr = gimple_call_fn(call_stmt);
++ if (!fptr)
++ continue;
++
++ switch (TREE_CODE(fptr)) {
++ default:
++ debug_gimple_stmt(call_stmt);
++ debug_tree(fptr);
++ debug_tree(TREE_TYPE(fptr));
++ gcc_unreachable();
++
++ case ADDR_EXPR:
++ continue;
++
++ case SSA_NAME:
++ if (SSA_NAME_VAR(fptr) == NULL_TREE)
++ break;
++
++ switch (TREE_CODE(SSA_NAME_VAR(fptr))) {
++ default:
++ debug_gimple_stmt(call_stmt);
++ debug_tree(fptr);
++ gcc_unreachable();
++
++ case VAR_DECL:
++ case PARM_DECL:
++ break;
++ }
++ break;
++
++ case INTEGER_CST:
++ case OBJ_TYPE_REF:
++ break;
++ }
++
++ // ... through a function pointer
++ fntype = TREE_TYPE(fptr);
++ if (TREE_CODE(fntype) != POINTER_TYPE)
++ continue;
++
++ fntype = TREE_TYPE(fntype);
++ gcc_assert(TREE_CODE(fntype) == FUNCTION_TYPE || TREE_CODE(fntype) == METHOD_TYPE);
++
++ bb = rap_instrument_fptr(&gsi);
++ gsi = gsi_start_bb(bb);
++ }
++ }
++
++ free_dominance_info(CDI_DOMINATORS);
++ free_dominance_info(CDI_POST_DOMINATORS);
++ loop_optimizer_finalize();
++
++ return 0;
++}
++
++#define PASS_NAME rap_fptr
++#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
++#include "gcc-generate-gimple-pass.h"
+diff --git a/tools/gcc/rap_plugin/rap_hash.c b/tools/gcc/rap_plugin/rap_hash.c
+new file mode 100644
+index 0000000..ebdcf7c
+--- /dev/null
++++ b/tools/gcc/rap_plugin/rap_hash.c
+@@ -0,0 +1,381 @@
++/*
++ * Copyright 2012-2016 by PaX Team <pageexec@freemail.hu>
++ * Licensed under the GPL v2
++ *
++ * Homepage: http://pax.grsecurity.net/
++ */
++
++#include "rap.h"
++
++static rap_hash_t *rap_imprecise_hashes;
++static int rap_cgraph_max_uid;
++
++static void rap_hash_function(const_tree fntype, rap_hash_flags_t flags, unsigned char sip_hash[8]);
++
++static const unsigned char rap_hash_tree_code[MAX_TREE_CODES] = {
++ [0] = 0,
++ [1] = 0,
++ [2] = 0,
++ [3] = 0,
++ [4] = 0,
++ [OFFSET_TYPE] = 10,
++ [ENUMERAL_TYPE] = 20,
++ [BOOLEAN_TYPE] = 30,
++ [INTEGER_TYPE] = 40,
++ [REAL_TYPE] = 50,
++ [POINTER_TYPE] = 60,
++ [REFERENCE_TYPE] = 70,
++#if BUILDING_GCC_VERSION >= 4006
++ [NULLPTR_TYPE] = 80,
++#endif
++ [FIXED_POINT_TYPE] = 0,
++ [COMPLEX_TYPE] = 100,
++ [VECTOR_TYPE] = 110,
++ [ARRAY_TYPE] = 120,
++ [RECORD_TYPE] = 130,
++ [UNION_TYPE] = 140,
++ [QUAL_UNION_TYPE] = 0,
++ [VOID_TYPE] = 160,
++#if BUILDING_GCC_VERSION >= 5000
++ [POINTER_BOUNDS_TYPE] = 170,
++#endif
++ [FUNCTION_TYPE] = 180,
++ [METHOD_TYPE] = 0,
++ [LANG_TYPE] = 0,
++};
++
++static void rap_fold_hash(unsigned char *out, const unsigned char *in, unsigned long long inlen)
++{
++ static const unsigned char rap_sip_key[16] = {
++ 'P', 'a', 'X', ' ', 'T', 'e', 'a', 'm',
++ 'R', 'A', 'P', ' ', 'H', 'A', 'S', 'H',
++ };
++
++ siphash24fold(out, in, inlen, rap_sip_key);
++}
++
++// compute the final hash value in the range [1,INT_MAX]
++// the % and +1 trick leaves the value 0 available for marking non-indirectly callable functions
++// and INT_MIN (0x80000000) for longjmp targets (sign extended)
++// return places will use the (sign extended) range [INT_MIN+1,-1] ([0x8000001,0xffffffff])
++static rap_hash_t rap_extract_hash(const unsigned char sip_hash[8])
++{
++ rap_hash_t hash;
++ unsigned long long dividend, divisor;
++
++ memcpy(&dividend, sip_hash, sizeof dividend);
++// divisor = 1ULL << (sizeof hash * 8 - 1);
++// divisor |= divisor - 1;
++ divisor = 0x7fffffffUL;
++ hash.hash = dividend % divisor + 1;
++ return hash;
++}
++
++static void rap_hash_type_name(const_tree type, unsigned char sip_hash[8])
++{
++ const_tree name = type_name(TYPE_MAIN_VARIANT(type));
++
++ // handle typedefs of anonymous structs/unions
++ if (name == NULL_TREE)
++ name = type_name(type);
++
++ if (name == NULL_TREE)
++ return;
++
++ gcc_assert(TREE_CODE(name) == IDENTIFIER_NODE);
++ rap_fold_hash(sip_hash, (const unsigned char *)IDENTIFIER_POINTER(name), IDENTIFIER_LENGTH(name));
++}
++
++static void rap_hash_type_precision(const_tree type, unsigned char sip_hash[8])
++{
++ unsigned HOST_WIDE_INT size;
++
++ gcc_assert(TYPE_PRECISION(type));
++
++ size = TYPE_PRECISION(type);
++ rap_fold_hash(sip_hash, (const unsigned char *)&size, sizeof size);
++}
++
++const_tree type_name(const_tree type)
++{
++ const_tree name;
++
++ name = TYPE_NAME(type);
++ if (!name)
++ return NULL_TREE;
++
++ switch (TREE_CODE(name)) {
++ case IDENTIFIER_NODE:
++ return name;
++
++ case TYPE_DECL:
++ gcc_assert(DECL_NAME(name));
++ return DECL_NAME(name);
++
++ default:
++ gcc_unreachable();
++ }
++}
++
++__attribute__((weak)) tree c_global_trees[CTI_MAX];
++
++// the core computation of the rap hash
++// the first piece is a (hopefully) compiler independent encondig of the type, derived from the gcc tree code
++// the second piece is type specific information, such as the size, qualifiers, (recursively) referenced types, etc
++static void rap_hash_tree(const_tree type, rap_hash_flags_t flags, unsigned char sip_hash[8])
++{
++ enum tree_code code;
++ unsigned int attrs;
++
++ code = TREE_CODE(type);
++ attrs = rap_hash_tree_code[code];
++ if (!attrs) {
++ fprintf(stderr, "unhandled tree_code %s %d\n", get_tree_code_name(code), code);
++ debug_tree(type);
++ gcc_unreachable();
++ }
++ rap_fold_hash(sip_hash, (const unsigned char *)&attrs, sizeof attrs);
++
++ enum {
++ // attrs layout for
++ // - all types:
++ RAP_HASH_VOLATILE = 1U << 31,
++ RAP_HASH_NOT_VOLATILE = 1U << 30,
++ RAP_HASH_CONST = 1U << 29,
++ RAP_HASH_NOT_CONST = 1U << 28,
++
++ // - pointer types:
++ RAP_HASH_RESTRICT = 1U << 27,
++ RAP_HASH_NOT_RESTRICT = 1U << 26,
++
++ // - C integer types:
++ RAP_HASH_UNSIGNED = 1U << 25,
++ RAP_HASH_SIGNED = 1U << 24,
++
++ RAP_HASH_UNQUALIFIED_CHAR = 1U << 23,
++ RAP_HASH_CHAR = 1U << 22,
++ RAP_HASH_SHORT = 1U << 21,
++ RAP_HASH_INT = 1U << 20,
++ RAP_HASH_LONG = 1U << 19,
++ RAP_HASH_LONG_LONG = 1U << 18,
++ RAP_HASH_WCHAR = 1U << 17,
++ RAP_HASH_CHAR16 = 1U << 16,
++ RAP_HASH_CHAR32 = 1U << 15,
++
++ // - C float types
++ RAP_HASH_FLOAT = 1U << 14,
++ RAP_HASH_DOUBLE = 1U << 13,
++ RAP_HASH_LONG_DOUBLE = 1U << 12,
++ RAP_HASH_DFLOAT32 = 1U << 11,
++ RAP_HASH_DFLOAT64 = 1U << 10,
++ RAP_HASH_DFLOAT128 = 1U << 9,
++ };
++
++ attrs = 0;
++ if (flags.qual_volatile)
++ attrs |= TYPE_VOLATILE(type) ? RAP_HASH_VOLATILE : RAP_HASH_NOT_VOLATILE;
++ if (flags.qual_const)
++ attrs |= TYPE_READONLY(type) ? RAP_HASH_CONST : RAP_HASH_NOT_CONST;
++
++ switch (code) {
++ default:
++ debug_tree(type);
++ gcc_unreachable();
++ break;
++
++ case VOID_TYPE:
++ break;
++
++ case OFFSET_TYPE:
++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
++ rap_hash_tree(TYPE_OFFSET_BASETYPE(type), flags, sip_hash);
++ break;
++
++ case FUNCTION_TYPE:
++ rap_hash_function(type, flags, sip_hash);
++ break;
++
++ case RECORD_TYPE:
++ rap_hash_type_name(type, sip_hash);
++ break;
++
++ case UNION_TYPE:
++ rap_hash_type_name(type, sip_hash);
++ break;
++
++ case POINTER_TYPE:
++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
++ break;
++
++ case VECTOR_TYPE:
++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
++ rap_hash_type_precision(TREE_TYPE(type), sip_hash);
++ break;
++
++ case ARRAY_TYPE:
++ rap_hash_tree(TREE_TYPE(type), flags, sip_hash);
++ break;
++
++ case REAL_TYPE: {
++ const_tree main_variant = TYPE_MAIN_VARIANT(type);
++
++ switch (TYPE_PRECISION(main_variant)) {
++ default:
++ debug_tree(type);
++ debug_tree(TYPE_MAIN_VARIANT(type));
++ gcc_unreachable();
++
++ case 32:
++// attrs |= RAP_HASH_FLOAT;
++ break;
++
++ case 64:
++// attrs |= RAP_HASH_DOUBLE;
++ break;
++
++ case 80:
++ case 128:
++ attrs |= RAP_HASH_LONG_DOUBLE;
++ break;
++ }
++ rap_hash_type_precision(main_variant, sip_hash);
++ break;
++ }
++
++ case ENUMERAL_TYPE:
++ rap_hash_type_name(type, sip_hash);
++ case BOOLEAN_TYPE:
++ rap_hash_type_precision(type, sip_hash);
++ break;
++
++ case INTEGER_TYPE: {
++ attrs |= TYPE_UNSIGNED(type) ? RAP_HASH_UNSIGNED : RAP_HASH_SIGNED;
++ rap_hash_type_precision(type, sip_hash);
++ break;
++ }
++ }
++
++ rap_fold_hash(sip_hash, (const unsigned char *)&attrs, sizeof attrs);
++}
++
++static const_tree rap_dequal_argtype(const_tree argtype)
++{
++ // since gcc/tree.c:free_lang_data_in_type removes const/volatile from the top level param decl
++ // we have to simulate it here as this can be called earlier from the frontend as well
++ if (TYPE_READONLY(argtype) || TYPE_VOLATILE(argtype)) {
++ int quals;
++
++ quals = TYPE_QUALS(argtype) & ~TYPE_QUAL_CONST & ~TYPE_QUAL_VOLATILE;
++ argtype = build_qualified_type(CONST_CAST_TREE(argtype), quals);
++ }
++
++ return argtype;
++}
++
++// main function to compute the rap hash for function types
++// while virtual class methods are always replaced with their ancestor,
++// callers can decide whether to fully utilize that information via flags.method_ancestor
++static void rap_hash_function(const_tree fntype, rap_hash_flags_t flags, unsigned char sip_hash[8])
++{
++ function_args_iterator args_iter;
++ const_tree arg;
++
++ switch (TREE_CODE(fntype)) {
++ default:
++ debug_tree(fntype);
++ gcc_unreachable();
++
++ case FUNCTION_TYPE:
++ // 1. hash the result
++ rap_hash_tree(TREE_TYPE(fntype), flags, sip_hash);
++
++ // 2. hash the function parameters
++ FOREACH_FUNCTION_ARGS(fntype, arg, args_iter) {
++ const_tree argtype = arg;
++
++ argtype = rap_dequal_argtype(argtype);
++ rap_hash_tree(argtype, flags, sip_hash);
++ }
++ break;
++ }
++}
++
++rap_hash_t rap_hash_function_type(const_tree fntype, rap_hash_flags_t flags)
++{
++ unsigned char sip_hash[8] = { };
++ rap_hash_t hash;
++
++ rap_hash_function(fntype, flags, sip_hash);
++ hash = rap_extract_hash(sip_hash);
++
++ gcc_assert(hash.hash);
++ return hash;
++}
++
++rap_hash_t rap_hash_function_decl(const_tree fndecl, rap_hash_flags_t flags)
++{
++ tree fntype;
++
++ gcc_assert(TREE_CODE(fndecl) == FUNCTION_DECL);
++ fntype = TREE_TYPE(fndecl);
++
++ switch (TREE_CODE(fntype)) {
++ default:
++ debug_tree(fndecl);
++ gcc_unreachable();
++
++ case FUNCTION_TYPE:
++ return rap_hash_function_type(fntype, flags);
++ }
++}
++
++rap_hash_t rap_hash_function_node_imprecise(cgraph_node_ptr node)
++{
++ rap_hash_t hash;
++ tree fndecl;
++
++ gcc_assert(rap_imprecise_hashes);
++
++ hash.hash = 0;
++ if (node->uid < rap_cgraph_max_uid)
++ hash = rap_imprecise_hashes[node->uid];
++
++ if (hash.hash)
++ return hash;
++
++ fndecl = NODE_DECL(node);
++ if (TREE_CODE(TREE_TYPE(fndecl)) == FUNCTION_TYPE)
++ return rap_hash_function_decl(fndecl, imprecise_rap_hash_flags);
++
++ debug_cgraph_node(node);
++ debug_tree(fndecl);
++ error("indirect call to function %qD with a reserved hash value", fndecl);
++ return hash;
++}
++
++void rap_calculate_func_hashes(void *event_data __unused, void *data __unused)
++{
++ cgraph_node_ptr node;
++ int uid;
++
++ gcc_assert(!rap_imprecise_hashes);
++
++ rap_imprecise_hashes = (rap_hash_t *)xcalloc(cgraph_max_uid, sizeof(*rap_imprecise_hashes));
++ rap_cgraph_max_uid = cgraph_max_uid;
++
++ FOR_EACH_FUNCTION(node) {
++ const_tree fndecl;
++
++ uid = node->uid;
++ gcc_assert(uid < rap_cgraph_max_uid);
++
++ if (node->global.inlined_to)
++ continue;
++
++ fndecl = NODE_DECL(node);
++ gcc_assert(fndecl);
++
++ rap_imprecise_hashes[uid] = rap_hash_function_decl(fndecl, imprecise_rap_hash_flags);
++ gcc_assert(rap_imprecise_hashes[uid].hash);
++ }
++}
+diff --git a/tools/gcc/rap_plugin/rap_plugin.c b/tools/gcc/rap_plugin/rap_plugin.c
+new file mode 100644
+index 0000000..c5827cb
+--- /dev/null
++++ b/tools/gcc/rap_plugin/rap_plugin.c
+@@ -0,0 +1,479 @@
++/*
++ * Copyright 2012-2016 by PaX Team <pageexec@freemail.hu>
++ * Licensed under the GPL v2
++ *
++ * Homepage: http://pax.grsecurity.net/
++ *
++ * Usage:
++ * $ # for 4.5/4.6/C based 4.7
++ * $ 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
++ * $ # for C++ based 4.7/4.8+
++ * $ 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
++ * $ gcc -fplugin=./rap_plugin.so -fplugin-arg-rap_plugin-check=call test.c -O2
++ */
++
++#include "rap.h"
++
++int plugin_is_GPL_compatible;
++
++static struct plugin_info rap_plugin_info = {
++ .version = "201604272100",
++ .help = "check=call\tenable the corresponding features\n"
++ "hash=abs,abs-finish,const,volatile\n"
++ "report=func,fptr,abs\n"
++};
++
++rap_hash_flags_t imprecise_rap_hash_flags = {
++ .qual_const = 1,
++ .qual_volatile = 1,
++};
++
++tree rap_hash_type_node;
++
++static bool report_func_hash, report_abs_hash;
++
++// create the equivalent of
++// asm volatile("" : : : "memory");
++// or
++// asm("" : "+rm"(var));
++// or
++// asm("" : : "rm"(var));
++gimple barrier(tree var, bool full)
++{
++ gimple stmt;
++ gasm *asm_stmt;
++#if BUILDING_GCC_VERSION <= 4007
++ VEC(tree, gc) *inputs = NULL;
++ VEC(tree, gc) *outputs = NULL;
++ VEC(tree, gc) *clobbers = NULL;
++#else
++ vec<tree, va_gc> *inputs = NULL;
++ vec<tree, va_gc> *outputs = NULL;
++ vec<tree, va_gc> *clobbers = NULL;
++#endif
++
++ if (!var && full) {
++ tree clobber;
++
++ clobber = build_tree_list(NULL_TREE, build_string(7, "memory"));
++#if BUILDING_GCC_VERSION <= 4007
++ VEC_safe_push(tree, gc, clobbers, clobber);
++#else
++ vec_safe_push(clobbers, clobber);
++#endif
++ } else if (full) {
++ tree input, output;
++
++ input = build_tree_list(NULL_TREE, build_string(2, "0"));
++ input = chainon(NULL_TREE, build_tree_list(input, var));
++#if BUILDING_GCC_VERSION <= 4007
++ VEC_safe_push(tree, gc, inputs, input);
++#else
++ vec_safe_push(inputs, input);
++#endif
++
++ output = build_tree_list(NULL_TREE, build_string(4, "=rm"));
++ gcc_assert(SSA_NAME_VAR(var));
++ var = make_ssa_name(SSA_NAME_VAR(var), NULL);
++ output = chainon(NULL_TREE, build_tree_list(output, var));
++#if BUILDING_GCC_VERSION <= 4007
++ VEC_safe_push(tree, gc, outputs, output);
++#else
++ vec_safe_push(outputs, output);
++#endif
++ } else {
++ tree input;
++
++ input = build_tree_list(NULL_TREE, build_string(3, "rm"));
++ input = chainon(NULL_TREE, build_tree_list(input, var));
++#if BUILDING_GCC_VERSION <= 4007
++ VEC_safe_push(tree, gc, inputs, input);
++#else
++ vec_safe_push(inputs, input);
++#endif
++ }
++
++ stmt = gimple_build_asm_vec("", inputs, outputs, clobbers, NULL);
++ asm_stmt = as_a_gasm(stmt);
++ if (!var && full)
++ gimple_asm_set_volatile(asm_stmt, true);
++ else if (full)
++ SSA_NAME_DEF_STMT(var) = stmt;
++ return stmt;
++}
++
++static const struct gcc_debug_hooks *old_debug_hooks;
++static struct gcc_debug_hooks rap_debug_hooks;
++
++static bool __rap_cgraph_indirectly_callable(cgraph_node_ptr node, void *data)
++{
++#if BUILDING_GCC_VERSION >= 4008
++ if (NODE_SYMBOL(node)->externally_visible)
++#else
++ if (node->local.externally_visible)
++#endif
++ return true;
++
++ if (NODE_SYMBOL(node)->address_taken)
++ return true;
++
++ return false;
++}
++
++static bool rap_cgraph_indirectly_callable(cgraph_node_ptr node)
++{
++ return cgraph_for_node_and_aliases(node, __rap_cgraph_indirectly_callable, NULL, true);
++}
++
++static void rap_begin_function(tree decl)
++{
++ cgraph_node_ptr node;
++ rap_hash_t imprecise_rap_hash;
++ unsigned HOST_WIDE_INT skip;
++
++ gcc_assert(debug_hooks == &rap_debug_hooks);
++
++ // chain to previous callback
++ if (old_debug_hooks && old_debug_hooks->begin_function)
++ old_debug_hooks->begin_function(decl);
++
++ // align the rap hash if necessary
++ skip = 1ULL << align_functions_log;
++ if (skip > 4 * sizeof(rap_hash_t))
++ ASM_OUTPUT_SKIP(asm_out_file, skip - 4 * sizeof(rap_hash_t));
++
++ // don't compute hash for functions called only directly
++ node = cgraph_get_node(decl);
++ gcc_assert(node);
++ if (!rap_cgraph_indirectly_callable(node)) {
++ imprecise_rap_hash.hash = 0;
++ } else {
++ imprecise_rap_hash = rap_hash_function_node_imprecise(node);
++ }
++
++ if (report_func_hash)
++ inform(DECL_SOURCE_LOCATION(decl), "func rap_hash: %x %s", imprecise_rap_hash.hash, IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(decl)));
++
++ 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)));
++}
++
++static void rap_start_unit_common(void *gcc_data __unused, void *user_data __unused)
++{
++ rap_hash_type_node = long_integer_type_node;
++
++ if (debug_hooks)
++ rap_debug_hooks = *debug_hooks;
++ rap_debug_hooks.begin_function = rap_begin_function;
++ old_debug_hooks = debug_hooks;
++ debug_hooks = &rap_debug_hooks;
++}
++
++/*
++ emit an absolute symbol for each function that may be referenced through the plt
++ - all externs
++ - non-static functions
++ - use visibility instead?
++
++ .globl __rap_hash_func
++ .offset 0xhash_for_func
++ .type __rap_hash_func, @object
++ __rap_hash_func:
++ .previous
++*/
++static void rap_finish_unit(void *gcc_data __unused, void *user_data __unused)
++{
++ cgraph_node_ptr node;
++ rap_hash_t hash;
++
++ gcc_assert(debug_hooks == &rap_debug_hooks);
++
++ hash.hash = 0;
++ FOR_EACH_FUNCTION(node) {
++ tree fndecl;
++ const char *asmname;
++ char *name = NULL;
++
++ if (cgraph_function_body_availability(node) >= AVAIL_INTERPOSABLE) {
++ if (node->thunk.thunk_p || node->alias)
++ continue;
++ if (!rap_cgraph_indirectly_callable(node))
++ continue;
++ }
++
++#if BUILDING_GCC_VERSION >= 4007
++ gcc_assert(cgraph_function_or_thunk_node(node, NULL) == node);
++#endif
++
++ fndecl = NODE_DECL(node);
++ gcc_assert(fndecl);
++ if (DECL_IS_BUILTIN(fndecl) && DECL_BUILT_IN_CLASS(fndecl) == BUILT_IN_NORMAL)
++ continue;
++
++ if (!TREE_PUBLIC(fndecl))
++ continue;
++
++ if (DECL_ARTIFICIAL(fndecl))
++ continue;
++
++ if (DECL_ABSTRACT_ORIGIN(fndecl) && DECL_ABSTRACT_ORIGIN(fndecl) != fndecl)
++ continue;
++
++ gcc_assert(DECL_ASSEMBLER_NAME(fndecl));
++ asmname = IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(fndecl));
++ if (strchr(asmname, '.'))
++ continue;
++
++ if (asmname[0] == '*')
++ asmname++;
++
++ gcc_assert(asmname[0]);
++ gcc_assert(asprintf(&name, "__rap_hash_%s", asmname) != -1);
++
++ hash = rap_hash_function_node_imprecise(node);
++ if (report_abs_hash)
++ inform(DECL_SOURCE_LOCATION(fndecl), "abs rap_hash: %x %s", hash.hash, IDENTIFIER_POINTER(DECL_ASSEMBLER_NAME(fndecl)));
++
++ fprintf(asm_out_file, GLOBAL_ASM_OP " %s\n", name);
++ fprintf(asm_out_file, "\t.offset %#lx\n", (long)hash.hash);
++ ASM_OUTPUT_TYPE_DIRECTIVE(asm_out_file, name, "object");
++ ASM_OUTPUT_LABEL(asm_out_file, name);
++ free(name);
++ }
++ if (hash.hash)
++ fprintf(asm_out_file, "\t.previous\n");
++}
++
++// emit the rap hash as an absolute symbol for all functions seen in the frontend
++// this is necessary as later unreferenced nodes will be removed yet we'd like to emit as many hashes as possible
++static void rap_finish_decl(void *event_data, void *data __unused)
++{
++ tree fndecl = (tree)event_data;
++ rap_hash_t hash;
++ const char *asmname;
++ char *name = NULL;
++
++ if (fndecl == error_mark_node)
++ return;
++
++ if (TREE_CODE(fndecl) != FUNCTION_DECL)
++ return;
++
++ if (!TREE_PUBLIC(fndecl))
++ return;
++
++ if (DECL_ARTIFICIAL(fndecl))
++ return;
++
++ if (DECL_ABSTRACT_ORIGIN(fndecl) && DECL_ABSTRACT_ORIGIN(fndecl) != fndecl)
++ return;
++
++ asmname = DECL_NAME_POINTER(fndecl);
++ gcc_assert(asmname[0]);
++
++ if (strchr(asmname, '.'))
++ return;
++
++ gcc_assert(asprintf(&name, "__rap_hash_%s", asmname) != -1);
++
++ hash = rap_hash_function_decl(fndecl, imprecise_rap_hash_flags);
++
++ if (report_abs_hash)
++ inform(DECL_SOURCE_LOCATION(fndecl), "abs rap_hash: %x %s", hash.hash, asmname);
++
++ fprintf(asm_out_file, GLOBAL_ASM_OP " %s\n", name);
++ fprintf(asm_out_file, "\t.offset %#lx\n", (long)hash.hash);
++ ASM_OUTPUT_TYPE_DIRECTIVE(asm_out_file, name, "object");
++ ASM_OUTPUT_LABEL(asm_out_file, name);
++ free(name);
++
++ fprintf(asm_out_file, "\t.previous\n");
++}
++
++static bool rap_unignore_gate(void)
++{
++ if (!DECL_IGNORED_P(current_function_decl))
++ return false;
++
++ inform(DECL_SOURCE_LOCATION(current_function_decl), "DECL_IGNORED fixed");
++
++ DECL_IGNORED_P(current_function_decl) = 0;
++ return false;
++}
++
++#define PASS_NAME rap_unignore
++#define NO_EXECUTE
++#define TODO_FLAGS_FINISH TODO_dump_func
++#include "gcc-generate-rtl-pass.h"
++
++static bool rap_version_check(struct plugin_gcc_version *gcc_version, struct plugin_gcc_version *plugin_version)
++{
++ if (!gcc_version || !plugin_version)
++ return false;
++
++#if BUILDING_GCC_VERSION >= 5000
++ if (strncmp(gcc_version->basever, plugin_version->basever, 4))
++#else
++ if (strcmp(gcc_version->basever, plugin_version->basever))
++#endif
++ return false;
++ if (strcmp(gcc_version->datestamp, plugin_version->datestamp))
++ return false;
++ if (strcmp(gcc_version->devphase, plugin_version->devphase))
++ return false;
++ if (strcmp(gcc_version->revision, plugin_version->revision))
++ return false;
++// if (strcmp(gcc_version->configuration_arguments, plugin_version->configuration_arguments))
++// return false;
++ return true;
++}
++
++EXPORTED_CONST struct ggc_root_tab gt_ggc_r_gt_rap[] = {
++ {
++ .base = &rap_hash_type_node,
++ .nelt = 1,
++ .stride = sizeof(rap_hash_type_node),
++ .cb = &gt_ggc_mx_tree_node,
++ .pchw = &gt_pch_nx_tree_node
++ },
++ LAST_GGC_ROOT_TAB
++};
++
++int plugin_init(struct plugin_name_args *plugin_info, struct plugin_gcc_version *version)
++{
++ int i;
++ const char * const plugin_name = plugin_info->base_name;
++ const int argc = plugin_info->argc;
++ const struct plugin_argument * const argv = plugin_info->argv;
++ bool enable_call = false;
++ bool enable_abs = false, enable_abs_finish = false;
++
++ struct register_pass_info rap_fptr_pass_info;
++ struct register_pass_info rap_unignore_pass_info;
++
++ rap_fptr_pass_info.pass = make_rap_fptr_pass();
++ rap_fptr_pass_info.reference_pass_name = "nrv";
++ rap_fptr_pass_info.ref_pass_instance_number = 1;
++ rap_fptr_pass_info.pos_op = PASS_POS_INSERT_AFTER;
++
++ rap_unignore_pass_info.pass = make_rap_unignore_pass();
++ rap_unignore_pass_info.reference_pass_name = "final";
++ rap_unignore_pass_info.ref_pass_instance_number = 1;
++ rap_unignore_pass_info.pos_op = PASS_POS_INSERT_BEFORE;
++
++ if (!rap_version_check(version, &gcc_version)) {
++ error(G_("incompatible gcc/plugin versions"));
++ return 1;
++ }
++
++#if BUILDING_GCC_VERSION >= 5000
++ if (flag_ipa_icf_functions) {
++// warning_at(UNKNOWN_LOCATION, 0, G_("-fipa-icf is incompatible with %s, disabling..."), plugin_name);
++// inform(UNKNOWN_LOCATION, G_("-fipa-icf is incompatible with %s, disabling..."), plugin_name);
++ flag_ipa_icf_functions = 0;
++ }
++#endif
++
++ for (i = 0; i < argc; ++i) {
++ if (!strcmp(argv[i].key, "disable"))
++ continue;
++
++ if (!strcmp(argv[i].key, "check")) {
++ char *values, *value, *saveptr;
++
++ if (!argv[i].value) {
++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
++ continue;
++ }
++
++ values = xstrdup(argv[i].value);
++ value = strtok_r(values, ",", &saveptr);
++ while (value) {
++ if (!strcmp(value, "call"))
++ enable_call = TARGET_64BIT;//true;
++ else
++ error(G_("unknown value supplied for option '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, value);
++ value = strtok_r(NULL, ",", &saveptr);
++ }
++ free(values);
++ continue;
++ }
++
++ if (!strcmp(argv[i].key, "hash")) {
++ char *values, *value, *saveptr;
++
++ if (!argv[i].value) {
++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
++ continue;
++ }
++
++ values = xstrdup(argv[i].value);
++ value = strtok_r(values, ",", &saveptr);
++ while (value) {
++ if (!strcmp(value, "abs"))
++ enable_abs = enable_abs_finish = true;
++ else if (!strcmp(value, "abs-finish"))
++ enable_abs_finish = true;
++// else if (!strcmp(value, "const"))
++// imprecise_rap_hash_flags.qual_const = 1;
++// else if (!strcmp(value, "volatile"))
++// imprecise_rap_hash_flags.qual_volatile = 1;
++ else
++ error(G_("unknown value supplied for option '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, value);
++ value = strtok_r(NULL, ",", &saveptr);
++ }
++ free(values);
++ continue;
++ }
++
++ if (!strcmp(argv[i].key, "report")) {
++ char *values, *value, *saveptr;
++
++ if (!argv[i].value) {
++ error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
++ continue;
++ }
++
++ values = xstrdup(argv[i].value);
++ value = strtok_r(values, ",", &saveptr);
++ while (value) {
++ if (!strcmp(value, "func"))
++ report_func_hash = true;
++ else if (!strcmp(value, "fptr"))
++ report_fptr_hash = true;
++ else if (!strcmp(value, "abs"))
++ report_abs_hash = true;
++ else
++ error(G_("unknown value supplied for option '-fplugin-arg-%s-%s=%s'"), plugin_name, argv[i].key, value);
++ value = strtok_r(NULL, ",", &saveptr);
++ }
++ free(values);
++ continue;
++ }
++
++ error(G_("unkown option '-fplugin-arg-%s-%s'"), plugin_name, argv[i].key);
++ }
++
++ register_callback(plugin_name, PLUGIN_INFO, NULL, &rap_plugin_info);
++
++ if (enable_call) {
++#if BUILDING_GCC_VERSION >= 4007
++ if (enable_abs)
++ register_callback(plugin_name, PLUGIN_FINISH_DECL, rap_finish_decl, NULL);
++#else
++#warning TODO
++#endif
++ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &rap_unignore_pass_info);
++ register_callback(plugin_name, PLUGIN_START_UNIT, rap_start_unit_common, NULL);
++ register_callback(plugin_name, PLUGIN_REGISTER_GGC_ROOTS, NULL, (void *)&gt_ggc_r_gt_rap);
++ if (enable_abs_finish)
++ register_callback(plugin_name, PLUGIN_FINISH_UNIT, rap_finish_unit, NULL);
++ }
++
++ if (enable_call)
++ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &rap_fptr_pass_info);
++
++ if (enable_call)
++ register_callback(plugin_name, PLUGIN_ALL_IPA_PASSES_START, rap_calculate_func_hashes, NULL);
++
++ return 0;
++}
+diff --git a/tools/gcc/rap_plugin/sip.c b/tools/gcc/rap_plugin/sip.c
+new file mode 100644
+index 0000000..65bc1cd
+--- /dev/null
++++ b/tools/gcc/rap_plugin/sip.c
+@@ -0,0 +1,96 @@
++// SipHash-2-4 adapted by the PaX Team from the public domain version written by
++// Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>
++// Daniel J. Bernstein <djb@cr.yp.to>
++
++#include <stdint.h>
++
++#define ROTL(x, b) (u64)(((x) << (b)) | ((x) >> (64 - (b))))
++
++#define U32TO8_LE(p, v) \
++ (p)[0] = (u8)((v) ); (p)[1] = (u8)((v) >> 8); \
++ (p)[2] = (u8)((v) >> 16); (p)[3] = (u8)((v) >> 24);
++
++#define U64TO8_LE(p, v) \
++ U32TO8_LE((p), (u32)((v) )); \
++ U32TO8_LE((p) + 4, (u32)((v) >> 32));
++
++#define U8TO64_LE(p) ( \
++ ((u64)((p)[0]) ) | \
++ ((u64)((p)[1]) << 8) | \
++ ((u64)((p)[2]) << 16) | \
++ ((u64)((p)[3]) << 24) | \
++ ((u64)((p)[4]) << 32) | \
++ ((u64)((p)[5]) << 40) | \
++ ((u64)((p)[6]) << 48) | \
++ ((u64)((p)[7]) << 56))
++
++#define SIPROUND \
++do { \
++ v0 += v1; v1 = ROTL(v1, 13); v1 ^= v0; v0 = ROTL(v0, 32); \
++ v2 += v3; v3 = ROTL(v3, 16); v3 ^= v2; \
++ v0 += v3; v3 = ROTL(v3, 21); v3 ^= v0; \
++ v2 += v1; v1 = ROTL(v1, 17); v1 ^= v2; v2 = ROTL(v2, 32); \
++} while(0)
++
++typedef uint64_t u64;
++typedef uint32_t u32;
++typedef uint8_t u8;
++
++/* SipHash-2-4 with previous output folding, a poor man's streaming interface */
++void siphash24fold(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k);
++
++void siphash24fold(unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k)
++{
++ u64 k0 = U8TO64_LE(k);
++ u64 k1 = U8TO64_LE(k + 8);
++ /* "somepseudorandomlygeneratedbytes" */
++ u64 v0 = 0x736f6d6570736575ULL ^ k0;
++ u64 v1 = 0x646f72616e646f6dULL ^ k1;
++ u64 v2 = 0x6c7967656e657261ULL ^ k0;
++ u64 v3 = 0x7465646279746573ULL ^ k1;
++ u64 b, m;
++ const u8 * const end = in + inlen - (inlen % sizeof(u64));
++ const int left = inlen & 7;
++ b = ((u64)inlen) << 56;
++
++ // fold in the previous output
++ m = U8TO64_LE(out);
++ v3 ^= m;
++ SIPROUND;
++ SIPROUND;
++ v0 ^= m;
++
++ // consume full input blocks
++ for (; in != end; in += 8) {
++ m = U8TO64_LE(in);
++ v3 ^= m;
++ SIPROUND;
++ SIPROUND;
++ v0 ^= m;
++ }
++
++ // consume the last potentially partial block
++ switch (left) {
++ case 7: b |= ((u64)in[6]) << 48;
++ case 6: b |= ((u64)in[5]) << 40;
++ case 5: b |= ((u64)in[4]) << 32;
++ case 4: b |= ((u64)in[3]) << 24;
++ case 3: b |= ((u64)in[2]) << 16;
++ case 2: b |= ((u64)in[1]) << 8;
++ case 1: b |= ((u64)in[0]); break;
++ case 0: break;
++ }
++
++ // finalize
++ v3 ^= b;
++ SIPROUND;
++ SIPROUND;
++ v0 ^= b;
++ v2 ^= 0xff;
++ SIPROUND;
++ SIPROUND;
++ SIPROUND;
++ SIPROUND;
++ b = v0 ^ v1 ^ v2 ^ v3;
++ U64TO8_LE(out, b);
++}
diff --git a/tools/gcc/size_overflow_plugin/.gitignore b/tools/gcc/size_overflow_plugin/.gitignore
new file mode 100644
index 0000000..c4b24b9
@@ -155985,10 +184142,10 @@ index 0000000..fc58e16
+}
diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
new file mode 100644
-index 0000000..951b3be
+index 0000000..837e6d0
--- /dev/null
+++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
-@@ -0,0 +1,21510 @@
+@@ -0,0 +1,21648 @@
+enable_so_recv_ctrl_pipe_us_data_0 recv_ctrl_pipe us_data 0 0 NULL
+enable_so___earlyonly_bootmem_alloc_fndecl_3 __earlyonly_bootmem_alloc fndecl 2-3-4 3 NULL
+enable_so_v9fs_xattr_get_acl_fndecl_4 v9fs_xattr_get_acl fndecl 5 4 NULL
@@ -156010,6 +184167,7 @@ index 0000000..951b3be
+enable_so_ath10k_core_create_fndecl_34 ath10k_core_create fndecl 1 34 &enable_so_ocfs2_xattr_get_clusters_fndecl_34
+enable_so_total_drm_buf_35 total drm_buf 0 35 NULL
+enable_so_sis5595_device_add_fndecl_39 sis5595_device_add fndecl 1 39 NULL
++enable_so_nr_rings_blkfront_info_42 nr_rings blkfront_info 0 42 NULL
+enable_so_mc_vram_size_amdgpu_mc_45 mc_vram_size amdgpu_mc 0 45 NULL
+enable_so_pattern_len_tcf_em_text_57 pattern_len tcf_em_text 0 57 NULL nohasharray
+enable_so_p54_init_common_fndecl_57 p54_init_common fndecl 1 57 &enable_so_pattern_len_tcf_em_text_57
@@ -156063,6 +184221,7 @@ index 0000000..951b3be
+enable_so_bn_shadow_fndecl_211 bn_shadow fndecl 2 211 &enable_so_xfs_zero_file_space_fndecl_211
+enable_so_cxgb_alloc_mem_fndecl_212 cxgb_alloc_mem fndecl 1 212 NULL
+enable_so_copies_r10conf_216 copies r10conf 0 216 NULL
++enable_so_drm_universal_plane_init_fndecl_219 drm_universal_plane_init fndecl 6 219 NULL
+enable_so_optrom_size_qla_hw_data_230 optrom_size qla_hw_data 0 230 NULL
+enable_so_pvid_ocrdma_dev_231 pvid ocrdma_dev 0 231 NULL nohasharray
+enable_so_afs_cell_alloc_fndecl_231 afs_cell_alloc fndecl 2 231 &enable_so_pvid_ocrdma_dev_231
@@ -156097,6 +184256,7 @@ index 0000000..951b3be
+enable_so_MaxBufferSize_negotiate_rsp_314 MaxBufferSize negotiate_rsp 0 314 NULL nohasharray
+enable_so_ip_num_acl_subject_label_314 ip_num acl_subject_label 0 314 &enable_so_MaxBufferSize_negotiate_rsp_314
+enable_so_name_len_jffs2_raw_xattr_318 name_len jffs2_raw_xattr 0 318 NULL
++enable_so_bo_handle_count_drm_vc4_submit_cl_326 bo_handle_count drm_vc4_submit_cl 0 326 NULL
+enable_so_num_alt_usb_usbvision_328 num_alt usb_usbvision 0 328 NULL
+enable_so_start_fb_cmap_user_333 start fb_cmap_user 0 333 NULL
+enable_so_block_size_se_dev_attrib_334 block_size se_dev_attrib 0 334 NULL
@@ -156268,6 +184428,7 @@ index 0000000..951b3be
+enable_so_qi_dqperchunk_xfs_quotainfo_863 qi_dqperchunk xfs_quotainfo 0 863 NULL
+enable_so_adu_read_fndecl_866 adu_read fndecl 3 866 NULL
+enable_so_safe_prepare_write_buffer_fndecl_872 safe_prepare_write_buffer fndecl 3 872 NULL
++enable_so_dvb_register_media_device_fndecl_878 dvb_register_media_device fndecl 4 878 NULL
+enable_so_field_count_audit_rule_data_886 field_count audit_rule_data 0 886 NULL
+enable_so_octeon_read_device_mem64_fndecl_892 octeon_read_device_mem64 fndecl 0 892 NULL
+enable_so_orinoco_change_mtu_fndecl_895 orinoco_change_mtu fndecl 2 895 NULL nohasharray
@@ -156817,7 +184978,8 @@ index 0000000..951b3be
+enable_so_off_fuse_dirent_2561 off fuse_dirent 0 2561 NULL
+enable_so_active_duplex_niu_link_config_2566 active_duplex niu_link_config 0 2566 NULL
+enable_so_hdsp_external_sample_rate_fndecl_2568 hdsp_external_sample_rate fndecl 0 2568 NULL
-+enable_so_extend_brk_fndecl_2574 extend_brk fndecl 2-1 2574 NULL
++enable_so_extend_brk_fndecl_2574 extend_brk fndecl 2-1 2574 NULL nohasharray
++enable_so_sec_size_nvm_dev_2574 sec_size nvm_dev 0 2574 &enable_so_extend_brk_fndecl_2574
+enable_so___tun_chr_ioctl_fndecl_2575 __tun_chr_ioctl fndecl 4 2575 NULL
+enable_so_aio_offset_iocb_2576 aio_offset iocb 0 2576 NULL nohasharray
+enable_so_skb_checksum_trimmed_fndecl_2576 skb_checksum_trimmed fndecl 2 2576 &enable_so_aio_offset_iocb_2576
@@ -157031,6 +185193,7 @@ index 0000000..951b3be
+enable_so_lbs_rdbbp_write_fndecl_3237 lbs_rdbbp_write fndecl 3 3237 NULL
+enable_so_inlen_ib_udata_3242 inlen ib_udata 0 3242 NULL nohasharray
+enable_so_expect_class_max_nf_conntrack_helper_3242 expect_class_max nf_conntrack_helper 0 3242 &enable_so_inlen_ib_udata_3242
++enable_so_uniforms_size_drm_vc4_submit_cl_3245 uniforms_size drm_vc4_submit_cl 0 3245 NULL
+enable_so_max_wqe_ocrdma_dev_attr_3246 max_wqe ocrdma_dev_attr 0 3246 NULL
+enable_so_of_property_match_string_fndecl_3250 of_property_match_string fndecl 0 3250 NULL
+enable_so_shmem_kernel_file_setup_fndecl_3251 shmem_kernel_file_setup fndecl 2 3251 NULL
@@ -157165,6 +185328,7 @@ index 0000000..951b3be
+enable_so_sl_ib_ah_attr_3633 sl ib_ah_attr 0 3633 NULL
+enable_so_vmci_transport_queue_pair_alloc_fndecl_3639 vmci_transport_queue_pair_alloc fndecl 4-3 3639 NULL nohasharray
+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
++enable_so_count_phm_clock_voltage_dependency_table_3642 count phm_clock_voltage_dependency_table 0 3642 NULL
+enable_so_t_blocknr_high_journal_block_tag_s_3648 t_blocknr_high journal_block_tag_s 0 3648 NULL
+enable_so_s_desc_size_ext4_sb_info_3652 s_desc_size ext4_sb_info 0 3652 NULL
+enable_so_pci_id_imc_uncore_pci_dev_3656 pci_id imc_uncore_pci_dev 0 3656 NULL
@@ -157189,6 +185353,7 @@ index 0000000..951b3be
+enable_so_ip_getsockopt_fndecl_3711 ip_getsockopt fndecl 0 3711 NULL
+enable_so_len_sctp_auth_bytes_3715 len sctp_auth_bytes 0 3715 NULL
+enable_so_byte_len_ib_wc_3716 byte_len ib_wc 0 3716 NULL
++enable_so_dvb_create_media_entity_fndecl_3720 dvb_create_media_entity fndecl 3 3720 NULL
+enable_so_len_amp_assoc_3724 len amp_assoc 0 3724 NULL
+enable_so___v4l2_ctrl_modify_range_fndecl_3726 __v4l2_ctrl_modify_range fndecl 3-2-5 3726 NULL
+enable_so_SYSC_rt_sigpending_fndecl_3728 SYSC_rt_sigpending fndecl 2 3728 NULL
@@ -157386,7 +185551,8 @@ index 0000000..951b3be
+enable_so_h_next_leaf_blk_ocfs2_extent_block_4292 h_next_leaf_blk ocfs2_extent_block 0 4292 NULL
+enable_so___add_section_fndecl_4296 __add_section fndecl 3 4296 NULL
+enable_so_cgroup_task_count_fndecl_4297 cgroup_task_count fndecl 0 4297 NULL
-+enable_so_maxpacket_musb_qh_4303 maxpacket musb_qh 0 4303 NULL
++enable_so_maxpacket_musb_qh_4303 maxpacket musb_qh 0 4303 NULL nohasharray
++enable_so_key_size_pkcs1pad_ctx_4303 key_size pkcs1pad_ctx 0 4303 &enable_so_maxpacket_musb_qh_4303
+enable_so_rx_frm_len_mask_macb_4310 rx_frm_len_mask macb 0 4310 NULL
+enable_so_raid56_alloc_missing_rbio_fndecl_4316 raid56_alloc_missing_rbio fndecl 4 4316 NULL
+enable_so_ps_upsd_max_apturn_read_fndecl_4317 ps_upsd_max_apturn_read fndecl 3 4317 NULL
@@ -157463,6 +185629,7 @@ index 0000000..951b3be
+enable_so_LoadBitmap_fndecl_4569 LoadBitmap fndecl 2 4569 NULL
+enable_so_far_copies_geom_4570 far_copies geom 0 4570 NULL
+enable_so_dlen_nft_set_4577 dlen nft_set 0 4577 NULL
++enable_so_wilc_spi_tx_fndecl_4583 wilc_spi_tx fndecl 3 4583 NULL
+enable_so_rx_buf_sz_gem_4593 rx_buf_sz gem 0 4593 NULL nohasharray
+enable_so_cxd2841er_read_regs_fndecl_4593 cxd2841er_read_regs fndecl 5 4593 &enable_so_rx_buf_sz_gem_4593
+enable_so_fdt_nop_node_fndecl_4595 fdt_nop_node fndecl 2 4595 NULL
@@ -157648,7 +185815,8 @@ index 0000000..951b3be
+enable_so_rlen_si2157_cmd_5138 rlen si2157_cmd 0 5138 NULL nohasharray
+enable_so_channel_count_il_priv_5138 channel_count il_priv 0 5138 &enable_so_rlen_si2157_cmd_5138
+enable_so_fnic_stats_debugfs_read_fndecl_5139 fnic_stats_debugfs_read fndecl 3 5139 NULL
-+enable_so_echo_client_prep_commit_fndecl_5142 echo_client_prep_commit fndecl 8 5142 NULL
++enable_so_echo_client_prep_commit_fndecl_5142 echo_client_prep_commit fndecl 8 5142 NULL nohasharray
++enable_so___nvme_submit_user_cmd_fndecl_5142 __nvme_submit_user_cmd fndecl 6 5142 &enable_so_echo_client_prep_commit_fndecl_5142
+enable_so_csio_scsi_eqsize_vardecl_5146 csio_scsi_eqsize vardecl 0 5146 NULL
+enable_so_ocfs2_iget_fndecl_5154 ocfs2_iget fndecl 2 5154 NULL
+enable_so_total_in_z_stream_s_5155 total_in z_stream_s 0 5155 NULL
@@ -157679,6 +185847,7 @@ index 0000000..951b3be
+enable_so_sq905_read_data_fndecl_5229 sq905_read_data fndecl 0 5229 NULL
+enable_so_madvise_hwpoison_fndecl_5231 madvise_hwpoison fndecl 2 5231 NULL
+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
++enable_so_cnt_nfp_net_tx_ring_5239 cnt nfp_net_tx_ring 0 5239 NULL
+enable_so_nr_extents__ntfs_inode_5242 nr_extents _ntfs_inode 0 5242 NULL
+enable_so_nf_reject_iphdr_put_fndecl_5243 nf_reject_iphdr_put fndecl 3 5243 NULL nohasharray
+enable_so___scif_pin_pages_fndecl_5243 __scif_pin_pages fndecl 2 5243 &enable_so_nf_reject_iphdr_put_fndecl_5243
@@ -157733,6 +185902,7 @@ index 0000000..951b3be
+enable_so_len_iw_mgmt_info_element_5411 len iw_mgmt_info_element 0 5411 NULL
+enable_so_udpv6_setsockopt_fndecl_5412 udpv6_setsockopt fndecl 5 5412 NULL
+enable_so_session_key_encryption_key_bytes_ecryptfs_password_5413 session_key_encryption_key_bytes ecryptfs_password 0 5413 NULL
++enable_so_ies_len_user_conn_req_5414 ies_len user_conn_req 0 5414 NULL
+enable_so_value_xen_pci_op_5416 value xen_pci_op 0 5416 NULL
+enable_so_allocmin_nilfs_sufile_info_5418 allocmin nilfs_sufile_info 0 5418 NULL
+enable_so_nilfs_sufile_truncate_range_fndecl_5423 nilfs_sufile_truncate_range fndecl 3-2 5423 NULL nohasharray
@@ -157740,6 +185910,7 @@ index 0000000..951b3be
+enable_so_reg_size_intel_iommu_5423 reg_size intel_iommu 0 5423 &enable_so_ino_ncp_entry_info_5423
+enable_so_port_mad_size_fndecl_5434 port_mad_size fndecl 0 5434 NULL
+enable_so_sigmadsp_read_i2c_fndecl_5435 sigmadsp_read_i2c fndecl 4 5435 NULL
++enable_so_wilc_add_wep_key_bss_sta_fndecl_5436 wilc_add_wep_key_bss_sta fndecl 3 5436 NULL
+enable_so_size_drm_radeon_gem_create_5440 size drm_radeon_gem_create 0 5440 NULL
+enable_so_vlen_nfsd_writeargs_5461 vlen nfsd_writeargs 0 5461 NULL
+enable_so_btrfs_fiemap_fndecl_5462 btrfs_fiemap fndecl 4-3 5462 NULL
@@ -157873,11 +186044,13 @@ index 0000000..951b3be
+enable_so_read_len_t3_swsq_5880 read_len t3_swsq 0 5880 NULL
+enable_so_xfs_qm_vop_dqalloc_fndecl_5887 xfs_qm_vop_dqalloc fndecl 2-3-4 5887 NULL nohasharray
+enable_so_cydata_ofsh_cyttsp4_sysinfo_data_5887 cydata_ofsh cyttsp4_sysinfo_data 0 5887 &enable_so_xfs_qm_vop_dqalloc_fndecl_5887
-+enable_so_max_sg_count_hpt_iop_request_get_config_5890 max_sg_count hpt_iop_request_get_config 0 5890 NULL
++enable_so_max_sg_count_hpt_iop_request_get_config_5890 max_sg_count hpt_iop_request_get_config 0 5890 NULL nohasharray
++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
+enable_so_force_max_req_size_vardecl_vub300_c_5891 force_max_req_size vardecl_vub300.c 0 5891 NULL
+enable_so_dma_common_pages_remap_fndecl_5893 dma_common_pages_remap fndecl 2 5893 NULL
+enable_so_size_squashfs_dir_entry_5896 size squashfs_dir_entry 0 5896 NULL
+enable_so___nla_reserve_fndecl_5901 __nla_reserve fndecl 3 5901 NULL
++enable_so_iproc_asiu_setup_fndecl_5902 iproc_asiu_setup fndecl 4 5902 NULL
+enable_so_alloc_rx_slot_fndecl_5908 alloc_rx_slot fndecl 0 5908 NULL
+enable_so_sctp_tsnmap_num_gabs_fndecl_5915 sctp_tsnmap_num_gabs fndecl 0 5915 NULL
+enable_so_grec_nsrcs_igmpv3_grec_5916 grec_nsrcs igmpv3_grec 0 5916 NULL
@@ -157920,6 +186093,7 @@ index 0000000..951b3be
+enable_so_icv_trunc_len_ah_data_6025 icv_trunc_len ah_data 0 6025 NULL nohasharray
+enable_so_flags_rtl8180_rx_desc_6025 flags rtl8180_rx_desc 0 6025 &enable_so_icv_trunc_len_ah_data_6025
+enable_so_xlog_bwrite_fndecl_6028 xlog_bwrite fndecl 2 6028 NULL
++enable_so_size_drm_vc4_create_shader_bo_6033 size drm_vc4_create_shader_bo 0 6033 NULL
+enable_so_msix_map_region_fndecl_6035 msix_map_region fndecl 2 6035 NULL
+enable_so_ceph_create_snap_context_fndecl_6041 ceph_create_snap_context fndecl 1 6041 NULL
+enable_so_cmipci_sb_reg_decode_fndecl_6048 cmipci_sb_reg_decode fndecl 2 6048 NULL
@@ -158061,6 +186235,7 @@ index 0000000..951b3be
+enable_so_skd_end_request_fndecl_6438 skd_end_request fndecl 3 6438 NULL
+enable_so_parse_dcb20_entry_fndecl_6440 parse_dcb20_entry fndecl 3 6440 NULL
+enable_so_user_base_qib_mregion_6443 user_base qib_mregion 0 6443 NULL
++enable_so_nvme_iod_alloc_size_fndecl_6444 nvme_iod_alloc_size fndecl 2-3-0 6444 NULL
+enable_so_max_packet_sz_tx_musb_hw_ep_6448 max_packet_sz_tx musb_hw_ep 0 6448 NULL
+enable_so_snd_hammerfall_get_buffer_fndecl_6450 snd_hammerfall_get_buffer fndecl 3 6450 NULL
+enable_so_qib_init_pportdata_fndecl_6452 qib_init_pportdata fndecl 4 6452 NULL
@@ -158274,7 +186449,8 @@ index 0000000..951b3be
+enable_so_srq_entry_sz_mlx4_dev_cap_7052 srq_entry_sz mlx4_dev_cap 0 7052 NULL
+enable_so_SYSC_pselect6_fndecl_7055 SYSC_pselect6 fndecl 1 7055 NULL
+enable_so_packet_size_usbatm_channel_7056 packet_size usbatm_channel 0 7056 NULL
-+enable_so___btrfs_drop_extents_fndecl_7058 __btrfs_drop_extents fndecl 6-5 7058 NULL
++enable_so___btrfs_drop_extents_fndecl_7058 __btrfs_drop_extents fndecl 6-5 7058 NULL nohasharray
++enable_so_txd_cnt_nfp_net_7058 txd_cnt nfp_net 0 7058 &enable_so___btrfs_drop_extents_fndecl_7058
+enable_so_cryptd_alloc_instance_fndecl_7059 cryptd_alloc_instance fndecl 3-2 7059 NULL
+enable_so_dccph_doff_dccp_hdr_7060 dccph_doff dccp_hdr 0 7060 NULL nohasharray
+enable_so_ddebug_proc_write_fndecl_7060 ddebug_proc_write fndecl 3 7060 &enable_so_dccph_doff_dccp_hdr_7060
@@ -158453,7 +186629,8 @@ index 0000000..951b3be
+enable_so_count_ivtvfb_dma_frame_7586 count ivtvfb_dma_frame 0 7586 NULL
+enable_so_length_sctp_chunkhdr_7587 length sctp_chunkhdr 0 7587 NULL
+enable_so_ftdi_elan_edset_input_fndecl_7588 ftdi_elan_edset_input fndecl 0 7588 NULL
-+enable_so_scan_index_iio_chan_spec_7597 scan_index iio_chan_spec 0 7597 NULL
++enable_so_scan_index_iio_chan_spec_7597 scan_index iio_chan_spec 0 7597 NULL nohasharray
++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
+enable_so_q_blkno_xfs_dquot_7601 q_blkno xfs_dquot 0 7601 NULL
+enable_so_pathmtu_sctp_transport_7603 pathmtu sctp_transport 0 7603 NULL
+enable_so_fuse_listxattr_fndecl_7605 fuse_listxattr fndecl 3 7605 NULL
@@ -158521,6 +186698,7 @@ index 0000000..951b3be
+enable_so_alloc_ep_fndecl_7782 alloc_ep fndecl 1 7782 NULL
+enable_so_mmu_private_affs_inode_info_7785 mmu_private affs_inode_info 0 7785 NULL nohasharray
+enable_so_pkt_len_rx_desc_7785 pkt_len rx_desc 0 7785 &enable_so_mmu_private_affs_inode_info_7785
++enable_so_read_index_wm_adsp_compr_buf_7788 read_index wm_adsp_compr_buf 0 7788 NULL
+enable_so_st_do_scsi_fndecl_7789 st_do_scsi fndecl 4 7789 NULL
+enable_so_qxl_framebuffer_surface_dirty_fndecl_7791 qxl_framebuffer_surface_dirty fndecl 6 7791 NULL nohasharray
+enable_so_pg_read_fndecl_7791 pg_read fndecl 3 7791 &enable_so_qxl_framebuffer_surface_dirty_fndecl_7791
@@ -158664,6 +186842,7 @@ index 0000000..951b3be
+enable_so_num_alloc_vsi_i40e_pf_8259 num_alloc_vsi i40e_pf 0 8259 NULL
+enable_so_datablkcnt_capi_register_params_8263 datablkcnt capi_register_params 0 8263 NULL
+enable_so_cow_file_range_inline_fndecl_8264 cow_file_range_inline fndecl 4-3 8264 NULL
++enable_so_num_u3_ports_xhci_hcd_mtk_8272 num_u3_ports xhci_hcd_mtk 0 8272 NULL
+enable_so_datablklen_capi_register_params_8275 datablklen capi_register_params 0 8275 NULL nohasharray
+enable_so_proc_scsi_devinfo_write_fndecl_8275 proc_scsi_devinfo_write fndecl 3 8275 &enable_so_datablklen_capi_register_params_8275
+enable_so_cdc_ncm_check_tx_max_fndecl_8278 cdc_ncm_check_tx_max fndecl 0-2 8278 NULL
@@ -158820,6 +186999,7 @@ index 0000000..951b3be
+enable_so_read_hdlc_status_fritz_adapter_8730 read_hdlc_status fritz_adapter 0 8730 NULL nohasharray
+enable_so_disconnect_fndecl_8730 disconnect fndecl 4 8730 &enable_so_read_hdlc_status_fritz_adapter_8730 nohasharray
+enable_so_ip_set_elem_len_fndecl_8730 ip_set_elem_len fndecl 0-4-3 8730 &enable_so_disconnect_fndecl_8730
++enable_so_alloc_state_change_fndecl_8735 alloc_state_change fndecl 1-2 8735 NULL
+enable_so_ext_param_page_length_nand_onfi_params_8736 ext_param_page_length nand_onfi_params 0 8736 NULL
+enable_so___blockdev_direct_IO_fndecl_8738 __blockdev_direct_IO fndecl 5-0 8738 NULL nohasharray
+enable_so_ipgre_header_fndecl_8738 ipgre_header fndecl 3 8738 &enable_so___blockdev_direct_IO_fndecl_8738
@@ -158856,6 +187036,7 @@ index 0000000..951b3be
+enable_so_dma_buf_mmap_fndecl_8825 dma_buf_mmap fndecl 3 8825 NULL
+enable_so_buflow_ring_desc_ex_8829 buflow ring_desc_ex 0 8829 NULL
+enable_so_vsync_len_videomode_8830 vsync_len videomode 0 8830 NULL
++enable_so_response_length_mlx5_ib_alloc_ucontext_resp_8839 response_length mlx5_ib_alloc_ucontext_resp 0 8839 NULL
+enable_so_wm5110_set_fll_fndecl_8841 wm5110_set_fll fndecl 5 8841 NULL
+enable_so_iscsi_tcp_segment_recv_fndecl_8845 iscsi_tcp_segment_recv fndecl 4-0 8845 NULL
+enable_so_max_packet_size_ftdi_private_8847 max_packet_size ftdi_private 0 8847 NULL
@@ -159029,7 +187210,8 @@ index 0000000..951b3be
+enable_so_htree_dirblock_to_tree_fndecl_9339 htree_dirblock_to_tree fndecl 3 9339 NULL
+enable_so_di_size_xfs_icdinode_9350 di_size xfs_icdinode 0 9350 NULL
+enable_so_tse_init_rx_buffer_fndecl_9354 tse_init_rx_buffer fndecl 3 9354 NULL
-+enable_so_offset_ore_io_state_9357 offset ore_io_state 0 9357 NULL
++enable_so_offset_ore_io_state_9357 offset ore_io_state 0 9357 NULL nohasharray
++enable_so_length_property_entry_9357 length property_entry 0 9357 &enable_so_offset_ore_io_state_9357
+enable_so_stv6110x_write_regs_fndecl_9359 stv6110x_write_regs fndecl 4 9359 NULL
+enable_so_qib_qp_rcv_fndecl_9365 qib_qp_rcv fndecl 5 9365 NULL
+enable_so_compat_sys_get_mempolicy_fndecl_9366 compat_sys_get_mempolicy fndecl 4-3 9366 NULL
@@ -159319,6 +187501,7 @@ index 0000000..951b3be
+enable_so_ext4_xattr_set_handle_fndecl_10221 ext4_xattr_set_handle fndecl 6 10221 NULL
+enable_so_alg_setkey_fndecl_10222 alg_setkey fndecl 3 10222 NULL
+enable_so_next_id_hfs_sb_info_10229 next_id hfs_sb_info 0 10229 NULL
++enable_so_storage_size_phm_runtime_table_header_10230 storage_size phm_runtime_table_header 0 10230 NULL
+enable_so_qlcnic_set_sds_ring_count_fndecl_10232 qlcnic_set_sds_ring_count fndecl 2 10232 NULL
+enable_so_input_get_new_minor_fndecl_10235 input_get_new_minor fndecl 0 10235 NULL
+enable_so_iio_devt_vardecl_industrialio_core_c_10237 iio_devt vardecl_industrialio-core.c 0 10237 NULL nohasharray
@@ -159647,6 +187830,7 @@ index 0000000..951b3be
+enable_so_o2nm_this_node_fndecl_11157 o2nm_this_node fndecl 0 11157 NULL
+enable_so_resource_from_user_fndecl_11158 resource_from_user fndecl 3 11158 NULL
+enable_so_batadv_bla_add_claim_fndecl_11159 batadv_bla_add_claim fndecl 3 11159 NULL
++enable_so_nvme_fill_device_id_eui64_fndecl_11160 nvme_fill_device_id_eui64 fndecl 4 11160 NULL
+enable_so_tclass_mlx5_av_11167 tclass mlx5_av 0 11167 NULL
+enable_so_rmtvaluelen2_xfs_da_args_11168 rmtvaluelen2 xfs_da_args 0 11168 NULL
+enable_so_FlNum_hfs_cat_file_11169 FlNum hfs_cat_file 0 11169 NULL nohasharray
@@ -159794,6 +187978,7 @@ index 0000000..951b3be
+enable_so_ceph_sync_direct_write_fndecl_11641 ceph_sync_direct_write fndecl 0-3 11641 NULL
+enable_so_vmw_execbuf_process_fndecl_11642 vmw_execbuf_process fndecl 5 11642 NULL
+enable_so_ath6kl_get_num_reg_fndecl_11647 ath6kl_get_num_reg fndecl 0 11647 NULL
++enable_so_device_property_read_u32_array_fndecl_11662 device_property_read_u32_array fndecl 0 11662 NULL
+enable_so_bulk_size_cam_11663 bulk_size cam 0 11663 NULL
+enable_so___setup_root_fndecl_11664 __setup_root fndecl 2-1 11664 NULL nohasharray
+enable_so_num_snd_ratnum_11664 num snd_ratnum 0 11664 &enable_so___setup_root_fndecl_11664 nohasharray
@@ -160094,6 +188279,7 @@ index 0000000..951b3be
+enable_so_m25p80_read_reg_fndecl_12535 m25p80_read_reg fndecl 4 12535 NULL
+enable_so_learn_buffer_user_len_vardecl_gracl_learn_c_12538 learn_buffer_user_len vardecl_gracl_learn.c 0 12538 NULL
+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
++enable_so_rxd_cnt_nfp_net_12541 rxd_cnt nfp_net 0 12541 NULL
+enable_so_sd_tuning_rx_cmd_fndecl_12543 sd_tuning_rx_cmd fndecl 2 12543 NULL
+enable_so_cdrom_read_cdda_old_fndecl_12547 cdrom_read_cdda_old fndecl 4 12547 NULL
+enable_so_qword_get_fndecl_12549 qword_get fndecl 0 12549 NULL
@@ -160288,6 +188474,7 @@ index 0000000..951b3be
+enable_so_num_pg_nvm_id_group_13160 num_pg nvm_id_group 0 13160 NULL
+enable_so_inline_xattr_size_fndecl_13166 inline_xattr_size fndecl 0 13166 NULL
+enable_so_hpfs_add_to_dnode_fndecl_13167 hpfs_add_to_dnode fndecl 4-2 13167 NULL
++enable_so_iproc_pll_clk_setup_fndecl_13179 iproc_pll_clk_setup fndecl 6 13179 NULL
+enable_so_len_rsv_13186 len rsv 0 13186 NULL nohasharray
+enable_so_nouveau_compat_ioctl_fndecl_13186 nouveau_compat_ioctl fndecl 2 13186 &enable_so_len_rsv_13186
+enable_so_blocksize_f2fs_sb_info_13191 blocksize f2fs_sb_info 0 13191 NULL
@@ -160417,6 +188604,7 @@ index 0000000..951b3be
+enable_so_find_rsb_nodir_fndecl_13537 find_rsb_nodir fndecl 3 13537 NULL
+enable_so_hfi1_snoop_write_fndecl_13544 hfi1_snoop_write fndecl 3 13544 NULL
+enable_so_p_filesz_elf64_phdr_13545 p_filesz elf64_phdr 0 13545 NULL
++enable_so_pset_prop_count_elems_of_size_fndecl_13547 pset_prop_count_elems_of_size fndecl 3-0 13547 NULL
+enable_so_len_prism2_download_data_area_13551 len prism2_download_data_area 0 13551 NULL
+enable_so_nes_reg_user_mr_fndecl_13553 nes_reg_user_mr fndecl 2-3 13553 NULL nohasharray
+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
@@ -160474,7 +188662,8 @@ index 0000000..951b3be
+enable_so_fixup_pmc551_fndecl_13679 fixup_pmc551 fndecl 0 13679 NULL
+enable_so_nfc_hci_send_cmd_async_fndecl_13680 nfc_hci_send_cmd_async fndecl 5 13680 NULL
+enable_so_receive_big_fndecl_13686 receive_big fndecl 5 13686 NULL
-+enable_so_writing_osst_buffer_13689 writing osst_buffer 0 13689 NULL
++enable_so_writing_osst_buffer_13689 writing osst_buffer 0 13689 NULL nohasharray
++enable_so___fwnode_property_read_string_array_fndecl_13689 __fwnode_property_read_string_array fndecl 0 13689 &enable_so_writing_osst_buffer_13689
+enable_so_w_align_bdisp_fmt_13694 w_align bdisp_fmt 0 13694 NULL
+enable_so_hpfs_free_sectors_fndecl_13696 hpfs_free_sectors fndecl 3 13696 NULL
+enable_so_skb_size_qlcnic_host_rds_ring_13698 skb_size qlcnic_host_rds_ring 0 13698 NULL
@@ -160577,7 +188766,8 @@ index 0000000..951b3be
+enable_so_rd_size_uhid_device_13986 rd_size uhid_device 0 13986 NULL
+enable_so_libipw_alloc_txb_fndecl_13992 libipw_alloc_txb fndecl 3-2-1 13992 NULL
+enable_so_size_urb_list_13995 size urb_list 0 13995 NULL
-+enable_so_i2400mu_notification_grok_fndecl_13997 i2400mu_notification_grok fndecl 3 13997 NULL
++enable_so_i2400mu_notification_grok_fndecl_13997 i2400mu_notification_grok fndecl 3 13997 NULL nohasharray
++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
+enable_so_pnp_add_io_resource_fndecl_14000 pnp_add_io_resource fndecl 3-2 14000 NULL
+enable_so_n_grants_vscsibk_pend_14001 n_grants vscsibk_pend 0 14001 NULL
+enable_so_blkno_xfs_da_state_blk_14003 blkno xfs_da_state_blk 0 14003 NULL nohasharray
@@ -160814,6 +189004,7 @@ index 0000000..951b3be
+enable_so_ep_usbip_header_basic_14659 ep usbip_header_basic 0 14659 NULL
+enable_so_interval_solo_enc_dev_14661 interval solo_enc_dev 0 14661 NULL
+enable_so___btrfs_qgroup_release_data_fndecl_14664 __btrfs_qgroup_release_data fndecl 2-3 14664 NULL
++enable_so_tty_copy_to_user_fndecl_14668 tty_copy_to_user fndecl 3-4 14668 NULL
+enable_so_ext2_try_to_allocate_fndecl_14672 ext2_try_to_allocate fndecl 0-4 14672 NULL
+enable_so_sg_tablesize_usb_bus_14673 sg_tablesize usb_bus 0 14673 NULL
+enable_so_di_anextents_xfs_dinode_14674 di_anextents xfs_dinode 0 14674 NULL
@@ -160857,6 +189048,7 @@ index 0000000..951b3be
+enable_so_brcmf_sdio_verifymemory_fndecl_14795 brcmf_sdio_verifymemory fndecl 4-2 14795 NULL nohasharray
+enable_so_realloc_buffer_fndecl_14795 realloc_buffer fndecl 2 14795 &enable_so_brcmf_sdio_verifymemory_fndecl_14795
+enable_so_mthca_map_user_db_fndecl_14796 mthca_map_user_db fndecl 5 14796 NULL
++enable_so_alloc_component_match_14799 alloc component_match 0 14799 NULL
+enable_so_event_rx_pool_read_fndecl_14803 event_rx_pool_read fndecl 3 14803 NULL
+enable_so_sg_read_fndecl_14804 sg_read fndecl 3 14804 NULL
+enable_so_sb_max_fwd_alloc_hpfs_sb_info_14807 sb_max_fwd_alloc hpfs_sb_info 0 14807 NULL
@@ -160868,6 +189060,7 @@ index 0000000..951b3be
+enable_so_tg3_change_mtu_fndecl_14826 tg3_change_mtu fndecl 2 14826 NULL
+enable_so_mlxsw_sx_flood_init_fndecl_14827 mlxsw_sx_flood_init fndecl 0 14827 NULL
+enable_so_parport_read_fndecl_14828 parport_read fndecl 0 14828 NULL
++enable_so_mlx5_core_sriov_configure_fndecl_14829 mlx5_core_sriov_configure fndecl 2 14829 NULL
+enable_so_residual_length_response_14830 residual_length response 0 14830 NULL
+enable_so_sis5595_base_vardecl_i2c_sis5595_c_14832 sis5595_base vardecl_i2c-sis5595.c 0 14832 NULL
+enable_so_shift_arg_pages_fndecl_14835 shift_arg_pages fndecl 2 14835 NULL nohasharray
@@ -160880,6 +189073,7 @@ index 0000000..951b3be
+enable_so_iwl_pcie_alloc_fw_monitor_fndecl_14872 iwl_pcie_alloc_fw_monitor fndecl 2 14872 NULL
+enable_so_threads_mask_netns_ipvs_14873 threads_mask netns_ipvs 0 14873 NULL
+enable_so_inocache_hashsize_jffs2_sb_info_14875 inocache_hashsize jffs2_sb_info 0 14875 NULL
++enable_so_wm_adsp_buffer_write_fndecl_14879 wm_adsp_buffer_write fndecl 0 14879 NULL
+enable_so_submit_queues_vardecl_null_blk_c_14881 submit_queues vardecl_null_blk.c 0 14881 NULL
+enable_so_pg_first_page_collect_14888 pg_first page_collect 0 14888 NULL
+enable_so___vb2_get_done_vb_fndecl_14889 __vb2_get_done_vb fndecl 0 14889 NULL
@@ -161113,6 +189307,7 @@ index 0000000..951b3be
+enable_so_end_bttv_vbi_fmt_15637 end bttv_vbi_fmt 0 15637 NULL nohasharray
+enable_so_SyS_pselect6_fndecl_15637 SyS_pselect6 fndecl 1 15637 &enable_so_end_bttv_vbi_fmt_15637
+enable_so_dma_in_redrat3_dev_15639 dma_in redrat3_dev 0 15639 NULL
++enable_so_num_active_peers_ath10k_15643 num_active_peers ath10k 0 15643 NULL
+enable_so_akid_raw_issuer_size_x509_parse_context_15651 akid_raw_issuer_size x509_parse_context 0 15651 NULL
+enable_so_read_bytes_from_xdr_buf_fndecl_15654 read_bytes_from_xdr_buf fndecl 4-2 15654 NULL nohasharray
+enable_so_mapped_vram_radeonfb_info_15654 mapped_vram radeonfb_info 0 15654 &enable_so_read_bytes_from_xdr_buf_fndecl_15654 nohasharray
@@ -161182,6 +189377,7 @@ index 0000000..951b3be
+enable_so_msg_print_ext_body_fndecl_15847 msg_print_ext_body fndecl 0 15847 NULL
+enable_so_pnp_register_mem_resource_fndecl_15849 pnp_register_mem_resource fndecl 6-3-5 15849 NULL
+enable_so_net2272_read_fndecl_15850 net2272_read fndecl 0 15850 NULL
++enable_so_max_num_peers_ath10k_15853 max_num_peers ath10k 0 15853 NULL
+enable_so_sb_set_blocksize_fndecl_15860 sb_set_blocksize fndecl 2-0 15860 NULL
+enable_so_kvm_read_guest_virt_helper_fndecl_15863 kvm_read_guest_virt_helper fndecl 3-1 15863 NULL
+enable_so_period_bytes_min_snd_pcm_hardware_15864 period_bytes_min snd_pcm_hardware 0 15864 NULL
@@ -161315,7 +189511,8 @@ index 0000000..951b3be
+enable_so_crypto_alloc_instance2_fndecl_16302 crypto_alloc_instance2 fndecl 3 16302 NULL
+enable_so_isdn_tty_countDLE_fndecl_16304 isdn_tty_countDLE fndecl 0 16304 NULL
+enable_so_brcmf_sdiod_txglomsz_vardecl_bcmsdh_c_16306 brcmf_sdiod_txglomsz vardecl_bcmsdh.c 0 16306 NULL
-+enable_so_len_ieee80211_vendor_radiotap_16308 len ieee80211_vendor_radiotap 0 16308 NULL
++enable_so_len_ieee80211_vendor_radiotap_16308 len ieee80211_vendor_radiotap 0 16308 NULL nohasharray
++enable_so_wm_adsp_compr_copy_fndecl_16308 wm_adsp_compr_copy fndecl 3 16308 &enable_so_len_ieee80211_vendor_radiotap_16308
+enable_so_aac_fib_send_fndecl_16315 aac_fib_send fndecl 3 16315 NULL
+enable_so_memblock_mark_mirror_fndecl_16321 memblock_mark_mirror fndecl 2-1 16321 NULL
+enable_so_major_tty_driver_16323 major tty_driver 0 16323 NULL
@@ -161435,6 +189632,7 @@ index 0000000..951b3be
+enable_so_opcfg_ofsl_cyttsp4_sysinfo_data_16723 opcfg_ofsl cyttsp4_sysinfo_data 0 16723 NULL
+enable_so_multi_io_quirk_mmc_host_ops_16729 multi_io_quirk mmc_host_ops 0 16729 NULL
+enable_so_fat_length_fat_boot_sector_16730 fat_length fat_boot_sector 0 16730 NULL
++enable_so_shader_rec_size_drm_vc4_submit_cl_16731 shader_rec_size drm_vc4_submit_cl 0 16731 NULL
+enable_so_width_qxl_head_16734 width qxl_head 0 16734 NULL
+enable_so_nchannels_twl6030_gpadc_platform_data_16736 nchannels twl6030_gpadc_platform_data 0 16736 NULL
+enable_so_rx_rate_rx_frames_per_rates_read_fndecl_16737 rx_rate_rx_frames_per_rates_read fndecl 3 16737 NULL nohasharray
@@ -161445,6 +189643,7 @@ index 0000000..951b3be
+enable_so_lib80211_wep_encrypt_fndecl_16752 lib80211_wep_encrypt fndecl 2 16752 NULL
+enable_so_skb_pull_rcsum_fndecl_16757 skb_pull_rcsum fndecl 2 16757 NULL
+enable_so_discard_next_dnode_fndecl_16758 discard_next_dnode fndecl 2 16758 NULL
++enable_so_ucNumEntries__ATOM_Tonga_PCIE_Table_16761 ucNumEntries _ATOM_Tonga_PCIE_Table 0 16761 NULL
+enable_so___vfs_write_fndecl_16765 __vfs_write fndecl 0-3 16765 NULL
+enable_so___blk_end_request_all_fndecl_16766 __blk_end_request_all fndecl 2 16766 NULL
+enable_so_cluster_vardecl_pd_c_16770 cluster vardecl_pd.c 0 16770 NULL nohasharray
@@ -161519,6 +189718,7 @@ index 0000000..951b3be
+enable_so_vcs_read_fndecl_16962 vcs_read fndecl 3 16962 NULL
+enable_so_call_id_rxrpc_call_16964 call_id rxrpc_call 0 16964 NULL
+enable_so_minor_oss_minor_dev_16965 minor oss_minor_dev 0 16965 NULL
++enable_so___alloc_dummy_extent_buffer_fndecl_16969 __alloc_dummy_extent_buffer fndecl 2 16969 NULL
+enable_so_cifs_sync_write_fndecl_16972 cifs_sync_write fndecl 6 16972 NULL
+enable_so_fat_reserved_fat_bios_param_block_16977 fat_reserved fat_bios_param_block 0 16977 NULL
+enable_so_virtio_gpu_alloc_cmd_fndecl_16978 virtio_gpu_alloc_cmd fndecl 3 16978 NULL
@@ -161607,6 +189807,7 @@ index 0000000..951b3be
+enable_so_offset_rbuf_info_17181 offset rbuf_info 0 17181 NULL
+enable_so_luma_size_s5p_mfc_ctx_17182 luma_size s5p_mfc_ctx 0 17182 NULL
+enable_so_pci_raw_set_power_state_fndecl_17186 pci_raw_set_power_state fndecl 0 17186 NULL
++enable_so_num_component_match_17187 num component_match 0 17187 NULL
+enable_so_sys_pread64_fndecl_17210 sys_pread64 fndecl 3 17210 NULL
+enable_so_type_to_neq_fw_pfvf_cmd_17213 type_to_neq fw_pfvf_cmd 0 17213 NULL
+enable_so_logical_blk_num_osst_tape_17216 logical_blk_num osst_tape 0 17216 NULL
@@ -161751,7 +189952,8 @@ index 0000000..951b3be
+enable_so_buf_len_ceph_none_authorizer_17652 buf_len ceph_none_authorizer 0 17652 NULL nohasharray
+enable_so_dvb_dmx_init_fndecl_17652 dvb_dmx_init fndecl 0 17652 &enable_so_buf_len_ceph_none_authorizer_17652
+enable_so_size_mem_array_17655 size mem_array 0 17655 NULL
-+enable_so_snd_wscale_tcp_options_received_17658 snd_wscale tcp_options_received 0 17658 NULL
++enable_so_snd_wscale_tcp_options_received_17658 snd_wscale tcp_options_received 0 17658 NULL nohasharray
++enable_so_btrfs_dedupe_file_range_fndecl_17658 btrfs_dedupe_file_range fndecl 3 17658 &enable_so_snd_wscale_tcp_options_received_17658
+enable_so_size_scsi_host_sg_pool_17661 size scsi_host_sg_pool 0 17661 NULL nohasharray
+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
+enable_so_stereo_cmipci_sb_reg_17667 stereo cmipci_sb_reg 0 17667 NULL
@@ -162439,6 +190641,7 @@ index 0000000..951b3be
+enable_so_set_fp_int_qed_common_ops_19644 set_fp_int qed_common_ops 0 19644 NULL nohasharray
+enable_so_pcfg_ofsh_cyttsp4_sysinfo_data_19644 pcfg_ofsh cyttsp4_sysinfo_data 0 19644 &enable_so_set_fp_int_qed_common_ops_19644
+enable_so_memory_maker_code_mspro_sys_info_19650 memory_maker_code mspro_sys_info 0 19650 NULL
++enable_so_get_rq_pas_size_fndecl_19651 get_rq_pas_size fndecl 0 19651 NULL
+enable_so_af9033_rd_regs_fndecl_19652 af9033_rd_regs fndecl 4 19652 NULL
+enable_so_shadow_step_fndecl_19653 shadow_step fndecl 2 19653 NULL
+enable_so_thermal_false_irq_read_fndecl_19654 thermal_false_irq_read fndecl 3 19654 NULL
@@ -162483,6 +190686,7 @@ index 0000000..951b3be
+enable_so_fw_mem_block_size_wl1271_19784 fw_mem_block_size wl1271 0 19784 NULL
+enable_so_gss_decrypt_xdr_buf_fndecl_19786 gss_decrypt_xdr_buf fndecl 3 19786 NULL
+enable_so_get_alua_req_fndecl_19797 get_alua_req fndecl 3 19797 NULL
++enable_so_num_u2_ports_xhci_hcd_mtk_19801 num_u2_ports xhci_hcd_mtk 0 19801 NULL
+enable_so_pvscsi_get_max_targets_fndecl_19802 pvscsi_get_max_targets fndecl 0 19802 NULL
+enable_so_fromlen_nfs3_symlinkargs_19803 fromlen nfs3_symlinkargs 0 19803 NULL
+enable_so_exit_error_msb_data_19810 exit_error msb_data 0 19810 NULL
@@ -162596,6 +190800,7 @@ index 0000000..951b3be
+enable_so_usb_ftdi_elan_edset_single_fndecl_20181 usb_ftdi_elan_edset_single fndecl 0 20181 NULL nohasharray
+enable_so_swapRB_sd_20181 swapRB sd 0 20181 &enable_so_usb_ftdi_elan_edset_single_fndecl_20181
+enable_so___kmalloc_track_caller_fndecl_20188 __kmalloc_track_caller fndecl 1 20188 NULL
++enable_so_qp_attach_mbox_size_fndecl_20191 qp_attach_mbox_size fndecl 0 20191 NULL
+enable_so_lookup_memtype_fndecl_20192 lookup_memtype fndecl 1 20192 NULL
+enable_so_agp_memory_reserved_vardecl_20196 agp_memory_reserved vardecl 0 20196 NULL nohasharray
+enable_so_iram_base_intel_sst_drv_20196 iram_base intel_sst_drv 0 20196 &enable_so_agp_memory_reserved_vardecl_20196
@@ -162642,6 +190847,7 @@ index 0000000..951b3be
+enable_so_xfs_dir2_leaf_trim_data_fndecl_20310 xfs_dir2_leaf_trim_data fndecl 3 20310 NULL nohasharray
+enable_so_index_vardecl_nm256_c_20310 index vardecl_nm256.c 0 20310 &enable_so_xfs_dir2_leaf_trim_data_fndecl_20310
+enable_so_cx18_read_pos_fndecl_20312 cx18_read_pos fndecl 3 20312 NULL
++enable_so_wilc_spi_rx_fndecl_20314 wilc_spi_rx fndecl 3 20314 NULL
+enable_so_cas_change_mtu_fndecl_20320 cas_change_mtu fndecl 2 20320 NULL
+enable_so_ati_create_gatt_pages_fndecl_20321 ati_create_gatt_pages fndecl 1 20321 NULL
+enable_so_max_rxsz_cxgbi_ddp_info_20322 max_rxsz cxgbi_ddp_info 0 20322 NULL nohasharray
@@ -162679,6 +190885,7 @@ index 0000000..951b3be
+enable_so_regulator_register_always_on_fndecl_20403 regulator_register_always_on fndecl 1 20403 &enable_so_xfs_qm_dqusage_adjust_fndecl_20403
+enable_so_pwr_rcvd_bcns_cnt_read_fndecl_20405 pwr_rcvd_bcns_cnt_read fndecl 3 20405 NULL
+enable_so_diversity_total_num_of_toggles_read_fndecl_20407 diversity_total_num_of_toggles_read fndecl 3 20407 NULL
++enable_so_num_units_wlan_host_mem_req_20410 num_units wlan_host_mem_req 0 20410 NULL
+enable_so_mc_rreg_radeon_device_20418 mc_rreg radeon_device 0 20418 NULL
+enable_so_sd_log_head_gfs2_sbd_20435 sd_log_head gfs2_sbd 0 20435 NULL
+enable_so_max_vblank_mt9v032_model_data_20437 max_vblank mt9v032_model_data 0 20437 NULL nohasharray
@@ -162799,6 +191006,7 @@ index 0000000..951b3be
+enable_so_channels_min_snd_soc_pcm_stream_20771 channels_min snd_soc_pcm_stream 0 20771 NULL nohasharray
+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
+enable_so_ltab_sz_ubifs_info_20776 ltab_sz ubifs_info 0 20776 NULL
++enable_so_amdgpu_sched_jobs_vardecl_20778 amdgpu_sched_jobs vardecl 0 20778 NULL
+enable_so_fat_fats_fat_bios_param_block_20785 fat_fats fat_bios_param_block 0 20785 NULL
+enable_so_orig_x_screen_info_20787 orig_x screen_info 0 20787 NULL nohasharray
+enable_so_ncp_search_for_fileset_fndecl_20787 ncp_search_for_fileset fndecl 6 20787 &enable_so_orig_x_screen_info_20787
@@ -162891,7 +191099,8 @@ index 0000000..951b3be
+enable_so_start_range_21034 start range 0 21034 NULL
+enable_so_crtc_vdisplay_drm_display_mode_21037 crtc_vdisplay drm_display_mode 0 21037 NULL
+enable_so_garp_attr_create_fndecl_21048 garp_attr_create fndecl 3 21048 NULL
-+enable_so_prep_umr_reg_wqe_fndecl_21050 prep_umr_reg_wqe fndecl 5 21050 NULL
++enable_so_prep_umr_reg_wqe_fndecl_21050 prep_umr_reg_wqe fndecl 5 21050 NULL nohasharray
++enable_so_vary_usbtest_param_32_21050 vary usbtest_param_32 0 21050 &enable_so_prep_umr_reg_wqe_fndecl_21050
+enable_so_erase_shift_onenand_chip_21052 erase_shift onenand_chip 0 21052 NULL nohasharray
+enable_so_tx_queues_rt2x00_ops_21052 tx_queues rt2x00_ops 0 21052 &enable_so_erase_shift_onenand_chip_21052
+enable_so_xfs_alloc_min_freelist_fndecl_21056 xfs_alloc_min_freelist fndecl 0 21056 NULL
@@ -163193,6 +191402,7 @@ index 0000000..951b3be
+enable_so_error_memstick_request_21931 error memstick_request 0 21931 NULL nohasharray
+enable_so_bfad_iocmd_rport_set_speed_fndecl_21931 bfad_iocmd_rport_set_speed fndecl 0 21931 &enable_so_error_memstick_request_21931 nohasharray
+enable_so_rx_eth_fndecl_21931 rx_eth fndecl 4 21931 &enable_so_bfad_iocmd_rport_set_speed_fndecl_21931
++enable_so_wilc_network_info_received_fndecl_21936 wilc_network_info_received fndecl 3 21936 NULL
+enable_so_page_cache_async_readahead_fndecl_21944 page_cache_async_readahead fndecl 5 21944 NULL
+enable_so_ssb_bus_ssbbus_register_fndecl_21946 ssb_bus_ssbbus_register fndecl 2 21946 NULL
+enable_so_in_pipe_ttusb_dec_21947 in_pipe ttusb_dec 0 21947 NULL
@@ -163520,6 +191730,7 @@ index 0000000..951b3be
+enable_so_count_nfs3_readdirargs_22881 count nfs3_readdirargs 0 22881 NULL
+enable_so_max_wrs_rds_iw_device_22882 max_wrs rds_iw_device 0 22882 NULL
+enable_so_len_prism2_download_area_22884 len prism2_download_area 0 22884 NULL
++enable_so_length_usbtest_param_32_22886 length usbtest_param_32 0 22886 NULL
+enable_so_frag_len_atmel_private_22893 frag_len atmel_private 0 22893 NULL
+enable_so_snap_names_len_rbd_image_header_ondisk_22898 snap_names_len rbd_image_header_ondisk 0 22898 NULL
+enable_so___btrfs_cow_block_fndecl_22902 __btrfs_cow_block fndecl 0 22902 NULL
@@ -163619,6 +191830,7 @@ index 0000000..951b3be
+enable_so_x_res_vbe_mode_ib_23177 x_res vbe_mode_ib 0 23177 NULL
+enable_so_uhid_char_read_fndecl_23187 uhid_char_read fndecl 3 23187 NULL
+enable_so_tx_tx_retry_data_read_fndecl_23189 tx_tx_retry_data_read fndecl 3 23189 NULL
++enable_so___reuseport_alloc_fndecl_23190 __reuseport_alloc fndecl 1 23190 NULL
+enable_so_ir_context_mask_fw_ohci_23196 ir_context_mask fw_ohci 0 23196 NULL
+enable_so_seq_lseek_fndecl_23197 seq_lseek fndecl 2 23197 NULL
+enable_so_bdev_erase_fndecl_23198 bdev_erase fndecl 2-3 23198 NULL
@@ -163685,6 +191897,7 @@ index 0000000..951b3be
+enable_so_calculate_xstate_size_fndecl_23404 calculate_xstate_size fndecl 0 23404 NULL
+enable_so_s5p_jpeg_get_subsampling_mode_fndecl_23405 s5p_jpeg_get_subsampling_mode fndecl 0 23405 NULL nohasharray
+enable_so_map_block_for_writepage_fndecl_23405 map_block_for_writepage fndecl 3 23405 &enable_so_s5p_jpeg_get_subsampling_mode_fndecl_23405
++enable_so_max_socks_sock_reuseport_23407 max_socks sock_reuseport 0 23407 NULL
+enable_so_nx_fw_cmd_set_gbe_port_fndecl_23412 nx_fw_cmd_set_gbe_port fndecl 3 23412 NULL
+enable_so_numerator_v4l2_fract_23413 numerator v4l2_fract 0 23413 NULL
+enable_so_logfs_safe_iget_fndecl_23415 logfs_safe_iget fndecl 2 23415 NULL
@@ -163920,6 +192133,7 @@ index 0000000..951b3be
+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
+enable_so_irq_base_pm860x_chip_24096 irq_base pm860x_chip 0 24096 NULL
+enable_so_sectors_md_rdev_24098 sectors md_rdev 0 24098 NULL
++enable_so_cnt_nfp_net_rx_ring_24099 cnt nfp_net_rx_ring 0 24099 NULL
+enable_so_capture_bufsize_vardecl_nm256_c_24100 capture_bufsize vardecl_nm256.c 0 24100 NULL
+enable_so_dcbp_set_pad_bits_fndecl_24101 dcbp_set_pad_bits fndecl 2 24101 NULL
+enable_so_bus_mtu_brcmf_usbdev_24102 bus_mtu brcmf_usbdev 0 24102 NULL
@@ -164159,7 +192373,9 @@ index 0000000..951b3be
+enable_so_queue_depth_blk_mq_tag_set_24719 queue_depth blk_mq_tag_set 0 24719 NULL
+enable_so_qxl_ttm_tt_create_fndecl_24720 qxl_ttm_tt_create fndecl 2 24720 NULL
+enable_so_drm_gem_cma_create_with_handle_fndecl_24721 drm_gem_cma_create_with_handle fndecl 3 24721 NULL
++enable_so_wilc_set_join_req_fndecl_24725 wilc_set_join_req fndecl 4-6 24725 NULL
+enable_so_bfs_get_block_fndecl_24726 bfs_get_block fndecl 2 24726 NULL
++enable_so_outlen_ib_udata_24729 outlen ib_udata 0 24729 NULL
+enable_so_VBP_kyrofb_info_24731 VBP kyrofb_info 0 24731 NULL nohasharray
+enable_so_HiSax_readstatus_fndecl_24731 HiSax_readstatus fndecl 2 24731 &enable_so_VBP_kyrofb_info_24731
+enable_so_next_idtentry_24734 next idtentry 0 24734 NULL
@@ -164173,7 +192389,8 @@ index 0000000..951b3be
+enable_so_scif_create_pinned_pages_fndecl_24761 scif_create_pinned_pages fndecl 1 24761 NULL nohasharray
+enable_so_inftl_read_oob_fndecl_24761 inftl_read_oob fndecl 2-3 24761 &enable_so_scif_create_pinned_pages_fndecl_24761
+enable_so_pending_deflate_state_24766 pending deflate_state 0 24766 NULL
-+enable_so_drbd_bm_total_weight_fndecl_24776 drbd_bm_total_weight fndecl 0 24776 NULL
++enable_so_drbd_bm_total_weight_fndecl_24776 drbd_bm_total_weight fndecl 0 24776 NULL nohasharray
++enable_so_s_hdrwords_hfi1_qp_24776 s_hdrwords hfi1_qp 0 24776 &enable_so_drbd_bm_total_weight_fndecl_24776
+enable_so_xlog_state_switch_iclogs_fndecl_24782 xlog_state_switch_iclogs fndecl 3 24782 NULL
+enable_so__sdma_txadd_daddr_fndecl_24789 _sdma_txadd_daddr fndecl 5 24789 NULL
+enable_so_gx1_read_conf_reg_fndecl_24794 gx1_read_conf_reg fndecl 0 24794 NULL nohasharray
@@ -164567,6 +192784,7 @@ index 0000000..951b3be
+enable_so_kvm_hv_set_msr_common_fndecl_25940 kvm_hv_set_msr_common fndecl 3 25940 NULL nohasharray
+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
+enable_so___xfs_bmbt_get_all_fndecl_25952 __xfs_bmbt_get_all fndecl 2-1 25952 NULL
++enable_so___media_entity_enum_init_fndecl_25953 __media_entity_enum_init fndecl 2 25953 NULL
+enable_so_cyttsp_spi_read_block_data_fndecl_25954 cyttsp_spi_read_block_data fndecl 4 25954 NULL
+enable_so_len_xsd_sockmsg_25963 len xsd_sockmsg 0 25963 NULL
+enable_so_ieee802154_hdr_get_sechdr_fndecl_25965 ieee802154_hdr_get_sechdr fndecl 0 25965 NULL
@@ -164595,6 +192813,7 @@ index 0000000..951b3be
+enable_so_dataflash_read_user_otp_fndecl_26075 dataflash_read_user_otp fndecl 3-2 26075 NULL nohasharray
+enable_so_ep0_write_fndecl_26075 ep0_write fndecl 3 26075 &enable_so_dataflash_read_user_otp_fndecl_26075
+enable_so_hfsplus_ext_build_key_fndecl_26076 hfsplus_ext_build_key fndecl 3 26076 NULL
++enable_so_alloc_bitmap_fndecl_26079 alloc_bitmap fndecl 1 26079 NULL
+enable_so_fratio_arizona_fll_cfg_26082 fratio arizona_fll_cfg 0 26082 NULL
+enable_so_fdt_first_subnode_fndecl_26084 fdt_first_subnode fndecl 2 26084 NULL nohasharray
+enable_so_remap_to_origin_then_cache_fndecl_26084 remap_to_origin_then_cache fndecl 4 26084 &enable_so_fdt_first_subnode_fndecl_26084
@@ -164773,6 +192992,7 @@ index 0000000..951b3be
+enable_so_read_tree_block_fndecl_26587 read_tree_block fndecl 2 26587 NULL
+enable_so_early_init_dt_scan_chosen_fndecl_26588 early_init_dt_scan_chosen fndecl 1 26588 NULL
+enable_so_bytes_per_word_tegra_slink_data_26590 bytes_per_word tegra_slink_data 0 26590 NULL
++enable_so_rates_len_add_sta_param_26593 rates_len add_sta_param 0 26593 NULL
+enable_so_nvme_trans_completion_fndecl_26597 nvme_trans_completion fndecl 0 26597 NULL
+enable_so_tx_desc_count_xgbe_prv_data_26603 tx_desc_count xgbe_prv_data 0 26603 NULL
+enable_so_UMAsize_sis_video_info_26611 UMAsize sis_video_info 0 26611 NULL
@@ -165145,6 +193365,7 @@ index 0000000..951b3be
+enable_so_period_frames_usb_stream_config_27656 period_frames usb_stream_config 0 27656 NULL
+enable_so_WriteRegs_fndecl_27658 WriteRegs fndecl 4 27658 NULL
+enable_so_xen_get_pages_limit_fndecl_27661 xen_get_pages_limit fndecl 0 27661 NULL
++enable_so_ceph_osdc_wait_request_fndecl_27663 ceph_osdc_wait_request fndecl 0 27663 NULL
+enable_so_efx_ef10_mem_map_size_fndecl_27664 efx_ef10_mem_map_size fndecl 0 27664 NULL
+enable_so_mr_write_fndecl_27670 mr_write fndecl 0 27670 NULL
+enable_so_size_compat_ip6t_replace_27672 size compat_ip6t_replace 0 27672 NULL
@@ -165240,6 +193461,7 @@ index 0000000..951b3be
+enable_so_ext4_seek_hole_fndecl_27990 ext4_seek_hole fndecl 2 27990 NULL
+enable_so_write_mei_hw_ops_27991 write mei_hw_ops 0 27991 NULL
+enable_so_alloc_ccbs_blogic_adapter_27993 alloc_ccbs blogic_adapter 0 27993 NULL
++enable_so_cumulative_size_wm_adsp_buffer_region_27998 cumulative_size wm_adsp_buffer_region 0 27998 NULL
+enable_so___nf_ct_ext_add_length_fndecl_27999 __nf_ct_ext_add_length fndecl 3 27999 NULL
+enable_so_ubifs_end_scan_fndecl_28000 ubifs_end_scan fndecl 4 28000 NULL nohasharray
+enable_so_page_count_scrub_block_28000 page_count scrub_block 0 28000 &enable_so_ubifs_end_scan_fndecl_28000
@@ -165439,6 +193661,7 @@ index 0000000..951b3be
+enable_so_ci_ll_init_fndecl_28561 ci_ll_init fndecl 3 28561 NULL nohasharray
+enable_so_num_pads_uvc_entity_28561 num_pads uvc_entity 0 28561 &enable_so_ci_ll_init_fndecl_28561
+enable_so_PRO_RATE_DEFAULT_vardecl_ice1712_c_28563 PRO_RATE_DEFAULT vardecl_ice1712.c 0 28563 NULL
++enable_so_wm_adsp_write_data_word_fndecl_28566 wm_adsp_write_data_word fndecl 0 28566 NULL
+enable_so_wil_write_back_fndecl_28568 wil_write_back fndecl 3 28568 NULL
+enable_so_nvme_npages_fndecl_28569 nvme_npages fndecl 0-1 28569 NULL
+enable_so_out_max_chans_snd_card_asihpi_28574 out_max_chans snd_card_asihpi 0 28574 NULL nohasharray
@@ -166110,6 +194333,7 @@ index 0000000..951b3be
+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
+enable_so_hdsp_spdif_sample_rate_fndecl_30700 hdsp_spdif_sample_rate fndecl 0 30700 NULL
+enable_so_bm_entry_read_fndecl_30707 bm_entry_read fndecl 3 30707 NULL
++enable_so_bin_cl_size_drm_vc4_submit_cl_30710 bin_cl_size drm_vc4_submit_cl 0 30710 NULL
+enable_so_sched_autogroup_write_fndecl_30715 sched_autogroup_write fndecl 3 30715 NULL
+enable_so_numPhys_PVSCSIConfigPageController_30726 numPhys PVSCSIConfigPageController 0 30726 NULL
+enable_so_lbs_threshold_write_fndecl_30733 lbs_threshold_write fndecl 5 30733 NULL
@@ -166322,6 +194546,7 @@ index 0000000..951b3be
+enable_so_mmap_base_kioctx_31285 mmap_base kioctx 0 31285 NULL
+enable_so_igb_enable_sriov_fndecl_31288 igb_enable_sriov fndecl 2 31288 NULL
+enable_so_nfs_readdir_page_filler_fndecl_31292 nfs_readdir_page_filler fndecl 5 31292 NULL
++enable_so_avail_wm_adsp_compr_buf_31294 avail wm_adsp_compr_buf 0 31294 NULL
+enable_so_asymmetric_key_generate_id_fndecl_31299 asymmetric_key_generate_id fndecl 4-2 31299 NULL
+enable_so_fs_shift_hfsplus_sb_info_31309 fs_shift hfsplus_sb_info 0 31309 NULL
+enable_so_rxblen_brcmf_sdio_31317 rxblen brcmf_sdio 0 31317 NULL
@@ -166342,6 +194567,7 @@ index 0000000..951b3be
+enable_so_device_acpiphp_slot_31359 device acpiphp_slot 0 31359 NULL
+enable_so_romfs_dev_strcmp_fndecl_31365 romfs_dev_strcmp fndecl 4-2 31365 NULL nohasharray
+enable_so_SyS_migrate_pages_fndecl_31365 SyS_migrate_pages fndecl 2 31365 &enable_so_romfs_dev_strcmp_fndecl_31365
++enable_so_wilc_scan_fndecl_31368 wilc_scan fndecl 5-7 31368 NULL
+enable_so_req_lim_delta_srp_rsp_31371 req_lim_delta srp_rsp 0 31371 NULL
+enable_so_ioctl_fndecl_31375 ioctl fndecl 3 31375 NULL
+enable_so_gfs2_meta_read_fndecl_31379 gfs2_meta_read fndecl 2 31379 NULL
@@ -166566,6 +194792,7 @@ index 0000000..951b3be
+enable_so_blocksize_udf_options_32019 blocksize udf_options 0 32019 NULL
+enable_so_depth_zr364xx_fmt_32028 depth zr364xx_fmt 0 32028 NULL
+enable_so_recent_mt_proc_write_fndecl_32029 recent_mt_proc_write fndecl 3 32029 NULL
++enable_so_skl_tplg_tlv_control_get_fndecl_32038 skl_tplg_tlv_control_get fndecl 3 32038 NULL
+enable_so_check_xattr_ref_inode_fndecl_32039 check_xattr_ref_inode fndecl 0 32039 NULL
+enable_so_base_efifb_dmi_info_32041 base efifb_dmi_info 0 32041 NULL
+enable_so_balloon_set_new_target_fndecl_32044 balloon_set_new_target fndecl 1 32044 NULL
@@ -166700,6 +194927,7 @@ index 0000000..951b3be
+enable_so_permission_inode_operations_32455 permission inode_operations 0 32455 NULL
+enable_so_ext4_da_write_inline_data_end_fndecl_32456 ext4_da_write_inline_data_end fndecl 2-4 32456 NULL
+enable_so_snd_buf_bytes_vardecl_usbatm_c_32457 snd_buf_bytes vardecl_usbatm.c 0 32457 NULL
++enable_so_dvb_create_tsout_entity_fndecl_32460 dvb_create_tsout_entity fndecl 3 32460 NULL
+enable_so_isr_irqs_read_fndecl_32462 isr_irqs_read fndecl 3 32462 NULL nohasharray
+enable_so_ddata_ofs_cyttsp4_sysinfo_ofs_32462 ddata_ofs cyttsp4_sysinfo_ofs 0 32462 &enable_so_isr_irqs_read_fndecl_32462
+enable_so_neighbormtu_mastersmsl_ib_port_info_32464 neighbormtu_mastersmsl ib_port_info 0 32464 NULL
@@ -166751,6 +194979,7 @@ index 0000000..951b3be
+enable_so_msg_print_ext_header_fndecl_32580 msg_print_ext_header fndecl 0 32580 NULL
+enable_so_check_right_item_operations_32585 check_right item_operations 0 32585 NULL nohasharray
+enable_so_fnic_fc_trace_get_data_fndecl_32585 fnic_fc_trace_get_data fndecl 0 32585 &enable_so_check_right_item_operations_32585
++enable_so_mlx5_modify_nic_vport_vlans_fndecl_32595 mlx5_modify_nic_vport_vlans fndecl 3 32595 NULL
+enable_so_bop_assign_nilfs_bmap_operations_32598 bop_assign nilfs_bmap_operations 0 32598 NULL
+enable_so_paging32_prefetch_gpte_fndecl_32604 paging32_prefetch_gpte fndecl 4 32604 NULL
+enable_so_channel_num_sh_dmae_pdata_32606 channel_num sh_dmae_pdata 0 32606 NULL
@@ -166808,6 +195037,7 @@ index 0000000..951b3be
+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
+enable_so_portcntrs_2_read_fndecl_32793 portcntrs_2_read fndecl 3 32793 NULL
+enable_so_mp_register_ioapic_fndecl_32802 mp_register_ioapic fndecl 3 32802 NULL
++enable_so_wilc_setup_multicast_filter_fndecl_32803 wilc_setup_multicast_filter fndecl 3 32803 NULL
+enable_so_pipe_usb_fifo_32805 pipe usb_fifo 0 32805 NULL nohasharray
+enable_so_nfc_allocate_device_fndecl_32805 nfc_allocate_device fndecl 3 32805 &enable_so_pipe_usb_fifo_32805
+enable_so_info_len_ib_ucm_info_32807 info_len ib_ucm_info 0 32807 NULL
@@ -166836,7 +195066,8 @@ index 0000000..951b3be
+enable_so_dvb_ringbuffer_read_user_fndecl_32877 dvb_ringbuffer_read_user fndecl 3-0 32877 NULL nohasharray
+enable_so_dz_divisor_dn_zone_32877 dz_divisor dn_zone 0 32877 &enable_so_dvb_ringbuffer_read_user_fndecl_32877
+enable_so_mem_cgroup_move_charge_pte_range_fndecl_32885 mem_cgroup_move_charge_pte_range fndecl 2 32885 NULL nohasharray
-+enable_so_btrfs_cow_block_fndecl_32885 btrfs_cow_block fndecl 0 32885 &enable_so_mem_cgroup_move_charge_pte_range_fndecl_32885
++enable_so_btrfs_cow_block_fndecl_32885 btrfs_cow_block fndecl 0 32885 &enable_so_mem_cgroup_move_charge_pte_range_fndecl_32885 nohasharray
++enable_so_wilc_spi_write_fndecl_32885 wilc_spi_write fndecl 4 32885 &enable_so_btrfs_cow_block_fndecl_32885
+enable_so_m_ialloc_inos_xfs_mount_32889 m_ialloc_inos xfs_mount 0 32889 NULL
+enable_so_snoop_table_size_ib_mad_qp_info_32891 snoop_table_size ib_mad_qp_info 0 32891 NULL
+enable_so_snd_gus_dram_read_fndecl_32893 snd_gus_dram_read fndecl 4 32893 NULL
@@ -166997,6 +195228,7 @@ index 0000000..951b3be
+enable_so_dvb_register_device_fndecl_33363 dvb_register_device fndecl 0 33363 NULL
+enable_so_udl_prime_create_fndecl_33364 udl_prime_create fndecl 2 33364 NULL nohasharray
+enable_so_scanlength_usbvision_frame_33364 scanlength usbvision_frame 0 33364 &enable_so_udl_prime_create_fndecl_33364
++enable_so_mlx5_core_sriov_enable_fndecl_33369 mlx5_core_sriov_enable fndecl 2 33369 NULL
+enable_so_ihandlen_xfs_fsop_handlereq_33370 ihandlen xfs_fsop_handlereq 0 33370 NULL
+enable_so_lpfc_sg_seg_cnt_init_fndecl_33371 lpfc_sg_seg_cnt_init fndecl 2 33371 NULL
+enable_so_ib_qib_max_srq_wrs_vardecl_33376 ib_qib_max_srq_wrs vardecl 0 33376 NULL
@@ -167056,6 +195288,7 @@ index 0000000..951b3be
+enable_so_num_seq_vgastate_33544 num_seq vgastate 0 33544 &enable_so_sq_size_nes_hw_qp_33544
+enable_so_tx_queues_nicvf_33546 tx_queues nicvf 0 33546 NULL
+enable_so_dlfb_setup_modes_fndecl_33548 dlfb_setup_modes fndecl 4 33548 NULL
++enable_so_uinput_abs_setup_fndecl_33551 uinput_abs_setup fndecl 3 33551 NULL
+enable_so_kvm_vcpu_read_guest_fndecl_33552 kvm_vcpu_read_guest fndecl 2-4 33552 NULL
+enable_so_hns_nic_change_mtu_fndecl_33553 hns_nic_change_mtu fndecl 2 33553 NULL nohasharray
+enable_so_tcf_hash_create_fndecl_33553 tcf_hash_create fndecl 4 33553 &enable_so_hns_nic_change_mtu_fndecl_33553
@@ -167200,6 +195433,7 @@ index 0000000..951b3be
+enable_so_cwarn_cm4000_dev_33978 cwarn cm4000_dev 0 33978 NULL
+enable_so_buf_len_wmi_tlv_mgmt_rx_ev_33979 buf_len wmi_tlv_mgmt_rx_ev 0 33979 NULL
+enable_so_usbat_bulk_write_fndecl_33983 usbat_bulk_write fndecl 3-4 33983 NULL
++enable_so_spi_data_write_fndecl_33987 spi_data_write fndecl 3 33987 NULL
+enable_so_unit_off_ore_striping_info_33989 unit_off ore_striping_info 0 33989 NULL
+enable_so_size_fjes_hw_resource_33991 size fjes_hw_resource 0 33991 NULL
+enable_so_sectorsize_scrub_ctx_33993 sectorsize scrub_ctx 0 33993 NULL
@@ -167481,6 +195715,7 @@ index 0000000..951b3be
+enable_so_max_msix_vectors_fm10k_mac_info_34860 max_msix_vectors fm10k_mac_info 0 34860 NULL
+enable_so_tipc_link_set_mtu_fndecl_34861 tipc_link_set_mtu fndecl 2 34861 NULL nohasharray
+enable_so_gk20a_instobj_ctor_iommu_fndecl_34861 gk20a_instobj_ctor_iommu fndecl 2 34861 &enable_so_tipc_link_set_mtu_fndecl_34861
++enable_so_pset_prop_read_string_array_fndecl_34862 pset_prop_read_string_array fndecl 0 34862 NULL
+enable_so_pfkey_recvmsg_fndecl_34863 pfkey_recvmsg fndecl 3 34863 NULL nohasharray
+enable_so_s_map_size_adfs_sb_info_34863 s_map_size adfs_sb_info 0 34863 &enable_so_pfkey_recvmsg_fndecl_34863
+enable_so_odm_num_comps_pnfs_osd_data_map_34865 odm_num_comps pnfs_osd_data_map 0 34865 NULL
@@ -167528,6 +195763,7 @@ index 0000000..951b3be
+enable_so_rfkill_fop_read_fndecl_34980 rfkill_fop_read fndecl 3 34980 NULL
+enable_so_amdgpu_cgs_add_irq_source_fndecl_34994 amdgpu_cgs_add_irq_source fndecl 3 34994 NULL
+enable_so_kfd_gtt_sa_init_fndecl_34996 kfd_gtt_sa_init fndecl 3-2 34996 NULL
++enable_so_wm_adsp_buffer_capture_block_fndecl_35001 wm_adsp_buffer_capture_block fndecl 2-0 35001 NULL
+enable_so_error_elp_while_tx_read_fndecl_35002 error_elp_while_tx_read fndecl 3 35002 NULL
+enable_so_rx_ring_count_ixgbe_adapter_35004 rx_ring_count ixgbe_adapter 0 35004 NULL
+enable_so_amb_len_i5k_amb_data_35007 amb_len i5k_amb_data 0 35007 NULL
@@ -168115,6 +196351,7 @@ index 0000000..951b3be
+enable_so___tty_alloc_driver_fndecl_36660 __tty_alloc_driver fndecl 1 36660 NULL
+enable_so_qp_alloc_host_work_fndecl_36661 qp_alloc_host_work fndecl 3-5 36661 NULL
+enable_so_dac_channels_mixer_oxygen_model_36662 dac_channels_mixer oxygen_model 0 36662 NULL
++enable_so_regmap_raw_write_fndecl_36664 regmap_raw_write fndecl 0 36664 NULL
+enable_so_roffset_scifioctl_copy_36667 roffset scifioctl_copy 0 36667 NULL
+enable_so_max_queue_pairs_virtnet_info_36669 max_queue_pairs virtnet_info 0 36669 NULL
+enable_so_i_file_acl_lo_ext4_inode_36684 i_file_acl_lo ext4_inode 0 36684 NULL
@@ -168213,6 +196450,7 @@ index 0000000..951b3be
+enable_so_to_fw_map_37020 to fw_map 0 37020 NULL
+enable_so_cb_group_width_exofs_dt_data_map_37027 cb_group_width exofs_dt_data_map 0 37027 NULL
+enable_so_result_fc_bsg_reply_37029 result fc_bsg_reply 0 37029 NULL
++enable_so_ib_is_udata_cleared_fndecl_37036 ib_is_udata_cleared fndecl 3 37036 NULL
+enable_so_dirty_poll_interval_fndecl_37038 dirty_poll_interval fndecl 0 37038 NULL nohasharray
+enable_so_mmio_size_vmw_private_37038 mmio_size vmw_private 0 37038 &enable_so_dirty_poll_interval_fndecl_37038
+enable_so_adjust_resource_fndecl_37046 adjust_resource fndecl 3-2 37046 NULL
@@ -168324,7 +196562,8 @@ index 0000000..951b3be
+enable_so_bt_alloc_fndecl_37370 bt_alloc fndecl 2 37370 NULL
+enable_so_peer_addr_len_drbd_connection_37371 peer_addr_len drbd_connection 0 37371 NULL
+enable_so_orig_bi_size_usb_idmouse_37372 orig_bi_size usb_idmouse 0 37372 NULL
-+enable_so_virtscsi_add_cmd_fndecl_37379 virtscsi_add_cmd fndecl 3-4 37379 NULL
++enable_so_virtscsi_add_cmd_fndecl_37379 virtscsi_add_cmd fndecl 3-4 37379 NULL nohasharray
++enable_so_size_list_size_vc4_bo_cache_37379 size_list_size vc4_bo_cache 0 37379 &enable_so_virtscsi_add_cmd_fndecl_37379
+enable_so_gotoxay_fndecl_37380 gotoxay fndecl 2-3 37380 NULL
+enable_so_nvkm_ramht_new_fndecl_37381 nvkm_ramht_new fndecl 2 37381 NULL
+enable_so_size_pnp_mem_37384 size pnp_mem 0 37384 NULL
@@ -168478,6 +196717,7 @@ index 0000000..951b3be
+enable_so_prod_xfs_alloc_arg_37897 prod xfs_alloc_arg 0 37897 NULL
+enable_so_calc_send_wqe_fndecl_37899 calc_send_wqe fndecl 0 37899 NULL nohasharray
+enable_so_logi_dj_hidpp_event_fndecl_37899 logi_dj_hidpp_event fndecl 4 37899 &enable_so_calc_send_wqe_fndecl_37899
++enable_so_vc4_get_cache_list_for_size_fndecl_37902 vc4_get_cache_list_for_size fndecl 2 37902 NULL
+enable_so_datalen_user_key_payload_37906 datalen user_key_payload 0 37906 NULL
+enable_so_pasid_kfd_process_37907 pasid kfd_process 0 37907 NULL
+enable_so_pvr2_i2c_basic_op_fndecl_37917 pvr2_i2c_basic_op fndecl 4-6 37917 NULL
@@ -168609,6 +196849,7 @@ index 0000000..951b3be
+enable_so_ext4_get_block_write_fndecl_38313 ext4_get_block_write fndecl 2 38313 NULL nohasharray
+enable_so_ftid_base_tid_info_38313 ftid_base tid_info 0 38313 &enable_so_ext4_get_block_write_fndecl_38313
+enable_so_nr_siblings_perf_event_38320 nr_siblings perf_event 0 38320 NULL
++enable_so_shader_rec_count_drm_vc4_submit_cl_38324 shader_rec_count drm_vc4_submit_cl 0 38324 NULL
+enable_so_ob_max_size_mvumi_hba_38327 ob_max_size mvumi_hba 0 38327 NULL
+enable_so_radeon_kms_compat_ioctl_fndecl_38328 radeon_kms_compat_ioctl fndecl 2 38328 NULL
+enable_so_xfs_vn_fiemap_fndecl_38336 xfs_vn_fiemap fndecl 3-4 38336 NULL
@@ -168723,7 +196964,8 @@ index 0000000..951b3be
+enable_so_level_kvm_shadow_walk_iterator_38631 level kvm_shadow_walk_iterator 0 38631 NULL
+enable_so_next_burst_len_iscsi_datain_req_38632 next_burst_len iscsi_datain_req 0 38632 NULL nohasharray
+enable_so_iscsi_if_send_reply_fndecl_38632 iscsi_if_send_reply fndecl 7 38632 &enable_so_next_burst_len_iscsi_datain_req_38632
-+enable_so_vmci_qp_broker_alloc_fndecl_38635 vmci_qp_broker_alloc fndecl 5-6 38635 NULL
++enable_so_vmci_qp_broker_alloc_fndecl_38635 vmci_qp_broker_alloc fndecl 5-6 38635 NULL nohasharray
++enable_so_data_offset_vb2_plane_38635 data_offset vb2_plane 0 38635 &enable_so_vmci_qp_broker_alloc_fndecl_38635
+enable_so_size_bucket_table_38640 size bucket_table 0 38640 NULL
+enable_so_f2fs_seek_block_fndecl_38641 f2fs_seek_block fndecl 2 38641 NULL
+enable_so_uart_offset_pciserial_board_38647 uart_offset pciserial_board 0 38647 NULL nohasharray
@@ -169125,6 +197367,7 @@ index 0000000..951b3be
+enable_so_delta_disks_mddev_39759 delta_disks mddev 0 39759 NULL
+enable_so_free_full_branch_fndecl_39768 free_full_branch fndecl 2 39768 NULL nohasharray
+enable_so_map_swap_page_fndecl_39768 map_swap_page fndecl 0 39768 &enable_so_free_full_branch_fndecl_39768
++enable_so_phy_get_sset_count_fndecl_39774 phy_get_sset_count fndecl 0 39774 NULL
+enable_so_write_flush_fndecl_39776 write_flush fndecl 3 39776 NULL
+enable_so_add_range_with_merge_fndecl_39778 add_range_with_merge fndecl 5-4 39778 NULL
+enable_so___collapse_huge_page_isolate_fndecl_39784 __collapse_huge_page_isolate fndecl 2 39784 NULL
@@ -169444,6 +197687,7 @@ index 0000000..951b3be
+enable_so_multi_write_idx_wmi_40801 multi_write_idx wmi 0 40801 NULL nohasharray
+enable_so_cmd_len_request_40801 cmd_len request 0 40801 &enable_so_multi_write_idx_wmi_40801 nohasharray
+enable_so_num_channels_hpb_dmae_pdata_40801 num_channels hpb_dmae_pdata 0 40801 &enable_so_cmd_len_request_40801
++enable_so_ath10k_wmi_alloc_chunk_fndecl_40804 ath10k_wmi_alloc_chunk fndecl 4-3-0 40804 NULL
+enable_so_sz_m1_mlx5_wq_ll_40805 sz_m1 mlx5_wq_ll 0 40805 NULL
+enable_so_ceph_osdc_readpages_fndecl_40814 ceph_osdc_readpages fndecl 0 40814 NULL nohasharray
+enable_so_sysctl_wmem_max_vardecl_40814 sysctl_wmem_max vardecl 0 40814 &enable_so_ceph_osdc_readpages_fndecl_40814
@@ -169575,6 +197819,7 @@ index 0000000..951b3be
+enable_so_ies_len_connect_attr_41234 ies_len connect_attr 0 41234 NULL
+enable_so_len_driver_data_41237 len driver_data 0 41237 NULL
+enable_so_opera1_usb_i2c_msgxfer_fndecl_41242 opera1_usb_i2c_msgxfer fndecl 4 41242 NULL
++enable_so_sel_write_validatetrans_fndecl_41243 sel_write_validatetrans fndecl 3 41243 NULL
+enable_so_ses_send_diag_fndecl_41244 ses_send_diag fndecl 4 41244 NULL
+enable_so_iwl_dbgfs_ucode_tracing_write_fndecl_41247 iwl_dbgfs_ucode_tracing_write fndecl 3 41247 NULL
+enable_so___apei_exec_run_fndecl_41248 __apei_exec_run fndecl 0 41248 NULL
@@ -169661,7 +197906,8 @@ index 0000000..951b3be
+enable_so_lpddr_info_query_fndecl_41492 lpddr_info_query fndecl 0 41492 NULL
+enable_so_compat_core_sys_select_fndecl_41494 compat_core_sys_select fndecl 1 41494 NULL
+enable_so_dir_entries_fat_floppy_defaults_41499 dir_entries fat_floppy_defaults 0 41499 NULL
-+enable_so_mpi_set_buffer_fndecl_41501 mpi_set_buffer fndecl 3 41501 NULL
++enable_so_mpi_set_buffer_fndecl_41501 mpi_set_buffer fndecl 3 41501 NULL nohasharray
++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
+enable_so_irda_param_insert_fndecl_41502 irda_param_insert fndecl 0 41502 NULL
+enable_so_max_shutter_mt9v032_model_data_41509 max_shutter mt9v032_model_data 0 41509 NULL
+enable_so_b_fifo_size_hfcSX_hw_41512 b_fifo_size hfcSX_hw 0 41512 NULL
@@ -169925,7 +198171,8 @@ index 0000000..951b3be
+enable_so_generic_cont_expand_simple_fndecl_42301 generic_cont_expand_simple fndecl 2 42301 NULL nohasharray
+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
+enable_so_dcache_dir_lseek_fndecl_42308 dcache_dir_lseek fndecl 2 42308 NULL nohasharray
-+enable_so_iwch_reg_user_mr_fndecl_42308 iwch_reg_user_mr fndecl 2-3 42308 &enable_so_dcache_dir_lseek_fndecl_42308
++enable_so_iwch_reg_user_mr_fndecl_42308 iwch_reg_user_mr fndecl 2-3 42308 &enable_so_dcache_dir_lseek_fndecl_42308 nohasharray
++enable_so_level_cgroup_42308 level cgroup 0 42308 &enable_so_iwch_reg_user_mr_fndecl_42308
+enable_so_rproc_alloc_fndecl_42314 rproc_alloc fndecl 5 42314 NULL
+enable_so_log_pg_sz_remote_qpn_mlx5_qp_context_42315 log_pg_sz_remote_qpn mlx5_qp_context 0 42315 NULL
+enable_so_num_rcv_contexts_hfi1_devdata_42317 num_rcv_contexts hfi1_devdata 0 42317 NULL
@@ -169955,6 +198202,7 @@ index 0000000..951b3be
+enable_so_remote_payload_max_nfc_digital_dev_42391 remote_payload_max nfc_digital_dev 0 42391 NULL
+enable_so_no_of_vpath_vxgedev_42396 no_of_vpath vxgedev 0 42396 NULL
+enable_so_module_alloc_fndecl_42397 module_alloc fndecl 1 42397 NULL
++enable_so_xen_blkif_max_queues_vardecl_xen_blkfront_c_42404 xen_blkif_max_queues vardecl_xen-blkfront.c 0 42404 NULL
+enable_so_prof_len_vardecl_profile_c_42405 prof_len vardecl_profile.c 0 42405 NULL
+enable_so_maximum_v4l2_ctrl_42407 maximum v4l2_ctrl 0 42407 NULL
+enable_so_dma_rxsize_vardecl_stmmac_main_c_42409 dma_rxsize vardecl_stmmac_main.c 0 42409 NULL
@@ -170218,6 +198466,7 @@ index 0000000..951b3be
+enable_so_prepare_elf64_ram_headers_callback_fndecl_43123 prepare_elf64_ram_headers_callback fndecl 1-2 43123 NULL
+enable_so_output_pool_snd_seq_client_pool_43126 output_pool snd_seq_client_pool 0 43126 NULL
+enable_so_fm10k_change_mtu_fndecl_43135 fm10k_change_mtu fndecl 2 43135 NULL
++enable_so_ndev_init_isr_fndecl_43138 ndev_init_isr fndecl 3 43138 NULL
+enable_so_pcf8563_read_block_data_fndecl_43139 pcf8563_read_block_data fndecl 3 43139 NULL
+enable_so_Size_aac_fibhdr_43144 Size aac_fibhdr 0 43144 NULL
+enable_so_btrfs_create_subvol_root_fndecl_43148 btrfs_create_subvol_root fndecl 4 43148 NULL
@@ -170398,6 +198647,7 @@ index 0000000..951b3be
+enable_so_drm_format_plane_cpp_fndecl_43621 drm_format_plane_cpp fndecl 0 43621 NULL nohasharray
+enable_so_chipshift_cfi_private_43621 chipshift cfi_private 0 43621 &enable_so_drm_format_plane_cpp_fndecl_43621
+enable_so_btusb_recv_isoc_fndecl_43628 btusb_recv_isoc fndecl 3 43628 NULL
++enable_so_count_phm_ppt_v1_clock_voltage_dependency_table_43634 count phm_ppt_v1_clock_voltage_dependency_table 0 43634 NULL
+enable_so_drm_gtf2_k_fndecl_43638 drm_gtf2_k fndecl 0 43638 NULL nohasharray
+enable_so_technisat_usb2_eeprom_lrc_read_fndecl_43638 technisat_usb2_eeprom_lrc_read fndecl 4 43638 &enable_so_drm_gtf2_k_fndecl_43638
+enable_so_sdricoh_mmc_cmd_fndecl_43641 sdricoh_mmc_cmd fndecl 0 43641 NULL
@@ -170459,7 +198709,8 @@ index 0000000..951b3be
+enable_so_initrd_start_vardecl_43848 initrd_start vardecl 0 43848 NULL nohasharray
+enable_so_parport_ieee1284_ecp_write_data_fndecl_43848 parport_ieee1284_ecp_write_data fndecl 0 43848 &enable_so_initrd_start_vardecl_43848
+enable_so_xen_set_nslabs_fndecl_43849 xen_set_nslabs fndecl 0-1 43849 NULL
-+enable_so_wlcore_scan_fndecl_43850 wlcore_scan fndecl 4 43850 NULL
++enable_so_wlcore_scan_fndecl_43850 wlcore_scan fndecl 4 43850 NULL nohasharray
++enable_so_wm_adsp_read_data_block_fndecl_43850 wm_adsp_read_data_block fndecl 0 43850 &enable_so_wlcore_scan_fndecl_43850
+enable_so_scsi_host_alloc_fndecl_43858 scsi_host_alloc fndecl 2 43858 NULL
+enable_so_indat_endpoint_keyspan_device_details_43860 indat_endpoint keyspan_device_details 0 43860 NULL
+enable_so_get_sset_count_ethtool_ops_43861 get_sset_count ethtool_ops 0 43861 NULL
@@ -170526,8 +198777,10 @@ index 0000000..951b3be
+enable_so_rx_buffer_truesize_efx_nic_44027 rx_buffer_truesize efx_nic 0 44027 NULL
+enable_so_response_length_ib_uverbs_ex_create_qp_resp_44030 response_length ib_uverbs_ex_create_qp_resp 0 44030 NULL
+enable_so_SyS_kexec_file_load_fndecl_44032 SyS_kexec_file_load fndecl 3 44032 NULL
++enable_so_wilc_gnrl_async_info_received_fndecl_44034 wilc_gnrl_async_info_received fndecl 3 44034 NULL
+enable_so_regsize_octeon_mdiobus_44041 regsize octeon_mdiobus 0 44041 NULL
+enable_so_convert_extent_bit_fndecl_44046 convert_extent_bit fndecl 2-3 44046 NULL
++enable_so_nr_rings_xen_blkif_44058 nr_rings xen_blkif 0 44058 NULL
+enable_so_ahc_linux_map_seg_fndecl_44059 ahc_linux_map_seg fndecl 4-5 44059 NULL nohasharray
+enable_so_btrfs_submit_direct_fndecl_44059 btrfs_submit_direct fndecl 4 44059 &enable_so_ahc_linux_map_seg_fndecl_44059
+enable_so_prog_page_fndecl_44060 prog_page fndecl 2 44060 NULL
@@ -170862,6 +199115,7 @@ index 0000000..951b3be
+enable_so_tx_ring_count_e1000_adapter_45060 tx_ring_count e1000_adapter 0 45060 NULL
+enable_so_sd_sgentry_align_brcmfmac_sdio_platform_data_45061 sd_sgentry_align brcmfmac_sdio_platform_data 0 45061 NULL
+enable_so_write_buffer_size_vardecl_legousbtower_c_45062 write_buffer_size vardecl_legousbtower.c 0 45062 NULL
++enable_so_crypto_akcipher_maxsize_fndecl_45073 crypto_akcipher_maxsize fndecl 0 45073 NULL
+enable_so_read_vbt_r10_fndecl_45076 read_vbt_r10 fndecl 1 45076 NULL
+enable_so_sendpage_iscsi_sw_tcp_conn_45081 sendpage iscsi_sw_tcp_conn 0 45081 NULL
+enable_so_unmap_mapping_range_vma_fndecl_45084 unmap_mapping_range_vma fndecl 2-3 45084 NULL
@@ -171175,7 +199429,9 @@ index 0000000..951b3be
+enable_so___devcgroup_check_permission_fndecl_46082 __devcgroup_check_permission fndecl 0 46082 NULL
+enable_so_wSamplesPerFrame_uac_format_type_ii_ext_descriptor_46084 wSamplesPerFrame uac_format_type_ii_ext_descriptor 0 46084 NULL
+enable_so_alloc_dca_provider_fndecl_46085 alloc_dca_provider fndecl 2 46085 NULL
++enable_so_wilc_add_wep_key_bss_ap_fndecl_46087 wilc_add_wep_key_bss_ap fndecl 3 46087 NULL
+enable_so_dm_startblk_adfs_discmap_46088 dm_startblk adfs_discmap 0 46088 NULL
++enable_so_num_type_reg_regmap_irq_chip_46090 num_type_reg regmap_irq_chip 0 46090 NULL
+enable_so_nr_pages_splice_pipe_desc_46095 nr_pages splice_pipe_desc 0 46095 NULL
+enable_so_ubifs_setxattr_fndecl_46097 ubifs_setxattr fndecl 4 46097 NULL nohasharray
+enable_so_len_sfi_table_header_46097 len sfi_table_header 0 46097 &enable_so_ubifs_setxattr_fndecl_46097 nohasharray
@@ -171290,6 +199546,7 @@ index 0000000..951b3be
+enable_so_iblock_execute_unmap_fndecl_46444 iblock_execute_unmap fndecl 3-2 46444 &enable_so_btrfsic_process_superblock_dev_mirror_fndecl_46444
+enable_so_C_SYSC_get_mempolicy_fndecl_46447 C_SYSC_get_mempolicy fndecl 3 46447 NULL
+enable_so_fb_base_phys_mb862xxfb_par_46449 fb_base_phys mb862xxfb_par 0 46449 NULL
++enable_so_sglen_usbtest_param_32_46451 sglen usbtest_param_32 0 46451 NULL
+enable_so_untranslate_fndecl_46453 untranslate fndecl 3 46453 NULL
+enable_so_snd_seq_oss_writeq_new_fndecl_46455 snd_seq_oss_writeq_new fndecl 2 46455 NULL
+enable_so_nfsd_nrpools_fndecl_46460 nfsd_nrpools fndecl 0 46460 NULL
@@ -171532,6 +199789,7 @@ index 0000000..951b3be
+enable_so_start_block_hfsplus_extent_47172 start_block hfsplus_extent 0 47172 NULL
+enable_so_max_blk_size_mmc_host_47174 max_blk_size mmc_host 0 47174 NULL
+enable_so_value_drm_radeon_setparam_47185 value drm_radeon_setparam 0 47185 NULL
++enable_so_msr_init_context_fndecl_47188 msr_init_context fndecl 2 47188 NULL
+enable_so_msix_count_qla_hw_data_47192 msix_count qla_hw_data 0 47192 NULL
+enable_so_max_sq_sg_mlx4_caps_47193 max_sq_sg mlx4_caps 0 47193 NULL
+enable_so_block_count_msb_data_47194 block_count msb_data 0 47194 NULL
@@ -171633,11 +199891,13 @@ index 0000000..951b3be
+enable_so_mac_offset_skb_gso_cb_47491 mac_offset skb_gso_cb 0 47491 NULL
+enable_so_page_size_cas_47493 page_size cas 0 47493 NULL
+enable_so_first_block_efs_sb_info_47499 first_block efs_sb_info 0 47499 NULL
++enable_so_rss_table_size_i40e_vsi_47500 rss_table_size i40e_vsi 0 47500 NULL
+enable_so_cifs_write_from_iter_fndecl_47501 cifs_write_from_iter fndecl 1-2 47501 NULL
+enable_so_gr_ep_init_fndecl_47502 gr_ep_init fndecl 4 47502 NULL
+enable_so_try_unmap_single_bt_fndecl_47503 try_unmap_single_bt fndecl 2-3 47503 NULL
+enable_so_btrfs_cont_expand_fndecl_47505 btrfs_cont_expand fndecl 3-2 47505 NULL
-+enable_so_romfs_blk_strcmp_fndecl_47510 romfs_blk_strcmp fndecl 4-2 47510 NULL
++enable_so_romfs_blk_strcmp_fndecl_47510 romfs_blk_strcmp fndecl 4-2 47510 NULL nohasharray
++enable_so_ucNumEntries__ATOM_Tonga_MCLK_Dependency_Table_47510 ucNumEntries _ATOM_Tonga_MCLK_Dependency_Table 0 47510 &enable_so_romfs_blk_strcmp_fndecl_47510
+enable_so_setcontrast_fndecl_47513 setcontrast fndecl 0 47513 NULL
+enable_so_elf_header_exclude_ranges_fndecl_47518 elf_header_exclude_ranges fndecl 2-3 47518 NULL nohasharray
+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
@@ -171650,6 +199910,7 @@ index 0000000..951b3be
+enable_so_llcp_sock_sendmsg_fndecl_47535 llcp_sock_sendmsg fndecl 3 47535 NULL
+enable_so_bytes_nvmem_cell_47539 bytes nvmem_cell 0 47539 NULL
+enable_so_skb_headers_offset_update_fndecl_47543 skb_headers_offset_update fndecl 2 47543 NULL
++enable_so_skl_tplg_tlv_control_set_fndecl_47545 skl_tplg_tlv_control_set fndecl 3 47545 NULL
+enable_so_show_sysfs_ops_47546 show sysfs_ops 0 47546 NULL
+enable_so_relocs_num_drm_qxl_command_47550 relocs_num drm_qxl_command 0 47550 NULL
+enable_so_add_replay_bud_fndecl_47552 add_replay_bud fndecl 3 47552 NULL
@@ -171667,8 +199928,10 @@ index 0000000..951b3be
+enable_so_dir_logfs_transaction_47599 dir logfs_transaction 0 47599 NULL
+enable_so_ecryptfs_write_end_fndecl_47601 ecryptfs_write_end fndecl 5-3 47601 NULL
+enable_so_rx_page_order_iwl_trans_pcie_47605 rx_page_order iwl_trans_pcie 0 47605 NULL
++enable_so_num_codecs_snd_soc_dai_link_47607 num_codecs snd_soc_dai_link 0 47607 NULL
+enable_so_ebt_buf_count_fndecl_47612 ebt_buf_count fndecl 2 47612 NULL
+enable_so_control_1_vxge_hw_ring_rxd_1_47616 control_1 vxge_hw_ring_rxd_1 0 47616 NULL
++enable_so_nvme_fill_device_id_scsi_string_fndecl_47624 nvme_fill_device_id_scsi_string fndecl 4 47624 NULL
+enable_so_mincore_pte_range_fndecl_47625 mincore_pte_range fndecl 2 47625 NULL nohasharray
+enable_so_len_ib_ucm_req_47625 len ib_ucm_req 0 47625 &enable_so_mincore_pte_range_fndecl_47625
+enable_so_ubifs_load_znode_fndecl_47628 ubifs_load_znode fndecl 4 47628 NULL
@@ -171990,7 +200253,8 @@ index 0000000..951b3be
+enable_so_iomem_reg_shift_old_serial_port_48579 iomem_reg_shift old_serial_port 0 48579 NULL nohasharray
+enable_so_dynamic_fw_traces_read_fndecl_48579 dynamic_fw_traces_read fndecl 3 48579 &enable_so_iomem_reg_shift_old_serial_port_48579
+enable_so_vce_v2_0_bo_size_fndecl_48581 vce_v2_0_bo_size fndecl 0 48581 NULL
-+enable_so_tx_ring_size_bnx2x_48584 tx_ring_size bnx2x 0 48584 NULL
++enable_so_tx_ring_size_bnx2x_48584 tx_ring_size bnx2x 0 48584 NULL nohasharray
++enable_so_max_num_vdevs_ath10k_48584 max_num_vdevs ath10k 0 48584 &enable_so_tx_ring_size_bnx2x_48584
+enable_so_rc_position_rpcrdma_read_chunk_48586 rc_position rpcrdma_read_chunk 0 48586 NULL
+enable_so_flow_label_ib_sa_path_rec_48590 flow_label ib_sa_path_rec 0 48590 NULL nohasharray
+enable_so_backup_size_vmw_resource_48590 backup_size vmw_resource 0 48590 &enable_so_flow_label_ib_sa_path_rec_48590
@@ -172146,6 +200410,7 @@ index 0000000..951b3be
+enable_so_dev_id_rfcomm_dev_req_49039 dev_id rfcomm_dev_req 0 49039 NULL
+enable_so_reg_r_fndecl_49040 reg_r fndecl 0 49040 NULL
+enable_so_dwMaxVideoFrameSize_uvc_streaming_control_49044 dwMaxVideoFrameSize uvc_streaming_control 0 49044 NULL
++enable_so_max_port_per_lag_mlxsw_config_profile_49046 max_port_per_lag mlxsw_config_profile 0 49046 NULL
+enable_so_devices_per_bus__MPT_ADAPTER_49051 devices_per_bus _MPT_ADAPTER 0 49051 NULL nohasharray
+enable_so_devno_skd_device_49051 devno skd_device 0 49051 &enable_so_devices_per_bus__MPT_ADAPTER_49051
+enable_so_cxacru_cm_fndecl_49052 cxacru_cm fndecl 4 49052 NULL
@@ -172193,6 +200458,7 @@ index 0000000..951b3be
+enable_so_guc_fw_size_intel_guc_fw_49177 guc_fw_size intel_guc_fw 0 49177 NULL
+enable_so_nilfs_sufile_do_cancel_free_fndecl_49183 nilfs_sufile_do_cancel_free fndecl 2 49183 NULL
+enable_so_s_last_ino_logfs_super_49185 s_last_ino logfs_super 0 49185 NULL
++enable_so_page_size_nvme_ctrl_49190 page_size nvme_ctrl 0 49190 NULL
+enable_so_len_fb_cmap_user_49195 len fb_cmap_user 0 49195 NULL
+enable_so_fsl_edma_prep_dma_cyclic_fndecl_49197 fsl_edma_prep_dma_cyclic fndecl 4-2-3 49197 NULL nohasharray
+enable_so_of_get_child_count_fndecl_49197 of_get_child_count fndecl 0 49197 &enable_so_fsl_edma_prep_dma_cyclic_fndecl_49197
@@ -172639,6 +200905,7 @@ index 0000000..951b3be
+enable_so_recalc_rate_clk_ops_50655 recalc_rate clk_ops 0 50655 NULL
+enable_so_io_size_tulip_chip_table_50656 io_size tulip_chip_table 0 50656 NULL
+enable_so_proc_coredump_filter_read_fndecl_50658 proc_coredump_filter_read fndecl 3 50658 NULL
++enable_so_ucNumEntries__ATOM_Tonga_SCLK_Dependency_Table_50666 ucNumEntries _ATOM_Tonga_SCLK_Dependency_Table 0 50666 NULL
+enable_so_da9150_i2c_write_device_fndecl_50670 da9150_i2c_write_device fndecl 3 50670 NULL
+enable_so_i915_gem_alloc_context_obj_fndecl_50671 i915_gem_alloc_context_obj fndecl 2 50671 NULL
+enable_so_nclips_bttv_overlay_50673 nclips bttv_overlay 0 50673 NULL
@@ -172728,6 +200995,7 @@ index 0000000..951b3be
+enable_so_exofs_read_kern_fndecl_50914 exofs_read_kern fndecl 6 50914 NULL nohasharray
+enable_so_oom_score_adj_read_fndecl_50914 oom_score_adj_read fndecl 3 50914 &enable_so_exofs_read_kern_fndecl_50914
+enable_so_vnet_hdr_sz_tun_struct_50916 vnet_hdr_sz tun_struct 0 50916 NULL
++enable_so_raid1_sync_request_fndecl_50917 raid1_sync_request fndecl 2 50917 NULL
+enable_so_num_chunks_drm_radeon_cs_50925 num_chunks drm_radeon_cs 0 50925 NULL nohasharray
+enable_so_first_minor_gendisk_50925 first_minor gendisk 0 50925 &enable_so_num_chunks_drm_radeon_cs_50925
+enable_so___spi_async_fndecl_50927 __spi_async fndecl 0 50927 NULL
@@ -172741,10 +201009,12 @@ index 0000000..951b3be
+enable_so_wil_rx_init_fndecl_50939 wil_rx_init fndecl 2 50939 NULL
+enable_so_ubi_start_update_fndecl_50948 ubi_start_update fndecl 3 50948 NULL
+enable_so_sync_key_len_pvr2_ioread_50952 sync_key_len pvr2_ioread 0 50952 NULL
-+enable_so_iser_prepare_write_cmd_fndecl_50953 iser_prepare_write_cmd fndecl 2-3 50953 NULL
++enable_so_iser_prepare_write_cmd_fndecl_50953 iser_prepare_write_cmd fndecl 2-3 50953 NULL nohasharray
++enable_so_brcmf_p2p_escan_fndecl_50953 brcmf_p2p_escan fndecl 2 50953 &enable_so_iser_prepare_write_cmd_fndecl_50953
+enable_so_reg_list_size_radeon_rlc_50955 reg_list_size radeon_rlc 0 50955 NULL
+enable_so_alloc_agpphysmem_i8xx_fndecl_50960 alloc_agpphysmem_i8xx fndecl 1 50960 NULL
+enable_so_nsegments_dsp_module_desc_50965 nsegments dsp_module_desc 0 50965 NULL
++enable_so_memdup_user_nul_fndecl_50968 memdup_user_nul fndecl 2 50968 NULL
+enable_so_gamma_sd_gl860_50970 gamma sd_gl860 0 50970 NULL
+enable_so_sdma_get_descq_cnt_fndecl_50975 sdma_get_descq_cnt fndecl 0 50975 NULL
+enable_so_irq_ssb_device_50977 irq ssb_device 0 50977 NULL nohasharray
@@ -172821,6 +201091,7 @@ index 0000000..951b3be
+enable_so_cirrus_ttm_tt_create_fndecl_51204 cirrus_ttm_tt_create fndecl 2 51204 NULL
+enable_so_vcc_recvmsg_fndecl_51205 vcc_recvmsg fndecl 3 51205 NULL
+enable_so_kvm_clear_guest_fndecl_51207 kvm_clear_guest fndecl 2-3 51207 NULL
++enable_so_goodix_i2c_write_fndecl_51209 goodix_i2c_write fndecl 4 51209 NULL
+enable_so_phys_vram_area_51217 phys vram_area 0 51217 NULL
+enable_so_mt9v032_calc_ratio_fndecl_51219 mt9v032_calc_ratio fndecl 0 51219 NULL
+enable_so_vsi_oltext_vxfs_sb_info_51222 vsi_oltext vxfs_sb_info 0 51222 NULL
@@ -172849,6 +201120,7 @@ index 0000000..951b3be
+enable_so_mthca_alloc_icm_table_fndecl_51311 mthca_alloc_icm_table fndecl 3-4 51311 NULL
+enable_so__ipw_read_reg32_fndecl_51318 _ipw_read_reg32 fndecl 0 51318 NULL
+enable_so_drv_sds_rings_qlcnic_adapter_51319 drv_sds_rings qlcnic_adapter 0 51319 NULL
++enable_so_dvb_register_device_fndecl_51331 dvb_register_device fndecl 6 51331 NULL
+enable_so_size_bts_phys_51332 size bts_phys 0 51332 NULL
+enable_so_sync_dma_snd_usb_endpoint_51333 sync_dma snd_usb_endpoint 0 51333 NULL
+enable_so_counter_vardecl_inode_c_51334 counter vardecl_inode.c 0 51334 NULL
@@ -172936,7 +201208,8 @@ index 0000000..951b3be
+enable_so_klsi_105_prepare_write_buffer_fndecl_51599 klsi_105_prepare_write_buffer fndecl 3 51599 NULL nohasharray
+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
+enable_so_ep_count_bytes_remain_fndecl_51599 ep_count_bytes_remain fndecl 0 51599 &enable_so_af9013_wr_regs_i2c_fndecl_51599
-+enable_so_receive_mergeable_fndecl_51601 receive_mergeable fndecl 5-4 51601 NULL
++enable_so_receive_mergeable_fndecl_51601 receive_mergeable fndecl 5-4 51601 NULL nohasharray
++enable_so_wilc_add_beacon_fndecl_51601 wilc_add_beacon fndecl 6-4 51601 &enable_so_receive_mergeable_fndecl_51601
+enable_so_va_for_temp_scif_window_51603 va_for_temp scif_window 0 51603 NULL
+enable_so_data_transfer_length_vmscsi_request_51616 data_transfer_length vmscsi_request 0 51616 NULL nohasharray
+enable_so_cur_vfio_pci_fill_info_51616 cur vfio_pci_fill_info 0 51616 &enable_so_data_transfer_length_vmscsi_request_51616
@@ -173446,7 +201719,8 @@ index 0000000..951b3be
+enable_so_h_vlan_TCI_vlan_ethhdr_53095 h_vlan_TCI vlan_ethhdr 0 53095 NULL
+enable_so_packet_create_fndecl_53098 packet_create fndecl 3 53098 NULL nohasharray
+enable_so_size_fuse_attr_53098 size fuse_attr 0 53098 &enable_so_packet_create_fndecl_53098
-+enable_so_s_blocksize_minix3_super_block_53099 s_blocksize minix3_super_block 0 53099 NULL
++enable_so_s_blocksize_minix3_super_block_53099 s_blocksize minix3_super_block 0 53099 NULL nohasharray
++enable_so_wilc_spi_read_fndecl_53099 wilc_spi_read fndecl 4 53099 &enable_so_s_blocksize_minix3_super_block_53099
+enable_so_brcmf_fw_nvram_strip_fndecl_53102 brcmf_fw_nvram_strip fndecl 2 53102 NULL
+enable_so_prepare_header80_fndecl_53108 prepare_header80 fndecl 3-0 53108 NULL nohasharray
+enable_so_rx_nr_rings_bnxt_53108 rx_nr_rings bnxt 0 53108 &enable_so_prepare_header80_fndecl_53108
@@ -173754,6 +202028,7 @@ index 0000000..951b3be
+enable_so_c_srate_f_uac2_opts_53962 c_srate f_uac2_opts 0 53962 &enable_so_vmw_sou_backing_alloc_fndecl_53962
+enable_so_recover_orphan_inode_fndecl_53969 recover_orphan_inode fndecl 2 53969 NULL nohasharray
+enable_so_proc_fault_inject_read_fndecl_53969 proc_fault_inject_read fndecl 3 53969 &enable_so_recover_orphan_inode_fndecl_53969
++enable_so_dests_size_fs_fte_53973 dests_size fs_fte 0 53973 NULL
+enable_so_dib9000_fw_boot_fndecl_53978 dib9000_fw_boot fndecl 3-5 53978 NULL
+enable_so_rx_buf_sz_cp_private_53982 rx_buf_sz cp_private 0 53982 NULL
+enable_so_assoc_resp_len_wmi_connect_event_53983 assoc_resp_len wmi_connect_event 0 53983 NULL
@@ -173999,6 +202274,7 @@ index 0000000..951b3be
+enable_so_target_freq_mt9p031_platform_data_54660 target_freq mt9p031_platform_data 0 54660 NULL nohasharray
+enable_so_truncate_pagecache_fndecl_54660 truncate_pagecache fndecl 2 54660 &enable_so_target_freq_mt9p031_platform_data_54660 nohasharray
+enable_so_reshape_position_mddev_54660 reshape_position mddev 0 54660 &enable_so_truncate_pagecache_fndecl_54660
++enable_so_get_vddc_lookup_table_fndecl_54661 get_vddc_lookup_table fndecl 4 54661 NULL
+enable_so_s_session_udf_sb_info_54662 s_session udf_sb_info 0 54662 NULL
+enable_so_qed_cxt_set_proto_cid_count_fndecl_54663 qed_cxt_set_proto_cid_count fndecl 3 54663 NULL
+enable_so_ssid_len_hostap_bss_info_54670 ssid_len hostap_bss_info 0 54670 NULL
@@ -174492,6 +202768,7 @@ index 0000000..951b3be
+enable_so_dt_gpio_count_fndecl_56245 dt_gpio_count fndecl 0 56245 &enable_so_cfpkt_peek_head_fndecl_56245
+enable_so_qtd_fill_fndecl_56249 qtd_fill fndecl 5-6-3-0-4 56249 NULL
+enable_so_size_uvc_xu_control_query_56263 size uvc_xu_control_query 0 56263 NULL
++enable_so_size_udata_s_56266 size udata_s 0 56266 NULL
+enable_so_dmreq_start_crypt_config_56268 dmreq_start crypt_config 0 56268 NULL
+enable_so_qp_alloc_res_fndecl_56275 qp_alloc_res fndecl 5 56275 NULL
+enable_so_vyres_crtc_56276 vyres crtc 0 56276 NULL
@@ -174619,6 +202896,7 @@ index 0000000..951b3be
+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
+enable_so_usb_err_gspca_dev_56706 usb_err gspca_dev 0 56706 NULL
+enable_so_mmc_erase_fndecl_56707 mmc_erase fndecl 0 56707 NULL
++enable_so_mlx5_modify_nic_vport_mac_list_fndecl_56715 mlx5_modify_nic_vport_mac_list fndecl 4 56715 NULL
+enable_so_zlib_inflate_workspacesize_fndecl_56716 zlib_inflate_workspacesize fndecl 0 56716 NULL
+enable_so_qgroupid_btrfs_ioctl_qgroup_create_args_56717 qgroupid btrfs_ioctl_qgroup_create_args 0 56717 NULL
+enable_so_munlock_vma_pages_range_fndecl_56718 munlock_vma_pages_range fndecl 2 56718 NULL
@@ -174659,6 +202937,7 @@ index 0000000..951b3be
+enable_so_sc_max_requests_svcxprt_rdma_56840 sc_max_requests svcxprt_rdma 0 56840 NULL
+enable_so_tail_TxFifo_56844 tail TxFifo 0 56844 NULL
+enable_so_capacity_alauda_media_info_56845 capacity alauda_media_info 0 56845 NULL
++enable_so_unit_size_wlan_host_mem_req_56846 unit_size wlan_host_mem_req 0 56846 NULL
+enable_so_tomoyo_read_self_fndecl_56848 tomoyo_read_self fndecl 3 56848 NULL
+enable_so_blocks_mmc_test_area_56853 blocks mmc_test_area 0 56853 NULL
+enable_so_transfer_one_spi_master_56858 transfer_one spi_master 0 56858 NULL
@@ -174755,6 +203034,7 @@ index 0000000..951b3be
+enable_so_part_shift_vardecl_loop_c_57103 part_shift vardecl_loop.c 0 57103 NULL nohasharray
+enable_so_mcs7830_get_reg_fndecl_57103 mcs7830_get_reg fndecl 3 57103 &enable_so_part_shift_vardecl_loop_c_57103
+enable_so_sync_pt_create_fndecl_57105 sync_pt_create fndecl 2 57105 NULL
++enable_so_wm_adsp_buffer_size_fndecl_57116 wm_adsp_buffer_size fndecl 0 57116 NULL
+enable_so_total_sections_f2fs_sb_info_57118 total_sections f2fs_sb_info 0 57118 NULL
+enable_so_size_nvif_notify_57130 size nvif_notify 0 57130 NULL
+enable_so_gsm_mux_rx_netchar_fndecl_57131 gsm_mux_rx_netchar fndecl 3 57131 NULL
@@ -174781,7 +203061,8 @@ index 0000000..951b3be
+enable_so_num_vfs_mlx4_dev_persistent_57187 num_vfs mlx4_dev_persistent 0 57187 NULL
+enable_so_h_datalen_logfs_journal_header_57189 h_datalen logfs_journal_header 0 57189 NULL nohasharray
+enable_so_z1_zt_57189 z1 zt 0 57189 &enable_so_h_datalen_logfs_journal_header_57189
-+enable_so_cfs_trace_copyin_string_fndecl_57191 cfs_trace_copyin_string fndecl 4 57191 NULL
++enable_so_cfs_trace_copyin_string_fndecl_57191 cfs_trace_copyin_string fndecl 4 57191 NULL nohasharray
++enable_so_max_lag_mlxsw_config_profile_57191 max_lag mlxsw_config_profile 0 57191 &enable_so_cfs_trace_copyin_string_fndecl_57191
+enable_so_OutputCount_smb2_ioctl_rsp_57198 OutputCount smb2_ioctl_rsp 0 57198 NULL
+enable_so_sector_dm_crypt_io_57208 sector dm_crypt_io 0 57208 NULL
+enable_so_frag_max_size_inet6_skb_parm_57210 frag_max_size inet6_skb_parm 0 57210 NULL
@@ -175032,6 +203313,7 @@ index 0000000..951b3be
+enable_so_mei_cl_alloc_cb_fndecl_57971 mei_cl_alloc_cb fndecl 2 57971 NULL
+enable_so_sel_write_enforce_fndecl_57973 sel_write_enforce fndecl 3 57973 NULL
+enable_so_rds_rm_size_fndecl_57975 rds_rm_size fndecl 0-2 57975 NULL
++enable_so_input_count_cgs_acpi_method_info_57981 input_count cgs_acpi_method_info 0 57981 NULL
+enable_so_hpfs_map_anode_fndecl_57993 hpfs_map_anode fndecl 2 57993 NULL
+enable_so_faultin_page_fndecl_57994 faultin_page fndecl 3 57994 NULL
+enable_so_perf_sample_ustack_size_fndecl_57995 perf_sample_ustack_size fndecl 0-2-1 57995 NULL
@@ -175049,8 +203331,10 @@ index 0000000..951b3be
+enable_so_rindex_sc18is602_58043 rindex sc18is602 0 58043 NULL nohasharray
+enable_so_rtw_check_beacon_data23a_fndecl_58043 rtw_check_beacon_data23a fndecl 3 58043 &enable_so_rindex_sc18is602_58043
+enable_so_len_mic_vring_58048 len mic_vring 0 58048 NULL nohasharray
-+enable_so_num_sqsets_csio_hw_58048 num_sqsets csio_hw 0 58048 &enable_so_len_mic_vring_58048
++enable_so_num_sqsets_csio_hw_58048 num_sqsets csio_hw 0 58048 &enable_so_len_mic_vring_58048 nohasharray
++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
+enable_so_acpi_gbl_integer_byte_width_vardecl_58054 acpi_gbl_integer_byte_width vardecl 0 58054 NULL
++enable_so_num_pairs_nvm_id_lp_mlc_58055 num_pairs nvm_id_lp_mlc 0 58055 NULL
+enable_so_cylinders_mspro_devinfo_58057 cylinders mspro_devinfo 0 58057 NULL
+enable_so_offset_m48t59_plat_data_58063 offset m48t59_plat_data 0 58063 NULL nohasharray
+enable_so_buffer_size_octeon_droq_58063 buffer_size octeon_droq 0 58063 &enable_so_offset_m48t59_plat_data_58063 nohasharray
@@ -175249,7 +203533,8 @@ index 0000000..951b3be
+enable_so_thermal_tx_resume_read_fndecl_58616 thermal_tx_resume_read fndecl 3 58616 &enable_so_rd_count_ring_descr_hw_58616
+enable_so_mousedev_read_fndecl_58624 mousedev_read fndecl 3 58624 NULL
+enable_so_wusb_key_dump_fndecl_58627 wusb_key_dump fndecl 2 58627 NULL nohasharray
-+enable_so___erst_write_to_storage_fndecl_58627 __erst_write_to_storage fndecl 1 58627 &enable_so_wusb_key_dump_fndecl_58627
++enable_so___erst_write_to_storage_fndecl_58627 __erst_write_to_storage fndecl 1 58627 &enable_so_wusb_key_dump_fndecl_58627 nohasharray
++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
+enable_so_dccps_gss_dccp_sock_58634 dccps_gss dccp_sock 0 58634 NULL
+enable_so_layout_mdu_array_info_s_58636 layout mdu_array_info_s 0 58636 NULL nohasharray
+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
@@ -175677,6 +203962,7 @@ index 0000000..951b3be
+enable_so_src_offset_btrfs_ioctl_clone_range_args_59876 src_offset btrfs_ioctl_clone_range_args 0 59876 NULL
+enable_so_ide_scan_pio_blacklist_fndecl_59877 ide_scan_pio_blacklist fndecl 0 59877 NULL
+enable_so_dx_fb_fillrect_59878 dx fb_fillrect 0 59878 NULL
++enable_so_max_ars_out_nd_cmd_ars_cap_59879 max_ars_out nd_cmd_ars_cap 0 59879 NULL
+enable_so___hwahc_dev_set_key_fndecl_59883 __hwahc_dev_set_key fndecl 5 59883 NULL
+enable_so_vfs_allocated_count_igb_adapter_59900 vfs_allocated_count igb_adapter 0 59900 NULL
+enable_so_mos7720_write_fndecl_59901 mos7720_write fndecl 4 59901 NULL nohasharray
@@ -175786,7 +204072,8 @@ index 0000000..951b3be
+enable_so_l2cap_create_le_flowctl_pdu_fndecl_60233 l2cap_create_le_flowctl_pdu fndecl 3 60233 NULL
+enable_so_dlfb_alloc_urb_list_fndecl_60234 dlfb_alloc_urb_list fndecl 3 60234 NULL
+enable_so_bttv_crop_adjust_fndecl_60236 bttv_crop_adjust fndecl 4-3 60236 NULL nohasharray
-+enable_so_irnet_connect_indication_fndecl_60236 irnet_connect_indication fndecl 5 60236 &enable_so_bttv_crop_adjust_fndecl_60236
++enable_so_irnet_connect_indication_fndecl_60236 irnet_connect_indication fndecl 5 60236 &enable_so_bttv_crop_adjust_fndecl_60236 nohasharray
++enable_so_bo_count_vc4_exec_info_60236 bo_count vc4_exec_info 0 60236 &enable_so_irnet_connect_indication_fndecl_60236
+enable_so_mwifiex_usb_host_to_card_fndecl_60239 mwifiex_usb_host_to_card fndecl 2 60239 NULL
+enable_so_frag_len_pau_fpdu_frag_60242 frag_len pau_fpdu_frag 0 60242 NULL
+enable_so_max_pages_per_fmr_ib_fmr_pool_param_60248 max_pages_per_fmr ib_fmr_pool_param 0 60248 NULL
@@ -176158,6 +204445,7 @@ index 0000000..951b3be
+enable_so_total_size_iscsi_segment_61454 total_size iscsi_segment 0 61454 NULL
+enable_so_ocfs2_zero_range_for_truncate_fndecl_61461 ocfs2_zero_range_for_truncate fndecl 3-4 61461 NULL nohasharray
+enable_so_next_interface_id_usb_configuration_61461 next_interface_id usb_configuration 0 61461 &enable_so_ocfs2_zero_range_for_truncate_fndecl_61461
++enable_so_ucNumEntries__ATOM_Tonga_MM_Dependency_Table_61467 ucNumEntries _ATOM_Tonga_MM_Dependency_Table 0 61467 NULL
+enable_so_ath6kl_keepalive_read_fndecl_61468 ath6kl_keepalive_read fndecl 3 61468 NULL
+enable_so_irlan_client_ctrl_connect_confirm_fndecl_61475 irlan_client_ctrl_connect_confirm fndecl 5 61475 NULL
+enable_so_ubi_eba_write_leb_st_fndecl_61476 ubi_eba_write_leb_st fndecl 5 61476 NULL
@@ -176323,6 +204611,7 @@ index 0000000..951b3be
+enable_so_s_maxbytes_super_block_61963 s_maxbytes super_block 0 61963 NULL
+enable_so_periods_min_snd_pcm_hardware_61965 periods_min snd_pcm_hardware 0 61965 NULL
+enable_so_radeon_audio_calc_cts_fndecl_61966 radeon_audio_calc_cts fndecl 1-4 61966 NULL
++enable_so_wm_adsp_compr_read_fndecl_61972 wm_adsp_compr_read fndecl 3 61972 NULL
+enable_so_nfs_set_pgio_error_fndecl_61975 nfs_set_pgio_error fndecl 3 61975 NULL
+enable_so_physical_for_dev_replace_scrub_page_61977 physical_for_dev_replace scrub_page 0 61977 NULL
+enable_so_qla4xxx_alloc_work_fndecl_61982 qla4xxx_alloc_work fndecl 2 61982 NULL
@@ -176382,7 +204671,8 @@ index 0000000..951b3be
+enable_so___process_deleted_xattr_fndecl_62133 __process_deleted_xattr fndecl 4 62133 NULL
+enable_so_hfs_cat_create_fndecl_62139 hfs_cat_create fndecl 1 62139 NULL
+enable_so_next_setup_data_62142 next setup_data 0 62142 NULL
-+enable_so_drbd_recv_all_warn_fndecl_62144 drbd_recv_all_warn fndecl 3 62144 NULL
++enable_so_drbd_recv_all_warn_fndecl_62144 drbd_recv_all_warn fndecl 3 62144 NULL nohasharray
++enable_so_free_space_bitmap_size_fndecl_62144 free_space_bitmap_size fndecl 0 62144 &enable_so_drbd_recv_all_warn_fndecl_62144
+enable_so_cciss_tape_cmds_vardecl_cciss_c_62147 cciss_tape_cmds vardecl_cciss.c 0 62147 NULL
+enable_so_tcp_trim_head_fndecl_62157 tcp_trim_head fndecl 3 62157 NULL
+enable_so_ptrace_writedata_fndecl_62158 ptrace_writedata fndecl 4-3 62158 NULL
@@ -176417,6 +204707,7 @@ index 0000000..951b3be
+enable_so_omfs_scan_list_fndecl_62289 omfs_scan_list fndecl 2 62289 NULL
+enable_so___kvm_read_guest_page_fndecl_62291 __kvm_read_guest_page fndecl 2-5 62291 NULL
+enable_so_num_arq_entries_i40e_adminq_info_62293 num_arq_entries i40e_adminq_info 0 62293 NULL
++enable_so_num_chunks_icp_qat_suof_filehdr_62296 num_chunks icp_qat_suof_filehdr 0 62296 NULL
+enable_so_max_io_mvumi_hba_62301 max_io mvumi_hba 0 62301 NULL
+enable_so_ceph_llseek_fndecl_62305 ceph_llseek fndecl 2 62305 NULL
+enable_so_sb_rbmblocks_xfs_sb_62307 sb_rbmblocks xfs_sb 0 62307 NULL
@@ -176806,6 +205097,7 @@ index 0000000..951b3be
+enable_so_vb2_create_framevec_fndecl_63451 vb2_create_framevec fndecl 1-2 63451 NULL
+enable_so_cmd_status_netdev_desc_63452 cmd_status netdev_desc 0 63452 NULL
+enable_so_fuse_send_read_fndecl_63454 fuse_send_read fndecl 4 63454 NULL
++enable_so_bo_count_drm_vc4_get_hang_state_63455 bo_count drm_vc4_get_hang_state 0 63455 NULL
+enable_so_sysv_raw_inode_fndecl_63458 sysv_raw_inode fndecl 2 63458 NULL
+enable_so_c_width_g2d_frame_63459 c_width g2d_frame 0 63459 NULL
+enable_so_btrfs_drop_extent_cache_fndecl_63461 btrfs_drop_extent_cache fndecl 3-2 63461 NULL
@@ -176816,7 +205108,8 @@ index 0000000..951b3be
+enable_so_srq_lmt_max_sge_ocrdma_query_srq_rsp_63477 srq_lmt_max_sge ocrdma_query_srq_rsp 0 63477 NULL
+enable_so___bm_find_next_fndecl_63479 __bm_find_next fndecl 0-2 63479 NULL
+enable_so_mlx5_ib_read_user_wqe_fndecl_63480 mlx5_ib_read_user_wqe fndecl 3-5 63480 NULL nohasharray
-+enable_so_sctp_setsockopt_active_key_fndecl_63480 sctp_setsockopt_active_key fndecl 3 63480 &enable_so_mlx5_ib_read_user_wqe_fndecl_63480
++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
++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
+enable_so_gigaset_initcs_fndecl_63482 gigaset_initcs fndecl 2 63482 NULL nohasharray
+enable_so_length_dw_amdgpu_cs_chunk_63482 length_dw amdgpu_cs_chunk 0 63482 &enable_so_gigaset_initcs_fndecl_63482
+enable_so_width_v4l2_pix_format_63491 width v4l2_pix_format 0 63491 NULL
@@ -176967,6 +205260,7 @@ index 0000000..951b3be
+enable_so_start_btrfs_ioctl_defrag_range_args_63924 start btrfs_ioctl_defrag_range_args 0 63924 NULL
+enable_so_efx_change_mtu_fndecl_63926 efx_change_mtu fndecl 2 63926 NULL
+enable_so_cqm_max_rmid_vardecl_perf_event_intel_cqm_c_63930 cqm_max_rmid vardecl_perf_event_intel_cqm.c 0 63930 NULL
++enable_so_component_match_realloc_fndecl_63932 component_match_realloc fndecl 3 63932 NULL
+enable_so_dentry_needs_remove_privs_fndecl_63934 dentry_needs_remove_privs fndecl 0 63934 NULL
+enable_so_ro_maxpages_rpcrdma_memreg_ops_63937 ro_maxpages rpcrdma_memreg_ops 0 63937 NULL nohasharray
+enable_so_filemark_cnt_osst_tape_63937 filemark_cnt osst_tape 0 63937 &enable_so_ro_maxpages_rpcrdma_memreg_ops_63937
@@ -177479,6 +205773,7 @@ index 0000000..951b3be
+enable_so_data_in_size_mpt3_ioctl_command_65434 data_in_size mpt3_ioctl_command 0 65434 NULL
+enable_so_a2mp_send_fndecl_65436 a2mp_send fndecl 4 65436 NULL
+enable_so_lbs_bcnmiss_write_fndecl_65438 lbs_bcnmiss_write fndecl 3 65438 NULL
++enable_so_spi_cmd_complete_fndecl_65442 spi_cmd_complete fndecl 5 65442 NULL
+enable_so_rx_rx_pre_complt_read_fndecl_65446 rx_rx_pre_complt_read fndecl 3 65446 NULL
+enable_so_carm_handle_generic_fndecl_65450 carm_handle_generic fndecl 3 65450 NULL
+enable_so_squashfs_cache_init_fndecl_65451 squashfs_cache_init fndecl 3-2 65451 NULL
@@ -182349,7 +210644,7 @@ index 0a578fe..b81f62d 100644
})
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
-index fefbf2d..7b0dc7f 100644
+index 2984737..c142f22 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -90,12 +90,17 @@ LIST_HEAD(vm_list);
@@ -182372,7 +210667,7 @@ index fefbf2d..7b0dc7f 100644
struct dentry *kvm_debugfs_dir;
EXPORT_SYMBOL_GPL(kvm_debugfs_dir);
-@@ -843,7 +848,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
+@@ -833,7 +838,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
/* We can read the guest memory with __xxx_user() later on. */
if ((id < KVM_USER_MEM_SLOTS) &&
((mem->userspace_addr & (PAGE_SIZE - 1)) ||
@@ -182381,7 +210676,7 @@ index fefbf2d..7b0dc7f 100644
(void __user *)(unsigned long)mem->userspace_addr,
mem->memory_size)))
goto out;
-@@ -1898,9 +1903,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached);
+@@ -1889,9 +1894,17 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached);
int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len)
{
@@ -182401,7 +210696,7 @@ index fefbf2d..7b0dc7f 100644
}
EXPORT_SYMBOL_GPL(kvm_clear_guest_page);
-@@ -2237,7 +2250,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
+@@ -2228,7 +2241,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
return 0;
}
@@ -182410,7 +210705,7 @@ index fefbf2d..7b0dc7f 100644
.release = kvm_vcpu_release,
.unlocked_ioctl = kvm_vcpu_ioctl,
#ifdef CONFIG_KVM_COMPAT
-@@ -2953,7 +2966,7 @@ out:
+@@ -2942,7 +2955,7 @@ out:
}
#endif
@@ -182419,7 +210714,7 @@ index fefbf2d..7b0dc7f 100644
.release = kvm_vm_release,
.unlocked_ioctl = kvm_vm_ioctl,
#ifdef CONFIG_KVM_COMPAT
-@@ -3024,7 +3037,7 @@ out:
+@@ -3013,7 +3026,7 @@ out:
return r;
}
@@ -182428,7 +210723,7 @@ index fefbf2d..7b0dc7f 100644
.unlocked_ioctl = kvm_dev_ioctl,
.compat_ioctl = kvm_dev_ioctl,
.llseek = noop_llseek,
-@@ -3050,7 +3063,7 @@ static void hardware_enable_nolock(void *junk)
+@@ -3039,7 +3052,7 @@ static void hardware_enable_nolock(void *junk)
if (r) {
cpumask_clear_cpu(cpu, cpus_hardware_enabled);
@@ -182437,7 +210732,7 @@ index fefbf2d..7b0dc7f 100644
pr_info("kvm: enabling virtualization on CPU%d failed\n", cpu);
}
}
-@@ -3105,10 +3118,10 @@ static int hardware_enable_all(void)
+@@ -3094,10 +3107,10 @@ static int hardware_enable_all(void)
kvm_usage_count++;
if (kvm_usage_count == 1) {
@@ -182450,7 +210745,7 @@ index fefbf2d..7b0dc7f 100644
hardware_disable_all_nolock();
r = -EBUSY;
}
-@@ -3572,7 +3585,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
+@@ -3551,7 +3564,7 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
if (!vcpu_align)
vcpu_align = __alignof__(struct kvm_vcpu);
kvm_vcpu_cache = kmem_cache_create("kvm_vcpu", vcpu_size, vcpu_align,
@@ -182459,7 +210754,7 @@ index fefbf2d..7b0dc7f 100644
if (!kvm_vcpu_cache) {
r = -ENOMEM;
goto out_free_3;
-@@ -3582,9 +3595,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
+@@ -3561,9 +3574,11 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
if (r)
goto out_free;
@@ -182471,7 +210766,7 @@ index fefbf2d..7b0dc7f 100644
r = misc_register(&kvm_dev);
if (r) {
-@@ -3594,9 +3609,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
+@@ -3573,9 +3588,6 @@ int kvm_init(void *opaque, unsigned vcpu_size, unsigned vcpu_align,
register_syscore_ops(&kvm_syscore_ops);
diff --git a/4.4.8/4425_grsec_remove_EI_PAX.patch b/4.5.2/4425_grsec_remove_EI_PAX.patch
index 2a1aa6c..2a1aa6c 100644
--- a/4.4.8/4425_grsec_remove_EI_PAX.patch
+++ b/4.5.2/4425_grsec_remove_EI_PAX.patch
diff --git a/4.5.2/4427_force_XATTR_PAX_tmpfs.patch b/4.5.2/4427_force_XATTR_PAX_tmpfs.patch
new file mode 100644
index 0000000..6db8e37
--- /dev/null
+++ b/4.5.2/4427_force_XATTR_PAX_tmpfs.patch
@@ -0,0 +1,57 @@
+From: Anthony G. Basile <blueness@gentoo.org>
+
+For users that emerge without XATTR_PAX support enabled, we still want user.pax.flags
+namespace supported on tmpfs so that the PaX markings survive emerge.
+
+diff -Naur a/mm/shmem.c b/mm/shmem.c
+--- a/mm/shmem.c 2016-04-29 19:56:25.306101147 -0400
++++ b/mm/shmem.c 2016-04-29 19:59:44.126104490 -0400
+@@ -2670,24 +2670,20 @@
+ return simple_xattr_set(&info->xattrs, name, value, size, flags);
+ }
+
+-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
+ static int shmem_user_xattr_handler_set(const struct xattr_handler *handler,
+ struct dentry *dentry, const char *name,
+ const void *value, size_t size, int flags)
+ {
+ struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
+
+-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
+ if (strcmp(name, XATTR_NAME_PAX_FLAGS))
+ return -EOPNOTSUPP;
+ if (size > 8)
+ return -EINVAL;
+-#endif
+
+ name = xattr_full_name(handler, name);
+ return simple_xattr_set(&info->xattrs, name, value, size, flags);
+ }
+-#endif
+
+ static const struct xattr_handler shmem_security_xattr_handler = {
+ .prefix = XATTR_SECURITY_PREFIX,
+@@ -2701,13 +2697,11 @@
+ .set = shmem_xattr_handler_set,
+ };
+
+-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
+ static const struct xattr_handler shmem_user_xattr_handler = {
+ .prefix = XATTR_USER_PREFIX,
+ .get = shmem_xattr_handler_get,
+ .set = shmem_user_xattr_handler_set,
+ };
+-#endif
+
+ static const struct xattr_handler *shmem_xattr_handlers[] = {
+ #ifdef CONFIG_TMPFS_POSIX_ACL
+@@ -2717,9 +2711,7 @@
+ &shmem_security_xattr_handler,
+ &shmem_trusted_xattr_handler,
+
+-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
+ &shmem_user_xattr_handler,
+-#endif
+
+ NULL
+ };
diff --git a/4.4.8/4430_grsec-remove-localversion-grsec.patch b/4.5.2/4430_grsec-remove-localversion-grsec.patch
index 31cf878..31cf878 100644
--- a/4.4.8/4430_grsec-remove-localversion-grsec.patch
+++ b/4.5.2/4430_grsec-remove-localversion-grsec.patch
diff --git a/4.4.8/4435_grsec-mute-warnings.patch b/4.5.2/4435_grsec-mute-warnings.patch
index b7564e4..b7564e4 100644
--- a/4.4.8/4435_grsec-mute-warnings.patch
+++ b/4.5.2/4435_grsec-mute-warnings.patch
diff --git a/4.4.8/4440_grsec-remove-protected-paths.patch b/4.5.2/4440_grsec-remove-protected-paths.patch
index 741546d..741546d 100644
--- a/4.4.8/4440_grsec-remove-protected-paths.patch
+++ b/4.5.2/4440_grsec-remove-protected-paths.patch
diff --git a/4.4.8/4450_grsec-kconfig-default-gids.patch b/4.5.2/4450_grsec-kconfig-default-gids.patch
index 79a866b..79a866b 100644
--- a/4.4.8/4450_grsec-kconfig-default-gids.patch
+++ b/4.5.2/4450_grsec-kconfig-default-gids.patch
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
index 7248385..7248385 100644
--- a/4.4.8/4465_selinux-avc_audit-log-curr_ip.patch
+++ b/4.5.2/4465_selinux-avc_audit-log-curr_ip.patch
diff --git a/4.4.8/4470_disable-compat_vdso.patch b/4.5.2/4470_disable-compat_vdso.patch
index 742df26..4aba080 100644
--- a/4.4.8/4470_disable-compat_vdso.patch
+++ b/4.5.2/4470_disable-compat_vdso.patch
@@ -26,7 +26,7 @@ Closes bug: http://bugs.gentoo.org/show_bug.cgi?id=210138
diff -urp a/arch/x86/Kconfig b/arch/x86/Kconfig
--- a/arch/x86/Kconfig 2009-07-31 01:36:57.323857684 +0100
+++ b/arch/x86/Kconfig 2009-07-31 01:51:39.395749681 +0100
-@@ -2010,29 +2010,8 @@
+@@ -2044,29 +2044,8 @@
config COMPAT_VDSO
def_bool n
diff --git a/4.4.8/4475_emutramp_default_on.patch b/4.5.2/4475_emutramp_default_on.patch
index afd6019..afd6019 100644
--- a/4.4.8/4475_emutramp_default_on.patch
+++ b/4.5.2/4475_emutramp_default_on.patch