Linux 4.9.80
Greg KH
maintainerI'm announcing the release of the 4.9.80 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/bcm-nsp.dtsi | 4 arch/x86/crypto/aesni-intel_glue.c | 2 arch/x86/include/asm/kvm_host.h | 3 arch/x86/kvm/emulate.c | 7 + arch/x86/kvm/ioapic.c | 20 +++- arch/x86/kvm/vmx.c | 4 arch/x86/kvm/x86.c | 13 +- crypto/Kconfig | 2 crypto/af_alg.c | 10 +- crypto/sha3_generic.c | 5 - drivers/acpi/device_sysfs.c | 4 drivers/auxdisplay/Kconfig | 1 drivers/block/loop.c | 10 +- drivers/cpufreq/Kconfig | 2 drivers/gpio/gpio-ath79.c | 3 drivers/gpio/gpio-iop.c | 4 drivers/gpio/gpio-stmpe.c | 20 ++-- drivers/gpio/gpiolib.c | 3 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 47 +++++++--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 18 +++ drivers/gpu/drm/bridge/tc358767.c | 73 ++++++++-------- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 drivers/gpu/drm/vc4/vc4_irq.c | 3 drivers/gpu/drm/vc4/vc4_v3d.c | 3 drivers/hid/wacom_sys.c | 24 ++--- drivers/hwmon/pmbus/pmbus_core.c | 21 ++-- drivers/infiniband/hw/mlx5/main.c | 14 +++ drivers/infiniband/hw/mlx5/mlx5_ib.h | 3 drivers/infiniband/hw/mlx5/qp.c | 59 +++++------- drivers/md/bcache/btree.c | 5 - drivers/media/usb/usbtv/usbtv-core.c | 1 drivers/mtd/nand/denali_pci.c | 4 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 drivers/net/ethernet/intel/igb/igb_main.c | 2 drivers/net/ethernet/xilinx/Kconfig | 1 drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 drivers/net/xen-netfront.c | 18 +++ drivers/power/reset/zx-reboot.c | 4 drivers/scsi/aacraid/commsup.c | 2 drivers/scsi/ufs/ufshcd.c | 7 + drivers/spi/spi-imx.c | 15 ++- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 7 - drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 2 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 --- drivers/tty/serial/imx.c | 14 +-- drivers/tty/tty_io.c | 8 + drivers/tty/tty_ldisc.c | 4 drivers/usb/class/cdc-acm.c | 5 - drivers/usb/gadget/composite.c | 7 + drivers/usb/gadget/function/f_fs.c | 3 drivers/usb/gadget/udc/core.c | 2 drivers/usb/serial/Kconfig | 1 drivers/usb/serial/io_edgeport.c | 1 drivers/usb/serial/option.c | 5 + drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 1 drivers/usb/serial/usb-serial-simple.c | 7 + drivers/usb/storage/uas.c | 7 - drivers/usb/usbip/vhci_hcd.c | 2 fs/btrfs/free-space-cache.c | 3 fs/nfs_common/grace.c | 10 +- fs/nfsd/nfs4state.c | 34 ++++--- fs/quota/dquot.c | 3 fs/reiserfs/super.c | 1 fs/xfs/xfs_aops.c | 6 - fs/xfs/xfs_buf.c | 15 ++- fs/xfs/xfs_dquot.c | 14 ++- fs/xfs/xfs_dquot_item.c | 40 ++++++++ fs/xfs/xfs_inode.c | 21 ++++ include/linux/mlx5/mlx5_ifc.h | 10 +- include/linux/tty.h | 2 mm/kmemleak.c | 2 net/mac80211/mesh_hwmp.c | 15 +-- net/openvswitch/flow_netlink.c | 16 +-- net/sunrpc/xprtsock.c | 1 tools/gpio/gpio-event-mon.c | 1 tools/power/cpupower/bench/system.c | 2 tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 9 + tools/usb/usbip/src/usbip_bind.c | 9 + tools/usb/usbip/src/usbip_list.c | 9 + 84 files changed, 542 insertions(+), 238 deletions(-)
Aaron Armstrong Skomra (1):
HID: wacom: EKR: ensure devres groups at higher indexes are released
Abhishek Goel (2):
cpupowerutils: bench - Fix cpu online check cpupower : Fix cpupower working when cpu0 is offline
Andrew Elble (1):
nfsd: check for use of the closed special stateid
Andrey Gusakov (6):
drm/bridge: tc358767: do no fail on hi-res displays drm/bridge: tc358767: filter out too high modes drm/bridge: tc358767: fix DP0_MISC register set drm/bridge: tc358767: fix timing calculations drm/bridge: tc358767: fix AUXDATAn registers access drm/bridge: tc358767: fix 1-lane behavior
Ard Biesheuvel (1):
crypto: sha3-generic - fixes for alignment and big endian operation
Benjamin Herrenschmidt (1):
usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc()
Carlos Maiolino (1):
xfs: Properly retry failed dquot items in case of error during buffer writeback
Christian König (1):
drm/amdgpu: don't try to move pinned BOs
Christophe JAILLET (2):
bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()' drm/omap: Fix error handling path in 'omap_dmm_probe()'
Chun-Yeow Yeoh (1):
mac80211: fix the update of path metric for RANN frame
Colin Ian King (1):
usb: gadget: don't dereference g until after it has been null checked
Darrick J. Wong (2):
xfs: always free inline data before resetting inode fork during ifree
xfs: ubsan fixes
Dmitry Eremin (1):
staging: lustre: separate a connection destroy from free struct kib_conn
Eduardo Otubo (1):
xen-netfront: remove warning when unloading module
Emmanuel Grumbach (1):
iwlwifi: mvm: fix the TX queue hang timeout for MONITOR vif type
Fabio Estevam (1):
serial: imx: Only wakeup via RTSDEN bit if the system has RTS/CTS
Felix Kuehling (2):
drm/amdgpu: Fix SDMA load/unload sequence on HWS disabled mode drm/amdkfd: Fix SDMA oversubsription handling
Florian Fainelli (1):
ARM: dts: NSP: Fix PPI interrupt types
Gaurav Kohli (1):
tty: fix data race between tty_init_dev and flush of buf
Geert Uytterhoeven (1):
net: ethernet: xilinx: Mark XILINX_LL_TEMAC broken on 64-bit
Greg Kroah-Hartman (2):
USB: serial: pl2303: new device id for Chilitag Linux 4.9.80
Guilherme G. Piccoli (1):
scsi: aacraid: Prevent crash in case of free interrupt during scsi EH path
Gustavo A. R. Silva (1):
scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg
Hans de Goede (2):
ACPI / bus: Leave modalias empty for devices which are not present
USB: cdc-acm: Do not log urb submission errors on disconnect
Hauke Mehrtens (1):
crypto: ecdh - fix typo in KPP dependency of CRYPTO_ECDH
Hemant Kumar (1):
usb: f_fs: Prevent gadget unbind if it is already unbound
Icenowy Zheng (1):
media: usbtv: add a new usbid
James Hogan (1):
cpufreq: Add Loongson machine dependencies
Jeff Layton (1):
reiserfs: remove unneeded i_version bump
Jesse Chan (4):
power: reset: zx-reboot: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
gpio: iop: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
gpio: ath79: add missing MODULE_DESCRIPTION/LICENSE
mtd: nand: denali_pci: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
Jia-Ju Bai (1):
USB: serial: io_edgeport: fix possible sleep-in-atomic
Joel Stanley (1):
tools/gpio: Fix build error with musl libc
Johan Hovold (1):
USB: serial: simple: add Motorola Tetra driver
Josef Bacik (1):
btrfs: fix deadlock when writing out space cache
Larry Finger (1):
staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID
Linus Torvalds (1):
loop: fix concurrent lo_open/lo_release
Linus Walleij (1):
gpio: Fix kernel stack leak to userspace
Liran Alon (2):
KVM: x86: emulator: Return to user-mode on L1 CPL=0 emulation failure
KVM: x86: Don't re-execute instruction when not passing CR2 value
Lyude Paul (1):
igb: Free IRQs when device is hotplugged
Max Gurtovoy (2):
net/mlx5: Define interface bits for fencing UMR wqe RDMA/mlx5: set UMR wqe fence according to HCA cap
Michael Lyle (1):
bcache: check return value of register_shrinker
Michal Hocko (1):
xfs: fortify xfs_alloc_buftarg error handling
Nikita Leshenko (3):
KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race
KVM: x86: ioapic: Clear Remote IRR when entry is switched to edge-triggered
KVM: x86: ioapic: Preserve read-only values in the redirection table
OKAMOTO Yoshiaki (1):
usb: option: Add support for FS040U modem
Oliver Neukum (2):
CDC-ACM: apply quirk for card reader
usb: uas: unconditionally bring back host after reset
Patrice Chotard (1):
gpio: stmpe: i2c transfer are forbiden in atomic context
Robert Lippert (1):
hwmon: (pmbus) Use 64bit math for DIRECT format values
Shuah Khan (3):
usbip: prevent bind loops on devices attached to vhci_hcd
usbip: list: don't list devices attached to vhci_hcd
usbip: vhci_hcd: clear just the USB_PORT_STAT_POWER bit
Stefan Agner (1):
spi: imx: do not access registers while clocks disabled
Stefan Schake (2):
drm/vc4: Account for interrupts in flight
drm/vc4: Move IRQ enable to PM path
Stephan Mueller (2):
crypto: aesni - handle zero length dst buffer
crypto: af_alg - whitelist mask and type
Tetsuo Handa (1):
quota: Check for register_shrinker() failure.
Thomas Meyer (1):
auxdisplay: img-ascii-lcd: Only build on archs that have IOMEM
Trond Myklebust (3):
nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0)
nfsd: Ensure we check stateid validity in the seqid operation checks
SUNRPC: Allow connect to return EHOSTUNREACH
Vasily Averin (2):
grace: replace BUG_ON by WARN_ONCE in exit_net hook
lockd: fix "list_add double add" caused by legacy signal interface
Wanpeng Li (3):
KVM: X86: Fix operand/address-size during instruction decoding
KVM: X86: Fix softlockup when get the current kvmclock
KVM: VMX: Fix rflags cache during vCPU reset
Yisheng Xie (1):
kmemleak: add scheduling point to kmemleak_scan()
shaoyunl (1):
drm/amdkfd: Fix SDMA ring buffer size calculation
zhangliping (1):
openvswitch: fix the incorrect flow action alloc size
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 79 +SUBLEVEL = 80 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/dts/bcm-nsp.dtsi +2 -2
@@ -85,7 +85,7 @@ timer@20200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x20200 0x100>; - interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; clocks = <&periph_clk>; };
@@ -93,7 +93,7 @@ compatible = "arm,cortex-a9-twd-timer"; reg = <0x20600 0x20>; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | - IRQ_TYPE_LEVEL_HIGH)>; + IRQ_TYPE_EDGE_RISING)>; clocks = <&periph_clk>; };
arch/x86/crypto/aesni-intel_glue.c +1 -1
@@ -906,7 +906,7 @@ static int helper_rfc4106_encrypt(struct aead_request *req)if (sg_is_last (req->src) && req->src->offset + req->src->length <=PAGE_SIZE && -sg_is_last (req->dst) && ++sg_is_last (req->dst) && req->dst->length && req->dst->offset + req->dst->length <=PAGE_SIZE ) { one_entry_in_sg =1 ;scatterwalk_start (&src_sg_walk, req->src);
arch/x86/include/asm/kvm_host.h +2 -1
@@ -1113,7 +1113,8 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, unsigned long cr2,static inline int emulate_instruction (struct kvm_vcpu *vcpu,int emulation_type) { -return x86_emulate_instruction (vcpu,0 , emulation_type,NULL ,0 ); +return x86_emulate_instruction (vcpu,0 , + emulation_type |EMULTYPE_NO_REEXECUTE ,NULL ,0 ); }void kvm_enable_efer_bits (u64 );
arch/x86/kvm/emulate.c +7 -0
@@ -4990,6 +4990,8 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)bool op_prefix = false;bool has_seg_override = false;struct opcode opcode; +u16 dummy; +struct desc_struct desc; ctxt->memop.type =OP_NONE ; ctxt->memopp =NULL ;
@@ -5008,6 +5010,11 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)switch (mode) {case X86EMUL_MODE_REAL :case X86EMUL_MODE_VM86 : + def_op_bytes = def_ad_bytes =2 ; + ctxt->ops->get_segment (ctxt, &dummy, &desc,NULL ,VCPU_SREG_CS ); +if (desc.d) + def_op_bytes = def_ad_bytes =4 ; +break ;case X86EMUL_MODE_PROT16 : def_op_bytes = def_ad_bytes =2 ;break ;
arch/x86/kvm/ioapic.c +17 -3
@@ -257,8 +257,7 @@ void kvm_ioapic_scan_entry(struct kvm_vcpu *vcpu, ulong *ioapic_handled_vectors) index == RTC_GSI) {if (kvm_apic_match_dest (vcpu,NULL ,0 , e->fields.dest_id, e->fields.dest_mode) || - (e->fields.trig_mode ==IOAPIC_EDGE_TRIG && -kvm_apic_pending_eoi (vcpu, e->fields.vector))) +kvm_apic_pending_eoi (vcpu, e->fields.vector))__set_bit (e->fields.vector, ioapic_handled_vectors); }
@@ -279,6 +278,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) {unsigned index;bool mask_before, mask_after; +int old_remote_irr, old_delivery_status;union kvm_ioapic_redirect_entry *e;switch (ioapic->ioregsel) {
@@ -301,14 +301,28 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)return ; e = &ioapic->redirtbl[index]; mask_before = e->fields.mask; +/* Preserve read-only fields */ + old_remote_irr = e->fields.remote_irr; + old_delivery_status = e->fields.delivery_status;if (ioapic->ioregsel &1 ) { e->bits &=0xffffffff ; e->bits |= (u64 ) val <<32 ; }else { e->bits &= ~0xffffffffULL ; e->bits |= (u32 ) val; - e->fields.remote_irr =0 ; } + e->fields.remote_irr = old_remote_irr; + e->fields.delivery_status = old_delivery_status; + +/* +* Some OSes (Linux, Xen) assume that Remote IRR bit will +* be cleared by IOAPIC hardware when the entry is configured +* as edge-triggered. This behavior is used to simulate an +* explicit EOI on IOAPICs that don't have the EOI register. +*/ +if (e->fields.trig_mode ==IOAPIC_EDGE_TRIG ) + e->fields.remote_irr =0 ; + mask_after = e->fields.mask;if (mask_before != mask_after)kvm_fire_mask_notifiers (ioapic->kvm,KVM_IRQCHIP_IOAPIC , index, mask_after);
arch/x86/kvm/vmx.c +2 -2
@@ -5194,7 +5194,7 @@ static void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)vmcs_write64 (GUEST_IA32_DEBUGCTL ,0 ); } -vmcs_writel (GUEST_RFLAGS ,0x02 ); +kvm_set_rflags (vcpu,X86_EFLAGS_FIXED );kvm_rip_write (vcpu,0xfff0 );vmcs_writel (GUEST_GDTR_BASE ,0 );
@@ -6257,7 +6257,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)if (test_bit (KVM_REQ_EVENT , &vcpu->requests))return 1 ; - err =emulate_instruction (vcpu,EMULTYPE_NO_REEXECUTE ); + err =emulate_instruction (vcpu,0 );if (err ==EMULATE_USER_EXIT ) { ++vcpu->stat.mmio_exits;
arch/x86/kvm/x86.c +8 -5
@@ -1751,10 +1751,13 @@ static u64 __get_kvmclock_ns(struct kvm *kvm)/* both __this_cpu_read() and rdtsc() should be on the same cpu */ get_cpu (); -kvm_get_time_scale (NSEC_PER_SEC ,__this_cpu_read (cpu_tsc_khz) *1000LL , - &hv_clock.tsc_shift, - &hv_clock.tsc_to_system_mul); - ret =__pvclock_read_cycles (&hv_clock,rdtsc ()); +if (__this_cpu_read (cpu_tsc_khz)) { +kvm_get_time_scale (NSEC_PER_SEC ,__this_cpu_read (cpu_tsc_khz) *1000LL , + &hv_clock.tsc_shift, + &hv_clock.tsc_to_system_mul); + ret =__pvclock_read_cycles (&hv_clock,rdtsc ()); + }else + ret =ktime_get_boot_ns () + ka->kvmclock_offset;put_cpu ();
@@ -5308,7 +5311,7 @@ static int handle_emulation_failure(struct kvm_vcpu *vcpu) vcpu->run->exit_reason =KVM_EXIT_INTERNAL_ERROR ; vcpu->run->internal.suberror =KVM_INTERNAL_ERROR_EMULATION ; vcpu->run->internal.ndata =0 ; - r =EMULATE_FAIL ; + r =EMULATE_USER_EXIT ; }kvm_queue_exception (vcpu,UD_VECTOR );
crypto/Kconfig +1 -1
@@ -120,7 +120,7 @@ config CRYPTO_DH config CRYPTO_ECDH tristate "ECDH algorithm" - select CRYTPO_KPP + select CRYPTO_KPP help Generic implementation of the ECDH algorithm
crypto/af_alg.c +6 -4
@@ -149,7 +149,7 @@ EXPORT_SYMBOL_GPL(af_alg_release_parent);static int alg_bind (struct socket *sock,struct sockaddr *uaddr,int addr_len) { -const u32 forbidden =CRYPTO_ALG_INTERNAL ; +const u32 allowed =CRYPTO_ALG_KERN_DRIVER_ONLY ;struct sock *sk = sock->sk;struct alg_sock *ask =alg_sk (sk);struct sockaddr_alg *sa = (void *)uaddr;
@@ -157,6 +157,10 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)void *private;int err; +/* If caller uses non-allowed flag, return error. */ +if ((sa->salg_feat & ~allowed) || (sa->salg_mask & ~allowed)) +return -EINVAL ; +if (sock->state ==SS_CONNECTED )return -EINVAL ;
@@ -175,9 +179,7 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)if (IS_ERR (type))return PTR_ERR (type); - private = type->bind (sa->salg_name, - sa->salg_feat & ~forbidden, - sa->salg_mask & ~forbidden); + private = type->bind (sa->salg_name, sa->salg_feat, sa->salg_mask);if (IS_ERR (private)) {module_put (type->owner);return PTR_ERR (private);
crypto/sha3_generic.c +3 -2
@@ -18,6 +18,7 @@#include <linux/types.h> #include <crypto/sha3.h> #include <asm/byteorder.h> +#include <asm/unaligned.h> #define KECCAK_ROUNDS 24
@@ -149,7 +150,7 @@ static int sha3_update(struct shash_desc *desc, const u8 *data,unsigned int i;for (i =0 ; i < sctx->rsizw; i++) - sctx->st[i] ^= ((u64 *) src)[i]; + sctx->st[i] ^=get_unaligned_le64 (src +8 * i);keccakf (sctx->st); done += sctx->rsiz;
@@ -174,7 +175,7 @@ static int sha3_final(struct shash_desc *desc, u8 *out) sctx->buf[sctx->rsiz -1 ] |=0x80 ;for (i =0 ; i < sctx->rsizw; i++) - sctx->st[i] ^= ((u64 *) sctx->buf)[i]; + sctx->st[i] ^=get_unaligned_le64 (sctx->buf +8 * i);keccakf (sctx->st);
drivers/acpi/device_sysfs.c +4 -0
@@ -146,6 +146,10 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,int count;struct acpi_hardware_id *id; +/* Avoid unnecessarily loading modules for non present devices. */ +if (!acpi_device_is_present (acpi_dev)) +return 0 ; +/* * Since we skip ACPI_DT_NAMESPACE_HID from the modalias below, 0 should * be returned if ACPI_DT_NAMESPACE_HID is the only ACPI/PNP ID in the
drivers/auxdisplay/Kconfig +1 -0
@@ -121,6 +121,7 @@ config CFAG12864B_RATE config IMG_ASCII_LCD tristate "Imagination Technologies ASCII LCD Display" + depends on HAS_IOMEM default y if MIPS_MALTA || MIPS_SEAD3 select SYSCON help
drivers/block/loop.c +8 -2
@@ -1558,9 +1558,8 @@ static int lo_open(struct block_device *bdev, fmode_t mode)return err; } -static void lo_release (struct gendisk *disk,fmode_t mode) +static void __lo_release (struct loop_device *lo) { -struct loop_device *lo = disk->private_data;int err;if (atomic_dec_return (&lo->lo_refcnt))
@@ -1586,6 +1585,13 @@ static void lo_release(struct gendisk *disk, fmode_t mode)mutex_unlock (&lo->lo_ctl_mutex); } +static void lo_release (struct gendisk *disk,fmode_t mode) +{ +mutex_lock (&loop_index_mutex); +__lo_release (disk->private_data); +mutex_unlock (&loop_index_mutex); +} +static const struct block_device_operations lo_fops = { .owner =THIS_MODULE , .open = lo_open,
drivers/cpufreq/Kconfig +2 -0
@@ -273,6 +273,7 @@ endif if MIPS config LOONGSON2_CPUFREQ tristate "Loongson2 CPUFreq Driver" + depends on LEMOTE_MACH2F help This option adds a CPUFreq driver for loongson processors which support software configurable cpu frequency.
@@ -285,6 +286,7 @@ config LOONGSON2_CPUFREQ config LOONGSON1_CPUFREQ tristate "Loongson1 CPUFreq Driver" + depends on LOONGSON1_LS1B help This option adds a CPUFreq driver for loongson1 processors which support software configurable cpu frequency.
drivers/gpio/gpio-ath79.c +3 -0
@@ -323,3 +323,6 @@ static struct platform_driver ath79_gpio_driver = { };module_platform_driver (ath79_gpio_driver); + +MODULE_DESCRIPTION ("Atheros AR71XX/AR724X/AR913X GPIO API support" ); +MODULE_LICENSE ("GPL v2" );
drivers/gpio/gpio-iop.c +4 -0
@@ -58,3 +58,7 @@ static int __init iop3xx_gpio_init(void)return platform_driver_register (&iop3xx_gpio_driver); }arch_initcall (iop3xx_gpio_init); + +MODULE_DESCRIPTION ("GPIO handling for Intel IOP3xx processors" ); +MODULE_AUTHOR ("Lennert Buytenhek <[email protected]>" ); +MODULE_LICENSE ("GPL" );
drivers/gpio/gpio-stmpe.c +10 -10
@@ -190,6 +190,16 @@ static void stmpe_gpio_irq_sync_unlock(struct irq_data *d) };int i, j; +/* +* STMPE1600: to be able to get IRQ from pins, +* a read must be done on GPMR register, or a write in +* GPSR or GPCR registers +*/ +if (stmpe->partnum ==STMPE1600 ) { +stmpe_reg_read (stmpe, stmpe->regs[STMPE_IDX_GPMR_LSB ]); +stmpe_reg_read (stmpe, stmpe->regs[STMPE_IDX_GPMR_CSB ]); + } +for (i =0 ; i <CACHE_NR_REGS ; i++) {/* STMPE801 and STMPE1600 don't have RE and FE registers */ if ((stmpe->partnum == STMPE801 ||
@@ -227,21 +237,11 @@ static void stmpe_gpio_irq_unmask(struct irq_data *d) {struct gpio_chip *gc =irq_data_get_irq_chip_data (d);struct stmpe_gpio *stmpe_gpio =gpiochip_get_data (gc); -struct stmpe *stmpe = stmpe_gpio->stmpe;int offset = d->hwirq;int regoffset = offset /8 ;int mask =BIT (offset %8 ); stmpe_gpio->regs[REG_IE ][regoffset] |= mask; - -/* -* STMPE1600 workaround: to be able to get IRQ from pins, -* a read must be done on GPMR register, or a write in -* GPSR or GPCR registers -*/ -if (stmpe->partnum ==STMPE1600 ) -stmpe_reg_read (stmpe, - stmpe->regs[STMPE_IDX_GPMR_LSB + regoffset]); } static void stmpe_dbg_show_one(struct seq_file *s,
drivers/gpio/gpiolib.c +3 -0
@@ -705,6 +705,9 @@ static irqreturn_t lineevent_irq_thread(int irq, void *p)struct gpioevent_data ge;int ret, level; +/* Do not leak kernel stack to userspace */ +memset (&ge,0 ,sizeof (ge)); + ge.timestamp =ktime_get_real_ns (); level =gpiod_get_value_cansleep (le->desc);
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c +34 -13
72 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +4 -0
@@ -416,6 +416,10 @@ static bool amdgpu_cs_try_evict(struct amdgpu_cs_parser *p,if (candidate == lobj)break ; +/* We can't move pinned BOs here */ +if (bo->pin_count) +continue ; + other =amdgpu_mem_type_to_domain (bo->tbo.mem.mem_type);/* Check if this BO is in one of the domains we need space for */
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c +2 -2
@@ -215,8 +215,8 @@ static int update_mqd_sdma(struct mqd_manager *mm, void *mqd,BUG_ON (!mm || !mqd || !q); m =get_sdma_mqd (mqd); - m->sdma_rlc_rb_cntl =ffs (q->queue_size /sizeof (unsigned int )) << -SDMA0_RLC0_RB_CNTL__RB_SIZE__SHIFT | + m->sdma_rlc_rb_cntl = (ffs (q->queue_size /sizeof (unsigned int )) -1 ) + <<SDMA0_RLC0_RB_CNTL__RB_SIZE__SHIFT | q->vmid <<SDMA0_RLC0_RB_CNTL__RB_VMID__SHIFT |1 <<SDMA0_RLC0_RB_CNTL__RPTR_WRITEBACK_ENABLE__SHIFT |6 <<SDMA0_RLC0_RB_CNTL__RPTR_WRITEBACK_TIMER__SHIFT ;
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +18 -0
@@ -205,6 +205,24 @@ int pqm_create_queue(struct process_queue_manager *pqm,switch (type) {case KFD_QUEUE_TYPE_SDMA : +if (dev->dqm->queue_count >= +CIK_SDMA_QUEUES_PER_ENGINE *CIK_SDMA_ENGINE_NUM ) { +pr_err ("Over-subscription is not allowed for SDMA.\n" ); + retval = -EPERM ; + goto err_create_queue; + } + + retval =create_cp_queue (pqm, dev, &q, properties, f, *qid); +if (retval !=0 ) + goto err_create_queue; + pqn->q = q; + pqn->kq =NULL ; + retval = dev->dqm->ops.create_queue (dev->dqm, q, &pdd->qpd, + &q->properties.vmid); +pr_debug ("DQM returned %d for create_queue\n" , retval); +print_queue (q); +break ; +case KFD_QUEUE_TYPE_COMPUTE :/* check if there is over subscription */ if ((sched_policy == KFD_SCHED_POLICY_HWS_NO_OVERSUBSCRIPTION) &&
drivers/gpu/drm/bridge/tc358767.c +40 -33
152 lines not on this page · raw message
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +2 -1
@@ -638,7 +638,8 @@ static int omap_dmm_probe(struct platform_device *dev) match =of_match_node (dmm_of_match, dev->dev.of_node);if (!match) {dev_err (&dev->dev,"failed to find matching device node\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto fail; } omap_dmm->plat_data = match->data;
drivers/gpu/drm/vc4/vc4_irq.c +3 -0
@@ -225,6 +225,9 @@ vc4_irq_uninstall(struct drm_device *dev)/* Clear any pending interrupts we might have left. */ V3D_WRITE (V3D_INTCTL ,V3D_DRIVER_IRQS ); +/* Finish any interrupt handler still in flight. */ +disable_irq (dev->irq); +cancel_work_sync (&vc4->overflow_mem_work); }
drivers/gpu/drm/vc4/vc4_v3d.c +3 -0
@@ -173,6 +173,9 @@ static int vc4_v3d_runtime_resume(struct device *dev)struct vc4_dev *vc4 = v3d->vc4;vc4_v3d_init_hw (vc4->dev); + +/* We disabled the IRQ as part of vc4_irq_uninstall in suspend. */ +enable_irq (vc4->dev->irq);vc4_irq_postinstall (vc4->dev);return 0 ;
drivers/hid/wacom_sys.c +12 -12
@@ -2192,23 +2192,23 @@ static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)int i;unsigned long flags; -spin_lock_irqsave (&remote->remote_lock, flags); - remote->remotes[index].registered = false; -spin_unlock_irqrestore (&remote->remote_lock, flags); +for (i =0 ; i <WACOM_MAX_REMOTES ; i++) { +if (remote->remotes[i].serial == serial) { -if (remote->remotes[index].battery.battery) -devres_release_group (&wacom->hdev->dev, - &remote->remotes[index].battery.bat_desc); +spin_lock_irqsave (&remote->remote_lock, flags); + remote->remotes[i].registered = false; +spin_unlock_irqrestore (&remote->remote_lock, flags); -if (remote->remotes[index].group.name) -devres_release_group (&wacom->hdev->dev, - &remote->remotes[index]); +if (remote->remotes[i].battery.battery) +devres_release_group (&wacom->hdev->dev, + &remote->remotes[i].battery.bat_desc); + +if (remote->remotes[i].group.name) +devres_release_group (&wacom->hdev->dev, + &remote->remotes[i]); -for (i =0 ; i <WACOM_MAX_REMOTES ; i++) { -if (remote->remotes[i].serial == serial) { remote->remotes[i].serial =0 ; remote->remotes[i].group.name =NULL ; - remote->remotes[i].registered = false; remote->remotes[i].battery.battery =NULL ; wacom->led.groups[i].select =WACOM_STATUS_UNKNOWN ; }
drivers/hwmon/pmbus/pmbus_core.c +12 -9
@@ -20,6 +20,7 @@*/ #include <linux/kernel.h> +#include <linux/math64.h> #include <linux/module.h> #include <linux/init.h> #include <linux/err.h>
@@ -476,8 +477,8 @@ static long pmbus_reg2data_linear(struct pmbus_data *data,static long pmbus_reg2data_direct (struct pmbus_data *data,struct pmbus_sensor *sensor) { -long val = (s16 ) sensor->data; -long m, b,R ; +s64 b, val = (s16 )sensor->data; +s32 m,R ; m = data->info->m[sensor->class]; b = data->info->b[sensor->class];
@@ -505,11 +506,12 @@ static long pmbus_reg2data_direct(struct pmbus_data *data,R --; }while (R <0 ) { - val =DIV_ROUND_CLOSEST (val,10 ); + val =div_s64 (val +5LL ,10L );/* round closest */ R ++; } -return (val - b) / m; + val =div_s64 (val - b, m); +return clamp_val (val,LONG_MIN ,LONG_MAX ); }/*
@@ -629,7 +631,8 @@ static u16 pmbus_data2reg_linear(struct pmbus_data *data,static u16 pmbus_data2reg_direct (struct pmbus_data *data,struct pmbus_sensor *sensor,long val) { -long m, b,R ; +s64 b, val64 = val; +s32 m,R ; m = data->info->m[sensor->class]; b = data->info->b[sensor->class];
@@ -646,18 +649,18 @@ static u16 pmbus_data2reg_direct(struct pmbus_data *data,R -=3 ;/* Adjust R and b for data in milli-units */ b *=1000 ; } - val = val * m + b; + val64 = val64 * m + b;while (R >0 ) { - val *=10 ; + val64 *=10 ;R --; }while (R <0 ) { - val =DIV_ROUND_CLOSEST (val,10 ); + val64 =div_s64 (val64 +5LL ,10L );/* round closest */ R ++; } -return val; +return (u16 )clamp_val (val64,S16_MIN ,S16_MAX ); } static u16 pmbus_data2reg_vid(struct pmbus_data *data,
drivers/infiniband/hw/mlx5/main.c +14 -0
@@ -2575,6 +2575,18 @@ static int create_umr_res(struct mlx5_ib_dev *dev)return ret; } +static u8 mlx5_get_umr_fence (u8 umr_fence_cap) +{ +switch (umr_fence_cap) { +case MLX5_CAP_UMR_FENCE_NONE : +return MLX5_FENCE_MODE_NONE ; +case MLX5_CAP_UMR_FENCE_SMALL : +return MLX5_FENCE_MODE_INITIATOR_SMALL ; +default : +return MLX5_FENCE_MODE_STRONG_ORDERING ; + } +} +static int create_dev_resources (struct mlx5_ib_resources *devr) {struct ib_srq_init_attr attr;
@@ -3101,6 +3113,8 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)mlx5_ib_internal_fill_odp_caps (dev); + dev->umr_fence =mlx5_get_umr_fence (MLX5_CAP_GEN (mdev, umr_fence)); +if (MLX5_CAP_GEN (mdev, imaicl)) { dev->ib_dev.alloc_mw = mlx5_ib_alloc_mw; dev->ib_dev.dealloc_mw = mlx5_ib_dealloc_mw;
drivers/infiniband/hw/mlx5/mlx5_ib.h +2 -1
@@ -345,7 +345,7 @@ struct mlx5_ib_qp {struct mlx5_ib_wq rq;u8 sq_signal_bits; -u8 fm_cache; +u8 next_fence;struct mlx5_ib_wq sq;/* serialize qp state modifications
@@ -643,6 +643,7 @@ struct mlx5_ib_dev {struct list_head qp_list;/* Array with num_ports elements */ struct mlx5_ib_port *port; +u8 umr_fence; };static inline struct mlx5_ib_cq *to_mibcq (struct mlx5_core_cq *mcq)
drivers/infiniband/hw/mlx5/qp.c +23 -36
131 lines not on this page · raw message
drivers/md/bcache/btree.c +4 -1
@@ -803,7 +803,10 @@ int bch_btree_cache_alloc(struct cache_set *c) c->shrink.scan_objects = bch_mca_scan; c->shrink.seeks =4 ; c->shrink.batch = c->btree_pages *2 ; -register_shrinker (&c->shrink); + +if (register_shrinker (&c->shrink)) +pr_warn ("bcache: %s: could not register shrinker" , + __func__);return 0 ; }
drivers/media/usb/usbtv/usbtv-core.c +1 -0
@@ -141,6 +141,7 @@ static void usbtv_disconnect(struct usb_interface *intf)static struct usb_device_id usbtv_id_table[] = { {USB_DEVICE (0x1b71 ,0x3002 ) }, + {USB_DEVICE (0x1f71 ,0x3301 ) }, {} };MODULE_DEVICE_TABLE (usb, usbtv_id_table);
drivers/mtd/nand/denali_pci.c +4 -0
@@ -119,3 +119,7 @@ static struct pci_driver denali_pci_driver = { };module_pci_driver (denali_pci_driver); + +MODULE_DESCRIPTION ("PCI driver for Denali NAND controller" ); +MODULE_AUTHOR ("Intel Corporation and its suppliers" ); +MODULE_LICENSE ("GPL v2" );
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +2 -2
@@ -1843,8 +1843,8 @@ static int bnxt_get_module_eeprom(struct net_device *dev,/* Read A2 portion of the EEPROM */ if (length) { start -=ETH_MODULE_SFF_8436_LEN ; -bnxt_read_sfp_module_eeprom_info (bp,I2C_DEV_ADDR_A2 ,1 , start, - length, data); + rc =bnxt_read_sfp_module_eeprom_info (bp,I2C_DEV_ADDR_A2 ,1 , + start, length, data); }return rc; }
drivers/net/ethernet/intel/igb/igb_main.c +1 -1
@@ -3273,7 +3273,7 @@ static int __igb_close(struct net_device *netdev, bool suspending)int igb_close (struct net_device *netdev) { -if (netif_device_present (netdev)) +if (netif_device_present (netdev) || netdev->dismantle)return __igb_close (netdev, false);return 0 ; }
drivers/net/ethernet/xilinx/Kconfig +1 -0
@@ -34,6 +34,7 @@ config XILINX_AXI_EMAC config XILINX_LL_TEMAC tristate "Xilinx LL TEMAC (LocalLink Tri-mode Ethernet MAC) driver" depends on (PPC || MICROBLAZE) + depends on !64BIT || BROKEN select PHYLIB ---help--- This driver supports the Xilinx 10/100/1000 LocalLink TEMAC
drivers/net/wireless/intel/iwlwifi/mvm/utils.c +2 -0
@@ -1040,6 +1040,8 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,return le32_to_cpu (txq_timer->p2p_go);case NL80211_IFTYPE_P2P_DEVICE :return le32_to_cpu (txq_timer->p2p_device); +case NL80211_IFTYPE_MONITOR : +return default_timeout;default :WARN_ON (1 );return mvm->cfg->base_params->wd_timeout;
drivers/net/xen-netfront.c +18 -0
@@ -86,6 +86,8 @@ struct netfront_cb {/* IRQ name is queue name with "-tx" or "-rx" appended */ #define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 3) +static DECLARE_WAIT_QUEUE_HEAD (module_unload_q); +struct netfront_stats {u64 packets;u64 bytes;
@@ -2051,10 +2053,12 @@ static void netback_changed(struct xenbus_device *dev,break ;case XenbusStateClosed: +wake_up_all (&module_unload_q);if (dev->state == XenbusStateClosed)break ;/* Missed the backend's CLOSING state -- fallthrough */ case XenbusStateClosing: +wake_up_all (&module_unload_q);xenbus_frontend_closed (dev);break ; }
@@ -2160,6 +2164,20 @@ static int xennet_remove(struct xenbus_device *dev)dev_dbg (&dev->dev,"%s\n" , dev->nodename); +if (xenbus_read_driver_state (dev->otherend) != XenbusStateClosed) { +xenbus_switch_state (dev, XenbusStateClosing); +wait_event (module_unload_q, +xenbus_read_driver_state (dev->otherend) == + XenbusStateClosing); + +xenbus_switch_state (dev, XenbusStateClosed); +wait_event (module_unload_q, +xenbus_read_driver_state (dev->otherend) == + XenbusStateClosed || +xenbus_read_driver_state (dev->otherend) == + XenbusStateUnknown); + } +xennet_disconnect_backend (info);unregister_netdev (info->netdev);
drivers/power/reset/zx-reboot.c +4 -0
@@ -81,3 +81,7 @@ static struct platform_driver zx_reboot_driver = { }, };module_platform_driver (zx_reboot_driver); + +MODULE_DESCRIPTION ("ZTE SoCs reset driver" ); +MODULE_AUTHOR ("Jun Nie <[email protected]>" ); +MODULE_LICENSE ("GPL v2" );
drivers/scsi/aacraid/commsup.c +1 -1
@@ -1416,13 +1416,13 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced)* will ensure that i/o is queisced and the card is flushed in that * case. */ +aac_free_irq (aac);aac_fib_map_free (aac);pci_free_consistent (aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); aac->comm_addr =NULL ; aac->comm_phys =0 ;kfree (aac->queues); aac->queues =NULL ; -aac_free_irq (aac);kfree (aac->fsa_dev); aac->fsa_dev =NULL ; quirks =aac_get_driver_ident (index)->quirks;
drivers/scsi/ufs/ufshcd.c +5 -2
@@ -5327,12 +5327,15 @@ static int ufshcd_config_vreg(struct device *dev, struct ufs_vreg *vreg, bool on) { int ret = 0; -struct regulator *reg = vreg->reg; -const char *name = vreg->name; +struct regulator *reg; +const char *name;int min_uV, uA_load;BUG_ON (!vreg); + reg = vreg->reg; + name = vreg->name; +if (regulator_count_voltages (reg) >0 ) { min_uV = on ? vreg->min_uV :0 ; ret =regulator_set_voltage (reg, min_uV, vreg->max_uV);
drivers/spi/spi-imx.c +13 -2
@@ -1307,12 +1307,23 @@ static int spi_imx_remove(struct platform_device *pdev) {struct spi_master *master =platform_get_drvdata (pdev);struct spi_imx_data *spi_imx =spi_master_get_devdata (master); +int ret;spi_bitbang_stop (&spi_imx->bitbang); + ret =clk_enable (spi_imx->clk_per); +if (ret) +return ret; + + ret =clk_enable (spi_imx->clk_ipg); +if (ret) { +clk_disable (spi_imx->clk_per); +return ret; + } +writel (0 , spi_imx->base +MXC_CSPICTRL ); -clk_unprepare (spi_imx->clk_ipg); -clk_unprepare (spi_imx->clk_per); +clk_disable_unprepare (spi_imx->clk_ipg); +clk_disable_unprepare (spi_imx->clk_per);spi_imx_sdma_exit (spi_imx);spi_master_put (master);
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +3 -4
@@ -824,14 +824,15 @@ struct kib_conn *kiblnd_create_conn(struct kib_peer *peer, struct rdma_cm_id *cmreturn conn; failed_2: -kiblnd_destroy_conn (conn, true); +kiblnd_destroy_conn (conn); +LIBCFS_FREE (conn,sizeof (*conn)); failed_1:LIBCFS_FREE (init_qp_attr,sizeof (*init_qp_attr)); failed_0:return NULL ; } -void kiblnd_destroy_conn (struct kib_conn *conn,bool free_conn) +void kiblnd_destroy_conn (struct kib_conn *conn) {struct rdma_cm_id *cmid = conn->ibc_cmid;struct kib_peer *peer = conn->ibc_peer;
@@ -894,8 +895,6 @@ void kiblnd_destroy_conn(struct kib_conn *conn, bool free_conn)rdma_destroy_id (cmid);atomic_dec (&net->ibn_nconns); } - -LIBCFS_FREE (conn,sizeof (*conn)); }int kiblnd_close_peer_conns_locked (struct kib_peer *peer,int why)
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +1 -1
@@ -1018,7 +1018,7 @@ int kiblnd_close_peer_conns_locked(struct kib_peer *peer, int why);struct kib_conn *kiblnd_create_conn (struct kib_peer *peer,struct rdma_cm_id *cmid,int state,int version); -void kiblnd_destroy_conn (struct kib_conn *conn,bool free_conn); +void kiblnd_destroy_conn (struct kib_conn *conn);void kiblnd_close_conn (struct kib_conn *conn,int error);void kiblnd_close_conn_locked (struct kib_conn *conn,int error);
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +4 -2
@@ -3323,11 +3323,13 @@ kiblnd_connd(void *arg)spin_unlock_irqrestore (lock, flags); dropped_lock =1 ; -kiblnd_destroy_conn (conn, !peer); +kiblnd_destroy_conn (conn);spin_lock_irqsave (lock, flags); -if (!peer) +if (!peer) { +kfree (conn);continue ; + } conn->ibc_peer = peer;if (peer->ibp_reconnected <KIB_RECONN_HIGH_RACE )
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +4 -10
@@ -1397,19 +1397,13 @@ static int rtw_wx_get_essid(struct net_device *dev,if ((check_fwstate (pmlmepriv, _FW_LINKED)) || (check_fwstate (pmlmepriv,WIFI_ADHOC_MASTER_STATE ))) { len = pcur_bss->Ssid.SsidLength; - - wrqu->essid.length = len; -memcpy (extra, pcur_bss->Ssid.Ssid, len); - - wrqu->essid.flags =1 ; }else { - ret =-1 ; - goto exit; + len =0 ; + *extra =0 ; } - -exit: - + wrqu->essid.length = len; + wrqu->essid.flags =1 ;return ret; }
drivers/tty/serial/imx.c +8 -6
@@ -2239,12 +2239,14 @@ static void serial_imx_enable_wakeup(struct imx_port *sport, bool on) val &= ~UCR3_AWAKEN ;writel (val, sport->port.membase +UCR3 ); - val =readl (sport->port.membase +UCR1 ); -if (on) - val |=UCR1_RTSDEN ; -else - val &= ~UCR1_RTSDEN ; -writel (val, sport->port.membase +UCR1 ); +if (sport->have_rtscts) { + val =readl (sport->port.membase +UCR1 ); +if (on) + val |=UCR1_RTSDEN ; +else + val &= ~UCR1_RTSDEN ; +writel (val, sport->port.membase +UCR1 ); + } }static int imx_serial_port_suspend_noirq (struct device *dev)
drivers/tty/tty_io.c +7 -1
@@ -1543,6 +1543,9 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)"%s: %s driver does not set tty->port. This will crash the kernel later. Fix the driver!\n" , __func__, tty->driver->name); + retval =tty_ldisc_lock (tty,5 *HZ ); +if (retval) + goto err_release_lock; tty->port->itty = tty;/*
@@ -1553,6 +1556,7 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx) retval =tty_ldisc_setup (tty, tty->link);if (retval) goto err_release_tty; +tty_ldisc_unlock (tty);/* Return the tty locked so that it cannot vanish under the caller */ return tty;
@@ -1565,9 +1569,11 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)/* call the tty release_tty routine to clean out this slot */ err_release_tty: -tty_unlock (tty); +tty_ldisc_unlock (tty);tty_info_ratelimited (tty,"ldisc open failed (%d), clearing slot %d\n" , retval, idx); +err_release_lock: +tty_unlock (tty);release_tty (tty, idx);return ERR_PTR (retval); }
drivers/tty/tty_ldisc.c +2 -2
@@ -336,7 +336,7 @@ static inline void __tty_ldisc_unlock(struct tty_struct *tty)ldsem_up_write (&tty->ldisc_sem); } -static int tty_ldisc_lock (struct tty_struct *tty,unsigned long timeout) +int tty_ldisc_lock (struct tty_struct *tty,unsigned long timeout) {int ret;
@@ -347,7 +347,7 @@ static int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)return 0 ; } -static void tty_ldisc_unlock (struct tty_struct *tty) +void tty_ldisc_unlock (struct tty_struct *tty) {clear_bit (TTY_LDISC_HALTED , &tty->flags);__tty_ldisc_unlock (tty);
drivers/usb/class/cdc-acm.c +4 -1
@@ -375,7 +375,7 @@ static int acm_submit_read_urb(struct acm *acm, int index, gfp_t mem_flags) res =usb_submit_urb (acm->read_urbs[index], mem_flags);if (res) { -if (res != -EPERM ) { +if (res != -EPERM && res != -ENODEV ) {dev_err (&acm->data->dev,"urb %d failed submission with %d\n" , index, res);
@@ -1706,6 +1706,9 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x0ace, 0x1611), /* ZyDAS 56K USB MODEM - new version */ .driver_info =SINGLE_RX_URB ,/* firmware bug */ }, + { USB_DEVICE(0x11ca, 0x0201), /* VeriFone Mx870 Gadget Serial */ + .driver_info = SINGLE_RX_URB, + }, { USB_DEVICE(0x22b8, 0x7000), /* Motorola Q Phone */ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ },
drivers/usb/gadget/composite.c +5 -2
@@ -150,7 +150,6 @@ int config_ep_by_speed(struct usb_gadget *g,struct usb_function *f, struct usb_ep *_ep) { - struct usb_composite_dev *cdev = get_gadget_data(g); struct usb_endpoint_descriptor *chosen_desc = NULL;struct usb_descriptor_header **speed_desc =NULL ;
@@ -229,8 +228,12 @@ int config_ep_by_speed(struct usb_gadget *g, _ep->maxburst = comp_desc->bMaxBurst +1 ;break ;default : -if (comp_desc->bMaxBurst !=0 ) +if (comp_desc->bMaxBurst !=0 ) { +struct usb_composite_dev *cdev; + + cdev =get_gadget_data (g);ERROR (cdev,"ep0 bMaxBurst must be 0\n" ); + } _ep->maxburst =1 ;break ; }
drivers/usb/gadget/function/f_fs.c +2 -1
@@ -3725,7 +3725,8 @@ static void ffs_closed(struct ffs_data *ffs) ci = opts->func_inst.group.cg_item.ci_parent->ci_parent;ffs_dev_unlock (); -unregister_gadget_item (ci); +if (test_bit (FFS_FL_BOUND , &ffs->flags)) +unregister_gadget_item (ci);return ; done:ffs_dev_unlock ();
drivers/usb/gadget/udc/core.c +1 -1
@@ -913,7 +913,7 @@ int usb_gadget_ep_match_desc(struct usb_gadget *gadget,return 0 ;/* "high bandwidth" works only at high speed */ -if (!gadget_is_dualspeed (gadget) &&usb_endpoint_maxp (desc) & (3 <<11 )) +if (!gadget_is_dualspeed (gadget) &&usb_endpoint_maxp_mult (desc) >1 )return 0 ;switch (type) {
drivers/usb/serial/Kconfig +1 -0
@@ -63,6 +63,7 @@ config USB_SERIAL_SIMPLE - Google USB serial devices - HP4x calculators - a number of Motorola phones + - Motorola Tetra devices - Novatel Wireless GPS receivers - Siemens USB/MPI adapter. - ViVOtech ViVOpay USB device.
drivers/usb/serial/io_edgeport.c +0 -1
@@ -2215,7 +2215,6 @@ static int write_cmd_usb(struct edgeport_port *edge_port,/* something went wrong */ dev_err (dev,"%s - usb_submit_urb(write command) failed, status = %d\n" , __func__, status); -usb_kill_urb (urb);usb_free_urb (urb);atomic_dec (&CmdUrbs);return status;
drivers/usb/serial/option.c +5 -0
@@ -383,6 +383,9 @@ static void option_instat_callback(struct urb *urb);#define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603#define FOUR_G_SYSTEMS_PRODUCT_W100 0x9b01 +/* Fujisoft products */ +#define FUJISOFT_PRODUCT_FS040U 0x9b02 +/* iBall 3.5G connect wireless modem */ #define IBALL_3_5G_CONNECT 0x9605
@@ -1897,6 +1900,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W100), .driver_info = (kernel_ulong_t)&four_g_w100_blacklist }, + {USB_DEVICE(LONGCHEER_VENDOR_ID, FUJISOFT_PRODUCT_FS040U), + .driver_info = (kernel_ulong_t)&net_intf3_blacklist}, { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, SPEEDUP_PRODUCT_SU9800, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(LONGCHEER_VENDOR_ID, 0x9801, 0xff), .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
drivers/usb/serial/pl2303.c +1 -0
@@ -39,6 +39,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ2) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, + { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_CHILITAG) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) },
drivers/usb/serial/pl2303.h +1 -0
@@ -17,6 +17,7 @@#define PL2303_PRODUCT_ID_DCU11 0x1234#define PL2303_PRODUCT_ID_PHAROS 0xaaa0#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 +#define PL2303_PRODUCT_ID_CHILITAG 0xaaa8#define PL2303_PRODUCT_ID_ALDIGA 0x0611#define PL2303_PRODUCT_ID_MMX 0x0612#define PL2303_PRODUCT_ID_GPRS 0x0609
drivers/usb/serial/usb-serial-simple.c +7 -0
@@ -80,6 +80,11 @@ DEVICE(vivopay, VIVOPAY_IDS); { USB_DEVICE(0x22b8, 0x2c64) } /* Motorola V950 phone */DEVICE (moto_modem,MOTO_IDS ); +/* Motorola Tetra driver */ +#define MOTOROLA_TETRA_IDS () \ + { USB_DEVICE(0x0cad, 0x9011) }/* Motorola Solutions TETRA PEI */ +DEVICE (motorola_tetra,MOTOROLA_TETRA_IDS ); +/* Novatel Wireless GPS driver */ #define NOVATEL_IDS () \ { USB_DEVICE(0x09d7, 0x0100) }/* NovAtel FlexPack GPS */
@@ -110,6 +115,7 @@ static struct usb_serial_driver * const serial_drivers[] = { &google_device, &vivopay_device, &moto_modem_device, + &motorola_tetra_device, &novatel_gps_device, &hp4x_device, &suunto_device,
@@ -125,6 +131,7 @@ static const struct usb_device_id id_table[] = {GOOGLE_IDS (),VIVOPAY_IDS (),MOTO_IDS (), +MOTOROLA_TETRA_IDS (),NOVATEL_IDS (),HP4X_IDS (), SUUNTO_IDS(),
drivers/usb/storage/uas.c +3 -4
@@ -1076,20 +1076,19 @@ static int uas_post_reset(struct usb_interface *intf)return 0 ; err =uas_configure_endpoints (devinfo); -if (err) { +if (err && err !=ENODEV )shost_printk (KERN_ERR , shost,"%s: alloc streams error %d after reset" , __func__, err); -return 1 ; - } +/* we must unblock the host in every case lest we deadlock */ spin_lock_irqsave (shost->host_lock, flags);scsi_report_bus_reset (shost,0 );spin_unlock_irqrestore (shost->host_lock, flags);scsi_unblock_requests (shost); -return 0 ; +return err ?1 :0 ; }static int uas_suspend (struct usb_interface *intf,pm_message_t message)
drivers/usb/usbip/vhci_hcd.c +1 -1
@@ -300,7 +300,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,case USB_PORT_FEAT_POWER :usbip_dbg_vhci_rh (" ClearPortFeature: USB_PORT_FEAT_POWER\n" ); - dum->port_status[rhport] =0 ; + dum->port_status[rhport] &= ~USB_PORT_STAT_POWER ; dum->resuming =0 ;break ;case USB_PORT_FEAT_C_RESET :
fs/btrfs/free-space-cache.c +2 -1
@@ -1253,7 +1253,7 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,/* Lock all pages first so we can lock the extent safely. */ ret =io_ctl_prepare_pages (io_ctl, inode,0 );if (ret) - goto out; + goto out_unlock;lock_extent_bits (&BTRFS_I (inode)->io_tree,0 ,i_size_read (inode) -1 , &cached_state);
@@ -1346,6 +1346,7 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, out_nospc:cleanup_write_cache_enospc (inode, io_ctl, &cached_state, &bitmap_list); +out_unlock:if (block_group && (block_group->flags &BTRFS_BLOCK_GROUP_DATA ))up_write (&block_group->data_rwsem);
fs/nfs_common/grace.c +8 -2
@@ -30,7 +30,11 @@ locks_start_grace(struct net *net, struct lock_manager *lm)struct list_head *grace_list =net_generic (net, grace_net_id);spin_lock (&grace_lock); -list_add (&lm->list, grace_list); +if (list_empty (&lm->list)) +list_add (&lm->list, grace_list); +else +WARN (1 ,"double list_add attempt detected in net %x %s\n" , + net->ns.inum, (net == &init_net) ?"(init_net)" :"" );spin_unlock (&grace_lock); }EXPORT_SYMBOL_GPL (locks_start_grace);
@@ -104,7 +108,9 @@ grace_exit_net(struct net *net) {struct list_head *grace_list =net_generic (net, grace_net_id); -BUG_ON (!list_empty (grace_list)); +WARN_ONCE (!list_empty (grace_list), +"net %x %s: grace_list is not empty\n" , + net->ns.inum, __func__); }static struct pernet_operations grace_net_ops = {
fs/nfsd/nfs4state.c +20 -14
@@ -63,12 +63,16 @@ static const stateid_t zero_stateid = {static const stateid_t currentstateid = { .si_generation =1 , }; +static const stateid_t close_stateid = { + .si_generation =0xffffffffU , +};static u64 current_sessionid =1 ;#define ZERO_STATEID (stateid) (!memcmp((stateid), &zero_stateid, sizeof(stateid_t)))#define ONE_STATEID (stateid) (!memcmp((stateid), &one_stateid, sizeof(stateid_t)))#define CURRENT_STATEID (stateid) (!memcmp((stateid), ¤tstateid, sizeof(stateid_t))) +#define CLOSE_STATEID (stateid) (!memcmp((stateid), &close_stateid, sizeof(stateid_t)))/* forward declarations */ static bool check_for_locks (struct nfs4_file *fp,struct nfs4_lockowner *lowner);
@@ -4866,7 +4870,8 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)struct nfs4_stid *s;__be32 status = nfserr_bad_stateid; -if (ZERO_STATEID (stateid) ||ONE_STATEID (stateid)) +if (ZERO_STATEID (stateid) ||ONE_STATEID (stateid) || +CLOSE_STATEID (stateid))return status;/* Client debugging aid. */ if (!same_clid (&stateid->si_opaque.so_clid, &cl->cl_clientid)) {
@@ -4924,7 +4929,8 @@ nfsd4_lookup_stateid(struct nfsd4_compound_state *cstate,else if (typemask &NFS4_DELEG_STID ) typemask |=NFS4_REVOKED_DELEG_STID ; -if (ZERO_STATEID (stateid) ||ONE_STATEID (stateid)) +if (ZERO_STATEID (stateid) ||ONE_STATEID (stateid) || +CLOSE_STATEID (stateid))return nfserr_bad_stateid; status =lookup_clientid (&stateid->si_opaque.so_clid, cstate, nn);if (status == nfserr_stale_clientid) {
@@ -5175,15 +5181,9 @@ static __be32 nfs4_seqid_op_checks(struct nfsd4_compound_state *cstate, stateid_ status =nfsd4_check_seqid (cstate, sop, seqid);if (status)return status; -if (stp->st_stid.sc_type ==NFS4_CLOSED_STID - || stp->st_stid.sc_type ==NFS4_REVOKED_DELEG_STID ) -/* -* "Closed" stateid's exist *only* to return -* nfserr_replay_me from the previous step, and -* revoked delegations are kept only for free_stateid. -*/ -return nfserr_bad_stateid; -mutex_lock (&stp->st_mutex); + status =nfsd4_lock_ol_stateid (stp); +if (status != nfs_ok) +return status; status =check_stateid_generation (stateid, &stp->st_stid.sc_stateid,nfsd4_has_session (cstate));if (status == nfs_ok) status =nfs4_check_fh (current_fh, &stp->st_stid);
@@ -5407,6 +5407,11 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,nfsd4_close_open_stateid (stp);mutex_unlock (&stp->st_mutex); +/* See RFC5661 sectionm 18.2.4 */ +if (stp->st_stid.sc_client->cl_minorversion) +memcpy (&close->cl_stateid, &close_stateid, +sizeof (close->cl_stateid)); +/* put reference from nfs4_preprocess_seqid_op */ nfs4_put_stid (&stp->st_stid); out:
@@ -7007,6 +7012,10 @@ static int nfs4_state_create_net(struct net *net)INIT_LIST_HEAD (&nn->sessionid_hashtbl[i]); nn->conf_name_tree =RB_ROOT ; nn->unconf_name_tree =RB_ROOT ; + nn->boot_time =get_seconds (); + nn->grace_ended = false; + nn->nfsd4_manager.block_opens = true; +INIT_LIST_HEAD (&nn->nfsd4_manager.list);INIT_LIST_HEAD (&nn->client_lru);INIT_LIST_HEAD (&nn->close_lru);INIT_LIST_HEAD (&nn->del_recall_lru);
@@ -7064,9 +7073,6 @@ nfs4_state_start_net(struct net *net) ret =nfs4_state_create_net (net);if (ret)return ret; - nn->boot_time =get_seconds (); - nn->grace_ended = false; - nn->nfsd4_manager.block_opens = true;locks_start_grace (net, &nn->nfsd4_manager);nfsd4_client_tracking_init (net); printk(KERN_INFO "NFSD: starting %ld-second grace period (net %p)\n",
fs/quota/dquot.c +2 -1
@@ -2985,7 +2985,8 @@ static int __init dquot_init(void)pr_info ("VFS: Dquot-cache hash table entries: %ld (order %ld," " %ld bytes)\n" , nr_hash, order, (PAGE_SIZE << order)); -register_shrinker (&dqcache_shrinker); +if (register_shrinker (&dqcache_shrinker)) +panic ("Cannot register dquot shrinker" );return 0 ; }
fs/reiserfs/super.c +0 -1
@@ -2521,7 +2521,6 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,return err;if (inode->i_size < off + len - towrite)i_size_write (inode, off + len - towrite); - inode->i_version++; inode->i_mtime = inode->i_ctime =current_time (inode);mark_inode_dirty (inode);return len - towrite;
fs/xfs/xfs_aops.c +3 -3
@@ -391,7 +391,7 @@ xfs_map_blocks( (ip->i_df.if_flags & XFS_IFEXTENTS));ASSERT (offset <= mp->m_super->s_maxbytes); -if (offset + count > mp->m_super->s_maxbytes) +if ((xfs_ufsize_t )offset + count > mp->m_super->s_maxbytes) count = mp->m_super->s_maxbytes - offset; end_fsb =XFS_B_TO_FSB (mp, (xfs_ufsize_t )offset + count); offset_fsb =XFS_B_TO_FSBT (mp, offset);
@@ -1295,7 +1295,7 @@ xfs_map_trim_size(if (mapping_size > size) mapping_size = size;if (offset <i_size_read (inode) && - offset + mapping_size >=i_size_read (inode)) { + (xfs_ufsize_t )offset + mapping_size >=i_size_read (inode)) {/* limit mapping to block that spans EOF */ mapping_size =roundup_64 (i_size_read (inode) - offset,i_blocksize (inode));
@@ -1347,7 +1347,7 @@ __xfs_get_blocks( lockmode =xfs_ilock_data_map_shared (ip);ASSERT (offset <= mp->m_super->s_maxbytes); -if (offset + size > mp->m_super->s_maxbytes) +if ((xfs_ufsize_t )offset + size > mp->m_super->s_maxbytes) size = mp->m_super->s_maxbytes - offset; end_fsb =XFS_B_TO_FSB (mp, (xfs_ufsize_t )offset + size); offset_fsb =XFS_B_TO_FSBT (mp, offset);
fs/xfs/xfs_buf.c +10 -5
@@ -1785,22 +1785,27 @@ xfs_alloc_buftarg( btp->bt_bdi =blk_get_backing_dev_info (bdev);if (xfs_setsize_buftarg_early (btp, bdev)) - goto error; + goto error_free;if (list_lru_init (&btp->bt_lru)) - goto error; + goto error_free;if (percpu_counter_init (&btp->bt_io_count,0 ,GFP_KERNEL )) - goto error; + goto error_lru; btp->bt_shrinker.count_objects = xfs_buftarg_shrink_count; btp->bt_shrinker.scan_objects = xfs_buftarg_shrink_scan; btp->bt_shrinker.seeks =DEFAULT_SEEKS ; btp->bt_shrinker.flags =SHRINKER_NUMA_AWARE ; -register_shrinker (&btp->bt_shrinker); +if (register_shrinker (&btp->bt_shrinker)) + goto error_pcpu;return btp; -error: +error_pcpu: +percpu_counter_destroy (&btp->bt_io_count); +error_lru: +list_lru_destroy (&btp->bt_lru); +error_free:kmem_free (btp);return NULL ; }
fs/xfs/xfs_dquot.c +11 -3
@@ -1004,14 +1004,22 @@ xfs_qm_dqflush_done(* holding the lock before removing the dquot from the AIL. */ if ((lip->li_flags &XFS_LI_IN_AIL ) && - lip->li_lsn == qip->qli_flush_lsn) { + ((lip->li_lsn == qip->qli_flush_lsn) || + (lip->li_flags &XFS_LI_FAILED ))) {/* xfs_trans_ail_delete() drops the AIL lock. */ spin_lock (&ailp->xa_lock); -if (lip->li_lsn == qip->qli_flush_lsn) +if (lip->li_lsn == qip->qli_flush_lsn) {xfs_trans_ail_delete (ailp, lip,SHUTDOWN_CORRUPT_INCORE ); -else + }else { +/* +* Clear the failed state since we are about to drop the +* flush lock +*/ +if (lip->li_flags &XFS_LI_FAILED ) +xfs_clear_li_failed (lip);spin_unlock (&ailp->xa_lock); + } }/*
fs/xfs/xfs_dquot_item.c +38 -2
@@ -137,6 +137,26 @@ xfs_qm_dqunpin_wait(wait_event (dqp->q_pinwait, (atomic_read (&dqp->q_pincount) ==0 )); } +/* +* Callback used to mark a buffer with XFS_LI_FAILED when items in the buffer +* have been failed during writeback +* +* this informs the AIL that the dquot is already flush locked on the next push, +* and acquires a hold on the buffer to ensure that it isn't reclaimed before +* dirty data makes it to disk. +*/ +STATIC void +xfs_dquot_item_error ( +struct xfs_log_item *lip, +struct xfs_buf *bp) +{ +struct xfs_dquot *dqp; + + dqp =DQUOT_ITEM (lip)->qli_dquot; +ASSERT (!completion_done (&dqp->q_flush)); +xfs_set_li_failed (lip, bp); +} + STATIC uint xfs_qm_dquot_logitem_push( struct xfs_log_item *lip,
@@ -144,13 +164,28 @@ xfs_qm_dquot_logitem_push( __acquires(&lip->li_ailp->xa_lock) {struct xfs_dquot *dqp =DQUOT_ITEM (lip)->qli_dquot; -struct xfs_buf *bp =NULL ; +struct xfs_buf *bp = lip->li_buf;uint rval =XFS_ITEM_SUCCESS ;int error;if (atomic_read (&dqp->q_pincount) >0 )return XFS_ITEM_PINNED ; +/* +* The buffer containing this item failed to be written back +* previously. Resubmit the buffer for IO +*/ +if (lip->li_flags &XFS_LI_FAILED ) { +if (!xfs_buf_trylock (bp)) +return XFS_ITEM_LOCKED ; + +if (!xfs_buf_resubmit_failed_buffers (bp, lip, buffer_list)) + rval =XFS_ITEM_FLUSHING ; + +xfs_buf_unlock (bp); +return rval; + } +if (!xfs_dqlock_nowait (dqp))return XFS_ITEM_LOCKED ;
@@ -242,7 +277,8 @@ static const struct xfs_item_ops xfs_dquot_item_ops = { .iop_unlock = xfs_qm_dquot_logitem_unlock, .iop_committed = xfs_qm_dquot_logitem_committed, .iop_push = xfs_qm_dquot_logitem_push, - .iop_committing = xfs_qm_dquot_logitem_committing + .iop_committing = xfs_qm_dquot_logitem_committing, + .iop_error = xfs_dquot_item_error };/*
fs/xfs/xfs_inode.c +21 -0
@@ -2429,6 +2429,24 @@ xfs_ifree_cluster(return 0 ; } +/* +* Free any local-format buffers sitting around before we reset to +* extents format. +*/ +static inline void +xfs_ifree_local_data ( +struct xfs_inode *ip, +int whichfork) +{ +struct xfs_ifork *ifp; + +if (XFS_IFORK_FORMAT (ip, whichfork) !=XFS_DINODE_FMT_LOCAL ) +return ; + + ifp =XFS_IFORK_PTR (ip, whichfork); +xfs_idata_realloc (ip, -ifp->if_bytes, whichfork); +} +/* * This is called to return an inode to the inode free list. * The inode should already be truncated to 0 length and have
@@ -2466,6 +2484,9 @@ xfs_ifree(if (error)return error; +xfs_ifree_local_data (ip,XFS_DATA_FORK ); +xfs_ifree_local_data (ip,XFS_ATTR_FORK ); +VFS_I (ip)->i_mode =0 ;/* mark incore inode as free */ ip->i_d.di_flags =0 ; ip->i_d.di_dmevmask =0 ;
include/linux/mlx5/mlx5_ifc.h +9 -1
@@ -737,6 +737,12 @@ enum { MLX5_CAP_PORT_TYPE_ETH = 0x1, }; +enum { +MLX5_CAP_UMR_FENCE_STRONG =0x0 , +MLX5_CAP_UMR_FENCE_SMALL =0x1 , +MLX5_CAP_UMR_FENCE_NONE =0x2 , +}; +struct mlx5_ifc_cmd_hca_cap_bits {u8 reserved_at_0[0x80 ];
@@ -838,7 +844,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {u8 striding_rq[0x1 ];u8 reserved_at_201[0x2 ];u8 ipoib_basic_offloads[0x1 ]; -u8 reserved_at_205[0xa ]; +u8 reserved_at_205[0x5 ]; +u8 umr_fence[0x2 ]; +u8 reserved_at_20c[0x3 ];u8 drain_sigerr[0x1 ];u8 cmdif_checksum[0x2 ];u8 sigerr_cqe[0x1 ];
include/linux/tty.h +2 -0
@@ -394,6 +394,8 @@ extern struct tty_struct *get_current_tty(void);/* tty_io.c */ extern int __init tty_init (void );extern const char *tty_name (const struct tty_struct *tty); +extern int tty_ldisc_lock (struct tty_struct *tty,unsigned long timeout); +extern void tty_ldisc_unlock (struct tty_struct *tty);#else static inline void console_init (void ) { }
mm/kmemleak.c +2 -0
@@ -1442,6 +1442,8 @@ static void kmemleak_scan(void)if (page_count (page) ==0 )continue ;scan_block (page, page +1 ,NULL ); +if (!(pfn % (MAX_SCAN_SIZE /sizeof (*page)))) +cond_resched (); } }put_online_mems ();
net/mac80211/mesh_hwmp.c +9 -6
@@ -788,7 +788,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,struct mesh_path *mpath;u8 ttl, flags, hopcount;const u8 *orig_addr; -u32 orig_sn, metric, metric_txsta, interval; +u32 orig_sn, new_metric, orig_metric, last_hop_metric, interval;bool root_is_gate; ttl = rann->rann_ttl;
@@ -799,7 +799,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, interval =le32_to_cpu (rann->rann_interval); hopcount = rann->rann_hopcount; hopcount++; - metric =le32_to_cpu (rann->rann_metric); + orig_metric =le32_to_cpu (rann->rann_metric);/* Ignore our own RANNs */ if (ether_addr_equal (orig_addr, sdata->vif.addr))
@@ -816,7 +816,10 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,return ; } - metric_txsta =airtime_link_metric_get (local, sta); + last_hop_metric =airtime_link_metric_get (local, sta); + new_metric = orig_metric + last_hop_metric; +if (new_metric < orig_metric) + new_metric =MAX_METRIC ; mpath =mesh_path_lookup (sdata, orig_addr);if (!mpath) {
@@ -829,7 +832,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, }if (!(SN_LT (mpath->sn, orig_sn)) && - !(mpath->sn == orig_sn && metric < mpath->rann_metric)) { + !(mpath->sn == orig_sn && new_metric < mpath->rann_metric)) {rcu_read_unlock ();return ; }
@@ -847,7 +850,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata, } mpath->sn = orig_sn; - mpath->rann_metric = metric + metric_txsta; + mpath->rann_metric = new_metric; mpath->is_root = true;/* Recording RANNs sender address to send individually * addressed PREQs destined for root mesh STA */
@@ -867,7 +870,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,mesh_path_sel_frame_tx (MPATH_RANN , flags, orig_addr, orig_sn,0 ,NULL ,0 , broadcast_addr, hopcount, ttl, interval, - metric + metric_txsta,0 , sdata); + new_metric,0 , sdata); }rcu_read_unlock ();
net/openvswitch/flow_netlink.c +8 -8
@@ -1789,14 +1789,11 @@ int ovs_nla_put_mask(const struct sw_flow *flow, struct sk_buff *skb)#define MAX_ACTIONS_BUFSIZE (32 * 1024) -static struct sw_flow_actions *nla_alloc_flow_actions (int size,bool log) +static struct sw_flow_actions *nla_alloc_flow_actions (int size) {struct sw_flow_actions *sfa; -if (size >MAX_ACTIONS_BUFSIZE ) { -OVS_NLERR (log,"Flow action size %u bytes exceeds max" , size); -return ERR_PTR (-EINVAL ); - } +WARN_ON_ONCE (size >MAX_ACTIONS_BUFSIZE ); sfa =kmalloc (sizeof (*sfa) + size,GFP_KERNEL );if (!sfa)
@@ -1869,12 +1866,15 @@ static struct nlattr *reserve_sfa_size(struct sw_flow_actions **sfa, new_acts_size =ksize (*sfa) *2 ;if (new_acts_size >MAX_ACTIONS_BUFSIZE ) { -if ((MAX_ACTIONS_BUFSIZE - next_offset) < req_size) +if ((MAX_ACTIONS_BUFSIZE - next_offset) < req_size) { +OVS_NLERR (log,"Flow action size exceeds max %u" , +MAX_ACTIONS_BUFSIZE );return ERR_PTR (-EMSGSIZE ); + } new_acts_size =MAX_ACTIONS_BUFSIZE ; } - acts =nla_alloc_flow_actions (new_acts_size, log); + acts =nla_alloc_flow_actions (new_acts_size);if (IS_ERR (acts))return (void *)acts;
@@ -2500,7 +2500,7 @@ int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, {int err; - *sfa =nla_alloc_flow_actions (nla_len (attr), log); + *sfa =nla_alloc_flow_actions (min (nla_len (attr),MAX_ACTIONS_BUFSIZE ));if (IS_ERR (*sfa))return PTR_ERR (*sfa);
net/sunrpc/xprtsock.c +1 -0
@@ -2381,6 +2381,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)case -ECONNREFUSED :case -ECONNRESET :case -ENETUNREACH : +case -EHOSTUNREACH :case -EADDRINUSE :case -ENOBUFS :/* retry with existing socket, after a delay */
tools/gpio/gpio-event-mon.c +1 -0
@@ -23,6 +23,7 @@#include <getopt.h> #include <inttypes.h> #include <sys/ioctl.h> +#include <sys/types.h> #include <linux/gpio.h> int monitor_device(const char *device_name,
tools/power/cpupower/bench/system.c +1 -1
@@ -61,7 +61,7 @@ int set_cpufreq_governor(char *governor, unsigned int cpu)dprintf ("set %s as cpufreq governor\n" , governor); -if (cpupower_is_cpu_online (cpu) !=0 ) { +if (cpupower_is_cpu_online (cpu) !=1 ) {perror ("cpufreq_cpu_exists" );fprintf (stderr,"error: cpu %u does not exist\n" , cpu);return -1 ;
tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c +6 -3
@@ -130,15 +130,18 @@ static struct cpuidle_monitor *cpuidle_register(void) {int num;char *tmp; +int this_cpu; + + this_cpu =sched_getcpu ();/* Assume idle state count is the same for all CPUs */ - cpuidle_sysfs_monitor.hw_states_num =cpuidle_state_count (0 ); + cpuidle_sysfs_monitor.hw_states_num =cpuidle_state_count (this_cpu);if (cpuidle_sysfs_monitor.hw_states_num <=0 )return NULL ;for (num =0 ; num < cpuidle_sysfs_monitor.hw_states_num; num++) { - tmp =cpuidle_state_name (0 , num); + tmp =cpuidle_state_name (this_cpu, num);if (tmp ==NULL )continue ;
@@ -146,7 +149,7 @@ static struct cpuidle_monitor *cpuidle_register(void)strncpy (cpuidle_cstates[num].name, tmp,CSTATE_NAME_LEN -1 );free (tmp); - tmp =cpuidle_state_desc (0 , num); + tmp =cpuidle_state_desc (this_cpu, num);if (tmp ==NULL )continue ;strncpy (cpuidle_cstates[num].desc, tmp,CSTATE_DESC_LEN -1 );
tools/usb/usbip/src/usbip_bind.c +9 -0
@@ -144,6 +144,7 @@ static int bind_device(char *busid)int rc;struct udev *udev;struct udev_device *dev; +const char *devpath;/* Check whether the device with this bus ID exists. */ udev =udev_new ();
@@ -152,8 +153,16 @@ static int bind_device(char *busid)err ("device with the specified bus ID does not exist" );return -1 ; } + devpath =udev_device_get_devpath (dev);udev_unref (udev); +/* If the device is already attached to vhci_hcd - bail out */ +if (strstr (devpath,USBIP_VHCI_DRV_NAME )) { +err ("bind loop detected: device: %s is attached to %s\n" , + devpath,USBIP_VHCI_DRV_NAME ); +return -1 ; + } + rc =unbind_other (busid);if (rc ==UNBIND_ST_FAILED ) {err ("could not unbind driver from device on busid %s" , busid);
tools/usb/usbip/src/usbip_list.c +9 -0
@@ -187,6 +187,7 @@ static int list_devices(bool parsable)const char *busid;char product_name[128 ];int ret =-1 ; +const char *devpath;/* Create libudev context. */ udev =udev_new ();
@@ -209,6 +210,14 @@ static int list_devices(bool parsable) path =udev_list_entry_get_name (dev_list_entry); dev =udev_device_new_from_syspath (udev, path); +/* Ignore devices attached to vhci_hcd */ + devpath =udev_device_get_devpath (dev); +if (strstr (devpath,USBIP_VHCI_DRV_NAME )) { +dbg ("Skip the device %s already attached to %s\n" , + devpath,USBIP_VHCI_DRV_NAME ); +continue ; + } +/* Get device information. */ idVendor =udev_device_get_sysattr_value (dev,"idVendor" ); idProduct =udev_device_get_sysattr_value (dev,"idProduct" );