Linux 4.14.94
Greg KH
maintainerI'm announcing the release of the 4.14.94 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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/x86/include/asm/kvm_host.h | 13 +++ arch/x86/kernel/cpu/bugs.c | 2 arch/x86/kvm/x86.c | 34 +++------ drivers/acpi/pmic/intel_pmic_xpower.c | 41 ++++++++--- drivers/acpi/power.c | 22 +++++ drivers/block/rbd.c | 9 +- drivers/gpu/drm/drm_fb_helper.c | 126 +++++++++++++++++++--------------- drivers/i2c/i2c-dev.c | 6 + drivers/usb/class/cdc-acm.c | 7 + drivers/usb/core/quirks.c | 3 drivers/usb/storage/scsiglue.c | 8 +- drivers/usb/storage/unusual_devs.h | 12 +++ fs/cifs/file.c | 8 +- fs/cifs/smb2file.c | 4 - fs/cifs/smb2pdu.c | 8 +- fs/cifs/transport.c | 2 fs/ext4/fsync.c | 16 +++- fs/ext4/inline.c | 6 - fs/ext4/inode.c | 3 fs/ext4/super.c | 2 include/linux/compiler-gcc.h | 2 include/linux/kvm_host.h | 2 include/linux/module.h | 2 include/linux/sunrpc/svc.h | 5 + mm/memory.c | 23 ++++++ mm/slab.c | 6 + mm/util.c | 2 net/sunrpc/svc.c | 11 +- net/sunrpc/svc_xprt.c | 5 - net/sunrpc/svcsock.c | 2 scripts/mod/modpost.c | 2 sound/pci/hda/patch_realtek.c | 18 ++++ virt/kvm/arm/arm.c | 23 ++---- 34 files changed, 299 insertions(+), 138 deletions(-)
Christoffer Dall (1):
KVM: arm/arm64: Fix VMID alloc race by reverting to lock-less
Christoph Lameter (1):
slab: alien caches must not be initialized if the allocation of the alien cache failed
Daniele Palmas (1):
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Greg Kroah-Hartman (1):
Linux 4.14.94
Hans de Goede (2):
ACPI: power: Skip duplicate power resource references in _PRx ACPI / PMIC: xpower: Fix TS-pin current-source handling
Icenowy Zheng (2):
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
USB: storage: add quirk for SMI SM3350
Ilya Dryomov (1):
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
Ivan Mironov (1):
drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2
Jack Stocker (1):
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Jan Stancek (1):
mm: page_mapped: don't assume compound page is huge or THP
Kailang Yang (3):
ALSA: hda/realtek - Support Dell headset mode for New AIO platform
ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
Michal Hocko (1):
mm, memcg: fix reclaim deadlock with writeback
Pavel Shilovsky (2):
CIFS: Fix adjustment of credits for MTU requests
CIFS: Do not hide EINTR after sending network packets
Rik van Riel (1):
x86,kvm: move qemu/guest FPU switching out to vcpu_run
Ross Lagerwall (1):
cifs: Fix potential OOB access of lock element array
Theodore Ts'o (5):
ext4: make sure enough credits are reserved for dioread_nolock writes
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
ext4: avoid kernel warning when writing the superblock to a dead device
ext4: use ext4_write_inode() when fsyncing w/o a journal
ext4: track writeback errors using the generic tracking infrastructure
Vasily Averin (1):
sunrpc: use-after-free in svc_process_common()
WANG Chao (1):
x86, modpost: Replace last remnants of RETPOLINE with CONFIG_RETPOLINE
Yi Zeng (1):
i2c: dev: prevent adapter retries and timeout being set as minus value
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 93 +SUBLEVEL = 94 EXTRAVERSION = NAME = Petit Gorille
arch/x86/include/asm/kvm_host.h +13 -0
@@ -539,7 +539,20 @@ struct kvm_vcpu_arch {struct kvm_mmu_memory_cache mmu_page_cache;struct kvm_mmu_memory_cache mmu_page_header_cache; +/* +* QEMU userspace and the guest each have their own FPU state. +* In vcpu_run, we switch between the user and guest FPU contexts. +* While running a VCPU, the VCPU thread will have the guest FPU +* context. +* +* Note that while the PKRU state lives inside the fpu registers, +* it is switched out separately at VMENTER and VMEXIT time. The +* "guest_fpu" state here contains the guest FPU context, with the +* host PRKU bits. +*/ +struct fpu user_fpu;struct fpu guest_fpu; +u64 xcr0;u64 guest_supported_xcr0;u32 guest_xstate_size;
arch/x86/kernel/cpu/bugs.c +1 -1
@@ -212,7 +212,7 @@ static enum spectre_v2_mitigation spectre_v2_enabled __ro_after_init =static enum spectre_v2_user_mitigation spectre_v2_user__ro_after_init =SPECTRE_V2_USER_NONE ; -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE static bool spectre_v2_bad_module;bool retpoline_module_ok (bool has_retpoline)
arch/x86/kvm/x86.c +13 -21
@@ -3020,7 +3020,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)srcu_read_unlock (&vcpu->kvm->srcu, idx);pagefault_enable (); kvm_x86_ops->vcpu_put (vcpu); -kvm_put_guest_fpu (vcpu); vcpu->arch.last_host_tsc =rdtsc ();/* * If userspace has set any breakpoints or watchpoints, dr6 is restored
@@ -5377,13 +5376,10 @@ static void emulator_halt(struct x86_emulate_ctxt *ctxt)static void emulator_get_fpu (struct x86_emulate_ctxt *ctxt) { -preempt_disable (); -kvm_load_guest_fpu (emul_to_vcpu (ctxt)); }static void emulator_put_fpu (struct x86_emulate_ctxt *ctxt) { -preempt_enable (); } static int emulator_intercept(struct x86_emulate_ctxt *ctxt,
@@ -7083,7 +7079,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)preempt_disable (); kvm_x86_ops->prepare_guest_switch (vcpu); -kvm_load_guest_fpu (vcpu);/* * Disable IRQs before setting IN_GUEST_MODE. Posted interrupt
@@ -7428,12 +7423,14 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) } } +kvm_load_guest_fpu (vcpu); +if (unlikely (vcpu->arch.complete_userspace_io)) {int (*cui)(struct kvm_vcpu *) = vcpu->arch.complete_userspace_io; vcpu->arch.complete_userspace_io =NULL ; r =cui (vcpu);if (r <=0 ) - goto out; + goto out_fpu; }else WARN_ON (vcpu->arch.pio.count || vcpu->mmio_needed);
@@ -7442,6 +7439,8 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)else r =vcpu_run (vcpu); +out_fpu: +kvm_put_guest_fpu (vcpu); out:kvm_put_guest_fpu (vcpu);post_kvm_run_save (vcpu);
@@ -7865,32 +7864,25 @@ static void fx_init(struct kvm_vcpu *vcpu) vcpu->arch.cr0 |=X86_CR0_ET ; } +/* Swap (qemu) user FPU context for the guest FPU context. */ void kvm_load_guest_fpu (struct kvm_vcpu *vcpu) { -if (vcpu->guest_fpu_loaded) -return ; - -/* -* Restore all possible states in the guest, -* and assume host would use all available bits. -* Guest xcr0 would be loaded later. -*/ - vcpu->guest_fpu_loaded =1 ; -__kernel_fpu_begin (); +preempt_disable (); +copy_fpregs_to_fpstate (&vcpu->arch.user_fpu);/* PKRU is separately restored in kvm_x86_ops->run. */ __copy_kernel_to_fpregs (&vcpu->arch.guest_fpu.state, ~XFEATURE_MASK_PKRU ); +preempt_enable ();trace_kvm_fpu (1 ); } +/* When vcpu_run ends, restore user space FPU context. */ void kvm_put_guest_fpu (struct kvm_vcpu *vcpu) { -if (!vcpu->guest_fpu_loaded) -return ; - - vcpu->guest_fpu_loaded =0 ; +preempt_disable ();copy_fpregs_to_fpstate (&vcpu->arch.guest_fpu); -__kernel_fpu_end (); +copy_kernel_to_fpregs (&vcpu->arch.user_fpu.state); +preempt_enable (); ++vcpu->stat.fpu_reload;trace_kvm_fpu (0 ); }
drivers/acpi/pmic/intel_pmic_xpower.c +33 -8
63 lines not on this page · raw message
drivers/acpi/power.c +22 -0
@@ -131,6 +131,23 @@ void acpi_power_resources_list_free(struct list_head *list) } } +static bool acpi_power_resource_is_dup (union acpi_object *package, +unsigned int start,unsigned int i) +{ +acpi_handle rhandle, dup; +unsigned int j; + +/* The caller is expected to check the package element types */ + rhandle = package->package.elements[i].reference.handle; +for (j = start; j < i; j++) { + dup = package->package.elements[j].reference.handle; +if (dup == rhandle) +return true; + } + +return false; +} +int acpi_extract_power_resources (union acpi_object *package,unsigned int start,struct list_head *list) {
@@ -150,6 +167,11 @@ int acpi_extract_power_resources(union acpi_object *package, unsigned int start, err = -ENODEV ;break ; } + +/* Some ACPI tables contain duplicate power resource references */ +if (acpi_power_resource_is_dup (package, start, i)) +continue ; + err =acpi_add_power_resource (rhandle);if (err)break ;
drivers/block/rbd.c +4 -5
@@ -6308,7 +6308,6 @@ static ssize_t do_rbd_remove(struct bus_type *bus,struct list_head *tmp;int dev_id;char opt_buf[6 ]; -bool already = false;bool force = false;int ret;
@@ -6341,13 +6340,13 @@ static ssize_t do_rbd_remove(struct bus_type *bus,spin_lock_irq (&rbd_dev->lock);if (rbd_dev->open_count && !force) ret = -EBUSY ; -else - already =test_and_set_bit (RBD_DEV_FLAG_REMOVING , - &rbd_dev->flags); +else if (test_and_set_bit (RBD_DEV_FLAG_REMOVING , + &rbd_dev->flags)) + ret = -EINPROGRESS ;spin_unlock_irq (&rbd_dev->lock); }spin_unlock (&rbd_dev_list_lock); -if (ret <0 || already) +if (ret)return ret;if (force) {
drivers/gpu/drm/drm_fb_helper.c +73 -53
144 lines not on this page · raw message
drivers/i2c/i2c-dev.c +6 -0
@@ -461,9 +461,15 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)return i2cdev_ioctl_smbus (client, arg);case I2C_RETRIES : +if (arg >INT_MAX ) +return -EINVAL ; + client->adapter->retries = arg;break ;case I2C_TIMEOUT : +if (arg >INT_MAX ) +return -EINVAL ; +/* For historical reasons, user-space sets the timeout * value in units of 10 ms. */
drivers/usb/class/cdc-acm.c +7 -0
@@ -1893,6 +1893,13 @@ static const struct usb_device_id acm_ids[] = { .driver_info = IGNORE_DEVICE, }, + { USB_DEVICE(0x1bc7, 0x0021), /* Telit 3G ACM only composition */ + .driver_info =SEND_ZERO_PACKET , + }, + { USB_DEVICE(0x1bc7, 0x0023), /* Telit 3G ACM + ECM composition */ + .driver_info = SEND_ZERO_PACKET, + }, + /* control interfaces without any protocol set */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, USB_CDC_PROTO_NONE) },
drivers/usb/core/quirks.c +2 -1
@@ -240,7 +240,8 @@ static const struct usb_device_id usb_quirk_list[] = { USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },/* Corsair K70 RGB */ - { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT }, + { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT | + USB_QUIRK_DELAY_CTRL_MSG }, /* Corsair Strafe */ { USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT |
drivers/usb/storage/scsiglue.c +6 -2
@@ -251,8 +251,12 @@ static int slave_configure(struct scsi_device *sdev)if (!(us->fflags &US_FL_NEEDS_CAP16 )) sdev->try_rc_10_first =1 ; -/* assume SPC3 or latter devices support sense size > 18 */ -if (sdev->scsi_level >SCSI_SPC_2 ) +/* +* assume SPC3 or latter devices support sense size > 18 +* unless US_FL_BAD_SENSE quirk is specified. +*/ +if (sdev->scsi_level >SCSI_SPC_2 && + !(us->fflags &US_FL_BAD_SENSE )) us->fflags |=US_FL_SANE_SENSE ;/*
drivers/usb/storage/unusual_devs.h +12 -0
@@ -1284,6 +1284,18 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_FIX_CAPACITY ), +/* +* Reported by Icenowy Zheng <[email protected]> +* The SMI SM3350 USB-UFS bridge controller will enter a wrong state +* that do not process read/write command if a long sense is requested, +* so force to use 18-byte sense. +*/ +UNUSUAL_DEV (0x090c ,0x3350 ,0x0000 ,0xffff , +"SMI" , +"SM3350 UFS-to-USB-Mass-Storage bridge" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , + US_FL_BAD_SENSE ), +/* * Reported by Paul Hartman <[email protected]> * This card reader returns "Illegal Request, Logical Block Address
fs/cifs/file.c +4 -4
@@ -1120,10 +1120,10 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)/* * Accessing maxBuf is racy with cifs_reconnect - need to store value -* and check it for zero before using. +* and check it before using. */ max_buf = tcon->ses->server->maxBuf; -if (!max_buf) { +if (max_buf < (sizeof (struct smb_hdr ) +sizeof (LOCKING_ANDX_RANGE ))) {free_xid (xid);return -EINVAL ; }
@@ -1460,10 +1460,10 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,/* * Accessing maxBuf is racy with cifs_reconnect - need to store value -* and check it for zero before using. +* and check it before using. */ max_buf = tcon->ses->server->maxBuf; -if (!max_buf) +if (max_buf < (sizeof (struct smb_hdr ) +sizeof (LOCKING_ANDX_RANGE )))return -EINVAL ; max_num = (max_buf - sizeof(struct smb_hdr)) /
fs/cifs/smb2file.c +2 -2
@@ -124,10 +124,10 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,/* * Accessing maxBuf is racy with cifs_reconnect - need to store value -* and check it for zero before using. +* and check it before using. */ max_buf = tcon->ses->server->maxBuf; -if (!max_buf) +if (max_buf <sizeof (struct smb2_lock_element ))return -EINVAL ; max_num = max_buf /sizeof (struct smb2_lock_element );
fs/cifs/smb2pdu.c +6 -2
@@ -2632,12 +2632,14 @@ smb2_async_readv(struct cifs_readdata *rdata)if (rdata->credits) { shdr->CreditCharge =cpu_to_le16 (DIV_ROUND_UP (rdata->bytes,SMB2_MAX_BUFFER_SIZE )); - shdr->CreditRequest = shdr->CreditCharge; + shdr->CreditRequest = +cpu_to_le16 (le16_to_cpu (shdr->CreditCharge) +1 );spin_lock (&server->req_lock); server->credits += rdata->credits -le16_to_cpu (shdr->CreditCharge);spin_unlock (&server->req_lock);wake_up (&server->request_q); + rdata->credits =le16_to_cpu (shdr->CreditCharge); flags |=CIFS_HAS_CREDITS ; }
@@ -2842,12 +2844,14 @@ smb2_async_writev(struct cifs_writedata *wdata,if (wdata->credits) { shdr->CreditCharge =cpu_to_le16 (DIV_ROUND_UP (wdata->bytes,SMB2_MAX_BUFFER_SIZE )); - shdr->CreditRequest = shdr->CreditCharge; + shdr->CreditRequest = +cpu_to_le16 (le16_to_cpu (shdr->CreditCharge) +1 );spin_lock (&server->req_lock); server->credits += wdata->credits -le16_to_cpu (shdr->CreditCharge);spin_unlock (&server->req_lock);wake_up (&server->request_q); + wdata->credits =le16_to_cpu (shdr->CreditCharge); flags |=CIFS_HAS_CREDITS ; }
fs/cifs/transport.c +1 -1
@@ -318,7 +318,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)if (rc <0 && rc != -EINTR )cifs_dbg (VFS ,"Error %d sending data on socket to server\n" , rc); -else +else if (rc >0 ) rc =0 ;return rc;
fs/ext4/fsync.c +12 -4
@@ -116,8 +116,16 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) goto out; } + ret =file_write_and_wait_range (file, start, end); +if (ret) +return ret; +if (!journal) { - ret =__generic_file_fsync (file, start, end, datasync); +struct writeback_control wbc = { + .sync_mode =WB_SYNC_ALL + }; + + ret =ext4_write_inode (inode, &wbc);if (!ret) ret =ext4_sync_parent (inode);if (test_opt (inode->i_sb,BARRIER ))
@@ -125,9 +133,6 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) goto out; } - ret =file_write_and_wait_range (file, start, end); -if (ret) -return ret;/* * data=writeback,ordered: * The caller's filemap_fdatawrite()/wait will sync the data.
@@ -159,6 +164,9 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) ret = err; } out: + err =file_check_and_advance_wb_err (file); +if (ret ==0 ) + ret = err;trace_ext4_sync_file_exit (inode, ret);return ret; }
fs/ext4/inline.c +3 -3
@@ -1864,12 +1864,12 @@ int ext4_inline_data_fiemap(struct inode *inode, physical += (char *)ext4_raw_inode (&iloc) - iloc.bh->b_data; physical += offsetof(struct ext4_inode , i_block); -if (physical) - error =fiemap_fill_next_extent (fieinfo, start, physical, - inline_len, flags);brelse (iloc.bh); out:up_read (&EXT4_I (inode)->xattr_sem); +if (physical) + error =fiemap_fill_next_extent (fieinfo, start, physical, + inline_len, flags);return (error <0 ? error :0 ); }
fs/ext4/inode.c +2 -1
@@ -2776,7 +2776,8 @@ static int ext4_writepages(struct address_space *mapping,* We may need to convert up to one extent per block in * the page and we may dirty the inode. */ - rsv_blocks =1 + (PAGE_SIZE >> inode->i_blkbits); + rsv_blocks =1 +ext4_chunk_trans_blocks (inode, +PAGE_SIZE >> inode->i_blkbits); }/*
fs/ext4/super.c +1 -1
@@ -4844,7 +4844,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)ext4_superblock_csum_set (sb);if (sync)lock_buffer (sbh); -if (buffer_write_io_error (sbh)) { +if (buffer_write_io_error (sbh) || !buffer_uptodate (sbh)) {/* * Oh, dear. A previous attempt to write the * superblock failed. This could happen because the
include/linux/compiler-gcc.h +1 -1
@@ -108,7 +108,7 @@#define __weak __attribute__((weak))#define __alias (symbol) __attribute__((alias(#symbol))) -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE #define __noretpoline __attribute__((indirect_branch("keep")))#endif
include/linux/kvm_host.h +1 -1
@@ -232,7 +232,7 @@ struct kvm_vcpu {struct mutex mutex;struct kvm_run *run; -int guest_fpu_loaded, guest_xcr0_loaded; +int guest_xcr0_loaded;struct swait_queue_head wq;struct pid __rcu *pid;int sigset_active;
include/linux/module.h +1 -1
@@ -794,7 +794,7 @@ static inline void module_bug_finalize(const Elf_Ehdr *hdr,static inline void module_bug_cleanup (struct module *mod) {}#endif /* CONFIG_GENERIC_BUG */ -#ifdef RETPOLINE +#ifdef CONFIG_RETPOLINE extern bool retpoline_module_ok (bool has_retpoline);#else static inline bool retpoline_module_ok (bool has_retpoline)
include/linux/sunrpc/svc.h +4 -1
@@ -292,9 +292,12 @@ struct svc_rqst {struct svc_cacherep * rq_cacherep;/* cache info */ struct task_struct *rq_task;/* service thread */ spinlock_t rq_lock;/* per-request lock */ +struct net *rq_bc_net;/* pointer to backchannel's +* net namespace +*/ }; -#define SVC_NET (svc_rqst) (svc_rqst->rq_xprt->xpt_net) +#define SVC_NET (rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)/* * Rigorous type checking on sockaddr type conversions
mm/memory.c +23 -0
@@ -3191,6 +3191,29 @@ static int __do_fault(struct vm_fault *vmf)struct vm_area_struct *vma = vmf->vma;int ret; +/* +* Preallocate pte before we take page_lock because this might lead to +* deadlocks for memcg reclaim which waits for pages under writeback: +* lock_page(A) +* SetPageWriteback(A) +* unlock_page(A) +* lock_page(B) +* lock_page(B) +* pte_alloc_pne +* shrink_page_list +* wait_on_page_writeback(A) +* SetPageWriteback(B) +* unlock_page(B) +* # flush A, B to clear the writeback +*/ +if (pmd_none (*vmf->pmd) && !vmf->prealloc_pte) { + vmf->prealloc_pte =pte_alloc_one (vmf->vma->vm_mm, + vmf->address); +if (!vmf->prealloc_pte) +return VM_FAULT_OOM ; +smp_wmb ();/* See comment in __pte_alloc() */ + } + ret = vma->vm_ops->fault (vmf);if (unlikely (ret & (VM_FAULT_ERROR |VM_FAULT_NOPAGE |VM_FAULT_RETRY |VM_FAULT_DONE_COW )))
mm/slab.c +4 -2
@@ -679,8 +679,10 @@ static struct alien_cache *__alloc_alien_cache(int node, int entries,struct alien_cache *alc =NULL ; alc =kmalloc_node (memsize, gfp, node); -init_arraycache (&alc->ac, entries, batch); -spin_lock_init (&alc->lock); +if (alc) { +init_arraycache (&alc->ac, entries, batch); +spin_lock_init (&alc->lock); + }return alc; }
mm/util.c +1 -1
@@ -449,7 +449,7 @@ bool page_mapped(struct page *page)return true;if (PageHuge (page))return false; -for (i =0 ; i <hpage_nr_pages (page); i++) { +for (i =0 ; i < (1 <<compound_order (page)); i++) {if (atomic_read (&page[i]._mapcount) >=0 )return true; }
net/sunrpc/svc.c +7 -4
@@ -1144,6 +1144,8 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}#endif +extern void svc_tcp_prep_reply_hdr (struct svc_rqst *); +/* * Common routine for processing the RPC request. */
@@ -1172,7 +1174,8 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)clear_bit (RQ_DROPME , &rqstp->rq_flags);/* Setup reply header */ - rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr (rqstp); +if (rqstp->rq_prot ==IPPROTO_TCP ) +svc_tcp_prep_reply_hdr (rqstp);svc_putu32 (resv, rqstp->rq_xid);
@@ -1244,7 +1247,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)* for lower versions. RPC_PROG_MISMATCH seems to be the closest * fit. */ -if (versp->vs_need_cong_ctrl && +if (versp->vs_need_cong_ctrl && rqstp->rq_xprt && !test_bit (XPT_CONG_CTRL , &rqstp->rq_xprt->xpt_flags)) goto err_bad_vers;
@@ -1335,7 +1338,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)return 0 ; close: -if (test_bit (XPT_TEMP , &rqstp->rq_xprt->xpt_flags)) +if (rqstp->rq_xprt &&test_bit (XPT_TEMP , &rqstp->rq_xprt->xpt_flags))svc_close_xprt (rqstp->rq_xprt);dprintk ("svc: svc_process close\n" );return 0 ;
@@ -1462,10 +1465,10 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,dprintk ("svc: %s(%p)\n" , __func__, req);/* Build the svc_rqst used by the common processing routine */ - rqstp->rq_xprt = serv->sv_bc_xprt; rqstp->rq_xid = req->rq_xid; rqstp->rq_prot = req->rq_xprt->prot; rqstp->rq_server = serv; + rqstp->rq_bc_net = req->rq_xprt->xprt_net; rqstp->rq_addrlen =sizeof (req->rq_xprt->addr);memcpy (&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen);
net/sunrpc/svc_xprt.c +3 -2
@@ -510,10 +510,11 @@ static struct svc_xprt *svc_xprt_dequeue(struct svc_pool *pool)*/ void svc_reserve (struct svc_rqst *rqstp,int space) { +struct svc_xprt *xprt = rqstp->rq_xprt; + space += rqstp->rq_res.head[0 ].iov_len; -if (space < rqstp->rq_reserved) { -struct svc_xprt *xprt = rqstp->rq_xprt; +if (xprt && space < rqstp->rq_reserved) {atomic_sub ((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space;
net/sunrpc/svcsock.c +1 -1
@@ -1207,7 +1207,7 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)/* * Setup response header. TCP has a 4B record length field. */ -static void svc_tcp_prep_reply_hdr (struct svc_rqst *rqstp) +void svc_tcp_prep_reply_hdr (struct svc_rqst *rqstp) {struct kvec *resv = &rqstp->rq_res.head[0 ];
scripts/mod/modpost.c +1 -1
@@ -2168,7 +2168,7 @@ static void add_intree_flag(struct buffer *b, int is_intree)/* Cannot check for assembler */ static void add_retpoline (struct buffer *b) { -buf_printf (b,"\n#ifdef RETPOLINE\n" ); +buf_printf (b,"\n#ifdef CONFIG_RETPOLINE\n" );buf_printf (b,"MODULE_INFO(retpoline, \"Y\");\n" );buf_printf (b,"#endif\n" ); }
sound/pci/hda/patch_realtek.c +17 -1
@@ -4005,6 +4005,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)case 0x10ec0225 :case 0x10ec0295 :case 0x10ec0299 : +alc_process_coef_fw (codec, alc225_pre_hsmode);alc_process_coef_fw (codec, coef0225);break ;case 0x10ec0867 :
@@ -5252,6 +5253,13 @@ static void alc274_fixup_bind_dacs(struct hda_codec *codec, spec->gen.preferred_dacs = preferred_pairs; } +static void alc_fixup_disable_mic_vref (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +if (action ==HDA_FIXUP_ACT_PRE_PROBE ) +snd_hda_codec_set_pin_target (codec,0x19 ,PIN_VREFHIZ ); +} +/* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c"
@@ -5361,6 +5369,7 @@ enum {ALC293_FIXUP_LENOVO_SPK_NOISE ,ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY ,ALC255_FIXUP_DELL_SPK_NOISE , +ALC225_FIXUP_DISABLE_MIC_VREF ,ALC225_FIXUP_DELL1_MIC_NO_PRESENCE ,ALC295_FIXUP_DISABLE_DAC3 , ALC280_FIXUP_HP_HEADSET_MIC,
@@ -6062,6 +6071,12 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC255_FIXUP_DELL1_MIC_NO_PRESENCE }, + [ALC225_FIXUP_DISABLE_MIC_VREF] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_disable_mic_vref, + .chained = true, + .chain_id =ALC269_FIXUP_DELL1_MIC_NO_PRESENCE + }, [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_VERBS, .v.verbs = (const struct hda_verb []) {
@@ -6071,7 +6086,7 @@ static const struct hda_fixup alc269_fixups[] = { {} }, .chained = true, - .chain_id =ALC269_FIXUP_DELL1_MIC_NO_PRESENCE + .chain_id =ALC225_FIXUP_DISABLE_MIC_VREF }, [ALC280_FIXUP_HP_HEADSET_MIC] = { .type = HDA_FIXUP_FUNC,
@@ -6311,6 +6326,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1028 ,0x0871 ,"Dell Precision 3630" ,ALC255_FIXUP_DELL_HEADSET_MIC ),SND_PCI_QUIRK (0x1028 ,0x0872 ,"Dell Precision 3630" ,ALC255_FIXUP_DELL_HEADSET_MIC ),SND_PCI_QUIRK (0x1028 ,0x0873 ,"Dell Precision 3930" ,ALC255_FIXUP_DUMMY_LINEOUT_VERB ), +SND_PCI_QUIRK (0x1028 ,0x0935 ,"Dell" ,ALC274_FIXUP_DELL_AIO_LINEOUT_VERB ),SND_PCI_QUIRK (0x1028 ,0x164a ,"Dell" ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x164b ,"Dell" ,ALC293_FIXUP_DELL1_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
virt/kvm/arm/arm.c +11 -12
@@ -61,7 +61,7 @@ static DEFINE_PER_CPU(struct kvm_vcpu *, kvm_arm_running_vcpu);static atomic64_t kvm_vmid_gen =ATOMIC64_INIT (1 );static u32 kvm_next_vmid;static unsigned int kvm_vmid_bits__read_mostly ; -static DEFINE_RWLOCK (kvm_vmid_lock); +static DEFINE_SPINLOCK (kvm_vmid_lock);static bool vgic_present;
@@ -447,7 +447,9 @@ void force_vm_exit(const cpumask_t *mask)*/ static bool need_new_vmid_gen (struct kvm *kvm) { -return unlikely (kvm->arch.vmid_gen !=atomic64_read (&kvm_vmid_gen)); +u64 current_vmid_gen =atomic64_read (&kvm_vmid_gen); +smp_rmb ();/* Orders read of kvm_vmid_gen and kvm->arch.vmid */ +return unlikely (READ_ONCE (kvm->arch.vmid_gen) != current_vmid_gen); }/**
@@ -462,16 +464,11 @@ static void update_vttbr(struct kvm *kvm) {phys_addr_t pgd_phys;u64 vmid; -bool new_gen; -read_lock (&kvm_vmid_lock); - new_gen =need_new_vmid_gen (kvm); -read_unlock (&kvm_vmid_lock); - -if (!new_gen) +if (!need_new_vmid_gen (kvm))return ; -write_lock (&kvm_vmid_lock); +spin_lock (&kvm_vmid_lock);/* * We need to re-check the vmid_gen here to ensure that if another vcpu
@@ -479,7 +476,7 @@ static void update_vttbr(struct kvm *kvm)* use the same vmid. */ if (!need_new_vmid_gen (kvm)) { -write_unlock (&kvm_vmid_lock); +spin_unlock (&kvm_vmid_lock);return ; }
@@ -502,7 +499,6 @@ static void update_vttbr(struct kvm *kvm)kvm_call_hyp (__kvm_flush_vm_context); } - kvm->arch.vmid_gen =atomic64_read (&kvm_vmid_gen); kvm->arch.vmid = kvm_next_vmid; kvm_next_vmid++; kvm_next_vmid &= (1 << kvm_vmid_bits) -1 ;
@@ -513,7 +509,10 @@ static void update_vttbr(struct kvm *kvm) vmid = ((u64)(kvm->arch.vmid) <<VTTBR_VMID_SHIFT ) &VTTBR_VMID_MASK (kvm_vmid_bits); kvm->arch.vttbr = pgd_phys | vmid; -write_unlock (&kvm_vmid_lock); +smp_wmb (); +WRITE_ONCE (kvm->arch.vmid_gen,atomic64_read (&kvm_vmid_gen)); + +spin_unlock (&kvm_vmid_lock); }static int kvm_vcpu_first_run_init (struct kvm_vcpu *vcpu)