Push to branch refs/heads/master:
46eafb06eb590da94e88252ee6405ea62b2943f4 -->
  47bfc168f6179b9112aa7099749228d8e870d035

 Documentation/filesystems/00-INDEX                 |   2 +
 Documentation/filesystems/wrapfs.txt               | 172 +++++++
 MAINTAINERS                                        |   9 +
 Makefile                                           |   2 +-
 arch/alpha/include/asm/uaccess.h                   |  19 +-
 arch/arc/include/asm/uaccess.h                     |  11 +-
 arch/arc/kernel/signal.c                           |  11 +-
 arch/arm/boot/compressed/head.S                    |   2 +-
 arch/arm/common/sa1111.c                           |  22 +-
 arch/arm/kernel/devtree.c                          |  14 +-
 arch/arm/mach-sa1100/generic.c                     |   2 +
 arch/arm64/include/asm/elf.h                       |   1 +
 arch/arm64/include/asm/spinlock.h                  |  10 +
 arch/arm64/include/uapi/asm/auxvec.h               |   2 +
 arch/arm64/kernel/debug-monitors.c                 |   6 +-
 arch/arm64/kernel/entry.S                          |   2 +-
 arch/arm64/kernel/traps.c                          |  25 +-
 arch/avr32/include/asm/uaccess.h                   |  11 +-
 arch/avr32/kernel/avr32_ksyms.c                    |   2 +-
 arch/avr32/lib/copy_user.S                         |   8 +-
 arch/avr32/mach-at32ap/pio.c                       |   2 +-
 arch/blackfin/include/asm/uaccess.h                |   9 +-
 arch/cris/include/asm/uaccess.h                    |  71 ++-
 arch/frv/include/asm/uaccess.h                     |  12 +-
 arch/hexagon/include/asm/uaccess.h                 |   3 +-
 arch/ia64/include/asm/uaccess.h                    |  20 +-
 arch/m32r/include/asm/uaccess.h                    |   2 +-
 arch/metag/include/asm/atomic.h                    |   3 +-
 arch/metag/include/asm/uaccess.h                   |   3 +-
 arch/microblaze/include/asm/uaccess.h              |  11 +-
 arch/mips/include/asm/kvm_host.h                   |   7 +-
 arch/mips/include/asm/ptrace.h                     |   2 +-
 arch/mips/include/asm/uaccess.h                    |   3 +
 arch/mips/kvm/kvm_mips_emul.c                      | 100 +++-
 arch/mips/mti-malta/malta-setup.c                  |   8 +-
 arch/mn10300/include/asm/uaccess.h                 |   1 +
 arch/mn10300/lib/usercopy.c                        |   4 +-
 arch/openrisc/include/asm/uaccess.h                |  35 +-
 arch/parisc/include/asm/uaccess.h                  |   7 +-
 arch/parisc/kernel/syscall.S                       |  11 +-
 arch/powerpc/include/asm/uaccess.h                 |  21 +-
 arch/powerpc/kernel/nvram_64.c                     |   6 +-
 arch/powerpc/kernel/vdso64/datapage.S              |   2 +-
 arch/powerpc/kernel/vdso64/gettimeofday.S          |   2 +-
 arch/powerpc/lib/copyuser_64.S                     |   2 +-
 arch/powerpc/mm/slb_low.S                          |   7 +-
 arch/powerpc/platforms/powernv/pci.c               |   4 +-
 arch/s390/include/asm/uaccess.h                    |   8 +-
 arch/score/include/asm/uaccess.h                   |  46 +-
 arch/sh/include/asm/uaccess.h                      |   5 +-
 arch/sh/include/asm/uaccess_64.h                   |   1 +
 arch/sparc/include/asm/uaccess_32.h                |   4 +-
 arch/tile/kernel/time.c                            |   4 +-
 arch/x86/boot/compressed/Makefile                  |  14 +-
 arch/x86/boot/compressed/head_32.S                 |  28 +
 arch/x86/boot/compressed/head_64.S                 |   8 +
 arch/x86/include/asm/hugetlb.h                     |   1 +
 arch/x86/include/asm/tlbflush.h                    |   7 +
 arch/x86/include/asm/uaccess.h                     |   2 +-
 arch/x86/kernel/apic/apic.c                        |   3 +
 arch/x86/kernel/head_32.S                          |   2 +-
 arch/x86/kernel/paravirt.c                         |   4 +-
 arch/x86/kvm/vmx.c                                 |  13 +
 arch/x86/kvm/x86.c                                 |  20 +-
 arch/x86/mm/pat.c                                  |   5 +-
 arch/x86/um/asm/barrier.h                          |   6 +-
 arch/x86/xen/mmu.c                                 |   2 +-
 block/cfq-iosched.c                                |  13 +-
 crypto/ablkcipher.c                                |   2 +
 crypto/af_alg.c                                    |  51 +-
 crypto/ahash.c                                     |   5 +-
 crypto/algif_hash.c                                | 165 +++++-
 crypto/algif_skcipher.c                            | 172 ++++++-
 crypto/blkcipher.c                                 |   4 +-
 crypto/cryptd.c                                    |   9 +-
 crypto/gcm.c                                       |   2 +-
 crypto/shash.c                                     |   5 +-
 drivers/acpi/apei/ghes.c                           |   2 +-
 drivers/base/core.c                                |  42 +-
 drivers/block/drbd/drbd_main.c                     |   2 +-
 drivers/block/xen-blkback/common.h                 |   8 +-
 drivers/char/hw_random/exynos-rng.c                |   9 +-
 drivers/char/hw_random/omap-rng.c                  |  16 +-
 drivers/char/mem.c                                 |   6 +-
 drivers/devfreq/devfreq.c                          |   2 +-
 drivers/edac/edac_mc.c                             |   2 +-
 drivers/firewire/net.c                             |  59 ++-
 drivers/gpio/gpio-mpc8xxx.c                        |   2 +-
 drivers/gpu/drm/drm_crtc.c                         |   3 +
 drivers/gpu/drm/qxl/qxl_draw.c                     |   2 +
 drivers/gpu/drm/radeon/atombios_crtc.c             |   2 +
 drivers/gpu/drm/radeon/radeon_legacy_crtc.c        |   2 +
 drivers/gpu/drm/radeon/radeon_ttm.c                |   4 +-
 drivers/hv/hv_util.c                               |  10 +-
 drivers/hwmon/adt7411.c                            |   5 +-
 drivers/i2c/busses/i2c-at91.c                      |  58 ++-
 drivers/i2c/busses/i2c-eg20t.c                     |  18 +-
 drivers/i2c/i2c-core.c                             |   2 +-
 drivers/iio/accel/kxsd9.c                          |   2 +
 drivers/infiniband/core/cm.c                       | 127 ++++-
 drivers/infiniband/core/multicast.c                |  13 +-
 drivers/infiniband/core/uverbs_main.c              |   7 +-
 drivers/infiniband/hw/mlx4/cq.c                    |   5 +-
 drivers/infiniband/hw/mlx4/mcg.c                   |  14 +-
 drivers/infiniband/ulp/ipoib/ipoib.h               |   1 +
 drivers/infiniband/ulp/ipoib/ipoib_cm.c            |  16 +
 drivers/infiniband/ulp/ipoib/ipoib_ib.c            |   9 +
 drivers/infiniband/ulp/ipoib/ipoib_main.c          |   2 +-
 drivers/input/serio/i8042.c                        |  17 +-
 drivers/input/serio/libps2.c                       |  10 +-
 drivers/input/touchscreen/ili210x.c                |   2 +-
 drivers/iommu/amd_iommu.c                          |  13 +-
 drivers/isdn/hardware/mISDN/ipac.h                 |   1 +
 drivers/isdn/hardware/mISDN/mISDNipac.c            |   2 +
 drivers/isdn/mISDN/socket.c                        |   3 +
 drivers/md/dm-flakey.c                             |  27 +-
 drivers/md/dm.c                                    |   5 +
 drivers/media/dvb-frontends/mb86a20s.c             | 104 ++--
 drivers/media/usb/cx231xx/cx231xx-avcore.c         |   5 +-
 drivers/media/usb/cx231xx/cx231xx-cards.c          |   2 +-
 drivers/media/usb/cx231xx/cx231xx-core.c           |   3 +-
 drivers/media/usb/em28xx/em28xx-i2c.c              |   5 +-
 drivers/mfd/mfd-core.c                             |   2 +
 drivers/misc/mei/nfc.c                             |   2 +-
 drivers/mmc/card/block.c                           |   3 +-
 drivers/mmc/host/mxs-mmc.c                         |   4 +-
 drivers/mtd/maps/pmcmsp-flash.c                    |   6 +-
 drivers/mtd/mtd_blkdevs.c                          |  10 +-
 drivers/mtd/nand/davinci_nand.c                    |   3 +
 drivers/mtd/ubi/fastmap.c                          |   7 +-
 drivers/net/bonding/bond_main.c                    |   7 +-
 drivers/net/can/dev.c                              |  27 +-
 drivers/net/ethernet/marvell/sky2.c                |  13 +
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c     |   2 +-
 drivers/net/ppp/ppp_generic.c                      |   5 +-
 drivers/net/usb/kaweth.c                           |   3 +-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |   2 +-
 drivers/net/wireless/brcm80211/brcmsmac/dma.c      |   4 +-
 drivers/net/wireless/brcm80211/brcmsmac/stf.c      |   2 +-
 drivers/net/wireless/iwlwifi/pcie/tx.c             |   4 +-
 drivers/net/wireless/mwifiex/cfg80211.c            |  13 +-
 drivers/net/xen-netback/netback.c                  |  34 +-
 drivers/pci/quirks.c                               |  41 +-
 drivers/regulator/tps65910-regulator.c             |   6 +
 drivers/s390/block/dasd.c                          |  10 +-
 drivers/s390/scsi/zfcp_dbf.c                       | 162 +++++-
 drivers/s390/scsi/zfcp_dbf.h                       |  14 +-
 drivers/s390/scsi/zfcp_erp.c                       |  12 +-
 drivers/s390/scsi/zfcp_ext.h                       |   8 +-
 drivers/s390/scsi/zfcp_fsf.c                       |  22 +-
 drivers/s390/scsi/zfcp_fsf.h                       |   4 +-
 drivers/s390/scsi/zfcp_scsi.c                      |   8 +-
 drivers/scsi/arcmsr/arcmsr_hba.c                   |  17 +-
 drivers/scsi/ibmvscsi/ibmvfc.c                     |   1 -
 drivers/scsi/megaraid/megaraid_sas.h               |   2 +-
 drivers/scsi/megaraid/megaraid_sas_base.c          |  13 +-
 drivers/scsi/mpt2sas/mpt2sas_scsih.c               |  15 +
 drivers/scsi/mpt3sas/mpt3sas_base.h                |  12 +
 drivers/scsi/mpt3sas/mpt3sas_scsih.c               |  31 +-
 drivers/scsi/scsi_debug.c                          |   1 +
 drivers/scsi/scsi_scan.c                           |   2 +-
 drivers/staging/iio/impedance-analyzer/ad5933.c    |  17 +-
 drivers/thermal/thermal_core.c                     |   2 +-
 drivers/tty/tty_ldisc.c                            |   7 +
 drivers/tty/vt/vt.c                                |   7 +-
 drivers/uio/uio_dmem_genirq.c                      |   2 +-
 drivers/usb/chipidea/core.c                        |   1 +
 drivers/usb/chipidea/udc.c                         |   2 -
 drivers/usb/class/cdc-acm.c                        |   5 +-
 drivers/usb/class/cdc-acm.h                        |   1 -
 drivers/usb/core/config.c                          |  93 +++-
 drivers/usb/dwc3/gadget.c                          |  19 +-
 drivers/usb/gadget/fsl_qe_udc.c                    |   7 +-
 drivers/usb/gadget/u_ether.c                       |   7 -
 drivers/usb/host/xhci-hub.c                        |   3 +
 drivers/usb/misc/legousbtower.c                    |  35 +-
 drivers/usb/renesas_usbhs/mod.c                    |  11 +-
 drivers/usb/serial/cp210x.c                        |   6 +-
 drivers/usb/serial/kobil_sct.c                     |   5 +-
 drivers/usb/serial/mos7720.c                       |   2 +-
 drivers/usb/serial/mos7840.c                       |   4 +-
 drivers/usb/serial/usb-serial.c                    |   4 +-
 drivers/usb/storage/transport.c                    |   7 +-
 drivers/video/efifb.c                              |   6 +-
 drivers/xen/xen-pciback/conf_space.c               |   6 +-
 drivers/xen/xen-pciback/conf_space.h               |   2 +-
 drivers/xen/xen-pciback/conf_space_header.c        |   2 +-
 drivers/xen/xen-pciback/pciback.h                  |   1 +
 drivers/xen/xen-pciback/pciback_ops.c              |  79 ++-
 fs/Kconfig                                         |   1 +
 fs/Makefile                                        |   1 +
 fs/btrfs/ioctl.c                                   |  12 +
 fs/coredump.c                                      |   3 +
 fs/ext4/ext4.h                                     |   1 +
 fs/ext4/inode.c                                    |  50 +-
 fs/ext4/mballoc.c                                  |  47 +-
 fs/ext4/namei.c                                    |   9 +-
 fs/ext4/super.c                                    |  53 +-
 fs/ext4/xattr.c                                    |  13 +-
 fs/hostfs/hostfs_kern.c                            |   7 +-
 fs/isofs/inode.c                                   |   8 +-
 fs/nfs/callback.c                                  |   1 +
 fs/nfs/callback_xdr.c                              |   6 +-
 fs/nfs/nfs4state.c                                 |   3 +
 fs/nfsd/nfs4state.c                                |   3 +-
 fs/ocfs2/dlm/dlmconvert.c                          |  12 +-
 fs/ocfs2/file.c                                    |  34 +-
 fs/pstore/ram_core.c                               |  51 +-
 fs/reiserfs/ibalance.c                             |   3 +-
 fs/reiserfs/super.c                                |  12 +-
 fs/seq_file.c                                      |   4 +-
 fs/super.c                                         |   6 +-
 fs/ubifs/dir.c                                     |  22 +-
 fs/ubifs/tnc_commit.c                              |   2 +-
 fs/ubifs/xattr.c                                   |   2 +
 fs/wrapfs/Kconfig                                  |   8 +
 fs/wrapfs/Makefile                                 |   7 +
 fs/wrapfs/dentry.c                                 |  49 ++
 fs/wrapfs/file.c                                   | 376 ++++++++++++++
 fs/wrapfs/inode.c                                  | 572 +++++++++++++++++++++
 fs/wrapfs/lookup.c                                 | 351 +++++++++++++
 fs/wrapfs/main.c                                   | 176 +++++++
 fs/wrapfs/mmap.c                                   |  94 ++++
 fs/wrapfs/super.c                                  | 208 ++++++++
 fs/wrapfs/wrapfs.h                                 | 209 ++++++++
 fs/xfs/xfs_dquot.c                                 |   3 +-
 fs/xfs/xfs_mount.c                                 |   3 +-
 include/asm-generic/uaccess.h                      |  20 +-
 include/crypto/hash.h                              |   6 +
 include/crypto/if_alg.h                            |  11 +-
 include/linux/can/dev.h                            |   3 +-
 include/linux/crypto.h                             |   8 +
 include/linux/filter.h                             |   6 +-
 include/linux/i8042.h                              |   6 -
 include/linux/mfd/88pm80x.h                        |   4 +-
 include/linux/mroute.h                             |   2 +-
 include/linux/mroute6.h                            |   2 +-
 include/linux/netdevice.h                          |   1 +
 include/linux/pagemap.h                            |  38 +-
 include/linux/perf_event.h                         |   6 -
 include/linux/serio.h                              |  24 +-
 include/linux/stddef.h                             |  15 +-
 include/linux/vfio.h                               |  14 -
 include/net/if_inet6.h                             |  10 +-
 include/net/ip6_tunnel.h                           |   1 +
 include/net/ndisc.h                                |   2 +
 include/net/sock.h                                 |  16 +-
 include/net/tcp.h                                  |   3 +
 include/uapi/linux/magic.h                         |   2 +
 include/xen/interface/io/ring.h                    |  14 +
 ipc/sem.c                                          |   8 -
 kernel/events/core.c                               |  15 +-
 kernel/fork.c                                      |  10 +-
 kernel/power/suspend_test.c                        |   4 +-
 kernel/rcutree_plugin.h                            |   1 +
 kernel/sched/core.c                                |  41 ++
 kernel/timer.c                                     |  19 +-
 kernel/trace/trace.c                               |  32 +-
 lib/genalloc.c                                     |   3 +-
 lib/mpi/mpi-pow.c                                  |   7 +-
 lib/ratelimit.c                                    |   2 +-
 mm/ksm.c                                           |   3 +-
 mm/swapfile.c                                      |   2 +
 net/can/bcm.c                                      |  32 +-
 net/core/dev.c                                     |  18 +-
 net/core/dst.c                                     |   4 +-
 net/core/filter.c                                  |  10 +-
 net/core/sock.c                                    |  10 +-
 net/dccp/ipv4.c                                    |  14 +-
 net/dccp/ipv6.c                                    |  16 +-
 net/dccp/proto.c                                   |   4 +
 net/ipv4/ip_fragment.c                             |   4 +
 net/ipv4/ip_output.c                               |   3 +
 net/ipv4/ipmr.c                                    |   3 +-
 net/ipv4/route.c                                   |   9 +-
 net/ipv4/tcp_ipv4.c                                |  22 +-
 net/ipv4/tcp_output.c                              |  15 +-
 net/ipv6/addrconf.c                                | 283 ++++++----
 net/ipv6/af_inet6.c                                |   6 +
 net/ipv6/anycast.c                                 |  12 +
 net/ipv6/ip6_gre.c                                 |   1 -
 net/ipv6/ip6_tunnel.c                              |  13 +-
 net/ipv6/ip6mr.c                                   |   5 +-
 net/ipv6/mcast.c                                   |  14 +
 net/ipv6/ndisc.c                                   |  18 +-
 net/ipv6/netfilter/nf_conntrack_reasm.c            |   3 +
 net/ipv6/reassembly.c                              |   4 +
 net/ipv6/route.c                                   |   4 +-
 net/ipv6/tcp_ipv6.c                                |  14 +-
 net/irda/iriap.c                                   |   8 +-
 net/mac80211/cfg.c                                 |   2 +-
 net/mac80211/rx.c                                  |  24 +-
 net/mac80211/tx.c                                  |   6 +-
 net/netfilter/ipvs/ip_vs_proto_tcp.c               |  25 +-
 net/netfilter/nf_log.c                             |   6 +-
 net/packet/af_packet.c                             |   1 +
 net/sctp/sm_statefuns.c                            |  12 +-
 net/sctp/socket.c                                  |  12 +-
 net/sunrpc/svc.c                                   |   8 +-
 net/wireless/core.h                                |   1 +
 net/wireless/scan.c                                |  69 +++
 security/keys/proc.c                               |   2 +-
 sound/core/pcm_lib.c                               |   2 +-
 sound/core/rawmidi.c                               |   4 +-
 sound/core/timer.c                                 |  20 +-
 sound/pci/ali5451/ali5451.c                        |   2 +
 sound/soc/omap/omap-mcpdm.c                        |   5 +-
 tools/perf/util/symbol-elf.c                       |   2 +-
 tools/perf/util/symbol.c                           |   2 +-
 tools/vm/slabinfo.c                                |   3 +-
 310 files changed, 5197 insertions(+), 1173 deletions(-)

