aboutsummaryrefslogtreecommitdiffstats
path: root/block/bsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bsg.c')
-rw-r--r--block/bsg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/bsg.c b/block/bsg.c
index b7e42ad55361..702f1316bb8f 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -182,7 +182,7 @@ static int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,
182 return -ENOMEM; 182 return -ENOMEM;
183 } 183 }
184 184
185 if (copy_from_user(rq->cmd, (void *)(unsigned long)hdr->request, 185 if (copy_from_user(rq->cmd, (void __user *)(unsigned long)hdr->request,
186 hdr->request_len)) 186 hdr->request_len))
187 return -EFAULT; 187 return -EFAULT;
188 188
@@ -249,7 +249,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
249 struct request *rq, *next_rq = NULL; 249 struct request *rq, *next_rq = NULL;
250 int ret, rw; 250 int ret, rw;
251 unsigned int dxfer_len; 251 unsigned int dxfer_len;
252 void *dxferp = NULL; 252 void __user *dxferp = NULL;
253 struct bsg_class_device *bcd = &q->bsg_dev; 253 struct bsg_class_device *bcd = &q->bsg_dev;
254 254
255 /* if the LLD has been removed then the bsg_unregister_queue will 255 /* if the LLD has been removed then the bsg_unregister_queue will
@@ -291,7 +291,7 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
291 rq->next_rq = next_rq; 291 rq->next_rq = next_rq;
292 next_rq->cmd_type = rq->cmd_type; 292 next_rq->cmd_type = rq->cmd_type;
293 293
294 dxferp = (void*)(unsigned long)hdr->din_xferp; 294 dxferp = (void __user *)(unsigned long)hdr->din_xferp;
295 ret = blk_rq_map_user(q, next_rq, NULL, dxferp, 295 ret = blk_rq_map_user(q, next_rq, NULL, dxferp,
296 hdr->din_xfer_len, GFP_KERNEL); 296 hdr->din_xfer_len, GFP_KERNEL);
297 if (ret) 297 if (ret)
@@ -300,10 +300,10 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
300 300
301 if (hdr->dout_xfer_len) { 301 if (hdr->dout_xfer_len) {
302 dxfer_len = hdr->dout_xfer_len; 302 dxfer_len = hdr->dout_xfer_len;
303 dxferp = (void*)(unsigned long)hdr->dout_xferp; 303 dxferp = (void __user *)(unsigned long)hdr->dout_xferp;
304 } else if (hdr->din_xfer_len) { 304 } else if (hdr->din_xfer_len) {
305 dxfer_len = hdr->din_xfer_len; 305 dxfer_len = hdr->din_xfer_len;
306 dxferp = (void*)(unsigned long)hdr->din_xferp; 306 dxferp = (void __user *)(unsigned long)hdr->din_xferp;
307 } else 307 } else
308 dxfer_len = 0; 308 dxfer_len = 0;
309 309
@@ -445,7 +445,7 @@ static int blk_complete_sgv4_hdr_rq(struct request *rq, struct sg_io_v4 *hdr,
445 int len = min_t(unsigned int, hdr->max_response_len, 445 int len = min_t(unsigned int, hdr->max_response_len,
446 rq->sense_len); 446 rq->sense_len);
447 447
448 ret = copy_to_user((void*)(unsigned long)hdr->response, 448 ret = copy_to_user((void __user *)(unsigned long)hdr->response,
449 rq->sense, len); 449 rq->sense, len);
450 if (!ret) 450 if (!ret)
451 hdr->response_len = len; 451 hdr->response_len = len;