aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/user.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-09-01 06:32:13 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-09-01 06:32:13 -0400
commit9d7548d4ca3c52ecb58f098a32b0756cdf8f96ee (patch)
tree651f7058bbaa2d8b2855286380d614afcf505118 /fs/dlm/user.c
parent31db6e9ea1dbdcf66b8227b4f7035dee1b1dd8c0 (diff)
parentbef69ea0dcce574a425feb0a5aa4c63dd108b9a6 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r--fs/dlm/user.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 929e48ae7591..34f14a14fb4e 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -527,8 +527,10 @@ static ssize_t device_write(struct file *file, const char __user *buf,
527 k32buf = (struct dlm_write_request32 *)kbuf; 527 k32buf = (struct dlm_write_request32 *)kbuf;
528 kbuf = kmalloc(count + 1 + (sizeof(struct dlm_write_request) - 528 kbuf = kmalloc(count + 1 + (sizeof(struct dlm_write_request) -
529 sizeof(struct dlm_write_request32)), GFP_KERNEL); 529 sizeof(struct dlm_write_request32)), GFP_KERNEL);
530 if (!kbuf) 530 if (!kbuf) {
531 kfree(k32buf);
531 return -ENOMEM; 532 return -ENOMEM;
533 }
532 534
533 if (proc) 535 if (proc)
534 set_bit(DLM_PROC_FLAGS_COMPAT, &proc->flags); 536 set_bit(DLM_PROC_FLAGS_COMPAT, &proc->flags);
@@ -539,8 +541,10 @@ static ssize_t device_write(struct file *file, const char __user *buf,
539 541
540 /* do we really need this? can a write happen after a close? */ 542 /* do we really need this? can a write happen after a close? */
541 if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) && 543 if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) &&
542 (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) 544 (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) {
543 return -EINVAL; 545 error = -EINVAL;
546 goto out_free;
547 }
544 548
545 sigfillset(&allsigs); 549 sigfillset(&allsigs);
546 sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); 550 sigprocmask(SIG_BLOCK, &allsigs, &tmpsig);