commit 47bfc168f6179b9112aa7099749228d8e870d035
Author: Erez Zadok <[email protected]>
Date:   Sat Feb 18 19:11:22 2017 -0500

    Wrapfs: ->iget fixes
    
    Change where we igrab/iput to ensure we always hold a valid lower_inode.
    Return ENOMEM (not EACCES) if iget5_locked returns NULL.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e96d5523511717e98ab1d0ab1cb3c881d1c98bd9
Author: Erez Zadok <[email protected]>
Date:   Sat Feb 18 15:24:45 2017 -0500

    Wrapfs: update copyrights for 2017
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 71580ce470d3c1724d04bb1b1243faef63f5e51e
Author: Erez Zadok <[email protected]>
Date:   Sun May 22 00:47:10 2016 -0400

    Wrapfs: support NFS exports
    
    Based on patch from Sandeep Joshi <[email protected]>.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9de4252105f79b2dd30b7bce3b46fc38b300d457
Author: Erez Zadok <[email protected]>
Date:   Sun May 22 00:47:10 2016 -0400

    Wrapfs: use d_splice_alias
    
    Refactor interpose code to allow lookup to use d_splice_alias.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 54c8ceb23973b9f2ca3a5504c12df66778190a56
Author: Erez Zadok <[email protected]>
Date:   Mon Dec 14 17:49:44 2015 -0500

    Wrapfs: update nlinks after rename
    
    Signed-off-by: Logeswari P Viswanath <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit 61b5e1227b13f2ce2abbfc9148455754fc11aaa2
Author: Erez Zadok <[email protected]>
Date:   Wed Nov 4 00:11:48 2015 -0500

    Wrapfs: update copyright year to 2015

commit 1472f5f27a671dbb6ef4b8c5a581f22a701a5132
Author: Erez Zadok <[email protected]>
Date:   Wed Nov 4 00:11:48 2015 -0500

    Wrapfs: use vfs xattr helpers
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 659dca1130d26d505782368024d313e0374bef6e
Author: Erez Zadok <[email protected]>
Date:   Fri Aug 15 23:04:55 2014 -0400

    Wrapfs: properly copy meta-data after AIO operations from lower inode
    
    Signed-off-by: Mengyang Li <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit 00ae0494370cb43af5bc5805744c5c99ea393c6b
