- Nov 13, 2007
-
-
Trond Myklebust authored
...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers. Looking at the sock->op->shutdown() handlers, it looks as if all of them take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the RCV_SHUTDOWN/SEND_SHUTDOWN arguments. Add a helper, and then define the SHUT_* enum to ensure that kernel users of shutdown() don't get confused. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by:
Mark Fasheh <mark.fasheh@oracle.com> Acked-by:
David Howells <dhowells@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Nov 12, 2007
-
-
J. Bruce Fields authored
As with commit 7fc90ec9 ("knfsd: nfsd: call nfsd_setuser() on fh_compose(), fix nfsd4 permissions problem") this is a case where we need to redo a security check in fh_verify() even though the filehandle already has an associated dentry--if the filehandle was created by fh_compose() in an earlier operation of the nfsv4 compound, then we may not have done these checks yet. Without this fix it is possible, for example, to traverse from an export without the secure ports requirement to one with it in a single compound, and bypass the secure port check on the new export. While we're here, fix up some minor style problems and change a printk() to a dprintk(), to make it harder for random unprivileged users to spam the logs. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Reviewed-By:
NeilBrown <neilb@suse.de> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
J. Bruce Fields authored
The v2/v3 acl code in nfsd is translating any return from fh_verify() to nfserr_inval. This is particularly unfortunate in the case of an nfserr_dropit return, which is an internal error meant to indicate to callers that this request has been deferred and should just be dropped pending the results of an upcall to mountd. Thanks to Roland <devzero@web.de> for bug report and data collection. Cc: Roland <devzero@web.de> Acked-by:
Andreas Gruenbacher <agruen@suse.de> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Reviewed-By:
NeilBrown <neilb@suse.de> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Roland McGrath authored
The coredump code always calls set_dumpable(0) when it starts (even if RLIMIT_CORE prevents any core from being dumped). The effect of this (via task_dumpable) is to make /proc/pid/* files owned by root instead of the user, so the user can no longer examine his own process--in a case where there was never any privileged data to protect. This affects e.g. auxv, environ, fd; in Fedora (execshield) kernels, also maps. In practice, you can only notice this when a debugger has requested PTRACE_EVENT_EXIT tracing. set_dumpable was only used in do_coredump for synchronization and not intended for any security purpose. (It doesn't secure anything that wasn't already unsecured when a process dies by SIGTERM instead of SIGQUIT.) This changes do_coredump to check the core_waiters count as the means of synchronization, which is sufficient. Now we leave the "dumpable" bits alone. Signed-off-by:
Roland McGrath <roland@redhat.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Nov 10, 2007
-
-
Jeff Layton authored
When a share is mounted using no username, cifs_mount sets volume_info.username as a NULL pointer, and the sesInfo userName as an empty string. The volume_info.username is passed to a couple of other functions to see if there is an existing unc or tcp connection that can be used. These functions assume that the username will be a valid string that can be passed to strncmp. If the pointer is NULL, then the kernel will oops if there's an existing session to which the string can be compared. This patch changes cifs_mount to set volume_info.username to an empty string in this situation, which prevents the oops and should make it so that the comparison to other null auth sessions match. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- Nov 09, 2007
-
-
Steve French authored
When mounted with cifsacl mount option, readdir can not instantiate the inode with the estimated mode based on the ACL for each file since we have not queried for the ACL for each of these files yet. So set the refresh time to zero for these inodes so that the next stat will cause the client to go to the server for the ACL info so we can build the estimated mode (this means we also will issue an extra QueryPathInfo if the stat happens within 1 second, but this is trivial compared to the time required to open/getacl/close for each). ls -l is slower when cifsacl mount option is specified, but displays correct mode information. Signed-off-by:
Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- Nov 08, 2007
-
-
Steve French authored
Acked-by:
Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Steve French authored
When mounted with the cifsacl mount option, we were treating any deny ACEs found like allow ACEs and it turns out for SFU and SUA Windows set these type of access control entries often. The order of ACEs is important too. The canonical order that most ACL tools and Windows explorer consruct ACLs with is to begin with DENY entries then follow with ALLOW, otherwise an allow entry could be encountered first, making the subsequent deny entry like "dead code which would be superflous since Windows stops when a match is made for the operation you are trying to perform for your user We start with no permissions in the mode and build up as we find permissions (ie allow ACEs). This fixes deny ACEs so they affect the mask used to set the subsequent allow ACEs. Acked-by:
Shirish Pargaonkar <shirishp@us.ibm.com> CC: Alexander Bokovoy <ab@samba.org> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Igor Mammedov authored
Adds uid to key description fro supporting user mounts and minor formating changes Acked-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Igor Mammedov <niallain@gmail.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- Nov 07, 2007
-
-
Jens Axboe authored
Normally io priorities follow the CPU nice, unless a specific scheduling class has been set. Once that is set, there's no way to reset the behaviour to 'none' so that it follows CPU nice again. Currently passing in 0 as the ioprio class/value will return -1/EINVAL, change that to allow resetting of a set scheduling class. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
David S. Miller authored
Use SO_RCVBUFFORCE instead. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
There are no more users. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Srinivas Eeda authored
If another node unlinks the destination while ocfs2_rename() is waiting on a cluster lock, ocfs2_rename() simply logs an error and continues. This causes a crash because the renaming node is now trying to delete a non-existent inode. The correct solution is to return -ENOENT. Signed-off-by:
Srinivas Eeda <srinivas.eeda@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Jan Kara authored
We should subtract start of our IO from PAGE_CACHE_SIZE to get the right length of the write we want to perform. Signed-off-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
On file systems which don't support sparse files, Ocfs2_map_page_blocks() was reading blocks on appending writes. This caused write performance to suffer dramatically. Fix this by detecting an appending write on a nonsparse fs and skipping the read. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
We're missing a meta data commit for extending sync writes. In thoery, write could return with the meta data required to read the data uncommitted to disk. Fix that by detecting an allocating write and forcing a journal commit in the sync case. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
Do this to avoid a theoretical (I haven't seen this in practice) race where the downconvert thread might drop the dentry lock, allowing a remote unlink to proceed before dropping the inode locks. This could bounce access to the orphan dir between nodes. There doesn't seem to be a need to do the same in ocfs2_dentry_iput() as that's never called for the last ref drop from the downconvert thread. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Mark Fasheh authored
If we have not yet created a cluster lock, ocfs2_cluster_lock() will first create it at NLMODE, and then convert the lock to either PRMODE or EXMODE (whichever is requested). Change ocfs2_cluster_lock() to just create the lock at the initially requested level. ocfs2_locking_ast() handles this case fine, so the only update required was in setup of locking state. This should reduce the number of network messages required for a new lock by one, providing an incremental performance enhancement. Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Roel Kluin authored
Fixes priority mistakes similar to '!x & y' Signed-off-by:
Roel Kluin <12o3l@tiscali.nl> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Adrian Bunk authored
ocfs2_find_entry_el() can become static. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- Nov 06, 2007
-
-
Latchesar Ionkov authored
v9fs_parse_options function uses strsep which modifies the value of the v9ses->options field. That modified value is later passed to the function that creates the transport potentially making the transport creation function to fail. This patch creates a copy of v9ses->option field that v9fs_parse_options function uses instead of the original value. Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Acked-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Latchesar Ionkov authored
This patch fixes a memory leak in v9fs_get_sb. Signed-off-by:
Latchesar Ionkov <lucho@ionkov.net> Acked-by:
Eric Van Hensbergen <ericvh@gmail.com>
-
Michael Halcrow authored
Release the crypt_stat hash mutex on allocation error. Check for error conditions when doing crypto hash calls. Signed-off-by:
Michael Halcrow <mhalcrow@us.ibm.com> Reported-by:
Kazuki Ohta <kazuki.ohta@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Michael Halcrow authored
The extent_offset is getting incremented twice per loop iteration through any given page. It should only be getting incremented once. This bug should only impact hosts with >4K page sizes. Signed-off-by:
Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Adrian Bunk authored
This patch fixes an off-by-one error spotted by the Coverity checker. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Acked-by:
David Howells <dhowells@redhat.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Nov 05, 2007
-
-
Steve French authored
Acked-by:
Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Steve French authored
Acked-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- Nov 03, 2007
-
-
Anton Altaparmakov authored
The regression was caused by: commit[a32ea1e1] Fix read/truncate race This causes ntfs_readpage() to be called for a zero i_size inode, which failed when the file was compressed and non-resident. Thanks a lot to Mike Galbraith for reporting the issue and tracking down the commit that caused the regression. Looking into it I found three bugs which the patch fixes. Signed-off-by:
Anton Altaparmakov <aia21@cantab.net> Tested-by:
Mike Galbraith <efault@gmx.de> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Jeff Layton authored
Also, fix the parser to recognize them and set the secType accordingly. Make CIFSSMBNegotiate not error out automatically after parsing the securityBlob. Also thanks to Q (Igor) and Simo for their help on this set of kerberos patches (and Dave Howells for help on the upcall). Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Jeff Layton authored
Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Jeff Layton authored
Add routines to handle upcalls to userspace via keyctl for the purpose of getting a SPNEGO blob for a particular uid and server combination. Clean up the Makefile a bit and set it up to only compile cifs_spnego if CONFIG_CIFS_UPCALL is set. Also change CONFIG_CIFS_UPCALL to depend on CONFIG_KEYS rather than CONFIG_CONNECTOR. cifs_spnego.h defines the communications between kernel and userspace and is intended to be shared with userspace programs. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Jeff Layton authored
Currently, cifs_calc_signature2 errors out if it gets a zero-length iovec. Fix it to silently continue in that case. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- Nov 02, 2007
-
-
Adrian Bunk authored
Not architecture specific code should not #include <asm/scatterlist.h>. This patch therefore either replaces them with #include <linux/scatterlist.h> or simply removes them if they were unused. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- Nov 01, 2007
-
-
Steve French authored
Also clean up ACL code Acked-by:
Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Steve French authored
Kernel bugzilla bug #9228 If mount helper (mount.cifs) missing, mounts with form like //10.11.12.13/c$ would not work (only mounts with slash e.g. //10.11.12.13\\c$ would work) due to problem with slash supposed to be converted to backslash by the mount helper (which is not there). If we fail on converting an IPv4 address in in4_pton then try to canonicalize the first slash (ie between sharename and host ip address) if necessary. If we have to retry to check for IPv6 address the slash is already converted if necessary. Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
- Oct 31, 2007
-
-
Steve French authored
We were requesting GENERIC_READ but that fails when we do not have read permission on the file (even if we could read the ACL). Also move the dump access control entry code into debug ifdef. Signed-off-by:
Steve French <sfrench@us.ibm.com>
-
Adrian Bunk authored
sysfs_{get,put}_active() can now become static. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Benjamin Herrenschmidt authored
A stray semicolon slipped in the patch that updated dev_ifname32 to not be inline, causing it to always return -EFAULT. This fixes it. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 30, 2007
-
-
Dirk Hohndel authored
Fix links to files in Documentation/* in various Kconfig files Signed-off-by:
Dirk Hohndel <hohndel@linux.intel.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
J. Bruce Fields authored
It's currently possible to send posix_locks_deadlock() into an infinite loop (under the BKL). For now, fix this just by bailing out after a few iterations. We may want to fix this in a way that better clarifies the semantics of deadlock detection. But that will take more time, and this minimal fix is probably adequate for any realistic scenario, and is simple enough to be appropriate for applying to stable kernels now. Thanks to George Davis for reporting the problem. Cc: "George G. Davis" <gdavis@mvista.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu> Acked-by:
Alan Cox <alan@redhat.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-