Linux 4.11.2
Greg KH
maintainerI'm announcing the release of the 4.11.2 kernel.
All users of the 4.11 kernel series must upgrade.
The updated 4.11.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.11.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/kvm/psci.c | 8 + arch/arm64/include/asm/kvm_emulate.h | 6 + arch/arm64/kvm/sys_regs.c | 8 - arch/powerpc/kernel/nvram_64.c | 1 arch/x86/boot/boot.h | 2 arch/x86/events/intel/rapl.c | 2 arch/x86/include/asm/pmem.h | 2 arch/x86/kvm/lapic.c | 22 ++- arch/x86/kvm/x86.c | 53 +++++---- arch/x86/um/ptrace_64.c | 2 arch/x86/xen/mmu.c | 7 - block/blk-integrity.c | 3 crypto/algif_aead.c | 157 +++++++++++++++++++++++++-- drivers/Makefile | 1 drivers/ata/libata-scsi.c | 8 + drivers/bluetooth/hci_bcm.c | 5 drivers/bluetooth/hci_intel.c | 13 ++ drivers/char/ipmi/ipmi_ssif.c | 4 drivers/crypto/ccp/ccp-dev-v3.c | 120 ++++++++++++-------- drivers/crypto/ccp/ccp-dev-v5.c | 114 +++++++++++-------- drivers/crypto/ccp/ccp-dev.h | 8 - drivers/crypto/ccp/ccp-pci.c | 2 drivers/crypto/s5p-sss.c | 5 drivers/dax/dax.c | 55 +++------ drivers/infiniband/core/device.c | 33 +++-- drivers/infiniband/core/sysfs.c | 2 drivers/infiniband/core/verbs.c | 8 + drivers/infiniband/hw/hfi1/ruc.c | 26 ++-- drivers/infiniband/hw/hfi1/verbs.c | 4 drivers/infiniband/hw/hfi1/verbs.h | 6 - drivers/infiniband/hw/mlx4/main.c | 1 drivers/infiniband/hw/mlx4/mcg.c | 3 drivers/infiniband/ulp/ipoib/ipoib_fs.c | 3 drivers/infiniband/ulp/ipoib/ipoib_main.c | 44 ++++++- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 3 drivers/md/dm-crypt.c | 8 + drivers/md/dm-era-target.c | 8 - drivers/md/dm-rq.c | 6 - drivers/md/dm-thin.c | 1 drivers/md/raid1.c | 2 drivers/nvdimm/btt_devs.c | 2 drivers/nvdimm/claim.c | 23 ++- drivers/nvdimm/dax_devs.c | 2 drivers/nvdimm/pfn_devs.c | 8 - drivers/nvdimm/pmem.c | 37 ++++-- drivers/nvdimm/region_devs.c | 11 + drivers/staging/comedi/drivers/jr3_pci.c | 13 +- drivers/staging/gdm724x/gdm_mux.c | 3 drivers/staging/media/lirc/lirc_sir.c | 20 +-- drivers/staging/vt6656/usbpipe.c | 31 ++++- drivers/staging/wilc1000/linux_wlan.c | 3 drivers/target/iscsi/iscsi_target.c | 1 drivers/target/iscsi/iscsi_target_configfs.c | 1 drivers/target/iscsi/iscsi_target_login.c | 1 drivers/target/target_core_file.c | 3 drivers/target/target_core_sbc.c | 5 drivers/tty/pty.c | 7 - drivers/tty/serial/amba-pl011.c | 31 +++-- drivers/tty/serial/omap-serial.c | 9 + drivers/tty/serial/samsung.c | 39 ++++-- drivers/usb/class/cdc-wdm.c | 103 ----------------- drivers/usb/core/driver.c | 21 +++ drivers/usb/core/file.c | 9 + drivers/usb/core/hub.c | 11 + drivers/usb/gadget/Kconfig | 1 drivers/usb/host/xhci-mem.c | 13 ++ drivers/usb/host/xhci-pci.c | 3 drivers/usb/host/xhci.h | 1 drivers/usb/misc/usbtest.c | 1 drivers/usb/serial/ftdi_sio.c | 1 drivers/usb/serial/ftdi_sio_ids.h | 6 + drivers/vfio/vfio_iommu_type1.c | 110 ++++++++---------- fs/block_dev.c | 11 - fs/ceph/xattr.c | 3 fs/cifs/cifs_unicode.c | 6 + fs/cifs/cifs_unicode.h | 5 fs/cifs/cifsfs.c | 15 ++ fs/cifs/cifsglob.h | 1 fs/cifs/cifssmb.c | 3 fs/cifs/connect.c | 14 +- fs/cifs/ioctl.c | 7 + fs/cifs/misc.c | 2 fs/cifs/smb2misc.c | 5 fs/cifs/smb2ops.c | 1 fs/cifs/smb2pdu.c | 14 +- fs/crypto/fname.c | 2 fs/crypto/policy.c | 87 +++++++++++--- fs/dax.c | 59 ++-------- fs/ext4/file.c | 21 ++- fs/ext4/inode.c | 5 fs/ext4/namei.c | 4 fs/f2fs/data.c | 2 fs/f2fs/dir.c | 50 ++++---- fs/f2fs/f2fs.h | 3 fs/f2fs/gc.c | 2 fs/f2fs/hash.c | 7 + fs/f2fs/inline.c | 4 fs/f2fs/inode.c | 2 fs/f2fs/namei.c | 20 +-- fs/f2fs/segment.c | 11 - fs/f2fs/super.c | 2 fs/iomap.c | 18 +-- fs/jbd2/journal.c | 2 fs/orangefs/inode.c | 3 fs/orangefs/namei.c | 2 fs/orangefs/xattr.c | 26 +--- fs/overlayfs/dir.c | 2 fs/pstore/platform.c | 10 + fs/pstore/ram_core.c | 2 fs/xattr.c | 2 include/linux/dax.h | 1 include/linux/kvm_host.h | 16 +- include/linux/memcontrol.h | 64 ++++++++++- include/linux/mmzone.h | 2 init/initramfs.c | 16 +- kernel/cgroup/cgroup.c | 22 ++- kernel/padata.c | 2 mm/filemap.c | 26 +--- mm/memcontrol.c | 24 +--- mm/page_alloc.c | 3 mm/truncate.c | 20 ++- mm/vmscan.c | 94 ++++++++++++---- mm/workingset.c | 7 + net/bluetooth/hci_sock.c | 3 net/core/datagram.c | 13 +- tools/perf/arch/s390/annotate/instructions.c | 30 +++++ tools/perf/util/annotate.c | 8 + tools/perf/util/auxtrace.c | 4 tools/testing/selftests/x86/ldt_gdt.c | 46 +++++++ virt/kvm/kvm_main.c | 34 ++--- 131 files changed, 1402 insertions(+), 766 deletions(-)
Aditya Shankar (1):
staging: wilc1000: Fix problem with wrong vif index
Adrian Hunter (1):
perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
Ajay Kaher (1):
USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously
Alex Williamson (1):
vfio/type1: Remove locked page accounting workqueue
Alexey Brodkin (1):
usb: Make sure usb/phy/of gets built-in
Amir Goldstein (1):
ovl: do not set overlay.opaque on non-dir create
Andrew Jones (1):
KVM: arm/arm64: fix races in kvm_psci_vcpu_on
Andrey Ryabinin (2):
fs: fix data invalidation in the cleancache during direct IO fs/block_dev: always invalidate cleancache in invalidate_bdev()
Andy Lutomirski (1):
selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug
Ankit Kumar (1):
pstore: Fix flags to enable dumps on powerpc
Ashish Kalra (1):
x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
Bart Van Assche (2):
target/fileio: Fix zero-length READ and WRITE handling
dm rq: check blk_mq_register_dev() return value in dm_mq_init_request_queue()
Ben Hutchings (1):
x86, pmem: Fix cache flushing for iovec write < 8 bytes
Björn Jacke (2):
CIFS: fix mapping of SFM_SPACE and SFM_PERIOD
CIFS: add misssing SFM mapping for doublequote
Bjørn Mork (1):
USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications"
Christian Borntraeger (2):
perf annotate s390: Fix perf annotate error -95 (4.10 regression) perf annotate s390: Implement jump types for perf annotate
Christoph Hellwig (1):
libata: reject passthrough WRITE SAME requests
Dan Williams (5):
device-dax: fix cdev leak
device-dax: fix sysfs attribute deadlock libnvdimm, region: fix flush hint detection crash
libnvdimm: fix nvdimm_bus_lock() vs device_lock() ordering libnvdimm, pfn: fix 'npfns' vs section alignment
David Disseldorp (3):
cifs: fix leak in FSCTL_ENUM_SNAPS response handling
cifs: fix CIFS_ENUMERATE_SNAPSHOTS oops
cifs: fix CIFS_IOC_GET_MNT_INFO oops
David Hildenbrand (1):
KVM: x86: fix user triggerable warning in kvm_apic_accept_events()
Dennis Yang (1):
dm thin: fix a memory leak when passing discard bio down
Ding Tianhong (1):
iov_iter: don't revert iov buffer if csum error
Eric Biggers (3):
ext4: evict inline data when writing to memory map
fscrypt: fix context consistency check when key(s) unavailable
fscrypt: avoid collisions when presenting long encrypted filenames
Gary R Hook (4):
crypto: ccp - Use only the relevant interrupt bits
crypto: ccp - Disable interrupts early on unload
crypto: ccp - Change ISR handler method for a v3 CCP
crypto: ccp - Change ISR handler method for a v5 CCP
Greg Kroah-Hartman (1):
Linux 4.11.2
Guenter Roeck (2):
usb: hub: Fix error loop seen after hub communication errors
usb: hub: Do not attempt to autosuspend disconnected devices
Gustavo A. R. Silva (1):
usb: misc: add missing continue in switch
Ian Abbott (2):
staging: comedi: jr3_pci: fix possible null pointer dereference
staging: comedi: jr3_pci: cope with jiffies wraparound
Jack Morgenstein (3):
IB/core: Fix sysfs registration error flow
IB/mlx4: Fix ib device initialization error flow
IB/mlx4: Reduce SRIOV multicast cleanup warning message to debug level
Jaegeuk Kim (4):
f2fs: fix wrong max cost initialization
Revert "f2fs: put allocate_segment after refresh_sit_entry"
f2fs: fix fs corruption due to zero inode page
f2fs: check entire encrypted bigname when finding a dentry
Jan Kara (4):
jbd2: fix dbench4 performance regression for 'nobarrier' mounts
mm: fix data corruption due to stale mmap reads
ext4: return to starting transaction in ext4_dax_huge_fault()
f2fs: Make flush bios explicitely sync
Jason A. Donenfeld (1):
padata: free correct variable
Joeseph Chang (1):
ipmi: Fix kernel panic at ipmi_ssif_thread()
Johan Hovold (5):
staging: gdm724x: gdm_mux: fix use-after-free on module unload
serial: omap: fix runtime-pm handling on unbind
serial: omap: suspend device on probe errors
Bluetooth: hci_bcm: add missing tty-device sanity check
Bluetooth: hci_intel: add missing tty-device sanity check
Johannes Weiner (1):
mm: vmscan: fix IO/refault regression in cache workingset transition
Juergen Gross (1):
xen: adjust early dom0 p2m handling to xen hypervisor behavior
Kees Cook (2):
pstore: Use dynamic spinlock initializer
pstore: Shut down worker when unregistering
Krzysztof Kozlowski (1):
crypto: s5p-sss - Close possible race for completed requests
Linus Torvalds (1):
initramfs: avoid "label at end of compound statement" error
Luis Henriques (1):
ceph: fix memory leak in __ceph_setxattr()
Malcolm Priestley (2):
staging: vt6656: use off stack for in buffer USB transfers.
staging: vt6656: use off stack for out buffer USB transfers.
Marc Zyngier (1):
arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses
Marek Szyprowski (2):
serial: samsung: Use right device for DMA-mapping calls
serial: samsung: Add missing checks for dma_map_single failure
Marek Vasut (1):
USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
Martin Brandenburg (4):
orangefs: fix bounds check for listxattr
orangefs: clean up oversize xattr validation
orangefs: do not set getattr_time on orangefs_lookup
orangefs: do not check possibly stale size on truncate
Michael J. Ruhl (1):
IB/core: For multicast functions, verify that LIDs are multicast LIDs
Michal Hocko (1):
fs/xattr.c: zero out memory copied to userspace in getxattr
Mike Marciniszyn (1):
IB/hfi1: Prevent kernel QP post send hard lockups
Mike Snitzer (1):
block: fix blk_integrity_register to use template's interval_exp if not 0
NeilBrown (1):
md/raid1: avoid reusing a resync bio after error handling.
Nicholas Bellinger (2):
target: Fix compare_and_write_callback handling for non GOOD status
iscsi-target: Set session_fall_back_to_erl0 when forcing reinstatement
Ondrej Kozina (1):
dm crypt: rewrite (wipe) key in crypto layer using random data
Paolo Bonzini (1):
Revert "KVM: Support vCPU-based gfn->hva cache"
Parav Pandit (1):
IB/core: Fix kernel crash during fail to initialize device
Peter Chen (1):
usb: host: xhci: print correct command ring address
Rabin Vincent (1):
CIFS: fix oplock break deadlocks
Richard Weinberger (1):
um: Fix PTRACE_POKEUSER on x86_64
Roger Quadros (1):
usb: xhci: bInterval quirk for TI TUSB73x0
Romain Izard (1):
usb: gadget: legacy gadgets are optional
Ross Zwisler (2):
dax: prevent invalidation of mapped DAX entries
dax: fix PMD data corruption when fault races with write
Sachin Prabhu (2):
Fix match_prepath()
Do not return number of bytes written for ioctl CIFS_IOC_COPYCHUNK_FILE
Sean Young (1):
staging: sir: fill in missing fields and fix probe
Shamir Rabinovitch (1):
IB/IPoIB: ibX: failed to create mcg debug file
Sheng Yong (1):
f2fs: fix multiple f2fs_add_link() having same name for inline dentry
Somasundaram Krishnasamy (1):
dm era: save spacemap metadata root after the pre-commit
Stafford Horne (1):
initramfs: Always do fput() and load modules after rootfs populate
Stephan Mueller (1):
crypto: algif_aead - Require setkey before accept(2)
Steve French (2):
Set unicode flag on cifs echo request to avoid Mac error
SMB3: Work around mount failure when using SMB3 dialect to Macs
Szymon Janc (1):
Bluetooth: Fix user channel for 32bit userspace on 64bit kernel
Tejun Heo (1):
cgroup: fix spurious warnings on cgroup_is_dead() from cgroup_sk_alloc()
Timur Tabi (1):
tty: pl011: use "qdf2400_e44" as the earlycon name for QDF2400 E44
Toshi Kani (1):
libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify
Vince Weaver (1):
perf/x86: Fix Broadwell-EP DRAM RAPL events
Vlastimil Babka (1):
mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC
Wang YanQing (1):
tty: pty: Fix ldisc flush after userspace become aware of the data already
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 11 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Fearless Coyote
arch/arm/kvm/psci.c +7 -1
@@ -208,9 +208,10 @@ int kvm_psci_version(struct kvm_vcpu *vcpu)static int kvm_psci_0_2_call (struct kvm_vcpu *vcpu) { -int ret =1 ; +struct kvm *kvm = vcpu->kvm;unsigned long psci_fn =vcpu_get_reg (vcpu,0 ) & ~((u32 )0 );unsigned long val; +int ret =1 ;switch (psci_fn) {case PSCI_0_2_FN_PSCI_VERSION :
@@ -230,7 +231,9 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)break ;case PSCI_0_2_FN_CPU_ON :case PSCI_0_2_FN64_CPU_ON : +mutex_lock (&kvm->lock); val =kvm_psci_vcpu_on (vcpu); +mutex_unlock (&kvm->lock);break ;case PSCI_0_2_FN_AFFINITY_INFO :case PSCI_0_2_FN64_AFFINITY_INFO :
@@ -279,6 +282,7 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)static int kvm_psci_0_1_call (struct kvm_vcpu *vcpu) { +struct kvm *kvm = vcpu->kvm;unsigned long psci_fn =vcpu_get_reg (vcpu,0 ) & ~((u32 )0 );unsigned long val;
@@ -288,7 +292,9 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) val =PSCI_RET_SUCCESS ;break ;case KVM_PSCI_FN_CPU_ON : +mutex_lock (&kvm->lock); val =kvm_psci_vcpu_on (vcpu); +mutex_unlock (&kvm->lock);break ;default : val =PSCI_RET_NOT_SUPPORTED ;
arch/arm64/include/asm/kvm_emulate.h +6 -0
@@ -240,6 +240,12 @@ static inline u8 kvm_vcpu_trap_get_fault_type(const struct kvm_vcpu *vcpu)return kvm_vcpu_get_hsr (vcpu) & ESR_ELx_FSC_TYPE; } +static inline int kvm_vcpu_sys_get_rt (struct kvm_vcpu *vcpu) +{ +u32 esr =kvm_vcpu_get_hsr (vcpu); +return (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT; +} +static inline unsigned long kvm_vcpu_get_mpidr_aff (struct kvm_vcpu *vcpu) {return vcpu_sys_reg (vcpu,MPIDR_EL1 ) &MPIDR_HWID_BITMASK ;
arch/arm64/kvm/sys_regs.c +4 -4
@@ -1638,8 +1638,8 @@ static int kvm_handle_cp_64(struct kvm_vcpu *vcpu, {struct sys_reg_params params;u32 hsr =kvm_vcpu_get_hsr (vcpu); -int Rt = (hsr >>5 ) &0xf ; -int Rt2 = (hsr >>10 ) &0xf ; +int Rt =kvm_vcpu_sys_get_rt (vcpu); +int Rt2 = (hsr >>10 ) &0x1f ; params.is_aarch32 = true; params.is_32bit = false;
@@ -1690,7 +1690,7 @@ static int kvm_handle_cp_32(struct kvm_vcpu *vcpu, {struct sys_reg_params params;u32 hsr =kvm_vcpu_get_hsr (vcpu); -int Rt = (hsr >>5 ) &0xf ; +int Rt =kvm_vcpu_sys_get_rt (vcpu); params.is_aarch32 = true; params.is_32bit = true;
@@ -1805,7 +1805,7 @@ int kvm_handle_sys_reg(struct kvm_vcpu *vcpu, struct kvm_run *run) {struct sys_reg_params params;unsigned long esr =kvm_vcpu_get_hsr (vcpu); -int Rt = (esr >>5 ) &0x1f ; +int Rt =kvm_vcpu_sys_get_rt (vcpu);int ret;trace_kvm_handle_sys_reg (esr);
arch/powerpc/kernel/nvram_64.c +1 -0
@@ -561,6 +561,7 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,static struct pstore_info nvram_pstore_info = { .owner =THIS_MODULE , .name ="nvram" , + .flags =PSTORE_FLAGS_DMESG , .open = nvram_pstore_open, .read = nvram_pstore_read, .write = nvram_pstore_write,
arch/x86/boot/boot.h +1 -1
@@ -16,7 +16,7 @@#ifndef BOOT_BOOT_H #define BOOT_BOOT_H -#define STACK_SIZE 512/* Minimum number of bytes for stack */ +#define STACK_SIZE 1024/* Minimum number of bytes for stack */ #ifndef __ASSEMBLY__
arch/x86/events/intel/rapl.c +1 -1
@@ -761,7 +761,7 @@ static const struct x86_cpu_id rapl_cpu_match[] __initconst = {X86_RAPL_MODEL_MATCH (INTEL_FAM6_BROADWELL_CORE , hsw_rapl_init),X86_RAPL_MODEL_MATCH (INTEL_FAM6_BROADWELL_GT3E , hsw_rapl_init), -X86_RAPL_MODEL_MATCH (INTEL_FAM6_BROADWELL_X , hsw_rapl_init), +X86_RAPL_MODEL_MATCH (INTEL_FAM6_BROADWELL_X , hsx_rapl_init),X86_RAPL_MODEL_MATCH (INTEL_FAM6_BROADWELL_XEON_D , hsw_rapl_init), X86_RAPL_MODEL_MATCH(INTEL_FAM6_XEON_PHI_KNL, knl_rapl_init),
arch/x86/include/asm/pmem.h +1 -1
@@ -103,7 +103,7 @@ static inline size_t arch_copy_from_iter_pmem(void *addr, size_t bytes,if (bytes <8 ) {if (!IS_ALIGNED (dest,4 ) || (bytes !=4 )) -arch_wb_cache_pmem (addr,1 ); +arch_wb_cache_pmem (addr, bytes); }else {if (!IS_ALIGNED (dest,8 )) { dest =ALIGN (dest, boot_cpu_data.x86_clflush_size);
arch/x86/kvm/lapic.c +12 -10
@@ -529,14 +529,16 @@ int kvm_apic_set_irq(struct kvm_vcpu *vcpu, struct kvm_lapic_irq *irq,static int pv_eoi_put_user (struct kvm_vcpu *vcpu,u8 val) { -return kvm_vcpu_write_guest_cached (vcpu, &vcpu->arch.pv_eoi.data, &val, -sizeof (val)); + +return kvm_write_guest_cached (vcpu->kvm, &vcpu->arch.pv_eoi.data, &val, +sizeof (val)); }static int pv_eoi_get_user (struct kvm_vcpu *vcpu,u8 *val) { -return kvm_vcpu_read_guest_cached (vcpu, &vcpu->arch.pv_eoi.data, val, -sizeof (*val)); + +return kvm_read_guest_cached (vcpu->kvm, &vcpu->arch.pv_eoi.data, val, +sizeof (*val)); }static inline bool pv_eoi_enabled (struct kvm_vcpu *vcpu)
@@ -2285,8 +2287,8 @@ void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu)if (!test_bit (KVM_APIC_CHECK_VAPIC , &vcpu->arch.apic_attention))return ; -if (kvm_vcpu_read_guest_cached (vcpu, &vcpu->arch.apic->vapic_cache, &data, -sizeof (u32))) +if (kvm_read_guest_cached (vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, +sizeof (u32)))return ;apic_set_tpr (vcpu->arch.apic, data &0xff );
@@ -2338,14 +2340,14 @@ void kvm_lapic_sync_to_vapic(struct kvm_vcpu *vcpu) max_isr =0 ; data = (tpr &0xff ) | ((max_isr &0xf0 ) <<8 ) | (max_irr <<24 ); -kvm_vcpu_write_guest_cached (vcpu, &vcpu->arch.apic->vapic_cache, &data, -sizeof (u32)); +kvm_write_guest_cached (vcpu->kvm, &vcpu->arch.apic->vapic_cache, &data, +sizeof (u32)); }int kvm_lapic_set_vapic_addr (struct kvm_vcpu *vcpu,gpa_t vapic_addr) {if (vapic_addr) { -if (kvm_vcpu_gfn_to_hva_cache_init (vcpu, +if (kvm_gfn_to_hva_cache_init (vcpu->kvm, &vcpu->arch.apic->vapic_cache, vapic_addr,sizeof (u32)))return -EINVAL ;
@@ -2439,7 +2441,7 @@ int kvm_lapic_enable_pv_eoi(struct kvm_vcpu *vcpu, u64 data) vcpu->arch.pv_eoi.msr_val = data;if (!pv_eoi_enabled (vcpu))return 0 ; -return kvm_vcpu_gfn_to_hva_cache_init (vcpu, &vcpu->arch.pv_eoi.data, +return kvm_gfn_to_hva_cache_init (vcpu->kvm, &vcpu->arch.pv_eoi.data, addr,sizeof (u8)); }
arch/x86/kvm/x86.c +33 -20
141 lines not on this page · raw message
arch/x86/um/ptrace_64.c +1 -1
@@ -125,7 +125,7 @@ int poke_user(struct task_struct *child, long addr, long data) else if ((addr >= offsetof(struct user, u_debugreg[0])) && (addr <= offsetof(struct user, u_debugreg[7]))) { addr -= offsetof(struct user, u_debugreg[0]); - addr = addr >>2 ; + addr = addr >>3 ;if ((addr ==4 ) || (addr ==5 ))return -EIO ; child->thread.arch.debugregs[addr] = data;
arch/x86/xen/mmu.c +4 -3
@@ -2023,7 +2023,8 @@ static unsigned long __init xen_read_phys_ulong(phys_addr_t addr)/* * Translate a virtual address to a physical one without relying on mapped -* page tables. +* page tables. Don't rely on big pages being aligned in (guest) physical +* space! */ static phys_addr_t __init xen_early_virt_to_phys (unsigned long vaddr) {
@@ -2044,7 +2045,7 @@ static phys_addr_t __init xen_early_virt_to_phys(unsigned long vaddr) sizeof(pud)));if (!pud_present (pud))return 0 ; - pa =pud_pfn (pud) <<PAGE_SHIFT ; + pa =pud_val (pud) &PTE_PFN_MASK ;if (pud_large (pud))return pa + (vaddr & ~PUD_MASK );
@@ -2052,7 +2053,7 @@ static phys_addr_t __init xen_early_virt_to_phys(unsigned long vaddr) sizeof(pmd)));if (!pmd_present (pmd))return 0 ; - pa =pmd_pfn (pmd) <<PAGE_SHIFT ; + pa =pmd_val (pmd) &PTE_PFN_MASK ;if (pmd_large (pmd))return pa + (vaddr & ~PMD_MASK );
block/blk-integrity.c +2 -1
@@ -412,7 +412,8 @@ void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template bi->flags =BLK_INTEGRITY_VERIFY |BLK_INTEGRITY_GENERATE | template->flags; - bi->interval_exp =ilog2 (queue_logical_block_size (disk->queue)); + bi->interval_exp = template->interval_exp ? : +ilog2 (queue_logical_block_size (disk->queue)); bi->profile = template->profile ? template->profile : &nop_profile; bi->tuple_size = template->tuple_size; bi->tag_size = template->tag_size;
crypto/algif_aead.c +149 -8
211 lines not on this page · raw message
drivers/Makefile +1 -0
@@ -104,6 +104,7 @@ obj-$(CONFIG_USB_PHY) += usb/ obj-$(CONFIG_USB) += usb/ obj-$(CONFIG_PCI) += usb/ obj-$(CONFIG_USB_GADGET) += usb/ +obj-$(CONFIG_OF) += usb/ obj-$(CONFIG_SERIO) += input/serio/ obj-$(CONFIG_GAMEPORT) += input/gameport/ obj-$(CONFIG_INPUT) += input/
drivers/ata/libata-scsi.c +8 -0
@@ -3462,6 +3462,14 @@ static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc)if (unlikely (!dev->dma_mode)) goto invalid_opcode; +/* +* We only allow sending this command through the block layer, +* as it modifies the DATA OUT buffer, which would corrupt user +* memory for SG_IO commands. +*/ +if (unlikely (blk_rq_is_passthrough (scmd->request))) + goto invalid_opcode; +if (unlikely (scmd->cmd_len <16 )) { fp =15 ; goto invalid_fld;
drivers/bluetooth/hci_bcm.c +4 -1
@@ -287,6 +287,9 @@ static int bcm_open(struct hci_uart *hu) hu->priv = bcm; +if (!hu->tty->dev) + goto out; +mutex_lock (&bcm_device_lock);list_for_each (p, &bcm_device_list) { struct bcm_device *dev = list_entry(p, struct bcm_device, list);
@@ -307,7 +310,7 @@ static int bcm_open(struct hci_uart *hu) }mutex_unlock (&bcm_device_lock); - +out:return 0 ; }
drivers/bluetooth/hci_intel.c +12 -1
@@ -307,6 +307,9 @@ static int intel_set_power(struct hci_uart *hu, bool powered)struct list_head *p;int err = -ENODEV ; +if (!hu->tty->dev) +return err; +mutex_lock (&intel_device_list_lock);list_for_each (p, &intel_device_list) {
@@ -379,6 +382,9 @@ static void intel_busy_work(struct work_struct *work) struct intel_data *intel = container_of(work, struct intel_data, busy_work); +if (!intel->hu->tty->dev) +return ; +/* Link is busy, delay the suspend */ mutex_lock (&intel_device_list_lock);list_for_each (p, &intel_device_list) {
@@ -889,6 +895,8 @@ static int intel_setup(struct hci_uart *hu)list_for_each (p, &intel_device_list) { struct intel_device *dev = list_entry(p, struct intel_device, list); +if (!hu->tty->dev) +break ;if (hu->tty->dev->parent == dev->pdev->dev.parent) {if (device_may_wakeup (&dev->pdev->dev)) {set_bit (STATE_LPM_ENABLED , &intel->flags);
@@ -1056,6 +1064,9 @@ static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb)BT_DBG ("hu %p skb %p" , hu, skb); +if (!hu->tty->dev) + goto out_enqueue; +/* Be sure our controller is resumed and potential LPM transaction * completed before enqueuing any packet. */
@@ -1072,7 +1083,7 @@ static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb) } }mutex_unlock (&intel_device_list_lock); - +out_enqueue:skb_queue_tail (&intel->txq, skb);return 0 ;
drivers/char/ipmi/ipmi_ssif.c +3 -1
@@ -891,6 +891,7 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result,* for details on the intricacies of this. */ int left; +unsigned char *data_to_send;ssif_inc_stat (ssif_info, sent_messages_parts);
@@ -899,6 +900,7 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result, left =32 ;/* Length byte. */ ssif_info->multi_data[ssif_info->multi_pos] = left; + data_to_send = ssif_info->multi_data + ssif_info->multi_pos; ssif_info->multi_pos += left;if (left <32 )/*
@@ -912,7 +914,7 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result, rv =ssif_i2c_send (ssif_info, msg_written_handler,I2C_SMBUS_WRITE ,SSIF_IPMI_MULTI_PART_REQUEST_MIDDLE , - ssif_info->multi_data + ssif_info->multi_pos, + data_to_send,I2C_SMBUS_BLOCK_DATA );if (rv <0 ) {/* request failed, just return the error. */
drivers/crypto/ccp/ccp-dev-v3.c +70 -50
190 lines not on this page · raw message
drivers/crypto/ccp/ccp-dev-v5.c +69 -45
166 lines not on this page · raw message
drivers/crypto/ccp/ccp-dev.h +5 -3
@@ -109,9 +109,8 @@#define INT_COMPLETION 0x1#define INT_ERROR 0x2#define INT_QUEUE_STOPPED 0x4 -#define ALL_INTERRUPTS (INT_COMPLETION| \ - INT_ERROR| \ - INT_QUEUE_STOPPED) +#define INT_EMPTY_QUEUE 0x8 +#define SUPPORTED_INTERRUPTS (INT_COMPLETION | INT_ERROR)#define LSB_REGION_WIDTH 5#define MAX_LSB_CNT 8
@@ -337,7 +336,10 @@ struct ccp_device {void *dev_specific;int (*get_irq)(struct ccp_device *ccp);void (*free_irq)(struct ccp_device *ccp); +unsigned int qim;unsigned int irq; +bool use_tasklet; +struct tasklet_struct irq_tasklet;/* I/O area used for device communication. The register mapping * starts at an offset into the mapped bar.
drivers/crypto/ccp/ccp-pci.c +2 -0
@@ -69,6 +69,7 @@ static int ccp_get_msix_irqs(struct ccp_device *ccp) goto e_irq; } } + ccp->use_tasklet = true;return 0 ;
@@ -100,6 +101,7 @@ static int ccp_get_msi_irq(struct ccp_device *ccp)dev_notice (dev,"unable to allocate MSI IRQ (%d)\n" , ret); goto e_msi; } + ccp->use_tasklet = true;return 0 ;
drivers/crypto/s5p-sss.c +3 -2
@@ -287,7 +287,6 @@ static void s5p_sg_done(struct s5p_aes_dev *dev)static void s5p_aes_complete (struct s5p_aes_dev *dev,int err) { dev->req->base.complete (&dev->req->base, err); - dev->busy = false; }static void s5p_unset_outdata (struct s5p_aes_dev *dev)
@@ -462,7 +461,7 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)spin_unlock_irqrestore (&dev->lock, flags);s5p_aes_complete (dev,0 ); - dev->busy = true; +/* Device is still busy */ tasklet_schedule (&dev->tasklet); }else {/*
@@ -483,6 +482,7 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id) error:s5p_sg_done (dev); + dev->busy = false;spin_unlock_irqrestore (&dev->lock, flags);s5p_aes_complete (dev, err);
@@ -634,6 +634,7 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) indata_error:s5p_sg_done (dev); + dev->busy = false;spin_unlock_irqrestore (&dev->lock, flags);s5p_aes_complete (dev, err); }
drivers/dax/dax.c +23 -32
100 lines not on this page · raw message
drivers/infiniband/core/device.c +22 -11
@@ -172,8 +172,16 @@ static void ib_device_release(struct device *device) { struct ib_device *dev = container_of(device, struct ib_device, dev); -ib_cache_release_one (dev); -kfree (dev->port_immutable); +WARN_ON (dev->reg_state ==IB_DEV_REGISTERED ); +if (dev->reg_state ==IB_DEV_UNREGISTERED ) { +/* +* In IB_DEV_UNINITIALIZED state, cache or port table +* is not even created. Free cache and port table only when +* device reaches UNREGISTERED state. +*/ +ib_cache_release_one (dev); +kfree (dev->port_immutable); + }kfree (dev); }
@@ -380,32 +388,27 @@ int ib_register_device(struct ib_device *device, ret =ib_cache_setup_one (device);if (ret) {pr_warn ("Couldn't set up InfiniBand P_Key/GID cache\n" ); - goto out; + goto port_cleanup; } ret =ib_device_register_rdmacg (device);if (ret) {pr_warn ("Couldn't register device with rdma cgroup\n" ); -ib_cache_cleanup_one (device); - goto out; + goto cache_cleanup; }memset (&device->attrs,0 ,sizeof (device->attrs)); ret = device->query_device (device, &device->attrs, &uhw);if (ret) {pr_warn ("Couldn't query the device attributes\n" ); -ib_device_unregister_rdmacg (device); -ib_cache_cleanup_one (device); - goto out; + goto cache_cleanup; } ret =ib_device_register_sysfs (device, port_callback);if (ret) {pr_warn ("Couldn't register device %s with driver model\n" , device->name); -ib_device_unregister_rdmacg (device); -ib_cache_cleanup_one (device); - goto out; + goto cache_cleanup; } device->reg_state =IB_DEV_REGISTERED ;
@@ -417,6 +420,14 @@ int ib_register_device(struct ib_device *device,down_write (&lists_rwsem);list_add_tail (&device->core_list, &device_list);up_write (&lists_rwsem); +mutex_unlock (&device_mutex); +return 0 ; + +cache_cleanup: +ib_cache_cleanup_one (device); +ib_cache_release_one (device); +port_cleanup: +kfree (device->port_immutable); out:mutex_unlock (&device_mutex);return ret;
drivers/infiniband/core/sysfs.c +1 -1
@@ -1301,7 +1301,7 @@ int ib_device_register_sysfs(struct ib_device *device,free_port_list_attributes (device); err_unregister: -device_unregister (class_dev); +device_del (class_dev); err:return ret;
drivers/infiniband/core/verbs.c +6 -2
@@ -1519,7 +1519,9 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)if (!qp->device->attach_mcast)return -ENOSYS ; -if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD ) +if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD || + lid <be16_to_cpu (IB_MULTICAST_LID_BASE ) || + lid ==be16_to_cpu (IB_LID_PERMISSIVE ))return -EINVAL ; ret = qp->device->attach_mcast (qp, gid, lid);
@@ -1535,7 +1537,9 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)if (!qp->device->detach_mcast)return -ENOSYS ; -if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD ) +if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD || + lid <be16_to_cpu (IB_MULTICAST_LID_BASE ) || + lid ==be16_to_cpu (IB_LID_PERMISSIVE ))return -EINVAL ; ret = qp->device->detach_mcast (qp, gid, lid);
drivers/infiniband/hw/hfi1/ruc.c +16 -10
@@ -1,5 +1,5 @@/* -* Copyright(c) 2015, 2016 Intel Corporation. +* Copyright(c) 2015 - 2017 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license.
@@ -784,23 +784,29 @@ void hfi1_make_ruc_header(struct rvt_qp *qp, struct ib_other_headers *ohdr,/* when sending, force a reschedule every one of these periods */ #define SEND_RESCHED_TIMEOUT (5 * HZ)/* 5s in jiffies */ +void hfi1_do_send_from_rvt (struct rvt_qp *qp) +{ +hfi1_do_send (qp, false); +} +void _hfi1_do_send (struct work_struct *work) { struct iowait *wait = container_of(work, struct iowait, iowork);struct rvt_qp *qp =iowait_to_qp (wait); -hfi1_do_send (qp); +hfi1_do_send (qp, true); }/** * hfi1_do_send - perform a send on a QP * @work: contains a pointer to the QP +* @in_thread: true if in a workqueue thread * * Process entries in the send work queue until credit or queue is * exhausted. Only allow one CPU to send a packet per QP. * Otherwise, two threads could send packets out of order. */ -void hfi1_do_send (struct rvt_qp *qp) +void hfi1_do_send (struct rvt_qp *qp,bool in_thread) {struct hfi1_pkt_state ps;struct hfi1_qp_priv *priv = qp->priv;
@@ -868,8 +874,10 @@ void hfi1_do_send(struct rvt_qp *qp) qp->s_hdrwords =0 ;/* allow other tasks to run */ if (unlikely (time_after (jiffies, timeout))) { -if (workqueue_congested (cpu, - ps.ppd->hfi1_wq)) { +if (!in_thread || +workqueue_congested ( + cpu, + ps.ppd->hfi1_wq)) {spin_lock_irqsave ( &qp->s_lock, ps.flags);
@@ -882,11 +890,9 @@ void hfi1_do_send(struct rvt_qp *qp) *ps.ppd->dd->send_schedule);return ; } -if (!irqs_disabled ()) { -cond_resched (); -this_cpu_inc ( - *ps.ppd->dd->send_schedule); - } +cond_resched (); +this_cpu_inc ( + *ps.ppd->dd->send_schedule); timeout = jiffies + (timeout_int) /8 ; }spin_lock_irqsave (&qp->s_lock, ps.flags);
drivers/infiniband/hw/hfi1/verbs.c +2 -2
@@ -1,5 +1,5 @@/* -* Copyright(c) 2015, 2016 Intel Corporation. +* Copyright(c) 2015 - 2017 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license.
@@ -1751,7 +1751,7 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd) dd->verbs_dev.rdi.driver_f.qp_priv_free = qp_priv_free; dd->verbs_dev.rdi.driver_f.free_all_qps = free_all_qps; dd->verbs_dev.rdi.driver_f.notify_qp_reset = notify_qp_reset; - dd->verbs_dev.rdi.driver_f.do_send = hfi1_do_send; + dd->verbs_dev.rdi.driver_f.do_send = hfi1_do_send_from_rvt; dd->verbs_dev.rdi.driver_f.schedule_send = hfi1_schedule_send; dd->verbs_dev.rdi.driver_f.schedule_send_no_lock = _hfi1_schedule_send; dd->verbs_dev.rdi.driver_f.get_pmtu_from_attr = get_pmtu_from_attr;
drivers/infiniband/hw/hfi1/verbs.h +4 -2
@@ -1,5 +1,5 @@/* -* Copyright(c) 2015, 2016 Intel Corporation. +* Copyright(c) 2015 - 2017 Intel Corporation. * * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license.
@@ -350,7 +350,9 @@ void hfi1_make_ruc_header(struct rvt_qp *qp, struct ib_other_headers *ohdr,void _hfi1_do_send (struct work_struct *work); -void hfi1_do_send (struct rvt_qp *qp); +void hfi1_do_send_from_rvt (struct rvt_qp *qp); + +void hfi1_do_send (struct rvt_qp *qp,bool in_thread);void hfi1_send_complete (struct rvt_qp *qp,struct rvt_swqe *wqe,enum ib_wc_status status);
drivers/infiniband/hw/mlx4/main.c +1 -0
@@ -2941,6 +2941,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)mlx4_ib_delete_counters_table (ibdev, &ibdev->counters_table[i]); err_map: +mlx4_ib_free_eqs (dev, ibdev);iounmap (ibdev->uar_map); err_uar:
drivers/infiniband/hw/mlx4/mcg.c +2 -1
@@ -1102,7 +1102,8 @@ static void _mlx4_ib_mcg_port_cleanup(struct mlx4_ib_demux_ctx *ctx, int destroywhile ((p =rb_first (&ctx->mcg_table)) !=NULL ) { group = rb_entry(p, struct mcast_group, node);if (atomic_read (&group->refcount)) -mcg_warn_group (group,"group refcount %d!!! (pointer %p)\n" ,atomic_read (&group->refcount), group); +mcg_debug_group (group,"group refcount %d!!! (pointer %p)\n" , +atomic_read (&group->refcount), group);force_clean_group (group); }
drivers/infiniband/ulp/ipoib/ipoib_fs.c +3 -0
@@ -281,8 +281,11 @@ void ipoib_delete_debug_files(struct net_device *dev) {struct ipoib_dev_priv *priv =netdev_priv (dev); +WARN_ONCE (!priv->mcg_dentry,"null mcg debug file\n" ); +WARN_ONCE (!priv->path_dentry,"null path debug file\n" );debugfs_remove (priv->mcg_dentry);debugfs_remove (priv->path_dentry); + priv->mcg_dentry = priv->path_dentry =NULL ; }int ipoib_register_debugfs (void )
drivers/infiniband/ulp/ipoib/ipoib_main.c +39 -5
86 lines not on this page · raw message
drivers/infiniband/ulp/ipoib/ipoib_vlan.c +0 -3
@@ -86,8 +86,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, goto register_failed; } -ipoib_create_debug_files (priv->dev); -/* RTNL childs don't need proprietary sysfs entries */ if (type ==IPOIB_LEGACY_CHILD ) {if (ipoib_cm_add_mode_attr (priv->dev))
@@ -108,7 +106,6 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv, sysfs_failed: result = -ENOMEM ; -ipoib_delete_debug_files (priv->dev);unregister_netdevice (priv->dev); register_failed:
drivers/md/dm-crypt.c +6 -2
@@ -1649,12 +1649,16 @@ static int crypt_set_key(struct crypt_config *cc, char *key)static int crypt_wipe_key (struct crypt_config *cc) { +int r; +clear_bit (DM_CRYPT_KEY_VALID , &cc->flags); -memset (&cc->key,0 , cc->key_size *sizeof (u8)); +get_random_bytes (&cc->key, cc->key_size);kzfree (cc->key_string); cc->key_string =NULL ; + r =crypt_setkey (cc); +memset (&cc->key,0 , cc->key_size *sizeof (u8)); -return crypt_setkey (cc); +return r; }static void crypt_dtr (struct dm_target *ti)
drivers/md/dm-era-target.c +4 -4
@@ -961,15 +961,15 @@ static int metadata_commit(struct era_metadata *md) } } - r =save_sm_root (md); + r =dm_tm_pre_commit (md->tm);if (r) { -DMERR ("%s: save_sm_root failed" , __func__); +DMERR ("%s: pre commit failed" , __func__);return r; } - r =dm_tm_pre_commit (md->tm); + r =save_sm_root (md);if (r) { -DMERR ("%s: pre commit failed" , __func__); +DMERR ("%s: save_sm_root failed" , __func__);return r; }
drivers/md/dm-rq.c +5 -1
@@ -810,10 +810,14 @@ int dm_mq_init_request_queue(struct mapped_device *md, struct dm_table *t)dm_init_md_queue (md);/* backfill 'mq' sysfs registration normally done in blk_register_queue */ -blk_mq_register_dev (disk_to_dev (md->disk), q); + err =blk_mq_register_dev (disk_to_dev (md->disk), q); +if (err) + goto out_cleanup_queue;return 0 ; +out_cleanup_queue: +blk_cleanup_queue (q); out_tag_set:blk_mq_free_tag_set (md->tag_set); out_kfree_tag_set:
drivers/md/dm-thin.c +1 -0
@@ -1069,6 +1069,7 @@ static void passdown_endio(struct bio *bio)* to unmap (we ignore err). */ queue_passdown_pt2 (bio->bi_private); +bio_put (bio); }static void process_prepared_discard_passdown_pt1 (struct dm_thin_new_mapping *m)
drivers/md/raid1.c +2 -0
@@ -2222,6 +2222,8 @@ static void sync_request_write(struct mddev *mddev, struct r1bio *r1_bio) (i == r1_bio->read_disk || !test_bit(MD_RECOVERY_SYNC, &mddev->recovery)))) continue; +if (test_bit (Faulty, &conf->mirrors[i].rdev->flags)) +continue ;bio_set_op_attrs (wbio,REQ_OP_WRITE ,0 );if (test_bit (FailFast, &conf->mirrors[i].rdev->flags))
drivers/nvdimm/btt_devs.c +1 -1
@@ -314,7 +314,7 @@ int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns)if (rc <0 ) {struct nd_btt *nd_btt =to_nd_btt (btt_dev); -__nd_detach_ndns (btt_dev, &nd_btt->ndns); +nd_detach_ndns (btt_dev, &nd_btt->ndns);put_device (btt_dev); }
drivers/nvdimm/claim.c +15 -8
@@ -21,8 +21,13 @@void __nd_detach_ndns (struct device *dev,struct nd_namespace_common **_ndns) {struct nd_namespace_common *ndns = *_ndns; +struct nvdimm_bus *nvdimm_bus; -lockdep_assert_held (&ndns->dev.mutex); +if (!ndns) +return ; + + nvdimm_bus =walk_to_nvdimm_bus (&ndns->dev); +lockdep_assert_held (&nvdimm_bus->reconfig_mutex);dev_WARN_ONCE (dev, ndns->claim != dev,"%s: invalid claim\n" , __func__); ndns->claim =NULL ; *_ndns =NULL ;
@@ -37,18 +42,20 @@ void nd_detach_ndns(struct device *dev,if (!ndns)return ;get_device (&ndns->dev); -device_lock (&ndns->dev); +nvdimm_bus_lock (&ndns->dev);__nd_detach_ndns (dev, _ndns); -device_unlock (&ndns->dev); +nvdimm_bus_unlock (&ndns->dev);put_device (&ndns->dev); }bool __nd_attach_ndns (struct device *dev,struct nd_namespace_common *attach,struct nd_namespace_common **_ndns) { +struct nvdimm_bus *nvdimm_bus =walk_to_nvdimm_bus (&attach->dev); +if (attach->claim)return false; -lockdep_assert_held (&attach->dev.mutex); +lockdep_assert_held (&nvdimm_bus->reconfig_mutex);dev_WARN_ONCE (dev, *_ndns,"%s: invalid claim\n" , __func__); attach->claim = dev; *_ndns = attach;
@@ -61,9 +68,9 @@ bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, {bool claimed; -device_lock (&attach->dev); +nvdimm_bus_lock (&attach->dev); claimed =__nd_attach_ndns (dev, attach, _ndns); -device_unlock (&attach->dev); +nvdimm_bus_unlock (&attach->dev);return claimed; }
@@ -114,7 +121,7 @@ static void nd_detach_and_reset(struct device *dev, struct nd_namespace_common **_ndns) {/* detach the namespace and destroy / reset the device */ -nd_detach_ndns (dev, _ndns); +__nd_detach_ndns (dev, _ndns);if (is_idle (dev, *_ndns)) {nd_device_unregister (dev,ND_ASYNC ); }else if (is_nd_btt (dev)) {
@@ -184,7 +191,7 @@ ssize_t nd_namespace_store(struct device *dev, }WARN_ON_ONCE (!is_nvdimm_bus_locked (dev)); -if (!nd_attach_ndns (dev, ndns, _ndns)) { +if (!__nd_attach_ndns (dev, ndns, _ndns)) {dev_dbg (dev,"%s already claimed\n" ,dev_name (&ndns->dev)); len = -EBUSY ;
drivers/nvdimm/dax_devs.c +1 -1
@@ -124,7 +124,7 @@ int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns)dev_dbg (dev,"%s: dax: %s\n" , __func__, rc ==0 ?dev_name (dax_dev) :"<none>" );if (rc <0 ) { -__nd_detach_ndns (dax_dev, &nd_pfn->ndns); +nd_detach_ndns (dax_dev, &nd_pfn->ndns);put_device (dax_dev); }else __nd_device_register (dax_dev);
drivers/nvdimm/pfn_devs.c +5 -3
@@ -484,7 +484,7 @@ int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns)dev_dbg (dev,"%s: pfn: %s\n" , __func__, rc ==0 ?dev_name (pfn_dev) :"<none>" );if (rc <0 ) { -__nd_detach_ndns (pfn_dev, &nd_pfn->ndns); +nd_detach_ndns (pfn_dev, &nd_pfn->ndns);put_device (pfn_dev); }else __nd_device_register (pfn_dev);
@@ -538,7 +538,8 @@ static struct vmem_altmap *__nvdimm_setup_pfn(struct nd_pfn *nd_pfn, nd_pfn->npfns =le64_to_cpu (pfn_sb->npfns); altmap =NULL ; }else if (nd_pfn->mode ==PFN_MODE_PMEM ) { - nd_pfn->npfns = (resource_size (res) - offset) /PAGE_SIZE ; + nd_pfn->npfns =PFN_SECTION_ALIGN_UP ((resource_size (res) + - offset) /PAGE_SIZE );if (le64_to_cpu (nd_pfn->pfn_sb->npfns) > nd_pfn->npfns) dev_info(&nd_pfn->dev, "number of pfns truncated from %lld to %ld\n",
@@ -625,7 +626,8 @@ static int nd_pfn_init(struct nd_pfn *nd_pfn)*/ start += start_pad; size =resource_size (&nsio->res); - npfns = (size - start_pad - end_trunc -SZ_8K ) /SZ_4K ; + npfns =PFN_SECTION_ALIGN_UP ((size - start_pad - end_trunc -SZ_8K ) + /PAGE_SIZE );if (nd_pfn->mode ==PFN_MODE_PMEM ) {/* * vmemmap_populate_hugepages() allocates the memmap array in
drivers/nvdimm/pmem.c +25 -12
@@ -388,12 +388,12 @@ static void nd_pmem_shutdown(struct device *dev)static void nd_pmem_notify (struct device *dev,enum nvdimm_event event) { -struct pmem_device *pmem =dev_get_drvdata (dev); -struct nd_region *nd_region =to_region (pmem); +struct nd_region *nd_region;resource_size_t offset =0 , end_trunc =0 ;struct nd_namespace_common *ndns;struct nd_namespace_io *nsio;struct resource res; +struct badblocks *bb;if (event !=NVDIMM_REVALIDATE_POISON )return ;
@@ -402,20 +402,33 @@ static void nd_pmem_notify(struct device *dev, enum nvdimm_event event)struct nd_btt *nd_btt =to_nd_btt (dev); ndns = nd_btt->ndns; - }else if (is_nd_pfn (dev)) { -struct nd_pfn *nd_pfn =to_nd_pfn (dev); -struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; + nd_region =to_nd_region (ndns->dev.parent); + nsio =to_nd_namespace_io (&ndns->dev); + bb = &nsio->bb; + }else { +struct pmem_device *pmem =dev_get_drvdata (dev); - ndns = nd_pfn->ndns; - offset = pmem->data_offset +__le32_to_cpu (pfn_sb->start_pad); - end_trunc =__le32_to_cpu (pfn_sb->end_trunc); - }else - ndns =to_ndns (dev); + nd_region =to_region (pmem); + bb = &pmem->bb; + +if (is_nd_pfn (dev)) { +struct nd_pfn *nd_pfn =to_nd_pfn (dev); +struct nd_pfn_sb *pfn_sb = nd_pfn->pfn_sb; + + ndns = nd_pfn->ndns; + offset = pmem->data_offset + +__le32_to_cpu (pfn_sb->start_pad); + end_trunc =__le32_to_cpu (pfn_sb->end_trunc); + }else { + ndns =to_ndns (dev); + } + + nsio =to_nd_namespace_io (&ndns->dev); + } - nsio =to_nd_namespace_io (&ndns->dev); res.start = nsio->res.start + offset; res.end = nsio->res.end - end_trunc; -nvdimm_badblocks_populate (nd_region, &pmem->bb, &res); +nvdimm_badblocks_populate (nd_region, bb, &res); }MODULE_ALIAS ("pmem" );
drivers/nvdimm/region_devs.c +7 -4
@@ -968,17 +968,20 @@ EXPORT_SYMBOL_GPL(nvdimm_flush);*/ int nvdimm_has_flush (struct nd_region *nd_region) { -struct nd_region_data *ndrd =dev_get_drvdata (&nd_region->dev);int i;/* no nvdimm == flushing capability unknown */ if (nd_region->ndr_mappings ==0 )return -ENXIO ; -for (i =0 ; i < nd_region->ndr_mappings; i++) -/* flush hints present, flushing required */ -if (ndrd_get_flush_wpq (ndrd, i,0 )) +for (i =0 ; i < nd_region->ndr_mappings; i++) { +struct nd_mapping *nd_mapping = &nd_region->mapping[i]; +struct nvdimm *nvdimm = nd_mapping->nvdimm; + +/* flush hints present / available */ +if (nvdimm->num_flush)return 1 ; + }/* * The platform defines dimm devices without hints, assume
drivers/staging/comedi/drivers/jr3_pci.c +7 -6
@@ -611,7 +611,7 @@ static void jr3_pci_poll_dev(unsigned long data) s = &dev->subdevices[i]; spriv = s->private; -if (now > spriv->next_time_min) { +if (time_after_eq (now, spriv->next_time_min)) {struct jr3_pci_poll_delay sub_delay; sub_delay =jr3_pci_poll_subdevice (s);
@@ -727,11 +727,12 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, s->insn_read = jr3_pci_ai_insn_read; spriv =jr3_pci_alloc_spriv (dev, s); -if (spriv) { -/* Channel specific range and maxdata */ - s->range_table_list = spriv->range_table_list; - s->maxdata_list = spriv->maxdata_list; - } +if (!spriv) +return -ENOMEM ; + +/* Channel specific range and maxdata */ + s->range_table_list = spriv->range_table_list; + s->maxdata_list = spriv->maxdata_list; }/* Reset DSP card */
drivers/staging/gdm724x/gdm_mux.c +1 -2
@@ -664,9 +664,8 @@ static int __init gdm_usb_mux_init(void) static void __exit gdm_usb_mux_exit(void) { -unregister_lte_tty_driver (); -usb_deregister (&gdm_mux_driver); +unregister_lte_tty_driver (); }module_init (gdm_usb_mux_init);
drivers/staging/media/lirc/lirc_sir.c +9 -11
@@ -227,6 +227,7 @@ static int init_chrdev(void)if (!rcdev)return -ENOMEM ; + rcdev->input_name ="SIR IrDA port" ; rcdev->input_phys =KBUILD_MODNAME "/input0" ; rcdev->input_id.bustype =BUS_HOST ; rcdev->input_id.vendor =0x0001 ;
@@ -234,6 +235,7 @@ static int init_chrdev(void) rcdev->input_id.version =0x0100 ; rcdev->tx_ir = sir_tx_ir; rcdev->allowed_protocols =RC_BIT_ALL_IR_DECODER ; + rcdev->driver_name =KBUILD_MODNAME ; rcdev->map_name =RC_MAP_RC6_MCE ; rcdev->timeout =IR_DEFAULT_TIMEOUT ; rcdev->dev.parent = &sir_ir_dev->dev;
@@ -740,7 +742,13 @@ static int init_sir_ir(void)static int sir_ir_probe (struct platform_device *dev) { -return 0 ; +int retval; + + retval =init_chrdev (); +if (retval <0 ) +return retval; + +return init_sir_ir (); }static int sir_ir_remove (struct platform_device *dev)
@@ -780,18 +788,8 @@ static int __init sir_ir_init(void) goto pdev_add_fail; } - retval =init_chrdev (); -if (retval <0 ) - goto fail; - - retval =init_sir_ir (); -if (retval) - goto fail; -return 0 ; -fail: -platform_device_del (sir_ir_dev); pdev_add_fail:platform_device_put (sir_ir_dev); pdev_alloc_fail:
drivers/staging/vt6656/usbpipe.c +27 -4
@@ -47,15 +47,25 @@ int vnt_control_out(struct vnt_private *priv, u8 request, u16 value, u16 index, u16 length, u8 *buffer) { int status = 0; +u8 *usb_buffer;if (test_bit (DEVICE_FLAGS_DISCONNECTED , &priv->flags))return STATUS_FAILURE ;mutex_lock (&priv->usb_lock); + usb_buffer =kmemdup (buffer, length,GFP_KERNEL ); +if (!usb_buffer) { +mutex_unlock (&priv->usb_lock); +return -ENOMEM ; + } + status =usb_control_msg (priv->usb, -usb_sndctrlpipe (priv->usb,0 ), request,0x40 , value, - index, buffer, length,USB_CTL_WAIT ); +usb_sndctrlpipe (priv->usb,0 ), + request,0x40 , value, + index, usb_buffer, length,USB_CTL_WAIT ); + +kfree (usb_buffer);mutex_unlock (&priv->usb_lock);
@@ -75,15 +85,28 @@ int vnt_control_in(struct vnt_private *priv, u8 request, u16 value, u16 index, u16 length, u8 *buffer) { int status; +u8 *usb_buffer;if (test_bit (DEVICE_FLAGS_DISCONNECTED , &priv->flags))return STATUS_FAILURE ;mutex_lock (&priv->usb_lock); + usb_buffer =kmalloc (length,GFP_KERNEL ); +if (!usb_buffer) { +mutex_unlock (&priv->usb_lock); +return -ENOMEM ; + } + status =usb_control_msg (priv->usb, -usb_rcvctrlpipe (priv->usb,0 ), request,0xc0 , value, - index, buffer, length,USB_CTL_WAIT ); +usb_rcvctrlpipe (priv->usb,0 ), + request,0xc0 , value, + index, usb_buffer, length,USB_CTL_WAIT ); + +if (status == length) +memcpy (buffer, usb_buffer, length); + +kfree (usb_buffer);mutex_unlock (&priv->usb_lock);
drivers/staging/wilc1000/linux_wlan.c +2 -1
@@ -1251,11 +1251,12 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,else strcpy (ndev->name,"p2p%d" ); - vif->idx = wl->vif_num; vif->wilc = *wilc; vif->ndev = ndev; wl->vif[i] = vif; wl->vif_num = i; + vif->idx = wl->vif_num; + ndev->netdev_ops = &wilc_netdev_ops; {
drivers/target/iscsi/iscsi_target.c +1 -0
@@ -4683,6 +4683,7 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)continue ; }atomic_set (&sess->session_reinstatement,1 ); +atomic_set (&sess->session_fall_back_to_erl0,1 );spin_unlock (&sess->conn_lock);list_move_tail (&se_sess->sess_list, &free_list);
drivers/target/iscsi/iscsi_target_configfs.c +1 -0
@@ -1528,6 +1528,7 @@ static void lio_tpg_close_session(struct se_session *se_sess)return ; }atomic_set (&sess->session_reinstatement,1 ); +atomic_set (&sess->session_fall_back_to_erl0,1 );spin_unlock (&sess->conn_lock);iscsit_stop_time2retain_timer (sess);
drivers/target/iscsi/iscsi_target_login.c +1 -0
@@ -208,6 +208,7 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn) initiatorname_param->value) && (sess_p->sess_ops->SessionType == sessiontype))) {atomic_set (&sess_p->session_reinstatement,1 ); +atomic_set (&sess_p->session_fall_back_to_erl0,1 );spin_unlock (&sess_p->conn_lock);iscsit_inc_session_usage_count (sess_p);iscsit_stop_time2retain_timer (sess_p);
drivers/target/target_core_file.c +1 -2
@@ -595,8 +595,7 @@ fd_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,if (ret <0 )return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; -if (ret) -target_complete_cmd (cmd,SAM_STAT_GOOD ); +target_complete_cmd (cmd,SAM_STAT_GOOD );return 0 ; }
drivers/target/target_core_sbc.c +4 -1
@@ -507,8 +507,11 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd, bool succes* been failed with a non-zero SCSI status. */ if (cmd->scsi_status) { -pr_err ("compare_and_write_callback: non zero scsi_status:" +pr_debug ("compare_and_write_callback: non zero scsi_status:" " 0x%02x\n" , cmd->scsi_status); + *post_ret =1 ; +if (cmd->scsi_status ==SAM_STAT_CHECK_CONDITION ) + ret =TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE ; goto out; }
drivers/tty/pty.c +1 -6
@@ -216,16 +216,11 @@ static int pty_signal(struct tty_struct *tty, int sig)static void pty_flush_buffer (struct tty_struct *tty) {struct tty_struct *to = tty->link; -struct tty_ldisc *ld;if (!to)return ; - ld =tty_ldisc_ref (to); -tty_buffer_flush (to, ld); -if (ld) -tty_ldisc_deref (ld); - +tty_buffer_flush (to,NULL );if (to->packet) {spin_lock_irq (&tty->ctrl_lock); tty->ctrl_status |=TIOCPKT_FLUSHWRITE ;
drivers/tty/serial/amba-pl011.c +23 -8
@@ -2470,19 +2470,34 @@ static int __init pl011_early_console_setup(struct earlycon_device *device,if (!device->port.membase)return -ENODEV ; -/* On QDF2400 SOCs affected by Erratum 44, the "qdf2400_e44" must -* also be specified, e.g. "earlycon=pl011,<address>,qdf2400_e44". -*/ -if (!strcmp (device->options,"qdf2400_e44" )) - device->con->write = qdf2400_e44_early_write; -else - device->con->write = pl011_early_write; + device->con->write = pl011_early_write; return 0; }OF_EARLYCON_DECLARE (pl011,"arm,pl011" , pl011_early_console_setup);OF_EARLYCON_DECLARE (pl011,"arm,sbsa-uart" , pl011_early_console_setup); -EARLYCON_DECLARE (qdf2400_e44, pl011_early_console_setup); + +/* +* On Qualcomm Datacenter Technologies QDF2400 SOCs affected by +* Erratum 44, traditional earlycon can be enabled by specifying +* "earlycon=qdf2400_e44,<address>". Any options are ignored. +* +* Alternatively, you can just specify "earlycon", and the early console +* will be enabled with the information from the SPCR table. In this +* case, the SPCR code will detect the need for the E44 work-around, +* and set the console name to "qdf2400_e44". +*/ +static int __init +qdf2400_e44_early_console_setup (struct earlycon_device *device, +const char *opt) +{ +if (!device->port.membase) +return -ENODEV ; + + device->con->write = qdf2400_e44_early_write; +return 0 ; +} +EARLYCON_DECLARE (qdf2400_e44, qdf2400_e44_early_console_setup);#else #define AMBA_CONSOLE NULL
drivers/tty/serial/omap-serial.c +7 -2
@@ -1767,7 +1767,8 @@ static int serial_omap_probe(struct platform_device *pdev)return 0 ; err_add_port: -pm_runtime_put (&pdev->dev); +pm_runtime_dont_use_autosuspend (&pdev->dev); +pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);pm_qos_remove_request (&up->pm_qos_request);device_init_wakeup (up->dev, false);
@@ -1780,9 +1781,13 @@ static int serial_omap_remove(struct platform_device *dev) {struct uart_omap_port *up =platform_get_drvdata (dev); +pm_runtime_get_sync (up->dev); + +uart_remove_one_port (&serial_omap_reg, &up->port); + +pm_runtime_dont_use_autosuspend (up->dev);pm_runtime_put_sync (up->dev);pm_runtime_disable (up->dev); -uart_remove_one_port (&serial_omap_reg, &up->port);pm_qos_remove_request (&up->pm_qos_request);device_init_wakeup (&dev->dev, false);
drivers/tty/serial/samsung.c +28 -11
@@ -860,6 +860,7 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p) {struct s3c24xx_uart_dma *dma = p->dma;unsigned long flags; +int ret;/* Default slave configuration parameters */ dma->rx_conf.direction =DMA_DEV_TO_MEM ;
@@ -884,8 +885,8 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p) dma->tx_chan =dma_request_chan (p->port.dev,"tx" );if (IS_ERR (dma->tx_chan)) { -dma_release_channel (dma->rx_chan); -return PTR_ERR (dma->tx_chan); + ret =PTR_ERR (dma->tx_chan); + goto err_release_rx; }dmaengine_slave_config (dma->tx_chan, &dma->tx_conf);
@@ -894,26 +895,42 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p) dma->rx_size =PAGE_SIZE ; dma->rx_buf =kmalloc (dma->rx_size,GFP_KERNEL ); -if (!dma->rx_buf) { -dma_release_channel (dma->rx_chan); -dma_release_channel (dma->tx_chan); -return -ENOMEM ; + ret = -ENOMEM ; + goto err_release_tx; } - dma->rx_addr =dma_map_single (dma->rx_chan->device->dev, dma->rx_buf, + dma->rx_addr =dma_map_single (p->port.dev, dma->rx_buf, dma->rx_size,DMA_FROM_DEVICE ); +if (dma_mapping_error (p->port.dev, dma->rx_addr)) { + ret = -EIO ; + goto err_free_rx; + }spin_lock_irqsave (&p->port.lock, flags);/* TX buffer */ - dma->tx_addr =dma_map_single (dma->tx_chan->device->dev, - p->port.state->xmit.buf, + dma->tx_addr =dma_map_single (p->port.dev, p->port.state->xmit.buf,UART_XMIT_SIZE ,DMA_TO_DEVICE );spin_unlock_irqrestore (&p->port.lock, flags); +if (dma_mapping_error (p->port.dev, dma->tx_addr)) { + ret = -EIO ; + goto err_unmap_rx; + }return 0 ; + +err_unmap_rx: +dma_unmap_single (p->port.dev, dma->rx_addr, dma->rx_size, +DMA_FROM_DEVICE ); +err_free_rx: +kfree (dma->rx_buf); +err_release_tx: +dma_release_channel (dma->tx_chan); +err_release_rx: +dma_release_channel (dma->rx_chan); +return ret; }static void s3c24xx_serial_release_dma (struct s3c24xx_uart_port *p)
@@ -922,7 +939,7 @@ static void s3c24xx_serial_release_dma(struct s3c24xx_uart_port *p)if (dma->rx_chan) {dmaengine_terminate_all (dma->rx_chan); -dma_unmap_single (dma->rx_chan->device->dev, dma->rx_addr, +dma_unmap_single (p->port.dev, dma->rx_addr, dma->rx_size,DMA_FROM_DEVICE );kfree (dma->rx_buf);dma_release_channel (dma->rx_chan);
@@ -931,7 +948,7 @@ static void s3c24xx_serial_release_dma(struct s3c24xx_uart_port *p)if (dma->tx_chan) {dmaengine_terminate_all (dma->tx_chan); -dma_unmap_single (dma->tx_chan->device->dev, dma->tx_addr, +dma_unmap_single (p->port.dev, dma->tx_addr,UART_XMIT_SIZE ,DMA_TO_DEVICE );dma_release_channel (dma->tx_chan); dma->tx_chan =NULL ;
drivers/usb/class/cdc-wdm.c +4 -99
157 lines not on this page · raw message
drivers/usb/core/driver.c +21 -0
@@ -1331,6 +1331,24 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)*/ if (udev->parent && !PMSG_IS_AUTO (msg)) status =0 ; + +/* +* If the device is inaccessible, don't try to resume +* suspended interfaces and just return the error. +*/ +if (status && status != -EBUSY ) { +int err; +u16 devstat; + + err =usb_get_status (udev,USB_RECIP_DEVICE ,0 , + &devstat); +if (err) { +dev_err (&udev->dev, +"Failed to suspend device, error %d\n" , + status); + goto done; + } + } }/* If the suspend failed, resume interfaces that did get suspended */
@@ -1763,6 +1781,9 @@ static int autosuspend_check(struct usb_device *udev)int w, i;struct usb_interface *intf; +if (udev->state ==USB_STATE_NOTATTACHED ) +return -ENODEV ; +/* Fail if autosuspend is disabled, or any interfaces are in use, or * any interface drivers require remote wakeup but it isn't available. */
drivers/usb/core/file.c +7 -2
@@ -29,6 +29,7 @@#define MAX_USB_MINORS 256static const struct file_operations *usb_minors[MAX_USB_MINORS ];static DECLARE_RWSEM (minor_rwsem); +static DEFINE_MUTEX (init_usb_class_mutex);static int usb_open (struct inode *inode,struct file *file) {
@@ -111,8 +112,9 @@ static void release_usb_class(struct kref *kref)static void destroy_usb_class (void ) { -if (usb_class) -kref_put (&usb_class->kref, release_usb_class); +mutex_lock (&init_usb_class_mutex); +kref_put (&usb_class->kref, release_usb_class); +mutex_unlock (&init_usb_class_mutex); }int usb_major_init (void )
@@ -173,7 +175,10 @@ int usb_register_dev(struct usb_interface *intf,if (intf->minor >=0 )return -EADDRINUSE ; +mutex_lock (&init_usb_class_mutex); retval =init_usb_class (); +mutex_unlock (&init_usb_class_mutex); +if (retval)return retval;
drivers/usb/core/hub.c +10 -1
@@ -1066,6 +1066,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) portstatus = portchange =0 ; status =hub_port_status (hub, port1, &portstatus, &portchange); +if (status) + goto abort; +if (udev || (portstatus &USB_PORT_STAT_CONNECTION ))dev_dbg (&port_dev->dev,"status %04x change %04x\n" , portstatus, portchange);
@@ -1198,7 +1201,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Scan all ports that need attention */ kick_hub_wq (hub); - + abort:if (type ==HUB_INIT2 || type ==HUB_INIT3 ) {/* Allow autosuspend if it was suppressed */ disconnected:
@@ -2084,6 +2087,12 @@ void usb_disconnect(struct usb_device **pdev)dev_info (&udev->dev,"USB disconnect, device number %d\n" , udev->devnum); +/* +* Ensure that the pm runtime code knows that the USB device +* is in the process of being disconnected. +*/ +pm_runtime_barrier (&udev->dev); +usb_lock_device (udev);hub_disconnect_children (udev);
drivers/usb/gadget/Kconfig +1 -0
@@ -460,6 +460,7 @@ config USB_CONFIGFS_F_TCM choice tristate "USB Gadget Drivers" default USB_ETH + optional help A Linux "Gadget Driver" talks to the USB Peripheral Controller driver through the abstract "gadget" API. Some other operating
drivers/usb/host/xhci-mem.c +12 -1
@@ -1502,6 +1502,17 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,*/ max_esit_payload =xhci_get_max_esit_payload (udev, ep); interval =xhci_get_endpoint_interval (udev, ep); + +/* Periodic endpoint bInterval limit quirk */ +if (usb_endpoint_xfer_int (&ep->desc) || +usb_endpoint_xfer_isoc (&ep->desc)) { +if ((xhci->quirks &XHCI_LIMIT_ENDPOINT_INTERVAL_7 ) && + udev->speed >=USB_SPEED_HIGH && + interval >=7 ) { + interval =6 ; + } + } + mult =xhci_get_endpoint_mult (udev, ep); max_packet =usb_endpoint_maxp (&ep->desc); max_burst =xhci_get_endpoint_max_burst (udev, ep);
@@ -2480,7 +2491,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) (xhci->cmd_ring->first_seg->dma & (u64 ) ~CMD_RING_RSVD_BITS ) | xhci->cmd_ring->cycle_state;xhci_dbg_trace (xhci, trace_xhci_dbg_init, -"// Setting command ring address to 0x%x" , val); +"// Setting command ring address to 0x%016llx" , val_64);xhci_write_64 (xhci, val_64, &xhci->op_regs->cmd_ring);xhci_dbg_cmd_ptrs (xhci);
drivers/usb/host/xhci-pci.c +3 -0
@@ -199,6 +199,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == 0x1042) xhci->quirks |=XHCI_BROKEN_STREAMS ; +if (pdev->vendor ==PCI_VENDOR_ID_TI && pdev->device ==0x8241 ) + xhci->quirks |=XHCI_LIMIT_ENDPOINT_INTERVAL_7 ; +if (xhci->quirks &XHCI_RESET_ON_RESUME )xhci_dbg_trace (xhci, trace_xhci_dbg_quirks,"QUIRK: Resetting on resume" );
drivers/usb/host/xhci.h +1 -0
@@ -1818,6 +1818,7 @@ struct xhci_hcd {#define XHCI_MISSING_CAS (1 << 24)/* For controller with a broken Port Disable implementation */ #define XHCI_BROKEN_PORT_PED (1 << 25) +#define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)unsigned int num_active_eps;unsigned int limit_active_eps;
drivers/usb/misc/usbtest.c +1 -0
@@ -159,6 +159,7 @@ get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf)case USB_ENDPOINT_XFER_INT :if (dev->info->intr) goto try_intr; +continue ;case USB_ENDPOINT_XFER_ISOC :if (dev->info->iso) goto try_iso;
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -873,6 +873,7 @@ static const struct usb_device_id id_table_combined[] = { {USB_DEVICE_AND_INTERFACE_INFO (MICROCHIP_VID ,MICROCHIP_USB_BOARD_PID ,USB_CLASS_VENDOR_SPEC , USB_SUBCLASS_VENDOR_SPEC, 0x00) }, + { USB_DEVICE_INTERFACE_NUMBER(ACTEL_VID, MICROSEMI_ARROW_SF2PLUS_BOARD_PID, 2) }, { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
drivers/usb/serial/ftdi_sio_ids.h +6 -0
@@ -873,6 +873,12 @@#define FIC_VID 0x1457#define FIC_NEO1973_DEBUG_PID 0x5118 +/* +* Actel / Microsemi +*/ +#define ACTEL_VID 0x1514 +#define MICROSEMI_ARROW_SF2PLUS_BOARD_PID 0x2008 +/* Olimex */ #define OLIMEX_VID 0x15BA#define OLIMEX_ARM_USB_OCD_PID 0x0003
drivers/vfio/vfio_iommu_type1.c +51 -59
185 lines not on this page · raw message
fs/block_dev.c +5 -6
@@ -103,12 +103,11 @@ void invalidate_bdev(struct block_device *bdev) {struct address_space *mapping = bdev->bd_inode->i_mapping; -if (mapping->nrpages ==0 ) -return ; - -invalidate_bh_lrus (); -lru_add_drain_all ();/* make sure all lru add caches are flushed */ -invalidate_mapping_pages (mapping,0 ,-1 ); +if (mapping->nrpages) { +invalidate_bh_lrus (); +lru_add_drain_all ();/* make sure all lru add caches are flushed */ +invalidate_mapping_pages (mapping,0 ,-1 ); + }/* 99% of the time, we don't need to flush the cleancache on the bdev. * But, for the strange corners, lets be cautious */
fs/ceph/xattr.c +3 -0
@@ -392,6 +392,7 @@ static int __set_xattr(struct ceph_inode_info *ci,if (update_xattr) {int err =0 ; +if (xattr && (flags &XATTR_CREATE )) err = -EEXIST ;else if (!xattr && (flags &XATTR_REPLACE ))
@@ -399,12 +400,14 @@ static int __set_xattr(struct ceph_inode_info *ci,if (err) {kfree (name);kfree (val); +kfree (*newxattr);return err; }if (update_xattr <0 ) {if (xattr)__remove_xattr (ci, xattr);kfree (name); +kfree (*newxattr);return 0 ; } }
fs/cifs/cifs_unicode.c +6 -0
@@ -83,6 +83,9 @@ convert_sfm_char(const __u16 src_char, char *target)case SFM_COLON : *target =':' ;break ; +case SFM_DOUBLEQUOTE : + *target ='"' ; +break ;case SFM_ASTERISK : *target ='*' ;break ;
@@ -418,6 +421,9 @@ static __le16 convert_to_sfm_char(char src_char, bool end_of_string)case ':' : dest_char =cpu_to_le16 (SFM_COLON );break ; +case '"' : + dest_char =cpu_to_le16 (SFM_DOUBLEQUOTE ); +break ;case '*' : dest_char =cpu_to_le16 (SFM_ASTERISK );break ;
fs/cifs/cifs_unicode.h +3 -2
@@ -57,6 +57,7 @@* not conflict (although almost does) with the mapping above. */ +#define SFM_DOUBLEQUOTE ((__u16) 0xF020)#define SFM_ASTERISK ((__u16) 0xF021)#define SFM_QUESTION ((__u16) 0xF025)#define SFM_COLON ((__u16) 0xF022)
@@ -64,8 +65,8 @@#define SFM_LESSTHAN ((__u16) 0xF023)#define SFM_PIPE ((__u16) 0xF027)#define SFM_SLASH ((__u16) 0xF026) -#define SFM_PERIOD ((__u16) 0xF028) -#define SFM_SPACE ((__u16) 0xF029) +#define SFM_SPACE ((__u16) 0xF028) +#define SFM_PERIOD ((__u16) 0xF029)/* * Mapping mechanism to use when one of the seven reserved characters is
fs/cifs/cifsfs.c +13 -2
@@ -87,6 +87,7 @@ extern mempool_t *cifs_req_poolp;extern mempool_t *cifs_mid_poolp;struct workqueue_struct *cifsiod_wq; +struct workqueue_struct *cifsoplockd_wq;__u32 cifs_lock_secret;/*
@@ -1369,9 +1370,16 @@ init_cifs(void) goto out_clean_proc; } + cifsoplockd_wq =alloc_workqueue ("cifsoplockd" , +WQ_FREEZABLE |WQ_MEM_RECLAIM ,0 ); +if (!cifsoplockd_wq) { + rc = -ENOMEM ; + goto out_destroy_cifsiod_wq; + } + rc =cifs_fscache_register ();if (rc) - goto out_destroy_wq; + goto out_destroy_cifsoplockd_wq; rc =cifs_init_inodecache ();if (rc)
@@ -1419,7 +1427,9 @@ init_cifs(void)cifs_destroy_inodecache (); out_unreg_fscache:cifs_fscache_unregister (); -out_destroy_wq: +out_destroy_cifsoplockd_wq: +destroy_workqueue (cifsoplockd_wq); +out_destroy_cifsiod_wq:destroy_workqueue (cifsiod_wq); out_clean_proc:cifs_proc_clean ();
@@ -1442,6 +1452,7 @@ exit_cifs(void)cifs_destroy_mids ();cifs_destroy_inodecache ();cifs_fscache_unregister (); +destroy_workqueue (cifsoplockd_wq);destroy_workqueue (cifsiod_wq);cifs_proc_clean (); }
fs/cifs/cifsglob.h +1 -0
@@ -1683,6 +1683,7 @@ void cifs_oplock_break(struct work_struct *work);extern const struct slow_work_ops cifs_oplock_break_ops;extern struct workqueue_struct *cifsiod_wq; +extern struct workqueue_struct *cifsoplockd_wq;extern __u32 cifs_lock_secret;extern mempool_t *cifs_mid_poolp;
fs/cifs/cifssmb.c +3 -0
@@ -718,6 +718,9 @@ CIFSSMBEcho(struct TCP_Server_Info *server)if (rc)return rc; +if (server->capabilities &CAP_UNICODE ) + smb->hdr.Flags2 |=SMBFLG2_UNICODE ; +/* set up echo request */ smb->hdr.Tid =0xffff ; smb->hdr.WordCount =1 ;
fs/cifs/connect.c +6 -8
@@ -2912,16 +2912,14 @@ match_prepath(struct super_block *sb, struct cifs_mnt_data *mnt_data) {struct cifs_sb_info *old =CIFS_SB (sb);struct cifs_sb_info *new = mnt_data->cifs_sb; +bool old_set = old->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH ; +bool new_set = new->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH ; -if (old->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH ) { -if (!(new->mnt_cifs_flags &CIFS_MOUNT_USE_PREFIX_PATH )) -return 0 ; -/* The prepath should be null terminated strings */ -if (strcmp (new->prepath, old->prepath)) -return 0 ; - +if (old_set && new_set && !strcmp (new->prepath, old->prepath))return 1 ; - } +else if (!old_set && !new_set) +return 1 ; +return 0 ; }
fs/cifs/ioctl.c +6 -1
@@ -74,7 +74,8 @@ static long cifs_ioctl_copychunk(unsigned int xid, struct file *dst_file, rc =cifs_file_copychunk_range (xid, src_file.file,0 , dst_file,0 , src_inode->i_size,0 ); - +if (rc >0 ) + rc =0 ; out_fput:fdput (src_file); out_drop_write:
@@ -208,10 +209,14 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) rc = -EOPNOTSUPP ;break ;case CIFS_IOC_GET_MNT_INFO : +if (pSMBFile ==NULL ) +break ; tcon =tlink_tcon (pSMBFile->tlink); rc =smb_mnt_get_fsinfo (xid, tcon, (void __user *)arg);break ;case CIFS_ENUMERATE_SNAPSHOTS : +if (pSMBFile ==NULL ) +break ;if (arg ==0 ) { rc = -EINVAL ; goto cifs_ioc_exit;
fs/cifs/misc.c +1 -1
@@ -492,7 +492,7 @@ is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv)CIFS_INODE_DOWNGRADE_OPLOCK_TO_L2 , &pCifsInode->flags); -queue_work (cifsiod_wq, +queue_work (cifsoplockd_wq, &netfile->oplock_break); netfile->oplock_break_cancelled = false;
fs/cifs/smb2misc.c +3 -2
@@ -499,7 +499,7 @@ smb2_tcon_has_lease(struct cifs_tcon *tcon, struct smb2_lease_break *rsp,else cfile->oplock_break_cancelled = true; -queue_work (cifsiod_wq, &cfile->oplock_break); +queue_work (cifsoplockd_wq, &cfile->oplock_break);kfree (lw);return true; }
@@ -643,7 +643,8 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)CIFS_INODE_DOWNGRADE_OPLOCK_TO_L2 , &cinode->flags);spin_unlock (&cfile->file_info_lock); -queue_work (cifsiod_wq, &cfile->oplock_break); +queue_work (cifsoplockd_wq, + &cfile->oplock_break);spin_unlock (&tcon->open_file_lock);spin_unlock (&cifs_tcp_ses_lock);
fs/cifs/smb2ops.c +1 -0
@@ -942,6 +942,7 @@ smb3_enum_snapshots(const unsigned int xid, struct cifs_tcon *tcon, }if (snapshot_in.snapshot_array_size <sizeof (struct smb_snapshot_array )) { rc = -ERANGE ; +kfree (retbuf);return rc; }
fs/cifs/smb2pdu.c +11 -3
@@ -632,8 +632,12 @@ int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) }if (rsplen !=sizeof (struct validate_negotiate_info_rsp )) { -cifs_dbg (VFS ,"invalid size of protocol negotiate response\n" ); -return -EIO ; +cifs_dbg (VFS ,"invalid protocol negotiate response size: %d\n" , + rsplen); + +/* relax check since Mac returns max bufsize allowed on ioctl */ +if (rsplen > CIFSMaxBufSize) +return -EIO ; }/* check validate negotiate info response matches what we got earlier */
@@ -1853,8 +1857,12 @@ SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid,* than one credit. Windows typically sets this smaller, but for some * ioctls it may be useful to allow server to send more. No point * limiting what the server can send as long as fits in one credit +* Unfortunately - we can not handle more than CIFS_MAX_MSG_SIZE +* (by default, note that it can be overridden to make max larger) +* in responses (except for read responses which can be bigger. +* We may want to bump this limit up */ - req->MaxOutputResponse =cpu_to_le32 (0xFF00 );/* < 64K uses 1 credit */ + req->MaxOutputResponse =cpu_to_le32 (CIFSMaxBufSize);if (is_fsctl) req->Flags =cpu_to_le32 (SMB2_0_IOCTL_IS_FSCTL );
fs/crypto/fname.c +1 -1
@@ -300,7 +300,7 @@ int fscrypt_fname_disk_to_usr(struct inode *inode, }else {memset (buf,0 ,8 ); } -memcpy (buf +8 , iname->name + iname->len -16 ,16 ); +memcpy (buf +8 , iname->name + ((iname->len -17 ) & ~15 ),16 ); oname->name[0 ] ='_' ; oname->len =1 +digest_encode (buf,24 , oname->name +1 );return 0 ;
fs/crypto/policy.c +68 -19
112 lines not on this page · raw message
fs/dax.c +15 -44
28 lines not on this page · raw message
fs/f2fs/dir.c +27 -23
50 lines not on this page · raw message
include/linux/memcontrol.h +61 -3
64 lines not on this page · raw message
mm/vmscan.c +74 -20
94 lines not on this page · raw message
tools/perf/arch/s390/annotate/instructions.c new file +30 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/ldt_gdt.c +46 -0
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.