Author: Erez Zadok <[email protected]>
Date:   Mon Aug 11 18:38:54 2014 -0400

    Wrapfs: leave placeholders for updating upper inode after AIO
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 54ffb325da259fabce5c24a93a3fe485298b9a35
Author: Erez Zadok <[email protected]>
Date:   Sun Aug 10 01:29:56 2014 -0400

    Wrapfs: protect lower_file by ref-count during aio operation
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit 6ca6c58cabb61a4b84d2535a9edae2549299cf5c
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 25 23:08:01 2014 -0400

    Wrapfs: fix ->llseek to update upper and lower offsets
    
    Fixes bug: xfstests generic/257. f_pos consistently is required by and
    only by dir_ops->wrapfs_readdir, main_ops is not affected.
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit fe0d05dfa087d3979695587185f43b0fec6ee2b9
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 25 23:08:01 2014 -0400

     Wrapfs: support extended attributes (xattr) operations
    
    Signed-off-by: Erez Zadok <[email protected]>
    Signed-off-by: Mengyang Li <[email protected]>

commit 88d2ea80d67ec7cef14a25f9c0a501b7cd3594f5
Author: Erez Zadok <[email protected]>
Date:   Fri Jun 20 20:14:04 2014 -0400

    Wrapfs: support asynchronous-IO (AIO) operations
    
    Signed-off-by: Li Mengyang <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit e5bbacb1fec1e12c86b2c69e2874b9ef9ca1b12a
Author: Erez Zadok <[email protected]>
Date:   Fri Jun 20 20:14:04 2014 -0400

    Wrapfs: support direct-IO (DIO) operations
    
    Signed-off-by: Li Mengyang <[email protected]>
    Signed-off-by: Erez Zadok <[email protected]>

commit 98e8ef74c4b6b1c75569899bb6715ecd25f3007a
Author: Erez Zadok <[email protected]>
Date:   Thu May 15 00:16:00 2014 -0400

    Wrapfs: implement vm_ops->page_mkwrite
    
    Some file systems (e.g., ext4) require it.  Reported by Ted Ts'o.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 03704408ecd44c61a849bd8ef9f9afa8de2209e9
Author: Erez Zadok <[email protected]>
Date:   Thu Apr 3 14:23:09 2014 -0400

    Wrapfs: update documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9ac0beb4700f4a0a4bc46c954809952669f063f6
Author: Erez Zadok <[email protected]>
Date:   Thu Apr 3 14:23:07 2014 -0400

    Wrapfs: update maintainers
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 690c0bb7d7d22485aa46a9086fc30980c1f23e06
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 21 03:30:56 2014 -0500

    Wrapfs: update documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 2194e834ef9b392dfa689d05853318ee07a8c7e3
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 21 01:22:40 2014 -0500

    Wrapfs: 2014 Copyright update
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 36dfc16aec3720727993dbc0dc58de3052c9bb05
Author: Erez Zadok <[email protected]>
Date:   Tue Nov 19 19:13:37 2013 -0500

    patch wrapfs-copyright-update.patch

commit 324536c59c11fc361d928f42a41d681a696d3104
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 5 01:36:58 2013 -0400

    Wrapfs: copy lower inode attributes in ->ioctl
    
    Some ioctls (e.g., EXT2_IOC_SETFLAGS) can change inode attributes, so copy
    them from lower inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit d91bbb9361a3776d5d2765e85faae2b32efa905c
Author: Erez Zadok <[email protected]>
Date:   Wed Jun 5 01:36:58 2013 -0400

    Wrapfs: remove unnecessary call to vm_unmap in ->mmap
    
    Code is unnecessary and causes deadlocks in newer kernels.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3469c3f40a95bc6f32f8c5fbf2a43bd6619fdb97
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:32 2013 -0400

    Wrapfs: declare MODULE_ALIAS_FS
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 7b55d34212e918f207c96890a15bac863bb39ba9
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:32 2013 -0400

    Wrapfs: don't use FS_REVAL_DOT in fs_flags
    
    Signed-off-by: Erez Zadok <[email protected]>

commit b70c3fe8b433133eca816904b79cbd21be7225a5
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:31 2013 -0400

    Wrapfs: remove dependency on now-defunct CONFIG_EXPERIMENTAL
    
    Signed-off-by: Erez Zadok <[email protected]>

commit a20c00382d40d0c01c947cb518f4c98eb23c7dec
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:31 2013 -0400

    Wrapfs: dentry_open() no longer does mntput/dput
    
    We need to grab a reference on the path before dentry_open, and drop it
    after.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6628ede4fb4c1c021211b52273270378671798bb
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:30 2013 -0400

    Wrapfs: no need to call mnt_want_write any longer
    
    Apparently this is now being done by the VFS.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 705b5f95c53ae8c1cf1fb65a14cb28731a4960ef
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:30 2013 -0400

    Wrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap
    
    Signed-off-by: Erez Zadok <[email protected]>

commit eae0e6aef25c699f3a85b2d73110895f7b5db83d
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:29 2013 -0400

    Wrapfs: ->lookup takes flags not a nameidata
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 98e0dd58d5cbca89bfa5219aa52b4944882cffd3
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:29 2013 -0400

    Wrapfs: ->create no longer takes a nameidata, only a flag
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ede67af0f5820fba8458a61e0b72b6f118209b17
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:29 2013 -0400

    Wrapfs: ->d_revalidate now takes namei flags, not nameidata
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e6ac0bbe5b797ae456c247cad04d032cb57b596a
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:28 2013 -0400

    Wrapfs: struct nameidata no longer has an open-intent data
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9b95f4588b3e0a369362062245808bc1317486b7
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:28 2013 -0400

    Wrapfs: dentry_open now takes a struct path
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 63a72152b3bd11d16e027321798d09cfb795f648
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:27 2013 -0400

    Wrapfs: use vm_munmap in ->mmap
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9a7e9aa2202167572f5efe5f6b3686f12189e7a4
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:27 2013 -0400

    Wrapfs: use clear_inode in evict_inode
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 35cad63679b0fc73bf3d2b6d7da2d3fb907ab432
Author: Erez Zadok <[email protected]>
Date:   Tue Jun 4 23:19:26 2013 -0400

    Wrapfs: use d_make_root
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 88754e916aa004c889bb917487d8529beb724c54
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 31 04:40:19 2012 -0500

    Wrapfs: use mode_t
    
    Signed-off-by: Erez Zadok <[email protected]>

commit be53e5ef325c482af31aa59e6fcd0556747ae120
Author: Erez Zadok <[email protected]>
Date:   Sun Jan 29 20:34:27 2012 -0500

    Wrapfs: use set_nlink()
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9da66f95899b3a243a44362dc3f3c60aa8d33668
Author: Erez Zadok <[email protected]>
Date:   Fri Sep 9 00:47:49 2011 -0400

    Wrapfs: drop our dentry in ->rmdir
    
    Also clear nlinks on our inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 27bdaeb311741fb66e79265c37c0fe05feee61ea
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:32 2011 -0400

    Wrapfs: use d_alloc_root
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 72b83954f0d0defdb531c02ad85106b4a6d6d7e7
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:31 2011 -0400

    Wrapfs: use d_set_d_op
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 698e083b31b94a1d91c76250a7a636ed279243af
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:30 2011 -0400

    Wrapfs: use updated vfs_path_lookup prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 032e5a8490d0b65aa34e2271a0a063950b236e3a
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:30 2011 -0400

    Wrapfs: ->fsync updates for new prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 3705fc050879522109bf4bc98f9b6ed2fa828461
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:29 2011 -0400

    Wrapfs: support LOOKUP_RCU in ->d_revalidate
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 042a90b13c5113834b70799e33ee8ede9c09cea7
Author: Erez Zadok <[email protected]>
Date:   Tue Sep 6 00:10:28 2011 -0400

    Wrapfs: new ->permission prototype and fixes.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6ee23c8a6b9c3ceb2150622930a278d8721b4a20
Author: Erez Zadok <[email protected]>
Date:   Mon May 2 02:00:02 2011 -0400

    Wrapfs: lookup fixes
    
    Don't use lookup_one_len any longer (doesn't work for NFS).
    Initialize lower wrapfs_dentry_info so lower_path is NULL.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 54ab074406b132dc843c28896e4c4b75bddcdbe2
Author: Erez Zadok <[email protected]>
Date:   Fri Mar 18 13:14:28 2011 -0400

    Wrapfs: remove extra debug in rmdir
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 36f2051d6f8350b42ca943bd77b12971a57154ca
Author: Erez Zadok <[email protected]>
Date:   Fri Mar 18 12:38:01 2011 -0400

    Wrapfs: checkpatch fixes
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 7031a15ea8d4fa507bdbb14faadfb3a724e1af45
Author: Erez Zadok <[email protected]>
Date:   Fri Mar 18 00:45:17 2011 -0400

    Wrapfs: port to 2.6.39
    
    Remove lock/unlock_kernel in ->fasync.
    Convert from ->get_sb to ->mount op.
    Remove include to smp_lock.h, added sched.h.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit b385e4aed0f9d99246e853f0868ddc1d30094111
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: copyright update for 2011
    
    Signed-off-by: Erez Zadok <[email protected]>

commit b46a683bc04e54bebdfe7ded594aad7c482ac1e1
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: better handling of NFS silly-renamed files
    
    In ->unlink, if we try to unlink an NFS silly-renamed file, NFS returns
    -EBUSY.  We have to treat it as a success and return 0 to the VFS.  NFS will
    remove silly-deleted files later on anyway.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 5548940de08c3d6d3dfca13fb82fb7e24d91ba5d
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: update parent directory inode size in inode ops
    
    After ->unlink, ->rmdir, and ->rename, we need to copy the (possibly
    changed) inode size of the parent directory(ies) where the operation took
    place.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9a0cbfb3c4cdf88f361d8bb3431b4e10d7de4101
Author: Erez Zadok <[email protected]>
Date:   Thu Mar 17 23:21:55 2011 -0400

    Wrapfs: remove unnecessary calls to copy lower inode->n_links
    
    Removed from ->create, ->symlink, and ->mknod.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ee8482aff7de08793e4e1595545ffef81794ea2b
Author: Erez Zadok <[email protected]>
Date:   Mon Mar 7 23:20:33 2011 -0500

    Wrapfs: ->setattr fixes
    
    Call inode_change_ok on our inode, not lower.
    Don't copy inode sizes (VFS does it).
    Pass lower file in struct iattr passed to notify_change on lower inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 0ad229559cc5b42715ab64559daf5c7de48f90a9
Author: Erez Zadok <[email protected]>
Date:   Sun Mar 6 16:23:16 2011 -0500

    Wrapfs: update ->permission prototye and code for new iperm flag
    
    Signed-off-by: Erez Zadok <[email protected]>

commit aca74da5e9d0177c41faaa3c6dc4067a968107d2
Author: Erez Zadok <[email protected]>
Date:   Fri Nov 12 18:15:05 2010 -0500

    Wrapfs: handle maxbytes properly
    
    Signed-off-by: Erez Zadok <[email protected]>

commit daff5f822f50da769037bd97afed12d49cbdbb3e
Author: Erez Zadok <[email protected]>
Date:   Sat Sep 11 15:49:33 2010 -0400

    Wrapfs: support ->unlocked_ioctl and ->compat_ioctl
    
    Old ->ioctl was split into ->unlocked_ioctl and ->compat_ioctl.  Compat
    version doesn't need to lock_kernel any longer.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 2f0d759ef875f617b5f79d8b5c5253eb42a42427
