All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sg: fix sparse __user annotation warning
@ 2014-09-30 15:20 Christoph Hellwig
  2014-09-30 15:20 ` [PATCH 2/2] scsi: add a CONFIG_SCSI_MQ_DEFAULT option Christoph Hellwig
  2014-09-30 15:54 ` [PATCH 1/2] sg: fix sparse __user annotation warning Douglas Gilbert
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2014-09-30 15:20 UTC (permalink / raw)
  To: linux-scsi; +Cc: Douglas Gilbert

blk_trace_setup takes a __user pointer, so use the local void __user *
pointer instead of casting the argument to char * for it in the sg
ioctl handler.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/sg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 01cf888..b94435b 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1138,7 +1138,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
 				       sdp->disk->disk_name,
 				       MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
 				       NULL,
-				       (char *)arg);
+				       p);
 	case BLKTRACESTART:
 		return blk_trace_startstop(sdp->device->request_queue, 1);
 	case BLKTRACESTOP:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-30 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 15:20 [PATCH 1/2] sg: fix sparse __user annotation warning Christoph Hellwig
2014-09-30 15:20 ` [PATCH 2/2] scsi: add a CONFIG_SCSI_MQ_DEFAULT option Christoph Hellwig
2014-09-30 15:54 ` [PATCH 1/2] sg: fix sparse __user annotation warning Douglas Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.