Re: Linux 4.4.22

2016-09-24 Thread Greg KH
diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt 
b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
index a9a5fe19ff2a..ec9d65682702 100644
--- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
@@ -12,6 +12,11 @@ Required properties:
 - vref-supply: The regulator supply ADC reference voltage.
 - #io-channel-cells: Should be 1, see ../iio-bindings.txt
 
+Optional properties:
+- resets: Must contain an entry for each entry in reset-names if need support
+ this option. See ../reset/reset.txt for details.
+- reset-names: Must include the name "saradc-apb".
+
 Example:
saradc: saradc@2006c000 {
compatible = "rockchip,saradc";
@@ -19,6 +24,8 @@ Example:
interrupts = ;
clocks = < SCLK_SARADC>, < PCLK_SARADC>;
clock-names = "saradc", "apb_pclk";
+   resets = < SRST_SARADC>;
+   reset-names = "saradc-apb";
#io-channel-cells = <1>;
vref-supply = <>;
};
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index aaeafa18d99b..c99a75968c01 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -1538,9 +1538,9 @@ set_cmdline(struct mic_info *mic)
 
len = snprintf(buffer, PATH_MAX,
"clocksource=tsc highres=off nohz=off ");
-   len += snprintf(buffer + len, PATH_MAX,
+   len += snprintf(buffer + len, PATH_MAX - len,
"cpufreq_on;corec6_off;pc3_off;pc6_off ");
-   len += snprintf(buffer + len, PATH_MAX,
+   len += snprintf(buffer + len, PATH_MAX - len,
"ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0",
mic->id + 1);
 
diff --git a/Makefile b/Makefile
index d1cc9e0b7473..a6512f4eec9f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 21
+SUBLEVEL = 22
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
diff --git a/arch/alpha/include/asm/uaccess.h b/arch/alpha/include/asm/uaccess.h
index 9b0d40093c9a..c0ddbbf73400 100644
--- a/arch/alpha/include/asm/uaccess.h
+++ b/arch/alpha/include/asm/uaccess.h
@@ -371,14 +371,6 @@ __copy_tofrom_user_nocheck(void *to, const void *from, 
long len)
return __cu_len;
 }
 
-extern inline long
-__copy_tofrom_user(void *to, const void *from, long len, const void __user 
*validate)
-{
-   if (__access_ok((unsigned long)validate, len, get_fs()))
-   len = __copy_tofrom_user_nocheck(to, from, len);
-   return len;
-}
-
 #define __copy_to_user(to, from, n)\
 ({ \
__chk_user_ptr(to); \
@@ -393,17 +385,22 @@ __copy_tofrom_user(void *to, const void *from, long len, 
const void __user *vali
 #define __copy_to_user_inatomic __copy_to_user
 #define __copy_from_user_inatomic __copy_from_user
 
-
 extern inline long
 copy_to_user(void __user *to, const void *from, long n)
 {
-   return __copy_tofrom_user((__force void *)to, from, n, to);
+   if (likely(__access_ok((unsigned long)to, n, get_fs(
+   n = __copy_tofrom_user_nocheck((__force void *)to, from, n);
+   return n;
 }
 
 extern inline long
 copy_from_user(void *to, const void __user *from, long n)
 {
-   return __copy_tofrom_user(to, (__force void *)from, n, from);
+   if (likely(__access_ok((unsigned long)from, n, get_fs(
+   n = __copy_tofrom_user_nocheck(to, (__force void *)from, n);
+   else
+   memset(to, 0, n);
+   return n;
 }
 
 extern void __do_clear_user(void);
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
index 3cab04255ae0..e5fec320f158 100644
--- a/arch/arc/include/asm/pgtable.h
+++ b/arch/arc/include/asm/pgtable.h
@@ -277,8 +277,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
 
 #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
 #define pte_pfn(pte)   (pte_val(pte) >> PAGE_SHIFT)
-#define pfn_pte(pfn, prot) (__pte(((pte_t)(pfn) << PAGE_SHIFT) | \
-pgprot_val(prot)))
+#define pfn_pte(pfn, prot) (__pte(((pfn) << PAGE_SHIFT) | 
pgprot_val(prot)))
 #define __pte_index(addr)  (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 
 /*
diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h
index d1da6032b715..d4d8df706efa 100644
--- a/arch/arc/include/asm/uaccess.h
+++ b/arch/arc/include/asm/uaccess.h
@@ -83,7 +83,10 @@
"2: ;nop\n" \
"   .section .fixup, \"ax\"\n"  \
"   .align 4\n" \
-   "3: mov %0, %3\n"   \
+   "3: # return -EFAULT\n" \
+   "   mov %0, %3\n"   \
+   "   

Re: Linux 4.4.22

2016-09-24 Thread Greg KH
diff --git a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt 
b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
index a9a5fe19ff2a..ec9d65682702 100644
--- a/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt
@@ -12,6 +12,11 @@ Required properties:
 - vref-supply: The regulator supply ADC reference voltage.
 - #io-channel-cells: Should be 1, see ../iio-bindings.txt
 
+Optional properties:
+- resets: Must contain an entry for each entry in reset-names if need support
+ this option. See ../reset/reset.txt for details.
+- reset-names: Must include the name "saradc-apb".
+
 Example:
saradc: saradc@2006c000 {
compatible = "rockchip,saradc";
@@ -19,6 +24,8 @@ Example:
interrupts = ;
clocks = < SCLK_SARADC>, < PCLK_SARADC>;
clock-names = "saradc", "apb_pclk";
+   resets = < SRST_SARADC>;
+   reset-names = "saradc-apb";
#io-channel-cells = <1>;
vref-supply = <>;
};
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index aaeafa18d99b..c99a75968c01 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -1538,9 +1538,9 @@ set_cmdline(struct mic_info *mic)
 
len = snprintf(buffer, PATH_MAX,
"clocksource=tsc highres=off nohz=off ");
-   len += snprintf(buffer + len, PATH_MAX,
+   len += snprintf(buffer + len, PATH_MAX - len,
"cpufreq_on;corec6_off;pc3_off;pc6_off ");
-   len += snprintf(buffer + len, PATH_MAX,
+   len += snprintf(buffer + len, PATH_MAX - len,
"ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0",
mic->id + 1);
 
diff --git a/Makefile b/Makefile
index d1cc9e0b7473..a6512f4eec9f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 21
+SUBLEVEL = 22
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
diff --git a/arch/alpha/include/asm/uaccess.h b/arch/alpha/include/asm/uaccess.h
index 9b0d40093c9a..c0ddbbf73400 100644
--- a/arch/alpha/include/asm/uaccess.h
+++ b/arch/alpha/include/asm/uaccess.h
@@ -371,14 +371,6 @@ __copy_tofrom_user_nocheck(void *to, const void *from, 
long len)
return __cu_len;
 }
 
-extern inline long
-__copy_tofrom_user(void *to, const void *from, long len, const void __user 
*validate)
-{
-   if (__access_ok((unsigned long)validate, len, get_fs()))
-   len = __copy_tofrom_user_nocheck(to, from, len);
-   return len;
-}
-
 #define __copy_to_user(to, from, n)\
 ({ \
__chk_user_ptr(to); \
@@ -393,17 +385,22 @@ __copy_tofrom_user(void *to, const void *from, long len, 
const void __user *vali
 #define __copy_to_user_inatomic __copy_to_user
 #define __copy_from_user_inatomic __copy_from_user
 
-
 extern inline long
 copy_to_user(void __user *to, const void *from, long n)
 {
-   return __copy_tofrom_user((__force void *)to, from, n, to);
+   if (likely(__access_ok((unsigned long)to, n, get_fs(
+   n = __copy_tofrom_user_nocheck((__force void *)to, from, n);
+   return n;
 }
 
 extern inline long
 copy_from_user(void *to, const void __user *from, long n)
 {
-   return __copy_tofrom_user(to, (__force void *)from, n, from);
+   if (likely(__access_ok((unsigned long)from, n, get_fs(
+   n = __copy_tofrom_user_nocheck(to, (__force void *)from, n);
+   else
+   memset(to, 0, n);
+   return n;
 }
 
 extern void __do_clear_user(void);
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
index 3cab04255ae0..e5fec320f158 100644
--- a/arch/arc/include/asm/pgtable.h
+++ b/arch/arc/include/asm/pgtable.h
@@ -277,8 +277,7 @@ static inline void pmd_set(pmd_t *pmdp, pte_t *ptep)
 
 #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
 #define pte_pfn(pte)   (pte_val(pte) >> PAGE_SHIFT)
-#define pfn_pte(pfn, prot) (__pte(((pte_t)(pfn) << PAGE_SHIFT) | \
-pgprot_val(prot)))
+#define pfn_pte(pfn, prot) (__pte(((pfn) << PAGE_SHIFT) | 
pgprot_val(prot)))
 #define __pte_index(addr)  (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 
 /*
diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h
index d1da6032b715..d4d8df706efa 100644
--- a/arch/arc/include/asm/uaccess.h
+++ b/arch/arc/include/asm/uaccess.h
@@ -83,7 +83,10 @@
"2: ;nop\n" \
"   .section .fixup, \"ax\"\n"  \
"   .align 4\n" \
-   "3: mov %0, %3\n"   \
+   "3: # return -EFAULT\n" \
+   "   mov %0, %3\n"   \
+   "   

Linux 4.4.22

2016-09-24 Thread Greg KH
 copy_from_user()
  microblaze: fix copy_from_user()
  fix minor infoleak in get_user_ex()
  mn10300: failing __get_user() and get_user() should zero
  m32r: fix __get_user()
  sh64: failing __get_user() should zero
  nios2: fix __get_user()
  score: fix __get_user/get_user
  s390: get_user() should zero on failure
  asm-generic: make get_user() clear the destination on errors
  frv: fix clear_user()
  cris: buggered copy_from_user/copy_to_user/clear_user
  blackfin: fix copy_from_user()
  score: fix copy_from_user() and friends
  sh: fix copy_from_user()
  hexagon: fix strncpy_from_user() error return
  mips: copy_from_user() must zero the destination on access_ok() failure
  asm-generic: make copy_from_user() zero the destination properly
  alpha: fix copy_from_user()
  metag: copy_from_user() should zero the destination on access_ok() failure
  parisc: fix copy_from_user()
  openrisc: fix copy_from_user()
  nios2: copy_from_user() should zero the tail of destination
  mn10300: copy_from_user() should zero on access_ok() failure...
  sparc32: fix copy_from_user()
  ppc32: fix copy_from_user()
  ia64: copy_from_user() should zero the destination on access_ok() failure

Alan Stern (1):
  USB: change bInterval default to 10 ms

Alison Schofield (1):
  iio: proximity: as3935: set up buffer timestamps for non-zero values

Anders Darander (1):
  iio: adc: at91: unbreak channel adc channel 3

Andy Shevchenko (1):
  serial: 8250_mid: fix divide error bug if baud rate is 0

Anson Huang (1):
  ARM: imx6: add missing BM_CLPCR_BYPASS_PMIC_READY setting for imx6sx

Ard Biesheuvel (1):
  crypto: cryptd - initialize child shash_desc on import

Arnd Bergmann (5):
  mmc: dw_mmc: use resource_size_t to store physical address
  pinctrl: at91-pio4: use %pr format string for resource
  soc: qcom/spm: shut up uninitialized variable warning
  kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  net: simplify napi_synchronize() to avoid warnings

Balbir Singh (1):
  sched/core: Fix a race between try_to_wake_up() and a woken up task

Boris Brezillon (2):
  genirq: Provide irq_gc_{lock_irqsave,unlock_irqrestore}() helpers
  irqchip/atmel-aic: Fix potential deadlock in ->xlate()

Caesar Wang (1):
  iio: adc: rockchip_saradc: reset saradc controller before programming it

Chen-Yu Tsai (1):
  clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe 
function

Chris Mason (1):
  Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns

Chuck Lever (1):
  nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock

Clemens Gruber (1):
  usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase

Colin Ian King (1):
  iio: ensure ret is initialized to zero before entering do loop

Daniele Palmas (1):
  USB: serial: simple: add support for another Infineon flashloader

David Daney (1):
  net: thunderx: Fix OOPs with ethtool --register-dump

Emanuel Czirai (1):
  x86/AMD: Apply erratum 665 on machines without a BIOS fix

Eric Biggers (2):
  fscrypto: add authorization check for setting encryption policy
  fscrypto: require write access to mount to set encryption policy

Fabio Estevam (1):
  ARM: dts: imx6qdl: Fix SPDIF regression

Felix Fietkau (1):
  ath9k: fix using sta->drv_priv before initializing it

Greg Kroah-Hartman (1):
  Linux 4.4.22

Gregor Boirie (1):
  iio:core: fix IIO_VAL_FRACTIONAL sign handling

Guenter Roeck (2):
  avr32: fix 'undefined reference to `___copy_from_user'
  openrisc: fix the fix of copy_from_user()

Guoqing Jiang (1):
  md-cluster: make md-cluster also can work when compiled into kernel

Icenowy Zheng (1):
  pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33

James Hartley (1):
  pinctrl: pistachio: fix mfio pll_lock pinmux

James Hogan (1):
  MIPS: KVM: Check for pfn noslot case

Jan Leupold (1):
  drm: atmel-hlcdc: Fix vertical scaling

Jason Gunthorpe (1):
  IB/uverbs: Fix race between uverbs_close and remove_one

Jimi Damon (1):
  serial: 8250: added acces i/o products quad and octal serial cards

Johan Hovold (2):
  ARM: dts: overo: fix gpmc nand cs0 range
  ARM: dts: overo: fix gpmc nand on boards with ethernet

Johannes Berg (1):
  Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel"

Jon Paul Maloy (1):
  tipc: move linearization of buffers to generic code

Keerthy (1):
  ARM: AM43XX: hwmod: Fix RSTST register offset for pruss

Konstantin Khlebnikov (1):
  ext4: use __GFP_NOFAIL in ext4_free_blocks()

Kristian H. Kristensen (1):
  drm: Only use compat ioctl for addfb2 on X86/IA64

Kweh, Hock Leong (1):
  iio: fix pressure data output unit in hid-sensor-attributes

Lars-Peter Clausen (1):
  iio: ad799x: Fix 

Linux 4.4.22

2016-09-24 Thread Greg KH
 copy_from_user()
  microblaze: fix copy_from_user()
  fix minor infoleak in get_user_ex()
  mn10300: failing __get_user() and get_user() should zero
  m32r: fix __get_user()
  sh64: failing __get_user() should zero
  nios2: fix __get_user()
  score: fix __get_user/get_user
  s390: get_user() should zero on failure
  asm-generic: make get_user() clear the destination on errors
  frv: fix clear_user()
  cris: buggered copy_from_user/copy_to_user/clear_user
  blackfin: fix copy_from_user()
  score: fix copy_from_user() and friends
  sh: fix copy_from_user()
  hexagon: fix strncpy_from_user() error return
  mips: copy_from_user() must zero the destination on access_ok() failure
  asm-generic: make copy_from_user() zero the destination properly
  alpha: fix copy_from_user()
  metag: copy_from_user() should zero the destination on access_ok() failure
  parisc: fix copy_from_user()
  openrisc: fix copy_from_user()
  nios2: copy_from_user() should zero the tail of destination
  mn10300: copy_from_user() should zero on access_ok() failure...
  sparc32: fix copy_from_user()
  ppc32: fix copy_from_user()
  ia64: copy_from_user() should zero the destination on access_ok() failure

Alan Stern (1):
  USB: change bInterval default to 10 ms

Alison Schofield (1):
  iio: proximity: as3935: set up buffer timestamps for non-zero values

Anders Darander (1):
  iio: adc: at91: unbreak channel adc channel 3

Andy Shevchenko (1):
  serial: 8250_mid: fix divide error bug if baud rate is 0

Anson Huang (1):
  ARM: imx6: add missing BM_CLPCR_BYPASS_PMIC_READY setting for imx6sx

Ard Biesheuvel (1):
  crypto: cryptd - initialize child shash_desc on import

Arnd Bergmann (5):
  mmc: dw_mmc: use resource_size_t to store physical address
  pinctrl: at91-pio4: use %pr format string for resource
  soc: qcom/spm: shut up uninitialized variable warning
  kconfig: tinyconfig: provide whole choice blocks to avoid warnings
  net: simplify napi_synchronize() to avoid warnings

Balbir Singh (1):
  sched/core: Fix a race between try_to_wake_up() and a woken up task

Boris Brezillon (2):
  genirq: Provide irq_gc_{lock_irqsave,unlock_irqrestore}() helpers
  irqchip/atmel-aic: Fix potential deadlock in ->xlate()

Caesar Wang (1):
  iio: adc: rockchip_saradc: reset saradc controller before programming it

Chen-Yu Tsai (1):
  clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe 
function

Chris Mason (1):
  Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns

Chuck Lever (1):
  nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock

Clemens Gruber (1):
  usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase

Colin Ian King (1):
  iio: ensure ret is initialized to zero before entering do loop

Daniele Palmas (1):
  USB: serial: simple: add support for another Infineon flashloader

David Daney (1):
  net: thunderx: Fix OOPs with ethtool --register-dump

Emanuel Czirai (1):
  x86/AMD: Apply erratum 665 on machines without a BIOS fix

Eric Biggers (2):
  fscrypto: add authorization check for setting encryption policy
  fscrypto: require write access to mount to set encryption policy

Fabio Estevam (1):
  ARM: dts: imx6qdl: Fix SPDIF regression

Felix Fietkau (1):
  ath9k: fix using sta->drv_priv before initializing it

Greg Kroah-Hartman (1):
  Linux 4.4.22

Gregor Boirie (1):
  iio:core: fix IIO_VAL_FRACTIONAL sign handling

Guenter Roeck (2):
  avr32: fix 'undefined reference to `___copy_from_user'
  openrisc: fix the fix of copy_from_user()

Guoqing Jiang (1):
  md-cluster: make md-cluster also can work when compiled into kernel

Icenowy Zheng (1):
  pinctrl: sunxi: fix uart1 CTS/RTS pins at PG on A23/A33

James Hartley (1):
  pinctrl: pistachio: fix mfio pll_lock pinmux

James Hogan (1):
  MIPS: KVM: Check for pfn noslot case

Jan Leupold (1):
  drm: atmel-hlcdc: Fix vertical scaling

Jason Gunthorpe (1):
  IB/uverbs: Fix race between uverbs_close and remove_one

Jimi Damon (1):
  serial: 8250: added acces i/o products quad and octal serial cards

Johan Hovold (2):
  ARM: dts: overo: fix gpmc nand cs0 range
  ARM: dts: overo: fix gpmc nand on boards with ethernet

Johannes Berg (1):
  Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel"

Jon Paul Maloy (1):
  tipc: move linearization of buffers to generic code

Keerthy (1):
  ARM: AM43XX: hwmod: Fix RSTST register offset for pruss

Konstantin Khlebnikov (1):
  ext4: use __GFP_NOFAIL in ext4_free_blocks()

Kristian H. Kristensen (1):
  drm: Only use compat ioctl for addfb2 on X86/IA64

Kweh, Hock Leong (1):
  iio: fix pressure data output unit in hid-sensor-attributes

Lars-Peter Clausen (1):
  iio: ad799x: Fix