Linux 4.9.29
Greg KH
maintainerI'm announcing the release of the 4.9.29 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/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/x86.c | 12 ++ 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/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/dax/dax.c | 15 +- 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-era-target.c | 8 - drivers/md/dm-rq.c | 6 - drivers/md/dm-thin.c | 1 drivers/nvdimm/pfn_devs.c | 6 - 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/vt6656/usbpipe.c | 31 ++++- 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/omap-serial.c | 9 + drivers/tty/serial/samsung.c | 9 - 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 | 102 +++++++---------- 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 | 4 fs/cifs/misc.c | 2 fs/cifs/smb2misc.c | 5 fs/cifs/smb2ops.c | 1 fs/cifs/smb2pdu.c | 14 +- fs/crypto/policy.c | 87 +++++++++++--- fs/ext4/inode.c | 5 fs/orangefs/inode.c | 3 fs/orangefs/namei.c | 2 fs/orangefs/xattr.c | 26 +--- fs/pstore/platform.c | 10 + fs/xattr.c | 2 kernel/padata.c | 2 mm/page_alloc.c | 3 net/bluetooth/hci_sock.c | 3 net/core/datagram.c | 13 +- tools/perf/util/auxtrace.c | 4 tools/testing/selftests/x86/ldt_gdt.c | 46 +++++++ 87 files changed, 865 insertions(+), 443 deletions(-)
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
Andrew Jones (1):
KVM: arm/arm64: fix races in kvm_psci_vcpu_on
Andrey Ryabinin (1):
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"
Dan Williams (3):
device-dax: fix cdev leak
libnvdimm, region: fix flush hint detection crash 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 (2):
ext4: evict inline data when writing to memory map
fscrypt: fix context consistency check when key(s) unavailable
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.9.29
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
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
Juergen Gross (1):
xen: adjust early dom0 p2m handling to xen hypervisor behavior
Kees Cook (1):
pstore: Shut down worker when unregistering
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 (1):
serial: samsung: Use right device for DMA-mapping calls
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
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
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
Sachin Prabhu (1):
Fix match_prepath()
Shamir Rabinovitch (1):
IB/IPoIB: ibX: failed to create mcg debug file
Somasundaram Krishnasamy (1):
dm era: save spacemap metadata root after the pre-commit
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
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 = 9 -SUBLEVEL = 28 +SUBLEVEL = 29 EXTRAVERSION = NAME = Roaring Lionus
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
@@ -1573,8 +1573,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;
@@ -1625,7 +1625,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;
@@ -1740,7 +1740,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
@@ -759,7 +759,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/x86.c +12 -0
@@ -3051,6 +3051,12 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu, (events->exception.nr > 31 || events->exception.nr == NMI_VECTOR))return -EINVAL ; +/* INITs are latched while in SMM */ +if (events->flags &KVM_VCPUEVENT_VALID_SMM && + (events->smi.smm || events->smi.pending) && + vcpu->arch.mp_state ==KVM_MP_STATE_INIT_RECEIVED ) +return -EINVAL ; +process_nmi (vcpu); vcpu->arch.exception.pending = events->exception.injected; vcpu->arch.exception.nr = events->exception.nr;
@@ -7162,6 +7168,12 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, mp_state->mp_state != KVM_MP_STATE_RUNNABLE)return -EINVAL ; +/* INITs are latched while in SMM */ +if ((is_smm (vcpu) || vcpu->arch.smi_pending) && + (mp_state->mp_state ==KVM_MP_STATE_SIPI_RECEIVED || + mp_state->mp_state ==KVM_MP_STATE_INIT_RECEIVED )) +return -EINVAL ; +if (mp_state->mp_state ==KVM_MP_STATE_SIPI_RECEIVED ) { vcpu->arch.mp_state =KVM_MP_STATE_INIT_RECEIVED ;set_bit (KVM_APIC_SIPI , &vcpu->arch.apic->pending_events);
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
@@ -2028,7 +2028,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) {
@@ -2049,7 +2050,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 );
@@ -2057,7 +2058,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
@@ -101,6 +101,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/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
@@ -892,6 +892,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);
@@ -900,6 +901,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 )/*
@@ -913,7 +915,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
@@ -333,7 +332,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/dax/dax.c +11 -4
@@ -553,13 +553,10 @@ static void dax_dev_release(struct device *dev)kfree (dax_dev); } -static void unregister_dax_dev (void *dev) +static void kill_dax_dev (struct dax_dev *dax_dev) { -struct dax_dev *dax_dev =to_dax_dev (dev);struct cdev *cdev = &dax_dev->cdev; -dev_dbg (dev,"%s\n" , __func__); -/* * Note, rcu is not protecting the liveness of dax_dev, rcu is * ensuring that any fault handlers that might have seen
@@ -571,6 +568,15 @@ static void unregister_dax_dev(void *dev)synchronize_srcu (&dax_srcu);unmap_mapping_range (dax_dev->inode->i_mapping,0 ,0 ,1 );cdev_del (cdev); +} + +static void unregister_dax_dev (void *dev) +{ +struct dax_dev *dax_dev =to_dax_dev (dev); + +dev_dbg (dev,"%s\n" , __func__); + +kill_dax_dev (dax_dev);device_unregister (dev); }
@@ -647,6 +653,7 @@ struct dax_dev *devm_create_dax_dev(struct dax_region *dax_region,dev_set_name (dev,"dax%d.%d" , dax_region->id, dax_dev->id); rc =device_add (dev);if (rc) { +kill_dax_dev (dax_dev);put_device (dev);return ERR_PTR (rc); }
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
@@ -1516,7 +1516,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);
@@ -1532,7 +1534,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.
@@ -833,23 +833,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;
@@ -917,8 +923,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);
@@ -931,11 +939,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.
@@ -1697,7 +1697,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.
@@ -372,7 +372,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
@@ -2926,6 +2926,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
@@ -87,8 +87,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))
@@ -109,7 +107,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-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
@@ -997,10 +997,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
@@ -1070,6 +1070,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/nvdimm/pfn_devs.c +4 -2
@@ -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
@@ -383,12 +383,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 ;
@@ -397,20 +397,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/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/target/iscsi/iscsi_target.c +1 -0
@@ -4671,6 +4671,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
@@ -1530,6 +1530,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
@@ -204,6 +204,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
@@ -594,8 +594,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
@@ -506,8 +506,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/omap-serial.c +7 -2
@@ -1712,7 +1712,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);
@@ -1725,9 +1726,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 +4 -5
@@ -906,14 +906,13 @@ static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p)return -ENOMEM ; } - 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 );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);
@@ -927,7 +926,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);
@@ -936,7 +935,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
@@ -1328,6 +1328,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 */
@@ -1760,6 +1778,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
@@ -27,6 +27,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) {
@@ -109,8 +110,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 )
@@ -171,7 +173,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
@@ -1064,6 +1064,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);
@@ -1196,7 +1199,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:
@@ -2082,6 +2085,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
@@ -1494,6 +1494,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 =GET_MAX_PACKET (usb_endpoint_maxp (&ep->desc)); max_burst =xhci_get_endpoint_max_burst (udev, ep);
@@ -2475,7 +2486,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
@@ -1659,6 +1659,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 +44 -58
152 lines not on this page · raw message
fs/block_dev.c +5 -6
@@ -102,12 +102,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;/*
@@ -1283,9 +1284,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)
@@ -1333,7 +1341,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 ();
@@ -1356,6 +1366,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
@@ -1651,6 +1651,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
@@ -717,6 +717,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
@@ -2839,16 +2839,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 +4 -0
@@ -264,10 +264,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
@@ -494,7 +494,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; }
@@ -638,7 +638,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
@@ -924,6 +924,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
@@ -569,8 +569,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 */
@@ -1670,8 +1674,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/policy.c +68 -19
112 lines not on this page · raw message
fs/ext4/inode.c +5 -0
@@ -5686,6 +5686,11 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)file_update_time (vma->vm_file);down_read (&EXT4_I (inode)->i_mmap_sem); + + ret =ext4_convert_inline_data (inode); +if (ret) + goto out_ret; +/* Delalloc case is easy... */ if (test_opt(inode->i_sb, DELALLOC) && !ext4_should_journal_data(inode) &&
fs/orangefs/inode.c +1 -2
@@ -223,8 +223,7 @@ int orangefs_setattr(struct dentry *dentry, struct iattr *iattr)if (ret) goto out; -if ((iattr->ia_valid &ATTR_SIZE ) && - iattr->ia_size !=i_size_read (inode)) { +if (iattr->ia_valid &ATTR_SIZE ) { ret =orangefs_setattr_size (inode, iattr);if (ret) goto out;
fs/orangefs/namei.c +0 -2
@@ -193,8 +193,6 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, goto out; } -ORANGEFS_I (inode)->getattr_time = jiffies -1 ; - gossip_debug(GOSSIP_NAME_DEBUG, "%s:%s:%d " "Found good inode [%lu] with count [%d]\n",
fs/orangefs/xattr.c +8 -18
@@ -76,11 +76,8 @@ ssize_t orangefs_inode_getxattr(struct inode *inode, const char *name,if (S_ISLNK (inode->i_mode))return -EOPNOTSUPP ; -if (strlen (name) >=ORANGEFS_MAX_XATTR_NAMELEN ) { -gossip_err ("Invalid key length (%d)\n" , - (int )strlen (name)); +if (strlen (name) >ORANGEFS_MAX_XATTR_NAMELEN )return -EINVAL ; - } fsuid =from_kuid (&init_user_ns,current_fsuid ()); fsgid =from_kgid (&init_user_ns,current_fsgid ());
@@ -172,6 +169,9 @@ static int orangefs_inode_removexattr(struct inode *inode, const char *name,struct orangefs_kernel_op_s *new_op =NULL ;int ret = -ENOMEM ; +if (strlen (name) >ORANGEFS_MAX_XATTR_NAMELEN ) +return -EINVAL ; +down_write (&orangefs_inode->xattr_sem); new_op =op_alloc (ORANGEFS_VFS_OP_REMOVEXATTR );if (!new_op)
@@ -231,23 +231,13 @@ int orangefs_inode_setxattr(struct inode *inode, const char *name,"%s: name %s, buffer_size %zd\n" , __func__, name, size); -if (size >=ORANGEFS_MAX_XATTR_VALUELEN || - flags <0 ) { -gossip_err ("orangefs_inode_setxattr: bogus values of size(%d), flags(%d)\n" , - (int )size, - flags); +if (size >ORANGEFS_MAX_XATTR_VALUELEN ) +return -EINVAL ; +if (strlen (name) >ORANGEFS_MAX_XATTR_NAMELEN )return -EINVAL ; - } internal_flag =convert_to_internal_xattr_flags (flags); -if (strlen (name) >=ORANGEFS_MAX_XATTR_NAMELEN ) { -gossip_err - ("orangefs_inode_setxattr: bogus key size (%d)\n" , - (int )(strlen (name))); -return -EINVAL ; - } -/* This is equivalent to a removexattr */ if (size ==0 && value ==NULL ) { gossip_debug(GOSSIP_XATTR_DEBUG,
@@ -358,7 +348,7 @@ ssize_t orangefs_listxattr(struct dentry *dentry, char *buffer, size_t size) returned_count = new_op->downcall.resp.listxattr.returned_count;if (returned_count <0 || - returned_count >=ORANGEFS_MAX_XATTR_LISTLEN ) { + returned_count >ORANGEFS_MAX_XATTR_LISTLEN ) {gossip_err ("%s: impossible value for returned_count:%d:\n" , __func__, returned_count);
fs/pstore/platform.c +9 -1
@@ -704,6 +704,7 @@ int pstore_register(struct pstore_info *psi)if (psi->flags &PSTORE_FLAGS_PMSG )pstore_register_pmsg (); +/* Start watching for new records, if desired. */ if (pstore_update_ms >=0 ) { pstore_timer.expires = jiffies +msecs_to_jiffies (pstore_update_ms);
@@ -726,6 +727,11 @@ EXPORT_SYMBOL_GPL(pstore_register);void pstore_unregister (struct pstore_info *psi) { +/* Stop timer and make sure all work has finished. */ + pstore_update_ms =-1 ; +del_timer_sync (&pstore_timer); +flush_work (&pstore_work); +if (psi->flags &PSTORE_FLAGS_PMSG )pstore_unregister_pmsg ();if (psi->flags &PSTORE_FLAGS_FTRACE )
@@ -825,7 +831,9 @@ static void pstore_timefunc(unsigned long dummy)schedule_work (&pstore_work); } -mod_timer (&pstore_timer, jiffies +msecs_to_jiffies (pstore_update_ms)); +if (pstore_update_ms >=0 ) +mod_timer (&pstore_timer, + jiffies +msecs_to_jiffies (pstore_update_ms)); }module_param (backend, charp,0444 );
fs/xattr.c +1 -1
@@ -530,7 +530,7 @@ getxattr(struct dentry *d, const char __user *name, void __user *value, size =XATTR_SIZE_MAX ; kvalue =kzalloc (size,GFP_KERNEL | __GFP_NOWARN);if (!kvalue) { - kvalue =vmalloc (size); + kvalue =vzalloc (size);if (!kvalue)return -ENOMEM ; }
kernel/padata.c +1 -1
@@ -358,7 +358,7 @@ static int padata_setup_cpumasks(struct parallel_data *pd,cpumask_and (pd->cpumask.pcpu, pcpumask, cpu_online_mask);if (!alloc_cpumask_var (&pd->cpumask.cbcpu,GFP_KERNEL )) { -free_cpumask_var (pd->cpumask.cbcpu); +free_cpumask_var (pd->cpumask.pcpu);return -ENOMEM ; }
mm/page_alloc.c +2 -1
@@ -3125,6 +3125,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, enum compact_priority prio, enum compact_result *compact_result) { struct page *page; +unsigned int noreclaim_flag = current->flags &PF_MEMALLOC ;if (!order)return NULL ;
@@ -3132,7 +3133,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, current->flags |=PF_MEMALLOC ; *compact_result =try_to_compact_pages (gfp_mask, order, alloc_flags, ac, prio); - current->flags &= ~PF_MEMALLOC ; + current->flags = (current->flags & ~PF_MEMALLOC ) | noreclaim_flag;if (*compact_result <=COMPACT_INACTIVE )return NULL ;
net/bluetooth/hci_sock.c +2 -1
@@ -1680,7 +1680,8 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,if (msg->msg_flags &MSG_OOB )return -EOPNOTSUPP ; -if (msg->msg_flags & ~(MSG_DONTWAIT |MSG_NOSIGNAL |MSG_ERRQUEUE )) +if (msg->msg_flags & ~(MSG_DONTWAIT |MSG_NOSIGNAL |MSG_ERRQUEUE | +MSG_CMSG_COMPAT ))return -EINVAL ;if (len <4 || len >HCI_MAX_FRAME_SIZE )
net/core/datagram.c +7 -6
@@ -740,7 +740,7 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb,if (msg_data_left (msg) < chunk) {if (__skb_checksum_complete (skb)) - goto csum_error; +return -EINVAL ;if (skb_copy_datagram_msg (skb, hlen, msg, chunk)) goto fault; }else {
@@ -748,15 +748,16 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb,if (skb_copy_and_csum_datagram (skb, hlen, &msg->msg_iter, chunk, &csum)) goto fault; -if (csum_fold (csum)) - goto csum_error; + +if (csum_fold (csum)) { +iov_iter_revert (&msg->msg_iter, chunk); +return -EINVAL ; + } +if (unlikely (skb->ip_summed ==CHECKSUM_COMPLETE ))netdev_rx_csum_fault (skb->dev); }return 0 ; -csum_error: -iov_iter_revert (&msg->msg_iter, chunk); -return -EINVAL ; fault:return -EFAULT ; }
tools/perf/util/auxtrace.c +2 -2
@@ -1826,7 +1826,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt) filt->addr = start;if (filt->range && !filt->size && !filt->sym_to) { filt->size = size; - no_size = !!size; + no_size = !size; } }
@@ -1840,7 +1840,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt)if (err)return err; filt->size = start + size - filt->addr; - no_size = !!size; + no_size = !size; }/* The very last symbol in kallsyms does not imply a particular size */
tools/testing/selftests/x86/ldt_gdt.c +46 -0
58 lines not on this page · raw message