Linux 4.9.47

2017-09-01 Thread Greg KH
I'm announcing the release of the 4.9.47 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/mmu.c   |   16 ++---
 arch/arm64/kernel/fpsimd.c   |2 
 arch/arm64/mm/fault.c|5 +
 arch/x86/include/asm/io.h|4 -
 drivers/net/wireless/intersil/p54/fwio.c |2 
 drivers/scsi/isci/remote_node_context.c  |3 +
 drivers/scsi/sg.c|   49 ++---
 drivers/staging/wilc1000/linux_wlan.c|   34 +++-
 kernel/gcov/base.c   |6 ++
 kernel/gcov/gcc_4_7.c|4 +
 kernel/locking/spinlock_debug.c  |   86 +--
 lib/lz4/lz4hc_compress.c |2 
 13 files changed, 73 insertions(+), 142 deletions(-)

Arnd Bergmann (3):
  scsi: isci: avoid array subscript warning
  staging: wilc1000: simplify vif[i]->ndev accesses
  x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl

Dave Martin (1):
  arm64: fpsimd: Prevent registers leaking across exec

Greg Kroah-Hartman (2):
  lz4: fix bogus gcc warning
  Linux 4.9.47

Hannes Reinecke (2):
  scsi: sg: protect accesses to 'reserved' page array
  scsi: sg: reset 'res_in_use' after unlinking reserved array

Jiri Slaby (1):
  p54: memset(0) whole array

Mark Rutland (1):
  arm64: mm: abort uaccess retries upon fatal signal

Martin Liska (1):
  gcov: support GCC 7.1

Suzuki K Poulose (1):
  kvm: arm/arm64: Fix race in resetting stage2 PGD

Waiman Long (1):
  locking/spinlock/debug: Remove spinlock lockup detection code



signature.asc
Description: PGP signature


Linux 4.9.47

2017-09-01 Thread Greg KH
I'm announcing the release of the 4.9.47 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/mmu.c   |   16 ++---
 arch/arm64/kernel/fpsimd.c   |2 
 arch/arm64/mm/fault.c|5 +
 arch/x86/include/asm/io.h|4 -
 drivers/net/wireless/intersil/p54/fwio.c |2 
 drivers/scsi/isci/remote_node_context.c  |3 +
 drivers/scsi/sg.c|   49 ++---
 drivers/staging/wilc1000/linux_wlan.c|   34 +++-
 kernel/gcov/base.c   |6 ++
 kernel/gcov/gcc_4_7.c|4 +
 kernel/locking/spinlock_debug.c  |   86 +--
 lib/lz4/lz4hc_compress.c |2 
 13 files changed, 73 insertions(+), 142 deletions(-)

Arnd Bergmann (3):
  scsi: isci: avoid array subscript warning
  staging: wilc1000: simplify vif[i]->ndev accesses
  x86/io: Add "memory" clobber to insb/insw/insl/outsb/outsw/outsl

Dave Martin (1):
  arm64: fpsimd: Prevent registers leaking across exec

Greg Kroah-Hartman (2):
  lz4: fix bogus gcc warning
  Linux 4.9.47

Hannes Reinecke (2):
  scsi: sg: protect accesses to 'reserved' page array
  scsi: sg: reset 'res_in_use' after unlinking reserved array

Jiri Slaby (1):
  p54: memset(0) whole array

Mark Rutland (1):
  arm64: mm: abort uaccess retries upon fatal signal

Martin Liska (1):
  gcov: support GCC 7.1

Suzuki K Poulose (1):
  kvm: arm/arm64: Fix race in resetting stage2 PGD

Waiman Long (1):
  locking/spinlock/debug: Remove spinlock lockup detection code



signature.asc
Description: PGP signature


Re: Linux 4.9.47

2017-09-01 Thread Greg KH
diff --git a/Makefile b/Makefile
index 846ef1b57a02..a0abbfc15a49 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 46
+SUBLEVEL = 47
 EXTRAVERSION =
 NAME = Roaring Lionus
 
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 710511cadd50..0c060c5e844a 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -829,22 +829,22 @@ void stage2_unmap_vm(struct kvm *kvm)
  * Walks the level-1 page table pointed to by kvm->arch.pgd and frees all
  * underlying level-2 and level-3 tables before freeing the actual level-1 