Author: Erez Zadok <[email protected]>
Date:   Tue Aug 10 23:50:14 2010 -0400

    Wrapfs: new vfs_statfs and ->evict_inode prototypes
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 15ba0e7f37d35a426456730131bc9977689ff931
Author: Erez Zadok <[email protected]>
Date:   Fri Aug 6 23:37:29 2010 -0400

    Wrapfs: update ->fsync prototype
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 2dd0c37803d942a6a3c938fc262dfd0cc50cf4c1
Author: Erez Zadok <[email protected]>
Date:   Tue Apr 20 21:22:02 2010 -0400

    Wrapfs: update documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 31c7955eb31dd990029166317f0b7006faf87729
Author: Erez Zadok <[email protected]>
Date:   Tue Apr 20 15:32:09 2010 -0400

    Wrapfs: include slab.h
    
    Signed-off-by: Erez Zadok <[email protected]>

commit acbc0572c41ca34a1e13f4d9d61ae001e9026012
Author: Erez Zadok <[email protected]>
Date:   Tue Apr 20 15:26:02 2010 -0400

    Wrapfs: avoid an extra path_get/put pair in wrapfs_open
    
    Signed-off-by: Erez Zadok <[email protected]>

commit c8b4388d2fbfb8c227b862686f40288c728544d5
Author: Erez Zadok <[email protected]>
Date:   Fri Feb 26 03:18:04 2010 -0500

    Wrapfs: decrement nd_path on follow_link error
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 9156766c22120888e3542dad94e57eb4295a57d3
Author: Erez Zadok <[email protected]>
Date:   Tue Jan 5 04:27:00 2010 -0500

    Wrapfs: don't mention kernel version in modload message
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 4205bbd87d0e85cf5834dc33bc4c8c538d46e63a
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Kconfig: hook to configure Wrapfs
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 6b6c5c21aca54cdc9e0f151793cda2dd2704c34f
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Makefile: hook to compile Wrapfs
    
    Signed-off-by: Erez Zadok <[email protected]>

commit fc918e8407df343f5c7b6d8a4513943e15ca473d
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: file system magic number
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 530448235370c022b69cda79e0f76073207d4073
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: Kconfig options
    
    Signed-off-by: Erez Zadok <[email protected]>

commit a84a68aef282865c3d4f4c1e4b3050c702a90e08
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: main Makefile
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 4ce7fa351b02ed13d3725cac9be807013db0c221
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: vm_ops operations
    
    Includes necessary address_space workaround ops.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 62d80d5daafca3a437051c0f4a46a10e47df0394
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: mount-time and module-linkage functions
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 497d765c8959da747398000999984e64f1d0975c
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: lookup-related functions
    
    Main lookup function, nameidata helpers, and stacking-interposition
    functions.
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 142dbdc7289ef2c34ffbbda4133335d51895659c
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: file operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit e33692b5a8ff4ae4e64ecad7cbb76f7e1c28cf5d
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: dentry operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit db7319746e267f4c79cb6a9bbca502b94ff8b063
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: inode operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 45294968fec1baf406e49ff8ab21648f30bb1e5d
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: superblock operations
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 11c38227ffdb6615271b854044e57a0803f3c23f
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: main header file
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 7f001ff55c8b56aa2d721e646a63f69dd2229d3b
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: Maintainers
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 46122ad8798a0e95502dec5d2c950c9f70eae6a6
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Documentation: index entry for Wrapfs
    
    Signed-off-by: Erez Zadok <[email protected]>

commit 1408274645c29d35700e14f98fb84d724c4864f1
Author: Erez Zadok <[email protected]>
Date:   Mon Jan 4 20:45:06 2010 -0500

    Wrapfs: introduction and usage documentation
    
    Signed-off-by: Erez Zadok <[email protected]>

commit ec55e7c2bf49a426b6f8204505bd267c77554d37
Author: Willy Tarreau <[email protected]>
Date:   Fri Feb 10 11:14:46 2017 +0100

    Linux 3.10.105

