diff --git a/kernel/drivers/module-bbswitch/pspec.xml b/kernel/drivers/module-bbswitch/pspec.xml
index d6bf5948..91815ba2 100644
--- a/kernel/drivers/module-bbswitch/pspec.xml
+++ b/kernel/drivers/module-bbswitch/pspec.xml
@@ -11,7 +11,7 @@
Kernel module allowing to switch dedicated graphics card on Optimus laptops
kernel module allowing to switch dedicated graphics card on Optimus laptops
- kernel-module-headers
+ kernel-module-headers
https://github.com/Bumblebee-Project/bbswitch/archive/v0.8.tar.gz
@@ -20,7 +20,7 @@
module-bbswitch
- kernel
+ kernel
/lib/modules
@@ -33,7 +33,14 @@
-
+
+
+ 2015-10-01
+ 0.8
+ Rebuild for kernel-4.2.2.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-09-23
0.8
diff --git a/kernel/drivers/module-broadcom-wl/files/patch/0018-cfg80211_disconnected.patch b/kernel/drivers/module-broadcom-wl/files/patch/0018-cfg80211_disconnected.patch
new file mode 100644
index 00000000..ac0b52eb
--- /dev/null
+++ b/kernel/drivers/module-broadcom-wl/files/patch/0018-cfg80211_disconnected.patch
@@ -0,0 +1,29 @@
+From b14ac6e4b871b5e15f63389ba63d1fc23a54c58b Mon Sep 17 00:00:00 2001
+From: Tim Gardner
+Date: Tue, 4 Aug 2015 09:02:10 -0600
+Subject: [PATCH] cfg80211_disconnected
+
+Signed-off-by: Tim Gardner
+---
+ bcmwl-6.30.223.248+bdcom/src/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index ea0726f..0131f01 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2047,7 +2047,11 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ }
+ else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) ||
+ event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL);
++#else
++ cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL);
++#endif
+ clear_bit(WL_STATUS_CONNECTED, &wl->status);
+ wl_link_down(wl);
+ wl_init_prof(wl->profile);
+--
+2.5.0
+
diff --git a/kernel/drivers/module-broadcom-wl/files/patch/0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch b/kernel/drivers/module-broadcom-wl/files/patch/0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch
new file mode 100644
index 00000000..adef19f3
--- /dev/null
+++ b/kernel/drivers/module-broadcom-wl/files/patch/0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch
@@ -0,0 +1,27 @@
+Description: Fixing null pointer crash
+
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773713
+Bug-Ubuntu: https://launchpad.net/bugs/1415880
+Last-Update: 2015-08-18
+
+---
+ src/wl/sys/wl_linux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 860b935..295156f 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
+ wlif = WL_DEV_IF(dev);
+ wl = WL_INFO(dev);
+
++ skb->prev = NULL;
+ if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
+- skb->prev = NULL;
+
+ TXQ_LOCK(wl);
+
+--
+1.9.1
+
diff --git a/kernel/drivers/module-broadcom-wl/pspec.xml b/kernel/drivers/module-broadcom-wl/pspec.xml
index 85888a5a..4e5d69b6 100644
--- a/kernel/drivers/module-broadcom-wl/pspec.xml
+++ b/kernel/drivers/module-broadcom-wl/pspec.xml
@@ -15,7 +15,7 @@
http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz
http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz
- kernel-module-headers
+ kernel-module-headers
patch/linux-40.patch
@@ -24,13 +24,15 @@
patch/gcc.patch
patch/wlan.patch
patch/broadcom-sta-6.30.223.248-linux-3.18-null-pointer-crash.patch
+ patch/0018-cfg80211_disconnected.patch
+
module-broadcom-wl
- kernel
+ kernel
module-broadcom-wl-userspace
@@ -61,7 +63,14 @@
-
+
+
+ 2015-10-01
+ 6.30.223.248
+ Rebuild for kernel 4.2.2.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-09-23
6.30.223.248
diff --git a/kernel/drivers/module-virtualbox-guest/pspec.xml b/kernel/drivers/module-virtualbox-guest/pspec.xml
index 21fb6d31..e500633d 100644
--- a/kernel/drivers/module-virtualbox-guest/pspec.xml
+++ b/kernel/drivers/module-virtualbox-guest/pspec.xml
@@ -14,14 +14,14 @@
This package provides the kernel modules needed for mouse integration and shared folder support between VirtualBox host and guest systems.
http://source.pisilinux.org/1.0/module-virtualbox-guest-4.3.28.tar.xz
- kernel-module-headers
+ kernel-module-headers
module-virtualbox-guest
- kernel
+ kernel
baselayout
module-virtualbox-guest-userspace
@@ -52,6 +52,13 @@
+
+ 2015-10-01
+ 4.3.28
+ Rebuild for kernel-4.2.2.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-08-23
4.3.28
diff --git a/kernel/drivers/module-virtualbox/pspec.xml b/kernel/drivers/module-virtualbox/pspec.xml
index bf9bdafe..4bb1fb1b 100644
--- a/kernel/drivers/module-virtualbox/pspec.xml
+++ b/kernel/drivers/module-virtualbox/pspec.xml
@@ -14,14 +14,14 @@
This package provides the kernel support for VirtualBox.
http://source.pisilinux.org/1.0/module-virtualbox-4.3.28.tar.xz
- kernel-module-headers
+ kernel-module-headers
module-virtualbox
- kernel
+ kernel
module-virtualbox-userspace
@@ -47,6 +47,13 @@
+
+ 2015-10-01
+ 4.3.28
+ Rebuild for kernel-4.2.2.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-09-23
4.3.28
diff --git a/kernel/drivers/ndiswrapper/actions.py b/kernel/drivers/ndiswrapper/actions.py
index df0ef400..cf2ed98b 100644
--- a/kernel/drivers/ndiswrapper/actions.py
+++ b/kernel/drivers/ndiswrapper/actions.py
@@ -14,7 +14,8 @@ KDIR = kerneltools.getKernelVersion()
def build():
shelltools.system("patch -p1 < ndiswrapper-1.59.patch")
-
+ shelltools.system("patch -p1 < kernel-4.2.patch")
+
autotools.make("-C driver KVERS_UNAME=%s" % KDIR)
autotools.make("-C utils")
diff --git a/kernel/drivers/ndiswrapper/files/kernel-4.2.patch b/kernel/drivers/ndiswrapper/files/kernel-4.2.patch
new file mode 100644
index 00000000..cfaad27e
--- /dev/null
+++ b/kernel/drivers/ndiswrapper/files/kernel-4.2.patch
@@ -0,0 +1,33 @@
+diff -Npur "ndiswrapper-1 .59.orig/driver/loader.c" "ndiswrapper-1 .59/driver/loader.c"
+--- "ndiswrapper-1 .59.orig/driver/loader.c" 2013-11-28 20:42:35.000000000 +0100
++++ "ndiswrapper-1 .59/driver/loader.c" 2015-08-01 18:25:08.302141265 +0200
+@@ -22,6 +22,7 @@
+ #include
+ #include
+ #include
++#include
+
+ /*
+ Network adapter: ClassGuid = {4d36e972-e325-11ce-bfc1-08002be10318}
+diff -Npur "ndiswrapper-1 .59.orig/driver/ntoskernel.c" "ndiswrapper-1 .59/driver/ntoskernel.c"
+--- "ndiswrapper-1 .59.orig/driver/ntoskernel.c" 2013-11-28 20:42:36.000000000 +0100
++++ "ndiswrapper-1 .59/driver/ntoskernel.c" 2015-08-01 18:24:55.895942032 +0200
+@@ -19,6 +19,7 @@
+ #include "pnp.h"
+ #include "loader.h"
+ #include "ntoskernel_exports.h"
++#include
+
+ /* MDLs describe a range of virtual address with an array of physical
+ * pages right after the header. For different ranges of virtual
+diff -Npur "ndiswrapper-1 .59.orig/driver/pe_linker.c" "ndiswrapper-1 .59/driver/pe_linker.c"
+--- "ndiswrapper-1 .59.orig/driver/pe_linker.c" 2013-11-28 20:42:36.000000000 +0100
++++ "ndiswrapper-1 .59/driver/pe_linker.c" 2015-08-01 18:28:37.992752176 +0200
+@@ -25,6 +25,7 @@
+ //#define DEBUGLINKER 2
+
+ #include "ntoskernel.h"
++#include
+
+ #endif
+
diff --git a/kernel/drivers/ndiswrapper/pspec.xml b/kernel/drivers/ndiswrapper/pspec.xml
index ce9dd73c..28728ba9 100644
--- a/kernel/drivers/ndiswrapper/pspec.xml
+++ b/kernel/drivers/ndiswrapper/pspec.xml
@@ -15,20 +15,21 @@
module-ndiswrapper allows you to use Windows XP drivers for WLAN cards without proper Linux drivers.
http://download.sourceforge.net/ndiswrapper/ndiswrapper-1.59.tar.gz
- kernel-module-headers
+ kernel-module-headers
support_kernel-4.0.patch
ndiswrapper-1.59.patch
+ kernel-4.2.patch
ndiswrapper
- kernel
+ kernel
/lib/modules
@@ -43,7 +44,14 @@
-
+
+
+ 2014-10-01
+ 1.59
+ Rebuild for kernel-4.2.2.
+ PisiLinux Community
+ admins@pisilinux.org
+
2014-09-23
1.59
diff --git a/kernel/kernel/files/configs/kernel-x86_64-config b/kernel/kernel/files/configs/kernel-x86_64-config
index e5d999ba..1812d72a 100644
--- a/kernel/kernel/files/configs/kernel-x86_64-config
+++ b/kernel/kernel/files/configs/kernel-x86_64-config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86_64 4.1.8 Kernel Configuration
+# Linux/x86_64 4.2.2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@@ -37,7 +37,6 @@ CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_64_SMP=y
-CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
@@ -86,11 +85,12 @@ CONFIG_AUDIT_TREE=y
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_GENERIC_IRQ_CHIP=y
CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
@@ -131,18 +131,11 @@ CONFIG_TASK_IO_ACCOUNTING=y
# RCU Subsystem
#
CONFIG_TREE_RCU=y
+# CONFIG_RCU_EXPERT is not set
CONFIG_SRCU=y
# CONFIG_TASKS_RCU is not set
CONFIG_RCU_STALL_COMMON=y
-CONFIG_CONTEXT_TRACKING=y
-CONFIG_RCU_USER_QS=y
-CONFIG_CONTEXT_TRACKING_FORCE=y
-CONFIG_RCU_FANOUT=64
-CONFIG_RCU_FANOUT_LEAF=16
-# CONFIG_RCU_FANOUT_EXACT is not set
-# CONFIG_RCU_FAST_NO_HZ is not set
# CONFIG_TREE_RCU_TRACE is not set
-CONFIG_RCU_KTHREAD_PRIO=0
CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_NONE is not set
# CONFIG_RCU_NOCB_CPU_ZERO is not set
@@ -177,6 +170,7 @@ CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
+CONFIG_CGROUP_WRITEBACK=y
# CONFIG_CHECKPOINT_RESTORE is not set
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
@@ -261,6 +255,7 @@ CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_DMA_API_DEBUG=y
@@ -292,6 +287,7 @@ CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_HAVE_COPY_THREAD_TLS=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_COMPAT_OLD_SIGACTION=y
@@ -312,6 +308,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
# CONFIG_MODULE_SIG is not set
# CONFIG_MODULE_COMPRESS is not set
+CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_BLK_DEV_BSG=y
@@ -368,8 +365,10 @@ CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_ARCH_USE_QUEUE_RWLOCK=y
-CONFIG_QUEUE_RWLOCK=y
+CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_RWLOCKS=y
CONFIG_FREEZER=y
#
@@ -515,6 +514,8 @@ CONFIG_ZPOOL=y
# CONFIG_ZBUD is not set
# CONFIG_ZSMALLOC is not set
CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT=y
+# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set
# CONFIG_X86_PMEM_LEGACY is not set
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y
@@ -587,6 +588,7 @@ CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS_POWER is not set
+CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
CONFIG_ACPI_EC_DEBUGFS=m
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
@@ -613,6 +615,7 @@ CONFIG_ACPI_HED=y
CONFIG_ACPI_CUSTOM_METHOD=m
CONFIG_ACPI_BGRT=y
# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
+# CONFIG_ACPI_NFIT is not set
CONFIG_HAVE_ACPI_APEI=y
CONFIG_HAVE_ACPI_APEI_NMI=y
CONFIG_ACPI_APEI=y
@@ -696,6 +699,7 @@ CONFIG_PCIEASPM_DEFAULT=y
CONFIG_PCIE_PME=y
CONFIG_PCI_BUS_ADDR_T_64BIT=y
CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
CONFIG_PCI_STUB=y
CONFIG_XEN_PCIDEV_FRONTEND=m
@@ -757,6 +761,7 @@ CONFIG_X86_DEV_DMA_OPS=y
CONFIG_PMC_ATOM=y
CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y
+CONFIG_NET_INGRESS=y
#
# Networking options
@@ -797,7 +802,7 @@ CONFIG_NET_IPVTI=m
CONFIG_NET_UDP_TUNNEL=m
# CONFIG_NET_FOU is not set
# CONFIG_NET_FOU_IP_TUNNELS is not set
-# CONFIG_GENEVE is not set
+# CONFIG_GENEVE_CORE is not set
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
CONFIG_INET_IPCOMP=m
@@ -824,6 +829,7 @@ CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
# CONFIG_TCP_CONG_DCTCP is not set
+# CONFIG_TCP_CONG_CDG is not set
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
@@ -865,6 +871,7 @@ CONFIG_BRIDGE_NETFILTER=m
#
# Core Netfilter Configuration
#
+CONFIG_NETFILTER_INGRESS=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
@@ -911,6 +918,7 @@ CONFIG_NF_NAT_TFTP=m
CONFIG_NF_NAT_REDIRECT=m
CONFIG_NF_TABLES=m
CONFIG_NF_TABLES_INET=m
+# CONFIG_NF_TABLES_NETDEV is not set
CONFIG_NFT_EXTHDR=m
CONFIG_NFT_META=m
CONFIG_NFT_CT=m
@@ -1292,6 +1300,7 @@ CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_FLOW=m
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_CLS_BPF=m
+# CONFIG_NET_CLS_FLOWER is not set
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=m
@@ -1447,8 +1456,10 @@ CONFIG_BT_DEBUGFS=y
#
CONFIG_BT_INTEL=m
CONFIG_BT_BCM=m
+CONFIG_BT_RTL=m
CONFIG_BT_HCIBTUSB=m
CONFIG_BT_HCIBTUSB_BCM=y
+CONFIG_BT_HCIBTUSB_RTL=y
CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_H4=y
@@ -1504,6 +1515,7 @@ CONFIG_MAC80211_LEDS=y
CONFIG_MAC80211_DEBUGFS=y
CONFIG_MAC80211_MESSAGE_TRACING=y
# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
CONFIG_WIMAX=m
CONFIG_WIMAX_DEBUG_LEVEL=8
CONFIG_RFKILL=m
@@ -1521,6 +1533,7 @@ CONFIG_CEPH_LIB=m
CONFIG_NFC=m
CONFIG_NFC_DIGITAL=m
CONFIG_NFC_NCI=m
+# CONFIG_NFC_NCI_UART is not set
CONFIG_NFC_HCI=m
CONFIG_NFC_SHDLC=y
@@ -1542,7 +1555,7 @@ CONFIG_NFC_MRVL=m
CONFIG_NFC_MRVL_USB=m
CONFIG_NFC_ST21NFCA=m
CONFIG_NFC_ST21NFCA_I2C=m
-# CONFIG_NFC_ST21NFCB is not set
+# CONFIG_NFC_ST_NCI is not set
# CONFIG_NFC_NXP_NCI is not set
CONFIG_HAVE_BPF_JIT=y
@@ -1562,7 +1575,7 @@ CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y
-# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
+CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
CONFIG_WANT_DEV_COREDUMP=y
CONFIG_ALLOW_DEV_COREDUMP=y
CONFIG_DEV_COREDUMP=y
@@ -1656,6 +1669,7 @@ CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set
# CONFIG_MTD_UBI_GLUEBI is not set
# CONFIG_MTD_UBI_BLOCK is not set
+# CONFIG_OF is not set
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
@@ -1698,7 +1712,6 @@ CONFIG_BLK_DEV_RAM=m
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_BLK_DEV_RAM_DAX=y
-CONFIG_BLK_DEV_PMEM=m
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -1770,19 +1783,27 @@ CONFIG_VMWARE_VMCI=m
#
CONFIG_INTEL_MIC_BUS=m
+#
+# SCIF Bus Driver
+#
+# CONFIG_SCIF_BUS is not set
+
#
# Intel MIC Host Driver
#
-CONFIG_INTEL_MIC_HOST=m
#
# Intel MIC Card Driver
#
-CONFIG_INTEL_MIC_CARD=m
+
+#
+# SCIF Driver
+#
CONFIG_GENWQE=m
CONFIG_GENWQE_PLATFORM_ERROR_RECOVERY=1
# CONFIG_ECHO is not set
# CONFIG_CXL_BASE is not set
+# CONFIG_CXL_KERNEL_API is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
@@ -1883,6 +1904,7 @@ CONFIG_LIBFC=m
CONFIG_LIBFCOE=m
CONFIG_FCOE=m
CONFIG_FCOE_FNIC=m
+# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -2045,6 +2067,7 @@ CONFIG_DM_SNAPSHOT=y
CONFIG_DM_THIN_PROVISIONING=m
CONFIG_DM_CACHE=m
CONFIG_DM_CACHE_MQ=m
+CONFIG_DM_CACHE_SMQ=m
CONFIG_DM_CACHE_CLEANER=m
CONFIG_DM_ERA=m
CONFIG_DM_MIRROR=y
@@ -2110,8 +2133,8 @@ CONFIG_NETCONSOLE=m
CONFIG_NETCONSOLE_DYNAMIC=y
CONFIG_NETPOLL=y
CONFIG_NET_POLL_CONTROLLER=y
-CONFIG_NTB_NETDEV=m
CONFIG_TUN=m
+# CONFIG_TUN_VNET_CROSS_LE is not set
CONFIG_VETH=m
CONFIG_VIRTIO_NET=m
# CONFIG_NLMON is not set
@@ -2145,6 +2168,7 @@ CONFIG_VHOST_NET=m
CONFIG_VHOST_SCSI=m
CONFIG_VHOST_RING=m
CONFIG_VHOST=m
+# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
#
# Distributed Switch Architecture drivers
@@ -2192,6 +2216,11 @@ CONFIG_BNX2X=m
CONFIG_BNX2X_SRIOV=y
CONFIG_NET_VENDOR_BROCADE=y
CONFIG_BNA=m
+CONFIG_NET_VENDOR_CAVIUM=y
+# CONFIG_THUNDER_NIC_PF is not set
+# CONFIG_THUNDER_NIC_VF is not set
+# CONFIG_THUNDER_NIC_BGX is not set
+# CONFIG_LIQUIDIO is not set
CONFIG_NET_VENDOR_CHELSIO=y
CONFIG_CHELSIO_T1=m
CONFIG_CHELSIO_T1_1G=y
@@ -2223,7 +2252,9 @@ CONFIG_SUNDANCE=m
# CONFIG_SUNDANCE_MMIO is not set
CONFIG_NET_VENDOR_EMULEX=y
CONFIG_BE2NET=m
+CONFIG_BE2NET_HWMON=y
CONFIG_BE2NET_VXLAN=y
+CONFIG_NET_VENDOR_EZCHIP=y
CONFIG_NET_VENDOR_EXAR=y
CONFIG_S2IO=m
CONFIG_VXGE=m
@@ -2309,6 +2340,7 @@ CONFIG_8139TOO=m
CONFIG_8139TOO_8129=y
# CONFIG_8139_OLD_RX_RESET is not set
CONFIG_R8169=m
+CONFIG_NET_VENDOR_RENESAS=y
CONFIG_NET_VENDOR_RDC=y
CONFIG_R6040=m
CONFIG_NET_VENDOR_ROCKER=y
@@ -2324,6 +2356,7 @@ CONFIG_SFC=m
# CONFIG_SFC_MTD is not set
CONFIG_SFC_MCDI_MON=y
CONFIG_SFC_SRIOV=y
+CONFIG_SFC_MCDI_LOGGING=y
CONFIG_NET_VENDOR_SMSC=y
CONFIG_PCMCIA_SMC91C92=m
CONFIG_EPIC100=m
@@ -2382,6 +2415,7 @@ CONFIG_NATIONAL_PHY=m
CONFIG_STE10XP=m
CONFIG_LSI_ET1011C_PHY=m
CONFIG_MICREL_PHY=m
+# CONFIG_DP83867_PHY is not set
CONFIG_FIXED_PHY=y
CONFIG_MDIO_BITBANG=m
CONFIG_MDIO_GPIO=m
@@ -2620,6 +2654,7 @@ CONFIG_RT2X00_LIB_CRYPTO=y
CONFIG_RT2X00_LIB_LEDS=y
CONFIG_RT2X00_LIB_DEBUGFS=y
# CONFIG_RT2X00_DEBUG is not set
+# CONFIG_WL_MEDIATEK is not set
CONFIG_RTL_CARDS=m
CONFIG_RTL8192CE=m
CONFIG_RTL8192SE=m
@@ -2660,6 +2695,7 @@ CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8
# CONFIG_WAN is not set
CONFIG_IEEE802154_DRIVERS=m
CONFIG_IEEE802154_FAKELB=m
+# CONFIG_IEEE802154_ATUSB is not set
CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XEN_NETDEV_BACKEND=m
CONFIG_VMXNET3=m
@@ -2799,6 +2835,7 @@ CONFIG_ISDN_HDLC=m
# Input device support
#
CONFIG_INPUT=y
+CONFIG_INPUT_LEDS=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_SPARSEKMAP=m
@@ -2937,6 +2974,7 @@ CONFIG_TOUCHSCREEN_TOUCHWIN=m
CONFIG_TOUCHSCREEN_TI_AM335X_TSC=m
CONFIG_TOUCHSCREEN_UCB1400=m
CONFIG_TOUCHSCREEN_PIXCIR=m
+# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set
CONFIG_TOUCHSCREEN_WM97XX=m
CONFIG_TOUCHSCREEN_WM9705=y
CONFIG_TOUCHSCREEN_WM9712=y
@@ -3001,6 +3039,7 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
CONFIG_INPUT_IDEAPAD_SLIDEBAR=m
CONFIG_INPUT_SOC_BUTTON_ARRAY=m
CONFIG_INPUT_DRV260X_HAPTICS=m
+# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not set
#
@@ -3083,7 +3122,9 @@ CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_SERIAL_JSM=m
CONFIG_SERIAL_SCCNXP=m
+CONFIG_SERIAL_SC16IS7XX_CORE=m
CONFIG_SERIAL_SC16IS7XX=m
+CONFIG_SERIAL_SC16IS7XX_I2C=y
CONFIG_SERIAL_ALTERA_JTAGUART=m
CONFIG_SERIAL_ALTERA_UART=m
CONFIG_SERIAL_ALTERA_UART_MAXPORTS=4
@@ -3372,9 +3413,12 @@ CONFIG_POWER_SUPPLY=y
CONFIG_CHARGER_GPIO=m
CONFIG_CHARGER_BQ2415X=m
CONFIG_CHARGER_BQ24190=m
+# CONFIG_CHARGER_BQ24257 is not set
CONFIG_CHARGER_BQ24735=m
+# CONFIG_CHARGER_BQ25890 is not set
CONFIG_CHARGER_SMB347=m
CONFIG_BATTERY_GAUGE_LTC2941=m
+# CONFIG_CHARGER_RT9455 is not set
# CONFIG_POWER_RESET is not set
CONFIG_POWER_AVS=y
CONFIG_HWMON=y
@@ -3409,6 +3453,7 @@ CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_ATXP1=m
CONFIG_SENSORS_DS620=m
CONFIG_SENSORS_DS1621=m
+CONFIG_SENSORS_DELL_SMM=m
CONFIG_SENSORS_I5K_AMB=m
CONFIG_SENSORS_F71805F=m
CONFIG_SENSORS_F71882FG=m
@@ -3501,6 +3546,7 @@ CONFIG_SENSORS_ADS7828=m
CONFIG_SENSORS_AMC6821=m
CONFIG_SENSORS_INA209=m
CONFIG_SENSORS_INA2XX=m
+# CONFIG_SENSORS_TC74 is not set
CONFIG_SENSORS_THMC50=m
CONFIG_SENSORS_TMP102=m
CONFIG_SENSORS_TMP103=m
@@ -3528,16 +3574,20 @@ CONFIG_SENSORS_ACPI_POWER=m
CONFIG_SENSORS_ATK0110=m
CONFIG_THERMAL=y
CONFIG_THERMAL_HWMON=y
+# CONFIG_THERMAL_WRITABLE_TRIPS is not set
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
+# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_THERMAL_GOV_USER_SPACE=y
+# CONFIG_THERMAL_GOV_POWER_ALLOCATOR is not set
# CONFIG_THERMAL_EMULATION is not set
# CONFIG_INTEL_POWERCLAMP is not set
CONFIG_X86_PKG_TEMP_THERMAL=m
+CONFIG_INTEL_SOC_DTS_IOSF_CORE=m
CONFIG_INTEL_SOC_DTS_THERMAL=m
# CONFIG_INT340X_THERMAL is not set
@@ -3555,6 +3605,7 @@ CONFIG_SOFT_WATCHDOG=m
# CONFIG_XILINX_WATCHDOG is not set
CONFIG_CADENCE_WATCHDOG=m
CONFIG_DW_WATCHDOG=m
+# CONFIG_MAX63XX_WATCHDOG is not set
CONFIG_RETU_WATCHDOG=m
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
@@ -3700,6 +3751,7 @@ CONFIG_VIDEO_V4L2=m
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_TUNER=m
CONFIG_V4L2_MEM2MEM_DEV=m
+# CONFIG_V4L2_FLASH_LED_CLASS is not set
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
@@ -3934,6 +3986,7 @@ CONFIG_VIDEO_HEXIUM_ORION=m
CONFIG_VIDEO_MXB=m
CONFIG_VIDEO_SOLO6X10=m
# CONFIG_VIDEO_TW68 is not set
+# CONFIG_VIDEO_DT3155 is not set
#
# Media capture/analog/hybrid TV support
@@ -4195,6 +4248,7 @@ CONFIG_DVB_TDA826X=m
CONFIG_DVB_TUA6100=m
CONFIG_DVB_CX24116=m
CONFIG_DVB_CX24117=m
+CONFIG_DVB_CX24120=m
CONFIG_DVB_SI21XX=m
CONFIG_DVB_TS2020=m
CONFIG_DVB_DS3000=m
@@ -4329,6 +4383,7 @@ CONFIG_DRM_R128=m
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_USERPTR=y
# CONFIG_DRM_RADEON_UMS is not set
+# CONFIG_DRM_AMDGPU is not set
CONFIG_DRM_NOUVEAU=m
CONFIG_NOUVEAU_DEBUG=5
CONFIG_NOUVEAU_DEBUG_DEFAULT=3
@@ -4355,6 +4410,7 @@ CONFIG_DRM_MGAG200=m
CONFIG_DRM_CIRRUS_QEMU=m
CONFIG_DRM_QXL=m
CONFIG_DRM_BOCHS=m
+# CONFIG_DRM_VIRTIO_GPU is not set
CONFIG_DRM_PANEL=y
#
@@ -4492,11 +4548,11 @@ CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
# CONFIG_SND_SUPPORT_OLD_API is not set
+CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
CONFIG_SND_VMASTER=y
-CONFIG_SND_KCTL_JACK=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_RAWMIDI_SEQ=m
CONFIG_SND_OPL3_LIB_SEQ=m
@@ -4598,20 +4654,16 @@ CONFIG_SND_YMFPCI=m
#
CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDA_DSP_LOADER=y
-CONFIG_SND_HDA_PREALLOC_SIZE=4096
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=0
-CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_CODEC_ANALOG=m
CONFIG_SND_HDA_CODEC_SIGMATEL=m
CONFIG_SND_HDA_CODEC_VIA=m
CONFIG_SND_HDA_CODEC_HDMI=m
-CONFIG_SND_HDA_I915=y
CONFIG_SND_HDA_CODEC_CIRRUS=m
CONFIG_SND_HDA_CODEC_CONEXANT=m
CONFIG_SND_HDA_CODEC_CA0110=m
@@ -4622,6 +4674,9 @@ CONFIG_SND_HDA_CODEC_SI3054=m
CONFIG_SND_HDA_GENERIC=m
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDA_CORE=m
+CONFIG_SND_HDA_DSP_LOADER=y
+CONFIG_SND_HDA_I915=y
+CONFIG_SND_HDA_PREALLOC_SIZE=4096
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_UA101=m
@@ -4774,6 +4829,7 @@ CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_OTG_FSM=m
+# CONFIG_USB_ULPI_BUS is not set
CONFIG_USB_MON=y
CONFIG_USB_WUSB=m
CONFIG_USB_WUSB_CBAF=m
@@ -4875,7 +4931,6 @@ CONFIG_USB_DWC2_HOST=y
#
# Gadget/Dual-role mode requires USB Gadget support to be enabled
#
-CONFIG_USB_DWC2_PLATFORM=y
CONFIG_USB_DWC2_PCI=y
# CONFIG_USB_DWC2_DEBUG is not set
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
@@ -5024,6 +5079,7 @@ CONFIG_MMC_USDHI6ROL0=m
CONFIG_MMC_REALTEK_PCI=m
CONFIG_MMC_REALTEK_USB=m
# CONFIG_MMC_TOSHIBA_PCI is not set
+# CONFIG_MMC_MTK is not set
CONFIG_MEMSTICK=m
# CONFIG_MEMSTICK_DEBUG is not set
@@ -5070,6 +5126,7 @@ CONFIG_LEDS_INTEL_SS4200=m
CONFIG_LEDS_LT3593=m
CONFIG_LEDS_DELL_NETBOOKS=m
CONFIG_LEDS_TCA6507=m
+# CONFIG_LEDS_TLC591XX is not set
CONFIG_LEDS_LM355x=m
#
@@ -5114,7 +5171,6 @@ CONFIG_INFINIBAND_CXGB3=m
# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
CONFIG_INFINIBAND_CXGB4=m
CONFIG_MLX4_INFINIBAND=m
-# CONFIG_MLX5_INFINIBAND is not set
CONFIG_INFINIBAND_NES=m
# CONFIG_INFINIBAND_NES_DEBUG is not set
# CONFIG_INFINIBAND_OCRDMA is not set
@@ -5127,6 +5183,8 @@ CONFIG_INFINIBAND_SRP=m
CONFIG_INFINIBAND_SRPT=m
CONFIG_INFINIBAND_ISER=m
CONFIG_INFINIBAND_ISERT=m
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
CONFIG_EDAC=y
CONFIG_EDAC_LEGACY_SYSFS=y
# CONFIG_EDAC_DEBUG is not set
@@ -5150,8 +5208,9 @@ CONFIG_EDAC_SBRIDGE=m
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
-CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+CONFIG_RTC_SYSTOHC=y
+CONFIG_RTC_SYSTOHC_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
#
@@ -5227,7 +5286,7 @@ CONFIG_RTC_DRV_V3020=m
#
# on-CPU RTC drivers
#
-CONFIG_RTC_DRV_XGENE=m
+# CONFIG_RTC_DRV_MT6397 is not set
#
# HID Sensor RTC drivers
@@ -5270,6 +5329,7 @@ CONFIG_UIO_AEC=m
CONFIG_UIO_SERCOS3=m
CONFIG_UIO_PCI_GENERIC=m
# CONFIG_UIO_NETX is not set
+# CONFIG_UIO_PRUSS is not set
# CONFIG_UIO_MF624 is not set
CONFIG_VFIO_IOMMU_TYPE1=y
CONFIG_VFIO_VIRQFD=y
@@ -5353,7 +5413,6 @@ CONFIG_FB_SM750=m
CONFIG_STAGING_MEDIA=y
CONFIG_I2C_BCM2048=m
# CONFIG_DVB_CXD2099 is not set
-# CONFIG_VIDEO_DT3155 is not set
# CONFIG_DVB_MN88472 is not set
# CONFIG_DVB_MN88473 is not set
CONFIG_LIRC_STAGING=y
@@ -5395,13 +5454,7 @@ CONFIG_DGAP=m
# CONFIG_GS_FPGABOOT is not set
# CONFIG_CRYPTO_SKEIN is not set
CONFIG_UNISYSSPAR=y
-CONFIG_UNISYS_VISORUTIL=m
-CONFIG_UNISYS_VISORCHANNEL=m
-CONFIG_UNISYS_VISORCHIPSET=m
-CONFIG_UNISYS_UISLIB=m
-CONFIG_UNISYS_VIRTPCI=m
-CONFIG_UNISYS_VIRTHBA=m
-# CONFIG_I2O is not set
+# CONFIG_UNISYS_VISORBUS is not set
CONFIG_X86_PLATFORM_DEVICES=y
CONFIG_ACER_WMI=m
CONFIG_ACERHDF=m
@@ -5411,6 +5464,7 @@ CONFIG_DELL_LAPTOP=m
CONFIG_DELL_WMI=m
CONFIG_DELL_WMI_AIO=m
CONFIG_DELL_SMO8800=m
+# CONFIG_DELL_RBTN is not set
CONFIG_FUJITSU_LAPTOP=m
# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
CONFIG_FUJITSU_TABLET=m
@@ -5455,11 +5509,13 @@ CONFIG_INTEL_RST=m
# CONFIG_INTEL_SMARTCONNECT is not set
CONFIG_SHUTTLE_WMI=m
CONFIG_PVPANIC=m
+# CONFIG_INTEL_PMC_IPC is not set
CONFIG_CHROME_PLATFORMS=y
CONFIG_CHROMEOS_LAPTOP=m
CONFIG_CHROMEOS_PSTORE=m
CONFIG_CROS_EC_CHARDEV=m
CONFIG_CROS_EC_LPC=m
+CONFIG_CROS_EC_PROTO=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y
@@ -5519,6 +5575,7 @@ CONFIG_STE_MODEM_RPROC=m
#
# SOC (System On Chip) specific Drivers
#
+# CONFIG_SUNXI_SRAM is not set
# CONFIG_SOC_TI is not set
CONFIG_PM_DEVFREQ=y
@@ -5538,6 +5595,10 @@ CONFIG_PM_DEVFREQ_EVENT=y
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
CONFIG_NTB=m
+# CONFIG_NTB_INTEL is not set
+# CONFIG_NTB_PINGPONG is not set
+# CONFIG_NTB_TOOL is not set
+# CONFIG_NTB_TRANSPORT is not set
# CONFIG_VME_BUS is not set
CONFIG_PWM=y
CONFIG_PWM_SYSFS=y
@@ -5553,6 +5614,8 @@ CONFIG_RESET_CONTROLLER=y
# PHY Subsystem
#
CONFIG_GENERIC_PHY=y
+# CONFIG_PHY_PXA_28NM_HSIC is not set
+# CONFIG_PHY_PXA_28NM_USB2 is not set
CONFIG_BCM_KONA_USB2_PHY=m
CONFIG_PHY_SAMSUNG_USB2=m
# CONFIG_PHY_EXYNOS4210_USB2 is not set
@@ -5569,6 +5632,7 @@ CONFIG_THUNDERBOLT=m
#
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
+# CONFIG_LIBNVDIMM is not set
#
# Firmware Drivers
@@ -5595,6 +5659,7 @@ CONFIG_GOOGLE_SMI=m
# EFI (Extensible Firmware Interface) Support
#
CONFIG_EFI_VARS=y
+CONFIG_EFI_ESRT=y
CONFIG_EFI_VARS_PSTORE=y
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
CONFIG_EFI_RUNTIME_MAP=y
@@ -5663,6 +5728,7 @@ CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
# CONFIG_F2FS_FS_SECURITY is not set
# CONFIG_F2FS_CHECK_FS is not set
+# CONFIG_F2FS_FS_ENCRYPTION is not set
CONFIG_F2FS_IO_TRACE=y
CONFIG_FS_DAX=y
CONFIG_FS_POSIX_ACL=y
@@ -5726,6 +5792,7 @@ CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
+# CONFIG_PROC_CHILDREN is not set
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
@@ -5848,8 +5915,7 @@ CONFIG_SUNRPC_BACKCHANNEL=y
CONFIG_SUNRPC_SWAP=y
CONFIG_RPCSEC_GSS_KRB5=m
CONFIG_SUNRPC_DEBUG=y
-CONFIG_SUNRPC_XPRT_RDMA_CLIENT=m
-CONFIG_SUNRPC_XPRT_RDMA_SERVER=m
+CONFIG_SUNRPC_XPRT_RDMA=m
CONFIG_CEPH_FS=m
# CONFIG_CEPH_FSCACHE is not set
CONFIG_CEPH_FS_POSIX_ACL=y
@@ -5972,7 +6038,6 @@ CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
CONFIG_HAVE_ARCH_KMEMCHECK=y
CONFIG_HAVE_ARCH_KASAN=y
-CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
#
# Debug Lockups and Hangs
@@ -5980,6 +6045,7 @@ CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
# CONFIG_PANIC_ON_OOPS is not set
CONFIG_PANIC_ON_OOPS_VALUE=0
CONFIG_PANIC_TIMEOUT=0
+CONFIG_SCHED_INFO=y
CONFIG_DEBUG_TIMEKEEPING=y
#
@@ -6083,6 +6149,7 @@ CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
CONFIG_OPTIMIZE_INLINING=y
+# CONFIG_PUNIT_ATOM_DEBUG is not set
#
# Security options
@@ -6141,14 +6208,17 @@ CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
CONFIG_CRYPTO_PCOMP=m
CONFIG_CRYPTO_PCOMP2=y
+CONFIG_CRYPTO_AKCIPHER2=y
+# CONFIG_CRYPTO_RSA is not set
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_USER=m
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
CONFIG_CRYPTO_GF128MUL=y
-CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_PCRYPT=m
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=y
@@ -6163,7 +6233,9 @@ CONFIG_CRYPTO_GLUE_HELPER_X86=m
#
CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_GCM=m
+# CONFIG_CRYPTO_CHACHA20POLY1305 is not set
CONFIG_CRYPTO_SEQIV=y
+CONFIG_CRYPTO_ECHAINIV=m
#
# Block modes
@@ -6194,6 +6266,7 @@ CONFIG_CRYPTO_CRC32_PCLMUL=m
CONFIG_CRYPTO_CRCT10DIF=y
# CONFIG_CRYPTO_CRCT10DIF_PCLMUL is not set
CONFIG_CRYPTO_GHASH=m
+# CONFIG_CRYPTO_POLY1305 is not set
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m
@@ -6238,6 +6311,7 @@ CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_SALSA20=m
CONFIG_CRYPTO_SALSA20_X86_64=m
+# CONFIG_CRYPTO_CHACHA20 is not set
CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m
@@ -6256,6 +6330,7 @@ CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_ZLIB=m
CONFIG_CRYPTO_LZO=y
+# CONFIG_CRYPTO_842 is not set
CONFIG_CRYPTO_LZ4=m
CONFIG_CRYPTO_LZ4HC=m
@@ -6263,15 +6338,17 @@ CONFIG_CRYPTO_LZ4HC=m
# Random Number Generation
#
CONFIG_CRYPTO_ANSI_CPRNG=m
-CONFIG_CRYPTO_DRBG_MENU=m
+CONFIG_CRYPTO_DRBG_MENU=y
CONFIG_CRYPTO_DRBG_HMAC=y
# CONFIG_CRYPTO_DRBG_HASH is not set
# CONFIG_CRYPTO_DRBG_CTR is not set
-CONFIG_CRYPTO_DRBG=m
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_JITTERENTROPY=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_RNG=m
+# CONFIG_CRYPTO_USER_API_AEAD is not set
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=m
@@ -6396,6 +6473,7 @@ CONFIG_FONT_SUPPORT=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_ARCH_HAS_SG_CHAIN=y
+CONFIG_ARCH_HAS_PMEM_API=y
#
# Unofficial 3rd party kernel additions
diff --git a/kernel/kernel/files/patches/linux/patch-4.1.1.xz b/kernel/kernel/files/patches/linux/patch-4.1.1.xz
deleted file mode 100644
index d4a015ab..00000000
Binary files a/kernel/kernel/files/patches/linux/patch-4.1.1.xz and /dev/null differ
diff --git a/kernel/kernel/files/patches/linux/patch-4.1.2.xz b/kernel/kernel/files/patches/linux/patch-4.1.2.xz
deleted file mode 100644
index d5ef976e..00000000
Binary files a/kernel/kernel/files/patches/linux/patch-4.1.2.xz and /dev/null differ
diff --git a/kernel/kernel/files/patches/linux/patch-4.1.3.xz b/kernel/kernel/files/patches/linux/patch-4.1.3.xz
deleted file mode 100644
index 8ba965b2..00000000
Binary files a/kernel/kernel/files/patches/linux/patch-4.1.3.xz and /dev/null differ
diff --git a/kernel/kernel/files/patches/linux/patch-4.1.6.xz b/kernel/kernel/files/patches/linux/patch-4.1.6.xz
deleted file mode 100644
index 7e9a3d5f..00000000
Binary files a/kernel/kernel/files/patches/linux/patch-4.1.6.xz and /dev/null differ
diff --git a/kernel/kernel/files/patches/linux/patch-4.2.2.xz b/kernel/kernel/files/patches/linux/patch-4.2.2.xz
new file mode 100644
index 00000000..573d719e
Binary files /dev/null and b/kernel/kernel/files/patches/linux/patch-4.2.2.xz differ
diff --git a/kernel/kernel/files/patches/mageia/3rd-3rdparty-merge.patch b/kernel/kernel/files/patches/mageia/3rd-3rdparty-merge.patch
index 8c1f8421..905c6e6f 100644
--- a/kernel/kernel/files/patches/mageia/3rd-3rdparty-merge.patch
+++ b/kernel/kernel/files/patches/mageia/3rd-3rdparty-merge.patch
@@ -15,66 +15,66 @@ Signed-off-by: Thomas Backlund
arch/powerpc/Kconfig | 2 ++
arch/sparc/Kconfig | 2 ++
arch/x86/Kconfig | 2 ++
- scripts/kconfig/Makefile | 31 +++++++++++++++++--------------
- 8 files changed, 29 insertions(+), 15 deletions(-)
+ scripts/kconfig/Makefile | 33 ++++++++++++++++++---------------
+ 8 files changed, 30 insertions(+), 16 deletions(-)
-diff -Nurp linux-4.1/arch/alpha/Kconfig linux-4.1-3rd/arch/alpha/Kconfig
---- linux-4.1/arch/alpha/Kconfig 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/arch/alpha/Kconfig 2015-06-25 20:44:03.221647317 +0200
+diff -Nurp linux-4.2.2/arch/alpha/Kconfig linux-4.2.2-3rd/arch/alpha/Kconfig
+--- linux-4.2.2/arch/alpha/Kconfig 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/arch/alpha/Kconfig 2015-09-29 23:02:44.024347272 +0300
@@ -750,3 +750,4 @@ source "crypto/Kconfig"
source "lib/Kconfig"
+source "3rdparty/Kconfig"
-diff -Nurp linux-4.1/arch/ia64/Kconfig linux-4.1-3rd/arch/ia64/Kconfig
---- linux-4.1/arch/ia64/Kconfig 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/arch/ia64/Kconfig 2015-06-25 20:44:03.231647227 +0200
-@@ -636,3 +636,5 @@ source "lib/Kconfig"
+diff -Nurp linux-4.2.2/arch/ia64/Kconfig linux-4.2.2-3rd/arch/ia64/Kconfig
+--- linux-4.2.2/arch/ia64/Kconfig 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/arch/ia64/Kconfig 2015-09-29 23:02:44.024347272 +0300
+@@ -613,3 +613,5 @@ source "lib/Kconfig"
config IOMMU_HELPER
def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
+
+source "3rdparty/Kconfig"
-diff -Nurp linux-4.1/arch/mips/Kconfig linux-4.1-3rd/arch/mips/Kconfig
---- linux-4.1/arch/mips/Kconfig 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/arch/mips/Kconfig 2015-06-25 20:44:03.231647227 +0200
-@@ -2893,3 +2893,5 @@ source "crypto/Kconfig"
+diff -Nurp linux-4.2.2/arch/mips/Kconfig linux-4.2.2-3rd/arch/mips/Kconfig
+--- linux-4.2.2/arch/mips/Kconfig 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/arch/mips/Kconfig 2015-09-29 23:02:44.024347272 +0300
+@@ -2944,3 +2944,5 @@ source "crypto/Kconfig"
source "lib/Kconfig"
source "arch/mips/kvm/Kconfig"
+
+source "3rdparty/Kconfig"
-diff -Nurp linux-4.1/arch/powerpc/Kconfig linux-4.1-3rd/arch/powerpc/Kconfig
---- linux-4.1/arch/powerpc/Kconfig 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/arch/powerpc/Kconfig 2015-06-25 20:44:03.231647227 +0200
-@@ -1090,3 +1090,5 @@ config PPC_LIB_RHEAP
+diff -Nurp linux-4.2.2/arch/powerpc/Kconfig linux-4.2.2-3rd/arch/powerpc/Kconfig
+--- linux-4.2.2/arch/powerpc/Kconfig 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/arch/powerpc/Kconfig 2015-09-29 23:02:44.025347276 +0300
+@@ -1092,3 +1092,5 @@ config PPC_LIB_RHEAP
bool
source "arch/powerpc/kvm/Kconfig"
+
+source "3rdparty/Kconfig"
-diff -Nurp linux-4.1/arch/sparc/Kconfig linux-4.1-3rd/arch/sparc/Kconfig
---- linux-4.1/arch/sparc/Kconfig 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/arch/sparc/Kconfig 2015-06-25 20:44:03.231647227 +0200
+diff -Nurp linux-4.2.2/arch/sparc/Kconfig linux-4.2.2-3rd/arch/sparc/Kconfig
+--- linux-4.2.2/arch/sparc/Kconfig 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/arch/sparc/Kconfig 2015-09-29 23:02:44.025347276 +0300
@@ -569,3 +569,5 @@ source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"
+
+source "3rdparty/Kconfig"
-diff -Nurp linux-4.1/arch/x86/Kconfig linux-4.1-3rd/arch/x86/Kconfig
---- linux-4.1/arch/x86/Kconfig 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/arch/x86/Kconfig 2015-06-25 20:44:03.231647227 +0200
-@@ -2594,3 +2594,5 @@ source "crypto/Kconfig"
+diff -Nurp linux-4.2.2/arch/x86/Kconfig linux-4.2.2-3rd/arch/x86/Kconfig
+--- linux-4.2.2/arch/x86/Kconfig 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/arch/x86/Kconfig 2015-09-29 23:02:44.025347276 +0300
+@@ -2601,3 +2601,5 @@ source "crypto/Kconfig"
source "arch/x86/kvm/Kconfig"
source "lib/Kconfig"
+
+source "3rdparty/Kconfig"
-diff -Nurp linux-4.1/Makefile linux-4.1-3rd/Makefile
---- linux-4.1/Makefile 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/Makefile 2015-06-25 20:44:03.231647227 +0200
-@@ -556,7 +556,7 @@ scripts: scripts_basic include/config/au
+diff -Nurp linux-4.2.2/Makefile linux-4.2.2-3rd/Makefile
+--- linux-4.2.2/Makefile 2015-09-29 22:13:44.743650710 +0300
++++ linux-4.2.2-3rd/Makefile 2015-09-29 23:02:44.026347280 +0300
+@@ -546,7 +546,7 @@ scripts: scripts_basic include/config/au
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
@@ -83,9 +83,9 @@ diff -Nurp linux-4.1/Makefile linux-4.1-3rd/Makefile
net-y := net/
libs-y := lib/
core-y := usr/
-diff -Nurp linux-4.1/scripts/kconfig/Makefile linux-4.1-3rd/scripts/kconfig/Makefile
---- linux-4.1/scripts/kconfig/Makefile 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-3rd/scripts/kconfig/Makefile 2015-06-25 20:47:50.109596717 +0200
+diff -Nurp linux-4.2.2/scripts/kconfig/Makefile linux-4.2.2-3rd/scripts/kconfig/Makefile
+--- linux-4.2.2/scripts/kconfig/Makefile 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-3rd/scripts/kconfig/Makefile 2015-09-29 23:04:06.298700940 +0300
@@ -18,26 +18,26 @@ endif
# We need this, in case the user has it in its environment
unexport CONFIG_
@@ -131,7 +131,7 @@ diff -Nurp linux-4.1/scripts/kconfig/Makefile linux-4.1-3rd/scripts/kconfig/Make
PHONY += oldnoconfig savedefconfig defconfig
@@ -88,12 +88,12 @@ PHONY += oldnoconfig savedefconfig defco
# oldnoconfig is an alias of olddefconfig, because people already are dependent
- # on its behavior(sets new symbols to their default value but not 'n') with the
+ # on its behavior (sets new symbols to their default value but not 'n') with the
# counter-intuitive name.
-oldnoconfig: olddefconfig
+oldnoconfig: olddefconfig 3rdparty/Makefile
@@ -154,7 +154,7 @@ diff -Nurp linux-4.1/scripts/kconfig/Makefile linux-4.1-3rd/scripts/kconfig/Make
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
-@@ -112,12 +112,12 @@ configfiles=$(wildcard $(srctree)/kernel
+@@ -112,14 +112,14 @@ configfiles=$(wildcard $(srctree)/kernel
+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
PHONY += kvmconfig
@@ -162,14 +162,17 @@ diff -Nurp linux-4.1/scripts/kconfig/Makefile linux-4.1-3rd/scripts/kconfig/Make
+kvmconfig: kvm_guest.config 3rdparty/Makefile
@:
- PHONY += tinyconfig
- tinyconfig:
-- $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
-+ $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config 3rdparty/Makefile
+ PHONY += xenconfig
+-xenconfig: xen.config
++xenconfig: xen.config 3rdparty/Makefile
+ @:
- # Help text used by make help
- help:
-@@ -176,6 +176,9 @@ gconf-objs := gconf.o zconf.tab.o
+-PHONY += tinyconfig
++PHONY += tinyconfig 3rdparty/Makefile
+ tinyconfig:
+ $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
+
+@@ -183,6 +183,9 @@ gconf-objs := gconf.o zconf.tab.o
hostprogs-y := conf nconf mconf kxgettext qconf gconf
diff --git a/kernel/kernel/files/patches/mageia/3rd-ndiswrapper-4.2-buildfix.patch b/kernel/kernel/files/patches/mageia/3rd-ndiswrapper-4.2-buildfix.patch
new file mode 100644
index 00000000..fa965f2a
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/3rd-ndiswrapper-4.2-buildfix.patch
@@ -0,0 +1,30 @@
+--- linux/3rdparty/ndiswrapper/loader.c.orig 2015-09-30 00:51:13.000000000 +0300
++++ linux/3rdparty/ndiswrapper/loader.c 2015-09-30 01:27:16.209213900 +0300
+@@ -21,6 +21,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+
+ /*
+--- linux/3rdparty/ndiswrapper/ntoskernel.c.orig 2015-09-30 00:51:13.000000000 +0300
++++ linux/3rdparty/ndiswrapper/ntoskernel.c 2015-09-30 01:29:08.011792825 +0300
+@@ -13,6 +13,7 @@
+ *
+ */
+
++#include
+ #include "ntoskernel.h"
+ #include "ndis.h"
+ #include "usb.h"
+--- linux/3rdparty/ndiswrapper/pe_linker.c.orig 2015-09-30 00:51:13.000000000 +0300
++++ linux/3rdparty/ndiswrapper/pe_linker.c 2015-09-30 01:30:49.965320953 +0300
+@@ -19,6 +19,7 @@
+
+ #else
+
++#include
+ #include
+ #include
+
diff --git a/kernel/kernel/files/patches/mageia/3rd-rtl8723bs-4.2-buildfix.patch b/kernel/kernel/files/patches/mageia/3rd-rtl8723bs-4.2-buildfix.patch
new file mode 100644
index 00000000..ef5769dc
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/3rd-rtl8723bs-4.2-buildfix.patch
@@ -0,0 +1,138 @@
+From:
+https://github.com/lwfinger/rtl8723bs/commit/49fcb39bc7dc0b7ae61463d493c0b630dc6a27ca
+
+From 49fcb39bc7dc0b7ae61463d493c0b630dc6a27ca Mon Sep 17 00:00:00 2001
+From: Larry Finger
+Date: Sat, 15 Aug 2015 10:51:20 -0500
+Subject: [PATCH] rtl8723bs: Fix builds on kernel 4.2
+
+Signed-off-by: Larry Finger
+[adapted to mga kernel / tmb]
+Signed-off-by: Thomas Backlund
+---
+ hal/hal_com_phycfg.c | 38 +++++++++++++++++++-------------------
+ os_dep/ioctl_cfg80211.c | 5 +++++
+ 2 files changed, 24 insertions(+), 19 deletions(-)
+
+ 3rdparty/rtl8723bs/hal/hal_com_phycfg.c | 38 ++++++++++++++---------------
+ 3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c | 5 +++
+ 2 files changed, 24 insertions(+), 19 deletions(-)
+
+diff -Nurp linux/3rdparty/rtl8723bs.orig/hal/hal_com_phycfg.c linux/3rdparty/rtl8723bs/hal/hal_com_phycfg.c
+--- linux/3rdparty/rtl8723bs.orig/hal/hal_com_phycfg.c 2015-09-30 00:51:13.000000000 +0300
++++ linux/3rdparty/rtl8723bs/hal/hal_com_phycfg.c 2015-09-30 01:49:37.475440016 +0300
+@@ -2254,7 +2254,7 @@ Hal_ChannelPlanToRegulation(
+ #ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
+
+ extern char *rtw_phy_file_path;
+-static char file_path[PATH_MAX];
++static char rtl_file_path[PATH_MAX];
+
+ #define GetLineFromBuffer(buffer) strsep(&buffer, "\n")
+
+@@ -2276,11 +2276,11 @@ phy_ConfigMACWithParaFile(
+
+ if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL))
+ {
+- rtw_merge_string(file_path, PATH_MAX, rtw_phy_file_path, pFileName);
++ rtw_merge_string(rtl_file_path, PATH_MAX, rtw_phy_file_path, pFileName);
+
+- if (rtw_is_file_readable(file_path) == true)
++ if (rtw_is_file_readable(rtl_file_path) == true)
+ {
+- rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
++ rlen = rtw_retrive_from_file(rtl_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
+ if (rlen > 0)
+ {
+ rtStatus = _SUCCESS;
+@@ -2375,11 +2375,11 @@ phy_ConfigBBWithParaFile(
+
+ if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL))
+ {
+- rtw_merge_string(file_path, PATH_MAX, rtw_phy_file_path, pFileName);
++ rtw_merge_string(rtl_file_path, PATH_MAX, rtw_phy_file_path, pFileName);
+
+- if (rtw_is_file_readable(file_path) == true)
++ if (rtw_is_file_readable(rtl_file_path) == true)
+ {
+- rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
++ rlen = rtw_retrive_from_file(rtl_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
+ if (rlen > 0)
+ {
+ rtStatus = _SUCCESS;
+@@ -2824,11 +2824,11 @@ phy_ConfigBBWithPgParaFile(
+
+ if ((pHalData->bb_phy_reg_pg_len == 0) && (pHalData->bb_phy_reg_pg == NULL))
+ {
+- rtw_merge_string(file_path, PATH_MAX, rtw_phy_file_path, pFileName);
++ rtw_merge_string(rtl_file_path, PATH_MAX, rtw_phy_file_path, pFileName);
+
+- if (rtw_is_file_readable(file_path) == true)
++ if (rtw_is_file_readable(rtl_file_path) == true)
+ {
+- rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
++ rlen = rtw_retrive_from_file(rtl_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
+ if (rlen > 0)
+ {
+ rtStatus = _SUCCESS;
+@@ -2904,11 +2904,11 @@ PHY_ConfigRFWithParaFile(
+
+ if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL))
+ {
+- rtw_merge_string(file_path, PATH_MAX, rtw_phy_file_path, pFileName);
++ rtw_merge_string(rtl_file_path, PATH_MAX, rtw_phy_file_path, pFileName);
+
+- if (rtw_is_file_readable(file_path) == true)
++ if (rtw_is_file_readable(rtl_file_path) == true)
+ {
+- rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
++ rlen = rtw_retrive_from_file(rtl_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
+ if (rlen > 0)
+ {
+ rtStatus = _SUCCESS;
+@@ -3178,11 +3178,11 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
+
+ if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL))
+ {
+- rtw_merge_string(file_path, PATH_MAX, rtw_phy_file_path, pFileName);
++ rtw_merge_string(rtl_file_path, PATH_MAX, rtw_phy_file_path, pFileName);
+
+- if (rtw_is_file_readable(file_path) == true)
++ if (rtw_is_file_readable(rtl_file_path) == true)
+ {
+- rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
++ rlen = rtw_retrive_from_file(rtl_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
+ if (rlen > 0)
+ {
+ rtStatus = _SUCCESS;
+@@ -3527,11 +3527,11 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
+
+ if ((pHalData->rf_tx_pwr_lmt_len == 0) && (pHalData->rf_tx_pwr_lmt == NULL))
+ {
+- rtw_merge_string(file_path, PATH_MAX, rtw_phy_file_path, pFileName);
++ rtw_merge_string(rtl_file_path, PATH_MAX, rtw_phy_file_path, pFileName);
+
+- if (rtw_is_file_readable(file_path) == true)
++ if (rtw_is_file_readable(rtl_file_path) == true)
+ {
+- rlen = rtw_retrive_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
++ rlen = rtw_retrive_from_file(rtl_file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
+ if (rlen > 0)
+ {
+ rtStatus = _SUCCESS;
+diff -Nurp linux/3rdparty/rtl8723bs.orig/os_dep/ioctl_cfg80211.c linux/3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c
+--- linux/3rdparty/rtl8723bs.orig/os_dep/ioctl_cfg80211.c 2015-09-30 00:51:13.000000000 +0300
++++ linux/3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c 2015-09-30 01:49:37.476440020 +0300
+@@ -587,7 +587,12 @@ void rtw_cfg80211_indicate_disconnect(_a
+
+ if (!padapter->mlmepriv.not_indic_disco) {
+ if(check_fwstate(&padapter->mlmepriv, _FW_LINKED))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0))
++ cfg80211_disconnected(padapter->pnetdev, 0,
++ NULL, 0, true, GFP_ATOMIC);
++#else
+ cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
++#endif
+ else
+ cfg80211_connect_result(padapter->pnetdev, NULL, NULL, 0, NULL, 0,
+ WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_ATOMIC/*GFP_KERNEL*/);
diff --git a/kernel/kernel/files/patches/mageia/Input-evdev-do-not-report-errors-form-flush.patch b/kernel/kernel/files/patches/mageia/Input-evdev-do-not-report-errors-form-flush.patch
deleted file mode 100644
index dc0b728c..00000000
--- a/kernel/kernel/files/patches/mageia/Input-evdev-do-not-report-errors-form-flush.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From eb38f3a4f6e86f8bb10a3217ebd85ecc5d763aae Mon Sep 17 00:00:00 2001
-From: Takashi Iwai
-Date: Thu, 3 Sep 2015 22:20:00 -0700
-Subject: [PATCH] Input: evdev - do not report errors form flush()
-
-We've got bug reports showing the old systemd-logind (at least
-system-210) aborting unexpectedly, and this turned out to be because
-of an invalid error code from close() call to evdev devices. close()
-is supposed to return only either EINTR or EBADFD, while the device
-returned ENODEV. logind was overreacting to it and decided to kill
-itself when an unexpected error code was received. What a tragedy.
-
-The bad error code comes from flush fops, and actually evdev_flush()
-returns ENODEV when device is disconnected or client's access to it is
-revoked. But in these cases the fact that flush did not actually happen is
-not an error, but rather normal behavior. For non-disconnected devices
-result of flush is also not that interesting as there is no potential of
-data loss and even if it fails application has no way of handling the
-error. Because of that we are better off always returning success from
-evdev_flush().
-
-Also returning EINTR from flush()/close() is discouraged (as it is not
-clear how application should handle this error), so let's stop taking
-evdev->mutex interruptibly.
-
-Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=939834
-Cc:
-Signed-off-by: Takashi Iwai
-Signed-off-by: Dmitry Torokhov
----
- drivers/input/evdev.c | 13 ++++---------
- 1 file changed, 4 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
-index 9d35499..08d4964 100644
---- a/drivers/input/evdev.c
-+++ b/drivers/input/evdev.c
-@@ -290,19 +290,14 @@ static int evdev_flush(struct file *file, fl_owner_t id)
- {
- struct evdev_client *client = file->private_data;
- struct evdev *evdev = client->evdev;
-- int retval;
-
-- retval = mutex_lock_interruptible(&evdev->mutex);
-- if (retval)
-- return retval;
-+ mutex_lock(&evdev->mutex);
-
-- if (!evdev->exist || client->revoked)
-- retval = -ENODEV;
-- else
-- retval = input_flush_device(&evdev->handle, file);
-+ if (evdev->exist && !client->revoked)
-+ input_flush_device(&evdev->handle, file);
-
- mutex_unlock(&evdev->mutex);
-- return retval;
-+ return 0;
- }
-
- static void evdev_free(struct device *dev)
---
-2.3.8
-
diff --git a/kernel/kernel/files/patches/mageia/arm-rockchip-fix-broken-build.patch b/kernel/kernel/files/patches/mageia/arm-rockchip-fix-broken-build.patch
deleted file mode 100644
index 940399c8..00000000
--- a/kernel/kernel/files/patches/mageia/arm-rockchip-fix-broken-build.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From cb8cc37f4d38d96552f2c52deb15e511cdacf906 Mon Sep 17 00:00:00 2001
-From: Caesar Wang
-Date: Mon, 6 Jul 2015 11:37:23 +0800
-Subject: [PATCH] ARM: rockchip: fix broken build
-
-The following was seen in branch[0] build.
-
-arch/arm/mach-rockchip/platsmp.c:154:23: error:
- 'rockchip_secondary_startup' undeclared (first use in this function)
-
-branch[0]:
-git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
-v4.3-armsoc/soc
-
-The broken build is caused by the commit fe4407c0dc58
-("ARM: rockchip: fix the CPU soft reset").
-
-Signed-off-by: Caesar Wang
-
-The breakage was a result of it being wrongly merged in my branch with
-the cache invalidation rework from Russell 02b4e2756e01c
-("ARM: v7 setup function should invalidate L1 cache").
-
-Signed-off-by: Heiko Stuebner
----
- arch/arm/mach-rockchip/platsmp.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
-index 7ebd1c1..3e7a4b7 100644
---- a/arch/arm/mach-rockchip/platsmp.c
-+++ b/arch/arm/mach-rockchip/platsmp.c
-@@ -152,8 +152,7 @@ static int __cpuinit rockchip_boot_secon
- * */
- mdelay(1); /* ensure the cpus other than cpu0 to startup */
-
-- writel(virt_to_phys(rockchip_secondary_startup),
-- sram_base_addr + 8);
-+ writel(virt_to_phys(secondary_startup), sram_base_addr + 8);
- writel(0xDEADBEAF, sram_base_addr + 4);
- dsb_sev();
- }
diff --git a/kernel/kernel/files/patches/mageia/block-cfq-iosched-fix-the-setting-of-IOPS-mode-on-SSDs.patch b/kernel/kernel/files/patches/mageia/block-cfq-iosched-fix-the-setting-of-IOPS-mode-on-SSDs.patch
deleted file mode 100644
index 7d188d69..00000000
--- a/kernel/kernel/files/patches/mageia/block-cfq-iosched-fix-the-setting-of-IOPS-mode-on-SSDs.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 0bb979472a7401022109e81dd89d777adea58710 Mon Sep 17 00:00:00 2001
-From: Jens Axboe
-Date: Wed, 10 Jun 2015 08:01:20 -0600
-Subject: cfq-iosched: fix the setting of IOPS mode on SSDs
-
-A previous commit wanted to make CFQ default to IOPS mode on
-non-rotational storage, however it did so when the queue was
-initialized and the non-rotational flag is only set later on
-in the probe.
-
-Add an elevator hook that gets called off the add_disk() path,
-at that point we know that feature probing has finished, and
-we can reliably check for the various flags that drivers can
-set.
-
-Fixes: 41c0126b ("block: Make CFQ default to IOPS mode on SSDs")
-Tested-by: Romain Francoise
-Signed-off-by: Jens Axboe
-
-diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
-index c808ad8..d1d0cb2 100644
---- a/block/cfq-iosched.c
-+++ b/block/cfq-iosched.c
-@@ -4508,7 +4508,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
- cfqd->cfq_slice[1] = cfq_slice_sync;
- cfqd->cfq_target_latency = cfq_target_latency;
- cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
-- cfqd->cfq_slice_idle = blk_queue_nonrot(q) ? 0 : cfq_slice_idle;
-+ cfqd->cfq_slice_idle = cfq_slice_idle;
- cfqd->cfq_group_idle = cfq_group_idle;
- cfqd->cfq_latency = 1;
- cfqd->hw_tag = -1;
-@@ -4525,6 +4525,18 @@ out_free:
- return ret;
- }
-
-+static void cfq_registered_queue(struct request_queue *q)
-+{
-+ struct elevator_queue *e = q->elevator;
-+ struct cfq_data *cfqd = e->elevator_data;
-+
-+ /*
-+ * Default to IOPS mode with no idling for SSDs
-+ */
-+ if (blk_queue_nonrot(q))
-+ cfqd->cfq_slice_idle = 0;
-+}
-+
- /*
- * sysfs parts below -->
- */
-@@ -4640,6 +4652,7 @@ static struct elevator_type iosched_cfq = {
- .elevator_may_queue_fn = cfq_may_queue,
- .elevator_init_fn = cfq_init_queue,
- .elevator_exit_fn = cfq_exit_queue,
-+ .elevator_registered_fn = cfq_registered_queue,
- },
- .icq_size = sizeof(struct cfq_io_cq),
- .icq_align = __alignof__(struct cfq_io_cq),
-diff --git a/block/elevator.c b/block/elevator.c
-index 59794d0..5f04527 100644
---- a/block/elevator.c
-+++ b/block/elevator.c
-@@ -810,6 +810,8 @@ int elv_register_queue(struct request_queue *q)
- }
- kobject_uevent(&e->kobj, KOBJ_ADD);
- e->registered = 1;
-+ if (e->type->ops.elevator_registered_fn)
-+ e->type->ops.elevator_registered_fn(q);
- }
- return error;
- }
-diff --git a/include/linux/elevator.h b/include/linux/elevator.h
-index 45a9147..638b324 100644
---- a/include/linux/elevator.h
-+++ b/include/linux/elevator.h
-@@ -39,6 +39,7 @@ typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct reques
- typedef int (elevator_init_fn) (struct request_queue *,
- struct elevator_type *e);
- typedef void (elevator_exit_fn) (struct elevator_queue *);
-+typedef void (elevator_registered_fn) (struct request_queue *);
-
- struct elevator_ops
- {
-@@ -68,6 +69,7 @@ struct elevator_ops
-
- elevator_init_fn *elevator_init_fn;
- elevator_exit_fn *elevator_exit_fn;
-+ elevator_registered_fn *elevator_registered_fn;
- };
-
- #define ELV_NAME_MAX (16)
---
-cgit v0.10.2
-
diff --git a/kernel/kernel/files/patches/mageia/fs-Revert-ext4-remove-block_device_ejected.patch b/kernel/kernel/files/patches/mageia/fs-Revert-ext4-remove-block_device_ejected.patch
deleted file mode 100644
index 9e639714..00000000
--- a/kernel/kernel/files/patches/mageia/fs-Revert-ext4-remove-block_device_ejected.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 42378f40dd5bbe59fa41b0499f10789eb5d44d89 Mon Sep 17 00:00:00 2001
-From: Thomas Backlund
-Date: Tue, 18 Aug 2015 22:24:50 +0300
-Subject: [PATCH] Revert "ext4: remove block_device_ejected"
-
-This reverts commit 08439fec266c3cc5702953b4f54bdf5649357de0.
-
-its reported on stable@ ml to break usb storage
-
-Signed-off-by: Thomas Backlund
----
- fs/ext4/super.c | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/fs/ext4/super.c b/fs/ext4/super.c
-index ca9d4a2..9829003 100644
---- a/fs/ext4/super.c
-+++ b/fs/ext4/super.c
-@@ -324,6 +324,22 @@ static void save_error_info(struct super_block *sb, const char *func,
- ext4_commit_super(sb, 1);
- }
-
-+/*
-+ * The del_gendisk() function uninitializes the disk-specific data
-+ * structures, including the bdi structure, without telling anyone
-+ * else. Once this happens, any attempt to call mark_buffer_dirty()
-+ * (for example, by ext4_commit_super), will cause a kernel OOPS.
-+ * This is a kludge to prevent these oops until we can put in a proper
-+ * hook in del_gendisk() to inform the VFS and file system layers.
-+ */
-+static int block_device_ejected(struct super_block *sb)
-+{
-+ struct inode *bd_inode = sb->s_bdev->bd_inode;
-+ struct backing_dev_info *bdi = inode_to_bdi(bd_inode);
-+
-+ return bdi->dev == NULL;
-+}
-+
- static void ext4_journal_commit_callback(journal_t *journal, transaction_t *txn)
- {
- struct super_block *sb = journal->j_private;
-@@ -4590,7 +4606,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
- struct buffer_head *sbh = EXT4_SB(sb)->s_sbh;
- int error = 0;
-
-- if (!sbh)
-+ if (!sbh || block_device_ejected(sb))
- return error;
- if (buffer_write_io_error(sbh)) {
- /*
---
-2.4.5
-
diff --git a/kernel/kernel/files/patches/mageia/fs-aufs-CVE-pending.patch b/kernel/kernel/files/patches/mageia/fs-aufs-CVE-pending.patch
deleted file mode 100644
index cec11c0f..00000000
--- a/kernel/kernel/files/patches/mageia/fs-aufs-CVE-pending.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From bbb2dddd30f6b2079dca3e805bceb55328d7cb53 Mon Sep 17 00:00:00 2001
-From: Ben Hutchings
-Date: Thu, 10 Sep 2015 20:13:47 +0100
-Subject: [PATCH] aufs mmap: bugfix, concurrent msync triggers NULL pointer
- dereference
-
-On Thu, 2015-09-03 at 01:21 +0900, sfjro@users.sourceforge.net wrote:
-> sfjro@users.sourceforge.net:
-> >
-> > Xavier Chantry:
-> > > I can reproduce the bug on all my machines, so it shouldn't be too
-> > > difficult to reproduce. Applying the following hunk is enough to trigger
-> > > the bug.
-> >
-> > Unfortunately still I don't have enough time.
-> > I understand this bug has a big impact for you and any other user who
-> > have applied aufs3-mmap.patch. As soon as I get the time, I'm sure I
-> > will dive into this problem.
->
-> I've thought about the problem a little (still I'm busy).
-> It looks like a race condition around mm->mmap_sem.
->
-> - get_file(file);
-> + vma_get_file(vma);
-> up_read(&mm->mmap_sem);
-> error = vfs_fsync(file, 0);
-> - fput(file);
-> + vma_fput(vma);
-> if (error || start >= end)
-> goto out;
-> down_read(&mm->mmap_sem);
->
-> Since this fput/vma_fput is between up(mmap_sem) and down(mmap_sem),
-> vma_fput() is not protected, and got vm_file NULL unexpectedly. It
-> means vma->vm_file is changed (or being changed) by someone else (other
-> thread in your case) after up_read(&mm->mmap_sem). This is surely a bug
-> in aufs[34]-mmap.patch. It shoule be done such like this essentially.
-> get_file(file);
-> pr = vma->vm_prfile;
-> ;;;
-> fput(file);
-> if (pr)
-> fput(pr);
->
-> The fix will look a little smarter than above.
-> I hope I can post the fix in a few weeks.
-
-I don't see any need for holding a reference to vma->vm_prfile here.
-
-There is also a similar bug in madvise_remove() which I can trigger by
-calling madvise(..., MADV_REMOVE) in parallel with another thread that
-does mmap() and munmap() of the same address range.
-
-This patch against 3.16 fixes both for me:
-
-From: Ben Hutchings
-Date: Thu, 10 Sep 2015 02:19:59 +0100
-Subject: aufs3: mmap: Fix races in madvise_remove() and sys_msync()
-Bug-Debian: https://bugs.debian.org/796036
-
-In madvise_remove() and sys_msync() we drop the mmap_sem before
-dropping references to the mapped file(s). As soon as we drop the
-mmap_sem, the vma we got them from might be destroyed by another
-thread, so calling vma_do_fput() is a possible use-after-free.
-
-In these cases we don't actually need a reference to the aufs file, so
-revert to using get_file() and fput() directly.
-
-Signed-off-by: Ben Hutchings
-Signed-off-by: J. R. Okajima
-(cherry picked from commit 9a6882cd8c6ec75a6393f80e743bf6b2bb91420e)
-
-Conflicts:
- mm/msync.c
----
- mm/madvise.c | 4 ++--
- mm/msync.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/mm/madvise.c b/mm/madvise.c
-index 1ebf71b..d551475 100644
---- a/mm/madvise.c
-+++ b/mm/madvise.c
-@@ -320,12 +320,12 @@ static long madvise_remove(struct vm_area_struct *vma,
- * vma's reference to the file) can go away as soon as we drop
- * mmap_sem.
- */
-- vma_get_file(vma);
-+ get_file(f);
- up_read(¤t->mm->mmap_sem);
- error = vfs_fallocate(f,
- FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- offset, end - start);
-- vma_fput(vma);
-+ fput(f);
- down_read(¤t->mm->mmap_sem);
- return error;
- }
-diff --git a/mm/msync.c b/mm/msync.c
-index 5c24c54..bb04d53 100644
---- a/mm/msync.c
-+++ b/mm/msync.c
-@@ -84,10 +84,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
- start = vma->vm_end;
- if ((flags & MS_SYNC) && file &&
- (vma->vm_flags & VM_SHARED)) {
-- vma_get_file(vma);
-+ get_file(file);
- up_read(&mm->mmap_sem);
- error = vfs_fsync_range(file, fstart, fend, 1);
-- vma_fput(vma);
-+ fput(file);
- if (error || start >= end)
- goto out;
- down_read(&mm->mmap_sem);
diff --git a/kernel/kernel/files/patches/mageia/fs-aufs4-modular.patch b/kernel/kernel/files/patches/mageia/fs-aufs4-modular.patch
index c1fa58a0..6c9e9f9c 100644
--- a/kernel/kernel/files/patches/mageia/fs-aufs4-modular.patch
+++ b/kernel/kernel/files/patches/mageia/fs-aufs4-modular.patch
@@ -14,9 +14,9 @@
security/security.c | 10 ++++++++++
13 files changed, 36 insertions(+), 1 deletion(-)
-diff -Nurp linux-4.1-aufs4/fs/aufs/Kconfig linux-4.1-aufs4-mod/fs/aufs/Kconfig
---- linux-4.1-aufs4/fs/aufs/Kconfig 2015-06-25 20:09:18.250319377 +0200
-+++ linux-4.1-aufs4-mod/fs/aufs/Kconfig 2015-06-25 20:11:30.629136790 +0200
+diff -Nurp linux-4.2.2-aufs4/fs/aufs/Kconfig linux-4.2.2-aufs4-mod/fs/aufs/Kconfig
+--- linux-4.2.2-aufs4/fs/aufs/Kconfig 2015-09-29 23:28:44.631823736 +0300
++++ linux-4.2.2-aufs4-mod/fs/aufs/Kconfig 2015-09-29 23:48:32.711006787 +0300
@@ -1,5 +1,5 @@
config AUFS_FS
- bool "Aufs (Advanced multi layered unification filesystem) support"
@@ -24,10 +24,10 @@ diff -Nurp linux-4.1-aufs4/fs/aufs/Kconfig linux-4.1-aufs4-mod/fs/aufs/Kconfig
help
Aufs is a stackable unification filesystem such as Unionfs,
which unifies several directories and provides a merged single
-diff -Nurp linux-4.1-aufs4/fs/dcache.c linux-4.1-aufs4-mod/fs/dcache.c
---- linux-4.1-aufs4/fs/dcache.c 2015-06-25 20:09:18.280319109 +0200
-+++ linux-4.1-aufs4-mod/fs/dcache.c 2015-06-25 20:11:30.629136790 +0200
-@@ -1269,6 +1269,7 @@ rename_retry:
+diff -Nurp linux-4.2.2-aufs4/fs/dcache.c linux-4.2.2-aufs4-mod/fs/dcache.c
+--- linux-4.2.2-aufs4/fs/dcache.c 2015-09-29 23:28:44.644823810 +0300
++++ linux-4.2.2-aufs4-mod/fs/dcache.c 2015-09-29 23:48:32.711006787 +0300
+@@ -1272,6 +1272,7 @@ rename_retry:
seq = 1;
goto again;
}
@@ -35,9 +35,9 @@ diff -Nurp linux-4.1-aufs4/fs/dcache.c linux-4.1-aufs4-mod/fs/dcache.c
/*
* Search for at least 1 mount point in the dentry's subdirs.
-diff -Nurp linux-4.1-aufs4/fs/file_table.c linux-4.1-aufs4-mod/fs/file_table.c
---- linux-4.1-aufs4/fs/file_table.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/fs/file_table.c 2015-06-25 23:47:57.011958835 +0200
+diff -Nurp linux-4.2.2-aufs4/fs/file_table.c linux-4.2.2-aufs4-mod/fs/file_table.c
+--- linux-4.2.2-aufs4/fs/file_table.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/fs/file_table.c 2015-09-29 23:48:32.711006787 +0300
@@ -147,6 +147,7 @@ over:
}
return ERR_PTR(-ENFILE);
@@ -52,11 +52,11 @@ diff -Nurp linux-4.1-aufs4/fs/file_table.c linux-4.1-aufs4-mod/fs/file_table.c
}
+EXPORT_SYMBOL(put_filp);
- void __init files_init(unsigned long mempages)
+ void __init files_init(void)
{
-diff -Nurp linux-4.1-aufs4/fs/inode.c linux-4.1-aufs4-mod/fs/inode.c
---- linux-4.1-aufs4/fs/inode.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/fs/inode.c 2015-06-25 22:45:45.000000000 +0200
+diff -Nurp linux-4.2.2-aufs4/fs/inode.c linux-4.2.2-aufs4-mod/fs/inode.c
+--- linux-4.2.2-aufs4/fs/inode.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/fs/inode.c 2015-09-29 23:48:32.712006792 +0300
@@ -58,6 +58,7 @@ static struct hlist_head *inode_hashtabl
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
@@ -65,7 +65,7 @@ diff -Nurp linux-4.1-aufs4/fs/inode.c linux-4.1-aufs4-mod/fs/inode.c
/*
* Empty aops. Can be used for the cases where the user does not
-@@ -1575,6 +1576,7 @@ static int update_time(struct inode *ino
+@@ -1581,6 +1582,7 @@ static int update_time(struct inode *ino
return update_time(inode, time, flags);
}
@@ -73,9 +73,9 @@ diff -Nurp linux-4.1-aufs4/fs/inode.c linux-4.1-aufs4-mod/fs/inode.c
/**
* touch_atime - update the access time
-diff -Nurp linux-4.1-aufs4/fs/namespace.c linux-4.1-aufs4-mod/fs/namespace.c
---- linux-4.1-aufs4/fs/namespace.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/fs/namespace.c 2015-06-25 20:11:30.629136790 +0200
+diff -Nurp linux-4.2.2-aufs4/fs/namespace.c linux-4.2.2-aufs4-mod/fs/namespace.c
+--- linux-4.2.2-aufs4/fs/namespace.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/fs/namespace.c 2015-09-29 23:48:32.712006792 +0300
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *m
mnt_dec_writers(real_mount(mnt));
preempt_enable();
@@ -84,7 +84,7 @@ diff -Nurp linux-4.1-aufs4/fs/namespace.c linux-4.1-aufs4-mod/fs/namespace.c
/**
* mnt_drop_write - give up write access to a mount
-@@ -1768,6 +1769,7 @@ int iterate_mounts(int (*f)(struct vfsmo
+@@ -1803,6 +1804,7 @@ int iterate_mounts(int (*f)(struct vfsmo
}
return 0;
}
@@ -92,9 +92,9 @@ diff -Nurp linux-4.1-aufs4/fs/namespace.c linux-4.1-aufs4-mod/fs/namespace.c
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
{
-diff -Nurp linux-4.1-aufs4/fs/notify/group.c linux-4.1-aufs4-mod/fs/notify/group.c
---- linux-4.1-aufs4/fs/notify/group.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/fs/notify/group.c 2015-06-25 20:11:30.629136790 +0200
+diff -Nurp linux-4.2.2-aufs4/fs/notify/group.c linux-4.2.2-aufs4-mod/fs/notify/group.c
+--- linux-4.2.2-aufs4/fs/notify/group.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/fs/notify/group.c 2015-09-29 23:48:32.712006792 +0300
@@ -22,6 +22,7 @@
#include
#include
@@ -127,9 +127,9 @@ diff -Nurp linux-4.1-aufs4/fs/notify/group.c linux-4.1-aufs4-mod/fs/notify/group
int fsnotify_fasync(int fd, struct file *file, int on)
{
-diff -Nurp linux-4.1-aufs4/fs/notify/mark.c linux-4.1-aufs4-mod/fs/notify/mark.c
---- linux-4.1-aufs4/fs/notify/mark.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/fs/notify/mark.c 2015-06-25 20:11:30.629136790 +0200
+diff -Nurp linux-4.2.2-aufs4/fs/notify/mark.c linux-4.2.2-aufs4-mod/fs/notify/mark.c
+--- linux-4.2.2-aufs4/fs/notify/mark.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/fs/notify/mark.c 2015-09-29 23:48:32.713006798 +0300
@@ -109,6 +109,7 @@ void fsnotify_put_mark(struct fsnotify_m
mark->free_mark(mark);
}
@@ -154,7 +154,7 @@ diff -Nurp linux-4.1-aufs4/fs/notify/mark.c linux-4.1-aufs4-mod/fs/notify/mark.c
/*
* Given a list of marks, find the mark associated with given group. If found
-@@ -455,6 +458,7 @@ void fsnotify_init_mark(struct fsnotify_
+@@ -475,6 +478,7 @@ void fsnotify_init_mark(struct fsnotify_
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
}
@@ -162,10 +162,10 @@ diff -Nurp linux-4.1-aufs4/fs/notify/mark.c linux-4.1-aufs4-mod/fs/notify/mark.c
static int fsnotify_mark_destroy(void *ignored)
{
-diff -Nurp linux-4.1-aufs4/fs/open.c linux-4.1-aufs4-mod/fs/open.c
---- linux-4.1-aufs4/fs/open.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/fs/open.c 2015-06-25 23:49:02.741362661 +0200
-@@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, l
+diff -Nurp linux-4.2.2-aufs4/fs/open.c linux-4.2.2-aufs4-mod/fs/open.c
+--- linux-4.2.2-aufs4/fs/open.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/fs/open.c 2015-09-29 23:48:32.713006798 +0300
+@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, l
mutex_unlock(&dentry->d_inode->i_mutex);
return ret;
}
@@ -173,17 +173,17 @@ diff -Nurp linux-4.1-aufs4/fs/open.c linux-4.1-aufs4-mod/fs/open.c
long vfs_truncate(struct path *path, loff_t length)
{
-@@ -676,6 +677,7 @@ int open_check_o_direct(struct file *f)
+@@ -678,6 +679,7 @@ int open_check_o_direct(struct file *f)
}
return 0;
}
+EXPORT_SYMBOL(open_check_o_direct);
static int do_dentry_open(struct file *f,
- int (*open)(struct inode *, struct file *),
-diff -Nurp linux-4.1-aufs4/fs/read_write.c linux-4.1-aufs4-mod/fs/read_write.c
---- linux-4.1-aufs4/fs/read_write.c 2015-06-25 20:09:18.280319109 +0200
-+++ linux-4.1-aufs4-mod/fs/read_write.c 2015-06-25 23:43:56.804138140 +0200
+ struct inode *inode,
+diff -Nurp linux-4.2.2-aufs4/fs/read_write.c linux-4.2.2-aufs4-mod/fs/read_write.c
+--- linux-4.2.2-aufs4/fs/read_write.c 2015-09-29 23:28:44.645823816 +0300
++++ linux-4.2.2-aufs4-mod/fs/read_write.c 2015-09-29 23:48:32.713006798 +0300
@@ -504,6 +504,7 @@ vfs_readf_t vfs_readf(struct file *file)
return new_sync_read;
return ERR_PTR(-ENOSYS);
@@ -200,10 +200,10 @@ diff -Nurp linux-4.1-aufs4/fs/read_write.c linux-4.1-aufs4-mod/fs/read_write.c
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
-diff -Nurp linux-4.1-aufs4/fs/splice.c linux-4.1-aufs4-mod/fs/splice.c
---- linux-4.1-aufs4/fs/splice.c 2015-06-25 20:09:18.280319109 +0200
-+++ linux-4.1-aufs4-mod/fs/splice.c 2015-06-25 20:11:30.629136790 +0200
-@@ -1114,6 +1114,7 @@ long do_splice_from(struct pipe_inode_in
+diff -Nurp linux-4.2.2-aufs4/fs/splice.c linux-4.2.2-aufs4-mod/fs/splice.c
+--- linux-4.2.2-aufs4/fs/splice.c 2015-09-29 23:28:44.646823822 +0300
++++ linux-4.2.2-aufs4-mod/fs/splice.c 2015-09-29 23:48:32.713006798 +0300
+@@ -1115,6 +1115,7 @@ long do_splice_from(struct pipe_inode_in
return splice_write(pipe, out, ppos, len, flags);
}
@@ -211,7 +211,7 @@ diff -Nurp linux-4.1-aufs4/fs/splice.c linux-4.1-aufs4-mod/fs/splice.c
/*
* Attempt to initiate a splice from a file to a pipe.
-@@ -1140,6 +1141,7 @@ long do_splice_to(struct file *in, loff_
+@@ -1141,6 +1142,7 @@ long do_splice_to(struct file *in, loff_
return splice_read(in, ppos, pipe, len, flags);
}
@@ -219,10 +219,10 @@ diff -Nurp linux-4.1-aufs4/fs/splice.c linux-4.1-aufs4-mod/fs/splice.c
/**
* splice_direct_to_actor - splices data directly between two non-pipes
-diff -Nurp linux-4.1-aufs4/security/commoncap.c linux-4.1-aufs4-mod/security/commoncap.c
---- linux-4.1-aufs4/security/commoncap.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/security/commoncap.c 2015-06-25 20:11:30.629136790 +0200
-@@ -975,9 +975,11 @@ int cap_mmap_addr(unsigned long addr)
+diff -Nurp linux-4.2.2-aufs4/security/commoncap.c linux-4.2.2-aufs4-mod/security/commoncap.c
+--- linux-4.2.2-aufs4/security/commoncap.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/security/commoncap.c 2015-09-29 23:56:55.210817277 +0300
+@@ -970,12 +970,14 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
@@ -234,9 +234,12 @@ diff -Nurp linux-4.1-aufs4/security/commoncap.c linux-4.1-aufs4-mod/security/com
return 0;
}
+EXPORT_SYMBOL(cap_mmap_file);
-diff -Nurp linux-4.1-aufs4/security/device_cgroup.c linux-4.1-aufs4-mod/security/device_cgroup.c
---- linux-4.1-aufs4/security/device_cgroup.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/security/device_cgroup.c 2015-06-25 20:11:30.629136790 +0200
+
+ #ifdef CONFIG_SECURITY
+
+diff -Nurp linux-4.2.2-aufs4/security/device_cgroup.c linux-4.2.2-aufs4-mod/security/device_cgroup.c
+--- linux-4.2.2-aufs4/security/device_cgroup.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/security/device_cgroup.c 2015-09-29 23:48:32.714006803 +0300
@@ -7,6 +7,7 @@
#include
#include
@@ -253,74 +256,74 @@ diff -Nurp linux-4.1-aufs4/security/device_cgroup.c linux-4.1-aufs4-mod/security
int devcgroup_inode_mknod(int mode, dev_t dev)
{
-diff -Nurp linux-4.1-aufs4/security/security.c linux-4.1-aufs4-mod/security/security.c
---- linux-4.1-aufs4/security/security.c 2015-06-22 07:05:43.000000000 +0200
-+++ linux-4.1-aufs4-mod/security/security.c 2015-06-25 20:11:30.629136790 +0200
-@@ -430,6 +430,7 @@ int security_path_rmdir(struct path *dir
+diff -Nurp linux-4.2.2-aufs4/security/security.c linux-4.2.2-aufs4-mod/security/security.c
+--- linux-4.2.2-aufs4/security/security.c 2015-08-30 21:34:09.000000000 +0300
++++ linux-4.2.2-aufs4-mod/security/security.c 2015-09-29 23:48:32.715006809 +0300
+@@ -438,6 +438,7 @@ int security_path_rmdir(struct path *dir
return 0;
- return security_ops->path_rmdir(dir, dentry);
+ return call_int_hook(path_rmdir, 0, dir, dentry);
}
+EXPORT_SYMBOL(security_path_rmdir);
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
-@@ -446,6 +447,7 @@ int security_path_symlink(struct path *d
+@@ -454,6 +455,7 @@ int security_path_symlink(struct path *d
return 0;
- return security_ops->path_symlink(dir, dentry, old_name);
+ return call_int_hook(path_symlink, 0, dir, dentry, old_name);
}
+EXPORT_SYMBOL(security_path_symlink);
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
-@@ -454,6 +456,7 @@ int security_path_link(struct dentry *ol
+@@ -462,6 +464,7 @@ int security_path_link(struct dentry *ol
return 0;
- return security_ops->path_link(old_dentry, new_dir, new_dentry);
+ return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
}
+EXPORT_SYMBOL(security_path_link);
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry,
-@@ -481,6 +484,7 @@ int security_path_truncate(struct path *
+@@ -489,6 +492,7 @@ int security_path_truncate(struct path *
return 0;
- return security_ops->path_truncate(path);
+ return call_int_hook(path_truncate, 0, path);
}
+EXPORT_SYMBOL(security_path_truncate);
int security_path_chmod(struct path *path, umode_t mode)
{
-@@ -488,6 +492,7 @@ int security_path_chmod(struct path *pat
+@@ -496,6 +500,7 @@ int security_path_chmod(struct path *pat
return 0;
- return security_ops->path_chmod(path, mode);
+ return call_int_hook(path_chmod, 0, path, mode);
}
+EXPORT_SYMBOL(security_path_chmod);
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
-@@ -495,6 +500,7 @@ int security_path_chown(struct path *pat
+@@ -503,6 +508,7 @@ int security_path_chown(struct path *pat
return 0;
- return security_ops->path_chown(path, uid, gid);
+ return call_int_hook(path_chown, 0, path, uid, gid);
}
+EXPORT_SYMBOL(security_path_chown);
int security_path_chroot(struct path *path)
{
-@@ -580,6 +586,7 @@ int security_inode_readlink(struct dentr
+@@ -588,6 +594,7 @@ int security_inode_readlink(struct dentr
return 0;
- return security_ops->inode_readlink(dentry);
+ return call_int_hook(inode_readlink, 0, dentry);
}
+EXPORT_SYMBOL(security_inode_readlink);
- int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
- {
-@@ -594,6 +601,7 @@ int security_inode_permission(struct ino
+ int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
+ bool rcu)
+@@ -603,6 +610,7 @@ int security_inode_permission(struct ino
return 0;
- return security_ops->inode_permission(inode, mask);
+ return call_int_hook(inode_permission, 0, inode, mask);
}
+EXPORT_SYMBOL(security_inode_permission);
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
-@@ -716,6 +724,7 @@ int security_file_permission(struct file
+@@ -741,6 +749,7 @@ int security_file_permission(struct file
return fsnotify_perm(file, mask);
}
@@ -328,7 +331,7 @@ diff -Nurp linux-4.1-aufs4/security/security.c linux-4.1-aufs4-mod/security/secu
int security_file_alloc(struct file *file)
{
-@@ -775,6 +784,7 @@ int security_mmap_file(struct file *file
+@@ -800,6 +809,7 @@ int security_mmap_file(struct file *file
return ret;
return ima_file_mmap(file, prot);
}
diff --git a/kernel/kernel/files/patches/mageia/fs-aufs4.patch b/kernel/kernel/files/patches/mageia/fs-aufs4.patch
index 0025b6e6..637fb5cc 100644
--- a/kernel/kernel/files/patches/mageia/fs-aufs4.patch
+++ b/kernel/kernel/files/patches/mageia/fs-aufs4.patch
@@ -1,4 +1,3 @@
-
Documentation/ABI/testing/debugfs-aufs | 50 +
Documentation/ABI/testing/sysfs-aufs | 31 +
Documentation/filesystems/aufs/README | 383 ++++
@@ -48,7 +47,7 @@
fs/aufs/hfsnotify.c | 275 +++
fs/aufs/hfsplus.c | 43 +
fs/aufs/hnotify.c | 697 ++++++++
- fs/aufs/i_op.c | 1434 +++++++++++++++
+ fs/aufs/i_op.c | 1470 ++++++++++++++++
fs/aufs/i_op_add.c | 919 ++++++++++
fs/aufs/i_op_del.c | 497 ++++++
fs/aufs/i_op_ren.c | 1004 +++++++++++
@@ -59,7 +58,7 @@
fs/aufs/loop.c | 132 ++
fs/aufs/loop.h | 39 +
fs/aufs/magic.mk | 30 +
- fs/aufs/module.c | 196 +++
+ fs/aufs/module.c | 204 +++
fs/aufs/module.h | 91 +
fs/aufs/mvdown.c | 681 ++++++++
fs/aufs/opts.c | 1822 ++++++++++++++++++++
@@ -70,13 +69,13 @@
fs/aufs/procfs.c | 156 ++
fs/aufs/rdu.c | 375 ++++
fs/aufs/rwsem.h | 178 ++
- fs/aufs/sbinfo.c | 343 ++++
+ fs/aufs/sbinfo.c | 347 ++++
fs/aufs/spl.h | 98 ++
fs/aufs/super.c | 991 +++++++++++
- fs/aufs/super.h | 622 +++++++
+ fs/aufs/super.h | 625 +++++++
fs/aufs/sysaufs.c | 91 +
fs/aufs/sysaufs.h | 88 +
- fs/aufs/sysfs.c | 336 ++++
+ fs/aufs/sysfs.c | 340 ++++
fs/aufs/sysrq.c | 144 ++
fs/aufs/vdir.c | 875 ++++++++++
fs/aufs/vfsub.c | 835 +++++++++
@@ -87,7 +86,7 @@
fs/aufs/wkq.c | 200 +++
fs/aufs/wkq.h | 78 +
fs/aufs/xattr.c | 331 ++++
- fs/aufs/xino.c | 1284 ++++++++++++++
+ fs/aufs/xino.c | 1283 ++++++++++++++
fs/buffer.c | 2 +-
fs/dcache.c | 2 +-
fs/proc/base.c | 2 +-
@@ -106,13 +105,11 @@
kernel/fork.c | 2 +-
mm/Makefile | 2 +-
mm/filemap.c | 2 +-
- mm/madvise.c | 4 +-
mm/memory.c | 2 +-
mm/mmap.c | 17 +-
- mm/msync.c | 4 +-
mm/nommu.c | 10 +-
mm/prfile.c | 86 +
- 113 files changed, 33091 insertions(+), 34 deletions(-)
+ 111 files changed, 33141 insertions(+), 30 deletions(-)
diff --git a/Documentation/ABI/testing/debugfs-aufs b/Documentation/ABI/testing/debugfs-aufs
new file mode 100644
@@ -209,7 +206,7 @@ index 0000000..82f9518
+ will be empty. About XINO files, see the aufs manual.
diff --git a/Documentation/filesystems/aufs/README b/Documentation/filesystems/aufs/README
new file mode 100644
-index 0000000..27faa06f
+index 0000000..2915102
--- /dev/null
+++ b/Documentation/filesystems/aufs/README
@@ -0,0 +1,383 @@
@@ -576,7 +573,7 @@ index 0000000..27faa06f
+The Parted Magic Project made a donation (2013/9 and 11).
+Pavel Barta made a donation (2013/10).
+Nikolay Pertsev made a donation (2014/5).
-+James B made a donation (2014/7).
++James B made a donation (2014/7 and 2015/7).
+Stefano Di Biase made a donation (2014/8).
+Daniel Epellei made a donation (2015/1).
+
@@ -1718,10 +1715,10 @@ index 0000000..9d502b5
+Currently this approach is applied to address_space_operations for
+regular files only.
diff --git a/MAINTAINERS b/MAINTAINERS
-index d8afd29..feac5ea 100644
+index b60e2b2..ae084ca 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -1880,6 +1880,19 @@ F: include/linux/audit.h
+@@ -1941,6 +1941,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
@@ -1742,10 +1739,10 @@ index d8afd29..feac5ea 100644
M: Miguel Ojeda Sandonis
W: http://miguelojeda.es/auxdisplay.htm
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index d7173cb..0160952 100644
+index f7a4c9d..23103ad 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
-@@ -540,6 +540,24 @@ static inline int is_loop_device(struct file *file)
+@@ -560,6 +560,24 @@ static inline int is_loop_device(struct file *file)
return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
}
@@ -1783,10 +1780,10 @@ index 011f433..b1083f6 100644
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
-index cb92fd4..8c2df12 100644
+index cb20e4b..dd81418 100644
--- a/fs/Makefile
+++ b/fs/Makefile
-@@ -127,3 +127,4 @@ obj-y += exofs/ # Multiple modules
+@@ -126,3 +126,4 @@ obj-y += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
@@ -14453,10 +14450,10 @@ index 0000000..3943dc4
+}
diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c
new file mode 100644
-index 0000000..20f26b2
+index 0000000..a50cd4c
--- /dev/null
+++ b/fs/aufs/i_op.c
-@@ -0,0 +1,1434 @@
+@@ -0,0 +1,1470 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ */
@@ -15688,101 +15685,137 @@ index 0000000..20f26b2
+
+/* ---------------------------------------------------------------------- */
+
-+static int h_readlink(struct dentry *dentry, int bindex, char __user *buf,
-+ int bufsiz)
++/*
++ * Assumption:
++ * - the number of symlinks is not so many.
++ *
++ * Structure:
++ * - sbinfo (instead of iinfo) contains an hlist of struct au_symlink.
++ * If iinfo contained the hlist, then it would be rather large waste of memory
++ * I am afraid.
++ * - struct au_symlink contains the necessary info for h_inode follow_link() and
++ * put_link().
++ */
++
++struct au_symlink {
++ union {
++ struct hlist_node hlist;
++ struct rcu_head rcu;
++ };
++
++ struct inode *h_inode;
++ void *h_cookie;
++};
++
++static void au_symlink_add(struct super_block *sb, struct au_symlink *slink,
++ struct inode *h_inode, void *cookie)
+{
-+ int err;
-+ struct super_block *sb;
-+ struct dentry *h_dentry;
++ struct au_sbinfo *sbinfo;
++
++ ihold(h_inode);
++ slink->h_inode = h_inode;
++ slink->h_cookie = cookie;
++ sbinfo = au_sbi(sb);
++ au_sphl_add(&slink->hlist, &sbinfo->si_symlink);
++}
++
++static void au_symlink_del(struct super_block *sb, struct au_symlink *slink)
++{
++ struct au_sbinfo *sbinfo;
++
++ /* do not iput() within rcu */
++ iput(slink->h_inode);
++ slink->h_inode = NULL;
++ sbinfo = au_sbi(sb);
++ au_sphl_del_rcu(&slink->hlist, &sbinfo->si_symlink);
++ kfree_rcu(slink, rcu);
++}
++
++static const char *aufs_follow_link(struct dentry *dentry, void **cookie)
++{
++ const char *ret;
+ struct inode *inode, *h_inode;
++ struct dentry *h_dentry;
++ struct au_symlink *slink;
++ int err;
++ aufs_bindex_t bindex;
++
++ ret = NULL; /* suppress a warning */
++ err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
++ if (unlikely(err))
++ goto out;
++
++ err = au_d_hashed_positive(dentry);
++ if (unlikely(err))
++ goto out_unlock;
+
+ err = -EINVAL;
-+ h_dentry = au_h_dptr(dentry, bindex);
-+ h_inode = d_inode(h_dentry);
-+ if (unlikely(!h_inode->i_op->readlink))
-+ goto out;
-+
-+ err = security_inode_readlink(h_dentry);
-+ if (unlikely(err))
-+ goto out;
-+
-+ sb = dentry->d_sb;
+ inode = d_inode(dentry);
-+ if (!au_test_ro(sb, bindex, inode)) {
-+ vfsub_touch_atime(au_sbr_mnt(sb, bindex), h_dentry);
-+ fsstack_copy_attr_atime(inode, h_inode);
-+ }
-+ err = h_inode->i_op->readlink(h_dentry, buf, bufsiz);
-+
-+out:
-+ return err;
-+}
-+
-+static int aufs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
-+{
-+ int err;
-+
-+ err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
-+ if (unlikely(err))
-+ goto out;
-+ err = au_d_hashed_positive(dentry);
-+ if (!err)
-+ err = h_readlink(dentry, au_dbstart(dentry), buf, bufsiz);
-+ aufs_read_unlock(dentry, AuLock_IR);
-+
-+out:
-+ return err;
-+}
-+
-+static void *aufs_follow_link(struct dentry *dentry, struct nameidata *nd)
-+{
-+ int err;
-+ mm_segment_t old_fs;
-+ union {
-+ char *k;
-+ char __user *u;
-+ } buf;
++ bindex = au_ibstart(inode);
++ h_inode = au_h_iptr(inode, bindex);
++ if (unlikely(!h_inode->i_op->follow_link))
++ goto out_unlock;
+
+ err = -ENOMEM;
-+ buf.k = (void *)__get_free_page(GFP_NOFS);
-+ if (unlikely(!buf.k))
-+ goto out;
++ slink = kmalloc(sizeof(*slink), GFP_NOFS);
++ if (unlikely(!slink))
++ goto out_unlock;
+
-+ err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
-+ if (unlikely(err))
-+ goto out_name;
-+
-+ err = au_d_hashed_positive(dentry);
-+ if (!err) {
-+ old_fs = get_fs();
-+ set_fs(KERNEL_DS);
-+ err = h_readlink(dentry, au_dbstart(dentry), buf.u, PATH_MAX);
-+ set_fs(old_fs);
++ err = -EBUSY;
++ h_dentry = NULL;
++ if (au_dbstart(dentry) <= bindex) {
++ h_dentry = au_h_dptr(dentry, bindex);
++ if (h_dentry)
++ dget(h_dentry);
+ }
++ if (!h_dentry) {
++ h_dentry = d_find_any_alias(h_inode);
++ if (IS_ERR(h_dentry)) {
++ err = PTR_ERR(h_dentry);
++ goto out_free;
++ }
++ }
++ if (unlikely(!h_dentry))
++ goto out_free;
++
++ err = 0;
++ AuDbg("%pf\n", h_inode->i_op->follow_link);
++ AuDbgDentry(h_dentry);
++ ret = h_inode->i_op->follow_link(h_dentry, cookie);
++ dput(h_dentry);
++
++ if (!IS_ERR_OR_NULL(ret)) {
++ au_symlink_add(inode->i_sb, slink, h_inode, *cookie);
++ *cookie = slink;
++ AuDbg("slink %p\n", slink);
++ goto out_unlock; /* success */
++ }
++
++out_free:
++ slink->h_inode = NULL;
++ kfree_rcu(slink, rcu);
++out_unlock:
+ aufs_read_unlock(dentry, AuLock_IR);
-+
-+ if (err >= 0) {
-+ buf.k[err] = 0;
-+ /* will be freed by put_link */
-+ nd_set_link(nd, buf.k);
-+ return NULL; /* success */
-+ }
-+
-+out_name:
-+ free_page((unsigned long)buf.k);
+out:
-+ AuTraceErr(err);
-+ return ERR_PTR(err);
++ if (unlikely(err))
++ ret = ERR_PTR(err);
++ AuTraceErrPtr(ret);
++ return ret;
+}
+
-+static void aufs_put_link(struct dentry *dentry __maybe_unused,
-+ struct nameidata *nd, void *cookie __maybe_unused)
++static void aufs_put_link(struct inode *inode, void *cookie)
+{
-+ char *p;
++ struct au_symlink *slink;
++ struct inode *h_inode;
+
-+ p = nd_get_link(nd);
-+ if (!IS_ERR_OR_NULL(p))
-+ free_page((unsigned long)p);
++ slink = cookie;
++ AuDbg("slink %p\n", slink);
++ h_inode = slink->h_inode;
++ AuDbg("%pf\n", h_inode->i_op->put_link);
++ AuDbgInode(h_inode);
++ if (h_inode->i_op->put_link)
++ h_inode->i_op->put_link(h_inode, slink->h_cookie);
++ au_symlink_del(inode->i_sb, slink);
+}
+
+/* ---------------------------------------------------------------------- */
@@ -15833,7 +15866,7 @@ index 0000000..20f26b2
+ .removexattr = aufs_removexattr,
+#endif
+
-+ .readlink = aufs_readlink,
++ .readlink = generic_readlink,
+ .follow_link = aufs_follow_link,
+ .put_link = aufs_put_link,
+
@@ -20191,10 +20224,10 @@ index 0000000..4f83bdf
+endif
diff --git a/fs/aufs/module.c b/fs/aufs/module.c
new file mode 100644
-index 0000000..64b6fdc
+index 0000000..a7a4b364
--- /dev/null
+++ b/fs/aufs/module.c
-@@ -0,0 +1,196 @@
+@@ -0,0 +1,204 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ */
@@ -20303,7 +20336,15 @@ index 0000000..64b6fdc
+
+int au_seq_path(struct seq_file *seq, struct path *path)
+{
-+ return seq_path(seq, path, au_esc_chars);
++ int err;
++
++ err = seq_path(seq, path, au_esc_chars);
++ if (err > 0)
++ err = 0;
++ else if (err < 0)
++ err = -ENOMEM;
++
++ return err;
+}
+
+/* ---------------------------------------------------------------------- */
@@ -24593,10 +24634,10 @@ index 0000000..171ee0c
+#endif /* __AUFS_RWSEM_H__ */
diff --git a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c
new file mode 100644
-index 0000000..5793673
+index 0000000..cb7ac83
--- /dev/null
+++ b/fs/aufs/sbinfo.c
-@@ -0,0 +1,343 @@
+@@ -0,0 +1,347 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ */
@@ -24621,6 +24662,8 @@ index 0000000..5793673
+ AuDebugOn(!hlist_empty(&sbinfo->si_plink[i].head));
+ AuDebugOn(atomic_read(&sbinfo->si_nowait.nw_len));
+
++ AuDebugOn(!hlist_empty(&sbinfo->si_symlink.head));
++
+ au_rw_write_lock(&sbinfo->si_rwsem);
+ au_br_free(sbinfo);
+ au_rw_write_unlock(&sbinfo->si_rwsem);
@@ -24687,6 +24730,8 @@ index 0000000..5793673
+
+ sbinfo->si_mntflags = au_opts_plink(AuOpt_Def);
+
++ au_sphl_init(&sbinfo->si_symlink);
++
+ sbinfo->si_xino_jiffy = jiffies;
+ sbinfo->si_xino_expire
+ = msecs_to_jiffies(AUFS_XINO_DEF_SEC * MSEC_PER_SEC);
@@ -25046,7 +25091,7 @@ index 0000000..a66d39e
+#endif /* __AUFS_SPL_H__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
new file mode 100644
-index 0000000..ee5780d
+index 0000000..7ae6ea1
--- /dev/null
+++ b/fs/aufs/super.c
@@ -0,0 +1,991 @@
@@ -25143,7 +25188,7 @@ index 0000000..ee5780d
+ path.mnt = au_br_mnt(br);
+ path.dentry = hdp[bindex].hd_dentry;
+ err = au_seq_path(seq, &path);
-+ if (err > 0) {
++ if (!err) {
+ au_optstr_br_perm(&perm, br->br_perm);
+ err = seq_printf(seq, "=%s", perm.a);
+ if (err == -1)
@@ -26043,10 +26088,10 @@ index 0000000..ee5780d
+};
diff --git a/fs/aufs/super.h b/fs/aufs/super.h
new file mode 100644
-index 0000000..f37d89d
+index 0000000..8ec54fa
--- /dev/null
+++ b/fs/aufs/super.h
-@@ -0,0 +1,622 @@
+@@ -0,0 +1,625 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ */
@@ -26179,6 +26224,9 @@ index 0000000..f37d89d
+ /* include/asm-ia64/siginfo.h defines a macro named si_flags */
+ unsigned int si_mntflags;
+
++ /* symlink to follow_link() and put_link() */
++ struct au_sphlhead si_symlink;
++
+ /* external inode number (bitmap and translation table) */
+ vfs_readf_t si_xread;
+ vfs_writef_t si_xwrite;
@@ -26862,10 +26910,10 @@ index 0000000..feb78fd
+#endif /* __SYSAUFS_H__ */
diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c
new file mode 100644
-index 0000000..75cc82a
+index 0000000..cc74d02
--- /dev/null
+++ b/fs/aufs/sysfs.c
-@@ -0,0 +1,336 @@
+@@ -0,0 +1,340 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ */
@@ -26929,9 +26977,11 @@ index 0000000..75cc82a
+ case AuBrSysfs_BR:
+ path.mnt = au_br_mnt(br);
+ path.dentry = au_h_dptr(root, bindex);
-+ au_seq_path(seq, &path);
-+ au_optstr_br_perm(&perm, br->br_perm);
-+ err = seq_printf(seq, "=%s\n", perm.a);
++ err = au_seq_path(seq, &path);
++ if (!err) {
++ au_optstr_br_perm(&perm, br->br_perm);
++ err = seq_printf(seq, "=%s\n", perm.a);
++ }
+ break;
+ case AuBrSysfs_BRID:
+ err = seq_printf(seq, "%d\n", br->br_id);
@@ -27092,7 +27142,9 @@ index 0000000..75cc82a
+ if (unlikely(err))
+ break;
+
-+ au_seq_path(seq, &br->br_path);
++ err = au_seq_path(seq, &br->br_path);
++ if (unlikely(err))
++ break;
+ err = seq_putc(seq, '\0');
+ if (!err && seq->count <= sz) {
+ err = copy_to_user(arg->path, seq->buf, seq->count);
@@ -31874,10 +31926,10 @@ index 0000000..c1695b3
+#endif
diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c
new file mode 100644
-index 0000000..8a2ddac
+index 0000000..f377ce5
--- /dev/null
+++ b/fs/aufs/xino.c
-@@ -0,0 +1,1284 @@
+@@ -0,0 +1,1283 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ */
@@ -33149,10 +33201,9 @@ index 0000000..8a2ddac
+ int err;
+
+ err = au_seq_path(seq, &file->f_path);
-+ if (unlikely(err < 0))
++ if (unlikely(err))
+ goto out;
+
-+ err = 0;
+#define Deleted "\\040(deleted)"
+ seq->count -= sizeof(Deleted) - 1;
+ AuDebugOn(memcmp(seq->buf + seq->count, Deleted,
@@ -33163,10 +33214,10 @@ index 0000000..8a2ddac
+ return err;
+}
diff --git a/fs/buffer.c b/fs/buffer.c
-index c7a5602..8c50a22 100644
+index 1cf7a53..076aff8 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
-@@ -2450,7 +2450,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
+@@ -2473,7 +2473,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
* Update file times before taking page lock. We may end up failing the
* fault so this update may be superfluous but who really cares...
*/
@@ -33176,10 +33227,10 @@ index c7a5602..8c50a22 100644
ret = __block_page_mkwrite(vma, vmf, get_block);
sb_end_pagefault(sb);
diff --git a/fs/dcache.c b/fs/dcache.c
-index 37b5afd..bc261e2 100644
+index 9b5fe50..aa8310e 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
-@@ -1164,7 +1164,7 @@ enum d_walk_ret {
+@@ -1167,7 +1167,7 @@ enum d_walk_ret {
*
* The @enter() and @finish() callbacks are called with d_lock held.
*/
@@ -33189,10 +33240,10 @@ index 37b5afd..bc261e2 100644
void (*finish)(void *))
{
diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 093ca14..fc1ac03 100644
+index aa50d1a..f219321 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
-@@ -1744,7 +1744,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
+@@ -1939,7 +1939,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
down_read(&mm->mmap_sem);
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
@@ -33202,7 +33253,7 @@ index 093ca14..fc1ac03 100644
rc = 0;
}
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index d4a3574..1397181 100644
+index f8595e8..cb8eda0 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
@@ -33218,7 +33269,7 @@ index d4a3574..1397181 100644
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 6dee68d..9afa35d 100644
+index ca1e091..8940e47 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -279,7 +279,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
@@ -33243,7 +33294,7 @@ index 6dee68d..9afa35d 100644
struct mm_walk walk = {
.hugetlb_entry = gather_hugetlb_stats,
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index 599ec2e..1740207 100644
+index e0d64c9..7aa92db 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -160,7 +160,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
@@ -33292,10 +33343,10 @@ index 819ef3f..fd0414e 100644
{
mm_segment_t old_fs;
diff --git a/fs/splice.c b/fs/splice.c
-index bfe62ae..fa5eee5 100644
+index 5fc1e50..5f8385a 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1101,8 +1101,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1102,8 +1102,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@@ -33306,7 +33357,7 @@ index bfe62ae..fa5eee5 100644
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -1118,9 +1118,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1119,9 +1119,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
@@ -33332,10 +33383,10 @@ index f87d308..9a290b3 100644
static inline void fput_light(struct file *file, int fput_needed)
{
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 35ec87e..3229f97 100644
+index 84b783f..0e3fd62 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1649,6 +1649,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
+@@ -1677,6 +1677,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer,
struct iovec **ret_pointer);
@@ -33349,10 +33400,10 @@ index 35ec87e..3229f97 100644
extern ssize_t __vfs_write(struct file *, const char __user *, size_t, loff_t *);
extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 0755b9f..2ee5500 100644
+index bf6f117..65977ac9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
-@@ -1172,6 +1172,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
+@@ -1201,6 +1201,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
}
#endif
@@ -33382,10 +33433,10 @@ index 0755b9f..2ee5500 100644
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
void *buf, int len, int write);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 8d37e26..ce89d4c 100644
+index 1554957..9697ae1 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
-@@ -241,6 +241,7 @@ struct vm_region {
+@@ -250,6 +250,7 @@ struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
@@ -33393,7 +33444,7 @@ index 8d37e26..ce89d4c 100644
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -305,6 +306,7 @@ struct vm_area_struct {
+@@ -314,6 +315,7 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units, *not* PAGE_CACHE_SIZE */
struct file * vm_file; /* File we map to (can be NULL). */
@@ -33417,7 +33468,7 @@ index da2751d..2e0fca6 100644
+ unsigned int flags);
#endif
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
-index 1a0006a..ddad01a 100644
+index 1ff9942..31efc0a 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -59,6 +59,7 @@ header-y += atmsvc.h
@@ -33430,7 +33481,7 @@ index 1a0006a..ddad01a 100644
header-y += auxvec.h
diff --git a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h
new file mode 100644
-index 0000000..a06c985
+index 0000000..9822d76
--- /dev/null
+++ b/include/uapi/linux/aufs_type.h
@@ -0,0 +1,406 @@
@@ -33462,7 +33513,7 @@ index 0000000..a06c985
+
+#include
+
-+#define AUFS_VERSION "4.x-rcN"
++#define AUFS_VERSION "4.2"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
@@ -33841,10 +33892,10 @@ index 0000000..a06c985
+
+#endif /* __AUFS_TYPE_H__ */
diff --git a/kernel/fork.c b/kernel/fork.c
-index 03c1eaa..7e215ba 100644
+index dbd9b8d..4549e0d 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
-@@ -456,7 +456,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
+@@ -461,7 +461,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
struct inode *inode = file_inode(file);
struct address_space *mapping = file->f_mapping;
@@ -33867,10 +33918,10 @@ index 98c4eae..3f0c9b9 100644
obj-y += init-mm.o
diff --git a/mm/filemap.c b/mm/filemap.c
-index 6bf5e42..a863d0f 100644
+index 1283fc8..128f18f 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
-@@ -2062,7 +2062,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+@@ -2089,7 +2089,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
int ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
@@ -33879,27 +33930,8 @@ index 6bf5e42..a863d0f 100644
lock_page(page);
if (page->mapping != inode->i_mapping) {
unlock_page(page);
-diff --git a/mm/madvise.c b/mm/madvise.c
-index d551475..1ebf71b 100644
---- a/mm/madvise.c
-+++ b/mm/madvise.c
-@@ -320,12 +320,12 @@ static long madvise_remove(struct vm_area_struct *vma,
- * vma's reference to the file) can go away as soon as we drop
- * mmap_sem.
- */
-- get_file(f);
-+ vma_get_file(vma);
- up_read(¤t->mm->mmap_sem);
- error = vfs_fallocate(f,
- FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- offset, end - start);
-- fput(f);
-+ vma_fput(vma);
- down_read(¤t->mm->mmap_sem);
- return error;
- }
diff --git a/mm/memory.c b/mm/memory.c
-index 22e037e..62096a2 100644
+index 388dcf9..ee1a3ef 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2034,7 +2034,7 @@ static inline int wp_page_reuse(struct mm_struct *mm,
@@ -33912,7 +33944,7 @@ index 22e037e..62096a2 100644
return VM_FAULT_WRITE;
diff --git a/mm/mmap.c b/mm/mmap.c
-index bb50cac..1ab5e596 100644
+index aa632ad..3ff75d3 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -274,7 +274,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
@@ -33991,28 +34023,11 @@ index bb50cac..1ab5e596 100644
if (new_vma->vm_ops && new_vma->vm_ops->open)
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
-diff --git a/mm/msync.c b/mm/msync.c
-index bb04d53..5c24c54 100644
---- a/mm/msync.c
-+++ b/mm/msync.c
-@@ -84,10 +84,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
- start = vma->vm_end;
- if ((flags & MS_SYNC) && file &&
- (vma->vm_flags & VM_SHARED)) {
-- get_file(file);
-+ vma_get_file(vma);
- up_read(&mm->mmap_sem);
- error = vfs_fsync_range(file, fstart, fend, 1);
-- fput(file);
-+ vma_fput(vma);
- if (error || start >= end)
- goto out;
- down_read(&mm->mmap_sem);
diff --git a/mm/nommu.c b/mm/nommu.c
-index e544508..dd6f74a 100644
+index 58ea364..f937b7e 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
-@@ -693,7 +693,7 @@ static void __put_nommu_region(struct vm_region *region)
+@@ -671,7 +671,7 @@ static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
if (region->vm_file)
@@ -34021,7 +34036,7 @@ index e544508..dd6f74a 100644
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
-@@ -858,7 +858,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -829,7 +829,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
@@ -34030,7 +34045,7 @@ index e544508..dd6f74a 100644
put_nommu_region(vma->vm_region);
kmem_cache_free(vm_area_cachep, vma);
}
-@@ -1398,7 +1398,7 @@ unsigned long do_mmap_pgoff(struct file *file,
+@@ -1354,7 +1354,7 @@ unsigned long do_mmap_pgoff(struct file *file,
goto error_just_free;
}
}
@@ -34039,7 +34054,7 @@ index e544508..dd6f74a 100644
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
-@@ -1474,10 +1474,10 @@ error_just_free:
+@@ -1429,10 +1429,10 @@ error_just_free:
up_write(&nommu_region_sem);
error:
if (region->vm_file)
@@ -34050,11 +34065,11 @@ index e544508..dd6f74a 100644
- fput(vma->vm_file);
+ vma_fput(vma);
kmem_cache_free(vm_area_cachep, vma);
- kleave(" = %d", ret);
return ret;
+
diff --git a/mm/prfile.c b/mm/prfile.c
new file mode 100644
-index 0000000..6aa5ab5
+index 0000000..b323b8a
--- /dev/null
+++ b/mm/prfile.c
@@ -0,0 +1,86 @@
@@ -34079,7 +34094,7 @@ index 0000000..6aa5ab5
+{
+#ifdef PRFILE_TRACE
+ if (pr)
-+ pr_info("%s:%d: %s, %p\n", func, line, func2,
++ pr_info("%s:%d: %s, %s\n", func, line, func2,
+ f ? (char *)f->f_path.dentry->d_name.name : "(null)");
+#endif
+}
diff --git a/kernel/kernel/files/patches/mageia/gpu-drm-mach64.patch b/kernel/kernel/files/patches/mageia/gpu-drm-mach64.patch
index be3e1631..9ab07df9 100644
--- a/kernel/kernel/files/patches/mageia/gpu-drm-mach64.patch
+++ b/kernel/kernel/files/patches/mageia/gpu-drm-mach64.patch
@@ -4134,10 +4134,10 @@ head: c99566fb810c9d8cae5e9cd39d1772b55e2f514c
depends on DRM && PCI
--- linux/drivers/gpu/drm/Makefile.gpu-drm-mach64.orig
+++ linux/drivers/gpu/drm/Makefile
-@@ -39,6 +39,7 @@ obj-$(CONFIG_DRM_TDFX) += tdfx/
- obj-$(CONFIG_DRM_R128) += r128/
+@@ -38,6 +38,7 @@ obj-$(CONFIG_DRM_R128) += r128/
obj-$(CONFIG_HSA_AMD) += amd/amdkfd/
obj-$(CONFIG_DRM_RADEON)+= radeon/
+ obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
+obj-$(CONFIG_DRM_MACH64)+= mach64/
obj-$(CONFIG_DRM_MGA) += mga/
obj-$(CONFIG_DRM_I810) += i810/
diff --git a/kernel/kernel/files/patches/mageia/net-netfilter-psd-mdv.patch b/kernel/kernel/files/patches/mageia/net-netfilter-psd-mdv.patch
index 3b5c94d5..6bcf06dd 100644
--- a/kernel/kernel/files/patches/mageia/net-netfilter-psd-mdv.patch
+++ b/kernel/kernel/files/patches/mageia/net-netfilter-psd-mdv.patch
@@ -208,7 +208,7 @@ diff -p -up linux-2.6.28/net/ipv4/netfilter/ipt_psd.c.orig linux-2.6.28/net/ipv4
+module_exit(ipt_psd_fini);
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
-@@ -69,6 +69,14 @@ config IP_NF_MATCH_ECN
+@@ -193,6 +193,14 @@ config IP_NF_MATCH_ECN
(e.g. when running oldconfig). It selects
CONFIG_NETFILTER_XT_MATCH_ECN.
@@ -222,7 +222,7 @@ diff -p -up linux-2.6.28/net/ipv4/netfilter/ipt_psd.c.orig linux-2.6.28/net/ipv4
+
config IP_NF_MATCH_RPFILTER
tristate '"rpfilter" reverse path filter match support'
- depends on NETFILTER_ADVANCED && (IP_NF_MANGLE || IP_NF_RAW)
+ depends on NETFILTER_ADVANCED
--- linux/include/uapi/linux/netfilter_ipv4/Kbuild.orig
+++ linux/include/uapi/linux/netfilter_ipv4/Kbuild
@@ -8,4 +8,5 @@ header-y += ipt_REJECT.h
diff --git a/kernel/kernel/files/patches/mageia/pci-acs-quirks-for-Intel-9-series-PCH-root-ports.patch b/kernel/kernel/files/patches/mageia/pci-acs-quirks-for-Intel-9-series-PCH-root-ports.patch
deleted file mode 100644
index 937447d3..00000000
--- a/kernel/kernel/files/patches/mageia/pci-acs-quirks-for-Intel-9-series-PCH-root-ports.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Alex Williamson
-Subject: [PATCH] PCI: ACS quirks for Intel 9-series PCH root ports
-Date: Fri, 01 May 2015 13:20:13 -0600
-
-Intel confirms that 9-series chipset root ports provide ACS-equivalent
-isolation when configured via the existing Intel PCH ACS quirk setup.
-
-Signed-off-by: Alex Williamson
-Acked-by: Don Dugger
-
----
- drivers/pci/quirks.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
-index c6dc1df..f126bd6 100644
---- a/drivers/pci/quirks.c
-+++ b/drivers/pci/quirks.c
-@@ -3740,6 +3740,8 @@ static const u16 pci_quirk_intel_pch_acs_ids[] = {
- /* Wellsburg (X99) PCH */
- 0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15, 0x8d16, 0x8d17,
- 0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d1d, 0x8d1e,
-+ /* Lynx Point (9 series) PCH */
-+ 0x8c90, 0x8c92, 0x8c94, 0x8c96, 0x8c98, 0x8c9a, 0x8c9c, 0x8c9e,
- };
-
- static bool pci_quirk_intel_pch_acs_match(struct pci_dev *dev)
-
diff --git a/kernel/kernel/files/patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch b/kernel/kernel/files/patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch
new file mode 100644
index 00000000..ee0d5849
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch
@@ -0,0 +1,19 @@
+--- linux/drivers/platform/x86/shuttle-wmi.c.orig 2015-09-30 00:51:13.000000000 +0300
++++ linux/drivers/platform/x86/shuttle-wmi.c 2015-09-30 02:04:20.808458393 +0300
+@@ -26,6 +26,7 @@
+ #include
+ #include
+ #include
++#include
+
+ MODULE_AUTHOR("Herton Ronaldo Krzesinski");
+ MODULE_DESCRIPTION("Shuttle WMI Extras Driver");
+@@ -1161,7 +1162,7 @@ static int shuttle_wmi_probe(struct plat
+ goto err_notify;
+ }
+
+- if (!acpi_video_backlight_support()) {
++ if (acpi_video_get_backlight_type() == acpi_backlight_vendor) {
+ rc = shuttle_wmi_backlight_init(priv);
+ if (rc)
+ goto err_backlight;
diff --git a/kernel/kernel/files/patches/mageia/series b/kernel/kernel/files/patches/mageia/series
index b7860fef..9c5e9f1d 100644
--- a/kernel/kernel/files/patches/mageia/series
+++ b/kernel/kernel/files/patches/mageia/series
@@ -14,6 +14,36 @@
###
### Stable Queue
###
+stable-phylib-fix-device-deletion-order-in-mdiobus_unregister.patch
+stable-sock-diag-fix-panic-in-sock_diag_put_filterinfo.patch
+stable-ipv6-fix-exthdrs-offload-registration-in-out_rt-path.patch
+stable-net-fec-clear-receive-interrupts-before-processing-a-packet.patch
+stable-net-eth-altera-fix-napi-poll_list-corruption.patch
+stable-net-ipv6-correct-pim6-mrt_lock-handling.patch
+stable-net-dsa-bcm_sf2-fix-ageing-conditions-and-operation.patch
+stable-ipv6-fix-multipath-route-replace-error-recovery.patch
+stable-net-dsa-bcm_sf2-fix-64-bits-register-writes.patch
+stable-netlink-mmap-transform-mmap-skb-into-full-skb-on-taps.patch
+stable-sctp-fix-race-on-protocol-netns-initialization.patch
+stable-bridge-fix-igmpv3-mldv2-report-parsing.patch
+stable-net-mvneta-fix-dma-buffer-unmapping-in-mvneta_rx.patch
+stable-rtnetlink-catch-eopnotsupp-errors-from-ndo_bridge_getlink.patch
+stable-net-mlx4_en-really-allow-to-change-rss-key.patch
+stable-macvtap-fix-tunsetsndbuf-values-64k.patch
+stable-netlink-fix-autobind-race-condition-that-leads-to-zero-port-id.patch
+stable-netlink-replace-rhash_portid-with-bound.patch
+stable-net-dsa-actually-force-the-speed-on-the-cpu-port.patch
+stable-openvswitch-zero-flows-on-allocation.patch
+stable-tcp-add-proper-ts-val-into-rst-packets.patch
+stable-fix-af_packet-abi-breakage-in-4.2.patch
+stable-net-revert-net_sched-move-tp-root-allocation-into-fw_init.patch
+stable-fib_rules-fix-fib-rule-dumps-across-multiple-skbs.patch
+stable-ppp-fix-lockdep-splat-in-ppp_dev_uninit.patch
+stable-net-dsa-bcm_sf2-do-not-override-speed-settings.patch
+stable-net-phy-fixed_phy-handle-link-down-case.patch
+stable-of_mdio-add-new-dt-property-managed-to-specify-the-phy-management-type.patch
+stable-mvneta-use-inband-status-only-when-explicitly-enabled.patch
+stable-net-mlx4_core-capping-number-of-requested-msixs-to-max_msix.patch
###
### Arch x86
@@ -59,9 +89,6 @@ cpu-cacheinfo-Fix-teardown-path.patch
pci-add-ALI-M5229-ide-compatibility-mode-quirk.patch
pci-quirks-drop-devinit-exit.patch
-# Intel ACS quirks
-pci-acs-quirks-for-Intel-9-series-PCH-root-ports.patch
-
###
### PNP core
###
@@ -117,7 +144,6 @@ ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch
# Nice SSD speedup
block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch
-block-cfq-iosched-fix-the-setting-of-IOPS-mode-on-SSDs.patch
# properly fix null pointer deref introduced in 4.1.7
scsi-Revert-SCSI-Fix-NULL-pointer-dereference-in-runtime-PM.patch
@@ -130,11 +156,6 @@ scsi-Fix-NULL-pointer-dereference-in-RTPM-of-block-layer.patch
# aufs from: http://aufs.sourceforge.net/ (mga#8314)
fs-aufs4.patch
fs-aufs4-modular.patch
-# CVE pending
-fs-aufs-CVE-pending.patch
-
-# ext4
-fs-Revert-ext4-remove-block_device_ejected.patch
###
### FireWire
@@ -179,9 +200,6 @@ gpu-drm-mach64-3.18-buildfix.patch
input-i8042-quirks-for-Fujitsu-Lifebook-A544-and-Lif.patch
-# fixes systemd-logind killing itself
-Input-evdev-do-not-report-errors-form-flush.patch
-
###
### idle
###
@@ -230,6 +248,7 @@ net-netfilter-psd-2.6.35-buildfix.patch
# (Mainly allow turning on/off webcam and wireless on Shuttle DA18IE and DA18IM)
platform-x86-add-shuttle-wmi-driver.patch
platform-x86-shuttle-wmi-drop-devinit-exit.patch
+platform-x86-shuttle-wmi-4.2-buildfix.patch
###
### RTC
@@ -307,6 +326,7 @@ video-mageia-logo.patch
3rd-ndiswrapper-Makefile-build-fix.patch
3rd-ndiswrapper-linux-3.14-buildfix.patch
3rd-ndiswrapper-4.0-buildfix.patch
+3rd-ndiswrapper-4.2-buildfix.patch
# rfswitch
3rd-rfswitch-1.3.patch
@@ -324,6 +344,7 @@ video-mageia-logo.patch
3rd-rtl8723bs.patch
3rd-rtl8723bs-buildfix.patch
3rd-rtl8723bs-updates.patch
+3rd-rtl8723bs-4.2-buildfix.patch
###
### Security
@@ -340,7 +361,6 @@ video-mageia-logo.patch
###
### ARM
###
-arm-rockchip-fix-broken-build.patch
###
### IA64
diff --git a/kernel/kernel/files/patches/mageia/stable-bridge-fix-igmpv3-mldv2-report-parsing.patch b/kernel/kernel/files/patches/mageia/stable-bridge-fix-igmpv3-mldv2-report-parsing.patch
new file mode 100644
index 00000000..c651768a
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-bridge-fix-igmpv3-mldv2-report-parsing.patch
@@ -0,0 +1,53 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: =?UTF-8?q?Linus=20L=C3=BCssing?=
+Date: Fri, 11 Sep 2015 18:39:48 +0200
+Subject: bridge: fix igmpv3 / mldv2 report parsing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Linus=20L=C3=BCssing?=
+
+[ Upstream commit c2d4fbd2163e607915cc05798ce7fb7f31117cc1 ]
+
+With the newly introduced helper functions the skb pulling is hidden in
+the checksumming function - and undone before returning to the caller.
+
+The IGMPv3 and MLDv2 report parsing functions in the bridge still
+assumed that the skb is pointing to the beginning of the IGMP/MLD
+message while it is now kept at the beginning of the IPv4/6 header,
+breaking the message parsing and creating packet loss.
+
+Fixing this by taking the offset between IP and IGMP/MLD header into
+account, too.
+
+Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code")
+Reported-by: Tobias Powalowski
+Tested-by: Tobias Powalowski
+Signed-off-by: Linus Lüssing
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/bridge/br_multicast.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/bridge/br_multicast.c
++++ b/net/bridge/br_multicast.c
+@@ -991,7 +991,7 @@ static int br_ip4_multicast_igmp3_report
+
+ ih = igmpv3_report_hdr(skb);
+ num = ntohs(ih->ngrec);
+- len = sizeof(*ih);
++ len = skb_transport_offset(skb) + sizeof(*ih);
+
+ for (i = 0; i < num; i++) {
+ len += sizeof(*grec);
+@@ -1052,7 +1052,7 @@ static int br_ip6_multicast_mld2_report(
+
+ icmp6h = icmp6_hdr(skb);
+ num = ntohs(icmp6h->icmp6_dataun.un_data16[1]);
+- len = sizeof(*icmp6h);
++ len = skb_transport_offset(skb) + sizeof(*icmp6h);
+
+ for (i = 0; i < num; i++) {
+ __be16 *nsrcs, _nsrcs;
diff --git a/kernel/kernel/files/patches/mageia/stable-fib_rules-fix-fib-rule-dumps-across-multiple-skbs.patch b/kernel/kernel/files/patches/mageia/stable-fib_rules-fix-fib-rule-dumps-across-multiple-skbs.patch
new file mode 100644
index 00000000..3eba8da8
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-fib_rules-fix-fib-rule-dumps-across-multiple-skbs.patch
@@ -0,0 +1,72 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Wilson Kok
+Date: Tue, 22 Sep 2015 21:40:22 -0700
+Subject: fib_rules: fix fib rule dumps across multiple skbs
+
+From: Wilson Kok
+
+[ Upstream commit 41fc014332d91ee90c32840bf161f9685b7fbf2b ]
+
+dump_rules returns skb length and not error.
+But when family == AF_UNSPEC, the caller of dump_rules
+assumes that it returns an error. Hence, when family == AF_UNSPEC,
+we continue trying to dump on -EMSGSIZE errors resulting in
+incorrect dump idx carried between skbs belonging to the same dump.
+This results in fib rule dump always only dumping rules that fit
+into the first skb.
+
+This patch fixes dump_rules to return error so that we exit correctly
+and idx is correctly maintained between skbs that are part of the
+same dump.
+
+Signed-off-by: Wilson Kok
+Signed-off-by: Roopa Prabhu
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/core/fib_rules.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+--- a/net/core/fib_rules.c
++++ b/net/core/fib_rules.c
+@@ -615,15 +615,17 @@ static int dump_rules(struct sk_buff *sk
+ {
+ int idx = 0;
+ struct fib_rule *rule;
++ int err = 0;
+
+ rcu_read_lock();
+ list_for_each_entry_rcu(rule, &ops->rules_list, list) {
+ if (idx < cb->args[1])
+ goto skip;
+
+- if (fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid,
+- cb->nlh->nlmsg_seq, RTM_NEWRULE,
+- NLM_F_MULTI, ops) < 0)
++ err = fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid,
++ cb->nlh->nlmsg_seq, RTM_NEWRULE,
++ NLM_F_MULTI, ops);
++ if (err)
+ break;
+ skip:
+ idx++;
+@@ -632,7 +634,7 @@ skip:
+ cb->args[1] = idx;
+ rules_ops_put(ops);
+
+- return skb->len;
++ return err;
+ }
+
+ static int fib_nl_dumprule(struct sk_buff *skb, struct netlink_callback *cb)
+@@ -648,7 +650,9 @@ static int fib_nl_dumprule(struct sk_buf
+ if (ops == NULL)
+ return -EAFNOSUPPORT;
+
+- return dump_rules(skb, cb, ops);
++ dump_rules(skb, cb, ops);
++
++ return skb->len;
+ }
+
+ rcu_read_lock();
diff --git a/kernel/kernel/files/patches/mageia/stable-fix-af_packet-abi-breakage-in-4.2.patch b/kernel/kernel/files/patches/mageia/stable-fix-af_packet-abi-breakage-in-4.2.patch
new file mode 100644
index 00000000..c267675f
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-fix-af_packet-abi-breakage-in-4.2.patch
@@ -0,0 +1,114 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: David Woodhouse
+Date: Wed, 23 Sep 2015 19:45:08 +0100
+Subject: Fix AF_PACKET ABI breakage in 4.2
+
+From: David Woodhouse
+
+[ Upstream commit d3869efe7a8a2298516d9af4f91487cf486ca945 ]
+
+Commit 7d82410950aa ("virtio: add explicit big-endian support to memory
+accessors") accidentally changed the virtio_net header used by
+AF_PACKET with PACKET_VNET_HDR from host-endian to big-endian.
+
+Since virtio_legacy_is_little_endian() is a very long identifier,
+define a vio_le macro and use that throughout the code instead of the
+hard-coded 'false' for little-endian.
+
+This restores the ABI to match 4.1 and earlier kernels, and makes my
+test program work again.
+
+Signed-off-by: David Woodhouse
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/packet/af_packet.c | 32 +++++++++++++++++---------------
+ 1 file changed, 17 insertions(+), 15 deletions(-)
+
+--- a/net/packet/af_packet.c
++++ b/net/packet/af_packet.c
+@@ -229,6 +229,8 @@ struct packet_skb_cb {
+ } sa;
+ };
+
++#define vio_le() virtio_legacy_is_little_endian()
++
+ #define PACKET_SKB_CB(__skb) ((struct packet_skb_cb *)((__skb)->cb))
+
+ #define GET_PBDQC_FROM_RB(x) ((struct tpacket_kbdq_core *)(&(x)->prb_bdqc))
+@@ -2561,15 +2563,15 @@ static int packet_snd(struct socket *soc
+ goto out_unlock;
+
+ if ((vnet_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) &&
+- (__virtio16_to_cpu(false, vnet_hdr.csum_start) +
+- __virtio16_to_cpu(false, vnet_hdr.csum_offset) + 2 >
+- __virtio16_to_cpu(false, vnet_hdr.hdr_len)))
+- vnet_hdr.hdr_len = __cpu_to_virtio16(false,
+- __virtio16_to_cpu(false, vnet_hdr.csum_start) +
+- __virtio16_to_cpu(false, vnet_hdr.csum_offset) + 2);
++ (__virtio16_to_cpu(vio_le(), vnet_hdr.csum_start) +
++ __virtio16_to_cpu(vio_le(), vnet_hdr.csum_offset) + 2 >
++ __virtio16_to_cpu(vio_le(), vnet_hdr.hdr_len)))
++ vnet_hdr.hdr_len = __cpu_to_virtio16(vio_le(),
++ __virtio16_to_cpu(vio_le(), vnet_hdr.csum_start) +
++ __virtio16_to_cpu(vio_le(), vnet_hdr.csum_offset) + 2);
+
+ err = -EINVAL;
+- if (__virtio16_to_cpu(false, vnet_hdr.hdr_len) > len)
++ if (__virtio16_to_cpu(vio_le(), vnet_hdr.hdr_len) > len)
+ goto out_unlock;
+
+ if (vnet_hdr.gso_type != VIRTIO_NET_HDR_GSO_NONE) {
+@@ -2612,7 +2614,7 @@ static int packet_snd(struct socket *soc
+ hlen = LL_RESERVED_SPACE(dev);
+ tlen = dev->needed_tailroom;
+ skb = packet_alloc_skb(sk, hlen + tlen, hlen, len,
+- __virtio16_to_cpu(false, vnet_hdr.hdr_len),
++ __virtio16_to_cpu(vio_le(), vnet_hdr.hdr_len),
+ msg->msg_flags & MSG_DONTWAIT, &err);
+ if (skb == NULL)
+ goto out_unlock;
+@@ -2659,8 +2661,8 @@ static int packet_snd(struct socket *soc
+
+ if (po->has_vnet_hdr) {
+ if (vnet_hdr.flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
+- u16 s = __virtio16_to_cpu(false, vnet_hdr.csum_start);
+- u16 o = __virtio16_to_cpu(false, vnet_hdr.csum_offset);
++ u16 s = __virtio16_to_cpu(vio_le(), vnet_hdr.csum_start);
++ u16 o = __virtio16_to_cpu(vio_le(), vnet_hdr.csum_offset);
+ if (!skb_partial_csum_set(skb, s, o)) {
+ err = -EINVAL;
+ goto out_free;
+@@ -2668,7 +2670,7 @@ static int packet_snd(struct socket *soc
+ }
+
+ skb_shinfo(skb)->gso_size =
+- __virtio16_to_cpu(false, vnet_hdr.gso_size);
++ __virtio16_to_cpu(vio_le(), vnet_hdr.gso_size);
+ skb_shinfo(skb)->gso_type = gso_type;
+
+ /* Header must be checked, and gso_segs computed. */
+@@ -3042,9 +3044,9 @@ static int packet_recvmsg(struct socket
+
+ /* This is a hint as to how much should be linear. */
+ vnet_hdr.hdr_len =
+- __cpu_to_virtio16(false, skb_headlen(skb));
++ __cpu_to_virtio16(vio_le(), skb_headlen(skb));
+ vnet_hdr.gso_size =
+- __cpu_to_virtio16(false, sinfo->gso_size);
++ __cpu_to_virtio16(vio_le(), sinfo->gso_size);
+ if (sinfo->gso_type & SKB_GSO_TCPV4)
+ vnet_hdr.gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
+ else if (sinfo->gso_type & SKB_GSO_TCPV6)
+@@ -3062,9 +3064,9 @@ static int packet_recvmsg(struct socket
+
+ if (skb->ip_summed == CHECKSUM_PARTIAL) {
+ vnet_hdr.flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
+- vnet_hdr.csum_start = __cpu_to_virtio16(false,
++ vnet_hdr.csum_start = __cpu_to_virtio16(vio_le(),
+ skb_checksum_start_offset(skb));
+- vnet_hdr.csum_offset = __cpu_to_virtio16(false,
++ vnet_hdr.csum_offset = __cpu_to_virtio16(vio_le(),
+ skb->csum_offset);
+ } else if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
+ vnet_hdr.flags = VIRTIO_NET_HDR_F_DATA_VALID;
diff --git a/kernel/kernel/files/patches/mageia/stable-ipv6-fix-exthdrs-offload-registration-in-out_rt-path.patch b/kernel/kernel/files/patches/mageia/stable-ipv6-fix-exthdrs-offload-registration-in-out_rt-path.patch
new file mode 100644
index 00000000..cf690f51
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-ipv6-fix-exthdrs-offload-registration-in-out_rt-path.patch
@@ -0,0 +1,33 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Daniel Borkmann
+Date: Thu, 3 Sep 2015 00:29:07 +0200
+Subject: ipv6: fix exthdrs offload registration in out_rt path
+
+From: Daniel Borkmann
+
+[ Upstream commit e41b0bedba0293b9e1e8d1e8ed553104b9693656 ]
+
+We previously register IPPROTO_ROUTING offload under inet6_add_offload(),
+but in error path, we try to unregister it with inet_del_offload(). This
+doesn't seem correct, it should actually be inet6_del_offload(), also
+ipv6_exthdrs_offload_exit() from that commit seems rather incorrect (it
+also uses rthdr_offload twice), but it got removed entirely later on.
+
+Fixes: 3336288a9fea ("ipv6: Switch to using new offload infrastructure.")
+Signed-off-by: Daniel Borkmann
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/ipv6/exthdrs_offload.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv6/exthdrs_offload.c
++++ b/net/ipv6/exthdrs_offload.c
+@@ -36,6 +36,6 @@ out:
+ return ret;
+
+ out_rt:
+- inet_del_offload(&rthdr_offload, IPPROTO_ROUTING);
++ inet6_del_offload(&rthdr_offload, IPPROTO_ROUTING);
+ goto out;
+ }
diff --git a/kernel/kernel/files/patches/mageia/stable-ipv6-fix-multipath-route-replace-error-recovery.patch b/kernel/kernel/files/patches/mageia/stable-ipv6-fix-multipath-route-replace-error-recovery.patch
new file mode 100644
index 00000000..3066a1d2
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-ipv6-fix-multipath-route-replace-error-recovery.patch
@@ -0,0 +1,352 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Roopa Prabhu
+Date: Tue, 8 Sep 2015 10:53:04 -0700
+Subject: ipv6: fix multipath route replace error recovery
+
+From: Roopa Prabhu
+
+[ Upstream commit 6b9ea5a64ed5eeb3f68f2e6fcce0ed1179801d1e ]
+
+Problem:
+The ecmp route replace support for ipv6 in the kernel, deletes the
+existing ecmp route too early, ie when it installs the first nexthop.
+If there is an error in installing the subsequent nexthops, its too late
+to recover the already deleted existing route leaving the fib
+in an inconsistent state.
+
+This patch reduces the possibility of this by doing the following:
+a) Changes the existing multipath route add code to a two stage process:
+ build rt6_infos + insert them
+ ip6_route_add rt6_info creation code is moved into
+ ip6_route_info_create.
+b) This ensures that most errors are caught during building rt6_infos
+ and we fail early
+c) Separates multipath add and del code. Because add needs the special
+ two stage mode in a) and delete essentially does not care.
+d) In any event if the code fails during inserting a route again, a
+ warning is printed (This should be unlikely)
+
+Before the patch:
+$ip -6 route show
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024
+
+/* Try replacing the route with a duplicate nexthop */
+$ip -6 route change 3000:1000:1000:1000::2/128 nexthop via
+fe80::202:ff:fe00:b dev swp49s0 nexthop via fe80::202:ff:fe00:d dev
+swp49s1 nexthop via fe80::202:ff:fe00:d dev swp49s1
+RTNETLINK answers: File exists
+
+$ip -6 route show
+/* previously added ecmp route 3000:1000:1000:1000::2 dissappears from
+ * kernel */
+
+After the patch:
+$ip -6 route show
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024
+
+/* Try replacing the route with a duplicate nexthop */
+$ip -6 route change 3000:1000:1000:1000::2/128 nexthop via
+fe80::202:ff:fe00:b dev swp49s0 nexthop via fe80::202:ff:fe00:d dev
+swp49s1 nexthop via fe80::202:ff:fe00:d dev swp49s1
+RTNETLINK answers: File exists
+
+$ip -6 route show
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024
+3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024
+
+Fixes: 27596472473a ("ipv6: fix ECMP route replacement")
+Signed-off-by: Roopa Prabhu
+Reviewed-by: Nikolay Aleksandrov
+Acked-by: Nicolas Dichtel
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/ipv6/route.c | 201 +++++++++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 175 insertions(+), 26 deletions(-)
+
+--- a/net/ipv6/route.c
++++ b/net/ipv6/route.c
+@@ -1727,7 +1727,7 @@ static int ip6_convert_metrics(struct mx
+ return -EINVAL;
+ }
+
+-int ip6_route_add(struct fib6_config *cfg)
++int ip6_route_info_create(struct fib6_config *cfg, struct rt6_info **rt_ret)
+ {
+ int err;
+ struct net *net = cfg->fc_nlinfo.nl_net;
+@@ -1735,7 +1735,6 @@ int ip6_route_add(struct fib6_config *cf
+ struct net_device *dev = NULL;
+ struct inet6_dev *idev = NULL;
+ struct fib6_table *table;
+- struct mx6_config mxc = { .mx = NULL, };
+ int addr_type;
+
+ if (cfg->fc_dst_len > 128 || cfg->fc_src_len > 128)
+@@ -1941,6 +1940,32 @@ install_route:
+
+ cfg->fc_nlinfo.nl_net = dev_net(dev);
+
++ *rt_ret = rt;
++
++ return 0;
++out:
++ if (dev)
++ dev_put(dev);
++ if (idev)
++ in6_dev_put(idev);
++ if (rt)
++ dst_free(&rt->dst);
++
++ *rt_ret = NULL;
++
++ return err;
++}
++
++int ip6_route_add(struct fib6_config *cfg)
++{
++ struct mx6_config mxc = { .mx = NULL, };
++ struct rt6_info *rt = NULL;
++ int err;
++
++ err = ip6_route_info_create(cfg, &rt);
++ if (err)
++ goto out;
++
+ err = ip6_convert_metrics(&mxc, cfg);
+ if (err)
+ goto out;
+@@ -1948,14 +1973,12 @@ install_route:
+ err = __ip6_ins_rt(rt, &cfg->fc_nlinfo, &mxc);
+
+ kfree(mxc.mx);
++
+ return err;
+ out:
+- if (dev)
+- dev_put(dev);
+- if (idev)
+- in6_dev_put(idev);
+ if (rt)
+ dst_free(&rt->dst);
++
+ return err;
+ }
+
+@@ -2727,19 +2750,78 @@ errout:
+ return err;
+ }
+
+-static int ip6_route_multipath(struct fib6_config *cfg, int add)
++struct rt6_nh {
++ struct rt6_info *rt6_info;
++ struct fib6_config r_cfg;
++ struct mx6_config mxc;
++ struct list_head next;
++};
++
++static void ip6_print_replace_route_err(struct list_head *rt6_nh_list)
++{
++ struct rt6_nh *nh;
++
++ list_for_each_entry(nh, rt6_nh_list, next) {
++ pr_warn("IPV6: multipath route replace failed (check consistency of installed routes): %pI6 nexthop %pI6 ifi %d\n",
++ &nh->r_cfg.fc_dst, &nh->r_cfg.fc_gateway,
++ nh->r_cfg.fc_ifindex);
++ }
++}
++
++static int ip6_route_info_append(struct list_head *rt6_nh_list,
++ struct rt6_info *rt, struct fib6_config *r_cfg)
++{
++ struct rt6_nh *nh;
++ struct rt6_info *rtnh;
++ int err = -EEXIST;
++
++ list_for_each_entry(nh, rt6_nh_list, next) {
++ /* check if rt6_info already exists */
++ rtnh = nh->rt6_info;
++
++ if (rtnh->dst.dev == rt->dst.dev &&
++ rtnh->rt6i_idev == rt->rt6i_idev &&
++ ipv6_addr_equal(&rtnh->rt6i_gateway,
++ &rt->rt6i_gateway))
++ return err;
++ }
++
++ nh = kzalloc(sizeof(*nh), GFP_KERNEL);
++ if (!nh)
++ return -ENOMEM;
++ nh->rt6_info = rt;
++ err = ip6_convert_metrics(&nh->mxc, r_cfg);
++ if (err) {
++ kfree(nh);
++ return err;
++ }
++ memcpy(&nh->r_cfg, r_cfg, sizeof(*r_cfg));
++ list_add_tail(&nh->next, rt6_nh_list);
++
++ return 0;
++}
++
++static int ip6_route_multipath_add(struct fib6_config *cfg)
+ {
+ struct fib6_config r_cfg;
+ struct rtnexthop *rtnh;
++ struct rt6_info *rt;
++ struct rt6_nh *err_nh;
++ struct rt6_nh *nh, *nh_safe;
+ int remaining;
+ int attrlen;
+- int err = 0, last_err = 0;
++ int err = 1;
++ int nhn = 0;
++ int replace = (cfg->fc_nlinfo.nlh &&
++ (cfg->fc_nlinfo.nlh->nlmsg_flags & NLM_F_REPLACE));
++ LIST_HEAD(rt6_nh_list);
+
+ remaining = cfg->fc_mp_len;
+-beginning:
+ rtnh = (struct rtnexthop *)cfg->fc_mp;
+
+- /* Parse a Multipath Entry */
++ /* Parse a Multipath Entry and build a list (rt6_nh_list) of
++ * rt6_info structs per nexthop
++ */
+ while (rtnh_ok(rtnh, remaining)) {
+ memcpy(&r_cfg, cfg, sizeof(*cfg));
+ if (rtnh->rtnh_ifindex)
+@@ -2755,22 +2837,32 @@ beginning:
+ r_cfg.fc_flags |= RTF_GATEWAY;
+ }
+ }
+- err = add ? ip6_route_add(&r_cfg) : ip6_route_del(&r_cfg);
++
++ err = ip6_route_info_create(&r_cfg, &rt);
++ if (err)
++ goto cleanup;
++
++ err = ip6_route_info_append(&rt6_nh_list, rt, &r_cfg);
+ if (err) {
+- last_err = err;
+- /* If we are trying to remove a route, do not stop the
+- * loop when ip6_route_del() fails (because next hop is
+- * already gone), we should try to remove all next hops.
+- */
+- if (add) {
+- /* If add fails, we should try to delete all
+- * next hops that have been already added.
+- */
+- add = 0;
+- remaining = cfg->fc_mp_len - remaining;
+- goto beginning;
+- }
++ dst_free(&rt->dst);
++ goto cleanup;
++ }
++
++ rtnh = rtnh_next(rtnh, &remaining);
++ }
++
++ err_nh = NULL;
++ list_for_each_entry(nh, &rt6_nh_list, next) {
++ err = __ip6_ins_rt(nh->rt6_info, &cfg->fc_nlinfo, &nh->mxc);
++ /* nh->rt6_info is used or freed at this point, reset to NULL*/
++ nh->rt6_info = NULL;
++ if (err) {
++ if (replace && nhn)
++ ip6_print_replace_route_err(&rt6_nh_list);
++ err_nh = nh;
++ goto add_errout;
+ }
++
+ /* Because each route is added like a single route we remove
+ * these flags after the first nexthop: if there is a collision,
+ * we have already failed to add the first nexthop:
+@@ -2780,6 +2872,63 @@ beginning:
+ */
+ cfg->fc_nlinfo.nlh->nlmsg_flags &= ~(NLM_F_EXCL |
+ NLM_F_REPLACE);
++ nhn++;
++ }
++
++ goto cleanup;
++
++add_errout:
++ /* Delete routes that were already added */
++ list_for_each_entry(nh, &rt6_nh_list, next) {
++ if (err_nh == nh)
++ break;
++ ip6_route_del(&nh->r_cfg);
++ }
++
++cleanup:
++ list_for_each_entry_safe(nh, nh_safe, &rt6_nh_list, next) {
++ if (nh->rt6_info)
++ dst_free(&nh->rt6_info->dst);
++ if (nh->mxc.mx)
++ kfree(nh->mxc.mx);
++ list_del(&nh->next);
++ kfree(nh);
++ }
++
++ return err;
++}
++
++static int ip6_route_multipath_del(struct fib6_config *cfg)
++{
++ struct fib6_config r_cfg;
++ struct rtnexthop *rtnh;
++ int remaining;
++ int attrlen;
++ int err = 1, last_err = 0;
++
++ remaining = cfg->fc_mp_len;
++ rtnh = (struct rtnexthop *)cfg->fc_mp;
++
++ /* Parse a Multipath Entry */
++ while (rtnh_ok(rtnh, remaining)) {
++ memcpy(&r_cfg, cfg, sizeof(*cfg));
++ if (rtnh->rtnh_ifindex)
++ r_cfg.fc_ifindex = rtnh->rtnh_ifindex;
++
++ attrlen = rtnh_attrlen(rtnh);
++ if (attrlen > 0) {
++ struct nlattr *nla, *attrs = rtnh_attrs(rtnh);
++
++ nla = nla_find(attrs, attrlen, RTA_GATEWAY);
++ if (nla) {
++ nla_memcpy(&r_cfg.fc_gateway, nla, 16);
++ r_cfg.fc_flags |= RTF_GATEWAY;
++ }
++ }
++ err = ip6_route_del(&r_cfg);
++ if (err)
++ last_err = err;
++
+ rtnh = rtnh_next(rtnh, &remaining);
+ }
+
+@@ -2796,7 +2945,7 @@ static int inet6_rtm_delroute(struct sk_
+ return err;
+
+ if (cfg.fc_mp)
+- return ip6_route_multipath(&cfg, 0);
++ return ip6_route_multipath_del(&cfg);
+ else
+ return ip6_route_del(&cfg);
+ }
+@@ -2811,7 +2960,7 @@ static int inet6_rtm_newroute(struct sk_
+ return err;
+
+ if (cfg.fc_mp)
+- return ip6_route_multipath(&cfg, 1);
++ return ip6_route_multipath_add(&cfg);
+ else
+ return ip6_route_add(&cfg);
+ }
diff --git a/kernel/kernel/files/patches/mageia/stable-macvtap-fix-tunsetsndbuf-values-64k.patch b/kernel/kernel/files/patches/mageia/stable-macvtap-fix-tunsetsndbuf-values-64k.patch
new file mode 100644
index 00000000..d2cee3b9
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-macvtap-fix-tunsetsndbuf-values-64k.patch
@@ -0,0 +1,47 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: "Michael S. Tsirkin"
+Date: Fri, 18 Sep 2015 13:41:09 +0300
+Subject: macvtap: fix TUNSETSNDBUF values > 64k
+
+From: "Michael S. Tsirkin"
+
+[ Upstream commit 3ea79249e81e5ed051f2e6480cbde896d99046e8 ]
+
+Upon TUNSETSNDBUF, macvtap reads the requested sndbuf size into
+a local variable u.
+commit 39ec7de7092b ("macvtap: fix uninitialized access on
+TUNSETIFF") changed its type to u16 (which is the right thing to
+do for all other macvtap ioctls), breaking all values > 64k.
+
+The value of TUNSETSNDBUF is actually a signed 32 bit integer, so
+the right thing to do is to read it into an int.
+
+Cc: David S. Miller
+Fixes: 39ec7de7092b ("macvtap: fix uninitialized access on TUNSETIFF")
+Reported-by: Mark A. Peloquin
+Bisected-by: Matthew Rosato
+Reported-by: Christian Borntraeger
+Signed-off-by: Michael S. Tsirkin
+Tested-by: Matthew Rosato
+Acked-by: Christian Borntraeger
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/macvtap.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/macvtap.c
++++ b/drivers/net/macvtap.c
+@@ -1111,10 +1111,10 @@ static long macvtap_ioctl(struct file *f
+ return 0;
+
+ case TUNSETSNDBUF:
+- if (get_user(u, up))
++ if (get_user(s, sp))
+ return -EFAULT;
+
+- q->sk.sk_sndbuf = u;
++ q->sk.sk_sndbuf = s;
+ return 0;
+
+ case TUNGETVNETHDRSZ:
diff --git a/kernel/kernel/files/patches/mageia/stable-mvneta-use-inband-status-only-when-explicitly-enabled.patch b/kernel/kernel/files/patches/mageia/stable-mvneta-use-inband-status-only-when-explicitly-enabled.patch
new file mode 100644
index 00000000..48e61d1c
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-mvneta-use-inband-status-only-when-explicitly-enabled.patch
@@ -0,0 +1,66 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Stas Sergeev
+Date: Mon, 20 Jul 2015 17:49:58 -0700
+Subject: mvneta: use inband status only when explicitly enabled
+
+From: Stas Sergeev
+
+[ Upstream commit f8af8e6eb95093d5ce5ebcc52bd1929b0433e172 in net-next tree,
+ will be pushed to Linus very soon. ]
+
+The commit 898b2970e2c9 ("mvneta: implement SGMII-based in-band link state
+signaling") implemented the link parameters auto-negotiation unconditionally.
+Unfortunately it appears that some HW that implements SGMII protocol,
+doesn't generate the inband status, so it is not possible to auto-negotiate
+anything with such HW.
+
+This patch enables the auto-negotiation only if explicitly requested with
+the 'managed' DT property.
+
+This patch fixes the following regression:
+https://lkml.org/lkml/2015/7/8/865
+
+Signed-off-by: Stas Sergeev
+
+CC: Thomas Petazzoni
+CC: netdev@vger.kernel.org
+CC: linux-kernel@vger.kernel.org
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/ethernet/marvell/mvneta.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -3029,8 +3029,8 @@ static int mvneta_probe(struct platform_
+ const char *dt_mac_addr;
+ char hw_mac_addr[ETH_ALEN];
+ const char *mac_from;
++ const char *managed;
+ int phy_mode;
+- int fixed_phy = 0;
+ int err;
+
+ /* Our multiqueue support is not complete, so for now, only
+@@ -3064,7 +3064,6 @@ static int mvneta_probe(struct platform_
+ dev_err(&pdev->dev, "cannot register fixed PHY\n");
+ goto err_free_irq;
+ }
+- fixed_phy = 1;
+
+ /* In the case of a fixed PHY, the DT node associated
+ * to the PHY is the Ethernet MAC DT node.
+@@ -3088,8 +3087,10 @@ static int mvneta_probe(struct platform_
+ pp = netdev_priv(dev);
+ pp->phy_node = phy_node;
+ pp->phy_interface = phy_mode;
+- pp->use_inband_status = (phy_mode == PHY_INTERFACE_MODE_SGMII) &&
+- fixed_phy;
++
++ err = of_property_read_string(dn, "managed", &managed);
++ pp->use_inband_status = (err == 0 &&
++ strcmp(managed, "in-band-status") == 0);
+
+ pp->clk = devm_clk_get(&pdev->dev, NULL);
+ if (IS_ERR(pp->clk)) {
diff --git a/kernel/kernel/files/patches/mageia/stable-net-dsa-actually-force-the-speed-on-the-cpu-port.patch b/kernel/kernel/files/patches/mageia/stable-net-dsa-actually-force-the-speed-on-the-cpu-port.patch
new file mode 100644
index 00000000..11133277
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-dsa-actually-force-the-speed-on-the-cpu-port.patch
@@ -0,0 +1,64 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Russell King
+Date: Mon, 21 Sep 2015 21:42:59 +0100
+Subject: net: dsa: actually force the speed on the CPU port
+
+From: Russell King
+
+[ Upstream commit 53adc9e83028d9e35b6408231ebaf62a94a16e4d ]
+
+Commit 54d792f257c6 ("net: dsa: Centralise global and port setup
+code into mv88e6xxx.") merged in the 4.2 merge window broke the link
+speed forcing for the CPU port of Marvell DSA switches. The original
+code was:
+
+ /* MAC Forcing register: don't force link, speed, duplex
+ * or flow control state to any particular values on physical
+ * ports, but force the CPU port and all DSA ports to 1000 Mb/s
+ * full duplex.
+ */
+ if (dsa_is_cpu_port(ds, p) || ds->dsa_port_mask & (1 << p))
+ REG_WRITE(addr, 0x01, 0x003e);
+ else
+ REG_WRITE(addr, 0x01, 0x0003);
+
+but the new code does a read-modify-write:
+
+ reg = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_PCS_CTRL);
+ if (dsa_is_cpu_port(ds, port) ||
+ ds->dsa_port_mask & (1 << port)) {
+ reg |= PORT_PCS_CTRL_FORCE_LINK |
+ PORT_PCS_CTRL_LINK_UP |
+ PORT_PCS_CTRL_DUPLEX_FULL |
+ PORT_PCS_CTRL_FORCE_DUPLEX;
+ if (mv88e6xxx_6065_family(ds))
+ reg |= PORT_PCS_CTRL_100;
+ else
+ reg |= PORT_PCS_CTRL_1000;
+
+The link speed in the PCS control register is a two bit field. Forcing
+the link speed in this way doesn't ensure that the bit field is set to
+the correct value - on the hardware I have here, the speed bitfield
+remains set to 0x03, resulting in the speed not being forced to gigabit.
+
+We must clear both bits before forcing the link speed.
+
+Fixes: 54d792f257c6 ("net: dsa: Centralise global and port setup code into mv88e6xxx.")
+Signed-off-by: Russell King
+Acked-by: Andrew Lunn
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/dsa/mv88e6xxx.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/dsa/mv88e6xxx.c
++++ b/drivers/net/dsa/mv88e6xxx.c
+@@ -1387,6 +1387,7 @@ static int mv88e6xxx_setup_port(struct d
+ reg = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_PCS_CTRL);
+ if (dsa_is_cpu_port(ds, port) ||
+ ds->dsa_port_mask & (1 << port)) {
++ reg &= ~PORT_PCS_CTRL_UNFORCED;
+ reg |= PORT_PCS_CTRL_FORCE_LINK |
+ PORT_PCS_CTRL_LINK_UP |
+ PORT_PCS_CTRL_DUPLEX_FULL |
diff --git a/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-do-not-override-speed-settings.patch b/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-do-not-override-speed-settings.patch
new file mode 100644
index 00000000..ec475b73
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-do-not-override-speed-settings.patch
@@ -0,0 +1,68 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Florian Fainelli
+Date: Mon, 20 Jul 2015 17:49:55 -0700
+Subject: net: dsa: bcm_sf2: Do not override speed settings
+
+From: Florian Fainelli
+
+[ Upstream d2eac98f7d1b950b762a7eca05a9ce0ea1d878d2 in net-next tree,
+ will be pushed to Linus very soon. ]
+
+The SF2 driver currently overrides speed settings for its port
+configured using a fixed PHY, this is both unnecessary and incorrect,
+because we keep feedback to the hardware parameters that we read from
+the PHY device, which in the case of a fixed PHY cannot possibly change
+speed.
+
+This is a required change to allow the fixed PHY code to allow
+registering a PHY with a link configured as DOWN by default and avoid
+some sort of circular dependency where we require the link_update
+callback to run to program the hardware, and we then utilize the fixed
+PHY parameters to program the hardware with the same settings.
+
+Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
+Signed-off-by: Florian Fainelli
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/dsa/bcm_sf2.c | 18 +-----------------
+ 1 file changed, 1 insertion(+), 17 deletions(-)
+
+--- a/drivers/net/dsa/bcm_sf2.c
++++ b/drivers/net/dsa/bcm_sf2.c
+@@ -905,15 +905,11 @@ static void bcm_sf2_sw_fixed_link_update
+ struct fixed_phy_status *status)
+ {
+ struct bcm_sf2_priv *priv = ds_to_priv(ds);
+- u32 duplex, pause, speed;
++ u32 duplex, pause;
+ u32 reg;
+
+ duplex = core_readl(priv, CORE_DUPSTS);
+ pause = core_readl(priv, CORE_PAUSESTS);
+- speed = core_readl(priv, CORE_SPDSTS);
+-
+- speed >>= (port * SPDSTS_SHIFT);
+- speed &= SPDSTS_MASK;
+
+ status->link = 0;
+
+@@ -948,18 +944,6 @@ static void bcm_sf2_sw_fixed_link_update
+ reg &= ~LINK_STS;
+ core_writel(priv, reg, CORE_STS_OVERRIDE_GMIIP_PORT(port));
+
+- switch (speed) {
+- case SPDSTS_10:
+- status->speed = SPEED_10;
+- break;
+- case SPDSTS_100:
+- status->speed = SPEED_100;
+- break;
+- case SPDSTS_1000:
+- status->speed = SPEED_1000;
+- break;
+- }
+-
+ if ((pause & (1 << port)) &&
+ (pause & (1 << (port + PAUSESTS_TX_PAUSE_SHIFT)))) {
+ status->asym_pause = 1;
diff --git a/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-fix-64-bits-register-writes.patch b/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-fix-64-bits-register-writes.patch
new file mode 100644
index 00000000..e58f1766
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-fix-64-bits-register-writes.patch
@@ -0,0 +1,36 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Florian Fainelli
+Date: Tue, 8 Sep 2015 20:06:41 -0700
+Subject: net: dsa: bcm_sf2: Fix 64-bits register writes
+
+From: Florian Fainelli
+
+[ Upstream commit 03679a14739a0d4c14b52ba65a69ff553bfba73b ]
+
+The macro to write 64-bits quantities to the 32-bits register swapped
+the value and offsets arguments, we want to preserve the ordering of the
+arguments with respect to how writel() is implemented for instance:
+value first, offset/base second.
+
+Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
+Signed-off-by: Florian Fainelli
+Reviewed-by: Vivien Didelot
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/dsa/bcm_sf2.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/bcm_sf2.h
++++ b/drivers/net/dsa/bcm_sf2.h
+@@ -112,8 +112,8 @@ static inline u64 name##_readq(struct bc
+ spin_unlock(&priv->indir_lock); \
+ return (u64)indir << 32 | dir; \
+ } \
+-static inline void name##_writeq(struct bcm_sf2_priv *priv, u32 off, \
+- u64 val) \
++static inline void name##_writeq(struct bcm_sf2_priv *priv, u64 val, \
++ u32 off) \
+ { \
+ spin_lock(&priv->indir_lock); \
+ reg_writel(priv, upper_32_bits(val), REG_DIR_DATA_WRITE); \
diff --git a/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-fix-ageing-conditions-and-operation.patch b/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-fix-ageing-conditions-and-operation.patch
new file mode 100644
index 00000000..7d08b240
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-dsa-bcm_sf2-fix-ageing-conditions-and-operation.patch
@@ -0,0 +1,74 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Florian Fainelli
+Date: Sat, 5 Sep 2015 13:07:27 -0700
+Subject: net: dsa: bcm_sf2: Fix ageing conditions and operation
+
+From: Florian Fainelli
+
+[ Upstream commit 39797a279d62972cd914ef580fdfacb13e508bf8 ]
+
+The comparison check between cur_hw_state and hw_state is currently
+invalid because cur_hw_state is right shifted by G_MISTP_SHIFT, while
+hw_state is not, so we end-up comparing bits 2:0 with bits 7:5, which is
+going to cause an additional aging to occur. Fix this by not shifting
+cur_hw_state while reading it, but instead, mask the value with the
+appropriately shitfted bitmask.
+
+The other problem with the fast-ageing process is that we did not set
+the EN_AGE_DYNAMIC bit to request the ageing to occur for dynamically
+learned MAC addresses. Finally, write back 0 to the FAST_AGE_CTRL
+register to avoid leaving spurious bits sets from one operation to the
+other.
+
+Fixes: 12f460f23423 ("net: dsa: bcm_sf2: add HW bridging support")
+Signed-off-by: Florian Fainelli
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/dsa/bcm_sf2.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/bcm_sf2.c
++++ b/drivers/net/dsa/bcm_sf2.c
+@@ -418,7 +418,7 @@ static int bcm_sf2_sw_fast_age_port(stru
+ core_writel(priv, port, CORE_FAST_AGE_PORT);
+
+ reg = core_readl(priv, CORE_FAST_AGE_CTRL);
+- reg |= EN_AGE_PORT | FAST_AGE_STR_DONE;
++ reg |= EN_AGE_PORT | EN_AGE_DYNAMIC | FAST_AGE_STR_DONE;
+ core_writel(priv, reg, CORE_FAST_AGE_CTRL);
+
+ do {
+@@ -432,6 +432,8 @@ static int bcm_sf2_sw_fast_age_port(stru
+ if (!timeout)
+ return -ETIMEDOUT;
+
++ core_writel(priv, 0, CORE_FAST_AGE_CTRL);
++
+ return 0;
+ }
+
+@@ -507,7 +509,7 @@ static int bcm_sf2_sw_br_set_stp_state(s
+ u32 reg;
+
+ reg = core_readl(priv, CORE_G_PCTL_PORT(port));
+- cur_hw_state = reg >> G_MISTP_STATE_SHIFT;
++ cur_hw_state = reg & (G_MISTP_STATE_MASK << G_MISTP_STATE_SHIFT);
+
+ switch (state) {
+ case BR_STATE_DISABLED:
+@@ -531,10 +533,12 @@ static int bcm_sf2_sw_br_set_stp_state(s
+ }
+
+ /* Fast-age ARL entries if we are moving a port from Learning or
+- * Forwarding state to Disabled, Blocking or Listening state
++ * Forwarding (cur_hw_state) state to Disabled, Blocking or Listening
++ * state (hw_state)
+ */
+ if (cur_hw_state != hw_state) {
+- if (cur_hw_state & 4 && !(hw_state & 4)) {
++ if (cur_hw_state >= G_MISTP_LEARN_STATE &&
++ hw_state <= G_MISTP_LISTEN_STATE) {
+ ret = bcm_sf2_sw_fast_age_port(ds, port);
+ if (ret) {
+ pr_err("%s: fast-ageing failed\n", __func__);
diff --git a/kernel/kernel/files/patches/mageia/stable-net-eth-altera-fix-napi-poll_list-corruption.patch b/kernel/kernel/files/patches/mageia/stable-net-eth-altera-fix-napi-poll_list-corruption.patch
new file mode 100644
index 00000000..055155be
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-eth-altera-fix-napi-poll_list-corruption.patch
@@ -0,0 +1,32 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Atsushi Nemoto
+Date: Wed, 2 Sep 2015 17:49:29 +0900
+Subject: net: eth: altera: fix napi poll_list corruption
+
+From: Atsushi Nemoto
+
+[ Upstream commit 4548a697e4969d695047cebd6d9af5e2f6cc728e ]
+
+tse_poll() calls __napi_complete() with irq enabled. This leads napi
+poll_list corruption and may stop all napi drivers working.
+Use napi_complete() instead of __napi_complete().
+
+Signed-off-by: Atsushi Nemoto
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/ethernet/altera/altera_tse_main.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/altera/altera_tse_main.c
++++ b/drivers/net/ethernet/altera/altera_tse_main.c
+@@ -511,8 +511,7 @@ static int tse_poll(struct napi_struct *
+
+ if (rxcomplete < budget) {
+
+- napi_gro_flush(napi, false);
+- __napi_complete(napi);
++ napi_complete(napi);
+
+ netdev_dbg(priv->dev,
+ "NAPI Complete, did %d packets with budget %d\n",
diff --git a/kernel/kernel/files/patches/mageia/stable-net-fec-clear-receive-interrupts-before-processing-a-packet.patch b/kernel/kernel/files/patches/mageia/stable-net-fec-clear-receive-interrupts-before-processing-a-packet.patch
new file mode 100644
index 00000000..d020e99b
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-fec-clear-receive-interrupts-before-processing-a-packet.patch
@@ -0,0 +1,39 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Russell King
+Date: Wed, 2 Sep 2015 17:24:14 +0800
+Subject: net: fec: clear receive interrupts before processing a packet
+
+From: Russell King
+
+[ Upstream commit ed63f1dcd5788d36f942fbcce350742385e3e18c ]
+
+The patch just to re-submit the patch "db3421c114cfa6326" because the
+patch "4d494cdc92b3b9a0" remove the change.
+
+Clear any pending receive interrupt before we process a pending packet.
+This helps to avoid any spurious interrupts being raised after we have
+fully cleaned the receive ring, while still allowing an interrupt to be
+raised if we receive another packet.
+
+The position of this is critical: we must do this prior to reading the
+next packet status to avoid potentially dropping an interrupt when a
+packet is still pending.
+
+Acked-by: Fugang Duan
+Signed-off-by: Russell King
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/ethernet/freescale/fec_main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/freescale/fec_main.c
++++ b/drivers/net/ethernet/freescale/fec_main.c
+@@ -1402,6 +1402,7 @@ fec_enet_rx_queue(struct net_device *nde
+ if ((status & BD_ENET_RX_LAST) == 0)
+ netdev_err(ndev, "rcv is not +last\n");
+
++ writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
+
+ /* Check for errors. */
+ if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
diff --git a/kernel/kernel/files/patches/mageia/stable-net-ipv6-correct-pim6-mrt_lock-handling.patch b/kernel/kernel/files/patches/mageia/stable-net-ipv6-correct-pim6-mrt_lock-handling.patch
new file mode 100644
index 00000000..f6623a8c
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-ipv6-correct-pim6-mrt_lock-handling.patch
@@ -0,0 +1,35 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Richard Laing
+Date: Thu, 3 Sep 2015 13:52:31 +1200
+Subject: net/ipv6: Correct PIM6 mrt_lock handling
+
+From: Richard Laing
+
+[ Upstream commit 25b4a44c19c83d98e8c0807a7ede07c1f28eab8b ]
+
+In the IPv6 multicast routing code the mrt_lock was not being released
+correctly in the MFC iterator, as a result adding or deleting a MIF would
+cause a hang because the mrt_lock could not be acquired.
+
+This fix is a copy of the code for the IPv4 case and ensures that the lock
+is released correctly.
+
+Signed-off-by: Richard Laing
+Acked-by: Cong Wang
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/ipv6/ip6mr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv6/ip6mr.c
++++ b/net/ipv6/ip6mr.c
+@@ -550,7 +550,7 @@ static void ipmr_mfc_seq_stop(struct seq
+
+ if (it->cache == &mrt->mfc6_unres_queue)
+ spin_unlock_bh(&mfc_unres_lock);
+- else if (it->cache == mrt->mfc6_cache_array)
++ else if (it->cache == &mrt->mfc6_cache_array[it->ct])
+ read_unlock(&mrt_lock);
+ }
+
diff --git a/kernel/kernel/files/patches/mageia/stable-net-mlx4_core-capping-number-of-requested-msixs-to-max_msix.patch b/kernel/kernel/files/patches/mageia/stable-net-mlx4_core-capping-number-of-requested-msixs-to-max_msix.patch
new file mode 100644
index 00000000..2dd1d4c2
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-mlx4_core-capping-number-of-requested-msixs-to-max_msix.patch
@@ -0,0 +1,59 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Carol L Soto
+Date: Thu, 27 Aug 2015 14:43:25 -0500
+Subject: net/mlx4_core: Capping number of requested MSIXs to MAX_MSIX
+
+From: Carol L Soto
+
+[ Upstream commit 9293267a3e2a7a2555d8ddc8f9301525e5b03b1b ]
+
+We currently manage IRQs in pool_bm which is a bit field
+of MAX_MSIX bits. Thus, allocating more than MAX_MSIX
+interrupts can't be managed in pool_bm.
+Fixing this by capping number of requested MSIXs to
+MAX_MSIX.
+
+Signed-off-by: Matan Barak
+Signed-off-by: Carol L Soto
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/ethernet/mellanox/mlx4/main.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx4/main.c
++++ b/drivers/net/ethernet/mellanox/mlx4/main.c
+@@ -2654,9 +2654,14 @@ static void mlx4_enable_msi_x(struct mlx
+
+ if (msi_x) {
+ int nreq = dev->caps.num_ports * num_online_cpus() + 1;
++ bool shared_ports = false;
+
+ nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs,
+ nreq);
++ if (nreq > MAX_MSIX) {
++ nreq = MAX_MSIX;
++ shared_ports = true;
++ }
+
+ entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL);
+ if (!entries)
+@@ -2679,6 +2684,9 @@ static void mlx4_enable_msi_x(struct mlx
+ bitmap_zero(priv->eq_table.eq[MLX4_EQ_ASYNC].actv_ports.ports,
+ dev->caps.num_ports);
+
++ if (MLX4_IS_LEGACY_EQ_MODE(dev->caps))
++ shared_ports = true;
++
+ for (i = 0; i < dev->caps.num_comp_vectors + 1; i++) {
+ if (i == MLX4_EQ_ASYNC)
+ continue;
+@@ -2686,7 +2694,7 @@ static void mlx4_enable_msi_x(struct mlx
+ priv->eq_table.eq[i].irq =
+ entries[i + 1 - !!(i > MLX4_EQ_ASYNC)].vector;
+
+- if (MLX4_IS_LEGACY_EQ_MODE(dev->caps)) {
++ if (shared_ports) {
+ bitmap_fill(priv->eq_table.eq[i].actv_ports.ports,
+ dev->caps.num_ports);
+ /* We don't set affinity hint when there
diff --git a/kernel/kernel/files/patches/mageia/stable-net-mlx4_en-really-allow-to-change-rss-key.patch b/kernel/kernel/files/patches/mageia/stable-net-mlx4_en-really-allow-to-change-rss-key.patch
new file mode 100644
index 00000000..81e975de
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-mlx4_en-really-allow-to-change-rss-key.patch
@@ -0,0 +1,35 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Eric Dumazet
+Date: Tue, 15 Sep 2015 18:29:47 -0700
+Subject: net/mlx4_en: really allow to change RSS key
+
+From: Eric Dumazet
+
+[ Upsteam commit 4671fc6d47e0a0108fe24a4d830347d6a6ef4aa7 ]
+
+When changing rss key, we do not want to overwrite user provided key
+by the one provided by netdev_rss_key_fill(), which is the host random
+key generated at boot time.
+
+Fixes: 947cbb0ac242 ("net/mlx4_en: Support for configurable RSS hash function")
+Signed-off-by: Eric Dumazet
+Cc: Eyal Perry
+CC: Amir Vadai
+Acked-by: Or Gerlitz
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
++++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+@@ -1250,8 +1250,6 @@ int mlx4_en_config_rss_steer(struct mlx4
+ rss_context->hash_fn = MLX4_RSS_HASH_TOP;
+ memcpy(rss_context->rss_key, priv->rss_key,
+ MLX4_EN_RSS_KEY_SIZE);
+- netdev_rss_key_fill(rss_context->rss_key,
+- MLX4_EN_RSS_KEY_SIZE);
+ } else {
+ en_err(priv, "Unknown RSS hash function requested\n");
+ err = -EINVAL;
diff --git a/kernel/kernel/files/patches/mageia/stable-net-mvneta-fix-dma-buffer-unmapping-in-mvneta_rx.patch b/kernel/kernel/files/patches/mageia/stable-net-mvneta-fix-dma-buffer-unmapping-in-mvneta_rx.patch
new file mode 100644
index 00000000..88581ba8
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-mvneta-fix-dma-buffer-unmapping-in-mvneta_rx.patch
@@ -0,0 +1,55 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Simon Guinot
+Date: Tue, 15 Sep 2015 22:41:21 +0200
+Subject: net: mvneta: fix DMA buffer unmapping in mvneta_rx()
+
+From: Simon Guinot
+
+[ Upstream commit daf158d0d544cec80b7b30deff8cfc59a6e17610 ]
+
+This patch fixes a regression introduced by the commit a84e32894191
+("net: mvneta: fix refilling for Rx DMA buffers"). Due to this commit
+the newly allocated Rx buffers are DMA-unmapped in place of those passed
+to the networking stack. Obviously, this causes data corruptions.
+
+This patch fixes the issue by ensuring that the right Rx buffers are
+DMA-unmapped.
+
+Reported-by: Oren Laskin
+Signed-off-by: Simon Guinot
+Fixes: a84e32894191 ("net: mvneta: fix refilling for Rx DMA buffers")
+Cc: # v3.8+
+Tested-by: Oren Laskin
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/ethernet/marvell/mvneta.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -1479,6 +1479,7 @@ static int mvneta_rx(struct mvneta_port
+ struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
+ struct sk_buff *skb;
+ unsigned char *data;
++ dma_addr_t phys_addr;
+ u32 rx_status;
+ int rx_bytes, err;
+
+@@ -1486,6 +1487,7 @@ static int mvneta_rx(struct mvneta_port
+ rx_status = rx_desc->status;
+ rx_bytes = rx_desc->data_size - (ETH_FCS_LEN + MVNETA_MH_SIZE);
+ data = (unsigned char *)rx_desc->buf_cookie;
++ phys_addr = rx_desc->buf_phys_addr;
+
+ if (!mvneta_rxq_desc_is_first_last(rx_status) ||
+ (rx_status & MVNETA_RXD_ERR_SUMMARY)) {
+@@ -1534,7 +1536,7 @@ static int mvneta_rx(struct mvneta_port
+ if (!skb)
+ goto err_drop_frame;
+
+- dma_unmap_single(dev->dev.parent, rx_desc->buf_phys_addr,
++ dma_unmap_single(dev->dev.parent, phys_addr,
+ MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE);
+
+ rcvd_pkts++;
diff --git a/kernel/kernel/files/patches/mageia/stable-net-phy-fixed_phy-handle-link-down-case.patch b/kernel/kernel/files/patches/mageia/stable-net-phy-fixed_phy-handle-link-down-case.patch
new file mode 100644
index 00000000..1c9f04ce
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-phy-fixed_phy-handle-link-down-case.patch
@@ -0,0 +1,65 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Stas Sergeev
+Date: Mon, 20 Jul 2015 17:49:56 -0700
+Subject: net: phy: fixed_phy: handle link-down case
+
+From: Stas Sergeev
+
+[ Upstream 868a4215be9a6d80548ccb74763b883dc99d32a2 in net-next tree,
+ will be pushed to Linus very soon. ]
+
+fixed_phy_register() currently hardcodes the fixed PHY link to 1, and
+expects to find a "speed" parameter to provide correct information
+towards the fixed PHY consumer.
+
+In a subsequent change, where we allow "managed" (e.g: (RS)GMII in-band
+status auto-negotiation) fixed PHYs, none of these parameters can be
+provided since they will be auto-negotiated, hence, we just provide a
+zero-initialized fixed_phy_status to fixed_phy_register() which makes it
+fail when we call fixed_phy_update_regs() since status.speed = 0 which
+makes us hit the "default" label and error out.
+
+Without this change, we would also see potentially inconsistent
+speed/duplex parameters for fixed PHYs when the link is DOWN.
+
+CC: netdev@vger.kernel.org
+CC: linux-kernel@vger.kernel.org
+Signed-off-by: Stas Sergeev
+[florian: add more background to why this is correct and desirable]
+Signed-off-by: Florian Fainelli
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/phy/fixed_phy.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/phy/fixed_phy.c
++++ b/drivers/net/phy/fixed_phy.c
+@@ -52,6 +52,10 @@ static int fixed_phy_update_regs(struct
+ u16 lpagb = 0;
+ u16 lpa = 0;
+
++ if (!fp->status.link)
++ goto done;
++ bmsr |= BMSR_LSTATUS | BMSR_ANEGCOMPLETE;
++
+ if (fp->status.duplex) {
+ bmcr |= BMCR_FULLDPLX;
+
+@@ -96,15 +100,13 @@ static int fixed_phy_update_regs(struct
+ }
+ }
+
+- if (fp->status.link)
+- bmsr |= BMSR_LSTATUS | BMSR_ANEGCOMPLETE;
+-
+ if (fp->status.pause)
+ lpa |= LPA_PAUSE_CAP;
+
+ if (fp->status.asym_pause)
+ lpa |= LPA_PAUSE_ASYM;
+
++done:
+ fp->regs[MII_PHYSID1] = 0;
+ fp->regs[MII_PHYSID2] = 0;
+
diff --git a/kernel/kernel/files/patches/mageia/stable-net-revert-net_sched-move-tp-root-allocation-into-fw_init.patch b/kernel/kernel/files/patches/mageia/stable-net-revert-net_sched-move-tp-root-allocation-into-fw_init.patch
new file mode 100644
index 00000000..95456842
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-net-revert-net_sched-move-tp-root-allocation-into-fw_init.patch
@@ -0,0 +1,93 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: WANG Cong
+Date: Tue, 22 Sep 2015 17:01:11 -0700
+Subject: net: revert "net_sched: move tp->root allocation into fw_init()"
+
+From: WANG Cong
+
+[ Upstream commit d8aecb10115497f6cdf841df8c88ebb3ba25fa28 ]
+
+fw filter uses tp->root==NULL to check if it is the old method,
+so it doesn't need allocation at all in this case. This patch
+reverts the offending commit and adds some comments for old
+method to make it obvious.
+
+Fixes: 33f8b9ecdb15 ("net_sched: move tp->root allocation into fw_init()")
+Reported-by: Akshat Kakkar
+Cc: Jamal Hadi Salim
+Signed-off-by: Cong Wang
+Acked-by: Jamal Hadi Salim
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/sched/cls_fw.c | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+--- a/net/sched/cls_fw.c
++++ b/net/sched/cls_fw.c
+@@ -33,7 +33,6 @@
+
+ struct fw_head {
+ u32 mask;
+- bool mask_set;
+ struct fw_filter __rcu *ht[HTSIZE];
+ struct rcu_head rcu;
+ };
+@@ -84,7 +83,7 @@ static int fw_classify(struct sk_buff *s
+ }
+ }
+ } else {
+- /* old method */
++ /* Old method: classify the packet using its skb mark. */
+ if (id && (TC_H_MAJ(id) == 0 ||
+ !(TC_H_MAJ(id ^ tp->q->handle)))) {
+ res->classid = id;
+@@ -114,14 +113,9 @@ static unsigned long fw_get(struct tcf_p
+
+ static int fw_init(struct tcf_proto *tp)
+ {
+- struct fw_head *head;
+-
+- head = kzalloc(sizeof(struct fw_head), GFP_KERNEL);
+- if (head == NULL)
+- return -ENOBUFS;
+-
+- head->mask_set = false;
+- rcu_assign_pointer(tp->root, head);
++ /* We don't allocate fw_head here, because in the old method
++ * we don't need it at all.
++ */
+ return 0;
+ }
+
+@@ -252,7 +246,7 @@ static int fw_change(struct net *net, st
+ int err;
+
+ if (!opt)
+- return handle ? -EINVAL : 0;
++ return handle ? -EINVAL : 0; /* Succeed if it is old method. */
+
+ err = nla_parse_nested(tb, TCA_FW_MAX, opt, fw_policy);
+ if (err < 0)
+@@ -302,11 +296,17 @@ static int fw_change(struct net *net, st
+ if (!handle)
+ return -EINVAL;
+
+- if (!head->mask_set) {
+- head->mask = 0xFFFFFFFF;
++ if (!head) {
++ u32 mask = 0xFFFFFFFF;
+ if (tb[TCA_FW_MASK])
+- head->mask = nla_get_u32(tb[TCA_FW_MASK]);
+- head->mask_set = true;
++ mask = nla_get_u32(tb[TCA_FW_MASK]);
++
++ head = kzalloc(sizeof(*head), GFP_KERNEL);
++ if (!head)
++ return -ENOBUFS;
++ head->mask = mask;
++
++ rcu_assign_pointer(tp->root, head);
+ }
+
+ f = kzalloc(sizeof(struct fw_filter), GFP_KERNEL);
diff --git a/kernel/kernel/files/patches/mageia/stable-netlink-fix-autobind-race-condition-that-leads-to-zero-port-id.patch b/kernel/kernel/files/patches/mageia/stable-netlink-fix-autobind-race-condition-that-leads-to-zero-port-id.patch
new file mode 100644
index 00000000..abe888b3
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-netlink-fix-autobind-race-condition-that-leads-to-zero-port-id.patch
@@ -0,0 +1,92 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Herbert Xu
+Date: Fri, 18 Sep 2015 19:16:50 +0800
+Subject: netlink: Fix autobind race condition that leads to zero port ID
+
+From: Herbert Xu
+
+[ Upstream commit 1f770c0a09da855a2b51af6d19de97fb955eca85 ]
+
+The commit c0bb07df7d981e4091432754e30c9c720e2c0c78 ("netlink:
+Reset portid after netlink_insert failure") introduced a race
+condition where if two threads try to autobind the same socket
+one of them may end up with a zero port ID. This led to kernel
+deadlocks that were observed by multiple people.
+
+This patch reverts that commit and instead fixes it by introducing
+a separte rhash_portid variable so that the real portid is only set
+after the socket has been successfully hashed.
+
+Fixes: c0bb07df7d98 ("netlink: Reset portid after netlink_insert failure")
+Reported-by: Tejun Heo
+Reported-by: Linus Torvalds
+Signed-off-by: Herbert Xu
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/netlink/af_netlink.c | 12 +++++++-----
+ net/netlink/af_netlink.h | 1 +
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+--- a/net/netlink/af_netlink.c
++++ b/net/netlink/af_netlink.c
+@@ -1019,7 +1019,7 @@ static inline int netlink_compare(struct
+ const struct netlink_compare_arg *x = arg->key;
+ const struct netlink_sock *nlk = ptr;
+
+- return nlk->portid != x->portid ||
++ return nlk->rhash_portid != x->portid ||
+ !net_eq(sock_net(&nlk->sk), read_pnet(&x->pnet));
+ }
+
+@@ -1045,7 +1045,7 @@ static int __netlink_insert(struct netli
+ {
+ struct netlink_compare_arg arg;
+
+- netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid);
++ netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->rhash_portid);
+ return rhashtable_lookup_insert_key(&table->hash, &arg,
+ &nlk_sk(sk)->node,
+ netlink_rhashtable_params);
+@@ -1107,7 +1107,7 @@ static int netlink_insert(struct sock *s
+ unlikely(atomic_read(&table->hash.nelems) >= UINT_MAX))
+ goto err;
+
+- nlk_sk(sk)->portid = portid;
++ nlk_sk(sk)->rhash_portid = portid;
+ sock_hold(sk);
+
+ err = __netlink_insert(table, sk);
+@@ -1119,10 +1119,12 @@ static int netlink_insert(struct sock *s
+ err = -EOVERFLOW;
+ if (err == -EEXIST)
+ err = -EADDRINUSE;
+- nlk_sk(sk)->portid = 0;
+ sock_put(sk);
++ goto err;
+ }
+
++ nlk_sk(sk)->portid = portid;
++
+ err:
+ release_sock(sk);
+ return err;
+@@ -3233,7 +3235,7 @@ static inline u32 netlink_hash(const voi
+ const struct netlink_sock *nlk = data;
+ struct netlink_compare_arg arg;
+
+- netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid);
++ netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->rhash_portid);
+ return jhash2((u32 *)&arg, netlink_compare_arg_len / sizeof(u32), seed);
+ }
+
+--- a/net/netlink/af_netlink.h
++++ b/net/netlink/af_netlink.h
+@@ -25,6 +25,7 @@ struct netlink_ring {
+ struct netlink_sock {
+ /* struct sock has to be the first member of netlink_sock */
+ struct sock sk;
++ u32 rhash_portid;
+ u32 portid;
+ u32 dst_portid;
+ u32 dst_group;
diff --git a/kernel/kernel/files/patches/mageia/stable-netlink-mmap-transform-mmap-skb-into-full-skb-on-taps.patch b/kernel/kernel/files/patches/mageia/stable-netlink-mmap-transform-mmap-skb-into-full-skb-on-taps.patch
new file mode 100644
index 00000000..79ac4cf7
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-netlink-mmap-transform-mmap-skb-into-full-skb-on-taps.patch
@@ -0,0 +1,116 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Daniel Borkmann
+Date: Thu, 10 Sep 2015 20:05:46 +0200
+Subject: netlink, mmap: transform mmap skb into full skb on taps
+
+From: Daniel Borkmann
+
+[ Upstream commit 1853c949646005b5959c483becde86608f548f24 ]
+
+Ken-ichirou reported that running netlink in mmap mode for receive in
+combination with nlmon will throw a NULL pointer dereference in
+__kfree_skb() on nlmon_xmit(), in my case I can also trigger an "unable
+to handle kernel paging request". The problem is the skb_clone() in
+__netlink_deliver_tap_skb() for skbs that are mmaped.
+
+I.e. the cloned skb doesn't have a destructor, whereas the mmap netlink
+skb has it pointed to netlink_skb_destructor(), set in the handler
+netlink_ring_setup_skb(). There, skb->head is being set to NULL, so
+that in such cases, __kfree_skb() doesn't perform a skb_release_data()
+via skb_release_all(), where skb->head is possibly being freed through
+kfree(head) into slab allocator, although netlink mmap skb->head points
+to the mmap buffer. Similarly, the same has to be done also for large
+netlink skbs where the data area is vmalloced. Therefore, as discussed,
+make a copy for these rather rare cases for now. This fixes the issue
+on my and Ken-ichirou's test-cases.
+
+Reference: http://thread.gmane.org/gmane.linux.network/371129
+Fixes: bcbde0d449ed ("net: netlink: virtual tap device management")
+Reported-by: Ken-ichirou MATSUZAWA
+Signed-off-by: Daniel Borkmann
+Tested-by: Ken-ichirou MATSUZAWA
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/netlink/af_netlink.c | 30 +++++++++++++++++++++++-------
+ net/netlink/af_netlink.h | 9 +++++++++
+ 2 files changed, 32 insertions(+), 7 deletions(-)
+
+--- a/net/netlink/af_netlink.c
++++ b/net/netlink/af_netlink.c
+@@ -124,6 +124,24 @@ static inline u32 netlink_group_mask(u32
+ return group ? 1 << (group - 1) : 0;
+ }
+
++static struct sk_buff *netlink_to_full_skb(const struct sk_buff *skb,
++ gfp_t gfp_mask)
++{
++ unsigned int len = skb_end_offset(skb);
++ struct sk_buff *new;
++
++ new = alloc_skb(len, gfp_mask);
++ if (new == NULL)
++ return NULL;
++
++ NETLINK_CB(new).portid = NETLINK_CB(skb).portid;
++ NETLINK_CB(new).dst_group = NETLINK_CB(skb).dst_group;
++ NETLINK_CB(new).creds = NETLINK_CB(skb).creds;
++
++ memcpy(skb_put(new, len), skb->data, len);
++ return new;
++}
++
+ int netlink_add_tap(struct netlink_tap *nt)
+ {
+ if (unlikely(nt->dev->type != ARPHRD_NETLINK))
+@@ -205,7 +223,11 @@ static int __netlink_deliver_tap_skb(str
+ int ret = -ENOMEM;
+
+ dev_hold(dev);
+- nskb = skb_clone(skb, GFP_ATOMIC);
++
++ if (netlink_skb_is_mmaped(skb) || is_vmalloc_addr(skb->head))
++ nskb = netlink_to_full_skb(skb, GFP_ATOMIC);
++ else
++ nskb = skb_clone(skb, GFP_ATOMIC);
+ if (nskb) {
+ nskb->dev = dev;
+ nskb->protocol = htons((u16) sk->sk_protocol);
+@@ -278,11 +300,6 @@ static void netlink_rcv_wake(struct sock
+ }
+
+ #ifdef CONFIG_NETLINK_MMAP
+-static bool netlink_skb_is_mmaped(const struct sk_buff *skb)
+-{
+- return NETLINK_CB(skb).flags & NETLINK_SKB_MMAPED;
+-}
+-
+ static bool netlink_rx_is_mmaped(struct sock *sk)
+ {
+ return nlk_sk(sk)->rx_ring.pg_vec != NULL;
+@@ -834,7 +851,6 @@ static void netlink_ring_set_copied(stru
+ }
+
+ #else /* CONFIG_NETLINK_MMAP */
+-#define netlink_skb_is_mmaped(skb) false
+ #define netlink_rx_is_mmaped(sk) false
+ #define netlink_tx_is_mmaped(sk) false
+ #define netlink_mmap sock_no_mmap
+--- a/net/netlink/af_netlink.h
++++ b/net/netlink/af_netlink.h
+@@ -59,6 +59,15 @@ static inline struct netlink_sock *nlk_s
+ return container_of(sk, struct netlink_sock, sk);
+ }
+
++static inline bool netlink_skb_is_mmaped(const struct sk_buff *skb)
++{
++#ifdef CONFIG_NETLINK_MMAP
++ return NETLINK_CB(skb).flags & NETLINK_SKB_MMAPED;
++#else
++ return false;
++#endif /* CONFIG_NETLINK_MMAP */
++}
++
+ struct netlink_table {
+ struct rhashtable hash;
+ struct hlist_head mc_list;
diff --git a/kernel/kernel/files/patches/mageia/stable-netlink-replace-rhash_portid-with-bound.patch b/kernel/kernel/files/patches/mageia/stable-netlink-replace-rhash_portid-with-bound.patch
new file mode 100644
index 00000000..e123ba16
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-netlink-replace-rhash_portid-with-bound.patch
@@ -0,0 +1,245 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Herbert Xu
+Date: Tue, 22 Sep 2015 11:38:56 +0800
+Subject: netlink: Replace rhash_portid with bound
+
+From: Herbert Xu
+
+[ Upstream commit da314c9923fed553a007785a901fd395b7eb6c19 ]
+
+On Mon, Sep 21, 2015 at 02:20:22PM -0400, Tejun Heo wrote:
+>
+> store_release and load_acquire are different from the usual memory
+> barriers and can't be paired this way. You have to pair store_release
+> and load_acquire. Besides, it isn't a particularly good idea to
+
+OK I've decided to drop the acquire/release helpers as they don't
+help us at all and simply pessimises the code by using full memory
+barriers (on some architectures) where only a write or read barrier
+is needed.
+
+> depend on memory barriers embedded in other data structures like the
+> above. Here, especially, rhashtable_insert() would have write barrier
+> *before* the entry is hashed not necessarily *after*, which means that
+> in the above case, a socket which appears to have set bound to a
+> reader might not visible when the reader tries to look up the socket
+> on the hashtable.
+
+But you are right we do need an explicit write barrier here to
+ensure that the hashing is visible.
+
+> There's no reason to be overly smart here. This isn't a crazy hot
+> path, write barriers tend to be very cheap, store_release more so.
+> Please just do smp_store_release() and note what it's paired with.
+
+It's not about being overly smart. It's about actually understanding
+what's going on with the code. I've seen too many instances of
+people simply sprinkling synchronisation primitives around without
+any knowledge of what is happening underneath, which is just a recipe
+for creating hard-to-debug races.
+
+> > @@ -1539,7 +1546,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
+> > }
+> > }
+> >
+> > - if (!nlk->portid) {
+> > + if (!nlk->bound) {
+>
+> I don't think you can skip load_acquire here just because this is the
+> second deref of the variable. That doesn't change anything. Race
+> condition could still happen between the first and second tests and
+> skipping the second would lead to the same kind of bug.
+
+The reason this one is OK is because we do not use nlk->portid or
+try to get nlk from the hash table before we return to user-space.
+
+However, there is a real bug here that none of these acquire/release
+helpers discovered. The two bound tests here used to be a single
+one. Now that they are separate it is entirely possible for another
+thread to come in the middle and bind the socket. So we need to
+repeat the portid check in order to maintain consistency.
+
+> > @@ -1587,7 +1594,7 @@ static int netlink_connect(struct socket *sock, struct sockaddr *addr,
+> > !netlink_allowed(sock, NL_CFG_F_NONROOT_SEND))
+> > return -EPERM;
+> >
+> > - if (!nlk->portid)
+> > + if (!nlk->bound)
+>
+> Don't we need load_acquire here too? Is this path holding a lock
+> which makes that unnecessary?
+
+Ditto.
+
+---8<---
+The commit 1f770c0a09da855a2b51af6d19de97fb955eca85 ("netlink:
+Fix autobind race condition that leads to zero port ID") created
+some new races that can occur due to inconcsistencies between the
+two port IDs.
+
+Tejun is right that a barrier is unavoidable. Therefore I am
+reverting to the original patch that used a boolean to indicate
+that a user netlink socket has been bound.
+
+Barriers have been added where necessary to ensure that a valid
+portid and the hashed socket is visible.
+
+I have also changed netlink_insert to only return EBUSY if the
+socket is bound to a portid different to the requested one. This
+combined with only reading nlk->bound once in netlink_bind fixes
+a race where two threads that bind the socket at the same time
+with different port IDs may both succeed.
+
+Fixes: 1f770c0a09da ("netlink: Fix autobind race condition that leads to zero port ID")
+Reported-by: Tejun Heo
+Reported-by: Linus Torvalds
+Signed-off-by: Herbert Xu
+Nacked-by: Tejun Heo
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/netlink/af_netlink.c | 39 ++++++++++++++++++++++++++++-----------
+ net/netlink/af_netlink.h | 2 +-
+ 2 files changed, 29 insertions(+), 12 deletions(-)
+
+--- a/net/netlink/af_netlink.c
++++ b/net/netlink/af_netlink.c
+@@ -1019,7 +1019,7 @@ static inline int netlink_compare(struct
+ const struct netlink_compare_arg *x = arg->key;
+ const struct netlink_sock *nlk = ptr;
+
+- return nlk->rhash_portid != x->portid ||
++ return nlk->portid != x->portid ||
+ !net_eq(sock_net(&nlk->sk), read_pnet(&x->pnet));
+ }
+
+@@ -1045,7 +1045,7 @@ static int __netlink_insert(struct netli
+ {
+ struct netlink_compare_arg arg;
+
+- netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->rhash_portid);
++ netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid);
+ return rhashtable_lookup_insert_key(&table->hash, &arg,
+ &nlk_sk(sk)->node,
+ netlink_rhashtable_params);
+@@ -1098,8 +1098,8 @@ static int netlink_insert(struct sock *s
+
+ lock_sock(sk);
+
+- err = -EBUSY;
+- if (nlk_sk(sk)->portid)
++ err = nlk_sk(sk)->portid == portid ? 0 : -EBUSY;
++ if (nlk_sk(sk)->bound)
+ goto err;
+
+ err = -ENOMEM;
+@@ -1107,7 +1107,7 @@ static int netlink_insert(struct sock *s
+ unlikely(atomic_read(&table->hash.nelems) >= UINT_MAX))
+ goto err;
+
+- nlk_sk(sk)->rhash_portid = portid;
++ nlk_sk(sk)->portid = portid;
+ sock_hold(sk);
+
+ err = __netlink_insert(table, sk);
+@@ -1123,7 +1123,9 @@ static int netlink_insert(struct sock *s
+ goto err;
+ }
+
+- nlk_sk(sk)->portid = portid;
++ /* We need to ensure that the socket is hashed and visible. */
++ smp_wmb();
++ nlk_sk(sk)->bound = portid;
+
+ err:
+ release_sock(sk);
+@@ -1509,6 +1511,7 @@ static int netlink_bind(struct socket *s
+ struct sockaddr_nl *nladdr = (struct sockaddr_nl *)addr;
+ int err;
+ long unsigned int groups = nladdr->nl_groups;
++ bool bound;
+
+ if (addr_len < sizeof(struct sockaddr_nl))
+ return -EINVAL;
+@@ -1525,9 +1528,14 @@ static int netlink_bind(struct socket *s
+ return err;
+ }
+
+- if (nlk->portid)
++ bound = nlk->bound;
++ if (bound) {
++ /* Ensure nlk->portid is up-to-date. */
++ smp_rmb();
++
+ if (nladdr->nl_pid != nlk->portid)
+ return -EINVAL;
++ }
+
+ if (nlk->netlink_bind && groups) {
+ int group;
+@@ -1543,7 +1551,10 @@ static int netlink_bind(struct socket *s
+ }
+ }
+
+- if (!nlk->portid) {
++ /* No need for barriers here as we return to user-space without
++ * using any of the bound attributes.
++ */
++ if (!bound) {
+ err = nladdr->nl_pid ?
+ netlink_insert(sk, nladdr->nl_pid) :
+ netlink_autobind(sock);
+@@ -1591,7 +1602,10 @@ static int netlink_connect(struct socket
+ !netlink_allowed(sock, NL_CFG_F_NONROOT_SEND))
+ return -EPERM;
+
+- if (!nlk->portid)
++ /* No need for barriers here as we return to user-space without
++ * using any of the bound attributes.
++ */
++ if (!nlk->bound)
+ err = netlink_autobind(sock);
+
+ if (err == 0) {
+@@ -2409,10 +2423,13 @@ static int netlink_sendmsg(struct socket
+ dst_group = nlk->dst_group;
+ }
+
+- if (!nlk->portid) {
++ if (!nlk->bound) {
+ err = netlink_autobind(sock);
+ if (err)
+ goto out;
++ } else {
++ /* Ensure nlk is hashed and visible. */
++ smp_rmb();
+ }
+
+ /* It's a really convoluted way for userland to ask for mmaped
+@@ -3235,7 +3252,7 @@ static inline u32 netlink_hash(const voi
+ const struct netlink_sock *nlk = data;
+ struct netlink_compare_arg arg;
+
+- netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->rhash_portid);
++ netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid);
+ return jhash2((u32 *)&arg, netlink_compare_arg_len / sizeof(u32), seed);
+ }
+
+--- a/net/netlink/af_netlink.h
++++ b/net/netlink/af_netlink.h
+@@ -25,7 +25,6 @@ struct netlink_ring {
+ struct netlink_sock {
+ /* struct sock has to be the first member of netlink_sock */
+ struct sock sk;
+- u32 rhash_portid;
+ u32 portid;
+ u32 dst_portid;
+ u32 dst_group;
+@@ -36,6 +35,7 @@ struct netlink_sock {
+ unsigned long state;
+ size_t max_recvmsg_len;
+ wait_queue_head_t wait;
++ bool bound;
+ bool cb_running;
+ struct netlink_callback cb;
+ struct mutex *cb_mutex;
diff --git a/kernel/kernel/files/patches/mageia/stable-of_mdio-add-new-dt-property-managed-to-specify-the-phy-management-type.patch b/kernel/kernel/files/patches/mageia/stable-of_mdio-add-new-dt-property-managed-to-specify-the-phy-management-type.patch
new file mode 100644
index 00000000..089b3260
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-of_mdio-add-new-dt-property-managed-to-specify-the-phy-management-type.patch
@@ -0,0 +1,106 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Stas Sergeev
+Date: Mon, 20 Jul 2015 17:49:57 -0700
+Subject: of_mdio: add new DT property 'managed' to specify the PHY management type
+
+From: Stas Sergeev
+
+[ Upstream commit 4cba5c2103657d43d0886e4cff8004d95a3d0def in net-next tree,
+ will be pushed to Linus very soon. ]
+
+Currently the PHY management type is selected by the MAC driver arbitrary.
+The decision is based on the presence of the "fixed-link" node and on a
+will of the driver's authors.
+This caused a regression recently, when mvneta driver suddenly started
+to use the in-band status for auto-negotiation on fixed links.
+It appears the auto-negotiation may not work when expected by the MAC driver.
+Sebastien Rannou explains:
+<< Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
+a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
+inband status) is connected to the switch through QSGMII, and in this context
+we are on the media side of the PHY. >>
+https://lkml.org/lkml/2015/7/10/206
+
+This patch introduces the new string property 'managed' that allows
+the user to set the management type explicitly.
+The supported values are:
+"auto" - default. Uses either MDIO or nothing, depending on the presence
+of the fixed-link node
+"in-band-status" - use in-band status
+
+Signed-off-by: Stas Sergeev
+
+CC: Rob Herring
+CC: Pawel Moll
+CC: Mark Rutland
+CC: Ian Campbell
+CC: Kumar Gala
+CC: Florian Fainelli
+CC: Grant Likely
+CC: devicetree@vger.kernel.org
+CC: linux-kernel@vger.kernel.org
+CC: netdev@vger.kernel.org
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ Documentation/devicetree/bindings/net/ethernet.txt | 4 ++++
+ drivers/of/of_mdio.c | 19 +++++++++++++++++--
+ 2 files changed, 21 insertions(+), 2 deletions(-)
+
+--- a/Documentation/devicetree/bindings/net/ethernet.txt
++++ b/Documentation/devicetree/bindings/net/ethernet.txt
+@@ -25,7 +25,11 @@ The following properties are common to t
+ flow control thresholds.
+ - tx-fifo-depth: the size of the controller's transmit fifo in bytes. This
+ is used for components that can have configurable fifo sizes.
++- managed: string, specifies the PHY management type. Supported values are:
++ "auto", "in-band-status". "auto" is the default, it usess MDIO for
++ management if fixed-link is not specified.
+
+ Child nodes of the Ethernet controller are typically the individual PHY devices
+ connected via the MDIO bus (sometimes the MDIO bus controller is separate).
+ They are described in the phy.txt file in this same directory.
++For non-MDIO PHY management see fixed-link.txt.
+--- a/drivers/of/of_mdio.c
++++ b/drivers/of/of_mdio.c
+@@ -266,7 +266,8 @@ EXPORT_SYMBOL(of_phy_attach);
+ bool of_phy_is_fixed_link(struct device_node *np)
+ {
+ struct device_node *dn;
+- int len;
++ int len, err;
++ const char *managed;
+
+ /* New binding */
+ dn = of_get_child_by_name(np, "fixed-link");
+@@ -275,6 +276,10 @@ bool of_phy_is_fixed_link(struct device_
+ return true;
+ }
+
++ err = of_property_read_string(np, "managed", &managed);
++ if (err == 0 && strcmp(managed, "auto") != 0)
++ return true;
++
+ /* Old binding */
+ if (of_get_property(np, "fixed-link", &len) &&
+ len == (5 * sizeof(__be32)))
+@@ -289,8 +294,18 @@ int of_phy_register_fixed_link(struct de
+ struct fixed_phy_status status = {};
+ struct device_node *fixed_link_node;
+ const __be32 *fixed_link_prop;
+- int len;
++ int len, err;
+ struct phy_device *phy;
++ const char *managed;
++
++ err = of_property_read_string(np, "managed", &managed);
++ if (err == 0) {
++ if (strcmp(managed, "in-band-status") == 0) {
++ /* status is zeroed, namely its .link member */
++ phy = fixed_phy_register(PHY_POLL, &status, np);
++ return IS_ERR(phy) ? PTR_ERR(phy) : 0;
++ }
++ }
+
+ /* New binding */
+ fixed_link_node = of_get_child_by_name(np, "fixed-link");
diff --git a/kernel/kernel/files/patches/mageia/stable-openvswitch-zero-flows-on-allocation.patch b/kernel/kernel/files/patches/mageia/stable-openvswitch-zero-flows-on-allocation.patch
new file mode 100644
index 00000000..f65ab90a
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-openvswitch-zero-flows-on-allocation.patch
@@ -0,0 +1,116 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Jesse Gross
+Date: Mon, 21 Sep 2015 20:21:20 -0700
+Subject: openvswitch: Zero flows on allocation.
+
+From: Jesse Gross
+
+[ Upstream commit ae5f2fb1d51fa128a460bcfbe3c56d7ab8bf6a43 ]
+
+When support for megaflows was introduced, OVS needed to start
+installing flows with a mask applied to them. Since masking is an
+expensive operation, OVS also had an optimization that would only
+take the parts of the flow keys that were covered by a non-zero
+mask. The values stored in the remaining pieces should not matter
+because they are masked out.
+
+While this works fine for the purposes of matching (which must always
+look at the mask), serialization to netlink can be problematic. Since
+the flow and the mask are serialized separately, the uninitialized
+portions of the flow can be encoded with whatever values happen to be
+present.
+
+In terms of functionality, this has little effect since these fields
+will be masked out by definition. However, it leaks kernel memory to
+userspace, which is a potential security vulnerability. It is also
+possible that other code paths could look at the masked key and get
+uninitialized data, although this does not currently appear to be an
+issue in practice.
+
+This removes the mask optimization for flows that are being installed.
+This was always intended to be the case as the mask optimizations were
+really targetting per-packet flow operations.
+
+Fixes: 03f0d916 ("openvswitch: Mega flow implementation")
+Signed-off-by: Jesse Gross
+Acked-by: Pravin B Shelar
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ net/openvswitch/datapath.c | 4 ++--
+ net/openvswitch/flow_table.c | 23 ++++++++++++-----------
+ net/openvswitch/flow_table.h | 2 +-
+ 3 files changed, 15 insertions(+), 14 deletions(-)
+
+--- a/net/openvswitch/datapath.c
++++ b/net/openvswitch/datapath.c
+@@ -920,7 +920,7 @@ static int ovs_flow_cmd_new(struct sk_bu
+ if (error)
+ goto err_kfree_flow;
+
+- ovs_flow_mask_key(&new_flow->key, &key, &mask);
++ ovs_flow_mask_key(&new_flow->key, &key, true, &mask);
+
+ /* Extract flow identifier. */
+ error = ovs_nla_get_identifier(&new_flow->id, a[OVS_FLOW_ATTR_UFID],
+@@ -1047,7 +1047,7 @@ static struct sw_flow_actions *get_flow_
+ struct sw_flow_key masked_key;
+ int error;
+
+- ovs_flow_mask_key(&masked_key, key, mask);
++ ovs_flow_mask_key(&masked_key, key, true, mask);
+ error = ovs_nla_copy_actions(a, &masked_key, &acts, log);
+ if (error) {
+ OVS_NLERR(log,
+--- a/net/openvswitch/flow_table.c
++++ b/net/openvswitch/flow_table.c
+@@ -56,20 +56,21 @@ static u16 range_n_bytes(const struct sw
+ }
+
+ void ovs_flow_mask_key(struct sw_flow_key *dst, const struct sw_flow_key *src,
+- const struct sw_flow_mask *mask)
++ bool full, const struct sw_flow_mask *mask)
+ {
+- const long *m = (const long *)((const u8 *)&mask->key +
+- mask->range.start);
+- const long *s = (const long *)((const u8 *)src +
+- mask->range.start);
+- long *d = (long *)((u8 *)dst + mask->range.start);
++ int start = full ? 0 : mask->range.start;
++ int len = full ? sizeof *dst : range_n_bytes(&mask->range);
++ const long *m = (const long *)((const u8 *)&mask->key + start);
++ const long *s = (const long *)((const u8 *)src + start);
++ long *d = (long *)((u8 *)dst + start);
+ int i;
+
+- /* The memory outside of the 'mask->range' are not set since
+- * further operations on 'dst' only uses contents within
+- * 'mask->range'.
++ /* If 'full' is true then all of 'dst' is fully initialized. Otherwise,
++ * if 'full' is false the memory outside of the 'mask->range' is left
++ * uninitialized. This can be used as an optimization when further
++ * operations on 'dst' only use contents within 'mask->range'.
+ */
+- for (i = 0; i < range_n_bytes(&mask->range); i += sizeof(long))
++ for (i = 0; i < len; i += sizeof(long))
+ *d++ = *s++ & *m++;
+ }
+
+@@ -473,7 +474,7 @@ static struct sw_flow *masked_flow_looku
+ u32 hash;
+ struct sw_flow_key masked_key;
+
+- ovs_flow_mask_key(&masked_key, unmasked, mask);
++ ovs_flow_mask_key(&masked_key, unmasked, false, mask);
+ hash = flow_hash(&masked_key, &mask->range);
+ head = find_bucket(ti, hash);
+ hlist_for_each_entry_rcu(flow, head, flow_table.node[ti->node_ver]) {
+--- a/net/openvswitch/flow_table.h
++++ b/net/openvswitch/flow_table.h
+@@ -86,5 +86,5 @@ struct sw_flow *ovs_flow_tbl_lookup_ufid
+ bool ovs_flow_cmp(const struct sw_flow *, const struct sw_flow_match *);
+
+ void ovs_flow_mask_key(struct sw_flow_key *dst, const struct sw_flow_key *src,
+- const struct sw_flow_mask *mask);
++ bool full, const struct sw_flow_mask *mask);
+ #endif /* flow_table.h */
diff --git a/kernel/kernel/files/patches/mageia/stable-phylib-fix-device-deletion-order-in-mdiobus_unregister.patch b/kernel/kernel/files/patches/mageia/stable-phylib-fix-device-deletion-order-in-mdiobus_unregister.patch
new file mode 100644
index 00000000..632af654
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-phylib-fix-device-deletion-order-in-mdiobus_unregister.patch
@@ -0,0 +1,80 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Mark Salter
+Date: Tue, 1 Sep 2015 09:36:05 -0400
+Subject: phylib: fix device deletion order in mdiobus_unregister()
+
+From: Mark Salter
+
+[ Upstream commit b6c6aedcbcbacd7b0cb4b64ed5ac835bc1c60a03 ]
+
+commit 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not
+the bus' parent.") uncovered a problem in mdiobus_unregister() which
+leads to this warning when I reboot an APM Mustang (arm64) platform:
+
+ WARNING: CPU: 7 PID: 4239 at fs/sysfs/group.c:224 sysfs_remove_group+0xa0/0xa4()
+ sysfs group fffffe0000e07a10 not found for kobject 'xgene-mii-eth0:03'
+ ...
+ CPU: 7 PID: 4239 Comm: reboot Tainted: G E 4.2.0-0.18.el7.test15.aarch64 #1
+ Hardware name: AppliedMicro Mustang/Mustang, BIOS 1.1.0 Aug 26 2015
+ Call Trace:
+ [] dump_backtrace+0x0/0x170
+ [] show_stack+0x20/0x2c
+ [] dump_stack+0x78/0x9c
+ [] warn_slowpath_common+0xa0/0xd8
+ [] warn_slowpath_fmt+0x74/0x88
+ [] sysfs_remove_group+0x9c/0xa4
+ [] dpm_sysfs_remove+0x5c/0x70
+ [] device_del+0x44/0x208
+ [] device_unregister+0x2c/0x7c
+ [] mdiobus_unregister+0x48/0x94
+ [] xgene_enet_mdio_remove+0x28/0x44
+ [] xgene_enet_remove+0xd0/0xd8
+ [] xgene_enet_shutdown+0x2c/0x3c
+ [] platform_drv_shutdown+0x24/0x40
+ [] device_shutdown+0xf0/0x1b4
+ [] kernel_restart_prepare+0x40/0x4c
+ [] kernel_restart+0x1c/0x80
+ [] SyS_reboot+0x17c/0x250
+
+The problem is that mdiobus_unregister() deletes the bus device before
+unregistering the phy devices on the bus. This wasn't a problem before
+because the phys were not children of the bus:
+
+ /sys/devices/platform/APMC0D05:00/net/eth0/xgene-mii-eth0:03
+ /sys/devices/platform/APMC0D05:00/net/eth0/xgene-mii-eth0
+
+But now that they are:
+
+ /sys/devices/platform/APMC0D05:00/net/eth0/xgene-mii-eth0/xgene-mii-eth0:03
+
+when mdiobus_unregister deletes the bus device, the phy subdirs are
+removed from sysfs also. So when the phys are unregistered afterward,
+we get the warning. This patch changes the order so that phys are
+unregistered before the bus device is deleted.
+
+Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.")
+Signed-off-by: Mark Salter
+Reviewed-by: Florian Fainelli
+Tested-by: Mark Langsdorf
+Signed-off-by: David S. Miller
+Signed-off-by: Greg Kroah-Hartman
+---
+ drivers/net/phy/mdio_bus.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/phy/mdio_bus.c
++++ b/drivers/net/phy/mdio_bus.c
+@@ -303,12 +303,12 @@ void mdiobus_unregister(struct mii_bus *
+ BUG_ON(bus->state != MDIOBUS_REGISTERED);
+ bus->state = MDIOBUS_UNREGISTERED;
+
+- device_del(&bus->dev);
+ for (i = 0; i < PHY_MAX_ADDR; i++) {
+ if (bus->phy_map[i])
+ device_unregister(&bus->phy_map[i]->dev);
+ bus->phy_map[i] = NULL;
+ }
++ device_del(&bus->dev);
+ }
+ EXPORT_SYMBOL(mdiobus_unregister);
+
diff --git a/kernel/kernel/files/patches/mageia/stable-ppp-fix-lockdep-splat-in-ppp_dev_uninit.patch b/kernel/kernel/files/patches/mageia/stable-ppp-fix-lockdep-splat-in-ppp_dev_uninit.patch
new file mode 100644
index 00000000..db6825e9
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/stable-ppp-fix-lockdep-splat-in-ppp_dev_uninit.patch
@@ -0,0 +1,104 @@
+From foo@baz Wed Sep 30 05:25:07 CEST 2015
+From: Guillaume Nault
+Date: Thu, 24 Sep 2015 12:54:01 +0200
+Subject: ppp: fix lockdep splat in ppp_dev_uninit()
+
+From: Guillaume Nault
+
+[ Upstream commit 58a89ecaca53736aa465170530acea4f8be34ab4 ]
+
+ppp_dev_uninit() locks all_ppp_mutex while under rtnl mutex protection.
+ppp_create_interface() must then lock these mutexes in that same order
+to avoid possible deadlock.
+
+[ 120.880011] ======================================================
+[ 120.880011] [ INFO: possible circular locking dependency detected ]
+[ 120.880011] 4.2.0 #1 Not tainted
+[ 120.880011] -------------------------------------------------------
+[ 120.880011] ppp-apitest/15827 is trying to acquire lock:
+[ 120.880011] (&pn->all_ppp_mutex){+.+.+.}, at: [] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
+[ 120.880011]
+[ 120.880011] but task is already holding lock:
+[ 120.880011] (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x12/0x14
+[ 120.880011]
+[ 120.880011] which lock already depends on the new lock.
+[ 120.880011]
+[ 120.880011]
+[ 120.880011] the existing dependency chain (in reverse order) is:
+[ 120.880011]
+[ 120.880011] -> #1 (rtnl_mutex){+.+.+.}:
+[ 120.880011] [