Commit 3e11acd4 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: rename structs
  dlm: add missing kfrees
parents 758db3f2 51409340
This diff is collapsed.
...@@ -527,8 +527,10 @@ static ssize_t device_write(struct file *file, const char __user *buf, ...@@ -527,8 +527,10 @@ static ssize_t device_write(struct file *file, const char __user *buf,
k32buf = (struct dlm_write_request32 *)kbuf; k32buf = (struct dlm_write_request32 *)kbuf;
kbuf = kmalloc(count + 1 + (sizeof(struct dlm_write_request) - kbuf = kmalloc(count + 1 + (sizeof(struct dlm_write_request) -
sizeof(struct dlm_write_request32)), GFP_KERNEL); sizeof(struct dlm_write_request32)), GFP_KERNEL);
if (!kbuf) if (!kbuf) {
kfree(k32buf);
return -ENOMEM; return -ENOMEM;
}
if (proc) if (proc)
set_bit(DLM_PROC_FLAGS_COMPAT, &proc->flags); 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,8 +541,10 @@ static ssize_t device_write(struct file *file, const char __user *buf,
/* do we really need this? can a write happen after a close? */ /* do we really need this? can a write happen after a close? */
if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) && if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) &&
(proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) {
return -EINVAL; error = -EINVAL;
goto out_free;
}
sigfillset(&allsigs); sigfillset(&allsigs);
sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); sigprocmask(SIG_BLOCK, &allsigs, &tmpsig);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment