diff options
32 files changed, 246 insertions, 135 deletions
diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt index 0cb6685c8029..8eda3635a17d 100644 --- a/Documentation/vfio.txt +++ b/Documentation/vfio.txt | |||
| @@ -133,7 +133,7 @@ character devices for this group: | |||
| 133 | $ lspci -n -s 0000:06:0d.0 | 133 | $ lspci -n -s 0000:06:0d.0 |
| 134 | 06:0d.0 0401: 1102:0002 (rev 08) | 134 | 06:0d.0 0401: 1102:0002 (rev 08) |
| 135 | # echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind | 135 | # echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind |
| 136 | # echo 1102 0002 > /sys/bus/pci/drivers/vfio/new_id | 136 | # echo 1102 0002 > /sys/bus/pci/drivers/vfio-pci/new_id |
| 137 | 137 | ||
| 138 | Now we need to look at what other devices are in the group to free | 138 | Now we need to look at what other devices are in the group to free |
| 139 | it for use by VFIO: | 139 | it for use by VFIO: |
diff --git a/MAINTAINERS b/MAINTAINERS index b17587d9412f..9a6c4da3b2ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -3552,11 +3552,12 @@ K: \b(ABS|SYN)_MT_ | |||
| 3552 | 3552 | ||
| 3553 | INTEL C600 SERIES SAS CONTROLLER DRIVER | 3553 | INTEL C600 SERIES SAS CONTROLLER DRIVER |
| 3554 | M: Intel SCU Linux support <intel-linux-scu@intel.com> | 3554 | M: Intel SCU Linux support <intel-linux-scu@intel.com> |
| 3555 | M: Lukasz Dorau <lukasz.dorau@intel.com> | ||
| 3556 | M: Maciej Patelczyk <maciej.patelczyk@intel.com> | ||
| 3555 | M: Dave Jiang <dave.jiang@intel.com> | 3557 | M: Dave Jiang <dave.jiang@intel.com> |
| 3556 | M: Ed Nadolski <edmund.nadolski@intel.com> | ||
| 3557 | L: linux-scsi@vger.kernel.org | 3558 | L: linux-scsi@vger.kernel.org |
| 3558 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git | 3559 | T: git git://git.code.sf.net/p/intel-sas/isci |
| 3559 | S: Maintained | 3560 | S: Supported |
| 3560 | F: drivers/scsi/isci/ | 3561 | F: drivers/scsi/isci/ |
| 3561 | F: firmware/isci/ | 3562 | F: firmware/isci/ |
| 3562 | 3563 | ||
| @@ -5544,6 +5545,8 @@ F: Documentation/devicetree/bindings/pwm/ | |||
| 5544 | F: include/linux/pwm.h | 5545 | F: include/linux/pwm.h |
| 5545 | F: include/linux/of_pwm.h | 5546 | F: include/linux/of_pwm.h |
| 5546 | F: drivers/pwm/ | 5547 | F: drivers/pwm/ |
| 5548 | F: drivers/video/backlight/pwm_bl.c | ||
| 5549 | F: include/linux/pwm_backlight.h | ||
| 5547 | 5550 | ||
| 5548 | PXA2xx/PXA3xx SUPPORT | 5551 | PXA2xx/PXA3xx SUPPORT |
| 5549 | M: Eric Miao <eric.y.miao@gmail.com> | 5552 | M: Eric Miao <eric.y.miao@gmail.com> |
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 8dabfe81d07c..ff886e01a0b0 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
| @@ -261,7 +261,7 @@ static void __init apx4devkit_init(void) | |||
| 261 | enable_clk_enet_out(); | 261 | enable_clk_enet_out(); |
| 262 | 262 | ||
| 263 | if (IS_BUILTIN(CONFIG_PHYLIB)) | 263 | if (IS_BUILTIN(CONFIG_PHYLIB)) |
| 264 | phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK, | 264 | phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK, |
| 265 | apx4devkit_phy_fixup); | 265 | apx4devkit_phy_fixup); |
| 266 | 266 | ||
| 267 | mxsfb_pdata.mode_list = apx4devkit_video_modes; | 267 | mxsfb_pdata.mode_list = apx4devkit_video_modes; |
diff --git a/arch/c6x/include/asm/Kbuild b/arch/c6x/include/asm/Kbuild index 3af601e31e66..f08e89183cda 100644 --- a/arch/c6x/include/asm/Kbuild +++ b/arch/c6x/include/asm/Kbuild | |||
| @@ -2,6 +2,7 @@ include include/asm-generic/Kbuild.asm | |||
| 2 | 2 | ||
| 3 | generic-y += atomic.h | 3 | generic-y += atomic.h |
| 4 | generic-y += auxvec.h | 4 | generic-y += auxvec.h |
| 5 | generic-y += barrier.h | ||
| 5 | generic-y += bitsperlong.h | 6 | generic-y += bitsperlong.h |
| 6 | generic-y += bugs.h | 7 | generic-y += bugs.h |
| 7 | generic-y += cputime.h | 8 | generic-y += cputime.h |
diff --git a/arch/c6x/include/asm/barrier.h b/arch/c6x/include/asm/barrier.h deleted file mode 100644 index 538240e85909..000000000000 --- a/arch/c6x/include/asm/barrier.h +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Port on Texas Instruments TMS320C6x architecture | ||
| 3 | * | ||
| 4 | * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated | ||
| 5 | * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com) | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | #ifndef _ASM_C6X_BARRIER_H | ||
| 12 | #define _ASM_C6X_BARRIER_H | ||
| 13 | |||
| 14 | #define nop() asm("NOP\n"); | ||
| 15 | |||
| 16 | #define mb() barrier() | ||
| 17 | #define rmb() barrier() | ||
| 18 | #define wmb() barrier() | ||
| 19 | #define set_mb(var, value) do { var = value; mb(); } while (0) | ||
| 20 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
| 21 | |||
| 22 | #define smp_mb() barrier() | ||
| 23 | #define smp_rmb() barrier() | ||
| 24 | #define smp_wmb() barrier() | ||
| 25 | #define smp_read_barrier_depends() do { } while (0) | ||
| 26 | |||
| 27 | #endif /* _ASM_C6X_BARRIER_H */ | ||
diff --git a/arch/tile/include/gxio/iorpc_trio.h b/arch/tile/include/gxio/iorpc_trio.h index 15fb77992083..58105c31228b 100644 --- a/arch/tile/include/gxio/iorpc_trio.h +++ b/arch/tile/include/gxio/iorpc_trio.h | |||
| @@ -25,21 +25,23 @@ | |||
| 25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
| 26 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
| 27 | 27 | ||
| 28 | #define GXIO_TRIO_OP_ALLOC_ASIDS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400) | 28 | #define GXIO_TRIO_OP_DEALLOC_ASID IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1400) |
| 29 | #define GXIO_TRIO_OP_ALLOC_ASIDS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1401) | ||
| 29 | 30 | ||
| 30 | #define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1402) | 31 | #define GXIO_TRIO_OP_ALLOC_MEMORY_MAPS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1404) |
| 31 | 32 | ||
| 32 | #define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140e) | 33 | #define GXIO_TRIO_OP_ALLOC_PIO_REGIONS IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1412) |
| 33 | #define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x140f) | ||
| 34 | 34 | ||
| 35 | #define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1417) | 35 | #define GXIO_TRIO_OP_INIT_PIO_REGION_AUX IORPC_OPCODE(IORPC_FORMAT_NONE, 0x1414) |
| 36 | #define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1418) | ||
| 37 | #define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1419) | ||
| 38 | #define GXIO_TRIO_OP_CONFIG_MSI_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x141a) | ||
| 39 | 36 | ||
| 40 | #define GXIO_TRIO_OP_SET_MPS_MRS IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141c) | 37 | #define GXIO_TRIO_OP_INIT_MEMORY_MAP_MMU_AUX IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e) |
| 41 | #define GXIO_TRIO_OP_FORCE_RC_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141d) | 38 | #define GXIO_TRIO_OP_GET_PORT_PROPERTY IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141f) |
| 42 | #define GXIO_TRIO_OP_FORCE_EP_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x141e) | 39 | #define GXIO_TRIO_OP_CONFIG_LEGACY_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1420) |
| 40 | #define GXIO_TRIO_OP_CONFIG_MSI_INTR IORPC_OPCODE(IORPC_FORMAT_KERNEL_INTERRUPT, 0x1421) | ||
| 41 | |||
| 42 | #define GXIO_TRIO_OP_SET_MPS_MRS IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1423) | ||
| 43 | #define GXIO_TRIO_OP_FORCE_RC_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1424) | ||
| 44 | #define GXIO_TRIO_OP_FORCE_EP_LINK_UP IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x1425) | ||
| 43 | #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) | 45 | #define GXIO_TRIO_OP_GET_MMIO_BASE IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8000) |
| 44 | #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) | 46 | #define GXIO_TRIO_OP_CHECK_MMIO_OFFSET IORPC_OPCODE(IORPC_FORMAT_NONE_NOUSER, 0x8001) |
| 45 | 47 | ||
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index d11ca11d14fc..e2d62d697b5d 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <asm/e820.h> | 17 | #include <asm/e820.h> |
| 18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
| 19 | #include <asm/acpi.h> | 19 | #include <asm/acpi.h> |
| 20 | #include <asm/numa.h> | ||
| 20 | #include <asm/xen/hypervisor.h> | 21 | #include <asm/xen/hypervisor.h> |
| 21 | #include <asm/xen/hypercall.h> | 22 | #include <asm/xen/hypercall.h> |
| 22 | 23 | ||
| @@ -544,4 +545,7 @@ void __init xen_arch_setup(void) | |||
| 544 | disable_cpufreq(); | 545 | disable_cpufreq(); |
| 545 | WARN_ON(set_pm_idle_to_default()); | 546 | WARN_ON(set_pm_idle_to_default()); |
| 546 | fiddle_vdso(); | 547 | fiddle_vdso(); |
| 548 | #ifdef CONFIG_NUMA | ||
| 549 | numa_off = 1; | ||
| 550 | #endif | ||
| 547 | } | 551 | } |
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 9917943a3572..54a55f03115d 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
| @@ -246,13 +246,12 @@ static int rbd_open(struct block_device *bdev, fmode_t mode) | |||
| 246 | { | 246 | { |
| 247 | struct rbd_device *rbd_dev = bdev->bd_disk->private_data; | 247 | struct rbd_device *rbd_dev = bdev->bd_disk->private_data; |
| 248 | 248 | ||
| 249 | rbd_get_dev(rbd_dev); | ||
| 250 | |||
| 251 | set_device_ro(bdev, rbd_dev->read_only); | ||
| 252 | |||
| 253 | if ((mode & FMODE_WRITE) && rbd_dev->read_only) | 249 | if ((mode & FMODE_WRITE) && rbd_dev->read_only) |
| 254 | return -EROFS; | 250 | return -EROFS; |
| 255 | 251 | ||
| 252 | rbd_get_dev(rbd_dev); | ||
| 253 | set_device_ro(bdev, rbd_dev->read_only); | ||
| 254 | |||
| 256 | return 0; | 255 | return 0; |
| 257 | } | 256 | } |
| 258 | 257 | ||
diff --git a/drivers/net/phy/bcm87xx.c b/drivers/net/phy/bcm87xx.c index 2346b38b9837..799789518e87 100644 --- a/drivers/net/phy/bcm87xx.c +++ b/drivers/net/phy/bcm87xx.c | |||
| @@ -229,3 +229,5 @@ static void __exit bcm87xx_exit(void) | |||
| 229 | ARRAY_SIZE(bcm87xx_driver)); | 229 | ARRAY_SIZE(bcm87xx_driver)); |
| 230 | } | 230 | } |
| 231 | module_exit(bcm87xx_exit); | 231 | module_exit(bcm87xx_exit); |
| 232 | |||
| 233 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index cf287e0eb408..2165d5fdb8c0 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c | |||
| @@ -21,6 +21,12 @@ | |||
| 21 | #include <linux/phy.h> | 21 | #include <linux/phy.h> |
| 22 | #include <linux/micrel_phy.h> | 22 | #include <linux/micrel_phy.h> |
| 23 | 23 | ||
| 24 | /* Operation Mode Strap Override */ | ||
| 25 | #define MII_KSZPHY_OMSO 0x16 | ||
| 26 | #define KSZPHY_OMSO_B_CAST_OFF (1 << 9) | ||
| 27 | #define KSZPHY_OMSO_RMII_OVERRIDE (1 << 1) | ||
| 28 | #define KSZPHY_OMSO_MII_OVERRIDE (1 << 0) | ||
| 29 | |||
| 24 | /* general Interrupt control/status reg in vendor specific block. */ | 30 | /* general Interrupt control/status reg in vendor specific block. */ |
| 25 | #define MII_KSZPHY_INTCS 0x1B | 31 | #define MII_KSZPHY_INTCS 0x1B |
| 26 | #define KSZPHY_INTCS_JABBER (1 << 15) | 32 | #define KSZPHY_INTCS_JABBER (1 << 15) |
| @@ -101,6 +107,13 @@ static int kszphy_config_init(struct phy_device *phydev) | |||
| 101 | return 0; | 107 | return 0; |
| 102 | } | 108 | } |
| 103 | 109 | ||
| 110 | static int ksz8021_config_init(struct phy_device *phydev) | ||
| 111 | { | ||
| 112 | const u16 val = KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE; | ||
| 113 | phy_write(phydev, MII_KSZPHY_OMSO, val); | ||
| 114 | return 0; | ||
| 115 | } | ||
| 116 | |||
| 104 | static int ks8051_config_init(struct phy_device *phydev) | 117 | static int ks8051_config_init(struct phy_device *phydev) |
| 105 | { | 118 | { |
| 106 | int regval; | 119 | int regval; |
| @@ -128,9 +141,22 @@ static struct phy_driver ksphy_driver[] = { | |||
| 128 | .config_intr = ks8737_config_intr, | 141 | .config_intr = ks8737_config_intr, |
| 129 | .driver = { .owner = THIS_MODULE,}, | 142 | .driver = { .owner = THIS_MODULE,}, |
| 130 | }, { | 143 | }, { |
| 131 | .phy_id = PHY_ID_KS8041, | 144 | .phy_id = PHY_ID_KSZ8021, |
| 145 | .phy_id_mask = 0x00ffffff, | ||
| 146 | .name = "Micrel KSZ8021", | ||
| 147 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause | | ||
| 148 | SUPPORTED_Asym_Pause), | ||
| 149 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, | ||
| 150 | .config_init = ksz8021_config_init, | ||
| 151 | .config_aneg = genphy_config_aneg, | ||
| 152 | .read_status = genphy_read_status, | ||
| 153 | .ack_interrupt = kszphy_ack_interrupt, | ||
| 154 | .config_intr = kszphy_config_intr, | ||
| 155 | .driver = { .owner = THIS_MODULE,}, | ||
| 156 | }, { | ||
| 157 | .phy_id = PHY_ID_KSZ8041, | ||
| 132 | .phy_id_mask = 0x00fffff0, | 158 | .phy_id_mask = 0x00fffff0, |
| 133 | .name = "Micrel KS8041", | 159 | .name = "Micrel KSZ8041", |
| 134 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause | 160 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause |
| 135 | | SUPPORTED_Asym_Pause), | 161 | | SUPPORTED_Asym_Pause), |
| 136 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, | 162 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, |
| @@ -141,9 +167,9 @@ static struct phy_driver ksphy_driver[] = { | |||
| 141 | .config_intr = kszphy_config_intr, | 167 | .config_intr = kszphy_config_intr, |
| 142 | .driver = { .owner = THIS_MODULE,}, | 168 | .driver = { .owner = THIS_MODULE,}, |
| 143 | }, { | 169 | }, { |
| 144 | .phy_id = PHY_ID_KS8051, | 170 | .phy_id = PHY_ID_KSZ8051, |
| 145 | .phy_id_mask = 0x00fffff0, | 171 | .phy_id_mask = 0x00fffff0, |
| 146 | .name = "Micrel KS8051", | 172 | .name = "Micrel KSZ8051", |
| 147 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause | 173 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause |
| 148 | | SUPPORTED_Asym_Pause), | 174 | | SUPPORTED_Asym_Pause), |
| 149 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, | 175 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, |
| @@ -154,8 +180,8 @@ static struct phy_driver ksphy_driver[] = { | |||
| 154 | .config_intr = kszphy_config_intr, | 180 | .config_intr = kszphy_config_intr, |
| 155 | .driver = { .owner = THIS_MODULE,}, | 181 | .driver = { .owner = THIS_MODULE,}, |
| 156 | }, { | 182 | }, { |
| 157 | .phy_id = PHY_ID_KS8001, | 183 | .phy_id = PHY_ID_KSZ8001, |
| 158 | .name = "Micrel KS8001 or KS8721", | 184 | .name = "Micrel KSZ8001 or KS8721", |
| 159 | .phy_id_mask = 0x00ffffff, | 185 | .phy_id_mask = 0x00ffffff, |
| 160 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), | 186 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), |
| 161 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, | 187 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, |
| @@ -201,10 +227,11 @@ MODULE_LICENSE("GPL"); | |||
| 201 | 227 | ||
| 202 | static struct mdio_device_id __maybe_unused micrel_tbl[] = { | 228 | static struct mdio_device_id __maybe_unused micrel_tbl[] = { |
| 203 | { PHY_ID_KSZ9021, 0x000ffffe }, | 229 | { PHY_ID_KSZ9021, 0x000ffffe }, |
| 204 | { PHY_ID_KS8001, 0x00ffffff }, | 230 | { PHY_ID_KSZ8001, 0x00ffffff }, |
| 205 | { PHY_ID_KS8737, 0x00fffff0 }, | 231 | { PHY_ID_KS8737, 0x00fffff0 }, |
| 206 | { PHY_ID_KS8041, 0x00fffff0 }, | 232 | { PHY_ID_KSZ8021, 0x00ffffff }, |
| 207 | { PHY_ID_KS8051, 0x00fffff0 }, | 233 | { PHY_ID_KSZ8041, 0x00fffff0 }, |
| 234 | { PHY_ID_KSZ8051, 0x00fffff0 }, | ||
| 208 | { } | 235 | { } |
| 209 | }; | 236 | }; |
| 210 | 237 | ||
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index cbf7047decc0..20f31d0d1536 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c | |||
| @@ -570,7 +570,7 @@ static int pppoe_release(struct socket *sock) | |||
| 570 | 570 | ||
| 571 | po = pppox_sk(sk); | 571 | po = pppox_sk(sk); |
| 572 | 572 | ||
| 573 | if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) { | 573 | if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) { |
| 574 | dev_put(po->pppoe_dev); | 574 | dev_put(po->pppoe_dev); |
| 575 | po->pppoe_dev = NULL; | 575 | po->pppoe_dev = NULL; |
| 576 | } | 576 | } |
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 341b65dbbcd3..3ffe8a6e3c8b 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
| @@ -848,7 +848,7 @@ static struct netpoll_info *team_netpoll_info(struct team *team) | |||
| 848 | } | 848 | } |
| 849 | #endif | 849 | #endif |
| 850 | 850 | ||
| 851 | static void __team_port_change_check(struct team_port *port, bool linkup); | 851 | static void __team_port_change_port_added(struct team_port *port, bool linkup); |
| 852 | 852 | ||
| 853 | static int team_port_add(struct team *team, struct net_device *port_dev) | 853 | static int team_port_add(struct team *team, struct net_device *port_dev) |
| 854 | { | 854 | { |
| @@ -948,7 +948,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev) | |||
| 948 | team_port_enable(team, port); | 948 | team_port_enable(team, port); |
| 949 | list_add_tail_rcu(&port->list, &team->port_list); | 949 | list_add_tail_rcu(&port->list, &team->port_list); |
| 950 | __team_compute_features(team); | 950 | __team_compute_features(team); |
| 951 | __team_port_change_check(port, !!netif_carrier_ok(port_dev)); | 951 | __team_port_change_port_added(port, !!netif_carrier_ok(port_dev)); |
| 952 | __team_options_change_check(team); | 952 | __team_options_change_check(team); |
| 953 | 953 | ||
| 954 | netdev_info(dev, "Port device %s added\n", portname); | 954 | netdev_info(dev, "Port device %s added\n", portname); |
| @@ -983,6 +983,8 @@ err_set_mtu: | |||
| 983 | return err; | 983 | return err; |
| 984 | } | 984 | } |
| 985 | 985 | ||
| 986 | static void __team_port_change_port_removed(struct team_port *port); | ||
| 987 | |||
| 986 | static int team_port_del(struct team *team, struct net_device *port_dev) | 988 | static int team_port_del(struct team *team, struct net_device *port_dev) |
| 987 | { | 989 | { |
| 988 | struct net_device *dev = team->dev; | 990 | struct net_device *dev = team->dev; |
| @@ -999,8 +1001,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev) | |||
| 999 | __team_option_inst_mark_removed_port(team, port); | 1001 | __team_option_inst_mark_removed_port(team, port); |
| 1000 | __team_options_change_check(team); | 1002 | __team_options_change_check(team); |
| 1001 | __team_option_inst_del_port(team, port); | 1003 | __team_option_inst_del_port(team, port); |
| 1002 | port->removed = true; | 1004 | __team_port_change_port_removed(port); |
| 1003 | __team_port_change_check(port, false); | ||
| 1004 | team_port_disable(team, port); | 1005 | team_port_disable(team, port); |
| 1005 | list_del_rcu(&port->list); | 1006 | list_del_rcu(&port->list); |
| 1006 | netdev_rx_handler_unregister(port_dev); | 1007 | netdev_rx_handler_unregister(port_dev); |
| @@ -2251,13 +2252,11 @@ static void __team_options_change_check(struct team *team) | |||
| 2251 | } | 2252 | } |
| 2252 | 2253 | ||
| 2253 | /* rtnl lock is held */ | 2254 | /* rtnl lock is held */ |
| 2254 | static void __team_port_change_check(struct team_port *port, bool linkup) | 2255 | |
| 2256 | static void __team_port_change_send(struct team_port *port, bool linkup) | ||
| 2255 | { | 2257 | { |
| 2256 | int err; | 2258 | int err; |
| 2257 | 2259 | ||
| 2258 | if (!port->removed && port->state.linkup == linkup) | ||
| 2259 | return; | ||
| 2260 | |||
| 2261 | port->changed = true; | 2260 | port->changed = true; |
| 2262 | port->state.linkup = linkup; | 2261 | port->state.linkup = linkup; |
| 2263 | team_refresh_port_linkup(port); | 2262 | team_refresh_port_linkup(port); |
| @@ -2282,6 +2281,23 @@ send_event: | |||
| 2282 | 2281 | ||
| 2283 | } | 2282 | } |
| 2284 | 2283 | ||
| 2284 | static void __team_port_change_check(struct team_port *port, bool linkup) | ||
| 2285 | { | ||
| 2286 | if (port->state.linkup != linkup) | ||
| 2287 | __team_port_change_send(port, linkup); | ||
| 2288 | } | ||
| 2289 | |||
| 2290 | static void __team_port_change_port_added(struct team_port *port, bool linkup) | ||
| 2291 | { | ||
| 2292 | __team_port_change_send(port, linkup); | ||
| 2293 | } | ||
| 2294 | |||
| 2295 | static void __team_port_change_port_removed(struct team_port *port) | ||
| 2296 | { | ||
| 2297 | port->removed = true; | ||
| 2298 | __team_port_change_send(port, false); | ||
| 2299 | } | ||
| 2300 | |||
| 2285 | static void team_port_change_check(struct team_port *port, bool linkup) | 2301 | static void team_port_change_check(struct team_port *port, bool linkup) |
| 2286 | { | 2302 | { |
| 2287 | struct team *team = port->team; | 2303 | struct team *team = port->team; |
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 1e86ea2266d4..dbeebef562d5 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
| @@ -1442,6 +1442,7 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans) | |||
| 1442 | return err; | 1442 | return err; |
| 1443 | 1443 | ||
| 1444 | err_free_irq: | 1444 | err_free_irq: |
| 1445 | trans_pcie->irq_requested = false; | ||
| 1445 | free_irq(trans_pcie->irq, trans); | 1446 | free_irq(trans_pcie->irq, trans); |
| 1446 | error: | 1447 | error: |
| 1447 | iwl_free_isr_ict(trans); | 1448 | iwl_free_isr_ict(trans); |
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c index a3ac39b79192..0646bf6e7889 100644 --- a/drivers/sh/pfc/pinctrl.c +++ b/drivers/sh/pfc/pinctrl.c | |||
| @@ -208,6 +208,8 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev, | |||
| 208 | 208 | ||
| 209 | break; | 209 | break; |
| 210 | case PINMUX_TYPE_GPIO: | 210 | case PINMUX_TYPE_GPIO: |
| 211 | case PINMUX_TYPE_INPUT: | ||
| 212 | case PINMUX_TYPE_OUTPUT: | ||
| 211 | break; | 213 | break; |
| 212 | default: | 214 | default: |
| 213 | pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type); | 215 | pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type); |
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c index 211a4920b88a..d8dedc7d3910 100644 --- a/drivers/vfio/pci/vfio_pci_intrs.c +++ b/drivers/vfio/pci/vfio_pci_intrs.c | |||
| @@ -76,9 +76,24 @@ static int virqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key) | |||
| 76 | schedule_work(&virqfd->inject); | 76 | schedule_work(&virqfd->inject); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | if (flags & POLLHUP) | 79 | if (flags & POLLHUP) { |
| 80 | /* The eventfd is closing, detach from VFIO */ | 80 | unsigned long flags; |
| 81 | virqfd_deactivate(virqfd); | 81 | spin_lock_irqsave(&virqfd->vdev->irqlock, flags); |
| 82 | |||
| 83 | /* | ||
| 84 | * The eventfd is closing, if the virqfd has not yet been | ||
| 85 | * queued for release, as determined by testing whether the | ||
| 86 | * vdev pointer to it is still valid, queue it now. As | ||
| 87 | * with kvm irqfds, we know we won't race against the virqfd | ||
| 88 | * going away because we hold wqh->lock to get here. | ||
| 89 | */ | ||
| 90 | if (*(virqfd->pvirqfd) == virqfd) { | ||
| 91 | *(virqfd->pvirqfd) = NULL; | ||
| 92 | virqfd_deactivate(virqfd); | ||
| 93 | } | ||
| 94 | |||
| 95 | spin_unlock_irqrestore(&virqfd->vdev->irqlock, flags); | ||
| 96 | } | ||
| 82 | 97 | ||
| 83 | return 0; | 98 | return 0; |
| 84 | } | 99 | } |
| @@ -93,7 +108,6 @@ static void virqfd_ptable_queue_proc(struct file *file, | |||
| 93 | static void virqfd_shutdown(struct work_struct *work) | 108 | static void virqfd_shutdown(struct work_struct *work) |
| 94 | { | 109 | { |
| 95 | struct virqfd *virqfd = container_of(work, struct virqfd, shutdown); | 110 | struct virqfd *virqfd = container_of(work, struct virqfd, shutdown); |
| 96 | struct virqfd **pvirqfd = virqfd->pvirqfd; | ||
| 97 | u64 cnt; | 111 | u64 cnt; |
| 98 | 112 | ||
| 99 | eventfd_ctx_remove_wait_queue(virqfd->eventfd, &virqfd->wait, &cnt); | 113 | eventfd_ctx_remove_wait_queue(virqfd->eventfd, &virqfd->wait, &cnt); |
| @@ -101,7 +115,6 @@ static void virqfd_shutdown(struct work_struct *work) | |||
| 101 | eventfd_ctx_put(virqfd->eventfd); | 115 | eventfd_ctx_put(virqfd->eventfd); |
| 102 | 116 | ||
| 103 | kfree(virqfd); | 117 | kfree(virqfd); |
| 104 | *pvirqfd = NULL; | ||
| 105 | } | 118 | } |
| 106 | 119 | ||
| 107 | static void virqfd_inject(struct work_struct *work) | 120 | static void virqfd_inject(struct work_struct *work) |
| @@ -122,15 +135,11 @@ static int virqfd_enable(struct vfio_pci_device *vdev, | |||
| 122 | int ret = 0; | 135 | int ret = 0; |
| 123 | unsigned int events; | 136 | unsigned int events; |
| 124 | 137 | ||
| 125 | if (*pvirqfd) | ||
| 126 | return -EBUSY; | ||
| 127 | |||
| 128 | virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL); | 138 | virqfd = kzalloc(sizeof(*virqfd), GFP_KERNEL); |
| 129 | if (!virqfd) | 139 | if (!virqfd) |
| 130 | return -ENOMEM; | 140 | return -ENOMEM; |
| 131 | 141 | ||
| 132 | virqfd->pvirqfd = pvirqfd; | 142 | virqfd->pvirqfd = pvirqfd; |
| 133 | *pvirqfd = virqfd; | ||
| 134 | virqfd->vdev = vdev; | 143 | virqfd->vdev = vdev; |
| 135 | virqfd->handler = handler; | 144 | virqfd->handler = handler; |
| 136 | virqfd->thread = thread; | 145 | virqfd->thread = thread; |
| @@ -154,6 +163,23 @@ static int virqfd_enable(struct vfio_pci_device *vdev, | |||
| 154 | virqfd->eventfd = ctx; | 163 | virqfd->eventfd = ctx; |
| 155 | 164 | ||
| 156 | /* | 165 | /* |
| 166 | * virqfds can be released by closing the eventfd or directly | ||
| 167 | * through ioctl. These are both done through a workqueue, so | ||
| 168 | * we update the pointer to the virqfd under lock to avoid | ||
| 169 | * pushing multiple jobs to release the same virqfd. | ||
| 170 | */ | ||
| 171 | spin_lock_irq(&vdev->irqlock); | ||
| 172 | |||
| 173 | if (*pvirqfd) { | ||
| 174 | spin_unlock_irq(&vdev->irqlock); | ||
| 175 | ret = -EBUSY; | ||
| 176 | goto fail; | ||
| 177 | } | ||
| 178 | *pvirqfd = virqfd; | ||
| 179 | |||
| 180 | spin_unlock_irq(&vdev->irqlock); | ||
| 181 | |||
| 182 | /* | ||
| 157 | * Install our own custom wake-up handling so we are notified via | 183 | * Install our own custom wake-up handling so we are notified via |
| 158 | * a callback whenever someone signals the underlying eventfd. | 184 | * a callback whenever someone signals the underlying eventfd. |
| 159 | */ | 185 | */ |
| @@ -187,19 +213,29 @@ fail: | |||
| 187 | fput(file); | 213 | fput(file); |
| 188 | 214 | ||
| 189 | kfree(virqfd); | 215 | kfree(virqfd); |
| 190 | *pvirqfd = NULL; | ||
| 191 | 216 | ||
| 192 | return ret; | 217 | return ret; |
| 193 | } | 218 | } |
| 194 | 219 | ||
| 195 | static void virqfd_disable(struct virqfd *virqfd) | 220 | static void virqfd_disable(struct vfio_pci_device *vdev, |
| 221 | struct virqfd **pvirqfd) | ||
| 196 | { | 222 | { |
| 197 | if (!virqfd) | 223 | unsigned long flags; |
| 198 | return; | 224 | |
| 225 | spin_lock_irqsave(&vdev->irqlock, flags); | ||
| 226 | |||
| 227 | if (*pvirqfd) { | ||
| 228 | virqfd_deactivate(*pvirqfd); | ||
| 229 | *pvirqfd = NULL; | ||
| 230 | } | ||
| 199 | 231 | ||
| 200 | virqfd_deactivate(virqfd); | 232 | spin_unlock_irqrestore(&vdev->irqlock, flags); |
| 201 | 233 | ||
| 202 | /* Block until we know all outstanding shutdown jobs have completed. */ | 234 | /* |
| 235 | * Block until we know all outstanding shutdown jobs have completed. | ||
| 236 | * Even if we don't queue the job, flush the wq to be sure it's | ||
| 237 | * been released. | ||
| 238 | */ | ||
| 203 | flush_workqueue(vfio_irqfd_cleanup_wq); | 239 | flush_workqueue(vfio_irqfd_cleanup_wq); |
| 204 | } | 240 | } |
| 205 | 241 | ||
| @@ -392,8 +428,8 @@ static int vfio_intx_set_signal(struct vfio_pci_device *vdev, int fd) | |||
| 392 | static void vfio_intx_disable(struct vfio_pci_device *vdev) | 428 | static void vfio_intx_disable(struct vfio_pci_device *vdev) |
| 393 | { | 429 | { |
| 394 | vfio_intx_set_signal(vdev, -1); | 430 | vfio_intx_set_signal(vdev, -1); |
| 395 | virqfd_disable(vdev->ctx[0].unmask); | 431 | virqfd_disable(vdev, &vdev->ctx[0].unmask); |
| 396 | virqfd_disable(vdev->ctx[0].mask); | 432 | virqfd_disable(vdev, &vdev->ctx[0].mask); |
| 397 | vdev->irq_type = VFIO_PCI_NUM_IRQS; | 433 | vdev->irq_type = VFIO_PCI_NUM_IRQS; |
| 398 | vdev->num_ctx = 0; | 434 | vdev->num_ctx = 0; |
| 399 | kfree(vdev->ctx); | 435 | kfree(vdev->ctx); |
| @@ -539,8 +575,8 @@ static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix) | |||
| 539 | vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix); | 575 | vfio_msi_set_block(vdev, 0, vdev->num_ctx, NULL, msix); |
| 540 | 576 | ||
| 541 | for (i = 0; i < vdev->num_ctx; i++) { | 577 | for (i = 0; i < vdev->num_ctx; i++) { |
| 542 | virqfd_disable(vdev->ctx[i].unmask); | 578 | virqfd_disable(vdev, &vdev->ctx[i].unmask); |
| 543 | virqfd_disable(vdev->ctx[i].mask); | 579 | virqfd_disable(vdev, &vdev->ctx[i].mask); |
| 544 | } | 580 | } |
| 545 | 581 | ||
| 546 | if (msix) { | 582 | if (msix) { |
| @@ -577,7 +613,7 @@ static int vfio_pci_set_intx_unmask(struct vfio_pci_device *vdev, | |||
| 577 | vfio_send_intx_eventfd, NULL, | 613 | vfio_send_intx_eventfd, NULL, |
| 578 | &vdev->ctx[0].unmask, fd); | 614 | &vdev->ctx[0].unmask, fd); |
| 579 | 615 | ||
| 580 | virqfd_disable(vdev->ctx[0].unmask); | 616 | virqfd_disable(vdev, &vdev->ctx[0].unmask); |
| 581 | } | 617 | } |
| 582 | 618 | ||
| 583 | return 0; | 619 | return 0; |
diff --git a/fs/dcache.c b/fs/dcache.c index 16521a9f2038..0364af2311f4 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
| @@ -1141,7 +1141,7 @@ rename_retry: | |||
| 1141 | EXPORT_SYMBOL(have_submounts); | 1141 | EXPORT_SYMBOL(have_submounts); |
| 1142 | 1142 | ||
| 1143 | /* | 1143 | /* |
| 1144 | * Search the dentry child list for the specified parent, | 1144 | * Search the dentry child list of the specified parent, |
| 1145 | * and move any unused dentries to the end of the unused | 1145 | * and move any unused dentries to the end of the unused |
| 1146 | * list for prune_dcache(). We descend to the next level | 1146 | * list for prune_dcache(). We descend to the next level |
| 1147 | * whenever the d_subdirs list is non-empty and continue | 1147 | * whenever the d_subdirs list is non-empty and continue |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 991ef01cd77e..3748ec92dcbc 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
| @@ -691,9 +691,11 @@ __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ | |||
| 691 | #define __NR_process_vm_writev 271 | 691 | #define __NR_process_vm_writev 271 |
| 692 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ | 692 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ |
| 693 | compat_sys_process_vm_writev) | 693 | compat_sys_process_vm_writev) |
| 694 | #define __NR_kcmp 272 | ||
| 695 | __SYSCALL(__NR_kcmp, sys_kcmp) | ||
| 694 | 696 | ||
| 695 | #undef __NR_syscalls | 697 | #undef __NR_syscalls |
| 696 | #define __NR_syscalls 272 | 698 | #define __NR_syscalls 273 |
| 697 | 699 | ||
| 698 | /* | 700 | /* |
| 699 | * All syscalls below here should go away really, | 701 | * All syscalls below here should go away really, |
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 61f0905bdc48..de201203bc7c 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/micrel_phy.h | ||
| 3 | * | ||
| 4 | * Micrel PHY IDs | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the | ||
| 8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 9 | * option) any later version. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 1 | #ifndef _MICREL_PHY_H | 13 | #ifndef _MICREL_PHY_H |
| 2 | #define _MICREL_PHY_H | 14 | #define _MICREL_PHY_H |
| 3 | 15 | ||
| @@ -5,10 +17,11 @@ | |||
| 5 | 17 | ||
| 6 | #define PHY_ID_KSZ9021 0x00221610 | 18 | #define PHY_ID_KSZ9021 0x00221610 |
| 7 | #define PHY_ID_KS8737 0x00221720 | 19 | #define PHY_ID_KS8737 0x00221720 |
| 8 | #define PHY_ID_KS8041 0x00221510 | 20 | #define PHY_ID_KSZ8021 0x00221555 |
| 9 | #define PHY_ID_KS8051 0x00221550 | 21 | #define PHY_ID_KSZ8041 0x00221510 |
| 22 | #define PHY_ID_KSZ8051 0x00221550 | ||
| 10 | /* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ | 23 | /* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */ |
| 11 | #define PHY_ID_KS8001 0x0022161A | 24 | #define PHY_ID_KSZ8001 0x0022161A |
| 12 | 25 | ||
| 13 | /* struct phy_device dev_flags definitions */ | 26 | /* struct phy_device dev_flags definitions */ |
| 14 | #define MICREL_PHY_50MHZ_CLK 0x00000001 | 27 | #define MICREL_PHY_50MHZ_CLK 0x00000001 |
diff --git a/include/linux/security.h b/include/linux/security.h index 3dea6a9d568f..d143b8e01954 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -118,6 +118,7 @@ void reset_security_ops(void); | |||
| 118 | extern unsigned long mmap_min_addr; | 118 | extern unsigned long mmap_min_addr; |
| 119 | extern unsigned long dac_mmap_min_addr; | 119 | extern unsigned long dac_mmap_min_addr; |
| 120 | #else | 120 | #else |
| 121 | #define mmap_min_addr 0UL | ||
| 121 | #define dac_mmap_min_addr 0UL | 122 | #define dac_mmap_min_addr 0UL |
| 122 | #endif | 123 | #endif |
| 123 | 124 | ||
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c index c785554f9523..ebf3bac460b0 100644 --- a/lib/flex_proportions.c +++ b/lib/flex_proportions.c | |||
| @@ -62,7 +62,7 @@ void fprop_global_destroy(struct fprop_global *p) | |||
| 62 | */ | 62 | */ |
| 63 | bool fprop_new_period(struct fprop_global *p, int periods) | 63 | bool fprop_new_period(struct fprop_global *p, int periods) |
| 64 | { | 64 | { |
| 65 | u64 events; | 65 | s64 events; |
| 66 | unsigned long flags; | 66 | unsigned long flags; |
| 67 | 67 | ||
| 68 | local_irq_save(flags); | 68 | local_irq_save(flags); |
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index e877af8bdd1e..469daabd90c7 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
| @@ -642,7 +642,8 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, | |||
| 642 | struct batadv_neigh_node *router = NULL; | 642 | struct batadv_neigh_node *router = NULL; |
| 643 | struct batadv_orig_node *orig_node_tmp; | 643 | struct batadv_orig_node *orig_node_tmp; |
| 644 | struct hlist_node *node; | 644 | struct hlist_node *node; |
| 645 | uint8_t bcast_own_sum_orig, bcast_own_sum_neigh; | 645 | int if_num; |
| 646 | uint8_t sum_orig, sum_neigh; | ||
| 646 | uint8_t *neigh_addr; | 647 | uint8_t *neigh_addr; |
| 647 | 648 | ||
| 648 | batadv_dbg(BATADV_DBG_BATMAN, bat_priv, | 649 | batadv_dbg(BATADV_DBG_BATMAN, bat_priv, |
| @@ -727,17 +728,17 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv, | |||
| 727 | if (router && (neigh_node->tq_avg == router->tq_avg)) { | 728 | if (router && (neigh_node->tq_avg == router->tq_avg)) { |
| 728 | orig_node_tmp = router->orig_node; | 729 | orig_node_tmp = router->orig_node; |
| 729 | spin_lock_bh(&orig_node_tmp->ogm_cnt_lock); | 730 | spin_lock_bh(&orig_node_tmp->ogm_cnt_lock); |
| 730 | bcast_own_sum_orig = | 731 | if_num = router->if_incoming->if_num; |
| 731 | orig_node_tmp->bcast_own_sum[if_incoming->if_num]; | 732 | sum_orig = orig_node_tmp->bcast_own_sum[if_num]; |
| 732 | spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock); | 733 | spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock); |
| 733 | 734 | ||
| 734 | orig_node_tmp = neigh_node->orig_node; | 735 | orig_node_tmp = neigh_node->orig_node; |
| 735 | spin_lock_bh(&orig_node_tmp->ogm_cnt_lock); | 736 | spin_lock_bh(&orig_node_tmp->ogm_cnt_lock); |
| 736 | bcast_own_sum_neigh = | 737 | if_num = neigh_node->if_incoming->if_num; |
| 737 | orig_node_tmp->bcast_own_sum[if_incoming->if_num]; | 738 | sum_neigh = orig_node_tmp->bcast_own_sum[if_num]; |
| 738 | spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock); | 739 | spin_unlock_bh(&orig_node_tmp->ogm_cnt_lock); |
| 739 | 740 | ||
| 740 | if (bcast_own_sum_orig >= bcast_own_sum_neigh) | 741 | if (sum_orig >= sum_neigh) |
| 741 | goto update_tt; | 742 | goto update_tt; |
| 742 | } | 743 | } |
| 743 | 744 | ||
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 109ea2aae96c..21c53577c8d6 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
| @@ -100,18 +100,21 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p) | |||
| 100 | { | 100 | { |
| 101 | struct batadv_priv *bat_priv = netdev_priv(dev); | 101 | struct batadv_priv *bat_priv = netdev_priv(dev); |
| 102 | struct sockaddr *addr = p; | 102 | struct sockaddr *addr = p; |
| 103 | uint8_t old_addr[ETH_ALEN]; | ||
| 103 | 104 | ||
| 104 | if (!is_valid_ether_addr(addr->sa_data)) | 105 | if (!is_valid_ether_addr(addr->sa_data)) |
| 105 | return -EADDRNOTAVAIL; | 106 | return -EADDRNOTAVAIL; |
| 106 | 107 | ||
| 108 | memcpy(old_addr, dev->dev_addr, ETH_ALEN); | ||
| 109 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); | ||
| 110 | |||
| 107 | /* only modify transtable if it has been initialized before */ | 111 | /* only modify transtable if it has been initialized before */ |
| 108 | if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_ACTIVE) { | 112 | if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_ACTIVE) { |
| 109 | batadv_tt_local_remove(bat_priv, dev->dev_addr, | 113 | batadv_tt_local_remove(bat_priv, old_addr, |
| 110 | "mac address changed", false); | 114 | "mac address changed", false); |
| 111 | batadv_tt_local_add(dev, addr->sa_data, BATADV_NULL_IFINDEX); | 115 | batadv_tt_local_add(dev, addr->sa_data, BATADV_NULL_IFINDEX); |
| 112 | } | 116 | } |
| 113 | 117 | ||
| 114 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); | ||
| 115 | dev->addr_assign_type &= ~NET_ADDR_RANDOM; | 118 | dev->addr_assign_type &= ~NET_ADDR_RANDOM; |
| 116 | return 0; | 119 | return 0; |
| 117 | } | 120 | } |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index d4de5db18d5a..0b997c8f9655 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
| @@ -734,6 +734,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
| 734 | 734 | ||
| 735 | cancel_work_sync(&hdev->le_scan); | 735 | cancel_work_sync(&hdev->le_scan); |
| 736 | 736 | ||
| 737 | cancel_delayed_work(&hdev->power_off); | ||
| 738 | |||
| 737 | hci_req_cancel(hdev, ENODEV); | 739 | hci_req_cancel(hdev, ENODEV); |
| 738 | hci_req_lock(hdev); | 740 | hci_req_lock(hdev); |
| 739 | 741 | ||
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 4ea1710a4783..38c00f142203 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
| @@ -1008,7 +1008,7 @@ static void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *c | |||
| 1008 | if (!conn) | 1008 | if (!conn) |
| 1009 | return; | 1009 | return; |
| 1010 | 1010 | ||
| 1011 | if (chan->mode == L2CAP_MODE_ERTM) { | 1011 | if (chan->mode == L2CAP_MODE_ERTM && chan->state == BT_CONNECTED) { |
| 1012 | __clear_retrans_timer(chan); | 1012 | __clear_retrans_timer(chan); |
| 1013 | __clear_monitor_timer(chan); | 1013 | __clear_monitor_timer(chan); |
| 1014 | __clear_ack_timer(chan); | 1014 | __clear_ack_timer(chan); |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index ad6613d17ca6..eba022de3c20 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
| @@ -2875,6 +2875,22 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered) | |||
| 2875 | if (scan) | 2875 | if (scan) |
| 2876 | hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); | 2876 | hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); |
| 2877 | 2877 | ||
| 2878 | if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) { | ||
| 2879 | u8 ssp = 1; | ||
| 2880 | |||
| 2881 | hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &ssp); | ||
| 2882 | } | ||
| 2883 | |||
| 2884 | if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) { | ||
| 2885 | struct hci_cp_write_le_host_supported cp; | ||
| 2886 | |||
| 2887 | cp.le = 1; | ||
| 2888 | cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR); | ||
| 2889 | |||
| 2890 | hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED, | ||
| 2891 | sizeof(cp), &cp); | ||
| 2892 | } | ||
| 2893 | |||
| 2878 | update_class(hdev); | 2894 | update_class(hdev); |
| 2879 | update_name(hdev, hdev->dev_name); | 2895 | update_name(hdev, hdev->dev_name); |
| 2880 | update_eir(hdev); | 2896 | update_eir(hdev); |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 24c5eea8c45b..159aa8bef9e7 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
| @@ -1073,16 +1073,13 @@ static int write_partial_msg_pages(struct ceph_connection *con) | |||
| 1073 | BUG_ON(kaddr == NULL); | 1073 | BUG_ON(kaddr == NULL); |
| 1074 | base = kaddr + con->out_msg_pos.page_pos + bio_offset; | 1074 | base = kaddr + con->out_msg_pos.page_pos + bio_offset; |
| 1075 | crc = crc32c(crc, base, len); | 1075 | crc = crc32c(crc, base, len); |
| 1076 | kunmap(page); | ||
| 1076 | msg->footer.data_crc = cpu_to_le32(crc); | 1077 | msg->footer.data_crc = cpu_to_le32(crc); |
| 1077 | con->out_msg_pos.did_page_crc = true; | 1078 | con->out_msg_pos.did_page_crc = true; |
| 1078 | } | 1079 | } |
| 1079 | ret = ceph_tcp_sendpage(con->sock, page, | 1080 | ret = ceph_tcp_sendpage(con->sock, page, |
| 1080 | con->out_msg_pos.page_pos + bio_offset, | 1081 | con->out_msg_pos.page_pos + bio_offset, |
| 1081 | len, 1); | 1082 | len, 1); |
| 1082 | |||
| 1083 | if (do_datacrc) | ||
| 1084 | kunmap(page); | ||
| 1085 | |||
| 1086 | if (ret <= 0) | 1083 | if (ret <= 0) |
| 1087 | goto out; | 1084 | goto out; |
| 1088 | 1085 | ||
diff --git a/net/core/sock.c b/net/core/sock.c index 305792076121..a6000fbad294 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
| @@ -691,7 +691,8 @@ set_rcvbuf: | |||
| 691 | 691 | ||
| 692 | case SO_KEEPALIVE: | 692 | case SO_KEEPALIVE: |
| 693 | #ifdef CONFIG_INET | 693 | #ifdef CONFIG_INET |
| 694 | if (sk->sk_protocol == IPPROTO_TCP) | 694 | if (sk->sk_protocol == IPPROTO_TCP && |
| 695 | sk->sk_type == SOCK_STREAM) | ||
| 695 | tcp_set_keepalive(sk, valbool); | 696 | tcp_set_keepalive(sk, valbool); |
| 696 | #endif | 697 | #endif |
| 697 | sock_valbool_flag(sk, SOCK_KEEPOPEN, valbool); | 698 | sock_valbool_flag(sk, SOCK_KEEPOPEN, valbool); |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index ff0f071969ea..d23c6571ba1c 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
| @@ -131,18 +131,20 @@ found: | |||
| 131 | * 0 - deliver | 131 | * 0 - deliver |
| 132 | * 1 - block | 132 | * 1 - block |
| 133 | */ | 133 | */ |
| 134 | static __inline__ int icmp_filter(struct sock *sk, struct sk_buff *skb) | 134 | static int icmp_filter(const struct sock *sk, const struct sk_buff *skb) |
| 135 | { | 135 | { |
| 136 | int type; | 136 | struct icmphdr _hdr; |
| 137 | const struct icmphdr *hdr; | ||
| 137 | 138 | ||
| 138 | if (!pskb_may_pull(skb, sizeof(struct icmphdr))) | 139 | hdr = skb_header_pointer(skb, skb_transport_offset(skb), |
| 140 | sizeof(_hdr), &_hdr); | ||
| 141 | if (!hdr) | ||
| 139 | return 1; | 142 | return 1; |
| 140 | 143 | ||
| 141 | type = icmp_hdr(skb)->type; | 144 | if (hdr->type < 32) { |
| 142 | if (type < 32) { | ||
| 143 | __u32 data = raw_sk(sk)->filter.data; | 145 | __u32 data = raw_sk(sk)->filter.data; |
| 144 | 146 | ||
| 145 | return ((1 << type) & data) != 0; | 147 | return ((1U << hdr->type) & data) != 0; |
| 146 | } | 148 | } |
| 147 | 149 | ||
| 148 | /* Do not block unknown ICMP types */ | 150 | /* Do not block unknown ICMP types */ |
diff --git a/net/ipv6/mip6.c b/net/ipv6/mip6.c index 5b087c31d87b..0f9bdc5ee9f3 100644 --- a/net/ipv6/mip6.c +++ b/net/ipv6/mip6.c | |||
| @@ -86,28 +86,30 @@ static int mip6_mh_len(int type) | |||
| 86 | 86 | ||
| 87 | static int mip6_mh_filter(struct sock *sk, struct sk_buff *skb) | 87 | static int mip6_mh_filter(struct sock *sk, struct sk_buff *skb) |
| 88 | { | 88 | { |
| 89 | struct ip6_mh *mh; | 89 | struct ip6_mh _hdr; |
| 90 | const struct ip6_mh *mh; | ||
| 90 | 91 | ||
| 91 | if (!pskb_may_pull(skb, (skb_transport_offset(skb)) + 8) || | 92 | mh = skb_header_pointer(skb, skb_transport_offset(skb), |
| 92 | !pskb_may_pull(skb, (skb_transport_offset(skb) + | 93 | sizeof(_hdr), &_hdr); |
| 93 | ((skb_transport_header(skb)[1] + 1) << 3)))) | 94 | if (!mh) |
| 94 | return -1; | 95 | return -1; |
| 95 | 96 | ||
| 96 | mh = (struct ip6_mh *)skb_transport_header(skb); | 97 | if (((mh->ip6mh_hdrlen + 1) << 3) > skb->len) |
| 98 | return -1; | ||
| 97 | 99 | ||
| 98 | if (mh->ip6mh_hdrlen < mip6_mh_len(mh->ip6mh_type)) { | 100 | if (mh->ip6mh_hdrlen < mip6_mh_len(mh->ip6mh_type)) { |
| 99 | LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH message too short: %d vs >=%d\n", | 101 | LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH message too short: %d vs >=%d\n", |
| 100 | mh->ip6mh_hdrlen, mip6_mh_len(mh->ip6mh_type)); | 102 | mh->ip6mh_hdrlen, mip6_mh_len(mh->ip6mh_type)); |
| 101 | mip6_param_prob(skb, 0, ((&mh->ip6mh_hdrlen) - | 103 | mip6_param_prob(skb, 0, offsetof(struct ip6_mh, ip6mh_hdrlen) + |
| 102 | skb_network_header(skb))); | 104 | skb_network_header_len(skb)); |
| 103 | return -1; | 105 | return -1; |
| 104 | } | 106 | } |
| 105 | 107 | ||
| 106 | if (mh->ip6mh_proto != IPPROTO_NONE) { | 108 | if (mh->ip6mh_proto != IPPROTO_NONE) { |
| 107 | LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH invalid payload proto = %d\n", | 109 | LIMIT_NETDEBUG(KERN_DEBUG "mip6: MH invalid payload proto = %d\n", |
| 108 | mh->ip6mh_proto); | 110 | mh->ip6mh_proto); |
| 109 | mip6_param_prob(skb, 0, ((&mh->ip6mh_proto) - | 111 | mip6_param_prob(skb, 0, offsetof(struct ip6_mh, ip6mh_proto) + |
| 110 | skb_network_header(skb))); | 112 | skb_network_header_len(skb)); |
| 111 | return -1; | 113 | return -1; |
| 112 | } | 114 | } |
| 113 | 115 | ||
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ef0579d5bca6..4a5f78b50495 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
| @@ -107,21 +107,20 @@ found: | |||
| 107 | * 0 - deliver | 107 | * 0 - deliver |
| 108 | * 1 - block | 108 | * 1 - block |
| 109 | */ | 109 | */ |
| 110 | static __inline__ int icmpv6_filter(struct sock *sk, struct sk_buff *skb) | 110 | static int icmpv6_filter(const struct sock *sk, const struct sk_buff *skb) |
| 111 | { | 111 | { |
| 112 | struct icmp6hdr *icmph; | 112 | struct icmp6hdr *_hdr; |
| 113 | struct raw6_sock *rp = raw6_sk(sk); | 113 | const struct icmp6hdr *hdr; |
| 114 | |||
| 115 | if (pskb_may_pull(skb, sizeof(struct icmp6hdr))) { | ||
| 116 | __u32 *data = &rp->filter.data[0]; | ||
| 117 | int bit_nr; | ||
| 118 | 114 | ||
| 119 | icmph = (struct icmp6hdr *) skb->data; | 115 | hdr = skb_header_pointer(skb, skb_transport_offset(skb), |
| 120 | bit_nr = icmph->icmp6_type; | 116 | sizeof(_hdr), &_hdr); |
| 117 | if (hdr) { | ||
| 118 | const __u32 *data = &raw6_sk(sk)->filter.data[0]; | ||
| 119 | unsigned int type = hdr->icmp6_type; | ||
| 121 | 120 | ||
| 122 | return (data[bit_nr >> 5] & (1 << (bit_nr & 31))) != 0; | 121 | return (data[type >> 5] & (1U << (type & 31))) != 0; |
| 123 | } | 122 | } |
| 124 | return 0; | 123 | return 1; |
| 125 | } | 124 | } |
| 126 | 125 | ||
| 127 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) | 126 | #if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 2ded3c7fad06..72d170ca3406 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
| @@ -350,6 +350,9 @@ static void reg_regdb_search(struct work_struct *work) | |||
| 350 | struct reg_regdb_search_request *request; | 350 | struct reg_regdb_search_request *request; |
| 351 | const struct ieee80211_regdomain *curdom, *regdom; | 351 | const struct ieee80211_regdomain *curdom, *regdom; |
| 352 | int i, r; | 352 | int i, r; |
| 353 | bool set_reg = false; | ||
| 354 | |||
| 355 | mutex_lock(&cfg80211_mutex); | ||
| 353 | 356 | ||
| 354 | mutex_lock(®_regdb_search_mutex); | 357 | mutex_lock(®_regdb_search_mutex); |
| 355 | while (!list_empty(®_regdb_search_list)) { | 358 | while (!list_empty(®_regdb_search_list)) { |
| @@ -365,9 +368,7 @@ static void reg_regdb_search(struct work_struct *work) | |||
| 365 | r = reg_copy_regd(®dom, curdom); | 368 | r = reg_copy_regd(®dom, curdom); |
| 366 | if (r) | 369 | if (r) |
| 367 | break; | 370 | break; |
| 368 | mutex_lock(&cfg80211_mutex); | 371 | set_reg = true; |
| 369 | set_regdom(regdom); | ||
| 370 | mutex_unlock(&cfg80211_mutex); | ||
| 371 | break; | 372 | break; |
| 372 | } | 373 | } |
| 373 | } | 374 | } |
| @@ -375,6 +376,11 @@ static void reg_regdb_search(struct work_struct *work) | |||
| 375 | kfree(request); | 376 | kfree(request); |
| 376 | } | 377 | } |
| 377 | mutex_unlock(®_regdb_search_mutex); | 378 | mutex_unlock(®_regdb_search_mutex); |
| 379 | |||
| 380 | if (set_reg) | ||
| 381 | set_regdom(regdom); | ||
| 382 | |||
| 383 | mutex_unlock(&cfg80211_mutex); | ||
| 378 | } | 384 | } |
| 379 | 385 | ||
| 380 | static DECLARE_WORK(reg_regdb_work, reg_regdb_search); | 386 | static DECLARE_WORK(reg_regdb_work, reg_regdb_search); |
diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index d24810fc6af6..fd8fa9aa7c4e 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh | |||
| @@ -200,7 +200,7 @@ EOF | |||
| 200 | syscall_list() { | 200 | syscall_list() { |
| 201 | grep '^[0-9]' "$1" | sort -n | ( | 201 | grep '^[0-9]' "$1" | sort -n | ( |
| 202 | while read nr abi name entry ; do | 202 | while read nr abi name entry ; do |
| 203 | echo <<EOF | 203 | cat <<EOF |
| 204 | #if !defined(__NR_${name}) && !defined(__IGNORE_${name}) | 204 | #if !defined(__NR_${name}) && !defined(__IGNORE_${name}) |
| 205 | #warning syscall ${name} not implemented | 205 | #warning syscall ${name} not implemented |
| 206 | #endif | 206 | #endif |
