Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262391
b: refs/heads/master
c: e4258d5
h: refs/heads/master
i:
  262389: 6634156
  262387: 1e88043
  262383: 0f98c3d
v: v3
  • Loading branch information
Stefan Weinhuber authored and Heiko Carstens committed Aug 3, 2011
1 parent 5ebfd27 commit 6d05d45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7dd6b3343fdc190712d1620ee8848d25c4c77c33
refs/heads/master: e4258d55bff06780cd424c671b576a90acc1592f
9 changes: 5 additions & 4 deletions trunk/drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/mutex.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/vmalloc.h>

#include <asm/ccwdev.h>
#include <asm/ebcdic.h>
Expand Down Expand Up @@ -888,11 +889,11 @@ char *dasd_get_user_string(const char __user *user_buf, size_t user_len)
{
char *buffer;

buffer = kmalloc(user_len + 1, GFP_KERNEL);
buffer = vmalloc(user_len + 1);
if (buffer == NULL)
return ERR_PTR(-ENOMEM);
if (copy_from_user(buffer, user_buf, user_len) != 0) {
kfree(buffer);
vfree(buffer);
return ERR_PTR(-EFAULT);
}
/* got the string, now strip linefeed. */
Expand Down Expand Up @@ -930,7 +931,7 @@ static ssize_t dasd_stats_write(struct file *file,
dasd_profile_off(prof);
} else
rc = -EINVAL;
kfree(buffer);
vfree(buffer);
return rc;
}

Expand Down Expand Up @@ -1042,7 +1043,7 @@ static ssize_t dasd_stats_global_write(struct file *file,
dasd_global_profile_level = DASD_PROFILE_OFF;
} else
rc = -EINVAL;
kfree(buffer);
vfree(buffer);
return rc;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/s390/block/dasd_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,14 @@ static ssize_t dasd_stats_proc_write(struct file *file,
pr_info("The statistics have been reset\n");
} else
goto out_parse_error;
kfree(buffer);
vfree(buffer);
return user_len;
out_parse_error:
rc = -EINVAL;
pr_warning("%s is not a supported value for /proc/dasd/statistics\n",
str);
out_error:
kfree(buffer);
vfree(buffer);
return rc;
#else
pr_warning("/proc/dasd/statistics: is not activated in this kernel\n");
Expand Down

0 comments on commit 6d05d45

Please sign in to comment.