diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 13:51:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 13:51:58 -0700 |
commit | 40689ac479e6477096b3dbd5a374cfe3970da3a3 (patch) | |
tree | cd3fb04fe7f6281fd492c171b1e880d68d757cff /fs/dlm/user.c | |
parent | cc150a2861e744d8f574d571762cc7e9f928abb3 (diff) | |
parent | 2b75bc9121e54e22537207b47b71373bcb0be41c (diff) |
Merge tag 'dlm-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm updates from David Teigland:
"There are two main patches in this set, both related to the userland
dlm_controld daemon.
The first fixes a deadlock between dlm_controld and the dlm_send
workqueue when both access configfs data simultaneously.
The second reworks some code to get around a long standing, but
intentional, unlock balance warning. The userland daemon no longer
takes a lock that is later released from the kernel.
The other commits are minor fixes and changes."
* tag 'dlm-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
dlm: check the maximum size of a request from user
dlm: cleanup send_to_sock routine
dlm: convert add_sock routine return value type to void
dlm: remove redundant variable assignments
dlm: fix unlock balance warnings
dlm: fix uninitialized spinlock
dlm: fix deadlock between dlm_send and dlm_controld
Diffstat (limited to 'fs/dlm/user.c')
-rw-r--r-- | fs/dlm/user.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index eb4ed9ba3098..7ff49852b0cb 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c @@ -503,6 +503,13 @@ static ssize_t device_write(struct file *file, const char __user *buf, #endif return -EINVAL; +#ifdef CONFIG_COMPAT + if (count > sizeof(struct dlm_write_request32) + DLM_RESNAME_MAXLEN) +#else + if (count > sizeof(struct dlm_write_request) + DLM_RESNAME_MAXLEN) +#endif + return -EINVAL; + kbuf = kzalloc(count + 1, GFP_NOFS); if (!kbuf) return -ENOMEM; |