table
  * and setting the struct pointer to NULL.
- *
- * Note we don't need locking here as this is only called when the VM is
- * destroyed, which can only be done once.
  */
 void kvm_free_stage2_pgd(struct kvm *kvm)
 {
-   if (kvm->arch.pgd == NULL)
-   return;
+   void *pgd = NULL;
 
spin_lock(>mmu_lock);
-   unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
+   if (kvm->arch.pgd) {
+   unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
+   pgd = kvm->arch.pgd;
+   kvm->arch.pgd = NULL;
+   }
spin_unlock(>mmu_lock);
 
/* Free the HW pgd, one page at a time */
-   free_pages_exact(kvm->arch.pgd, S2_PGD_SIZE);
-   kvm->arch.pgd = NULL;
+   if (pgd)
+   free_pages_exact(pgd, S2_PGD_SIZE);
 }
 
 static pud_t *stage2_get_pud(struct kvm *kvm, struct kvm_mmu_memory_cache 
*cache,
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 394c61db5566..1d5890f19ca3 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -157,9 +157,11 @@ void fpsimd_thread_switch(struct task_struct *next)
 
 void fpsimd_flush_thread(void)
 {
+   preempt_disable();
memset(>thread.fpsimd_state, 0, sizeof(struct fpsimd_state));
fpsimd_flush_task_state(current);
set_thread_flag(TIF_FOREIGN_FPSTATE);
+   preempt_enable();
 }
 
 /*
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 0e90c7e0279c..fec5b1ce97f8 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -373,8 +373,11 @@ static int __kprobes do_page_fault(unsigned long addr, 
unsigned int esr,
 * signal first. We do not need to release the mmap_sem because it
 * would already be released in __lock_page_or_retry in mm/filemap.c.
 */
-   if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
+   if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
+   if (!user_mode(regs))
+   goto no_context;
return 0;
+   }
 
/*
 * Major/minor page fault accounting is only done on the initial
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index d34bd370074b..6c5020163db0 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -304,13 +304,13 @@ static inline unsigned type in##bwl##_p(int port) 
\
 static inline void outs##bwl(int port, const void *addr, unsigned long count) \
 {  \
asm volatile("rep; outs" #bwl   \
-: "+S"(addr), "+c"(count) : "d"(port));\
+: "+S"(addr), "+c"(count) : "d"(port) : "memory"); \
 }  \
\
 static inline void ins##bwl(int port, void *addr, unsigned long count) \
 {  \
asm volatile("rep; ins" #bwl\
-: "+D"(addr), "+c"(count) : "d"(port));\
+: "+D"(addr), "+c"(count) : "d"(port) : "memory"); \
 }
 
 BUILDIO(b, b, char)
diff --git a/drivers/net/wireless/intersil/p54/fwio.c 
b/drivers/net/wireless/intersil/p54/fwio.c
index 257a9eadd595..4ac6764f4897 100644
--- a/drivers/net/wireless/intersil/p54/fwio.c
+++ b/drivers/net/wireless/intersil/p54/fwio.c
@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)
 
entry += sizeof(__le16);
chan->pa_points_per_curve = 8;
-   memset(chan->curve_data, 0, sizeof(*chan->curve_data));
+   memset(chan->curve_data, 0, sizeof(chan->curve_data));
memcpy(chan->curve_data, entry,
   sizeof(struct p54_pa_curve_data_sample) *
   min((u8)8, curve_data->points_per_channel));
diff --git a/drivers/scsi/isci/remote_node_context.c 
b/drivers/scsi/isci/remote_node_context.c
index 1910100638a2..00602abec0ea 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -66,6 +66,9 @@ const char *rnc_state_name(enum 

Re: Linux 4.9.47

2017-09-01 Thread Greg KH
diff --git a/Makefile b/Makefile
index 846ef1b57a02..a0abbfc15a49 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 46
+SUBLEVEL = 47
 EXTRAVERSION =
 NAME = Roaring Lionus
 
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 710511cadd50..0c060c5e844a 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -829,22 +829,22 @@ void stage2_unmap_vm(struct kvm *kvm)
  * Walks the level-1 page table pointed to by kvm->arch.pgd and frees all
  * underlying level-2 and level-3 tables before freeing the actual level-1 
table
  * and setting the struct pointer to NULL.
- *
- * Note we don't need locking here as this is only called when the VM is
- * destroyed, which can only be done once.
  */
 void kvm_free_stage2_pgd(struct kvm *kvm)
 {
-   if (kvm->arch.pgd == NULL)
-   return;
+   void *pgd = NULL;
 
spin_lock(>mmu_lock);
-   unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
+   if (kvm->arch.pgd) {
+   unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
+   pgd = kvm->arch.pgd;
+   kvm->arch.pgd = NULL;
+   }
spin_unlock(>mmu_lock);
 
/* Free the HW pgd, one page at a time */
-   free_pages_exact(kvm->arch.pgd, S2_PGD_SIZE);
-   kvm->arch.pgd = NULL;
+   if (pgd)
+   free_pages_exact(pgd, S2_PGD_SIZE);
 }
 
 static pud_t *stage2_get_pud(struct kvm *kvm, struct kvm_mmu_memory_cache 
*cache,
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 394c61db5566..1d5890f19ca3 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -157,9 +157,11 @@ void fpsimd_thread_switch(struct task_struct *next)
 
 void fpsimd_flush_thread(void)
 {
+   preempt_disable();
memset(>thread.fpsimd_state, 0, sizeof(struct fpsimd_state));
fpsimd_flush_task_state(current);
set_thread_flag(TIF_FOREIGN_FPSTATE);
+   preempt_enable();
 }
 
 /*
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 0e90c7e0279c..fec5b1ce97f8 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -373,8 +373,11 @@ static int __kprobes do_page_fault(unsigned long addr, 
unsigned int esr,
 * signal first. We do not need to release the mmap_sem because it
 * would already be released in __lock_page_or_retry in mm/filemap.c.
 */
-   if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
+   if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
+   if (!user_mode(regs))
+   goto no_context;
return 0;
+   }
 
/*
 * Major/minor page fault accounting is only done on the initial
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index d34bd370074b..6c5020163db0 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -304,13 +304,13 @@ static inline unsigned type in##bwl##_p(int port) 
\
 static inline void outs##bwl(int port, const void *addr, unsigned long count) \
 {  \
asm volatile("rep; outs" #bwl   \
-: "+S"(addr), "+c"(count) : "d"(port));\
+: "+S"(addr), "+c"(count) : "d"(port) : "memory"); \
 }  \
\
 static inline void ins##bwl(int port, void *addr, unsigned long count) \
 {  \
asm volatile("rep; ins" #bwl\
-: "+D"(addr), "+c"(count) : "d"(port));\
+: "+D"(addr), "+c"(count) : "d"(port) : "memory"); \
 }
 
 BUILDIO(b, b, char)
diff --git a/drivers/net/wireless/intersil/p54/fwio.c 
b/drivers/net/wireless/intersil/p54/fwio.c
index 257a9eadd595..4ac6764f4897 100644
--- a/drivers/net/wireless/intersil/p54/fwio.c
+++ b/drivers/net/wireless/intersil/p54/fwio.c
@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)
 
entry += sizeof(__le16);
chan->pa_points_per_curve = 8;
-   memset(chan->curve_data, 0, sizeof(*chan->curve_data));
+   memset(chan->curve_data, 0, sizeof(chan->curve_data));
memcpy(chan->curve_data, entry,
   sizeof(struct p54_pa_curve_data_sample) *
   min((u8)8, curve_data->points_per_channel));
diff --git a/drivers/scsi/isci/remote_node_context.c 
b/drivers/scsi/isci/remote_node_context.c
index 1910100638a2..00602abec0ea 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -66,6 +66,9 @@ const char *rnc_state_name(enum