Linux 4.10.9
Greg KH
maintainerI'm announcing the release of the 4.10.9 kernel.
All users of the 4.10 kernel series must upgrade.
The updated 4.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.10.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
------------
Documentation/devicetree/bindings/rng/omap_rng.txt | 3 Makefile | 2 arch/arc/mm/cache.c | 3 arch/arm/boot/dts/bcm5301x.dtsi | 4 arch/mips/lantiq/irq.c | 38 - arch/parisc/include/asm/uaccess.h | 59 +- arch/parisc/kernel/parisc_ksyms.c | 10 arch/parisc/kernel/process.c | 2 arch/parisc/lib/Makefile | 2 arch/parisc/lib/fixup.S | 98 ---- arch/parisc/lib/lusercopy.S | 318 ++++++++++++++ arch/parisc/lib/memcpy.c | 461 --------------------- arch/parisc/mm/fault.c | 17 arch/x86/kvm/vmx.c | 4 arch/x86/lib/memcpy_64.S | 2 arch/x86/mm/kaslr.c | 4 block/bio.c | 12 block/blk-core.c | 39 + crypto/lrw.c | 7 crypto/xts.c | 7 drivers/acpi/Makefile | 1 drivers/acpi/acpi_platform.c | 8 drivers/crypto/ccp/ccp-dev-v5.c | 1 drivers/crypto/ccp/ccp-dev.h | 5 drivers/crypto/ccp/ccp-dmaengine.c | 41 + drivers/gpu/drm/armada/Makefile | 2 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 drivers/gpu/drm/i915/gvt/kvmgt.c | 2 drivers/gpu/drm/i915/i915_gem_gtt.c | 21 drivers/gpu/drm/i915/intel_lrc.c | 3 drivers/gpu/drm/radeon/radeon_ttm.c | 4 drivers/gpu/drm/vc4/vc4_crtc.c | 13 drivers/hid/wacom_sys.c | 16 drivers/md/dm.c | 29 - drivers/md/raid10.c | 3 drivers/mmc/host/sdhci-of-at91.c | 11 drivers/mmc/host/sdhci.c | 6 drivers/nvme/host/core.c | 6 drivers/nvme/host/pci.c | 4 drivers/pci/host/pci-thunder-pem.c | 2 drivers/pci/host/pcie-iproc-bcma.c | 24 - drivers/pci/host/pcie-iproc-platform.c | 19 drivers/pci/host/pcie-iproc.h | 1 drivers/scsi/device_handler/scsi_dh_alua.c | 38 + drivers/scsi/libsas/sas_ata.c | 2 drivers/scsi/sg.c | 2 drivers/tty/serial/atmel_serial.c | 8 drivers/tty/serial/mxs-auart.c | 2 drivers/usb/core/hcd.c | 7 drivers/usb/host/xhci-ring.c | 3 fs/nfs/nfs4proc.c | 9 fs/nfsd/nfsproc.c | 1 fs/xfs/libxfs/xfs_bmap.c | 211 +++++---- fs/xfs/libxfs/xfs_bmap_btree.c | 6 fs/xfs/libxfs/xfs_btree.c | 3 fs/xfs/libxfs/xfs_btree.h | 2 fs/xfs/libxfs/xfs_da_btree.c | 6 fs/xfs/libxfs/xfs_da_btree.h | 2 fs/xfs/libxfs/xfs_dir2_node.c | 51 ++ fs/xfs/libxfs/xfs_ialloc.c | 3 fs/xfs/libxfs/xfs_inode_fork.c | 9 fs/xfs/xfs_aops.c | 65 +- fs/xfs/xfs_bmap_util.c | 62 +- fs/xfs/xfs_bmap_util.h | 3 fs/xfs/xfs_buf_item.c | 1 fs/xfs/xfs_extent_busy.c | 13 fs/xfs/xfs_file.c | 26 - fs/xfs/xfs_icache.c | 61 -- fs/xfs/xfs_icache.h | 2 fs/xfs/xfs_inode.c | 53 +- fs/xfs/xfs_iomap.c | 30 - fs/xfs/xfs_mount.c | 27 - fs/xfs/xfs_reflink.c | 151 ++++++ fs/xfs/xfs_reflink.h | 6 fs/xfs/xfs_super.c | 2 fs/xfs/xfs_trace.h | 10 include/linux/kvm_host.h | 4 include/linux/memcontrol.h | 6 kernel/padata.c | 5 lib/syscall.c | 1 mm/hugetlb.c | 6 mm/rmap.c | 4 mm/workingset.c | 2 net/ceph/messenger.c | 6 sound/core/seq/seq_fifo.c | 4 sound/pci/hda/patch_realtek.c | 12 sound/soc/atmel/atmel-classd.c | 2 sound/soc/codecs/rt5665.c | 2 sound/soc/intel/skylake/skl-topology.c | 2 virt/kvm/eventfd.c | 3 virt/kvm/kvm_main.c | 42 + 91 files changed, 1229 insertions(+), 1067 deletions(-)
Aaron Armstrong Skomra (1):
HID: wacom: Don't add ghost interface as shared data
Alan Stern (1):
USB: fix linked-list corruption in rh_call_control()
Alex Williamson (1):
drm/i915/kvmgt: Hold struct kvm reference
Alexey Brodkin (1):
ARCv2: SLC: Make sure busy bit is set properly on SLC flushing
Baoquan He (1):
x86/mm/KASLR: Exclude EFI region from KASLR VA space randomization
Bard Liao (1):
ASoC: rt5665: fix getting wrong work handler container
Bart Van Assche (2):
scsi: scsi_dh_alua: Check scsi_device_get() return value
scsi: scsi_dh_alua: Ensure that alua_activate() calls the completion function
Bill O'Donnell (1):
xfs: correct null checks and error processing in xfs_initialize_perag
Bjorn Helgaas (1):
PCI: iproc: Save host bridge window resource in struct iproc_pcie
Brian Foster (7):
xfs: pull up iolock from xfs_free_eofblocks()
xfs: sync eofblocks scans under iolock are livelock prone
xfs: fix eofblocks race with file extending async dio writes
xfs: handle indlen shortage on delalloc extent merge
xfs: split indlen reservations fairly when under reserved
xfs: don't reserve blocks for right shift transactions
xfs: use iomap new flag for newly allocated delalloc blocks
Chandan Rajendra (2):
xfs: Use xfs_icluster_size_fsb() to calculate inode chunk alignment
xfs: Use xfs_icluster_size_fsb() to calculate inode alignment mask
Christoph Hellwig (7):
xfs: reject all unaligned direct writes to reflinked files
xfs: update ctime and mtime on clone destinatation inodes
xfs: don't fail xfs_extent_busy allocation
xfs: tune down agno asserts in the bmap code
xfs: only reclaim unwritten COW extents periodically
xfs: fix and streamline error handling in xfs_end_io
xfs: try any AG when allocating the first btree block when reflinking
Daniel Vetter (1):
drm/armada: Fix compile fail
Darrick J. Wong (8):
xfs: fix toctou race when locking an inode to access the data map
xfs: fail _dir_open when readahead fails
xfs: filter out obviously bad btree pointers
xfs: check for obviously bad level values in the bmbt root
xfs: verify free block header fields
xfs: allow unwritten extents in the CoW fork
xfs: mark speculative prealloc CoW fork extents unwritten
xfs: fix uninitialized variable in _reflink_convert_cow
David Hildenbrand (1):
KVM: kvm_io_bus_unregister_dev() should never fail
Eric Anholt (1):
drm/vc4: Allocate the right amount of space for boot-time CRTC state.
Eric Biggers (1):
crypto: xts,lrw - fix out-of-bounds write after kmalloc failure
Felix Fietkau (1):
MIPS: Lantiq: Fix cascaded IRQ setup
Gary R Hook (1):
crypto: ccp - Make some CCP DMA channels private
Greg Kroah-Hartman (1):
Linux 4.10.9
Hans de Goede (1):
mmc: sdhci: Disable runtime pm when the sdio_irq is enabled
Helge Deller (3):
parisc: Clean up fixup routines for get_user()/put_user()
parisc: Avoid stalled CPU warnings after system shutdown
parisc: Fix access fault handling in pa_memcpy()
Hou Tao (1):
xfs: reset b_first_retry_time when clear the retry status of xfs_buf_t
Hui Wang (1):
ALSA: hda - fix a problem for lineout on a Dell AIO machine
Ilya Dryomov (1):
libceph: force GFP_NOIO for socket allocations
Jason A. Donenfeld (1):
padata: avoid race in reordering
Joerg Roedel (1):
ACPI: Do not create a platform_device for IOAPIC/IOxAPIC
Johannes Weiner (2):
mm: rmap: fix huge file mmap accounting in the memcg stats
mm: workingset: fix premature shadow node shrinking with cgroups
John Garry (1):
scsi: libsas: fix ata xfer length
Jon Mason (1):
ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
Josh Poimboeuf (1):
ACPI: Fix incompatibility with mcount-based function graph tracing
Kees Cook (1):
lib/syscall: Clear return values when no stack
Keith Busch (2):
nvme/core: Fix race kicking freed request_queue nvme/pci: Disable on removal when disconnected
Kinglong Mee (1):
nfsd: map the ENOKEY to nfserr_perm for avoiding warning
Ladi Prosek (1):
KVM: nVMX: fix nested EPT detection
Lucas Stach (1):
drm/etnaviv: (re-)protect fence allocation with GPU mutex
Ludovic Desroches (1):
mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection
Mathias Nyman (1):
xhci: Set URB actual length for stopped control transfers
Michel Dänzer (1):
drm/radeon: Override fpfn for all VRAM placements in radeon_evict_flags
Naoya Horiguchi (1):
mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd()
NeilBrown (2):
blk: improve order of bio handling in generic_make_request()
blk: Ensure users for current->bio_list can see the full list.
Nicolas Ferre (1):
tty/serial: atmel: fix TX path in atmel_console_write()
Olga Kornievskaia (1):
NFSv4.1 fix infinite loop on IO BAD_STATEID error
Peter Xu (1):
KVM: x86: clear bus pointer when destroyed
Richard Genoud (1):
tty/serial: atmel: fix race condition (TX+DMA)
Songjun Wu (1):
ASoC: atmel-classd: fix audio clock rate
Takashi Iwai (1):
ALSA: seq: Fix race during FIFO resize
Takashi Sakamoto (1):
ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer
Thomas Petazzoni (1):
dt-bindings: rng: clocks property on omap_rng not always mandatory
Tomasz Nowicki (1):
PCI: thunder-pem: Use Cavium assigned hardware ID for ThunderX host controller
Tony Luck (1):
x86/mce: Fix copy/paste error in exception table entries
Uwe Kleine-König (1):
serial: mxs-auart: Fix baudrate calculation
Zhi Wang (3):
drm/i915: Move the release of PT page to the upper caller drm/i915: Let execlist_update_context() cover !FULL_PPGTT mode. drm/i915: A hotfix for making aliasing PPGTT work for GVT-g
peter chang (1):
scsi: sg: check length passed to SG_NEXT_CMD_LEN
Greg KH
maintainerDocumentation/devicetree/bindings/rng/omap_rng.txt +2 -1
@@ -12,7 +12,8 @@ Required properties: - reg : Offset and length of the register set for the module - interrupts : the interrupt number for the RNG module. Used for "ti,omap4-rng" and "inside-secure,safexcel-eip76" -- clocks: the trng clock source +- clocks: the trng clock source. Only mandatory for the + "inside-secure,safexcel-eip76" compatible. Example: /* AM335x */
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 10 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = NAME = Fearless Coyote
arch/arc/mm/cache.c +3 -0
@@ -633,6 +633,9 @@ noinline static void slc_entire_op(const int op)write_aux_reg (ARC_REG_SLC_INVALIDATE ,1 ); +/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */ +read_aux_reg (r); +/* Important to wait for flush to complete */ while (read_aux_reg (r) &SLC_CTRL_BUSY ); }
arch/arm/boot/dts/bcm5301x.dtsi +2 -2
@@ -66,14 +66,14 @@ timer@20200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x20200 0x100>; - interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; clocks = <&periph_clk>; }; local-timer@20600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x20600 0x100>; - interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>; clocks = <&periph_clk>; };
arch/mips/lantiq/irq.c +17 -21
@@ -269,6 +269,11 @@ static void ltq_hw5_irqdispatch(void) DEFINE_HWx_IRQDISPATCH(5)#endif +static void ltq_hw_irq_handler (struct irq_desc *desc) +{ +ltq_hw_irqdispatch (irq_desc_get_irq (desc) -2 ); +} +#ifdef CONFIG_MIPS_MT_SMP void __init arch_init_ipiirq (int irq,struct irqaction *action) {
@@ -313,23 +318,19 @@ static struct irqaction irq_call = { asmlinkage void plat_irq_dispatch(void) {unsigned int pending =read_c0_status () &read_c0_cause () &ST0_IM ; -unsigned int i; - -if ((MIPS_CPU_TIMER_IRQ ==7 ) && (pending &CAUSEF_IP7 )) { -do_IRQ (MIPS_CPU_TIMER_IRQ ); - goto out; - }else { -for (i =0 ; i <MAX_IM ; i++) { -if (pending & (CAUSEF_IP2 << i)) { -ltq_hw_irqdispatch (i); - goto out; - } - } +int irq; + +if (!pending) { +spurious_interrupt (); +return ; } -pr_alert ("Spurious IRQ: CAUSE=0x%08x\n" ,read_c0_status ()); -out: -return ; + pending >>=CAUSEB_IP ; +while (pending) { + irq =fls (pending) -1 ; +do_IRQ (MIPS_CPU_IRQ_BASE + irq); + pending &= ~BIT (irq); + } }static int icu_map (struct irq_domain *d,unsigned int irq,irq_hw_number_t hw)
@@ -354,11 +355,6 @@ static const struct irq_domain_ops irq_domain_ops = { .map = icu_map, }; -static struct irqaction cascade = { - .handler = no_action, - .name ="cascade" , -}; -int __init icu_of_init (struct device_node *node,struct device_node *parent) {struct device_node *eiu_node;
@@ -390,7 +386,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent)mips_cpu_irq_init ();for (i =0 ; i <MAX_IM ; i++) -setup_irq (i +2 , &cascade); +irq_set_chained_handler (i +2 , ltq_hw_irq_handler);if (cpu_has_vint) {pr_info ("Setting up vectored interrupts\n" );
arch/parisc/include/asm/uaccess.h +34 -25
101 lines not on this page · raw message
arch/parisc/kernel/parisc_ksyms.c +0 -10
@@ -47,16 +47,6 @@ EXPORT_SYMBOL(__cmpxchg_u64);EXPORT_SYMBOL (lclear_user);EXPORT_SYMBOL (lstrnlen_user); -/* Global fixups - defined as int to avoid creation of function pointers */ -extern int fixup_get_user_skip_1; -extern int fixup_get_user_skip_2; -extern int fixup_put_user_skip_1; -extern int fixup_put_user_skip_2; -EXPORT_SYMBOL (fixup_get_user_skip_1); -EXPORT_SYMBOL (fixup_get_user_skip_2); -EXPORT_SYMBOL (fixup_put_user_skip_1); -EXPORT_SYMBOL (fixup_put_user_skip_2); -#ifndef CONFIG_64BIT /* Needed so insmod can set dp value */ extern int $global$;
arch/parisc/kernel/process.c +2 -0
@@ -140,6 +140,8 @@ void machine_power_off(void)printk (KERN_EMERG "System shut down completed.\n" "Please power this system off now." ); +/* prevent soft lockup/stalled CPU messages for endless loop. */ +rcu_sysrq_start ();for (;;); }
arch/parisc/lib/Makefile +1 -1
@@ -2,7 +2,7 @@ # Makefile for parisc-specific library files # -lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o \ +lib-y := lusercopy.o bitops.o checksum.o io.o memset.o memcpy.o \ ucmpdi2.o delay.o obj-y := iomap.o
arch/parisc/lib/fixup.S deleted +0 -98
98 lines not on this page · raw message
arch/parisc/lib/lusercopy.S +318 -0
328 lines not on this page · raw message
arch/parisc/lib/memcpy.c +3 -458
489 lines not on this page · raw message
arch/parisc/mm/fault.c +17 -0
@@ -149,6 +149,23 @@ int fixup_exception(struct pt_regs *regs) d->fault_space = regs->isr; d->fault_addr = regs->ior; +/* +* Fix up get_user() and put_user(). +* ASM_EXCEPTIONTABLE_ENTRY_EFAULT() sets the least-significant +* bit in the relative address of the fixup routine to indicate +* that %r8 should be loaded with -EFAULT to report a userspace +* access error. +*/ +if (fix->fixup &1 ) { + regs->gr[8 ] = -EFAULT ; + +/* zero target register for get_user() */ +if (parisc_acctyp (0 , regs->iir) ==VM_READ ) { +int treg = regs->iir &0x1f ; + regs->gr[treg] =0 ; + } + } + regs->iaoq[0 ] = (unsigned long )&fix->fixup + fix->fixup; regs->iaoq[0 ] &= ~3 ;/*
arch/x86/kvm/vmx.c +1 -3
@@ -10027,7 +10027,6 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, {struct vcpu_vmx *vmx =to_vmx (vcpu);u32 exec_control; -bool nested_ept_enabled = false;vmcs_write16 (GUEST_ES_SELECTOR , vmcs12->guest_es_selector);vmcs_write16 (GUEST_CS_SELECTOR , vmcs12->guest_cs_selector);
@@ -10192,7 +10191,6 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, vmcs12->guest_intr_status); } - nested_ept_enabled = (exec_control &SECONDARY_EXEC_ENABLE_EPT ) !=0 ;vmcs_write32 (SECONDARY_VM_EXEC_CONTROL , exec_control); }
@@ -10344,7 +10342,7 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,vmx_set_efer (vcpu, vcpu->arch.efer);/* Shadow page tables on either EPT or shadow page tables. */ -if (nested_vmx_load_cr3 (vcpu, vmcs12->guest_cr3, nested_ept_enabled, +if (nested_vmx_load_cr3 (vcpu, vmcs12->guest_cr3,nested_cpu_has_ept (vmcs12), entry_failure_code))return 1 ;
arch/x86/lib/memcpy_64.S +1 -1
@@ -290,7 +290,7 @@ EXPORT_SYMBOL_GPL(memcpy_mcsafe_unrolled) _ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail) - _ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail) + _ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)
arch/x86/mm/kaslr.c +2 -2
@@ -48,7 +48,7 @@ static const unsigned long vaddr_start = __PAGE_OFFSET_BASE;#if defined(CONFIG_X86_ESPFIX64 )static const unsigned long vaddr_end =ESPFIX_BASE_ADDR ;#elif defined(CONFIG_EFI ) -static const unsigned long vaddr_end =EFI_VA_START ; +static const unsigned long vaddr_end =EFI_VA_END ;#else static const unsigned long vaddr_end = __START_KERNEL_map;#endif
@@ -105,7 +105,7 @@ void __init kernel_randomize_memory(void)*/ BUILD_BUG_ON (vaddr_start >= vaddr_end);BUILD_BUG_ON (IS_ENABLED (CONFIG_X86_ESPFIX64 ) && - vaddr_end >=EFI_VA_START ); + vaddr_end >=EFI_VA_END );BUILD_BUG_ON ((IS_ENABLED (CONFIG_X86_ESPFIX64 ) ||IS_ENABLED (CONFIG_EFI )) && vaddr_end >= __START_KERNEL_map);
block/bio.c +9 -3
@@ -376,10 +376,14 @@ static void punt_bios_to_rescuer(struct bio_set *bs)bio_list_init (&punt);bio_list_init (&nopunt); -while ((bio =bio_list_pop (current->bio_list))) +while ((bio =bio_list_pop (¤t->bio_list[0 ])))bio_list_add (bio->bi_pool == bs ? &punt : &nopunt, bio); + current->bio_list[0 ] = nopunt; - *current->bio_list = nopunt; +bio_list_init (&nopunt); +while ((bio =bio_list_pop (¤t->bio_list[1 ]))) +bio_list_add (bio->bi_pool == bs ? &punt : &nopunt, bio); + current->bio_list[1 ] = nopunt;spin_lock (&bs->rescue_lock);bio_list_merge (&bs->rescue_list, &punt);
@@ -466,7 +470,9 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)* we retry with the original gfp_flags. */ -if (current->bio_list && !bio_list_empty (current->bio_list)) +if (current->bio_list && + (!bio_list_empty (¤t->bio_list[0 ]) || + !bio_list_empty (¤t->bio_list[1 ]))) gfp_mask &= ~__GFP_DIRECT_RECLAIM; p =mempool_alloc (bs->bio_pool, gfp_mask);
block/blk-core.c +31 -8
@@ -1977,7 +1977,14 @@ generic_make_request_checks(struct bio *bio)*/ blk_qc_t generic_make_request (struct bio *bio) { -struct bio_list bio_list_on_stack; +/* +* bio_list_on_stack[0] contains bios submitted by the current +* make_request_fn. +* bio_list_on_stack[1] contains bios that were submitted before +* the current make_request_fn, but that haven't been processed +* yet. +*/ +struct bio_list bio_list_on_stack[2 ];blk_qc_t ret =BLK_QC_T_NONE ;if (!generic_make_request_checks (bio))
@@ -1994,7 +2001,7 @@ blk_qc_t generic_make_request(struct bio *bio)* should be added at the tail */ if (current->bio_list) { -bio_list_add (current->bio_list, bio); +bio_list_add (¤t->bio_list[0 ], bio); goto out; }
@@ -2013,23 +2020,39 @@ blk_qc_t generic_make_request(struct bio *bio)* bio_list, and call into ->make_request() again. */ BUG_ON (bio->bi_next); -bio_list_init (&bio_list_on_stack); - current->bio_list = &bio_list_on_stack; +bio_list_init (&bio_list_on_stack[0 ]); + current->bio_list = bio_list_on_stack;do {struct request_queue *q =bdev_get_queue (bio->bi_bdev);if (likely (blk_queue_enter (q, false) ==0 )) { +struct bio_list lower, same; + +/* Create a fresh bio_list for all subordinate requests */ + bio_list_on_stack[1 ] = bio_list_on_stack[0 ]; +bio_list_init (&bio_list_on_stack[0 ]); ret = q->make_request_fn (q, bio);blk_queue_exit (q); - bio =bio_list_pop (current->bio_list); +/* sort new bios into those for a lower level +* and those for the same level +*/ +bio_list_init (&lower); +bio_list_init (&same); +while ((bio =bio_list_pop (&bio_list_on_stack[0 ])) !=NULL ) +if (q ==bdev_get_queue (bio->bi_bdev)) +bio_list_add (&same, bio); +else +bio_list_add (&lower, bio); +/* now assemble so we handle the lowest level first */ +bio_list_merge (&bio_list_on_stack[0 ], &lower); +bio_list_merge (&bio_list_on_stack[0 ], &same); +bio_list_merge (&bio_list_on_stack[0 ], &bio_list_on_stack[1 ]); }else { -struct bio *bio_next =bio_list_pop (current->bio_list); -bio_io_error (bio); - bio = bio_next; } + bio =bio_list_pop (&bio_list_on_stack[0 ]); }while (bio); current->bio_list =NULL ;/* deactivate */
crypto/lrw.c +5 -2
@@ -286,8 +286,11 @@ static int init_crypt(struct skcipher_request *req, crypto_completion_t done) subreq->cryptlen =LRW_BUFFER_SIZE ;if (req->cryptlen >LRW_BUFFER_SIZE ) { - subreq->cryptlen =min (req->cryptlen, (unsigned )PAGE_SIZE ); - rctx->ext =kmalloc (subreq->cryptlen, gfp); +unsigned int n =min (req->cryptlen, (unsigned int )PAGE_SIZE ); + + rctx->ext =kmalloc (n, gfp); +if (rctx->ext) + subreq->cryptlen = n; } rctx->src = req->src;
crypto/xts.c +5 -2
@@ -230,8 +230,11 @@ static int init_crypt(struct skcipher_request *req, crypto_completion_t done) subreq->cryptlen =XTS_BUFFER_SIZE ;if (req->cryptlen >XTS_BUFFER_SIZE ) { - subreq->cryptlen =min (req->cryptlen, (unsigned )PAGE_SIZE ); - rctx->ext =kmalloc (subreq->cryptlen, gfp); +unsigned int n =min (req->cryptlen, (unsigned int )PAGE_SIZE ); + + rctx->ext =kmalloc (n, gfp); +if (rctx->ext) + subreq->cryptlen = n; } rctx->src = req->src;
drivers/acpi/Makefile +0 -1
@@ -2,7 +2,6 @@ # Makefile for the Linux ACPI interpreter # -ccflags-y := -Os ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT #
drivers/acpi/acpi_platform.c +5 -3
@@ -25,9 +25,11 @@ACPI_MODULE_NAME ("platform" );static const struct acpi_device_id forbidden_id_list[] = { - {"PNP0000" ,0 },/* PIC */ - {"PNP0100" ,0 },/* Timer */ - {"PNP0200" ,0 },/* AT DMA Controller */ + {"PNP0000" ,0 },/* PIC */ + {"PNP0100" ,0 },/* Timer */ + {"PNP0200" ,0 },/* AT DMA Controller */ + {"ACPI0009" ,0 },/* IOxAPIC */ + {"ACPI000A" ,0 },/* IOAPIC */ {"" ,0 }, };
drivers/crypto/ccp/ccp-dev-v5.c +1 -0
@@ -1014,6 +1014,7 @@ const struct ccp_vdata ccpv5a = {const struct ccp_vdata ccpv5b = { .version =CCP_VERSION (5 ,0 ), + .dma_chan_attr =DMA_PRIVATE , .setup = ccp5other_config, .perform = &ccp5_actions, .bar =2 ,
drivers/crypto/ccp/ccp-dev.h +5 -0
@@ -179,6 +179,10 @@/* ------------------------ General CCP Defines ------------------------ */ +#define CCP_DMA_DFLT 0x0 +#define CCP_DMA_PRIV 0x1 +#define CCP_DMA_PUB 0x2 +#define CCP_DMAPOOL_MAX_SIZE 64#define CCP_DMAPOOL_ALIGN BIT(5)
@@ -635,6 +639,7 @@ struct ccp_actions {/* Structure to hold CCP version-specific values */ struct ccp_vdata {const unsigned int version; +const unsigned int dma_chan_attr;void (*setup)(struct ccp_device *);const struct ccp_actions *perform;const unsigned int bar;
drivers/crypto/ccp/ccp-dmaengine.c +41 -0
59 lines not on this page · raw message
drivers/gpu/drm/armada/Makefile +2 -0
@@ -4,3 +4,5 @@ armada-y += armada_510.o armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o obj-$(CONFIG_DRM_ARMADA) := armada.o + +CFLAGS_armada_trace.o := -I$(src)
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +2 -2
@@ -1303,6 +1303,8 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu, goto out_pm_put; } +mutex_lock (&gpu->lock); + fence =etnaviv_gpu_fence_alloc (gpu);if (!fence) {event_free (gpu, event);
@@ -1310,8 +1312,6 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu, goto out_pm_put; } -mutex_lock (&gpu->lock); - gpu->event[event].fence = fence; submit->fence = fence->seqno; gpu->active_fence = submit->fence;
drivers/gpu/drm/i915/gvt/kvmgt.c +2 -0
@@ -1334,6 +1334,7 @@ static int kvmgt_guest_init(struct mdev_device *mdev) vgpu->handle = (unsigned long )info; info->vgpu = vgpu; info->kvm = kvm; +kvm_get_kvm (info->kvm);kvmgt_protect_table_init (info);gvt_cache_init (vgpu);
@@ -1353,6 +1354,7 @@ static bool kvmgt_guest_exit(struct kvmgt_guest_info *info) }kvm_page_track_unregister_notifier (info->kvm, &info->track_node); +kvm_put_kvm (info->kvm);kvmgt_protect_table_destroy (info);gvt_cache_destroy (info->vgpu);vfree (info);
drivers/gpu/drm/i915/i915_gem_gtt.c +9 -12
@@ -735,10 +735,9 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,GEM_BUG_ON (pte_end >GEN8_PTES );bitmap_clear (pt->used_ptes, pte, num_entries); - -if (bitmap_empty (pt->used_ptes,GEN8_PTES )) { -free_pt (to_i915 (vm->dev), pt); -return true; +if (USES_FULL_PPGTT (vm->i915)) { +if (bitmap_empty (pt->used_ptes,GEN8_PTES )) +return true; } pt_vaddr =kmap_px (pt);
@@ -775,13 +774,12 @@ static bool gen8_ppgtt_clear_pd(struct i915_address_space *vm, pde_vaddr =kmap_px (pd); pde_vaddr[pde] = scratch_pde;kunmap_px (ppgtt, pde_vaddr); +free_pt (to_i915 (vm->dev), pt); } } -if (bitmap_empty (pd->used_pdes,I915_PDES )) { -free_pd (to_i915 (vm->dev), pd); +if (bitmap_empty (pd->used_pdes,I915_PDES ))return true; - }return false; }
@@ -795,7 +793,6 @@ static bool gen8_ppgtt_clear_pdp(struct i915_address_space *vm, uint64_t length) {struct i915_hw_ppgtt *ppgtt =i915_vm_to_ppgtt (vm); -struct drm_i915_private *dev_priv =to_i915 (vm->dev);struct i915_page_directory *pd;uint64_t pdpe;gen8_ppgtt_pdpe_t *pdpe_vaddr;
@@ -813,16 +810,14 @@ static bool gen8_ppgtt_clear_pdp(struct i915_address_space *vm, pdpe_vaddr[pdpe] = scratch_pdpe;kunmap_px (ppgtt, pdpe_vaddr); } +free_pd (to_i915 (vm->dev), pd); } }mark_tlbs_dirty (ppgtt); -if (USES_FULL_48BIT_PPGTT (dev_priv) && -bitmap_empty (pdp->used_pdpes,I915_PDPES_PER_PDP (dev_priv))) { -free_pdp (dev_priv, pdp); +if (bitmap_empty (pdp->used_pdpes,I915_PDPES_PER_PDP (dev_priv)))return true; - }return false; }
@@ -836,6 +831,7 @@ static void gen8_ppgtt_clear_pml4(struct i915_address_space *vm, uint64_t start, uint64_t length) { +struct drm_i915_private *dev_priv =to_i915 (vm->dev);struct i915_hw_ppgtt *ppgtt =i915_vm_to_ppgtt (vm);struct i915_page_directory_pointer *pdp;uint64_t pml4e;
@@ -854,6 +850,7 @@ static void gen8_ppgtt_clear_pml4(struct i915_address_space *vm, pml4e_vaddr =kmap_px (pml4); pml4e_vaddr[pml4e] = scratch_pml4e;kunmap_px (ppgtt, pml4e_vaddr); +free_pdp (dev_priv, pdp); } } }
drivers/gpu/drm/i915/intel_lrc.c +2 -1
@@ -362,7 +362,8 @@ execlists_update_context_pdps(struct i915_hw_ppgtt *ppgtt, u32 *reg_state)static u64 execlists_update_context (struct drm_i915_gem_request *rq) {struct intel_context *ce = &rq->ctx->engine[rq->engine->id]; -struct i915_hw_ppgtt *ppgtt = rq->ctx->ppgtt; +struct i915_hw_ppgtt *ppgtt = + rq->ctx->ppgtt ?: rq->i915->mm.aliasing_ppgtt;u32 *reg_state = ce->lrc_reg_state; reg_state[CTX_RING_TAIL +1 ] = rq->tail;
drivers/gpu/drm/radeon/radeon_ttm.c +2 -2
@@ -213,8 +213,8 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo, rbo->placement.num_busy_placement =0 ;for (i =0 ; i < rbo->placement.num_placement; i++) {if (rbo->placements[i].flags &TTM_PL_FLAG_VRAM ) { -if (rbo->placements[0 ].fpfn < fpfn) - rbo->placements[0 ].fpfn = fpfn; +if (rbo->placements[i].fpfn < fpfn) + rbo->placements[i].fpfn = fpfn; }else { rbo->placement.busy_placement = &rbo->placements[i];
drivers/gpu/drm/vc4/vc4_crtc.c +12 -1
@@ -842,6 +842,17 @@ static void vc4_crtc_destroy_state(struct drm_crtc *crtc,drm_atomic_helper_crtc_destroy_state (crtc, state); } +static void +vc4_crtc_reset (struct drm_crtc *crtc) +{ +if (crtc->state) +__drm_atomic_helper_crtc_destroy_state (crtc->state); + + crtc->state =kzalloc (sizeof (struct vc4_crtc_state ),GFP_KERNEL ); +if (crtc->state) + crtc->state->crtc = crtc; +} +static const struct drm_crtc_funcs vc4_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = vc4_crtc_destroy,
@@ -849,7 +860,7 @@ static const struct drm_crtc_funcs vc4_crtc_funcs = { .set_property = NULL, .cursor_set = NULL, /* handled by drm_mode_cursor_universal */ .cursor_move = NULL, /* handled by drm_mode_cursor_universal */ - .reset = drm_atomic_helper_crtc_reset, + .reset = vc4_crtc_reset, .atomic_duplicate_state = vc4_crtc_duplicate_state, .atomic_destroy_state = vc4_crtc_destroy_state, .gamma_set = vc4_crtc_gamma_set,
drivers/hid/wacom_sys.c +8 -8
@@ -2081,6 +2081,14 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)wacom_update_name (wacom, wireless ?" (WL)" :"" ); +/* pen only Bamboo neither support touch nor pad */ +if ((features->type ==BAMBOO_PEN ) && + ((features->device_type &WACOM_DEVICETYPE_TOUCH ) || + (features->device_type &WACOM_DEVICETYPE_PAD ))) { + error = -ENODEV ; + goto fail; + } + error =wacom_add_shared_data (hdev);if (error) goto fail;
@@ -2128,14 +2136,6 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) goto fail_quirks; } -/* pen only Bamboo neither support touch nor pad */ -if ((features->type ==BAMBOO_PEN ) && - ((features->device_type &WACOM_DEVICETYPE_TOUCH ) || - (features->device_type &WACOM_DEVICETYPE_PAD ))) { - error = -ENODEV ; - goto fail_quirks; - } -if (features->device_type &WACOM_DEVICETYPE_WL_MONITOR ) error =hid_hw_open (hdev);
drivers/md/dm.c +16 -13
@@ -986,26 +986,29 @@ static void flush_current_bio_list(struct blk_plug_cb *cb, bool from_schedule) struct dm_offload *o = container_of(cb, struct dm_offload, cb);struct bio_list list;struct bio *bio; +int i;INIT_LIST_HEAD (&o->cb.list);if (unlikely (!current->bio_list))return ; - list = *current->bio_list; -bio_list_init (current->bio_list); - -while ((bio =bio_list_pop (&list))) { -struct bio_set *bs = bio->bi_pool; -if (unlikely (!bs) || bs == fs_bio_set) { -bio_list_add (current->bio_list, bio); -continue ; +for (i =0 ; i <2 ; i++) { + list = current->bio_list[i]; +bio_list_init (¤t->bio_list[i]); + +while ((bio =bio_list_pop (&list))) { +struct bio_set *bs = bio->bi_pool; +if (unlikely (!bs) || bs == fs_bio_set) { +bio_list_add (¤t->bio_list[i], bio); +continue ; + } + +spin_lock (&bs->rescue_lock); +bio_list_add (&bs->rescue_list, bio); +queue_work (bs->rescue_workqueue, &bs->rescue_work); +spin_unlock (&bs->rescue_lock); } - -spin_lock (&bs->rescue_lock); -bio_list_add (&bs->rescue_list, bio); -queue_work (bs->rescue_workqueue, &bs->rescue_work); -spin_unlock (&bs->rescue_lock); } }
drivers/md/raid10.c +2 -1
@@ -974,7 +974,8 @@ static void wait_barrier(struct r10conf *conf) !conf->barrier || (atomic_read (&conf->nr_pending) && current->bio_list && - !bio_list_empty (current->bio_list)), + (!bio_list_empty (¤t->bio_list[0 ]) || + !bio_list_empty (¤t->bio_list[1 ]))), conf->resync_lock); conf->nr_waiting--;if (!conf->nr_waiting)
drivers/mmc/host/sdhci-of-at91.c +10 -1
@@ -29,6 +29,8 @@#include "sdhci-pltfm.h" +#define SDMMC_MC1R 0x204 +#define SDMMC_MC1R_DDR BIT(3)#define SDMMC_CACR 0x230#define SDMMC_CACR_CAPWREN BIT(0)#define SDMMC_CACR_KEY (0x46 << 8)
@@ -103,11 +105,18 @@ static void sdhci_at91_set_power(struct sdhci_host *host, unsigned char mode,sdhci_set_power_noreg (host, mode, vdd); } +void sdhci_at91_set_uhs_signaling (struct sdhci_host *host,unsigned int timing) +{ +if (timing ==MMC_TIMING_MMC_DDR52 ) +sdhci_writeb (host,SDMMC_MC1R_DDR ,SDMMC_MC1R ); +sdhci_set_uhs_signaling (host, timing); +} +static const struct sdhci_ops sdhci_at91_sama5d2_ops = { .set_clock = sdhci_at91_set_clock, .set_bus_width = sdhci_set_bus_width, .reset = sdhci_reset, - .set_uhs_signaling = sdhci_set_uhs_signaling, + .set_uhs_signaling = sdhci_at91_set_uhs_signaling, .set_power = sdhci_at91_set_power, };
drivers/mmc/host/sdhci.c +6 -0
@@ -1830,6 +1830,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)struct sdhci_host *host =mmc_priv (mmc);unsigned long flags; +if (enable) +pm_runtime_get_noresume (host->mmc->parent); +spin_lock_irqsave (&host->lock, flags);if (enable) host->flags |=SDHCI_SDIO_IRQ_ENABLED ;
@@ -1838,6 +1841,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)sdhci_enable_sdio_irq_nolock (host, enable);spin_unlock_irqrestore (&host->lock, flags); + +if (!enable) +pm_runtime_put_noidle (host->mmc->parent); } static int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
drivers/nvme/host/core.c +3 -3
@@ -2034,9 +2034,9 @@ void nvme_kill_queues(struct nvme_ctrl *ctrl)* Revalidating a dead namespace sets capacity to 0. This will * end buffered writers dirtying pages that can't be synced. */ -if (ns->disk && !test_and_set_bit (NVME_NS_DEAD , &ns->flags)) -revalidate_disk (ns->disk); - +if (!ns->disk ||test_and_set_bit (NVME_NS_DEAD , &ns->flags)) +continue ; +revalidate_disk (ns->disk);blk_set_queue_dying (ns->queue);blk_mq_abort_requeue_list (ns->queue);blk_mq_start_stopped_hw_queues (ns->queue, true);
drivers/nvme/host/pci.c +3 -1
@@ -1990,8 +1990,10 @@ static void nvme_remove(struct pci_dev *pdev)pci_set_drvdata (pdev,NULL ); -if (!pci_device_is_present (pdev)) +if (!pci_device_is_present (pdev)) {nvme_change_ctrl_state (&dev->ctrl,NVME_CTRL_DEAD ); +nvme_dev_disable (dev, false); + }flush_work (&dev->reset_work);nvme_uninit_ctrl (&dev->ctrl);
drivers/pci/host/pci-thunder-pem.c +1 -1
@@ -331,7 +331,7 @@ static int thunder_pem_acpi_init(struct pci_config_window *cfg)if (!res_pem)return -ENOMEM ; - ret =acpi_get_rc_resources (dev,"THRX0002" , root->segment, res_pem); + ret =acpi_get_rc_resources (dev,"CAVA02B" , root->segment, res_pem);if (ret) {dev_err (dev,"can't get rc base address\n" );return ret;
drivers/pci/host/pcie-iproc-bcma.c +12 -12
@@ -44,8 +44,7 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) {struct device *dev = &bdev->dev;struct iproc_pcie *pcie; -LIST_HEAD (res); -struct resource res_mem; +LIST_HEAD (resources);int ret; pcie =devm_kzalloc (dev,sizeof (*pcie),GFP_KERNEL );
@@ -63,22 +62,23 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) pcie->base_addr = bdev->addr; - res_mem.start = bdev->addr_s[0 ]; - res_mem.end = bdev->addr_s[0 ] +SZ_128M -1 ; - res_mem.name ="PCIe MEM space" ; - res_mem.flags =IORESOURCE_MEM ; -pci_add_resource (&res, &res_mem); + pcie->mem.start = bdev->addr_s[0 ]; + pcie->mem.end = bdev->addr_s[0 ] +SZ_128M -1 ; + pcie->mem.name ="PCIe MEM space" ; + pcie->mem.flags =IORESOURCE_MEM ; +pci_add_resource (&resources, &pcie->mem); pcie->map_irq = iproc_pcie_bcma_map_irq; - ret =iproc_pcie_setup (pcie, &res); -if (ret) + ret =iproc_pcie_setup (pcie, &resources); +if (ret) {dev_err (dev,"PCIe controller setup failed\n" ); - -pci_free_resource_list (&res); +pci_free_resource_list (&resources); +return ret; + }bcma_set_drvdata (bdev, pcie); -return ret; +return 0 ; }static void iproc_pcie_bcma_remove (struct bcma_device *bdev)
drivers/pci/host/pcie-iproc-platform.c +10 -9
@@ -52,7 +52,7 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)struct device_node *np = dev->of_node;struct resource reg;resource_size_t iobase =0 ; -LIST_HEAD (res); +LIST_HEAD (resources);int ret; of_id =of_match_device (iproc_pcie_of_match_table, dev);
@@ -101,10 +101,10 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) pcie->phy =NULL ; } - ret =of_pci_get_host_bridge_resources (np,0 ,0xff , &res, &iobase); + ret =of_pci_get_host_bridge_resources (np,0 ,0xff , &resources, + &iobase);if (ret) { -dev_err (dev, -"unable to get PCI host bridge resources\n" ); +dev_err (dev,"unable to get PCI host bridge resources\n" );return ret; }
@@ -117,14 +117,15 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) pcie->map_irq = of_irq_parse_and_map_pci; } - ret =iproc_pcie_setup (pcie, &res); -if (ret) + ret =iproc_pcie_setup (pcie, &resources); +if (ret) {dev_err (dev,"PCIe controller setup failed\n" ); - -pci_free_resource_list (&res); +pci_free_resource_list (&resources); +return ret; + }platform_set_drvdata (pdev, pcie); -return ret; +return 0 ; }static int iproc_pcie_pltfm_remove (struct platform_device *pdev)
drivers/pci/host/pcie-iproc.h +1 -0
@@ -90,6 +90,7 @@ struct iproc_pcie {#ifdef CONFIG_ARM struct pci_sys_data sysdata;#endif +struct resource mem;struct pci_bus *root_bus;struct phy *phy;int (*map_irq)(const struct pci_dev *,u8 ,u8 );
drivers/scsi/device_handler/scsi_dh_alua.c +24 -14
@@ -113,7 +113,7 @@ struct alua_queue_data {#define ALUA_POLICY_SWITCH_ALL 1static void alua_rtpg_work (struct work_struct *work); -static void alua_rtpg_queue (struct alua_port_group *pg, +static bool alua_rtpg_queue (struct alua_port_group *pg,struct scsi_device *sdev,struct alua_queue_data *qdata,bool force);static void alua_check (struct scsi_device *sdev,bool force);
@@ -866,7 +866,13 @@ static void alua_rtpg_work(struct work_struct *work)kref_put (&pg->kref, release_port_group); } -static void alua_rtpg_queue (struct alua_port_group *pg, +/** +* alua_rtpg_queue() - cause RTPG to be submitted asynchronously +* +* Returns true if and only if alua_rtpg_work() will be called asynchronously. +* That function is responsible for calling @qdata->fn(). +*/ +static bool alua_rtpg_queue (struct alua_port_group *pg,struct scsi_device *sdev,struct alua_queue_data *qdata,bool force) {
@@ -874,8 +880,8 @@ static void alua_rtpg_queue(struct alua_port_group *pg,unsigned long flags;struct workqueue_struct *alua_wq = kaluad_wq; -if (!pg) -return ; +if (!pg ||scsi_device_get (sdev)) +return false;spin_lock_irqsave (&pg->lock, flags);if (qdata) {
@@ -888,14 +894,12 @@ static void alua_rtpg_queue(struct alua_port_group *pg, pg->flags |=ALUA_PG_RUN_RTPG ;kref_get (&pg->kref); pg->rtpg_sdev = sdev; -scsi_device_get (sdev); start_queue =1 ; }else if (!(pg->flags &ALUA_PG_RUN_RTPG ) && force) { pg->flags |=ALUA_PG_RUN_RTPG ;/* Do not queue if the worker is already running */ if (!(pg->flags &ALUA_PG_RUNNING )) {kref_get (&pg->kref); - sdev =NULL ; start_queue =1 ; } }
@@ -904,13 +908,17 @@ static void alua_rtpg_queue(struct alua_port_group *pg, alua_wq = kaluad_sync_wq;spin_unlock_irqrestore (&pg->lock, flags); -if (start_queue && - !queue_delayed_work (alua_wq, &pg->rtpg_work, -msecs_to_jiffies (ALUA_RTPG_DELAY_MSECS ))) { -if (sdev) -scsi_device_put (sdev); -kref_put (&pg->kref, release_port_group); +if (start_queue) { +if (queue_delayed_work (alua_wq, &pg->rtpg_work, +msecs_to_jiffies (ALUA_RTPG_DELAY_MSECS ))) + sdev =NULL ; +else +kref_put (&pg->kref, release_port_group); } +if (sdev) +scsi_device_put (sdev); + +return true; }/*
@@ -1011,11 +1019,13 @@ static int alua_activate(struct scsi_device *sdev,mutex_unlock (&h->init_mutex); goto out; } - fn =NULL ;rcu_read_unlock ();mutex_unlock (&h->init_mutex); -alua_rtpg_queue (pg, sdev, qdata, true); +if (alua_rtpg_queue (pg, sdev, qdata, true)) + fn =NULL ; +else + err =SCSI_DH_DEV_OFFLINED ;kref_put (&pg->kref, release_port_group); out:if (fn)
drivers/scsi/libsas/sas_ata.c +1 -1
@@ -221,7 +221,7 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc) task->num_scatter = qc->n_elem; }else {for_each_sg (qc->sg, sg, qc->n_elem, si) - xfer += sg->length; + xfer +=sg_dma_len (sg); task->total_xfer_len = xfer; task->num_scatter = si;
drivers/scsi/sg.c +2 -0
@@ -998,6 +998,8 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) result =get_user (val, ip);if (result)return result; +if (val >SG_MAX_CDB_SIZE ) +return -ENOMEM ; sfp->next_cmd_len = (val >0 ) ? val :0 ;return 0 ;case SG_GET_VERSION_NUM :
drivers/tty/serial/atmel_serial.c +8 -0
@@ -1938,6 +1938,11 @@ static void atmel_flush_buffer(struct uart_port *port)atmel_uart_writel (port,ATMEL_PDC_TCR ,0 ); atmel_port->pdc_tx.ofs =0 ; } +/* +* in uart_flush_buffer(), the xmit circular buffer has just +* been cleared, so we have to reset tx_len accordingly. +*/ + atmel_port->tx_len =0 ; }/*
@@ -2471,6 +2476,9 @@ static void atmel_console_write(struct console *co, const char *s, u_int count) pdc_tx =atmel_uart_readl (port,ATMEL_PDC_PTSR ) &ATMEL_PDC_TXTEN ;atmel_uart_writel (port,ATMEL_PDC_PTCR ,ATMEL_PDC_TXTDIS ); +/* Make sure that tx path is actually able to send characters */ +atmel_uart_writel (port,ATMEL_US_CR ,ATMEL_US_TXEN ); +uart_console_write (port, s, count, atmel_console_putchar);/*
drivers/tty/serial/mxs-auart.c +1 -1
@@ -1085,7 +1085,7 @@ static void mxs_auart_settermios(struct uart_port *u, AUART_LINECTRL_BAUD_DIV_MAX); baud_max = u->uartclk *32 /AUART_LINECTRL_BAUD_DIV_MIN ; baud =uart_get_baud_rate (u, termios, old, baud_min, baud_max); - div = u->uartclk *32 / baud; + div =DIV_ROUND_CLOSEST (u->uartclk *32 , baud); } ctrl |=AUART_LINECTRL_BAUD_DIVFRAC (div &0x3F );
drivers/usb/core/hcd.c +5 -2
@@ -520,8 +520,10 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)*/ tbuf_size =max_t (u16,sizeof (struct usb_hub_descriptor ), wLength); tbuf =kzalloc (tbuf_size,GFP_KERNEL ); -if (!tbuf) -return -ENOMEM ; +if (!tbuf) { + status = -ENOMEM ; + goto err_alloc; + } bufp = tbuf;
@@ -734,6 +736,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) }kfree (tbuf); + err_alloc:/* any errors get returned through the urb completion */ spin_lock_irq (&hcd_root_hub_lock);
drivers/usb/host/xhci-ring.c +3 -0
@@ -2000,6 +2000,9 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,case TRB_NORMAL : td->urb->actual_length = requested - remaining; goto finish_td; +case TRB_STATUS : + td->urb->actual_length = requested; + goto finish_td;default :xhci_warn (xhci,"WARN: unexpected TRB Type %d\n" , trb_type);
fs/nfs/nfs4proc.c +3 -6
@@ -2550,17 +2550,14 @@ static void nfs41_check_delegation_stateid(struct nfs4_state *state) }nfs4_stateid_copy (&stateid, &delegation->stateid); -if (test_bit (NFS_DELEGATION_REVOKED , &delegation->flags)) { +if (test_bit (NFS_DELEGATION_REVOKED , &delegation->flags) || + !test_and_clear_bit (NFS_DELEGATION_TEST_EXPIRED , + &delegation->flags)) {rcu_read_unlock ();nfs_finish_clear_delegation_stateid (state, &stateid);return ; } -if (!test_and_clear_bit (NFS_DELEGATION_TEST_EXPIRED , &delegation->flags)) { -rcu_read_unlock (); -return ; - } - cred =get_rpccred (delegation->cred);rcu_read_unlock (); status =nfs41_test_and_free_expired_stateid (server, &stateid, cred);
fs/nfsd/nfsproc.c +1 -0
@@ -790,6 +790,7 @@ nfserrno (int errno) { nfserr_serverfault, -ESERVERFAULT }, { nfserr_serverfault, -ENFILE }, { nfserr_io, -EUCLEAN }, + { nfserr_perm, -ENOKEY }, };int i;
fs/xfs/libxfs/xfs_bmap.c +127 -84
452 lines not on this page · raw message
fs/xfs/libxfs/xfs_bmap_btree.c +3 -3
@@ -453,8 +453,8 @@ xfs_bmbt_alloc_block(if (args.fsbno ==NULLFSBLOCK ) { args.fsbno =be64_to_cpu (start->l); -try_another_ag: args.type =XFS_ALLOCTYPE_START_BNO ; +try_another_ag:/* * Make sure there is sufficient room left in the AG to * complete a full tree split for an extent insert. If
@@ -494,8 +494,8 @@ xfs_bmbt_alloc_block(if (xfs_sb_version_hasreflink (&cur->bc_mp->m_sb) && args.fsbno ==NULLFSBLOCK && args.type ==XFS_ALLOCTYPE_NEAR_BNO ) { - cur->bc_private.b.dfops->dop_low = true; args.fsbno = cur->bc_private.b.firstblock; + args.type =XFS_ALLOCTYPE_FIRST_AG ; goto try_another_ag; }
@@ -512,7 +512,7 @@ xfs_bmbt_alloc_block( goto error0; cur->bc_private.b.dfops->dop_low = true; } -if (args.fsbno ==NULLFSBLOCK ) { +if (WARN_ON_ONCE (args.fsbno ==NULLFSBLOCK )) {XFS_BTREE_TRACE_CURSOR (cur,XBT_EXIT ); *stat =0 ;return 0 ;
fs/xfs/libxfs/xfs_btree.c +2 -1
@@ -810,7 +810,8 @@ xfs_btree_read_bufl(xfs_daddr_t d;/* real disk block address */ int error; -ASSERT (fsbno !=NULLFSBLOCK ); +if (!XFS_FSB_SANITY_CHECK (mp, fsbno)) +return -EFSCORRUPTED ; d =XFS_FSB_TO_DADDR (mp, fsbno); error =xfs_trans_read_buf (mp, tp, mp->m_ddev_targp, d, mp->m_bsize, lock, &bp, ops);
fs/xfs/libxfs/xfs_btree.h +1 -1
@@ -456,7 +456,7 @@ static inline int xfs_btree_get_level(struct xfs_btree_block *block)#define XFS_FILBLKS_MAX (a,b) max_t(xfs_filblks_t, (a), (b))#define XFS_FSB_SANITY_CHECK (mp,fsb) \ - (XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \ + (fsb && XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \ XFS_FSB_TO_AGBNO(mp, fsb) < mp->m_sb.sb_agblocks)/*
fs/xfs/libxfs/xfs_da_btree.c +2 -4
@@ -2633,7 +2633,7 @@ xfs_da_read_buf(/* * Readahead the dir/attr block. */ -xfs_daddr_t +int xfs_da_reada_buf( struct xfs_inode *dp, xfs_dablk_t bno,
@@ -2664,7 +2664,5 @@ xfs_da_reada_buf(if (mapp != &map)kmem_free (mapp); -if (error) -return -1 ; -return mappedbno; +return error; }
fs/xfs/libxfs/xfs_da_btree.h +1 -1
@@ -201,7 +201,7 @@ int xfs_da_read_buf(struct xfs_trans *trans, struct xfs_inode *dp, xfs_dablk_t bno, xfs_daddr_t mappedbno, struct xfs_buf **bpp, int whichfork, const struct xfs_buf_ops *ops); -xfs_daddr_t xfs_da_reada_buf (struct xfs_inode *dp,xfs_dablk_t bno, +int xfs_da_reada_buf (struct xfs_inode *dp,xfs_dablk_t bno,xfs_daddr_t mapped_bno,int whichfork,const struct xfs_buf_ops *ops); int xfs_da_shrink_inode(xfs_da_args_t *args, xfs_dablk_t dead_blkno,
fs/xfs/libxfs/xfs_dir2_node.c +49 -2
66 lines not on this page · raw message
fs/xfs/libxfs/xfs_ialloc.c +1 -2
@@ -51,8 +51,7 @@ xfs_ialloc_cluster_alignment( struct xfs_mount *mp) {if (xfs_sb_version_hasalign (&mp->m_sb) && - mp->m_sb.sb_inoalignmt >= -XFS_B_TO_FSBT (mp, mp->m_inode_cluster_size)) + mp->m_sb.sb_inoalignmt >=xfs_icluster_size_fsb (mp))return mp->m_sb.sb_inoalignmt;return 1 ; }
fs/xfs/libxfs/xfs_inode_fork.c +6 -3
@@ -26,6 +26,7 @@#include "xfs_inode.h" #include "xfs_trans.h" #include "xfs_inode_item.h" +#include "xfs_btree.h" #include "xfs_bmap_btree.h" #include "xfs_bmap.h" #include "xfs_error.h"
@@ -429,11 +430,13 @@ xfs_iformat_btree(/* REFERENCED */ int nrecs;int size; +int level; ifp =XFS_IFORK_PTR (ip, whichfork); dfp = (xfs_bmdr_block_t *)XFS_DFORK_PTR (dip, whichfork); size =XFS_BMAP_BROOT_SPACE (mp, dfp); nrecs =be16_to_cpu (dfp->bb_numrecs); + level =be16_to_cpu (dfp->bb_level);/* * blow out if -- fork has less extents than can fit in
@@ -446,7 +449,8 @@ xfs_iformat_btree( XFS_IFORK_MAXEXT(ip, whichfork) || XFS_BMDR_SPACE_CALC(nrecs) > XFS_DFORK_SIZE(dip, mp, whichfork) || - XFS_IFORK_NEXTENTS(ip, whichfork) > ip->i_d.di_nblocks)) { + XFS_IFORK_NEXTENTS(ip, whichfork) > ip->i_d.di_nblocks) || + level == 0 || level > XFS_BTREE_MAXLEVELS) {xfs_warn (mp,"corrupt inode %Lu (btree)." , (unsigned long long ) ip->i_ino); XFS_CORRUPTION_ERROR("xfs_iformat_btree", XFS_ERRLEVEL_LOW,
@@ -497,15 +501,14 @@ xfs_iread_extents(* We know that the size is valid (it's checked in iformat_btree) */ ifp->if_bytes = ifp->if_real_bytes =0 ; - ifp->if_flags |=XFS_IFEXTENTS ;xfs_iext_add (ifp,0 , nextents); error =xfs_bmap_read_extents (tp, ip, whichfork);if (error) {xfs_iext_destroy (ifp); - ifp->if_flags &= ~XFS_IFEXTENTS ;return error; }xfs_validate_extents (ifp, nextents,XFS_EXTFMT_INODE (ip)); + ifp->if_flags |=XFS_IFEXTENTS ;return 0 ; }/*
fs/xfs/xfs_aops.c +33 -32
93 lines not on this page · raw message
fs/xfs/xfs_bmap_util.c +28 -34
125 lines not on this page · raw message
fs/xfs/xfs_bmap_util.h +1 -2
@@ -63,8 +63,7 @@ int xfs_insert_file_space(struct xfs_inode *, xfs_off_t offset,/* EOF block manipulation functions */ bool xfs_can_free_eofblocks (struct xfs_inode *ip,bool force); -int xfs_free_eofblocks (struct xfs_mount *mp,struct xfs_inode *ip, -bool need_iolock); +int xfs_free_eofblocks (struct xfs_inode *ip);int xfs_swap_extents (struct xfs_inode *ip,struct xfs_inode *tip,struct xfs_swapext *sx);
fs/xfs/xfs_buf_item.c +1 -0
@@ -1162,6 +1162,7 @@ xfs_buf_iodone_callbacks(*/ bp->b_last_error =0 ; bp->b_retries =0 ; + bp->b_first_retry_time =0 ;xfs_buf_do_callbacks (bp); bp->b_fspriv =NULL ;
fs/xfs/xfs_extent_busy.c +1 -12
@@ -45,18 +45,7 @@ xfs_extent_busy_insert(struct rb_node **rbp;struct rb_node *parent =NULL ; - new =kmem_zalloc (sizeof (struct xfs_extent_busy ),KM_MAYFAIL ); -if (!new) { -/* -* No Memory! Since it is now not possible to track the free -* block, make this a synchronous transaction to insure that -* the block is not reused before this transaction commits. -*/ -trace_xfs_extent_busy_enomem (tp->t_mountp, agno, bno, len); -xfs_trans_set_sync (tp); -return ; - } - + new =kmem_zalloc (sizeof (struct xfs_extent_busy ),KM_SLEEP ); new->agno = agno; new->bno = bno; new->length = len;
fs/xfs/xfs_file.c +20 -6
@@ -527,6 +527,15 @@ xfs_file_dio_aio_write(if ((iocb->ki_pos & mp->m_blockmask) || ((iocb->ki_pos + count) & mp->m_blockmask)) { unaligned_io =1 ; + +/* +* We can't properly handle unaligned direct I/O to reflink +* files yet, as we can't unshare a partial block. +*/ +if (xfs_is_reflink_inode (ip)) { +trace_xfs_reflink_bounce_dio_write (ip, iocb->ki_pos, count); +return -EREMCHG ; + } iolock =XFS_IOLOCK_EXCL ; }else { iolock =XFS_IOLOCK_SHARED ;
@@ -614,8 +623,10 @@ xfs_file_buffered_aio_write(struct xfs_inode *ip =XFS_I (inode);ssize_t ret;int enospc =0 ; -int iolock =XFS_IOLOCK_EXCL ; +int iolock; +write_retry: + iolock =XFS_IOLOCK_EXCL ;xfs_ilock (ip, iolock); ret =xfs_file_aio_write_checks (iocb, from, &iolock);
@@ -625,7 +636,6 @@ xfs_file_buffered_aio_write(/* We can write back this queue in page reclaim */ current->backing_dev_info =inode_to_bdi (inode); -write_retry:trace_xfs_file_buffered_write (ip,iov_iter_count (from), iocb->ki_pos); ret =iomap_file_buffered_write (iocb, from, &xfs_iomap_ops);if (likely (ret >=0 ))
@@ -641,18 +651,21 @@ xfs_file_buffered_aio_write(* running at the same time. */ if (ret == -EDQUOT && !enospc) { +xfs_iunlock (ip, iolock); enospc =xfs_inode_free_quota_eofblocks (ip);if (enospc) goto write_retry; enospc =xfs_inode_free_quota_cowblocks (ip);if (enospc) goto write_retry; + iolock =0 ; }else if (ret == -ENOSPC && !enospc) {struct xfs_eofblocks eofb = {0 }; enospc =1 ;xfs_flush_inodes (ip->i_mount); - eofb.eof_scan_owner = ip->i_ino;/* for locking */ + +xfs_iunlock (ip, iolock); eofb.eof_flags =XFS_EOF_FLAGS_SYNC ;xfs_icache_free_eofblocks (ip->i_mount, &eofb); goto write_retry;
@@ -660,7 +673,8 @@ xfs_file_buffered_aio_write( current->backing_dev_info =NULL ; out: -xfs_iunlock (ip, iolock); +if (iolock) +xfs_iunlock (ip, iolock);return ret; }
@@ -908,9 +922,9 @@ xfs_dir_open(*/ mode =xfs_ilock_data_map_shared (ip);if (ip->i_d.di_nextents >0 ) -xfs_dir3_data_readahead (ip,0 ,-1 ); + error =xfs_dir3_data_readahead (ip,0 ,-1 );xfs_iunlock (ip, mode); -return 0 ; +return error; }STATIC int
fs/xfs/xfs_icache.c +18 -43
13 lines not on this page · raw message
fs/xfs/xfs_inode.c +29 -24
53 lines not on this page · raw message
fs/xfs/xfs_reflink.c +133 -18
151 lines not on this page · raw message
virt/kvm/kvm_main.c +30 -12
42 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.