aboutsummaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)AuthorFilesLines
2008-05-24ecryptfs: fix missed mutex_unlockCyrill Gorcunov1-1/+1
Cc: Michael Halcrow <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-24fuse: fix bdi naming conflictMiklos Szeredi1-1/+6
Fuse allocates a separate bdi for each filesystem, and registers them in sysfs with "MAJOR:MINOR" of sb->s_dev (st_dev). This works fine for anon devices normally used by fuse, but can conflict with an already registered BDI for "fuseblk" filesystems, where sb->s_dev represents a real block device. In particularl this happens if a non-partitioned device is being mounted. Fix by registering with a different name for "fuseblk" filesystems. Thanks to Ioan Ionita for the bug report. Signed-off-by: Miklos Szeredi <[email protected]> Reported-by: Ioan Ionita <[email protected]> Tested-by: Ioan Ionita <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-23Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6Linus Torvalds7-94/+98
* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6: [XFS] Fix memory corruption with small buffer reads [XFS] Fix inode list allocation size in writeback. [XFS] Don't allow memory reclaim to wait on the filesystem in inode [XFS] Fix fsync() b0rkage. [XFS] Include linux/random.h in all builds, not just debug builds.
2008-05-23[XFS] Fix memory corruption with small buffer readsChristoph Hellwig2-4/+39
When we have multiple buffers in a single page for a blocksize == pagesize filesystem we might overwrite the page contents if two callers hit it shortly after each other. To prevent that we need to keep the page locked until I/O is completed and the page marked uptodate. Thanks to Eric Sandeen for triaging this bug and finding a reproducible testcase and Dave Chinner for additional advice. This should fix kernel.org bz #10421. Tested-by: Eric Sandeen <[email protected]> SGI-PV: 981813 SGI-Modid: xfs-linux-melb:xfs-kern:31173a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David Chinner <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-05-23[XFS] Fix inode list allocation size in writeback.David Chinner1-3/+4
We only need to allocate space for the number of inodes in the cluster when writing back inodes, not every byte in the inode cluster. This reduces the amount of memory needing to be allocated to 256 bytes instead of 64k. SGI-PV: 981949 SGI-Modid: xfs-linux-melb:xfs-kern:31182a Signed-off-by: David Chinner <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-05-23[XFS] Don't allow memory reclaim to wait on the filesystem in inodeDavid Chinner1-1/+1
writeback If we allow memory reclaim to wait on the pages under writeback in inode cluster writeback we could deadlock because we are currently holding the ILOCK on the initial writeback inode which is needed in data I/O completion to change the file size or do unwritten extent conversion before the pages are taken out of writeback state. SGI-PV: 981091 SGI-Modid: xfs-linux-melb:xfs-kern:31015a Signed-off-by: David Chinner <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-05-23[XFS] Fix fsync() b0rkage.David Chinner4-86/+54
xfs_fsync() fails to wait for data I/O completion before checking if the inode is dirty or clean to decide whether to log the inode or not. This misses inode size updates when the data flushed by the fsync() is extending the file. Hence, like fdatasync(), we need to wait for I/o completion first, then check the inode for cleanliness. Doing so makes the behaviour of xfs_fsync() identical for fsync and fdatasync and we *always* use synchronous semantics if the inode is dirty. Therefore also kill the differences and remove the unused flags from the xfs_fsync function and callers. SGI-PV: 981296 SGI-Modid: xfs-linux-melb:xfs-kern:31033a Signed-off-by: David Chinner <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-05-22[CIFS] Fix reversed memset argumentsDave Jones1-2/+2
Signed-off-by: Dave Jones <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-22Adds username in the upcall key for unattended mounts with keytabIgor Mammedov1-0/+3
Signed-off-by: Igor Mammedov <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-22[CIFS] Remove redundant NULL checkSteve French1-12/+6
Noticed by Coverity checker. Signed-off-by: Steve French <[email protected]>
2008-05-21ocfs2 endianness fixesAl Viro1-2/+2
Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-21ecryptfs fixesAl Viro1-14/+12
memcpy() from userland pointer is a Bad Thing(tm) Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-21fix hppfs Makefile breakageAl Viro1-4/+1
Fallout from commit 46d7b522ebf486edbd096965d534cc6465e9e309 ("uml: move hppfs_kern.c to hppfs.c") Signed-off-by: Al Viro <[email protected]> Acked-by: Jeff Dike <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds22-545/+612
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (21 commits) [CIFS] Remove debug statement Fix possible access to undefined memory region. [CIFS] Enable DFS support for Windows query path info [CIFS] Enable DFS support for Unix query path info [CIFS] add missing seq_printf to cifs_show_options for hard mount option [CIFS] add more complete mount options to cifs_show_options [CIFS] Add missing defines for DFS CIFSGetDFSRefer cleanup + dfs_referral_level_3 fixed to conform REFERRAL_V3 the MS-DFSC spec. Fixed DFS code to work with new 'build_path_from_dentry', that returns full path if share in the dfs, now. [CIFS] enable parsing for transport encryption mount parm [CIFS] Finishup DFS code [CIFS] BKL-removal: convert CIFS over to unlocked_ioctl [CIFS] suppress duplicate warning [CIFS] Fix paths when share is in DFS to include proper prefix add function to convert access flags to legacy open mode clarify return value of cifs_convert_flags() [CIFS] don't explicitly do a FindClose on rewind when directory search has ended [CIFS] cleanup old checkpatch warnings [CIFS] CIFSSMBPosixLock should return -EINVAL on error fix memory leak in CIFSFindNext ...
2008-05-21[CIFS] Remove debug statementSteve French1-1/+1
Signed-off-by: Steve French <[email protected]>
2008-05-21Fix possible access to undefined memory region.Igor Mammedov1-4/+5
Signed-off-by: Igor Mammedov <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-20Merge branch 'for-2.6.26' of git://linux-nfs.org/~bfields/linuxLinus Torvalds1-1/+1
* 'for-2.6.26' of git://linux-nfs.org/~bfields/linux: (25 commits) svcrdma: Verify read-list fits within RPCSVC_MAXPAGES svcrdma: Change svc_rdma_send_error return type to void svcrdma: Copy transport address and arm CQ before calling rdma_accept svcrdma: Set rqstp transport address in rdma_read_complete function svcrdma: Use ib verbs version of dma_unmap svcrdma: Cleanup queued, but unprocessed I/O in svc_rdma_free svcrdma: Move the QP and cm_id destruction to svc_rdma_free svcrdma: Add reference for each SQ/RQ WR svcrdma: Move destroy to kernel thread svcrdma: Shrink scope of spinlock on RQ CQ svcrdma: Use standard Linux lists for context cache svcrdma: Simplify RDMA_READ deferral buffer management svcrdma: Remove unused READ_DONE context flags bit svcrdma: Return error from rdma_read_xdr so caller knows to free context svcrdma: Fix error handling during listening endpoint creation svcrdma: Free context on post_recv error in send_reply svcrdma: Free context on ib_post_recv error svcrdma: Add put of connection ESTABLISHED reference in rdma_cma_handler svcrdma: Fix return value in svc_rdma_send svcrdma: Fix race with dto_tasklet in svc_rdma_send ...
2008-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-5/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits) pktgen: make sure that pktgen_thread_worker has been executed [VLAN]: Propagate selected feature bits to VLAN devices drivers/atm/: remove CVS keywords vlan: Correctly handle device notifications for layered VLAN devices net: Fix call to ->change_rx_flags(dev, IFF_MULTICAST) in dev_change_flags() net_sched: cls_api: fix return value for non-existant classifiers ipsec: Use the correct ip_local_out function ipv6 addrconf: Allow infinite prefix lifetime. ipv6 route: Fix lifetime in netlink. ipv6 addrconf: Fix route lifetime setting in corner case. ndisc: Add missing strategies for per-device retrans timer/reachable time settings. ipv6: Move <linux/in6.h> from header-y to unifdef-y. l2tp: avoid skb truesize bug if headroom is increased wireless: Create 'device' symlink in sysfs wireless, airo: waitbusy() won't delay libertas: fix command timeout after firmware failure mac80211: Add RTNL version of ieee80211_iterate_active_interfaces mac80211 : Association with 11n hidden ssid ap. hostap: fix "registers" registration in procfs isdn/capi: Return proper errnos on module init. ...
2008-05-20[CIFS] Enable DFS support for Windows query path infoSteve French1-146/+178
Final piece for handling DFS in query_path_info, constructing a fake inode for the junction directory which the submount will cover. This handles the non-Unix (Windows etc.) code path. Signed-off-by: Steve French <[email protected]>
2008-05-20[CIFS] Enable DFS support for Unix query path infoSteve French4-50/+85
Final piece for handling DFS in unix_query_path_info, constructing a fake inode for the junction directory which the submount will cover. Acked-by: Igor Mammedov <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixesLinus Torvalds7-18/+23
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes: [GFS2] Prefer strlcpy() over snprintf() [GFS2] Fix cast from unsigned int to s64 [GFS2] filesystem consistency error from do_strip
2008-05-19Merge branch 'audit.b51' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current * 'audit.b51' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] list_for_each_rcu must die: audit [patch 1/1] audit_send_reply(): fix error-path memory leak [PATCH] open sessionid permissions
2008-05-19Merge branch 'for-linus' of ↵Linus Torvalds5-16/+173
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: [PATCH] return to old errno choice in mkdir() et.al. [Patch] fs/binfmt_elf.c: fix wrong return values [PATCH] get rid of leak in compat_execve() [Patch] fs/binfmt_elf.c: fix a wrong free [PATCH] avoid multiplication overflows and signedness issues for max_fds [PATCH] dup_fd() part 4 - race fix [PATCH] dup_fd() - part 3 [PATCH] dup_fd() part 2 [PATCH] dup_fd() fixes, part 1 [PATCH] take init_files to fs/file.c
2008-05-19[CIFS] add missing seq_printf to cifs_show_options for hard mount optionSteve French1-0/+3
Also Kari Hurtta noticed a missing check in the same function which is now fixed. CC: Kari Hurtta <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-19dlm: fix plock dev_write return valueDavid Teigland1-1/+1
The return value on writes to the plock device should be the number of bytes written. It was returning 0 instead when an nfs lock callback was involved. Reported-by: Nathan Straz <[email protected]> Signed-off-by: David Teigland <[email protected]>
2008-05-19dlm: tcp_connect_to_sock should check for -EINVAL, not EINVALMarcin Slusarz1-1/+1
Signed-off-by: Marcin Slusarz <[email protected]> Cc: Christine Caulfield <[email protected]> Cc: David Teigland <[email protected]> Cc: [email protected] Signed-off-by: David Teigland <[email protected]>
2008-05-19dlm: section mismatch warning fixLeonardo Potenza1-1/+1
Removed the section mismatch message: WARNING: fs/dlm/dlm.o(.init.text+0x132): Section mismatch in reference from the function init_module() to the function .exit.text:dlm_netlink_exit() Since dlm_netlink_exit() is called in the init_dlm() error handling, the __exit annotation has been removed. Signed-off-by: Leonardo Potenza <[email protected]> Signed-off-by: David Teigland <[email protected]>
2008-05-19dlm: convert connections_lock in a mutexMatthias Kaehlcke1-12/+13
The semaphore connections_lock is used as a mutex. Convert it to the mutex API. Signed-off-by: Matthias Kaehlcke <[email protected]> Cc: Christine Caulfield <[email protected]> Cc: David Teigland <[email protected]> Cc: Steven Whitehouse <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: David Teigland <[email protected]>
2008-05-18nfsd: reorder printk in do_probe_callback to avoid use-after-freeJ. Bruce Fields1-1/+1
We're currently dereferencing the client after we drop our reference count to it. Signed-off-by: J. Bruce Fields <[email protected]>
2008-05-18Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds20-145/+157
* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: SUNRPC: AUTH_SYS "machine creds" shouldn't use negative valued uid/gid nfs: make nfs4_drop_state_owner() static nfs: path_{get,put}() cleanups nfs: replace remaining __FUNCTION__ occurrences nfs/lsm: make NFSv4 set LSM mount options NFSv4: Check the return value of decode_compound_hdr_arg() nfs: fix race in nfs_dirty_request NFS: Ensure that 'noac' and/or 'actimeo=0' turn off attribute caching
2008-05-17[PATCH] open sessionid permissionsSteve Grubb1-1/+1
The current permissions on sessionid are a little too restrictive. Signed-off-by: Steve Grubb <[email protected]> Signed-off-by: Al Viro <[email protected]>
2008-05-17[CIFS] add more complete mount options to cifs_show_optionsSteve French1-1/+30
adds various options to cifs_show_options (displayed when you cat /proc/mounts with a cifs mount). I limited the new ones to values that are associated with the mount with the exception of "seal" (which is a per tree connection property, but I thought was important enough to show through). Eventually cifs's parse_mount_options also needs to be rewritten to use the match_token API but that would be a big enough change that I would prefer that changing parse_mount_options wait until next release. Signed-off-by: Steve French <[email protected]>
2008-05-16[PATCH] return to old errno choice in mkdir() et.al.Al Viro1-4/+8
In case when both EEXIST and EROFS would apply we used to return the former in mkdir(2) and friends. Lest anyone suspects us of being consistent, in the same situation knfsd gave clients nfs_erofs... ro-bind series had switched the syscall side of things to returning -EROFS and immediately broke an application - namely, mkdir -p. Patch restores the original behaviour... Signed-off-by: Al Viro <[email protected]>
2008-05-16[Patch] fs/binfmt_elf.c: fix wrong return valuesWANG Cong1-2/+2
create_elf_tables() returns 0 on success. But when strnlen_user() "fails", it returns 0 directly. So this is wrong. Signed-off-by: WANG Cong <[email protected]> Cc: Alexander Viro <[email protected]> Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] get rid of leak in compat_execve()Al Viro2-6/+10
Even though copy_compat_strings() doesn't cache the pages, copy_strings_kernel() and stuff indirectly called by e.g. ->load_binary() is doing that, so we need to drop the cache contents in the end. [found by WANG Cong <[email protected]>] Signed-off-by: Al Viro <[email protected]>
2008-05-16[Patch] fs/binfmt_elf.c: fix a wrong freeWANG Cong1-2/+3
In kmalloc failing path, we shouldn't free pointers in 'info', because the struct 'info' is uninitilized when kmalloc is called. And when kmalloc returns NULL, it's needless to kfree it. Signed-off-by: WANG Cong <[email protected]> Cc: Alexander Viro <[email protected]> Reviewed-by: Pekka Enberg <[email protected]> -- Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] avoid multiplication overflows and signedness issues for max_fdsAl Viro1-0/+4
Limit sysctl_nr_open - we don't want ->max_fds to exceed MAX_INT and we don't want size calculation for ->fd[] to overflow. Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] dup_fd() part 4 - race fixAl Viro1-2/+8
Parent _can_ be a clone task, contrary to the comment. Moreover, more files could be opened while we allocate a copy, in which case we end up copying only part into new descriptor table. Since what we get _is_ affected by all changes in the old range, we can get rather weird effects - e.g. dup2(0, 1024); close(0); in parallel with fork() resulting in child that sees the effect of close(), but not that of dup2() done just before that close(). What we need is to recalculate the open_count after having reacquired ->file_lock and if external fdtable we'd just allocated is too small for it, free the sucker and redo allocation. Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] dup_fd() - part 3Al Viro1-28/+15
merge alloc_files() into dup_fd(), leave setting newf->fdt until the end Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] dup_fd() part 2Al Viro1-8/+16
use alloc_fdtable() instead of expand_files(), get rid of pointless grabbing newf->file_lock, kill magic in copy_fdtable() that used to be there only to skip copying when called from dup_fd(). Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] dup_fd() fixes, part 1Al Viro1-0/+130
Move the sucker to fs/file.c in preparation to the rest Signed-off-by: Al Viro <[email protected]>
2008-05-16[PATCH] take init_files to fs/file.cAl Viro1-0/+13
Signed-off-by: Al Viro <[email protected]>
2008-05-16byteorder: don't directly include linux/byteorder/generic.hHarvey Harrison1-1/+1
Use asm/byteorder.h instead. Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-16[CIFS] Add missing defines for DFSSteve French2-8/+18
Also has minor cleanup of previous patch CC: Igor Mammedov <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-16CIFSGetDFSRefer cleanup + dfs_referral_level_3 fixed to conform REFERRAL_V3 ↵Igor Mammedov2-82/+139
the MS-DFSC spec. Signed-off-by: Igor Mammedov <[email protected]> Signed-off-by: Steve French <[email protected]>
2008-05-16nfs: make nfs4_drop_state_owner() staticAdrian Bunk2-2/+1
nfs4_drop_state_owner() can now become static. Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2008-05-16nfs: path_{get,put}() cleanupsJan Blunck3-8/+4
Here are some more places where path_{get,put}() can be used instead of dput()/mntput() pair. Signed-off-by: Jan Blunck <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2008-05-16nfs: replace remaining __FUNCTION__ occurrencesHarvey Harrison18-123/+123
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2008-05-16nfs/lsm: make NFSv4 set LSM mount optionsEric Paris1-0/+10
NFSv3 get_sb operations call into the LSM layer to set security options passed from userspace. NFSv4 hooks were not originally added since it was reasonably late in the merge window and NFSv3 was the only thing that had regressed (v4 has never supported any LSM options) This patch makes NFSv4 call into the LSM to set security options rather than just blindly dropping them with no notice to the user as happens today. This patch was tested in a simple NFSv4 environment with the context= option and appeared to work as expected. Signed-off-by: Eric Paris <[email protected]> Cc: Trond Myklebust <[email protected]> Cc: "J. Bruce Fields" <[email protected]> Cc: Stephen Smalley <[email protected]> Acked-by: James Morris <[email protected]> Cc: Casey Schaufler <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2008-05-16NFSv4: Check the return value of decode_compound_hdr_arg()Trond Myklebust1-11/+11
If decode_compound_hdr_arg() returns a resource error, then we cannot proceed to process the callback. Return a 'GARBAGE_ARGS' rpc-level error to the caller instead. If, however, the minor version field is incorrect, then we need to propagate the resulting NFS4ERR_MINOR_VERS_MISMATCH error back as the compound status field (setting the nops field to 0). Finally, if encode_compound_hdr_res() returns an error, we need to return an RPC_SYSTEM_ERR to the caller. Signed-off-by: Trond Myklebust <[email protected]>