diff options
author | Steve French <sfrench@us.ibm.com> | 2006-02-15 15:13:52 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-02-15 15:13:52 -0500 |
commit | 27754b34600770beb38e3ae12cb3f345f02e3797 (patch) | |
tree | 0a50ad43c1114b40bda056bae13e0b9dd7e4eeb9 /fs | |
parent | 0ed3f64ec3a7ad29e83e03607115eeffa32f553c (diff) | |
parent | 5ecfbae093f0c37311e89b29bfc0c9d586eace87 (diff) |
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 d17c97d07c80..675bd2568297 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, | |||
1442 | &bytes_read, &smb_read_data, | 1442 | &bytes_read, &smb_read_data, |
1443 | &buf_type); | 1443 | &buf_type); |
1444 | pSMBr = (struct smb_com_read_rsp *)smb_read_data; | 1444 | pSMBr = (struct smb_com_read_rsp *)smb_read_data; |
1445 | if (copy_to_user(current_offset, | ||
1446 | smb_read_data + 4 /* RFC1001 hdr */ | ||
1447 | + le16_to_cpu(pSMBr->DataOffset), | ||
1448 | bytes_read)) { | ||
1449 | rc = -EFAULT; | ||
1450 | } | ||
1451 | if (smb_read_data) { | 1445 | if (smb_read_data) { |
1446 | if (copy_to_user(current_offset, | ||
1447 | smb_read_data + | ||
1448 | 4 /* RFC1001 length field */ + | ||
1449 | le16_to_cpu(pSMBr->DataOffset), | ||
1450 | bytes_read)) { | ||
1451 | rc = -EFAULT; | ||
1452 | } | ||
1453 | |||
1452 | if(buf_type == CIFS_SMALL_BUFFER) | 1454 | if(buf_type == CIFS_SMALL_BUFFER) |
1453 | cifs_small_buf_release(smb_read_data); | 1455 | cifs_small_buf_release(smb_read_data); |
1454 | else if(buf_type == CIFS_LARGE_BUFFER) | 1456 | else if(buf_type == CIFS_LARGE_BUFFER) |
@@ -1403,7 +1403,7 @@ static void zap_threads (struct mm_struct *mm) | |||
1403 | do_each_thread(g,p) { | 1403 | do_each_thread(g,p) { |
1404 | if (mm == p->mm && p != tsk && | 1404 | if (mm == p->mm && p != tsk && |
1405 | p->ptrace && p->parent->mm == mm) { | 1405 | p->ptrace && p->parent->mm == mm) { |
1406 | __ptrace_unlink(p); | 1406 | __ptrace_detach(p, 0); |
1407 | } | 1407 | } |
1408 | } while_each_thread(g,p); | 1408 | } while_each_thread(g,p); |
1409 | write_unlock_irq(&tasklist_lock); | 1409 | write_unlock_irq(&tasklist_lock); |