commit 63d7f335d653b9a63ecf1f75f73c82f41870a7af
Author: Guenter Roeck <[email protected]>
Date:   Fri Oct 7 10:40:59 2016 -0700

    metag: Only define atomic_dec_if_positive conditionally
    
    commit 35d04077ad96ed33ceea2501f5a4f1eacda77218 upstream.
    
    The definition of atomic_dec_if_positive() assumes that
    atomic_sub_if_positive() exists, which is only the case if
    metag specific atomics are used. This results in the following
    build error when trying to build metag1_defconfig.
    
    kernel/ucount.c: In function 'dec_ucount':
    kernel/ucount.c:211: error:
        implicit declaration of function 'atomic_sub_if_positive'
    
    Moving the definition of atomic_dec_if_positive() into the metag
    conditional code fixes the problem.
    
    Fixes: 6006c0d8ce94 ("metag: Atomics, locks and bitops")
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: James Hogan <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit 16654a56f02b36e9377d991853227f598d3bdbf6
Author: Max Staudt <[email protected]>
Date:   Mon Jun 13 19:15:59 2016 +0200

    fbdev/efifb: Fix 16 color palette entry calculation
    
    commit d50b3f43db739f03fcf8c0a00664b3d2fed0496e upstream.
    
    When using efifb with a 16-bit (5:6:5) visual, fbcon's text is rendered
    in the wrong colors - e.g. text gray (#aaaaaa) is rendered as green
    (#50bc50) and neighboring pixels have slightly different values
    (such as #50bc78).
    
    The reason is that fbcon loads its 16 color palette through
    efifb_setcolreg(), which in turn calculates a 32-bit value to write
    into memory for each palette index.
    Until now, this code could only handle 8-bit visuals and didn't mask
    overlapping values when ORing them.
    
    With this patch, fbcon displays the correct colors when a qemu VM is
    booted in 16-bit mode (in GRUB: "set gfxpayload=800x600x16").
    
    Fixes: 7c83172b98e5 ("x86_64 EFI boot support: EFI frame buffer driver")  # 
v2.6.24+
    Signed-off-by: Max Staudt <[email protected]>
    Acked-By: Peter Jones <[email protected]>
    Signed-off-by: Tomi Valkeinen <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit fa88cd790f2d6e1a0c506b1e38fe8e29080a1e53
Author: Bart Van Assche <[email protected]>
Date:   Wed Aug 31 15:17:49 2016 -0700

    dm: mark request_queue dead before destroying the DM device
    
    commit 3b785fbcf81c3533772c52b717f77293099498d3 upstream.
    
    This avoids that new requests are queued while __dm_destroy() is in
    progress.
    
    [js] use md->queue instead of non-present helper
    
    Signed-off-by: Bart Van Assche <[email protected]>
    Signed-off-by: Mike Snitzer <[email protected]>
    Signed-off-by: Jiri Slaby <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit 7fbbad139de7e3de9c88a8bbdd9f5671e2ae69ed
Author: Jan Remmet <[email protected]>
Date:   Fri Sep 23 10:52:00 2016 +0200

    regulator: tps65910: Work around silicon erratum SWCZ010
    
    commit 8f9165c981fed187bb483de84caf9adf835aefda upstream.
    
    http://www.ti.com/lit/pdf/SWCZ010:
      DCDC o/p voltage can go higher than programmed value
    
    Impact:
    VDDI, VDD2, and VIO output programmed voltage level can go higher than
    expected or crash, when coming out of PFM to PWM mode or using DVFS.
    
    Description:
    When DCDC CLK SYNC bits are 11/01:
    * VIO 3-MHz oscillator is the source clock of the digital core and input
      clock of VDD1 and VDD2
    * Turn-on of VDD1 and VDD2 HSD PFETis synchronized or at a constant
      phase shift
    * Current pulled though VCC1+VCC2 is Iload(VDD1) + Iload(VDD2)
    * The 3 HSD PFET will be turned-on at the same time, causing the highest
      possible switching noise on the application. This noise level depends
      on the layout, the VBAT level, and the load current. The noise level
      increases with improper layout.
    
    When DCDC CLK SYNC bits are 00:
    * VIO 3-MHz oscillator is the source clock of digital core
    * VDD1 and VDD2 are running on their own 3-MHz oscillator
    * Current pulled though VCC1+VCC2 average of Iload(VDD1) + Iload(VDD2)
    * The switching noise of the 3 SMPS will be randomly spread over time,
      causing lower overall switching noise.
    
    Workaround:
    Set DCDCCTRL_REG[1:0]= 00.
    
    Signed-off-by: Jan Remmet <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit bc90bffda9c784885e35d53d077c6486c9ea1d2a
Author: Peter Ujfalusi <[email protected]>
Date:   Tue Aug 23 10:27:19 2016 +0300

    ASoC: omap-mcpdm: Fix irq resource handling
    
    commit a8719670687c46ed2e904c0d05fa4cd7e4950cd1 upstream.
    
    Fixes: ddd17531ad908 ("ASoC: omap-mcpdm: Clean up with devm_* function")
    
    Managed irq request will not doing any good in ASoC probe level as it is
    not going to free up the irq when the driver is unbound from the sound
    card.
    
    Signed-off-by: Peter Ujfalusi <[email protected]>
    Reported-by: Russell King <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit a28d835844a523e0e0a96eb25b10a037b7662f1f
Author: Dan Carpenter <[email protected]>
Date:   Thu Aug 4 08:26:56 2016 +0300

    mfd: 88pm80x: Double shifting bug in suspend/resume
    
    commit 9a6dc644512fd083400a96ac4a035ac154fe6b8d upstream.
    
    set_bit() and clear_bit() take the bit number so this code is really
    doing "1 << (1 << irq)" which is a double shift bug.  It's done
    consistently so it won't cause a problem unless "irq" is more than 4.
    
    Fixes: 70c6cce04066 ('mfd: Support 88pm80x in 80x driver')
    Signed-off-by: Dan Carpenter <[email protected]>
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit 940d1175de7c31e8e2ac20489b7d2df4963bb4da
Author: Andrey Ryabinin <[email protected]>
Date:   Thu Nov 24 13:23:10 2016 +0000

    mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]
    
    commit f5527fffff3f002b0a6b376163613b82f69de073 upstream.
    
    This fixes CVE-2016-8650.
    
    If mpi_powm() is given a zero exponent, it wants to immediately return
    either 1 or 0, depending on the modulus.  However, if the result was
    initalised with zero limb space, no limbs space is allocated and a
    NULL-pointer exception ensues.
    
    Fix this by allocating a minimal amount of limb space for the result when
    the 0-exponent case when the result is 1 and not touching the limb space
    when the result is 0.
    
    This affects the use of RSA keys and X.509 certificates that carry them.
    
    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: [<ffffffff8138ce5d>] mpi_powm+0x32/0x7e6
    PGD 0
    Oops: 0002 [#1] SMP
    Modules linked in:
    CPU: 3 PID: 3014 Comm: keyctl Not tainted 4.9.0-rc6-fscache+ #278
    Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014
    task: ffff8804011944c0 task.stack: ffff880401294000
    RIP: 0010:[<ffffffff8138ce5d>]  [<ffffffff8138ce5d>] mpi_powm+0x32/0x7e6
    RSP: 0018:ffff880401297ad8  EFLAGS: 00010212
    RAX: 0000000000000000 RBX: ffff88040868bec0 RCX: ffff88040868bba0
    RDX: ffff88040868b260 RSI: ffff88040868bec0 RDI: ffff88040868bee0
    RBP: ffff880401297ba8 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000047 R11: ffffffff8183b210 R12: 0000000000000000
    R13: ffff8804087c7600 R14: 000000000000001f R15: ffff880401297c50
    FS:  00007f7a7918c700(0000) GS:ffff88041fb80000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 0000000401250000 CR4: 00000000001406e0
    Stack:
     ffff88040868bec0 0000000000000020 ffff880401297b00 ffffffff81376cd4
     0000000000000100 ffff880401297b10 ffffffff81376d12 ffff880401297b30
     ffffffff81376f37 0000000000000100 0000000000000000 ffff880401297ba8
    Call Trace:
     [<ffffffff81376cd4>] ? __sg_page_iter_next+0x43/0x66
     [<ffffffff81376d12>] ? sg_miter_get_next_page+0x1b/0x5d
     [<ffffffff81376f37>] ? sg_miter_next+0x17/0xbd
     [<ffffffff8138ba3a>] ? mpi_read_raw_from_sgl+0xf2/0x146
     [<ffffffff8132a95c>] rsa_verify+0x9d/0xee
     [<ffffffff8132acca>] ? pkcs1pad_sg_set_buf+0x2e/0xbb
     [<ffffffff8132af40>] pkcs1pad_verify+0xc0/0xe1
     [<ffffffff8133cb5e>] public_key_verify_signature+0x1b0/0x228
     [<ffffffff8133d974>] x509_check_for_self_signed+0xa1/0xc4
     [<ffffffff8133cdde>] x509_cert_parse+0x167/0x1a1
     [<ffffffff8133d609>] x509_key_preparse+0x21/0x1a1
     [<ffffffff8133c3d7>] asymmetric_key_preparse+0x34/0x61
     [<ffffffff812fc9f3>] key_create_or_update+0x145/0x399
     [<ffffffff812fe227>] SyS_add_key+0x154/0x19e
     [<ffffffff81001c2b>] do_syscall_64+0x80/0x191
     [<ffffffff816825e4>] entry_SYSCALL64_slow_path+0x25/0x25
    Code: 56 41 55 41 54 53 48 81 ec a8 00 00 00 44 8b 71 04 8b 42 04 4c 8b 67 
18 45 85 f6 89 45 80 0f 84 b4 06 00 00 85 c0 75 2f 41 ff ce <49> c7 04 24 01 00 
00 00 b0 01 75 0b 48 8b 41 18 48 83 38 01 0f
    RIP  [<ffffffff8138ce5d>] mpi_powm+0x32/0x7e6
     RSP <ffff880401297ad8>
    CR2: 0000000000000000
    ---[ end trace d82015255d4a5d8d ]---
    
    Basically, this is a backport of a libgcrypt patch:
    
        
http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=patch;h=6e1adb05d290aeeb1c230c763970695f4a538526
    
    Fixes: cdec9cb5167a ("crypto: GnuPG based MPI lib - source files (part 1)")
    Signed-off-by: Andrey Ryabinin <[email protected]>
    Signed-off-by: David Howells <[email protected]>
    cc: Dmitry Kasatkin <[email protected]>
    cc: [email protected]
    Signed-off-by: James Morris <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit 2c8c5e677787929594e6b9d5363737e9319ad1db
Author: Michael Walle <[email protected]>
Date:   Tue Jul 19 16:43:26 2016 +0200

    hwmon: (adt7411) set bit 3 in CFG1 register
    
    commit b53893aae441a034bf4dbbad42fe218561d7d81f upstream.
    
    According to the datasheet you should only write 1 to this bit. If it is
    not set, at least AIN3 will return bad values on newer silicon revisions.
    
    Fixes: d84ca5b345c2 ("hwmon: Add driver for ADT7411 voltage and temperature 
sensor")
    Signed-off-by: Michael Walle <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit ebee2e2f308f75e2bba58f6194fa39fce4ef9529
Author: Sergei Miroshnichenko <[email protected]>
Date:   Wed Sep 7 16:51:12 2016 +0300

    can: dev: fix deadlock reported after bus-off
    
    commit 9abefcb1aaa58b9d5aa40a8bb12c87d02415e4c8 upstream.
    
    A timer was used to restart after the bus-off state, leading to a
    relatively large can_restart() executed in an interrupt context,
    which in turn sets up pinctrl. When this happens during system boot,
    there is a high probability of grabbing the pinctrl_list_mutex,
    which is locked already by the probe() of other device, making the
    kernel suspect a deadlock condition [1].
    
    To resolve this issue, the restart_timer is replaced by a delayed
    work.
    
    [1] https://github.com/victronenergy/venus/issues/24
    
    Signed-off-by: Sergei Miroshnichenko <[email protected]>
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Willy Tarreau <[email protected]>

commit 3419dc516ec27ae51ca8b55a1436b3d1c484d877
Author: zhong jiang <[email protected]>
Date:   Wed Sep 28 15:22:30 2016 -0700

    mm,ksm: fix endless looping in allocating memory when ksm enable
    
    commit 5b398e416e880159fe55eefd93c6588fa072cd66 upstream.
    
    I hit the following hung task when runing a OOM LTP test case with 4.1
    kernel.
    
    Call trace:
    [<ffffffc000086a88>] __switch_to+0x74/0x8c
    [<ffffffc000a1bae0>] __schedule+0x23c/0x7bc
    [<ffffffc000a1c09c>] schedule+0x3c/0x94
    [<ffffffc000a1eb84>] rwsem_down_write_failed+0x214/0x350
    [<ffffffc000a1e32c>] down_write+0x64/0x80
    [<ffffffc00021f794>] __ksm_exit+0x90/0x19c
    [<ffffffc0000be650>] mmput+0x118/0x11c
    [<ffffffc0000c3ec4>] do_exit+0x2dc/0xa74
    [<ffffffc0000c46f8>] do_group_exit+0x4c/0xe4
    [<ffffffc0000d0f34>] get_signal+0x444/0x5e0
    [<ffffffc000089fcc>] do_signal+0x1d8/0x450
    [<ffffffc00008a35c>] do_notify_resume+0x70/0x78
    
    The oom victim cannot terminate because it needs to take mmap_sem for
    write while the lock is held by ksmd for read which loops in the page
    allocator
    
    ksm_do_scan
        scan_get_next_rmap_item
                down_read

diff --git a/Makefile b/Makefile
index f6a2cbd..80e180e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 10
-SUBLEVEL = 104
+SUBLEVEL = 105
 EXTRAVERSION =
 NAME = TOSSUG Baby Fish
 
diff --git a/arch/alpha/include/asm/uaccess.h b/arch/alpha/include/asm/uaccess.h
index 766fdfd..6e9d27a 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/uaccess.h b/arch/arc/include/asm/uaccess.h
index 30c9baf..08770c7 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"                   \
+       "       # zero out dst ptr\n"           \
+       "       mov %1,  0\n"                   \
        "       j   2b\n"                       \
        "       .previous\n"                    \
        "       .section __ex_table, \"a\"\n"   \
@@ -101,7 +104,11 @@
        "2:     ;nop\n"                         \
        "       .section .fixup, \"ax\"\n"      \
        "       .align 4\n"                     \
-       "3:     mov %0, %3\n"                   \
+       "3:     # return -EFAULT\n"             \
+       "       mov %0, %3\n"                   \
+       "       # zero out dst ptr\n"           \
+       "       mov %1,  0\n"                   \
+       "       mov %R1, 0\n"                   \
        "       j   2b\n"                       \
        "       .previous\n"                    \
        "       .section __ex_table, \"a\"\n"   \
diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c
index 6763654..0823087 100644
--- a/arch/arc/kernel/signal.c
+++ b/arch/arc/kernel/signal.c
@@ -80,13 +80,14 @@ static int restore_usr_regs(struct pt_regs *regs, struct 
rt_sigframe __user *sf)
        int err;
 
        err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set));
-       if (!err)
-               set_current_blocked(&set);
-
-       err |= __copy_from_user(regs, &(sf->uc.uc_mcontext.regs),
+       err |= __copy_from_user(regs, &(sf->uc.uc_mcontext.regs.scratch),
                                sizeof(sf->uc.uc_mcontext.regs.scratch));
+       if (err)
+               return err;
 
-       return err;
+       set_current_blocked(&set);
+
+       return 0;
 }
 
 static inline int is_do_ss_needed(unsigned int magic)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 032a8d9..9fef67a 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -715,7 +715,7 @@ __armv7_mmu_cache_on:
                orrne   r0, r0, #1              @ MMU enabled
                movne   r1, #0xfffffffd         @ domain 0 = client
                bic     r6, r6, #1 << 31        @ 32-bit translation system
-               bic     r6, r6, #3 << 0         @ use only ttbr0
+               bic     r6, r6, #(7 << 0) | (1 << 4)    @ use only ttbr0
                mcrne   p15, 0, r3, c2, c0, 0   @ load page table pointer
                mcrne   p15, 0, r1, c3, c0, 0   @ load domain access control
                mcrne   p15, 0, r6, c2, c0, 2   @ load ttb control
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index e57d7e5..932125a 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -872,9 +872,9 @@ struct sa1111_save_data {
 
 #ifdef CONFIG_PM
 
-static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
+static int sa1111_suspend_noirq(struct device *dev)
 {
-       struct sa1111 *sachip = platform_get_drvdata(dev);
+       struct sa1111 *sachip = dev_get_drvdata(dev);
        struct sa1111_save_data *save;
        unsigned long flags;
        unsigned int val;
@@ -937,9 +937,9 @@ static int sa1111_suspend(struct platform_device *dev, 
pm_message_t state)
  *     restored by their respective drivers, and must be called
  *     via LDM after this function.
  */
-static int sa1111_resume(struct platform_device *dev)
+static int sa1111_resume_noirq(struct device *dev)
 {
-       struct sa1111 *sachip = platform_get_drvdata(dev);
+       struct sa1111 *sachip = dev_get_drvdata(dev);
        struct sa1111_save_data *save;
        unsigned long flags, id;
        void __iomem *base;
@@ -955,7 +955,7 @@ static int sa1111_resume(struct platform_device *dev)
        id = sa1111_readl(sachip->base + SA1111_SKID);
        if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
                __sa1111_remove(sachip);
-               platform_set_drvdata(dev, NULL);
+               dev_set_drvdata(dev, NULL);
                kfree(save);
                return 0;
        }
@@ -1006,8 +1006,8 @@ static int sa1111_resume(struct platform_device *dev)
 }
 
 #else
-#define sa1111_suspend NULL
-#define sa1111_resume  NULL
+#define sa1111_suspend_noirq NULL
+#define sa1111_resume_noirq  NULL
 #endif
 
 static int sa1111_probe(struct platform_device *pdev)
@@ -1041,6 +1041,11 @@ static int sa1111_remove(struct platform_device *pdev)
        return 0;
 }
 
+static struct dev_pm_ops sa1111_pm_ops = {
+       .suspend_noirq = sa1111_suspend_noirq,
+       .resume_noirq = sa1111_resume_noirq,
+};
+
 /*
  *     Not sure if this should be on the system bus or not yet.
  *     We really want some way to register a system device at
@@ -1053,11 +1058,10 @@ static int sa1111_remove(struct platform_device *pdev)
 static struct platform_driver sa1111_device_driver = {
        .probe          = sa1111_probe,
        .remove         = sa1111_remove,
-       .suspend        = sa1111_suspend,
-       .resume         = sa1111_resume,
        .driver         = {
                .name   = "sa1111",
                .owner  = THIS_MODULE,
+               .pm     = &sa1111_pm_ops,
        },
 };
 
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 5859c8b..c2a6d84 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -90,6 +90,8 @@ void __init arm_dt_init_cpu_maps(void)
                return;
 
        for_each_child_of_node(cpus, cpu) {
+               const __be32 *cell;
+               int prop_bytes;
                u32 hwid;
 
                if (of_node_cmp(cpu->type, "cpu"))
@@ -101,17 +103,23 @@ void __init arm_dt_init_cpu_maps(void)
                 * properties is considered invalid to build the
                 * cpu_logical_map.
                 */
-               if (of_property_read_u32(cpu, "reg", &hwid)) {
+               cell = of_get_property(cpu, "reg", &prop_bytes);
+               if (!cell || prop_bytes < sizeof(*cell)) {
                        pr_debug(" * %s missing reg property\n",
                                     cpu->full_name);
                        return;
                }
 
                /*
-                * 8 MSBs must be set to 0 in the DT since the reg property
+                * Bits n:24 must be set to 0 in the DT since the reg property
                 * defines the MPIDR[23:0].
                 */
-               if (hwid & ~MPIDR_HWID_BITMASK)
+               do {
+                       hwid = be32_to_cpu(*cell++);
+                       prop_bytes -= sizeof(*cell);
+               } while (!hwid && prop_bytes > 0);
+
+               if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK))
                        return;
 
                /*
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 9db3e98..4983b11 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -30,6 +30,7 @@
 
 #include <mach/hardware.h>
 #include <mach/irqs.h>
+#include <mach/reset.h>
 
 #include "generic.h"
 
@@ -133,6 +134,7 @@ static void sa1100_power_off(void)
 
 void sa11x0_restart(char mode, const char *cmd)
 {
+       clear_reset_status(RESET_STATUS_ALL);
        if (mode == 's') {
                /* Jump into ROM at address 0 */
                soft_restart(0);
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index fe32c0e..e647e6d 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -126,6 +126,7 @@ extern unsigned long randomize_et_dyn(unsigned long base);
 
 #define SET_PERSONALITY(ex)            clear_thread_flag(TIF_32BIT);
 
+/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
 #define ARCH_DLINFO                                                    \
 do {                                                                   \
        NEW_AUX_ENT(AT_SYSINFO_EHDR,                                    \
diff --git a/arch/arm64/include/asm/spinlock.h 
b/arch/arm64/include/asm/spinlock.h
index 0defa07..c3cab6f 100644
--- a/arch/arm64/include/asm/spinlock.h
+++ b/arch/arm64/include/asm/spinlock.h
@@ -200,4 +200,14 @@ static inline int arch_read_trylock(arch_rwlock_t *rw)
 #define arch_read_relax(lock)  cpu_relax()
 #define arch_write_relax(lock) cpu_relax()
 
+/*
+ * Accesses appearing in program order before a spin_lock() operation
+ * can be reordered with accesses inside the critical section, by virtue
+ * of arch_spin_lock being constructed using acquire semantics.
+ *
+ * In cases where this is problematic (e.g. try_to_wake_up), an
+ * smp_mb__before_spinlock() can restore the required ordering.
+ */
+#define smp_mb__before_spinlock()      smp_mb()
+
 #endif /* __ASM_SPINLOCK_H */
diff --git a/arch/arm64/include/uapi/asm/auxvec.h 
b/arch/arm64/include/uapi/asm/auxvec.h
index 22d6d88..4cf0c17 100644
--- a/arch/arm64/include/uapi/asm/auxvec.h
+++ b/arch/arm64/include/uapi/asm/auxvec.h
@@ -19,4 +19,6 @@
 /* vDSO location */
 #define AT_SYSINFO_EHDR        33
 
+#define AT_VECTOR_SIZE_ARCH 1 /* entries in ARCH_DLINFO */
+
 #endif
diff --git a/arch/arm64/kernel/debug-monitors.c 
b/arch/arm64/kernel/debug-monitors.c
index f4726dc..49e6e30 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -276,8 +276,10 @@ int kernel_active_single_step(void)
 /* ptrace API */
 void user_enable_single_step(struct task_struct *task)
 {
-       set_ti_thread_flag(task_thread_info(task), TIF_SINGLESTEP);
-       set_regs_spsr_ss(task_pt_regs(task));
+       struct thread_info *ti = task_thread_info(task);
+
+       if (!test_and_set_ti_thread_flag(ti, TIF_SINGLESTEP))
+               set_regs_spsr_ss(task_pt_regs(task));
 }
 
 void user_disable_single_step(struct task_struct *task)
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 7cd589e..5d515e6 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -490,7 +490,7 @@ el0_inv:
        mov     x0, sp
        mov     x1, #BAD_SYNC
        mrs     x2, esr_el1
-       b       bad_mode
+       b       bad_el0_sync
 ENDPROC(el0_sync)
 
        .align  6
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index f30852d..488a7b3 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -307,16 +307,33 @@ asmlinkage long do_ni_syscall(struct pt_regs *regs)
 }
 
 /*
- * bad_mode handles the impossible case in the exception vector.
+ * bad_mode handles the impossible case in the exception vector. This is always
+ * fatal.
  */
 asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr)
 {
-       siginfo_t info;
-       void __user *pc = (void __user *)instruction_pointer(regs);
        console_verbose();
 
        pr_crit("Bad mode in %s handler detected, code 0x%08x\n",
                handler[reason], esr);
+
+       die("Oops - bad mode", regs, 0);
+       local_irq_disable();
+       panic("bad mode");
+}
+
+/*
+ * bad_el0_sync handles unexpected, but potentially recoverable synchronous
+ * exceptions taken from EL0. Unlike bad_mode, this returns.
+ */
+asmlinkage void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int 
esr)
+{
+       siginfo_t info;
+       void __user *pc = (void __user *)instruction_pointer(regs);
+       console_verbose();
+
+       pr_crit("Bad EL0 synchronous exception detected on CPU%d, code 
0x%08x\n",
+               smp_processor_id(), esr);
        __show_regs(regs);
 
        info.si_signo = SIGILL;
@@ -324,7 +341,7 @@ asmlinkage void bad_mode(struct pt_regs *regs, int reason, 
unsigned int esr)
        info.si_code  = ILL_ILLOPC;
        info.si_addr  = pc;
 
-       arm64_notify_die("Oops - bad mode", regs, &info, 0);
+       force_sig_info(info.si_signo, &info, current);
 }
 
 void __pte_error(const char *file, int line, unsigned long val)
