Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258621
b: refs/heads/master
c: 2b727c6
h: refs/heads/master
i:
  258619: 8bcf5b3
v: v3
  • Loading branch information
Namhyung Kim authored and Jens Axboe committed Jun 20, 2011
1 parent e31cd9a commit 755fe3f
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 44194e3e88fcfe77a2a6e2333847d4f27816259a
refs/heads/master: 2b727c6300b49352f80f63704bb50c256949e95e
12 changes: 6 additions & 6 deletions trunk/block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
return -ENOMEM;
}

if (copy_from_user(rq->cmd, (void *)(unsigned long)hdr->request,
if (copy_from_user(rq->cmd, (void __user *)(unsigned long)hdr->request,
hdr->request_len))
return -EFAULT;

Expand Down Expand Up @@ -249,7 +249,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
struct request *rq, *next_rq = NULL;
int ret, rw;
unsigned int dxfer_len;
void *dxferp = NULL;
void __user *dxferp = NULL;
struct bsg_class_device *bcd = &q->bsg_dev;

/* if the LLD has been removed then the bsg_unregister_queue will
Expand Down Expand Up @@ -291,7 +291,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
rq->next_rq = next_rq;
next_rq->cmd_type = rq->cmd_type;

dxferp = (void*)(unsigned long)hdr->din_xferp;
dxferp = (void __user *)(unsigned long)hdr->din_xferp;
ret = blk_rq_map_user(q, next_rq, NULL, dxferp,
hdr->din_xfer_len, GFP_KERNEL);
if (ret)
Expand All @@ -300,10 +300,10 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,

if (hdr->dout_xfer_len) {
dxfer_len = hdr->dout_xfer_len;
dxferp = (void*)(unsigned long)hdr->dout_xferp;
dxferp = (void __user *)(unsigned long)hdr->dout_xferp;
} else if (hdr->din_xfer_len) {
dxfer_len = hdr->din_xfer_len;
dxferp = (void*)(unsigned long)hdr->din_xferp;
dxferp = (void __user *)(unsigned long)hdr->din_xferp;
} else
dxfer_len = 0;

Expand Down Expand Up @@ -445,7 +445,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
int len = min_t(unsigned int, hdr->max_response_len,
rq->sense_len);

ret = copy_to_user((void*)(unsigned long)hdr->response,
ret = copy_to_user((void __user *)(unsigned long)hdr->response,
rq->sense, len);
if (!ret)
hdr->response_len = len;
Expand Down

0 comments on commit 755fe3f

Please sign in to comment.