diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup.c | 7 | ||||
| -rw-r--r-- | kernel/cred.c | 2 | ||||
| -rw-r--r-- | kernel/kfifo.c | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 1fbcc748044a..aa3bee566446 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -2936,14 +2936,17 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, | |||
| 2936 | 2936 | ||
| 2937 | for_each_subsys(root, ss) { | 2937 | for_each_subsys(root, ss) { |
| 2938 | struct cgroup_subsys_state *css = ss->create(ss, cgrp); | 2938 | struct cgroup_subsys_state *css = ss->create(ss, cgrp); |
| 2939 | |||
| 2939 | if (IS_ERR(css)) { | 2940 | if (IS_ERR(css)) { |
| 2940 | err = PTR_ERR(css); | 2941 | err = PTR_ERR(css); |
| 2941 | goto err_destroy; | 2942 | goto err_destroy; |
| 2942 | } | 2943 | } |
| 2943 | init_cgroup_css(css, ss, cgrp); | 2944 | init_cgroup_css(css, ss, cgrp); |
| 2944 | if (ss->use_id) | 2945 | if (ss->use_id) { |
| 2945 | if (alloc_css_id(ss, parent, cgrp)) | 2946 | err = alloc_css_id(ss, parent, cgrp); |
| 2947 | if (err) | ||
| 2946 | goto err_destroy; | 2948 | goto err_destroy; |
| 2949 | } | ||
| 2947 | /* At error, ->destroy() callback has to free assigned ID. */ | 2950 | /* At error, ->destroy() callback has to free assigned ID. */ |
| 2948 | } | 2951 | } |
| 2949 | 2952 | ||
diff --git a/kernel/cred.c b/kernel/cred.c index dd76cfe5f5b0..1ed8ca18790c 100644 --- a/kernel/cred.c +++ b/kernel/cred.c | |||
| @@ -224,7 +224,7 @@ struct cred *cred_alloc_blank(void) | |||
| 224 | #ifdef CONFIG_KEYS | 224 | #ifdef CONFIG_KEYS |
| 225 | new->tgcred = kzalloc(sizeof(*new->tgcred), GFP_KERNEL); | 225 | new->tgcred = kzalloc(sizeof(*new->tgcred), GFP_KERNEL); |
| 226 | if (!new->tgcred) { | 226 | if (!new->tgcred) { |
| 227 | kfree(new); | 227 | kmem_cache_free(cred_jar, new); |
| 228 | return NULL; | 228 | return NULL; |
| 229 | } | 229 | } |
| 230 | atomic_set(&new->tgcred->usage, 1); | 230 | atomic_set(&new->tgcred->usage, 1); |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 32c5c15d750d..498cabba225e 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
| @@ -349,6 +349,7 @@ EXPORT_SYMBOL(__kfifo_from_user_n); | |||
| 349 | * @fifo: the fifo to be used. | 349 | * @fifo: the fifo to be used. |
| 350 | * @from: pointer to the data to be added. | 350 | * @from: pointer to the data to be added. |
| 351 | * @len: the length of the data to be added. | 351 | * @len: the length of the data to be added. |
| 352 | * @total: the actual returned data length. | ||
| 352 | * | 353 | * |
| 353 | * This function copies at most @len bytes from the @from into the | 354 | * This function copies at most @len bytes from the @from into the |
| 354 | * FIFO depending and returns -EFAULT/0. | 355 | * FIFO depending and returns -EFAULT/0. |
| @@ -399,7 +400,7 @@ EXPORT_SYMBOL(__kfifo_to_user_n); | |||
| 399 | * @fifo: the fifo to be used. | 400 | * @fifo: the fifo to be used. |
| 400 | * @to: where the data must be copied. | 401 | * @to: where the data must be copied. |
| 401 | * @len: the size of the destination buffer. | 402 | * @len: the size of the destination buffer. |
| 402 | @ @lenout: pointer to output variable with copied data | 403 | * @lenout: pointer to output variable with copied data |
| 403 | * | 404 | * |
| 404 | * This function copies at most @len bytes from the FIFO into the | 405 | * This function copies at most @len bytes from the FIFO into the |
| 405 | * @to buffer and 0 or -EFAULT. | 406 | * @to buffer and 0 or -EFAULT. |