diff --git a/arch/avr32/include/asm/uaccess.h b/arch/avr32/include/asm/uaccess.h
index 245b2ee..a0a9b8c 100644
--- a/arch/avr32/include/asm/uaccess.h
+++ b/arch/avr32/include/asm/uaccess.h
@@ -74,7 +74,7 @@ extern __kernel_size_t __copy_user(void *to, const void *from,
 
 extern __kernel_size_t copy_to_user(void __user *to, const void *from,
                                    __kernel_size_t n);
-extern __kernel_size_t copy_from_user(void *to, const void __user *from,
+extern __kernel_size_t ___copy_from_user(void *to, const void __user *from,
                                      __kernel_size_t n);
 
 static inline __kernel_size_t __copy_to_user(void __user *to, const void *from,
@@ -88,6 +88,15 @@ static inline __kernel_size_t __copy_from_user(void *to,
 {
        return __copy_user(to, (const void __force *)from, n);
 }
+static inline __kernel_size_t copy_from_user(void *to,
+                                              const void __user *from,
+                                              __kernel_size_t n)
+{
+       size_t res = ___copy_from_user(to, from, n);
+       if (unlikely(res))
+               memset(to + (n - res), 0, res);
+       return res;
+}
 
 #define __copy_to_user_inatomic __copy_to_user
 #define __copy_from_user_inatomic __copy_from_user
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c
index d93ead0..7c6cf14 100644
--- a/arch/avr32/kernel/avr32_ksyms.c
+++ b/arch/avr32/kernel/avr32_ksyms.c
@@ -36,7 +36,7 @@ EXPORT_SYMBOL(copy_page);
 /*
  * Userspace access stuff.
  */
-EXPORT_SYMBOL(copy_from_user);
+EXPORT_SYMBOL(___copy_from_user);
 EXPORT_SYMBOL(copy_to_user);
 EXPORT_SYMBOL(__copy_user);
 EXPORT_SYMBOL(strncpy_from_user);
diff --git a/arch/avr32/lib/copy_user.S b/arch/avr32/lib/copy_user.S
index ea59c04..0753734 100644
--- a/arch/avr32/lib/copy_user.S
+++ b/arch/avr32/lib/copy_user.S
@@ -23,13 +23,13 @@
         */
        .text
        .align  1
-       .global copy_from_user
-       .type   copy_from_user, @function
-copy_from_user:
+       .global ___copy_from_user
+       .type   ___copy_from_user, @function
+___copy_from_user:
        branch_if_kernel r8, __copy_user
        ret_if_privileged r8, r11, r10, r10
        rjmp    __copy_user
-       .size   copy_from_user, . - copy_from_user
+       .size   ___copy_from_user, . - ___copy_from_user
 
        .global copy_to_user
        .type   copy_to_user, @function
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 903c7d8..a8e208e 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -435,7 +435,7 @@ void __init at32_init_pio(struct platform_device *pdev)
        struct resource *regs;
        struct pio_device *pio;
 
-       if (pdev->id > MAX_NR_PIO_DEVICES) {
+       if (pdev->id >= MAX_NR_PIO_DEVICES) {
                dev_err(&pdev->dev, "only %d PIO devices supported\n",
                        MAX_NR_PIO_DEVICES);
                return;
diff --git a/arch/blackfin/include/asm/uaccess.h 
b/arch/blackfin/include/asm/uaccess.h
index 57701c3..a992a78 100644
--- a/arch/blackfin/include/asm/uaccess.h
+++ b/arch/blackfin/include/asm/uaccess.h
@@ -177,11 +177,12 @@ static inline int bad_user_access_length(void)
 static inline unsigned long __must_check
 copy_from_user(void *to, const void __user *from, unsigned long n)
 {
-       if (access_ok(VERIFY_READ, from, n))
+       if (likely(access_ok(VERIFY_READ, from, n))) {
                memcpy(to, (const void __force *)from, n);
-       else
-               return n;
-       return 0;
+               return 0;
+       }
+       memset(to, 0, n);
+       return n;
 }
 
 static inline unsigned long __must_check
diff --git a/arch/cris/include/asm/uaccess.h b/arch/cris/include/asm/uaccess.h
index 9145408..93bfa8a 100644
--- a/arch/cris/include/asm/uaccess.h
+++ b/arch/cris/include/asm/uaccess.h
@@ -176,30 +176,6 @@ extern unsigned long __copy_user(void __user *to, const 
void *from, unsigned lon
 extern unsigned long __copy_user_zeroing(void *to, const void __user *from, 
unsigned long n);
 extern unsigned long __do_clear_user(void __user *to, unsigned long n);
 
-static inline unsigned long
-__generic_copy_to_user(void __user *to, const void *from, unsigned long n)
-{
-       if (access_ok(VERIFY_WRITE, to, n))
-               return __copy_user(to,from,n);
-       return n;
-}
-
-static inline unsigned long
-__generic_copy_from_user(void *to, const void __user *from, unsigned long n)
-{
-       if (access_ok(VERIFY_READ, from, n))
-               return __copy_user_zeroing(to,from,n);
-       return n;
-}
-
-static inline unsigned long
-__generic_clear_user(void __user *to, unsigned long n)
-{
-       if (access_ok(VERIFY_WRITE, to, n))
-               return __do_clear_user(to,n);
-       return n;
-}
-
 static inline long
 __strncpy_from_user(char *dst, const char __user *src, long count)
 {
@@ -262,7 +238,7 @@ __constant_copy_from_user(void *to, const void __user 
*from, unsigned long n)
        else if (n == 24)
                __asm_copy_from_user_24(to, from, ret);
        else
-               ret = __generic_copy_from_user(to, from, n);
+               ret = __copy_user_zeroing(to, from, n);
 
        return ret;
 }
@@ -312,7 +288,7 @@ __constant_copy_to_user(void __user *to, const void *from, 
unsigned long n)
        else if (n == 24)
                __asm_copy_to_user_24(to, from, ret);
        else
-               ret = __generic_copy_to_user(to, from, n);
+               ret = __copy_user(to, from, n);
 
        return ret;
 }
@@ -344,26 +320,43 @@ __constant_clear_user(void __user *to, unsigned long n)
        else if (n == 24)
                __asm_clear_24(to, ret);
        else
-               ret = __generic_clear_user(to, n);
+               ret = __do_clear_user(to, n);
 
        return ret;
 }
 
 
-#define clear_user(to, n)                      \
-(__builtin_constant_p(n) ?                     \
- __constant_clear_user(to, n) :                        \
- __generic_clear_user(to, n))
+static inline size_t clear_user(void __user *to, size_t n)
+{
+       if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
+               return n;
+       if (__builtin_constant_p(n))
+               return __constant_clear_user(to, n);
+       else
+               return __do_clear_user(to, n);
+}
 
-#define copy_from_user(to, from, n)            \
-(__builtin_constant_p(n) ?                     \
- __constant_copy_from_user(to, from, n) :      \
- __generic_copy_from_user(to, from, n))
+static inline size_t copy_from_user(void *to, const void __user *from, size_t 
n)
+{
+       if (unlikely(!access_ok(VERIFY_READ, from, n))) {
+               memset(to, 0, n);
+               return n;
+       }
+       if (__builtin_constant_p(n))
+               return __constant_copy_from_user(to, from, n);
+       else
+               return __copy_user_zeroing(to, from, n);
+}
 
-#define copy_to_user(to, from, n)              \
-(__builtin_constant_p(n) ?                     \
- __constant_copy_to_user(to, from, n) :                \
- __generic_copy_to_user(to, from, n))
+static inline size_t copy_to_user(void __user *to, const void *from, size_t n)
+{
+       if (unlikely(!access_ok(VERIFY_WRITE, to, n)))
+               return n;
+       if (__builtin_constant_p(n))
+               return __constant_copy_to_user(to, from, n);
+       else
+               return __copy_user(to, from, n);
+}
 
 /* We let the __ versions of copy_from/to_user inline, because they're often
  * used in fast paths and have only a small space overhead.
diff --git a/arch/frv/include/asm/uaccess.h b/arch/frv/include/asm/uaccess.h
index 0b67ec5..3a74137 100644
--- a/arch/frv/include/asm/uaccess.h
+++ b/arch/frv/include/asm/uaccess.h
@@ -263,19 +263,25 @@ do {                                                      
\
 extern long __memset_user(void *dst, unsigned long count);
 extern long __memcpy_user(void *dst, const void *src, unsigned long count);
 
-#define clear_user(dst,count)                  __memset_user(____force(dst), 
(count))
+#define __clear_user(dst,count)                        
__memset_user(____force(dst), (count))
 #define __copy_from_user_inatomic(to, from, n) __memcpy_user((to), 
____force(from), (n))
 #define __copy_to_user_inatomic(to, from, n)   __memcpy_user(____force(to), 
(from), (n))
 
 #else
 
-#define clear_user(dst,count)                  (memset(____force(dst), 0, 
(count)), 0)
+#define __clear_user(dst,count)                        (memset(____force(dst), 
0, (count)), 0)
 #define __copy_from_user_inatomic(to, from, n) (memcpy((to), ____force(from), 
(n)), 0)
 #define __copy_to_user_inatomic(to, from, n)   (memcpy(____force(to), (from), 
(n)), 0)
 
 #endif
 
-#define __clear_user clear_user
+static inline unsigned long __must_check
+clear_user(void __user *to, unsigned long n)
+{
+       if (likely(__access_ok(to, n)))
+               n = __clear_user(to, n);
+       return n;
+}
 
 static inline unsigned long __must_check
 __copy_to_user(void __user *to, const void *from, unsigned long n)
diff --git a/arch/hexagon/include/asm/uaccess.h 
b/arch/hexagon/include/asm/uaccess.h
index e4127e4..25fc904 100644
--- a/arch/hexagon/include/asm/uaccess.h
+++ b/arch/hexagon/include/asm/uaccess.h
@@ -102,7 +102,8 @@ static inline long hexagon_strncpy_from_user(char *dst, 
const char __user *src,
 {
        long res = __strnlen_user(src, n);
 
-       /* return from strnlen can't be zero -- that would be rubbish. */
+       if (unlikely(!res))
+               return -EFAULT;
 
        if (res > n) {
                copy_from_user(dst, src, n);
diff --git a/arch/ia64/include/asm/uaccess.h b/arch/ia64/include/asm/uaccess.h
index 449c8c0..810926c 100644
--- a/arch/ia64/include/asm/uaccess.h
+++ b/arch/ia64/include/asm/uaccess.h
@@ -262,17 +262,15 @@ __copy_from_user (void *to, const void __user *from, 
unsigned long count)
        __cu_len;                                                               
        \
 })
 
-#define copy_from_user(to, from, n)                                            
        \
-({                                                                             
        \
-       void *__cu_to = (to);                                                   
        \
-       const void __user *__cu_from = (from);                                  
        \
-       long __cu_len = (n);                                                    
        \
-                                                                               
        \
-       __chk_user_ptr(__cu_from);                                              
        \
-       if (__access_ok(__cu_from, __cu_len, get_fs()))                         
        \
-               __cu_len = __copy_user((__force void __user *) __cu_to, 
__cu_from, __cu_len);   \
-       __cu_len;                                                               
        \
-})
+static inline unsigned long
+copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+       if (likely(__access_ok(from, n, get_fs())))
+               n = __copy_user((__force void __user *) to, from, n);
+       else
+               memset(to, 0, n);
+       return n;
+}
 
 #define __copy_in_user(to, from, size) __copy_user((to), (from), (size))
 
diff --git a/arch/m32r/include/asm/uaccess.h b/arch/m32r/include/asm/uaccess.h
index 1c7047b..a26d28d 100644
--- a/arch/m32r/include/asm/uaccess.h
+++ b/arch/m32r/include/asm/uaccess.h
@@ -215,7 +215,7 @@ extern int fixup_exception(struct pt_regs *regs);
 #define __get_user_nocheck(x,ptr,size)                                 \
 ({                                                                     \
        long __gu_err = 0;                                              \
-       unsigned long __gu_val;                                         \
+       unsigned long __gu_val = 0;                                     \
        might_sleep();                                                  \
        __get_user_size(__gu_val,(ptr),(size),__gu_err);                \
        (x) = (__typeof__(*(ptr)))__gu_val;                             \
diff --git a/arch/metag/include/asm/atomic.h b/arch/metag/include/asm/atomic.h
index 307ecd2..d7d6b9e 100644
--- a/arch/metag/include/asm/atomic.h
+++ b/arch/metag/include/asm/atomic.h
@@ -38,6 +38,7 @@
 #define atomic_dec(v) atomic_sub(1, (v))
 
 #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
+#define atomic_dec_if_positive(v)       atomic_sub_if_positive(1, v)
 
 #define smp_mb__before_atomic_dec()    barrier()
 #define smp_mb__after_atomic_dec()     barrier()
@@ -46,8 +47,6 @@
 
 #endif
 
-#define atomic_dec_if_positive(v)       atomic_sub_if_positive(1, v)
-
 #include <asm-generic/atomic64.h>
 
 #endif /* __ASM_METAG_ATOMIC_H */
diff --git a/arch/metag/include/asm/uaccess.h b/arch/metag/include/asm/uaccess.h
index 0748b0a..7841f22 100644
--- a/arch/metag/include/asm/uaccess.h
+++ b/arch/metag/include/asm/uaccess.h
@@ -199,8 +199,9 @@ extern unsigned long __must_check __copy_user_zeroing(void 
*to,
 static inline unsigned long
 copy_from_user(void *to, const void __user *from, unsigned long n)
 {
-       if (access_ok(VERIFY_READ, from, n))
+       if (likely(access_ok(VERIFY_READ, from, n)))
                return __copy_user_zeroing(to, from, n);
+       memset(to, 0, n);
        return n;
 }
 
diff --git a/arch/microblaze/include/asm/uaccess.h 
b/arch/microblaze/include/asm/uaccess.h
index 04e4955..5488a1a 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -226,7 +226,7 @@ extern long __user_bad(void);
 
 #define __get_user(x, ptr)                                             \
 ({                                                                     \
-       unsigned long __gu_val;                                         \
+       unsigned long __gu_val = 0;                                     \
        /*unsigned long __gu_ptr = (unsigned long)(ptr);*/              \
        long __gu_err;                                                  \
        switch (sizeof(*(ptr))) {                                       \
@@ -371,10 +371,13 @@ extern long __user_bad(void);
 static inline long copy_from_user(void *to,
                const void __user *from, unsigned long n)
 {
+       unsigned long res = n;
        might_sleep();
-       if (access_ok(VERIFY_READ, from, n))
-               return __copy_from_user(to, from, n);
-       return n;
+       if (likely(access_ok(VERIFY_READ, from, n)))
+               res = __copy_from_user(to, from, n);
+       if (unlikely(res))
+               memset(to + (n - res), 0, res);
+       return res;
 }
 
 #define __copy_to_user(to, from, n)    \
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h
index 883a162..05863e3 100644
--- a/arch/mips/include/asm/kvm_host.h
+++ b/arch/mips/include/asm/kvm_host.h
@@ -375,7 +375,10 @@ struct kvm_vcpu_arch {
        /* Host KSEG0 address of the EI/DI offset */
        void *kseg0_commpage;
 
-       u32 io_gpr;             /* GPR used as IO source/target */
+       /* Resume PC after MMIO completion */
+       unsigned long io_pc;
+       /* GPR used as IO source/target */
+       u32 io_gpr;
 
        /* Used to calibrate the virutal count register for the guest */
        int32_t host_cp0_count;
@@ -386,8 +389,6 @@ struct kvm_vcpu_arch {
        /* Bitmask of pending exceptions to be cleared */
        unsigned long pending_exceptions_clr;
 
-       unsigned long pending_load_cause;
-
        /* Save/Restore the entryhi register when are are preempted/scheduled 
back in */
        unsigned long preempt_entryhi;
 
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index 5e6cd09..a288de2 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -73,7 +73,7 @@ static inline int is_syscall_success(struct pt_regs *regs)
 
 static inline long regs_return_value(struct pt_regs *regs)
 {
-       if (is_syscall_success(regs))
+       if (is_syscall_success(regs) || !user_mode(regs))
                return regs->regs[2];
        else
                return -regs->regs[2];
diff --git a/arch/mips/include/asm/uaccess.h b/arch/mips/include/asm/uaccess.h
index f3fa375..e09339d 100644
--- a/arch/mips/include/asm/uaccess.h
+++ b/arch/mips/include/asm/uaccess.h
@@ -13,6 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/thread_info.h>
+#include <linux/string.h>
 
 /*
  * The fs value determines whether argument validity checking should be
@@ -938,6 +939,8 @@ extern size_t __copy_user_inatomic(void *__to, const void 
*__from, size_t __n);
                might_fault();                                          \
                __cu_len = __invoke_copy_from_user(__cu_to, __cu_from,  \
                                                   __cu_len);           \
+       } else {                                                        \
+               memset(__cu_to, 0, __cu_len);                           \
        }                                                               \
        __cu_len;                                                       \
 })
diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c
index 9f76438..7162854 100644
--- a/arch/mips/kvm/kvm_mips_emul.c
+++ b/arch/mips/kvm/kvm_mips_emul.c
@@ -254,15 +254,15 @@ enum emulation_result kvm_mips_emul_eret(struct kvm_vcpu 
*vcpu)
        struct mips_coproc *cop0 = vcpu->arch.cop0;
        enum emulation_result er = EMULATE_DONE;
 
-       if (kvm_read_c0_guest_status(cop0) & ST0_EXL) {
+       if (kvm_read_c0_guest_status(cop0) & ST0_ERL) {
+               kvm_clear_c0_guest_status(cop0, ST0_ERL);
+               vcpu->arch.pc = kvm_read_c0_guest_errorepc(cop0);
+       } else if (kvm_read_c0_guest_status(cop0) & ST0_EXL) {
                kvm_debug("[%#lx] ERET to %#lx\n", vcpu->arch.pc,
                          kvm_read_c0_guest_epc(cop0));
                kvm_clear_c0_guest_status(cop0, ST0_EXL);
                vcpu->arch.pc = kvm_read_c0_guest_epc(cop0);
 
-       } else if (kvm_read_c0_guest_status(cop0) & ST0_ERL) {
-               kvm_clear_c0_guest_status(cop0, ST0_ERL);
-               vcpu->arch.pc = kvm_read_c0_guest_errorepc(cop0);
        } else {
                printk("[%#lx] ERET when MIPS_SR_EXL|MIPS_SR_ERL == 0\n",
                       vcpu->arch.pc);
@@ -310,6 +310,47 @@ enum emulation_result kvm_mips_emul_tlbr(struct kvm_vcpu 
*vcpu)
        return er;
 }
 
+/**
+ * kvm_mips_invalidate_guest_tlb() - Indicates a change in guest MMU map.
+ * @vcpu:      VCPU with changed mappings.
+ * @tlb:       TLB entry being removed.
+ *
+ * This is called to indicate a single change in guest MMU mappings, so that we
+ * can arrange TLB flushes on this and other CPUs.
+ */
+static void kvm_mips_invalidate_guest_tlb(struct kvm_vcpu *vcpu,
+                                         struct kvm_mips_tlb *tlb)
+{
+       int cpu, i;
+       bool user;
+
+       /* No need to flush for entries which are already invalid */
+       if (!((tlb->tlb_lo0 | tlb->tlb_lo1) & MIPS3_PG_V))
+               return;
+       /* User address space doesn't need flushing for KSeg2/3 changes */
+       user = tlb->tlb_hi < KVM_GUEST_KSEG0;
+
+       preempt_disable();
+
+       /*
+        * Probe the shadow host TLB for the entry being overwritten, if one
+        * matches, invalidate it
+        */
+       kvm_mips_host_tlb_inv(vcpu, tlb->tlb_hi);
+
+       /* Invalidate the whole ASID on other CPUs */
+       cpu = smp_processor_id();
+       for_each_possible_cpu(i) {
+               if (i == cpu)
+                       continue;
+               if (user)
+                       vcpu->arch.guest_user_asid[i] = 0;
+               vcpu->arch.guest_kernel_asid[i] = 0;
+       }
+
+       preempt_enable();
+}
+
 /* Write Guest TLB Entry @ Index */
 enum emulation_result kvm_mips_emul_tlbwi(struct kvm_vcpu *vcpu)
 {
@@ -331,10 +372,8 @@ enum emulation_result kvm_mips_emul_tlbwi(struct kvm_vcpu 
*vcpu)
        }
 
        tlb = &vcpu->arch.guest_tlb[index];
-#if 1
-       /* Probe the shadow host TLB for the entry being overwritten, if one 
matches, invalidate it */
-       kvm_mips_host_tlb_inv(vcpu, tlb->tlb_hi);
-#endif
+
+       kvm_mips_invalidate_guest_tlb(vcpu, tlb);
 
        tlb->tlb_mask = kvm_read_c0_guest_pagemask(cop0);
        tlb->tlb_hi = kvm_read_c0_guest_entryhi(cop0);
@@ -373,10 +412,7 @@ enum emulation_result kvm_mips_emul_tlbwr(struct kvm_vcpu 
*vcpu)
 
        tlb = &vcpu->arch.guest_tlb[index];
 
-#if 1
-       /* Probe the shadow host TLB for the entry being overwritten, if one 
matches, invalidate it */
-       kvm_mips_host_tlb_inv(vcpu, tlb->tlb_hi);
-#endif
+       kvm_mips_invalidate_guest_tlb(vcpu, tlb);
 
        tlb->tlb_mask = kvm_read_c0_guest_pagemask(cop0);
        tlb->tlb_hi = kvm_read_c0_guest_entryhi(cop0);
@@ -419,6 +455,7 @@ kvm_mips_emulate_CP0(uint32_t inst, uint32_t *opc, uint32_t 
cause,
        int32_t rt, rd, copz, sel, co_bit, op;
        uint32_t pc = vcpu->arch.pc;
        unsigned long curr_pc;
+       int cpu, i;
 
        /*
         * Update PC and hold onto current PC in case there is
@@ -538,8 +575,16 @@ kvm_mips_emulate_CP0(uint32_t inst, uint32_t *opc, 
uint32_t cause,
                                             ASID_MASK,
                                             vcpu->arch.gprs[rt] & ASID_MASK);
 
+                                       preempt_disable();
                                        /* Blow away the shadow host TLBs */
                                        kvm_mips_flush_host_tlb(1);
+                                       cpu = smp_processor_id();
+                                       for_each_possible_cpu(i)
+                                               if (i != cpu) {
+                                                       
vcpu->arch.guest_user_asid[i] = 0;
+                                                       
vcpu->arch.guest_kernel_asid[i] = 0;
+                                               }
+                                       preempt_enable();
                                }
                                kvm_write_c0_guest_entryhi(cop0,
                                                           vcpu->arch.gprs[rt]);
@@ -773,6 +818,7 @@ kvm_mips_emulate_load(uint32_t inst, uint32_t cause,
                      struct kvm_run *run, struct kvm_vcpu *vcpu)
 {
        enum emulation_result er = EMULATE_DO_MMIO;
+       unsigned long curr_pc;
        int32_t op, base, rt, offset;
        uint32_t bytes;
 
@@ -781,7 +827,18 @@ kvm_mips_emulate_load(uint32_t inst, uint32_t cause,
        offset = inst & 0xffff;
        op = (inst >> 26) & 0x3f;
 
-       vcpu->arch.pending_load_cause = cause;
+       /*
+        * Find the resume PC now while we have safe and easy access to the
+        * prior branch instruction, and save it for
+        * kvm_mips_complete_mmio_load() to restore later.
+        */
+       curr_pc = vcpu->arch.pc;
+       er = update_pc(vcpu, cause);
+       if (er == EMULATE_FAIL)
+               return er;
+       vcpu->arch.io_pc = vcpu->arch.pc;
+       vcpu->arch.pc = curr_pc;
+
        vcpu->arch.io_gpr = rt;
 
        switch (op) {
@@ -1610,7 +1667,6 @@ kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, struct 
kvm_run *run)
 {
        unsigned long *gpr = &vcpu->arch.gprs[vcpu->arch.io_gpr];
        enum emulation_result er = EMULATE_DONE;
-       unsigned long curr_pc;
 
        if (run->mmio.len > sizeof(*gpr)) {
                printk("Bad MMIO length: %d", run->mmio.len);
@@ -1618,14 +1674,8 @@ kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, 
struct kvm_run *run)
                goto done;
        }
 
-       /*
-        * Update PC and hold onto current PC in case there is
-        * an error and we want to rollback the PC
-        */
-       curr_pc = vcpu->arch.pc;
-       er = update_pc(vcpu, vcpu->arch.pending_load_cause);
-       if (er == EMULATE_FAIL)
-               return er;
+       /* Restore saved resume PC */
+       vcpu->arch.pc = vcpu->arch.io_pc;
 
        switch (run->mmio.len) {
        case 4:
@@ -1647,12 +1697,6 @@ kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu, 
struct kvm_run *run)
                break;
        }
 
-       if (vcpu->arch.pending_load_cause & CAUSEF_BD)
-               kvm_debug
-                   ("[%#lx] Completing %d byte BD Load to gpr %d (0x%08lx) 
type %d\n",
-                    vcpu->arch.pc, run->mmio.len, vcpu->arch.io_gpr, *gpr,
-                    vcpu->mmio_needed);
-
 done:
        return er;
 }
diff --git a/arch/mips/mti-malta/malta-setup.c 
b/arch/mips/mti-malta/malta-setup.c
index c72a069..2046e1c 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -36,6 +36,9 @@
 #include <linux/console.h>
 #endif
 
+#define ROCIT_CONFIG_GEN0              0x1f403000
+#define  ROCIT_CONFIG_GEN0_PCI_IOCU    BIT(7)

_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to