Push to branch refs/heads/master: 9902b824f09a1aa25ebe8b93764600de3d67d918 --> 88fa72f5bf9f679df0210d94f841d5687d8a4e39
Documentation/filesystems/00-INDEX | 3 + Documentation/filesystems/wrapfs.txt | 172 ++++++ Documentation/virtual/kvm/api.txt | 1 + MAINTAINERS | 9 + Makefile | 2 +- arch/arm/xen/enlighten.c | 3 +- arch/powerpc/boot/ps3-head.S | 5 - arch/powerpc/boot/ps3.c | 8 +- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/include/uapi/asm/kvm.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch/powerpc/kvm/book3s_hv.c | 6 + arch/powerpc/kvm/book3s_hv_rm_mmu.c | 2 + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 + arch/x86/kvm/vmx.c | 11 +- block/bsg.c | 3 + drivers/base/firmware_class.c | 7 +- drivers/block/loop.c | 2 +- drivers/char/tpm/xen-tpmfront.c | 1 - drivers/crypto/caam/caamalg.c | 4 +- drivers/gpu/drm/ast/ast_main.c | 7 +- drivers/gpu/drm/gma500/psb_drv.c | 3 + drivers/gpu/drm/i915/i915_drv.h | 24 +- drivers/gpu/drm/i915/intel_pm.c | 42 +- drivers/gpu/drm/radeon/radeon_cursor.c | 73 ++- drivers/gpu/drm/radeon/radeon_mode.h | 1 + drivers/gpu/drm/radeon/si_dpm.c | 1 + drivers/infiniband/core/multicast.c | 7 +- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 7 +- drivers/input/misc/drv260x.c | 1 - drivers/md/dm-crypt.c | 7 +- drivers/md/persistent-data/dm-space-map-metadata.c | 14 +- drivers/md/raid5.c | 9 + drivers/mmc/host/sdhci.c | 20 + drivers/net/wireless/ath/ath9k/pci.c | 7 +- drivers/pci/pci.c | 4 + drivers/regulator/stw481x-vmmc.c | 3 +- drivers/s390/char/vmlogrdr.c | 2 +- drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/scsi_sysfs.c | 4 - drivers/scsi/sg.c | 3 + drivers/ssb/pci.c | 1 + drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- drivers/target/target_core_user.c | 2 - drivers/thermal/thermal_hwmon.c | 2 +- drivers/usb/class/cdc-acm.c | 1 + drivers/usb/core/hub.c | 101 ++-- drivers/usb/gadget/composite.c | 2 +- drivers/usb/host/uhci-pci.c | 4 + drivers/usb/serial/kl5kusb105.c | 33 +- drivers/usb/serial/option.c | 7 + drivers/xen/gntdev.c | 2 +- fs/Kconfig | 1 + fs/Makefile | 1 + fs/block_dev.c | 9 +- fs/btrfs/async-thread.c | 14 + fs/btrfs/async-thread.h | 1 + fs/btrfs/delayed-inode.c | 6 +- fs/btrfs/tree-log.c | 7 +- fs/cifs/cifsglob.h | 3 + fs/cifs/cifsproto.h | 3 + fs/cifs/connect.c | 34 +- fs/cifs/smb2file.c | 2 +- fs/cifs/smb2pdu.c | 77 ++- fs/cifs/smb2proto.h | 1 + fs/exec.c | 10 +- fs/ext4/ext4.h | 1 + fs/ext4/inline.c | 4 +- fs/ext4/mballoc.c | 4 +- fs/ext4/super.c | 43 +- fs/f2fs/debug.c | 1 + fs/nfs/file.c | 2 +- fs/wrapfs/Kconfig | 8 + fs/wrapfs/Makefile | 7 + fs/wrapfs/dentry.c | 49 ++ fs/wrapfs/file.c | 381 ++++++++++++++ fs/wrapfs/inode.c | 584 +++++++++++++++++++++ fs/wrapfs/lookup.c | 323 ++++++++++++ fs/wrapfs/main.c | 176 +++++++ fs/wrapfs/mmap.c | 93 ++++ fs/wrapfs/super.c | 208 ++++++++ fs/wrapfs/wrapfs.h | 207 ++++++++ fs/xfs/xfs_log_recover.c | 1 + include/linux/namei.h | 2 + include/linux/netdevice.h | 4 +- include/net/ip.h | 2 + include/rdma/ib_addr.h | 6 +- include/uapi/linux/magic.h | 2 + kernel/debug/debug_core.c | 4 +- kernel/time/timekeeping.c | 4 +- kernel/trace/trace_functions_graph.c | 17 +- mm/vmscan.c | 14 +- net/ceph/messenger.c | 13 + net/core/dev.c | 2 +- net/ipv4/af_inet.c | 50 +- net/ipv4/fou.c | 16 + net/ipv4/gre_offload.c | 5 + net/ipv4/icmp.c | 5 +- net/ipv4/ip_options.c | 14 +- net/ipv4/udp_offload.c | 6 +- net/ipv6/ip6_offload.c | 13 + net/sunrpc/auth_gss/auth_gss.c | 7 +- scripts/kconfig/nconf.gui.c | 15 +- sound/pci/hda/patch_realtek.c | 3 + sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 + sound/usb/hiface/pcm.c | 2 + sound/usb/mixer.c | 3 +- 107 files changed, 2832 insertions(+), 287 deletions(-) commit 88fa72f5bf9f679df0210d94f841d5687d8a4e39 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Feb 18 19:11:24 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 <e...@cs.sunysb.edu> commit 7c3ff95dd4add69bbb4fe28b8c58318ed8285062 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Feb 18 15:32:53 2017 -0500 Wrapfs: update copyrights for 2017 Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 07e36b4b6740c09949c34eaeb07f1351679bce7b Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Dec 27 18:19:41 2016 -0500 Wrapfs: inode_change_ok renamed setattr_prepare Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f94f06f942e621ec6e1028263ce24028be02dc3d Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat May 21 23:59:03 2016 -0400 Wrapfs: support NFS exports Based on patch from Sandeep Joshi <sanjos...@gmail.com>. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit c2dd1300681800c131a2e8edfdf1a03506436d28 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat May 21 23:59:03 2016 -0400 Wrapfs: use d_splice_alias Refactor interpose code to allow lookup to use d_splice_alias. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 7b13deec2c37bf38180cbb7ff3e1a7de9c29f168 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 3 21:31:17 2015 -0500 Wrapfs: update copyright year to 2015 commit 32832c10e1f9ba77af75bf92f2f4380f76758451 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 3 21:31:17 2015 -0500 Wrapfs: use vfs xattr helpers Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 4f6a6d2b2a86000a3b7371d4091dbccafcdbac3e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Sep 4 22:11:34 2015 -0400 Wrapfs: update ->direct_IO op prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 26b0fa43d7d0bcb434ef0aab65b0adcbfd40924b Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Sep 4 22:10:34 2015 -0400 Wrapfs: use d_inode macro Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9b3d6a2019e80ed65c7e56862b50b69c7a372d72 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Sep 4 22:09:34 2015 -0400 Wrapfs: remove aio_read/write ops Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 0746bccfa255439aa7e751dac4ab303a9ca7ba10 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Aug 15 22:48:32 2014 -0400 Wrapfs: properly copy meta-data after AIO operations from lower inode Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1246b508a492586bc0a16254ddb96a95fde09d44 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Aug 11 18:10:35 2014 -0400 Wrapfs: leave placeholders for updating upper inode after AIO Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d09b4d5649335b565444fa9a2bb8c56d44cea58a Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Aug 10 00:40:56 2014 -0400 Wrapfs: protect lower_file by ref-count during aio operation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit 53a459ed614fe4d4387c0fcd9016aef46260da67 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Aug 10 00:40:56 2014 -0400 Wrapfs: add read_iter/write_iter opeations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit d92676d89074e854599b3fbd27f48c091bca5fb5 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Aug 10 00:40:56 2014 -0400 Wrapfs: update to new direct_IO interface Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9146077dd8e15098020b01dda4c0c06512a34d34 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Jul 26 19:06:53 2014 -0400 Wrapfs: update wrapfs_fsync In v3.16 generic_file_fsync will access ->i_sb->s_bdev->bd_disk, but s_bdev is NULL for wrapfs inode. This will trigger a kernel panic in xfstests generic/075, generic/091, etc. as of kernel v3.16-rc1. This patch fixes this issue by using __generic_file_fsync, a new interface introduced in v3.16. Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 568efa4dca10b3815fa16d2bb4d6ec46818d12ad Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed Jun 25 22:37:16 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 <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit 7df14c549541a76420a03aafc17f871b35feeacf Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed Jun 25 22:30:27 2014 -0400 Wrapfs: support extended attributes (xattr) operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> Signed-off-by: Mengyang Li <li.mengy...@stonybrook.edu> commit 88a6caa0239789a92c78c9801ee77c14101c5184 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Jun 20 19:40:04 2014 -0400 Wrapfs: support asynchronous-IO (AIO) operations Signed-off-by: Li Mengyang <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 4ab32aa979d231905c44a731e860ea20d96ce05e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Jun 20 19:39:40 2014 -0400 Wrapfs: support direct-IO (DIO) operations Signed-off-by: Li Mengyang <li.mengy...@stonybrook.edu> Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f1c91582664bded04fc7670fe23d9eff54f5cb0c Author: Erez Zadok <e...@cs.sunysb.edu> Date: Wed May 14 23:45:28 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 <e...@cs.sunysb.edu> commit ff915459e3309f55eaccd51a9a69faa9a27be470 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sat Apr 26 22:43:20 2014 -0400 Wrapfs: use new vfs_rename prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ce0edb61a53409b3c8b27d397e09e969e5d28a70 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Apr 3 13:24:28 2014 -0400 Wrapfs: update documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 15a478364c1a762797c5db4b9530919dceb6129a Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Apr 3 13:17:55 2014 -0400 Wrapfs: update maintainers Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a630d80f13b7e7e9f82dd729b60cd9857732b734 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 21 03:03:00 2014 -0500 Wrapfs: update documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 366c2526dd951e1855a3f6a0f408757e6e621a13 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 21 01:25:54 2014 -0500 Wrapfs: 2014 Copyright update Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 914c818406e86fcadeb0242dd9c4f23916efaa6b Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 26 23:05:22 2013 -0500 Wrapfs: use generic put_link helper Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit b67e7497e914efd77c5556ea91a1a950333c5184 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 26 23:03:46 2013 -0500 Wrapfs: remove unnecessary initializations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 854b17761431f4df9ea6a5f23621cac57b595677 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Nov 24 11:12:07 2013 -0500 Wrapfs: remove deprecated init_lower_nd Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 55ecf25774678244164ff99ad371349b39d61d3e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 19:00:00 2013 -0500 Wrapfs: update MAINTAINERS info Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit fcfcdece4dc4c00004fdc2f379d2c1f343b64892 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 18:59:47 2013 -0500 patch wrapfs-copyright-update.patch commit 276e5688913d23a6bc20b203db9c21fbf9338f46 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:23:31 2013 -0500 Wrapfs: use DCACHE_OP_REVALIDATE flag in ->d_revalidate Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit c087b1d4d3ab4da466e5bda0b88e29b73a59a7ae Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:22:31 2013 -0500 Wrapfs: implement ->getattr Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 8db8933caf584237268b61687c6039ee75fcfb55 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:21:31 2013 -0500 Wrapfs: use file_inode helper Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit c88e6080c3c996b8c8c1e59e9aa2347a8890de20 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:20:31 2013 -0500 Wrapfs: call filemap_write_and_wait in ->flush Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 561f4f4d6e7347eede818596e73f9b6f060c05e7 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:19:31 2013 -0500 Wrapfs: handle new VFS API with delegation support For now, wrapfs isn't supporting NFS delegations. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 151ab839024acc5b7c07b0f5202ff0adcbf866f0 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:18:31 2013 -0500 VFS: export vfs_path_lookup In 3.12, this useful function was unexported: wrapfs needs a way to lookup relative to a struct path and use a proper vfsmount, unlike lookup_one_len. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 91124e17fe415757afdc0180c34ae5dd9ebf0606 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Nov 19 17:17:31 2013 -0500 Wrapfs: ->readdir op now ->iterate Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 28e469ce341ebf3decb9d5eea6448feeea4311dc Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit bb3e6bb3898bd4666fffe4c7b1a74ef1156fbd74 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 25b6d57989a691c6e44241b0a40b66da4221f15e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:32 2013 -0400 Wrapfs: declare MODULE_ALIAS_FS Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 0f34b1310fb4785451f0b2088ff4d4bf24d537ba Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:32 2013 -0400 Wrapfs: don't use FS_REVAL_DOT in fs_flags Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 423606047435314552a9bc7a0bfc832534bb1483 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:31 2013 -0400 Wrapfs: remove dependency on now-defunct CONFIG_EXPERIMENTAL Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d4a1ce0332353a6db710a3d8a07040179c337d17 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit d38d310234dd6db4fc670216d7a605d32a44f1d8 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 136a190bc709f596c6d444f86bd204eab6ba0772 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:30 2013 -0400 Wrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 925ae6c9e581d8b49a136fb3e0098662ce7a5a73 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:29 2013 -0400 Wrapfs: ->lookup takes flags not a nameidata Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 7450f807084df960a710fead8d0525aee9346f74 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:29 2013 -0400 Wrapfs: ->create no longer takes a nameidata, only a flag Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit e3f9a291591136a3b6b69513a8cde6a41335c2a2 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:29 2013 -0400 Wrapfs: ->d_revalidate now takes namei flags, not nameidata Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1dfc0b567d6d3b3173704634a65c6cad420d4c59 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:28 2013 -0400 Wrapfs: struct nameidata no longer has an open-intent data Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 80f78ccb9a26c8e81cb5321363c1224dc6480f24 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:28 2013 -0400 Wrapfs: dentry_open now takes a struct path Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 83cc1640c52cd86a6090962a5d6fc769f2b8ed06 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:27 2013 -0400 Wrapfs: use vm_munmap in ->mmap Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 051e9fd3d55a5eb4dbd16a22e102382044ab9a91 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:27 2013 -0400 Wrapfs: use clear_inode in evict_inode Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit c1dfb0df219bc3b22a21b8d1b8e00b6e12730d40 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jun 4 23:19:26 2013 -0400 Wrapfs: use d_make_root Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit b88a54dee4a7a06c5c2bfe1c54a07aec11288f18 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 31 04:40:19 2012 -0500 Wrapfs: use mode_t Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1ef37514e9bb718beb3904122abe59b12b28e686 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Jan 29 20:34:27 2012 -0500 Wrapfs: use set_nlink() Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9ee723be53c8f1602e9a4c907bd768d6e0a88dc9 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit dd0b0c19ffb7581e5b89504555e003c02e48a966 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:32 2011 -0400 Wrapfs: use d_alloc_root Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit b3b0341536068fce585842550c962b60e7fa8bc5 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:31 2011 -0400 Wrapfs: use d_set_d_op Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 8aa41e93a51b7cb3b14a7197960e97f486cc4143 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:30 2011 -0400 Wrapfs: use updated vfs_path_lookup prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 39d23efdb47336f05ce296d5692313a1252f3077 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:30 2011 -0400 Wrapfs: ->fsync updates for new prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 28f4ac1f1990bccbd0017db646c7e16f02418c54 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:29 2011 -0400 Wrapfs: support LOOKUP_RCU in ->d_revalidate Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 7844b801bdcbf6b35cc0629236bf9b294de4dbb1 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Sep 6 00:10:28 2011 -0400 Wrapfs: new ->permission prototype and fixes. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit df7367d0dc685786ad619bd543507e11c5f750fd Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 81c5703c61887023242f3770ee7fff5129bc6242 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Mar 18 13:14:28 2011 -0400 Wrapfs: remove extra debug in rmdir Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a1a1a397be865f3a778451f7d46339aa57028e14 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Mar 18 12:38:01 2011 -0400 Wrapfs: checkpatch fixes Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit ccfd9cee8215fa4fddf9d02d3b307d0c0b879419 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit c5011ced4ea11eddd7060219b91a44906fc6a2b4 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Thu Mar 17 23:21:55 2011 -0400 Wrapfs: copyright update for 2011 Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 0783d1b148d1b19a7fe0aa8f2a1042a960e378d4 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit f04ec93b07d22466bebc7edef0f0aea231f5a735 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit de1c0f17beaae7e893bef1f668c52db897160d7b Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit c047d02ca8c4663dbf8c0800c5fa7cf87e557ffe Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 73697a8d4767da8a9660383244989a15a4fc68f0 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Sun Mar 6 16:23:16 2011 -0500 Wrapfs: update ->permission prototye and code for new iperm flag Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9da226d7991b9125f526c09a8e540e54279eacc9 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Nov 12 18:15:05 2010 -0500 Wrapfs: handle maxbytes properly Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9346f496db7771b3297971c8fac4fc7f73693165 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 33a1ae035a2ce2d8dd09dc22875bcb82d4ce2a08 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Aug 10 23:50:14 2010 -0400 Wrapfs: new vfs_statfs and ->evict_inode prototypes Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9cc609b4726096f65981b2f2b0326e7f35747739 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Aug 6 23:37:29 2010 -0400 Wrapfs: update ->fsync prototype Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f35ff8e54d8ffa5767ee19cdb14e38d77ce47d94 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Apr 20 21:22:02 2010 -0400 Wrapfs: update documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 28740b73b0177f7e500372268af6b8c532ead2f8 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Apr 20 15:32:09 2010 -0400 Wrapfs: include slab.h Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 0f7a1f1dad6a1e3b153b2ee2bb642701929a5aa5 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 0d6fb30d06c73e419b73e4e2d4287f487bb2b640 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Fri Feb 26 03:18:04 2010 -0500 Wrapfs: decrement nd_path on follow_link error Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f71541467eb0cb9524decc0166338eb6be018efe Author: Erez Zadok <e...@cs.sunysb.edu> Date: Tue Jan 5 04:27:00 2010 -0500 Wrapfs: don't mention kernel version in modload message Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1828a6cdd22b195e399ea34eb677f4ae5b88ad91 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Kconfig: hook to configure Wrapfs Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 9f73935a212017fdbfb7a27e1ca415e88f48fe74 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Makefile: hook to compile Wrapfs Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit bb44ef31faec64867e65760e306f387a61829229 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: file system magic number Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit daba0e290f5f2f427e4c52dd1ac96c13fdf940ff Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: Kconfig options Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit fe0eb7a9bfcefe7abfd9a5586b534abd3a5367a7 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: main Makefile Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 69839c61b26599e86b0c1f172585624d80935625 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: vm_ops operations Includes necessary address_space workaround ops. Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit a4bf7aa457fe8ec3e96feccf121202a931d8e797 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: mount-time and module-linkage functions Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit de83017b9f910e19b2c00580ddb7623c99ce74e3 Author: Erez Zadok <e...@cs.sunysb.edu> 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 <e...@cs.sunysb.edu> commit 247cc13076d45ff3815c6fb8cd9b4913bff3c684 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: file operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 87f47b18b7728b4783e60181f02e20f8f15358f3 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: dentry operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit de5082099e98643daa3073a9b158733a23c0c5dc Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: inode operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1e95d38ee43fad6ead44fdd4bd62b1106fee118e Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: superblock operations Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit d66573f1f5f45c9477c42de9cbe78aa26d2d7c64 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: main header file Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 171766a7196feb9caaec17338f273c2043e5a29f Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: Maintainers Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 1a826503dfa3010f8e89d6e62e6f9d858e3da818 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Documentation: index entry for Wrapfs Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit 869b811296e9284468ea1832c9e6ac430eef5e68 Author: Erez Zadok <e...@cs.sunysb.edu> Date: Mon Jan 4 20:45:06 2010 -0500 Wrapfs: introduction and usage documentation Signed-off-by: Erez Zadok <e...@cs.sunysb.edu> commit f40b3cc69de8c97bbcdb74e3cffda06ffcad2cd7 Author: Sasha Levin <alexander.le...@verizon.com> Date: Wed Jan 18 13:48:06 2017 -0500 Linux 4.1.38 Signed-off-by: Sasha Levin <alexander.le...@verizon.com> commit d8435bb5e8fb1d20c480756ed6b76121c4d2d50d Author: Alexander Duyck <adu...@mirantis.com> Date: Tue Mar 29 14:55:22 2016 -0700 gro: Allow tunnel stacking in the case of FOU/GUE [ Upstream commit c3483384ee511ee2af40b4076366cd82a6a47b86 ] This patch should fix the issues seen with a recent fix to prevent tunnel-in-tunnel frames from being generated with GRO. The fix itself is correct for now as long as we do not add any devices that support NETIF_F_GSO_GRE_CSUM. When such a device is added it could have the potential to mess things up due to the fact that the outer transport header points to the outer UDP header and not the GRE header as would be expected. Fixes: fac8e0f579695 ("tunnels: Don't apply GRO to multiple layers of encapsulation.") Signed-off-by: Alexander Duyck <adu...@mirantis.com> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Sasha Levin <alexander.le...@verizon.com> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 9fa2bf8..7830f1c 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1955,6 +1955,7 @@ registers, find a list below: PPC | KVM_REG_PPC_TM_VSCR | 32 PPC | KVM_REG_PPC_TM_DSCR | 64 PPC | KVM_REG_PPC_TM_TAR | 64 + PPC | KVM_REG_PPC_TM_XER | 64 | | MIPS | KVM_REG_MIPS_R0 | 64 ... diff --git a/Makefile b/Makefile index df72b64..1aba535 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 1 -SUBLEVEL = 37 +SUBLEVEL = 38 EXTRAVERSION = NAME = Series 4800 diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 7d0f070..ab19044 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -218,8 +218,7 @@ static int __init xen_guest_init(void) * for secondary CPUs as they are brought up. * For uniformity we use VCPUOP_register_vcpu_info even on cpu0. */ - xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info), - sizeof(struct vcpu_info)); + xen_vcpu_info = alloc_percpu(struct vcpu_info); if (xen_vcpu_info == NULL) return -ENOMEM; diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S index b6fcbaf..3dc44b0 100644 --- a/arch/powerpc/boot/ps3-head.S +++ b/arch/powerpc/boot/ps3-head.S @@ -57,11 +57,6 @@ __system_reset_overlay: bctr 1: - /* Save the value at addr zero for a null pointer write check later. */ - - li r4, 0 - lwz r3, 0(r4) - /* Primary delays then goes to _zimage_start in wrapper. */ or 31, 31, 31 /* db16cyc */ diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c index 4ec2d86..a05558a 100644 --- a/arch/powerpc/boot/ps3.c +++ b/arch/powerpc/boot/ps3.c @@ -119,13 +119,12 @@ void ps3_copy_vectors(void) flush_cache((void *)0x100, 512); } -void platform_init(unsigned long null_check) +void platform_init(void) { const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */ void *chosen; unsigned long ft_addr; u64 rm_size; - unsigned long val; console_ops.write = ps3_console_write; platform_ops.exit = ps3_exit; @@ -153,11 +152,6 @@ void platform_init(unsigned long null_check) printf(" flat tree at 0x%lx\n\r", ft_addr); - val = *(unsigned long *)0; - - if (val != null_check) - printf("null check failed: %lx != %lx\n\r", val, null_check); - ((kernel_entry_t)0)(ft_addr, 0, NULL); ps3_exit(); diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index a193a13..7fe65af 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -532,6 +532,7 @@ struct kvm_vcpu_arch { u64 tfiar; u32 cr_tm; + u64 xer_tm; u64 lr_tm; u64 ctr_tm; u64 amr_tm; diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h index ab4d473..720b71a 100644 --- a/arch/powerpc/include/uapi/asm/kvm.h +++ b/arch/powerpc/include/uapi/asm/kvm.h @@ -587,6 +587,7 @@ struct kvm_get_htab_header { #define KVM_REG_PPC_TM_VSCR (KVM_REG_PPC_TM | KVM_REG_SIZE_U32 | 0x67) #define KVM_REG_PPC_TM_DSCR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x68) #define KVM_REG_PPC_TM_TAR (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x69) +#define KVM_REG_PPC_TM_XER (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x6a) /* PPC64 eXternal Interrupt Controller Specification */ #define KVM_DEV_XICS_GRP_SOURCES 1 /* 64-bit source attributes */ diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 0034b6b..d8d332e 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -583,6 +583,7 @@ int main(void) DEFINE(VCPU_VRS_TM, offsetof(struct kvm_vcpu, arch.vr_tm.vr)); DEFINE(VCPU_VRSAVE_TM, offsetof(struct kvm_vcpu, arch.vrsave_tm)); DEFINE(VCPU_CR_TM, offsetof(struct kvm_vcpu, arch.cr_tm)); + DEFINE(VCPU_XER_TM, offsetof(struct kvm_vcpu, arch.xer_tm)); DEFINE(VCPU_LR_TM, offsetof(struct kvm_vcpu, arch.lr_tm)); DEFINE(VCPU_CTR_TM, offsetof(struct kvm_vcpu, arch.ctr_tm)); DEFINE(VCPU_AMR_TM, offsetof(struct kvm_vcpu, arch.amr_tm)); diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index f5b3de7..63c37fd 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -1171,6 +1171,9 @@ static int kvmppc_get_one_reg_hv(struct kvm_vcpu *vcpu, u64 id, case KVM_REG_PPC_TM_CR: *val = get_reg_val(id, vcpu->arch.cr_tm); break; + case KVM_REG_PPC_TM_XER: + *val = get_reg_val(id, vcpu->arch.xer_tm); + break; case KVM_REG_PPC_TM_LR: *val = get_reg_val(id, vcpu->arch.lr_tm); break; @@ -1378,6 +1381,9 @@ static int kvmppc_set_one_reg_hv(struct kvm_vcpu *vcpu, u64 id, case KVM_REG_PPC_TM_CR: vcpu->arch.cr_tm = set_reg_val(id, *val); break; + case KVM_REG_PPC_TM_XER: + vcpu->arch.xer_tm = set_reg_val(id, *val); + break; case KVM_REG_PPC_TM_LR: vcpu->arch.lr_tm = set_reg_val(id, *val); break; diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c index c6d601c..bee1641 100644 --- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c +++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c @@ -619,6 +619,8 @@ long kvmppc_h_protect(struct kvm_vcpu *vcpu, unsigned long flags, HPTE_V_ABSENT); do_tlbies(kvm, &rb, 1, global_invalidates(kvm, flags), true); + /* Don't lose R/C bit updates done by hardware */ + r |= be64_to_cpu(hpte[1]) & (HPTE_R_R | HPTE_R_C); hpte[1] = cpu_to_be64(r); } } diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 11d82b9..70eaf54 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S @@ -2399,11 +2399,13 @@ kvmppc_save_tm: mfctr r7 mfspr r8, SPRN_AMR mfspr r10, SPRN_TAR + mfxer r11 std r5, VCPU_LR_TM(r9) stw r6, VCPU_CR_TM(r9) std r7, VCPU_CTR_TM(r9) std r8, VCPU_AMR_TM(r9) std r10, VCPU_TAR_TM(r9) + std r11, VCPU_XER_TM(r9) /* Restore r12 as trap number. */ lwz r12, VCPU_TRAP(r9) @@ -2496,11 +2498,13 @@ kvmppc_restore_tm: ld r7, VCPU_CTR_TM(r4) ld r8, VCPU_AMR_TM(r4) ld r9, VCPU_TAR_TM(r4) + ld r10, VCPU_XER_TM(r4) mtlr r5 mtcr r6 mtctr r7 mtspr SPRN_AMR, r8 mtspr SPRN_TAR, r9 + mtxer r10 /* * Load up PPR and DSCR values but don't put them in the actual SPRs diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 08f9d92..341ea55 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1172,10 +1172,10 @@ static inline bool nested_cpu_has_posted_intr(struct vmcs12 *vmcs12) return vmcs12->pin_based_vm_exec_control & PIN_BASED_POSTED_INTR; } -static inline bool is_exception(u32 intr_info) +static inline bool is_nmi(u32 intr_info) { return (intr_info & (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VALID_MASK)) - == (INTR_TYPE_HARD_EXCEPTION | INTR_INFO_VALID_MASK); + == (INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK); } static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason, @@ -5089,7 +5089,7 @@ static int handle_exception(struct kvm_vcpu *vcpu) if (is_machine_check(intr_info)) return handle_machine_check(vcpu); - if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR) + if (is_nmi(intr_info)) return 1; /* already handled by vmx_vcpu_run() */ if (is_no_device(intr_info)) { @@ -7519,7 +7519,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) switch (exit_reason) { case EXIT_REASON_EXCEPTION_NMI: - if (!is_exception(intr_info)) + if (is_nmi(intr_info)) return false; else if (is_page_fault(intr_info)) return enable_ept; @@ -7967,8 +7967,7 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx) kvm_machine_check(); /* We need to handle NMIs before interrupts are enabled */ - if ((exit_intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR && - (exit_intr_info & INTR_INFO_VALID_MASK)) { + if (is_nmi(exit_intr_info)) { kvm_before_handle_nmi(&vmx->vcpu); asm("int $2"); kvm_after_handle_nmi(&vmx->vcpu); diff --git a/block/bsg.c b/block/bsg.c index d214e92..b9a5361 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -655,6 +655,9 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) dprintk("%s: write %Zd bytes\n", bd->name, count); + if (unlikely(segment_eq(get_fs(), KERNEL_DS))) + return -EINVAL; + bsg_set_block(bd, file); bytes_written = 0; diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 4d1d9de..8b0b950 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -923,13 +923,14 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, timeout = MAX_JIFFY_OFFSET; } - retval = wait_for_completion_interruptible_timeout(&buf->completion, + timeout = wait_for_completion_interruptible_timeout(&buf->completion, timeout); - if (retval == -ERESTARTSYS || !retval) { + if (timeout == -ERESTARTSYS || !timeout) { + retval = timeout; mutex_lock(&fw_lock); fw_load_abort(fw_priv); mutex_unlock(&fw_lock); - } else if (retval > 0) { + } else if (timeout > 0) { retval = 0; } diff --git a/drivers/block/loop.c b/drivers/block/loop.c index cef6fa8..ea0c863 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1436,7 +1436,7 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, blk_mq_start_request(bd->rq); if (lo->lo_state != Lo_bound) - return -EIO; + return BLK_MQ_RQ_QUEUE_ERROR; if (cmd->rq->cmd_flags & REQ_WRITE) { struct loop_device *lo = cmd->rq->q->queuedata; diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c index 3111f27..849f2e2 100644 --- a/drivers/char/tpm/xen-tpmfront.c +++ b/drivers/char/tpm/xen-tpmfront.c @@ -305,7 +305,6 @@ static int tpmfront_probe(struct xenbus_device *dev, rv = setup_ring(dev, priv); if (rv) { chip = dev_get_drvdata(&dev->dev); - tpm_chip_unregister(chip); ring_free(priv); return rv; } diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 29071a1..c9202f6 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -703,7 +703,9 @@ static int aead_set_sh_desc(struct crypto_aead *aead) /* Will read cryptlen */ append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ); - aead_append_src_dst(desc, FIFOLD_TYPE_MSG1OUT2); + append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | KEY_VLF | + FIFOLD_TYPE_MSG1OUT2 | FIFOLD_TYPE_LASTBOTH); + append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF); /* Write ICV */ append_seq_store(desc, ctx->authsize, LDST_CLASS_2_CCB | diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index fd5c5f3..e53dbc9 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -223,7 +223,8 @@ static int ast_get_dram_info(struct drm_device *dev) ast_write32(ast, 0x10000, 0xfc600309); do { - ; + if (pci_channel_offline(dev->pdev)) + return -EIO; } while (ast_read32(ast, 0x10000) != 0x01); data = ast_read32(ast, 0x10004); @@ -429,7 +430,9 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) ast_detect_chip(dev, &need_post); if (ast->chip != AST1180) { - ast_get_dram_info(dev); + ret = ast_get_dram_info(dev); + if (ret) + goto out_free; ast->vram_size = ast_get_vram_info(dev); DRM_INFO("dram %d %d %d %08x\n", ast->mclk, ast->dram_type, ast->dram_bus_width, ast->vram_size); } diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c index 92e7e57..db98ab5 100644 --- a/drivers/gpu/drm/gma500/psb_drv.c +++ b/drivers/gpu/drm/gma500/psb_drv.c @@ -484,6 +484,9 @@ static const struct file_operations psb_gem_fops = { .open = drm_open, .release = drm_release, .unlocked_ioctl = psb_unlocked_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = drm_compat_ioctl, +#endif .mmap = drm_gem_mmap, .poll = drm_poll, .read = drm_read, diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7d53d7e..c7a7cc1 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2006,21 +2006,19 @@ struct drm_i915_gem_object { /** Record of address bit 17 of each page at last unbind. */ unsigned long *bit_17; - union { - /** for phy allocated objects */ - struct drm_dma_handle *phys_handle; - - struct i915_gem_userptr { - uintptr_t ptr; - unsigned read_only :1; - unsigned workers :4; + struct i915_gem_userptr { + uintptr_t ptr; + unsigned read_only :1; + unsigned workers :4; #define I915_GEM_USERPTR_MAX_WORKERS 15 - struct i915_mm_struct *mm; - struct i915_mmu_object *mmu_object; - struct work_struct *work; - } userptr; - }; + struct i915_mm_struct *mm; + struct i915_mmu_object *mmu_object; + struct work_struct *work; + } userptr; + + /** for phys allocated objects */ + struct drm_dma_handle *phys_handle; }; #define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 00bc498..52c703b 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -1849,32 +1849,34 @@ static void intel_read_wm_latency(struct drm_device *dev, uint16_t wm[8]) GEN9_MEM_LATENCY_LEVEL_MASK; /* + * If a level n (n > 1) has a 0us latency, all levels m (m >= n) + * need to be disabled. We make sure to sanitize the values out + * of the punit to satisfy this requirement. + */ + for (level = 1; level <= max_level; level++) { + if (wm[level] == 0) { + for (i = level + 1; i <= max_level; i++) + wm[i] = 0; + break; + } + } + + /* * WaWmMemoryReadLatency:skl * * punit doesn't take into account the read latency so we need - * to add 2us to the various latency levels we retrieve from - * the punit. - * - W0 is a bit special in that it's the only level that - * can't be disabled if we want to have display working, so - * we always add 2us there. - * - For levels >=1, punit returns 0us latency when they are - * disabled, so we respect that and don't add 2us then - * - * Additionally, if a level n (n > 1) has a 0us latency, all - * levels m (m >= n) need to be disabled. We make sure to - * sanitize the values out of the punit to satisfy this - * requirement. + * to add 2us to the various latency levels we retrieve from the + * punit when level 0 response data us 0us. */ - wm[0] += 2; - for (level = 1; level <= max_level; level++) - if (wm[level] != 0) + if (wm[0] == 0) { + wm[0] += 2; + for (level = 1; level <= max_level; level++) { + if (wm[level] == 0) + break; wm[level] += 2; - else { - for (i = level + 1; i <= max_level; i++) - wm[i] = 0; - - break; } + } + } else if (IS_HASWELL(dev) || IS_BROADWELL(dev)) { uint64_t sskpd = I915_READ64(MCH_SSKPD); diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index fa66174..cba2300 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c @@ -90,6 +90,9 @@ static void radeon_show_cursor(struct drm_crtc *crtc) struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); struct radeon_device *rdev = crtc->dev->dev_private; + if (radeon_crtc->cursor_out_of_bounds) + return; + if (ASIC_IS_DCE4(rdev)) { WREG32(RADEON_MM_INDEX, EVERGREEN_CUR_CONTROL + radeon_crtc->crtc_offset); WREG32(RADEON_MM_DATA, EVERGREEN_CURSOR_EN | @@ -124,21 +127,25 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) int xorigin = 0, yorigin = 0; int w = radeon_crtc->cursor_width; + radeon_crtc->cursor_x = x; + radeon_crtc->cursor_y = y; + if (ASIC_IS_AVIVO(rdev)) { /* avivo cursor are offset into the total surface */ x += crtc->x; y += crtc->y; } - DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); - if (x < 0) { + if (x < 0) xorigin = min(-x, radeon_crtc->max_cursor_width - 1); - x = 0; - } - if (y < 0) { + if (y < 0) yorigin = min(-y, radeon_crtc->max_cursor_height - 1); - y = 0; + + if (!ASIC_IS_AVIVO(rdev)) { + x += crtc->x; + y += crtc->y; } + DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); /* fixed on DCE6 and newer */ if (ASIC_IS_AVIVO(rdev) && !ASIC_IS_DCE6(rdev)) { @@ -161,27 +168,31 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) if (i > 1) { int cursor_end, frame_end; - cursor_end = x - xorigin + w; + cursor_end = x + w; frame_end = crtc->x + crtc->mode.crtc_hdisplay; if (cursor_end >= frame_end) { w = w - (cursor_end - frame_end); if (!(frame_end & 0x7f)) w--; - } else { - if (!(cursor_end & 0x7f)) - w--; + } else if (cursor_end <= 0) { + goto out_of_bounds; + } else if (!(cursor_end & 0x7f)) { + w--; } if (w <= 0) { - w = 1; - cursor_end = x - xorigin + w; - if (!(cursor_end & 0x7f)) { - x--; - WARN_ON_ONCE(x < 0); - } + goto out_of_bounds; } } } + if (x <= (crtc->x - w) || y <= (crtc->y - radeon_crtc->cursor_height) || + x >= (crtc->x + crtc->mode.crtc_hdisplay) || + y >= (crtc->y + crtc->mode.crtc_vdisplay)) + goto out_of_bounds; + + x += xorigin; + y += yorigin; + if (ASIC_IS_DCE4(rdev)) { WREG32(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, (x << 16) | y); WREG32(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin); @@ -193,6 +204,9 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) WREG32(AVIVO_D1CUR_SIZE + radeon_crtc->crtc_offset, ((w - 1) << 16) | (radeon_crtc->cursor_height - 1)); } else { + x -= crtc->x; + y -= crtc->y; + if (crtc->mode.flags & DRM_MODE_FLAG_DBLSCAN) y *= 2; @@ -210,10 +224,20 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y) yorigin * 256); } - radeon_crtc->cursor_x = x; - radeon_crtc->cursor_y = y; + if (radeon_crtc->cursor_out_of_bounds) { + radeon_crtc->cursor_out_of_bounds = false; + if (radeon_crtc->cursor_bo) + radeon_show_cursor(crtc); + } return 0; + + out_of_bounds: + if (!radeon_crtc->cursor_out_of_bounds) { + radeon_hide_cursor(crtc); + radeon_crtc->cursor_out_of_bounds = true; + } + return 0; } int radeon_crtc_cursor_move(struct drm_crtc *crtc, @@ -306,22 +330,23 @@ int radeon_crtc_cursor_set2(struct drm_crtc *crtc, return ret; } - radeon_crtc->cursor_width = width; - radeon_crtc->cursor_height = height; - radeon_lock_cursor(crtc, true); - if (hot_x != radeon_crtc->cursor_hot_x || + if (width != radeon_crtc->cursor_width || + height != radeon_crtc->cursor_height || + hot_x != radeon_crtc->cursor_hot_x || hot_y != radeon_crtc->cursor_hot_y) { int x, y; x = radeon_crtc->cursor_x + radeon_crtc->cursor_hot_x - hot_x; y = radeon_crtc->cursor_y + radeon_crtc->cursor_hot_y - hot_y; - radeon_cursor_move_locked(crtc, x, y); - + radeon_crtc->cursor_width = width; + radeon_crtc->cursor_height = height; radeon_crtc->cursor_hot_x = hot_x; radeon_crtc->cursor_hot_y = hot_y; + + radeon_cursor_move_locked(crtc, x, y); } radeon_set_cursor(crtc); diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 43ba333..3974e03 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -330,6 +330,7 @@ struct radeon_crtc { u16 lut_r[256], lut_g[256], lut_b[256]; bool enabled; bool can_tile; + bool cursor_out_of_bounds; uint32_t crtc_offset; struct drm_gem_object *cursor_bo; uint64_t cursor_addr; diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index a808ba00..a717da7 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -2975,6 +2975,7 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev, (rdev->pdev->revision == 0x80) || (rdev->pdev->revision == 0x81) || (rdev->pdev->revision == 0x83) || + (rdev->pdev->revision == 0x87) || (rdev->pdev->device == 0x6604) || (rdev->pdev->device == 0x6605)) { max_sclk = 75000; diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c index fa17b55..aab811d 100644 --- a/drivers/infiniband/core/multicast.c +++ b/drivers/infiniband/core/multicast.c @@ -526,8 +526,11 @@ static void join_handler(int status, struct ib_sa_mcmember_rec *rec, process_join_error(group, status); else { int mgids_changed, is_mgid0; - ib_find_pkey(group->port->dev->device, group->port->port_num, - be16_to_cpu(rec->pkey), &pkey_index); + + if (ib_find_pkey(group->port->dev->device, + group->port->port_num, be16_to_cpu(rec->pkey), + &pkey_index)) + pkey_index = MCAST_INVALID_PKEY_INDEX; spin_lock_irq(&group->port->lock); if (group->state == MCAST_BUSY && diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 0d23e05..b970539 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -522,8 +522,11 @@ void ipoib_mcast_join_task(struct work_struct *work) if (!test_bit(IPOIB_FLAG_OPER_UP, &priv->flags)) return; - if (ib_query_port(priv->ca, priv->port, &port_attr) || - port_attr.state != IB_PORT_ACTIVE) { + if (ib_query_port(priv->ca, priv->port, &port_attr)) { + ipoib_dbg(priv, "ib_query_port() failed\n"); + return; + } + if (port_attr.state != IB_PORT_ACTIVE) { ipoib_dbg(priv, "port state is not ACTIVE (state = %d) suspending join task\n", port_attr.state); return; diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c index 5995780..009f75d 100644 --- a/drivers/input/misc/drv260x.c +++ b/drivers/input/misc/drv260x.c @@ -597,7 +597,6 @@ static int drv260x_probe(struct i2c_client *client, } haptics->input_dev->name = "drv260x:haptics"; - haptics->input_dev->dev.parent = client->dev.parent; haptics->input_dev->close = drv260x_close; input_set_drvdata(haptics->input_dev, haptics); input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE); diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index ce507a4..ab16f33 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1482,12 +1482,15 @@ static int crypt_set_key(struct crypt_config *cc, char *key) if (!cc->key_size && strcmp(key, "-")) goto out; + /* clear the flag since following operations may invalidate previously valid key */ + clear_bit(DM_CRYPT_KEY_VALID, &cc->flags); + if (cc->key_size && crypt_decode_key(cc->key, key, cc->key_size) < 0) goto out; - set_bit(DM_CRYPT_KEY_VALID, &cc->flags); - r = crypt_setkey_allcpus(cc); + if (!r) + set_bit(DM_CRYPT_KEY_VALID, &cc->flags); out: /* Hex key string not needed after here, so wipe it. */ diff --git a/drivers/md/persistent-data/dm-space-map-metadata.c b/drivers/md/persistent-data/dm-space-map-metadata.c index 5309129..4ca451e 100644 --- a/drivers/md/persistent-data/dm-space-map-metadata.c +++ b/drivers/md/persistent-data/dm-space-map-metadata.c @@ -766,17 +766,15 @@ int dm_sm_metadata_create(struct dm_space_map *sm, memcpy(&smm->sm, &bootstrap_ops, sizeof(smm->sm)); r = sm_ll_new_metadata(&smm->ll, tm); + if (!r) { + if (nr_blocks > DM_SM_METADATA_MAX_BLOCKS) + nr_blocks = DM_SM_METADATA_MAX_BLOCKS; + r = sm_ll_extend(&smm->ll, nr_blocks); + } + memcpy(&smm->sm, &ops, sizeof(smm->sm)); if (r) return r; - if (nr_blocks > DM_SM_METADATA_MAX_BLOCKS) - nr_blocks = DM_SM_METADATA_MAX_BLOCKS; - r = sm_ll_extend(&smm->ll, nr_blocks); - if (r) - return r; - - memcpy(&smm->sm, &ops, sizeof(smm->sm)); - /* * Now we need to update the newly created data structures with the * allocated blocks that they were built from. diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ef0a99a..e6d689c 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6918,6 +6918,15 @@ static int run(struct mddev *mddev) stripe = (stripe | (stripe-1)) + 1; mddev->queue->limits.discard_alignment = stripe; mddev->queue->limits.discard_granularity = stripe; + + /* + * We use 16-bit counter of active stripes in bi_phys_segments + * (minus one for over-loaded initialization) + */ + blk_queue_max_hw_sectors(mddev->queue, 0xfffe * STRIPE_SECTORS); + blk_queue_max_discard_sectors(mddev->queue, + 0xfffe * STRIPE_SECTORS); + /* * unaligned part of discard request will be ignored, so can't * guarantee discard_zeroes_data diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 5eb23ae..fdc44c8 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2055,7 +2055,27 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ctrl &= ~SDHCI_CTRL_EXEC_TUNING; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); + sdhci_do_reset(host, SDHCI_RESET_CMD); + sdhci_do_reset(host, SDHCI_RESET_DATA); + err = -EIO; + + if (cmd.opcode != MMC_SEND_TUNING_BLOCK_HS200) + goto out; + + sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); + sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); + + spin_unlock_irqrestore(&host->lock, flags); + + memset(&cmd, 0, sizeof(cmd)); + cmd.opcode = MMC_STOP_TRANSMISSION; + cmd.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC; + cmd.busy_timeout = 50; + mmc_wait_for_cmd(mmc, &cmd, 0); + + spin_lock_irqsave(&host->lock, flags); + goto out; } diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 7cdaf40..ea7b8c2 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -27,7 +27,6 @@ static const struct pci_device_id ath_pci_id_table[] = { { PCI_VDEVICE(ATHEROS, 0x0023) }, /* PCI */ { PCI_VDEVICE(ATHEROS, 0x0024) }, /* PCI-E */ { PCI_VDEVICE(ATHEROS, 0x0027) }, /* PCI */ - { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ #ifdef CONFIG_ATH9K_PCOEM /* Mini PCI AR9220 MB92 cards: Compex WLM200NX, Wistron DNMA-92 */ @@ -38,7 +37,7 @@ static const struct pci_device_id ath_pci_id_table[] = { .driver_data = ATH9K_PCI_LED_ACT_HI }, #endif - { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ + { PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */ #ifdef CONFIG_ATH9K_PCOEM { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, @@ -86,7 +85,11 @@ static const struct pci_device_id ath_pci_id_table[] = { 0x10CF, /* Fujitsu */ 0x1536), .driver_data = ATH9K_PCI_D3_L1_WAR }, +#endif + { PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */ + +#ifdef CONFIG_ATH9K_PCOEM /* AR9285 card for Asus */ { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS, 0x002B, diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 4e720ed..66c12c8 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1993,6 +1993,10 @@ bool pci_dev_run_wake(struct pci_dev *dev) if (!dev->pme_support) return false; + /* PME-capable in principle, but not from the intended sleep state */ + if (!pci_pme_capable(dev, pci_target_state(dev))) + return false; + while (bus->parent) { struct pci_dev *bridge = bus->self; diff --git a/drivers/regulator/stw481x-vmmc.c b/drivers/regulator/stw481x-vmmc.c index 7d2ae3e..342f5da 100644 --- a/drivers/regulator/stw481x-vmmc.c +++ b/drivers/regulator/stw481x-vmmc.c @@ -47,7 +47,8 @@ static struct regulator_desc vmmc_regulator = { .volt_table = stw481x_vmmc_voltages, .enable_time = 200, /* FIXME: look this up */ .enable_reg = STW_CONF1, - .enable_mask = STW_CONF1_PDN_VMMC, + .enable_mask = STW_CONF1_PDN_VMMC | STW_CONF1_MMC_LS_STATUS, + .enable_val = STW_CONF1_PDN_VMMC, .vsel_reg = STW_CONF1, .vsel_mask = STW_CONF1_VMMC_MASK, }; diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 9bb48d7..4d20f72 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -872,7 +872,7 @@ static int __init vmlogrdr_init(void) goto cleanup; for (i=0; i < MAXMINOR; ++i ) { - sys_ser[i].buffer = (char *) get_zeroed_page(GFP_KERNEL); + sys_ser[i].buffer = (char *) get_zeroed_page(GFP_KERNEL | GFP_DMA); if (!sys_ser[i].buffer) { rc = -ENOMEM; break; diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 5a0800d..bd6f71b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -2490,6 +2490,7 @@ int megasas_wait_for_outstanding_fusion(struct megasas_instance *instance, printk("megaraid_sas: pending commands remain after waiting, " "will reset adapter scsi%d.\n", instance->host->host_no); + *convert = 1; retval = 1; } out: diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 9ad4116..72699ac 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1005,10 +1005,6 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev) struct request_queue *rq = sdev->request_queue; struct scsi_target *starget = sdev->sdev_target; - error = scsi_device_set_state(sdev, SDEV_RUNNING); - if (error) - return error; - error = scsi_target_add(starget); if (error) return error; diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index ec19293..26bc4e9 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -592,6 +592,9 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) sg_io_hdr_t *hp; unsigned char cmnd[SG_MAX_CDB_SIZE]; + if (unlikely(segment_eq(get_fs(), KERNEL_DS))) + return -EINVAL; + if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) return -ENXIO; SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp, diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 0f28c08..77b551d 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -909,6 +909,7 @@ static int ssb_pci_sprom_get(struct ssb_bus *bus, if (err) { ssb_warn("WARNING: Using fallback SPROM failed (err %d)\n", err); + goto out_free; } else { ssb_dbg("Using SPROM revision %d provided by platform\n", sprom->revision); diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 4b8da86..f7bcefd 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2079,7 +2079,7 @@ static int ni_ai_insn_read(struct comedi_device *dev, unsigned int *data) { struct ni_private *devpriv = dev->private; - unsigned int mask = (s->maxdata + 1) >> 1; + unsigned int mask = s->maxdata; int i, n; unsigned signbits; unsigned int d; diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 07d2996..39e8f22 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -605,8 +605,6 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data) target_complete_cmd(cmd->se_cmd, SAM_STAT_CHECK_CONDITION); cmd->se_cmd = NULL; - kmem_cache_free(tcmu_cmd_cache, cmd); - return 0; } diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c index 1967bee..9035fbc 100644 --- a/drivers/thermal/thermal_hwmon.c +++ b/drivers/thermal/thermal_hwmon.c @@ -98,7 +98,7 @@ temp_crit_show(struct device *dev, struct device_attribute *attr, char *buf) long temperature; int ret; - ret = tz->ops->get_trip_temp(tz, 0, &temperature); + ret = tz->ops->get_crit_temp(tz, &temperature); if (ret) return ret; diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 41dcefe..84532dc 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1720,6 +1720,7 @@ static const struct usb_device_id acm_ids[] = { { USB_DEVICE(0x20df, 0x0001), /* Simtec Electronics Entropy Key */ .driver_info = QUIRK_CONTROL_LINE_STATE, }, { USB_DEVICE(0x2184, 0x001c) }, /* GW Instek AFG-2225 */ + { USB_DEVICE(0x2184, 0x0036) }, /* GW Instek AFG-125 */ { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */ }, /* Motorola H24 HSPA module: */ diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index c98f78b..7602ece 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -101,6 +101,8 @@ EXPORT_SYMBOL_GPL(ehci_cf_port_reset_rwsem); static void hub_release(struct kref *kref); static int usb_reset_and_verify_device(struct usb_device *udev); +static void hub_usb3_port_prepare_disable(struct usb_hub *hub, + struct usb_port *port_dev); static inline char *portspeed(struct usb_hub *hub, int portstatus) { @@ -882,82 +884,28 @@ static int hub_set_port_link_state(struct usb_hub *hub, int port1, } /* - * If USB 3.0 ports are placed into the Disabled state, they will no longer - * detect any device connects or disconnects. This is generally not what the - * USB core wants, since it expects a disabled port to produce a port status - * change event when a new device connects. - * - * Instead, set the link state to Disabled, wait for the link to settle into - * that state, clear any change bits, and then put the port into the RxDetect - * state. + * USB-3 does not have a similar link state as USB-2 that will avoid negotiating + * a connection with a plugged-in cable but will signal the host when the cable + * is unplugged. Disable remote wake and set link state to U3 for USB-3 devices */ -static int hub_usb3_port_disable(struct usb_hub *hub, int port1) -{ - int ret; - int total_time; - u16 portchange, portstatus; - - if (!hub_is_superspeed(hub->hdev)) - return -EINVAL; - - ret = hub_port_status(hub, port1, &portstatus, &portchange); - if (ret < 0) - return ret; - - /* - * USB controller Advanced Micro Devices, Inc. [AMD] FCH USB XHCI - * Controller [1022:7814] will have spurious result making the following - * usb 3.0 device hotplugging route to the 2.0 root hub and recognized - * as high-speed device if we set the usb 3.0 port link state to - * Disabled. Since it's already in USB_SS_PORT_LS_RX_DETECT state, we - * check the state here to avoid the bug. - */ _______________________________________________ unionfs-cvs mailing list: http://unionfs.filesystems.org/ unionfs-cvs@fsl.cs.sunysb.edu http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs