Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187151
b: refs/heads/master
c: ce2f11f
h: refs/heads/master
i:
  187149: c9a1f07
  187147: df66588
  187143: ea9d477
  187135: 4abfb74
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Mar 12, 2010
1 parent db4c9f7 commit 87bbefa
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 1ebddd85a6a6ad793eca82d65fba4573d0e28042
refs/heads/master: ce2f11fe784f7999b82c7a71cdbcb86ad2653def
11 changes: 5 additions & 6 deletions trunk/drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3104,13 +3104,13 @@ static struct cont_t raw_cmd_cont = {
.done = raw_cmd_done
};

static inline int raw_cmd_copyout(int cmd, char __user *param,
static inline int raw_cmd_copyout(int cmd, void __user *param,
struct floppy_raw_cmd *ptr)
{
int ret;

while (ptr) {
ret = copy_to_user((void __user *)param, ptr, sizeof(*ptr));
ret = copy_to_user(param, ptr, sizeof(*ptr));
if (ret)
return -EFAULT;
param += sizeof(struct floppy_raw_cmd);
Expand Down Expand Up @@ -3148,7 +3148,7 @@ static void raw_cmd_free(struct floppy_raw_cmd **ptr)
}
}

static inline int raw_cmd_copyin(int cmd, char __user *param,
static inline int raw_cmd_copyin(int cmd, void __user *param,
struct floppy_raw_cmd **rcmd)
{
struct floppy_raw_cmd *ptr;
Expand All @@ -3157,12 +3157,11 @@ static inline int raw_cmd_copyin(int cmd, char __user *param,

*rcmd = NULL;
while (1) {
ptr = (struct floppy_raw_cmd *)
kmalloc(sizeof(struct floppy_raw_cmd), GFP_USER);
ptr = kmalloc(sizeof(struct floppy_raw_cmd), GFP_USER);
if (!ptr)
return -ENOMEM;
*rcmd = ptr;
ret = copy_from_user(ptr, (void __user *)param, sizeof(*ptr));
ret = copy_from_user(ptr, param, sizeof(*ptr));
if (ret)
return -EFAULT;
ptr->next = NULL;
Expand Down

0 comments on commit 87bbefa

Please sign in to comment.