Erez Zadok [Fri, 13 May 2022 23:42:51 +0000 (19:42 -0400)]
Wrapfs: add ->bmap support
Signed-off-by: Aditya Sonavane <aditya.sonavane@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.stonybrook.edu>
Erez Zadok [Sat, 7 May 2022 22:13:03 +0000 (18:13 -0400)]
wrapfs: copyright year update
Erez Zadok [Sat, 7 May 2022 20:48:56 +0000 (16:48 -0400)]
wrapfs: change http URLs to https
Erez Zadok [Mon, 16 Dec 2019 00:02:36 +0000 (19:02 -0500)]
merge changes
Erez Zadok [Sat, 14 Dec 2019 05:07:07 +0000 (00:07 -0500)]
wrapfs: update copyright
Erez Zadok [Sat, 14 Dec 2019 04:22:31 +0000 (23:22 -0500)]
wrapfs: remove unused variable
Erez Zadok [Fri, 29 Mar 2019 20:46:38 +0000 (16:46 -0400)]
update copyright
Erez Zadok [Fri, 29 Mar 2019 20:40:46 +0000 (16:40 -0400)]
fix spell error
Erez Zadok [Sun, 19 Feb 2017 00:11:23 +0000 (19:11 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 18 Feb 2017 20:22:38 +0000 (15:22 -0500)]
Wrapfs: update copyrights for 2017
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 22 May 2016 05:23:26 +0000 (01:23 -0400)]
Wrapfs: support NFS exports
Based on patch from Sandeep Joshi <sanjos100@gmail.com>.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 22 May 2016 05:23:26 +0000 (01:23 -0400)]
Wrapfs: use d_splice_alias
Refactor interpose code to allow lookup to use d_splice_alias.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 14 Dec 2015 22:55:26 +0000 (17:55 -0500)]
Wrapfs: update nlinks after rename
Signed-off-by: Logeswari P Viswanath <logeswari.pv@hpe.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 4 Nov 2015 05:43:27 +0000 (00:43 -0500)]
Wrapfs: update copyright year to 2015
Erez Zadok [Wed, 4 Nov 2015 05:43:27 +0000 (00:43 -0500)]
Wrapfs: use vfs xattr helpers
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 16 Aug 2014 03:17:14 +0000 (23:17 -0400)]
Wrapfs: properly copy meta-data after AIO operations from lower inode
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 11 Aug 2014 22:51:54 +0000 (18:51 -0400)]
Wrapfs: leave placeholders for updating upper inode after AIO
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 10 Aug 2014 06:03:42 +0000 (02:03 -0400)]
Wrapfs: protect lower_file by ref-count during aio operation
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
Erez Zadok [Thu, 26 Jun 2014 03:15:40 +0000 (23:15 -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 <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
Erez Zadok [Thu, 26 Jun 2014 03:15:40 +0000 (23:15 -0400)]
Wrapfs: support extended attributes (xattr) operations
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
Erez Zadok [Sat, 21 Jun 2014 00:21:44 +0000 (20:21 -0400)]
Wrapfs: support asynchronous-IO (AIO) operations
Signed-off-by: Li Mengyang <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 21 Jun 2014 00:21:44 +0000 (20:21 -0400)]
Wrapfs: support direct-IO (DIO) operations
Signed-off-by: Li Mengyang <li.mengyang@stonybrook.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 15 May 2014 04:16:06 +0000 (00:16 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 3 Apr 2014 18:18:59 +0000 (14:18 -0400)]
Wrapfs: update documentation
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 3 Apr 2014 18:18:57 +0000 (14:18 -0400)]
Wrapfs: update maintainers
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 21 Jan 2014 08:27:10 +0000 (03:27 -0500)]
Wrapfs: update documentation
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 21 Jan 2014 06:20:13 +0000 (01:20 -0500)]
Wrapfs: 2014 Copyright update
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 5 Jun 2013 05:36:58 +0000 (01:36 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 5 Jun 2013 05:36:58 +0000 (01:36 -0400)]
Wrapfs: remove unnecessary call to vm_unmap in ->mmap
Code is unnecessary and causes deadlocks in newer kernels.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:43 +0000 (00:25 -0400)]
patch copyright-2013.patch
Erez Zadok [Mon, 3 Jun 2013 04:25:42 +0000 (00:25 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:42 +0000 (00:25 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:40 +0000 (00:25 -0400)]
Wrapfs: remove VM_CAN_NONLINEAR flag use in ->mmap
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:39 +0000 (00:25 -0400)]
Fixed perf_event_p6 compiler-time error (section conflict)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:39 +0000 (00:25 -0400)]
Wrapfs: ->lookup takes flags not a nameidata
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:38 +0000 (00:25 -0400)]
Wrapfs: ->create no longer takes a nameidata, only a flag
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:38 +0000 (00:25 -0400)]
Wrapfs: ->d_revalidate now takes namei flags, not nameidata
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:38 +0000 (00:25 -0400)]
Wrapfs: struct nameidata no longer has an open-intent data
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:37 +0000 (00:25 -0400)]
Wrapfs: dentry_open now takes a struct path
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 3 Jun 2013 04:25:34 +0000 (00:25 -0400)]
Wrapfs: use vm_munmap in ->mmap
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 29 May 2013 01:28:07 +0000 (21:28 -0400)]
Wrapfs: use clear_inode in evict_inode
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 29 May 2013 01:28:07 +0000 (21:28 -0400)]
Wrapfs: use d_make_root
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 31 Jan 2012 09:40:19 +0000 (04:40 -0500)]
Wrapfs: use mode_t
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 30 Jan 2012 01:34:27 +0000 (20:34 -0500)]
Wrapfs: use set_nlink()
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 9 Sep 2011 04:47:49 +0000 (00:47 -0400)]
Wrapfs: drop our dentry in ->rmdir
Also clear nlinks on our inode.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 6 Sep 2011 04:10:32 +0000 (00:10 -0400)]
Wrapfs: use d_alloc_root
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 6 Sep 2011 04:10:31 +0000 (00:10 -0400)]
Wrapfs: use d_set_d_op
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 6 Sep 2011 04:10:30 +0000 (00:10 -0400)]
Wrapfs: use updated vfs_path_lookup prototype
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 6 Sep 2011 04:10:30 +0000 (00:10 -0400)]
Wrapfs: ->fsync updates for new prototype
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 6 Sep 2011 04:10:29 +0000 (00:10 -0400)]
Wrapfs: support LOOKUP_RCU in ->d_revalidate
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 6 Sep 2011 04:10:28 +0000 (00:10 -0400)]
Wrapfs: new ->permission prototype and fixes.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 2 May 2011 06:00:02 +0000 (02:00 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 17:14:28 +0000 (13:14 -0400)]
Wrapfs: remove extra debug in rmdir
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 16:38:01 +0000 (12:38 -0400)]
Wrapfs: checkpatch fixes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 04:45:17 +0000 (00:45 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -0400)]
Wrapfs: copyright update for 2011
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 18 Mar 2011 03:21:55 +0000 (23:21 -0400)]
Wrapfs: remove unnecessary calls to copy lower inode->n_links
Removed from ->create, ->symlink, and ->mknod.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 8 Mar 2011 04:20:33 +0000 (23:20 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 6 Mar 2011 21:23:16 +0000 (16:23 -0500)]
Wrapfs: update ->permission prototye and code for new iperm flag
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 12 Nov 2010 23:15:05 +0000 (18:15 -0500)]
Wrapfs: handle maxbytes properly
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 11 Sep 2010 19:49:33 +0000 (15:49 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 11 Aug 2010 03:50:14 +0000 (23:50 -0400)]
Wrapfs: new vfs_statfs and ->evict_inode prototypes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 7 Aug 2010 03:37:29 +0000 (23:37 -0400)]
Wrapfs: update ->fsync prototype
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 21 Apr 2010 01:22:02 +0000 (21:22 -0400)]
Wrapfs: update documentation
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 20 Apr 2010 19:32:09 +0000 (15:32 -0400)]
Wrapfs: include slab.h
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 20 Apr 2010 19:26:02 +0000 (15:26 -0400)]
Wrapfs: avoid an extra path_get/put pair in wrapfs_open
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 26 Feb 2010 08:18:04 +0000 (03:18 -0500)]
Wrapfs: decrement nd_path on follow_link error
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 09:27:00 +0000 (04:27 -0500)]
Wrapfs: don't mention kernel version in modload message
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Kconfig: hook to configure Wrapfs
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Makefile: hook to compile Wrapfs
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: file system magic number
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: Kconfig options
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: main Makefile
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: vm_ops operations
Includes necessary address_space workaround ops.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: mount-time and module-linkage functions
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: lookup-related functions
Main lookup function, nameidata helpers, and stacking-interposition
functions.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: file operations
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: dentry operations
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: inode operations
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: superblock operations
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: main header file
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: Maintainers
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Documentation: index entry for Wrapfs
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Tue, 5 Jan 2010 01:45:06 +0000 (20:45 -0500)]
Wrapfs: introduction and usage documentation
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Greg Kroah-Hartman [Wed, 27 Feb 2013 17:22:04 +0000 (09:22 -0800)]
Linux 3.7.10
Mathias Krause [Sat, 23 Feb 2013 01:13:47 +0000 (01:13 +0000)]
sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
[ Upstream commit
6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0 ]
Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access opening
doors for a privilege escalation.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicholas Bellinger [Tue, 19 Feb 2013 03:15:14 +0000 (03:15 +0000)]
target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices
commit
7a3cf6ca1ab2a2f7161c6dec5a787fc7a5de864e upstream
This patch fixes a possible divide by zero bug when the fabric_max_sectors
device attribute is written and backend se_device failed to be successfully
configured -> enabled.
Go ahead and use block_size=512 within se_dev_set_fabric_max_sectors()
in the event of a target_configure_device() failure case, as no valid
dev->dev_attrib.block_size value will have been setup yet.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Adam Jackson [Wed, 20 Feb 2013 16:54:17 +0000 (11:54 -0500)]
drm/i915: Fix up mismerge of
3490ea5d in 3.7.y
The 3.7.y version of this seems to have missed a hunk in i9xx_update_wm.
Tested-by: Glen Gray <slaine@slaine.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Wed, 20 Feb 2013 20:38:40 +0000 (12:38 -0800)]
sparc64: Fix huge PMD to PTE translation for sun4u in TLB miss handler.
[ Upstream commit
76968ad2eac6456270353de168b21f04f4b3d1d3 ]
When we set the sun4u version of the PTE execute bit, it's:
or REG, _PAGE_EXEC_4U, REG
_PAGE_EXEC_4U is 0x1000, unfortunately the immedate field of the
'or' instruction is a signed 13-bit value. So the above actually
assembles into:
or REG, -4096, REG
completely corrupting the final PTE value.
Set it with a:
sethi %hi(_PAGE_EXEC_4U), TMP
or REG, TMP, REG
sequence instead.
This fixes "git gc" crashes on sun4u machines.
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Wed, 20 Feb 2013 06:34:10 +0000 (22:34 -0800)]
sparc64: Fix tsb_grow() in atomic context.
[ Upstream commit
0fbebed682ff2788dee58e8d7f7dda46e33aa10b ]
If our first THP installation for an MM is via the set_pmd_at() done
during khugepaged's collapsing we'll end up in tsb_grow() trying to do
a GFP_KERNEL allocation with several locks held.
Simply using GFP_ATOMIC in this situation is not the best option
because we really can't have this fail, so we'd really like to keep
this an order 0 GFP_KERNEL allocation if possible.
Also, doing the TSB allocation from khugepaged is a really bad idea
because we'll allocate it potentially from the wrong NUMA node in that
context.
So what we do is defer the hugepage TSB allocation until the first TLB
miss we take on a hugepage. This is slightly tricky because we have
to handle two unusual cases:
1) Taking the first hugepage TLB miss in the window trap handler.
We'll call the winfix_trampoline when that is detected.
2) An initial TSB allocation via TLB miss races with a hugetlb
fault on another cpu running the same MM. We handle this by
unconditionally loading the TSB we see into the current cpu
even if it's non-NULL at hugetlb_setup time.
Reported-by: Meelis Roos <mroos@ut.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Tue, 19 Feb 2013 21:20:08 +0000 (13:20 -0800)]
sparc64: Handle hugepage TSB being NULL.
[ Upstream commit
bcd896bae0166b4443503482a26ecf84d9ba60ab ]
Accomodate the possibility that the TSB might be NULL at
the point that update_mmu_cache() is invoked. This is
necessary because we will sometimes need to defer the TSB
allocation to the first fault that happens in the 'mm'.
Seperate out the hugepage PTE test into a seperate function
so that the logic is clearer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Tue, 19 Feb 2013 20:56:18 +0000 (12:56 -0800)]
sparc64: Fix gfp_flags setting in tsb_grow().
[ Upstream commit
a55ee1ff751f88252207160087d8197bb7538d4c ]
We should "|= more_flags" rather than "= more_flags".
Reported-by: David Rientjes <rientjes@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Wed, 13 Feb 2013 20:21:06 +0000 (12:21 -0800)]
sparc64: Fix get_user_pages_fast() wrt. THP.
[ Upstream commit
89a77915e0f56dc7b9f9082ba787895b6a83f809 ]
Mostly mirrors the s390 logic, as unlike x86 we don't need the
SetPageReferenced() bits.
On sparc64 we also lack a user/privileged bit in the huge PMDs.
In order to make this work for THP and non-THP builds, some header
file adjustments were necessary. Namely, provide the PMD_HUGE_* bit
defines and the pmd_large() inline unconditionally rather than
protected by TRANSPARENT_HUGEPAGE.
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Wed, 13 Feb 2013 20:15:08 +0000 (12:15 -0800)]
sparc64: Add missing HAVE_ARCH_TRANSPARENT_HUGEPAGE.
[ Upstream commit
b9156ebb7beef015745f917f373abc137efc3400 ]
This got missed in the cleanups done for the S390 THP
support.
CC: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David S. Miller [Thu, 14 Feb 2013 19:49:01 +0000 (11:49 -0800)]
sunvdc: Fix off-by-one in generic_request().
[ Upstream commit
f4d9605434c0fd4cc8639bf25cfc043418c52362 ]
The 'operations' bitmap corresponds one-for-one with the operation
codes, no adjustment is necessary.
Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bob Peterson [Fri, 1 Feb 2013 17:03:02 +0000 (12:03 -0500)]
GFS2: Get a block reservation before resizing a file
commit
d2b47cfb26fe06002b8011707baac71a9ae8166f upstream.
This patch allocates a block reservation structure before growing
or shrinking a file. Without this structure, the grow or shink code
can reference the bad pointer.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Henningsson [Tue, 19 Feb 2013 15:11:22 +0000 (16:11 +0100)]
ALSA: hda - hdmi: ELD shouldn't be valid after unplug
commit
bbfd8a19b6913f50a362457c34d49bfafe5e456e upstream.
Currently, eld_valid is never set to false, except at kernel module
load time. This patch makes sure that eld is no longer valid when
the cable is (hot-)unplugged.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fernando Luis Vazquez Cao [Tue, 12 Feb 2013 07:47:44 +0000 (16:47 +0900)]
ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889
commit
12e31a78c70dc12897fda2489113f445c0e94a18 upstream.
Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by
the same issue that caused Vaio Z laptops to become silent: the speaker pin
must be connected to the first DAC even though the codec itself advertises
flexible routing through any of the DACs.
Use the no-primary-hp fixup for choosing the speaker pin as the primary so
that the right DAC is assigned on this device.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>