diff options
author | Steve French <sfrench@us.ibm.com> | 2006-02-15 20:13:52 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-02-15 20:13:52 +0000 |
commit | 27754b34600770beb38e3ae12cb3f345f02e3797 (patch) | |
tree | 0a50ad43c1114b40bda056bae13e0b9dd7e4eeb9 /fs | |
parent | 0ed3f64ec3a7ad29e83e03607115eeffa32f553c (diff) | |
parent | 5ecfbae093f0c37311e89b29bfc0c9d586eace87 (diff) | |
download | op-kernel-dev-27754b34600770beb38e3ae12cb3f345f02e3797.zip op-kernel-dev-27754b34600770beb38e3ae12cb3f345f02e3797.tar.gz |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/file.c | 14 | ||||
-rw-r--r-- | fs/exec.c | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index d17c97d..675bd25 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1442,13 +1442,15 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data, &bytes_read, &smb_read_data, &buf_type); pSMBr = (struct smb_com_read_rsp *)smb_read_data; - if (copy_to_user(current_offset, - smb_read_data + 4 /* RFC1001 hdr */ - + le16_to_cpu(pSMBr->DataOffset), - bytes_read)) { - rc = -EFAULT; - } if (smb_read_data) { + if (copy_to_user(current_offset, + smb_read_data + + 4 /* RFC1001 length field */ + + le16_to_cpu(pSMBr->DataOffset), + bytes_read)) { + rc = -EFAULT; + } + if(buf_type == CIFS_SMALL_BUFFER) cifs_small_buf_release(smb_read_data); else if(buf_type == CIFS_LARGE_BUFFER) @@ -1403,7 +1403,7 @@ static void zap_threads (struct mm_struct *mm) do_each_thread(g,p) { if (mm == p->mm && p != tsk && p->ptrace && p->parent->mm == mm) { - __ptrace_unlink(p); + __ptrace_detach(p, 0); } } while_each_thread(g,p); write_unlock_irq(&tasklist_lock); |