Linux 4.4.188
Greg KH
maintainerI'm announcing the release of the 4.4.188 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/arm/boot/dts/rk3288.dtsi | 1 arch/arm/mach-rpc/dma.c | 5 +++- arch/mips/lantiq/irq.c | 5 ++-- arch/x86/include/asm/apic.h | 2 - arch/x86/include/asm/kvm_host.h | 34 +++++++++++++++------------- arch/x86/kernel/apic/apic.c | 2 - arch/x86/math-emu/fpu_emu.h | 2 - arch/x86/math-emu/reg_constant.c | 2 - drivers/dma/sh/rcar-dmac.c | 2 - drivers/net/ethernet/emulex/benet/be_main.c | 6 ++++ drivers/s390/block/dasd_alias.c | 22 +++++++++++++----- drivers/s390/scsi/zfcp_erp.c | 7 +++++ drivers/xen/swiotlb-xen.c | 4 +-- fs/adfs/super.c | 5 +++- fs/btrfs/volumes.c | 3 -- fs/ceph/super.h | 7 ++++- fs/coda/psdev.c | 5 +++- include/linux/acpi.h | 5 +++- include/linux/coda.h | 3 -- include/linux/coda_psdev.h | 11 +++++++++ include/uapi/linux/coda_psdev.h | 13 ---------- ipc/mqueue.c | 19 ++++++++------- kernel/module.c | 6 +--- mm/cma.c | 13 ++++++++++ security/selinux/ss/policydb.c | 6 ++++ 26 files changed, 124 insertions(+), 68 deletions(-)
Andrea Parri (1):
ceph: fix improper use of smp_mb__before_atomic()
Arnd Bergmann (2):
ACPI: fix false-positive -Wuninitialized warning
x86: math-emu: Hide clang warnings for 16-bit overflow
Benjamin Block (1):
scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized
Benjamin Poirier (1):
be2net: Signal that the device cannot transmit during reconfiguration
David Sterba (1):
btrfs: fix minimum number of chunk errors for DUP
Doug Berger (1):
mm/cma.c: fail if fixed declaration can't be honored
Douglas Anderson (1):
ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend
Geert Uytterhoeven (1):
dmaengine: rcar-dmac: Reject zero-length slave DMA requests
Greg Kroah-Hartman (1):
Linux 4.4.188
Josh Poimboeuf (1):
x86/kvm: Don't call kvm_spurious_fault() from .fixup
Juergen Gross (1):
xen/swiotlb: fix condition for calling xen_destroy_contiguous_region()
Kees Cook (1):
ipc/mqueue.c: only perform resource calculation if user valid
Mikko Rapeli (1):
uapi linux/coda_psdev.h: move upc_req definition from uapi to kernel side headers
Ondrej Mosnacek (1):
selinux: fix memory leak in policydb_init()
Petr Cvek (1):
MIPS: lantiq: Fix bitfield masking
Prarit Bhargava (1):
kernel/module.c: Only return -EEXIST for modules that have finished loading
Qian Cai (1):
x86/apic: Silence -Wtype-limits compiler warnings
Russell King (2):
ARM: riscpc: fix DMA
fs/adfs: super: fix use-after-free bug
Sam Protsenko (1):
coda: fix build using bare-metal toolchain
Stefan Haberland (1):
s390/dasd: fix endless loop after read unit address configuration
Zhouyang Jia (1):
coda: add error handling for fget
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 187 +SUBLEVEL = 188 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/rk3288.dtsi +1 -0
@@ -205,6 +205,7 @@ <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; clock-frequency = <24000000>; + arm,no-tick-in-suspend; }; timer: timer@ff810000 {
arch/arm/mach-rpc/dma.c +4 -1
@@ -131,7 +131,7 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id) }while (1 ); idma->state = ~DMA_ST_AB ; -disable_irq (irq); +disable_irq_nosync (irq);return IRQ_HANDLED ; }
@@ -174,6 +174,9 @@ static void iomd_enable_dma(unsigned int chan, dma_t *dma) DMA_FROM_DEVICE : DMA_TO_DEVICE); } + idma->dma_addr = idma->dma.sg->dma_address; + idma->dma_len = idma->dma.sg->length; +iomd_writeb (DMA_CR_C , dma_base +CR ); idma->state =DMA_ST_AB ; }
arch/mips/lantiq/irq.c +3 -2
@@ -160,8 +160,9 @@ static int ltq_eiu_settype(struct irq_data *d, unsigned int type)if (edge)irq_set_handler (d->hwirq, handle_edge_irq); -ltq_eiu_w32 (ltq_eiu_r32 (LTQ_EIU_EXIN_C ) | - (val << (i *4 )),LTQ_EIU_EXIN_C ); +ltq_eiu_w32 ((ltq_eiu_r32 (LTQ_EIU_EXIN_C ) & + (~(7 << (i *4 )))) | (val << (i *4 )), +LTQ_EIU_EXIN_C ); } }
arch/x86/include/asm/apic.h +1 -1
@@ -44,7 +44,7 @@ static inline void generic_apic_probe(void)#ifdef CONFIG_X86_LOCAL_APIC -extern unsigned int apic_verbosity; +extern int apic_verbosity;extern int local_apic_timer_c2_ok;extern int disable_apic;
arch/x86/include/asm/kvm_host.h +19 -15
@@ -1184,25 +1184,29 @@ enum {#define kvm_arch_vcpu_memslots_id (vcpu) ((vcpu)->arch.hflags & HF_SMM_MASK ? 1 : 0)#define kvm_memslots_for_spte_role (kvm, role) __kvm_memslots(kvm, (role).smm) +asmlinkage void __noreturn kvm_spurious_fault(void); +/* * Hardware virtualization extension instructions may fault if a * reboot turns off virtualization while processes are running. -* Trap the fault and ignore the instruction if that happens. +* Usually after catching the fault we just panic; during reboot +* instead the instruction is ignored. */ -asmlinkage void kvm_spurious_fault(void); - -#define ____kvm_handle_fault_on_reboot (insn, cleanup_insn) \ - "666: " insn "\n\t" \ - "668: \n\t" \ - ".pushsection .fixup, \"ax\" \n" \ - "667: \n\t" \ - cleanup_insn "\n\t" \ - "cmpb $0, kvm_rebooting \n\t" \ - "jne 668b \n\t" \ - __ASM_SIZE(push) " $666b \n\t" \ - "jmp kvm_spurious_fault \n\t" \ - ".popsection \n\t" \ - _ASM_EXTABLE(666b, 667b) +#define ____kvm_handle_fault_on_reboot (insn, cleanup_insn) \ + "666: \n\t" \ + insn "\n\t" \ + "jmp 668f \n\t" \ + "667: \n\t" \ + "call kvm_spurious_fault \n\t" \ + "668: \n\t" \ + ".pushsection .fixup, \"ax\" \n\t" \ + "700: \n\t" \ + cleanup_insn "\n\t" \ + "cmpb $0, kvm_rebooting\n\t" \ + "je 667b \n\t" \ + "jmp 668b \n\t" \ + ".popsection \n\t" \ + _ASM_EXTABLE(666b, 700b)#define __kvm_handle_fault_on_reboot (insn) \ ____kvm_handle_fault_on_reboot(insn, "")
arch/x86/kernel/apic/apic.c +1 -1
@@ -171,7 +171,7 @@ int first_system_vector = FIRST_SYSTEM_VECTOR;/* * Debug level, exported for io_apic.c */ -unsigned int apic_verbosity; +int apic_verbosity;int pic_mode;
arch/x86/math-emu/fpu_emu.h +1 -1
@@ -176,7 +176,7 @@ static inline void reg_copy(FPU_REG const *x, FPU_REG *y)#define setexponentpos (x,y) { (*(short *)&((x)->exp)) = \ ((y) + EXTENDED_Ebias) & 0x7fff; }#define exponent16 (x) (*(short *)&((x)->exp)) -#define setexponent16 (x,y) { (*(short *)&((x)->exp)) = (y); } +#define setexponent16 (x,y) { (*(short *)&((x)->exp)) = (u16)(y); }#define addexponent (x,y) { (*(short *)&((x)->exp)) += (y); }#define stdexp (x) { (*(short *)&((x)->exp)) += EXTENDED_Ebias; }
arch/x86/math-emu/reg_constant.c +1 -1
@@ -17,7 +17,7 @@#include "control_w.h" #define MAKE_REG (s, e, l, h) { l, h, \ - ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) } + (u16)((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }FPU_REG const CONST_1 =MAKE_REG (POS ,0 ,0x00000000 ,0x80000000 );#if 0
drivers/dma/sh/rcar-dmac.c +1 -1
@@ -1030,7 +1030,7 @@ rcar_dmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,dma_addr_t dev_addr;/* Someone calling slave DMA on a generic channel? */ -if (rchan->mid_rid <0 || !sg_len) { +if (rchan->mid_rid <0 || !sg_len || !sg_dma_len (sgl)) {dev_warn (chan->device->dev,"%s: bad parameter: len=%d, id=%d\n" , __func__, sg_len, rchan->mid_rid);
drivers/net/ethernet/emulex/benet/be_main.c +5 -1
@@ -4307,8 +4307,12 @@ int be_update_queues(struct be_adapter *adapter)struct net_device *netdev = adapter->netdev;int status; -if (netif_running (netdev)) +if (netif_running (netdev)) { +/* device cannot transmit now, avoid dev_watchdog timeouts */ +netif_carrier_off (netdev); +be_close (netdev); + }be_cancel_worker (adapter);
drivers/s390/block/dasd_alias.c +16 -6
@@ -396,6 +396,20 @@ suborder_not_supported(struct dasd_ccw_req *cqr)char msg_format;char msg_no; +/* +* intrc values ENODEV, ENOLINK and EPERM +* will be optained from sleep_on to indicate that no +* IO operation can be started +*/ +if (cqr->intrc == -ENODEV ) +return 1 ; + +if (cqr->intrc == -ENOLINK ) +return 1 ; + +if (cqr->intrc == -EPERM ) +return 1 ; + sense =dasd_get_sense (&cqr->irb);if (!sense)return 0 ;
@@ -460,12 +474,8 @@ static int read_unit_address_configuration(struct dasd_device *device, lcu->flags &= ~NEED_UAC_UPDATE ;spin_unlock_irqrestore (&lcu->lock, flags); -do { - rc =dasd_sleep_on (cqr); -if (rc &&suborder_not_supported (cqr)) -return -EOPNOTSUPP ; - }while (rc && (cqr->retries >0 )); -if (rc) { + rc =dasd_sleep_on (cqr); +if (rc && !suborder_not_supported (cqr)) {spin_lock_irqsave (&lcu->lock, flags); lcu->flags |=NEED_UAC_UPDATE ;spin_unlock_irqrestore (&lcu->lock, flags);
drivers/s390/scsi/zfcp_erp.c +7 -0
@@ -10,6 +10,7 @@#define pr_fmt (fmt) KMSG_COMPONENT ": " fmt#include <linux/kthread.h> +#include <linux/bug.h> #include "zfcp_ext.h" #include "zfcp_reqlist.h"
@@ -244,6 +245,12 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,struct zfcp_erp_action *erp_action;struct zfcp_scsi_dev *zfcp_sdev; +if (WARN_ON_ONCE (need !=ZFCP_ERP_ACTION_REOPEN_LUN && + need !=ZFCP_ERP_ACTION_REOPEN_PORT && + need !=ZFCP_ERP_ACTION_REOPEN_PORT_FORCED && + need !=ZFCP_ERP_ACTION_REOPEN_ADAPTER )) +return NULL ; +switch (need) {case ZFCP_ERP_ACTION_REOPEN_LUN : zfcp_sdev =sdev_to_zfcp (sdev);
drivers/xen/swiotlb-xen.c +2 -2
@@ -365,8 +365,8 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,/* Convert the size to actually allocated. */ size =1UL << (order +XEN_PAGE_SHIFT ); -if (((dev_addr + size -1 <= dma_mask)) || -range_straddles_page_boundary (phys, size)) +if (!WARN_ON ((dev_addr + size -1 > dma_mask) || +range_straddles_page_boundary (phys, size)))xen_destroy_contiguous_region (phys, order);xen_free_coherent_pages (hwdev, size, vaddr, (dma_addr_t )phys, attrs);
fs/adfs/super.c +4 -1
@@ -368,6 +368,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)struct buffer_head *bh;struct object_info root_obj;unsigned char *b_data; +unsigned int blocksize;struct adfs_sb_info *asb;struct inode *root;int ret = -EINVAL ;
@@ -419,8 +420,10 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent) goto error_free_bh; } + blocksize =1 << dr->log2secsize;brelse (bh); -if (sb_set_blocksize (sb,1 << dr->log2secsize)) { + +if (sb_set_blocksize (sb, blocksize)) { bh =sb_bread (sb,ADFS_DISCRECORD / sb->s_blocksize);if (!bh) { adfs_error(sb, "couldn't read superblock on "
fs/btrfs/volumes.c +1 -2
@@ -4942,8 +4942,7 @@ static inline int btrfs_chunk_max_errors(struct map_lookup *map)if (map->type & (BTRFS_BLOCK_GROUP_RAID1 |BTRFS_BLOCK_GROUP_RAID10 | -BTRFS_BLOCK_GROUP_RAID5 | -BTRFS_BLOCK_GROUP_DUP )) { +BTRFS_BLOCK_GROUP_RAID5 )) { max_errors =1 ; }else if (map->type &BTRFS_BLOCK_GROUP_RAID6 ) { max_errors =2 ;
fs/ceph/super.h +6 -1
@@ -474,7 +474,12 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci,long long release_count, long long ordered_count) { -smp_mb__before_atomic (); +/* +* Makes sure operations that setup readdir cache (update page +* cache and i_size) are strongly ordered w.r.t. the following +* atomic64_set() operations. +*/ +smp_mb ();atomic64_set (&ci->i_complete_seq[0 ], release_count);atomic64_set (&ci->i_complete_seq[1 ], ordered_count); }
fs/coda/psdev.c +4 -1
@@ -187,8 +187,11 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,if (req->uc_opcode ==CODA_OPEN_BY_FD ) {struct coda_open_by_fd_out *outp = (struct coda_open_by_fd_out *)req->uc_data; -if (!outp->oh.result) +if (!outp->oh.result) { outp->fh =fget (outp->fd); +if (!outp->fh) +return -EBADF ; + } }wake_up (&req->uc_sleep);
include/linux/acpi.h +4 -1
@@ -226,7 +226,10 @@ void acpi_set_irq_model(enum acpi_irq_model_id model,#ifdef CONFIG_X86_IO_APIC extern int acpi_get_override_irq (u32 gsi,int *trigger,int *polarity);#else -#define acpi_get_override_irq (gsi, trigger, polarity) (-1) +static inline int acpi_get_override_irq (u32 gsi,int *trigger,int *polarity) +{ +return -1 ; +}#endif /* * This function undoes the effect of one call to acpi_register_gsi().
include/linux/coda.h +1 -2
@@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.#ifndef _CODA_HEADER_#define _CODA_HEADER_ -#if defined(__linux__)typedef unsigned long long u_quad_t ; -#endif +#include <uapi/linux/coda.h> #endif
include/linux/coda_psdev.h +11 -0
@@ -19,6 +19,17 @@ struct venus_comm {struct mutex vc_mutex; }; +/* messages between coda filesystem in kernel and Venus */ +struct upc_req { +struct list_head uc_chain; +caddr_t uc_data; +u_short uc_flags; +u_short uc_inSize;/* Size is at most 5000 bytes */ +u_short uc_outSize; +u_short uc_opcode;/* copied from data to save lookup */ +int uc_unique; +wait_queue_head_t uc_sleep;/* process' wait queue */ +};static inline struct venus_comm *coda_vcp (struct super_block *sb) {
include/uapi/linux/coda_psdev.h +0 -13
@@ -6,19 +6,6 @@#define CODA_PSDEV_MAJOR 67#define MAX_CODADEVS 5/* how many do we allow */ - -/* messages between coda filesystem in kernel and Venus */ -struct upc_req { -struct list_head uc_chain; -caddr_t uc_data; -u_short uc_flags; -u_short uc_inSize;/* Size is at most 5000 bytes */ -u_short uc_outSize; -u_short uc_opcode;/* copied from data to save lookup */ -int uc_unique; -wait_queue_head_t uc_sleep;/* process' wait queue */ -}; -#define CODA_REQ_ASYNC 0x1#define CODA_REQ_READ 0x2#define CODA_REQ_WRITE 0x4
ipc/mqueue.c +10 -9
@@ -371,7 +371,6 @@ static void mqueue_evict_inode(struct inode *inode) {struct mqueue_inode_info *info;struct user_struct *user; -unsigned long mq_bytes, mq_treesize;struct ipc_namespace *ipc_ns;struct msg_msg *msg, *nmsg;LIST_HEAD (tmp_msg);
@@ -394,16 +393,18 @@ static void mqueue_evict_inode(struct inode *inode)free_msg (msg); } -/* Total amount of bytes accounted for the mqueue */ - mq_treesize = info->attr.mq_maxmsg *sizeof (struct msg_msg ) + - min_t(unsigned int, info->attr.mq_maxmsg, MQ_PRIO_MAX) * -sizeof (struct posix_msg_tree_node ); - - mq_bytes = mq_treesize + (info->attr.mq_maxmsg * - info->attr.mq_msgsize); - user = info->user;if (user) { +unsigned long mq_bytes, mq_treesize; + +/* Total amount of bytes accounted for the mqueue */ + mq_treesize = info->attr.mq_maxmsg *sizeof (struct msg_msg ) + + min_t(unsigned int, info->attr.mq_maxmsg, MQ_PRIO_MAX) * +sizeof (struct posix_msg_tree_node ); + + mq_bytes = mq_treesize + (info->attr.mq_maxmsg * + info->attr.mq_msgsize); +spin_lock (&mq_lock); user->mq_bytes -= mq_bytes;/*
kernel/module.c +2 -4
@@ -3225,8 +3225,7 @@ static bool finished_loading(const char *name)sched_annotate_sleep ();mutex_lock (&module_mutex); mod =find_module_all (name,strlen (name), true); - ret = !mod || mod->state ==MODULE_STATE_LIVE - || mod->state ==MODULE_STATE_GOING ; + ret = !mod || mod->state ==MODULE_STATE_LIVE ;mutex_unlock (&module_mutex);return ret;
@@ -3385,8 +3384,7 @@ again:mutex_lock (&module_mutex); old =find_module_all (mod->name,strlen (mod->name), true);if (old !=NULL ) { -if (old->state ==MODULE_STATE_COMING - || old->state ==MODULE_STATE_UNFORMED ) { +if (old->state !=MODULE_STATE_LIVE ) {/* Wait in case it fails to load. */ mutex_unlock (&module_mutex); err = wait_event_interruptible(module_wq,
mm/cma.c +13 -0
@@ -268,6 +268,12 @@ int __init cma_declare_contiguous(phys_addr_t base,*/ alignment =max (alignment, (phys_addr_t )PAGE_SIZE << max_t(unsigned long, MAX_ORDER - 1, pageblock_order)); +if (fixed && base & (alignment -1 )) { + ret = -EINVAL ; +pr_err ("Region at %pa must be aligned to %pa bytes\n" , + &base, &alignment); + goto err; + } base =ALIGN (base, alignment); size =ALIGN (size, alignment); limit &= ~(alignment -1 );
@@ -298,6 +304,13 @@ int __init cma_declare_contiguous(phys_addr_t base,if (limit ==0 || limit > memblock_end) limit = memblock_end; +if (base + size > limit) { + ret = -EINVAL ; +pr_err ("Size (%pa) of region at %pa exceeds limit (%pa)\n" , + &size, &base, &limit); + goto err; + } +/* Reserve memory */ if (fixed) { if (memblock_is_region_reserved(base, size) ||
security/selinux/ss/policydb.c +5 -1
@@ -266,6 +266,8 @@ static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2)return v; } +static int (*destroy_f[SYM_NUM ]) (void *key,void *datum,void *datap); +/* * Initialize a policy database structure. */
@@ -313,8 +315,10 @@ static int policydb_init(struct policydb *p) out:hashtab_destroy (p->filename_trans);hashtab_destroy (p->range_tr); -for (i =0 ; i <SYM_NUM ; i++) +for (i =0 ; i <SYM_NUM ; i++) { +hashtab_map (p->symtab[i].table, destroy_f[i],NULL );hashtab_destroy (p->symtab[i].table); + }return rc; }